Version 2.15.0-178.1.beta

Merge '2.15.0-178.0.dev' into beta
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index b6def05..f09e2dd 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": "2021-09-01T12:41:37.776425",
+  "generated": "2021-10-03T09:32:39.517171",
   "generator": "tools/generate_package_config.dart",
   "packages": [
     {
@@ -70,7 +70,7 @@
       "name": "analysis_server",
       "rootUri": "../pkg/analysis_server",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "analysis_server_client",
@@ -82,7 +82,7 @@
       "name": "analyzer",
       "rootUri": "../pkg/analyzer",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "analyzer_cli",
@@ -94,7 +94,7 @@
       "name": "analyzer_plugin",
       "rootUri": "../pkg/analyzer_plugin",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "analyzer_utilities",
@@ -112,7 +112,7 @@
       "name": "async",
       "rootUri": "../third_party/pkg/async",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "async_helper",
@@ -351,7 +351,7 @@
       "name": "http",
       "rootUri": "../third_party/pkg/http",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "http_io",
@@ -476,7 +476,7 @@
       "name": "nnbd_migration",
       "rootUri": "../pkg/nnbd_migration",
       "packageUri": "lib/",
-      "languageVersion": "2.12"
+      "languageVersion": "2.14"
     },
     {
       "name": "oauth2",
@@ -494,7 +494,7 @@
       "name": "observatory_2",
       "rootUri": "../runtime/observatory_2",
       "packageUri": "lib/",
-      "languageVersion": "2.2"
+      "languageVersion": "2.6"
     },
     {
       "name": "observatory_test_package",
@@ -810,6 +810,12 @@
       "rootUri": "../third_party/pkg/yaml",
       "packageUri": "lib/",
       "languageVersion": "2.12"
+    },
+    {
+      "name": "yaml_edit",
+      "rootUri": "../third_party/pkg/yaml_edit",
+      "packageUri": "lib/",
+      "languageVersion": "2.12"
     }
   ]
 }
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d80768..e467d97 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,201 @@
 
 ### Language
 
+- **[Constructor tearoffs][]**: **BETA PREVIEW**
+
+  Previous Dart versions allowed a method on an instance to be passed as a
+  closure, and similarly for static methods. This is commonly referred to as
+  "closurizing" or "tearing off" a method. Constructors were not previously
+  eligible for closurization, forcing users to explicitly write wrapper
+  functions when using constructors as first class functions, as in the calls to
+  `List.map` in the following example:
+
+  ```dart
+  class A {
+    int x;
+    A(this.x);
+    A.fromString(String s) : x = int.parse(s);
+  }
+
+  void main() {
+    var listOfInts = [1, 2, 3];
+    var listOfStrings = ["1", "2", "3"];
+    for(var a in listOfInts.map((x) => A(x))) {
+      print(a.x);
+    }
+    for(var a in listOfStrings.map((x) => A.fromString(x))) {
+      print(a.x);
+    }
+  }
+  ```
+
+  New in Dart 2.15, constructors are now allowed to be torn off. Named
+  constructors are closurized using their declared name (here `A.fromString`),
+  and unnamed closures are referred to for closurization using the keyword `new`
+  (here `A.new`). The example above may now be written as:
+
+  ```dart
+  class A {
+    int x;
+    A(this.x);
+    A.fromString(String s) : x = int.parse(s);
+  }
+
+  void main() {
+    var listOfInts = [1, 2, 3];
+    var listOfStrings = ["1", "2", "3"];
+    for(A a in listOfInts.map(A.new)) {
+      print(a.x);
+    }
+    for(A a in listOfStrings.map(A.fromString)) {
+      print(a.x);
+    }
+  }
+  ```
+
+  Constructors for generic classes may be torn off as generic functions, or
+  instantiated at the tear off site. So in the following code, the tear off
+  `G.new` used to initialize the variable `f` produces a generic function which
+  may be used to produce an instance of `G<T>` for any type `T` provided when
+  `f` is called. The tear off `G<String>.new` used to initialize the variable
+  `g` on the other hand produces a non-generic function which may only be used
+  to produce instances of type `G<String>`.
+
+  ```dart
+  class G<T> {
+    T x;
+    G(this.x);
+  }
+
+  void main() {
+    G<T> Function<T>(T x) f = G.new;
+    var x = f<int>(3);
+    G<String> Function(String y) g = G<String>.new;
+    var y = g("hello");
+  }
+  ```
+
+  The new constructor tearoff feature is currently in **BETA PREVIEW**. The
+  feature is enabled in beta releases only, and is still subject to breaking
+  changes. It is not fully supported by all tools and there may be known issues
+  with the tool support. Feedback on the feature is welcome, but it is not
+  recommended that production code use the feature until it has been released in
+  a stable version.
+
+  The new constructor tearoff feature is only available as part of the 2.15
+  [language version](https://dart.dev/guides/language/evolution). To use this
+  feature, you must set the lower bound on the sdk constraint for your package
+  to 2.15 or greater (if using a beta preview release, an sdk constraint of
+  `>=2.15.0-0` must be used).
+
+- **[Generic type literals][Explicit instantiation]**: **BETA PREVIEW**
+
+  Previous Dart versions allowed class names to be used as type literals. So
+  for example,`int` may be used as an expression, producing a value of type
+  `Type`. Generic classes (e.g. `List`) could be referred to by name as an
+  expression, but no type arguments could be provided and so only the `dynamic`
+  instantiation could be produced directly as an expression without using
+  indirect methods:
+
+  ```dart
+  // Workaround to capture generic type literals.
+  Type typeOf<T>() => T;
+
+  void main() {
+    var x = int; // The Type literal corresponding to `int`.
+    var y = List; // The Type literal corresponding to `List<dynamic>`.
+    // Use workaround to capture generic type literal.
+    var z = typeOf<List<int>>(); // The Type literal for `List<int>`.
+  }
+  ```
+
+  New in Dart 2.15, instantiations of generic classes may now be used as Type
+  literals:
+
+  ```dart
+  void main() {
+    var x = int; // The Type literal corresponding to `int`.
+    var y = List; // The Type literal corresponding to `List<dynamic>`.
+    var z = List<int>; // The Type literal corresponding to `List<int>`.
+  }
+  ```
+
+  The new generic type literal feature is currently in **BETA PREVIEW**. The
+  feature is enabled in beta releases only, and is still subject to breaking
+  changes. It is not fully supported by all tools and there may be known issues
+  with the tool support. Feedback on the feature is welcome, but it is not
+  recommended that production code use the feature until it has been released in
+  a stable version.
+
+  Generic type literals are only available as part of the 2.15 [language
+  version](https://dart.dev/guides/language/evolution). To use this feature, you
+  must set the lower bound on the sdk constraint for your package to 2.15 or
+  greater (if using a beta preview release, an sdk constraint of
+  `>=2.15.0-0` must be used).
+
+- **[Explicit generic method instantiations][Explicit instantiation]**: **BETA
+    PREVIEW**
+
+  Previous Dart versions allowed generic methods to be implicitly specialized
+  (or "instantiated") to non-generic versions when assigned to a location with a
+  compatible monomorphic type. Example:
+
+  ```dart
+  // The generic identity function.
+  T id<T>(T x) => x;
+
+  void main() {
+    // Initialize `intId` with a version of `id` implicitly specialized to
+    // `int`.
+    int Function(int) intId = id;
+    print(intId(3));
+    // Initialize `stringId` with a version of `id` implicitly specialized to
+    // `String`.
+    String Function(String) stringId = id;
+    print(stringId("hello"));
+  }
+  ```
+
+  New in Dart 2.15, generic methods may be explicitly instantiated using the
+  syntax `f<T>` where `f` is the generic method to specialize and `T` is the
+  type argument (in general, type arguments) to be used to specialize the
+  method. Example:
+
+  ```dart
+  // The generic identity function.
+  T id<T>(T x) => x;
+
+  void main() {
+    // Initialize `intId` with a version of `id` explicitly specialized to
+    // `int`.
+    var intId = id<int>;
+    print(intId(3));
+    // Initialize `stringId` with a version of `id` explicitly specialized to
+    // `String`.
+    var stringId = id<String>;
+    print(stringId("hello"));
+  }
+  ```
+
+  The new generic method instantation feature is currently in **BETA PREVIEW**.
+  The feature is enabled in beta releases only, and is still subject to breaking
+  changes. It is not fully supported by all tools and there may be known issues
+  with the tool support. Feedback on the feature is welcome, but it is not
+  recommended that production code use the feature until it has been released in
+  a stable version.
+
+  Explicit generic method instantiations are only available as part of the 2.15
+  [language version](https://dart.dev/guides/language/evolution). To use this
+  feature, you must set the lower bound on the sdk constraint for your package
+  to 2.15 or greater (if using a beta preview release, an sdk constraint of
+  `>=2.15.0-0` must be used).
+
+  [Constructor tearoffs]:
+        https://github.com/dart-lang/language/blob/master/accepted/future-releases/constructor-tearoffs/feature-specification.md
+
+  [Explicit instantiation]:
+        https://github.com/dart-lang/language/blob/master/accepted/future-releases/constructor-tearoffs/feature-specification.md#explicitly-instantiated-classes-and-functions
+
 - Annotations on type parameters of classes can no longer refer to class members
   without a prefix.  For example, this used to be permitted:
 
@@ -31,7 +226,7 @@
     if (!iIsNull) {
       print(i + 1); // OK, because `i` is known to be non-null
     }
-  }
+  }<>
   ```
 
   Previously, the above program had a compile-time error because type promotion
@@ -71,6 +266,28 @@
   instance variable, and it brings the implementation behavior in line with
   the specification in all other cases.
 
+### Core libraries
+
+#### `dart:async`
+
+- Make the `unawaited` function's argument nullable, to allow calls like
+  `unawaited(foo?.bar())` too.
+
+#### `dart:cli`
+
+- The experimental `waitFor` functionality, and the library containing only that
+  function, are now deprecated.
+- When a script is `dart run` it will always be precompiled, but with
+  incremental precompilation for following runs.
+
+### `dart:core`
+
+- Add extension `name` getter on enum values.
+- Add `Enum.compareByIndex` helper function for comparing enum values by index.
+- Add `Enum.compareByName` helper function for comparing enum values by name.
+- Add extension methods on `Iterable<T extends Enum>`, intended for
+  `SomeEnumType.values` lists, to look up values by name.
+
 ### Tools
 
 #### Dart command line
@@ -82,11 +299,128 @@
 
 #### Dart VM
 
-- **Breaking Change** [#45451][]: Support for `dart-ext:`-style native
-  extensions has been removed as previously announced. Use `dart:ffi` to bind
-  to native libraries instead.
+- **Breaking Change** [#45451](https://github.com/dart-lang/sdk/issues/45451):
+  Support for `dart-ext:`-style native extensions has been removed as previously
+  announced. Use `dart:ffi` to bind to native libraries instead.
 
-## 2.14.0
+- **Breaking Change** [#46754](https://github.com/dart-lang/sdk/issues/46754):
+  Isolates spawned via the `Isolate.spawn()` API are now grouped, operate on the
+  same managed heap and can therefore share various VM-internal data structures.
+
+  This leads to ~100x faster isolate startup latency, ~10-100x lower
+  per-isolate base memory overhead and ~8x faster inter-isolate communication.
+
+  Making isolates operate on the same heap will also make them collaborate on
+  garbage collections, which changes performance characteristics for GC-heavy
+  applications that may - in rare cases - negatively affect pause times or
+  throughput.
+
+- Allow closures both in inter-isolate messages as well as as entrypoints in
+  `Isolate.spawn(<entrypoint>, ...)` calls. Closures and their enclosing context
+  may need to be copied in this process. The enclosing context is - as with
+  normal messages - verified to only contain objects that are sendable.
+
+  Note of caution: The Dart VM's current representation of enclosing variables
+  in closures can make closures hang on to more variables than strictly needed.
+  Using such closures in inter-isolate communication can therefore lead to
+  copying of larger transitive object graphs. If the extended transitive
+  closure includes objects that are illegal to send, the sending will fail.
+  See [#36983](https://github.com/dart-lang/sdk/issues/36983), which tracks this
+  existing memory leak issue.
+
+#### Linter
+
+Updated the Linter to `1.12.0`, which includes changes that
+- update `avoid_print` to allow `kDebugMode`-wrapped print calls.
+- fix handling of initializing formals in `prefer_final_parameters`.
+- fix `unnecessary_parenthesis` false positive with function expressions.
+- adds support for constructor tear-offs to `avoid_redundant_argument_values`,
+  `unnecessary_lambdas`, and `unnecessary_parenthesis`.
+- adds a new lint: `unnecessary_constructor_name` to flag unnecessary uses of
+  `.new`.
+- improves regular expression parsing performance for common checks
+  (`camel_case_types`, `file_names`, etc.).
+- (internal) migrates to analyzer 2.1.0 APIs.
+- fixes false positive in `use_build_context_synchronously` in awaits inside
+  anonymous functions.
+- fixes `overridden_fields` false positive w/ static fields.
+- fixes false positive in `avoid_null_checks_in_equality_operators` w/
+  non-nullable params.
+- fixes false positive for deferred imports in `prefer_const_constructors`.
+- marks `avoid_dynamic_calls` stable.
+- (internal) removes unused `MockPubVisitor` and `MockRule` classes.
+- fixes a `prefer_void_to_null` false positive w/ overridden properties.
+- (internal) removes references to `NodeLintRule` in lint rule declarations.
+- fixes `prefer_void_to_null` false positives on overriding returns.
+- fixes `prefer_generic_function_type_aliases` false positives w/ incomplete
+  statements.
+- fixes false positives for `prefer_initializing_formals` with factory
+  constructors.
+- fixes `void_checks` false positives with incomplete source.
+- updates `unnecessary_getters_setters` to only flag the getter.
+- improves messages for `avoid_renaming_method_parameters`.
+- fixes false positives in `prefer_void_to_null`.
+- fixes false positives in `omit_local_variable_types`.
+- fixes false positives in `use_rethrow_when_possible`.
+- improves performance for `annotate_overrides`, `prefer_contains`, and
+  `prefer_void_to_null`.
+
+### Pub
+
+- Adds support for token-based authorization to third party package-repositories
+  with the new command `dart pub token`.
+- Credentials are no longer stored in the pub-cache, but in a platform dependent
+  config directory:
+  * On Linux `$XDG_CONFIG_HOME/dart/pub-credentials.json` if `$XDG_CONFIG_HOME`
+    is defined, otherwise `$HOME/.config/dart/pub-credentials.json`
+  * On Mac OS: `$HOME/Library/Application Support/dart/pub-credentials.json`
+  * On Windows: `%APPDATA%/dart/pub-credentials.json`
+
+- Detect potential leaks in `dart pub publish`.
+  When publishing, pub will examine your files for potential secret keys, and
+  warn you.
+
+  To ignore a file that has a false positive, add it to a
+  [`false_secrets`](https://dart.dev/go/false-secrets) section of your
+  `pubspec.yaml`.
+- Fixes unicode terminal detection windows.
+- New flag `--example` to the commands
+  `dart pub get/upgrade/downgrade/add/remove` that will result in the `example/`
+  folder dependencies to be updated after operating in the current directory.
+
+## 2.14.3 - 2021-09-30
+
+This is a patch release that fixes:
+
+- a code completion performance regression [flutter/flutter-intellij#5761][].
+- debug information emitted by the Dart VM [#47289][].
+
+[flutter/flutter-intellij#5761]:
+  https://github.com/flutter/flutter-intellij/issues/5761
+[#47289]: https://github.com/dart-lang/sdk/issues/47289
+
+## 2.14.2 - 2021-09-16
+
+This is a patch release that fixes:
+
+- two dartdoc crashes (issues [dart-lang/dartdoc#2740][] and
+  [dart-lang/dartdoc#2755][]).
+- error messages when using the `>>>` operator on older language versions
+  (issue [#46886][]).
+- invalid `pubspec.lock` paths on Windows (issue [dart-lang/pub#3012][]).
+
+[dart-lang/dartdoc#2740]: https://github.com/dart-lang/dartdoc/issues/2740
+[dart-lang/dartdoc#2755]: https://github.com/dart-lang/dartdoc/issues/2755
+[#46886]: https://github.com/dart-lang/sdk/issues/46886
+[#45767]: https://github.com/dart-lang/sdk/issues/45767
+[dart-lang/pub#3012]: https://github.com/dart-lang/pub/issues/3012
+
+## 2.14.1 - 2021-09-09
+
+- Fixed an issue specific to the macOS ARM64 (Apple Silicon) SDK, where the Dart
+  commandline tools did not have the expected startup performance.
+
+## 2.14.0 - 2021-09-09
 
 ### Language
 
@@ -145,11 +479,6 @@
 - Added `void unawaited(Future)` top-level function to deal with the
   `unawaited_futures` lint.
 
-#### `dart:cli`
-
-- The experimental `waitFor` functionality, and the library containing only that
-  function, are now deprecated.
-
 #### `dart:core`
 
 - Introduce `Enum` interface implemented by all `enum` declarations.
@@ -254,32 +583,7 @@
 
 #### Linter
 
-Updated the Linter to `1.10.0`, which includes changes that
-- improves regular expression parsing performance for common checks
-  (`camel_case_types`, `file_names`, etc.).
-- (internal) migrates to analyzer 2.1.0 APIs.
-- fixes false positive in `use_build_context_synchronously` in awaits inside
-  anonymous functions.
-- fixes `overridden_fields` false positive w/ static fields.
-- fixes false positive in `avoid_null_checks_in_equality_operators` w/
-  non-nullable params.
-- fixes false positive for deferred imports in `prefer_const_constructors`.
-- marks `avoid_dynamic_calls` stable.
-- (internal) removes unused `MockPubVisitor` and `MockRule` classes.
-- fixes a `prefer_void_to_null` false positive w/ overridden properties.
-- (internal) removes references to `NodeLintRule` in lint rule declarations.
-- fixes `prefer_void_to_null` false positives on overriding returns.
-- fixes `prefer_generic_function_type_aliases` false positives w/ incomplete
-  statements.
-- fixes false positives for `prefer_initializing_formals` with factory constructors.
-- fixes `void_checks` false positives with incomplete source.
-- updates `unnecessary_getters_setters` to only flag the getter.
-- improves messages for `avoid_renaming_method_parameters`.
-- fixes false positives in `prefer_void_to_null`.
-- fixes false positives in `omit_local_variable_types`.
-- fixes false positives in `use_rethrow_when_possible`.
-- improves performance for `annotate_overrides`, `prefer_contains`, and
-  `prefer_void_to_null`.
+Updated the Linter to `1.8.0`, which includes changes that
 - improve performance for `prefer_is_not_empty`.
 - fix false positives in `no_logic_in_create_state`.
 - improve `package_names` to allow dart identifiers as package names.
@@ -640,6 +944,9 @@
 - Add `debugName` positional parameter to `ReceivePort` and `RawReceivePort`
   constructors, a name which can be associated with the port and displayed in
   tooling.
+- Introduce `Isolate.exit([port, message])` which terminates current isolate
+  and, if `port` is specified, as a last action sends out the `message` out to
+  that `port`.
 
 #### `dart:html`
 
@@ -2123,7 +2430,7 @@
   throws in dart2js if the API is used directly without manually setting up a
   `defaultPackagesBase` hook.
 
-[1]: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#200---2018-08-07
+[1]: https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#200---2018-08-07
 
 #### `dart:developer`
 
@@ -3738,7 +4045,7 @@
 
 - Dart `int` is now restricted to 64 bits. On overflow, arithmetic operations
   wrap around, and integer literals larger than 64 bits are not allowed. See
-  https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md
+  https://github.com/dart-lang/sdk/blob/main/docs/language/informal/int64.md
   for details.
 
 - The Dart VM no longer attempts to perform `packages/` directory resolution
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a508ebd..6802814 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,7 +12,7 @@
     * To report an API doc bug,
       [create an SDK issue](https://github.com/dart-lang/sdk/issues/new?title=API%20doc%20issue:).
   * Contribute to the Dart developer websites such as [dart.dev](https://dart.dev) (repo: [dart-lang/site-www](https://github.com/dart-lang/site-www)) and [dart.dev/web](https://dart.dev/web) (repo: [dart-lang/site-www/src/web](https://github.com/dart-lang/site-www/tree/master/src/web)). For more information, see [Writing for Dart and Flutter websites](https://github.com/dart-lang/site-shared/wiki/Writing-for-Dart-and-Flutter-websites).
-  * Improve the API reference docs at [api.dart.dev](https://api.dart.dev) by editing doc comments in the [Dart SDK repo](https://github.com/dart-lang/sdk/tree/master/sdk/lib). For more information on how to write API docs, see [Effective Dart: Documentation](https://dart.dev/guides/language/effective-dart/documentation).
+  * Improve the API reference docs at [api.dart.dev](https://api.dart.dev) by editing doc comments in the [Dart SDK repo](https://github.com/dart-lang/sdk/tree/main/sdk/lib). For more information on how to write API docs, see [Effective Dart: Documentation](https://dart.dev/guides/language/effective-dart/documentation).
 
 ## Before you contribute
 
@@ -26,7 +26,7 @@
 
 ## Getting the code
 
-To work with the Dart code, you need to download and build the development branch. Active development of Dart takes place on the `master` branch, from which we push "green" versions that have passed all tests to `dev` branch. Complete instructions are found at [Getting The Source](https://github.com/dart-lang/sdk/wiki/Building#getting-the-source)
+To work with the Dart code, you need to download and build the development branch. Active development of Dart takes place on the `main` branch, from which we push "green" versions that have passed all tests to `dev` branch. Complete instructions are found at [Getting The Source](https://github.com/dart-lang/sdk/wiki/Building#getting-the-source)
 
 ## Starting a patch with git
 
@@ -41,10 +41,10 @@
 ...
 ```
 
-## Keeping your branch updated with origin/master
+## Keeping your branch updated with origin/main
 
 As you work, and before you send a patch for review, you should
-ensure your branch is merging cleanly to `origin/master`.
+ensure your branch is merging cleanly to `origin/main`.
 
 There are multiple ways to do this, but we generally recommend
 running:
@@ -56,7 +56,7 @@
 Note: you can run this command from any branch.
 
 This command will fetch
-origin/master, rebase all your open branches, and delete
+`origin/main`, rebase all your open branches, and delete
 cleanly merged branches.
 
 Your local workflow may vary.
diff --git a/DEPS b/DEPS
index 503c2f8..b426244 100644
--- a/DEPS
+++ b/DEPS
@@ -39,13 +39,14 @@
 
   # 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.14.0-377.4.beta",
+  "sdk_tag": "version:2.15.0-82.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": "a4f77a02a3676b1c2e7390c860cb0486c8515d3f",
-  "co19_2_rev": "3e1ea1af9ef293d7f6a8f3332b5c71c7072a30e0",
+  "co19_rev": "e9f3b0239dedd349084ca1e0b9d2ceacf4b2a1ef",
+  # This line prevents conflicts when both packages are rolled simultaneously.
+  "co19_2_rev": "13344ad01472df9badfa78fd6aa411f042e13354",
 
   # The internal benchmarks to use. See go/dart-benchmarks-internal
   "benchmarks_internal_rev": "076df10d9b77af337f2d8029725787155eb1cd52",
@@ -72,8 +73,8 @@
   "gperftools_revision": "180bfa10d7cb38e8b3784d60943d50e8fcef0dcb",
 
   # Revisions of /third_party/* dependencies.
-  "args_rev": "bf4c8796881b62fd5d3f6d86ab43014f9651eb20",
-  "async_rev": "ecb3835c5b746f7762327d5f57bdc92e0a2e0450",
+  "args_rev": "3b3f55766af13d895d2020ec001a28e8dc147f91",
+  "async_rev": "c64220396e0fa2f7b380590abfedbd25635cd7a0",
   "bazel_worker_rev": "0885637b037979afbf5bcd05fd748b309fd669c0",
   "benchmark_harness_rev": "c546dbd9f639f75cd2f75de8df2eb9f8ea15e8e7",
   "boolean_selector_rev": "665e6921ab246569420376f827bff4585dff0b14",
@@ -84,12 +85,12 @@
   "characters_rev": "6ec389c4dfa8fce14820dc5cbf6e693202e7e052",
   "charcode_rev": "84ea427711e24abf3b832923959caa7dd9a8514b",
   "chrome_rev" : "19997",
-  "cli_util_rev" : "8c504de5deb08fe32ecf51f9662bb37d8c708e57",
+  "cli_util_rev" : "c2dc871784b59720e6cf5794dee1a20735df3feb",
   "clock_rev" : "a494269254ba978e7ef8f192c5f7fec3fc05b9d3",
-  "collection_rev": "75a7a5510979a3cd70143af85bcc1667ee233674",
+  "collection_rev": "a4c941ab94044d118b2086a3f261c30377604127",
   "convert_rev": "e063fdca4bebffecbb5e6aa5525995120982d9ce",
   "crypto_rev": "b5024e4de2b1c474dd558bef593ddbf0bfade152",
-  "csslib_rev": "e411d862fd8cc50415c1badf2632e017373b3f47",
+  "csslib_rev": "6338de25a09d098a62c9a1992c175e9ceb5b994a",
 
   # Note: Updates to dart_style have to be coordinated with the infrastructure
   # team so that the internal formatter in `tools/sdks/dart-sdk/bin/dartfmt`
@@ -105,7 +106,7 @@
   # For more details, see https://github.com/dart-lang/sdk/issues/30164
   "dart_style_rev": "14d9b6fd58cc4744676c12be3cc5eee2a779db82",
 
-  "dartdoc_rev" : "348cbd7204645f99074bf7873af8b6ba6d34ceb0",
+  "dartdoc_rev" : "e5ebb7a6e88427db25c21811dc91190475934b17",
   "devtools_rev" : "2b47d9ed486479153ca2fd038000950674ed1beb",
   "jsshell_tag": "version:88.0",
   "ffi_rev": "4dd32429880a57b64edaf54c9d5af8a9fa9a4ffb",
@@ -116,13 +117,12 @@
   "http_io_rev": "2fa188caf7937e313026557713f7feffedd4978b",
   "http_multi_server_rev": "de1b312164c24a1690b46c6e97bd47eff40c4649",
   "http_parser_rev": "202391286ddc13c4c3c284ac5b511f04697250ed",
-  "http_rev": "778174bca2c13becd88ef3353309190b1e8b9479",
+  "http_rev": "f35d1e1467092f6a5edb2abf7071c4a99e8c737a",
   "icu_rev" : "81d656878ec611cb0b42d52c82e9dae93920d9ba",
-  "idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
   "intl_tag": "0.17.0-nullsafety",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_rev": "7e00f893440a72de0637970325e4ea44bd1e8c8e",
-  "linter_tag": "1.10.0",
+  "linter_tag": "1.12.0",
   "lints_tag": "f9670df2a66e0ec12eb51554e70c1cbf56c8f5d0",
   "logging_rev": "575781ef196e4fed4fb737e38fb4b73d62727187",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
@@ -139,8 +139,8 @@
   "pool_rev": "7abe634002a1ba8a0928eded086062f1307ccfae",
   "process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
   "protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
-  "pub_rev": "cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e",
-  "pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
+  "pub_rev": "37d05928939b3100e7e55c3dff922651db1de1e1",
+  "pub_semver_rev": "a43ad72fb6b7869607581b5fedcb186d1e74276a",
   "resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
   "root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
   "rust_revision": "b7856f695d65a8ebc846754f97d15814bcb1c244",
@@ -161,7 +161,7 @@
   "test_descriptor_rev": "ead23c1e7df079ac0f6457a35f7a71432892e527",
   "test_process_rev": "7c73ec8a8a6e0e63d0ec27d70c21ca4323fb5e8f",
   "term_glyph_rev": "6a0f9b6fb645ba75e7a00a4e20072678327a0347",
-  "test_reflective_loader_rev": "54e930a11c372683792e22bddad79197728c91ce",
+  "test_reflective_loader_rev": "fcfce37666672edac849d2af6dffc0f8df236a94",
   "test_rev": "099dcc4d052a30c6921489cfbefa1c8531d12975",
   "typed_data_rev": "29ce5a92b03326d0b8035916ac04f528874994bd",
   "usage_rev": "e0780cd8b2f8af69a28dc52678ffe8492da27d06",
@@ -170,10 +170,11 @@
   "webdriver_rev": "ff5ccb1522edf4bed578ead4d65e0cbc1f2c4f02",
   "web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
   "web_socket_channel_rev": "6448ce532445a8a458fa191d9346df071ae0acad",
-  "WebCore_rev": "fb11e887f77919450e497344da570d780e078bc8",
+  "WebCore_rev": "bcb10901266c884e7b3740abc597ab95373ab55c",
   "webdev_rev": "832b096c0c24798d3df46faa7b7661fe930573c2",
   "webkit_inspection_protocol_rev": "dd6fb5d8b536e19cedb384d0bbf1f5631923f1e8",
-  "yaml_rev": "b4c4411631bda556ce9a45af1ab0eecaf9f3ac53",
+  "yaml_edit_rev": "df1452bfe1653286277a1a8f34dddf3e4fbedd9e",
+  "yaml_rev": "ad0779d1baa25c6b10a192d080efc45de02b6a32",
   "zlib_rev": "bf44340d1b6be1af8950bbdf664fec0cf5a831cc",
   "crashpad_rev": "bf327d8ceb6a669607b0dbab5a83a275d03f99ed",
   "minichromium_rev": "8d641e30a8b12088649606b912c2bc4947419ccc",
@@ -298,10 +299,6 @@
       Var("chromium_git") + "/chromium/deps/icu.git" +
       "@" + Var("icu_rev"),
 
-  Var("dart_root") + "/tools/idl_parser":
-      Var("chromium_git") + "/chromium/src/tools/idl_parser.git" +
-      "@" + Var("idl_parser_rev"),
-
   Var("dart_root") + "/third_party/WebCore":
       Var("dart_git") + "webcore.git" + "@" + Var("WebCore_rev"),
 
@@ -475,6 +472,8 @@
   Var("dart_root") + "/third_party/pkg/web_socket_channel":
       Var("dart_git") + "web_socket_channel.git" +
       "@" + Var("web_socket_channel_rev"),
+  Var("dart_root") + "/third_party/pkg/yaml_edit":
+      Var("dart_git") + "yaml_edit.git" + "@" + Var("yaml_edit_rev"),
   Var("dart_root") + "/third_party/pkg/yaml":
       Var("dart_git") + "yaml.git" + "@" + Var("yaml_rev"),
 
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 99ccd1b..fc93703 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -81,6 +81,8 @@
     for git_file in input_api.AffectedTextFiles():
         if git_file.LocalPath().startswith("pkg/front_end/testcases/"):
             continue
+        if git_file.LocalPath().startswith("pkg/front_end/parser_testcases/"):
+            continue
         if should_skip(git_file.LocalPath()):
             continue
         filename = git_file.AbsoluteLocalPath()
@@ -125,8 +127,8 @@
 
     def HasFormatErrors(filename: str = None, contents: str = None):
         # Don't look for formatting errors in multitests. Since those are very
-        # sensitive to whitespace, many cannot be formatted with dartfmt without
-        # breaking them.
+        # sensitive to whitespace, many cannot be reformatted without breaking
+        # them.
         if filename and filename.endswith('_test.dart'):
             with open(filename) as f:
                 contents = f.read()
@@ -177,7 +179,7 @@
             lineSep = " ^\n"
         return [
             output_api.PresubmitError(
-                'File output does not match dartfmt.\n'
+                'File output does not match dart format.\n'
                 'Fix these issues with:\n'
                 '%s format %s%s' %
                 (dart, lineSep, lineSep.join(unformatted_files)))
diff --git a/README.md b/README.md
index 79cec90..a82e962 100644
--- a/README.md
+++ b/README.md
@@ -60,12 +60,12 @@
 You can also contribute patches, as described in [Contributing][contrib].
 
 [website]: https://dart.dev
-[license]: https://github.com/dart-lang/sdk/blob/master/LICENSE
+[license]: https://github.com/dart-lang/sdk/blob/main/LICENSE
 [repo]: https://github.com/dart-lang/sdk
 [lang]: https://dart.dev/guides/language/language-tour
 [tools]: https://dart.dev/tools
 [codelabs]: https://dart.dev/codelabs
 [dartbug]: http://dartbug.com
-[contrib]: https://github.com/dart-lang/sdk/blob/master/CONTRIBUTING.md
+[contrib]: https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md
 [pubsite]: https://pub.dev
-[patent_grant]: https://github.com/dart-lang/sdk/blob/master/PATENT_GRANT
+[patent_grant]: https://github.com/dart-lang/sdk/blob/main/PATENT_GRANT
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..a341d38
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,3 @@
+## Reporting vulnerabilities
+To report potential vulnerabilities, please see our security policy on
+[https://dart.dev/security](https://dart.dev/security).
diff --git a/WATCHLISTS b/WATCHLISTS
index e4b5b89..be0e2b3 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -53,8 +53,7 @@
         'pkg/analyzer/lib/src/dart/error/hint_codes\\.dart|'
         'pkg/analyzer/lib/src/dart/error/lint_codes\\.dart|'
         'pkg/analyzer/lib/src/dart/error/todo_codes\\.dart|'
-        'pkg/analyzer/lib/src/html/error/html_codes\\.dart|'
-        'pkg/dart_messages/lib/shared_messages\\.dart'
+        'pkg/analyzer/lib/src/html/error/html_codes\\.dart'
         ')$'
       )
     },
diff --git a/benchmarks/IsolateJson/dart/IsolateJson.dart b/benchmarks/IsolateJson/dart/IsolateJson.dart
index 5b5a9ee..9717f34 100644
--- a/benchmarks/IsolateJson/dart/IsolateJson.dart
+++ b/benchmarks/IsolateJson/dart/IsolateJson.dart
@@ -10,8 +10,6 @@
 
 import 'package:benchmark_harness/benchmark_harness.dart' show BenchmarkBase;
 
-import 'runtime/tests/vm/dart/export_sendAndExit_helper.dart' show sendAndExit;
-
 class JsonDecodingBenchmark {
   JsonDecodingBenchmark(this.name,
       {required this.sample,
@@ -80,7 +78,7 @@
 Future<void> jsonDecodingIsolate(JsonDecodeRequest request) async {
   final result = json.decode(utf8.decode(request.encodedJson));
   if (request.useSendAndExit) {
-    sendAndExit(request.sendPort, result);
+    Isolate.exit(request.sendPort, result);
   } else {
     request.sendPort.send(result);
   }
diff --git a/benchmarks/IsolateJson/dart/runtime/tests/vm/dart/export_sendAndExit_helper.dart b/benchmarks/IsolateJson/dart/runtime/tests/vm/dart/export_sendAndExit_helper.dart
deleted file mode 100644
index 75628d6..0000000
--- a/benchmarks/IsolateJson/dart/runtime/tests/vm/dart/export_sendAndExit_helper.dart
+++ /dev/null
@@ -1 +0,0 @@
-export 'dart:_internal' show sendAndExit;
diff --git a/benchmarks/IsolateJson/dart2/IsolateJson.dart b/benchmarks/IsolateJson/dart2/IsolateJson.dart
index 46ac6ca..a78b95d 100644
--- a/benchmarks/IsolateJson/dart2/IsolateJson.dart
+++ b/benchmarks/IsolateJson/dart2/IsolateJson.dart
@@ -13,8 +13,6 @@
 import 'package:benchmark_harness/benchmark_harness.dart' show BenchmarkBase;
 import 'package:meta/meta.dart';
 
-import 'runtime/tests/vm/dart/export_sendAndExit_helper.dart' show sendAndExit;
-
 class JsonDecodingBenchmark {
   JsonDecodingBenchmark(this.name,
       {@required this.sample,
@@ -83,7 +81,7 @@
 Future<void> jsonDecodingIsolate(JsonDecodeRequest request) async {
   final result = json.decode(utf8.decode(request.encodedJson));
   if (request.useSendAndExit) {
-    sendAndExit(request.sendPort, result);
+    Isolate.exit(request.sendPort, result);
   } else {
     request.sendPort.send(result);
   }
diff --git a/benchmarks/IsolateJson/dart2/runtime/tests/vm/dart/export_sendAndExit_helper.dart b/benchmarks/IsolateJson/dart2/runtime/tests/vm/dart/export_sendAndExit_helper.dart
deleted file mode 100644
index 75628d6..0000000
--- a/benchmarks/IsolateJson/dart2/runtime/tests/vm/dart/export_sendAndExit_helper.dart
+++ /dev/null
@@ -1 +0,0 @@
-export 'dart:_internal' show sendAndExit;
diff --git a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
index 7deaa33..b7c18d1 100644
--- a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
+++ b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
@@ -24,7 +24,6 @@
   'dartdev',
   'dartdevc',
   'dartdoc',
-  'dartfmt',
   'dds',
   'frontend_server',
   'gen_kernel',
diff --git a/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart b/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
index 71e5a48..f207e3a 100644
--- a/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
+++ b/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
@@ -26,7 +26,6 @@
   'dartdev',
   'dartdevc',
   'dartdoc',
-  'dartfmt',
   'dds',
   'frontend_server',
   'gen_kernel',
diff --git a/build/config/clang/clang.gni b/build/config/clang/clang.gni
index 50bdb34..c2ba3f7 100644
--- a/build/config/clang/clang.gni
+++ b/build/config/clang/clang.gni
@@ -2,8 +2,15 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+_toolchain_cpu = host_cpu
+if (host_os == "mac") {
+  # TODO(https://fxbug.dev/73385): Use arm64 toolchain on arm64 when it exists.
+  _toolchain_cpu = "x64"
+}
+
 default_clang_prefix =
-    rebase_path("//buildtools/${host_os}-${host_cpu}/clang/bin", root_build_dir)
+    rebase_path("//buildtools/${host_os}-${_toolchain_cpu}/clang/bin",
+                root_build_dir)
 
 declare_args() {
   clang_prefix = default_clang_prefix
diff --git a/docs/language/informal/covariant-from-class.md b/docs/language/informal/covariant-from-class.md
index 06d54bf..604b37d 100644
--- a/docs/language/informal/covariant-from-class.md
+++ b/docs/language/informal/covariant-from-class.md
@@ -80,7 +80,7 @@
 However, covariant parameter types can be quite natural and convenient,
 they just impose an obligation on developers to use ad-hoc reasoning in
 order to avoid the potential type errors at run time. The
-[covariant overrides](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/covariant-overrides.md)
+[covariant overrides](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/covariant-overrides.md)
 feature was added exactly for this purpose: When developers want to use
 unsound covariance, they can get it by requesting it explicitly. In the
 (vast majority of) cases where the sound and more strict contravariant rule
@@ -252,7 +252,7 @@
 
 When we say that a parameter is **covariant by modifier**, we are referring
 to the definition of being a covariant parameter which is given in
-[covariant overrides](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/covariant-overrides.md).
+[covariant overrides](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/covariant-overrides.md).
 
 *When a parameter _p_ is covariant by modifier, there will necessarily be a
 declaration of a formal parameter _p1_ (which may be the same as _p_, or it
diff --git a/docs/language/informal/generic-function-instantiation.md b/docs/language/informal/generic-function-instantiation.md
index 80e9241..254d1e0 100644
--- a/docs/language/informal/generic-function-instantiation.md
+++ b/docs/language/informal/generic-function-instantiation.md
@@ -37,7 +37,7 @@
 ## Motivation
 
 The
-[language specification](https://github.com/dart-lang/sdk/blob/master/docs/language/dartLangSpec.tex)
+[language specification](https://github.com/dart-lang/sdk/blob/main/docs/language/dartLangSpec.tex)
 uses the phrase _function object_ to denote the first-class semantic
 entity which corresponds to a function declaration. In the following
 example, each of the expressions `fg`, `A.fs`, `new A().fi`, and `fl` in
diff --git a/docs/language/informal/implicit-creation.md b/docs/language/informal/implicit-creation.md
index 903ff40..2c98362 100644
--- a/docs/language/informal/implicit-creation.md
+++ b/docs/language/informal/implicit-creation.md
@@ -11,7 +11,7 @@
 reserved words `new` and `const` in instance creation expressions.
 
 This feature specification was written with a
-[combined proposal](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/optional-new-const.md)
+[combined proposal](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-new-const.md)
 as the starting point. That proposal presents optional new and optional const
 together with several other features.
 
@@ -303,5 +303,5 @@
 
 - 0.1 (2017-08-15) Stand-alone informal specification for optional new created,
   using version 0.8 of the combined proposal
-  [optional-new-const.md](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/optional-new-const.md)
+  [optional-new-const.md](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-new-const.md)
   as the starting point.
diff --git a/docs/language/informal/instantiate-to-bound.md b/docs/language/informal/instantiate-to-bound.md
index dafcf2d..e831fb2 100644
--- a/docs/language/informal/instantiate-to-bound.md
+++ b/docs/language/informal/instantiate-to-bound.md
@@ -275,7 +275,7 @@
 when that number reaches zero.*
 
 *Note that this process may produce a
-[super-bounded type](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/super-bounded-types.md).*
+[super-bounded type](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/super-bounded-types.md).*
 
 *It may seem somewhat arbitrary to treat unused and invariant parameters
 the same as covariant parameters. In particular, we could easily have made
@@ -386,7 +386,7 @@
     there.
 
 *   Sep 15th 2017: Transferred to the SDK repository as
-    [instantiate-to-bound.md](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/instantiate-to-bound.md).
+    [instantiate-to-bound.md](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md).
 
 *   Sep 15th 2017: Adjusted to include the enhanced expressive power
     described in
diff --git a/docs/language/informal/interface-conflicts.md b/docs/language/informal/interface-conflicts.md
index ebc21f2..3ce7d64 100644
--- a/docs/language/informal/interface-conflicts.md
+++ b/docs/language/informal/interface-conflicts.md
@@ -79,7 +79,7 @@
 
 This means that we will express the complete rules for being 'more
 interface-specific than' as a slight modification of
-[subtyping.md](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/subtyping.md)
+[subtyping.md](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/subtyping.md)
 and in particular, the rule 'Right Top' will need to be split in cases
 such that `Object` and `dynamic` are more interface-specific than `void` and
 mutually unrelated, and all other types are more interface-specific than
@@ -109,7 +109,7 @@
 explicitly.
 
 *They might be obtained via
-[instantiate-to-bound](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/instantiate-to-bound.md)
+[instantiate-to-bound](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md)
 or, in case such a mechanism is introduced, they might be inferred.*
 
 *The language specification already contains verbiage to this effect, but we
diff --git a/docs/language/informal/optional-new-const.md b/docs/language/informal/optional-new-const.md
index e249a63..a0b87bc 100644
--- a/docs/language/informal/optional-new-const.md
+++ b/docs/language/informal/optional-new-const.md
@@ -5,7 +5,7 @@
 **Version**: 0.8 (2017-06-20)
 
 **Status**: This is background material for
-[implicit-creation.md](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/implicit-creation.md).
+[implicit-creation.md](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/implicit-creation.md).
 
 This informal specification documents a group of four related features.
 * Optional `const`
diff --git a/docs/language/informal/super-bounded-types.md b/docs/language/informal/super-bounded-types.md
index 6ecb027..316af1c 100644
--- a/docs/language/informal/super-bounded-types.md
+++ b/docs/language/informal/super-bounded-types.md
@@ -108,7 +108,7 @@
 greatest possible amount of information about the set of objects whose type
 is on the form `C<T>` for some `T`. In particular, we cannot express the
 type which "should be" the result of
-[instantiate-to-bound](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/instantiate-to-bound.md)
+[instantiate-to-bound](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md)
 on the raw type `C`.
 
 We can make an attempt to approximate the least supertype of all correct
diff --git a/docs/process/language-versions-and-experiments.md b/docs/process/language-versions-and-experiments.md
index 54f83ad..54147ca 100644
--- a/docs/process/language-versions-and-experiments.md
+++ b/docs/process/language-versions-and-experiments.md
@@ -284,7 +284,7 @@
 That's it. Now you have a library that Dart tools know targets 2.8+non-nullable,
 at least today.
 
-[experimental flags doc]: https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md
+[experimental flags doc]: https://github.com/dart-lang/sdk/blob/main/docs/process/experimental-flags.md
 
 ### 2.8.0 ships without null safety
 
diff --git a/pkg/.gitignore b/pkg/.gitignore
index 6c1be22..b95fe80 100644
--- a/pkg/.gitignore
+++ b/pkg/.gitignore
@@ -7,5 +7,7 @@
 /*.vcxproj.user
 /*.vcxproj.filters
 /*.xcodeproj
+.dart_tool
 .idea/
+.packages
 analysis_server/language_model/
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 4cd2f61f..f170c1f 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -1805,7 +1805,7 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageConstructorWithTypeArguments = const MessageCode(
     "ConstructorWithTypeArguments",
-    analyzerCodes: <String>["WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR"],
+    index: 118,
     message:
         r"""A constructor invocation can't have type arguments after the constructor name.""",
     tip:
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 93ebfdc..613e335 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
@@ -651,9 +651,9 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
-    listener?.endExtensionDeclaration(
-        extensionKeyword, typeKeyword, onKeyword, endToken);
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
+    listener?.endExtensionDeclaration(extensionKeyword, typeKeyword, onKeyword,
+        showKeyword, hideKeyword, endToken);
   }
 
   @override
@@ -1160,6 +1160,13 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    listener?.handleExtensionShowHide(
+        showKeyword, showElementCount, hideKeyword, hideElementCount);
+  }
+
+  @override
   void handleClassWithClause(Token withKeyword) {
     listener?.handleClassWithClause(withKeyword);
   }
@@ -1281,6 +1288,11 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    listener?.handleShowHideIdentifier(modifier, identifier);
+  }
+
+  @override
   void handleIdentifier(Token token, IdentifierContext context) {
     listener?.handleIdentifier(token, context);
   }
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart
index 4615974..5236661 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context.dart
@@ -226,6 +226,30 @@
   static const ExpressionIdentifierContext expressionContinuation =
       const ExpressionIdentifierContext.continuation();
 
+  /// Identifier appears in a show or a hide clause of an extension type
+  /// declaration preceded by 'get'.
+  static const ExtensionShowHideElementIdentifierContext
+      extensionShowHideElementGetter =
+      const ExtensionShowHideElementIdentifierContext.getter();
+
+  /// Identifier appears in a show or a hide clause of an extension type
+  /// declaration, not preceded by 'get', 'set', or 'operator'.
+  static const ExtensionShowHideElementIdentifierContext
+      extensionShowHideElementMemberOrType =
+      const ExtensionShowHideElementIdentifierContext.memberOrType();
+
+  /// Identifier appears in a show or a hide clause of an extension type
+  /// declaration preceded by 'operator'.
+  static const ExtensionShowHideElementIdentifierContext
+      extensionShowHideElementOperator =
+      const ExtensionShowHideElementIdentifierContext.operator();
+
+  /// Identifier appears in a show or a hide clause of an extension type
+  /// declaration preceded by 'set'.
+  static const ExtensionShowHideElementIdentifierContext
+      extensionShowHideElementSetter =
+      const ExtensionShowHideElementIdentifierContext.setter();
+
   /// Identifier is a reference to a named argument of a function or method
   /// invocation (e.g. `foo` in `f(foo: 0);`.
   static const NamedArgumentReferenceIdentifierContext namedArgumentReference =
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context_impl.dart
index 68721e0..6e224d0 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/identifier_context_impl.dart
@@ -371,6 +371,84 @@
   }
 }
 
+/// See [IdentifierContext.extensionShowHideElementGetter],
+/// [IdentifierContext.extensionShowHideElementMemberOrType],
+/// [IdentifierContext.extensionShowHideElementOperator],
+/// [IdentifierContext.extensionShowHideElementSetter].
+class ExtensionShowHideElementIdentifierContext extends IdentifierContext {
+  static const int _getterKind = 0;
+  static const int _memberOrTypeKind = 1;
+  static const int _operator = 2;
+  static const int _setterKind = 3;
+
+  final int _kind;
+
+  const ExtensionShowHideElementIdentifierContext.getter()
+      : _kind = _getterKind,
+        super('extensionShowHideElementGetter', inDeclaration: true);
+
+  const ExtensionShowHideElementIdentifierContext.memberOrType()
+      : _kind = _memberOrTypeKind,
+        super('extensionShowHideElementMemberOrType', inDeclaration: true);
+
+  const ExtensionShowHideElementIdentifierContext.operator()
+      : _kind = _operator,
+        super('extensionShowHideElementOperator', inDeclaration: true);
+
+  const ExtensionShowHideElementIdentifierContext.setter()
+      : _kind = _setterKind,
+        super('extensionShowHideElementSetter', inDeclaration: true);
+
+  @override
+  Token ensureIdentifier(Token token, Parser parser) {
+    Token identifier = token.next!;
+    if (identifier.isIdentifier ||
+        _kind == _operator && identifier.isOperator) {
+      return identifier;
+    }
+
+    // Recovery
+    const List<String> afterIdentifier = const [
+      '<',
+      '{',
+      'extends',
+      'with',
+      'implements',
+      'on',
+      '=',
+    ];
+    if (identifier.isEof ||
+        (looksLikeStartOfNextTopLevelDeclaration(identifier) &&
+            (identifier.next == null ||
+                !isOneOfOrEof(identifier.next!, afterIdentifier))) ||
+        (isOneOfOrEof(identifier, afterIdentifier) &&
+            (identifier.next == null ||
+                !isOneOfOrEof(identifier.next!, afterIdentifier)))) {
+      identifier = parser.insertSyntheticIdentifier(token, this,
+          message: codes.templateExpectedIdentifier.withArguments(identifier));
+    } else {
+      if (!identifier.isKeywordOrIdentifier) {
+        parser.reportRecoverableErrorWithToken(
+            identifier, codes.templateExpectedIdentifier);
+        // When in doubt, consume the token to ensure we make progress
+        // but insert a synthetic identifier to satisfy listeners.
+        identifier = parser.rewriter.insertSyntheticIdentifier(identifier);
+      } else {
+        // Use the keyword as the identifier.
+        parser.reportRecoverableErrorWithToken(
+            identifier, codes.templateExpectedIdentifierButGotKeyword);
+      }
+    }
+    return identifier;
+  }
+
+  @override
+  bool operator ==(dynamic other) {
+    return other is ExtensionShowHideElementIdentifierContext &&
+        _kind == other._kind;
+  }
+}
+
 /// See [IdentifierContext.fieldDeclaration].
 class FieldDeclarationIdentifierContext extends IdentifierContext {
   const FieldDeclarationIdentifierContext()
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
index 564eaaa..d597b3a 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
@@ -144,6 +144,14 @@
     logEvent("ClassImplements");
   }
 
+  /// Handle a show clause in an extension declaration.
+  /// Substructures:
+  /// - shown types and instance members
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    logEvent("ExtensionShowHide");
+  }
+
   /// Handle the header of a class declaration.  Substructures:
   /// - metadata
   /// - modifiers
@@ -238,7 +246,7 @@
   /// - on type
   /// - body
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     logEvent('ExtensionDeclaration');
   }
 
@@ -1445,6 +1453,13 @@
     logEvent("Identifier");
   }
 
+  /// Handle an identifier token in a show or hide clause.
+  ///
+  /// [context] indicates what kind of construct the identifier appears in.
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    logEvent("ShowHideIdentifier");
+  }
+
   void handleIndexedExpression(
       Token? question, Token openSquareBracket, Token closeSquareBracket) {
     logEvent("IndexedExpression");
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 f35035f..c59af84 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -2391,6 +2391,63 @@
     }
     TypeInfo typeInfo = computeType(onKeyword, /* required = */ true);
     token = typeInfo.ensureTypeOrVoid(onKeyword, this);
+
+    int handleShowHideElements() {
+      int elementCount = 0;
+      do {
+        Token next = token.next!.next!;
+        if (optional('get', next)) {
+          token = IdentifierContext.extensionShowHideElementGetter
+              .ensureIdentifier(next, this);
+          listener.handleShowHideIdentifier(next, token);
+        } else if (optional('operator', next)) {
+          token = IdentifierContext.extensionShowHideElementOperator
+              .ensureIdentifier(next, this);
+          listener.handleShowHideIdentifier(next, token);
+        } else if (optional('set', next)) {
+          token = IdentifierContext.extensionShowHideElementSetter
+              .ensureIdentifier(next, this);
+          listener.handleShowHideIdentifier(next, token);
+        } else {
+          TypeInfo typeInfo = computeType(
+              token.next!,
+              /* required = */ true,
+              /* inDeclaration = */ true,
+              /* acceptKeywordForSimpleType = */ true);
+          final bool isUnambiguouslyType =
+              typeInfo.hasTypeArguments || typeInfo is PrefixedType;
+          if (isUnambiguouslyType) {
+            token = typeInfo.ensureTypeOrVoid(token.next!, this);
+          } else {
+            token = IdentifierContext.extensionShowHideElementMemberOrType
+                .ensureIdentifier(token.next!, this);
+            listener.handleShowHideIdentifier(null, token);
+          }
+        }
+        ++elementCount;
+      } while (optional(',', token.next!));
+      return elementCount;
+    }
+
+    Token? showKeyword = token.next!;
+    int showElementCount = 0;
+    if (optional('show', showKeyword)) {
+      showElementCount = handleShowHideElements();
+    } else {
+      showKeyword = null;
+    }
+
+    Token? hideKeyword = token.next!;
+    int hideElementCount = 0;
+    if (optional('hide', hideKeyword)) {
+      hideElementCount = handleShowHideElements();
+    } else {
+      hideKeyword = null;
+    }
+
+    listener.handleExtensionShowHide(
+        showKeyword, showElementCount, hideKeyword, hideElementCount);
+
     if (!optional('{', token.next!)) {
       // Recovery
       Token next = token.next!;
@@ -2417,8 +2474,8 @@
     }
     token = parseClassOrMixinOrExtensionBody(
         token, DeclarationKind.Extension, name?.lexeme);
-    listener.endExtensionDeclaration(
-        extensionKeyword, typeKeyword, onKeyword, token);
+    listener.endExtensionDeclaration(extensionKeyword, typeKeyword, onKeyword,
+        showKeyword, hideKeyword, token);
     return token;
   }
 
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
index 96a61a4..208db61 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
@@ -48,6 +48,7 @@
   FunctionBody,
   FunctionBodyAsyncToken,
   FunctionBodyStarToken,
+  HideClause,
   Identifier,
   IdentifierList,
   Initializers,
@@ -55,8 +56,10 @@
   Metadata,
   Modifiers,
   Name,
+  OperatorList,
   ParameterDefaultValue,
   Prefix,
+  ShowClause,
   StringLiteral,
   SwitchScope,
   Token,
@@ -66,6 +69,7 @@
   TypeList,
   TypeVariable,
   TypeVariables,
+  UnresolvedType,
   VarFinalOrConstToken,
   WithClause,
 }
@@ -346,6 +350,12 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    debugEvent("ExtensionShow");
+  }
+
+  @override
   void handleNoTypeArguments(Token token) {
     debugEvent("NoTypeArguments");
     push(NullValue.TypeArguments);
@@ -365,7 +375,7 @@
   @override
   void handleNoType(Token lastConsumed) {
     debugEvent("NoType");
-    push(NullValue.Type);
+    push(NullValue.UnresolvedType);
   }
 
   @override
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart b/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart
index 2546579..d599819 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart
@@ -36,6 +36,11 @@
   /// void Function foo(int x);
   bool get isFunctionType;
 
+  /// Returns true if the type has type arguments.
+  bool get hasTypeArguments;
+
+  bool get recovered => false;
+
   /// Call this function when the token after [token] must be a type (not void).
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
@@ -147,6 +152,7 @@
     [bool inDeclaration = false, bool acceptKeywordForSimpleType = false]) {
   Token next = token.next!;
   if (!isValidTypeReference(next)) {
+    // As next is not a valid type reference, this is all recovery.
     if (next.type.isBuiltIn) {
       TypeParamOrArgInfo typeParamOrArg =
           computeTypeParamOrArg(next, inDeclaration);
@@ -154,7 +160,8 @@
         // Recovery: built-in `<` ... `>`
         if (required || looksLikeName(typeParamOrArg.skip(next).next!)) {
           return new ComplexTypeInfo(token, typeParamOrArg)
-              .computeBuiltinOrVarAsType(required);
+              .computeBuiltinOrVarAsType(required)
+            ..recovered = true;
         }
       } else if (required || isGeneralizedFunctionType(next.next!)) {
         String? value = next.stringValue;
@@ -164,21 +171,25 @@
             !identical('operator', value) &&
             !(identical('typedef', value) && next.next!.isIdentifier))) {
           return new ComplexTypeInfo(token, typeParamOrArg)
-              .computeBuiltinOrVarAsType(required);
+              .computeBuiltinOrVarAsType(required)
+            ..recovered = true;
         }
       }
     } else if (required) {
       // Recovery
       if (optional('.', next)) {
         // Looks like prefixed type missing the prefix
-        return new ComplexTypeInfo(
+        TypeInfo result = new ComplexTypeInfo(
                 token, computeTypeParamOrArg(next, inDeclaration))
             .computePrefixedType(required);
+        if (result is ComplexTypeInfo) result.recovered = true;
+        return result;
       } else if (optional('var', next) &&
           isOneOf(next.next!, const ['<', ',', '>'])) {
         return new ComplexTypeInfo(
                 token, computeTypeParamOrArg(next, inDeclaration))
-            .computeBuiltinOrVarAsType(required);
+            .computeBuiltinOrVarAsType(required)
+          ..recovered = true;
       }
     }
     return noType;
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 899bbd4..099319f 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
@@ -99,12 +99,18 @@
   bool get couldBeExpression => false;
 
   @override
+  bool get hasTypeArguments => false;
+
+  @override
   bool get isNullable => false;
 
   @override
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) {
     parser.reportRecoverableErrorWithToken(
         token.next!, codes.templateExpectedType);
@@ -143,12 +149,18 @@
   bool get couldBeExpression => true;
 
   @override
+  bool get hasTypeArguments => false;
+
+  @override
   bool get isNullable => false;
 
   @override
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -201,6 +213,9 @@
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token parseTypeRest(Token start, Token token, Parser parser) {
     token = token.next!;
     assert(optional('?', token));
@@ -229,12 +244,18 @@
   bool get couldBeExpression => false;
 
   @override
+  bool get hasTypeArguments => true;
+
+  @override
   bool get isNullable => false;
 
   @override
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -282,6 +303,9 @@
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token parseTypeRest(Token start, Parser parser) {
     Token token = start.next!;
     assert(optional('?', token));
@@ -306,12 +330,18 @@
   bool get couldBeExpression => true;
 
   @override
+  bool get hasTypeArguments => false;
+
+  @override
   bool get isNullable => false;
 
   @override
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -354,12 +384,18 @@
   bool get couldBeExpression => false;
 
   @override
+  bool get hasTypeArguments => false;
+
+  @override
   bool get isNullable => false;
 
   @override
   bool get isFunctionType => false;
 
   @override
+  bool get recovered => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) {
     // Report an error, then parse `void` as if it were a type name.
     parser.reportRecoverableError(token.next!, codes.messageInvalidVoid);
@@ -471,21 +507,30 @@
   /// whether it has a return type, otherwise this is `null`.
   bool? gftHasReturnType;
 
+  @override
+  bool recovered;
+
   ComplexTypeInfo(Token beforeStart, this.typeArguments)
-      : this.start = beforeStart.next! {
+      : this.start = beforeStart.next!,
+        recovered = typeArguments.recovered {
     // ignore: unnecessary_null_comparison
     assert(typeArguments != null);
   }
 
   ComplexTypeInfo._nonNullable(this.start, this.typeArguments, this.end,
-      this.typeVariableStarters, this.gftHasReturnType);
+      this.typeVariableStarters, this.gftHasReturnType, this.recovered);
 
   @override
   TypeInfo get asNonNullable {
     return beforeQuestionMark == null
         ? this
-        : new ComplexTypeInfo._nonNullable(start, typeArguments,
-            beforeQuestionMark, typeVariableStarters, gftHasReturnType);
+        : new ComplexTypeInfo._nonNullable(
+            start,
+            typeArguments,
+            beforeQuestionMark,
+            typeVariableStarters,
+            gftHasReturnType,
+            recovered);
   }
 
   @override
@@ -493,6 +538,9 @@
       typeArguments == noTypeParamOrArg && typeVariableStarters.isEmpty;
 
   @override
+  bool get hasTypeArguments => typeArguments is! NoTypeParamOrArg;
+
+  @override
   bool get isNullable => beforeQuestionMark != null;
 
   @override
@@ -671,7 +719,7 @@
 
   /// Given a builtin, return the receiver so that parseType will report
   /// an error for the builtin used as a type.
-  TypeInfo computeBuiltinOrVarAsType(bool required) {
+  ComplexTypeInfo computeBuiltinOrVarAsType(bool required) {
     assert(start.type.isBuiltIn || optional('var', start));
 
     end = typeArguments.skip(start);
@@ -828,11 +876,8 @@
     listener.beginTypeVariable(token);
     listener.handleTypeVariablesDefined(token, /* count = */ 1);
     listener.handleNoType(token);
-    listener.endTypeVariable(
-        endGroup,
-        /* index = */ 0,
-        /* extendsOrSuper = */ null,
-        /* variance = */ null);
+    listener.endTypeVariable(endGroup, /* index = */ 0,
+        /* extendsOrSuper = */ null, /* variance = */ null);
     listener.endTypeVariables(beginGroup, endGroup);
     return endGroup;
   }
@@ -948,6 +993,7 @@
     while (true) {
       TypeInfo typeInfo =
           computeType(next, /* required = */ true, inDeclaration);
+      recovered = recovered | typeInfo.recovered;
       if (typeInfo == noType) {
         while (typeInfo == noType && optional('@', next.next!)) {
           next = skipMetadata(next);
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index fe7fc3e..8d97c49 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -1,5 +1,5 @@
 name: _fe_analyzer_shared
-version: 25.0.0
+version: 27.0.0
 description: Logic that is shared between the front_end and analyzer packages.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/_fe_analyzer_shared
 
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/local_boolean_new.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/local_boolean_new.dart
new file mode 100644
index 0000000..50dba2c
--- /dev/null
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/local_boolean_new.dart
@@ -0,0 +1,228 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+finalLocalBool(int? x) {
+  final bool b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+finalLocalBool_untyped(int? x) {
+  final b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+localBool(int? x) {
+  bool b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+localBool_untyped(int? x) {
+  var b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+localBool_assigned(int? x, bool b1) {
+  bool b2 = b1;
+  b2 = x == null;
+  if (!b2) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+localBool_assigned_untyped(int? x, bool b1) {
+  var b2 = b1;
+  b2 = x == null;
+  if (!b2) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+localBool_assignedDynamic(int? x, bool b1) {
+  dynamic b2 = b1;
+  b2 = x == null;
+  if (!b2) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+parameter_assigned(int? x, bool b) {
+  b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+parameter_assigned_untyped(int? x, b) {
+  b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+parameter_assignedDynamic(int? x, dynamic b) {
+  b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+lateFinalLocalBool(int? x) {
+  late final bool b = x == null;
+  if (!b) {
+    // We don't promote based on the initializers of late locals because we
+    // don't know when they execute.
+    x;
+  } else {
+    x;
+  }
+}
+
+lateFinalLocalBool_untyped(int? x) {
+  late final b = x == null;
+  if (!b) {
+    // We don't promote based on the initializers of late locals because we
+    // don't know when they execute.
+    x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool(int? x) {
+  late bool b = x == null;
+  if (!b) {
+    // We don't promote based on the initializers of late locals because we
+    // don't know when they execute.
+    x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool_untyped(int? x) {
+  late var b = x == null;
+  if (!b) {
+    // We don't promote based on the initializers of late locals because we
+    // don't know when they execute.
+    x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool_assignedAndInitialized(int? x, bool b1) {
+  late bool b2 = b1;
+  b2 = x == null;
+  if (!b2) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool_assignedAndInitialized_untyped(int? x, bool b1) {
+  late var b2 = b1;
+  b2 = x == null;
+  if (!b2) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool_assignedButNotInitialized(int? x) {
+  late bool b;
+  b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+lateLocalBool_assignedButNotInitialized_untyped(int? x) {
+  late var b;
+  b = x == null;
+  if (!b) {
+    /*nonNullable*/ x;
+  } else {
+    x;
+  }
+}
+
+rebaseWithDemotion(int? x, int? y, int? z, int? a) {
+  x;
+  y;
+  z;
+  if (y == null) return;
+  x;
+  /*nonNullable*/ y;
+  z;
+  bool b = x == null;
+  x;
+  /*nonNullable*/ y;
+  z;
+  if (z == null) return;
+  x;
+  /*nonNullable*/ y;
+  /*nonNullable*/ z;
+  y = a;
+  x;
+  y;
+  /*nonNullable*/ z;
+  if (b) return;
+  /*nonNullable*/ x;
+  y;
+  /*nonNullable*/ z;
+}
+
+compoundAssignment(int? x, dynamic b) {
+  b += x == null;
+  if (!b) {
+    // It's not safe to promote, because there's no guarantee that value of `b`
+    // has anything to do with the result of `x == null`.
+    x;
+  } else {
+    x;
+  }
+}
+
+ifNullAssignment(int? x, dynamic b) {
+  b ??= x == null;
+  if (!b) {
+    // It's not safe to promote, because there's no guarantee that value of `b`
+    // has anything to do with the result of `x == null`.
+    x;
+  } else {
+    x;
+  }
+}
diff --git a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
index 4159999..add033d 100644
--- a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
+++ b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
@@ -6,14 +6,16 @@
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/type_environment.dart';
-import 'package:kernel/kernel.dart';
+
+import '../js_interop.dart' show getJSName;
 
 /// Replaces js_util methods with inline calls to foreign_helper JS which
 /// emits the code as a JavaScript code fragment.
 class JsUtilOptimizer extends Transformer {
-  final Procedure _jsTarget;
   final Procedure _callMethodTarget;
   final List<Procedure> _callMethodUncheckedTargets;
+  final Procedure _callConstructorTarget;
+  final List<Procedure> _callConstructorUncheckedTargets;
   final Procedure _getPropertyTarget;
   final Procedure _setPropertyTarget;
   final Procedure _setPropertyUncheckedTarget;
@@ -28,27 +30,35 @@
     'setProperty'
   ];
   final Iterable<Procedure> _allowedInteropJsUtilTargets;
+  final Procedure _jsTarget;
   final Procedure _allowInteropTarget;
   final Procedure _listEmptyFactory;
 
   final CoreTypes _coreTypes;
   final StatefulStaticTypeContext _staticTypeContext;
+  Map<Reference, ExtensionMemberDescriptor>? _extensionMemberIndex;
 
   JsUtilOptimizer(this._coreTypes, ClassHierarchy hierarchy)
-      : _jsTarget =
-            _coreTypes.index.getTopLevelProcedure('dart:_foreign_helper', 'JS'),
-        _callMethodTarget =
+      : _callMethodTarget =
             _coreTypes.index.getTopLevelProcedure('dart:js_util', 'callMethod'),
         _callMethodUncheckedTargets = List<Procedure>.generate(
             5,
             (i) => _coreTypes.index.getTopLevelProcedure(
                 'dart:js_util', '_callMethodUnchecked$i')),
+        _callConstructorTarget = _coreTypes.index
+            .getTopLevelProcedure('dart:js_util', 'callConstructor'),
+        _callConstructorUncheckedTargets = List<Procedure>.generate(
+            5,
+            (i) => _coreTypes.index.getTopLevelProcedure(
+                'dart:js_util', '_callConstructorUnchecked$i')),
         _getPropertyTarget = _coreTypes.index
             .getTopLevelProcedure('dart:js_util', 'getProperty'),
         _setPropertyTarget = _coreTypes.index
             .getTopLevelProcedure('dart:js_util', 'setProperty'),
         _setPropertyUncheckedTarget = _coreTypes.index
             .getTopLevelProcedure('dart:js_util', '_setPropertyUnchecked'),
+        _jsTarget =
+            _coreTypes.index.getTopLevelProcedure('dart:_foreign_helper', 'JS'),
         _allowInteropTarget =
             _coreTypes.index.getTopLevelProcedure('dart:js', 'allowInterop'),
         _allowedInteropJsUtilTargets = _allowedInteropJsUtilMembers.map(
@@ -64,6 +74,7 @@
     _staticTypeContext.enterLibrary(lib);
     lib.transformChildren(this);
     _staticTypeContext.leaveLibrary(lib);
+    _extensionMemberIndex = null;
     return lib;
   }
 
@@ -75,46 +86,136 @@
     return node;
   }
 
-  /// Replaces js_util method calls with optimization when possible.
-  ///
-  /// Lowers `getProperty` for any argument type straight to JS fragment call.
-  /// Lowers `setProperty` to `_setPropertyUnchecked` for values that are
-  /// not Function type and guaranteed to be interop allowed.
-  /// Lowers `callMethod` to `_callMethodUncheckedN` when the number of given
-  /// arguments is 0-4 and all arguments are guaranteed to be interop allowed.
   @override
-  visitStaticInvocation(StaticInvocation node) {
-    if (node.target == _getPropertyTarget) {
-      node = _lowerGetProperty(node);
-    } else if (node.target == _setPropertyTarget) {
-      node = _lowerSetProperty(node);
-    } else if (node.target == _callMethodTarget) {
-      node = _lowerCallMethod(node);
+  visitProcedure(Procedure node) {
+    _staticTypeContext.enterMember(node);
+    var transformedBody;
+    if (node.isExternal && node.isExtensionMember) {
+      var index = _extensionMemberIndex ??=
+          _createExtensionMembersIndex(node.enclosingLibrary);
+      var nodeDescriptor = index[node.reference]!;
+      if (!nodeDescriptor.isStatic) {
+        if (nodeDescriptor.kind == ExtensionMemberKind.Getter) {
+          transformedBody = _getExternalGetterBody(node);
+        } else if (nodeDescriptor.kind == ExtensionMemberKind.Setter) {
+          transformedBody = _getExternalSetterBody(node);
+        } else if (nodeDescriptor.kind == ExtensionMemberKind.Method) {
+          transformedBody = _getExternalMethodBody(node);
+        }
+      }
     }
-    node.transformChildren(this);
+    if (transformedBody != null) {
+      node.function.body = transformedBody;
+      node.isExternal = false;
+    } else {
+      node.transformChildren(this);
+    }
+    _staticTypeContext.leaveMember(node);
     return node;
   }
 
-  /// Lowers the given js_util `getProperty` call to the foreign_helper JS call
-  /// for any argument type. Lowers `getProperty(o, name)` to
-  /// `JS('Object|Null', '#.#', o, name)`.
-  StaticInvocation _lowerGetProperty(StaticInvocation node) {
-    Arguments arguments = node.arguments;
-    assert(arguments.types.isEmpty);
-    assert(arguments.positional.length == 2);
-    assert(arguments.named.isEmpty);
-    return StaticInvocation(
-        _jsTarget,
-        Arguments(
-          [
-            StringLiteral("Object|Null"),
-            StringLiteral("#.#"),
-            ...arguments.positional
-          ],
-          // TODO(rileyporter): Copy type from getProperty when it's generic.
-          types: [DynamicType()],
-        )..fileOffset = arguments.fileOffset)
+  /// Returns and initializes `_extensionMemberIndex` to an index of the member
+  /// reference to the member `ExtensionMemberDescriptor`, for all extension
+  /// members in the given [library].
+  Map<Reference, ExtensionMemberDescriptor> _createExtensionMembersIndex(
+      Library library) {
+    _extensionMemberIndex = {};
+    library.extensions.forEach((extension) => extension.members.forEach(
+        (descriptor) =>
+            _extensionMemberIndex![descriptor.member] = descriptor));
+    return _extensionMemberIndex!;
+  }
+
+  /// Returns a new function body for the given [node] external getter.
+  ///
+  /// The new function body will call the optimized version of
+  /// `js_util.getProperty` for the given external getter.
+  ReturnStatement _getExternalGetterBody(Procedure node) {
+    var function = node.function;
+    assert(function.positionalParameters.length == 1);
+    var getPropertyInvocation = StaticInvocation(
+        _getPropertyTarget,
+        Arguments([
+          VariableGet(function.positionalParameters.first),
+          StringLiteral(_getExtensionMemberName(node))
+        ]))
       ..fileOffset = node.fileOffset;
+    return ReturnStatement(
+        AsExpression(getPropertyInvocation, function.returnType));
+  }
+
+  /// Returns a new function body for the given [node] external setter.
+  ///
+  /// The new function body will call the optimized version of
+  /// `js_util.setProperty` for the given external setter.
+  ReturnStatement _getExternalSetterBody(Procedure node) {
+    var function = node.function;
+    assert(function.positionalParameters.length == 2);
+    var setPropertyInvocation = StaticInvocation(
+        _setPropertyTarget,
+        Arguments([
+          VariableGet(function.positionalParameters.first),
+          StringLiteral(_getExtensionMemberName(node)),
+          VariableGet(function.positionalParameters.last)
+        ]))
+      ..fileOffset = node.fileOffset;
+    return ReturnStatement(AsExpression(
+        _lowerSetProperty(setPropertyInvocation), function.returnType));
+  }
+
+  /// Returns a new function body for the given [node] external method.
+  ///
+  /// The new function body will call the optimized version of
+  /// `js_util.callMethod` for the given external method.
+  ReturnStatement _getExternalMethodBody(Procedure node) {
+    var function = node.function;
+    var callMethodInvocation = StaticInvocation(
+        _callMethodTarget,
+        Arguments([
+          VariableGet(function.positionalParameters.first),
+          StringLiteral(_getExtensionMemberName(node)),
+          ListLiteral(function.positionalParameters
+              .sublist(1)
+              .map((argument) => VariableGet(argument))
+              .toList())
+        ]))
+      ..fileOffset = node.fileOffset;
+    return ReturnStatement(AsExpression(
+        _lowerCallMethod(callMethodInvocation), function.returnType));
+  }
+
+  /// Returns the extension member name.
+  ///
+  /// Returns either the name from the `@JS` annotation if non-empty, or the
+  /// declared name of the extension member. Does not return the CFE generated
+  /// name for the top level member for this extension member.
+  String _getExtensionMemberName(Procedure node) {
+    var jsAnnotationName = getJSName(node);
+    if (jsAnnotationName.isNotEmpty) {
+      return jsAnnotationName;
+    }
+    return _extensionMemberIndex![node.reference]!.name.text;
+  }
+
+  /// Replaces js_util method calls with optimization when possible.
+  ///
+  /// Lowers `setProperty` to  `_setPropertyUnchecked` for values that are
+  /// not Function type and guaranteed to be interop allowed.
+  /// Lowers `callMethod` to `_callMethodUncheckedN` when the number of given
+  /// arguments is 0-4 and all arguments are guaranteed to be interop allowed.
+  /// Lowers `callConstructor` to `_callConstructorUncheckedN` when there are
+  /// 0-4 arguments and all arguments are guaranteed to be interop allowed.
+  @override
+  visitStaticInvocation(StaticInvocation node) {
+    if (node.target == _setPropertyTarget) {
+      node = _lowerSetProperty(node);
+    } else if (node.target == _callMethodTarget) {
+      node = _lowerCallMethod(node);
+    } else if (node.target == _callConstructorTarget) {
+      node = _lowerCallConstructor(node);
+    }
+    node.transformChildren(this);
+    return node;
   }
 
   /// Lowers the given js_util `setProperty` call to `_setPropertyUnchecked`
@@ -147,70 +248,102 @@
     assert(arguments.positional.length == 3);
     assert(arguments.named.isEmpty);
 
-    // Lower List.empty factory call.
-    var argumentsList = arguments.positional.last;
+    return _lowerToCallUnchecked(
+        node, _callMethodUncheckedTargets, arguments.positional.sublist(0, 2));
+  }
+
+  /// Lowers the given js_util `callConstructor` call to `_callConstructorUncheckedN`
+  /// when the additional validation checks on the arguments can be elided.
+  ///
+  /// Calls will be lowered when using a List literal or constant list with 0-4
+  /// elements for the `callConstructor` arguments, or the `List.empty()` factory.
+  /// Removing the checks allows further inlining by the compilers.
+  StaticInvocation _lowerCallConstructor(StaticInvocation node) {
+    Arguments arguments = node.arguments;
+    assert(arguments.types.isEmpty);
+    assert(arguments.positional.length == 2);
+    assert(arguments.named.isEmpty);
+
+    return _lowerToCallUnchecked(
+        node, _callConstructorUncheckedTargets, [arguments.positional.first]);
+  }
+
+  /// Helper to lower the given [node] to the relevant unchecked target in the
+  /// [callUncheckedTargets] based on whether the validation checks on the
+  /// [originalArguments] can be elided.
+  ///
+  /// Calls will be lowered when using a List literal or constant list with 0-4
+  /// arguments, or the `List.empty()` factory. Removing the checks allows further
+  /// inlining by the compilers.
+  StaticInvocation _lowerToCallUnchecked(
+      StaticInvocation node,
+      List<Procedure> callUncheckedTargets,
+      List<Expression> originalArguments) {
+    var argumentsList = node.arguments.positional.last;
+    // Lower arguments in a List.empty factory call.
     if (argumentsList is StaticInvocation &&
         argumentsList.target == _listEmptyFactory) {
-      return _createNewCallMethodNode([], arguments, node.fileOffset);
+      return _createCallUncheckedNode(callUncheckedTargets, [],
+          originalArguments, node.fileOffset, node.arguments.fileOffset);
     }
 
-    // Lower other kinds of Lists.
-    var callMethodArguments;
+    // Lower arguments in other kinds of Lists.
+    var callUncheckedArguments;
     var entryType;
     if (argumentsList is ListLiteral) {
-      if (argumentsList.expressions.length >=
-          _callMethodUncheckedTargets.length) {
+      if (argumentsList.expressions.length >= callUncheckedTargets.length) {
         return node;
       }
-      callMethodArguments = argumentsList.expressions;
+      callUncheckedArguments = argumentsList.expressions;
       entryType = argumentsList.typeArgument;
     } else if (argumentsList is ConstantExpression &&
         argumentsList.constant is ListConstant) {
       var argumentsListConstant = argumentsList.constant as ListConstant;
-      if (argumentsListConstant.entries.length >=
-          _callMethodUncheckedTargets.length) {
+      if (argumentsListConstant.entries.length >= callUncheckedTargets.length) {
         return node;
       }
-      callMethodArguments = argumentsListConstant.entries
+      callUncheckedArguments = argumentsListConstant.entries
           .map((constant) => ConstantExpression(
               constant, constant.getType(_staticTypeContext)))
           .toList();
       entryType = argumentsListConstant.typeArgument;
     } else {
-      // Skip lowering any other type of List.
+      // Skip lowering arguments in any other type of List.
       return node;
     }
 
-    // Check the overall List entry type, then verify each argument if needed.
+    // Check the arguments List type, then verify each argument if needed.
     if (!_allowedInteropType(entryType)) {
-      for (var argument in callMethodArguments) {
+      for (var argument in callUncheckedArguments) {
         if (!_allowedInterop(argument)) {
           return node;
         }
       }
     }
 
-    return _createNewCallMethodNode(
-        callMethodArguments, arguments, node.fileOffset);
+    return _createCallUncheckedNode(
+        callUncheckedTargets,
+        callUncheckedArguments,
+        originalArguments,
+        node.fileOffset,
+        node.arguments.fileOffset);
   }
 
-  /// Creates a new StaticInvocation node for `_callMethodUncheckedN` with the
-  /// given 0-4 arguments.
-  StaticInvocation _createNewCallMethodNode(
-      List<Expression> callMethodArguments,
-      Arguments arguments,
-      int nodeFileOffset) {
-    assert(callMethodArguments.length <= 4);
+  /// Creates a new StaticInvocation node for the relevant unchecked target
+  /// with the given 0-4 arguments.
+  StaticInvocation _createCallUncheckedNode(
+      List<Procedure> callUncheckedTargets,
+      List<Expression> callUncheckedArguments,
+      List<Expression> originalArguments,
+      int nodeFileOffset,
+      int argumentsFileOffset) {
+    assert(callUncheckedArguments.length <= 4);
     return StaticInvocation(
-        _callMethodUncheckedTargets[callMethodArguments.length],
+        callUncheckedTargets[callUncheckedArguments.length],
         Arguments(
-          [
-            arguments.positional[0],
-            arguments.positional[1],
-            ...callMethodArguments
-          ],
+          [...originalArguments, ...callUncheckedArguments],
           types: [],
-        )..fileOffset = arguments.fileOffset)
+        )..fileOffset = argumentsFileOffset)
       ..fileOffset = nodeFileOffset;
   }
 
diff --git a/pkg/analysis_server/README.md b/pkg/analysis_server/README.md
index c6a1813..12af60f 100644
--- a/pkg/analysis_server/README.md
+++ b/pkg/analysis_server/README.md
@@ -21,5 +21,5 @@
 Please file feature requests and bugs at the [issue tracker][tracker].
 
 [tracker]: https://github.com/dart-lang/sdk/issues
-[api]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
+[api]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html
 [lsp_spec]: https://microsoft.github.io/language-server-protocol/
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart
index c319053..a92b60e 100644
--- a/pkg/analysis_server/benchmark/benchmarks.dart
+++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -8,12 +8,14 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer_utilities/package_root.dart';
 import 'package:args/command_runner.dart';
 import 'package:intl/intl.dart';
 import 'package:path/path.dart' as path;
 
 import 'perf/benchmarks_impl.dart';
 import 'perf/flutter_analyze_benchmark.dart';
+import 'perf/flutter_completion_benchmark.dart';
 
 Future main(List<String> args) async {
   var benchmarks = <Benchmark>[
@@ -22,19 +24,21 @@
     AnalysisBenchmark(ServerBenchmark.das),
     AnalysisBenchmark(ServerBenchmark.lsp),
     FlutterAnalyzeBenchmark(),
+    FlutterCompletionBenchmark.das,
+    FlutterCompletionBenchmark.lsp,
   ];
 
-  var runner =
-      CommandRunner('benchmark', 'A benchmark runner for the analysis server.');
+  var runner = CommandRunner(
+    'benchmark',
+    'A benchmark runner for the analysis server.',
+  );
   runner.addCommand(ListCommand(benchmarks));
   runner.addCommand(RunCommand(benchmarks));
   runner.run(args);
 }
 
 String get analysisServerSrcPath {
-  var script = Platform.script.toFilePath(windows: Platform.isWindows);
-  var pkgPath = path.normalize(path.join(path.dirname(script), '..', '..'));
-  return path.join(pkgPath, 'analysis_server');
+  return path.join(packageRoot, 'analysis_server');
 }
 
 void deleteServerCache() {
@@ -42,18 +46,14 @@
   ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
   var stateLocation = resourceProvider.getStateLocation('.analysis-driver');
   try {
-    if (stateLocation != null && stateLocation.exists) {
-      stateLocation.delete();
-    }
+    stateLocation?.delete();
   } catch (e) {
     // ignore any exception
   }
 }
 
 List<String> getProjectRoots({bool quick = false}) {
-  var script = Platform.script.toFilePath(windows: Platform.isWindows);
-  var pkgPath = path.normalize(path.join(path.dirname(script), '..', '..'));
-  return <String>[path.join(pkgPath, quick ? 'meta' : 'analysis_server')];
+  return [path.join(packageRoot, quick ? 'meta' : 'analysis_server')];
 }
 
 abstract class Benchmark {
@@ -65,7 +65,7 @@
   final String kind;
 
   Benchmark(this.id, this.description,
-      {this.enabled = true, this.kind = 'cpu'});
+      {this.enabled = true, required this.kind});
 
   int get maxIterations => 0;
 
diff --git a/pkg/analysis_server/benchmark/perf/flutter_completion_benchmark.dart b/pkg/analysis_server/benchmark/perf/flutter_completion_benchmark.dart
new file mode 100644
index 0000000..1784e96
--- /dev/null
+++ b/pkg/analysis_server/benchmark/perf/flutter_completion_benchmark.dart
@@ -0,0 +1,317 @@
+// 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.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+
+import '../benchmarks.dart';
+import 'memory_tests.dart';
+
+Future<int> _runProcess(
+  String command,
+  List<String> args, {
+  String? cwd,
+  bool failOnError = true,
+}) async {
+  print('\n$command ${args.join(' ')}');
+
+  var process = await Process.start(command, args, workingDirectory: cwd);
+
+  process.stdout
+      .transform(utf8.decoder)
+      .transform(LineSplitter())
+      .listen((line) {
+    print('  $line');
+  });
+  process.stderr
+      .transform(utf8.decoder)
+      .transform(LineSplitter())
+      .listen((line) => print('  $line'));
+
+  var exitCode = await process.exitCode;
+  if (exitCode != 0 && failOnError) {
+    throw '$command exited with $exitCode';
+  }
+
+  return exitCode;
+}
+
+/// benchmarks:
+///   - analysis-server-warm-analysis
+///   - analysis-server-warm-memory
+///   - analysis-server-edit
+///   - analysis-server-completion
+class FlutterCompletionBenchmark extends Benchmark {
+  static final das = FlutterCompletionBenchmark(
+    'das',
+    () => AnalysisServerBenchmarkTest(),
+  );
+
+  static final lsp = FlutterCompletionBenchmark(
+    'lsp',
+    () => LspAnalysisServerBenchmarkTest(),
+  );
+
+  final AbstractBenchmarkTest Function() testConstructor;
+
+  late String flutterPath;
+
+  FlutterCompletionBenchmark(String protocolName, this.testConstructor)
+      : super(
+          '$protocolName-flutter-completion',
+          'Completion benchmarks with Flutter.',
+          kind: 'group',
+        );
+
+  @override
+  bool get needsSetup => true;
+
+  @override
+  Future oneTimeSetup() async {
+    flutterPath = Directory.systemTemp.createTempSync('flutter').path;
+
+    // git clone https://github.com/flutter/flutter $flutterDir
+    await _runProcess('git', [
+      'clone',
+      'https://github.com/flutter/flutter',
+      path.canonicalize(flutterPath)
+    ]);
+
+    var flutterTool = path.join(flutterPath, 'bin', 'flutter');
+
+    // flutter --version
+    await _runProcess(flutterTool, ['--version'], cwd: flutterPath);
+
+    // flutter update-packages
+    await _runProcess(
+      flutterTool,
+      ['pub', 'get'],
+      cwd: path.join(flutterPath, 'packages', 'flutter'),
+    );
+  }
+
+  @override
+  Future<BenchMarkResult> run({
+    bool quick = false,
+    bool verbose = false,
+  }) async {
+    if (!quick) {
+      deleteServerCache();
+    }
+
+    var test = testConstructor();
+    if (verbose) {
+      test.debugStdio();
+    }
+
+    final flutterPkgPath = path.join(flutterPath, 'packages', 'flutter');
+
+    // Open a small directory, but with the package config that allows us
+    // to analyze any file in `package:flutter`, including tests.
+    var startTimer = Stopwatch()..start();
+    await test.setUp([
+      '$flutterPkgPath/lib/src/physics',
+    ]);
+
+    await test.analysisFinished;
+    startTimer.stop();
+
+    var result = CompoundBenchMarkResult(id);
+    result.add(
+      'start',
+      BenchMarkResult(
+        'micros',
+        startTimer.elapsedMicroseconds,
+      ),
+    );
+
+    // This is a scenario of an easy case - the file is small, less than
+    // 3KB, and we insert a prefix with a good selectivity. So, everything
+    // should be fast. We should just make sure to don't spend too much
+    // time analyzing, and do apply the filter.
+    // Total number of suggestions: 2322.
+    // Filtered to: 82.
+    result.add(
+      'smallFile-body',
+      BenchMarkResult(
+        'micros',
+        await _completionTiming(
+          test,
+          filePath: '$flutterPkgPath/lib/src/material/flutter_logo.dart',
+          uniquePrefix: 'Widget build(BuildContext context) {',
+          insertStringGenerator: () => 'M',
+          name: 'smallFile-body',
+        ),
+      ),
+    );
+
+    if (!quick) {
+      // This scenario is relatively easy - the file is small, less then 3KB.
+      // But we don't have any prefix to filter, so if we don't restrict the
+      // number of suggestions, we might spend too much time serializing into
+      // JSON in the server, and deserializing on the client.
+      // Total number of suggestions: 2322.
+      // Filtered to: 2322.
+      result.add(
+        'smallFile-body-withoutPrefix',
+        BenchMarkResult(
+          'micros',
+          await _completionTiming(
+            test,
+            filePath: '$flutterPkgPath/lib/src/material/flutter_logo.dart',
+            uniquePrefix: 'Widget build(BuildContext context) {',
+            insertStringGenerator: null,
+            name: 'smallFile-body-withoutPrefix',
+          ),
+        ),
+      );
+
+      // The key part of this scenario is that we work in a relatively large
+      // file, about 340KB. So, it is expensive to parse and resolve. And
+      // we simulate changing it by typing a prefix, as users often do.
+      // The target method body is small, so something could be optimized.
+      // Total number of suggestions: 4654.
+      // Filtered to: 182.
+      result.add(
+        'smallLibraryCycle-largeFile-smallBody',
+        BenchMarkResult(
+          'micros',
+          await _completionTiming(
+            test,
+            filePath: '$flutterPkgPath/test/material/text_field_test.dart',
+            uniquePrefix: 'getOpacity(WidgetTester tester, Finder finder) {',
+            insertStringGenerator: () => 'M',
+            name: 'smallLibraryCycle-largeFile-smallBody',
+          ),
+        ),
+      );
+
+      // In this scenario we change a file that is in a library cycle
+      // with 69 libraries. So, the implementation might discard information
+      // about all these libraries. We change a method body, so the API
+      // signature is the same, and we are able to reload these libraries
+      // from bytes. But this still costs something.
+      // There is also a spill-over from the previous test - we send a lot
+      // (about 5MB) of available declarations after each change. This makes
+      // completion response times very large.
+      // TODO(scheglov) Remove the previous sentence when improved.
+      // Total number of suggestions: 3429.
+      // Filtered to: 133.
+      result.add(
+        'mediumLibraryCycle-mediumFile-smallBody',
+        BenchMarkResult(
+          'micros',
+          await _completionTiming(
+            test,
+            filePath: '$flutterPkgPath/lib/src/material/app_bar.dart',
+            uniquePrefix: 'computeDryLayout(BoxConstraints constraints) {',
+            insertStringGenerator: () => 'M',
+            name: 'mediumLibraryCycle-mediumFile-smallBody',
+          ),
+        ),
+      );
+
+      // In this scenario is that we change a file that is in a library cycle
+      // with 69 libraries. Moreover, we change the API - the type of a
+      // formal parameter. So, potentially we need to relink the whole library
+      // cycle. This is expensive.
+      // Total number of suggestions: 1510.
+      // Filtered to: 0.
+      result.add(
+        'mediumLibraryCycle-mediumFile-api-parameterType',
+        BenchMarkResult(
+          'micros',
+          await _completionTiming(
+            test,
+            filePath: '$flutterPkgPath/lib/src/material/app_bar.dart',
+            uniquePrefix: 'computeDryLayout(BoxConstraints',
+            insertStringGenerator: _IncrementingStringGenerator(),
+            name: 'mediumLibraryCycle-mediumFile-api-parameterType',
+          ),
+        ),
+      );
+    }
+
+    await test.shutdown();
+
+    return result;
+  }
+
+  /// Perform completion in [filePath] at the end of the [uniquePrefix].
+  ///
+  /// If [insertStringGenerator] is not `null`, insert it, and complete after
+  /// it. So, we can simulate user typing to start completion.
+  Future<int> _completionTiming(
+    AbstractBenchmarkTest test, {
+    required String filePath,
+    required String uniquePrefix,
+    required String Function()? insertStringGenerator,
+    String? name,
+  }) async {
+    final fileContent = File(filePath).readAsStringSync();
+
+    final prefixOffset = fileContent.indexOf(uniquePrefix);
+    if (prefixOffset == -1) {
+      throw StateError('Cannot find: $uniquePrefix');
+    }
+    if (fileContent.contains(uniquePrefix, prefixOffset + 1)) {
+      throw StateError('Not unique: $uniquePrefix');
+    }
+
+    final prefixEnd = prefixOffset + uniquePrefix.length;
+
+    await test.openFile(filePath, fileContent);
+
+    Future<void> perform() async {
+      var completionOffset = prefixEnd;
+
+      if (insertStringGenerator != null) {
+        final insertString = insertStringGenerator();
+        completionOffset += insertString.length;
+        var newCode = fileContent.substring(0, prefixEnd) +
+            insertString +
+            fileContent.substring(prefixEnd);
+        await test.updateFile(
+          filePath,
+          newCode,
+        );
+      }
+
+      await test.complete(filePath, completionOffset);
+
+      if (insertStringGenerator != null) {
+        await test.updateFile(filePath, fileContent);
+      }
+    }
+
+    // Perform warm-up.
+    // The cold start does not matter.
+    // The sustained performance is much more important.
+    const kWarmUpCount = 50;
+    for (var i = 0; i < kWarmUpCount; i++) {
+      await perform();
+    }
+
+    const kRepeatCount = 10;
+    final timer = Stopwatch()..start();
+    for (var i = 0; i < kRepeatCount; i++) {
+      await perform();
+    }
+
+    await test.closeFile(filePath);
+
+    return timer.elapsedMicroseconds ~/ kRepeatCount;
+  }
+}
+
+class _IncrementingStringGenerator {
+  int _value = 0;
+
+  String call() {
+    return '${_value++}';
+  }
+}
diff --git a/pkg/analysis_server/benchmark/perf/memory_tests.dart b/pkg/analysis_server/benchmark/perf/memory_tests.dart
index b67b63c..528f672 100644
--- a/pkg/analysis_server/benchmark/perf/memory_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/memory_tests.dart
@@ -79,6 +79,7 @@
   Future<void> setUp(List<String> roots) async {
     await _test.setUp();
     await _test.subscribeToStatusNotifications();
+    await _test.subscribeToAvailableSuggestions();
     await _test.sendAnalysisSetAnalysisRoots(roots, []);
   }
 
@@ -127,6 +128,16 @@
   /// After every test, the server is stopped.
   Future shutdown() async => await shutdownIfNeeded();
 
+  /// Enable using available suggestions during completion.
+  Future<void> subscribeToAvailableSuggestions() async {
+    await server.send(
+      'completion.setSubscriptions',
+      CompletionSetSubscriptionsParams(
+        [CompletionService.AVAILABLE_SUGGESTION_SETS],
+      ).toJson(),
+    );
+  }
+
   /// Enable [ServerService.STATUS] notifications so that [analysisFinished]
   /// can be used.
   Future subscribeToStatusNotifications() async {
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index 2e13ba2..9934b5b 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -4337,7 +4337,7 @@
       An enumeration of the kinds of highlighting that can be applied to files.
     </p>
     
-  <dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt class="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMMENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE</dt><dd>
+  <dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt class="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMMENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_TEAR_OFF</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
       </dd><dt class="value">DYNAMIC_LOCAL_VARIABLE_DECLARATION</dt><dt class="value">DYNAMIC_LOCAL_VARIABLE_REFERENCE</dt><dt class="value">DYNAMIC_PARAMETER_DECLARATION</dt><dt class="value">DYNAMIC_PARAMETER_REFERENCE</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dd>
@@ -4355,7 +4355,7 @@
       </dd><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER_DECLARATION</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
-      </dd><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT_PREFIX</dt><dt class="value">INSTANCE_FIELD_DECLARATION</dt><dt class="value">INSTANCE_FIELD_REFERENCE</dt><dt class="value">INSTANCE_GETTER_DECLARATION</dt><dt class="value">INSTANCE_GETTER_REFERENCE</dt><dt class="value">INSTANCE_METHOD_DECLARATION</dt><dt class="value">INSTANCE_METHOD_REFERENCE</dt><dt class="value">INSTANCE_SETTER_DECLARATION</dt><dt class="value">INSTANCE_SETTER_REFERENCE</dt><dt class="value">INVALID_STRING_ESCAPE</dt><dt class="value">KEYWORD</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY_NAME</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUBLE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt><dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class="value">LOCAL_FUNCTION_DECLARATION</dt><dt class="value">LOCAL_FUNCTION_REFERENCE</dt><dt class="value">LOCAL_VARIABLE</dt><dd>
+      </dd><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT_PREFIX</dt><dt class="value">INSTANCE_FIELD_DECLARATION</dt><dt class="value">INSTANCE_FIELD_REFERENCE</dt><dt class="value">INSTANCE_GETTER_DECLARATION</dt><dt class="value">INSTANCE_GETTER_REFERENCE</dt><dt class="value">INSTANCE_METHOD_DECLARATION</dt><dt class="value">INSTANCE_METHOD_REFERENCE</dt><dt class="value">INSTANCE_METHOD_TEAR_OFF</dt><dt class="value">INSTANCE_SETTER_DECLARATION</dt><dt class="value">INSTANCE_SETTER_REFERENCE</dt><dt class="value">INVALID_STRING_ESCAPE</dt><dt class="value">KEYWORD</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY_NAME</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUBLE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt><dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class="value">LOCAL_FUNCTION_DECLARATION</dt><dt class="value">LOCAL_FUNCTION_REFERENCE</dt><dt class="value">LOCAL_FUNCTION_TEAR_OFF</dt><dt class="value">LOCAL_VARIABLE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
       </dd><dt class="value">LOCAL_VARIABLE_DECLARATION</dt><dt class="value">LOCAL_VARIABLE_REFERENCE</dt><dt class="value">METHOD</dt><dd>
@@ -4379,7 +4379,7 @@
       </dd><dt class="value">TOP_LEVEL_VARIABLE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
-      </dd><dt class="value">PARAMETER_DECLARATION</dt><dt class="value">PARAMETER_REFERENCE</dt><dt class="value">STATIC_FIELD_DECLARATION</dt><dt class="value">STATIC_GETTER_DECLARATION</dt><dt class="value">STATIC_GETTER_REFERENCE</dt><dt class="value">STATIC_METHOD_DECLARATION</dt><dt class="value">STATIC_METHOD_REFERENCE</dt><dt class="value">STATIC_SETTER_DECLARATION</dt><dt class="value">STATIC_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_DECLARATION</dt><dt class="value">TOP_LEVEL_FUNCTION_REFERENCE</dt><dt class="value">TOP_LEVEL_GETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_GETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_SETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_VARIABLE_DECLARATION</dt><dt class="value">TYPE_ALIAS</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNRESOLVED_INSTANCE_MEMBER_REFERENCE</dt><dt class="value">VALID_STRING_ESCAPE</dt></dl></dd><dt class="typeDefinition"><a name="type_HoverInformation">HoverInformation: object</a></dt><dd>
+      </dd><dt class="value">PARAMETER_DECLARATION</dt><dt class="value">PARAMETER_REFERENCE</dt><dt class="value">STATIC_FIELD_DECLARATION</dt><dt class="value">STATIC_GETTER_DECLARATION</dt><dt class="value">STATIC_GETTER_REFERENCE</dt><dt class="value">STATIC_METHOD_DECLARATION</dt><dt class="value">STATIC_METHOD_REFERENCE</dt><dt class="value">STATIC_METHOD_TEAR_OFF</dt><dt class="value">STATIC_SETTER_DECLARATION</dt><dt class="value">STATIC_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_DECLARATION</dt><dt class="value">TOP_LEVEL_FUNCTION_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_TEAR_OFF</dt><dt class="value">TOP_LEVEL_GETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_GETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_SETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_VARIABLE_DECLARATION</dt><dt class="value">TYPE_ALIAS</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNRESOLVED_INSTANCE_MEMBER_REFERENCE</dt><dt class="value">VALID_STRING_ESCAPE</dt></dl></dd><dt class="typeDefinition"><a name="type_HoverInformation">HoverInformation: object</a></dt><dd>
     <p>
       The hover information associated with a specific location.
     </p>
diff --git a/pkg/analysis_server/doc/tutorial/quick_fix.md b/pkg/analysis_server/doc/tutorial/quick_fix.md
index 3085dd9..8f1596b 100644
--- a/pkg/analysis_server/doc/tutorial/quick_fix.md
+++ b/pkg/analysis_server/doc/tutorial/quick_fix.md
@@ -319,7 +319,7 @@
 We're now ready to create the actual fix. To do that we're going to use the
 `ChangeBuilder` passed to the `compute` method. In the example below we'll
 introduce a couple of the methods on `ChangeBuilder`, but for more information
-you can read [Creating `SourceChange`s](https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_plugin/doc/tutorial/creating_edits.md).
+you can read [Creating `SourceChange`s](https://github.com/dart-lang/sdk/blob/main/pkg/analyzer_plugin/doc/tutorial/creating_edits.md).
 
 Fields can be declared with either `final`, `const`, `var`, or a type
 annotation, and the change that needs to be made depends on how the field was
@@ -394,7 +394,7 @@
 fixes that might need to be produced. For example, if there is an undefined
 identifier, and it might be possible to add an import to fix the problem,
 there's no way to know in advance how many libraries might define the name, but
-we'd want to proposing adding an import for each such library.
+we'd want to propose adding an import for each such library.
 
 If you are able to enumerate the possible fixes ahead of time, then you're
 better off to create one subclass of `CorrectionProducer` for each of the fixes.
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 7c0603b..03ef62f 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
@@ -16,7 +16,6 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/json_parsing.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
@@ -76,11 +75,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isAnalyzing.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => isAnalyzing.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -163,12 +158,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, label);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -260,12 +250,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(file, offset);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -482,17 +467,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, rOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, iLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, rLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(libId, displayUri, rOffset, iLength, rLength, file, offset);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -554,11 +530,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, port.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => port.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -724,16 +696,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, typeParameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(range, name, kind, parameters, typeParameters, returnType);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -980,19 +944,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, variableName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(attributes));
-    hash = JenkinsSmiHash.combine(hash, dartElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(children));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      kind,
+      label,
+      className,
+      variableName,
+      lspHashCode(attributes),
+      dartElement,
+      range,
+      codeRange,
+      lspHashCode(children));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1099,13 +1060,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, valueRange.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(name, label, valueRange);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1243,14 +1198,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(children));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(element, range, codeRange, lspHashCode(children));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1365,13 +1314,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, packageName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(packageName, file, offset);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1461,12 +1404,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(labels));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, lspHashCode(labels));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1552,12 +1490,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, outline);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1641,12 +1574,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, outline);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1764,13 +1692,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, insertTextFormat.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newText.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(insertTextFormat, range, newText);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index f40ac85..763de40 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -16,7 +16,6 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/json_parsing.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
@@ -132,13 +131,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, annotationId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newText.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(annotationId, range, newText);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -220,12 +213,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(label, edit);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -336,13 +324,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, applied.hashCode);
-    hash = JenkinsSmiHash.combine(hash, failureReason.hashCode);
-    hash = JenkinsSmiHash.combine(hash, failedChange.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(applied, failureReason, failedChange);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -404,11 +386,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -502,12 +480,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, from.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(fromRanges));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(from, lspHashCode(fromRanges));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -629,13 +602,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, item.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(item, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -870,18 +837,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tags));
-    hash = JenkinsSmiHash.combine(hash, detail.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      name, kind, lspHashCode(tags), detail, uri, range, selectionRange, data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -940,11 +897,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1038,12 +991,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, to.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(fromRanges));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(to, lspHashCode(fromRanges));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1165,13 +1113,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, item.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(item, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1292,13 +1234,7 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(textDocument, position, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1412,13 +1348,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1484,11 +1415,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1598,13 +1525,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, needsConfirmation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, description.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(label, needsConfirmation, description);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1756,15 +1677,8 @@
   }
 
   @override
-  int get hashCode {
-    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, general.hashCode);
-    hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(workspace, textDocument, window, general, experimental);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -1952,17 +1866,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didCreate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willCreate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didRename.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willRename.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didDelete.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willDelete.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, didCreate, willCreate,
+      didRename, willRename, didDelete, willDelete);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -2052,12 +1957,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, regularExpressions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, markdown.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(regularExpressions, markdown);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -2174,13 +2074,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    hash = JenkinsSmiHash.combine(hash, showMessage.hashCode);
-    hash = JenkinsSmiHash.combine(hash, showDocument.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(workDoneProgress, showMessage, showDocument);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -2507,21 +2401,18 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, semanticTokens.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLens.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileOperations.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      applyEdit,
+      workspaceEdit,
+      didChangeConfiguration,
+      didChangeWatchedFiles,
+      symbol,
+      executeCommand,
+      workspaceFolders,
+      configuration,
+      semanticTokens,
+      codeLens,
+      fileOperations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -2769,18 +2660,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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, disabled.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, command.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(title, kind, lspHashCode(diagnostics),
+      isPreferred, disabled, edit, command, data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -2993,17 +2874,14 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, disabledSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dataSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, resolveSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, honorsChangeAnnotations.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      dynamicRegistration,
+      codeActionLiteralSupport,
+      isPreferredSupport,
+      disabledSupport,
+      dataSupport,
+      resolveSupport,
+      honorsChangeAnnotations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3077,11 +2955,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3154,11 +3028,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, codeActionKind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => codeActionKind.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3229,11 +3099,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(properties));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(properties);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3336,12 +3202,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(diagnostics));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(only));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(diagnostics), lspHashCode(only));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3406,11 +3267,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, reason.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => reason.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3594,13 +3451,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(codeActionKinds));
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(codeActionKinds), resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3780,15 +3632,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode => Object.hash(
+      textDocument, range, context, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -3932,14 +3777,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(codeActionKinds));
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(documentSelector),
+      lspHashCode(codeActionKinds), resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4003,11 +3842,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, href.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => href.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4108,13 +3943,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, command.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, command, data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4171,11 +4000,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4253,12 +4078,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4382,13 +4202,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4497,13 +4312,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector), resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4569,11 +4379,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, refreshSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => refreshSupport.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4715,14 +4521,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, red.hashCode);
-    hash = JenkinsSmiHash.combine(hash, green.hashCode);
-    hash = JenkinsSmiHash.combine(hash, blue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, alpha.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(red, green, blue, alpha);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4808,12 +4607,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, color.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, color);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -4933,13 +4727,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, textEdit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(additionalTextEdits));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(label, textEdit, lspHashCode(additionalTextEdits));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5118,15 +4907,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, color.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      textDocument, color, range, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5235,13 +5017,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, title.hashCode);
-    hash = JenkinsSmiHash.combine(hash, command.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(arguments));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(title, command, lspHashCode(arguments));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5376,14 +5152,8 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(
+      dynamicRegistration, completionItem, completionItemKind, contextSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5659,19 +5429,16 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, insertReplaceSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, resolveSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, insertTextModeSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      snippetSupport,
+      commitCharactersSupport,
+      lspHashCode(documentationFormat),
+      deprecatedSupport,
+      preselectSupport,
+      tagSupport,
+      insertReplaceSupport,
+      resolveSupport,
+      insertTextModeSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5744,11 +5511,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5821,11 +5584,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5896,11 +5655,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(properties));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(properties);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -5972,11 +5727,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -6062,12 +5813,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, triggerKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, triggerCharacter.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(triggerKind, triggerCharacter);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -6577,27 +6323,24 @@
   }
 
   @override
-  int get hashCode {
-    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);
-    hash = JenkinsSmiHash.combine(hash, preselect.hashCode);
-    hash = JenkinsSmiHash.combine(hash, sortText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, filterText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, insertText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, insertTextFormat.hashCode);
-    hash = JenkinsSmiHash.combine(hash, insertTextMode.hashCode);
-    hash = JenkinsSmiHash.combine(hash, textEdit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(additionalTextEdits));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(commitCharacters));
-    hash = JenkinsSmiHash.combine(hash, command.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      label,
+      kind,
+      lspHashCode(tags),
+      detail,
+      documentation,
+      deprecated,
+      preselect,
+      sortText,
+      filterText,
+      insertText,
+      insertTextFormat,
+      insertTextMode,
+      textEdit,
+      lspHashCode(additionalTextEdits),
+      lspHashCode(commitCharacters),
+      command,
+      data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -6768,12 +6511,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isIncomplete.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(items));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(isIncomplete, lspHashCode(items));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -6924,14 +6662,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode => Object.hash(lspHashCode(triggerCharacters),
+      lspHashCode(allCommitCharacters), resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7111,15 +6843,8 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      context, textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7299,15 +7024,12 @@
   }
 
   @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, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector),
+      lspHashCode(triggerCharacters),
+      lspHashCode(allCommitCharacters),
+      resolveProvider,
+      workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7421,12 +7143,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, scopeUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, section.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(scopeUri, section);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7494,11 +7211,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(items));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(items);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7638,14 +7351,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    hash = JenkinsSmiHash.combine(hash, annotationId.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(kind, uri, options, annotationId);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7723,12 +7429,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, overwrite.hashCode);
-    hash = JenkinsSmiHash.combine(hash, ignoreIfExists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(overwrite, ignoreIfExists);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7798,11 +7499,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(files));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(files);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7883,12 +7580,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, linkSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -7947,11 +7639,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8106,14 +7794,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8227,13 +7909,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(workDoneProgress, lspHashCode(documentSelector), id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8313,12 +7990,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, linkSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8376,11 +8048,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8535,14 +8203,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8629,12 +8291,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8774,14 +8432,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    hash = JenkinsSmiHash.combine(hash, annotationId.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(kind, uri, options, annotationId);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8859,12 +8510,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, recursive.hashCode);
-    hash = JenkinsSmiHash.combine(hash, ignoreIfNotExists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(recursive, ignoreIfNotExists);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -8934,11 +8580,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(files));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(files);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9200,19 +8842,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeDescription.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));
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      range,
+      severity,
+      code,
+      codeDescription,
+      source,
+      message,
+      lspHashCode(tags),
+      lspHashCode(relatedInformation),
+      data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9303,12 +8942,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(location, message);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9436,11 +9070,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9486,11 +9116,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, settings.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => settings.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9625,12 +9251,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(contentChanges));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, lspHashCode(contentChanges));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9693,11 +9314,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9766,11 +9383,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(changes));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(changes);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9843,11 +9456,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(watchers));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(watchers);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9912,11 +9521,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, event.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => event.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -9980,11 +9585,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => textDocument.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10048,11 +9649,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => textDocument.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10135,12 +9732,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, text.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, text);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10199,11 +9791,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10262,11 +9850,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10391,13 +9975,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10511,13 +10090,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), id, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10624,13 +10198,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, language.hashCode);
-    hash = JenkinsSmiHash.combine(hash, scheme.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(language, scheme, pattern);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10691,11 +10259,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10755,11 +10319,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10880,13 +10440,7 @@
   }
 
   @override
-  int get hashCode {
-    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);
-  }
+  int get hashCode => Object.hash(textDocument, options, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -10979,12 +10533,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11069,12 +10619,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, kind);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11135,11 +10680,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11231,11 +10772,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11391,14 +10928,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11491,12 +11022,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11616,14 +11143,7 @@
   }
 
   @override
-  int get hashCode {
-    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);
-  }
+  int get hashCode => Object.hash(range, target, tooltip, data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11705,12 +11225,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, tooltipSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, tooltipSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11789,12 +11304,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -11919,13 +11429,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12037,13 +11542,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector), resolveProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12104,11 +11604,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12204,12 +11700,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, firstTriggerCharacter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(moreTriggerCharacter));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(firstTriggerCharacter, lspHashCode(moreTriggerCharacter));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12360,14 +11852,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode => Object.hash(ch, options, textDocument, position);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12496,13 +11981,8 @@
   }
 
   @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));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(documentSelector),
+      firstTriggerCharacter, lspHashCode(moreTriggerCharacter));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12563,11 +12043,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12629,11 +12105,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12785,14 +12257,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode => Object.hash(textDocument, range, options, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -12885,12 +12350,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13143,18 +12604,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, detail.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tags));
-    hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(children));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(name, detail, kind, lspHashCode(tags),
+      deprecated, range, selectionRange, lspHashCode(children));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13323,16 +12774,8 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, tagSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, labelSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, symbolKind,
+      hierarchicalDocumentSymbolSupport, tagSupport, labelSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13404,11 +12847,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13479,11 +12918,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13564,12 +12999,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(label, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13694,13 +13124,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13814,13 +13239,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), label, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -13932,11 +13352,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14024,12 +13440,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(commands));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(commands), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14143,13 +13554,8 @@
   }
 
   @override
-  int get hashCode {
-    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);
-  }
+  int get hashCode =>
+      Object.hash(command, lspHashCode(arguments), workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14238,12 +13644,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(commands));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(commands), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14385,11 +13786,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => uri.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14453,11 +13850,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => uri.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14544,12 +13937,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, type);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14634,12 +14022,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, scheme.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(scheme, pattern);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14763,13 +14146,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, glob.hashCode);
-    hash = JenkinsSmiHash.combine(hash, matches.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(glob, matches, options);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14788,10 +14165,10 @@
   }
 
   /// The pattern matches a file only.
-  static const file = FileOperationPatternKind(r'file');
+  static const file = FileOperationPatternKind('file');
 
   /// The pattern matches a folder only.
-  static const folder = FileOperationPatternKind(r'folder');
+  static const folder = FileOperationPatternKind('folder');
 
   Object toJson() => _value;
 
@@ -14859,11 +14236,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, ignoreCase.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => ignoreCase.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -14936,11 +14309,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(filters));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(filters);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15028,12 +14397,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, oldUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newUri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(oldUri, newUri);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15126,12 +14490,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, globPattern.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(globPattern, kind);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15299,15 +14658,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startCharacter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endCharacter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(startLine, startCharacter, endLine, endCharacter, kind);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15415,13 +14767,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(dynamicRegistration, rangeLimit, lineFoldingOnly);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15439,13 +14786,13 @@
   }
 
   /// Folding range for a comment
-  static const Comment = FoldingRangeKind(r'comment');
+  static const Comment = FoldingRangeKind('comment');
 
   /// Folding range for a imports or includes
-  static const Imports = FoldingRangeKind(r'imports');
+  static const Imports = FoldingRangeKind('imports');
 
   /// Folding range for a region (e.g. `#region`)
-  static const Region = FoldingRangeKind(r'region');
+  static const Region = FoldingRangeKind('region');
 
   Object toJson() => _value;
 
@@ -15511,11 +14858,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15640,13 +14983,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15760,13 +15098,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -15926,15 +15259,8 @@
   }
 
   @override
-  int get hashCode {
-    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);
-  }
+  int get hashCode => Object.hash(tabSize, insertSpaces, trimTrailingWhitespace,
+      insertFinalNewline, trimFinalNewlines);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16024,12 +15350,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, contents.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(contents, range);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16116,12 +15437,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(contentFormat));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(dynamicRegistration, lspHashCode(contentFormat));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16179,11 +15496,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16303,13 +15616,7 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(textDocument, position, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16395,12 +15702,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16483,12 +15786,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, linkSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16547,11 +15845,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16707,14 +16001,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -16828,13 +16116,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17120,20 +16403,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, processId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, clientInfo.hashCode);
-    hash = JenkinsSmiHash.combine(hash, locale.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);
-  }
+  int get hashCode => Object.hash(
+      processId,
+      clientInfo,
+      locale,
+      rootPath,
+      rootUri,
+      initializationOptions,
+      capabilities,
+      trace,
+      lspHashCode(workspaceFolders),
+      workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17214,12 +16494,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(name, version);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17307,12 +16582,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, capabilities.hashCode);
-    hash = JenkinsSmiHash.combine(hash, serverInfo.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(capabilities, serverInfo);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17393,12 +16663,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(name, version);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17435,10 +16700,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 42;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17555,13 +16817,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, insert.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(newText, insert, replace);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17701,11 +16957,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17765,11 +17017,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -17890,13 +17138,7 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(textDocument, position, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18012,13 +17254,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18108,12 +17345,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(ranges));
-    hash = JenkinsSmiHash.combine(hash, wordPattern.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(ranges), wordPattern);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18196,12 +17428,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, range);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18353,14 +17580,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, originSelectionRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targetUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targetRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targetSelectionRange.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      originSelectionRange, targetUri, targetRange, targetSelectionRange);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18446,12 +17667,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(type, message);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18532,12 +17748,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, verbose.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(message, verbose);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18620,12 +17831,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, parser.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(parser, version);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18732,12 +17938,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(kind, value);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18756,18 +17957,18 @@
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     switch (obj) {
-      case r'plaintext':
-      case r'markdown':
+      case 'plaintext':
+      case 'markdown':
         return true;
     }
     return false;
   }
 
   /// Plain text is supported as a content format
-  static const PlainText = MarkupKind._(r'plaintext');
+  static const PlainText = MarkupKind._('plaintext');
 
   /// Markdown is supported as a content format
-  static const Markdown = MarkupKind._(r'markdown');
+  static const Markdown = MarkupKind._('markdown');
 
   Object toJson() => _value;
 
@@ -18843,11 +18044,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => jsonrpc.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18909,11 +18106,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, title.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => title.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -18970,16 +18163,16 @@
   static const progress = Method(r'$/progress');
 
   /// Constant for the 'initialize' method.
-  static const initialize = Method(r'initialize');
+  static const initialize = Method('initialize');
 
   /// Constant for the 'initialized' method.
-  static const initialized = Method(r'initialized');
+  static const initialized = Method('initialized');
 
   /// Constant for the 'shutdown' method.
-  static const shutdown = Method(r'shutdown');
+  static const shutdown = Method('shutdown');
 
   /// Constant for the 'exit' method.
-  static const exit = Method(r'exit');
+  static const exit = Method('exit');
 
   /// Constant for the '$/logTrace' method.
   static const logTrace = Method(r'$/logTrace');
@@ -18988,231 +18181,231 @@
   static const setTrace = Method(r'$/setTrace');
 
   /// Constant for the 'window/showMessage' method.
-  static const window_showMessage = Method(r'window/showMessage');
+  static const window_showMessage = Method('window/showMessage');
 
   /// Constant for the 'window/showMessageRequest' method.
-  static const window_showMessageRequest = Method(r'window/showMessageRequest');
+  static const window_showMessageRequest = Method('window/showMessageRequest');
 
   /// Constant for the 'window/showDocument' method.
-  static const window_showDocument = Method(r'window/showDocument');
+  static const window_showDocument = Method('window/showDocument');
 
   /// Constant for the 'window/logMessage' method.
-  static const window_logMessage = Method(r'window/logMessage');
+  static const window_logMessage = Method('window/logMessage');
 
   /// Constant for the 'window/workDoneProgress/create' method.
   static const window_workDoneProgress_create =
-      Method(r'window/workDoneProgress/create');
+      Method('window/workDoneProgress/create');
 
   /// Constant for the 'window/workDoneProgress/cancel' method.
   static const window_workDoneProgress_cancel =
-      Method(r'window/workDoneProgress/cancel');
+      Method('window/workDoneProgress/cancel');
 
   /// Constant for the 'telemetry/event' method.
-  static const telemetry_event = Method(r'telemetry/event');
+  static const telemetry_event = Method('telemetry/event');
 
   /// Constant for the 'client/registerCapability' method.
-  static const client_registerCapability = Method(r'client/registerCapability');
+  static const client_registerCapability = Method('client/registerCapability');
 
   /// Constant for the 'client/unregisterCapability' method.
   static const client_unregisterCapability =
-      Method(r'client/unregisterCapability');
+      Method('client/unregisterCapability');
 
   /// Constant for the 'workspace/workspaceFolders' method.
   static const workspace_workspaceFolders =
-      Method(r'workspace/workspaceFolders');
+      Method('workspace/workspaceFolders');
 
   /// Constant for the 'workspace/didChangeWorkspaceFolders' method.
   static const workspace_didChangeWorkspaceFolders =
-      Method(r'workspace/didChangeWorkspaceFolders');
+      Method('workspace/didChangeWorkspaceFolders');
 
   /// Constant for the 'workspace/didChangeConfiguration' method.
   static const workspace_didChangeConfiguration =
-      Method(r'workspace/didChangeConfiguration');
+      Method('workspace/didChangeConfiguration');
 
   /// Constant for the 'workspace/configuration' method.
-  static const workspace_configuration = Method(r'workspace/configuration');
+  static const workspace_configuration = Method('workspace/configuration');
 
   /// Constant for the 'workspace/didChangeWatchedFiles' method.
   static const workspace_didChangeWatchedFiles =
-      Method(r'workspace/didChangeWatchedFiles');
+      Method('workspace/didChangeWatchedFiles');
 
   /// Constant for the 'workspace/symbol' method.
-  static const workspace_symbol = Method(r'workspace/symbol');
+  static const workspace_symbol = Method('workspace/symbol');
 
   /// Constant for the 'workspace/executeCommand' method.
-  static const workspace_executeCommand = Method(r'workspace/executeCommand');
+  static const workspace_executeCommand = Method('workspace/executeCommand');
 
   /// Constant for the 'workspace/applyEdit' method.
-  static const workspace_applyEdit = Method(r'workspace/applyEdit');
+  static const workspace_applyEdit = Method('workspace/applyEdit');
 
   /// Constant for the 'workspace/willCreateFiles' method.
-  static const workspace_willCreateFiles = Method(r'workspace/willCreateFiles');
+  static const workspace_willCreateFiles = Method('workspace/willCreateFiles');
 
   /// Constant for the 'workspace/didCreateFiles' method.
-  static const workspace_didCreateFiles = Method(r'workspace/didCreateFiles');
+  static const workspace_didCreateFiles = Method('workspace/didCreateFiles');
 
   /// Constant for the 'workspace/willRenameFiles' method.
-  static const workspace_willRenameFiles = Method(r'workspace/willRenameFiles');
+  static const workspace_willRenameFiles = Method('workspace/willRenameFiles');
 
   /// Constant for the 'workspace/didRenameFiles' method.
-  static const workspace_didRenameFiles = Method(r'workspace/didRenameFiles');
+  static const workspace_didRenameFiles = Method('workspace/didRenameFiles');
 
   /// Constant for the 'workspace/willDeleteFiles' method.
-  static const workspace_willDeleteFiles = Method(r'workspace/willDeleteFiles');
+  static const workspace_willDeleteFiles = Method('workspace/willDeleteFiles');
 
   /// Constant for the 'workspace/didDeleteFiles' method.
-  static const workspace_didDeleteFiles = Method(r'workspace/didDeleteFiles');
+  static const workspace_didDeleteFiles = Method('workspace/didDeleteFiles');
 
   /// Constant for the 'textDocument/didOpen' method.
-  static const textDocument_didOpen = Method(r'textDocument/didOpen');
+  static const textDocument_didOpen = Method('textDocument/didOpen');
 
   /// Constant for the 'textDocument/didChange' method.
-  static const textDocument_didChange = Method(r'textDocument/didChange');
+  static const textDocument_didChange = Method('textDocument/didChange');
 
   /// Constant for the 'textDocument/willSave' method.
-  static const textDocument_willSave = Method(r'textDocument/willSave');
+  static const textDocument_willSave = Method('textDocument/willSave');
 
   /// Constant for the 'textDocument/willSaveWaitUntil' method.
   static const textDocument_willSaveWaitUntil =
-      Method(r'textDocument/willSaveWaitUntil');
+      Method('textDocument/willSaveWaitUntil');
 
   /// Constant for the 'textDocument/didSave' method.
-  static const textDocument_didSave = Method(r'textDocument/didSave');
+  static const textDocument_didSave = Method('textDocument/didSave');
 
   /// Constant for the 'textDocument/didClose' method.
-  static const textDocument_didClose = Method(r'textDocument/didClose');
+  static const textDocument_didClose = Method('textDocument/didClose');
 
   /// Constant for the 'textDocument/publishDiagnostics' method.
   static const textDocument_publishDiagnostics =
-      Method(r'textDocument/publishDiagnostics');
+      Method('textDocument/publishDiagnostics');
 
   /// Constant for the 'textDocument/completion' method.
-  static const textDocument_completion = Method(r'textDocument/completion');
+  static const textDocument_completion = Method('textDocument/completion');
 
   /// Constant for the 'completionItem/resolve' method.
-  static const completionItem_resolve = Method(r'completionItem/resolve');
+  static const completionItem_resolve = Method('completionItem/resolve');
 
   /// Constant for the 'textDocument/hover' method.
-  static const textDocument_hover = Method(r'textDocument/hover');
+  static const textDocument_hover = Method('textDocument/hover');
 
   /// Constant for the 'textDocument/signatureHelp' method.
   static const textDocument_signatureHelp =
-      Method(r'textDocument/signatureHelp');
+      Method('textDocument/signatureHelp');
 
   /// Constant for the 'textDocument/declaration' method.
-  static const textDocument_declaration = Method(r'textDocument/declaration');
+  static const textDocument_declaration = Method('textDocument/declaration');
 
   /// Constant for the 'textDocument/definition' method.
-  static const textDocument_definition = Method(r'textDocument/definition');
+  static const textDocument_definition = Method('textDocument/definition');
 
   /// Constant for the 'textDocument/typeDefinition' method.
   static const textDocument_typeDefinition =
-      Method(r'textDocument/typeDefinition');
+      Method('textDocument/typeDefinition');
 
   /// Constant for the 'textDocument/implementation' method.
   static const textDocument_implementation =
-      Method(r'textDocument/implementation');
+      Method('textDocument/implementation');
 
   /// Constant for the 'textDocument/references' method.
-  static const textDocument_references = Method(r'textDocument/references');
+  static const textDocument_references = Method('textDocument/references');
 
   /// Constant for the 'textDocument/documentHighlight' method.
   static const textDocument_documentHighlight =
-      Method(r'textDocument/documentHighlight');
+      Method('textDocument/documentHighlight');
 
   /// Constant for the 'textDocument/documentSymbol' method.
   static const textDocument_documentSymbol =
-      Method(r'textDocument/documentSymbol');
+      Method('textDocument/documentSymbol');
 
   /// Constant for the 'textDocument/codeAction' method.
-  static const textDocument_codeAction = Method(r'textDocument/codeAction');
+  static const textDocument_codeAction = Method('textDocument/codeAction');
 
   /// Constant for the 'codeAction/resolve' method.
-  static const codeAction_resolve = Method(r'codeAction/resolve');
+  static const codeAction_resolve = Method('codeAction/resolve');
 
   /// Constant for the 'textDocument/codeLens' method.
-  static const textDocument_codeLens = Method(r'textDocument/codeLens');
+  static const textDocument_codeLens = Method('textDocument/codeLens');
 
   /// Constant for the 'codeLens/resolve' method.
-  static const codeLens_resolve = Method(r'codeLens/resolve');
+  static const codeLens_resolve = Method('codeLens/resolve');
 
   /// Constant for the 'workspace/codeLens/refresh' method.
   static const workspace_codeLens_refresh =
-      Method(r'workspace/codeLens/refresh');
+      Method('workspace/codeLens/refresh');
 
   /// Constant for the 'textDocument/documentLink' method.
-  static const textDocument_documentLink = Method(r'textDocument/documentLink');
+  static const textDocument_documentLink = Method('textDocument/documentLink');
 
   /// Constant for the 'documentLink/resolve' method.
-  static const documentLink_resolve = Method(r'documentLink/resolve');
+  static const documentLink_resolve = Method('documentLink/resolve');
 
   /// Constant for the 'textDocument/documentColor' method.
   static const textDocument_documentColor =
-      Method(r'textDocument/documentColor');
+      Method('textDocument/documentColor');
 
   /// Constant for the 'textDocument/colorPresentation' method.
   static const textDocument_colorPresentation =
-      Method(r'textDocument/colorPresentation');
+      Method('textDocument/colorPresentation');
 
   /// Constant for the 'textDocument/formatting' method.
-  static const textDocument_formatting = Method(r'textDocument/formatting');
+  static const textDocument_formatting = Method('textDocument/formatting');
 
   /// Constant for the 'textDocument/rangeFormatting' method.
   static const textDocument_rangeFormatting =
-      Method(r'textDocument/rangeFormatting');
+      Method('textDocument/rangeFormatting');
 
   /// Constant for the 'textDocument/onTypeFormatting' method.
   static const textDocument_onTypeFormatting =
-      Method(r'textDocument/onTypeFormatting');
+      Method('textDocument/onTypeFormatting');
 
   /// Constant for the 'textDocument/rename' method.
-  static const textDocument_rename = Method(r'textDocument/rename');
+  static const textDocument_rename = Method('textDocument/rename');
 
   /// Constant for the 'textDocument/prepareRename' method.
   static const textDocument_prepareRename =
-      Method(r'textDocument/prepareRename');
+      Method('textDocument/prepareRename');
 
   /// Constant for the 'textDocument/foldingRange' method.
-  static const textDocument_foldingRange = Method(r'textDocument/foldingRange');
+  static const textDocument_foldingRange = Method('textDocument/foldingRange');
 
   /// Constant for the 'textDocument/selectionRange' method.
   static const textDocument_selectionRange =
-      Method(r'textDocument/selectionRange');
+      Method('textDocument/selectionRange');
 
   /// Constant for the 'textDocument/prepareCallHierarchy' method.
   static const textDocument_prepareCallHierarchy =
-      Method(r'textDocument/prepareCallHierarchy');
+      Method('textDocument/prepareCallHierarchy');
 
   /// Constant for the 'callHierarchy/incomingCalls' method.
   static const callHierarchy_incomingCalls =
-      Method(r'callHierarchy/incomingCalls');
+      Method('callHierarchy/incomingCalls');
 
   /// Constant for the 'callHierarchy/outgoingCalls' method.
   static const callHierarchy_outgoingCalls =
-      Method(r'callHierarchy/outgoingCalls');
+      Method('callHierarchy/outgoingCalls');
 
   /// Constant for the 'textDocument/semanticTokens/full' method.
   static const textDocument_semanticTokens_full =
-      Method(r'textDocument/semanticTokens/full');
+      Method('textDocument/semanticTokens/full');
 
   /// Constant for the 'textDocument/semanticTokens/full/delta' method.
   static const textDocument_semanticTokens_full_delta =
-      Method(r'textDocument/semanticTokens/full/delta');
+      Method('textDocument/semanticTokens/full/delta');
 
   /// Constant for the 'textDocument/semanticTokens/range' method.
   static const textDocument_semanticTokens_range =
-      Method(r'textDocument/semanticTokens/range');
+      Method('textDocument/semanticTokens/range');
 
   /// Constant for the 'workspace/semanticTokens/refresh' method.
   static const workspace_semanticTokens_refresh =
-      Method(r'workspace/semanticTokens/refresh');
+      Method('workspace/semanticTokens/refresh');
 
   /// Constant for the 'textDocument/linkedEditingRange' method.
   static const textDocument_linkedEditingRange =
-      Method(r'textDocument/linkedEditingRange');
+      Method('textDocument/linkedEditingRange');
 
   /// Constant for the 'textDocument/moniker' method.
-  static const textDocument_moniker = Method(r'textDocument/moniker');
+  static const textDocument_moniker = Method('textDocument/moniker');
 
   Object toJson() => _value;
 
@@ -19358,14 +18551,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, scheme.hashCode);
-    hash = JenkinsSmiHash.combine(hash, identifier.hashCode);
-    hash = JenkinsSmiHash.combine(hash, unique.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(scheme, identifier, unique, kind);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19425,11 +18611,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19447,14 +18629,14 @@
   }
 
   /// The moniker represent a symbol that is imported into a project
-  static const import = MonikerKind(r'import');
+  static const import = MonikerKind('import');
 
   /// The moniker represents a symbol that is exported from a project
-  static const export = MonikerKind(r'export');
+  static const export = MonikerKind('export');
 
   /// The moniker represents a symbol that is local to a project (e.g. a local
   /// variable of a function, a class not visible outside the project, ...)
-  static const local = MonikerKind(r'local');
+  static const local = MonikerKind('local');
 
   Object toJson() => _value;
 
@@ -19519,11 +18701,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19678,14 +18856,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19771,12 +18943,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19875,13 +19043,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, method.hashCode);
-    hash = JenkinsSmiHash.combine(hash, params.hashCode);
-    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(method, params, jsonrpc);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -19976,12 +19138,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(version, uri);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20086,12 +19243,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(label, documentation);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20222,11 +19374,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => partialResultToken.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20317,12 +19465,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, line.hashCode);
-    hash = JenkinsSmiHash.combine(hash, character.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(line, character);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20412,12 +19555,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, position.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, position);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20515,12 +19653,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, token.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(token, value);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20682,15 +19815,8 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, codeDescriptionSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dataSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(relatedInformation, tagSupport,
+      versionSupport, codeDescriptionSupport, dataSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20762,11 +19888,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20883,13 +20005,7 @@
   }
 
   @override
-  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);
-  }
+  int get hashCode => Object.hash(uri, version, lspHashCode(diagnostics));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -20974,12 +20090,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, start.hashCode);
-    hash = JenkinsSmiHash.combine(hash, end.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(start, end);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21063,12 +20174,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, placeholder.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, placeholder);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21127,11 +20233,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21193,11 +20295,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, includeDeclaration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => includeDeclaration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21255,11 +20353,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21441,15 +20535,8 @@
   }
 
   @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);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      context, textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21536,12 +20623,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21641,13 +20724,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, method.hashCode);
-    hash = JenkinsSmiHash.combine(hash, registerOptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(id, method, registerOptions);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21716,11 +20793,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(registrations));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(registrations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21806,12 +20879,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, engine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(engine, version);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -21955,14 +21023,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, prepareSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, prepareSupportDefaultBehavior.hashCode);
-    hash = JenkinsSmiHash.combine(hash, honorsChangeAnnotations.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, prepareSupport,
+      prepareSupportDefaultBehavior, honorsChangeAnnotations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22132,15 +21194,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, oldUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    hash = JenkinsSmiHash.combine(hash, annotationId.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(kind, oldUri, newUri, options, annotationId);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22218,12 +21272,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, overwrite.hashCode);
-    hash = JenkinsSmiHash.combine(hash, ignoreIfExists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(overwrite, ignoreIfExists);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22294,11 +21343,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(files));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(files);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22376,12 +21421,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(prepareProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22531,14 +21571,8 @@
   }
 
   @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, workDoneToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(newName, textDocument, position, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22646,13 +21680,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector), prepareProvider, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22781,14 +21810,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, method.hashCode);
-    hash = JenkinsSmiHash.combine(hash, params.hashCode);
-    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(id, method, params, jsonrpc);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -22933,13 +21955,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(code, message, data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23060,14 +22076,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, result.hashCode);
-    hash = JenkinsSmiHash.combine(hash, error.hashCode);
-    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(id, result, error, jsonrpc);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23123,11 +22132,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, includeText.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => includeText.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23210,12 +22215,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parent.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, parent);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23277,11 +22277,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => dynamicRegistration.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23340,11 +22336,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23500,14 +22492,8 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(
+      textDocument, lspHashCode(positions), workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23621,13 +22607,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(workDoneProgress, lspHashCode(documentSelector), id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -23643,16 +22624,16 @@
     return obj is String;
   }
 
-  static const declaration = SemanticTokenModifiers(r'declaration');
-  static const definition = SemanticTokenModifiers(r'definition');
-  static const readonly = SemanticTokenModifiers(r'readonly');
-  static const static = SemanticTokenModifiers(r'static');
-  static const deprecated = SemanticTokenModifiers(r'deprecated');
-  static const abstract = SemanticTokenModifiers(r'abstract');
-  static const async = SemanticTokenModifiers(r'async');
-  static const modification = SemanticTokenModifiers(r'modification');
-  static const documentation = SemanticTokenModifiers(r'documentation');
-  static const defaultLibrary = SemanticTokenModifiers(r'defaultLibrary');
+  static const declaration = SemanticTokenModifiers('declaration');
+  static const definition = SemanticTokenModifiers('definition');
+  static const readonly = SemanticTokenModifiers('readonly');
+  static const static = SemanticTokenModifiers('static');
+  static const deprecated = SemanticTokenModifiers('deprecated');
+  static const abstract = SemanticTokenModifiers('abstract');
+  static const async = SemanticTokenModifiers('async');
+  static const modification = SemanticTokenModifiers('modification');
+  static const documentation = SemanticTokenModifiers('documentation');
+  static const defaultLibrary = SemanticTokenModifiers('defaultLibrary');
 
   Object toJson() => _value;
 
@@ -23676,31 +22657,31 @@
     return obj is String;
   }
 
-  static const namespace = SemanticTokenTypes(r'namespace');
+  static const namespace = SemanticTokenTypes('namespace');
 
   /// Represents a generic type. Acts as a fallback for types which can't be
   /// mapped to a specific type like class or enum.
-  static const type = SemanticTokenTypes(r'type');
-  static const class_ = SemanticTokenTypes(r'class');
-  static const enum_ = SemanticTokenTypes(r'enum');
-  static const interface = SemanticTokenTypes(r'interface');
-  static const struct = SemanticTokenTypes(r'struct');
-  static const typeParameter = SemanticTokenTypes(r'typeParameter');
-  static const parameter = SemanticTokenTypes(r'parameter');
-  static const variable = SemanticTokenTypes(r'variable');
-  static const property = SemanticTokenTypes(r'property');
-  static const enumMember = SemanticTokenTypes(r'enumMember');
-  static const event = SemanticTokenTypes(r'event');
-  static const function = SemanticTokenTypes(r'function');
-  static const method = SemanticTokenTypes(r'method');
-  static const macro = SemanticTokenTypes(r'macro');
-  static const keyword = SemanticTokenTypes(r'keyword');
-  static const modifier = SemanticTokenTypes(r'modifier');
-  static const comment = SemanticTokenTypes(r'comment');
-  static const string = SemanticTokenTypes(r'string');
-  static const number = SemanticTokenTypes(r'number');
-  static const regexp = SemanticTokenTypes(r'regexp');
-  static const operator = SemanticTokenTypes(r'operator');
+  static const type = SemanticTokenTypes('type');
+  static const class_ = SemanticTokenTypes('class');
+  static const enum_ = SemanticTokenTypes('enum');
+  static const interface = SemanticTokenTypes('interface');
+  static const struct = SemanticTokenTypes('struct');
+  static const typeParameter = SemanticTokenTypes('typeParameter');
+  static const parameter = SemanticTokenTypes('parameter');
+  static const variable = SemanticTokenTypes('variable');
+  static const property = SemanticTokenTypes('property');
+  static const enumMember = SemanticTokenTypes('enumMember');
+  static const event = SemanticTokenTypes('event');
+  static const function = SemanticTokenTypes('function');
+  static const method = SemanticTokenTypes('method');
+  static const macro = SemanticTokenTypes('macro');
+  static const keyword = SemanticTokenTypes('keyword');
+  static const modifier = SemanticTokenTypes('modifier');
+  static const comment = SemanticTokenTypes('comment');
+  static const string = SemanticTokenTypes('string');
+  static const number = SemanticTokenTypes('number');
+  static const regexp = SemanticTokenTypes('regexp');
+  static const operator = SemanticTokenTypes('operator');
 
   Object toJson() => _value;
 
@@ -23793,12 +22774,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resultId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(data));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(resultId, lspHashCode(data));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24035,17 +23011,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, requests.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tokenTypes));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tokenModifiers));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(formats));
-    hash = JenkinsSmiHash.combine(hash, overlappingTokenSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, multilineTokenSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      dynamicRegistration,
+      requests,
+      lspHashCode(tokenTypes),
+      lspHashCode(tokenModifiers),
+      lspHashCode(formats),
+      overlappingTokenSupport,
+      multilineTokenSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24106,11 +23079,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, delta.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => delta.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24151,10 +23120,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 42;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24260,12 +23226,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, full.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, full);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24352,12 +23313,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resultId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(edits));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(resultId, lspHashCode(edits));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24510,14 +23466,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, previousResultId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      textDocument, previousResultId, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24587,11 +23537,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(edits));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(edits);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24703,13 +23649,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, start.hashCode);
-    hash = JenkinsSmiHash.combine(hash, deleteCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(data));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(start, deleteCount, lspHashCode(data));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24808,12 +23748,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tokenTypes));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tokenModifiers));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(tokenTypes), lspHashCode(tokenModifiers));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -24965,14 +23901,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, legend.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, full.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(legend, range, full, workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25029,11 +23958,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, delta.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => delta.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25071,10 +23996,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 42;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25199,13 +24121,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25269,11 +24186,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(data));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(data);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25425,14 +24338,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, range, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25642,16 +24549,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    hash = JenkinsSmiHash.combine(hash, legend.hashCode);
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, full.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector), legend, range, full, workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -25718,11 +24617,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, refreshSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => refreshSupport.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -26768,41 +25663,37 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocumentSync.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, 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, foldingRangeProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, executeCommandProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionRangeProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkedEditingRangeProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, callHierarchyProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, semanticTokensProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, monikerProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workspaceSymbolProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workspace.hashCode);
-    hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hashAll([
+        textDocumentSync,
+        completionProvider,
+        hoverProvider,
+        signatureHelpProvider,
+        declarationProvider,
+        definitionProvider,
+        typeDefinitionProvider,
+        implementationProvider,
+        referencesProvider,
+        documentHighlightProvider,
+        documentSymbolProvider,
+        codeActionProvider,
+        codeLensProvider,
+        documentLinkProvider,
+        colorProvider,
+        documentFormattingProvider,
+        documentRangeFormattingProvider,
+        documentOnTypeFormattingProvider,
+        renameProvider,
+        foldingRangeProvider,
+        executeCommandProvider,
+        selectionRangeProvider,
+        linkedEditingRangeProvider,
+        callHierarchyProvider,
+        semanticTokensProvider,
+        monikerProvider,
+        workspaceSymbolProvider,
+        workspace,
+        experimental
+      ]);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27001,16 +25892,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, didCreate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willCreate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didRename.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willRename.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didDelete.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willDelete.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      didCreate, willCreate, didRename, willRename, didDelete, willDelete);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27103,12 +25986,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileOperations.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(workspaceFolders, fileOperations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27172,11 +26050,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => value.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27242,11 +26116,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, support.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => support.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27382,14 +26252,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, external.hashCode);
-    hash = JenkinsSmiHash.combine(hash, takeFocus.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selection.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, external, takeFocus, selection);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27454,11 +26317,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, success.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => success.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27544,12 +26403,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(type, message);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27618,11 +26472,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, messageActionItem.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => messageActionItem.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27690,11 +26540,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, additionalPropertiesSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => additionalPropertiesSupport.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27811,13 +26657,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(actions));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(type, message, lspHashCode(actions));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -27944,13 +26784,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(signatures));
-    hash = JenkinsSmiHash.combine(hash, activeSignature.hashCode);
-    hash = JenkinsSmiHash.combine(hash, activeParameter.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(signatures), activeSignature, activeParameter);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28065,13 +26900,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(dynamicRegistration, signatureInformation, contextSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28137,11 +26967,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, labelOffsetSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => labelOffsetSupport.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28266,13 +27092,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentationFormat));
-    hash = JenkinsSmiHash.combine(hash, parameterInformation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, activeParameterSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(documentationFormat),
+      parameterInformation, activeParameterSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28425,14 +27246,8 @@
   }
 
   @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);
-  }
+  int get hashCode => Object.hash(
+      triggerKind, triggerCharacter, isRetrigger, activeSignatureHelp);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28549,13 +27364,8 @@
   }
 
   @override
-  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);
-  }
+  int get hashCode => Object.hash(lspHashCode(triggerCharacters),
+      lspHashCode(retriggerCharacters), workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28705,14 +27515,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(context, textDocument, position, workDoneToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -28861,14 +27665,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(retriggerCharacters));
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(documentSelector),
+      lspHashCode(triggerCharacters),
+      lspHashCode(retriggerCharacters),
+      workDoneProgress);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -29055,14 +27856,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(parameters));
-    hash = JenkinsSmiHash.combine(hash, activeParameter.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      label, documentation, lspHashCode(parameters), activeParameter);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -29149,11 +27944,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -29354,16 +28145,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(tags));
-    hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containerName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      name, kind, lspHashCode(tags), deprecated, location, containerName);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -29539,12 +28322,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, syncKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(syncKind, lspHashCode(documentSelector));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30278,36 +29056,34 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, synchronization.hashCode);
-    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hover.hashCode);
-    hash = JenkinsSmiHash.combine(hash, signatureHelp.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);
-    hash = JenkinsSmiHash.combine(hash, linkedEditingRange.hashCode);
-    hash = JenkinsSmiHash.combine(hash, callHierarchy.hashCode);
-    hash = JenkinsSmiHash.combine(hash, semanticTokens.hashCode);
-    hash = JenkinsSmiHash.combine(hash, moniker.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hashAll([
+        synchronization,
+        completion,
+        hover,
+        signatureHelp,
+        declaration,
+        definition,
+        typeDefinition,
+        implementation,
+        references,
+        documentHighlight,
+        documentSymbol,
+        codeAction,
+        codeLens,
+        documentLink,
+        colorProvider,
+        formatting,
+        rangeFormatting,
+        onTypeFormatting,
+        rename,
+        publishDiagnostics,
+        foldingRange,
+        selectionRange,
+        linkedEditingRange,
+        callHierarchy,
+        semanticTokens,
+        moniker
+      ]);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30419,13 +29195,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, rangeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, text.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, rangeLength, text);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30489,11 +29259,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, text.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => text.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30607,12 +29373,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(edits));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, lspHashCode(edits));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30682,11 +29443,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => uri.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30830,14 +29587,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, languageId.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, text.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, languageId, version, text);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -30974,12 +29724,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, position.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, position);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31133,11 +29878,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(documentSelector);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31262,12 +30003,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, includeText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(includeText, lspHashCode(documentSelector));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31395,14 +30131,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(dynamicRegistration, willSave, willSaveWaitUntil, didSave);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31597,15 +30327,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, openClose.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willSave.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willSaveWaitUntil.hashCode);
-    hash = JenkinsSmiHash.combine(hash, save.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode =>
+      Object.hash(openClose, change, willSave, willSaveWaitUntil, save);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31698,12 +30421,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newText.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(range, newText);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31719,7 +30437,7 @@
     return obj is String;
   }
 
-  static const Relative = TokenFormat(r'relative');
+  static const Relative = TokenFormat('relative');
 
   Object toJson() => _value;
 
@@ -31809,12 +30527,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, linkSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -31873,11 +30586,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32033,14 +30742,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(textDocument, position, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32154,13 +30857,8 @@
   }
 
   @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);
-  }
+  int get hashCode =>
+      Object.hash(lspHashCode(documentSelector), workDoneProgress, id);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32178,19 +30876,19 @@
   }
 
   /// The moniker is only unique inside a document
-  static const document = UniquenessLevel(r'document');
+  static const document = UniquenessLevel('document');
 
   /// The moniker is unique inside a project for which a dump got created
-  static const project = UniquenessLevel(r'project');
+  static const project = UniquenessLevel('project');
 
   /// The moniker is unique inside the group to which a project belongs
-  static const group = UniquenessLevel(r'group');
+  static const group = UniquenessLevel('group');
 
   /// The moniker is unique inside the moniker scheme.
-  static const scheme = UniquenessLevel(r'scheme');
+  static const scheme = UniquenessLevel('scheme');
 
   /// The moniker is globally unique
-  static const global = UniquenessLevel(r'global');
+  static const global = UniquenessLevel('global');
 
   Object toJson() => _value;
 
@@ -32285,12 +30983,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, method.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(id, method);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32362,11 +31055,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(unregisterations));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(unregisterations);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32458,12 +31147,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(version, uri);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32586,12 +31270,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, reason.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(textDocument, reason);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32763,15 +31442,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode =>
+      Object.hash(kind, title, cancellable, message, percentage);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32839,11 +31511,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, token.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => token.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -32911,11 +31579,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, token.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => token.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33000,12 +31664,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(kind, message);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33136,11 +31795,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33297,11 +31952,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneToken.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33443,14 +32094,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    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);
-  }
+  int get hashCode => Object.hash(kind, cancellable, message, percentage);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33618,13 +32262,8 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(changes));
-    hash = JenkinsSmiHash.combine(hash, documentChanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(changeAnnotations));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      lspHashCode(changes), documentChanges, lspHashCode(changeAnnotations));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33795,15 +32434,12 @@
   }
 
   @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, normalizesLineEndings.hashCode);
-    hash = JenkinsSmiHash.combine(hash, changeAnnotationSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+      documentChanges,
+      lspHashCode(resourceOperations),
+      failureHandling,
+      normalizesLineEndings,
+      changeAnnotationSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33868,11 +32504,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, groupsOnLabel.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => groupsOnLabel.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -33959,12 +32591,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(uri, name);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34065,12 +32692,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(added));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(removed));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(lspHashCode(added), lspHashCode(removed));
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34164,12 +32786,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, supported.hashCode);
-    hash = JenkinsSmiHash.combine(hash, changeNotifications.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(supported, changeNotifications);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34285,13 +32902,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, tagSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(dynamicRegistration, symbolKind, tagSupport);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34363,11 +32974,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34438,11 +33045,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => lspHashCode(valueSet);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34502,11 +33105,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34630,13 +33229,7 @@
   }
 
   @override
-  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);
-  }
+  int get hashCode => Object.hash(query, workDoneToken, partialResultToken);
 
   @override
   String toString() => jsonEncoder.convert(toJson());
@@ -34697,11 +33290,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => workDoneProgress.hashCode;
 
   @override
   String toString() => jsonEncoder.convert(toJson());
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
index 8f88db8..65c9513 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
@@ -7,7 +7,6 @@
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/src/lsp/json_parsing.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 const jsonRpcVersion = '2.0';
 
@@ -36,20 +35,15 @@
 /// Returns an objects hash code, recursively combining hashes for items in
 /// Maps/Lists.
 int lspHashCode(dynamic obj) {
-  var hash = 0;
   if (obj is List) {
-    for (var element in obj) {
-      hash = JenkinsSmiHash.combine(hash, lspHashCode(element));
-    }
+    return Object.hashAll(obj.map(lspHashCode));
   } else if (obj is Map) {
-    for (var key in obj.keys) {
-      hash = JenkinsSmiHash.combine(hash, lspHashCode(key));
-      hash = JenkinsSmiHash.combine(hash, lspHashCode(obj[key]));
-    }
+    return Object.hashAll(obj.entries
+        .expand((element) => [element.key, element.value])
+        .map(lspHashCode));
   } else {
-    hash = obj.hashCode;
+    return obj.hashCode;
   }
-  return JenkinsSmiHash.finish(hash);
 }
 
 Object? specToJson(Object? obj) {
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index dcb4e02..301bfab 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -8,7 +8,6 @@
 
 import 'dart:convert' hide JsonDecoder;
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -74,11 +73,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, directories.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => directories.hashCode;
 }
 
 /// analysis.closingLabels params
@@ -164,12 +159,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, labels.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        labels,
+      );
 }
 
 /// AnalysisErrorFixes
@@ -240,12 +233,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, error.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        error,
+        fixes,
+      );
 }
 
 /// analysis.errors params
@@ -323,12 +314,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        errors,
+      );
 }
 
 /// analysis.flushResults params
@@ -391,11 +380,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.folding params
@@ -473,12 +458,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.getErrors params
@@ -539,11 +522,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// analysis.getErrors result
@@ -612,11 +591,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => errors.hashCode;
 }
 
 /// analysis.getHover params
@@ -688,12 +663,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// analysis.getHover result
@@ -766,11 +739,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, hovers.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => hovers.hashCode;
 }
 
 /// analysis.getImportedElements params
@@ -856,13 +825,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// analysis.getImportedElements result
@@ -933,11 +900,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => elements.hashCode;
 }
 
 /// analysis.getLibraryDependencies params
@@ -961,9 +924,7 @@
   }
 
   @override
-  int get hashCode {
-    return 246577680;
-  }
+  int get hashCode => 246577680;
 }
 
 /// analysis.getLibraryDependencies result
@@ -1057,12 +1018,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, packageMap.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraries,
+        packageMap,
+      );
 }
 
 /// analysis.getNavigation params
@@ -1150,13 +1109,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// analysis.getNavigation result
@@ -1259,13 +1216,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        files,
+        targets,
+        regions,
+      );
 }
 
 /// analysis.getReachableSources params
@@ -1327,11 +1282,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// analysis.getReachableSources result
@@ -1407,11 +1358,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, sources.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => sources.hashCode;
 }
 
 /// analysis.getSignature params
@@ -1484,12 +1431,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// analysis.getSignature result
@@ -1590,13 +1535,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        parameters,
+        dartdoc,
+      );
 }
 
 /// analysis.highlights params
@@ -1678,12 +1621,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.implemented params
@@ -1780,13 +1721,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, classes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, members.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        classes,
+        members,
+      );
 }
 
 /// analysis.invalidate params
@@ -1884,14 +1823,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, delta.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+        delta,
+      );
 }
 
 /// analysis.navigation params
@@ -2008,14 +1945,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+        targets,
+        files,
+      );
 }
 
 /// analysis.occurrences params
@@ -2094,12 +2029,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        occurrences,
+      );
 }
 
 /// AnalysisOptions
@@ -2282,18 +2215,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, enableAsync.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableEnums.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateHints.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateLints.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        enableAsync,
+        enableDeferredLoading,
+        enableEnums,
+        enableNullAwareOperators,
+        enableSuperMixins,
+        generateDart2jsHints,
+        generateHints,
+        generateLints,
+      );
 }
 
 /// analysis.outline params
@@ -2397,14 +2328,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+        libraryName,
+        outline,
+      );
 }
 
 /// analysis.overrides params
@@ -2482,12 +2411,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, overrides.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        overrides,
+      );
 }
 
 /// analysis.reanalyze params
@@ -2511,9 +2438,7 @@
   }
 
   @override
-  int get hashCode {
-    return 613039876;
-  }
+  int get hashCode => 613039876;
 }
 
 /// analysis.reanalyze result
@@ -2537,9 +2462,7 @@
   }
 
   @override
-  int get hashCode {
-    return 846803925;
-  }
+  int get hashCode => 846803925;
 }
 
 /// AnalysisService
@@ -2743,13 +2666,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, included.hashCode);
-    hash = JenkinsSmiHash.combine(hash, excluded.hashCode);
-    hash = JenkinsSmiHash.combine(hash, packageRoots.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        included,
+        excluded,
+        packageRoots,
+      );
 }
 
 /// analysis.setAnalysisRoots result
@@ -2773,9 +2694,7 @@
   }
 
   @override
-  int get hashCode {
-    return 866004753;
-  }
+  int get hashCode => 866004753;
 }
 
 /// analysis.setGeneralSubscriptions params
@@ -2844,11 +2763,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// analysis.setGeneralSubscriptions result
@@ -2872,9 +2787,7 @@
   }
 
   @override
-  int get hashCode {
-    return 386759562;
-  }
+  int get hashCode => 386759562;
 }
 
 /// analysis.setPriorityFiles params
@@ -2937,11 +2850,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.setPriorityFiles result
@@ -2965,9 +2874,7 @@
   }
 
   @override
-  int get hashCode {
-    return 330050055;
-  }
+  int get hashCode => 330050055;
 }
 
 /// analysis.setSubscriptions params
@@ -3040,11 +2947,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// analysis.setSubscriptions result
@@ -3068,9 +2971,7 @@
   }
 
   @override
-  int get hashCode {
-    return 218088493;
-  }
+  int get hashCode => 218088493;
 }
 
 /// AnalysisStatus
@@ -3137,12 +3038,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isAnalyzing.hashCode);
-    hash = JenkinsSmiHash.combine(hash, analysisTarget.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isAnalyzing,
+        analysisTarget,
+      );
 }
 
 /// analysis.updateContent params
@@ -3216,11 +3115,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.updateContent result
@@ -3273,10 +3168,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// analysis.updateOptions params
@@ -3339,11 +3231,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => options.hashCode;
 }
 
 /// analysis.updateOptions result
@@ -3367,9 +3255,7 @@
   }
 
   @override
-  int get hashCode {
-    return 179689467;
-  }
+  int get hashCode => 179689467;
 }
 
 /// analytics.enable params
@@ -3430,11 +3316,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => value.hashCode;
 }
 
 /// analytics.enable result
@@ -3458,9 +3340,7 @@
   }
 
   @override
-  int get hashCode {
-    return 237990792;
-  }
+  int get hashCode => 237990792;
 }
 
 /// analytics.isEnabled params
@@ -3484,9 +3364,7 @@
   }
 
   @override
-  int get hashCode {
-    return 57215544;
-  }
+  int get hashCode => 57215544;
 }
 
 /// analytics.isEnabled result
@@ -3550,11 +3428,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, enabled.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => enabled.hashCode;
 }
 
 /// analytics.sendEvent params
@@ -3615,11 +3489,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, action.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => action.hashCode;
 }
 
 /// analytics.sendEvent result
@@ -3643,9 +3513,7 @@
   }
 
   @override
-  int get hashCode {
-    return 227063188;
-  }
+  int get hashCode => 227063188;
 }
 
 /// analytics.sendTiming params
@@ -3717,12 +3585,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, event.hashCode);
-    hash = JenkinsSmiHash.combine(hash, millis.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        event,
+        millis,
+      );
 }
 
 /// analytics.sendTiming result
@@ -3746,9 +3612,7 @@
   }
 
   @override
-  int get hashCode {
-    return 875010924;
-  }
+  int get hashCode => 875010924;
 }
 
 /// AvailableSuggestion
@@ -3941,19 +3805,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, declaringLibraryUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevanceTags.hashCode);
-    hash = JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        label,
+        declaringLibraryUri,
+        element,
+        defaultArgumentListString,
+        defaultArgumentListTextRanges,
+        parameterNames,
+        parameterTypes,
+        relevanceTags,
+        requiredParameterCount,
+      );
 }
 
 /// AvailableSuggestionSet
@@ -4033,13 +3895,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, items.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        uri,
+        items,
+      );
 }
 
 /// BulkFix
@@ -4108,12 +3968,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        path,
+        fixes,
+      );
 }
 
 /// BulkFixDetail
@@ -4177,12 +4035,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        occurrences,
+      );
 }
 
 /// ClosingLabel
@@ -4258,13 +4114,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        label,
+      );
 }
 
 /// completion.availableSuggestions params
@@ -4355,12 +4209,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, changedLibraries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, removedLibraries.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        changedLibraries,
+        removedLibraries,
+      );
 }
 
 /// completion.existingImports params
@@ -4434,12 +4286,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, imports.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        imports,
+      );
 }
 
 /// completion.getSuggestionDetails params
@@ -4540,14 +4390,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        id,
+        label,
+        offset,
+      );
 }
 
 /// completion.getSuggestionDetails result
@@ -4627,12 +4475,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        completion,
+        change,
+      );
 }
 
 /// completion.getSuggestions params
@@ -4705,12 +4551,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// completion.getSuggestions result
@@ -4774,11 +4618,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// completion.registerLibraryPaths params
@@ -4849,11 +4689,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, paths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => paths.hashCode;
 }
 
 /// completion.registerLibraryPaths result
@@ -4877,9 +4713,7 @@
   }
 
   @override
-  int get hashCode {
-    return 104675661;
-  }
+  int get hashCode => 104675661;
 }
 
 /// completion.results params
@@ -5111,20 +4945,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryFile.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedSuggestionSets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedElementKinds.hashCode);
-    hash =
-        JenkinsSmiHash.combine(hash, includedSuggestionRelevanceTags.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        replacementOffset,
+        replacementLength,
+        results,
+        isLast,
+        libraryFile,
+        includedSuggestionSets,
+        includedElementKinds,
+        includedSuggestionRelevanceTags,
+      );
 }
 
 /// CompletionService
@@ -5246,11 +5077,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// completion.setSubscriptions result
@@ -5274,9 +5101,7 @@
   }
 
   @override
-  int get hashCode {
-    return 2482770;
-  }
+  int get hashCode => 2482770;
 }
 
 /// ContextData
@@ -5384,15 +5209,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        explicitFileCount,
+        implicitFileCount,
+        workItemQueueLength,
+        cacheEntryExceptions,
+      );
 }
 
 /// convertGetterToMethod feedback
@@ -5409,9 +5232,7 @@
   }
 
   @override
-  int get hashCode {
-    return 616032599;
-  }
+  int get hashCode => 616032599;
 }
 
 /// convertGetterToMethod options
@@ -5428,9 +5249,7 @@
   }
 
   @override
-  int get hashCode {
-    return 488848400;
-  }
+  int get hashCode => 488848400;
 }
 
 /// convertMethodToGetter feedback
@@ -5447,9 +5266,7 @@
   }
 
   @override
-  int get hashCode {
-    return 165291526;
-  }
+  int get hashCode => 165291526;
 }
 
 /// convertMethodToGetter options
@@ -5466,9 +5283,7 @@
   }
 
   @override
-  int get hashCode {
-    return 27952290;
-  }
+  int get hashCode => 27952290;
 }
 
 /// diagnostic.getDiagnostics params
@@ -5492,9 +5307,7 @@
   }
 
   @override
-  int get hashCode {
-    return 587526202;
-  }
+  int get hashCode => 587526202;
 }
 
 /// diagnostic.getDiagnostics result
@@ -5564,11 +5377,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, contexts.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => contexts.hashCode;
 }
 
 /// diagnostic.getServerPort params
@@ -5592,9 +5401,7 @@
   }
 
   @override
-  int get hashCode {
-    return 367508704;
-  }
+  int get hashCode => 367508704;
 }
 
 /// diagnostic.getServerPort result
@@ -5658,11 +5465,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, port.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => port.hashCode;
 }
 
 /// edit.bulkFixes params
@@ -5751,12 +5554,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, included.hashCode);
-    hash = JenkinsSmiHash.combine(hash, inTestMode.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        included,
+        inTestMode,
+      );
 }
 
 /// edit.bulkFixes result
@@ -5841,12 +5642,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, details.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        edits,
+        details,
+      );
 }
 
 /// edit.format params
@@ -5949,14 +5748,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lineLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        selectionOffset,
+        selectionLength,
+        lineLength,
+      );
 }
 
 /// edit.format result
@@ -6051,13 +5848,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        edits,
+        selectionOffset,
+        selectionLength,
+      );
 }
 
 /// edit.getAssists params
@@ -6142,13 +5937,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAssists result
@@ -6217,11 +6010,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, assists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => assists.hashCode;
 }
 
 /// edit.getAvailableRefactorings params
@@ -6307,13 +6096,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAvailableRefactorings result
@@ -6383,11 +6170,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kinds.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => kinds.hashCode;
 }
 
 /// edit.getFixes params
@@ -6459,12 +6242,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// edit.getFixes result
@@ -6533,11 +6314,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => fixes.hashCode;
 }
 
 /// edit.getPostfixCompletion params
@@ -6622,13 +6399,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        key,
+        offset,
+      );
 }
 
 /// edit.getPostfixCompletion result
@@ -6693,11 +6468,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => change.hashCode;
 }
 
 /// edit.getRefactoring params
@@ -6832,16 +6603,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, validateOnly.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        file,
+        offset,
+        length,
+        validateOnly,
+        options,
+      );
 }
 
 /// edit.getRefactoring result
@@ -7014,16 +6783,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        initialProblems,
+        optionsProblems,
+        finalProblems,
+        feedback,
+        change,
+        potentialEdits,
+      );
 }
 
 /// edit.getStatementCompletion params
@@ -7096,12 +6863,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// edit.getStatementCompletion result
@@ -7179,12 +6944,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        change,
+        whitespaceOnly,
+      );
 }
 
 /// edit.importElements params
@@ -7279,13 +7042,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        elements,
+        offset,
+      );
 }
 
 /// edit.importElements result
@@ -7355,11 +7116,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// edit.isPostfixCompletionApplicable params
@@ -7444,13 +7201,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        key,
+        offset,
+      );
 }
 
 /// edit.isPostfixCompletionApplicable result
@@ -7515,11 +7270,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => value.hashCode;
 }
 
 /// edit.listPostfixCompletionTemplates params
@@ -7543,9 +7294,7 @@
   }
 
   @override
-  int get hashCode {
-    return 690713107;
-  }
+  int get hashCode => 690713107;
 }
 
 /// edit.listPostfixCompletionTemplates result
@@ -7618,11 +7367,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, templates.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => templates.hashCode;
 }
 
 /// edit.organizeDirectives params
@@ -7684,11 +7429,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// edit.organizeDirectives result
@@ -7754,11 +7495,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// edit.sortMembers params
@@ -7819,11 +7556,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// edit.sortMembers result
@@ -7888,11 +7621,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// ElementDeclaration
@@ -8084,21 +7813,19 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileIndex.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, line.hashCode);
-    hash = JenkinsSmiHash.combine(hash, column.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, mixinName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        kind,
+        fileIndex,
+        offset,
+        line,
+        column,
+        codeOffset,
+        codeLength,
+        className,
+        mixinName,
+        parameters,
+      );
 }
 
 /// ExecutableFile
@@ -8161,12 +7888,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+      );
 }
 
 /// ExecutableKind
@@ -8295,11 +8020,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, contextRoot.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => contextRoot.hashCode;
 }
 
 /// execution.createContext result
@@ -8363,11 +8084,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// execution.deleteContext params
@@ -8429,11 +8146,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// execution.deleteContext result
@@ -8457,9 +8170,7 @@
   }
 
   @override
-  int get hashCode {
-    return 479954425;
-  }
+  int get hashCode => 479954425;
 }
 
 /// execution.getSuggestions params
@@ -8623,16 +8334,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextFile.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, variables.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expressions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        offset,
+        contextFile,
+        contextOffset,
+        variables,
+        expressions,
+      );
 }
 
 /// execution.getSuggestions result
@@ -8739,12 +8448,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expressions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        suggestions,
+        expressions,
+      );
 }
 
 /// execution.launchData params
@@ -8838,13 +8545,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, referencedFiles.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+        referencedFiles,
+      );
 }
 
 /// execution.mapUri params
@@ -8929,13 +8634,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        file,
+        uri,
+      );
 }
 
 /// execution.mapUri result
@@ -9013,12 +8716,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        uri,
+      );
 }
 
 /// ExecutionService
@@ -9130,11 +8831,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// execution.setSubscriptions result
@@ -9158,9 +8855,7 @@
   }
 
   @override
-  int get hashCode {
-    return 287678780;
-  }
+  int get hashCode => 287678780;
 }
 
 /// ExistingImport
@@ -9225,12 +8920,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        uri,
+        elements,
+      );
 }
 
 /// ExistingImports
@@ -9300,12 +8993,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    hash = JenkinsSmiHash.combine(hash, imports.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        elements,
+        imports,
+      );
 }
 
 /// extractLocalVariable feedback
@@ -9427,15 +9118,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        coveringExpressionOffsets,
+        coveringExpressionLengths,
+        names,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractLocalVariable options
@@ -9508,12 +9197,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        extractAll,
+      );
 }
 
 /// extractMethod feedback
@@ -9673,18 +9360,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, canCreateGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        returnType,
+        names,
+        canCreateGetter,
+        parameters,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractMethod options
@@ -9817,15 +9502,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, createGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        returnType,
+        createGetter,
+        name,
+        parameters,
+        extractAll,
+      );
 }
 
 /// extractWidget feedback
@@ -9865,10 +9548,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// extractWidget options
@@ -9925,11 +9605,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// FileKind
@@ -10051,12 +9727,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// flutter.getWidgetDescription result
@@ -10130,11 +9804,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, properties.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => properties.hashCode;
 }
 
 /// FlutterOutline
@@ -10374,22 +10044,20 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, attributes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parentAssociationLabel.hashCode);
-    hash = JenkinsSmiHash.combine(hash, variableName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        offset,
+        length,
+        codeOffset,
+        codeLength,
+        label,
+        dartElement,
+        attributes,
+        className,
+        parentAssociationLabel,
+        variableName,
+        children,
+      );
 }
 
 /// FlutterOutlineAttribute
@@ -10540,17 +10208,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueBoolean.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueInteger.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, nameLocation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, valueLocation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        label,
+        literalValueBoolean,
+        literalValueInteger,
+        literalValueString,
+        nameLocation,
+        valueLocation,
+      );
 }
 
 /// FlutterOutlineKind
@@ -10710,12 +10376,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        outline,
+      );
 }
 
 /// FlutterService
@@ -10832,11 +10496,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// flutter.setSubscriptions result
@@ -10860,9 +10520,7 @@
   }
 
   @override
-  int get hashCode {
-    return 628296315;
-  }
+  int get hashCode => 628296315;
 }
 
 /// flutter.setWidgetPropertyValue params
@@ -10949,12 +10607,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        value,
+      );
 }
 
 /// flutter.setWidgetPropertyValue result
@@ -11019,11 +10675,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => change.hashCode;
 }
 
 /// FlutterWidgetProperty
@@ -11214,19 +10866,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expression.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isRequired.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isSafeToUpdate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    hash = JenkinsSmiHash.combine(hash, editor.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        documentation,
+        expression,
+        id,
+        isRequired,
+        isSafeToUpdate,
+        name,
+        children,
+        editor,
+        value,
+      );
 }
 
 /// FlutterWidgetPropertyEditor
@@ -11301,12 +10951,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enumItems.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        enumItems,
+      );
 }
 
 /// FlutterWidgetPropertyEditorKind
@@ -11529,16 +11177,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, boolValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, doubleValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, intValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stringValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enumValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expression.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        boolValue,
+        doubleValue,
+        intValue,
+        stringValue,
+        enumValue,
+        expression,
+      );
 }
 
 /// FlutterWidgetPropertyValueEnumItem
@@ -11637,14 +11283,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraryUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraryUri,
+        className,
+        name,
+        documentation,
+      );
 }
 
 /// GeneralAnalysisService
@@ -11935,22 +11579,20 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingLibraryPath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingLibraryName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingClassDescription.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementDescription.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, propagatedType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, staticType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        containingLibraryPath,
+        containingLibraryName,
+        containingClassDescription,
+        dartdoc,
+        elementDescription,
+        elementKind,
+        isDeprecated,
+        parameter,
+        propagatedType,
+        staticType,
+      );
 }
 
 /// ImplementedClass
@@ -12012,12 +11654,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+      );
 }
 
 /// ImplementedMember
@@ -12079,12 +11719,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+      );
 }
 
 /// ImportedElementSet
@@ -12163,13 +11801,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, strings.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uris.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        strings,
+        uris,
+        names,
+      );
 }
 
 /// ImportedElements
@@ -12246,13 +11882,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, prefix.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        path,
+        prefix,
+        elements,
+      );
 }
 
 /// IncludedSuggestionRelevanceTag
@@ -12318,12 +11952,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, tag.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevanceBoost.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        tag,
+        relevanceBoost,
+      );
 }
 
 /// IncludedSuggestionSet
@@ -12409,13 +12041,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        relevance,
+        displayUri,
+      );
 }
 
 /// inlineLocalVariable feedback
@@ -12479,12 +12109,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        occurrences,
+      );
 }
 
 /// inlineLocalVariable options
@@ -12501,9 +12129,7 @@
   }
 
   @override
-  int get hashCode {
-    return 540364977;
-  }
+  int get hashCode => 540364977;
 }
 
 /// inlineMethod feedback
@@ -12585,13 +12211,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, methodName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        className,
+        methodName,
+        isDeclaration,
+      );
 }
 
 /// inlineMethod options
@@ -12663,12 +12287,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
-    hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        deleteSource,
+        inlineAll,
+      );
 }
 
 /// kythe.getKytheEntries params
@@ -12731,11 +12353,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// kythe.getKytheEntries result
@@ -12821,12 +12439,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, entries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        entries,
+        files,
+      );
 }
 
 /// LibraryPathSet
@@ -12894,12 +12510,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, scope.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryPaths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        scope,
+        libraryPaths,
+      );
 }
 
 /// moveFile feedback
@@ -12915,9 +12529,7 @@
   }
 
   @override
-  int get hashCode {
-    return 438975893;
-  }
+  int get hashCode => 438975893;
 }
 
 /// moveFile options
@@ -12975,11 +12587,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newFile.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newFile.hashCode;
 }
 
 /// OverriddenMember
@@ -13043,12 +12651,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        className,
+      );
 }
 
 /// Override
@@ -13152,14 +12758,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superclassMember.hashCode);
-    hash = JenkinsSmiHash.combine(hash, interfaceMembers.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        superclassMember,
+        interfaceMembers,
+      );
 }
 
 /// PostfixTemplateDescriptor
@@ -13234,13 +12838,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, example.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        key,
+        example,
+      );
 }
 
 /// PubStatus
@@ -13293,11 +12895,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isListingPackageDirs.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => isListingPackageDirs.hashCode;
 }
 
 /// RefactoringFeedback
@@ -13333,10 +12931,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// RefactoringOptions
@@ -13371,10 +12966,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// rename feedback
@@ -13465,14 +13057,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementKindName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, oldName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        elementKindName,
+        oldName,
+      );
 }
 
 /// rename options
@@ -13530,11 +13120,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newName.hashCode;
 }
 
 /// RequestError
@@ -13614,13 +13200,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        message,
+        stackTrace,
+      );
 }
 
 /// RequestErrorCode
@@ -14048,13 +13632,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        type,
+      );
 }
 
 /// RuntimeCompletionExpressionType
@@ -14234,17 +13816,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraryPath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, typeArguments.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraryPath,
+        kind,
+        name,
+        typeArguments,
+        returnType,
+        parameterTypes,
+        parameterNames,
+      );
 }
 
 /// RuntimeCompletionExpressionTypeKind
@@ -14368,12 +13948,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        type,
+      );
 }
 
 /// search.findElementReferences params
@@ -14463,13 +14041,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includePotential.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        includePotential,
+      );
 }
 
 /// search.findElementReferences result
@@ -14553,12 +14129,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        element,
+      );
 }
 
 /// search.findMemberDeclarations params
@@ -14620,11 +14194,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// search.findMemberDeclarations result
@@ -14688,11 +14258,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.findMemberReferences params
@@ -14754,11 +14320,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// search.findMemberReferences result
@@ -14822,11 +14384,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.findTopLevelDeclarations params
@@ -14890,11 +14448,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => pattern.hashCode;
 }
 
 /// search.findTopLevelDeclarations result
@@ -14958,11 +14512,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.getElementDeclarations params
@@ -15058,13 +14608,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    hash = JenkinsSmiHash.combine(hash, maxResults.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        pattern,
+        maxResults,
+      );
 }
 
 /// search.getElementDeclarations result
@@ -15147,12 +14695,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, declarations.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        declarations,
+        files,
+      );
 }
 
 /// search.getTypeHierarchy params
@@ -15242,13 +14788,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superOnly.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        superOnly,
+      );
 }
 
 /// search.getTypeHierarchy result
@@ -15328,11 +14872,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, hierarchyItems.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => hierarchyItems.hashCode;
 }
 
 /// SearchResult
@@ -15431,14 +14971,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        location,
+        kind,
+        isPotential,
+        path,
+      );
 }
 
 /// SearchResultKind
@@ -15619,13 +15157,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        results,
+        isLast,
+      );
 }
 
 /// server.connected params
@@ -15697,12 +15233,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pid.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        version,
+        pid,
+      );
 }
 
 /// server.error params
@@ -15791,13 +15325,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isFatal.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isFatal,
+        message,
+        stackTrace,
+      );
 }
 
 /// server.getVersion params
@@ -15821,9 +15353,7 @@
   }
 
   @override
-  int get hashCode {
-    return 55877452;
-  }
+  int get hashCode => 55877452;
 }
 
 /// server.getVersion result
@@ -15887,11 +15417,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => version.hashCode;
 }
 
 /// ServerLogEntry
@@ -15968,13 +15494,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, time.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        time,
+        kind,
+        data,
+      );
 }
 
 /// ServerLogEntryKind
@@ -16121,11 +15645,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, entry.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => entry.hashCode;
 }
 
 /// ServerService
@@ -16242,11 +15762,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// server.setSubscriptions result
@@ -16270,9 +15786,7 @@
   }
 
   @override
-  int get hashCode {
-    return 748820900;
-  }
+  int get hashCode => 748820900;
 }
 
 /// server.shutdown params
@@ -16296,9 +15810,7 @@
   }
 
   @override
-  int get hashCode {
-    return 366630911;
-  }
+  int get hashCode => 366630911;
 }
 
 /// server.shutdown result
@@ -16322,9 +15834,7 @@
   }
 
   @override
-  int get hashCode {
-    return 193626532;
-  }
+  int get hashCode => 193626532;
 }
 
 /// server.status params
@@ -16403,12 +15913,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, analysis.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pub.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        analysis,
+        pub,
+      );
 }
 
 /// TypeHierarchyItem
@@ -16568,15 +16076,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, classElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, memberElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superclass.hashCode);
-    hash = JenkinsSmiHash.combine(hash, interfaces.hashCode);
-    hash = JenkinsSmiHash.combine(hash, mixins.hashCode);
-    hash = JenkinsSmiHash.combine(hash, subclasses.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        classElement,
+        displayName,
+        memberElement,
+        superclass,
+        interfaces,
+        mixins,
+        subclasses,
+      );
 }
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 97e8276..fd9daec 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -4,7 +4,6 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:core';
 import 'dart:io' as io;
 import 'dart:math' show max;
 
@@ -24,7 +23,6 @@
 import 'package:analysis_server/src/domain_execution.dart';
 import 'package:analysis_server/src/domain_kythe.dart';
 import 'package:analysis_server/src/domain_server.dart';
-import 'package:analysis_server/src/domains/analysis/macro_files.dart';
 import 'package:analysis_server/src/domains/analysis/occurrences.dart';
 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
 import 'package:analysis_server/src/edit/edit_domain.dart';
@@ -55,7 +53,6 @@
 import 'package:analyzer/src/util/file_paths.dart' as file_paths;
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
-import 'package:analyzer_plugin/utilities/analyzer_converter.dart';
 import 'package:analyzer_plugin/utilities/navigation/navigation_dart.dart';
 import 'package:http/http.dart' as http;
 import 'package:telemetry/crash_reporting.dart';
@@ -724,10 +721,7 @@
   server.AnalysisNavigationParams _computeNavigationParams(
       String path, CompilationUnit unit) {
     var collector = NavigationCollectorImpl();
-    computeDartNavigation(resourceProvider, collector, unit, null, null,
-        analyzerConverter: AnalyzerConverter(
-            locationProvider:
-                MacroElementLocationProvider(MacroFiles(resourceProvider))));
+    computeDartNavigation(resourceProvider, collector, unit, null, null);
     collector.createRegions();
     return server.AnalysisNavigationParams(
         path, collector.regions, collector.targets, collector.files);
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index 5bd16c2..e66a58c 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.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 'dart:core';
 import 'dart:io' as io;
 import 'dart:io';
 
diff --git a/pkg/analysis_server/lib/src/cider/completion.dart b/pkg/analysis_server/lib/src/cider/completion.dart
index 458ce08..8591b99 100644
--- a/pkg/analysis_server/lib/src/cider/completion.dart
+++ b/pkg/analysis_server/lib/src/cider/completion.dart
@@ -99,7 +99,6 @@
             return await manager.computeSuggestions(
               performance,
               completionRequest,
-              enableImportedReferenceContributor: false,
               enableOverrideContributor: false,
               enableUriContributor: false,
             );
diff --git a/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
index 856e20d..76a08e2 100644
--- a/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
@@ -51,7 +51,7 @@
 
   @override
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
-    var labelText = node.constructorName.type.name.name;
+    var labelText = node.constructorName.type2.name.name;
     var name = node.constructorName.name;
     if (name != null) {
       labelText += '.${name.name}';
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 6db03d6..eac6314 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -167,7 +167,7 @@
     Set<SemanticTokenModifiers>? semanticModifiers;
     var parent = node.parent;
     var grandParent = parent?.parent;
-    if (parent is TypeName &&
+    if (parent is NamedType &&
         grandParent is ConstructorName &&
         grandParent.parent is InstanceCreationExpression) {
       // new Class()
@@ -303,6 +303,8 @@
     if (element is! FunctionElement) {
       return false;
     }
+    var parent = node.parent;
+    var isInvocation = parent is MethodInvocation && parent.methodName == node;
     HighlightRegionType type;
     var isTopLevel = element.enclosingElement is CompilationUnitElement;
     if (node.inDeclarationContext()) {
@@ -311,8 +313,12 @@
           : HighlightRegionType.LOCAL_FUNCTION_DECLARATION;
     } else {
       type = isTopLevel
-          ? HighlightRegionType.TOP_LEVEL_FUNCTION_REFERENCE
-          : HighlightRegionType.LOCAL_FUNCTION_REFERENCE;
+          ? isInvocation
+              ? HighlightRegionType.TOP_LEVEL_FUNCTION_REFERENCE
+              : HighlightRegionType.TOP_LEVEL_FUNCTION_TEAR_OFF
+          : isInvocation
+              ? HighlightRegionType.LOCAL_FUNCTION_REFERENCE
+              : HighlightRegionType.LOCAL_FUNCTION_TEAR_OFF;
     }
     return _addRegion_node(node, type);
   }
@@ -397,6 +403,8 @@
       return false;
     }
     var isStatic = element.isStatic;
+    var parent = node.parent;
+    var isInvocation = parent is MethodInvocation && parent.methodName == node;
     // OK
     HighlightRegionType type;
     if (node.inDeclarationContext()) {
@@ -407,9 +415,13 @@
       }
     } else {
       if (isStatic) {
-        type = HighlightRegionType.STATIC_METHOD_REFERENCE;
+        type = isInvocation
+            ? HighlightRegionType.STATIC_METHOD_REFERENCE
+            : HighlightRegionType.STATIC_METHOD_TEAR_OFF;
       } else {
-        type = HighlightRegionType.INSTANCE_METHOD_REFERENCE;
+        type = isInvocation
+            ? HighlightRegionType.INSTANCE_METHOD_REFERENCE
+            : HighlightRegionType.INSTANCE_METHOD_TEAR_OFF;
       }
     }
     return _addRegion_node(node, type);
@@ -662,6 +674,18 @@
   }
 
   @override
+  void visitConstructorReference(ConstructorReference node) {
+    var constructorName = node.constructorName;
+    constructorName.type2.accept(this);
+
+    // We have a `ConstructorReference` only when it is resolved.
+    // TODO(scheglov) The `ConstructorName` in a tear-off always has a name,
+    //  but this is not expressed via types.
+    computer._addRegion_node(
+        constructorName.name!, HighlightRegionType.CONSTRUCTOR_TEAR_OFF);
+  }
+
+  @override
   void visitContinueStatement(ContinueStatement node) {
     computer._addRegion_token(node.continueKeyword, HighlightRegionType.KEYWORD,
         semanticTokenModifiers: {CustomSemanticTokenModifiers.control});
@@ -943,6 +967,18 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    var type = node.type;
+    if (type != null) {
+      if (type.isDynamic && node.name.name == 'dynamic') {
+        computer._addRegion_node(node, HighlightRegionType.TYPE_NAME_DYNAMIC);
+        return null;
+      }
+    }
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     computer._addRegion_token(node.nativeKeyword, HighlightRegionType.BUILT_IN);
     super.visitNativeClause(node);
@@ -1094,18 +1130,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    var type = node.type;
-    if (type != null) {
-      if (type.isDynamic && node.name.name == 'dynamic') {
-        computer._addRegion_node(node, HighlightRegionType.TYPE_NAME_DYNAMIC);
-        return null;
-      }
-    }
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitVariableDeclarationList(VariableDeclarationList node) {
     computer._addRegion_token(node.lateKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 6cf3f1b..d51da04 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -31,7 +31,7 @@
     }
     var parent = node.parent;
     var grandParent = parent?.parent;
-    if (parent is TypeName &&
+    if (parent is NamedType &&
         grandParent is ConstructorName &&
         grandParent.parent is InstanceCreationExpression) {
       node = grandParent.parent;
diff --git a/pkg/analysis_server/lib/src/computer/computer_signature.dart b/pkg/analysis_server/lib/src/computer/computer_signature.dart
index 0e852c2..04013bf 100644
--- a/pkg/analysis_server/lib/src/computer/computer_signature.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_signature.dart
@@ -42,7 +42,7 @@
       var element = ElementLocator.locate(parent);
       execElement = element is ExecutableElement ? element : null;
     } else if (parent is InstanceCreationExpression) {
-      name = parent.constructorName.type.name.name;
+      name = parent.constructorName.type2.name.name;
       var constructorName = parent.constructorName.name;
       if (constructorName != null) {
         name += '.${constructorName.name}';
diff --git a/pkg/analysis_server/lib/src/computer/computer_type_arguments_signature.dart b/pkg/analysis_server/lib/src/computer/computer_type_arguments_signature.dart
index 58aafe2..3c3d68b 100644
--- a/pkg/analysis_server/lib/src/computer/computer_type_arguments_signature.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_type_arguments_signature.dart
@@ -43,7 +43,7 @@
     }
     final parent = argumentList.parent;
     Element? element;
-    if (parent is TypeName) {
+    if (parent is NamedType) {
       element = ElementLocator.locate(parent.name);
     } else if (parent is MethodInvocation) {
       element = ElementLocator.locate(parent.methodName);
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 10acd68..4a1e4c1 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -4,7 +4,6 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:core';
 
 import 'package:analysis_server/src/services/correction/fix/data_driven/transform_set_parser.dart';
 import 'package:analyzer/error/listener.dart';
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index df5d9f6..1208bd9 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.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:core';
-
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/computer/computer_hover.dart';
diff --git a/pkg/analysis_server/lib/src/domain_analytics.dart b/pkg/analysis_server/lib/src/domain_analytics.dart
index e3fe532..66df103 100644
--- a/pkg/analysis_server/lib/src/domain_analytics.dart
+++ b/pkg/analysis_server/lib/src/domain_analytics.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:core';
-
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
diff --git a/pkg/analysis_server/lib/src/domain_diagnostic.dart b/pkg/analysis_server/lib/src/domain_diagnostic.dart
index f11ad7f..59056f2 100644
--- a/pkg/analysis_server/lib/src/domain_diagnostic.dart
+++ b/pkg/analysis_server/lib/src/domain_diagnostic.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:core';
-
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart
index 9a79bf1..f047af1 100644
--- a/pkg/analysis_server/lib/src/domain_execution.dart
+++ b/pkg/analysis_server/lib/src/domain_execution.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
-import 'dart:core';
 
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/src/analysis_server.dart';
diff --git a/pkg/analysis_server/lib/src/domain_kythe.dart b/pkg/analysis_server/lib/src/domain_kythe.dart
index 990588e..ec59917 100644
--- a/pkg/analysis_server/lib/src/domain_kythe.dart
+++ b/pkg/analysis_server/lib/src/domain_kythe.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:core';
-
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
diff --git a/pkg/analysis_server/lib/src/domains/analysis/macro_files.dart b/pkg/analysis_server/lib/src/domains/analysis/macro_files.dart
deleted file mode 100644
index be391be..0000000
--- a/pkg/analysis_server/lib/src/domains/analysis/macro_files.dart
+++ /dev/null
@@ -1,121 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/util/file_paths.dart' as file_paths;
-import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol;
-import 'package:analyzer_plugin/utilities/analyzer_converter.dart';
-
-class MacroElementLocationProvider implements ElementLocationProvider {
-  final MacroFiles _macroFiles;
-
-  MacroElementLocationProvider(this._macroFiles);
-
-  @override
-  protocol.Location? forElement(Element element) {
-    if (element is HasMacroGenerationData) {
-      var macro = (element as HasMacroGenerationData).macro;
-      if (macro != null) {
-        return _forElement(element, macro);
-      }
-    }
-  }
-
-  protocol.Location? _forElement(Element element, MacroGenerationData macro) {
-    var unitElement = element.thisOrAncestorOfType<CompilationUnitElement>();
-    if (unitElement is! CompilationUnitElementImpl) {
-      return null;
-    }
-
-    var generatedFile = _macroFiles.generatedFile(unitElement);
-    if (generatedFile == null) {
-      return null;
-    }
-
-    var nameOffset = element.nameOffset;
-    var nameLength = element.nameLength;
-
-    var lineInfo = generatedFile.lineInfo;
-    var offsetLocation = lineInfo.getLocation(nameOffset);
-    var endLocation = lineInfo.getLocation(nameOffset + nameLength);
-
-    return protocol.Location(generatedFile.path, nameOffset, nameLength,
-        offsetLocation.lineNumber, offsetLocation.columnNumber,
-        endLine: endLocation.lineNumber, endColumn: endLocation.columnNumber);
-  }
-}
-
-/// Note, this class changes the file system.
-class MacroFiles {
-  final ResourceProvider _resourceProvider;
-
-  /// Keys are source paths.
-  final Map<String, _MacroGeneratedFile> _files = {};
-
-  MacroFiles(this._resourceProvider);
-
-  /// If [unitElement] has macro-generated elements, write the combined
-  /// content into a new file in `.dart_tool`, and return the description of
-  /// this file.
-  _MacroGeneratedFile? generatedFile(CompilationUnitElementImpl unitElement) {
-    var sourcePath = unitElement.source.fullName;
-
-    var result = _files[sourcePath];
-    if (result != null) {
-      return result;
-    }
-
-    var sourceFile = _resourceProvider.getFile(sourcePath);
-
-    // TODO(scheglov) Use workspace?
-    Folder? packageRoot;
-    for (var parent in sourceFile.parent2.withAncestors) {
-      if (parent.getChildAssumingFile(file_paths.pubspecYaml).exists) {
-        packageRoot = parent;
-        break;
-      }
-    }
-    if (packageRoot == null) {
-      return null;
-    }
-
-    var pathContext = _resourceProvider.pathContext;
-    var relativePath = pathContext.relative(
-      sourcePath,
-      from: packageRoot.path,
-    );
-    var generatedPath = pathContext.join(
-        packageRoot.path, '.dart_tool', 'analyzer', 'macro', relativePath);
-
-    var generatedContent = unitElement.macroGeneratedContent;
-    if (generatedContent == null) {
-      return null;
-    }
-
-    try {
-      _resourceProvider.getFile(generatedPath)
-        ..parent2.create()
-        ..writeAsStringSync(generatedContent);
-    } on FileSystemException {
-      return null;
-    }
-
-    return _files[sourcePath] = _MacroGeneratedFile(
-      generatedPath,
-      generatedContent,
-    );
-  }
-}
-
-class _MacroGeneratedFile {
-  final String path;
-  final String content;
-  final LineInfo lineInfo;
-
-  _MacroGeneratedFile(this.path, this.content)
-      : lineInfo = LineInfo.fromContent(content);
-}
diff --git a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
index 5eaa592..1d4b4b5 100644
--- a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
+++ b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/services/available_declarations.dart';
 
 /// Compute which suggestion sets should be included into completion inside
@@ -38,9 +37,8 @@
   ) {
     int relevance;
     if (importedUriSet.contains(library.uri)) {
-      return;
-    }
-    if (library.isDeprecated) {
+      relevance = importedRelevance;
+    } else if (library.isDeprecated) {
       relevance = deprecatedRelevance;
     } else {
       relevance = otherwiseRelevance;
@@ -362,8 +360,7 @@
   @override
   final int hashCode;
 
-  _ImportedElement(this.uri, this.name)
-      : hashCode = JenkinsSmiHash.hash2(uri, name);
+  _ImportedElement(this.uri, this.name) : hashCode = Object.hash(uri, name);
 
   @override
   bool operator ==(other) {
diff --git a/pkg/analysis_server/lib/src/g3/fixes.dart b/pkg/analysis_server/lib/src/g3/fixes.dart
new file mode 100644
index 0000000..51c05f4
--- /dev/null
+++ b/pkg/analysis_server/lib/src/g3/fixes.dart
@@ -0,0 +1,207 @@
+// 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.
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SourceEdit;
+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_internal.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/overlay_file_system.dart';
+import 'package:analyzer/instrumentation/service.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/src/dart/error/lint_codes.dart';
+import 'package:collection/collection.dart';
+
+/// The root of a set of classes that support testing for lint fixes.
+///
+/// These classes work as a sequence:
+/// 1. Create this tested with necessary SDK and package config.
+/// 2. Configure any overlays on top of the file system with [updateFile].
+/// 3. Request fixes for a file using [fixesForSingleLint].
+/// 4. Use the [LintFixTesterWithFixes] to check how many fixes there are.
+/// 5. If there is a single fix, use [LintFixTesterWithSingleFix] to verify
+///    the fixed content for specific files.
+class LintFixTester {
+  final OverlayResourceProvider _resourceProvider;
+  final String sdkPath;
+  final String? packageConfigPath;
+
+  /// If `false`, then we have already computed lints for this tester,
+  /// and updating the file system (as much as we can observe it) should
+  /// not be allowed.
+  bool _canUpdateResourceProvider = true;
+
+  LintFixTester({
+    required ResourceProvider resourceProvider,
+    required this.sdkPath,
+    required this.packageConfigPath,
+  }) : _resourceProvider = OverlayResourceProvider(resourceProvider);
+
+  /// Prepare fixes for a single lint in the file with the [path]
+  ///
+  /// If [inFile] is `false`, there must be exactly one diagnostic in the file,
+  /// and it is a lint.
+  ///
+  /// If [inFile] is `true`, there must be one or more diagnostics, but all
+  /// of them must have the same error code, and it must be a lint.
+  ///
+  /// Throws [StateError] if an expectation is not satisfied.
+  Future<LintFixTesterWithFixes> fixesForSingleLint({
+    required String path,
+    required bool inFile,
+  }) async {
+    _canUpdateResourceProvider = true;
+
+    var collection = AnalysisContextCollectionImpl(
+      includedPaths: [path],
+      resourceProvider: _resourceProvider,
+      sdkPath: sdkPath,
+      packagesFile: packageConfigPath,
+    );
+    var analysisContext = collection.contextFor(path);
+    var analysisSession = analysisContext.currentSession;
+
+    var unitResult = await analysisSession.getResolvedUnit(path);
+    unitResult as ResolvedUnitResult;
+
+    AnalysisError error;
+    var errors = unitResult.errors;
+    if (inFile) {
+      var groups = errors.groupListsBy((error) => error.errorCode);
+      if (groups.length != 1) {
+        throw StateError(
+          'Exactly one error code expected:'
+          '\n$errors\n${groups.keys.toList()}',
+        );
+      }
+      error = errors.first;
+    } else {
+      if (errors.length != 1) {
+        throw StateError('Exactly one lint expected: $errors');
+      }
+      error = errors.single;
+    }
+
+    if (error.errorCode is! LintCode) {
+      throw StateError('A lint expected: $errors');
+    }
+
+    var workspace = DartChangeWorkspace([analysisSession]);
+    var context = DartFixContextImpl(
+      InstrumentationService.NULL_SERVICE,
+      workspace,
+      unitResult,
+      error,
+      (name) => const [],
+    );
+
+    List<Fix> fixes;
+    if (inFile) {
+      var fixInFileProcessor = FixInFileProcessor(context);
+      fixes = await fixInFileProcessor.compute();
+    } else {
+      fixes = await FixProcessor(context).compute();
+      fixes.removeWhere(
+        (fix) =>
+            fix.kind == DartFixKind.IGNORE_ERROR_LINE ||
+            fix.kind == DartFixKind.IGNORE_ERROR_FILE,
+      );
+    }
+
+    return LintFixTesterWithFixes(parent: this, fixes: fixes);
+  }
+
+  /// Update the view on the file system so that the final with the [path]
+  /// is considered to have the given [content]. The actual file system is
+  /// not changed.
+  ///
+  /// This method should not be used after any analysis is performed, such
+  /// as invocation of [fixesForSingleLint], will throw [StateError].
+  void updateFile({
+    required String path,
+    required String content,
+  }) {
+    if (!_canUpdateResourceProvider) {
+      throw StateError('Diagnostics were already computed.');
+    }
+
+    _resourceProvider.setOverlay(
+      path,
+      content: content,
+      modificationStamp: 0,
+    );
+  }
+}
+
+class LintFixTesterWithFixes {
+  final LintFixTester _parent;
+  final List<Fix> fixes;
+
+  LintFixTesterWithFixes({
+    required LintFixTester parent,
+    required this.fixes,
+  }) : _parent = parent;
+
+  void assertNoFixes() {
+    if (fixes.isNotEmpty) {
+      throw StateError('Must have exactly zero fixes: $fixes');
+    }
+  }
+
+  LintFixTesterWithSingleFix assertSingleFix() {
+    if (fixes.length != 1) {
+      throw StateError('Must have exactly one fix: $fixes');
+    }
+
+    return LintFixTesterWithSingleFix(
+      parent: this,
+      fix: fixes.single,
+    );
+  }
+}
+
+class LintFixTesterWithSingleFix {
+  final LintFixTesterWithFixes _parent;
+  final Fix fix;
+
+  LintFixTesterWithSingleFix({
+    required LintFixTesterWithFixes parent,
+    required this.fix,
+  }) : _parent = parent;
+
+  void assertFixedContentOfFile({
+    required String path,
+    required String fixedContent,
+  }) {
+    var fileEdits = fix.change.edits;
+    var fileEdit = fileEdits.singleWhere(
+      (fileEdit) => fileEdit.file == path,
+    );
+
+    var resourceProvider = _parent._parent._resourceProvider;
+    var file = resourceProvider.getFile(path);
+    var fileContent = file.readAsStringSync();
+
+    var actualFixedContent = SourceEdit.applySequence(
+      fileContent,
+      fileEdit.edits,
+    );
+    if (actualFixedContent != fixedContent) {
+      throw StateError('Not expected content:\n$actualFixedContent');
+    }
+  }
+
+  void assertNoFileEdit({required String path}) {
+    var fileEdits = fix.change.edits;
+    var filtered = fileEdits.where(
+      (fileEdit) => fileEdit.file == path,
+    );
+    if (filtered.isNotEmpty) {
+      throw StateError('Expected no edit for $path: $fix');
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
index d203ef9..a9bc050 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
@@ -6,7 +6,6 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart'
     hide AnalysisGetNavigationParams;
-import 'package:analysis_server/src/domains/analysis/macro_files.dart';
 import 'package:analysis_server/src/lsp/handlers/handlers.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analysis_server/src/lsp/mapping.dart';
@@ -16,7 +15,6 @@
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
-import 'package:analyzer_plugin/utilities/analyzer_converter.dart';
 import 'package:analyzer_plugin/utilities/navigation/navigation_dart.dart';
 import 'package:collection/collection.dart';
 
@@ -56,10 +54,8 @@
     final result = await server.getResolvedUnit(path);
     final unit = result?.unit;
     if (result?.state == ResultState.VALID && unit != null) {
-      computeDartNavigation(server.resourceProvider, collector, unit, offset, 0,
-          analyzerConverter: AnalyzerConverter(
-              locationProvider: MacroElementLocationProvider(
-                  MacroFiles(server.resourceProvider))));
+      computeDartNavigation(
+          server.resourceProvider, collector, unit, offset, 0);
       collector.createRegions();
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/semantic_tokens/mapping.dart b/pkg/analysis_server/lib/src/lsp/semantic_tokens/mapping.dart
index 4d44191..1758d41 100644
--- a/pkg/analysis_server/lib/src/lsp/semantic_tokens/mapping.dart
+++ b/pkg/analysis_server/lib/src/lsp/semantic_tokens/mapping.dart
@@ -4,17 +4,17 @@
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
-import 'package:analysis_server/src/lsp/semantic_tokens/legend.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 
-final highlightRegionMapper = RegionTypeMapper();
-
 /// A mapping from [HighlightRegionType] to a set of [SemanticTokenModifiers].
 final highlightRegionTokenModifiers =
     <HighlightRegionType, Set<SemanticTokenModifiers>>{
   HighlightRegionType.COMMENT_DOCUMENTATION: {
     SemanticTokenModifiers.documentation
   },
+  HighlightRegionType.CONSTRUCTOR_TEAR_OFF: {
+    CustomSemanticTokenModifiers.constructor
+  },
   HighlightRegionType.DYNAMIC_LOCAL_VARIABLE_DECLARATION: {
     SemanticTokenModifiers.declaration
   },
@@ -56,6 +56,7 @@
     SemanticTokenModifiers.static,
   },
   HighlightRegionType.STATIC_METHOD_REFERENCE: {SemanticTokenModifiers.static},
+  HighlightRegionType.STATIC_METHOD_TEAR_OFF: {SemanticTokenModifiers.static},
   HighlightRegionType.STATIC_SETTER_DECLARATION: {
     SemanticTokenModifiers.declaration,
     SemanticTokenModifiers.static,
@@ -87,6 +88,7 @@
   HighlightRegionType.COMMENT_BLOCK: SemanticTokenTypes.comment,
   HighlightRegionType.COMMENT_DOCUMENTATION: SemanticTokenTypes.comment,
   HighlightRegionType.COMMENT_END_OF_LINE: SemanticTokenTypes.comment,
+  HighlightRegionType.CONSTRUCTOR_TEAR_OFF: SemanticTokenTypes.method,
   HighlightRegionType.DYNAMIC_LOCAL_VARIABLE_DECLARATION:
       SemanticTokenTypes.variable,
   HighlightRegionType.DYNAMIC_LOCAL_VARIABLE_REFERENCE:
@@ -104,6 +106,7 @@
   HighlightRegionType.INSTANCE_GETTER_REFERENCE: SemanticTokenTypes.property,
   HighlightRegionType.INSTANCE_METHOD_DECLARATION: SemanticTokenTypes.method,
   HighlightRegionType.INSTANCE_METHOD_REFERENCE: SemanticTokenTypes.method,
+  HighlightRegionType.INSTANCE_METHOD_TEAR_OFF: SemanticTokenTypes.method,
   HighlightRegionType.INSTANCE_SETTER_DECLARATION: SemanticTokenTypes.property,
   HighlightRegionType.INSTANCE_SETTER_REFERENCE: SemanticTokenTypes.property,
   HighlightRegionType.KEYWORD: SemanticTokenTypes.keyword,
@@ -114,6 +117,7 @@
   HighlightRegionType.LITERAL_STRING: SemanticTokenTypes.string,
   HighlightRegionType.LOCAL_FUNCTION_DECLARATION: SemanticTokenTypes.function,
   HighlightRegionType.LOCAL_FUNCTION_REFERENCE: SemanticTokenTypes.function,
+  HighlightRegionType.LOCAL_FUNCTION_TEAR_OFF: SemanticTokenTypes.function,
   HighlightRegionType.LOCAL_VARIABLE_DECLARATION: SemanticTokenTypes.variable,
   HighlightRegionType.LOCAL_VARIABLE_REFERENCE: SemanticTokenTypes.variable,
   HighlightRegionType.PARAMETER_DECLARATION: SemanticTokenTypes.parameter,
@@ -123,11 +127,13 @@
   HighlightRegionType.STATIC_GETTER_REFERENCE: SemanticTokenTypes.property,
   HighlightRegionType.STATIC_METHOD_DECLARATION: SemanticTokenTypes.method,
   HighlightRegionType.STATIC_METHOD_REFERENCE: SemanticTokenTypes.method,
+  HighlightRegionType.STATIC_METHOD_TEAR_OFF: SemanticTokenTypes.method,
   HighlightRegionType.STATIC_SETTER_DECLARATION: SemanticTokenTypes.property,
   HighlightRegionType.STATIC_SETTER_REFERENCE: SemanticTokenTypes.property,
   HighlightRegionType.TOP_LEVEL_FUNCTION_DECLARATION:
       SemanticTokenTypes.function,
   HighlightRegionType.TOP_LEVEL_FUNCTION_REFERENCE: SemanticTokenTypes.function,
+  HighlightRegionType.TOP_LEVEL_FUNCTION_TEAR_OFF: SemanticTokenTypes.function,
   HighlightRegionType.TOP_LEVEL_GETTER_DECLARATION: SemanticTokenTypes.property,
   HighlightRegionType.TOP_LEVEL_GETTER_REFERENCE: SemanticTokenTypes.property,
   HighlightRegionType.TOP_LEVEL_SETTER_DECLARATION: SemanticTokenTypes.property,
@@ -142,37 +148,3 @@
       CustomSemanticTokenTypes.source,
   HighlightRegionType.VALID_STRING_ESCAPE: SemanticTokenTypes.string,
 };
-
-/// A helper for converting from Server highlight regions to LSP semantic tokens.
-class RegionTypeMapper {
-  /// A map to get the [SemanticTokenTypes] index directly from a [HighlightRegionType].
-  final Map<HighlightRegionType, int> _tokenTypeIndexForHighlightRegion = {};
-
-  /// A map to get the [SemanticTokenModifiers] bitmask directly from a [HighlightRegionType].
-  final Map<HighlightRegionType, int> _tokenModifierBitmaskForHighlightRegion =
-      {};
-
-  RegionTypeMapper() {
-    // Build mappings that go directly from [HighlightRegionType] to index/bitmask
-    // for faster lookups.
-    for (final regionType in highlightRegionTokenTypes.keys) {
-      _tokenTypeIndexForHighlightRegion[regionType] = semanticTokenLegend
-          .indexForType(highlightRegionTokenTypes[regionType]!);
-    }
-
-    for (final regionType in highlightRegionTokenTypes.keys) {
-      _tokenModifierBitmaskForHighlightRegion[regionType] = semanticTokenLegend
-          .bitmaskForModifiers(highlightRegionTokenModifiers[regionType]);
-    }
-  }
-
-  /// Gets the [SemanticTokenModifiers] bitmask for a [HighlightRegionType]. Returns
-  /// null if the region type has not been mapped.
-  int bitmaskForModifier(HighlightRegionType type) =>
-      _tokenModifierBitmaskForHighlightRegion[type]!;
-
-  /// Gets the [SemanticTokenTypes] index for a [HighlightRegionType]. Returns
-  /// null if the region type has not been mapped.
-  int indexForToken(HighlightRegionType type) =>
-      _tokenTypeIndexForHighlightRegion[type]!;
-}
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 89f26d4..36bff9b 100644
--- a/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
+++ b/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
@@ -293,6 +293,8 @@
         // interestingFiles. Prefix a `**/` so that the glob matches nested
         // folders as well.
         .map((glob) => DocumentFilter(scheme: 'file', pattern: '**/$glob'));
+    final pluginTypesExcludingDart =
+        pluginTypes.where((filter) => filter.pattern != '**/*.dart');
 
     final fullySupportedTypes = {dartFiles, ...pluginTypes}.toList();
 
@@ -314,7 +316,7 @@
     final completionSupportedTypesExcludingDart = {
       // Dart is excluded here at it's registered separately with trigger/commit
       // characters.
-      ...pluginTypes,
+      ...pluginTypesExcludingDart,
       pubspecFile,
       analysisOptionsFile,
       fixDataFile,
diff --git a/pkg/analysis_server/lib/src/lsp/source_edits.dart b/pkg/analysis_server/lib/src/lsp/source_edits.dart
index 2d3c129..3dd47bf 100644
--- a/pkg/analysis_server/lib/src/lsp/source_edits.dart
+++ b/pkg/analysis_server/lib/src/lsp/source_edits.dart
@@ -11,7 +11,6 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
index 07c4956..5972a14 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -330,8 +330,10 @@
       try {
         var session = await plugin.start(byteStorePath, sdkPath);
         session?.onDone.then((_) {
-          _pluginMap.remove(path);
-          _notifyPluginsChanged();
+          if (_pluginMap[path] == plugin) {
+            _pluginMap.remove(path);
+            _notifyPluginsChanged();
+          }
         });
       } catch (exception, stackTrace) {
         // Record the exception (for debugging purposes) and record the fact
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index 7ad36bd..64be4e9 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -245,7 +245,8 @@
   if (kind == engine.MatchKind.INVOCATION) {
     return SearchResultKind.INVOCATION;
   }
-  if (kind == engine.MatchKind.REFERENCE) {
+  if (kind == engine.MatchKind.REFERENCE ||
+      kind == engine.MatchKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF) {
     return SearchResultKind.REFERENCE;
   }
   return SearchResultKind.UNKNOWN;
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 61eea1c..cec2be3 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
@@ -92,7 +92,6 @@
   Future<List<CompletionSuggestion>> computeSuggestions(
     OperationPerformanceImpl performance,
     CompletionRequest request, {
-    bool enableImportedReferenceContributor = true,
     bool enableOverrideContributor = true,
     bool enableUriContributor = true,
     CompletionPreference? completionPreference,
@@ -131,7 +130,6 @@
       CombinatorContributor(),
       ExtensionMemberContributor(),
       FieldFormalContributor(),
-      if (enableImportedReferenceContributor) ImportedReferenceContributor(),
       KeywordContributor(),
       LabelContributor(),
       LibraryMemberContributor(),
@@ -150,6 +148,8 @@
     if (includedElementKinds != null) {
       _addIncludedElementKinds(dartRequest);
       _addIncludedSuggestionRelevanceTags(dartRequest);
+    } else {
+      contributors.add(ImportedReferenceContributor());
     }
 
     try {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart b/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
index fe38ee1..722a3f4 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
@@ -21,10 +21,11 @@
         Element,
         ElementKind,
         FieldElement,
+        FunctionElement,
         LibraryElement,
+        LocalVariableElement,
         PropertyAccessorElement,
-        TopLevelVariableElement,
-        LocalVariableElement;
+        TopLevelVariableElement;
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/dart/element/type_system.dart';
@@ -322,7 +323,9 @@
       // override of `noSuchMethod`.
       return 0.0;
     }
-    return proposedMemberName == 'noSuchMethod' ? -1.0 : 0.0;
+    return proposedMemberName == FunctionElement.NO_SUCH_METHOD_METHOD_NAME
+        ? -1.0
+        : 0.0;
   }
 
   /// Return the value of the _keyword_ feature for the [keyword] when
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
index 18ebdde..975d96c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/library_member_contributor.dart
@@ -39,7 +39,7 @@
       PrefixElement elem,
       List<ImportElement> imports) {
     var parent = request.target.containingNode.parent;
-    var typesOnly = parent is TypeName;
+    var typesOnly = parent is NamedType;
     var isConstructor = parent?.parent is ConstructorName;
     for (var importElem in imports) {
       if (importElem.prefix?.name == elem.name) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
index 728ea51..b97e431 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
@@ -437,7 +437,7 @@
   bool _isUnused(String identifier) => RegExp(r'^_+$').hasMatch(identifier);
 
   bool _isVoid(TypeAnnotation? returnType) {
-    if (returnType is TypeName) {
+    if (returnType is NamedType) {
       var id = returnType.name;
       if (id.name == 'void') {
         return true;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
index a0cec5d..e00de9c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/named_constructor_contributor.dart
@@ -21,8 +21,8 @@
       if (libraryElement == null) {
         return;
       }
-      var typeName = node.type;
-      var type = typeName.type;
+      var namedType = node.type2;
+      var type = namedType.type;
       if (type != null) {
         var element = type.element;
         if (element is ClassElement) {
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 9bcd314..979ab11 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
@@ -141,6 +141,22 @@
 /// An object used to build a list of suggestions in response to a single
 /// completion request.
 class SuggestionBuilder {
+  /// The cache of suggestions for [Element]s. We use it to avoid computing
+  /// the same documentation, parameters, return type, etc for elements that
+  /// are exactly the same (the same instances) as they were the last time.
+  ///
+  /// This cache works because:
+  /// 1. Flutter applications usually reference many libraries, which they
+  /// consume, but don't change. So, all their elements stay unchanged.
+  /// 2. The analyzer keeps the same library instances loaded as the user
+  /// types in the application, so the instances of all elements stay the
+  /// same, and the cache works.
+  /// 3. The analyzer does not patch elements (at least not after the linking
+  /// process is done, and the elements are exposed to any client code). So,
+  /// any type information, or documentation, stays the same. If this changes,
+  /// we would need a signal, e.g. some modification counter on the element.
+  static final _elementSuggestionCache = Expando<_CompletionSuggestionEntry>();
+
   /// The completion request for which suggestions are being built.
   final DartCompletionRequest request;
 
@@ -457,9 +473,8 @@
 
   /// Add a suggestion for the `call` method defined on functions.
   void suggestFunctionCall() {
-    const callString = 'call';
-    final element = protocol.Element(
-        protocol.ElementKind.METHOD, callString, protocol.Element.makeFlags(),
+    final element = protocol.Element(protocol.ElementKind.METHOD,
+        FunctionElement.CALL_METHOD_NAME, protocol.Element.makeFlags(),
         location: null,
         typeParameters: null,
         parameters: '()',
@@ -467,8 +482,8 @@
     _add(CompletionSuggestion(
       CompletionSuggestionKind.INVOCATION,
       Relevance.callFunction,
-      callString,
-      callString.length,
+      FunctionElement.CALL_METHOD_NAME,
+      FunctionElement.CALL_METHOD_NAME.length,
       0,
       false,
       false,
@@ -1005,6 +1020,50 @@
       CompletionSuggestionKind? kind,
       String? prefix,
       required int relevance}) {
+    var inputs = _CompletionSuggestionInputs(
+      completion: completion,
+      elementKind: elementKind,
+      kind: kind,
+      prefix: prefix,
+    );
+
+    var cacheEntry = _elementSuggestionCache[element];
+    if (cacheEntry != null) {
+      if (cacheEntry.inputs == inputs) {
+        final suggestion = cacheEntry.suggestion;
+        suggestion.relevance = relevance;
+        return suggestion;
+      }
+    }
+
+    var suggestion = _createSuggestion0(
+      element,
+      completion: completion,
+      elementKind: elementKind,
+      kind: kind,
+      prefix: prefix,
+      relevance: relevance,
+    );
+    if (suggestion == null) {
+      return null;
+    }
+
+    _elementSuggestionCache[element] = _CompletionSuggestionEntry(
+      inputs: inputs,
+      suggestion: suggestion,
+    );
+    return suggestion;
+  }
+
+  /// The non-caching implementation of [_createSuggestion].
+  CompletionSuggestion? _createSuggestion0(
+    Element element, {
+    required String? completion,
+    required protocol.ElementKind? elementKind,
+    required CompletionSuggestionKind? kind,
+    required String? prefix,
+    required int relevance,
+  }) {
     if (element is ExecutableElement && element.isOperator) {
       // Do not include operators in suggestions
       return null;
@@ -1160,3 +1219,41 @@
   /// no `elementKindRelevance` table associated with the [completionLocation].
   void missingElementKindTableFor(String completionLocation);
 }
+
+/// The entry of the element to suggestion cache.
+class _CompletionSuggestionEntry {
+  final _CompletionSuggestionInputs inputs;
+
+  /// The suggestion computed for the element and [inputs].
+  final CompletionSuggestion suggestion;
+
+  _CompletionSuggestionEntry({
+    required this.inputs,
+    required this.suggestion,
+  });
+}
+
+/// The inputs, other than the [Element], that were provided to create an
+/// instance of [CompletionSuggestion].
+class _CompletionSuggestionInputs {
+  final String? completion;
+  final protocol.ElementKind? elementKind;
+  final CompletionSuggestionKind? kind;
+  final String? prefix;
+
+  _CompletionSuggestionInputs({
+    required this.completion,
+    required this.elementKind,
+    required this.kind,
+    required this.prefix,
+  });
+
+  @override
+  bool operator ==(Object other) {
+    return other is _CompletionSuggestionInputs &&
+        other.completion == completion &&
+        other.elementKind == elementKind &&
+        other.kind == kind &&
+        other.prefix == prefix;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
index 6b96dcf..e67d203 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
@@ -129,9 +129,9 @@
   @override
   void declaredFunction(FunctionDeclaration declaration) {
     if (declaration.name.name == targetName) {
-      var typeName = declaration.returnType;
-      if (typeName != null) {
-        var type = typeName.type;
+      var returnType = declaration.returnType;
+      if (returnType != null) {
+        var type = returnType.type;
         if (type != null) {
           typeFound = type;
         }
@@ -143,9 +143,9 @@
   @override
   void declaredFunctionTypeAlias(FunctionTypeAlias declaration) {
     if (declaration.name.name == targetName) {
-      var typeName = declaration.returnType;
-      if (typeName != null) {
-        var type = typeName.type;
+      var returnType = declaration.returnType;
+      if (returnType != null) {
+        var type = returnType.type;
         if (type != null) {
           typeFound = type;
         }
@@ -157,9 +157,9 @@
   @override
   void declaredGenericTypeAlias(GenericTypeAlias declaration) {
     if (declaration.name.name == targetName) {
-      var typeName = declaration.functionType?.returnType;
-      if (typeName != null) {
-        var type = typeName.type;
+      var returnType = declaration.functionType?.returnType;
+      if (returnType != null) {
+        var type = returnType.type;
         if (type != null) {
           typeFound = type;
         }
@@ -188,9 +188,9 @@
   @override
   void declaredMethod(MethodDeclaration declaration) {
     if (declaration.name.name == targetName) {
-      var typeName = declaration.returnType;
-      if (typeName != null) {
-        var type = typeName.type;
+      var returnType = declaration.returnType;
+      if (returnType != null) {
+        var type = returnType.type;
         if (type != null) {
           typeFound = type;
         }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
index 14fac8f..227c538 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.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:core';
-
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
 import 'package:analyzer/dart/ast/ast.dart';
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
index 26a1a94..4a4c7d5 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
@@ -29,9 +29,11 @@
 };
 
 /// A marker used in place of `null` when a function has no return type.
-final TypeName NO_RETURN_TYPE = astFactory.typeName(
-    astFactory.simpleIdentifier(StringToken(TokenType.IDENTIFIER, '', 0)),
-    null);
+final NamedType NO_RETURN_TYPE = astFactory.namedType(
+  name: astFactory.simpleIdentifier(
+    StringToken(TokenType.IDENTIFIER, '', 0),
+  ),
+);
 
 /// Add default argument list text and ranges based on the given
 /// [requiredParams] and [namedParams].
@@ -246,7 +248,7 @@
 
   // If the type is unresolved, use the declared type.
   if (type.isDynamic) {
-    if (declaredType is TypeName) {
+    if (declaredType is NamedType) {
       return declaredType.name.name;
     }
     return DYNAMIC;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
index e2b1b0b..ba74ab0 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/variable_name_contributor.dart
@@ -111,7 +111,7 @@
   }
 
   static Identifier? _typeAnnotationIdentifier(TypeAnnotation? type) {
-    if (type is TypeName) {
+    if (type is NamedType) {
       return type.name;
     }
     return null;
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
index 06c0c17..a09c3b7 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.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:core';
-
 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/services/correction/change_workspace.dart';
@@ -234,7 +232,11 @@
     var analysisOptions = result.session.analysisContext.analysisOptions;
     for (var unitResult in result.units) {
       var overrideSet = _readOverrideSet(unitResult);
-      for (var error in unitResult.errors) {
+
+      var errors = List.from(unitResult.errors, growable: false);
+      errors.sort((a, b) => a.offset.compareTo(b.offset));
+
+      for (var error in errors) {
         var processor = ErrorProcessor.getProcessor(analysisOptions, error);
         // Only fix errors not filtered out in analysis options.
         if (processor == null || processor.severity != null) {
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 a586ac4..56442ae 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
@@ -539,7 +539,7 @@
   bool mightBeTypeIdentifier(AstNode node) {
     if (node is SimpleIdentifier) {
       var parent = node.parent;
-      if (parent is TypeName) {
+      if (parent is NamedType) {
         return true;
       }
       return _isNameOfType(node.name);
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 3dcb6c7..de6f8d5 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
@@ -8,18 +8,17 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.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_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class AddConst extends CorrectionProducer {
   @override
-  bool canBeAppliedInBulk;
+  bool get canBeAppliedInBulk => true;
 
   @override
-  bool canBeAppliedToFile;
-
-  AddConst(this.canBeAppliedInBulk, this.canBeAppliedToFile);
+  bool get canBeAppliedToFile => true;
 
   @override
   FixKind get fixKind => DartFixKind.ADD_CONST;
@@ -42,10 +41,29 @@
       return;
     }
 
+    bool isParentConstant(
+        DartFileEditBuilderImpl builder, Expression targetNode) {
+      var edits = builder.fileEdit.edits;
+      var child = targetNode.parent;
+      while (child is Expression || child is ArgumentList) {
+        if (edits.any((element) =>
+            element.replacement == 'const ' &&
+            element.offset == child!.offset)) {
+          return true;
+        }
+        child = child!.parent;
+      }
+      return false;
+    }
+
     Future<void> insertAtOffset(Expression targetNode) async {
       var finder = _ConstRangeFinder();
       targetNode.accept(finder);
       await builder.addDartFileEdit(file, (builder) {
+        if (builder is DartFileEditBuilderImpl &&
+            isParentConstant(builder, targetNode)) {
+          return;
+        }
         builder.addSimpleInsertion(targetNode.offset, 'const ');
         for (var range in finder.ranges) {
           builder.addDeletion(range);
@@ -61,7 +79,7 @@
       await insertAtOffset(targetNode);
       return;
     }
-    if (targetNode is TypeName) {
+    if (targetNode is NamedType) {
       targetNode = targetNode.parent;
     }
     if (targetNode is ConstructorName) {
@@ -76,16 +94,7 @@
   }
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static AddConst toDeclaration() => AddConst(true, true);
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  // TODO(brianwilkerson) This fix can produce changes that are inconsistent
-  //  with the `unnecessary_const` lint. Fix it and then enable it for both
-  //  uses.
-  static AddConst toInvocation() => AddConst(false, false);
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static AddConst toLiteral() => AddConst(true, true);
+  static AddConst newInstance() => AddConst();
 }
 
 class _ConstRangeFinder extends RecursiveAstVisitor<void> {
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 6c5b68c..af2fe16 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
@@ -165,7 +165,7 @@
         if (parameter is SimpleFormalParameter) {
           final type = parameter.type;
           final identifier = parameter.identifier;
-          if (type is TypeName && identifier != null) {
+          if (type is NamedType && identifier != null) {
             if (type.name.name == 'DiagnosticPropertiesBuilder') {
               propertiesBuilderName = identifier.name;
               break;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_switch_case_break.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_switch_case_break.dart
new file mode 100644
index 0000000..fc4225d
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_switch_case_break.dart
@@ -0,0 +1,37 @@
+// 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.
+
+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_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class AddSwitchCaseBreak extends CorrectionProducer {
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.ADD_SWITCH_CASE_BREAK;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.ADD_SWITCH_CASE_BREAK_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var node = this.node;
+    if (node is! SwitchCase) return;
+
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(node.end, (builder) {
+        builder.write(eol);
+        builder.write(utils.getNodePrefix(node.statements.last));
+        builder.write('break;');
+      });
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static AddSwitchCaseBreak newInstance() => AddSwitchCaseBreak();
+}
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 0d0583d..2ec24e4 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
@@ -68,7 +68,7 @@
     // Prepare the optional import prefix name.
     String? prefixName;
     if (node is PrefixedIdentifier &&
-        node.parent is TypeName &&
+        node.parent is NamedType &&
         node.prefix.staticElement is PrefixElement) {
       prefixName = node.prefix.name;
       node = node.identifier;
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 328ccc8..7bcfe13 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
@@ -6,14 +6,97 @@
 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/source/source_range.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/fixes/fixes.dart';
 
-abstract class ConvertQuotes extends CorrectionProducer {
-  ConvertQuotes();
+class ConvertQuotes extends _ConvertQuotes {
+  @override
+  late bool _fromDouble;
 
+  @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.CONVERT_QUOTES;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.CONVERT_QUOTES_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    final node = this.node;
+    if (node is SimpleStringLiteral) {
+      _fromDouble = !node.isSingleQuoted;
+      await _simpleStringLiteral(builder, node);
+      await removeBackslash(builder, node.literal);
+    } else if (node is StringInterpolation) {
+      _fromDouble = !node.isSingleQuoted;
+      await _stringInterpolation(builder, node);
+
+      for (var child in node.childEntities.whereType<InterpolationString>()) {
+        await removeBackslash(builder, child.contents);
+      }
+    }
+  }
+
+  Future<void> removeBackslash(ChangeBuilder builder, Token token) async {
+    var quote = _fromDouble ? '"' : "'";
+    var text = utils.getText(token.offset, token.length);
+    for (var i = 0; i + 1 < text.length; i++) {
+      if (text[i] == r'\' && text[i + 1] == quote) {
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addDeletion(SourceRange(token.offset + i, 1));
+        });
+        i++;
+      }
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ConvertQuotes newInstance() => ConvertQuotes();
+}
+
+class ConvertToDoubleQuotes extends _ConvertQuotes {
+  @override
+  AssistKind get assistKind => DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING;
+
+  @override
+  bool get _fromDouble => false;
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ConvertToDoubleQuotes newInstance() => ConvertToDoubleQuotes();
+}
+
+class ConvertToSingleQuotes extends _ConvertQuotes {
+  @override
+  AssistKind get assistKind => DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING;
+
+  @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.CONVERT_TO_SINGLE_QUOTED_STRING;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.CONVERT_TO_SINGLE_QUOTED_STRING_MULTI;
+
+  @override
+  bool get _fromDouble => true;
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ConvertToSingleQuotes newInstance() => ConvertToSingleQuotes();
+}
+
+abstract class _ConvertQuotes extends CorrectionProducer {
   /// Return `true` if this producer is converting from double quotes to single
   /// quotes, or `false` if it's converting from single quotes to double quotes.
   bool get _fromDouble;
@@ -31,9 +114,7 @@
   }
 
   Future<void> _simpleStringLiteral(
-    ChangeBuilder builder,
-    SimpleStringLiteral node,
-  ) async {
+      ChangeBuilder builder, SimpleStringLiteral node) async {
     if (_fromDouble ? !node.isSingleQuoted : node.isSingleQuoted) {
       var newQuote = node.isMultiline
           ? (_fromDouble ? "'''" : '"""')
@@ -56,9 +137,7 @@
   }
 
   Future<void> _stringInterpolation(
-    ChangeBuilder builder,
-    StringInterpolation node,
-  ) async {
+      ChangeBuilder builder, StringInterpolation node) async {
     if (_fromDouble ? !node.isSingleQuoted : node.isSingleQuoted) {
       var newQuote = node.isMultiline
           ? (_fromDouble ? "'''" : '"""')
@@ -87,41 +166,3 @@
     }
   }
 }
-
-class ConvertToDoubleQuotes extends ConvertQuotes {
-  ConvertToDoubleQuotes();
-
-  @override
-  AssistKind get assistKind => DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING;
-
-  @override
-  bool get _fromDouble => false;
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static ConvertToDoubleQuotes newInstance() => ConvertToDoubleQuotes();
-}
-
-class ConvertToSingleQuotes extends ConvertQuotes {
-  ConvertToSingleQuotes();
-
-  @override
-  AssistKind get assistKind => DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING;
-
-  @override
-  bool get canBeAppliedInBulk => true;
-
-  @override
-  bool get canBeAppliedToFile => true;
-
-  @override
-  FixKind get fixKind => DartFixKind.CONVERT_TO_SINGLE_QUOTED_STRING;
-
-  @override
-  FixKind get multiFixKind => DartFixKind.CONVERT_TO_SINGLE_QUOTED_STRING_MULTI;
-
-  @override
-  bool get _fromDouble => true;
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static ConvertToSingleQuotes newInstance() => ConvertToSingleQuotes();
-}
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 8d9d8d4..4e1c0eb 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
@@ -49,7 +49,7 @@
     //
     // Extract the information needed to build the edit.
     //
-    var constructorTypeArguments = creation.constructorName.type.typeArguments;
+    var constructorTypeArguments = creation.constructorName.type2.typeArguments;
     //
     // Build the edit.
     //
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 cbc6f18..1704cda 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
@@ -51,7 +51,7 @@
     //
     // Extract the information needed to build the edit.
     //
-    var constructorTypeArguments = creation.constructorName.type.typeArguments;
+    var constructorTypeArguments = creation.constructorName.type2.typeArguments;
     //
     // Build the edit.
     //
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 158a890..8ebe7c7 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
@@ -66,7 +66,7 @@
       //
       var name = creation.constructorName.name;
       var constructorTypeArguments =
-          creation.constructorName.type.typeArguments;
+          creation.constructorName.type2.typeArguments;
       TypeArgumentList? elementTypeArguments;
       SourceRange? elementsRange;
       if (name == null) {
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 1e367b0..e476729 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
@@ -63,7 +63,7 @@
     }
 
     // prepare target interface type
-    var targetType = _constructorName.type.type;
+    var targetType = _constructorName.type2.type;
     if (targetType is! InterfaceType) {
       return;
     }
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 dbc9020..b9934c4 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
@@ -28,7 +28,7 @@
     if (node is SimpleIdentifier) {
       var parent = node.parent;
       var grandParent = parent?.parent;
-      if (parent is TypeName &&
+      if (parent is NamedType &&
           grandParent is ConstructorName &&
           grandParent.parent is InstanceCreationExpression) {
         return;
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 c88cbcf..34ecd3a 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
@@ -23,7 +23,7 @@
   @override
   Future<void> compute(ChangeBuilder builder) async {
     var widgetClass = node.thisOrAncestorOfType<ClassDeclaration>();
-    var superclass = widgetClass?.extendsClause?.superclass;
+    var superclass = widgetClass?.extendsClause?.superclass2;
     if (widgetClass == null || superclass == null) {
       return;
     }
@@ -92,8 +92,7 @@
             }
           }
         }
-      }
-      if (member is MethodDeclaration && !member.isStatic) {
+      } else if (member is MethodDeclaration && !member.isStatic) {
         nodesToMove.add(member);
         elementsToMove.add(member.declaredElement!);
       }
@@ -177,8 +176,9 @@
       for (var node in widgetClass.members) {
         if (nodesToMove.contains(node)) {
           if (replaceOffset == 0) {
-            var linesRange = utils.getLinesRange(range.node(node));
-            replaceOffset = linesRange.offset;
+            var comments = node.beginToken.precedingComments;
+            var start = comments ?? node;
+            replaceOffset = utils.getLineContentStart(start.offset);
           }
           if (node == buildMethod) {
             hasBuildMethod = true;
@@ -236,6 +236,14 @@
           if (writeEmptyLine) {
             builder.writeln();
           }
+
+          var comments = member.beginToken.precedingComments;
+          if (comments != null) {
+            var offset = utils.getLineContentStart(comments.offset);
+            var length = comments.end - offset;
+            builder.writeln(utils.getText(offset, length));
+          }
+
           var text = rewriteWidgetMemberReferences(member);
           builder.write(text);
           // Write empty lines between members, but not before the first.
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 a3cd739..415f155 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
@@ -143,7 +143,7 @@
     }
     if (node is PrefixedIdentifier) {
       var parent = node.parent;
-      if (parent is TypeName) {
+      if (parent is NamedType) {
         return true;
       }
     }
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 6e71c21..0ae8706 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
@@ -151,18 +151,18 @@
 class _ReferenceFinder extends RecursiveAstVisitor {
   final String typeName;
 
-  TypeName? reference;
+  NamedType? reference;
 
   int count = 0;
 
   _ReferenceFinder(this.typeName);
 
   @override
-  void visitTypeName(TypeName node) {
+  void visitNamedType(NamedType node) {
     if (node.name.name == typeName) {
       reference ??= node;
       count++;
     }
-    super.visitTypeName(node);
+    super.visitNamedType(node);
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_conditional_on_debug_mode.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_conditional_on_debug_mode.dart
new file mode 100644
index 0000000..af6ad99
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_conditional_on_debug_mode.dart
@@ -0,0 +1,56 @@
+// 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.
+
+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_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class MakeConditionalOnDebugMode extends CorrectionProducer {
+  /// The URI of the library in which kDebugMode is declared.
+  static final Uri _foundationUri =
+      Uri.parse('package:flutter/foundation.dart');
+
+  @override
+  // This fix isn't enabled for fix-all or bulk fix because it doesn't currently
+  // account for having multiple `print` invocations in sequence.
+  bool get canBeAppliedToFile => false;
+
+  @override
+  FixKind get fixKind => DartFixKind.MAKE_CONDITIONAL_ON_DEBUG_MODE;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    if (resolvedResult.session.uriConverter.uriToPath(_foundationUri) == null) {
+      return;
+    }
+    final node = this.node;
+    var parent = node.parent;
+    var grandparent = parent?.parent;
+    if (node is SimpleIdentifier &&
+        parent is MethodInvocation &&
+        parent.methodName == node &&
+        node.name == 'print' &&
+        grandparent is ExpressionStatement) {
+      var indent = utils.getLinePrefix(grandparent.offset);
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(grandparent.offset, (builder) {
+          builder.writeln('if (kDebugMode) {');
+          builder.write(indent);
+          builder.write(utils.getIndent(1));
+        });
+        builder.addInsertion(grandparent.end, (builder) {
+          builder.writeln();
+          builder.write(indent);
+          builder.write('}');
+        });
+      });
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static MakeConditionalOnDebugMode newInstance() =>
+      MakeConditionalOnDebugMode();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_field_public.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_field_public.dart
new file mode 100644
index 0000000..16025e4
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_field_public.dart
@@ -0,0 +1,82 @@
+// 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.
+
+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_core.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+
+class MakeFieldPublic extends CorrectionProducer {
+  late String _fieldName;
+
+  @override
+  List<Object>? get fixArguments => [_fieldName];
+
+  @override
+  FixKind get fixKind => DartFixKind.MAKE_FIELD_PUBLIC;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var node = this.node;
+    if (node is! SimpleIdentifier) {
+      return;
+    }
+    var getterName = node.name;
+    _fieldName = '_$getterName';
+    var parent = node.parent;
+    if (parent is MethodDeclaration && parent.name == node && parent.isGetter) {
+      var container = parent.parent;
+      if (container is ClassOrMixinDeclaration) {
+        var members = container.members;
+        MethodDeclaration? setter;
+        VariableDeclaration? field;
+        for (var member in members) {
+          if (member is MethodDeclaration &&
+              member.name.name == getterName &&
+              member.isSetter) {
+            setter = member;
+          } else if (member is FieldDeclaration) {
+            for (var variable in member.fields.variables) {
+              if (variable.name.name == _fieldName) {
+                field = variable;
+              }
+            }
+          }
+        }
+        if (setter == null || field == null) {
+          return;
+        }
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addSimpleReplacement(range.node(field!.name), getterName);
+          builder.removeMember(members, parent);
+          builder.removeMember(members, setter!);
+        });
+      }
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static MakeFieldPublic newInstance() => MakeFieldPublic();
+}
+
+extension on DartFileEditBuilder {
+  void removeMember(NodeList<ClassMember> members, ClassMember member) {
+    // TODO(brianwilkerson) Consider moving this to DartFileEditBuilder.
+    var index = members.indexOf(member);
+    if (index == 0) {
+      if (members.length == 1) {
+        // TODO(brianwilkerson) Remove the whitespace before and after the
+        //  member.
+        addDeletion(range.node(member));
+      } else {
+        addDeletion(range.startStart(member, members[index + 1]));
+      }
+    } else {
+      addDeletion(range.endEnd(members[index - 1], member));
+    }
+  }
+}
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
index 2f2107d..146e42b 100644
--- 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
@@ -25,6 +25,11 @@
       return;
     }
 
+    final type = node.staticType;
+    if (type == null) {
+      return;
+    }
+
     var body = node.thisOrAncestorOfType<FunctionBody>();
     if (body == null) {
       return;
@@ -37,22 +42,22 @@
 
     if (body.isAsynchronous || body.isGenerator) {
       if (returnType is! NamedType) {
-        return null;
+        return;
       }
       var typeArguments = returnType.typeArguments;
       if (typeArguments == null) {
-        return null;
+        return;
       }
       var arguments = typeArguments.arguments;
       if (arguments.length != 1) {
-        return null;
+        return;
       }
       returnType = arguments[0];
     }
 
     if (node is! NullLiteral &&
-        !typeSystem.isAssignableTo(returnType.typeOrThrow,
-            typeSystem.promoteToNonNull(node.typeOrThrow))) {
+        !typeSystem.isAssignableTo(
+            returnType.typeOrThrow, typeSystem.promoteToNonNull(type))) {
       return;
     }
 
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 0230ec5..417a2cf 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
@@ -27,17 +27,17 @@
       return;
     }
 
-    var typeName = creation.constructorName.type;
-    if (typeName.typeArguments != null) {
+    var namedType = creation.constructorName.type2;
+    if (namedType.typeArguments != null) {
       return;
     }
 
-    var element = typeName.typeOrThrow.element;
+    var element = namedType.typeOrThrow.element;
     if (element is ClassElement &&
         element.typeParameters.length == typeArguments.arguments.length) {
       await builder.addDartFileEdit(file, (builder) {
         var argumentText = utils.getNodeText(typeArguments);
-        builder.addSimpleInsertion(typeName.end, argumentText);
+        builder.addSimpleInsertion(namedType.end, argumentText);
         builder.addDeletion(range.node(typeArguments));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_abstract.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_abstract.dart
new file mode 100644
index 0000000..7a6dc30b
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_abstract.dart
@@ -0,0 +1,37 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.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';
+
+class RemoveAbstract extends CorrectionProducerWithDiagnostic {
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.REMOVE_ABSTRACT;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.REMOVE_ABSTRACT_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    // 'abstract' keyword does not exist in AST
+    var offset = diagnostic.problemMessage.offset;
+    var content = resolvedResult.content;
+    var i = offset + 'abstract '.length;
+    while (content[i].trim().isEmpty) {
+      i++;
+    }
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addDeletion(SourceRange(offset, i - offset));
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static RemoveAbstract newInstance() => RemoveAbstract();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_constructor_name.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_constructor_name.dart
new file mode 100644
index 0000000..059bb3b
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_constructor_name.dart
@@ -0,0 +1,39 @@
+// 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.
+
+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_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+
+class RemoveConstructorName extends CorrectionProducer {
+  @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.REMOVE_CONSTRUCTOR_NAME;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.REMOVE_CONSTRUCTOR_NAME_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    final identifier = node;
+    if (identifier is! SimpleIdentifier) return;
+
+    // The '.' in ".new"
+    var dotToken = identifier.token.previous!;
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addDeletion(range.startStart(dotToken, identifier.token.next!));
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static RemoveConstructorName newInstance() => RemoveConstructorName();
+}
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 945b3b6..ff50a63 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
@@ -33,7 +33,7 @@
         return;
       }
     }
-    if (targetNode is TypeName) {
+    if (targetNode is NamedType) {
       var questionMark = targetNode.question;
       if (questionMark == null) {
         return;
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 4763735..850bba2 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
@@ -11,7 +11,7 @@
 
 class RemoveUnnecessaryCast extends CorrectionProducer {
   @override
-  bool get canBeAppliedInBulk => false;
+  bool get canBeAppliedInBulk => true;
 
   @override
   bool get canBeAppliedToFile => true;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_raw_string.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_raw_string.dart
new file mode 100644
index 0000000..4c3e05a
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_raw_string.dart
@@ -0,0 +1,38 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.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';
+
+class RemoveUnnecessaryRawString extends CorrectionProducer {
+  @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_RAW_STRING;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.REMOVE_UNNECESSARY_RAW_STRING_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var offset = diagnostic?.problemMessage.offset;
+    if (offset == null) {
+      return;
+    }
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addDeletion(SourceRange(offset, 1));
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static RemoveUnnecessaryRawString newInstance() =>
+      RemoveUnnecessaryRawString();
+}
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 ba9b690..adc0a5e 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
@@ -116,8 +116,9 @@
       sourceRanges.add(sourceRange);
     }
 
+    final uniqueSourceRanges = _uniqueSourceRanges(sourceRanges);
     await builder.addDartFileEdit(file, (builder) {
-      for (var sourceRange in sourceRanges) {
+      for (var sourceRange in uniqueSourceRanges) {
         builder.addDeletion(sourceRange);
       }
     });
@@ -182,6 +183,24 @@
     }
   }
 
+  /// Return [SourceRange]s that are not covered by other in [ranges].
+  /// If there is any intersection, it must be fully covered, never partially.
+  List<SourceRange> _uniqueSourceRanges(List<SourceRange> ranges) {
+    var result = <SourceRange>[];
+    candidates:
+    for (var candidate in ranges) {
+      for (var other in ranges) {
+        if (identical(candidate, other)) {
+          continue;
+        } else if (candidate.coveredBy(other)) {
+          continue candidates;
+        }
+      }
+      result.add(candidate);
+    }
+    return result;
+  }
+
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
   static RemoveUnusedField newInstance() => RemoveUnusedField();
 }
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 c19cf4a..fb29e4f 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
@@ -15,13 +15,13 @@
   @override
   Future<void> compute(ChangeBuilder builder) async {
     // prepare the existing type
-    var typeName = node.thisOrAncestorOfType<TypeAnnotation>();
-    if (typeName == null) {
+    var typeAnnotation = node.thisOrAncestorOfType<TypeAnnotation>();
+    if (typeAnnotation == null) {
       return;
     }
 
     await builder.addDartFileEdit(file, (builder) {
-      builder.replaceTypeWithFuture(typeName, typeProvider);
+      builder.replaceTypeWithFuture(typeAnnotation, typeProvider);
     });
   }
 
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 860e620..176694e 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
@@ -15,10 +15,10 @@
 
   @override
   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) {
-      var elementType = (typeName.type as InterfaceType).typeArguments[0];
+    var namedType = node is SimpleIdentifier ? node.parent : node;
+    var creation = namedType?.parent?.parent;
+    if (namedType is NamedType && creation is InstanceCreationExpression) {
+      var elementType = (namedType.type as InterfaceType).typeArguments[0];
       if (typeSystem.isNullable(elementType)) {
         var argumentList = creation.argumentList;
         if (argumentList.arguments.length == 1) {
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 8f0f19b..9c84f73 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
@@ -43,6 +43,16 @@
             builder.write(utils.getNodeText(expression.function));
           });
         });
+      } else if (expression is InstanceCreationExpression) {
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addReplacement(range.node(ancestor), (builder) {
+            var constructorName = expression.constructorName;
+            builder.write(utils.getNodeText(constructorName));
+            if (constructorName.name == null) {
+              builder.write('.new');
+            }
+          });
+        });
       }
     }
 
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 b1236c9..a5f687c 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
@@ -67,9 +67,9 @@
               }
             }
           } else if (initializer is InstanceCreationExpression) {
-            if (initializer.constructorName.type.typeArguments == null) {
+            if (initializer.constructorName.type2.typeArguments == null) {
               typeArgumentsText = utils.getNodeText(typeArguments);
-              typeArgumentsOffset = initializer.constructorName.type.end;
+              typeArgumentsOffset = initializer.constructorName.type2.end;
             }
           }
         }
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 4cab9d2..2ade5a5 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
@@ -72,6 +72,11 @@
   }
 
   /// Return an instance of this class that will update the SDK constraints to
+  /// '2.14.0'. Used as a tear-off in `FixProcessor`.
+  static UpdateSdkConstraints version_2_14_0() =>
+      UpdateSdkConstraints('2.14.0');
+
+  /// Return an instance of this class that will update the SDK constraints to
   /// '2.1.0'. Used as a tear-off in `FixProcessor`.
   static UpdateSdkConstraints version_2_1_0() => UpdateSdkConstraints('2.1.0');
 
diff --git a/pkg/analysis_server/lib/src/services/correction/executable_parameters.dart b/pkg/analysis_server/lib/src/services/correction/executable_parameters.dart
index 7200eec..824b3eb 100644
--- a/pkg/analysis_server/lib/src/services/correction/executable_parameters.dart
+++ b/pkg/analysis_server/lib/src/services/correction/executable_parameters.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:core';
-
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 1d19faa..dd5593b 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -234,6 +234,16 @@
     DartFixKindPriority.DEFAULT,
     'Add super constructor {0} invocation',
   );
+  static const ADD_SWITCH_CASE_BREAK = FixKind(
+    'dart.fix.add.switchCaseReturn',
+    DartFixKindPriority.DEFAULT,
+    "Add 'break'",
+  );
+  static const ADD_SWITCH_CASE_BREAK_MULTI = FixKind(
+    'dart.fix.add.switchCaseReturn.multi',
+    DartFixKindPriority.IN_FILE,
+    "Add 'break' everywhere in file",
+  );
   static const ADD_TYPE_ANNOTATION = FixKind(
     'dart.fix.add.typeAnnotation',
     DartFixKindPriority.DEFAULT,
@@ -299,6 +309,16 @@
     DartFixKindPriority.IN_FILE,
     'Convert to expression bodies everywhere in file',
   );
+  static const CONVERT_QUOTES = FixKind(
+    'dart.fix.convert.quotes',
+    DartFixKindPriority.DEFAULT,
+    'Convert the quotes and remove escapes',
+  );
+  static const CONVERT_QUOTES_MULTI = FixKind(
+    'dart.fix.convert.quotes.multi',
+    DartFixKindPriority.IN_FILE,
+    'Convert the quotes and remove escapes everywhere in file',
+  );
   static const CONVERT_TO_CONTAINS = FixKind(
     'dart.fix.convert.toContains',
     DartFixKindPriority.DEFAULT,
@@ -661,6 +681,11 @@
     DartFixKindPriority.DEFAULT,
     "Make field '{0}' not final",
   );
+  static const MAKE_FIELD_PUBLIC = FixKind(
+    'dart.fix.makeFieldPublic',
+    DartFixKindPriority.DEFAULT,
+    "Make field '{0}' public",
+  );
   static const MAKE_FINAL = FixKind(
     'dart.fix.makeFinal',
     DartFixKindPriority.DEFAULT,
@@ -683,6 +708,11 @@
     DartFixKindPriority.DEFAULT,
     'Move type arguments to after class name',
   );
+  static const MAKE_CONDITIONAL_ON_DEBUG_MODE = FixKind(
+    'dart.fix.flutter.makeConditionalOnDebugMode',
+    DartFixKindPriority.DEFAULT,
+    "Make conditional on 'kDebugMode'",
+  );
   static const MAKE_VARIABLE_NOT_FINAL = FixKind(
     'dart.fix.makeVariableNotFinal',
     DartFixKindPriority.DEFAULT,
@@ -703,6 +733,16 @@
     DartFixKindPriority.DEFAULT,
     "Use '{0}'",
   );
+  static const REMOVE_ABSTRACT = FixKind(
+    'dart.fix.remove.abstract',
+    DartFixKindPriority.DEFAULT,
+    "Remove the 'abstract' keyword",
+  );
+  static const REMOVE_ABSTRACT_MULTI = FixKind(
+    'dart.fix.remove.abstract.multi',
+    DartFixKindPriority.IN_FILE,
+    "Remove the 'abstract' keyword everywhere in file",
+  );
   static const REMOVE_ANNOTATION = FixKind(
     'dart.fix.remove.annotation',
     DartFixKindPriority.DEFAULT,
@@ -745,6 +785,16 @@
     DartFixKindPriority.DEFAULT,
     'Remove const',
   );
+  static const REMOVE_CONSTRUCTOR_NAME = FixKind(
+    'dart.fix.remove.constructorName',
+    DartFixKindPriority.DEFAULT,
+    "Remove 'new'",
+  );
+  static const REMOVE_CONSTRUCTOR_NAME_MULTI = FixKind(
+    'dart.fix.remove.constructorName.multi',
+    DartFixKindPriority.IN_FILE,
+    'Remove constructor names in file',
+  );
   static const REMOVE_DEAD_CODE = FixKind(
     'dart.fix.remove.deadCode',
     DartFixKindPriority.DEFAULT,
@@ -974,6 +1024,16 @@
     DartFixKindPriority.IN_FILE,
     'Remove all unnecessary parentheses in file',
   );
+  static const REMOVE_UNNECESSARY_RAW_STRING = FixKind(
+    'dart.fix.remove.unnecessaryRawString',
+    DartFixKindPriority.DEFAULT,
+    "Remove unnecessary 'r' in string",
+  );
+  static const REMOVE_UNNECESSARY_RAW_STRING_MULTI = FixKind(
+    'dart.fix.remove.unnecessaryRawString.multi',
+    DartFixKindPriority.IN_FILE,
+    "Remove unnecessary 'r' in strings in file",
+  );
   static const REMOVE_UNNECESSARY_STRING_ESCAPE = FixKind(
     'dart.fix.remove.unnecessaryStringEscape',
     DartFixKindPriority.DEFAULT,
@@ -981,7 +1041,7 @@
   );
   static const REMOVE_UNNECESSARY_STRING_ESCAPE_MULTI = FixKind(
     'dart.fix.remove.unnecessaryStringEscape.multi',
-    DartFixKindPriority.DEFAULT,
+    DartFixKindPriority.IN_FILE,
     "Remove unnecessary '\\' in strings in file",
   );
   static const REMOVE_UNNECESSARY_STRING_INTERPOLATION = FixKind(
@@ -1136,7 +1196,7 @@
   );
   static const REPLACE_NULL_WITH_VOID_MULTI = FixKind(
     'dart.fix.replace.nullWithVoid.multi',
-    DartFixKindPriority.DEFAULT,
+    DartFixKindPriority.IN_FILE,
     "Replace 'Null' with 'void' everywhere in file",
   );
   static const REPLACE_RETURN_TYPE = FixKind(
@@ -1156,7 +1216,7 @@
   );
   static const REPLACE_CONTAINER_WITH_SIZED_BOX_MULTI = FixKind(
     'dart.fix.replace.containerWithSizedBox.multi',
-    DartFixKindPriority.DEFAULT,
+    DartFixKindPriority.IN_FILE,
     "Replace with 'SizedBox' everywhere in file",
   );
   static const REPLACE_VAR_WITH_DYNAMIC = FixKind(
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/accessor.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/accessor.dart
index bd0dde1..4f0972c 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/accessor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/accessor.dart
@@ -114,7 +114,7 @@
     if (node is ExtensionOverride) {
       return node.typeArguments;
     } else if (node is InstanceCreationExpression) {
-      return node.constructorName.type.typeArguments;
+      return node.constructorName.type2.typeArguments;
     } else if (node is InvocationExpression) {
       return node.typeArguments;
     } else if (node is NamedType) {
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/code_template.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/code_template.dart
index ce509a1..9599855 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/code_template.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/code_template.dart
@@ -100,7 +100,7 @@
         return parent.parent?.parent?.parent;
       } else if (parent is MethodInvocation && parent.methodName == node) {
         return parent;
-      } else if (parent is TypeName &&
+      } else if (parent is NamedType &&
           parent.parent is ConstructorName &&
           parent.parent?.parent is InstanceCreationExpression) {
         return parent.parent?.parent;
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
index 1c24767..4b9619d 100644
--- 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
@@ -52,7 +52,7 @@
           }
         } else if (node is InstanceCreationExpression) {
           var name = node.constructorName;
-          var className = _nameFromIdentifier(name.type.name);
+          var className = _nameFromIdentifier(name.type2.name);
           var constructorName = name.name?.name ?? '';
           if (components[0] == constructorName && components[1] == className) {
             return true;
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
index 51b100f..49751f1 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix/data_driven/element_kind.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart'
-    show ClassElement, ExtensionElement;
+    show ClassElement, ExtensionElement, PrefixElement;
 import 'package:analyzer/dart/element/type.dart';
 
 /// An object that can be used to determine whether an element is appropriate
@@ -127,19 +127,25 @@
         // don't represent parameters as elements, the element we need to match
         // against is the invocation containing those arguments.
         return _componentsFromParent(parent.parent!.parent!);
-      } else if (parent is TypeName && parent.parent is ConstructorName) {
+      } else if (parent is NamedType && parent.parent is ConstructorName) {
         return ['', node.name];
       } else if (parent is MethodDeclaration && node == parent.name) {
         return [node.name];
-      } else if ((parent is MethodInvocation && node == parent.methodName) ||
-          (parent is PrefixedIdentifier && node == parent.identifier) ||
-          (parent is PropertyAccess && node == parent.propertyName)) {
+      } else if ((parent is MethodInvocation &&
+              node == parent.methodName &&
+              !_isPrefix(parent.target)) ||
+          (parent is PrefixedIdentifier &&
+              node == parent.identifier &&
+              !_isPrefix(parent.prefix)) ||
+          (parent is PropertyAccess &&
+              node == parent.propertyName &&
+              !_isPrefix(parent.target))) {
         return _componentsFromParent(node);
       }
       return _componentsFromIdentifier(node);
     } else if (node is PrefixedIdentifier) {
       var parent = node.parent;
-      if (parent is TypeName && parent.parent is ConstructorName) {
+      if (parent is NamedType && parent.parent is ConstructorName) {
         return ['', node.identifier.name];
       }
       return [node.identifier.name];
@@ -199,7 +205,10 @@
       return [parent.extensionName.name];
     } else if (parent is InstanceCreationExpression) {
       var constructorName = parent.constructorName;
-      return [constructorName.name?.name ?? '', constructorName.type.name.name];
+      return [
+        constructorName.name?.name ?? '',
+        constructorName.type2.name.name
+      ];
     } else if (parent is MethodInvocation) {
       var methodName = parent.methodName;
       var targetName = _nameOfTarget(parent.realTarget);
@@ -259,6 +268,11 @@
     return importedUris;
   }
 
+  /// Return `true` if the [node] is a prefix
+  static bool _isPrefix(AstNode? node) {
+    return node is SimpleIdentifier && node.staticElement is PrefixElement;
+  }
+
   /// Return the kinds of elements that could reasonably be referenced at the
   /// location of the [node]. If [child] is not `null` then the [node] is a
   /// parent of the [child].
@@ -280,7 +294,9 @@
           ElementKind.enumKind,
           ElementKind.mixinKind
         ];
-      } else if (node.realTarget != null) {
+      }
+      var realTarget = node.realTarget;
+      if (realTarget != null && !_isPrefix(realTarget)) {
         return const [ElementKind.constructorKind, ElementKind.methodKind];
       }
       return const [
@@ -301,7 +317,8 @@
         ElementKind.typedefKind
       ];
     } else if (node is PrefixedIdentifier) {
-      if (node.prefix == child) {
+      var prefix = node.prefix;
+      if (prefix == child) {
         return const [
           ElementKind.classKind,
           ElementKind.enumKind,
@@ -309,6 +326,26 @@
           ElementKind.mixinKind,
           ElementKind.typedefKind
         ];
+      } else if (prefix.staticElement is PrefixElement) {
+        var parent = node.parent;
+        if ((parent is NamedType && parent.parent is! ConstructorName) ||
+            (parent is PropertyAccess && parent.target == node)) {
+          return const [
+            ElementKind.classKind,
+            ElementKind.enumKind,
+            ElementKind.extensionKind,
+            ElementKind.mixinKind,
+            ElementKind.typedefKind
+          ];
+        }
+        return const [
+          // If the old class has been removed then this might have been a
+          // constructor invocation.
+          ElementKind.constructorKind,
+          ElementKind.getterKind,
+          ElementKind.setterKind,
+          ElementKind.variableKind
+        ];
       }
       return const [
         ElementKind.fieldKind,
@@ -316,7 +353,11 @@
         ElementKind.setterKind
       ];
     } else if (node is PropertyAccess) {
-      return const [ElementKind.getterKind, ElementKind.setterKind];
+      return const [
+        ElementKind.fieldKind,
+        ElementKind.getterKind,
+        ElementKind.setterKind
+      ];
     } else if (node is SimpleIdentifier) {
       return _kindsForNode(node.parent, child: node);
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
index 56e83f4..c71ea13 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/modify_parameters.dart
@@ -244,7 +244,7 @@
     } else if (grandParent is InvocationExpression) {
       var argumentList = grandParent.argumentList;
       return _Data(argumentList);
-    } else if (parent is TypeName &&
+    } else if (parent is NamedType &&
         grandParent is ConstructorName &&
         greatGrandParent is InstanceCreationExpression) {
       var argumentList = greatGrandParent.argumentList;
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
index d3089e9..c825366 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename.dart
@@ -48,7 +48,11 @@
           // named constructor.
           builder.addSimpleReplacement(range.node(nameNode), newName);
         }
-      } else if (parent is TypeName && parent.parent is ConstructorName) {
+      } else if (parent is NamedType && parent.parent is ConstructorName) {
+        // The constructor was renamed from an unnamed constructor to a named
+        // constructor.
+        builder.addSimpleInsertion(parent.end, '.$newName');
+      } else if (parent is PrefixedIdentifier) {
         // The constructor was renamed from an unnamed constructor to a named
         // constructor.
         builder.addSimpleInsertion(parent.end, '.$newName');
@@ -81,6 +85,8 @@
       return _Data(node);
     } else if (node is ConstructorName) {
       return _Data(node.name);
+    } else if (node is PrefixedIdentifier) {
+      return _Data(node.identifier);
     }
     return null;
   }
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 d0e51d0..7454202 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.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:core';
-
 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
 import 'package:analysis_server/src/services/correction/base_processor.dart';
@@ -30,6 +28,7 @@
 import 'package:analysis_server/src/services/correction/dart/add_return_type.dart';
 import 'package:analysis_server/src/services/correction/dart/add_static.dart';
 import 'package:analysis_server/src/services/correction/dart/add_super_constructor_invocation.dart';
+import 'package:analysis_server/src/services/correction/dart/add_switch_case_break.dart';
 import 'package:analysis_server/src/services/correction/dart/add_type_annotation.dart';
 import 'package:analysis_server/src/services/correction/dart/change_argument_name.dart';
 import 'package:analysis_server/src/services/correction/dart/change_to.dart';
@@ -85,7 +84,9 @@
 import 'package:analysis_server/src/services/correction/dart/inline_typedef.dart';
 import 'package:analysis_server/src/services/correction/dart/insert_semicolon.dart';
 import 'package:analysis_server/src/services/correction/dart/make_class_abstract.dart';
+import 'package:analysis_server/src/services/correction/dart/make_conditional_on_debug_mode.dart';
 import 'package:analysis_server/src/services/correction/dart/make_field_not_final.dart';
+import 'package:analysis_server/src/services/correction/dart/make_field_public.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';
@@ -98,6 +99,7 @@
 import 'package:analysis_server/src/services/correction/dart/remove_await.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_comparison.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_const.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_constructor_name.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_dead_code.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_dead_if_null.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_duplicate_case.dart';
@@ -122,6 +124,7 @@
 import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_cast.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_new.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_parentheses.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_raw_string.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_string_escape.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_string_interpolation.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_unused.dart';
@@ -178,6 +181,8 @@
 import 'package:analyzer_plugin/utilities/change_builder/conflicting_edit_exception.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart' hide FixContributor;
 
+import 'dart/remove_abstract.dart';
+
 /// A function that can be executed to create a multi-correction producer.
 typedef MultiProducerGenerator = MultiCorrectionProducer Function();
 
@@ -340,6 +345,9 @@
     LintNames.avoid_empty_else: [
       RemoveEmptyElse.newInstance,
     ],
+    LintNames.avoid_escaping_inner_quotes: [
+      ConvertQuotes.newInstance,
+    ],
     LintNames.avoid_function_literals_in_foreach_calls: [
       ConvertForEachToForLoop.newInstance,
     ],
@@ -349,6 +357,9 @@
     LintNames.avoid_null_checks_in_equality_operators: [
       RemoveComparison.newInstanceBulkFixable,
     ],
+    LintNames.avoid_print: [
+      MakeConditionalOnDebugMode.newInstance,
+    ],
     LintNames.avoid_private_typedef_functions: [
       InlineTypedef.newInstance,
     ],
@@ -443,17 +454,17 @@
       ReplaceWithConditionalAssignment.newInstance,
     ],
     LintNames.prefer_const_constructors: [
-      AddConst.toInvocation,
+      AddConst.newInstance,
       ReplaceNewWithConst.newInstance,
     ],
     LintNames.prefer_const_constructors_in_immutables: [
-      AddConst.toDeclaration,
+      AddConst.newInstance,
     ],
     LintNames.prefer_const_declarations: [
       ReplaceFinalWithConst.newInstance,
     ],
     LintNames.prefer_const_literals_to_create_immutables: [
-      AddConst.toLiteral,
+      AddConst.newInstance,
     ],
     LintNames.prefer_contains: [
       ConvertToContains.newInstance,
@@ -558,9 +569,15 @@
     LintNames.unnecessary_const: [
       RemoveUnnecessaryConst.newInstance,
     ],
+    LintNames.unnecessary_constructor_name: [
+      RemoveConstructorName.newInstance,
+    ],
     LintNames.unnecessary_final: [
       ReplaceFinalWithVar.newInstance,
     ],
+    LintNames.unnecessary_getters_setters: [
+      MakeFieldPublic.newInstance,
+    ],
     LintNames.unnecessary_lambdas: [
       ReplaceWithTearOff.newInstance,
     ],
@@ -579,6 +596,9 @@
     LintNames.unnecessary_parenthesis: [
       RemoveUnnecessaryParentheses.newInstance,
     ],
+    LintNames.unnecessary_raw_strings: [
+      RemoveUnnecessaryRawString.newInstance,
+    ],
     LintNames.unnecessary_string_escapes: [
       RemoveUnnecessaryStringEscape.newInstance,
     ],
@@ -712,6 +732,9 @@
     CompileTimeErrorCode.UNDEFINED_OPERATOR: [
       ImportLibrary.forExtensionMember,
     ],
+    CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME: [
+      DataDriven.newInstance,
+    ],
     CompileTimeErrorCode.UNDEFINED_SETTER: [
       DataDriven.newInstance,
       // TODO(brianwilkerson) Support ImportLibrary for non-extension members.
@@ -930,6 +953,9 @@
       MakeReturnTypeNullable.newInstance,
       ReplaceReturnType.newInstance,
     ],
+    CompileTimeErrorCode.SWITCH_CASE_COMPLETES_NORMALLY: [
+      AddSwitchCaseBreak.newInstance,
+    ],
     CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
       ChangeTo.classOrMixin,
       CreateClass.newInstance,
@@ -1146,7 +1172,7 @@
       UpdateSdkConstraints.version_2_6_0,
     ],
     HintCode.SDK_VERSION_GT_GT_GT_OPERATOR: [
-      UpdateSdkConstraints.version_2_2_2,
+      UpdateSdkConstraints.version_2_14_0,
     ],
     HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT: [
       UpdateSdkConstraints.version_2_2_2,
@@ -1211,6 +1237,9 @@
     HintCode.UNUSED_SHOWN_NAME: [
       RemoveNameFromCombinator.newInstance,
     ],
+    ParserErrorCode.ABSTRACT_CLASS_MEMBER: [
+      RemoveAbstract.newInstance,
+    ],
     ParserErrorCode.EXPECTED_TOKEN: [
       InsertSemicolon.newInstance,
     ],
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 f501ed0..da822b8 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -181,8 +181,8 @@
     name = expression.methodName.name;
   } else if (expression is InstanceCreationExpression) {
     var constructorName = expression.constructorName;
-    var typeName = constructorName.type;
-    var typeNameIdentifier = typeName.name;
+    var namedType = constructorName.type2;
+    var typeNameIdentifier = namedType.name;
     // new ClassName()
     if (typeNameIdentifier is SimpleIdentifier) {
       return typeNameIdentifier.name;
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_imports.dart b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
index aacc03d..3708b48 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
@@ -350,23 +350,16 @@
   @override
   String toString() => '(priority=$priority; text=$text)';
 
+  /// Should keep these in sync! Copied from
+  /// https://github.com/dart-lang/linter/blob/658f497eef/lib/src/rules/directives_ordering.dart#L380-L387
+  /// Consider finding a way to share this code!
   static int _compareUri(String a, String b) {
-    var aList = _splitUri(a);
-    var bList = _splitUri(b);
-    int result;
-    if ((result = aList[0].compareTo(bList[0])) != 0) return result;
-    if ((result = aList[1].compareTo(bList[1])) != 0) return result;
-    return 0;
-  }
-
-  /// Split the given [uri] like `package:some.name/and/path.dart` into a list
-  /// like `[package:some.name, and/path.dart]`.
-  static List<String> _splitUri(String uri) {
-    var index = uri.indexOf('/');
-    if (index == -1) {
-      return <String>[uri, ''];
-    }
-    return <String>[uri.substring(0, index), uri.substring(index + 1)];
+    var indexA = a.indexOf('/');
+    var indexB = b.indexOf('/');
+    if (indexA == -1 || indexB == -1) return a.compareTo(b);
+    var result = a.substring(0, indexA).compareTo(b.substring(0, indexB));
+    if (result != 0) return result;
+    return a.substring(indexA + 1).compareTo(b.substring(indexB + 1));
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
index ced0ca3..cbc0bc4 100644
--- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
+++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -295,15 +295,15 @@
       // ClassDeclarations) and super.visitClassTypeAlias is not sufficient.
       //
       _handleRefEdge(
-        node.superclass.name.staticElement,
+        node.superclass2.name.staticElement,
         const <String>[schema.REF_EDGE],
-        syntacticEntity: node.superclass,
+        syntacticEntity: node.superclass2,
       );
       // TODO(jwren) refactor the following lines into a method that can be used
       // by visitClassDeclaration()
       // extends
       var recordSupertypeVName = _vNameFromElement(
-          node.superclass.name.staticElement, schema.RECORD_KIND);
+          node.superclass2.name.staticElement, schema.RECORD_KIND);
       addEdge(_enclosingClassVName!, schema.EXTENDS_EDGE, recordSupertypeVName);
 
       // implements
@@ -558,7 +558,7 @@
     // return type
     //
     var returnType = node.returnType;
-    if (returnType is TypeName) {
+    if (returnType is NamedType) {
       _handleRefEdge(
         returnType.name.staticElement,
         const <String>[schema.REF_EDGE],
@@ -659,7 +659,7 @@
       //   assert (element.enclosingElement != null);
     }
     // visit children
-    _safelyVisitList(constructorName.type.typeArguments?.arguments);
+    _safelyVisitList(constructorName.type2.typeArguments?.arguments);
     _safelyVisit(node.argumentList);
   }
 
@@ -1235,7 +1235,7 @@
     addEdge(funcTypeVName, schema.PARAM_EDGE, fnBuiltin, ordinalIntValue: i++);
 
     KytheVName? returnTypeVName;
-    if (returnNode is TypeName) {
+    if (returnNode is NamedType) {
       // MethodDeclaration and FunctionDeclaration both return a TypeName from
       // returnType
       if (returnNode.typeOrThrow.isVoid) {
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 ccafb32..e7db85a 100644
--- a/pkg/analysis_server/lib/src/services/linter/lint_names.dart
+++ b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
@@ -13,11 +13,14 @@
   static const String avoid_annotating_with_dynamic =
       'avoid_annotating_with_dynamic';
   static const String avoid_empty_else = 'avoid_empty_else';
+  static const String avoid_escaping_inner_quotes =
+      'avoid_escaping_inner_quotes';
   static const String avoid_function_literals_in_foreach_calls =
       'avoid_function_literals_in_foreach_calls';
   static const String avoid_init_to_null = 'avoid_init_to_null';
   static const String avoid_null_checks_in_equality_operators =
       'avoid_null_checks_in_equality_operators';
+  static const String avoid_print = 'avoid_print';
   static const String avoid_private_typedef_functions =
       'avoid_private_typedef_functions';
   static const String avoid_redundant_argument_values =
@@ -111,7 +114,11 @@
   static const String unnecessary_brace_in_string_interps =
       'unnecessary_brace_in_string_interps';
   static const String unnecessary_const = 'unnecessary_const';
+  static const String unnecessary_constructor_name =
+      'unnecessary_constructor_name';
   static const String unnecessary_final = 'unnecessary_final';
+  static const String unnecessary_getters_setters =
+      'unnecessary_getters_setters';
   static const String unnecessary_lambdas = 'unnecessary_lambdas';
   static const String unnecessary_new = 'unnecessary_new';
   static const String unnecessary_null_in_if_null_operators =
@@ -120,6 +127,7 @@
       'unnecessary_nullable_for_final_variable_declarations';
   static const String unnecessary_overrides = 'unnecessary_overrides';
   static const String unnecessary_parenthesis = 'unnecessary_parenthesis';
+  static const String unnecessary_raw_strings = 'unnecessary_raw_strings';
   static const String unnecessary_string_escapes = 'unnecessary_string_escapes';
   static const String unnecessary_string_interpolations =
       'unnecessary_string_interpolations';
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
index 7d361dc..4afc45f 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
@@ -281,7 +281,7 @@
           node is TypeArgumentList) {
         continue;
       }
-      if (node is ConstructorName || node is Label || node is TypeName) {
+      if (node is ConstructorName || node is Label || node is NamedType) {
         singleExpression = null;
         coveringExpressionOffsets.clear();
         coveringExpressionLengths.clear();
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 4da1f25..4b470bf 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -966,6 +966,14 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    super.visitNamedType(node);
+    if (_isFirstSelectedNode(node)) {
+      invalidSelection('Cannot extract a single type reference.');
+    }
+  }
+
+  @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
     super.visitSimpleIdentifier(node);
     if (_isFirstSelectedNode(node)) {
@@ -987,14 +995,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    super.visitTypeName(node);
-    if (_isFirstSelectedNode(node)) {
-      invalidSelection('Cannot extract a single type reference.');
-    }
-  }
-
-  @override
   void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     if (_isFirstSelectedNode(node)) {
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
index f3e4b67..1f66fe6 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -147,13 +147,15 @@
   // local variables and functions
   {
     var localsRange = _getLocalsConflictingRange(node);
-    var enclosingExecutable = getEnclosingExecutableNode(node)!;
-    var visibleRangeMap = VisibleRangesComputer.forNode(enclosingExecutable);
-    visibleRangeMap.forEach((element, elementRange) {
-      if (elementRange.intersects(localsRange)) {
-        result.add(element.displayName);
-      }
-    });
+    var enclosingExecutable = getEnclosingExecutableNode(node);
+    if (enclosingExecutable != null) {
+      var visibleRangeMap = VisibleRangesComputer.forNode(enclosingExecutable);
+      visibleRangeMap.forEach((element, elementRange) {
+        if (elementRange.intersects(localsRange)) {
+          result.add(element.displayName);
+        }
+      });
+    }
   }
   // fields
   {
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 f768861..6e97072 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/move_file.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:core';
-
 import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
index cdb3485..05e0eb3 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
@@ -418,7 +418,7 @@
     // Rename the class when on `new` in an instance creation.
     if (node is InstanceCreationExpression) {
       var creation = node;
-      var typeIdentifier = creation.constructorName.type.name;
+      var typeIdentifier = creation.constructorName.type2.name;
       element = typeIdentifier.staticElement;
       offset = typeIdentifier.offset;
       length = typeIdentifier.length;
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
index d34c39e..b31755a 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring_internal.dart
@@ -69,6 +69,9 @@
     return hash;
   }
 
+  bool get isConstructorTearOff =>
+      _match.kind == MatchKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF;
+
   bool get isResolved => _match.isResolved;
 
   SourceRange get range => _match.sourceRange;
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
index 9940c90..dc58d49 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
@@ -62,8 +62,13 @@
       references.add(_createDeclarationReference());
     }
     // update references
-    var replacement = newName.isEmpty ? '' : '.$newName';
     for (var reference in references) {
+      String replacement;
+      if (newName.isNotEmpty) {
+        replacement = '.$newName';
+      } else {
+        replacement = reference.isConstructorTearOff ? '.new' : '';
+      }
       reference.addEdit(change, replacement);
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine.dart b/pkg/analysis_server/lib/src/services/search/search_engine.dart
index 4b61420..362216e 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine.dart
@@ -26,6 +26,10 @@
   /// A reference to an element in which it is referenced.
   static const MatchKind REFERENCE = MatchKind('REFERENCE');
 
+  /// A tear-off reference to a constructor.
+  static const MatchKind REFERENCE_BY_CONSTRUCTOR_TEAR_OFF =
+      MatchKind('REFERENCE_BY_CONSTRUCTOR_TEAR_OFF');
+
   final String name;
 
   const MatchKind(this.name);
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
index d4247e1..059c23e98 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
@@ -242,6 +242,9 @@
     if (kind == SearchResultKind.INVOCATION) {
       return MatchKind.INVOCATION;
     }
+    if (kind == SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF) {
+      return MatchKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF;
+    }
     return MatchKind.REFERENCE;
   }
 }
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index 999bc4d..a6d6d84 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -667,7 +667,7 @@
         <a href="/status" ${isNavPage ? ' class="active"' : ''}>Diagnostics</a>
         <a href="/feedback" ${isCurrentPage('/feedback') ? ' class="active"' : ''}>Feedback</a>
         <a href="https://dart.dev/tools/dart-analyze" target="_blank">Docs</a>
-        <a href="https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html" target="_blank">Spec</a>
+        <a href="https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html" target="_blank">Spec</a>
       </nav>
     </div>
     </header>
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index cb513a3..b733540 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -558,7 +558,7 @@
     if (node == null) {
       return false;
     }
-    if (node.parent is TypeName || node.parent?.parent is TypeName) {
+    if (node.parent is NamedType || node.parent?.parent is NamedType) {
       return false;
     }
     if (node.parent is ConstructorName) {
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 5629eb1..bb60379 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -3,7 +3,7 @@
 publish_to: none
 
 environment:
-  sdk: '>=2.12.0 <3.0.0'
+  sdk: '>=2.14.0 <3.0.0'
 
 dependencies:
   _fe_analyzer_shared:
@@ -39,3 +39,11 @@
   matcher: any
   pedantic: ^1.9.0
   test_reflective_loader: any
+
+dependency_overrides:
+  _fe_analyzer_shared:
+    path: ../_fe_analyzer_shared
+  analyzer:
+    path: ../analyzer
+  meta:
+    path: ../meta
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index 94e46a7..4c466d1 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -300,11 +300,6 @@
   }
 }
 
-mixin WithNullSafetyMixin on AbstractContextTest {
-  @override
-  String get testPackageLanguageVersion => '2.12';
-}
-
 /// Wraps the given [_ElementVisitorFunction] into an instance of
 /// [engine.GeneralizingElementVisitor].
 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor<void> {
diff --git a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
index 0169e37..a39c58d 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
@@ -524,6 +524,49 @@
     assertHasRegion(HighlightRegionType.CONSTRUCTOR, 'name(42)');
   }
 
+  Future<void> test_CONSTRUCTOR_TEAR_OFF_named() async {
+    addTestFile('''
+class A<T> {
+  A.named();
+}
+void f() {
+  A<int>.named;
+}
+''');
+    await prepareHighlights();
+    assertHasRegion(HighlightRegionType.CLASS, 'A<int');
+    assertHasRegion(HighlightRegionType.CLASS, 'int>');
+    assertHasRegion(HighlightRegionType.CONSTRUCTOR_TEAR_OFF, 'named;');
+  }
+
+  Future<void> test_CONSTRUCTOR_TEAR_OFF_new_declared() async {
+    addTestFile('''
+class A<T> {
+  A.new();
+}
+void f() {
+  A<int>.new;
+}
+''');
+    await prepareHighlights();
+    assertHasRegion(HighlightRegionType.CLASS, 'A<int');
+    assertHasRegion(HighlightRegionType.CLASS, 'int>');
+    assertHasRegion(HighlightRegionType.CONSTRUCTOR_TEAR_OFF, 'new;');
+  }
+
+  Future<void> test_CONSTRUCTOR_TEAR_OFF_new_synthetic() async {
+    addTestFile('''
+class A<T> {}
+void f() {
+  A<int>.new;
+}
+''');
+    await prepareHighlights();
+    assertHasRegion(HighlightRegionType.CLASS, 'A<int');
+    assertHasRegion(HighlightRegionType.CLASS, 'int>');
+    assertHasRegion(HighlightRegionType.CONSTRUCTOR_TEAR_OFF, 'new;');
+  }
+
   Future<void> test_DIRECTIVE() async {
     addTestFile('''
 library lib;
@@ -1011,7 +1054,7 @@
     await prepareHighlights();
     assertHasRegion(HighlightRegionType.LOCAL_FUNCTION_DECLARATION, 'fff() {}');
     assertHasRegion(HighlightRegionType.LOCAL_FUNCTION_REFERENCE, 'fff();');
-    assertHasRegion(HighlightRegionType.LOCAL_FUNCTION_REFERENCE, 'fff;');
+    assertHasRegion(HighlightRegionType.LOCAL_FUNCTION_TEAR_OFF, 'fff;');
   }
 
   Future<void> test_LOCAL_VARIABLE() async {
@@ -1046,9 +1089,9 @@
         HighlightRegionType.INSTANCE_METHOD_DECLARATION, 'aaa() {}');
     assertHasRegion(HighlightRegionType.STATIC_METHOD_DECLARATION, 'bbb() {}');
     assertHasRegion(HighlightRegionType.INSTANCE_METHOD_REFERENCE, 'aaa();');
-    assertHasRegion(HighlightRegionType.INSTANCE_METHOD_REFERENCE, 'aaa;');
+    assertHasRegion(HighlightRegionType.INSTANCE_METHOD_TEAR_OFF, 'aaa;');
     assertHasRegion(HighlightRegionType.STATIC_METHOD_REFERENCE, 'bbb();');
-    assertHasRegion(HighlightRegionType.STATIC_METHOD_REFERENCE, 'bbb;');
+    assertHasRegion(HighlightRegionType.STATIC_METHOD_TEAR_OFF, 'bbb;');
   }
 
   Future<void> test_METHOD_bestType() async {
@@ -1140,6 +1183,7 @@
 fff(p) {}
 void f() {
   fff(42);
+  fff;
 }
 ''');
     await prepareHighlights();
@@ -1147,6 +1191,7 @@
         HighlightRegionType.TOP_LEVEL_FUNCTION_DECLARATION, 'fff(p) {}');
     assertHasRegion(
         HighlightRegionType.TOP_LEVEL_FUNCTION_REFERENCE, 'fff(42)');
+    assertHasRegion(HighlightRegionType.TOP_LEVEL_FUNCTION_TEAR_OFF, 'fff;');
   }
 
   Future<void> test_TOP_LEVEL_VARIABLE() async {
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index f334a64..035909b 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -918,63 +918,6 @@
     assertHasTargetString('my.lib');
   }
 
-  Future<void> test_macro_simpleIdentifier_getter() async {
-    // TODO(scheglov) Use PubPackageResolutionTest?
-    newFile('$projectPath/pubspec.yaml', content: '');
-
-    newFile('$projectPath/bin/macro_annotations.dart', content: r'''
-library analyzer.macro.annotations;
-const observable = 0;
-''');
-
-    addTestFile(r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-}
-
-void f(A a) {
-  a.foo;
-}
-''');
-
-    await prepareNavigation();
-    assertHasRegionString('foo;', 3);
-
-    var generatedFile = getFile(
-      '/project/.dart_tool/analyzer/macro/bin/test.dart',
-    );
-
-    var generatedContent = generatedFile.readAsStringSync();
-    expect(generatedContent, r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-
-  int get foo => _foo;
-
-  set foo(int val) {
-    print('Setting foo to ${val}');
-    _foo = val;
-  }
-}
-
-void f(A a) {
-  a.foo;
-}
-''');
-
-    assertHasFileTarget(
-      generatedFile.path,
-      generatedContent.indexOf('foo =>'),
-      'foo'.length,
-    );
-  }
-
   Future<void> test_multiplyDefinedElement() async {
     newFile('$projectPath/bin/libA.dart', content: 'library A; int TEST = 1;');
     newFile('$projectPath/bin/libB.dart', content: 'library B; int TEST = 2;');
diff --git a/pkg/analysis_server/test/client/completion_driver_test.dart b/pkg/analysis_server/test/client/completion_driver_test.dart
index d122baf..3f888c5 100644
--- a/pkg/analysis_server/test/client/completion_driver_test.dart
+++ b/pkg/analysis_server/test/client/completion_driver_test.dart
@@ -71,7 +71,6 @@
   }
 
   void assertSuggestion({
-    bool allowMultiple = false,
     required String completion,
     ElementKind? element,
     CompletionSuggestionKind? kind,
@@ -79,7 +78,6 @@
   }) {
     expect(
         suggestionWith(
-          allowMultiple: allowMultiple,
           completion: completion,
           element: element,
           kind: kind,
@@ -184,7 +182,6 @@
           completion: completion, element: element, kind: kind, file: file));
 
   CompletionSuggestion suggestionWith({
-    bool allowMultiple = false,
     required String completion,
     ElementKind? element,
     CompletionSuggestionKind? kind,
@@ -192,9 +189,7 @@
   }) {
     final matches = suggestionsWith(
         completion: completion, element: element, kind: kind, file: file);
-    if (!allowMultiple) {
-      expect(matches, hasLength(1));
-    }
+    expect(matches, hasLength(1));
     return matches.first;
   }
 
@@ -269,10 +264,7 @@
 }
 ''');
 
-    // TODO(brianwilkerson) There should be a single suggestion here after we
-    //  figure out how to stop the duplication.
     assertSuggestion(
-        allowMultiple: true,
         completion: 'A',
         element: ElementKind.CONSTRUCTOR,
         kind: CompletionSuggestionKind.INVOCATION);
@@ -296,11 +288,7 @@
   ^
 }
 ''');
-
-    // TODO(brianwilkerson) There should be a single suggestion here after we
-    //  figure out how to stop the duplication.
     assertSuggestion(
-        allowMultiple: true,
         completion: 'E.e',
         element: ElementKind.ENUM_CONSTANT,
         kind: CompletionSuggestionKind.INVOCATION);
@@ -325,10 +313,7 @@
 }
 ''');
 
-    // TODO(brianwilkerson) There should be a single suggestion here after we
-    //  figure out how to stop the duplication.
     assertSuggestion(
-        allowMultiple: true,
         completion: 'A.a',
         element: ElementKind.CONSTRUCTOR,
         kind: CompletionSuggestionKind.INVOCATION);
@@ -661,15 +646,13 @@
 }
 ''');
 
-    // TODO(brianwilkerson) There should be a single suggestion here after we
-    //  figure out how to stop the duplication.
     expect(
         suggestionsWith(
             completion: 'Future.value',
             file: '/sdk/lib/async/async.dart',
             element: ElementKind.CONSTRUCTOR,
             kind: CompletionSuggestionKind.INVOCATION),
-        hasLength(2));
+        hasLength(1));
   }
 
   Future<void> test_sdk_lib_suggestions() async {
diff --git a/pkg/analysis_server/test/integration/linter/lint_names_test.dart b/pkg/analysis_server/test/integration/linter/lint_names_test.dart
index e30881f..58031e7 100644
--- a/pkg/analysis_server/test/integration/linter/lint_names_test.dart
+++ b/pkg/analysis_server/test/integration/linter/lint_names_test.dart
@@ -2,39 +2,37 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:io';
-
-import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.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/error/error.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/src/dart/scanner/reader.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/registry.dart';
-import 'package:analyzer/src/string_source.dart';
+import 'package:analyzer_utilities/package_root.dart';
 import 'package:linter/src/rules.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 
 void main() {
-  // Set prefix for local or bot execution.
-  final pathPrefix =
-      FileSystemEntity.isDirectorySync(path.join('test', 'integration'))
-          ? ''
-          : path.join('pkg', 'analysis_server');
-
   /// Ensure server lint name representations correspond w/ actual lint rules.
   /// See, e.g., https://dart-review.googlesource.com/c/sdk/+/95743.
   group('lint_names', () {
-    var fixFileContents = File(path.join(
-            pathPrefix, 'lib', 'src', 'services', 'linter', 'lint_names.dart'))
-        .readAsStringSync();
-    var parser = CompilationUnitParser();
-    var cu = parser.parse(contents: fixFileContents, name: 'lint_names.dart');
-    var lintNamesClass = cu.declarations
+    var pkgRootPath = path.normalize(packageRoot);
+    var fixFilePath = path.join(pkgRootPath, 'analysis_server', 'lib', 'src',
+        'services', 'linter', 'lint_names.dart');
+    var contextCollection = AnalysisContextCollection(
+      includedPaths: [fixFilePath],
+    );
+    var parseResult = contextCollection
+        .contextFor(fixFilePath)
+        .currentSession
+        .getParsedUnit(fixFilePath) as ParsedUnitResult;
+
+    if (parseResult.errors.isNotEmpty) {
+      throw Exception(parseResult.errors);
+    }
+
+    var lintNamesClass = parseResult.unit.declarations
         .firstWhere((m) => m is ClassDeclaration && m.name.name == 'LintNames');
 
     var collector = _FixCollector();
@@ -63,47 +61,6 @@
   return registeredLints;
 }
 
-class CompilationUnitParser {
-  CompilationUnit parse({required String contents, required String name}) {
-    var reader = CharSequenceReader(contents);
-    var stringSource = StringSource(contents, name);
-    var errorListener = _ErrorListener();
-    var featureSet = FeatureSet.forTesting(sdkVersion: '2.2.2');
-    var scanner = Scanner(stringSource, reader, errorListener)
-      ..configureFeatures(
-        featureSetForOverriding: featureSet,
-        featureSet: featureSet,
-      );
-    var startToken = scanner.tokenize();
-    errorListener.throwIfErrors();
-
-    var parser = Parser(
-      stringSource,
-      errorListener,
-      featureSet: featureSet,
-    );
-    var cu = parser.parseCompilationUnit(startToken);
-    errorListener.throwIfErrors();
-
-    return cu;
-  }
-}
-
-class _ErrorListener implements AnalysisErrorListener {
-  final errors = <AnalysisError>[];
-
-  @override
-  void onError(AnalysisError error) {
-    errors.add(error);
-  }
-
-  void throwIfErrors() {
-    if (errors.isNotEmpty) {
-      throw Exception(errors);
-    }
-  }
-}
-
 class _FixCollector extends GeneralizingAstVisitor<void> {
   final List<String> lintNames = <String>[];
 
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 3c3eecb..8a094d4 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -774,6 +774,7 @@
 ///   COMMENT_DOCUMENTATION
 ///   COMMENT_END_OF_LINE
 ///   CONSTRUCTOR
+///   CONSTRUCTOR_TEAR_OFF
 ///   DIRECTIVE
 ///   DYNAMIC_TYPE
 ///   DYNAMIC_LOCAL_VARIABLE_DECLARATION
@@ -796,6 +797,7 @@
 ///   INSTANCE_GETTER_REFERENCE
 ///   INSTANCE_METHOD_DECLARATION
 ///   INSTANCE_METHOD_REFERENCE
+///   INSTANCE_METHOD_TEAR_OFF
 ///   INSTANCE_SETTER_DECLARATION
 ///   INSTANCE_SETTER_REFERENCE
 ///   INVALID_STRING_ESCAPE
@@ -810,6 +812,7 @@
 ///   LITERAL_STRING
 ///   LOCAL_FUNCTION_DECLARATION
 ///   LOCAL_FUNCTION_REFERENCE
+///   LOCAL_FUNCTION_TEAR_OFF
 ///   LOCAL_VARIABLE
 ///   LOCAL_VARIABLE_DECLARATION
 ///   LOCAL_VARIABLE_REFERENCE
@@ -827,10 +830,12 @@
 ///   STATIC_GETTER_REFERENCE
 ///   STATIC_METHOD_DECLARATION
 ///   STATIC_METHOD_REFERENCE
+///   STATIC_METHOD_TEAR_OFF
 ///   STATIC_SETTER_DECLARATION
 ///   STATIC_SETTER_REFERENCE
 ///   TOP_LEVEL_FUNCTION_DECLARATION
 ///   TOP_LEVEL_FUNCTION_REFERENCE
+///   TOP_LEVEL_FUNCTION_TEAR_OFF
 ///   TOP_LEVEL_GETTER_DECLARATION
 ///   TOP_LEVEL_GETTER_REFERENCE
 ///   TOP_LEVEL_SETTER_DECLARATION
@@ -850,6 +855,7 @@
   'COMMENT_DOCUMENTATION',
   'COMMENT_END_OF_LINE',
   'CONSTRUCTOR',
+  'CONSTRUCTOR_TEAR_OFF',
   'DIRECTIVE',
   'DYNAMIC_TYPE',
   'DYNAMIC_LOCAL_VARIABLE_DECLARATION',
@@ -872,6 +878,7 @@
   'INSTANCE_GETTER_REFERENCE',
   'INSTANCE_METHOD_DECLARATION',
   'INSTANCE_METHOD_REFERENCE',
+  'INSTANCE_METHOD_TEAR_OFF',
   'INSTANCE_SETTER_DECLARATION',
   'INSTANCE_SETTER_REFERENCE',
   'INVALID_STRING_ESCAPE',
@@ -886,6 +893,7 @@
   'LITERAL_STRING',
   'LOCAL_FUNCTION_DECLARATION',
   'LOCAL_FUNCTION_REFERENCE',
+  'LOCAL_FUNCTION_TEAR_OFF',
   'LOCAL_VARIABLE',
   'LOCAL_VARIABLE_DECLARATION',
   'LOCAL_VARIABLE_REFERENCE',
@@ -903,10 +911,12 @@
   'STATIC_GETTER_REFERENCE',
   'STATIC_METHOD_DECLARATION',
   'STATIC_METHOD_REFERENCE',
+  'STATIC_METHOD_TEAR_OFF',
   'STATIC_SETTER_DECLARATION',
   'STATIC_SETTER_REFERENCE',
   'TOP_LEVEL_FUNCTION_DECLARATION',
   'TOP_LEVEL_FUNCTION_REFERENCE',
+  'TOP_LEVEL_FUNCTION_TEAR_OFF',
   'TOP_LEVEL_GETTER_DECLARATION',
   'TOP_LEVEL_GETTER_REFERENCE',
   'TOP_LEVEL_SETTER_DECLARATION',
diff --git a/pkg/analysis_server/test/lsp/completion_dart_test.dart b/pkg/analysis_server/test/lsp/completion_dart_test.dart
index 0328fa0..9ccf020 100644
--- a/pkg/analysis_server/test/lsp/completion_dart_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_dart_test.dart
@@ -1560,7 +1560,7 @@
     expect(completions, hasLength(1));
     final resolved = await resolveCompletion(completions.first);
     // It should not include auto-import text since it's already imported.
-    expect(resolved.detail, isNot(contains('Auto import from')));
+    expect(resolved.detail, isNull);
   }
 
   Future<void> test_suggestionSets_filtersOutAlreadyImportedSymbols() async {
diff --git a/pkg/analysis_server/test/lsp/definition_test.dart b/pkg/analysis_server/test/lsp/definition_test.dart
index 083158c..f15c592 100644
--- a/pkg/analysis_server/test/lsp/definition_test.dart
+++ b/pkg/analysis_server/test/lsp/definition_test.dart
@@ -188,71 +188,6 @@
     );
   }
 
-  Future<void> test_macro_simpleIdentifier_getter() async {
-    final macroAnnotationsContents = '''
-library analyzer.macro.annotations;
-const observable = 0;
-''';
-
-    final mainContents = '''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-}
-
-void f(A a) {
-  a.[[foo^]];
-}
-''';
-
-    final combinedContents = r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-
-  int get [[foo]] => _foo;
-
-  set foo(int val) {
-    print('Setting foo to ${val}');
-    _foo = val;
-  }
-}
-
-void f(A a) {
-  a.[[foo^]];
-}
-''';
-
-    final macroAnnotationsFileUri =
-        Uri.file(join(projectFolderPath, 'lib', 'macro_annotations.dart'));
-    final pubspecFileUri = Uri.file(join(projectFolderPath, 'pubspec.yaml'));
-    final combinedFileUri = Uri.file(join(projectFolderPath, '.dart_tool',
-        'analyzer', 'macro', 'lib', 'main.dart'));
-
-    await initialize(
-        textDocumentCapabilities:
-            withLocationLinkSupport(emptyTextDocumentClientCapabilities));
-    await openFile(pubspecFileUri, '');
-    await openFile(
-        macroAnnotationsFileUri, withoutMarkers(macroAnnotationsContents));
-    await openFile(mainFileUri, withoutMarkers(mainContents));
-    final res = await getDefinitionAsLocationLinks(
-        mainFileUri, positionFromMarker(mainContents));
-
-    expect(res, hasLength(1));
-    final loc = res.single;
-    expect(loc.originSelectionRange, equals(rangeFromMarkers(mainContents)));
-    expect(loc.targetUri, equals(combinedFileUri.toString()));
-
-    final getFooRange = rangesFromMarkers(combinedContents)[0];
-    expect(loc.targetRange, equals(getFooRange));
-    expect(loc.targetSelectionRange, equals(getFooRange));
-  }
-
   Future<void> test_nonDartFile() async {
     newFile(pubspecFilePath, content: simplePubspecContent);
     await initialize();
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
index 7d1bc71..0a72f10 100644
--- a/pkg/analysis_server/test/lsp/initialization_test.dart
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -91,6 +91,51 @@
     expect(nonDartOptions.triggerCharacters, isNull);
   }
 
+  Future<void> test_completionRegistrations_withDartPlugin() async {
+    // This tests for a bug that occurred with an analysis server plugin
+    // that works on Dart files. When computing completion registrations we
+    // usually have seperate registrations for Dart + non-Dart to account for
+    // different trigger characters. However, the plugin types were all being
+    // included in the non-Dart registration even if they included Dart.
+    //
+    // The result was two registrations including Dart, which caused duplicate
+    // requests for Dart completions, which resulted in duplicate items
+    // appearing in the editor.
+
+    // Track all current registrations.
+    final registrations = <Registration>[];
+
+    // Perform normal registration (without plugins) to get the initial set.
+    await monitorDynamicRegistrations(
+      registrations,
+      () => initialize(
+        textDocumentCapabilities:
+            withAllSupportedTextDocumentDynamicRegistrations(
+                emptyTextDocumentClientCapabilities),
+      ),
+    );
+
+    // Expect only a single registration that includes Dart files.
+    expect(
+      registrationsForDart(registrations, Method.textDocument_completion),
+      hasLength(1),
+    );
+
+    // Monitor the unregistration/new registrations during the plugin activation.
+    await monitorDynamicReregistration(registrations, () async {
+      final plugin = configureTestPlugin();
+      plugin.currentSession = PluginSession(plugin)
+        ..interestingFiles = ['*.dart'];
+      pluginManager.pluginsChangedController.add(null);
+    });
+
+    // Expect that there is still only a single registration for Dart.
+    expect(
+      registrationsForDart(registrations, Method.textDocument_completion),
+      hasLength(1),
+    );
+  }
+
   Future<void> test_dynamicRegistration_containsAppropriateSettings() async {
     // Basic check that the server responds with the capabilities we'd expect,
     // for ex including analysis_options.yaml in text synchronization but not
diff --git a/pkg/analysis_server/test/lsp/semantic_tokens_test.dart b/pkg/analysis_server/test/lsp/semantic_tokens_test.dart
index 1b5d9a5..de5f35a 100644
--- a/pkg/analysis_server/test/lsp/semantic_tokens_test.dart
+++ b/pkg/analysis_server/test/lsp/semantic_tokens_test.dart
@@ -93,6 +93,7 @@
     final a = MyClass();
     final b = MyClass.named();
     final c = MyClass.factory();
+    final d = MyClass.named;
     ''';
 
     final expected = [
@@ -126,7 +127,13 @@
       _Token('MyClass', SemanticTokenTypes.class_,
           [CustomSemanticTokenModifiers.constructor]),
       _Token('factory', SemanticTokenTypes.method,
-          [CustomSemanticTokenModifiers.constructor])
+          [CustomSemanticTokenModifiers.constructor]),
+      _Token('final', SemanticTokenTypes.keyword),
+      _Token('d', SemanticTokenTypes.variable,
+          [SemanticTokenModifiers.declaration]),
+      _Token('MyClass', SemanticTokenTypes.class_),
+      _Token('named', SemanticTokenTypes.method,
+          [CustomSemanticTokenModifiers.constructor]),
     ];
 
     await initialize();
@@ -287,6 +294,8 @@
       final a = MyClass();
       a.myMethod();
       MyClass.myStaticMethod();
+      final b = a.myMethod;
+      final c = MyClass.myStaticMethod;
     }
     ''';
 
@@ -321,6 +330,17 @@
       _Token('MyClass', SemanticTokenTypes.class_),
       _Token('myStaticMethod', SemanticTokenTypes.method,
           [SemanticTokenModifiers.static]),
+      _Token('final', SemanticTokenTypes.keyword),
+      _Token('b', SemanticTokenTypes.variable,
+          [SemanticTokenModifiers.declaration]),
+      _Token('a', SemanticTokenTypes.variable),
+      _Token('myMethod', SemanticTokenTypes.method),
+      _Token('final', SemanticTokenTypes.keyword),
+      _Token('c', SemanticTokenTypes.variable,
+          [SemanticTokenModifiers.declaration]),
+      _Token('MyClass', SemanticTokenTypes.class_),
+      _Token('myStaticMethod', SemanticTokenTypes.method,
+          [SemanticTokenModifiers.static]),
     ];
 
     await initialize();
@@ -612,6 +632,38 @@
     expect(decoded, equals(expected));
   }
 
+  Future<void> test_local() async {
+    final content = '''
+    main() {
+      func(String a) => print(a);
+      final funcTearOff = func;
+    }
+    ''';
+
+    final expected = [
+      _Token('main', SemanticTokenTypes.function,
+          [SemanticTokenModifiers.declaration, SemanticTokenModifiers.static]),
+      _Token('func', SemanticTokenTypes.function,
+          [SemanticTokenModifiers.declaration]),
+      _Token('String', SemanticTokenTypes.class_),
+      _Token('a', SemanticTokenTypes.parameter,
+          [SemanticTokenModifiers.declaration]),
+      _Token('print', SemanticTokenTypes.function),
+      _Token('a', SemanticTokenTypes.parameter),
+      _Token('final', SemanticTokenTypes.keyword),
+      _Token('funcTearOff', SemanticTokenTypes.variable,
+          [SemanticTokenModifiers.declaration]),
+      _Token('func', SemanticTokenTypes.function),
+    ];
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+
+    final tokens = await getSemanticTokens(mainFileUri);
+    final decoded = decodeSemanticTokens(content, tokens);
+    expect(decoded, equals(expected));
+  }
+
   Future<void> test_manyBools_bug() async {
     // Similar to test_manyImports_sortBug, this code triggered inconsistent tokens
     // for "false" because tokens were sorted incorrectly (because both boolean and
@@ -990,6 +1042,8 @@
 
     /// abc docs
     bool get abc => true;
+
+    final funcTearOff = func;
     ''';
 
     final expected = [
@@ -1019,6 +1073,10 @@
       _Token('abc', SemanticTokenTypes.property,
           [SemanticTokenModifiers.declaration]),
       _Token('true', CustomSemanticTokenTypes.boolean),
+      _Token('final', SemanticTokenTypes.keyword),
+      _Token('funcTearOff', SemanticTokenTypes.variable,
+          [SemanticTokenModifiers.declaration]),
+      _Token('func', SemanticTokenTypes.function),
     ];
 
     await initialize();
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index 45b8b3f..26cd616 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -128,19 +128,35 @@
     return registrations.singleWhereOrNull((r) => r.method == method.toJson());
   }
 
-  /// Finds the registration for a given LSP method with Dart in its
+  /// Finds a single registration for a given LSP method with Dart in its
   /// documentSelector.
+  ///
+  /// Throws if there is not exactly one match.
   Registration registrationForDart(
     List<Registration> registrations,
     Method method,
+  ) =>
+      registrationsForDart(registrations, method).single;
+
+  /// Finds the registrations for a given LSP method with Dart in their
+  /// documentSelector.
+  List<Registration> registrationsForDart(
+    List<Registration> registrations,
+    Method method,
   ) {
-    return registrations.singleWhere((r) =>
-        r.method == method.toJson() &&
-        (TextDocumentRegistrationOptions.fromJson(
-                    r.registerOptions as Map<String, Object?>)
-                .documentSelector
-                ?.any((selector) => selector.language == dartLanguageId) ??
-            false));
+    bool includesDart(Registration r) {
+      final options = TextDocumentRegistrationOptions.fromJson(
+          r.registerOptions as Map<String, Object?>);
+
+      return options.documentSelector?.any((selector) =>
+              selector.language == dartLanguageId ||
+              (selector.pattern?.contains('.dart') ?? false)) ??
+          false;
+    }
+
+    return registrations
+        .where((r) => r.method == method.toJson() && includesDart(r))
+        .toList();
   }
 
   void resetContextBuildCounter() {
@@ -1390,11 +1406,11 @@
 
   /// Watches for `client/registerCapability` requests and updates
   /// `registrations`.
-  Future<ResponseMessage> monitorDynamicRegistrations(
+  Future<T> monitorDynamicRegistrations<T>(
     List<Registration> registrations,
-    Future<ResponseMessage> Function() f,
+    Future<T> Function() f,
   ) {
-    return handleExpectedRequest<ResponseMessage, RegistrationParams, void>(
+    return handleExpectedRequest<T, RegistrationParams, void>(
       Method.client_registerCapability,
       RegistrationParams.fromJson,
       f,
@@ -1405,9 +1421,9 @@
   }
 
   /// Expects both unregistration and reregistration.
-  Future<ResponseMessage> monitorDynamicReregistration(
+  Future<T> monitorDynamicReregistration<T>(
     List<Registration> registrations,
-    Future<ResponseMessage> Function() f,
+    Future<T> Function() f,
   ) =>
       monitorDynamicUnregistrations(
         registrations,
@@ -1416,11 +1432,11 @@
 
   /// Watches for `client/unregisterCapability` requests and updates
   /// `registrations`.
-  Future<ResponseMessage> monitorDynamicUnregistrations(
+  Future<T> monitorDynamicUnregistrations<T>(
     List<Registration> registrations,
-    Future<ResponseMessage> Function() f,
+    Future<T> Function() f,
   ) {
-    return handleExpectedRequest<ResponseMessage, UnregistrationParams, void>(
+    return handleExpectedRequest<T, UnregistrationParams, void>(
       Method.client_unregisterCapability,
       UnregistrationParams.fromJson,
       f,
@@ -1451,7 +1467,7 @@
               text: content)),
     );
     await sendNotificationToServer(notification);
-    await pumpEventQueue();
+    await pumpEventQueue(times: 128);
   }
 
   int positionCompare(Position p1, Position p2) {
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index ac31994..248d817 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -254,7 +254,9 @@
     // TODO(paulberry): why does the MatchKind class exist at all?  Can't we
     // use SearchResultKind inside the analysis server?
     EnumTester<MatchKind, SearchResultKind>()
-        .run(newSearchResultKind_fromEngine);
+        .run(newSearchResultKind_fromEngine, exceptions: {
+      MatchKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF: SearchResultKind.REFERENCE,
+    });
   }
 }
 
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index 2bc7a79..55ab879 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -42,19 +42,31 @@
 
   Future<void> test_constructor_named() async {
     addTestFile('''
+/// [new A.named] 1
 class A {
-  A.named(p);
+  A.named() {}
+  A.other() : this.named(); // 2
 }
+
+class B extends A {
+  B() : super.named(); // 3
+  factory B.other() = A.named; // 4
+}
+
 void f() {
-  new A.named(1);
-  new A.named(2);
+  A.named(); // 5
+  A.named; // 6
 }
 ''');
-    await findElementReferences('named(p)', false);
+    await findElementReferences('named() {}', false);
     expect(searchElement!.kind, ElementKind.CONSTRUCTOR);
-    expect(results, hasLength(2));
-    assertHasResult(SearchResultKind.REFERENCE, '.named(1)', 6);
-    assertHasResult(SearchResultKind.REFERENCE, '.named(2)', 6);
+    expect(results, hasLength(6));
+    assertHasResult(SearchResultKind.REFERENCE, '.named] 1', 6);
+    assertHasResult(SearchResultKind.INVOCATION, '.named(); // 2', 6);
+    assertHasResult(SearchResultKind.INVOCATION, '.named(); // 3', 6);
+    assertHasResult(SearchResultKind.REFERENCE, '.named; // 4', 6);
+    assertHasResult(SearchResultKind.INVOCATION, '.named(); // 5', 6);
+    assertHasResult(SearchResultKind.REFERENCE, '.named; // 6', 6);
   }
 
   Future<void> test_constructor_named_potential() async {
@@ -77,24 +89,36 @@
     await findElementReferences('named(p); // A', true);
     expect(searchElement!.kind, ElementKind.CONSTRUCTOR);
     expect(results, hasLength(1));
-    assertHasResult(SearchResultKind.REFERENCE, '.named(1)', 6);
+    assertHasResult(SearchResultKind.INVOCATION, '.named(1)', 6);
   }
 
   Future<void> test_constructor_unnamed() async {
     addTestFile('''
+/// [new A] 1
 class A {
-  A(p);
+  A() {}
+  A.other() : this(); // 2
 }
+
+class B extends A {
+  B() : super(); // 3
+  factory B.other() = A; // 4
+}
+
 void f() {
-  new A(1);
-  new A(2);
+  A(); // 5
+  A.new; // 6
 }
 ''');
-    await findElementReferences('A(p)', false);
+    await findElementReferences('A() {}', false);
     expect(searchElement!.kind, ElementKind.CONSTRUCTOR);
-    expect(results, hasLength(2));
-    assertHasResult(SearchResultKind.REFERENCE, '(1)', 0);
-    assertHasResult(SearchResultKind.REFERENCE, '(2)', 0);
+    expect(results, hasLength(6));
+    assertHasResult(SearchResultKind.REFERENCE, '] 1', 0);
+    assertHasResult(SearchResultKind.INVOCATION, '(); // 2', 0);
+    assertHasResult(SearchResultKind.INVOCATION, '(); // 3', 0);
+    assertHasResult(SearchResultKind.REFERENCE, '; // 4', 0);
+    assertHasResult(SearchResultKind.INVOCATION, '(); // 5', 0);
+    assertHasResult(SearchResultKind.REFERENCE, '.new; // 6', 4);
   }
 
   Future<void> test_constructor_unnamed_potential() async {
@@ -122,7 +146,7 @@
     await findElementReferences('A(p)', true);
     expect(searchElement!.kind, ElementKind.CONSTRUCTOR);
     expect(results, hasLength(1));
-    assertHasResult(SearchResultKind.REFERENCE, '(1)', 0);
+    assertHasResult(SearchResultKind.INVOCATION, '(1)', 0);
   }
 
   Future<void> test_extension() async {
diff --git a/pkg/analysis_server/test/search/search_result_test.dart b/pkg/analysis_server/test/search/search_result_test.dart
index 25308ca..04fb0df 100644
--- a/pkg/analysis_server/test/search/search_result_test.dart
+++ b/pkg/analysis_server/test/search/search_result_test.dart
@@ -26,6 +26,10 @@
         SearchResultKind.WRITE);
     expect(newSearchResultKind_fromEngine(MatchKind.REFERENCE),
         SearchResultKind.REFERENCE);
+    expect(
+        newSearchResultKind_fromEngine(
+            MatchKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF),
+        SearchResultKind.REFERENCE);
     expect(newSearchResultKind_fromEngine(MatchKind.INVOCATION),
         SearchResultKind.INVOCATION);
   }
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 a9f5b6a..789ff5f 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
@@ -9,13 +9,11 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
 import 'completion_contributor_util.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ArgListContributorTest);
-    defineReflectiveTests(ArgListContributorWithNullSafetyTest);
   });
 }
 
@@ -1095,26 +1093,6 @@
     assertNoSuggestions();
   }
 
-  Future<void> test_superConstructorInvocation() async {
-    addTestSource('''
-class A {
-  final bool field1;
-  final int field2;
-  A({this.field1, this.field2});
-}
-class B extends A {
-  B() : super(^);
-}
-''');
-    await computeSuggestions();
-    assertSuggestArgumentsAndTypes(
-        namedArgumentsWithTypes: {'field1': 'bool', 'field2': 'int'});
-  }
-}
-
-@reflectiveTest
-class ArgListContributorWithNullSafetyTest extends DartCompletionContributorTest
-    with WithNullSafetyMixin, ArgListContributorMixin {
   Future<void> test_ArgumentList_nnbd_function_named_param() async {
     addTestSource(r'''
 f({int? nullable, int nonnullable}) {}
@@ -1155,4 +1133,20 @@
       'named': 'int*',
     });
   }
+
+  Future<void> test_superConstructorInvocation() async {
+    addTestSource('''
+class A {
+  final bool field1;
+  final int field2;
+  A({this.field1, this.field2});
+}
+class B extends A {
+  B() : super(^);
+}
+''');
+    await computeSuggestions();
+    assertSuggestArgumentsAndTypes(
+        namedArgumentsWithTypes: {'field1': 'bool', 'field2': 'int'});
+  }
 }
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 d37b156..5148c7d 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
@@ -9,13 +9,11 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
 import 'completion_contributor_util.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ImportedReferenceContributorTest);
-    defineReflectiveTests(ImportedReferenceContributorWithNullSafetyTest);
   });
 }
 
@@ -2352,6 +2350,75 @@
     expect(suggestion.hasNamedParameters, true);
   }
 
+  Future<void> test_function_parameters_nnbd_required() async {
+    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
+    resolveSource('/home/test/lib/a.dart', '''
+void m(int? nullable, int nonNullable) {}
+''');
+    addTestSource('''
+import 'a.dart';
+
+void f() {^}
+''');
+    await computeSuggestions();
+    var suggestion = assertSuggestFunction('m', 'void');
+    var parameterNames = suggestion.parameterNames!;
+    var parameterTypes = suggestion.parameterTypes!;
+    expect(parameterNames, hasLength(2));
+    expect(parameterNames[0], 'nullable');
+    expect(parameterTypes[0], 'int?');
+    expect(parameterNames[1], 'nonNullable');
+    expect(parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  Future<void> test_function_parameters_nnbd_required_into_legacy() async {
+    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
+    resolveSource('/home/test/lib/a.dart', '''
+void m(int? nullable, int nonNullable) {}
+''');
+    addTestSource('''
+// @dart = 2.8
+import 'a.dart';
+
+void f() {^}
+''');
+    await computeSuggestions();
+    var suggestion = assertSuggestFunction('m', 'void');
+    var parameterNames = suggestion.parameterNames!;
+    var parameterTypes = suggestion.parameterTypes!;
+    expect(parameterNames, hasLength(2));
+    expect(parameterNames[0], 'nullable');
+    expect(parameterTypes[0], 'int');
+    expect(parameterNames[1], 'nonNullable');
+    expect(parameterTypes[1], 'int');
+    expect(suggestion.requiredParameterCount, 2);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
+  Future<void> test_function_parameters_nnbd_required_legacy() async {
+    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
+    resolveSource('/home/test/lib/a.dart', '''
+// @dart = 2.8
+void m(int param) {}
+''');
+    addTestSource('''
+import 'a.dart';
+
+void f() {^}
+''');
+    await computeSuggestions();
+    var suggestion = assertSuggestFunction('m', 'void');
+    var parameterNames = suggestion.parameterNames!;
+    var parameterTypes = suggestion.parameterTypes!;
+    expect(parameterNames, hasLength(1));
+    expect(parameterNames[0], 'param');
+    expect(parameterTypes[0], 'int*');
+    expect(suggestion.requiredParameterCount, 1);
+    expect(suggestion.hasNamedParameters, false);
+  }
+
   Future<void> test_function_parameters_none() async {
     resolveSource('/home/test/lib/a.dart', '''
 void m() {}
@@ -4830,77 +4897,3 @@
     assertSuggestClass('Object');
   }
 }
-
-@reflectiveTest
-class ImportedReferenceContributorWithNullSafetyTest
-    extends DartCompletionContributorTest
-    with WithNullSafetyMixin, ImportedReferenceContributorMixin {
-  Future<void> test_function_parameters_nnbd_required() async {
-    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
-    resolveSource('/home/test/lib/a.dart', '''
-void m(int? nullable, int nonNullable) {}
-''');
-    addTestSource('''
-import 'a.dart';
-
-void f() {^}
-''');
-    await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void');
-    var parameterNames = suggestion.parameterNames!;
-    var parameterTypes = suggestion.parameterTypes!;
-    expect(parameterNames, hasLength(2));
-    expect(parameterNames[0], 'nullable');
-    expect(parameterTypes[0], 'int?');
-    expect(parameterNames[1], 'nonNullable');
-    expect(parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  Future<void> test_function_parameters_nnbd_required_into_legacy() async {
-    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
-    resolveSource('/home/test/lib/a.dart', '''
-void m(int? nullable, int nonNullable) {}
-''');
-    addTestSource('''
-// @dart = 2.8
-import 'a.dart';
-
-void f() {^}
-''');
-    await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void');
-    var parameterNames = suggestion.parameterNames!;
-    var parameterTypes = suggestion.parameterTypes!;
-    expect(parameterNames, hasLength(2));
-    expect(parameterNames[0], 'nullable');
-    expect(parameterTypes[0], 'int');
-    expect(parameterNames[1], 'nonNullable');
-    expect(parameterTypes[1], 'int');
-    expect(suggestion.requiredParameterCount, 2);
-    expect(suggestion.hasNamedParameters, false);
-  }
-
-  Future<void> test_function_parameters_nnbd_required_legacy() async {
-    createAnalysisOptionsFile(experiments: [EnableString.non_nullable]);
-    resolveSource('/home/test/lib/a.dart', '''
-// @dart = 2.8
-void m(int param) {}
-''');
-    addTestSource('''
-import 'a.dart';
-
-void f() {^}
-''');
-    await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void');
-    var parameterNames = suggestion.parameterNames!;
-    var parameterTypes = suggestion.parameterTypes!;
-    expect(parameterNames, hasLength(1));
-    expect(parameterNames[0], 'param');
-    expect(parameterTypes[0], 'int*');
-    expect(suggestion.requiredParameterCount, 1);
-    expect(suggestion.hasNamedParameters, false);
-  }
-}
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 b8d35f4..1673cfd 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
@@ -11,13 +11,11 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
 import 'completion_contributor_util.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(KeywordContributorTest);
-    defineReflectiveTests(KeywordContributorWithNullSafetyTest);
   });
 }
 
@@ -2331,7 +2329,3 @@
     return true;
   }
 }
-
-@reflectiveTest
-class KeywordContributorWithNullSafetyTest extends KeywordContributorTest
-    with WithNullSafetyMixin {}
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
index b796a44..039c915 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/bool_assignment_test.dart
@@ -15,13 +15,7 @@
 
 @reflectiveTest
 class BoolAssignmentTest extends CompletionRelevanceTest {
-  @failingTest
   Future<void> test_boolLiterals_imported() async {
-    // TODO(brianwilkerson) This test is arguably invalid given that there's no
-    //  data to suggest that the boolean keywords should appear before a
-    //  constructor in the list, but it does seem likely to be valid in this
-    //  case, so we should investigate features that might cause this test to
-    //  start passing again.
     await addTestFile('''
 foo() {
   bool b;
diff --git a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
index f09ca3f..5e73ef0 100644
--- a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
+++ b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
@@ -7,7 +7,6 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../abstract_context.dart';
 import '../../../abstract_single_unit.dart';
 
 void main() {
@@ -635,7 +634,7 @@
 }
 
 @reflectiveTest
-class _TryTest extends PostfixCompletionTest with WithNullSafetyMixin {
+class _TryTest extends PostfixCompletionTest {
   Future<void> test_try() async {
     await _prepareCompletion('.try', '''
 f() {
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index 4a0f551..35d678c 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -1739,6 +1739,17 @@
 ''');
   }
 
+  Future<void> test_target_topLevelVariable() async {
+    await indexTestUnit(r'''
+int get test => 42;
+var a = test;
+''');
+    _createRefactoring('test =>');
+    return _assertSuccessfulRefactoring(r'''
+var a = 42;
+''');
+  }
+
   Future _assertConditionsError(String message) async {
     var status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
index 5057c74..c688ac2 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -101,6 +101,7 @@
 }
 main() {
   new A();
+  A.new;
 }
 ''');
     // configure refactoring
@@ -121,6 +122,7 @@
 }
 main() {
   new A.newName();
+  A.newName;
 }
 ''');
   }
@@ -136,6 +138,7 @@
 }
 main() {
   new A();
+  A.new;
 }
 ''');
     // configure refactoring
@@ -157,6 +160,7 @@
 }
 main() {
   new A.newName();
+  A.newName;
 }
 ''');
   }
@@ -173,6 +177,7 @@
 }
 main() {
   new A.test();
+  A.test;
 }
 ''');
     // configure refactoring
@@ -193,6 +198,7 @@
 }
 main() {
   new A.newName();
+  A.newName;
 }
 ''');
   }
@@ -238,6 +244,7 @@
 }
 main() {
   new A.test();
+  A.test;
 }
 ''');
     // configure refactoring
@@ -258,6 +265,7 @@
 }
 main() {
   new A();
+  A.new;
 }
 ''');
   }
diff --git a/pkg/analysis_server/test/src/g3/fixes_test.dart b/pkg/analysis_server/test/src/g3/fixes_test.dart
new file mode 100644
index 0000000..7aab591
--- /dev/null
+++ b/pkg/analysis_server/test/src/g3/fixes_test.dart
@@ -0,0 +1,201 @@
+// 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.
+
+import 'package:analysis_server/src/g3/fixes.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:linter/src/rules.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(G3FixesTest);
+  });
+}
+
+@reflectiveTest
+class G3FixesTest with ResourceProviderMixin {
+  void setUp() {
+    registerLintRules();
+    MockSdk(resourceProvider: resourceProvider);
+  }
+
+  Future<void> test_awaitOnlyFutures() async {
+    await _assertHasLintFix(
+      codeWithLint: r'''
+void f() async {
+  await 0;
+}
+''',
+      lintName: LintNames.await_only_futures,
+      fixedCode: r'''
+void f() async {
+  0;
+}
+''',
+    );
+  }
+
+  Future<void> test_awaitOnlyFutures_inFile() async {
+    await _assertHasLintFix(
+      inFile: true,
+      codeWithLint: r'''
+void f() async {
+  await 0;
+  await 1;
+}
+''',
+      lintName: LintNames.await_only_futures,
+      fixedCode: r'''
+void f() async {
+  0;
+  1;
+}
+''',
+    );
+  }
+
+  Future<void> test_emptyCatches_noFinally() async {
+    await _assertNoLintFix(
+      codeWithLint: r'''
+void f() {
+  try {
+  } catch (e) {}
+}
+''',
+      lintName: LintNames.empty_catches,
+    );
+  }
+
+  Future<void> test_emptyConstructorBodies() async {
+    await _assertHasLintFix(
+      codeWithLint: r'''
+class C {
+  C() {}
+}
+''',
+      lintName: LintNames.empty_constructor_bodies,
+      fixedCode: r'''
+class C {
+  C();
+}
+''',
+    );
+  }
+
+  Future<void> test_invalid_moreThanOneDiagnostic() async {
+    expect(() async {
+      await _assertHasLintFix(
+        codeWithLint: '0 1',
+        lintName: LintNames.avoid_empty_else,
+        fixedCode: '',
+      );
+    }, throwsStateError);
+  }
+
+  Future<void> test_invalid_noDiagnostics() async {
+    expect(() async {
+      await _assertHasLintFix(
+        codeWithLint: '',
+        lintName: LintNames.avoid_empty_else,
+        fixedCode: '',
+      );
+    }, throwsStateError);
+  }
+
+  Future<void> test_invalid_notLint() async {
+    expect(() async {
+      await _assertHasLintFix(
+        codeWithLint: '42',
+        lintName: LintNames.avoid_empty_else,
+        fixedCode: '',
+      );
+    }, throwsStateError);
+  }
+
+  Future<void> _assertHasLintFix({
+    required String codeWithLint,
+    required String lintName,
+    required String fixedCode,
+    bool inFile = false,
+  }) async {
+    _enableLint(lintName);
+
+    var tester = LintFixTester(
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath(sdkRoot),
+      packageConfigPath: null,
+    );
+
+    var path = convertPath('/home/test/lib/test.dart');
+    tester.updateFile(
+      path: path,
+      content: codeWithLint,
+    );
+
+    var testerWithFixes = await tester.fixesForSingleLint(
+      path: path,
+      inFile: inFile,
+    );
+
+    var singleFix = testerWithFixes.assertSingleFix();
+    singleFix.assertFixedContentOfFile(
+      path: path,
+      fixedContent: fixedCode,
+    );
+  }
+
+  Future<void> _assertNoLintFix({
+    required String codeWithLint,
+    required String lintName,
+    bool inFile = false,
+  }) async {
+    _enableLint(lintName);
+
+    var tester = LintFixTester(
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath(sdkRoot),
+      packageConfigPath: null,
+    );
+
+    var path = convertPath('/home/test/lib/test.dart');
+    tester.updateFile(
+      path: path,
+      content: codeWithLint,
+    );
+
+    var testerWithFixes = await tester.fixesForSingleLint(
+      path: path,
+      inFile: inFile,
+    );
+
+    testerWithFixes.assertNoFixes();
+  }
+
+  void _enableLint(String lintName) {
+    _writeAnalysisOptionsFile(
+      lints: [lintName],
+    );
+  }
+
+  /// Write an analysis options file based on the given arguments.
+  /// TODO(scheglov) Use AnalysisOptionsFileConfig
+  void _writeAnalysisOptionsFile({
+    List<String>? lints,
+  }) {
+    var buffer = StringBuffer();
+
+    if (lints != null) {
+      buffer.writeln('linter:');
+      buffer.writeln('  rules:');
+      for (var lint in lints) {
+        buffer.writeln('    - $lint');
+      }
+    }
+
+    newFile('/home/test/analysis_options.yaml', content: buffer.toString());
+  }
+}
diff --git a/pkg/analysis_server/test/src/g3/test_all.dart b/pkg/analysis_server/test/src/g3/test_all.dart
new file mode 100644
index 0000000..2050c81
--- /dev/null
+++ b/pkg/analysis_server/test/src/g3/test_all.dart
@@ -0,0 +1,13 @@
+// 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.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fixes_test.dart' as fixes;
+
+void main() {
+  defineReflectiveSuite(() {
+    fixes.main();
+  });
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
index 02ce651..dfb00eb 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
@@ -27,6 +27,96 @@
     );
   }
 
+  Future<void> test_comment() async {
+    await resolveTestCode(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  // something for a
+  final bool a = false;
+
+  const MyWidget();
+
+  // another for b
+  final bool b = true;
+
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+
+class MyWidget extends StatefulWidget {
+
+  const MyWidget();
+
+  @override
+  State<MyWidget> createState() => _MyWidgetState();
+}
+
+class _MyWidgetState extends State<MyWidget> {
+  // something for a
+  final bool a = false;
+
+  // another for b
+  final bool b = true;
+
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+}
+''');
+  }
+
+  Future<void> test_comment_documentation() async {
+    await resolveTestCode(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  /// something for a
+  final bool a = false;
+
+  const MyWidget();
+
+  /// another for b
+  final bool b = true;
+
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+
+class MyWidget extends StatefulWidget {
+
+  const MyWidget();
+
+  @override
+  State<MyWidget> createState() => _MyWidgetState();
+}
+
+class _MyWidgetState extends State<MyWidget> {
+  /// something for a
+  final bool a = false;
+
+  /// another for b
+  final bool b = true;
+
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+}
+''');
+  }
+
   Future<void> test_empty() async {
     await resolveTestCode(r'''
 import 'package:flutter/material.dart';
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 c6a0061..b40d609 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
@@ -6,13 +6,11 @@
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'assist_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ShadowFieldTest);
-    defineReflectiveTests(ShadowFieldWithNullSafetyTest);
   });
 }
 
@@ -105,11 +103,7 @@
 }
 ''');
   }
-}
 
-@reflectiveTest
-class ShadowFieldWithNullSafetyTest extends ShadowFieldTest
-    with WithNullSafetyMixin {
   Future<void> test_notNull() async {
     await resolveTestCode('''
 class C {
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 6825440..df3eb40 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
@@ -8,13 +8,11 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AddAsyncTest);
-    defineReflectiveTests(AddAsyncWithNullSafetyTest);
     defineReflectiveTests(AvoidReturningNullForFutureTest);
   });
 }
@@ -115,6 +113,90 @@
     });
   }
 
+  Future<void> test_missingReturn_method_hasReturn() async {
+    await resolveTestCode('''
+class C {
+  Future<int> m(bool b) {
+    if (b) {
+      return 0;
+    }
+  }
+}
+''');
+    await assertNoFix(errorFilter: (error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD;
+    });
+  }
+
+  Future<void> test_missingReturn_method_notVoid() async {
+    await resolveTestCode('''
+class C {
+  Future<int> m() {
+    print('');
+  }
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_missingReturn_method_notVoid_inherited() async {
+    await resolveTestCode('''
+abstract class A {
+  Future<int> foo();
+}
+
+class B implements A {
+  foo() {
+  print('');
+  }
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_missingReturn_method_void() async {
+    await resolveTestCode('''
+class C {
+  Future<void> m() {
+    print('');
+  }
+}
+''');
+    await assertHasFix('''
+class C {
+  Future<void> m() async {
+    print('');
+  }
+}
+''');
+  }
+
+  Future<void> test_missingReturn_method_void_inherited() async {
+    await resolveTestCode('''
+abstract class A {
+  Future<void> foo();
+}
+
+class B implements A {
+  foo() {
+  print('');
+  }
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  Future<void> foo();
+}
+
+class B implements A {
+  foo() async {
+  print('');
+  }
+}
+''');
+  }
+
   Future<void> test_missingReturn_notVoid() async {
     await resolveTestCode('''
 Future<int> f() {
@@ -124,6 +206,42 @@
     await assertNoFix();
   }
 
+  Future<void> test_missingReturn_topLevel_hasReturn() async {
+    await resolveTestCode('''
+Future<int> f(bool b) {
+  if (b) {
+    return 0;
+  }
+}
+''');
+    await assertNoFix(errorFilter: (error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION;
+    });
+  }
+
+  Future<void> test_missingReturn_topLevel_notVoid() async {
+    await resolveTestCode('''
+Future<int> f() {
+  print('');
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_missingReturn_topLevel_void() async {
+    await resolveTestCode('''
+Future<void> f() {
+  print('');
+}
+''');
+    await assertHasFix('''
+Future<void> f() async {
+  print('');
+}
+''');
+  }
+
   Future<void> test_missingReturn_void() async {
     await resolveTestCode('''
 Future<void> f() {
@@ -216,133 +334,6 @@
 }
 
 @reflectiveTest
-class AddAsyncWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
-  @override
-  FixKind get kind => DartFixKind.ADD_ASYNC;
-
-  Future<void> test_missingReturn_method_hasReturn() async {
-    await resolveTestCode('''
-class C {
-  Future<int> m(bool b) {
-    if (b) {
-      return 0;
-    }
-  }
-}
-''');
-    await assertNoFix(errorFilter: (error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD;
-    });
-  }
-
-  Future<void> test_missingReturn_method_notVoid() async {
-    await resolveTestCode('''
-class C {
-  Future<int> m() {
-    print('');
-  }
-}
-''');
-    await assertNoFix();
-  }
-
-  Future<void> test_missingReturn_method_notVoid_inherited() async {
-    await resolveTestCode('''
-abstract class A {
-  Future<int> foo();
-}
-
-class B implements A {
-  foo() {
-  print('');
-  }
-}
-''');
-    await assertNoFix();
-  }
-
-  Future<void> test_missingReturn_method_void() async {
-    await resolveTestCode('''
-class C {
-  Future<void> m() {
-    print('');
-  }
-}
-''');
-    await assertHasFix('''
-class C {
-  Future<void> m() async {
-    print('');
-  }
-}
-''');
-  }
-
-  Future<void> test_missingReturn_method_void_inherited() async {
-    await resolveTestCode('''
-abstract class A {
-  Future<void> foo();
-}
-
-class B implements A {
-  foo() {
-  print('');
-  }
-}
-''');
-    await assertHasFix('''
-abstract class A {
-  Future<void> foo();
-}
-
-class B implements A {
-  foo() async {
-  print('');
-  }
-}
-''');
-  }
-
-  Future<void> test_missingReturn_topLevel_hasReturn() async {
-    await resolveTestCode('''
-Future<int> f(bool b) {
-  if (b) {
-    return 0;
-  }
-}
-''');
-    await assertNoFix(errorFilter: (error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION;
-    });
-  }
-
-  Future<void> test_missingReturn_topLevel_notVoid() async {
-    await resolveTestCode('''
-Future<int> f() {
-  print('');
-}
-''');
-    await assertNoFix();
-  }
-
-  Future<void> test_missingReturn_topLevel_void() async {
-    await resolveTestCode('''
-Future<void> f() {
-  print('');
-}
-''');
-    await assertHasFix('''
-Future<void> f() async {
-  print('');
-}
-''');
-  }
-}
-
-@reflectiveTest
 class AvoidReturningNullForFutureTest extends FixProcessorLintTest {
   @override
   FixKind get kind => DartFixKind.ADD_ASYNC;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_const_test.dart
index 5dc2905c..c2f2e4a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_const_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_const_test.dart
@@ -26,8 +26,6 @@
   @override
   String get lintCode => LintNames.prefer_const_constructors;
 
-  /// Disabled in BulkFixProcessor.
-  @failingTest
   Future<void> test_noKeyword() async {
     writeTestPackageConfig(meta: true);
     await resolveTestCode(r'''
@@ -36,12 +34,11 @@
 }
 var c = C(C());
 ''');
-    // TODO (pq): results are incompatible w/ `unnecessary_const`
     await assertHasFix(r'''
 class C {
   const C([C c]);
 }
-var c = const C(const C());
+var c = const C(C());
 ''');
   }
 }
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 797f097..bdcfb2a 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
@@ -7,13 +7,11 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AddExplicitCastTest);
-    defineReflectiveTests(AddExplicitCastWithNullSafetyTest);
   });
 }
 
@@ -215,6 +213,24 @@
 ''');
   }
 
+  Future<void> test_assignment_null() async {
+    await resolveTestCode('''
+void f(int x) {
+  x = null;
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_assignment_nullable() async {
+    await resolveTestCode('''
+void f(int x, int? y) {
+  x = y;
+}
+''');
+    await assertNoFix();
+  }
+
   Future<void> test_assignment_set() async {
     await resolveTestCode('''
 f(Set<A> a) {
@@ -486,25 +502,3 @@
     );
   }
 }
-
-@reflectiveTest
-class AddExplicitCastWithNullSafetyTest extends AddExplicitCastTest
-    with WithNullSafetyMixin {
-  Future<void> test_assignment_null() async {
-    await resolveTestCode('''
-void f(int x) {
-  x = null;
-}
-''');
-    await assertNoFix();
-  }
-
-  Future<void> test_assignment_nullable() async {
-    await resolveTestCode('''
-void f(int x, int? y) {
-  x = y;
-}
-''');
-    await assertNoFix();
-  }
-}
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 8c49597..dc08b79 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
@@ -7,13 +7,11 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AddMissingRequiredArgumentTest);
-    defineReflectiveTests(AddMissingRequiredArgumentWithNullSafetyTest);
   });
 }
 
@@ -231,6 +229,91 @@
 ''');
   }
 
+  Future<void> test_constructor_single_closure_nnbd() async {
+    addSource('/home/test/lib/a.dart', r'''
+typedef int Callback(int? a);
+
+class A {
+  A({required Callback callback}) {}
+}
+''');
+    await resolveTestCode('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (int? a) {  });
+  print(a);
+}
+''');
+  }
+
+  Future<void> test_constructor_single_closure_nnbd_from_legacy() async {
+    addSource('/home/test/lib/a.dart', r'''
+// @dart = 2.8
+import 'package:meta/meta.dart';
+
+typedef int Callback(int a);
+
+class A {
+  A({@required Callback callback}) {}
+}
+''');
+    await resolveTestCode('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (int a) {  });
+  print(a);
+}
+''',
+        errorFilter: (error) =>
+            error.errorCode == HintCode.MISSING_REQUIRED_PARAM);
+  }
+
+  Future<void> test_constructor_single_closure_nnbd_into_legacy() async {
+    addSource('/home/test/lib/a.dart', r'''
+typedef int Callback(int? a);
+
+class A {
+  A({required Callback callback}) {}
+}
+''');
+    await resolveTestCode('''
+// @dart = 2.8
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+// @dart = 2.8
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (int a) {  });
+  print(a);
+}
+''');
+  }
+
   Future<void> test_constructor_single_list() async {
     addSource('/home/test/lib/a.dart', r'''
 class A {
@@ -300,6 +383,36 @@
 ''', errorFilter: (error) => error.message.contains("'bcd'"));
   }
 
+  Future<void> test_nonNullable() async {
+    await resolveTestCode('''
+void f({required int x}) {}
+void g() {
+  f();
+}
+''');
+    await assertHasFix('''
+void f({required int x}) {}
+void g() {
+  f(x: null);
+}
+''');
+  }
+
+  Future<void> test_nullable() async {
+    await resolveTestCode('''
+void f({required int? x}) {}
+void g() {
+  f();
+}
+''');
+    await assertHasFix('''
+void f({required int? x}) {}
+void g() {
+  f(x: null);
+}
+''');
+  }
+
   Future<void> test_param_child() async {
     await resolveTestCode('''
 import 'package:flutter/widgets.dart';
@@ -391,131 +504,3 @@
 ''');
   }
 }
-
-@reflectiveTest
-class AddMissingRequiredArgumentWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
-  @override
-  FixKind get kind => DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT;
-
-  @override
-  void setUp() {
-    super.setUp();
-    writeTestPackageConfig(meta: true);
-  }
-
-  Future<void> test_constructor_single_closure_nnbd() async {
-    addSource('/home/test/lib/a.dart', r'''
-typedef int Callback(int? a);
-
-class A {
-  A({required Callback callback}) {}
-}
-''');
-    await resolveTestCode('''
-import 'package:test/a.dart';
-
-main() {
-  A a = new A();
-  print(a);
-}
-''');
-    await assertHasFix('''
-import 'package:test/a.dart';
-
-main() {
-  A a = new A(callback: (int? a) {  });
-  print(a);
-}
-''');
-  }
-
-  Future<void> test_constructor_single_closure_nnbd_from_legacy() async {
-    addSource('/home/test/lib/a.dart', r'''
-// @dart = 2.8
-import 'package:meta/meta.dart';
-
-typedef int Callback(int a);
-
-class A {
-  A({@required Callback callback}) {}
-}
-''');
-    await resolveTestCode('''
-import 'package:test/a.dart';
-
-main() {
-  A a = new A();
-  print(a);
-}
-''');
-    await assertHasFix('''
-import 'package:test/a.dart';
-
-main() {
-  A a = new A(callback: (int a) {  });
-  print(a);
-}
-''',
-        errorFilter: (error) =>
-            error.errorCode == HintCode.MISSING_REQUIRED_PARAM);
-  }
-
-  Future<void> test_constructor_single_closure_nnbd_into_legacy() async {
-    addSource('/home/test/lib/a.dart', r'''
-typedef int Callback(int? a);
-
-class A {
-  A({required Callback callback}) {}
-}
-''');
-    await resolveTestCode('''
-// @dart = 2.8
-import 'package:test/a.dart';
-
-main() {
-  A a = new A();
-  print(a);
-}
-''');
-    await assertHasFix('''
-// @dart = 2.8
-import 'package:test/a.dart';
-
-main() {
-  A a = new A(callback: (int a) {  });
-  print(a);
-}
-''');
-  }
-
-  Future<void> test_nonNullable() async {
-    await resolveTestCode('''
-void f({required int x}) {}
-void g() {
-  f();
-}
-''');
-    await assertHasFix('''
-void f({required int x}) {}
-void g() {
-  f(x: null);
-}
-''');
-  }
-
-  Future<void> test_nullable() async {
-    await resolveTestCode('''
-void f({required int? x}) {}
-void g() {
-  f();
-}
-''');
-    await assertHasFix('''
-void f({required int? x}) {}
-void g() {
-  f(x: null);
-}
-''');
-  }
-}
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 0d52849..6207ad2 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
@@ -7,7 +7,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -18,7 +17,7 @@
 }
 
 @reflectiveTest
-class AddNeNullMultiTest extends FixProcessorTest with WithNullSafetyMixin {
+class AddNeNullMultiTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.ADD_NE_NULL_MULTI;
 
@@ -61,7 +60,7 @@
 }
 
 @reflectiveTest
-class AddNeNullTest extends FixProcessorTest with WithNullSafetyMixin {
+class AddNeNullTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.ADD_NE_NULL;
 
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
index e516e85..5cb45e5 100644
--- 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
@@ -8,7 +8,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -18,7 +17,7 @@
 }
 
 @reflectiveTest
-class AddNullCheckTest extends FixProcessorTest with WithNullSafetyMixin {
+class AddNullCheckTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.ADD_NULL_CHECK;
 
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 3d633b0..1da0c9d 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
@@ -7,7 +7,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -69,8 +68,7 @@
 }
 
 @reflectiveTest
-class AddRequiredWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class AddRequiredWithNullSafetyTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.ADD_REQUIRED2;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_switch_case_break_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_switch_case_break_test.dart
new file mode 100644
index 0000000..618ca93
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_switch_case_break_test.dart
@@ -0,0 +1,83 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddSwitchCaseBreakBulkTest);
+    defineReflectiveTests(AddSwitchCaseBreakTest);
+  });
+}
+
+@reflectiveTest
+class AddSwitchCaseBreakBulkTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_SWITCH_CASE_BREAK_MULTI;
+
+  Future<void> test_add_break_bulk() async {
+    await resolveTestCode('''
+void f(int i) {
+  switch(i) {
+    case 0:
+      i++;
+    case 1:
+      i++;
+    case 2:
+      i++;
+  }
+}
+''');
+    await assertHasFixAllFix(
+        CompileTimeErrorCode.SWITCH_CASE_COMPLETES_NORMALLY, '''
+void f(int i) {
+  switch(i) {
+    case 0:
+      i++;
+      break;
+    case 1:
+      i++;
+      break;
+    case 2:
+      i++;
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class AddSwitchCaseBreakTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_SWITCH_CASE_BREAK;
+
+  Future<void> test_indentation() async {
+    await resolveTestCode('''
+void f(int i) {
+    switch(i) {
+        case 0:
+            i++;
+        case 1:
+            i++;
+  }
+}
+''');
+    await assertHasFix('''
+void f(int i) {
+    switch(i) {
+        case 0:
+            i++;
+            break;
+        case 1:
+            i++;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_quotes_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_quotes_test.dart
new file mode 100644
index 0000000..29f6d15
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_quotes_test.dart
@@ -0,0 +1,146 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/expect.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertQuotesBulkTest);
+    defineReflectiveTests(ConvertQuotesInFileTest);
+    defineReflectiveTests(ConvertQuotesTest);
+  });
+}
+
+@reflectiveTest
+class ConvertQuotesBulkTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_escaping_inner_quotes;
+
+  Future<void> test_string_in_interpolation_string() async {
+    await resolveTestCode(r'''
+void f() {
+  print('a\'${'b\'c'}\'d');
+}
+''');
+    await assertHasFix(r'''
+void f() {
+  print("a'${"b'c"}'d");
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ConvertQuotesInFileTest extends FixInFileProcessorTest {
+  Future<void> test_File() async {
+    createAnalysisOptionsFile(lints: [LintNames.avoid_escaping_inner_quotes]);
+    await resolveTestCode(r'''
+void f() {
+  print("a\"b\"c");
+  print('d\'e\'f');
+}
+''');
+    var fixes = await getFixesForFirstError();
+    expect(fixes, hasLength(1));
+    assertProduces(fixes.first, r'''
+void f() {
+  print('a"b"c');
+  print("d'e'f");
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ConvertQuotesTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.CONVERT_QUOTES;
+
+  @override
+  String get lintCode => LintNames.avoid_escaping_inner_quotes;
+
+  Future<void> test_backslash() async {
+    await resolveTestCode(r'''
+void f() {
+  print('\\\'b\'\$');
+}
+''');
+    await assertHasFix(r'''
+void f() {
+  print("\\'b'\$");
+}
+''');
+  }
+
+  Future<void> test_double_quotes() async {
+    await resolveTestCode(r'''
+void f() {
+  print("a\"\"c");
+}
+''');
+    await assertHasFix(r'''
+void f() {
+  print('a""c');
+}
+''');
+  }
+
+  Future<void> test_interpolation() async {
+    await resolveTestCode(r'''
+void f(String d) {
+  print('a\'b\'c $d');
+}
+''');
+    await assertHasFix(r'''
+void f(String d) {
+  print("a'b'c $d");
+}
+''');
+  }
+
+  Future<void> test_interpolation_string() async {
+    await resolveTestCode(r'''
+void f(String d) {
+  print('a\'b\'c ${d.length}');
+}
+''');
+    await assertHasFix(r'''
+void f(String d) {
+  print("a'b'c ${d.length}");
+}
+''');
+  }
+
+  Future<void> test_single_quotes() async {
+    await resolveTestCode(r'''
+void f() {
+  print('a\'b\'c');
+}
+''');
+    await assertHasFix(r'''
+void f() {
+  print("a'b'c");
+}
+''');
+  }
+
+  Future<void> test_string_in_interpolation_string() async {
+    await resolveTestCode(r'''
+void f() {
+  print('a${'b\'c'}d');
+}
+''');
+    await assertHasFix(r'''
+void f() {
+  print('a${"b'c"}d');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_to_null_aware_spread_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_to_null_aware_spread_test.dart
index 8cdcb25..f5b0205 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/convert_to_null_aware_spread_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_to_null_aware_spread_test.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -16,8 +15,7 @@
 }
 
 @reflectiveTest
-class ConvertToNullAwareSpreadTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class ConvertToNullAwareSpreadTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.CONVERT_TO_NULL_AWARE_SPREAD;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart
index 6230cde..92c5799 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart
@@ -7,13 +7,11 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CreateConstructorForFinalFieldsTest);
-    defineReflectiveTests(CreateConstructorForFinalFieldsWithNullSafetyTest);
   });
 }
 
@@ -22,6 +20,23 @@
   @override
   FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS;
 
+  Future<void> test_excludesLate() async {
+    await resolveTestCode('''
+class Test {
+  final int a;
+  late final int b;
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  late final int b;
+
+  Test(this.a);
+}
+''');
+  }
+
   Future<void> test_flutter() async {
     writeTestPackageConfig(flutter: true);
     await resolveTestCode('''
@@ -160,27 +175,3 @@
     await assertNoFix();
   }
 }
-
-@reflectiveTest
-class CreateConstructorForFinalFieldsWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
-  @override
-  FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS;
-
-  Future<void> test_excludesLate() async {
-    await resolveTestCode('''
-class Test {
-  final int a;
-  late final int b;
-}
-''');
-    await assertHasFix('''
-class Test {
-  final int a;
-  late final int b;
-
-  Test(this.a);
-}
-''');
-  }
-}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart
index 0f08223..638a199 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart
@@ -8,13 +8,11 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CreateMissingOverridesTest);
-    defineReflectiveTests(CreateMissingOverridesWithNullSafetyTest);
   });
 }
 
@@ -170,6 +168,52 @@
 ''');
   }
 
+  Future<void> test_functionTypedParameter_dynamic() async {
+    await resolveTestCode('''
+abstract class A {
+  void m(bool test(e));
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  void m(bool test(e));
+}
+
+class B extends A {
+  @override
+  void m(bool Function(dynamic e) test) {
+    // TODO: implement m
+  }
+}
+''');
+  }
+
+  Future<void> test_functionTypedParameter_nullable() async {
+    await resolveTestCode('''
+abstract class A {
+  void forEach(int f(double p1, String p2)?);
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  void forEach(int f(double p1, String p2)?);
+}
+
+class B extends A {
+  @override
+  void forEach(int Function(double p1, String p2)? f) {
+    // TODO: implement forEach
+  }
+}
+''');
+  }
+
   Future<void> test_generics_typeArguments() async {
     await resolveTestCode('''
 class Iterator<T> {
@@ -438,6 +482,52 @@
 ''');
   }
 
+  Future<void> test_method_generic_nullable_dynamic() async {
+    // https://github.com/dart-lang/sdk/issues/43535
+    await resolveTestCode('''
+class A {
+  void doSomething(Map<String, dynamic>? m) {}
+}
+
+class B implements A {}
+''');
+    await assertHasFix('''
+class A {
+  void doSomething(Map<String, dynamic>? m) {}
+}
+
+class B implements A {
+  @override
+  void doSomething(Map<String, dynamic>? m) {
+    // TODO: implement doSomething
+  }
+}
+''');
+  }
+
+  Future<void> test_method_generic_nullable_Never() async {
+    // https://github.com/dart-lang/sdk/issues/43535
+    await resolveTestCode('''
+class A {
+  void doSomething(Map<String, Never>? m) {}
+}
+
+class B implements A {}
+''');
+    await assertHasFix('''
+class A {
+  void doSomething(Map<String, Never>? m) {}
+}
+
+class B implements A {
+  @override
+  void doSomething(Map<String, Never>? m) {
+    // TODO: implement doSomething
+  }
+}
+''');
+  }
+
   Future<void> test_method_generic_withBounds() async {
     // https://github.com/dart-lang/sdk/issues/31199
     await resolveTestCode('''
@@ -685,56 +775,3 @@
 ''');
   }
 }
-
-@reflectiveTest
-class CreateMissingOverridesWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
-  @override
-  FixKind get kind => DartFixKind.CREATE_MISSING_OVERRIDES;
-
-  Future<void> test_method_generic_nullable_dynamic() async {
-    // https://github.com/dart-lang/sdk/issues/43535
-    await resolveTestCode('''
-class A {
-  void doSomething(Map<String, dynamic>? m) {}
-}
-
-class B implements A {}
-''');
-    await assertHasFix('''
-class A {
-  void doSomething(Map<String, dynamic>? m) {}
-}
-
-class B implements A {
-  @override
-  void doSomething(Map<String, dynamic>? m) {
-    // TODO: implement doSomething
-  }
-}
-''');
-  }
-
-  Future<void> test_method_generic_nullable_Never() async {
-    // https://github.com/dart-lang/sdk/issues/43535
-    await resolveTestCode('''
-class A {
-  void doSomething(Map<String, Never>? m) {}
-}
-
-class B implements A {}
-''');
-    await assertHasFix('''
-class A {
-  void doSomething(Map<String, Never>? m) {}
-}
-
-class B implements A {
-  @override
-  void doSomething(Map<String, Never>? m) {
-    // TODO: implement doSomething
-  }
-}
-''');
-  }
-}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
index 9022e5d..cf1aeb9 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
@@ -21,6 +21,7 @@
     defineReflectiveTests(RenameMethodTest);
     defineReflectiveTests(RenameMixinTest);
     defineReflectiveTests(RenameTopLevelFunctionTest);
+    defineReflectiveTests(RenameTopLevelVariableTest);
     defineReflectiveTests(RenameTypedefTest);
   });
 }
@@ -130,6 +131,29 @@
 ''', errorFilter: ignoreUnusedImport);
   }
 
+  Future<void> test_constructor_unnamed_removed_prefixed() async {
+    setPackageContent('''
+class New {
+  New();
+}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.Old();
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.New();
+}
+''');
+  }
+
   Future<void> test_inExtends_deprecated() async {
     setPackageContent('''
 @deprecated
@@ -501,6 +525,29 @@
 }
 ''');
   }
+
+  Future<void> test_unnamed_named_removed_prefixed() async {
+    setPackageContent('''
+class C {
+  C.a();
+}
+''');
+    setPackageData(_rename(['', 'C'], 'a'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.C();
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.C.a();
+}
+''');
+  }
 }
 
 @reflectiveTest
@@ -591,6 +638,25 @@
 var s = New.empty;
 ''', errorFilter: ignoreUnusedImport);
   }
+
+  Future<void> test_staticField_removed_prefixed() async {
+    setPackageContent('''
+extension New on String {
+  static String empty = '';
+}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+var s = p.Old.empty;
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+var s = p.New.empty;
+''');
+  }
 }
 
 @reflectiveTest
@@ -623,6 +689,37 @@
 ''');
   }
 
+  Future<void> test_instance_reference_inPropertyAccess() async {
+    setPackageContent('''
+class A {
+  static B m() => B();
+}
+class B {
+  @deprecated
+  final String f = '';
+  final C g = C();
+}
+class C {
+  final String h = '';
+}
+''');
+    setPackageData(_rename(['f', 'B'], 'g.h'));
+    await resolveTestCode('''
+import '$importUri';
+
+void f() {
+  A.m().f;
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  A.m().g.h;
+}
+''');
+  }
+
   Future<void> test_instance_reference_removed() async {
     setPackageContent('''
 class C {
@@ -741,6 +838,29 @@
 }
 ''');
   }
+
+  Future<void> test_static_reference_removed_prefixed() async {
+    setPackageContent('''
+class C {
+  static int b;
+}
+''');
+    setPackageData(_rename(['a', 'C'], 'b'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.C.a;
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.C.b;
+}
+''');
+  }
 }
 
 @reflectiveTest
@@ -936,6 +1056,27 @@
 }
 ''', errorFilter: ignoreUnusedImport);
   }
+
+  Future<void> test_topLevel_reference_removed_prefixed() async {
+    setPackageContent('''
+int get b => 1;
+''');
+    setPackageData(_rename(['a'], 'b'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.a;
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.b;
+}
+''');
+  }
 }
 
 @reflectiveTest
@@ -1091,6 +1232,29 @@
 }
 ''');
   }
+
+  Future<void> test_static_reference_removed_prefixed() async {
+    setPackageContent('''
+class C {
+  static int b() {}
+}
+''');
+    setPackageData(_rename(['a', 'C'], 'b'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.C.a();
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.C.b();
+}
+''');
+  }
 }
 
 @reflectiveTest
@@ -1133,6 +1297,23 @@
 class C with New {}
 ''', errorFilter: ignoreUnusedImport);
   }
+
+  Future<void> test_inWith_removed_prefixed() async {
+    setPackageContent('''
+mixin New {}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+class C with p.Old {}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+class C with p.New {}
+''');
+  }
 }
 
 @reflectiveTest
@@ -1183,6 +1364,110 @@
 }
 ''', errorFilter: ignoreUnusedImport);
   }
+
+  Future<void> test_removed_prefixed() async {
+    setPackageContent('''
+int b() {}
+''');
+    setPackageData(_rename(['a'], 'b'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f() {
+  p.a();
+}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f() {
+  p.b();
+}
+''');
+  }
+}
+
+@reflectiveTest
+class RenameTopLevelVariableTest extends _AbstractRenameTest {
+  @override
+  String get _kind => 'variable';
+
+  Future<void> test_toStaticField_noPrefix_deprecated() async {
+    setPackageContent('''
+@deprecated
+int Old = 0;
+class C {
+  int New = 1;
+}
+''');
+    setPackageData(_rename(['Old'], 'C.New'));
+    await resolveTestCode('''
+import '$importUri';
+
+int f() => Old;
+''');
+    await assertHasFix('''
+import '$importUri';
+
+int f() => C.New;
+''');
+  }
+
+  Future<void> test_toTopLevel_withoutPrefix_deprecated() async {
+    setPackageContent('''
+@deprecated
+int Old = 0;
+int New = 1;
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri';
+
+int f() => Old;
+''');
+    await assertHasFix('''
+import '$importUri';
+
+int f() => New;
+''');
+  }
+
+  Future<void> test_toTopLevel_withoutPrefix_removed() async {
+    setPackageContent('''
+C New = C();
+class C {}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri';
+
+C f() => Old;
+''');
+    await assertHasFix('''
+import '$importUri';
+
+C f() => New;
+''');
+  }
+
+  Future<void> test_toTopLevel_withPrefix_deprecated() async {
+    setPackageContent('''
+@deprecated
+int Old = 0;
+int New = 1;
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+int f() => p.Old;
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+int f() => p.New;
+''');
+  }
 }
 
 @reflectiveTest
@@ -1225,6 +1510,23 @@
 void f(New o) {}
 ''', errorFilter: ignoreUnusedImport);
   }
+
+  Future<void> test_removed_prefixed() async {
+    setPackageContent('''
+typedef New = int Function(int);
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestCode('''
+import '$importUri' as p;
+
+void f(p.Old o) {}
+''');
+    await assertHasFix('''
+import '$importUri' as p;
+
+void f(p.New o) {}
+''');
+  }
 }
 
 abstract class _AbstractRenameTest extends DataDrivenFixProcessorTest {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
index 6e27913..83e66a2b 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_processor_map_test.dart
@@ -15,12 +15,20 @@
 
 @reflectiveTest
 class FixProcessorMapTest {
+  static const List<String> lintsAllowedToHaveMultipleBulkFixes = [
+    'avoid_types_on_closure_parameters',
+    'empty_statements',
+    'prefer_collection_literals',
+    'prefer_inlined_adds',
+  ];
+
   void test_lintProducerMap() {
-    _testMap(FixProcessor.lintProducerMap.values);
+    _assertMap(FixProcessor.lintProducerMap.entries,
+        lintsAllowedToHaveMultipleBulkFixes);
   }
 
   void test_nonLintProducerMap() {
-    _testMap(FixProcessor.nonLintProducerMap.values);
+    _assertMap(FixProcessor.nonLintProducerMap.entries);
   }
 
   void test_registerFixForLint() {
@@ -34,8 +42,36 @@
     FixProcessor.lintProducerMap.remove(lintName);
   }
 
-  void _testGenerator(ProducerGenerator generator) {
-    var producer = generator();
+  void _assertMap<K>(Iterable<MapEntry<K, List<ProducerGenerator>>> entries,
+      [List<String> keysAllowedToHaveMultipleBulkFixes = const []]) {
+    var list = <String>[];
+    for (var entry in entries) {
+      var bulkCount = 0;
+      for (var generator in entry.value) {
+        var producer = generator();
+        _assertValidProducer(producer);
+        if (producer.canBeAppliedInBulk) {
+          bulkCount++;
+        }
+      }
+      if (bulkCount > 1) {
+        var key = entry.key.toString();
+        if (!keysAllowedToHaveMultipleBulkFixes.contains(key)) {
+          list.add(key);
+        }
+      }
+    }
+    if (list.isNotEmpty) {
+      var buffer = StringBuffer();
+      buffer.writeln('Multiple bulk fixes for');
+      for (var code in list) {
+        buffer.writeln('- $code');
+      }
+      fail(buffer.toString());
+    }
+  }
+
+  void _assertValidProducer(CorrectionProducer producer) {
     var className = producer.runtimeType.toString();
     expect(producer.fixKind, isNotNull, reason: '$className.fixKind');
     if (producer.canBeAppliedToFile) {
@@ -43,14 +79,6 @@
           reason: '$className.multiFixKind');
     }
   }
-
-  void _testMap(Iterable<List<ProducerGenerator>> values) {
-    for (var generators in values) {
-      for (var generator in generators) {
-        _testGenerator(generator);
-      }
-    }
-  }
 }
 
 class MockCorrectionProducer implements CorrectionProducer {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_conditional_on_debug_mode_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_conditional_on_debug_mode_test.dart
new file mode 100644
index 0000000..8efa0ef
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_conditional_on_debug_mode_test.dart
@@ -0,0 +1,77 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeConditionalOnDebugModeTest);
+    defineReflectiveTests(MakeConditionalOnDebugModeWithoutFlutterTest);
+  });
+}
+
+@reflectiveTest
+class MakeConditionalOnDebugModeTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_CONDITIONAL_ON_DEBUG_MODE;
+
+  @override
+  String get lintCode => LintNames.avoid_print;
+
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfig(
+      flutter: true,
+    );
+  }
+
+  Future<void> test_nested() async {
+    await resolveTestCode('''
+void f(bool b) {
+  b ? print('') : f(true);
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_statement() async {
+    await resolveTestCode('''
+void f() {
+  print('');
+}
+''');
+    await assertHasFix('''
+void f() {
+  if (kDebugMode) {
+    print('');
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class MakeConditionalOnDebugModeWithoutFlutterTest
+    extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_CONDITIONAL_ON_DEBUG_MODE;
+
+  @override
+  String get lintCode => LintNames.avoid_print;
+
+  Future<void> test_statement() async {
+    await resolveTestCode('''
+void f() {
+  print('');
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_field_public_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_field_public_test.dart
new file mode 100644
index 0000000..3b95f2c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_field_public_test.dart
@@ -0,0 +1,42 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeFieldPublicTest);
+  });
+}
+
+@reflectiveTest
+class MakeFieldPublicTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_FIELD_PUBLIC;
+
+  @override
+  String get lintCode => LintNames.unnecessary_getters_setters;
+
+  Future<void> test_class() async {
+    await resolveTestCode('''
+class C {
+  int _f = 0;
+
+  int get f => _f;
+
+  void set f(int p) => _f = p;
+}
+''');
+    await assertHasFix('''
+class C {
+  int f = 0;
+}
+''');
+  }
+}
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
index 7e976e7..ae6ff05 100644
--- 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
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -16,8 +16,7 @@
 }
 
 @reflectiveTest
-class MakeReturnTypeNullableTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class MakeReturnTypeNullableTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.MAKE_RETURN_TYPE_NULLABLE;
 
@@ -88,6 +87,23 @@
 ''');
   }
 
+  /// This code is parsed in such a way that we find `void` as an `Expression`.
+  /// But this expression is a name in a `NamedType`, and so `NamedType` has
+  /// the `type`, but not `void` - its type is `null`. So, the producer should
+  /// check for `null`, and don't expect that every expression has a type.
+  Future<void> test_getter_sync_invalidVoid() async {
+    await resolveTestCode('''
+int f() {
+  return void;
+}
+''');
+    await assertNoFix(
+      errorFilter: (e) =>
+          e.errorCode ==
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
+    );
+  }
+
   Future<void> test_incompatibilityIsNotLimitedToNullability() async {
     await resolveTestCode('''
 int f() {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
index f619f67..611de4e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_variable_nullable_test.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -16,8 +15,7 @@
 }
 
 @reflectiveTest
-class MakeVariableNullableTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class MakeVariableNullableTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.MAKE_VARIABLE_NULLABLE;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart b/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart
index 093dddd..4a54aa0 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart
@@ -40,4 +40,39 @@
 void f(Stream<String> args) { }
 ''');
   }
+
+  Future<void> test_organizePathImports() async {
+    newFile('/home/test/lib/a.dart', content: '''
+class A {
+  static void m() {}
+}
+''');
+    newFile('/home/test/lib/a/b.dart', content: '''
+class B {
+  static void m() {}
+}
+''');
+
+    await resolveTestCode('''
+import 'dart:async';
+import 'a/b.dart';
+import 'a.dart';
+
+void f(Stream<String> args) {
+  A.m();
+  B.m();
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+import 'a.dart';
+import 'a/b.dart';
+
+void f(Stream<String> args) {
+  A.m();
+  B.m();
+}
+''');
+  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart
index 5846f51..dcf483f 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart
@@ -10,7 +10,6 @@
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test/test.dart';
-import 'package:yaml/src/yaml_node.dart';
 import 'package:yaml/yaml.dart';
 
 abstract class PubspecFixTest with ResourceProviderMixin {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_abstract_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_abstract_test.dart
new file mode 100644
index 0000000..f1cab1e
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_abstract_test.dart
@@ -0,0 +1,83 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.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(RemoveAbstractBulkTest);
+    defineReflectiveTests(RemoveAbstractTest);
+  });
+}
+
+@reflectiveTest
+class RemoveAbstractBulkTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_ABSTRACT_MULTI;
+
+  Future<void> test_bulk() async {
+    await resolveTestCode('''
+class MyClass {
+  abstract void m1() {}
+  abstract void m2() {}
+}
+''');
+    await assertHasFixAllFix(ParserErrorCode.ABSTRACT_CLASS_MEMBER, '''
+class MyClass {
+  void m1() {}
+  void m2() {}
+}
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveAbstractTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_ABSTRACT;
+
+  Future<void> test_extension() async {
+    await resolveTestCode('''
+extension E on String {
+  abstract void m() {}
+}
+''');
+    await assertHasFix('''
+extension E on String {
+  void m() {}
+}
+''');
+  }
+
+  Future<void> test_mixin() async {
+    await resolveTestCode('''
+mixin M {
+  abstract void m() {}
+}
+''');
+    await assertHasFix('''
+mixin M {
+  void m() {}
+}
+''');
+  }
+
+  Future<void> test_spaces() async {
+    await resolveTestCode('''
+abstract class MyClass {
+  abstract    void m1();
+}
+''');
+    await assertHasFix('''
+abstract class MyClass {
+  void m1();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_comparison_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_comparison_test.dart
index 3e73604..0a1f5f7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_comparison_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_comparison_test.dart
@@ -8,7 +8,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -20,7 +19,7 @@
 }
 
 @reflectiveTest
-class RemoveComparisonTest extends FixProcessorTest with WithNullSafetyMixin {
+class RemoveComparisonTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_COMPARISON;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_constructor_name_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_constructor_name_test.dart
new file mode 100644
index 0000000..27e84a8
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_constructor_name_test.dart
@@ -0,0 +1,106 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/expect.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveConstructorNameBulkTest);
+    defineReflectiveTests(RemoveConstructorNameInFileTest);
+    defineReflectiveTests(RemoveConstructorNameTest);
+  });
+}
+
+@reflectiveTest
+class RemoveConstructorNameBulkTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_constructor_name;
+
+  Future<void> test_singleFile() async {
+    await resolveTestCode(r'''
+class A {
+  A.new(int x) {
+    print('new: $x');
+  }
+}
+var a = A.new(3);
+''');
+    await assertHasFix(r'''
+class A {
+  A(int x) {
+    print('new: $x');
+  }
+}
+var a = A(3);
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveConstructorNameInFileTest extends FixInFileProcessorTest {
+  Future<void> test_File() async {
+    createAnalysisOptionsFile(lints: [LintNames.unnecessary_constructor_name]);
+    await resolveTestCode(r'''
+class A {
+  A.new(int x) {
+    print('new: $x');
+  }
+}
+var a = A.new(3);
+''');
+    var fixes = await getFixesForFirstError();
+    expect(fixes, hasLength(1));
+    assertProduces(fixes.first, r'''
+class A {
+  A(int x) {
+    print('new: $x');
+  }
+}
+var a = A(3);
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveConstructorNameTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_CONSTRUCTOR_NAME;
+
+  @override
+  String get lintCode => LintNames.unnecessary_constructor_name;
+
+  Future<void> test_constructorDeclaration() async {
+    await resolveTestCode(r'''
+class A {
+  A.new(int x) {
+    print('new: $x');
+  }
+}
+''');
+    await assertHasFix(r'''
+class A {
+  A(int x) {
+    print('new: $x');
+  }
+}
+''');
+  }
+
+  Future<void> test_constructorInvocation() async {
+    await resolveTestCode(r'''
+class A { }
+var a = A.new();
+''');
+    await assertHasFix(r'''
+class A { }
+var a = A();
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart
index d9d83cb..81cd56c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart
@@ -6,13 +6,11 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(RemoveDeadCodeTest);
-    defineReflectiveTests(RemoveDeadCodeWithNullSafetyTest);
   });
 }
 
@@ -105,46 +103,6 @@
 ''');
   }
 
-  Future<void> test_statements_one() async {
-    await resolveTestCode('''
-int f() {
-  print(0);
-  return 42;
-  print(1);
-}
-''');
-    await assertHasFix('''
-int f() {
-  print(0);
-  return 42;
-}
-''');
-  }
-
-  Future<void> test_statements_two() async {
-    await resolveTestCode('''
-int f() {
-  print(0);
-  return 42;
-  print(1);
-  print(2);
-}
-''');
-    await assertHasFix('''
-int f() {
-  print(0);
-  return 42;
-}
-''');
-  }
-}
-
-@reflectiveTest
-class RemoveDeadCodeWithNullSafetyTest extends FixProcessorTest
-    with WithNullSafetyMixin {
-  @override
-  FixKind get kind => DartFixKind.REMOVE_DEAD_CODE;
-
   @failingTest
   Future<void> test_do_returnInBody() async {
     // https://github.com/dart-lang/sdk/issues/43511
@@ -180,4 +138,37 @@
 }
 ''');
   }
+
+  Future<void> test_statements_one() async {
+    await resolveTestCode('''
+int f() {
+  print(0);
+  return 42;
+  print(1);
+}
+''');
+    await assertHasFix('''
+int f() {
+  print(0);
+  return 42;
+}
+''');
+  }
+
+  Future<void> test_statements_two() async {
+    await resolveTestCode('''
+int f() {
+  print(0);
+  return 42;
+  print(1);
+  print(2);
+}
+''');
+    await assertHasFix('''
+int f() {
+  print(0);
+  return 42;
+}
+''');
+  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_if_null_operator_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_if_null_operator_test.dart
index e210ebc..0b58dcb 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_if_null_operator_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_if_null_operator_test.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -20,8 +19,7 @@
 }
 
 @reflectiveTest
-class DeadNullAwareAssignmentExpressionTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class DeadNullAwareAssignmentExpressionTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_IF_NULL_OPERATOR;
 
@@ -85,8 +83,7 @@
 }
 
 @reflectiveTest
-class DeadNullAwareExpressionTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class DeadNullAwareExpressionTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_IF_NULL_OPERATOR;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_non_null_assertion_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_non_null_assertion_test.dart
index ee3e204..948fc7c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_non_null_assertion_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_non_null_assertion_test.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -17,8 +16,7 @@
 }
 
 @reflectiveTest
-class RemoveNonNullAssertionBulkTest extends BulkFixProcessorTest
-    with WithNullSafetyMixin {
+class RemoveNonNullAssertionBulkTest extends BulkFixProcessorTest {
   Future<void> test_singleFile() async {
     await resolveTestCode('''
 void f(String a) {
@@ -34,8 +32,7 @@
 }
 
 @reflectiveTest
-class RemoveNonNullAssertionTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class RemoveNonNullAssertionTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_NON_NULL_ASSERTION;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_question_mark_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_question_mark_test.dart
index 20ee77f..da6cc96 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_question_mark_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_question_mark_test.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -44,7 +43,7 @@
 }
 
 @reflectiveTest
-class RemoveQuestionMarkTest extends FixProcessorTest with WithNullSafetyMixin {
+class RemoveQuestionMarkTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_QUESTION_MARK;
 
@@ -125,7 +124,7 @@
 
 @reflectiveTest
 class UnnecessaryNullableForFinalVariableDeclarationsTest
-    extends FixProcessorLintTest with WithNullSafetyMixin {
+    extends FixProcessorLintTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_QUESTION_MARK;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart
index c0805e5..24cb208 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart
@@ -11,12 +11,35 @@
 
 void main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryCastBulkTest);
     defineReflectiveTests(RemoveUnnecessaryCastMultiTest);
     defineReflectiveTests(RemoveUnnecessaryCastTest);
   });
 }
 
 @reflectiveTest
+class RemoveUnnecessaryCastBulkTest extends BulkFixProcessorTest {
+  Future<void> test_assignment() async {
+    await resolveTestCode('''
+void f(Object p) {
+  if (p is String) {
+    var v = (p as String) as String;
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+void f(Object p) {
+  if (p is String) {
+    var v = p;
+    print(v);
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
 class RemoveUnnecessaryCastMultiTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REMOVE_UNNECESSARY_CAST_MULTI;
@@ -25,7 +48,7 @@
     await resolveTestCode('''
 void f(Object p, Object q) {
   if (p is String) {
-    String v = ((p as String));
+    var v = (p as String) as String;
     print(v);
   }
   if (q is int) {
@@ -37,7 +60,7 @@
     await assertHasFixAllFix(HintCode.UNNECESSARY_CAST, '''
 void f(Object p, Object q) {
   if (p is String) {
-    String v = p;
+    var v = p;
     print(v);
   }
   if (q is int) {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_raw_string_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_raw_string_test.dart
new file mode 100644
index 0000000..25d0f84
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_raw_string_test.dart
@@ -0,0 +1,106 @@
+// 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.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/expect.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryRawStringBulkTest);
+    defineReflectiveTests(RemoveUnnecessaryRawStringInFileTest);
+    defineReflectiveTests(RemoveUnnecessaryRawStringTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnnecessaryRawStringBulkTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_raw_strings;
+
+  Future<void> test_singleFile() async {
+    await resolveTestCode('''
+var a = r'ace';
+var b = r'aid';
+''');
+    await assertHasFix('''
+var a = 'ace';
+var b = 'aid';
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveUnnecessaryRawStringInFileTest extends FixInFileProcessorTest {
+  Future<void> test_file() async {
+    createAnalysisOptionsFile(lints: [LintNames.unnecessary_raw_strings]);
+    await resolveTestCode('''
+var a = r'ace';
+var b = r'aid';
+''');
+    var fixes = await getFixesForFirstError();
+    expect(fixes, hasLength(1));
+    assertProduces(fixes.first, r'''
+var a = 'ace';
+var b = 'aid';
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveUnnecessaryRawStringTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNNECESSARY_RAW_STRING;
+
+  @override
+  String get lintCode => LintNames.unnecessary_raw_strings;
+
+  Future<void> test_double() async {
+    await resolveTestCode('''
+var a = r"ace";
+''');
+    await assertHasFix('''
+var a = "ace";
+''');
+  }
+
+  Future<void> test_multi_line_double() async {
+    await resolveTestCode('''
+var a = r"""
+abc
+""";
+''');
+    await assertHasFix('''
+var a = """
+abc
+""";
+''');
+  }
+
+  Future<void> test_multi_line_single() async {
+    await resolveTestCode("""
+var a = r'''
+abc
+''';
+""");
+    await assertHasFix("""
+var a = '''
+abc
+''';
+""");
+  }
+
+  Future<void> test_single() async {
+    await resolveTestCode('''
+var a = r'ace';
+''');
+    await assertHasFix('''
+var a = 'ace';
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_field_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_field_test.dart
index b0ca4c6..8524de5 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_field_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_field_test.dart
@@ -192,6 +192,23 @@
 ''');
   }
 
+  Future<void> test_unusedField_notUsed_assign_nested() async {
+    await resolveTestCode(r'''
+class A {
+  var _f;
+  main() {
+    _f = () { _f = 0; };
+  }
+}
+''');
+    await assertHasFix(r'''
+class A {
+  main() {
+  }
+}
+''');
+  }
+
   Future<void> test_unusedField_notUsed_compoundAssign() async {
     await resolveTestCode(r'''
 class A {
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 0c42514..9cfafa7 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
@@ -57,20 +57,15 @@
     });
   }
 
-  @failingTest
   Future<void> test_complexTypeName_withoutImport() async {
     await resolveTestCode('''
 List<int> main() async {
 }
 ''');
     await assertHasFix('''
-import 'dart:async';
-
 Future<List<int>> main() async {
 }
-''', errorFilter: (error) {
-      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    });
+''');
   }
 
   Future<void> test_importedWithPrefix() async {
@@ -101,18 +96,13 @@
     });
   }
 
-  @failingTest
   Future<void> test_simpleTypeName_withoutImport() async {
     await resolveTestCode('''
 int main() async => 0;
 ''');
     await assertHasFix('''
-import 'dart:async';
-
 Future<int> main() async => 0;
-''', errorFilter: (error) {
-      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    });
+''');
   }
 
   Future<void> test_withLibraryDirective_withImport() async {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_filled_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_filled_test.dart
index cdfb2bc..a9efc25 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/replace_with_filled_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_filled_test.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -16,7 +15,7 @@
 }
 
 @reflectiveTest
-class ReplaceWithFilledTest extends FixProcessorTest with WithNullSafetyMixin {
+class ReplaceWithFilledTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REPLACE_WITH_FILLED;
 
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
index edd6679..a525dd3 100644
--- 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
@@ -6,7 +6,6 @@
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../../abstract_context.dart';
 import 'fix_processor.dart';
 
 void main() {
@@ -17,8 +16,7 @@
 }
 
 @reflectiveTest
-class ReplaceWithNotNullAwareBulkTest extends BulkFixProcessorTest
-    with WithNullSafetyMixin {
+class ReplaceWithNotNullAwareBulkTest extends BulkFixProcessorTest {
   Future<void> test_notShortCircuit() async {
     await resolveTestCode('''
 void f(A a) {
@@ -65,8 +63,7 @@
 }
 
 @reflectiveTest
-class ReplaceWithNotNullAwareTest extends FixProcessorTest
-    with WithNullSafetyMixin {
+class ReplaceWithNotNullAwareTest extends FixProcessorTest {
   @override
   FixKind get kind => DartFixKind.REPLACE_WITH_NOT_NULL_AWARE;
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart
index 52898ab..49f9041 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart
@@ -53,6 +53,121 @@
   @override
   String get lintCode => LintNames.unnecessary_lambdas;
 
+  Future<void> test_constructorTearOff_named() async {
+    await resolveTestCode('''
+class C {
+  int c;
+  C.create([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map((x) => C.create(x))) {
+    print(c.c);
+  }
+}
+''');
+    await assertHasFix('''
+class C {
+  int c;
+  C.create([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map(C.create)) {
+    print(c.c);
+  }
+}
+''');
+  }
+
+  // @soloTest
+  Future<void> test_constructorTearOff_nameUnnamed() async {
+    await resolveTestCode('''
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map((x) => C.new(x))) {
+    print(c.c);
+  }
+}
+''');
+    await assertHasFix('''
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map(C.new)) {
+    print(c.c);
+  }
+}
+''');
+  }
+
+  Future<void> test_constructorTearOff_oneParameter() async {
+    await resolveTestCode('''
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map((x) => C(x))) {
+    print(c.c);
+  }
+}
+''');
+    await assertHasFix('''
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+void f() {
+  var listOfInts = [1, 2, 3];
+  for (var c in listOfInts.map(C.new)) {
+    print(c.c);
+  }
+}
+''');
+  }
+
+  Future<void> test_constructorTearOff_zeroParameters() async {
+    await resolveTestCode('''
+typedef Maker = Object Function();
+
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+var l = <Maker>[
+  () => C(),
+];
+''');
+    await assertHasFix('''
+typedef Maker = Object Function();
+
+class C {
+  int c;
+  C([this.c = 3]);
+}
+
+var l = <Maker>[
+  C.new,
+];
+''');
+  }
+
   Future<void> test_function_oneParameter() async {
     await resolveTestCode('''
 Function f() => (name) {
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 9d30ea0..7422ec8 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
@@ -34,6 +34,7 @@
 import 'add_static_test.dart' as add_static;
 import 'add_super_constructor_invocation_test.dart'
     as add_super_constructor_invocation;
+import 'add_switch_case_break_test.dart' as add_switch_case_break;
 import 'add_type_annotation_test.dart' as add_type_annotation;
 import 'analysis_options/test_all.dart' as analysis_options;
 import 'bulk_fix_processor_test.dart' as bulk_fix_processor;
@@ -50,6 +51,7 @@
 import 'convert_for_each_to_for_loop_test.dart' as convert_for_each_to_for_loop;
 import 'convert_into_expression_body_test.dart' as convert_into_expression_body;
 import 'convert_into_is_not_test.dart' as convert_into_is_not;
+import 'convert_quotes_test.dart' as convert_quotes;
 import 'convert_to_contains_test.dart' as convert_to_contains;
 import 'convert_to_for_element_test.dart' as convert_to_for_element;
 import 'convert_to_generic_function_syntax_test.dart'
@@ -102,7 +104,10 @@
 import 'inline_typedef_test.dart' as inline_typedef;
 import 'insert_semicolon_test.dart' as insert_semicolon;
 import 'make_class_abstract_test.dart' as make_class_abstract;
+import 'make_conditional_on_debug_mode_test.dart'
+    as make_conditional_on_debug_mode;
 import 'make_field_not_final_test.dart' as make_field_not_final;
+import 'make_field_public_test.dart' as make_field_public;
 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;
@@ -111,11 +116,13 @@
 import 'organize_imports_test.dart' as organize_imports;
 import 'pubspec/test_all.dart' as pubspec;
 import 'qualify_reference_test.dart' as qualify_reference;
+import 'remove_abstract_test.dart' as remove_abstract;
 import 'remove_annotation_test.dart' as remove_annotation;
 import 'remove_argument_test.dart' as remove_argument;
 import 'remove_await_test.dart' as remove_await;
 import 'remove_comparison_test.dart' as remove_comparison;
 import 'remove_const_test.dart' as remove_const;
+import 'remove_constructor_name_test.dart' as remove_constructor_name;
 import 'remove_dead_code_test.dart' as remove_dead_code;
 import 'remove_duplicate_case_test.dart' as remove_duplicate_case;
 import 'remove_empty_catch_test.dart' as remove_empty_catch;
@@ -144,6 +151,8 @@
 import 'remove_unnecessary_new_test.dart' as remove_unnecessary_new;
 import 'remove_unnecessary_parentheses_test.dart'
     as remove_unnecessary_parentheses;
+import 'remove_unnecessary_raw_string_test.dart'
+    as remove_unnecessary_raw_string;
 import 'remove_unnecessary_string_escapes_test.dart'
     as remove_unnecessary_string_escapes;
 import 'remove_unnecessary_string_interpolation_test.dart'
@@ -222,6 +231,7 @@
     add_return_type.main();
     add_static.main();
     add_super_constructor_invocation.main();
+    add_switch_case_break.main();
     add_type_annotation.main();
     analysis_options.main();
     bulk_fix_processor.main();
@@ -236,6 +246,7 @@
     convert_for_each_to_for_loop.main();
     convert_into_expression_body.main();
     convert_into_is_not.main();
+    convert_quotes.main();
     convert_to_contains.main();
     convert_to_for_element.main();
     convert_to_generic_function_syntax.main();
@@ -284,7 +295,9 @@
     inline_typedef.main();
     insert_semicolon.main();
     make_class_abstract.main();
+    make_conditional_on_debug_mode.main();
     make_field_not_final.main();
+    make_field_public.main();
     make_final.main();
     make_return_type_nullable.main();
     make_variable_not_final.main();
@@ -293,11 +306,13 @@
     organize_imports.main();
     pubspec.main();
     qualify_reference.main();
+    remove_abstract.main();
     remove_annotation.main();
     remove_argument.main();
     remove_await.main();
     remove_comparison.main();
     remove_const.main();
+    remove_constructor_name.main();
     remove_dead_code.main();
     remove_duplicate_case.main();
     remove_empty_catch.main();
@@ -322,6 +337,7 @@
     remove_unnecessary_const.main();
     remove_unnecessary_new.main();
     remove_unnecessary_parentheses.main();
+    remove_unnecessary_raw_string.main();
     remove_unnecessary_string_escapes.main();
     remove_unnecessary_string_interpolation.main();
     remove_unused_catch_clause.main();
diff --git a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
index 8180f0b..07037a4 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
@@ -70,12 +70,12 @@
 class C {
   C operator >>>(C other) => this;
 }
-''', to: '^2.2.2');
+''', to: '^2.14.0');
   }
 
   Future<void> test_isInConstContext() async {
     await testUpdate(content: '''
-const a = 0;
+const num a = 0;
 const c = a is int;
 ''', to: '^2.2.2');
   }
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index 0cb76aa..85dd930 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -9,6 +9,7 @@
 import 'domain_abstract_test.dart' as domain_abstract;
 import 'domains/test_all.dart' as domains;
 import 'flutter/test_all.dart' as flutter;
+import 'g3/test_all.dart' as g3;
 import 'lsp/test_all.dart' as lsp;
 import 'plugin/test_all.dart' as plugin;
 import 'server/test_all.dart' as server;
@@ -22,6 +23,7 @@
     domain_abstract.main();
     domains.main();
     flutter.main();
+    g3.main();
     lsp.main();
     plugin.main();
     server.main();
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 4b35f0a..53e071c 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -125,11 +125,11 @@
       var statement = statements[0] as ExpressionStatement;
       var creation = statement.expression as InstanceCreationExpression;
       var constructorName = creation.constructorName;
-      var typeName = constructorName.type;
+      var namedType = constructorName.type2;
       var argumentList = creation.argumentList;
       expect(_flutter.identifyWidgetExpression(creation), creation);
       expect(_flutter.identifyWidgetExpression(constructorName), creation);
-      expect(_flutter.identifyWidgetExpression(typeName), creation);
+      expect(_flutter.identifyWidgetExpression(namedType), creation);
       expect(_flutter.identifyWidgetExpression(argumentList), isNull);
       expect(
         _flutter.identifyWidgetExpression(argumentList.arguments[0]),
@@ -142,12 +142,12 @@
       var statement = statements[1] as ExpressionStatement;
       var creation = statement.expression as InstanceCreationExpression;
       var constructorName = creation.constructorName;
-      var typeName = constructorName.type;
+      var namedType = constructorName.type2;
       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(namedType), creation);
+      expect(_flutter.identifyWidgetExpression(namedType.name), creation);
       expect(_flutter.identifyWidgetExpression(constructorName.name), creation);
       expect(_flutter.identifyWidgetExpression(argumentList), isNull);
       expect(
diff --git a/pkg/analysis_server/test/stress/replay/replay.dart b/pkg/analysis_server/test/stress/replay/replay.dart
index 5837c7d..da2cae0 100644
--- a/pkg/analysis_server/test/stress/replay/replay.dart
+++ b/pkg/analysis_server/test/stress/replay/replay.dart
@@ -216,7 +216,7 @@
   /// to break the text when building edits.
   List<int> _getBreakOffsets(String text) {
     var breakOffsets = <int>[];
-    var featureSet = FeatureSet.forTesting(sdkVersion: '2.2.2');
+    var featureSet = FeatureSet.latestLanguageVersion();
     var scanner = Scanner(_TestSource(), CharSequenceReader(text),
         error.AnalysisErrorListener.NULL_LISTENER)
       ..configureFeatures(
diff --git a/pkg/analysis_server/tool/code_completion/code_metrics.dart b/pkg/analysis_server/tool/code_completion/code_metrics.dart
index 565a9fd..0ace057 100644
--- a/pkg/analysis_server/tool/code_completion/code_metrics.dart
+++ b/pkg/analysis_server/tool/code_completion/code_metrics.dart
@@ -326,7 +326,7 @@
       'abstractKeyword': node.abstractKeyword,
       'name': node.name,
       'typeParameters': node.typeParameters,
-      'superclass': node.superclass,
+      'superclass': node.superclass2,
       'withClause': node.withClause,
       'implementsClause': node.implementsClause,
     });
@@ -409,7 +409,7 @@
   @override
   void visitConstructorName(ConstructorName node) {
     _visitChildren(node, {
-      'type': node.type,
+      'type': node.type2,
       'name': node.name,
     });
     super.visitConstructorName(node);
@@ -531,7 +531,7 @@
   @override
   void visitExtendsClause(ExtendsClause node) {
     _visitChildren(node, {
-      'superclass': node.superclass,
+      'superclass': node.superclass2,
     });
     super.visitExtendsClause(node);
   }
@@ -775,7 +775,7 @@
   @override
   void visitImplementsClause(ImplementsClause node) {
     _visitChildren(node, {
-      'interfaces': node.interfaces,
+      'interfaces': node.interfaces2,
     });
     super.visitImplementsClause(node);
   }
@@ -954,6 +954,16 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _visitChildren(node, {
+      'name': node.name,
+      'typeArguments': node.typeArguments,
+      'question': node.question,
+    });
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     _visitChildren(node, {
       'name': node.name,
@@ -976,7 +986,7 @@
   @override
   void visitOnClause(OnClause node) {
     _visitChildren(node, {
-      'superclassConstraints': node.superclassConstraints,
+      'superclassConstraints': node.superclassConstraints2,
     });
     super.visitOnClause(node);
   }
@@ -1220,16 +1230,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    _visitChildren(node, {
-      'name': node.name,
-      'typeArguments': node.typeArguments,
-      'question': node.question,
-    });
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _visitChildren(node, {
       'name': node.name,
@@ -1286,7 +1286,7 @@
   @override
   void visitWithClause(WithClause node) {
     _visitChildren(node, {
-      'mixinTypes': node.mixinTypes,
+      'mixinTypes': node.mixinTypes2,
     });
     super.visitWithClause(node);
   }
diff --git a/pkg/analysis_server/tool/code_completion/completion_metrics.dart b/pkg/analysis_server/tool/code_completion/completion_metrics.dart
index 59a0623..4522ce8 100644
--- a/pkg/analysis_server/tool/code_completion/completion_metrics.dart
+++ b/pkg/analysis_server/tool/code_completion/completion_metrics.dart
@@ -1791,7 +1791,7 @@
           return CompletionGroup.mixinElement;
         }
         if (entity is SimpleIdentifier &&
-            entity.parent is TypeName &&
+            entity.parent is NamedType &&
             entity.parent!.parent is ConstructorName &&
             entity.parent!.parent!.parent is InstanceCreationExpression) {
           return CompletionGroup.constructorElement;
diff --git a/pkg/analysis_server/tool/code_completion/metrics_util.dart b/pkg/analysis_server/tool/code_completion/metrics_util.dart
index ab038b0..673f1bb 100644
--- a/pkg/analysis_server/tool/code_completion/metrics_util.dart
+++ b/pkg/analysis_server/tool/code_completion/metrics_util.dart
@@ -5,7 +5,6 @@
 import 'dart:math' as math;
 
 import 'package:analysis_server/src/status/pages.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 import 'output_utilities.dart';
 
@@ -321,7 +320,7 @@
   int get denominator => _denominator;
 
   @override
-  int get hashCode => JenkinsSmiHash.hash2(_numerator, _denominator);
+  int get hashCode => Object.hash(_numerator, _denominator);
 
   int get numerator => _numerator;
 
diff --git a/pkg/analysis_server/tool/code_completion/relevance_metrics.dart b/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
index 8a24e94..a505521 100644
--- a/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
+++ b/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
@@ -456,7 +456,7 @@
   void visitClassTypeAlias(ClassTypeAlias node) {
     var wasInGenericContext = inGenericContext;
     inGenericContext = inGenericContext || node.typeParameters != null;
-    _recordDataForNode('ClassTypeAlias (superclass)', node.superclass);
+    _recordDataForNode('ClassTypeAlias (superclass)', node.superclass2);
     var context = 'superclass';
     _recordTokenType('ClassDeclaration ($context)', node.withClause);
     context = 'with';
@@ -646,7 +646,7 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    _recordDataForNode('ExtendsClause (type)', node.superclass);
+    _recordDataForNode('ExtendsClause (type)', node.superclass2);
     super.visitExtendsClause(node);
   }
 
@@ -845,8 +845,8 @@
   @override
   void visitImplementsClause(ImplementsClause node) {
     // At the start of each type name.
-    for (var typeName in node.interfaces) {
-      _recordDataForNode('ImplementsClause (type)', typeName);
+    for (var namedType in node.interfaces2) {
+      _recordDataForNode('ImplementsClause (type)', namedType);
     }
     super.visitImplementsClause(node);
   }
@@ -1043,6 +1043,12 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    // There are no completions.
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     // There are no completions.
     super.visitNativeClause(node);
@@ -1062,7 +1068,7 @@
 
   @override
   void visitOnClause(OnClause node) {
-    for (var constraint in node.superclassConstraints) {
+    for (var constraint in node.superclassConstraints2) {
       _recordDataForNode('OnClause (type)', constraint);
     }
     super.visitOnClause(node);
@@ -1299,12 +1305,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    // There are no completions.
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     if (node.bound != null) {
       _recordDataForNode('TypeParameter (bound)', node.bound);
@@ -1351,8 +1351,8 @@
 
   @override
   void visitWithClause(WithClause node) {
-    for (var typeName in node.mixinTypes) {
-      _recordDataForNode('WithClause (type)', typeName);
+    for (var namedType in node.mixinTypes2) {
+      _recordDataForNode('WithClause (type)', namedType);
     }
     super.visitWithClause(node);
   }
diff --git a/pkg/analysis_server/tool/code_completion/relevance_table_generator.dart b/pkg/analysis_server/tool/code_completion/relevance_table_generator.dart
index 3e2af94..e3978af 100644
--- a/pkg/analysis_server/tool/code_completion/relevance_table_generator.dart
+++ b/pkg/analysis_server/tool/code_completion/relevance_table_generator.dart
@@ -463,7 +463,7 @@
 
   @override
   void visitClassTypeAlias(ClassTypeAlias node) {
-    _recordDataForNode('ClassTypeAlias_superclass', node.superclass);
+    _recordDataForNode('ClassTypeAlias_superclass', node.superclass2);
     var context = 'superclass';
     _recordKeyword('ClassTypeAlias_$context', node.withClause);
     context = 'with';
@@ -643,7 +643,7 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    _recordDataForNode('ExtendsClause_superclass', node.superclass);
+    _recordDataForNode('ExtendsClause_superclass', node.superclass2);
     super.visitExtendsClause(node);
   }
 
@@ -819,8 +819,8 @@
   @override
   void visitImplementsClause(ImplementsClause node) {
     // At the start of each type name.
-    for (var typeName in node.interfaces) {
-      _recordDataForNode('ImplementsClause_interface', typeName);
+    for (var namedType in node.interfaces2) {
+      _recordDataForNode('ImplementsClause_interface', namedType);
     }
     super.visitImplementsClause(node);
   }
@@ -973,6 +973,12 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    // There are no completions.
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     // There are no completions.
     super.visitNativeClause(node);
@@ -992,7 +998,7 @@
 
   @override
   void visitOnClause(OnClause node) {
-    for (var constraint in node.superclassConstraints) {
+    for (var constraint in node.superclassConstraints2) {
       _recordDataForNode('OnClause_superclassConstraint', constraint);
     }
     super.visitOnClause(node);
@@ -1199,12 +1205,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    // There are no completions.
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     if (node.bound != null) {
       _recordDataForNode('TypeParameter_bound', node.bound);
@@ -1251,8 +1251,8 @@
 
   @override
   void visitWithClause(WithClause node) {
-    for (var typeName in node.mixinTypes) {
-      _recordDataForNode('WithClause_mixinType', typeName);
+    for (var namedType in node.mixinTypes2) {
+      _recordDataForNode('WithClause_mixinType', namedType);
     }
     super.visitWithClause(node);
   }
diff --git a/pkg/analysis_server/tool/code_completion/visitors.dart b/pkg/analysis_server/tool/code_completion/visitors.dart
index 5783758..f65c8b6 100644
--- a/pkg/analysis_server/tool/code_completion/visitors.dart
+++ b/pkg/analysis_server/tool/code_completion/visitors.dart
@@ -653,7 +653,7 @@
           if (constructorName is ConstructorName) {
             var instanceCreationExpression = constructorName.parent;
             if (instanceCreationExpression is InstanceCreationExpression &&
-                constructorName.type.name == node) {
+                constructorName.type2.name == node) {
               if (instanceCreationExpression.keyword != null ||
                   constructorName.name == null) {
                 elementKind = protocol.ElementKind.CONSTRUCTOR;
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 0aecc40..7b95c29 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -647,23 +647,41 @@
 void _writeHashCode(IndentableStringBuffer buffer, Interface interface) {
   buffer
     ..writeIndentedln('@override')
-    ..writeIndentedln('int get hashCode {')
-    ..indent()
-    ..writeIndentedln('var hash = 0;');
-  for (var field in _getAllFields(interface)) {
-    final type = resolveTypeAlias(field.type);
-    if (type is ArrayType || type is MapType) {
-      buffer.writeIndentedln(
-          'hash = JenkinsSmiHash.combine(hash, lspHashCode(${field.name}));');
-    } else {
-      buffer.writeIndentedln(
-          'hash = JenkinsSmiHash.combine(hash, ${field.name}.hashCode);');
-    }
+    ..writeIndentedln('int get hashCode =>');
+
+  final fields = _getAllFields(interface);
+
+  String endWith;
+  if (fields.isEmpty) {
+    buffer.write('42');
+    endWith = ';';
+  } else if (fields.length == 1) {
+    endWith = ';';
+  } else if (fields.length > 20) {
+    buffer.write('Object.hashAll([');
+    endWith = ']);';
+  } else {
+    buffer.write('Object.hash(');
+    endWith = ');';
   }
+
+  buffer.writeAll(
+    fields.map((field) {
+      final type = resolveTypeAlias(field.type);
+      if (type is ArrayType || type is MapType) {
+        return 'lspHashCode(${field.name})';
+      } else {
+        if (fields.length == 1) {
+          return '${field.name}.hashCode';
+        }
+        return field.name;
+      }
+    }),
+    ',',
+  );
   buffer
-    ..writeIndentedln('return JenkinsSmiHash.finish(hash);')
-    ..outdent()
-    ..writeIndentedln('}');
+    ..writeln(endWith)
+    ..writeln();
 }
 
 void _writeInterface(IndentableStringBuffer buffer, Interface interface) {
diff --git a/pkg/analysis_server/tool/lsp_spec/generate_all.dart b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
index 81f8eb0..24a06ed 100644
--- a/pkg/analysis_server/tool/lsp_spec/generate_all.dart
+++ b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
@@ -170,7 +170,6 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/json_parsing.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
diff --git a/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
index f889c0f..28bf1c5 100644
--- a/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
+++ b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
@@ -95,13 +95,12 @@
   String get name => nameToken.lexeme;
 
   String get valueAsLiteral {
-    if (type.dartType == 'String') {
-      // Write strings as raw strings, since some have dollars in them (eg. for
-      // LSP method names). valueToken.lexeme already includes the quotes as
-      // read from the spec.
-      return 'r${valueToken.lexeme}';
+    var lexeme = valueToken.lexeme;
+    if (type.dartType == 'String' && lexeme.contains(r'$')) {
+      // lexeme already includes the quotes as read from the spec.
+      return 'r$lexeme';
     } else {
-      return valueToken.lexeme;
+      return lexeme;
     }
   }
 }
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index c17e46f..0339409 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -384,8 +384,6 @@
     writeln("import 'dart:convert' hide JsonDecoder;");
     writeln();
     if (isServer) {
-      writeln(
-          "import 'package:analyzer/src/generated/utilities_general.dart';");
       writeln("import 'package:$packageName/protocol/protocol.dart';");
       writeln(
           "import 'package:$packageName/src/protocol/protocol_internal.dart';");
@@ -400,7 +398,6 @@
           "import 'package:$packageName/src/protocol/protocol_common.dart';");
       writeln(
           "import 'package:$packageName/src/protocol/protocol_internal.dart';");
-      writeln("import 'package:$packageName/src/protocol/protocol_util.dart';");
     }
   }
 
@@ -641,25 +638,34 @@
   /// Emit the hashCode getter for an object class.
   void emitObjectHashCode(TypeObject? type, String className) {
     writeln('@override');
-    writeln('int get hashCode {');
+    writeln('int get hashCode => ');
     indent(() {
       if (type == null) {
-        writeln('return ${className.hashCode};');
+        writeln(' ${className.hashCode}');
       } else {
-        writeln('var hash = 0;');
-        for (var field in type.fields) {
-          String valueToCombine;
+        final items = type.fields.map((field) {
           if (field.value != null) {
-            valueToCombine = field.value.hashCode.toString();
+            return field.value.hashCode.toString();
           } else {
-            valueToCombine = '${field.name}.hashCode';
+            return field.name;
           }
-          writeln('hash = JenkinsSmiHash.combine(hash, $valueToCombine);');
+        }).toList();
+
+        if (items.isEmpty) {
+          writeln('0');
+        } else if (items.length == 1) {
+          write(items.single);
+          write('.hashCode');
+        } else {
+          writeln('Object.hash(');
+          for (var field in items) {
+            writeln('$field,');
+          }
+          writeln(')');
         }
-        writeln('return JenkinsSmiHash.finish(hash);');
       }
+      writeln(';');
     });
-    writeln('}');
   }
 
   /// If the class named [className] requires special constructors, emit them
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
index 65f636a..fe567c5 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
@@ -29,6 +29,8 @@
 
   public static final String CONSTRUCTOR = "CONSTRUCTOR";
 
+  public static final String CONSTRUCTOR_TEAR_OFF = "CONSTRUCTOR_TEAR_OFF";
+
   public static final String DIRECTIVE = "DIRECTIVE";
 
   /**
@@ -91,6 +93,8 @@
 
   public static final String INSTANCE_METHOD_REFERENCE = "INSTANCE_METHOD_REFERENCE";
 
+  public static final String INSTANCE_METHOD_TEAR_OFF = "INSTANCE_METHOD_TEAR_OFF";
+
   public static final String INSTANCE_SETTER_DECLARATION = "INSTANCE_SETTER_DECLARATION";
 
   public static final String INSTANCE_SETTER_REFERENCE = "INSTANCE_SETTER_REFERENCE";
@@ -119,6 +123,8 @@
 
   public static final String LOCAL_FUNCTION_REFERENCE = "LOCAL_FUNCTION_REFERENCE";
 
+  public static final String LOCAL_FUNCTION_TEAR_OFF = "LOCAL_FUNCTION_TEAR_OFF";
+
   /**
    * Deprecated - no longer sent.
    */
@@ -177,6 +183,8 @@
 
   public static final String STATIC_METHOD_REFERENCE = "STATIC_METHOD_REFERENCE";
 
+  public static final String STATIC_METHOD_TEAR_OFF = "STATIC_METHOD_TEAR_OFF";
+
   public static final String STATIC_SETTER_DECLARATION = "STATIC_SETTER_DECLARATION";
 
   public static final String STATIC_SETTER_REFERENCE = "STATIC_SETTER_REFERENCE";
@@ -185,6 +193,8 @@
 
   public static final String TOP_LEVEL_FUNCTION_REFERENCE = "TOP_LEVEL_FUNCTION_REFERENCE";
 
+  public static final String TOP_LEVEL_FUNCTION_TEAR_OFF = "TOP_LEVEL_FUNCTION_TEAR_OFF";
+
   public static final String TOP_LEVEL_GETTER_DECLARATION = "TOP_LEVEL_GETTER_DECLARATION";
 
   public static final String TOP_LEVEL_GETTER_REFERENCE = "TOP_LEVEL_GETTER_REFERENCE";
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart
index 76b7a2c..4289f41 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart
@@ -8,7 +8,6 @@
 
 import 'dart:convert' hide JsonDecoder;
 
-import 'package:analysis_server_client/src/protocol/protocol_util.dart';
 import 'package:analysis_server_client/src/protocol/protocol_base.dart';
 import 'package:analysis_server_client/src/protocol/protocol_internal.dart';
 
@@ -66,12 +65,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 704418402);
-    hash = JenkinsSmiHash.combine(hash, content.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        704418402,
+        content,
+      );
 }
 
 /// AnalysisError
@@ -252,19 +249,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, correction.hashCode);
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, url.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextMessages.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        severity,
+        type,
+        location,
+        message,
+        correction,
+        code,
+        url,
+        contextMessages,
+        hasFix,
+      );
 }
 
 /// AnalysisErrorSeverity
@@ -477,12 +472,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 873118866);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        873118866,
+        edits,
+      );
 }
 
 /// CompletionSuggestion
@@ -918,33 +911,31 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
-    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = JenkinsSmiHash.combine(hash, docSummary.hashCode);
-    hash = JenkinsSmiHash.combine(hash, docComplete.hashCode);
-    hash = JenkinsSmiHash.combine(hash, declaringType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hashAll([
+        kind,
+        relevance,
+        completion,
+        displayText,
+        replacementOffset,
+        replacementLength,
+        selectionOffset,
+        selectionLength,
+        isDeprecated,
+        isPotential,
+        docSummary,
+        docComplete,
+        declaringType,
+        defaultArgumentListString,
+        defaultArgumentListTextRanges,
+        element,
+        returnType,
+        parameterNames,
+        parameterTypes,
+        requiredParameterCount,
+        hasNamedParameters,
+        parameterName,
+        parameterType,
+      ]);
 }
 
 /// CompletionSuggestionKind
@@ -1139,12 +1130,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        message,
+        location,
+      );
 }
 
 /// Element
@@ -1347,18 +1336,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, flags.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, typeParameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, aliasedType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        name,
+        location,
+        flags,
+        parameters,
+        returnType,
+        typeParameters,
+        aliasedType,
+      );
 }
 
 /// ElementKind
@@ -1753,13 +1740,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        offset,
+        length,
+      );
 }
 
 /// HighlightRegion
@@ -1835,13 +1820,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        type,
+        offset,
+        length,
+      );
 }
 
 /// HighlightRegionType
@@ -1854,6 +1837,7 @@
 ///   COMMENT_DOCUMENTATION
 ///   COMMENT_END_OF_LINE
 ///   CONSTRUCTOR
+///   CONSTRUCTOR_TEAR_OFF
 ///   DIRECTIVE
 ///   DYNAMIC_TYPE
 ///   DYNAMIC_LOCAL_VARIABLE_DECLARATION
@@ -1876,6 +1860,7 @@
 ///   INSTANCE_GETTER_REFERENCE
 ///   INSTANCE_METHOD_DECLARATION
 ///   INSTANCE_METHOD_REFERENCE
+///   INSTANCE_METHOD_TEAR_OFF
 ///   INSTANCE_SETTER_DECLARATION
 ///   INSTANCE_SETTER_REFERENCE
 ///   INVALID_STRING_ESCAPE
@@ -1890,6 +1875,7 @@
 ///   LITERAL_STRING
 ///   LOCAL_FUNCTION_DECLARATION
 ///   LOCAL_FUNCTION_REFERENCE
+///   LOCAL_FUNCTION_TEAR_OFF
 ///   LOCAL_VARIABLE
 ///   LOCAL_VARIABLE_DECLARATION
 ///   LOCAL_VARIABLE_REFERENCE
@@ -1907,10 +1893,12 @@
 ///   STATIC_GETTER_REFERENCE
 ///   STATIC_METHOD_DECLARATION
 ///   STATIC_METHOD_REFERENCE
+///   STATIC_METHOD_TEAR_OFF
 ///   STATIC_SETTER_DECLARATION
 ///   STATIC_SETTER_REFERENCE
 ///   TOP_LEVEL_FUNCTION_DECLARATION
 ///   TOP_LEVEL_FUNCTION_REFERENCE
+///   TOP_LEVEL_FUNCTION_TEAR_OFF
 ///   TOP_LEVEL_GETTER_DECLARATION
 ///   TOP_LEVEL_GETTER_REFERENCE
 ///   TOP_LEVEL_SETTER_DECLARATION
@@ -1944,6 +1932,9 @@
   static const HighlightRegionType CONSTRUCTOR =
       HighlightRegionType._('CONSTRUCTOR');
 
+  static const HighlightRegionType CONSTRUCTOR_TEAR_OFF =
+      HighlightRegionType._('CONSTRUCTOR_TEAR_OFF');
+
   static const HighlightRegionType DIRECTIVE =
       HighlightRegionType._('DIRECTIVE');
 
@@ -2013,6 +2004,9 @@
   static const HighlightRegionType INSTANCE_METHOD_REFERENCE =
       HighlightRegionType._('INSTANCE_METHOD_REFERENCE');
 
+  static const HighlightRegionType INSTANCE_METHOD_TEAR_OFF =
+      HighlightRegionType._('INSTANCE_METHOD_TEAR_OFF');
+
   static const HighlightRegionType INSTANCE_SETTER_DECLARATION =
       HighlightRegionType._('INSTANCE_SETTER_DECLARATION');
 
@@ -2053,6 +2047,9 @@
   static const HighlightRegionType LOCAL_FUNCTION_REFERENCE =
       HighlightRegionType._('LOCAL_FUNCTION_REFERENCE');
 
+  static const HighlightRegionType LOCAL_FUNCTION_TEAR_OFF =
+      HighlightRegionType._('LOCAL_FUNCTION_TEAR_OFF');
+
   /// Deprecated - no longer sent.
   static const HighlightRegionType LOCAL_VARIABLE =
       HighlightRegionType._('LOCAL_VARIABLE');
@@ -2111,6 +2108,9 @@
   static const HighlightRegionType STATIC_METHOD_REFERENCE =
       HighlightRegionType._('STATIC_METHOD_REFERENCE');
 
+  static const HighlightRegionType STATIC_METHOD_TEAR_OFF =
+      HighlightRegionType._('STATIC_METHOD_TEAR_OFF');
+
   static const HighlightRegionType STATIC_SETTER_DECLARATION =
       HighlightRegionType._('STATIC_SETTER_DECLARATION');
 
@@ -2123,6 +2123,9 @@
   static const HighlightRegionType TOP_LEVEL_FUNCTION_REFERENCE =
       HighlightRegionType._('TOP_LEVEL_FUNCTION_REFERENCE');
 
+  static const HighlightRegionType TOP_LEVEL_FUNCTION_TEAR_OFF =
+      HighlightRegionType._('TOP_LEVEL_FUNCTION_TEAR_OFF');
+
   static const HighlightRegionType TOP_LEVEL_GETTER_DECLARATION =
       HighlightRegionType._('TOP_LEVEL_GETTER_DECLARATION');
 
@@ -2162,6 +2165,7 @@
     COMMENT_DOCUMENTATION,
     COMMENT_END_OF_LINE,
     CONSTRUCTOR,
+    CONSTRUCTOR_TEAR_OFF,
     DIRECTIVE,
     DYNAMIC_TYPE,
     DYNAMIC_LOCAL_VARIABLE_DECLARATION,
@@ -2184,6 +2188,7 @@
     INSTANCE_GETTER_REFERENCE,
     INSTANCE_METHOD_DECLARATION,
     INSTANCE_METHOD_REFERENCE,
+    INSTANCE_METHOD_TEAR_OFF,
     INSTANCE_SETTER_DECLARATION,
     INSTANCE_SETTER_REFERENCE,
     INVALID_STRING_ESCAPE,
@@ -2198,6 +2203,7 @@
     LITERAL_STRING,
     LOCAL_FUNCTION_DECLARATION,
     LOCAL_FUNCTION_REFERENCE,
+    LOCAL_FUNCTION_TEAR_OFF,
     LOCAL_VARIABLE,
     LOCAL_VARIABLE_DECLARATION,
     LOCAL_VARIABLE_REFERENCE,
@@ -2215,10 +2221,12 @@
     STATIC_GETTER_REFERENCE,
     STATIC_METHOD_DECLARATION,
     STATIC_METHOD_REFERENCE,
+    STATIC_METHOD_TEAR_OFF,
     STATIC_SETTER_DECLARATION,
     STATIC_SETTER_REFERENCE,
     TOP_LEVEL_FUNCTION_DECLARATION,
     TOP_LEVEL_FUNCTION_REFERENCE,
+    TOP_LEVEL_FUNCTION_TEAR_OFF,
     TOP_LEVEL_GETTER_DECLARATION,
     TOP_LEVEL_GETTER_REFERENCE,
     TOP_LEVEL_SETTER_DECLARATION,
@@ -2252,6 +2260,8 @@
         return COMMENT_END_OF_LINE;
       case 'CONSTRUCTOR':
         return CONSTRUCTOR;
+      case 'CONSTRUCTOR_TEAR_OFF':
+        return CONSTRUCTOR_TEAR_OFF;
       case 'DIRECTIVE':
         return DIRECTIVE;
       case 'DYNAMIC_TYPE':
@@ -2296,6 +2306,8 @@
         return INSTANCE_METHOD_DECLARATION;
       case 'INSTANCE_METHOD_REFERENCE':
         return INSTANCE_METHOD_REFERENCE;
+      case 'INSTANCE_METHOD_TEAR_OFF':
+        return INSTANCE_METHOD_TEAR_OFF;
       case 'INSTANCE_SETTER_DECLARATION':
         return INSTANCE_SETTER_DECLARATION;
       case 'INSTANCE_SETTER_REFERENCE':
@@ -2324,6 +2336,8 @@
         return LOCAL_FUNCTION_DECLARATION;
       case 'LOCAL_FUNCTION_REFERENCE':
         return LOCAL_FUNCTION_REFERENCE;
+      case 'LOCAL_FUNCTION_TEAR_OFF':
+        return LOCAL_FUNCTION_TEAR_OFF;
       case 'LOCAL_VARIABLE':
         return LOCAL_VARIABLE;
       case 'LOCAL_VARIABLE_DECLARATION':
@@ -2358,6 +2372,8 @@
         return STATIC_METHOD_DECLARATION;
       case 'STATIC_METHOD_REFERENCE':
         return STATIC_METHOD_REFERENCE;
+      case 'STATIC_METHOD_TEAR_OFF':
+        return STATIC_METHOD_TEAR_OFF;
       case 'STATIC_SETTER_DECLARATION':
         return STATIC_SETTER_DECLARATION;
       case 'STATIC_SETTER_REFERENCE':
@@ -2366,6 +2382,8 @@
         return TOP_LEVEL_FUNCTION_DECLARATION;
       case 'TOP_LEVEL_FUNCTION_REFERENCE':
         return TOP_LEVEL_FUNCTION_REFERENCE;
+      case 'TOP_LEVEL_FUNCTION_TEAR_OFF':
+        return TOP_LEVEL_FUNCTION_TEAR_OFF;
       case 'TOP_LEVEL_GETTER_DECLARATION':
         return TOP_LEVEL_GETTER_DECLARATION;
       case 'TOP_LEVEL_GETTER_REFERENCE':
@@ -2510,15 +2528,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, source.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, target.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fact.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        source,
+        kind,
+        target,
+        fact,
+        value,
+      );
 }
 
 /// KytheVName
@@ -2624,15 +2640,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, signature.hashCode);
-    hash = JenkinsSmiHash.combine(hash, corpus.hashCode);
-    hash = JenkinsSmiHash.combine(hash, root.hashCode);
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, language.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        signature,
+        corpus,
+        root,
+        path,
+        language,
+      );
 }
 
 /// LinkedEditGroup
@@ -2735,13 +2749,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, positions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        positions,
+        length,
+        suggestions,
+      );
 }
 
 /// LinkedEditSuggestion
@@ -2804,12 +2816,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        value,
+        kind,
+      );
 }
 
 /// LinkedEditSuggestionKind
@@ -3008,17 +3018,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endColumn.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+        startLine,
+        startColumn,
+        endLine,
+        endColumn,
+      );
 }
 
 /// NavigationRegion
@@ -3096,13 +3104,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        targets,
+      );
 }
 
 /// NavigationTarget
@@ -3252,18 +3258,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileIndex.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        fileIndex,
+        offset,
+        length,
+        startLine,
+        startColumn,
+        codeOffset,
+        codeLength,
+      );
 }
 
 /// Occurrences
@@ -3340,13 +3344,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        offsets,
+        length,
+      );
 }
 
 /// Outline
@@ -3474,16 +3476,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        offset,
+        length,
+        codeOffset,
+        codeLength,
+        children,
+      );
 }
 
 /// ParameterInfo
@@ -3574,14 +3574,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultValue.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        name,
+        type,
+        defaultValue,
+      );
 }
 
 /// ParameterKind
@@ -3713,12 +3711,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// RefactoringKind
@@ -3928,15 +3924,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        kind,
+        type,
+        name,
+        parameters,
+      );
 }
 
 /// RefactoringMethodParameterKind
@@ -4076,13 +4070,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        severity,
+        message,
+        location,
+      );
 }
 
 /// RefactoringProblemSeverity
@@ -4213,11 +4205,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 114870849);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 114870849.hashCode;
 }
 
 /// SourceChange
@@ -4362,15 +4350,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkedEditGroups.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selection.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        message,
+        edits,
+        linkedEditGroups,
+        selection,
+        id,
+      );
 }
 
 /// SourceEdit
@@ -4477,14 +4463,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        replacement,
+        id,
+      );
 }
 
 /// SourceFileEdit
@@ -4575,11 +4559,9 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileStamp.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        fileStamp,
+        edits,
+      );
 }
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 470f830..616ff13 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -11,7 +11,6 @@
 import 'package:analysis_server_client/src/protocol/protocol_base.dart';
 import 'package:analysis_server_client/src/protocol/protocol_common.dart';
 import 'package:analysis_server_client/src/protocol/protocol_internal.dart';
-import 'package:analysis_server_client/src/protocol/protocol_util.dart';
 
 /// analysis.analyzedFiles params
 ///
@@ -74,11 +73,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, directories.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => directories.hashCode;
 }
 
 /// analysis.closingLabels params
@@ -164,12 +159,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, labels.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        labels,
+      );
 }
 
 /// AnalysisErrorFixes
@@ -240,12 +233,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, error.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        error,
+        fixes,
+      );
 }
 
 /// analysis.errors params
@@ -323,12 +314,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        errors,
+      );
 }
 
 /// analysis.flushResults params
@@ -391,11 +380,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.folding params
@@ -473,12 +458,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.getErrors params
@@ -539,11 +522,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// analysis.getErrors result
@@ -612,11 +591,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => errors.hashCode;
 }
 
 /// analysis.getHover params
@@ -688,12 +663,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// analysis.getHover result
@@ -766,11 +739,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, hovers.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => hovers.hashCode;
 }
 
 /// analysis.getImportedElements params
@@ -856,13 +825,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// analysis.getImportedElements result
@@ -933,11 +900,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => elements.hashCode;
 }
 
 /// analysis.getLibraryDependencies params
@@ -961,9 +924,7 @@
   }
 
   @override
-  int get hashCode {
-    return 246577680;
-  }
+  int get hashCode => 246577680;
 }
 
 /// analysis.getLibraryDependencies result
@@ -1057,12 +1018,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, packageMap.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraries,
+        packageMap,
+      );
 }
 
 /// analysis.getNavigation params
@@ -1150,13 +1109,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// analysis.getNavigation result
@@ -1259,13 +1216,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        files,
+        targets,
+        regions,
+      );
 }
 
 /// analysis.getReachableSources params
@@ -1327,11 +1282,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// analysis.getReachableSources result
@@ -1407,11 +1358,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, sources.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => sources.hashCode;
 }
 
 /// analysis.getSignature params
@@ -1484,12 +1431,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// analysis.getSignature result
@@ -1590,13 +1535,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        parameters,
+        dartdoc,
+      );
 }
 
 /// analysis.highlights params
@@ -1678,12 +1621,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.implemented params
@@ -1780,13 +1721,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, classes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, members.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        classes,
+        members,
+      );
 }
 
 /// analysis.invalidate params
@@ -1884,14 +1823,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, delta.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+        delta,
+      );
 }
 
 /// analysis.navigation params
@@ -2008,14 +1945,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+        targets,
+        files,
+      );
 }
 
 /// analysis.occurrences params
@@ -2094,12 +2029,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        occurrences,
+      );
 }
 
 /// AnalysisOptions
@@ -2282,18 +2215,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, enableAsync.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableEnums.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateHints.hashCode);
-    hash = JenkinsSmiHash.combine(hash, generateLints.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        enableAsync,
+        enableDeferredLoading,
+        enableEnums,
+        enableNullAwareOperators,
+        enableSuperMixins,
+        generateDart2jsHints,
+        generateHints,
+        generateLints,
+      );
 }
 
 /// analysis.outline params
@@ -2397,14 +2328,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+        libraryName,
+        outline,
+      );
 }
 
 /// analysis.overrides params
@@ -2482,12 +2411,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, overrides.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        overrides,
+      );
 }
 
 /// analysis.reanalyze params
@@ -2511,9 +2438,7 @@
   }
 
   @override
-  int get hashCode {
-    return 613039876;
-  }
+  int get hashCode => 613039876;
 }
 
 /// analysis.reanalyze result
@@ -2537,9 +2462,7 @@
   }
 
   @override
-  int get hashCode {
-    return 846803925;
-  }
+  int get hashCode => 846803925;
 }
 
 /// AnalysisService
@@ -2743,13 +2666,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, included.hashCode);
-    hash = JenkinsSmiHash.combine(hash, excluded.hashCode);
-    hash = JenkinsSmiHash.combine(hash, packageRoots.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        included,
+        excluded,
+        packageRoots,
+      );
 }
 
 /// analysis.setAnalysisRoots result
@@ -2773,9 +2694,7 @@
   }
 
   @override
-  int get hashCode {
-    return 866004753;
-  }
+  int get hashCode => 866004753;
 }
 
 /// analysis.setGeneralSubscriptions params
@@ -2844,11 +2763,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// analysis.setGeneralSubscriptions result
@@ -2872,9 +2787,7 @@
   }
 
   @override
-  int get hashCode {
-    return 386759562;
-  }
+  int get hashCode => 386759562;
 }
 
 /// analysis.setPriorityFiles params
@@ -2937,11 +2850,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.setPriorityFiles result
@@ -2965,9 +2874,7 @@
   }
 
   @override
-  int get hashCode {
-    return 330050055;
-  }
+  int get hashCode => 330050055;
 }
 
 /// analysis.setSubscriptions params
@@ -3040,11 +2947,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// analysis.setSubscriptions result
@@ -3068,9 +2971,7 @@
   }
 
   @override
-  int get hashCode {
-    return 218088493;
-  }
+  int get hashCode => 218088493;
 }
 
 /// AnalysisStatus
@@ -3137,12 +3038,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isAnalyzing.hashCode);
-    hash = JenkinsSmiHash.combine(hash, analysisTarget.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isAnalyzing,
+        analysisTarget,
+      );
 }
 
 /// analysis.updateContent params
@@ -3216,11 +3115,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.updateContent result
@@ -3273,10 +3168,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// analysis.updateOptions params
@@ -3339,11 +3231,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => options.hashCode;
 }
 
 /// analysis.updateOptions result
@@ -3367,9 +3255,7 @@
   }
 
   @override
-  int get hashCode {
-    return 179689467;
-  }
+  int get hashCode => 179689467;
 }
 
 /// analytics.enable params
@@ -3430,11 +3316,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => value.hashCode;
 }
 
 /// analytics.enable result
@@ -3458,9 +3340,7 @@
   }
 
   @override
-  int get hashCode {
-    return 237990792;
-  }
+  int get hashCode => 237990792;
 }
 
 /// analytics.isEnabled params
@@ -3484,9 +3364,7 @@
   }
 
   @override
-  int get hashCode {
-    return 57215544;
-  }
+  int get hashCode => 57215544;
 }
 
 /// analytics.isEnabled result
@@ -3550,11 +3428,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, enabled.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => enabled.hashCode;
 }
 
 /// analytics.sendEvent params
@@ -3615,11 +3489,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, action.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => action.hashCode;
 }
 
 /// analytics.sendEvent result
@@ -3643,9 +3513,7 @@
   }
 
   @override
-  int get hashCode {
-    return 227063188;
-  }
+  int get hashCode => 227063188;
 }
 
 /// analytics.sendTiming params
@@ -3717,12 +3585,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, event.hashCode);
-    hash = JenkinsSmiHash.combine(hash, millis.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        event,
+        millis,
+      );
 }
 
 /// analytics.sendTiming result
@@ -3746,9 +3612,7 @@
   }
 
   @override
-  int get hashCode {
-    return 875010924;
-  }
+  int get hashCode => 875010924;
 }
 
 /// AvailableSuggestion
@@ -3941,19 +3805,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, declaringLibraryUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevanceTags.hashCode);
-    hash = JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        label,
+        declaringLibraryUri,
+        element,
+        defaultArgumentListString,
+        defaultArgumentListTextRanges,
+        parameterNames,
+        parameterTypes,
+        relevanceTags,
+        requiredParameterCount,
+      );
 }
 
 /// AvailableSuggestionSet
@@ -4033,13 +3895,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, items.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        uri,
+        items,
+      );
 }
 
 /// BulkFix
@@ -4108,12 +3968,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        path,
+        fixes,
+      );
 }
 
 /// BulkFixDetail
@@ -4177,12 +4035,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        occurrences,
+      );
 }
 
 /// ClosingLabel
@@ -4258,13 +4114,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        label,
+      );
 }
 
 /// completion.availableSuggestions params
@@ -4355,12 +4209,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, changedLibraries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, removedLibraries.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        changedLibraries,
+        removedLibraries,
+      );
 }
 
 /// completion.existingImports params
@@ -4434,12 +4286,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, imports.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        imports,
+      );
 }
 
 /// completion.getSuggestionDetails params
@@ -4540,14 +4390,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        id,
+        label,
+        offset,
+      );
 }
 
 /// completion.getSuggestionDetails result
@@ -4627,12 +4475,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        completion,
+        change,
+      );
 }
 
 /// completion.getSuggestions params
@@ -4705,12 +4551,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// completion.getSuggestions result
@@ -4774,11 +4618,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// completion.registerLibraryPaths params
@@ -4849,11 +4689,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, paths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => paths.hashCode;
 }
 
 /// completion.registerLibraryPaths result
@@ -4877,9 +4713,7 @@
   }
 
   @override
-  int get hashCode {
-    return 104675661;
-  }
+  int get hashCode => 104675661;
 }
 
 /// completion.results params
@@ -5111,20 +4945,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryFile.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedSuggestionSets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedElementKinds.hashCode);
-    hash =
-        JenkinsSmiHash.combine(hash, includedSuggestionRelevanceTags.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        replacementOffset,
+        replacementLength,
+        results,
+        isLast,
+        libraryFile,
+        includedSuggestionSets,
+        includedElementKinds,
+        includedSuggestionRelevanceTags,
+      );
 }
 
 /// CompletionService
@@ -5246,11 +5077,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// completion.setSubscriptions result
@@ -5274,9 +5101,7 @@
   }
 
   @override
-  int get hashCode {
-    return 2482770;
-  }
+  int get hashCode => 2482770;
 }
 
 /// ContextData
@@ -5384,15 +5209,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        explicitFileCount,
+        implicitFileCount,
+        workItemQueueLength,
+        cacheEntryExceptions,
+      );
 }
 
 /// convertGetterToMethod feedback
@@ -5409,9 +5232,7 @@
   }
 
   @override
-  int get hashCode {
-    return 616032599;
-  }
+  int get hashCode => 616032599;
 }
 
 /// convertGetterToMethod options
@@ -5428,9 +5249,7 @@
   }
 
   @override
-  int get hashCode {
-    return 488848400;
-  }
+  int get hashCode => 488848400;
 }
 
 /// convertMethodToGetter feedback
@@ -5447,9 +5266,7 @@
   }
 
   @override
-  int get hashCode {
-    return 165291526;
-  }
+  int get hashCode => 165291526;
 }
 
 /// convertMethodToGetter options
@@ -5466,9 +5283,7 @@
   }
 
   @override
-  int get hashCode {
-    return 27952290;
-  }
+  int get hashCode => 27952290;
 }
 
 /// diagnostic.getDiagnostics params
@@ -5492,9 +5307,7 @@
   }
 
   @override
-  int get hashCode {
-    return 587526202;
-  }
+  int get hashCode => 587526202;
 }
 
 /// diagnostic.getDiagnostics result
@@ -5564,11 +5377,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, contexts.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => contexts.hashCode;
 }
 
 /// diagnostic.getServerPort params
@@ -5592,9 +5401,7 @@
   }
 
   @override
-  int get hashCode {
-    return 367508704;
-  }
+  int get hashCode => 367508704;
 }
 
 /// diagnostic.getServerPort result
@@ -5658,11 +5465,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, port.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => port.hashCode;
 }
 
 /// edit.bulkFixes params
@@ -5751,12 +5554,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, included.hashCode);
-    hash = JenkinsSmiHash.combine(hash, inTestMode.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        included,
+        inTestMode,
+      );
 }
 
 /// edit.bulkFixes result
@@ -5841,12 +5642,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, details.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        edits,
+        details,
+      );
 }
 
 /// edit.format params
@@ -5949,14 +5748,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lineLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        selectionOffset,
+        selectionLength,
+        lineLength,
+      );
 }
 
 /// edit.format result
@@ -6051,13 +5848,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        edits,
+        selectionOffset,
+        selectionLength,
+      );
 }
 
 /// edit.getAssists params
@@ -6142,13 +5937,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAssists result
@@ -6217,11 +6010,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, assists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => assists.hashCode;
 }
 
 /// edit.getAvailableRefactorings params
@@ -6307,13 +6096,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAvailableRefactorings result
@@ -6383,11 +6170,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kinds.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => kinds.hashCode;
 }
 
 /// edit.getFixes params
@@ -6459,12 +6242,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// edit.getFixes result
@@ -6533,11 +6314,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => fixes.hashCode;
 }
 
 /// edit.getPostfixCompletion params
@@ -6622,13 +6399,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        key,
+        offset,
+      );
 }
 
 /// edit.getPostfixCompletion result
@@ -6693,11 +6468,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => change.hashCode;
 }
 
 /// edit.getRefactoring params
@@ -6832,16 +6603,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, validateOnly.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        file,
+        offset,
+        length,
+        validateOnly,
+        options,
+      );
 }
 
 /// edit.getRefactoring result
@@ -7014,16 +6783,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        initialProblems,
+        optionsProblems,
+        finalProblems,
+        feedback,
+        change,
+        potentialEdits,
+      );
 }
 
 /// edit.getStatementCompletion params
@@ -7096,12 +6863,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// edit.getStatementCompletion result
@@ -7179,12 +6944,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, whitespaceOnly.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        change,
+        whitespaceOnly,
+      );
 }
 
 /// edit.importElements params
@@ -7279,13 +7042,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        elements,
+        offset,
+      );
 }
 
 /// edit.importElements result
@@ -7355,11 +7116,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// edit.isPostfixCompletionApplicable params
@@ -7444,13 +7201,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        key,
+        offset,
+      );
 }
 
 /// edit.isPostfixCompletionApplicable result
@@ -7515,11 +7270,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => value.hashCode;
 }
 
 /// edit.listPostfixCompletionTemplates params
@@ -7543,9 +7294,7 @@
   }
 
   @override
-  int get hashCode {
-    return 690713107;
-  }
+  int get hashCode => 690713107;
 }
 
 /// edit.listPostfixCompletionTemplates result
@@ -7618,11 +7367,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, templates.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => templates.hashCode;
 }
 
 /// edit.organizeDirectives params
@@ -7684,11 +7429,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// edit.organizeDirectives result
@@ -7754,11 +7495,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// edit.sortMembers params
@@ -7819,11 +7556,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// edit.sortMembers result
@@ -7888,11 +7621,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => edit.hashCode;
 }
 
 /// ElementDeclaration
@@ -8084,21 +7813,19 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileIndex.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, line.hashCode);
-    hash = JenkinsSmiHash.combine(hash, column.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, mixinName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        kind,
+        fileIndex,
+        offset,
+        line,
+        column,
+        codeOffset,
+        codeLength,
+        className,
+        mixinName,
+        parameters,
+      );
 }
 
 /// ExecutableFile
@@ -8161,12 +7888,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+      );
 }
 
 /// ExecutableKind
@@ -8295,11 +8020,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, contextRoot.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => contextRoot.hashCode;
 }
 
 /// execution.createContext result
@@ -8363,11 +8084,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// execution.deleteContext params
@@ -8429,11 +8146,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// execution.deleteContext result
@@ -8457,9 +8170,7 @@
   }
 
   @override
-  int get hashCode {
-    return 479954425;
-  }
+  int get hashCode => 479954425;
 }
 
 /// execution.getSuggestions params
@@ -8623,16 +8334,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextFile.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, variables.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expressions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        offset,
+        contextFile,
+        contextOffset,
+        variables,
+        expressions,
+      );
 }
 
 /// execution.getSuggestions result
@@ -8739,12 +8448,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expressions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        suggestions,
+        expressions,
+      );
 }
 
 /// execution.launchData params
@@ -8838,13 +8545,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, referencedFiles.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        kind,
+        referencedFiles,
+      );
 }
 
 /// execution.mapUri params
@@ -8929,13 +8634,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        file,
+        uri,
+      );
 }
 
 /// execution.mapUri result
@@ -9013,12 +8716,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        uri,
+      );
 }
 
 /// ExecutionService
@@ -9130,11 +8831,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// execution.setSubscriptions result
@@ -9158,9 +8855,7 @@
   }
 
   @override
-  int get hashCode {
-    return 287678780;
-  }
+  int get hashCode => 287678780;
 }
 
 /// ExistingImport
@@ -9225,12 +8920,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        uri,
+        elements,
+      );
 }
 
 /// ExistingImports
@@ -9300,12 +8993,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    hash = JenkinsSmiHash.combine(hash, imports.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        elements,
+        imports,
+      );
 }
 
 /// extractLocalVariable feedback
@@ -9427,15 +9118,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        coveringExpressionOffsets,
+        coveringExpressionLengths,
+        names,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractLocalVariable options
@@ -9508,12 +9197,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        extractAll,
+      );
 }
 
 /// extractMethod feedback
@@ -9673,18 +9360,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, canCreateGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        returnType,
+        names,
+        canCreateGetter,
+        parameters,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractMethod options
@@ -9817,15 +9502,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, createGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        returnType,
+        createGetter,
+        name,
+        parameters,
+        extractAll,
+      );
 }
 
 /// extractWidget feedback
@@ -9865,10 +9548,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// extractWidget options
@@ -9925,11 +9605,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// FileKind
@@ -10051,12 +9727,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// flutter.getWidgetDescription result
@@ -10130,11 +9804,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, properties.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => properties.hashCode;
 }
 
 /// FlutterOutline
@@ -10374,22 +10044,20 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, attributes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parentAssociationLabel.hashCode);
-    hash = JenkinsSmiHash.combine(hash, variableName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        offset,
+        length,
+        codeOffset,
+        codeLength,
+        label,
+        dartElement,
+        attributes,
+        className,
+        parentAssociationLabel,
+        variableName,
+        children,
+      );
 }
 
 /// FlutterOutlineAttribute
@@ -10540,17 +10208,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, label.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueBoolean.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueInteger.hashCode);
-    hash = JenkinsSmiHash.combine(hash, literalValueString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, nameLocation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, valueLocation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        label,
+        literalValueBoolean,
+        literalValueInteger,
+        literalValueString,
+        nameLocation,
+        valueLocation,
+      );
 }
 
 /// FlutterOutlineKind
@@ -10710,12 +10376,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        outline,
+      );
 }
 
 /// FlutterService
@@ -10832,11 +10496,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// flutter.setSubscriptions result
@@ -10860,9 +10520,7 @@
   }
 
   @override
-  int get hashCode {
-    return 628296315;
-  }
+  int get hashCode => 628296315;
 }
 
 /// flutter.setWidgetPropertyValue params
@@ -10949,12 +10607,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        value,
+      );
 }
 
 /// flutter.setWidgetPropertyValue result
@@ -11019,11 +10675,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => change.hashCode;
 }
 
 /// FlutterWidgetProperty
@@ -11214,19 +10866,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expression.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isRequired.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isSafeToUpdate.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    hash = JenkinsSmiHash.combine(hash, editor.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        documentation,
+        expression,
+        id,
+        isRequired,
+        isSafeToUpdate,
+        name,
+        children,
+        editor,
+        value,
+      );
 }
 
 /// FlutterWidgetPropertyEditor
@@ -11301,12 +10951,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enumItems.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        enumItems,
+      );
 }
 
 /// FlutterWidgetPropertyEditorKind
@@ -11529,16 +11177,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, boolValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, doubleValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, intValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stringValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, enumValue.hashCode);
-    hash = JenkinsSmiHash.combine(hash, expression.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        boolValue,
+        doubleValue,
+        intValue,
+        stringValue,
+        enumValue,
+        expression,
+      );
 }
 
 /// FlutterWidgetPropertyValueEnumItem
@@ -11637,14 +11283,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraryUri.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraryUri,
+        className,
+        name,
+        documentation,
+      );
 }
 
 /// GeneralAnalysisService
@@ -11935,22 +11579,20 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingLibraryPath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingLibraryName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, containingClassDescription.hashCode);
-    hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementDescription.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, propagatedType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, staticType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        containingLibraryPath,
+        containingLibraryName,
+        containingClassDescription,
+        dartdoc,
+        elementDescription,
+        elementKind,
+        isDeprecated,
+        parameter,
+        propagatedType,
+        staticType,
+      );
 }
 
 /// ImplementedClass
@@ -12012,12 +11654,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+      );
 }
 
 /// ImplementedMember
@@ -12079,12 +11719,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+      );
 }
 
 /// ImportedElementSet
@@ -12163,13 +11801,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, strings.hashCode);
-    hash = JenkinsSmiHash.combine(hash, uris.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        strings,
+        uris,
+        names,
+      );
 }
 
 /// ImportedElements
@@ -12246,13 +11882,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, prefix.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elements.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        path,
+        prefix,
+        elements,
+      );
 }
 
 /// IncludedSuggestionRelevanceTag
@@ -12318,12 +11952,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, tag.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevanceBoost.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        tag,
+        relevanceBoost,
+      );
 }
 
 /// IncludedSuggestionSet
@@ -12409,13 +12041,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        relevance,
+        displayUri,
+      );
 }
 
 /// inlineLocalVariable feedback
@@ -12479,12 +12109,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        occurrences,
+      );
 }
 
 /// inlineLocalVariable options
@@ -12501,9 +12129,7 @@
   }
 
   @override
-  int get hashCode {
-    return 540364977;
-  }
+  int get hashCode => 540364977;
 }
 
 /// inlineMethod feedback
@@ -12585,13 +12211,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, methodName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        className,
+        methodName,
+        isDeclaration,
+      );
 }
 
 /// inlineMethod options
@@ -12663,12 +12287,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
-    hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        deleteSource,
+        inlineAll,
+      );
 }
 
 /// kythe.getKytheEntries params
@@ -12731,11 +12353,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// kythe.getKytheEntries result
@@ -12821,12 +12439,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, entries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        entries,
+        files,
+      );
 }
 
 /// LibraryPathSet
@@ -12894,12 +12510,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, scope.hashCode);
-    hash = JenkinsSmiHash.combine(hash, libraryPaths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        scope,
+        libraryPaths,
+      );
 }
 
 /// moveFile feedback
@@ -12915,9 +12529,7 @@
   }
 
   @override
-  int get hashCode {
-    return 438975893;
-  }
+  int get hashCode => 438975893;
 }
 
 /// moveFile options
@@ -12975,11 +12587,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newFile.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newFile.hashCode;
 }
 
 /// OverriddenMember
@@ -13043,12 +12651,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        className,
+      );
 }
 
 /// Override
@@ -13152,14 +12758,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superclassMember.hashCode);
-    hash = JenkinsSmiHash.combine(hash, interfaceMembers.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        superclassMember,
+        interfaceMembers,
+      );
 }
 
 /// PostfixTemplateDescriptor
@@ -13234,13 +12838,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, key.hashCode);
-    hash = JenkinsSmiHash.combine(hash, example.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        key,
+        example,
+      );
 }
 
 /// PubStatus
@@ -13293,11 +12895,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isListingPackageDirs.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => isListingPackageDirs.hashCode;
 }
 
 /// RefactoringFeedback
@@ -13333,10 +12931,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// RefactoringOptions
@@ -13371,10 +12966,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// rename feedback
@@ -13465,14 +13057,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementKindName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, oldName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        elementKindName,
+        oldName,
+      );
 }
 
 /// rename options
@@ -13530,11 +13120,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newName.hashCode;
 }
 
 /// RequestError
@@ -13614,13 +13200,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        message,
+        stackTrace,
+      );
 }
 
 /// RequestErrorCode
@@ -14048,13 +13632,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        type,
+      );
 }
 
 /// RuntimeCompletionExpressionType
@@ -14234,17 +13816,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, libraryPath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, typeArguments.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        libraryPath,
+        kind,
+        name,
+        typeArguments,
+        returnType,
+        parameterTypes,
+        parameterNames,
+      );
 }
 
 /// RuntimeCompletionExpressionTypeKind
@@ -14368,12 +13948,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        type,
+      );
 }
 
 /// search.findElementReferences params
@@ -14463,13 +14041,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includePotential.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        includePotential,
+      );
 }
 
 /// search.findElementReferences result
@@ -14553,12 +14129,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        element,
+      );
 }
 
 /// search.findMemberDeclarations params
@@ -14620,11 +14194,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// search.findMemberDeclarations result
@@ -14688,11 +14258,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.findMemberReferences params
@@ -14754,11 +14320,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => name.hashCode;
 }
 
 /// search.findMemberReferences result
@@ -14822,11 +14384,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.findTopLevelDeclarations params
@@ -14890,11 +14448,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => pattern.hashCode;
 }
 
 /// search.findTopLevelDeclarations result
@@ -14958,11 +14512,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => id.hashCode;
 }
 
 /// search.getElementDeclarations params
@@ -15058,13 +14608,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
-    hash = JenkinsSmiHash.combine(hash, maxResults.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        pattern,
+        maxResults,
+      );
 }
 
 /// search.getElementDeclarations result
@@ -15147,12 +14695,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, declarations.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        declarations,
+        files,
+      );
 }
 
 /// search.getTypeHierarchy params
@@ -15242,13 +14788,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superOnly.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        superOnly,
+      );
 }
 
 /// search.getTypeHierarchy result
@@ -15328,11 +14872,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, hierarchyItems.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => hierarchyItems.hashCode;
 }
 
 /// SearchResult
@@ -15431,14 +14971,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        location,
+        kind,
+        isPotential,
+        path,
+      );
 }
 
 /// SearchResultKind
@@ -15619,13 +15157,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, results.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        results,
+        isLast,
+      );
 }
 
 /// server.connected params
@@ -15697,12 +15233,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pid.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        version,
+        pid,
+      );
 }
 
 /// server.error params
@@ -15791,13 +15325,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isFatal.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isFatal,
+        message,
+        stackTrace,
+      );
 }
 
 /// server.getVersion params
@@ -15821,9 +15353,7 @@
   }
 
   @override
-  int get hashCode {
-    return 55877452;
-  }
+  int get hashCode => 55877452;
 }
 
 /// server.getVersion result
@@ -15887,11 +15417,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => version.hashCode;
 }
 
 /// ServerLogEntry
@@ -15968,13 +15494,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, time.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, data.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        time,
+        kind,
+        data,
+      );
 }
 
 /// ServerLogEntryKind
@@ -16121,11 +15645,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, entry.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => entry.hashCode;
 }
 
 /// ServerService
@@ -16242,11 +15762,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// server.setSubscriptions result
@@ -16270,9 +15786,7 @@
   }
 
   @override
-  int get hashCode {
-    return 748820900;
-  }
+  int get hashCode => 748820900;
 }
 
 /// server.shutdown params
@@ -16296,9 +15810,7 @@
   }
 
   @override
-  int get hashCode {
-    return 366630911;
-  }
+  int get hashCode => 366630911;
 }
 
 /// server.shutdown result
@@ -16322,9 +15834,7 @@
   }
 
   @override
-  int get hashCode {
-    return 193626532;
-  }
+  int get hashCode => 193626532;
 }
 
 /// server.status params
@@ -16403,12 +15913,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, analysis.hashCode);
-    hash = JenkinsSmiHash.combine(hash, pub.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        analysis,
+        pub,
+      );
 }
 
 /// TypeHierarchyItem
@@ -16568,15 +16076,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, classElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, memberElement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, superclass.hashCode);
-    hash = JenkinsSmiHash.combine(hash, interfaces.hashCode);
-    hash = JenkinsSmiHash.combine(hash, mixins.hashCode);
-    hash = JenkinsSmiHash.combine(hash, subclasses.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        classElement,
+        displayName,
+        memberElement,
+        superclass,
+        interfaces,
+        mixins,
+        subclasses,
+      );
 }
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_util.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_util.dart
deleted file mode 100644
index 02e8c75..0000000
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_util.dart
+++ /dev/null
@@ -1,55 +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.
-
-/// Jenkins hash function, optimized for small integers.
-///
-/// Static methods borrowed from sdk/lib/math/jenkins_smi_hash.dart. Non-static
-/// methods are an enhancement for the "front_end" package.
-///
-/// Where performance is critical, use [hash2], [hash3], or [hash4], or the
-/// pattern `finish(combine(combine(...combine(0, a), b)..., z))`, where a..z
-/// are hash codes to be combined.
-///
-/// For ease of use, you may also use this pattern:
-/// `(new JenkinsSmiHash()..add(a)..add(b)....add(z)).hashCode`, where a..z are
-/// the sub-objects whose hashes should be combined. This pattern performs the
-/// same operations as the performance critical variant, but allocates an extra
-/// object.
-class JenkinsSmiHash {
-  int _hash = 0;
-
-  /// Finalizes the hash and return the resulting hashcode.
-  @override
-  int get hashCode => finish(_hash);
-
-  /// Accumulates the object [o] into the hash.
-  void add(Object o) {
-    _hash = combine(_hash, o.hashCode);
-  }
-
-  /// Accumulates the hash code [value] into the running hash [hash].
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  /// Finalizes a running hash produced by [combine].
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  /// Combines together two hash codes.
-  static int hash2(int a, int b) => finish(combine(combine(0, a), b));
-
-  /// Combines together three hash codes.
-  static int hash3(int a, int b, int c) =>
-      finish(combine(combine(combine(0, a), b), c));
-
-  /// Combines together four hash codes.
-  static int hash4(int a, int b, int c, int d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index d2b2f22..7007543 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,3 +1,22 @@
+## 2.4.0
+* Deprecated `ResourceProvider.getModificationTimes()`.
+* Deprecated `MemoryResourceProvider.newDummyLink()`.
+* Deprecated `MemoryResourceProvider.updateFile()`.
+* Deprecated `TypeName`, use `NamedType` instead.
+* Override `AstVisitor.visitNamedType()` instead of `visitTypeName()`.
+* Deprecated `ClassTypeAlias.superclass`, use `superclass2` instead.
+* Deprecated `ConstructorName.type`, use `type2` instead.
+* Deprecated `ExtendsClause.superclass`, use `superclass2` instead.
+* Deprecated `ImplementsClause.interfaces`, use `interfaces2` instead.
+* Deprecated `OnClause.superclassConstraints`, use `superclassConstraints2` instead.
+* Deprecated `TypeLiteral.typeName`, use `type` instead.
+* Deprecated `WithClause.mixinTypes`, use `mixinTypes2` instead.
+* Deprecated `AstFactory.typeName()`, use `namedType()` instead.
+
+## 2.3.0
+* Enable `constructor-tearoffs` feature by default in `2.15`.
+* Improvements in constructors tear-off implementation.
+
 ## 2.2.0
 * Improvements in constructors tear-off implementation.
 
@@ -963,7 +982,7 @@
   test(name, body);
 }
 ```
-  When subscribed to [notifications for outlines of a test file](https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html#notification_analysis.outline),
+  When subscribed to [notifications for outlines of a test file](https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html#notification_analysis.outline),
   they will include elements for UNIT_TEST_GROUP and UNIT_TEST_TEST.
 * Improve guess for type name identifier. (#32765)
 * Fix LineInfo.getOffsetOfLineAfter().
diff --git a/pkg/analyzer/README.md b/pkg/analyzer/README.md
index 590e1ac..d35c78b 100644
--- a/pkg/analyzer/README.md
+++ b/pkg/analyzer/README.md
@@ -70,7 +70,7 @@
 
 Many tools embed this library, such as:
 
-* [dartfmt] - a formatter for Dart code
+* [dart format] - a formatter for Dart code
 * [dartdoc] - a documentation generator for Dart code
 * [Dart Analysis Server][analysis_sever] - a stateful server that supports IDEs and editors
 
@@ -96,13 +96,13 @@
 
 See the [LICENSE] file.
 
-[serverapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
-[dartanalyzer]: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli#dartanalyzer
+[serverapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/api.html
+[dartanalyzer]: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_cli#dartanalyzer
 [list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
 [lintrules]: https://dart-lang.github.io/linter/lints/
 [glob]: https://pub.dev/packages/glob
-[LICENSE]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/LICENSE
-[dartfmt]: https://github.com/dart-lang/dart_style
+[LICENSE]: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/LICENSE
+[dart format]: https://github.com/dart-lang/dart_style
 [dartdoc]: https://github.com/dart-lang/dartdoc
-[analysis_sever]: https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server
+[analysis_sever]: https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server
 [custom_analysis]: https://dart.dev/guides/language/analysis-options
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 2df5ebb..7dc7476 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -469,6 +469,8 @@
 
   R? visitGenericTypeAlias(GenericTypeAlias node);
 
+  R? visitHideClause(HideClause node);
+
   R? visitHideCombinator(HideCombinator node);
 
   R? visitIfElement(IfElement node);
@@ -511,6 +513,8 @@
 
   R? visitNamedExpression(NamedExpression node);
 
+  R? visitNamedType(NamedType node);
+
   R? visitNativeClause(NativeClause node);
 
   R? visitNativeFunctionBody(NativeFunctionBody node);
@@ -544,8 +548,12 @@
 
   R? visitSetOrMapLiteral(SetOrMapLiteral node);
 
+  R? visitShowClause(ShowClause node);
+
   R? visitShowCombinator(ShowCombinator node);
 
+  R? visitShowHideElement(ShowHideElement node);
+
   R? visitSimpleFormalParameter(SimpleFormalParameter node);
 
   R? visitSimpleIdentifier(SimpleIdentifier node);
@@ -580,6 +588,7 @@
 
   R? visitTypeLiteral(TypeLiteral node);
 
+  @Deprecated('Override visitNamedType instead')
   R? visitTypeName(TypeName node);
 
   R? visitTypeParameter(TypeParameter node);
@@ -894,8 +903,12 @@
   SimpleIdentifier get name;
 
   /// Return the name of the superclass of the class being declared.
+  @Deprecated('Use superclass2 instead')
   TypeName get superclass;
 
+  /// Return the name of the superclass of the class being declared.
+  NamedType get superclass2;
+
   /// Return the type parameters for the class, or `null` if the class does not
   /// have any type parameters.
   TypeParameterList? get typeParameters;
@@ -1301,7 +1314,11 @@
   Token? get period;
 
   /// Return the name of the type defining the constructor.
+  @Deprecated('Use type2 instead')
   TypeName get type;
+
+  /// Return the name of the type defining the constructor.
+  NamedType get type2;
 }
 
 /// An expression representing a reference to a constructor, e.g. the expression
@@ -1676,14 +1693,19 @@
   Token get extendsKeyword;
 
   /// Return the name of the class that is being extended.
+  @Deprecated('Use superclass2 instead')
   TypeName get superclass;
+
+  /// Return the name of the class that is being extended.
+  NamedType get superclass2;
 }
 
 /// The declaration of an extension of a type.
 ///
 ///    extension ::=
 ///        'extension' [SimpleIdentifier]? [TypeParameterList]?
-///        'on' [TypeAnnotation] '{' [ClassMember]* '}'
+///        'on' [TypeAnnotation] [ShowClause]? [HideClause]?
+///        '{' [ClassMember]* '}'
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class ExtensionDeclaration implements CompilationUnitMember {
@@ -1696,6 +1718,10 @@
   /// Return the token representing the 'extension' keyword.
   Token get extensionKeyword;
 
+  /// Return the hide clause, or `null` if the extension does not have a hide
+  /// clause.
+  HideClause? get hideClause;
+
   /// Return the left curly bracket.
   Token get leftBracket;
 
@@ -1712,6 +1738,10 @@
   /// Return the right curly bracket.
   Token get rightBracket;
 
+  /// Return the show clause, or `null` if the extension does not have a show
+  /// clause.
+  ShowClause? get showClause;
+
   /// Return the token representing the 'type' keyword.
   Token? get typeKeyword;
 
@@ -2437,6 +2467,20 @@
   TypeParameterList? get typeParameters;
 }
 
+/// The "hide" clause in an extension declaration.
+///
+///    hideClause ::=
+///        'hide' [TypeName] (',' [TypeName])*
+///
+///  Clients may not extend, implement or mix-in this class.
+abstract class HideClause implements AstNode {
+  /// Return the list of the elements that are being shown.
+  NodeList<ShowHideClauseElement> get elements;
+
+  /// Return the token representing the 'hide' keyword.
+  Token get hideKeyword;
+}
+
 /// A combinator that restricts the names being imported to those that are not
 /// in a given list.
 ///
@@ -2548,7 +2592,11 @@
   Token get implementsKeyword;
 
   /// Return the list of the interfaces that are being implemented.
+  @Deprecated('Use interfaces2 instead')
   NodeList<TypeName> get interfaces;
+
+  /// Return the list of the interfaces that are being implemented.
+  NodeList<NamedType> get interfaces2;
 }
 
 /// An import directive.
@@ -3203,7 +3251,7 @@
 ///        [Identifier] typeArguments?
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class NamedType implements TypeAnnotation {
+abstract class NamedType implements TypeAnnotation, ShowHideClauseElement {
   /// Return `true` if this type is a deferred type.
   ///
   /// 15.1 Static Types: A type <i>T</i> is deferred iff it is of the form
@@ -3373,7 +3421,11 @@
   Token get onKeyword;
 
   /// Return the list of the classes are superclass constraints for the mixin.
+  @Deprecated('Use superclassConstraints2 instead')
   NodeList<TypeName> get superclassConstraints;
+
+  /// Return the list of the classes are superclass constraints for the mixin.
+  NodeList<NamedType> get superclassConstraints2;
 }
 
 /// A parenthesized expression.
@@ -3667,6 +3719,20 @@
   Token get rightBracket;
 }
 
+/// The "show" clause in an extension declaration.
+///
+///    showClause ::=
+///        'show' [TypeName] (',' [TypeName])*
+///
+///  Clients may not extend, implement or mix-in this class.
+abstract class ShowClause implements AstNode {
+  /// Return the list of the elements that are being shown.
+  NodeList<ShowHideClauseElement> get elements;
+
+  /// Return the token representing the 'show' keyword.
+  Token get showKeyword;
+}
+
 /// A combinator that restricts the names being imported to those in a given list.
 ///
 ///    showCombinator ::=
@@ -3679,6 +3745,29 @@
   NodeList<SimpleIdentifier> get shownNames;
 }
 
+/// A node that can appear in the show or hide clauses.
+///
+/// Clients may not extend, implement or mix-in this class.
+abstract class ShowHideClauseElement implements AstNode {}
+
+/// A potentially non-type element of a show or a hide clause.
+///
+///    showHideElement ::=
+///        'get' [SimpleIdentifier] |
+///        'set' [SimpleIdentifier] |
+///        'operator' [SimpleIdentifier] |
+///        [SimpleIdentifier]
+///
+/// Clients may not extend, implement or mix-in this class.
+abstract class ShowHideElement implements AstNode, ShowHideClauseElement {
+  /// Return the 'get', 'set', or 'operator' modifier that appears before the
+  /// name, or `null` if there is no modifier.
+  Token? get modifier;
+
+  /// Return the name of the member the element refers to.
+  SimpleIdentifier get name;
+}
+
 /// A simple formal parameter.
 ///
 ///    simpleFormalParameter ::=
@@ -4173,6 +4262,10 @@
 /// Clients may not extend, implement or mix-in this class.
 abstract class TypeLiteral implements Expression {
   /// The type represented by this literal.
+  NamedType get type;
+
+  /// The type represented by this literal.
+  @Deprecated('Use namedType instead')
   TypeName get typeName;
 }
 
@@ -4182,6 +4275,7 @@
 ///        [Identifier] typeArguments?
 ///
 /// Clients may not extend, implement or mix-in this class.
+@Deprecated('Use NamedType instead')
 abstract class TypeName implements NamedType {}
 
 /// A type parameter.
@@ -4384,8 +4478,12 @@
 /// Clients may not extend, implement or mix-in this class.
 abstract class WithClause implements AstNode {
   /// Return the names of the mixins that were specified.
+  @Deprecated('Use mixinTypes2 instead')
   NodeList<TypeName> get mixinTypes;
 
+  /// Return the names of the mixins that were specified.
+  NodeList<NamedType> get mixinTypes2;
+
   /// Return the token representing the 'with' keyword.
   Token get withKeyword;
 }
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index d8469f2..64d8fb4 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -149,7 +149,7 @@
       TypeParameterList? typeParameters,
       Token equals,
       Token? abstractKeyword,
-      TypeName superclass,
+      NamedType superclass,
       WithClause withClause,
       ImplementsClause? implementsClause,
       Token semicolon);
@@ -230,7 +230,7 @@
   /// Returns a newly created constructor name. The [period] and [name] can be
   /// `null` if the constructor being named is the unnamed constructor.
   ConstructorName constructorName(
-      TypeName type, Token? period, SimpleIdentifier? name);
+      NamedType type, Token? period, SimpleIdentifier? name);
 
   /// Returns a newly created constructor reference.
   ConstructorReference constructorReference(
@@ -344,7 +344,7 @@
       Expression expression, Token? semicolon);
 
   /// Returns a newly created extends clause.
-  ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass);
+  ExtendsClause extendsClause(Token extendsKeyword, NamedType superclass);
 
   /// Return a newly created extension declaration. The list of [typeParameters]
   /// can be `null` if there are no type parameters.
@@ -545,6 +545,11 @@
       TypeAnnotation type,
       Token semicolon);
 
+  /// Returns a newly created hide clause.
+  HideClause hideClause(
+      {required Token hideKeyword,
+      required List<ShowHideClauseElement> elements});
+
   /// Returns a newly created import show combinator.
   HideCombinator hideCombinator(
       Token keyword, List<SimpleIdentifier> hiddenNames);
@@ -573,7 +578,7 @@
 
   /// Returns a newly created implements clause.
   ImplementsClause implementsClause(
-      Token implementsKeyword, List<TypeName> interfaces);
+      Token implementsKeyword, List<NamedType> interfaces);
 
   /// Returns a newly created import directive. Either or both of the
   /// [comment] and [metadata] can be `null` if the function does not have the
@@ -707,6 +712,15 @@
   /// Returns a newly created named expression.
   NamedExpression namedExpression(Label name, Expression expression);
 
+  /// Returns a newly created named type. The [typeArguments] can be `null` if
+  /// there are no type arguments. The [question] can be `null` if there is no
+  /// question mark.
+  NamedType namedType({
+    required Identifier name,
+    TypeArgumentList? typeArguments,
+    Token? question,
+  });
+
   /// Returns a newly created native clause.
   NativeClause nativeClause(Token nativeKeyword, StringLiteral? name);
 
@@ -723,7 +737,7 @@
   NullLiteral nullLiteral(Token literal);
 
   /// Return a newly created on clause.
-  OnClause onClause(Token onKeyword, List<TypeName> superclassConstraints);
+  OnClause onClause(Token onKeyword, List<NamedType> superclassConstraints);
 
   /// Returns a newly created parenthesized expression.
   ParenthesizedExpression parenthesizedExpression(
@@ -792,10 +806,19 @@
       required List<CollectionElement> elements,
       required Token rightBracket});
 
+  /// Returns a newly created show clause.
+  ShowClause showClause(
+      {required Token showKeyword,
+      required List<ShowHideClauseElement> elements});
+
   /// Returns a newly created import show combinator.
   ShowCombinator showCombinator(
       Token keyword, List<SimpleIdentifier> shownNames);
 
+  /// Returns a newly created element of a show or hide clause.
+  ShowHideElement showHideElement(
+      {required Token? modifier, required SimpleIdentifier name});
+
   /// Returns a newly created formal parameter. Either or both of the
   /// [comment] and [metadata] can be `null` if the parameter does not have the
   /// corresponding attribute. The [keyword] can be `null` if a type was
@@ -890,11 +913,12 @@
       Token leftBracket, List<TypeAnnotation> arguments, Token rightBracket);
 
   /// Returns a newly created type literal.
-  TypeLiteral typeLiteral({required TypeName typeName});
+  TypeLiteral typeLiteral({required NamedType typeName});
 
   /// Returns a newly created type name. The [typeArguments] can be `null` if
   /// there are no type arguments. The [question] can be `null` if there is no
   /// question mark.
+  @Deprecated('Use namedType() instead')
   TypeName typeName(Identifier name, TypeArgumentList? typeArguments,
       {Token? question});
 
@@ -948,7 +972,7 @@
       Expression condition, Token rightParenthesis, Statement body);
 
   /// Returns a newly created with clause.
-  WithClause withClause(Token withKeyword, List<TypeName> mixinTypes);
+  WithClause withClause(Token withKeyword, List<NamedType> mixinTypes);
 
   /// Returns a newly created yield expression. The [star] can be `null` if no
   /// star was provided.
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index a10cb66d..451f318 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -366,6 +366,9 @@
   R? visitGenericTypeAlias(GenericTypeAlias node) => visitTypeAlias(node);
 
   @override
+  R? visitHideClause(HideClause node) => visitNode(node);
+
+  @override
   R? visitHideCombinator(HideCombinator node) => visitCombinator(node);
 
   R? visitIdentifier(Identifier node) => visitExpression(node);
@@ -446,6 +449,10 @@
   @override
   R? visitNamedExpression(NamedExpression node) => visitExpression(node);
 
+  @override
+  // ignore: deprecated_member_use_from_same_package
+  R? visitNamedType(NamedType node) => visitTypeName(node as TypeName);
+
   R? visitNamespaceDirective(NamespaceDirective node) =>
       visitUriBasedDirective(node);
 
@@ -510,9 +517,15 @@
   R? visitSetOrMapLiteral(SetOrMapLiteral node) => visitTypedLiteral(node);
 
   @override
+  R? visitShowClause(ShowClause node) => visitNode(node);
+
+  @override
   R? visitShowCombinator(ShowCombinator node) => visitCombinator(node);
 
   @override
+  R? visitShowHideElement(ShowHideElement node) => visitNode(node);
+
+  @override
   R? visitSimpleFormalParameter(SimpleFormalParameter node) =>
       visitNormalFormalParameter(node);
 
@@ -583,6 +596,7 @@
   @override
   R? visitTypeLiteral(TypeLiteral node) => visitExpression(node);
 
+  @Deprecated('Override visitNamedType instead')
   @override
   R? visitTypeName(TypeName node) => visitNode(node);
 
@@ -991,6 +1005,12 @@
   }
 
   @override
+  R? visitHideClause(HideClause node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   R? visitHideCombinator(HideCombinator node) {
     node.visitChildren(this);
     return null;
@@ -1117,6 +1137,12 @@
   }
 
   @override
+  R? visitNamedType(NamedType node) {
+    // ignore: deprecated_member_use_from_same_package
+    return visitTypeName(node as TypeName);
+  }
+
+  @override
   R? visitNativeClause(NativeClause node) {
     node.visitChildren(this);
     return null;
@@ -1214,12 +1240,24 @@
   }
 
   @override
+  R? visitShowClause(ShowClause node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   R? visitShowCombinator(ShowCombinator node) {
     node.visitChildren(this);
     return null;
   }
 
   @override
+  R? visitShowHideElement(ShowHideElement node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   R? visitSimpleFormalParameter(SimpleFormalParameter node) {
     node.visitChildren(this);
     return null;
@@ -1321,6 +1359,7 @@
     return null;
   }
 
+  @Deprecated('Override visitNamedType instead')
   @override
   R? visitTypeName(TypeName node) {
     node.visitChildren(this);
@@ -1570,6 +1609,9 @@
   R? visitGenericTypeAlias(GenericTypeAlias node) => null;
 
   @override
+  R? visitHideClause(HideClause node) => null;
+
+  @override
   R? visitHideCombinator(HideCombinator node) => null;
 
   @override
@@ -1633,6 +1675,10 @@
   R? visitNamedExpression(NamedExpression node) => null;
 
   @override
+  // ignore: deprecated_member_use_from_same_package
+  R? visitNamedType(NamedType node) => visitTypeName(node as TypeName);
+
+  @override
   R? visitNativeClause(NativeClause node) => null;
 
   @override
@@ -1683,9 +1729,15 @@
   R? visitSetOrMapLiteral(SetOrMapLiteral node) => null;
 
   @override
+  R? visitShowClause(ShowClause node) => null;
+
+  @override
   R? visitShowCombinator(ShowCombinator node) => null;
 
   @override
+  R? visitShowHideElement(ShowHideElement node) => null;
+
+  @override
   R? visitSimpleFormalParameter(SimpleFormalParameter node) => null;
 
   @override
@@ -1736,6 +1788,7 @@
   @override
   R? visitTypeLiteral(TypeLiteral node) => null;
 
+  @Deprecated('Override visitNamedType instead')
   @override
   R? visitTypeName(TypeName node) => null;
 
@@ -1964,6 +2017,9 @@
   R? visitGenericTypeAlias(GenericTypeAlias node) => _throw(node);
 
   @override
+  R? visitHideClause(HideClause node) => _throw(node);
+
+  @override
   R? visitHideCombinator(HideCombinator node) => _throw(node);
 
   @override
@@ -2028,6 +2084,10 @@
   R? visitNamedExpression(NamedExpression node) => _throw(node);
 
   @override
+  // ignore: deprecated_member_use_from_same_package
+  R? visitNamedType(NamedType node) => visitTypeName(node as TypeName);
+
+  @override
   R? visitNativeClause(NativeClause node) => _throw(node);
 
   @override
@@ -2078,9 +2138,15 @@
   R? visitSetOrMapLiteral(SetOrMapLiteral node) => _throw(node);
 
   @override
+  R? visitShowClause(ShowClause node) => _throw(node);
+
+  @override
   R? visitShowCombinator(ShowCombinator node) => _throw(node);
 
   @override
+  R? visitShowHideElement(ShowHideElement node) => _throw(node);
+
+  @override
   R? visitSimpleFormalParameter(SimpleFormalParameter node) => _throw(node);
 
   @override
@@ -2133,6 +2199,7 @@
   @override
   R? visitTypeLiteral(TypeLiteral node) => _throw(node);
 
+  @Deprecated('Override visitNamedType instead')
   @override
   R? visitTypeName(TypeName node) => _throw(node);
 
@@ -2662,6 +2729,14 @@
   }
 
   @override
+  T? visitHideClause(HideClause node) {
+    stopwatch.start();
+    T? result = _baseVisitor.visitHideClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T? visitHideCombinator(HideCombinator node) {
     stopwatch.start();
     T? result = _baseVisitor.visitHideCombinator(node);
@@ -2830,6 +2905,14 @@
   }
 
   @override
+  T? visitNamedType(NamedType node) {
+    stopwatch.start();
+    T? result = _baseVisitor.visitNamedType(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T? visitNativeClause(NativeClause node) {
     stopwatch.start();
     T? result = _baseVisitor.visitNativeClause(node);
@@ -2959,6 +3042,14 @@
   }
 
   @override
+  T? visitShowClause(ShowClause node) {
+    stopwatch.start();
+    T? result = _baseVisitor.visitShowClause(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T? visitShowCombinator(ShowCombinator node) {
     stopwatch.start();
     T? result = _baseVisitor.visitShowCombinator(node);
@@ -2967,6 +3058,14 @@
   }
 
   @override
+  T? visitShowHideElement(ShowHideElement node) {
+    stopwatch.start();
+    T? result = _baseVisitor.visitShowHideElement(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T? visitSimpleFormalParameter(SimpleFormalParameter node) {
     stopwatch.start();
     T? result = _baseVisitor.visitSimpleFormalParameter(node);
@@ -3102,6 +3201,7 @@
     return result;
   }
 
+  @Deprecated('Override visitNamedType instead')
   @override
   T? visitTypeName(TypeName node) {
     stopwatch.start();
@@ -3383,6 +3483,9 @@
   R? visitGenericTypeAlias(GenericTypeAlias node) => visitNode(node);
 
   @override
+  R? visitHideClause(HideClause node) => visitNode(node);
+
+  @override
   R? visitHideCombinator(HideCombinator node) => visitNode(node);
 
   @override
@@ -3448,6 +3551,10 @@
   R? visitNamedExpression(NamedExpression node) => visitNode(node);
 
   @override
+  // ignore: deprecated_member_use_from_same_package
+  R? visitNamedType(NamedType node) => visitTypeName(node as TypeName);
+
+  @override
   R? visitNativeClause(NativeClause node) => visitNode(node);
 
   @override
@@ -3504,9 +3611,15 @@
   R? visitSetOrMapLiteral(SetOrMapLiteral node) => visitNode(node);
 
   @override
+  R? visitShowClause(ShowClause node) => visitNode(node);
+
+  @override
   R? visitShowCombinator(ShowCombinator node) => visitNode(node);
 
   @override
+  R? visitShowHideElement(ShowHideElement node) => visitNode(node);
+
+  @override
   R? visitSimpleFormalParameter(SimpleFormalParameter node) => visitNode(node);
 
   @override
@@ -3559,6 +3672,7 @@
   @override
   R? visitTypeLiteral(TypeLiteral node) => visitNode(node);
 
+  @Deprecated('Override visitNamedType instead')
   @override
   R? visitTypeName(TypeName node) => visitNode(node);
 
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index d11b587..cbbb42b 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -5,8 +5,6 @@
 import 'dart:collection';
 
 import 'package:_fe_analyzer_shared/src/base/errors.dart';
-import 'package:_fe_analyzer_shared/src/messages/codes.dart';
-import 'package:_fe_analyzer_shared/src/scanner/errors.dart';
 import 'package:analyzer/diagnostic/diagnostic.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/error/ffi_code.dart';
@@ -142,6 +140,8 @@
   CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
   CompileTimeErrorCode.CONST_WITH_NON_TYPE,
   CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
+  CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+  CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF,
   CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR,
   CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
   CompileTimeErrorCode.CONTINUE_LABEL_ON_SWITCH,
@@ -270,7 +270,6 @@
   CompileTimeErrorCode.LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR,
   CompileTimeErrorCode.LATE_FINAL_LOCAL_ALREADY_ASSIGNED,
   CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-  CompileTimeErrorCode.MACRO_EXECUTION_ERROR,
   CompileTimeErrorCode.MAIN_FIRST_POSITIONAL_PARAMETER_TYPE,
   CompileTimeErrorCode.MAIN_HAS_REQUIRED_NAMED_PARAMETERS,
   CompileTimeErrorCode.MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS,
@@ -439,13 +438,16 @@
   CompileTimeErrorCode.UNDEFINED_EXTENSION_SETTER,
   CompileTimeErrorCode.UNDEFINED_FUNCTION,
   CompileTimeErrorCode.UNDEFINED_GETTER,
+  CompileTimeErrorCode.UNDEFINED_GETTER_ON_FUNCTION_TYPE,
   CompileTimeErrorCode.UNDEFINED_IDENTIFIER,
   CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
   CompileTimeErrorCode.UNDEFINED_METHOD,
+  CompileTimeErrorCode.UNDEFINED_METHOD_ON_FUNCTION_TYPE,
   CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER,
   CompileTimeErrorCode.UNDEFINED_OPERATOR,
   CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME,
   CompileTimeErrorCode.UNDEFINED_SETTER,
+  CompileTimeErrorCode.UNDEFINED_SETTER_ON_FUNCTION_TYPE,
   CompileTimeErrorCode.UNDEFINED_SUPER_GETTER,
   CompileTimeErrorCode.UNDEFINED_SUPER_METHOD,
   CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
@@ -681,6 +683,7 @@
   ParserErrorCode.CONST_METHOD,
   ParserErrorCode.CONST_TYPEDEF,
   ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE,
+  ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS,
   ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP,
   ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
   ParserErrorCode.COVARIANT_AND_STATIC,
@@ -1010,23 +1013,15 @@
   /// [length]. The error will have the given [errorCode] and the map  of
   /// [arguments] will be used to complete the message and correction. If any
   /// [contextMessages] are provided, they will be recorded with the error.
-  AnalysisError.withNamedArguments(this.source, int offset, int length,
-      this.errorCode, Map<String, dynamic> arguments,
+  ///
+  /// Deprecated - no analyzer errors use named arguments anymore.  Please use
+  /// `AnalysisError()`.
+  @deprecated
+  AnalysisError.withNamedArguments(Source source, int offset, int length,
+      ErrorCode errorCode, Map<String, dynamic> arguments,
       {List<DiagnosticMessage> contextMessages = const []})
-      : _contextMessages = contextMessages {
-    var messageText = applyArgumentsToTemplate(errorCode.message, arguments);
-    var correctionTemplate = errorCode.correction;
-    if (correctionTemplate != null) {
-      _correction = applyArgumentsToTemplate(correctionTemplate, arguments);
-    }
-    _problemMessage = DiagnosticMessageImpl(
-      filePath: source.fullName,
-      length: length,
-      message: messageText,
-      offset: offset,
-      url: null,
-    );
-  }
+      : this(source, offset, length, errorCode,
+            _translateNamedArguments(arguments), contextMessages);
 
   @override
   List<DiagnosticMessage> get contextMessages => _contextMessages;
@@ -1126,4 +1121,21 @@
     }
     return errors.toList();
   }
+
+  static List<Object?>? _translateNamedArguments(
+      Map<String, dynamic> arguments) {
+    // All analyzer errors now use positional arguments, so if this method is
+    // being called, either no arguments were provided to the
+    // AnalysisError.withNamedArguments constructor, or the client was
+    // developed against an older version of the analyzer that used named
+    // arguments.  In either case, we'll make a best effort translation of named
+    // arguments to positional ones.  In the case where some arguments were
+    // provided, we have an assertion to alert the developer that they may not
+    // get correct results.
+    assert(
+        arguments.isEmpty,
+        'AnalysisError.withNamedArguments is no longer supported.  Making a '
+        'best effort translation to positional arguments.  Please use '
+        'AnalysisError() instead.');
+  }
 }
diff --git a/pkg/analyzer/lib/error/listener.dart b/pkg/analyzer/lib/error/listener.dart
index af873be..346f462 100644
--- a/pkg/analyzer/lib/error/listener.dart
+++ b/pkg/analyzer/lib/error/listener.dart
@@ -127,6 +127,11 @@
 
   /// Report an error with the given [errorCode] and [message]. The location of
   /// the error is specified by the given [offset] and [length].
+  ///
+  /// Deprecated - the [Message] type assumes named arguments, and no analyzer
+  /// errors use named arguments anymore.  Please use other methods of
+  /// [ErrorReporter].
+  @deprecated
   void reportErrorMessage(
       ErrorCode errorCode, int offset, int length, Message message) {
     _errorListener.onError(AnalysisError.withNamedArguments(
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index b8a27f6..e71b153 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -198,6 +198,7 @@
   ///
   /// If the file of a source is not managed by this provider, return `null`.
   /// If the file a source does not exist, return `-1`.
+  @Deprecated('Not used by clients')
   Future<List<int?>> getModificationTimes(List<Source> sources);
 
   /// Return the [Resource] that corresponds to the given [path].
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 677f728..76b90a1 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:collection';
 import 'dart:convert';
 import 'dart:typed_data';
 
@@ -16,13 +15,9 @@
 /// An in-memory implementation of [ResourceProvider].
 /// Use `/` as a path separator.
 class MemoryResourceProvider implements ResourceProvider {
-  final Map<String, _MemoryResource> _pathToResource =
-      HashMap<String, _MemoryResource>();
-  final Map<String, Uint8List> _pathToBytes = HashMap<String, Uint8List>();
-  final Map<String, int> _pathToTimestamp = HashMap<String, int>();
+  final Map<String, _ResourceData> _pathToData = {};
   final Map<String, String> _pathToLinkedPath = {};
-  final Map<String, List<StreamController<WatchEvent>>> _pathToWatchers =
-      HashMap<String, List<StreamController<WatchEvent>>>();
+  final Map<String, List<StreamController<WatchEvent>>> _pathToWatchers = {};
   int nextStamp = 0;
 
   final pathos.Context _pathContext;
@@ -55,19 +50,28 @@
 
   /// Delete the file with the given path.
   void deleteFile(String path) {
-    _checkFileAtPath(path);
-    _pathToResource.remove(path);
-    _pathToBytes.remove(path);
-    _pathToTimestamp.remove(path);
+    var data = _pathToData[path];
+    if (data is! _FileData) {
+      throw FileSystemException(path, 'Not a file.');
+    }
+
+    _pathToData.remove(path);
+    _removeFromParentFolderData(path);
+
     _notifyWatchers(path, ChangeType.REMOVE);
   }
 
   /// Delete the folder with the given path
   /// and recursively delete nested files and folders.
   void deleteFolder(String path) {
-    _checkFolderAtPath(path);
-    var folder = _pathToResource[path] as _MemoryFolder;
-    for (Resource child in folder.getChildren()) {
+    var data = _pathToData[path];
+    if (data is! _FolderData) {
+      throw FileSystemException(path, 'Not a folder.');
+    }
+
+    for (var childName in data.childNames.toList()) {
+      var childPath = pathContext.join(path, childName);
+      var child = getResource(childPath);
       if (child is File) {
         deleteFile(child.path);
       } else if (child is Folder) {
@@ -76,9 +80,17 @@
         throw 'failed to delete resource: $child';
       }
     }
-    _pathToResource.remove(path);
-    _pathToBytes.remove(path);
-    _pathToTimestamp.remove(path);
+
+    if (_pathToData[path] != data) {
+      throw StateError('Unexpected concurrent modification: $path');
+    }
+    if (data.childNames.isNotEmpty) {
+      throw StateError('Must be empty.');
+    }
+
+    _pathToData.remove(path);
+    _removeFromParentFolderData(path);
+
     _notifyWatchers(path, ChangeType.REMOVE);
   }
 
@@ -94,18 +106,27 @@
     return _MemoryFolder(this, path);
   }
 
+  @Deprecated('Not used by clients')
   @override
   Future<List<int>> getModificationTimes(List<Source> sources) async {
     return sources.map((source) {
       String path = source.fullName;
-      return _pathToTimestamp[path] ?? -1;
+      var file = getFile(path);
+      try {
+        return file.modificationStamp;
+      } on FileSystemException {
+        return -1;
+      }
     }).toList();
   }
 
   @override
   Resource getResource(String path) {
     _ensureAbsoluteAndNormalized(path);
-    return _pathToResource[path] ?? _MemoryFile(this, path);
+    var data = _pathToData[path];
+    return data is _FolderData
+        ? _MemoryFolder(this, path)
+        : _MemoryFile(this, path);
   }
 
   @override
@@ -115,66 +136,53 @@
   }
 
   void modifyFile(String path, String content) {
-    _checkFileAtPath(path);
-    _pathToBytes[path] = utf8.encode(content) as Uint8List;
-    _pathToTimestamp[path] = nextStamp++;
+    var data = _pathToData[path];
+    if (data is! _FileData) {
+      throw FileSystemException(path, 'Not a file.');
+    }
+
+    _pathToData[path] = _FileData(
+      bytes: utf8.encode(content) as Uint8List,
+      timeStamp: nextStamp++,
+    );
     _notifyWatchers(path, ChangeType.MODIFY);
   }
 
   /// Create a resource representing a dummy link (that is, a File object which
   /// appears in its parent directory, but whose `exists` property is false)
+  @Deprecated('Not used by clients')
   File newDummyLink(String path) {
     _ensureAbsoluteAndNormalized(path);
     newFolder(pathContext.dirname(path));
     _MemoryDummyLink link = _MemoryDummyLink(this, path);
-    _pathToResource[path] = link;
-    _pathToTimestamp[path] = nextStamp++;
     _notifyWatchers(path, ChangeType.ADD);
     return link;
   }
 
   File newFile(String path, String content, [int? stamp]) {
-    _ensureAbsoluteAndNormalized(path);
-    _MemoryFile file = _newFile(path);
-    _pathToBytes[path] = utf8.encode(content) as Uint8List;
-    _pathToTimestamp[path] = stamp ?? nextStamp++;
-    _notifyWatchers(path, ChangeType.ADD);
-    return file;
+    var bytes = utf8.encode(content);
+    return newFileWithBytes(path, bytes, stamp);
   }
 
   File newFileWithBytes(String path, List<int> bytes, [int? stamp]) {
     _ensureAbsoluteAndNormalized(path);
-    _MemoryFile file = _newFile(path);
-    _pathToBytes[path] = Uint8List.fromList(bytes);
-    _pathToTimestamp[path] = stamp ?? nextStamp++;
+
+    var parentPath = pathContext.dirname(path);
+    var parentData = _newFolder(parentPath);
+    _addToParentFolderData(parentData, path);
+
+    _pathToData[path] = _FileData(
+      bytes: Uint8List.fromList(bytes),
+      timeStamp: stamp ?? nextStamp++,
+    );
     _notifyWatchers(path, ChangeType.ADD);
-    return file;
+
+    return _MemoryFile(this, path);
   }
 
   Folder newFolder(String path) {
-    _ensureAbsoluteAndNormalized(path);
-    if (!pathContext.isAbsolute(path)) {
-      throw ArgumentError("Path must be absolute : $path");
-    }
-    var resource = _pathToResource[path];
-    if (resource == null) {
-      String parentPath = pathContext.dirname(path);
-      if (parentPath != path) {
-        newFolder(parentPath);
-      }
-      _MemoryFolder folder = _MemoryFolder(this, path);
-      _pathToResource[path] = folder;
-      _pathToTimestamp[path] = nextStamp++;
-      _notifyWatchers(path, ChangeType.ADD);
-      return folder;
-    } else if (resource is _MemoryFolder) {
-      _notifyWatchers(path, ChangeType.ADD);
-      return resource;
-    } else {
-      String message =
-          'Folder expected at ' "'$path'" 'but ${resource.runtimeType} found';
-      throw ArgumentError(message);
-    }
+    _newFolder(path);
+    return _MemoryFolder(this, path);
   }
 
   /// Create a link from the [path] to the [target].
@@ -184,44 +192,29 @@
     _pathToLinkedPath[path] = target;
   }
 
+  @Deprecated('Not used by clients')
   File updateFile(String path, String content, [int? stamp]) {
     _ensureAbsoluteAndNormalized(path);
     newFolder(pathContext.dirname(path));
-    _MemoryFile file = _MemoryFile(this, path);
-    _pathToResource[path] = file;
-    _pathToBytes[path] = utf8.encode(content) as Uint8List;
-    _pathToTimestamp[path] = stamp ?? nextStamp++;
+    _pathToData[path] = _FileData(
+      bytes: utf8.encode(content) as Uint8List,
+      timeStamp: stamp ?? nextStamp++,
+    );
     _notifyWatchers(path, ChangeType.MODIFY);
-    return file;
+    return _MemoryFile(this, path);
   }
 
   /// Write a representation of the file system on the given [sink].
   void writeOn(StringSink sink) {
-    List<String> paths = _pathToResource.keys.toList();
+    List<String> paths = _pathToData.keys.toList();
     paths.sort();
     paths.forEach(sink.writeln);
   }
 
-  void _checkFileAtPath(String path) {
-    // TODO(brianwilkerson) Consider throwing a FileSystemException rather than
-    // an ArgumentError.
-    var resource = _pathToResource[path];
-    if (resource is! _MemoryFile) {
-      if (resource == null) {
-        throw ArgumentError('File expected at "$path" but does not exist');
-      }
-      throw ArgumentError(
-          'File expected at "$path" but ${resource.runtimeType} found');
-    }
-  }
-
-  void _checkFolderAtPath(String path) {
-    // TODO(brianwilkerson) Consider throwing a FileSystemException rather than
-    // an ArgumentError.
-    var resource = _pathToResource[path];
-    if (resource is! _MemoryFolder) {
-      throw ArgumentError(
-          'Folder expected at "$path" but ${resource.runtimeType} found');
+  void _addToParentFolderData(_FolderData parentData, String path) {
+    var childName = pathContext.basename(path);
+    if (!parentData.childNames.contains(childName)) {
+      parentData.childNames.add(childName);
     }
   }
 
@@ -236,18 +229,25 @@
     }
   }
 
-  /// Create a new [_MemoryFile] without any content.
-  _MemoryFile _newFile(String path) {
-    String folderPath = pathContext.dirname(path);
-    var folder = _pathToResource[folderPath];
-    if (folder == null) {
-      newFolder(folderPath);
-    } else if (folder is! Folder) {
-      throw ArgumentError('Cannot create file ($path) as child of file');
+  _FolderData _newFolder(String path) {
+    _ensureAbsoluteAndNormalized(path);
+
+    var data = _pathToData[path];
+    if (data is _FolderData) {
+      return data;
+    } else if (data == null) {
+      var parentPath = pathContext.dirname(path);
+      if (parentPath != path) {
+        var parentData = _newFolder(parentPath);
+        _addToParentFolderData(parentData, path);
+      }
+      var data = _FolderData();
+      _pathToData[path] = data;
+      _notifyWatchers(path, ChangeType.ADD);
+      return data;
+    } else {
+      throw FileSystemException(path, 'Folder expected.');
     }
-    _MemoryFile file = _MemoryFile(this, path);
-    _pathToResource[path] = file;
-    return file;
   }
 
   void _notifyWatchers(String path, ChangeType changeType) {
@@ -262,36 +262,41 @@
     });
   }
 
-  _MemoryFile _renameFileSync(_MemoryFile file, String newPath) {
-    String path = file.path;
+  void _removeFromParentFolderData(String path) {
+    var parentPath = pathContext.dirname(path);
+    var parentData = _pathToData[parentPath] as _FolderData;
+    var childName = pathContext.basename(path);
+    parentData.childNames.remove(childName);
+  }
+
+  void _renameFileSync(String path, String newPath) {
+    var data = _pathToData[path];
+    if (data is! _FileData) {
+      throw FileSystemException(path, 'Not a file.');
+    }
+
     if (newPath == path) {
-      return file;
-    }
-    var existingNewResource = _pathToResource[newPath];
-    if (existingNewResource is _MemoryFolder) {
-      throw FileSystemException(
-          path, 'Could not be renamed: $newPath is a folder.');
+      return;
     }
 
-    _MemoryFile newFile = _newFile(newPath);
-    _pathToResource.remove(path);
-
-    var oldBytes = _pathToBytes.remove(path);
-    if (oldBytes != null) {
-      _pathToBytes[newPath] = oldBytes;
+    var existingNewData = _pathToData[newPath];
+    if (existingNewData == null) {
+      // Nothing to do.
+    } else if (existingNewData is _FileData) {
+      deleteFile(newPath);
+    } else {
+      throw FileSystemException(newPath, 'Not a file.');
     }
 
-    var oldTimestamp = _pathToTimestamp.remove(path);
-    if (oldTimestamp != null) {
-      _pathToTimestamp[newPath] = oldTimestamp;
-    }
+    var parentPath = pathContext.dirname(path);
+    var parentData = _newFolder(parentPath);
+    _addToParentFolderData(parentData, path);
 
-    if (existingNewResource != null) {
-      _notifyWatchers(newPath, ChangeType.REMOVE);
-    }
+    _pathToData.remove(path);
+    _pathToData[newPath] = data;
+
     _notifyWatchers(path, ChangeType.REMOVE);
     _notifyWatchers(newPath, ChangeType.ADD);
-    return newFile;
   }
 
   String _resolveLinks(String path) {
@@ -317,15 +322,34 @@
     return result;
   }
 
-  void _setFileContent(_MemoryFile file, List<int> bytes) {
-    String path = file.path;
-    _pathToResource[path] = file;
-    _pathToBytes[path] = Uint8List.fromList(bytes);
-    _pathToTimestamp[path] = nextStamp++;
+  void _setFileContent(String path, List<int> bytes) {
+    var parentPath = pathContext.dirname(path);
+    var parentData = _newFolder(parentPath);
+    _addToParentFolderData(parentData, path);
+
+    _pathToData[path] = _FileData(
+      bytes: Uint8List.fromList(bytes),
+      timeStamp: nextStamp++,
+    );
     _notifyWatchers(path, ChangeType.MODIFY);
   }
 }
 
+class _FileData extends _ResourceData {
+  final Uint8List bytes;
+  final int timeStamp;
+
+  _FileData({
+    required this.bytes,
+    required this.timeStamp,
+  });
+}
+
+class _FolderData extends _ResourceData {
+  /// Names (not paths) of direct children.
+  final List<String> childNames = [];
+}
+
 /// An in-memory implementation of [File] which acts like a symbolic link to a
 /// non-existent file.
 class _MemoryDummyLink extends _MemoryResource implements File {
@@ -347,11 +371,7 @@
 
   @override
   int get modificationStamp {
-    var stamp = provider._pathToTimestamp[path];
-    if (stamp == null) {
-      throw FileSystemException(path, "File does not exist");
-    }
-    return stamp;
+    throw FileSystemException(path, "File does not exist");
   }
 
   @override
@@ -413,7 +433,7 @@
   @override
   bool get exists {
     var canonicalPath = provider._resolveLinks(path);
-    return provider._pathToResource[canonicalPath] is _MemoryFile;
+    return provider._pathToData[canonicalPath] is _FileData;
   }
 
   @override
@@ -424,11 +444,11 @@
   @override
   int get modificationStamp {
     var canonicalPath = provider._resolveLinks(path);
-    var stamp = provider._pathToTimestamp[canonicalPath];
-    if (stamp == null) {
-      throw FileSystemException(path, 'File "$path" does not exist.');
+    var data = provider._pathToData[canonicalPath];
+    if (data is! _FileData) {
+      throw FileSystemException(path, 'File does not exist.');
     }
-    return stamp;
+    return data.timeStamp;
   }
 
   @override
@@ -458,26 +478,23 @@
   @override
   Uint8List readAsBytesSync() {
     var canonicalPath = provider._resolveLinks(path);
-    var content = provider._pathToBytes[canonicalPath];
-    if (content == null) {
-      throw FileSystemException(path, 'File "$path" does not exist.');
+    var data = provider._pathToData[canonicalPath];
+    if (data is! _FileData) {
+      throw FileSystemException(path, 'File does not exist.');
     }
-    return content;
+    return data.bytes;
   }
 
   @override
   String readAsStringSync() {
-    var canonicalPath = provider._resolveLinks(path);
-    var content = provider._pathToBytes[canonicalPath];
-    if (content == null) {
-      throw FileSystemException(path, 'File "$path" does not exist.');
-    }
-    return utf8.decode(content);
+    var bytes = readAsBytesSync();
+    return utf8.decode(bytes);
   }
 
   @override
   File renameSync(String newPath) {
-    return provider._renameFileSync(this, newPath);
+    provider._renameFileSync(path, newPath);
+    return provider.getFile(newPath);
   }
 
   @override
@@ -486,7 +503,7 @@
     var result = provider.getFile(canonicalPath);
 
     if (!result.exists) {
-      throw FileSystemException(path, 'File "$path" does not exist.');
+      throw FileSystemException(path, 'File does not exist.');
     }
 
     return result;
@@ -494,12 +511,13 @@
 
   @override
   void writeAsBytesSync(List<int> bytes) {
-    provider._setFileContent(this, bytes);
+    provider._setFileContent(path, bytes);
   }
 
   @override
   void writeAsStringSync(String content) {
-    provider._setFileContent(this, utf8.encode(content));
+    var bytes = utf8.encode(content);
+    writeAsBytesSync(bytes);
   }
 }
 
@@ -511,7 +529,7 @@
   @override
   bool get exists {
     var canonicalPath = provider._resolveLinks(path);
-    return provider._pathToResource[canonicalPath] is _MemoryFolder;
+    return provider._pathToData[canonicalPath] is _FolderData;
   }
 
   @override
@@ -555,29 +573,20 @@
 
   @override
   Resource getChild(String relPath) {
-    String childPath = canonicalizePath(relPath);
-    return provider._pathToResource[childPath] ??
-        _MemoryFile(provider, childPath);
+    var path = canonicalizePath(relPath);
+    return provider.getResource(path);
   }
 
   @override
   _MemoryFile getChildAssumingFile(String relPath) {
-    String childPath = canonicalizePath(relPath);
-    var resource = provider._pathToResource[childPath];
-    if (resource is _MemoryFile) {
-      return resource;
-    }
-    return _MemoryFile(provider, childPath);
+    var path = canonicalizePath(relPath);
+    return _MemoryFile(provider, path);
   }
 
   @override
   _MemoryFolder getChildAssumingFolder(String relPath) {
-    String childPath = canonicalizePath(relPath);
-    var resource = provider._pathToResource[childPath];
-    if (resource is _MemoryFolder) {
-      return resource;
-    }
-    return _MemoryFolder(provider, childPath);
+    var path = canonicalizePath(relPath);
+    return _MemoryFolder(provider, path);
   }
 
   @override
@@ -596,17 +605,17 @@
       }).toList();
     }
 
-    if (!exists) {
+    var data = provider._pathToData[path];
+    if (data is! _FolderData) {
       throw FileSystemException(path, 'Folder does not exist.');
     }
 
     var children = <Resource>[];
-
-    provider._pathToResource.forEach((resourcePath, resource) {
-      if (provider.pathContext.dirname(resourcePath) == path) {
-        children.add(resource);
-      }
-    });
+    for (var childName in data.childNames) {
+      var childPath = provider.pathContext.join(path, childName);
+      var child = provider.getResource(childPath);
+      children.add(child);
+    }
 
     provider._pathToLinkedPath.forEach((resourcePath, targetPath) {
       if (provider.pathContext.dirname(resourcePath) == path) {
@@ -640,7 +649,7 @@
     var result = provider.getFolder(canonicalPath);
 
     if (!result.exists) {
-      throw FileSystemException(path, 'Folder "$path" does not exist.');
+      throw FileSystemException(path, 'Folder does not exist.');
     }
 
     return result;
@@ -712,3 +721,5 @@
   @override
   Uri toUri() => provider.pathContext.toUri(path);
 }
+
+class _ResourceData {}
diff --git a/pkg/analyzer/lib/file_system/overlay_file_system.dart b/pkg/analyzer/lib/file_system/overlay_file_system.dart
index 563954b..e66c643 100644
--- a/pkg/analyzer/lib/file_system/overlay_file_system.dart
+++ b/pkg/analyzer/lib/file_system/overlay_file_system.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:convert';
-import 'dart:core';
 import 'dart:typed_data';
 
 import 'package:analyzer/file_system/file_system.dart';
@@ -41,6 +40,7 @@
   Folder getFolder(String path) =>
       _OverlayFolder(this, baseProvider.getFolder(path));
 
+  @Deprecated('Not used by clients')
   @override
   Future<List<int>> getModificationTimes(List<Source> sources) async {
     return sources.map((source) {
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 51e3bc8..9824499 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -78,6 +78,7 @@
     return _PhysicalFolder(io.Directory(path));
   }
 
+  @Deprecated('Not used by clients')
   @override
   Future<List<int?>> getModificationTimes(List<Source> sources) async {
     List<String> paths = sources.map((source) => source.fullName).toList();
diff --git a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
index c96c08e..efb2263 100644
--- a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.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:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/source_resource.dart';
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index 33ea055..56ca27b 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -2,214 +2,4 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-
-/// The error codes used for errors in analysis options files. The convention
-/// for this class is for the name of the error code to indicate the problem
-/// that caused the error to be generated and for the error message to explain
-/// what is wrong and, when appropriate, how the problem can be corrected.
-class AnalysisOptionsErrorCode extends ErrorCode {
-  /// An error code indicating that there is a syntactic error in the included
-  /// file.
-  ///
-  /// Parameters:
-  /// 0: the path of the file containing the error
-  /// 1: the starting offset of the text in the file that contains the error
-  /// 2: the ending offset of the text in the file that contains the error
-  /// 3: the error message
-  static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
-      AnalysisOptionsErrorCode(
-          'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
-
-  /// An error code indicating that there is a syntactic error in the file.
-  ///
-  /// Parameters:
-  /// 0: the error message from the parse error
-  static const AnalysisOptionsErrorCode PARSE_ERROR =
-      AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
-
-  /// Initialize a newly created error code to have the given [name].
-  const AnalysisOptionsErrorCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsErrorCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-class AnalysisOptionsHintCode extends ErrorCode {
-  /// An error code indicating that the enablePreviewDart2 setting is
-  /// deprecated.
-  static const AnalysisOptionsHintCode PREVIEW_DART_2_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('PREVIEW_DART_2_SETTING_DEPRECATED',
-          "The 'enablePreviewDart2' setting is deprecated.",
-          correction: "It is no longer necessary to explicitly enable Dart 2.");
-
-  /// An error code indicating that strong-mode: true is deprecated.
-  static const AnalysisOptionsHintCode STRONG_MODE_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('STRONG_MODE_SETTING_DEPRECATED',
-          "The 'strong-mode: true' setting is deprecated.",
-          correction:
-              "It is no longer necessary to explicitly enable strong mode.");
-
-  /// An error code indicating that the enablePreviewDart2 setting is
-  /// deprecated.
-  static const AnalysisOptionsHintCode SUPER_MIXINS_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('SUPER_MIXINS_SETTING_DEPRECATED',
-          "The 'enableSuperMixins' setting is deprecated.",
-          correction:
-              "Support has been added to the language for 'mixin' based "
-              'mixins.');
-
-  /// Initialize a newly created hint code to have the given [name].
-  const AnalysisOptionsHintCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsHintCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
-
-  @override
-  ErrorType get type => ErrorType.HINT;
-}
-
-/// The error codes used for warnings in analysis options files. The convention
-/// for this class is for the name of the error code to indicate the problem
-/// that caused the error to be generated and for the error message to explain
-/// what is wrong and, when appropriate, how the problem can be corrected.
-class AnalysisOptionsWarningCode extends ErrorCode {
-  /// An error code indicating that the given option is deprecated.
-  static const AnalysisOptionsWarningCode ANALYSIS_OPTION_DEPRECATED =
-      AnalysisOptionsWarningCode('ANALYSIS_OPTION_DEPRECATED',
-          "The option '{0}' is no longer supported.");
-
-  /// An error code indicating a specified include file could not be found.
-  ///
-  /// Parameters:
-  /// 0: the uri of the file to be included
-  /// 1: the path of the file containing the include directive
-  /// 2: the path of the context being analyzed
-  static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
-      AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND',
-          "The include file '{0}' in '{1}' can't be found when analyzing '{2}'.");
-
-  /// An error code indicating a specified include file has a warning.
-  ///
-  /// Parameters:
-  /// 0: the path of the file containing the warnings
-  /// 1: the starting offset of the text in the file that contains the warning
-  /// 2: the ending offset of the text in the file that contains the warning
-  /// 3: the warning message
-  static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
-      AnalysisOptionsWarningCode('INCLUDED_FILE_WARNING',
-          "Warning in the included options file {0}({1}..{2}): {3}");
-
-  /// An error code indicating that a plugin is being configured with an invalid
-  /// value for an option and a detail message is provided.
-  static const AnalysisOptionsWarningCode INVALID_OPTION =
-      AnalysisOptionsWarningCode(
-          'INVALID_OPTION', "Invalid option specified for '{0}': {1}");
-
-  /// An error code indicating an invalid format for an options file section.
-  ///
-  /// Parameters:
-  /// 0: the section name
-  static const AnalysisOptionsWarningCode INVALID_SECTION_FORMAT =
-      AnalysisOptionsWarningCode(
-          'INVALID_SECTION_FORMAT', "Invalid format for the '{0}' section.");
-
-  /// An error code indicating that strong-mode: false is has been removed.
-  static const AnalysisOptionsWarningCode SPEC_MODE_REMOVED =
-      AnalysisOptionsWarningCode('SPEC_MODE_REMOVED',
-          "The option 'strong-mode: false' is no longer supported.",
-          correction:
-              "It's recommended to remove the 'strong-mode:' setting (and make "
-              "your code Dart 2 compliant).");
-
-  /// An error code indicating that an unrecognized error code is being used to
-  /// specify an error filter.
-  ///
-  /// Parameters:
-  /// 0: the unrecognized error code
-  static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
-      AnalysisOptionsWarningCode(
-          'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option where there is just one legal value.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  /// 2: the legal value
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
-      AnalysisOptionsWarningCode(
-          'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
-          "The option '{1}' isn't supported by '{0}'. "
-              "Try using the only supported option: '{2}'.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option and legal options are provided.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  /// 2: legal values
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
-      AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
-          "The option '{1}' isn't supported by '{0}'.",
-          correction: "Try using one of the supported options: {2}.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option and legal options are provided.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITHOUT_VALUES =
-      AnalysisOptionsWarningCode(
-    'UNSUPPORTED_OPTION_WITHOUT_VALUES',
-    "The option '{1}' isn't supported by '{0}'.",
-  );
-
-  /// An error code indicating that an option entry is being configured with an
-  /// unsupported value.
-  ///
-  /// Parameters:
-  /// 0: the option name
-  /// 1: the unsupported value
-  /// 2: legal values
-  static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
-      AnalysisOptionsWarningCode(
-          'UNSUPPORTED_VALUE', "The value '{1}' isn't supported by '{0}'.",
-          correction: "Try using one of the supported options: {2}.");
-
-  /// Initialize a newly created warning code to have the given [name].
-  const AnalysisOptionsWarningCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsWarningCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
+export 'package:analyzer/src/analysis_options/error/option_codes.g.dart';
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
new file mode 100644
index 0000000..4c95c70
--- /dev/null
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
@@ -0,0 +1,294 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class AnalysisOptionsErrorCode extends ErrorCode {
+  /**
+   * An error code indicating that there is a syntactic error in the included
+   * file.
+   *
+   * Parameters:
+   * 0: the path of the file containing the error
+   * 1: the starting offset of the text in the file that contains the error
+   * 2: the ending offset of the text in the file that contains the error
+   * 3: the error message
+   */
+  static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
+      AnalysisOptionsErrorCode(
+    'INCLUDED_FILE_PARSE_ERROR',
+    "{3} in {0}({1}..{2})",
+  );
+
+  /**
+   * An error code indicating that there is a syntactic error in the file.
+   *
+   * Parameters:
+   * 0: the error message from the parse error
+   */
+  static const AnalysisOptionsErrorCode PARSE_ERROR = AnalysisOptionsErrorCode(
+    'PARSE_ERROR',
+    "{0}",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsErrorCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsErrorCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
+
+class AnalysisOptionsHintCode extends ErrorCode {
+  /**
+   * An error code indicating that the enablePreviewDart2 setting is
+   * deprecated.
+   */
+  static const AnalysisOptionsHintCode PREVIEW_DART_2_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'PREVIEW_DART_2_SETTING_DEPRECATED',
+    "The 'enablePreviewDart2' setting is deprecated.",
+    correction: "It is no longer necessary to explicitly enable Dart 2.",
+  );
+
+  /**
+   * An error code indicating that strong-mode: true is deprecated.
+   */
+  static const AnalysisOptionsHintCode STRONG_MODE_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'STRONG_MODE_SETTING_DEPRECATED',
+    "The 'strong-mode: true' setting is deprecated.",
+    correction: "It is no longer necessary to explicitly enable strong mode.",
+  );
+
+  /**
+   * An error code indicating that the enablePreviewDart2 setting is
+   * deprecated.
+   */
+  static const AnalysisOptionsHintCode SUPER_MIXINS_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'SUPER_MIXINS_SETTING_DEPRECATED',
+    "The 'enableSuperMixins' setting is deprecated.",
+    correction:
+        "Support has been added to the language for 'mixin' based mixins.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsHintCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsHintCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
+
+  @override
+  ErrorType get type => ErrorType.HINT;
+}
+
+class AnalysisOptionsWarningCode extends ErrorCode {
+  /**
+   * An error code indicating that the given option is deprecated.
+   */
+  static const AnalysisOptionsWarningCode ANALYSIS_OPTION_DEPRECATED =
+      AnalysisOptionsWarningCode(
+    'ANALYSIS_OPTION_DEPRECATED',
+    "The option '{0}' is no longer supported.",
+  );
+
+  /**
+   * An error code indicating a specified include file has a warning.
+   *
+   * Parameters:
+   * 0: the path of the file containing the warnings
+   * 1: the starting offset of the text in the file that contains the warning
+   * 2: the ending offset of the text in the file that contains the warning
+   * 3: the warning message
+   */
+  static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
+      AnalysisOptionsWarningCode(
+    'INCLUDED_FILE_WARNING',
+    "Warning in the included options file {0}({1}..{2}): {3}",
+  );
+
+  /**
+   * An error code indicating a specified include file could not be found.
+   *
+   * Parameters:
+   * 0: the uri of the file to be included
+   * 1: the path of the file containing the include directive
+   * 2: the path of the context being analyzed
+   */
+  static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
+      AnalysisOptionsWarningCode(
+    'INCLUDE_FILE_NOT_FOUND',
+    "The include file '{0}' in '{1}' can't be found when analyzing '{2}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an invalid
+   * value for an option and a detail message is provided.
+   */
+  static const AnalysisOptionsWarningCode INVALID_OPTION =
+      AnalysisOptionsWarningCode(
+    'INVALID_OPTION',
+    "Invalid option specified for '{0}': {1}",
+  );
+
+  /**
+   * An error code indicating an invalid format for an options file section.
+   *
+   * Parameters:
+   * 0: the section name
+   */
+  static const AnalysisOptionsWarningCode INVALID_SECTION_FORMAT =
+      AnalysisOptionsWarningCode(
+    'INVALID_SECTION_FORMAT',
+    "Invalid format for the '{0}' section.",
+  );
+
+  /**
+   * An error code indicating that strong-mode: false is has been removed.
+   */
+  static const AnalysisOptionsWarningCode SPEC_MODE_REMOVED =
+      AnalysisOptionsWarningCode(
+    'SPEC_MODE_REMOVED',
+    "The option 'strong-mode: false' is no longer supported.",
+    correction:
+        "It's recommended to remove the 'strong-mode:' setting (and make your code Dart 2 compliant).",
+  );
+
+  /**
+   * An error code indicating that an unrecognized error code is being used to
+   * specify an error filter.
+   *
+   * Parameters:
+   * 0: the unrecognized error code
+   */
+  static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
+      AnalysisOptionsWarningCode(
+    'UNRECOGNIZED_ERROR_CODE',
+    "'{0}' isn't a recognized error code.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option and legal options are provided.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITHOUT_VALUES =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITHOUT_VALUES',
+    "The option '{1}' isn't supported by '{0}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option where there is just one legal value.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   * 2: the legal value
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
+    "The option '{1}' isn't supported by '{0}'. Try using the only supported option: '{2}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option and legal options are provided.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   * 2: legal values
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
+    "The option '{1}' isn't supported by '{0}'.",
+    correction: "Try using one of the supported options: {2}.",
+  );
+
+  /**
+   * An error code indicating that an option entry is being configured with an
+   * unsupported value.
+   *
+   * Parameters:
+   * 0: the option name
+   * 1: the unsupported value
+   * 2: legal values
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_VALUE',
+    "The value '{1}' isn't supported by '{0}'.",
+    correction: "Try using one of the supported options: {2}.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsWarningCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsWarningCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index ec0aaa7..00a24f1 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
-import 'dart:core';
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:yaml/yaml.dart';
diff --git a/pkg/analyzer/lib/src/context/context_root.dart b/pkg/analyzer/lib/src/context/context_root.dart
index d79e72c..5155947 100644
--- a/pkg/analyzer/lib/src/context/context_root.dart
+++ b/pkg/analyzer/lib/src/context/context_root.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:path/path.dart' as path;
 
 /// Information about the root directory associated with an analysis context.
@@ -29,12 +28,7 @@
   ContextRoot(this.root, this.exclude, {required this.pathContext});
 
   @override
-  int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, root.hashCode);
-    hash = JenkinsSmiHash.combine(hash, exclude.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(root, exclude);
 
   @override
   bool operator ==(Object other) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
index 9147be7..437064a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
@@ -169,9 +169,9 @@
   void _addClassOrMixin(ClassOrMixinDeclaration node) {
     var enclosingClassName = node.name.name;
 
-    TypeName? enclosingSuperClass;
+    NamedType? enclosingSuperClass;
     if (node is ClassDeclaration) {
-      enclosingSuperClass = node.extendsClause?.superclass;
+      enclosingSuperClass = node.extendsClause?.superclass2;
     }
 
     enclosingClassNameSignature =
@@ -288,7 +288,7 @@
     var api = referenceCollector.collect(
       apiTokenSignature,
       typeParameters: node.typeParameters,
-      superClass: node.superclass,
+      superClass: node.superclass2,
       withClause: node.withClause,
       implementsClause: node.implementsClause,
     );
@@ -303,7 +303,7 @@
 
   void _addConstructor(
     Node enclosingClass,
-    TypeName? enclosingSuperClass,
+    NamedType? enclosingSuperClass,
     List<Node> classMembers,
     ConstructorDeclaration node,
   ) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
index e99f616..70eb2fa 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
@@ -4,7 +4,6 @@
 
 import 'dart:typed_data';
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:convert/convert.dart';
 
 /// The reference to a class member.
@@ -23,7 +22,7 @@
   final int hashCode;
 
   ClassMemberReference(this.target, this.name)
-      : hashCode = JenkinsSmiHash.hash2(target.hashCode, name.hashCode);
+      : hashCode = Object.hash(target.hashCode, name.hashCode);
 
   @override
   bool operator ==(Object other) {
@@ -121,7 +120,7 @@
 
   factory LibraryQualifiedName(Uri libraryUri, String name) {
     var isPrivate = name.startsWith('_');
-    var hashCode = JenkinsSmiHash.hash2(libraryUri.hashCode, name.hashCode);
+    var hashCode = Object.hash(libraryUri.hashCode, name.hashCode);
     return LibraryQualifiedName._internal(
         libraryUri, name, isPrivate, hashCode);
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
index fe3dce6..96ec456 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
@@ -56,7 +56,7 @@
       {String? enclosingClassName,
       String? thisNodeName,
       List<ConstructorInitializer>? constructorInitializers,
-      TypeName? enclosingSuperClass,
+      NamedType? enclosingSuperClass,
       Expression? expression,
       ExtendsClause? extendsClause,
       FormalParameterList? formalParameters,
@@ -66,7 +66,7 @@
       OnClause? onClause,
       ConstructorName? redirectedConstructor,
       TypeAnnotation? returnType,
-      TypeName? superClass,
+      NamedType? superClass,
       TypeAnnotation? type,
       TypeParameterList? typeParameters,
       TypeParameterList? typeParameters2,
@@ -86,11 +86,11 @@
     _visitTypeParameterList(typeParameters2);
 
     // Parts of classes.
-    _visitTypeAnnotation(extendsClause?.superclass);
+    _visitTypeAnnotation(extendsClause?.superclass2);
     _visitTypeAnnotation(superClass);
-    _visitTypeAnnotations(withClause?.mixinTypes);
-    _visitTypeAnnotations(onClause?.superclassConstraints);
-    _visitTypeAnnotations(implementsClause?.interfaces);
+    _visitTypeAnnotations(withClause?.mixinTypes2);
+    _visitTypeAnnotations(onClause?.superclassConstraints2);
+    _visitTypeAnnotations(implementsClause?.interfaces2);
 
     // Parts of executables.
     _visitFormalParameterList(formalParameters);
@@ -264,7 +264,7 @@
   }
 
   /// Record reference to the constructor of the [type] with the given [name].
-  void _visitConstructor(TypeName type, SimpleIdentifier? name) {
+  void _visitConstructor(NamedType type, SimpleIdentifier? name) {
     _visitTypeAnnotation(type);
 
     if (name != null) {
@@ -275,7 +275,7 @@
   }
 
   void _visitConstructorInitializers(
-      TypeName? superClass, List<ConstructorInitializer>? initializers) {
+      NamedType? superClass, List<ConstructorInitializer>? initializers) {
     if (initializers == null) return;
 
     for (var i = 0; i < initializers.length; i++) {
@@ -303,7 +303,7 @@
   void _visitConstructorName(ConstructorName? node) {
     if (node == null) return;
 
-    _visitConstructor(node.type, node.name);
+    _visitConstructor(node.type2, node.name);
   }
 
   void _visitExpression(Expression? node, {bool get = true, bool set = false}) {
@@ -805,7 +805,7 @@
       _visitFormalParameterList(node.parameters);
 
       _localScopes.exit();
-    } else if (node is TypeName) {
+    } else if (node is NamedType) {
       var identifier = node.name;
       _visitExpression(identifier);
       _visitTypeArguments(node.typeArguments);
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 1063912..474f80d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -80,7 +80,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 = 175;
+  static const int DATA_VERSION = 182;
 
   /// The number of exception contexts allowed to write. Once this field is
   /// zero, we stop writing any new exception contexts in this process.
@@ -171,15 +171,6 @@
   final _indexRequestedFiles =
       <String, List<Completer<AnalysisDriverUnitIndex>>>{};
 
-  /// The mapping from the files for which the unit element key was requested
-  /// using `getUnitElementSignature` to the [Completer]s to report the result.
-  final _unitElementSignatureFiles = <String, List<Completer<String>>>{};
-
-  /// The mapping from the files for which the unit element key was requested
-  /// using `getUnitElementSignature`, and which were found to be parts without
-  /// known libraries, to the [Completer]s to report the result.
-  final _unitElementSignatureParts = <String, List<Completer<String>>>{};
-
   /// The mapping from the files for which the unit element was requested using
   /// [getUnitElement2] to the [Completer]s to report the result.
   final _unitElementRequestedFiles =
@@ -231,7 +222,7 @@
   final bool enableIndex;
 
   /// The current analysis session.
-  late AnalysisSessionImpl _currentSession;
+  late final AnalysisSessionImpl _currentSession = AnalysisSessionImpl(this);
 
   /// The current library context, consistent with the [_currentSession].
   ///
@@ -241,11 +232,6 @@
   /// Whether `dart:core` has been transitively discovered.
   bool _hasDartCoreDiscovered = false;
 
-  /// This function is invoked when the current session is about to be discarded.
-  /// The argument represents the path of the resource causing the session
-  /// to be discarded or `null` if there are multiple or this is unknown.
-  void Function(String?)? onCurrentSessionAboutToBeDiscarded;
-
   /// If testing data is being retained, a pointer to the object that is
   /// retaining the testing data.  Otherwise `null`.
   final TestingData? testingData;
@@ -313,7 +299,6 @@
         _sourceFactory = sourceFactory,
         _externalSummaries = externalSummaries,
         testingData = retainDataForTesting ? TestingData() : null {
-    _createNewSession(null);
     _onResults = _resultController.stream.asBroadcastStream();
     _testView = AnalysisDriverTestView(this);
     _createFileTracker();
@@ -434,9 +419,6 @@
     if (_indexRequestedFiles.isNotEmpty) {
       return AnalysisDriverPriority.interactive;
     }
-    if (_unitElementSignatureFiles.isNotEmpty) {
-      return AnalysisDriverPriority.interactive;
-    }
     if (_unitElementRequestedFiles.isNotEmpty) {
       return AnalysisDriverPriority.interactive;
     }
@@ -465,7 +447,6 @@
     if (_errorsRequestedParts.isNotEmpty ||
         _requestedParts.isNotEmpty ||
         _partsToAnalyze.isNotEmpty ||
-        _unitElementSignatureParts.isNotEmpty ||
         _unitElementRequestedParts.isNotEmpty) {
       return AnalysisDriverPriority.general;
     }
@@ -479,14 +460,10 @@
       return;
     }
     if (file_paths.isDart(resourceProvider.pathContext, path)) {
+      _priorityResults.clear();
+      _removePotentiallyAffectedLibraries(path);
       _fileTracker.addFile(path);
-      // If the file is known, it has already been read, even if it did not
-      // exist. Now we are notified that the file exists, so we need to
-      // re-read it and make sure that we invalidate signature of the files
-      // that reference it.
-      if (_fsState.knownFilePaths.contains(path)) {
-        _changeFile(path);
-      }
+      _scheduler.notify(this);
     }
   }
 
@@ -508,7 +485,15 @@
   /// [changeFile] invocation.
   void changeFile(String path) {
     _throwIfNotAbsolutePath(path);
-    _changeFile(path);
+    if (!_fsState.hasUri(path)) {
+      return;
+    }
+    if (file_paths.isDart(resourceProvider.pathContext, path)) {
+      _priorityResults.clear();
+      _removePotentiallyAffectedLibraries(path);
+      _fileTracker.changeFile(path);
+      _scheduler.notify(this);
+    }
   }
 
   /// Clear the library context and any related data structures. Mostly we do
@@ -518,6 +503,7 @@
   /// periodically.
   @visibleForTesting
   void clearLibraryContext() {
+    _libraryContext?.invalidAllLibraries();
     _libraryContext = null;
     _currentSession.clearHierarchies();
   }
@@ -546,9 +532,15 @@
     if (sourceFactory != null) {
       _sourceFactory = sourceFactory;
     }
+
+    _priorityResults.clear();
+    clearLibraryContext();
+
     Iterable<String> addedFiles = _fileTracker.addedFiles;
     _createFileTracker();
     _fileTracker.addFiles(addedFiles);
+
+    _scheduler.notify(this);
   }
 
   /// Return a [Future] that completes when discovery of all files that are
@@ -837,17 +829,6 @@
     );
   }
 
-  ApiSignature getResolvedUnitKeyByPath(String path) {
-    _throwIfNotAbsolutePath(path);
-    var file = fsState.getFileForPath(path);
-
-    var signature = ApiSignature();
-    signature.addUint32List(_saltForResolution);
-    signature.addString(file.transitiveSignature);
-    signature.addString(file.contentHash);
-    return signature;
-  }
-
   /// Return a [Future] that completes with a [SomeResolvedUnitResult] for the
   /// Dart file with the given [path].  If the file cannot be analyzed,
   /// the [Future] completes with an [InvalidResult].
@@ -969,7 +950,7 @@
 
     FileState file = _fileTracker.getFile(path);
     RecordingErrorListener listener = RecordingErrorListener();
-    CompilationUnit unit = file.parse(errorListener: listener);
+    CompilationUnit unit = file.parse(listener);
     return ParsedUnitResultImpl(currentSession, file.path, file.uri,
         file.content, file.lineInfo, file.isPart, unit, listener.errors);
   }
@@ -1057,23 +1038,6 @@
       return;
     }
 
-    // Process a unit element key request.
-    if (_unitElementSignatureFiles.isNotEmpty) {
-      String path = _unitElementSignatureFiles.keys.first;
-      String? signature = _computeUnitElementSignature(path);
-      var completers = _unitElementSignatureFiles.remove(path)!;
-      if (signature != null) {
-        completers.forEach((completer) {
-          completer.complete(signature);
-        });
-      } else {
-        _unitElementSignatureParts
-            .putIfAbsent(path, () => [])
-            .addAll(completers);
-      }
-      return;
-    }
-
     // Process a unit element request.
     if (_unitElementRequestedFiles.isNotEmpty) {
       String path = _unitElementRequestedFiles.keys.first;
@@ -1211,17 +1175,6 @@
       return;
     }
 
-    // Process a unit element signature request for a part.
-    if (_unitElementSignatureParts.isNotEmpty) {
-      String path = _unitElementSignatureParts.keys.first;
-      String signature =
-          _computeUnitElementSignature(path, asIsIfPartWithoutLibrary: true)!;
-      _unitElementSignatureParts.remove(path)!.forEach((completer) {
-        completer.complete(signature);
-      });
-      return;
-    }
-
     // Process a unit element request for a part.
     if (_unitElementRequestedParts.isNotEmpty) {
       String path = _unitElementRequestedParts.keys.first;
@@ -1254,17 +1207,25 @@
   /// but does not guarantee this.
   void removeFile(String path) {
     _throwIfNotAbsolutePath(path);
-    _fileTracker.removeFile(path);
-    clearLibraryContext();
-    _priorityResults.clear();
+    if (!_fsState.hasUri(path)) {
+      return;
+    }
+    if (file_paths.isDart(resourceProvider.pathContext, path)) {
+      _priorityResults.clear();
+      _removePotentiallyAffectedLibraries(path);
+      _fileTracker.removeFile(path);
+      _scheduler.notify(this);
+    }
   }
 
   /// Reset URI resolution, read again all files, build files graph, and ensure
   /// that for all added files new results are reported.
   void resetUriResolution() {
+    _priorityResults.clear();
+    clearLibraryContext();
     _fsState.resetUriResolution();
     _fileTracker.scheduleAllAddedFiles();
-    _changeHook(null);
+    _scheduler.notify(this);
   }
 
   void _addDeclaredVariablesToSignature(ApiSignature buffer) {
@@ -1278,22 +1239,6 @@
     }
   }
 
-  /// Implementation for [changeFile].
-  void _changeFile(String path) {
-    _fileTracker.changeFile(path);
-    clearLibraryContext();
-    _priorityResults.clear();
-  }
-
-  /// Handles a notification from the [FileTracker] that there has been a change
-  /// of state.
-  void _changeHook(String? path) {
-    _createNewSession(path);
-    clearLibraryContext();
-    _priorityResults.clear();
-    _scheduler.notify(this);
-  }
-
   /// There was an exception during a file analysis, we don't know why.
   /// But it might have been caused by an inconsistency of files state, and
   /// the library context state. Reset the library context, and hope that
@@ -1508,23 +1453,6 @@
     });
   }
 
-  String? _computeUnitElementSignature(String path,
-      {bool asIsIfPartWithoutLibrary = false}) {
-    FileState file = _fsState.getFileForPath(path);
-
-    // Prepare the library - the file itself, or the known library.
-    FileState? library = file.isPart ? file.library : file;
-    if (library == null) {
-      if (asIsIfPartWithoutLibrary) {
-        library = file;
-      } else {
-        return null;
-      }
-    }
-
-    return library.transitiveSignature;
-  }
-
   /// Creates new [FileSystemState] and [FileTracker] objects.
   ///
   /// This is used both on initial construction and whenever the configuration
@@ -1557,7 +1485,7 @@
       externalSummaries: _externalSummaries,
       fileContentCache: _fileContentCache,
     );
-    _fileTracker = FileTracker(_logger, _fsState, _changeHook);
+    _fileTracker = FileTracker(_logger, _fsState);
   }
 
   /// Return the context in which the [library] should be analyzed.
@@ -1573,7 +1501,7 @@
 
     var libraryContext = _libraryContext;
     libraryContext ??= _libraryContext = LibraryContext(
-      testView: _testView.libraryContext,
+      testView: _testView.libraryContextTestView,
       session: currentSession,
       logger: _logger,
       byteStore: _byteStore,
@@ -1590,14 +1518,6 @@
     return libraryContext;
   }
 
-  /// Create a new analysis session, so invalidating the current one.
-  void _createNewSession(String? path) {
-    if (onCurrentSessionAboutToBeDiscarded != null) {
-      onCurrentSessionAboutToBeDiscarded!(path);
-    }
-    _currentSession = AnalysisSessionImpl(this);
-  }
-
   /// If this has not been done yet, schedule discovery of all files that are
   /// potentially available, so that they are included in [knownFiles].
   void _discoverAvailableFiles() {
@@ -1759,6 +1679,18 @@
         'missing', errorsResult, AnalysisDriverUnitIndexBuilder());
   }
 
+  void _removePotentiallyAffectedLibraries(String path) {
+    _logger.run('Invalidate affected by $path.', () {
+      _logger.writeln('Work in $name');
+      var affected = <FileState>{};
+      _fsState.collectAffected(path, affected);
+      _logger.writeln('Remove ${affected.length} libraries.');
+      _libraryContext?.elementFactory.removeLibraries(
+        affected.map((e) => e.uriStr).toSet(),
+      );
+    });
+  }
+
   void _reportException(String path, Object exception, StackTrace stackTrace) {
     String? contextKey;
     if (exception is _ExceptionState) {
@@ -2122,7 +2054,8 @@
 @visibleForTesting
 class AnalysisDriverTestView {
   final AnalysisDriver driver;
-  final LibraryContextTestView libraryContext = LibraryContextTestView();
+  final LibraryContextTestView libraryContextTestView =
+      LibraryContextTestView();
 
   int numOfAnalyzedLibraries = 0;
 
@@ -2130,6 +2063,8 @@
 
   FileTracker get fileTracker => driver._fileTracker;
 
+  LibraryContext? get libraryContext => driver._libraryContext;
+
   Map<String, ResolvedUnitResult> get priorityResults {
     return driver._priorityResults;
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index f03c6aa..7d99407 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -6,7 +6,6 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/analysis/experiments_impl.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:meta/meta.dart';
 import 'package:pub_semver/src/version.dart';
 
@@ -40,12 +39,6 @@
   /// The current language version.
   static final Version currentVersion = Version.parse(_currentVersion);
 
-  /// The language version to use in tests.
-  static final Version testingSdkLanguageVersion = Version.parse('2.10.0');
-
-  /// The latest known language version.
-  static final Version latestSdkLanguageVersion = Version.parse('2.13.0');
-
   /// A map containing information about all known experimental flags.
   static final Map<String, ExperimentalFeature> knownFeatures = _knownFeatures;
 
@@ -73,7 +66,7 @@
       explicitFlags.enabled[(feature as ExperimentalFeature).index] = true;
     }
 
-    var sdkLanguageVersion = latestSdkLanguageVersion;
+    var sdkLanguageVersion = currentVersion;
     var flags = restrictEnableFlagsToVersion(
       sdkLanguageVersion: sdkLanguageVersion,
       explicitEnabledFlags: explicitFlags.enabled,
@@ -130,7 +123,7 @@
   /// the flag appearing last.
   factory ExperimentStatus.fromStrings(List<String> flags) {
     return ExperimentStatus.fromStrings2(
-      sdkLanguageVersion: latestSdkLanguageVersion,
+      sdkLanguageVersion: currentVersion,
       flags: flags,
     );
   }
@@ -165,7 +158,7 @@
 
   factory ExperimentStatus.latestLanguageVersion() {
     return ExperimentStatus.fromStrings2(
-      sdkLanguageVersion: latestSdkLanguageVersion,
+      sdkLanguageVersion: currentVersion,
       flags: [],
     );
   }
@@ -178,13 +171,7 @@
   );
 
   @override
-  int get hashCode {
-    int hash = 0;
-    for (var flag in _flags) {
-      hash = JenkinsSmiHash.combine(hash, flag.hashCode);
-    }
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hashAll(_flags);
 
   @override
   bool operator ==(Object other) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 0032336..410a7ce 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -141,7 +141,6 @@
 
   LibraryCycle? _libraryCycle;
   String? _transitiveSignature;
-  String? _transitiveSignatureLinked;
 
   /// The flag that shows whether the file has an error or warning that
   /// might be fixed by a change to another file.
@@ -202,19 +201,13 @@
 
   /// The list of files this file exports.
   List<FileState?> get exportedFiles {
-    if (_exportedFiles == null) {
-      _exportedFiles = <FileState?>[];
-      for (var directive in _unlinked2!.exports) {
-        var uri = _selectRelativeUri(directive);
-        _fileForRelativeUri(uri).map(
-          (file) {
-            _exportedFiles!.add(file);
-          },
-          (_) {},
-        );
-      }
-    }
-    return _exportedFiles!;
+    return _exportedFiles ??= _unlinked2!.exports.map((directive) {
+      var uri = _selectRelativeUri(directive);
+      return _fileForRelativeUri(uri).map(
+        (file) => file,
+        (_) => null,
+      );
+    }).toList();
   }
 
   @override
@@ -222,19 +215,13 @@
 
   /// The list of files this file imports.
   List<FileState?> get importedFiles {
-    if (_importedFiles == null) {
-      _importedFiles = <FileState?>[];
-      for (var directive in _unlinked2!.imports) {
-        var uri = _selectRelativeUri(directive);
-        _fileForRelativeUri(uri).map(
-          (file) {
-            _importedFiles!.add(file);
-          },
-          (_) {},
-        );
-      }
-    }
-    return _importedFiles!;
+    return _importedFiles ??= _unlinked2!.imports.map((directive) {
+      var uri = _selectRelativeUri(directive);
+      return _fileForRelativeUri(uri).map(
+        (file) => file,
+        (_) => null,
+      );
+    }).toList();
   }
 
   LibraryCycle? get internal_libraryCycle => _libraryCycle;
@@ -272,13 +259,6 @@
   /// Return the [LibraryCycle] this file belongs to, even if it consists of
   /// just this file.  If the library cycle is not known yet, compute it.
   LibraryCycle get libraryCycle {
-    if (isPart) {
-      final library = this.library;
-      if (library != null && !identical(library, this)) {
-        return library.libraryCycle;
-      }
-    }
-
     if (_libraryCycle == null) {
       computeLibraryCycle(_fsState._saltForElements, this);
     }
@@ -300,23 +280,19 @@
 
   /// The list of files this library file references as parts.
   List<FileState?> get partedFiles {
-    if (_partedFiles == null) {
-      _partedFiles = <FileState?>[];
-      for (var uri in _unlinked2!.parts) {
-        _fileForRelativeUri(uri).map(
-          (file) {
-            _partedFiles!.add(file);
-            if (file != null) {
-              _fsState._partToLibraries
-                  .putIfAbsent(file, () => <FileState>[])
-                  .add(this);
-            }
-          },
-          (_) {},
-        );
-      }
-    }
-    return _partedFiles!;
+    return _partedFiles ??= _unlinked2!.parts.map((uri) {
+      return _fileForRelativeUri(uri).map(
+        (file) {
+          if (file != null) {
+            _fsState._partToLibraries
+                .putIfAbsent(file, () => <FileState>[])
+                .add(this);
+          }
+          return file;
+        },
+        (_) => null,
+      );
+    }).toList();
   }
 
   /// The external names referenced by the file.
@@ -350,11 +326,6 @@
     return _transitiveSignature!;
   }
 
-  /// The value `transitiveSignature.linked` is used often, so we cache it.
-  String get transitiveSignatureLinked {
-    return _transitiveSignatureLinked ??= '$transitiveSignature.linked';
-  }
-
   /// The [UnlinkedUnit2] of the file.
   UnlinkedUnit2 get unlinked2 => _unlinked2!;
 
@@ -390,7 +361,6 @@
     if (cycle == null) {
       _libraryCycle = null;
       _transitiveSignature = null;
-      _transitiveSignatureLinked = null;
     } else {
       _libraryCycle = cycle;
       _transitiveSignature = signature;
@@ -398,21 +368,10 @@
   }
 
   /// Return a new parsed unresolved [CompilationUnit].
-  ///
-  /// If [content] is provided, then it is parsed instead, for example because
-  /// it contains macro-generated declarations, and we want to resolve the
-  /// unit with these declarations.
-  CompilationUnitImpl parse({
-    String? content,
-    AnalysisErrorListener? errorListener,
-  }) {
-    content ??= this.content;
+  CompilationUnitImpl parse([AnalysisErrorListener? errorListener]) {
     errorListener ??= AnalysisErrorListener.NULL_LISTENER;
     try {
-      return _parse(
-        content: content,
-        errorListener: errorListener,
-      );
+      return _parse(errorListener);
     } catch (exception, stackTrace) {
       throw CaughtExceptionWithFiles(
         exception,
@@ -590,10 +549,7 @@
     }
   }
 
-  CompilationUnitImpl _parse({
-    required String content,
-    required AnalysisErrorListener errorListener,
-  }) {
+  CompilationUnitImpl _parse(AnalysisErrorListener errorListener) {
     CharSequenceReader reader = CharSequenceReader(content);
     Scanner scanner = Scanner(source, reader, errorListener)
       ..configureFeatures(
@@ -811,6 +767,35 @@
   @visibleForTesting
   FileSystemStateTestView get test => _testView;
 
+  /// Collected files that transitively reference a file with the [path].
+  /// These files are potentially affected by the change.
+  void collectAffected(String path, Set<FileState> affected) {
+    final knownFiles = this.knownFiles.toList();
+
+    final fileToReferences = <FileState, List<FileState>>{};
+    for (var file in knownFiles) {
+      for (var referenced in file.directReferencedFiles) {
+        var references = fileToReferences[referenced] ??= [];
+        references.add(file);
+      }
+    }
+
+    collectAffected(FileState file) {
+      if (affected.add(file)) {
+        var references = fileToReferences[file];
+        if (references != null) {
+          for (var other in references) {
+            collectAffected(other);
+          }
+        }
+      }
+    }
+
+    for (var file in _pathToFiles[path] ?? <FileState>[]) {
+      collectAffected(file);
+    }
+  }
+
   FeatureSet contextFeatureSet(
     String path,
     Uri uri,
@@ -1007,8 +992,10 @@
     _uriToFile.clear();
     knownFilePaths.clear();
     knownFiles.clear();
+    _hasUriForPath.clear();
     _pathToFiles.clear();
     _pathToCanonicalFile.clear();
+    _librariesWithoutPartsRead.clear();
     _partToLibraries.clear();
     _subtypedNameToFiles.clear();
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
index f973d53..45ea739 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
@@ -5,12 +5,6 @@
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 
-/// Callback used by [FileTracker] to report to its client that files have been
-/// added, changed, or removed, and therefore more analysis may be necessary.
-/// [path] is the path of the file that was added, changed, or removed, or
-/// `null` if multiple files were added, changed, or removed.
-typedef FileTrackerChangeHook = void Function(String? path);
-
 /// Maintains the file system state needed by the analysis driver, as well as
 /// information about files that have changed and the impact of those changes.
 ///
@@ -22,10 +16,6 @@
 ///
 /// Provides methods for updating the file system state in response to changes.
 class FileTracker {
-  /// Callback invoked whenever a change occurs that may require the client to
-  /// perform analysis.
-  final FileTrackerChangeHook _changeHook;
-
   /// The logger to write performed operations and performance to.
   final PerformanceLog _logger;
 
@@ -55,7 +45,7 @@
   /// have any special relation with changed files.
   var _pendingFiles = <String>{};
 
-  FileTracker(this._logger, this._fsState, this._changeHook);
+  FileTracker(this._logger, this._fsState);
 
   /// Returns the path to exactly one that needs analysis.  Throws a
   /// [StateError] if no files need analysis.
@@ -106,27 +96,24 @@
 
   /// Adds the given [path] to the set of "added files".
   void addFile(String path) {
-    _fsState.markFileForReading(path);
     addedFiles.add(path);
-    _pendingFiles.add(path);
-    _changeHook(path);
+    changeFile(path);
   }
 
   /// Adds the given [paths] to the set of "added files".
   void addFiles(Iterable<String> paths) {
     addedFiles.addAll(paths);
     _pendingFiles.addAll(paths);
-    _changeHook(null);
   }
 
   /// Adds the given [path] to the set of "changed files".
   void changeFile(String path) {
+    _fsState.markFileForReading(path);
     _changedFiles.add(path);
+
     if (addedFiles.contains(path)) {
       _pendingChangedFiles.add(path);
     }
-    _fsState.markFileForReading(path);
-    _changeHook(path);
   }
 
   /// Removes the given [path] from the set of "pending files".
@@ -171,7 +158,6 @@
     // files seems extreme.
     _fsState.removeFile(path);
     _pendingFiles.addAll(addedFiles);
-    _changeHook(path);
   }
 
   /// Schedule all added files for analysis.
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 1d20779..5c8d8e7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -140,7 +140,8 @@
       if (elementKind == ElementKind.CONSTRUCTOR) {
         kind = IndexSyntheticElementKind.constructor;
         element = element.enclosingElement!;
-      } else if (element is FunctionElement && element.name == 'loadLibrary') {
+      } else if (element is FunctionElement &&
+          element.name == FunctionElement.LOAD_LIBRARY_NAME) {
         kind = IndexSyntheticElementKind.loadLibrary;
         element = element.library;
       } else if (elementKind == ElementKind.FIELD) {
@@ -521,9 +522,9 @@
     recordRelationOffset(element, kind, token.offset, token.length, true);
   }
 
-  /// Record a relation between a super [typeName] and its [Element].
-  void recordSuperType(TypeName typeName, IndexRelationKind kind) {
-    Identifier name = typeName.name;
+  /// Record a relation between a super [namedType] and its [Element].
+  void recordSuperType(NamedType namedType, IndexRelationKind kind) {
+    Identifier name = namedType.name;
     Element? element = name.staticElement;
     bool isQualified;
     SimpleIdentifier relNode;
@@ -537,7 +538,7 @@
     recordRelation(element, kind, relNode, isQualified);
     recordRelation(
         element, IndexRelationKind.IS_REFERENCED_BY, relNode, isQualified);
-    typeName.typeArguments?.accept(this);
+    namedType.typeArguments?.accept(this);
   }
 
   void recordUriReference(Element? element, StringLiteral uri) {
@@ -610,18 +611,29 @@
   void visitConstructorName(ConstructorName node) {
     var element = node.staticElement?.declaration;
     element = _getActualConstructorElement(element);
-    // record relation
-    if (node.name != null) {
-      int offset = node.period!.offset;
-      int length = node.name!.end - offset;
-      recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, length, true);
+
+    IndexRelationKind kind;
+    if (node.parent is ConstructorReference) {
+      kind = IndexRelationKind.IS_REFERENCED_BY_CONSTRUCTOR_TEAR_OFF;
+    } else if (node.parent is InstanceCreationExpression) {
+      kind = IndexRelationKind.IS_INVOKED_BY;
     } else {
-      int offset = node.type.end;
-      recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, 0, true);
+      kind = IndexRelationKind.IS_REFERENCED_BY;
     }
-    node.type.accept(this);
+
+    int offset;
+    int length;
+    if (node.name != null) {
+      offset = node.period!.offset;
+      length = node.name!.end - offset;
+    } else {
+      offset = node.type2.end;
+      length = 0;
+    }
+
+    recordRelationOffset(element, kind, offset, length, true);
+
+    node.type2.accept(this);
   }
 
   @override
@@ -643,13 +655,13 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    recordSuperType(node.superclass, IndexRelationKind.IS_EXTENDED_BY);
+    recordSuperType(node.superclass2, IndexRelationKind.IS_EXTENDED_BY);
   }
 
   @override
   void visitImplementsClause(ImplementsClause node) {
-    for (TypeName typeName in node.interfaces) {
-      recordSuperType(typeName, IndexRelationKind.IS_IMPLEMENTED_BY);
+    for (NamedType namedType in node.interfaces2) {
+      recordSuperType(namedType, IndexRelationKind.IS_IMPLEMENTED_BY);
     }
   }
 
@@ -700,9 +712,19 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    AstNode parent = node.parent!;
+    if (parent is ClassTypeAlias && parent.superclass2 == node) {
+      recordSuperType(node, IndexRelationKind.IS_EXTENDED_BY);
+    } else {
+      super.visitNamedType(node);
+    }
+  }
+
+  @override
   void visitOnClause(OnClause node) {
-    for (TypeName typeName in node.superclassConstraints) {
-      recordSuperType(typeName, IndexRelationKind.IS_IMPLEMENTED_BY);
+    for (NamedType namedType in node.superclassConstraints2) {
+      recordSuperType(namedType, IndexRelationKind.IS_IMPLEMENTED_BY);
     }
   }
 
@@ -735,11 +757,11 @@
       int offset = node.period!.offset;
       int length = node.constructorName!.end - offset;
       recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, length, true);
+          element, IndexRelationKind.IS_INVOKED_BY, offset, length, true);
     } else {
       int offset = node.thisKeyword.end;
       recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, 0, true);
+          element, IndexRelationKind.IS_INVOKED_BY, offset, 0, true);
     }
     node.argumentList.accept(this);
   }
@@ -797,35 +819,25 @@
       int offset = node.period!.offset;
       int length = node.constructorName!.end - offset;
       recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, length, true);
+          element, IndexRelationKind.IS_INVOKED_BY, offset, length, true);
     } else {
       int offset = node.superKeyword.end;
       recordRelationOffset(
-          element, IndexRelationKind.IS_REFERENCED_BY, offset, 0, true);
+          element, IndexRelationKind.IS_INVOKED_BY, offset, 0, true);
     }
     node.argumentList.accept(this);
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    AstNode parent = node.parent!;
-    if (parent is ClassTypeAlias && parent.superclass == node) {
-      recordSuperType(node, IndexRelationKind.IS_EXTENDED_BY);
-    } else {
-      super.visitTypeName(node);
-    }
-  }
-
-  @override
   void visitWithClause(WithClause node) {
-    for (TypeName typeName in node.mixinTypes) {
-      recordSuperType(typeName, IndexRelationKind.IS_MIXED_IN_BY);
+    for (NamedType namedType in node.mixinTypes2) {
+      recordSuperType(namedType, IndexRelationKind.IS_MIXED_IN_BY);
     }
   }
 
   /// Record the given class as a subclass of its direct superclasses.
   void _addSubtype(String name,
-      {TypeName? superclass,
+      {NamedType? superclass,
       WithClause? withClause,
       OnClause? onClause,
       ImplementsClause? implementsClause,
@@ -841,7 +853,7 @@
           element.name;
     }
 
-    void addSupertype(TypeName? type) {
+    void addSupertype(NamedType? type) {
       var element = type?.name.staticElement;
       if (element is ClassElement) {
         String id = getClassElementId(element);
@@ -850,9 +862,9 @@
     }
 
     addSupertype(superclass);
-    withClause?.mixinTypes.forEach(addSupertype);
-    onClause?.superclassConstraints.forEach(addSupertype);
-    implementsClause?.interfaces.forEach(addSupertype);
+    withClause?.mixinTypes2.forEach(addSupertype);
+    onClause?.superclassConstraints2.forEach(addSupertype);
+    implementsClause?.interfaces2.forEach(addSupertype);
 
     void addMemberName(SimpleIdentifier identifier) {
       String name = identifier.name;
@@ -880,7 +892,7 @@
   /// Record the given class as a subclass of its direct superclasses.
   void _addSubtypeForClassDeclaration(ClassDeclaration node) {
     _addSubtype(node.name.name,
-        superclass: node.extendsClause?.superclass,
+        superclass: node.extendsClause?.superclass2,
         withClause: node.withClause,
         implementsClause: node.implementsClause,
         memberNodes: node.members);
@@ -889,7 +901,7 @@
   /// Record the given class as a subclass of its direct superclasses.
   void _addSubtypeForClassTypeAlis(ClassTypeAlias node) {
     _addSubtype(node.name.name,
-        superclass: node.superclass,
+        superclass: node.superclass2,
         withClause: node.withClause,
         implementsClause: node.implementsClause,
         memberNodes: const []);
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index b5bdf0d..04235d9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
@@ -50,6 +51,7 @@
 
 var timerLibraryAnalyzer = Stopwatch();
 var timerLibraryAnalyzerConst = Stopwatch();
+var timerLibraryAnalyzerFreshUnit = Stopwatch();
 var timerLibraryAnalyzerResolve = Stopwatch();
 var timerLibraryAnalyzerSplicer = Stopwatch();
 var timerLibraryAnalyzerVerify = Stopwatch();
@@ -98,15 +100,25 @@
 
   /// Compute analysis results for all units of the library.
   Map<FileState, UnitAnalysisResult> analyze() {
-    return analyzeSync();
-  }
-
-  /// Compute analysis results for all units of the library.
-  Map<FileState, UnitAnalysisResult> analyzeSync() {
     timerLibraryAnalyzer.start();
+    Map<FileState, CompilationUnitImpl> units = {};
+
+    // Parse all files.
+    timerLibraryAnalyzerFreshUnit.start();
+    for (FileState file in _library.libraryFiles) {
+      units[file] = _parse(file);
+    }
+    timerLibraryAnalyzerFreshUnit.stop();
+
+    // Resolve URIs in directives to corresponding sources.
+    FeatureSet featureSet = units[_library]!.featureSet;
+    units.forEach((file, unit) {
+      _validateFeatureSet(unit, featureSet);
+      _resolveUriBasedDirectives(file, unit);
+    });
 
     timerLibraryAnalyzerResolve.start();
-    var units = _resolveDirectives();
+    _resolveDirectives(units);
 
     units.forEach((file, unit) {
       _resolveFile(file, unit);
@@ -173,9 +185,7 @@
     units.forEach((file, unit) {
       List<AnalysisError> errors = _getErrorListener(file).errors;
       errors = _filterIgnoredErrors(file, errors);
-      var combinedResult = UnitAnalysisResult(file, unit, errors);
-      var writtenResult = _transformToWrittenCode(combinedResult);
-      results[file] = writtenResult;
+      results[file] = UnitAnalysisResult(file, unit, errors);
     });
     timerLibraryAnalyzer.stop();
     return results;
@@ -284,9 +294,8 @@
       verifier.generateDuplicateShownHiddenNameHints(errorReporter);
       verifier.generateUnusedImportHints(errorReporter);
       verifier.generateUnusedShownNameHints(errorReporter);
-      // TODO(srawlins): Re-enable this check once Flutter engine path is clear.
-      // verifier.generateUnnecessaryImportHints(
-      //     errorReporter, _usedImportedElementsList);
+      verifier.generateUnnecessaryImportHints(
+          errorReporter, _usedImportedElementsList);
     }
 
     // Unused local elements.
@@ -416,16 +425,7 @@
         return false;
       }
       int errorLine = lineInfo.getLocation(error.offset).lineNumber;
-      String name = code.name;
-      if (ignoreInfo.ignoredAt(name, errorLine)) {
-        return true;
-      }
-      String uniqueName = code.uniqueName;
-      int period = uniqueName.indexOf('.');
-      if (period >= 0) {
-        uniqueName = uniqueName.substring(period + 1);
-      }
-      return uniqueName != name && ignoreInfo.ignoredAt(uniqueName, errorLine);
+      return ignoreInfo.ignoredAt(code, errorLine);
     }
 
     return errors.where((AnalysisError e) => !isIgnored(e)).toList();
@@ -493,16 +493,10 @@
   }
 
   /// Return a new parsed unresolved [CompilationUnit].
-  CompilationUnitImpl _parse(
-    FileState file,
-    CompilationUnitElementImpl element,
-  ) {
+  CompilationUnitImpl _parse(FileState file) {
     AnalysisErrorListener errorListener = _getErrorListener(file);
-    String content = element.macroGeneratedContent ?? file.content;
-    var unit = file.parse(
-      content: content,
-      errorListener: errorListener,
-    );
+    String content = file.content;
+    var unit = file.parse(errorListener);
 
     LineInfo lineInfo = unit.lineInfo!;
     _fileToLineInfo[file] = lineInfo;
@@ -511,17 +505,9 @@
     return unit;
   }
 
-  Map<FileState, CompilationUnitImpl> _resolveDirectives() {
-    var units = <FileState, CompilationUnitImpl>{};
-
-    var definingElement = _libraryElement.definingCompilationUnit;
-    definingElement as CompilationUnitElementImpl;
-
-    var definingUnit = _parse(_library, definingElement);
-    units[_library] = definingUnit;
-
-    definingUnit.element = definingElement;
-    _resolveUriBasedDirectives(_library, definingUnit);
+  void _resolveDirectives(Map<FileState, CompilationUnitImpl> units) {
+    var definingCompilationUnit = units[_library]!;
+    definingCompilationUnit.element = _libraryElement.definingCompilationUnit;
 
     bool matchNodeElement(Directive node, Element element) {
       return node.keyword.offset == element.nameOffset;
@@ -534,7 +520,7 @@
     var directivesToResolve = <DirectiveImpl>[];
     int partDirectiveIndex = 0;
     int partElementIndex = 0;
-    for (Directive directive in definingUnit.directives) {
+    for (Directive directive in definingCompilationUnit.directives) {
       if (directive is LibraryDirectiveImpl) {
         libraryNameNode = directive.name;
         directivesToResolve.add(directive);
@@ -577,15 +563,10 @@
           continue;
         }
 
+        var partUnit = units[partFile]!;
         var partElement = _libraryElement.parts[partElementIndex++];
-        partElement as CompilationUnitElementImpl;
-
-        var partUnit = _parse(partFile, partElement);
-        units[partFile] = partUnit;
-
         partUnit.element = partElement;
         directive.element = partElement;
-        _resolveUriBasedDirectives(partFile, partUnit);
 
         Source? partSource = directive.uriSource;
         if (partSource == null) {
@@ -651,7 +632,6 @@
     }
 
     // TODO(scheglov) remove DirectiveResolver class
-    return units;
   }
 
   void _resolveFile(FileState file, CompilationUnit unit) {
@@ -770,74 +750,13 @@
     return directive.uri.stringValue ?? '';
   }
 
-  /// The [combined] result was resolved, potentially with macro-generated
-  /// declarations. But the result (at least the version that corresponds to
-  /// the original, user-written file) should not include these declarations.
-  /// So, we remove these nodes, and correspondingly patch the token sequence.
-  ///
-  /// Similarly, we transform any reported diagnostics.
-  UnitAnalysisResult _transformToWrittenCode(UnitAnalysisResult combined) {
-    var unit = combined.unit;
-    var unitElement = unit.declaredElement as CompilationUnitElementImpl;
-
-    var macroGenerationDataList = unitElement.macroGenerationDataList;
-    if (macroGenerationDataList == null) {
-      return combined;
+  /// Validate that the feature set associated with the compilation [unit] is
+  /// the same as the [expectedSet] of features supported by the library.
+  void _validateFeatureSet(CompilationUnit unit, FeatureSet expectedSet) {
+    FeatureSet actualSet = unit.featureSet;
+    if (actualSet != expectedSet) {
+      // TODO(brianwilkerson) Generate a diagnostic.
     }
-
-    for (var macroData in macroGenerationDataList.reversed) {
-      var classIndex = macroData.classDeclarationIndex;
-      if (classIndex != null) {
-        var classDeclaration = unit.declarations
-            .whereType<ClassDeclaration>()
-            .toList()[classIndex];
-        // A macro-generated declaration is always the last one.
-        var removed = classDeclaration.members.removeAt(
-          classDeclaration.members.length - 1,
-        );
-        // Patch the token sequence.
-        var followToken = removed.endToken.next!;
-        removed.beginToken.previous!.next = followToken;
-        // Shift the following tokens.
-        for (var t = followToken; t != unit.endToken; t = t.next!) {
-          t.offset -= macroData.insertLength;
-        }
-      } else {
-        // TODO(scheglov) implement top-level
-        throw UnimplementedError();
-      }
-    }
-
-    var errors = <AnalysisError>[];
-    for (var combinedError in combined.errors) {
-      var offset = combinedError.offset;
-      var isInWritten = true;
-      for (var macroData in macroGenerationDataList.reversed) {
-        if (offset > macroData.insertOffset) {
-          if (offset < macroData.insertOffset + macroData.insertLength) {
-            isInWritten = false;
-            break;
-          } else {
-            offset -= macroData.insertLength;
-          }
-        }
-      }
-      if (isInWritten) {
-        errors.add(
-          AnalysisError.forValues(
-            combinedError.source,
-            offset,
-            combinedError.length,
-            combinedError.errorCode,
-            combinedError.message,
-            combinedError.correction,
-            contextMessages: combinedError.contextMessages,
-          ),
-        );
-      }
-    }
-
-    return UnitAnalysisResult(combined.file, unit, errors);
   }
 
   /// Check the given [directive] to see if the referenced source exists and
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index f80a744..461b256 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -20,7 +20,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary2/bundle_reader.dart';
-import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/summary2/link.dart' as link2;
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/reference.dart';
@@ -89,6 +88,11 @@
     return elementFactory.libraryOfUri2('$uri');
   }
 
+  /// We are about to discard this context, mark all libraries invalid.
+  void invalidAllLibraries() {
+    elementFactory.invalidateAllLibraries();
+  }
+
   /// Load data required to access elements of the given [targetLibrary].
   void load2(FileState targetLibrary) {
     timerLoad2.start();
@@ -110,13 +114,10 @@
 
       cycle.directDependencies.forEach(loadBundle);
 
-      var unitsInformativeData = <Uri, InformativeUnitData>{};
+      var unitsInformativeBytes = <Uri, Uint8List>{};
       for (var library in cycle.libraries) {
         for (var file in library.libraryFiles) {
-          unitsInformativeData[file.uri] = InformativeUnitData(
-            content: file.content,
-            bytes: file.getInformativeBytes(),
-          );
+          unitsInformativeBytes[file.uri] = file.getInformativeBytes();
         }
       }
 
@@ -195,7 +196,7 @@
         elementFactory.addBundle(
           BundleReader(
             elementFactory: elementFactory,
-            unitsInformativeData: unitsInformativeData,
+            unitsInformativeBytes: unitsInformativeBytes,
             resolutionBytes: resolutionBytes,
           ),
         );
@@ -244,7 +245,7 @@
           BundleReader(
             elementFactory: elementFactory,
             resolutionBytes: bundle.resolutionBytes,
-            unitsInformativeData: {},
+            unitsInformativeBytes: {},
           ),
         );
       }
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
index 413d6ab..2d5b660 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -36,20 +36,6 @@
   /// files that [libraries] reference (but we don't compute these files).
   String? transitiveSignature;
 
-  /// The map from a library in [libraries] to its transitive signature.
-  ///
-  /// It is almost the same as [transitiveSignature], but is also based on
-  /// the URI of this specific library.  Currently we store each linked library
-  /// with its own key, so we need unique keys.  However practically we never
-  /// can use just *one* library of a cycle, we always use the whole cycle.
-  ///
-  /// TODO(scheglov) Switch to loading the whole cycle maybe?
-  final Map<FileState, String> transitiveSignatures = {};
-
-  LibraryCycle();
-
-  LibraryCycle.external() : transitiveSignature = '<external>';
-
   /// Invalidate this cycle and any cycles that directly or indirectly use it.
   ///
   /// Practically invalidation means that we clear the library cycle in all the
diff --git a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
index 2461021..2d5e347 100644
--- a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
@@ -17,7 +17,7 @@
 Set<String> computeSubtypedNames(CompilationUnit unit) {
   Set<String> subtypedNames = <String>{};
 
-  void _addSubtypedName(TypeName? type) {
+  void _addSubtypedName(NamedType? type) {
     if (type != null) {
       Identifier name = type.name;
       if (name is SimpleIdentifier) {
@@ -28,22 +28,22 @@
     }
   }
 
-  void _addSubtypedNames(List<TypeName>? types) {
+  void _addSubtypedNames(List<NamedType>? types) {
     types?.forEach(_addSubtypedName);
   }
 
   for (CompilationUnitMember declaration in unit.declarations) {
     if (declaration is ClassDeclaration) {
-      _addSubtypedName(declaration.extendsClause?.superclass);
-      _addSubtypedNames(declaration.withClause?.mixinTypes);
-      _addSubtypedNames(declaration.implementsClause?.interfaces);
+      _addSubtypedName(declaration.extendsClause?.superclass2);
+      _addSubtypedNames(declaration.withClause?.mixinTypes2);
+      _addSubtypedNames(declaration.implementsClause?.interfaces2);
     } else if (declaration is ClassTypeAlias) {
-      _addSubtypedName(declaration.superclass);
-      _addSubtypedNames(declaration.withClause.mixinTypes);
-      _addSubtypedNames(declaration.implementsClause?.interfaces);
+      _addSubtypedName(declaration.superclass2);
+      _addSubtypedNames(declaration.withClause.mixinTypes2);
+      _addSubtypedNames(declaration.implementsClause?.interfaces2);
     } else if (declaration is MixinDeclaration) {
-      _addSubtypedNames(declaration.onClause?.superclassConstraints);
-      _addSubtypedNames(declaration.implementsClause?.interfaces);
+      _addSubtypedNames(declaration.onClause?.superclassConstraints2);
+      _addSubtypedNames(declaration.implementsClause?.interfaces2);
     }
   }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 8d7a200..9a79ce1 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -73,11 +73,12 @@
 
     ElementKind kind = element.kind;
     if (element is ClassElement ||
-        element is ConstructorElement ||
         element is ExtensionElement ||
         element is PropertyAccessorElement && element.isSetter ||
         element is TypeAliasElement) {
       return _searchReferences(element, searchedFiles);
+    } else if (element is ConstructorElement) {
+      return await _searchReferences_Constructor(element, searchedFiles);
     } else if (element is CompilationUnitElement) {
       return _searchReferences_CompilationUnit(element);
     } else if (element is PropertyAccessorElement && element.isGetter) {
@@ -323,6 +324,18 @@
     return results;
   }
 
+  Future<List<SearchResult>> _searchReferences_Constructor(
+      ConstructorElement element, SearchedFiles searchedFiles) async {
+    List<SearchResult> results = <SearchResult>[];
+    await _addResults(results, element, searchedFiles, const {
+      IndexRelationKind.IS_INVOKED_BY: SearchResultKind.INVOCATION,
+      IndexRelationKind.IS_REFERENCED_BY: SearchResultKind.REFERENCE,
+      IndexRelationKind.IS_REFERENCED_BY_CONSTRUCTOR_TEAR_OFF:
+          SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF,
+    });
+    return results;
+  }
+
   Future<List<SearchResult>> _searchReferences_Field(
       PropertyInducingElement field, SearchedFiles searchedFiles) async {
     List<SearchResult> results = <SearchResult>[];
@@ -562,7 +575,14 @@
 }
 
 /// The kind of reference in a [SearchResult].
-enum SearchResultKind { READ, READ_WRITE, WRITE, INVOCATION, REFERENCE }
+enum SearchResultKind {
+  READ,
+  READ_WRITE,
+  WRITE,
+  INVOCATION,
+  REFERENCE,
+  REFERENCE_BY_CONSTRUCTOR_TEAR_OFF,
+}
 
 /// A single subtype of a type.
 class SubtypeResult {
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index af436f5..187181e 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -1709,14 +1709,18 @@
   @override
   bool get isAbstract => abstractKeyword != null;
 
+  @Deprecated('Use superclass2 instead')
   @override
   TypeNameImpl get superclass => _superclass;
 
-  set superclass(TypeName superclass) {
+  set superclass(NamedType superclass) {
     _superclass = _becomeParentOf(superclass as TypeNameImpl);
   }
 
   @override
+  TypeNameImpl get superclass2 => _superclass;
+
+  @override
   TypeParameterListImpl? get typeParameters => _typeParameters;
 
   set typeParameters(TypeParameterList? typeParameters) {
@@ -2638,14 +2642,18 @@
     _name = _becomeParentOf(name as SimpleIdentifierImpl?);
   }
 
+  @Deprecated('Use type2 instead')
   @override
   TypeNameImpl get type => _type;
 
-  set type(TypeName type) {
+  set type(NamedType type) {
     _type = _becomeParentOf(type as TypeNameImpl);
   }
 
   @override
+  TypeNameImpl get type2 => _type;
+
+  @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitConstructorName(this);
 
   @override
@@ -3648,14 +3656,18 @@
   @override
   Token get endToken => _superclass.endToken;
 
+  @Deprecated('Use superclass2 instead')
   @override
   TypeNameImpl get superclass => _superclass;
 
-  set superclass(TypeName name) {
+  set superclass(NamedType name) {
     _superclass = _becomeParentOf(name as TypeNameImpl);
   }
 
   @override
+  TypeNameImpl get superclass2 => _superclass;
+
+  @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitExtendsClause(this);
 
   @override
@@ -3679,10 +3691,18 @@
   @override
   Token? typeKeyword;
 
+  /// The hide clause for the extension or `null` if the declaration does not
+  /// hide any elements.
+  HideClauseImpl? _hideClause;
+
   /// The name of the extension, or `null` if the extension does not have a
   /// name.
   SimpleIdentifierImpl? _name;
 
+  /// The show clause for the extension or `null` if the declaration does not
+  /// show any elements.
+  ShowClauseImpl? _showClause;
+
   /// The type parameters for the extension, or `null` if the extension does not
   /// have any type parameters.
   TypeParameterListImpl? _typeParameters;
@@ -3713,6 +3733,8 @@
       this._typeParameters,
       this.onKeyword,
       this._extendedType,
+      this._showClause,
+      this._hideClause,
       this.leftBracket,
       List<ClassMember> members,
       this.rightBracket)
@@ -3756,6 +3778,13 @@
   Token get firstTokenAfterCommentAndMetadata => extensionKeyword;
 
   @override
+  HideClauseImpl? get hideClause => _hideClause;
+
+  set hideClause(HideClause? hideClause) {
+    _hideClause = _becomeParentOf(hideClause as HideClauseImpl?);
+  }
+
+  @override
   NodeListImpl<ClassMember> get members => _members;
 
   @override
@@ -3766,6 +3795,13 @@
   }
 
   @override
+  ShowClauseImpl? get showClause => _showClause;
+
+  set showClause(ShowClause? showClause) {
+    _showClause = _becomeParentOf(showClause as ShowClauseImpl?);
+  }
+
+  @override
   TypeParameterListImpl? get typeParameters => _typeParameters;
 
   set typeParameters(TypeParameterList? typeParameters) {
@@ -5457,6 +5493,46 @@
   }
 }
 
+/// The "hide" clause in an extension declaration.
+///
+///    hideClause ::=
+///        'hide' [TypeName] (',' [TypeName])*
+class HideClauseImpl extends AstNodeImpl implements HideClause {
+  /// The token representing the 'hide' keyword.
+  @override
+  Token hideKeyword;
+
+  /// The elements that are being shown.
+  final NodeListImpl<ShowHideClauseElement> _elements = NodeListImpl._();
+
+  /// Initialize a newly created show clause.
+  HideClauseImpl(this.hideKeyword, List<ShowHideClauseElement> elements) {
+    _elements._initialize(this, elements);
+  }
+
+  @override
+  Token get beginToken => hideKeyword;
+
+  @override
+  Iterable<SyntacticEntity> get childEntities => ChildEntities()
+    ..add(hideKeyword)
+    ..addAll(elements);
+
+  @override
+  NodeListImpl<ShowHideClauseElement> get elements => _elements;
+
+  @override
+  Token get endToken => _elements.endToken!;
+
+  @override
+  E? accept<E>(AstVisitor<E> visitor) => visitor.visitHideClause(this);
+
+  @override
+  void visitChildren(AstVisitor visitor) {
+    _elements.accept(visitor);
+  }
+}
+
 /// A combinator that restricts the names being imported to those that are not
 /// in a given list.
 ///
@@ -5692,10 +5768,10 @@
   Token implementsKeyword;
 
   /// The interfaces that are being implemented.
-  final NodeListImpl<TypeName> _interfaces = NodeListImpl._();
+  final NodeListImpl<NamedType> _interfaces = NodeListImpl._();
 
   /// Initialize a newly created implements clause.
-  ImplementsClauseImpl(this.implementsKeyword, List<TypeName> interfaces) {
+  ImplementsClauseImpl(this.implementsKeyword, List<NamedType> interfaces) {
     _interfaces._initialize(this, interfaces);
   }
 
@@ -5706,13 +5782,17 @@
   // TODO(paulberry): add commas.
   Iterable<SyntacticEntity> get childEntities => ChildEntities()
     ..add(implementsKeyword)
-    ..addAll(interfaces);
+    ..addAll(interfaces2);
 
   @override
   Token get endToken => _interfaces.endToken!;
 
+  @Deprecated('Use interfaces2 instead')
   @override
-  NodeListImpl<TypeName> get interfaces => _interfaces;
+  NodeList<TypeName> get interfaces => _DelegatingTypeNameList(_interfaces);
+
+  @override
+  NodeListImpl<NamedType> get interfaces2 => _interfaces;
 
   @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitImplementsClause(this);
@@ -7758,10 +7838,10 @@
   Token onKeyword;
 
   /// The classes are super-class constraints for the mixin.
-  final NodeListImpl<TypeName> _superclassConstraints = NodeListImpl._();
+  final NodeListImpl<NamedType> _superclassConstraints = NodeListImpl._();
 
   /// Initialize a newly created on clause.
-  OnClauseImpl(this.onKeyword, List<TypeName> superclassConstraints) {
+  OnClauseImpl(this.onKeyword, List<NamedType> superclassConstraints) {
     _superclassConstraints._initialize(this, superclassConstraints);
   }
 
@@ -7772,13 +7852,18 @@
   // TODO(paulberry): add commas.
   Iterable<SyntacticEntity> get childEntities => ChildEntities()
     ..add(onKeyword)
-    ..addAll(superclassConstraints);
+    ..addAll(superclassConstraints2);
 
   @override
   Token get endToken => _superclassConstraints.endToken!;
 
+  @Deprecated('Use superclassConstraints2 instead')
   @override
-  NodeListImpl<TypeName> get superclassConstraints => _superclassConstraints;
+  NodeList<TypeName> get superclassConstraints =>
+      _DelegatingTypeNameList(_superclassConstraints);
+
+  @override
+  NodeListImpl<NamedType> get superclassConstraints2 => _superclassConstraints;
 
   @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitOnClause(this);
@@ -8620,6 +8705,46 @@
   }
 }
 
+/// The "show" clause in an extension declaration.
+///
+///    showClause ::=
+///        'show' [TypeName] (',' [TypeName])*
+class ShowClauseImpl extends AstNodeImpl implements ShowClause {
+  /// The token representing the 'show' keyword.
+  @override
+  Token showKeyword;
+
+  /// The elements that are being shown.
+  final NodeListImpl<ShowHideClauseElement> _elements = NodeListImpl._();
+
+  /// Initialize a newly created show clause.
+  ShowClauseImpl(this.showKeyword, List<ShowHideClauseElement> elements) {
+    _elements._initialize(this, elements);
+  }
+
+  @override
+  Token get beginToken => showKeyword;
+
+  @override
+  Iterable<SyntacticEntity> get childEntities => ChildEntities()
+    ..add(showKeyword)
+    ..addAll(elements);
+
+  @override
+  NodeListImpl<ShowHideClauseElement> get elements => _elements;
+
+  @override
+  Token get endToken => _elements.endToken!;
+
+  @override
+  E? accept<E>(AstVisitor<E> visitor) => visitor.visitShowClause(this);
+
+  @override
+  void visitChildren(AstVisitor visitor) {
+    _elements.accept(visitor);
+  }
+}
+
 /// A combinator that restricts the names being imported to those in a given
 /// list.
 ///
@@ -8657,6 +8782,45 @@
   }
 }
 
+/// A potentially non-type element of a show or a hide clause.
+///
+///    showHideElement ::=
+///        'get' [SimpleIdentifier] |
+///        'set' [SimpleIdentifier] |
+///        'operator' [SimpleIdentifier] |
+///        [SimpleIdentifier]
+///
+/// Clients may not extend, implement or mix-in this class.
+class ShowHideElementImpl extends AstNodeImpl implements ShowHideElement {
+  @override
+  Token? modifier;
+
+  @override
+  SimpleIdentifier name;
+
+  ShowHideElementImpl(this.modifier, this.name) {
+    _becomeParentOf<SimpleIdentifierImpl>(name as SimpleIdentifierImpl);
+  }
+
+  @override
+  Token get beginToken => modifier ?? name.beginToken;
+
+  @override
+  Iterable<SyntacticEntity> get childEntities =>
+      ChildEntities()..addAll([if (modifier != null) modifier!, name]);
+
+  @override
+  Token get endToken => name.endToken;
+
+  @override
+  E? accept<E>(AstVisitor<E> visitor) => visitor.visitShowHideElement(this);
+
+  @override
+  void visitChildren(AstVisitor visitor) {
+    name.accept(visitor);
+  }
+}
+
 /// A simple formal parameter.
 ///
 ///    simpleFormalParameter ::=
@@ -8779,6 +8943,16 @@
   /// Initialize a newly created identifier.
   SimpleIdentifierImpl(this.token);
 
+  /// Return the cascade that contains this [SimpleIdentifier].
+  CascadeExpressionImpl? get ancestorCascade {
+    var operatorType = token.previous?.type;
+    if (operatorType == TokenType.PERIOD_PERIOD ||
+        operatorType == TokenType.QUESTION_PERIOD_PERIOD) {
+      return thisOrAncestorOfType<CascadeExpressionImpl>();
+    }
+    return null;
+  }
+
   @override
   Token get beginToken => token;
 
@@ -8817,7 +8991,7 @@
   /// This element is set when this identifier is used not as an expression,
   /// but just to reference some element.
   ///
-  /// Examples are the name of the type in a [TypeName], the name of the method
+  /// Examples are the name of the type in a [NamedType], the name of the method
   /// in a [MethodInvocation], the name of the constructor in a
   /// [ConstructorName], the name of the property in a [PropertyAccess], the
   /// prefix and the identifier in a [PrefixedIdentifier] (which then can be
@@ -10048,20 +10222,25 @@
   }
 
   @override
-  Token get beginToken => typeName.beginToken;
+  Token get beginToken => _typeName.beginToken;
 
   @override
-  Iterable<SyntacticEntity> get childEntities => ChildEntities()..add(typeName);
+  Iterable<SyntacticEntity> get childEntities =>
+      ChildEntities()..add(_typeName);
 
   @override
-  Token get endToken => typeName.endToken;
+  Token get endToken => _typeName.endToken;
 
   @override
-  Precedence get precedence => typeName.typeArguments == null
-      ? typeName.name.precedence
+  Precedence get precedence => _typeName.typeArguments == null
+      ? _typeName.name.precedence
       : Precedence.postfix;
 
   @override
+  TypeNameImpl get type => _typeName;
+
+  @Deprecated('Use namedType instead')
+  @override
   TypeNameImpl get typeName => _typeName;
 
   set typeName(TypeNameImpl value) {
@@ -10073,7 +10252,7 @@
 
   @override
   void visitChildren(AstVisitor visitor) {
-    typeName.accept(visitor);
+    _typeName.accept(visitor);
   }
 }
 
@@ -10081,6 +10260,7 @@
 ///
 ///    typeName ::=
 ///        [Identifier] typeArguments? '?'?
+/// ignore: deprecated_member_use_from_same_package
 class TypeNameImpl extends TypeAnnotationImpl implements TypeName {
   /// The name of the type.
   IdentifierImpl _name;
@@ -10143,7 +10323,7 @@
   }
 
   @override
-  E? accept<E>(AstVisitor<E> visitor) => visitor.visitTypeName(this);
+  E? accept<E>(AstVisitor<E> visitor) => visitor.visitNamedType(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -10710,10 +10890,10 @@
   Token withKeyword;
 
   /// The names of the mixins that were specified.
-  final NodeListImpl<TypeName> _mixinTypes = NodeListImpl._();
+  final NodeListImpl<NamedType> _mixinTypes = NodeListImpl._();
 
   /// Initialize a newly created with clause.
-  WithClauseImpl(this.withKeyword, List<TypeName> mixinTypes) {
+  WithClauseImpl(this.withKeyword, List<NamedType> mixinTypes) {
     _mixinTypes._initialize(this, mixinTypes);
   }
 
@@ -10729,8 +10909,12 @@
   @override
   Token get endToken => _mixinTypes.endToken!;
 
+  @Deprecated('Use mixinTypes2 instead')
   @override
-  NodeListImpl<TypeName> get mixinTypes => _mixinTypes;
+  NodeList<TypeName> get mixinTypes => _DelegatingTypeNameList(_mixinTypes);
+
+  @override
+  NodeListImpl<NamedType> get mixinTypes2 => _mixinTypes;
 
   @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitWithClause(this);
@@ -10801,6 +10985,77 @@
   }
 }
 
+/// Implementation of `NodeList<TypeName>` that delegates.
+@Deprecated('Use NamedType instead')
+class _DelegatingTypeNameList
+    with ListMixin<TypeName>
+    implements NodeList<TypeName> {
+  final NodeListImpl<NamedType> _delegate;
+
+  _DelegatingTypeNameList(this._delegate);
+
+  @override
+  Token? get beginToken {
+    return _delegate.beginToken;
+  }
+
+  @override
+  Token? get endToken {
+    return _delegate.endToken;
+  }
+
+  @override
+  int get length => _delegate.length;
+
+  @override
+  set length(int newLength) {
+    _delegate.length = newLength;
+  }
+
+  @override
+  AstNodeImpl get owner => _delegate.owner;
+
+  @override
+  TypeName operator [](int index) {
+    return _delegate[index] as TypeName;
+  }
+
+  @override
+  void operator []=(int index, TypeName node) {
+    _delegate[index] = node;
+  }
+
+  @override
+  void accept(AstVisitor visitor) {
+    _delegate.accept(visitor);
+  }
+
+  @override
+  void add(NamedType node) {
+    _delegate.add(node);
+  }
+
+  @override
+  void addAll(Iterable<TypeName> nodes) {
+    _delegate.addAll(nodes);
+  }
+
+  @override
+  void clear() {
+    _delegate.clear();
+  }
+
+  @override
+  void insert(int index, TypeName node) {
+    _delegate.insert(index, node);
+  }
+
+  @override
+  TypeName removeAt(int index) {
+    return _delegate.removeAt(index) as TypeName;
+  }
+}
+
 /// An indication of the resolved kind of a [SetOrMapLiteral].
 enum _SetOrMapKind {
   /// Indicates that the literal represents a map.
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index bc7287e..e12111d 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -185,7 +185,7 @@
           TypeParameterList? typeParameters,
           Token equals,
           Token? abstractKeyword,
-          TypeName superclass,
+          NamedType superclass,
           WithClause withClause,
           ImplementsClause? implementsClause,
           Token semicolon) =>
@@ -296,7 +296,7 @@
 
   @override
   ConstructorNameImpl constructorName(
-          TypeName type, Token? period, SimpleIdentifier? name) =>
+          NamedType type, Token? period, SimpleIdentifier? name) =>
       ConstructorNameImpl(
           type as TypeNameImpl, period, name as SimpleIdentifierImpl?);
 
@@ -433,7 +433,7 @@
       ExpressionStatementImpl(expression as ExpressionImpl, semicolon);
 
   @override
-  ExtendsClauseImpl extendsClause(Token extendsKeyword, TypeName superclass) =>
+  ExtendsClauseImpl extendsClause(Token extendsKeyword, NamedType superclass) =>
       ExtendsClauseImpl(extendsKeyword, superclass as TypeNameImpl);
 
   @override
@@ -446,6 +446,8 @@
           TypeParameterList? typeParameters,
           required Token onKeyword,
           required TypeAnnotation extendedType,
+          ShowClause? showClause,
+          HideClause? hideClause,
           required Token leftBracket,
           required List<ClassMember> members,
           required Token rightBracket}) =>
@@ -458,6 +460,8 @@
           typeParameters as TypeParameterListImpl?,
           onKeyword,
           extendedType as TypeAnnotationImpl,
+          showClause as ShowClauseImpl?,
+          hideClause as HideClauseImpl?,
           leftBracket,
           members,
           rightBracket);
@@ -730,6 +734,12 @@
           semicolon);
 
   @override
+  HideClauseImpl hideClause(
+          {required Token hideKeyword,
+          required List<ShowHideClauseElement> elements}) =>
+      HideClauseImpl(hideKeyword, elements);
+
+  @override
   HideCombinatorImpl hideCombinator(
           Token keyword, List<SimpleIdentifier> hiddenNames) =>
       HideCombinatorImpl(keyword, hiddenNames);
@@ -772,7 +782,7 @@
 
   @override
   ImplementsClauseImpl implementsClause(
-          Token implementsKeyword, List<TypeName> interfaces) =>
+          Token implementsKeyword, List<NamedType> interfaces) =>
       ImplementsClauseImpl(implementsKeyword, interfaces);
 
   @override
@@ -970,6 +980,16 @@
       NamedExpressionImpl(name as LabelImpl, expression as ExpressionImpl);
 
   @override
+  TypeNameImpl namedType({
+    required Identifier name,
+    TypeArgumentList? typeArguments,
+    Token? question,
+  }) =>
+      TypeNameImpl(
+          name as IdentifierImpl, typeArguments as TypeArgumentListImpl?,
+          question: question);
+
+  @override
   NativeClauseImpl nativeClause(Token nativeKeyword, StringLiteral? name) =>
       NativeClauseImpl(nativeKeyword, name as StringLiteralImpl?);
 
@@ -988,7 +1008,7 @@
 
   @override
   OnClauseImpl onClause(
-          Token onKeyword, List<TypeName> superclassConstraints) =>
+          Token onKeyword, List<NamedType> superclassConstraints) =>
       OnClauseImpl(onKeyword, superclassConstraints);
 
   @override
@@ -1077,11 +1097,22 @@
           leftBracket, elements, rightBracket);
 
   @override
+  ShowClauseImpl showClause(
+          {required Token showKeyword,
+          required List<ShowHideClauseElement> elements}) =>
+      ShowClauseImpl(showKeyword, elements);
+
+  @override
   ShowCombinatorImpl showCombinator(
           Token keyword, List<SimpleIdentifier> shownNames) =>
       ShowCombinatorImpl(keyword, shownNames);
 
   @override
+  ShowHideElementImpl showHideElement(
+          {required Token? modifier, required SimpleIdentifier name}) =>
+      ShowHideElementImpl(modifier, name);
+
+  @override
   SimpleFormalParameterImpl simpleFormalParameter2(
           {Comment? comment,
           List<Annotation>? metadata,
@@ -1210,9 +1241,10 @@
       TypeArgumentListImpl(leftBracket, arguments, rightBracket);
 
   @override
-  TypeLiteralImpl typeLiteral({required TypeName typeName}) =>
+  TypeLiteralImpl typeLiteral({required NamedType typeName}) =>
       TypeLiteralImpl(typeName as TypeNameImpl);
 
+  @Deprecated('Use namedType() instead')
   @override
   TypeNameImpl typeName(Identifier name, TypeArgumentList? typeArguments,
           {Token? question}) =>
@@ -1295,7 +1327,7 @@
           condition as ExpressionImpl, rightParenthesis, body as StatementImpl);
 
   @override
-  WithClauseImpl withClause(Token withKeyword, List<TypeName> mixinTypes) =>
+  WithClauseImpl withClause(Token withKeyword, List<NamedType> mixinTypes) =>
       WithClauseImpl(withKeyword, mixinTypes);
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/ast/extensions.dart b/pkg/analyzer/lib/src/dart/ast/extensions.dart
index 6ca554a..3df0bb6 100644
--- a/pkg/analyzer/lib/src/dart/ast/extensions.dart
+++ b/pkg/analyzer/lib/src/dart/ast/extensions.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/element/element.dart';
 
 /// TODO(scheglov) https://github.com/dart-lang/sdk/issues/43608
 Element? _readElement(AstNode node) {
@@ -92,13 +91,6 @@
   }
 }
 
-extension FieldDeclarationExtension on FieldDeclaration {
-  /// Return the element of the first field.
-  FieldElementImpl get firstElement {
-    return fields.variables.first.declaredElement as FieldElementImpl;
-  }
-}
-
 extension FormalParameterExtension on FormalParameter {
   bool get isOfLocalFunction {
     return thisOrAncestorOfType<FunctionBody>() != null;
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 b5929ae..b912645 100644
--- a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
@@ -172,7 +172,7 @@
     _visitNode(node.name);
     _visitNode(node.typeParameters);
     sink.write(' = ');
-    _visitNode(node.superclass);
+    _visitNode(node.superclass2);
     _visitNode(node.withClause, prefix: ' ');
     _visitNode(node.implementsClause, prefix: ' ');
     sink.write(';');
@@ -237,7 +237,7 @@
 
   @override
   void visitConstructorName(ConstructorName node) {
-    _visitNode(node.type);
+    _visitNode(node.type2);
     _visitNode(node.name, prefix: '.');
   }
 
@@ -264,11 +264,12 @@
   @override
   void visitDefaultFormalParameter(DefaultFormalParameter node) {
     _visitNode(node.parameter);
-    if (node.separator != null) {
-      if (node.separator!.lexeme != ':') {
+    var separator = node.separator;
+    if (separator != null) {
+      if (separator.lexeme != ':') {
         sink.write(' ');
       }
-      sink.write(node.separator!.lexeme);
+      sink.write(separator.lexeme);
       _visitNode(node.defaultValue, prefix: ' ');
     }
   }
@@ -354,7 +355,7 @@
   @override
   void visitExtendsClause(ExtendsClause node) {
     sink.write('extends ');
-    _visitNode(node.superclass);
+    _visitNode(node.superclass2);
   }
 
   @override
@@ -368,6 +369,8 @@
     _visitToken(node.onKeyword);
     sink.write(' ');
     _visitNode(node.extendedType, suffix: ' ');
+    _visitNode(node.showClause, suffix: ' ');
+    _visitNode(node.hideClause, suffix: ' ');
     _visitToken(node.leftBracket);
     _visitNodeList(node.members, separator: ' ');
     _visitToken(node.rightBracket);
@@ -565,6 +568,12 @@
   }
 
   @override
+  void visitHideClause(HideClause node) {
+    sink.write('hide ');
+    _visitNodeList(node.elements, separator: ', ');
+  }
+
+  @override
   void visitHideCombinator(HideCombinator node) {
     sink.write('hide ');
     _visitNodeList(node.hiddenNames, separator: ', ');
@@ -591,7 +600,7 @@
   @override
   void visitImplementsClause(ImplementsClause node) {
     sink.write('implements ');
-    _visitNodeList(node.interfaces, separator: ', ');
+    _visitNodeList(node.interfaces2, separator: ', ');
   }
 
   @override
@@ -720,14 +729,8 @@
 
   @override
   void visitMethodInvocation(MethodInvocation node) {
-    if (node.isCascaded) {
-      sink.write(node.operator!.lexeme);
-    } else {
-      if (node.target != null) {
-        node.target!.accept(this);
-        sink.write(node.operator!.lexeme);
-      }
-    }
+    _visitNode(node.target);
+    _visitToken(node.operator);
     _visitNode(node.methodName);
     _visitNode(node.typeArguments);
     _visitNode(node.argumentList);
@@ -753,6 +756,15 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _visitNode(node.name);
+    _visitNode(node.typeArguments);
+    if (node.question != null) {
+      sink.write('?');
+    }
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     sink.write('native ');
     _visitNode(node.name);
@@ -773,7 +785,7 @@
   @override
   void visitOnClause(OnClause node) {
     sink.write('on ');
-    _visitNodeList(node.superclassConstraints, separator: ', ');
+    _visitNodeList(node.superclassConstraints2, separator: ', ');
   }
 
   @override
@@ -870,12 +882,24 @@
   }
 
   @override
+  void visitShowClause(ShowClause node) {
+    sink.write('show ');
+    _visitNodeList(node.elements, separator: ', ');
+  }
+
+  @override
   void visitShowCombinator(ShowCombinator node) {
     sink.write('show ');
     _visitNodeList(node.shownNames, separator: ', ');
   }
 
   @override
+  void visitShowHideElement(ShowHideElement node) {
+    _visitToken(node.modifier, suffix: ' ');
+    _visitNode(node.name);
+  }
+
+  @override
   void visitSimpleFormalParameter(SimpleFormalParameter node) {
     _visitNodeList(node.metadata, separator: ' ', suffix: ' ');
     _visitToken(node.requiredKeyword, suffix: ' ');
@@ -992,16 +1016,13 @@
 
   @override
   void visitTypeLiteral(TypeLiteral node) {
-    _visitNode(node.typeName);
+    _visitNode(node.type);
   }
 
+  @Deprecated('Override visitNamedType instead')
   @override
   void visitTypeName(TypeName node) {
-    _visitNode(node.name);
-    _visitNode(node.typeArguments);
-    if (node.question != null) {
-      sink.write('?');
-    }
+    throw StateError('Should not be invoked');
   }
 
   @override
@@ -1057,7 +1078,7 @@
   @override
   void visitWithClause(WithClause node) {
     sink.write('with ');
-    _visitNodeList(node.mixinTypes, separator: ', ');
+    _visitNodeList(node.mixinTypes2, separator: ', ');
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index a40e33a..0a2871d 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/to_source_visitor.dart';
+import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
 
 export 'package:analyzer/src/dart/ast/constant_evaluator.dart';
@@ -255,7 +256,7 @@
         isEqualNodes(node.typeParameters, other.typeParameters) &&
         isEqualTokens(node.equals, other.equals) &&
         isEqualTokens(node.abstractKeyword, other.abstractKeyword) &&
-        isEqualNodes(node.superclass, other.superclass) &&
+        isEqualNodes(node.superclass2, other.superclass2) &&
         isEqualNodes(node.withClause, other.withClause) &&
         isEqualNodes(node.implementsClause, other.implementsClause) &&
         isEqualTokens(node.semicolon, other.semicolon);
@@ -338,7 +339,7 @@
   @override
   bool visitConstructorName(ConstructorName node) {
     ConstructorName other = _other as ConstructorName;
-    return isEqualNodes(node.type, other.type) &&
+    return isEqualNodes(node.type2, other.type2) &&
         isEqualTokens(node.period, other.period) &&
         isEqualNodes(node.name, other.name);
   }
@@ -467,7 +468,7 @@
   bool visitExtendsClause(ExtendsClause node) {
     ExtendsClause other = _other as ExtendsClause;
     return isEqualTokens(node.extendsKeyword, other.extendsKeyword) &&
-        isEqualNodes(node.superclass, other.superclass);
+        isEqualNodes(node.superclass2, other.superclass2);
   }
 
   @override
@@ -677,6 +678,13 @@
   }
 
   @override
+  bool visitHideClause(HideClause node) {
+    HideClause other = _other as HideClause;
+    return isEqualTokens(node.hideKeyword, other.hideKeyword) &&
+        _isEqualNodeLists(node.elements, other.elements);
+  }
+
+  @override
   bool visitHideCombinator(HideCombinator node) {
     HideCombinator other = _other as HideCombinator;
     return isEqualTokens(node.keyword, other.keyword) &&
@@ -711,7 +719,7 @@
   bool visitImplementsClause(ImplementsClause node) {
     ImplementsClause other = _other as ImplementsClause;
     return isEqualTokens(node.implementsKeyword, other.implementsKeyword) &&
-        _isEqualNodeLists(node.interfaces, other.interfaces);
+        _isEqualNodeLists(node.interfaces2, other.interfaces2);
   }
 
   @override
@@ -876,6 +884,14 @@
   }
 
   @override
+  bool? visitNamedType(NamedType node) {
+    NamedType other = _other as NamedType;
+    return isEqualNodes(node.name, other.name) &&
+        isEqualNodes(node.typeArguments, other.typeArguments) &&
+        isEqualTokens(node.question, other.question);
+  }
+
+  @override
   bool visitNativeClause(NativeClause node) {
     NativeClause other = _other as NativeClause;
     return isEqualTokens(node.nativeKeyword, other.nativeKeyword) &&
@@ -901,7 +917,7 @@
     OnClause other = _other as OnClause;
     return isEqualTokens(node.onKeyword, other.onKeyword) &&
         _isEqualNodeLists(
-            node.superclassConstraints, other.superclassConstraints);
+            node.superclassConstraints2, other.superclassConstraints2);
   }
 
   @override
@@ -1007,6 +1023,13 @@
   }
 
   @override
+  bool visitShowClause(ShowClause node) {
+    ShowClause other = _other as ShowClause;
+    return isEqualTokens(node.showKeyword, other.showKeyword) &&
+        _isEqualNodeLists(node.elements, other.elements);
+  }
+
+  @override
   bool visitShowCombinator(ShowCombinator node) {
     ShowCombinator other = _other as ShowCombinator;
     return isEqualTokens(node.keyword, other.keyword) &&
@@ -1014,6 +1037,13 @@
   }
 
   @override
+  bool visitShowHideElement(ShowHideElement node) {
+    ShowHideElement other = _other as ShowHideElement;
+    return isEqualTokens(node.modifier, other.modifier) &&
+        isEqualNodes(node.name, other.name);
+  }
+
+  @override
   bool visitSimpleFormalParameter(SimpleFormalParameter node) {
     SimpleFormalParameter other = _other as SimpleFormalParameter;
     return isEqualNodes(
@@ -1148,15 +1178,13 @@
   @override
   bool visitTypeLiteral(TypeLiteral node) {
     TypeLiteral other = _other as TypeLiteral;
-    return isEqualNodes(node.typeName, other.typeName);
+    return isEqualNodes(node.type, other.type);
   }
 
+  @Deprecated('Override visitNamedType instead')
   @override
   bool visitTypeName(TypeName node) {
-    TypeName other = _other as TypeName;
-    return isEqualNodes(node.name, other.name) &&
-        isEqualNodes(node.typeArguments, other.typeArguments) &&
-        isEqualTokens(node.question, other.question);
+    throw StateError('Should not be invoked');
   }
 
   @override
@@ -1225,7 +1253,7 @@
   bool visitWithClause(WithClause node) {
     WithClause other = _other as WithClause;
     return isEqualTokens(node.withKeyword, other.withKeyword) &&
-        _isEqualNodeLists(node.mixinTypes, other.mixinTypes);
+        _isEqualNodeLists(node.mixinTypes2, other.mixinTypes2);
   }
 
   @override
@@ -1738,8 +1766,8 @@
     } else if (identical(node.typeParameters, _oldNode)) {
       node.typeParameters = _newNode as TypeParameterList;
       return true;
-    } else if (identical(node.superclass, _oldNode)) {
-      node.superclass = _newNode as TypeName;
+    } else if (identical(node.superclass2, _oldNode)) {
+      node.superclass = _newNode as NamedType;
       return true;
     } else if (identical(node.withClause, _oldNode)) {
       node.withClause = _newNode as WithClause;
@@ -1849,8 +1877,8 @@
 
   @override
   bool visitConstructorName(covariant ConstructorNameImpl node) {
-    if (identical(node.type, _oldNode)) {
-      node.type = _newNode as TypeName;
+    if (identical(node.type2, _oldNode)) {
+      node.type = _newNode as NamedType;
       return true;
     } else if (identical(node.name, _oldNode)) {
       node.name = _newNode as SimpleIdentifier;
@@ -1896,6 +1924,12 @@
       return true;
     } else if (identical(node.defaultValue, _oldNode)) {
       node.defaultValue = _newNode as Expression;
+      var parameterElement = node.declaredElement;
+      if (parameterElement is DefaultParameterElementImpl) {
+        parameterElement.constantInitializer = _newNode as Expression;
+      } else if (parameterElement is DefaultFieldFormalParameterElementImpl) {
+        parameterElement.constantInitializer = _newNode as Expression;
+      }
       return true;
     }
     return visitNode(node);
@@ -1975,8 +2009,8 @@
 
   @override
   bool visitExtendsClause(covariant ExtendsClauseImpl node) {
-    if (identical(node.superclass, _oldNode)) {
-      node.superclass = _newNode as TypeName;
+    if (identical(node.superclass2, _oldNode)) {
+      node.superclass = _newNode as NamedType;
       return true;
     }
     return visitNode(node);
@@ -2257,6 +2291,14 @@
   }
 
   @override
+  bool visitHideClause(covariant HideClauseImpl node) {
+    if (_replaceInList(node.elements)) {
+      return true;
+    }
+    return visitNode(node);
+  }
+
+  @override
   bool visitHideCombinator(covariant HideCombinatorImpl node) {
     if (_replaceInList(node.hiddenNames)) {
       return true;
@@ -2296,7 +2338,7 @@
 
   @override
   bool visitImplementsClause(covariant ImplementsClauseImpl node) {
-    if (_replaceInList(node.interfaces)) {
+    if (_replaceInList(node.interfaces2)) {
       return true;
     }
     return visitNode(node);
@@ -2491,6 +2533,18 @@
     return visitNode(node);
   }
 
+  @override
+  bool? visitNamedType(covariant TypeNameImpl node) {
+    if (identical(node.name, _oldNode)) {
+      node.name = _newNode as Identifier;
+      return true;
+    } else if (identical(node.typeArguments, _oldNode)) {
+      node.typeArguments = _newNode as TypeArgumentList;
+      return true;
+    }
+    return visitNode(node);
+  }
+
   bool visitNamespaceDirective(covariant NamespaceDirectiveImpl node) {
     if (_replaceInList(node.combinators)) {
       return true;
@@ -2538,7 +2592,7 @@
 
   @override
   bool visitOnClause(covariant OnClauseImpl node) {
-    if (_replaceInList(node.superclassConstraints)) {
+    if (_replaceInList(node.superclassConstraints2)) {
       return true;
     }
     return visitNode(node);
@@ -2646,6 +2700,14 @@
   }
 
   @override
+  bool visitShowClause(covariant ShowClauseImpl node) {
+    if (_replaceInList(node.elements)) {
+      return true;
+    }
+    return visitNode(node);
+  }
+
+  @override
   bool visitShowCombinator(covariant ShowCombinatorImpl node) {
     if (_replaceInList(node.shownNames)) {
       return true;
@@ -2654,6 +2716,15 @@
   }
 
   @override
+  bool visitShowHideElement(covariant ShowHideElementImpl node) {
+    if (identical(node.name, _oldNode)) {
+      node.name = _newNode as SimpleIdentifier;
+      return true;
+    }
+    return visitNode(node);
+  }
+
+  @override
   bool visitSimpleFormalParameter(covariant SimpleFormalParameterImpl node) {
     if (identical(node.type, _oldNode)) {
       node.type = _newNode as TypeAnnotation;
@@ -2792,7 +2863,7 @@
 
   @override
   bool visitTypeLiteral(covariant TypeLiteralImpl node) {
-    if (identical(node.typeName, _oldNode)) {
+    if (identical(node.type, _oldNode)) {
       node.typeName = _newNode as TypeNameImpl;
       return true;
     }
@@ -2801,14 +2872,7 @@
 
   @override
   bool visitTypeName(covariant TypeNameImpl node) {
-    if (identical(node.name, _oldNode)) {
-      node.name = _newNode as Identifier;
-      return true;
-    } else if (identical(node.typeArguments, _oldNode)) {
-      node.typeArguments = _newNode as TypeArgumentList;
-      return true;
-    }
-    return visitNode(node);
+    throw StateError('Should not be invoked');
   }
 
   @override
@@ -2847,6 +2911,9 @@
     } else if (identical(node.initializer, _oldNode)) {
       node.initializer = _newNode as Expression;
       return true;
+      // TODO(srawlins) also replace node's declared element's
+      // `constantInitializer`, if the element is [ConstFieldElementImpl],
+      // [ConstLocalVariableElementImpl], or [ConstTopLevelVariableElementImpl].
     }
     return visitAnnotatedNode(node);
   }
@@ -2887,7 +2954,7 @@
 
   @override
   bool visitWithClause(covariant WithClauseImpl node) {
-    if (_replaceInList(node.mixinTypes)) {
+    if (_replaceInList(node.mixinTypes2)) {
       return true;
     }
     return visitNode(node);
@@ -2902,7 +2969,7 @@
     return visitNode(node);
   }
 
-  bool _replaceInList(NodeListImpl list) {
+  bool _replaceInList(NodeList list) {
     int count = list.length;
     for (int i = 0; i < count; i++) {
       if (identical(_oldNode, list[i])) {
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index c2d09bb..4a5e452 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -73,8 +73,6 @@
               _currentLibrary.featureSet.isEnabled(Feature.non_nullable),
         );
 
-  bool get _isNonNullableByDefault => _currentLibrary.isNonNullableByDefault;
-
   @override
   void visitAnnotation(Annotation node) {
     super.visitAnnotation(node);
@@ -114,16 +112,53 @@
   }
 
   @override
+  void visitConstructorReference(ConstructorReference node) {
+    super.visitConstructorReference(node);
+    if (node.inConstantContext || node.inConstantExpression) {
+      _checkForConstWithTypeParameters(node.constructorName.type2,
+          CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF);
+    }
+  }
+
+  @override
   void visitFunctionExpression(FunctionExpression node) {
     super.visitFunctionExpression(node);
     _validateDefaultValues(node.parameters);
   }
 
   @override
+  void visitFunctionReference(FunctionReference node) {
+    super.visitFunctionReference(node);
+    if (node.inConstantContext || node.inConstantExpression) {
+      var typeArguments = node.typeArguments;
+      if (typeArguments == null) {
+        return;
+      }
+      for (var typeArgument in typeArguments.arguments) {
+        _checkForConstWithTypeParameters(typeArgument,
+            CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF);
+      }
+    }
+  }
+
+  @override
+  void visitGenericFunctionType(GenericFunctionType node) {
+    // TODO(srawlins): Also check interface types (TypeName?).
+    super.visitGenericFunctionType(node);
+    var parent = node.parent;
+    if ((parent is AsExpression || parent is IsExpression) &&
+        (parent as Expression).inConstantContext) {
+      _checkForConstWithTypeParameters(
+          node, CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS);
+    }
+  }
+
+  @override
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
     if (node.isConst) {
-      TypeName typeName = node.constructorName.type;
-      _checkForConstWithTypeParameters(typeName);
+      NamedType namedType = node.constructorName.type2;
+      _checkForConstWithTypeParameters(
+          namedType, CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS);
 
       node.argumentList.accept(this);
 
@@ -222,7 +257,7 @@
 
   @override
   void visitSwitchStatement(SwitchStatement node) {
-    if (_isNonNullableByDefault) {
+    if (_currentLibrary.isNonNullableByDefault) {
       _validateSwitchStatement_nullSafety(node);
     } else {
       _validateSwitchStatement_legacy(node);
@@ -261,23 +296,44 @@
   /// Verify that the given [type] does not reference any type parameters.
   ///
   /// See [CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS].
-  void _checkForConstWithTypeParameters(TypeAnnotation type) {
-    // something wrong with AST
-    if (type is! TypeName) {
-      return;
-    }
-    TypeName typeName = type;
-    Identifier name = typeName.name;
-    // should not be a type parameter
-    if (name.staticElement is TypeParameterElement) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, name);
-    }
-    // check type arguments
-    var typeArguments = typeName.typeArguments;
-    if (typeArguments != null) {
-      for (TypeAnnotation argument in typeArguments.arguments) {
-        _checkForConstWithTypeParameters(argument);
+  void _checkForConstWithTypeParameters(
+      TypeAnnotation type, ErrorCode errorCode) {
+    if (type is NamedType) {
+      Identifier name = type.name;
+      // Should not be a type parameter.
+      if (name.staticElement is TypeParameterElement) {
+        _errorReporter.reportErrorForNode(errorCode, name);
+      }
+      // Check type arguments.
+      var typeArguments = type.typeArguments;
+      if (typeArguments != null) {
+        for (TypeAnnotation argument in typeArguments.arguments) {
+          _checkForConstWithTypeParameters(argument, errorCode);
+        }
+      }
+    } else if (type is GenericFunctionType) {
+      var returnType = type.returnType;
+      if (returnType != null) {
+        _checkForConstWithTypeParameters(returnType, errorCode);
+      }
+      for (var parameter in type.parameters.parameters) {
+        // [parameter] cannot be a [DefaultFormalParameter], a
+        // [FieldFormalParameter], nor a [FunctionTypedFormalParameter].
+        if (parameter is SimpleFormalParameter) {
+          var parameterType = parameter.type;
+          if (parameterType != null) {
+            _checkForConstWithTypeParameters(parameterType, errorCode);
+          }
+        }
+      }
+      var typeParameters = type.typeParameters;
+      if (typeParameters != null) {
+        for (var typeParameter in typeParameters.typeParameters) {
+          var bound = typeParameter.bound;
+          if (bound != null) {
+            _checkForConstWithTypeParameters(bound, errorCode);
+          }
+        }
       }
     }
   }
@@ -366,7 +422,7 @@
   void _reportNotPotentialConstants(AstNode node) {
     var notPotentiallyConstants = getNotPotentiallyConstants(
       node,
-      isNonNullableByDefault: _isNonNullableByDefault,
+      featureSet: _currentLibrary.featureSet,
     );
     if (notPotentiallyConstants.isEmpty) return;
 
@@ -389,7 +445,7 @@
   /// Check if the object [obj] matches the type [type] according to runtime
   /// type checking rules.
   bool _runtimeTypeMatch(DartObjectImpl obj, DartType type) {
-    return _evaluationEngine.runtimeTypeMatch(_currentLibrary, obj, type);
+    return _currentLibrary.typeSystem.runtimeTypeMatch(obj, type);
   }
 
   /// Validate that the given expression is a compile time constant. Return the
@@ -426,8 +482,7 @@
         _reportErrorIfFromDeferredLibrary(
             realArgument,
             CompileTimeErrorCode
-                .INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
-            [realArgument]);
+                .INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY);
       }
     }
   }
@@ -488,13 +543,10 @@
     }
   }
 
-  /// Validates that the expressions of any field initializers in the class
-  /// declaration are all compile time constants. Since this is only required if
-  /// the class has a constant constructor, the error is reported at the
-  /// constructor site.
-  ///
-  /// @param classDeclaration the class which should be validated
-  /// @param errorSite the site at which errors should be reported.
+  /// Validates that the expressions of any field initializers in
+  /// [classDeclaration] are all compile-time constants. Since this is only
+  /// required if the class has a constant constructor, the error is reported at
+  /// [constKeyword], the const keyword on such a constant constructor.
   void _validateFieldInitializers(
       ClassOrMixinDeclaration classDeclaration, Token constKeyword) {
     NodeList<ClassMember> members = classDeclaration.members;
@@ -719,7 +771,7 @@
   bool _reportNotPotentialConstants(AstNode node) {
     var notPotentiallyConstants = getNotPotentiallyConstants(
       node,
-      isNonNullableByDefault: verifier._isNonNullableByDefault,
+      featureSet: verifier._currentLibrary.featureSet,
     );
     if (notPotentiallyConstants.isEmpty) return true;
 
@@ -991,3 +1043,44 @@
     required this.elementType,
   });
 }
+
+extension on Expression {
+  /// Returns whether `this` is found in a constant expression.
+  ///
+  /// This does not check whether `this` is found in a constant context.
+  bool get inConstantExpression {
+    AstNode child = this;
+    var parent = child.parent;
+    while (parent != null) {
+      if (parent is DefaultFormalParameter && child == parent.defaultValue) {
+        // A parameter default value does not constitute a constant context, but
+        // must be a constant expression.
+        return true;
+      } else if (parent is VariableDeclaration && child == parent.initializer) {
+        var declarationList = parent.parent;
+        if (declarationList is VariableDeclarationList) {
+          var declarationListParent = declarationList.parent;
+          if (declarationListParent is FieldDeclaration &&
+              !declarationListParent.isStatic) {
+            var container = declarationListParent.parent;
+            if (container is ClassOrMixinDeclaration) {
+              var enclosingClass = container.declaredElement;
+              if (enclosingClass != null) {
+                // A field initializer of a class with at least one generative
+                // const constructor does not constitute a constant context, but
+                // must be a constant expression.
+                return enclosingClass.constructors
+                    .any((c) => c.isConst && !c.isFactory);
+              }
+            }
+          }
+        }
+        return false;
+      } else {
+        child = parent;
+        parent = child.parent;
+      }
+    }
+    return false;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index af1fa6f..70f5d10 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -30,32 +30,6 @@
 /// Helper class encapsulating the methods for evaluating constants and
 /// constant instance creation expressions.
 class ConstantEvaluationEngine {
-  /// Parameter to "fromEnvironment" methods that denotes the default value.
-  static const String _DEFAULT_VALUE_PARAM = "defaultValue";
-
-  /// Source of RegExp matching declarable operator names.
-  /// From sdk/lib/internal/symbol.dart.
-  static const String _OPERATOR_RE =
-      "(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)";
-
-  /// Source of RegExp matching Dart reserved words.
-  /// From sdk/lib/internal/symbol.dart.
-  static const String _RESERVED_WORD_RE =
-      "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|"
-      "d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|"
-      "i[fns]|n(?:ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|"
-      "r(?:ue|y))|v(?:ar|oid)|w(?:hile|ith))";
-
-  /// Source of RegExp matching any public identifier.
-  /// From sdk/lib/internal/symbol.dart.
-  static const String _PUBLIC_IDENTIFIER_RE =
-      "(?!$_RESERVED_WORD_RE\\b(?!\\\$))[a-zA-Z\$][\\w\$]*";
-
-  /// RegExp that validates a non-empty non-private symbol.
-  /// From sdk/lib/internal/symbol.dart.
-  static final RegExp _PUBLIC_SYMBOL_PATTERN = RegExp(
-      "^(?:$_OPERATOR_RE\$|$_PUBLIC_IDENTIFIER_RE(?:=?\$|[.](?!\$)))+?\$");
-
   /// The set of variables declared on the command line using '-D'.
   final DeclaredVariables _declaredVariables;
 
@@ -72,76 +46,6 @@
   })  : _declaredVariables = declaredVariables,
         _isNonNullableByDefault = isNonNullableByDefault;
 
-  /// Check that the arguments to a call to fromEnvironment() are correct. The
-  /// [arguments] are the AST nodes of the arguments. The [argumentValues] are
-  /// the values of the unnamed arguments. The [namedArgumentValues] are the
-  /// values of the named arguments. The [expectedDefaultValueType] is the
-  /// allowed type of the "defaultValue" parameter (if present). Note:
-  /// "defaultValue" is always allowed to be null. Return `true` if the
-  /// arguments are correct, `false` if there is an error.
-  bool checkFromEnvironmentArguments(
-      LibraryElementImpl library,
-      List<Expression> arguments,
-      List<DartObjectImpl?> argumentValues,
-      Map<String, DartObjectImpl> namedArgumentValues,
-      InterfaceType expectedDefaultValueType) {
-    int argumentCount = arguments.length;
-    if (argumentCount < 1 || argumentCount > 2) {
-      return false;
-    }
-    if (arguments[0] is NamedExpression) {
-      return false;
-    }
-    if (argumentValues[0]!.type != library.typeProvider.stringType) {
-      return false;
-    }
-    if (argumentCount == 2) {
-      Expression secondArgument = arguments[1];
-      if (secondArgument is NamedExpression) {
-        if (!(secondArgument.name.label.name == _DEFAULT_VALUE_PARAM)) {
-          return false;
-        }
-        var defaultValueType = namedArgumentValues[_DEFAULT_VALUE_PARAM]!.type;
-        if (!(defaultValueType == expectedDefaultValueType ||
-            defaultValueType == library.typeProvider.nullType)) {
-          return false;
-        }
-      } else {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /// Check that the arguments to a call to Symbol() are correct. The
-  /// [arguments] are the AST nodes of the arguments. The [argumentValues] are
-  /// the values of the unnamed arguments. The [namedArgumentValues] are the
-  /// values of the named arguments. Return `true` if the arguments are correct,
-  /// `false` if there is an error.
-  bool checkSymbolArguments(
-      LibraryElementImpl library,
-      List<Expression> arguments,
-      List<DartObjectImpl?> argumentValues,
-      Map<String, DartObjectImpl> namedArgumentValues) {
-    if (arguments.length != 1) {
-      return false;
-    }
-    if (arguments[0] is NamedExpression) {
-      return false;
-    }
-    if (argumentValues[0]!.type != library.typeProvider.stringType) {
-      return false;
-    }
-    var name = argumentValues[0]?.toStringValue();
-    if (name == null) {
-      return false;
-    }
-    if (_isNonNullableByDefault) {
-      return true;
-    }
-    return isValidPublicSymbol(name);
-  }
-
   /// Compute the constant value associated with the given [constant].
   void computeConstantValue(ConstantEvaluationTarget constant) {
     if (constant is Element) {
@@ -186,7 +90,7 @@
         // of the final field will be checked later, when the constructor is
         // invoked).
         if (dartObject != null && constant.isConst) {
-          if (!runtimeTypeMatch(library, dartObject, constant.type)) {
+          if (!library.typeSystem.runtimeTypeMatch(dartObject, constant.type)) {
             // TODO(brianwilkerson) This should not be reported if
             //  CompileTimeErrorCode.INVALID_ASSIGNMENT has already been
             //  reported (that is, if the static types are also wrong).
@@ -366,387 +270,17 @@
   }
 
   DartObjectImpl? evaluateConstructorCall(
-      LibraryElementImpl library,
-      AstNode node,
-      List<Expression> arguments,
-      ConstructorElement constructor,
-      ConstantVisitor constantVisitor,
-      ErrorReporter errorReporter,
-      {ConstructorInvocation? invocation}) {
-    if (!constructor.isConst) {
-      if (node is InstanceCreationExpression && node.keyword != null) {
-        errorReporter.reportErrorForToken(
-            CompileTimeErrorCode.CONST_WITH_NON_CONST, node.keyword!);
-      } else {
-        errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.CONST_WITH_NON_CONST, node);
-      }
-      return null;
-    }
-
-    if (!(constructor.declaration as ConstructorElementImpl).isCycleFree) {
-      // It's not safe to evaluate this constructor, so bail out.
-      // TODO(paulberry): ensure that a reasonable error message is produced
-      // in this case, as well as other cases involving constant expression
-      // circularities (e.g. "compile-time constant expression depends on
-      // itself")
-      return DartObjectImpl.validWithUnknownValue(
-        library.typeSystem,
-        constructor.returnType,
-      );
-    }
-
-    int argumentCount = arguments.length;
-    var argumentValues = List<DartObjectImpl?>.filled(argumentCount, null);
-    Map<String, NamedExpression>? namedNodes;
-    Map<String, DartObjectImpl>? namedValues;
-    for (int i = 0; i < argumentCount; i++) {
-      Expression argument = arguments[i];
-      if (argument is NamedExpression) {
-        namedNodes ??= HashMap<String, NamedExpression>();
-        namedValues ??= HashMap<String, DartObjectImpl>();
-        String name = argument.name.label.name;
-        namedNodes[name] = argument;
-        namedValues[name] = constantVisitor._valueOf(argument.expression);
-      } else {
-        var argumentValue = constantVisitor._valueOf(argument);
-        argumentValues[i] = argumentValue;
-      }
-    }
-    namedNodes ??= const {};
-    namedValues ??= const {};
-
-    invocation ??= ConstructorInvocation(
-      constructor,
-      argumentValues,
-      namedValues,
-    );
-
-    constructor = followConstantRedirectionChain(constructor);
-    InterfaceType definingType = 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
-      // that we can emulate.
-      ClassElement definingClass = constructor.enclosingElement;
-      if (constructor.name == "fromEnvironment") {
-        if (!checkFromEnvironmentArguments(
-            library, arguments, argumentValues, namedValues, definingType)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          return null;
-        }
-        String? variableName =
-            argumentCount < 1 ? null : argumentValues[0]?.toStringValue();
-        if (definingClass == library.typeProvider.boolElement) {
-          return FromEnvironmentEvaluator(
-            library.typeSystem,
-            _declaredVariables,
-          ).getBool2(variableName, namedValues, constructor);
-        } else if (definingClass == library.typeProvider.intElement) {
-          return FromEnvironmentEvaluator(
-            library.typeSystem,
-            _declaredVariables,
-          ).getInt2(variableName, namedValues, constructor);
-        } else if (definingClass == library.typeProvider.stringElement) {
-          return FromEnvironmentEvaluator(
-            library.typeSystem,
-            _declaredVariables,
-          ).getString2(variableName, namedValues, constructor);
-        }
-      } else if (constructor.name == 'hasEnvironment' &&
-          definingClass == library.typeProvider.boolElement) {
-        var name =
-            argumentCount < 1 ? null : argumentValues[0]?.toStringValue();
-        return FromEnvironmentEvaluator(
-          library.typeSystem,
-          _declaredVariables,
-        ).hasEnvironment(name);
-      } else if (constructor.name == "" &&
-          definingClass == library.typeProvider.symbolElement &&
-          argumentCount == 1) {
-        if (!checkSymbolArguments(
-            library, arguments, argumentValues, namedValues)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          return null;
-        }
-        var argumentValue = argumentValues[0]?.toStringValue();
-        return DartObjectImpl(
-          library.typeSystem,
-          definingType,
-          SymbolState(argumentValue),
-        );
-      }
-      // Either it's an external const factory constructor that we can't
-      // emulate, or an error occurred (a cycle, or a const constructor trying
-      // to delegate to a non-const constructor).
-      // In the former case, the best we can do is consider it an unknown value.
-      // In the latter case, the error has already been reported, so considering
-      // it an unknown value will suppress further errors.
-      return DartObjectImpl.validWithUnknownValue(
-        library.typeSystem,
-        definingType,
-      );
-    }
-
-    var fieldMap = HashMap<String, DartObjectImpl>();
-
-    // The errors reported while computing values for field initializers, or
-    // default values for the constructor parameters, cannot be reported
-    // into the current ErrorReporter, because they usually happen in a
-    // different source. But they still should cause a constant evaluation
-    // error for the current node.
-    var externalErrorListener = BooleanErrorListener();
-    var externalErrorReporter = ErrorReporter(
-      externalErrorListener,
-      constructor.source,
-      isNonNullableByDefault: library.isNonNullableByDefault,
-    );
-
-    // Start with final fields that are initialized at their declaration site.
-    List<FieldElement> fields = constructor.enclosingElement.fields;
-    for (int i = 0; i < fields.length; i++) {
-      FieldElement field = fields[i];
-      if ((field.isFinal || field.isConst) &&
-          !field.isStatic &&
-          field is ConstFieldElementImpl) {
-        var fieldValue = field.evaluationResult?.value;
-
-        // It is possible that the evaluation result is null.
-        // This happens for example when we have duplicate fields.
-        // class Test {final x = 1; final x = 2; const Test();}
-        if (fieldValue == null) {
-          continue;
-        }
-        // Match the value and the type.
-        DartType fieldType =
-            FieldMember.from(field, constructor.returnType).type;
-        if (!runtimeTypeMatch(library, fieldValue, fieldType)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-              node,
-              [fieldValue.type, field.name, fieldType]);
-        }
-        fieldMap[field.name] = fieldValue;
-      }
-    }
-    // Now evaluate the constructor declaration.
-    Map<String, DartObjectImpl> parameterMap =
-        HashMap<String, DartObjectImpl>();
-    List<ParameterElement> parameters = constructor.parameters;
-    int parameterCount = parameters.length;
-
-    for (int i = 0; i < parameterCount; i++) {
-      ParameterElement parameter = parameters[i];
-      ParameterElement baseParameter = parameter.declaration;
-      DartObjectImpl? argumentValue;
-      AstNode? errorTarget;
-      if (baseParameter.isNamed) {
-        argumentValue = namedValues[baseParameter.name];
-        errorTarget = namedNodes[baseParameter.name];
-      } else if (i < argumentCount) {
-        argumentValue = argumentValues[i];
-        errorTarget = arguments[i];
-      }
-      // No argument node that we can direct error messages to, because we
-      // are handling an optional parameter that wasn't specified.  So just
-      // direct error messages to the constructor call.
-      errorTarget ??= node;
-      if (argumentValue == null && baseParameter is ParameterElementImpl) {
-        // The parameter is an optional positional parameter for which no value
-        // was provided, so use the default value.
-        var evaluationResult = baseParameter.evaluationResult;
-        if (evaluationResult == null) {
-          // No default was provided, so the default value is null.
-          argumentValue = _nullObject(library);
-        } else if (evaluationResult.value != null) {
-          argumentValue = evaluationResult.value;
-        }
-      }
-      if (argumentValue != null) {
-        if (!runtimeTypeMatch(library, argumentValue, parameter.type)) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-              errorTarget,
-              [argumentValue.type, parameter.type]);
-        }
-        if (baseParameter.isInitializingFormal) {
-          var field = (parameter as FieldFormalParameterElement).field;
-          if (field != null) {
-            DartType fieldType = field.type;
-            if (fieldType != parameter.type) {
-              // We've already checked that the argument can be assigned to the
-              // parameter; we also need to check that it can be assigned to
-              // the field.
-              if (!runtimeTypeMatch(library, argumentValue, fieldType)) {
-                errorReporter.reportErrorForNode(
-                    CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-                    errorTarget,
-                    [argumentValue.type, fieldType]);
-              }
-            }
-            String fieldName = field.name;
-            if (fieldMap.containsKey(fieldName)) {
-              errorReporter.reportErrorForNode(
-                  CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-            }
-            fieldMap[fieldName] = argumentValue;
-          }
-        }
-        String name = baseParameter.name;
-        parameterMap[name] = argumentValue;
-      }
-    }
-    ConstantVisitor initializerVisitor = ConstantVisitor(
-      this,
-      constructor.library as LibraryElementImpl,
-      externalErrorReporter,
-      lexicalEnvironment: parameterMap,
-      substitution: Substitution.fromInterfaceType(definingType),
-    );
-    var constructorBase = constructor.declaration as ConstructorElementImpl;
-    var initializers = constructorBase.constantInitializers;
-    String? superName;
-    NodeList<Expression>? superArguments;
-    for (var i = 0; i < initializers.length; i++) {
-      var initializer = initializers[i];
-      if (initializer is ConstructorFieldInitializer) {
-        Expression initializerExpression = initializer.expression;
-        var evaluationResult = initializerExpression.accept(initializerVisitor);
-        if (evaluationResult != null) {
-          String fieldName = initializer.fieldName.name;
-          if (fieldMap.containsKey(fieldName)) {
-            errorReporter.reportErrorForNode(
-                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          }
-          fieldMap[fieldName] = evaluationResult;
-          var getter = definingType.getGetter(fieldName);
-          if (getter != null) {
-            PropertyInducingElement field = getter.variable;
-            if (!runtimeTypeMatch(library, evaluationResult, field.type)) {
-              errorReporter.reportErrorForNode(
-                  CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-                  node,
-                  [evaluationResult.type, fieldName, field.type]);
-            }
-          }
-        } else {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-        }
-      } else if (initializer is SuperConstructorInvocation) {
-        var name = initializer.constructorName;
-        if (name != null) {
-          superName = name.name;
-        }
-        superArguments = initializer.argumentList.arguments;
-      } else if (initializer is RedirectingConstructorInvocation) {
-        // This is a redirecting constructor, so just evaluate the constructor
-        // it redirects to.
-        var constructor = initializer.staticElement;
-        if (constructor != null && constructor.isConst) {
-          // Instantiate the constructor with the in-scope type arguments.
-          constructor = ConstructorMember.from(constructor, definingType);
-
-          var result = evaluateConstructorCall(
-              library,
-              node,
-              initializer.argumentList.arguments,
-              constructor,
-              initializerVisitor,
-              externalErrorReporter,
-              invocation: invocation);
-          if (externalErrorListener.errorReported) {
-            errorReporter.reportErrorForNode(
-                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          }
-          return result;
-        }
-      } else if (initializer is AssertInitializer) {
-        var condition = initializer.condition;
-        var evaluationResult = condition.accept(initializerVisitor);
-        if (evaluationResult == null ||
-            !evaluationResult.isBool ||
-            evaluationResult.toBoolValue() == false) {
-          errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-          return null;
-        }
-      }
-    }
-    // Evaluate explicit or implicit call to super().
-    var superclass = definingType.superclass;
-    if (superclass != null && !superclass.isDartCoreObject) {
-      var superConstructor =
-          superclass.lookUpConstructor(superName, constructor.library);
-      if (superConstructor != null) {
-        superArguments ??= astFactory.nodeList<Expression>(node);
-
-        if (constructor is ConstructorMember && constructor.isLegacy) {
-          superConstructor =
-              Member.legacy(superConstructor) as ConstructorElement;
-        }
-
-        evaluateSuperConstructorCall(library, node, fieldMap, superConstructor,
-            superArguments, initializerVisitor, externalErrorReporter);
-      }
-    }
-    if (externalErrorListener.errorReported) {
-      errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
-    }
-    return DartObjectImpl(
-      library.typeSystem,
-      definingType,
-      GenericState(fieldMap, invocation: invocation),
-    );
-  }
-
-  void evaluateSuperConstructorCall(
-      LibraryElementImpl library,
-      AstNode node,
-      Map<String, DartObjectImpl> fieldMap,
-      ConstructorElement? superConstructor,
-      List<Expression> superArguments,
-      ConstantVisitor initializerVisitor,
-      ErrorReporter errorReporter) {
-    if (superConstructor != null && superConstructor.isConst) {
-      var evaluationResult = evaluateConstructorCall(library, node,
-          superArguments, superConstructor, initializerVisitor, errorReporter);
-      if (evaluationResult != null) {
-        fieldMap[GenericState.SUPERCLASS_FIELD] = evaluationResult;
-      }
-    }
-  }
-
-  /// Attempt to follow the chain of factory redirections until a constructor is
-  /// reached which is not a const factory constructor. Return the constant
-  /// constructor which terminates the chain of factory redirections, if the
-  /// chain terminates. If there is a problem (e.g. a redirection can't be
-  /// found, or a cycle is encountered), the chain will be followed as far as
-  /// possible and then a const factory constructor will be returned.
-  ConstructorElement followConstantRedirectionChain(
-      ConstructorElement constructor) {
-    var constructorsVisited = <ConstructorElement>{};
-    while (true) {
-      var redirectedConstructor = getConstRedirectedConstructor(constructor);
-      if (redirectedConstructor == null) {
-        break;
-      } else {
-        var constructorBase = constructor.declaration;
-        constructorsVisited.add(constructorBase);
-        var redirectedConstructorBase = redirectedConstructor.declaration;
-        if (constructorsVisited.contains(redirectedConstructorBase)) {
-          // Cycle in redirecting factory constructors--this is not allowed
-          // and is checked elsewhere--see
-          // [ErrorVerifier.checkForRecursiveFactoryRedirect()]).
-          break;
-        }
-      }
-      constructor = redirectedConstructor;
-    }
-    return constructor;
+    LibraryElementImpl library,
+    AstNode node,
+    List<Expression> arguments,
+    ConstructorElement constructor,
+    ConstantVisitor constantVisitor,
+    ErrorReporter errorReporter, {
+    ConstructorInvocation? invocation,
+  }) {
+    return _InstanceCreationEvaluator.evaluate(this, _declaredVariables,
+        errorReporter, library, node, constructor, arguments, constantVisitor,
+        isNullSafe: _isNonNullableByDefault, invocation: invocation);
   }
 
   /// Generate an error indicating that the given [constant] is not a valid
@@ -786,7 +320,7 @@
 
   /// If [constructor] redirects to another const constructor, return the
   /// const constructor it redirects to.  Otherwise return `null`.
-  ConstructorElement? getConstRedirectedConstructor(
+  static ConstructorElement? getConstRedirectedConstructor(
       ConstructorElement constructor) {
     if (!constructor.isFactory) {
       return null;
@@ -814,33 +348,13 @@
     return redirectedConstructor;
   }
 
-  /// Check if the object [obj] matches the type [type] according to runtime
-  /// type checking rules.
-  bool runtimeTypeMatch(
-    LibraryElementImpl library,
-    DartObjectImpl obj,
-    DartType type,
-  ) {
-    var typeSystem = library.typeSystem;
-    if (!typeSystem.isNonNullableByDefault) {
-      type = typeSystem.toLegacyType(type);
-    }
-    var objType = obj.type;
-    return typeSystem.isSubtypeOf(objType, type);
-  }
-
-  DartObjectImpl _nullObject(LibraryElementImpl library) {
+  static DartObjectImpl _nullObject(LibraryElementImpl library) {
     return DartObjectImpl(
       library.typeSystem,
       library.typeProvider.nullType,
       NullState.NULL_STATE,
     );
   }
-
-  /// Determine whether the given string is a valid name for a public symbol
-  /// (i.e. whether it is allowed for a call to the Symbol constructor).
-  static bool isValidPublicSymbol(String name) =>
-      name.isEmpty || name == "void" || _PUBLIC_SYMBOL_PATTERN.hasMatch(name);
 }
 
 /// Interface for [AnalysisTarget]s for which constant evaluation can be
@@ -943,7 +457,7 @@
   })  : _lexicalEnvironment = lexicalEnvironment,
         _substitution = substitution {
     _dartObjectComputer = DartObjectComputer(
-      _library.typeSystem,
+      typeSystem,
       _errorReporter,
     );
   }
@@ -1093,7 +607,39 @@
 
   @override
   DartObjectImpl? visitConstructorReference(ConstructorReference node) {
-    return _getConstantValue(node, node.constructorName.staticElement);
+    var constructorTearoffResult = DartObjectImpl(
+      typeSystem,
+      node.typeOrThrow,
+      FunctionState(node.constructorName.staticElement),
+    );
+    var typeArgumentList = node.constructorName.type2.typeArguments;
+    if (typeArgumentList == null) {
+      return constructorTearoffResult;
+    } else {
+      var typeArguments = <DartType>[];
+      for (var typeArgument in typeArgumentList.arguments) {
+        var object = typeArgument.accept(this);
+        if (object == null) {
+          return null;
+        }
+        var typeArgumentType = object.toTypeValue();
+        if (typeArgumentType == null) {
+          return null;
+        }
+        // TODO(srawlins): Test type alias types (`typedef i = int`) used as
+        // type arguments. Possibly change implementation based on
+        // canonicalization rules.
+        typeArguments.add(typeArgumentType);
+      }
+      // The result is already instantiated during resolution;
+      // [_dartObjectComputer.typeInstantiate] is unnecessary.
+      return DartObjectImpl(
+        typeSystem,
+        node.typeOrThrow,
+        FunctionState(node.constructorName.staticElement,
+            typeArguments: typeArguments),
+      );
+    }
   }
 
   @override
@@ -1106,6 +652,44 @@
   }
 
   @override
+  DartObjectImpl? visitFunctionReference(FunctionReference node) {
+    var functionResult = node.function.accept(this);
+    if (functionResult == null) {
+      return functionResult;
+    }
+    var typeArgumentList = node.typeArguments;
+    if (typeArgumentList == null) {
+      return functionResult;
+    } else {
+      var typeArguments = <DartType>[];
+      for (var typeArgument in typeArgumentList.arguments) {
+        var object = typeArgument.accept(this);
+        if (object == null) {
+          return null;
+        }
+        var typeArgumentType = object.toTypeValue();
+        if (typeArgumentType == null) {
+          return null;
+        }
+        // TODO(srawlins): Test type alias types (`typedef i = int`) used as
+        // type arguments. Possibly change implementation based on
+        // canonicalization rules.
+        typeArguments.add(typeArgumentType);
+      }
+      return _dartObjectComputer.typeInstantiate(functionResult, typeArguments);
+    }
+  }
+
+  @override
+  DartObjectImpl visitGenericFunctionType(GenericFunctionType node) {
+    return DartObjectImpl(
+      typeSystem,
+      _typeProvider.typeType,
+      TypeState(node.type),
+    );
+  }
+
+  @override
   DartObjectImpl? visitInstanceCreationExpression(
       InstanceCreationExpression node) {
     if (!node.isConst) {
@@ -1222,6 +806,29 @@
       node.expression.accept(this);
 
   @override
+  DartObjectImpl? visitNamedType(NamedType node) {
+    var type = node.type;
+
+    if (type == null) {
+      return null;
+    }
+
+    if (!_isNonNullableByDefault && hasTypeParameterReference(type)) {
+      return super.visitNamedType(node);
+    }
+
+    if (_substitution != null) {
+      type = _substitution!.substituteType(type);
+    }
+
+    return DartObjectImpl(
+      typeSystem,
+      _typeProvider.typeType,
+      TypeState(type),
+    );
+  }
+
+  @override
   DartObjectImpl? visitNode(AstNode node) {
     // TODO(https://github.com/dart-lang/sdk/issues/47061): Use a specific
     // error code.
@@ -1231,7 +838,7 @@
 
   @override
   DartObjectImpl visitNullLiteral(NullLiteral node) {
-    return evaluationEngine._nullObject(_library);
+    return ConstantEvaluationEngine._nullObject(_library);
   }
 
   @override
@@ -1361,7 +968,7 @@
   DartObjectImpl? visitSimpleIdentifier(SimpleIdentifier node) {
     var value = _lexicalEnvironment?[node.name];
     if (value != null) {
-      return value;
+      return _instantiateFunctionType(node, value);
     }
 
     return _getConstantValue(node, node.staticElement);
@@ -1410,26 +1017,8 @@
   }
 
   @override
-  DartObjectImpl? visitTypeName(TypeName node) {
-    var type = node.type;
-
-    if (type == null) {
-      return null;
-    }
-
-    if (!_isNonNullableByDefault && hasTypeParameterReference(type)) {
-      return super.visitTypeName(node);
-    }
-
-    if (_substitution != null) {
-      type = _substitution!.substituteType(type);
-    }
-
-    return DartObjectImpl(
-      typeSystem,
-      _typeProvider.typeType,
-      TypeState(type),
-    );
+  DartObjectImpl? visitTypeLiteral(TypeLiteral node) {
+    return node.type.accept(this);
   }
 
   /// Add the entries produced by evaluating the given collection [element] to
@@ -1601,9 +1190,13 @@
       // and errors for other constant expressions. In either case we have
       // already computed values of all dependencies first (or detect a cycle),
       // so the value has already been computed and we can just return it.
-      var value = variableElement.evaluationResult;
-      if (variableElement.isConst && value != null) {
-        return value.value;
+      var result = variableElement.evaluationResult;
+      if (variableElement.isConst && result != null) {
+        var value = result.value;
+        if (value == null) {
+          return value;
+        }
+        return _instantiateFunctionType(node, value);
       }
     } else if (variableElement is ConstructorElement) {
       return DartObjectImpl(
@@ -1641,7 +1234,7 @@
     } else if (variableElement is TypeAliasElement) {
       var type = variableElement.instantiate(
         typeArguments: variableElement.typeParameters
-            .map((t) => _typeProvider.dynamicType)
+            .map((t) => t.bound ?? _typeProvider.dynamicType)
             .toList(),
         nullabilitySuffix: NullabilitySuffix.star,
       );
@@ -1666,6 +1259,33 @@
     return null;
   }
 
+  /// If the type of [value] is a generic [FunctionType], and [node] is a
+  /// [SimpleIdentifier] with tear-off type argument types, returns [value]
+  /// type-instantiated with those [node]'s tear-off type argument types,
+  /// otherwise returns [value].
+  DartObjectImpl? _instantiateFunctionType(
+      Expression node, DartObjectImpl value) {
+    if (node is! SimpleIdentifier) {
+      return value;
+    }
+    var functionElement = value.toFunctionValue();
+    if (functionElement is! ExecutableElement) {
+      return value;
+    }
+    var valueType = functionElement.type;
+    if (valueType.typeFormals.isNotEmpty) {
+      var tearOffTypeArgumentTypes = node.tearOffTypeArgumentTypes;
+      if (tearOffTypeArgumentTypes != null &&
+          tearOffTypeArgumentTypes.isNotEmpty) {
+        var instantiatedType =
+            functionElement.type.instantiate(tearOffTypeArgumentTypes);
+        return value.typeInstantiate(
+            typeSystem, instantiatedType, tearOffTypeArgumentTypes);
+      }
+    }
+    return value;
+  }
+
   /// Return `true` if the given [targetResult] represents a string and the
   /// [identifier] is "length".
   bool _isStringLength(
@@ -1680,7 +1300,7 @@
   void _reportNotPotentialConstants(AstNode node) {
     var notPotentiallyConstants = getNotPotentiallyConstants(
       node,
-      isNonNullableByDefault: _isNonNullableByDefault,
+      featureSet: _library.featureSet,
     );
     if (notPotentiallyConstants.isEmpty) return;
 
@@ -1699,7 +1319,7 @@
     if (expressionValue != null) {
       return expressionValue;
     }
-    return evaluationEngine._nullObject(_library);
+    return ConstantEvaluationEngine._nullObject(_library);
   }
 }
 
@@ -2103,6 +1723,22 @@
     return null;
   }
 
+  DartObjectImpl? typeInstantiate(
+    DartObjectImpl function,
+    List<DartType> typeArguments,
+  ) {
+    var rawType = function.type;
+    if (rawType is FunctionType) {
+      if (typeArguments.length != rawType.typeFormals.length) {
+        return null;
+      }
+      var type = rawType.instantiate(typeArguments);
+      return function.typeInstantiate(_typeSystem, type, typeArguments);
+    } else {
+      return null;
+    }
+  }
+
   DartObjectImpl? typeTest(
       IsExpression node, DartObjectImpl? expression, DartObjectImpl? type) {
     if (expression != null && type != null) {
@@ -2195,3 +1831,632 @@
     return value.toString();
   }
 }
+
+/// The result of evaluation the initializers declared on a const constructor.
+class _InitializersEvaluationResult {
+  /// The result of a const evaluation of an initializer, if one was performed,
+  /// otherwise `null`.
+  ///
+  /// If a redirecting initializer which redirects to a const constructor was
+  /// encountered, [result] is the result of evaluating that call.
+  ///
+  /// If an assert initializer is encountered, and the evaluation of this assert
+  /// results in an error or a `false` value, [result] is `null`.
+  final DartObjectImpl? result;
+
+  /// Whether evaluation of the const instance creation expression which led to
+  /// evaluating constructor initializers is complete.
+  ///
+  /// If `true`, `result` should be used as the result of said const instance
+  /// creation expression evaluation.
+  final bool evaluationIsComplete;
+
+  /// If a superinitializer was encountered, the name of the super constructor,
+  /// otherwise `null`.
+  final String? superName;
+
+  /// If a superinitializer was encountered, the arguments passed to the super
+  /// constructor, otherwise `null`.
+  final NodeList<Expression>? superArguments;
+
+  _InitializersEvaluationResult(
+    this.result, {
+    required this.evaluationIsComplete,
+    this.superName,
+    this.superArguments,
+  });
+}
+
+/// An evaluator which evaluates a const instance creation expression.
+///
+/// [_InstanceCreationEvaluator.evaluate] is the main entrypoint.
+class _InstanceCreationEvaluator {
+  /// Parameter to "fromEnvironment" methods that denotes the default value.
+  static const String _default_value_param = 'defaultValue';
+
+  /// Source of RegExp matching declarable operator names.
+  /// From sdk/lib/internal/symbol.dart.
+  static const String _operator_pattern =
+      "(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)";
+
+  /// Source of RegExp matching any public identifier.
+  /// From sdk/lib/internal/symbol.dart.
+  static const String _public_identifier_pattern =
+      "(?!$_reserved_word_pattern\\b(?!\\\$))[a-zA-Z\$][\\w\$]*";
+
+  /// RegExp that validates a non-empty non-private symbol.
+  /// From sdk/lib/internal/symbol.dart.
+  static final RegExp _public_symbol_pattern =
+      RegExp('^(?:$_operator_pattern\$|'
+          '$_public_identifier_pattern(?:=?\$|[.](?!\$)))+?\$');
+
+  /// Source of RegExp matching Dart reserved words.
+  /// From sdk/lib/internal/symbol.dart.
+  static const String _reserved_word_pattern =
+      "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|"
+      "d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|"
+      "i[fns]|n(?:ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|"
+      "r(?:ue|y))|v(?:ar|oid)|w(?:hile|ith))";
+
+  final ConstantEvaluationEngine _evaluationEngine;
+
+  /// The set of variables declared on the command line using '-D'.
+  final DeclaredVariables _declaredVariables;
+
+  final LibraryElementImpl _library;
+
+  final ErrorReporter _errorReporter;
+
+  final BooleanErrorListener _externalErrorListener = BooleanErrorListener();
+
+  /// An error reporter for errors determined while computing values for field
+  /// initializers, or default values for the constructor parameters.
+  ///
+  /// Such errors cannot be reported into [_errorReporter], because they usually
+  /// happen in a different source. But they still should cause a constant
+  /// evaluation error for the current node.
+  late final ErrorReporter _externalErrorReporter = ErrorReporter(
+    _externalErrorListener,
+    _constructor.source,
+    isNonNullableByDefault: _library.isNonNullableByDefault,
+  );
+
+  late final ConstantVisitor _initializerVisitor = ConstantVisitor(
+    _evaluationEngine,
+    _constructor.library as LibraryElementImpl,
+    _externalErrorReporter,
+    lexicalEnvironment: _parameterMap,
+    substitution: Substitution.fromInterfaceType(definingType),
+  );
+
+  final AstNode _node;
+
+  final ConstructorElement _constructor;
+
+  final ConstructorInvocation _invocation;
+
+  final Map<String, NamedExpression> _namedNodes;
+
+  final Map<String, DartObjectImpl> _namedValues;
+
+  final List<DartObjectImpl> _argumentValues;
+
+  final Map<String, DartObjectImpl> _parameterMap = HashMap();
+
+  final Map<String, DartObjectImpl> _fieldMap = HashMap();
+
+  _InstanceCreationEvaluator.generative(
+    this._evaluationEngine,
+    this._declaredVariables,
+    this._errorReporter,
+    this._library,
+    this._node,
+    this._constructor, {
+    required Map<String, NamedExpression> namedNodes,
+    required Map<String, DartObjectImpl> namedValues,
+    required List<DartObjectImpl> argumentValues,
+    required ConstructorInvocation invocation,
+  })  : _namedNodes = namedNodes,
+        _namedValues = namedValues,
+        _argumentValues = argumentValues,
+        _invocation = invocation;
+
+  InterfaceType get definingType => _constructor.returnType;
+
+  DartObjectImpl? get firstArgument => _argumentValues[0];
+
+  TypeProvider get typeProvider => _library.typeProvider;
+
+  TypeSystemImpl get typeSystem => _library.typeSystem;
+
+  /// Evaluates this constructor call as a factory constructor call.
+  DartObjectImpl? evaluateFactoryConstructorCall(
+    List<Expression> arguments, {
+    required bool isNullSafe,
+  }) {
+    ClassElement definingClass = _constructor.enclosingElement;
+    var argumentCount = arguments.length;
+    if (_constructor.name == "fromEnvironment") {
+      if (!_checkFromEnvironmentArguments(arguments, definingType)) {
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+        return null;
+      }
+      String? variableName =
+          argumentCount < 1 ? null : firstArgument?.toStringValue();
+      if (definingClass == typeProvider.boolElement) {
+        return FromEnvironmentEvaluator(typeSystem, _declaredVariables)
+            .getBool2(variableName, _namedValues, _constructor);
+      } else if (definingClass == typeProvider.intElement) {
+        return FromEnvironmentEvaluator(typeSystem, _declaredVariables)
+            .getInt2(variableName, _namedValues, _constructor);
+      } else if (definingClass == typeProvider.stringElement) {
+        return FromEnvironmentEvaluator(typeSystem, _declaredVariables)
+            .getString2(variableName, _namedValues, _constructor);
+      }
+    } else if (_constructor.name == 'hasEnvironment' &&
+        definingClass == typeProvider.boolElement) {
+      var name = argumentCount < 1 ? null : firstArgument?.toStringValue();
+      return FromEnvironmentEvaluator(typeSystem, _declaredVariables)
+          .hasEnvironment(name);
+    } else if (_constructor.name == "" &&
+        definingClass == typeProvider.symbolElement &&
+        argumentCount == 1) {
+      if (!_checkSymbolArguments(arguments, isNullSafe: isNullSafe)) {
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+        return null;
+      }
+      return DartObjectImpl(
+        typeSystem,
+        definingType,
+        SymbolState(firstArgument?.toStringValue()),
+      );
+    }
+    // Either it's an external const factory constructor that we can't
+    // emulate, or an error occurred (a cycle, or a const constructor trying to
+    // delegate to a non-const constructor).
+    //
+    // In the former case, the best we can do is consider it an unknown value.
+    // In the latter case, the error has already been reported, so considering
+    // it an unknown value will suppress further errors.
+    return DartObjectImpl.validWithUnknownValue(typeSystem, definingType);
+  }
+
+  DartObjectImpl? evaluateGenerativeConstructorCall(
+      List<Expression> arguments) {
+    // Start with final fields that are initialized at their declaration site.
+    _checkFields();
+
+    _checkParameters(arguments);
+    var evaluationResult = _checkInitializers();
+    if (evaluationResult.evaluationIsComplete) {
+      return evaluationResult.result;
+    }
+    _checkSuperConstructorCall(
+        superName: evaluationResult.superName,
+        superArguments: evaluationResult.superArguments);
+    if (_externalErrorListener.errorReported) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+    }
+    return DartObjectImpl(
+      typeSystem,
+      definingType,
+      GenericState(_fieldMap, invocation: _invocation),
+    );
+  }
+
+  void _checkFields() {
+    var fields = _constructor.enclosingElement.fields;
+    for (var i = 0; i < fields.length; i++) {
+      var field = fields[i];
+      if ((field.isFinal || field.isConst) &&
+          !field.isStatic &&
+          field is ConstFieldElementImpl) {
+        var fieldValue = field.evaluationResult?.value;
+
+        // It is possible that the evaluation result is null.
+        // This happens for example when we have duplicate fields.
+        // `class Test {final x = 1; final x = 2; const Test();}`
+        if (fieldValue == null) {
+          continue;
+        }
+        // Match the value and the type.
+        var fieldType = FieldMember.from(field, _constructor.returnType).type;
+        if (!typeSystem.runtimeTypeMatch(fieldValue, fieldType)) {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+              _node,
+              [fieldValue.type, field.name, fieldType]);
+        }
+        _fieldMap[field.name] = fieldValue;
+      }
+    }
+  }
+
+  /// Check that the arguments to a call to `fromEnvironment()` are correct.
+  ///
+  /// The [arguments] are the AST nodes of the arguments. The [argumentValues]
+  /// are the values of the unnamed arguments. The [namedArgumentValues] are the
+  /// values of the named arguments. The [expectedDefaultValueType] is the
+  /// allowed type of the "defaultValue" parameter (if present). Note:
+  /// "defaultValue" is always allowed to be `null`. Return `true` if the
+  /// arguments are correct, `false` otherwise.
+  bool _checkFromEnvironmentArguments(
+    List<Expression> arguments,
+    InterfaceType expectedDefaultValueType,
+  ) {
+    var argumentCount = arguments.length;
+    if (argumentCount < 1 || argumentCount > 2) {
+      return false;
+    }
+    if (arguments[0] is NamedExpression) {
+      return false;
+    }
+    if (firstArgument!.type != typeProvider.stringType) {
+      return false;
+    }
+    if (argumentCount == 2) {
+      var secondArgument = arguments[1];
+      if (secondArgument is NamedExpression) {
+        if (!(secondArgument.name.label.name == _default_value_param)) {
+          return false;
+        }
+        var defaultValueType = _namedValues[_default_value_param]!.type;
+        if (!(defaultValueType == expectedDefaultValueType ||
+            defaultValueType == typeProvider.nullType)) {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  _InitializersEvaluationResult _checkInitializers() {
+    var constructorBase = _constructor.declaration as ConstructorElementImpl;
+    // If we encounter a superinitializer, store the name of the constructor,
+    // and the arguments.
+    String? superName;
+    NodeList<Expression>? superArguments;
+    for (var initializer in constructorBase.constantInitializers) {
+      if (initializer is ConstructorFieldInitializer) {
+        var initializerExpression = initializer.expression;
+        var evaluationResult =
+            initializerExpression.accept(_initializerVisitor);
+        if (evaluationResult != null) {
+          var fieldName = initializer.fieldName.name;
+          if (_fieldMap.containsKey(fieldName)) {
+            _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+          }
+          _fieldMap[fieldName] = evaluationResult;
+          var getter = definingType.getGetter(fieldName);
+          if (getter != null) {
+            var field = getter.variable;
+            if (!typeSystem.runtimeTypeMatch(evaluationResult, field.type)) {
+              _errorReporter.reportErrorForNode(
+                  CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+                  _node,
+                  [evaluationResult.type, fieldName, field.type]);
+            }
+          }
+        } else {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+        }
+      } else if (initializer is SuperConstructorInvocation) {
+        var name = initializer.constructorName;
+        if (name != null) {
+          superName = name.name;
+        }
+        superArguments = initializer.argumentList.arguments;
+      } else if (initializer is RedirectingConstructorInvocation) {
+        // This is a redirecting constructor, so just evaluate the constructor
+        // it redirects to.
+        var constructor = initializer.staticElement;
+        if (constructor != null && constructor.isConst) {
+          // Instantiate the constructor with the in-scope type arguments.
+          constructor = ConstructorMember.from(constructor, definingType);
+          var result = _evaluationEngine.evaluateConstructorCall(
+              _library,
+              _node,
+              initializer.argumentList.arguments,
+              constructor,
+              _initializerVisitor,
+              _externalErrorReporter,
+              invocation: _invocation);
+          if (_externalErrorListener.errorReported) {
+            _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+          }
+          return _InitializersEvaluationResult(result,
+              evaluationIsComplete: true);
+        }
+      } else if (initializer is AssertInitializer) {
+        var condition = initializer.condition;
+        var evaluationResult = condition.accept(_initializerVisitor);
+        if (evaluationResult == null ||
+            !evaluationResult.isBool ||
+            evaluationResult.toBoolValue() == false) {
+          _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+          return _InitializersEvaluationResult(null,
+              evaluationIsComplete: true);
+        }
+      }
+    }
+    return _InitializersEvaluationResult(null,
+        evaluationIsComplete: false,
+        superName: superName,
+        superArguments: superArguments);
+  }
+
+  void _checkParameters(List<Expression> arguments) {
+    var parameters = _constructor.parameters;
+    var parameterCount = parameters.length;
+
+    for (var i = 0; i < parameterCount; i++) {
+      var parameter = parameters[i];
+      var baseParameter = parameter.declaration;
+      DartObjectImpl? argumentValue;
+      AstNode? errorTarget;
+      if (baseParameter.isNamed) {
+        argumentValue = _namedValues[baseParameter.name];
+        errorTarget = _namedNodes[baseParameter.name];
+      } else if (i < arguments.length) {
+        argumentValue = _argumentValues[i];
+        errorTarget = arguments[i];
+      }
+      // No argument node that we can direct error messages to, because we
+      // are handling an optional parameter that wasn't specified.  So just
+      // direct error messages to the constructor call.
+      errorTarget ??= _node;
+      if (argumentValue == null && baseParameter is ParameterElementImpl) {
+        // The parameter is an optional positional parameter for which no value
+        // was provided, so use the default value.
+        var evaluationResult = baseParameter.evaluationResult;
+        if (evaluationResult == null) {
+          // No default was provided, so the default value is null.
+          argumentValue = ConstantEvaluationEngine._nullObject(_library);
+        } else if (evaluationResult.value != null) {
+          argumentValue = evaluationResult.value;
+        }
+      }
+      if (argumentValue != null) {
+        if (!typeSystem.runtimeTypeMatch(argumentValue, parameter.type)) {
+          _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+            errorTarget,
+            [argumentValue.type, parameter.type],
+          );
+        }
+        if (baseParameter.isInitializingFormal) {
+          var field = (parameter as FieldFormalParameterElement).field;
+          if (field != null) {
+            var fieldType = field.type;
+            if (fieldType != parameter.type) {
+              // We've already checked that the argument can be assigned to the
+              // parameter; we also need to check that it can be assigned to
+              // the field.
+              if (!typeSystem.runtimeTypeMatch(argumentValue, fieldType)) {
+                _errorReporter.reportErrorForNode(
+                  CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+                  errorTarget,
+                  [argumentValue.type, fieldType],
+                );
+              }
+            }
+            var fieldName = field.name;
+            if (_fieldMap.containsKey(fieldName)) {
+              _errorReporter.reportErrorForNode(
+                  CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, _node);
+            }
+            _fieldMap[fieldName] = argumentValue;
+          }
+        }
+        _parameterMap[baseParameter.name] = argumentValue;
+      }
+    }
+  }
+
+  /// Checks an explicit or implicit call to `super()`.
+  ///
+  /// If a superinitializer was declared on the constructor declaration,
+  /// [superName] and [superArguments] are the name of the super constructor
+  /// referenced therein, and the arguments passed to the super constructor.
+  /// Otherwise these parameters are `null`.
+  void _checkSuperConstructorCall({
+    required String? superName,
+    required NodeList<Expression>? superArguments,
+  }) {
+    var superclass = definingType.superclass;
+    if (superclass != null && !superclass.isDartCoreObject) {
+      var superConstructor =
+          superclass.lookUpConstructor(superName, _constructor.library);
+      if (superConstructor == null) {
+        return;
+      }
+
+      var constructor = _constructor;
+      if (constructor is ConstructorMember && constructor.isLegacy) {
+        superConstructor =
+            Member.legacy(superConstructor) as ConstructorElement;
+      }
+      if (superConstructor.isConst) {
+        var evaluationResult = _evaluationEngine.evaluateConstructorCall(
+          _library,
+          _node,
+          superArguments ?? astFactory.nodeList(_node),
+          superConstructor,
+          _initializerVisitor,
+          _externalErrorReporter,
+        );
+        if (evaluationResult != null) {
+          _fieldMap[GenericState.SUPERCLASS_FIELD] = evaluationResult;
+        }
+      }
+    }
+  }
+
+  /// Checks that the arguments to a call to [Symbol.new] are correct.
+  ///
+  /// The [arguments] are the AST nodes of the arguments. The [argumentValues]
+  /// are the values of the unnamed arguments. The [namedArgumentValues] are the
+  /// values of the named arguments. Returns `true` if the arguments are
+  /// correct, `false` otherwise.
+  bool _checkSymbolArguments(List<Expression> arguments,
+      {required bool isNullSafe}) {
+    if (arguments.length != 1) {
+      return false;
+    }
+    if (arguments[0] is NamedExpression) {
+      return false;
+    }
+    if (firstArgument!.type != typeProvider.stringType) {
+      return false;
+    }
+    var name = firstArgument?.toStringValue();
+    if (name == null) {
+      return false;
+    }
+    if (isNullSafe) {
+      return true;
+    }
+    return _isValidPublicSymbol(name);
+  }
+
+  /// Evaluates [node] as an instance creation expression using [constructor].
+  static DartObjectImpl? evaluate(
+    ConstantEvaluationEngine evaluationEngine,
+    DeclaredVariables declaredVariables,
+    ErrorReporter errorReporter,
+    LibraryElementImpl library,
+    AstNode node,
+    ConstructorElement constructor,
+    List<Expression> arguments,
+    ConstantVisitor constantVisitor, {
+    required bool isNullSafe,
+    ConstructorInvocation? invocation,
+  }) {
+    if (!constructor.isConst) {
+      if (node is InstanceCreationExpression && node.keyword != null) {
+        errorReporter.reportErrorForToken(
+            CompileTimeErrorCode.CONST_WITH_NON_CONST, node.keyword!);
+      } else {
+        errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_WITH_NON_CONST, node);
+      }
+      return null;
+    }
+
+    if (!(constructor.declaration as ConstructorElementImpl).isCycleFree) {
+      // It's not safe to evaluate this constructor, so bail out.
+      // TODO(paulberry): ensure that a reasonable error message is produced
+      // in this case, as well as other cases involving constant expression
+      // cycles (e.g. "compile-time constant expression depends on itself").
+      return DartObjectImpl.validWithUnknownValue(
+        library.typeSystem,
+        constructor.returnType,
+      );
+    }
+
+    var argumentCount = arguments.length;
+    var argumentValues = <DartObjectImpl>[];
+    var namedNodes = <String, NamedExpression>{};
+    var namedValues = <String, DartObjectImpl>{};
+    for (var i = 0; i < argumentCount; i++) {
+      var argument = arguments[i];
+      if (argument is NamedExpression) {
+        var name = argument.name.label.name;
+        namedNodes[name] = argument;
+        namedValues[name] = constantVisitor._valueOf(argument.expression);
+      } else {
+        argumentValues.add(constantVisitor._valueOf(argument));
+      }
+    }
+
+    invocation ??= ConstructorInvocation(
+      constructor,
+      argumentValues,
+      namedValues,
+    );
+
+    constructor = _followConstantRedirectionChain(constructor);
+
+    var evaluator = _InstanceCreationEvaluator.generative(
+      evaluationEngine,
+      declaredVariables,
+      errorReporter,
+      library,
+      node,
+      constructor,
+      namedNodes: namedNodes,
+      namedValues: namedValues,
+      argumentValues: argumentValues,
+      invocation: invocation,
+    );
+
+    if (constructor.isFactory) {
+      // We couldn't find a non-factory constructor.
+      // See if it's because we reached an external const factory constructor
+      // that we can emulate.
+      return evaluator.evaluateFactoryConstructorCall(arguments,
+          isNullSafe: isNullSafe);
+    } else {
+      return evaluator.evaluateGenerativeConstructorCall(arguments);
+    }
+  }
+
+  /// Attempt to follow the chain of factory redirections until a constructor is
+  /// reached which is not a const factory constructor. Return the constant
+  /// constructor which terminates the chain of factory redirections, if the
+  /// chain terminates. If there is a problem (e.g. a redirection can't be
+  /// found, or a cycle is encountered), the chain will be followed as far as
+  /// possible and then a const factory constructor will be returned.
+  static ConstructorElement _followConstantRedirectionChain(
+      ConstructorElement constructor) {
+    var constructorsVisited = <ConstructorElement>{};
+    while (true) {
+      var redirectedConstructor =
+          ConstantEvaluationEngine.getConstRedirectedConstructor(constructor);
+      if (redirectedConstructor == null) {
+        break;
+      } else {
+        var constructorBase = constructor.declaration;
+        constructorsVisited.add(constructorBase);
+        var redirectedConstructorBase = redirectedConstructor.declaration;
+        if (constructorsVisited.contains(redirectedConstructorBase)) {
+          // Cycle in redirecting factory constructors--this is not allowed
+          // and is checked elsewhere--see
+          // [ErrorVerifier.checkForRecursiveFactoryRedirect()]).
+          break;
+        }
+      }
+      constructor = redirectedConstructor;
+    }
+    return constructor;
+  }
+
+  /// Determine whether the given string is a valid name for a public symbol
+  /// (i.e. whether it is allowed for a call to the Symbol constructor).
+  static bool _isValidPublicSymbol(String name) =>
+      name.isEmpty || name == "void" || _public_symbol_pattern.hasMatch(name);
+}
+
+extension RuntimeExtensions on TypeSystemImpl {
+  /// Returns whether [obj] matches the [type] according to runtime
+  /// type-checking rules.
+  bool runtimeTypeMatch(
+    DartObjectImpl obj,
+    DartType type,
+  ) {
+    if (!isNonNullableByDefault) {
+      type = toLegacyType(type);
+    }
+    var objType = obj.type;
+    return isSubtypeOf(objType, type);
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
index 62c8072..6f0eed7 100644
--- a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
+++ b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -17,10 +18,10 @@
 /// Return the list of nodes that are not potentially constant.
 List<AstNode> getNotPotentiallyConstants(
   AstNode node, {
-  required bool isNonNullableByDefault,
+  required FeatureSet featureSet,
 }) {
   var collector = _Collector(
-    isNonNullableByDefault: isNonNullableByDefault,
+    featureSet: featureSet,
   );
   collector.collect(node);
   return collector.nodes;
@@ -50,10 +51,10 @@
 }
 
 class _Collector {
-  final bool isNonNullableByDefault;
+  final FeatureSet featureSet;
   final List<AstNode> nodes = [];
 
-  _Collector({required this.isNonNullableByDefault});
+  _Collector({required this.featureSet});
 
   void collect(AstNode node) {
     if (node is BooleanLiteral ||
@@ -139,7 +140,7 @@
     }
 
     if (node is AsExpression) {
-      if (isNonNullableByDefault) {
+      if (featureSet.isEnabled(Feature.non_nullable)) {
         if (!isPotentiallyConstantTypeExpression(node.type)) {
           nodes.add(node.type);
         }
@@ -153,7 +154,7 @@
     }
 
     if (node is IsExpression) {
-      if (isNonNullableByDefault) {
+      if (featureSet.isEnabled(Feature.non_nullable)) {
         if (!isPotentiallyConstantTypeExpression(node.type)) {
           nodes.add(node.type);
         }
@@ -243,6 +244,10 @@
     if (element is MethodElement && element.isStatic) {
       return;
     }
+    if (element is TypeParameterElement &&
+        featureSet.isEnabled(Feature.constructor_tearoffs)) {
+      return;
+    }
     nodes.add(node);
   }
 
@@ -348,7 +353,7 @@
   /// Return `true` if the [node] is a constant type expression.
   bool check(TypeAnnotation? node) {
     if (potentially) {
-      if (node is TypeName) {
+      if (node is NamedType) {
         var element = node.name.staticElement;
         if (element is TypeParameterElement) {
           var enclosing = element.enclosingElement;
@@ -357,7 +362,7 @@
       }
     }
 
-    if (node is TypeName) {
+    if (node is NamedType) {
       if (_isConstantTypeName(node.name)) {
         var arguments = node.typeArguments?.arguments;
         if (arguments != null) {
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index 14aa28c..6d3ec97 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -13,7 +13,7 @@
 import 'package:analyzer/src/dart/constant/has_type_parameter_reference.dart';
 import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:meta/meta.dart';
 
 /// The state of an object representing a boolean value.
 class BoolState extends InstanceState {
@@ -184,7 +184,7 @@
   Map<String, DartObjectImpl>? get fields => _state.fields;
 
   @override
-  int get hashCode => JenkinsSmiHash.hash2(type.hashCode, _state.hashCode);
+  int get hashCode => Object.hash(type.hashCode, _state.hashCode);
 
   @override
   bool get hasKnownValue => !_state.isUnknown;
@@ -209,6 +209,9 @@
   /// class.
   bool get isUserDefinedObject => _state is GenericState;
 
+  @visibleForTesting
+  List<DartType>? get typeArguments => (_state as FunctionState)._typeArguments;
+
   @override
   bool operator ==(Object object) {
     if (object is DartObjectImpl) {
@@ -917,6 +920,23 @@
     return null;
   }
 
+  /// Return the result of type-instantiating this object as [type].
+  ///
+  /// [typeArguments] are the type arguments used in the instantiation.
+  DartObjectImpl? typeInstantiate(
+    TypeSystemImpl typeSystem,
+    FunctionType type,
+    List<DartType> typeArguments,
+  ) {
+    var functionState = _state as FunctionState;
+    var element = functionState._element;
+    return DartObjectImpl(
+      typeSystem,
+      type,
+      FunctionState(element, typeArguments: typeArguments),
+    );
+  }
+
   /// Throw an exception if the given [object]'s state does not represent a Type
   /// value.
   void _assertType(DartObjectImpl object) {
@@ -1232,9 +1252,12 @@
   /// The element representing the function being modeled.
   final ExecutableElement? _element;
 
+  final List<DartType>? _typeArguments;
+
   /// Initialize a newly created state to represent the function with the given
   /// [element].
-  FunctionState(this._element);
+  FunctionState(this._element, {List<DartType>? typeArguments})
+      : _typeArguments = typeArguments;
 
   @override
   int get hashCode => _element == null ? 0 : _element.hashCode;
@@ -1243,8 +1266,28 @@
   String get typeName => "Function";
 
   @override
-  bool operator ==(Object object) =>
-      object is FunctionState && (_element == object._element);
+  bool operator ==(Object object) {
+    if (object is! FunctionState) {
+      return false;
+    }
+    if (_element != object._element) {
+      return false;
+    }
+    var typeArguments = _typeArguments;
+    var otherTypeArguments = object._typeArguments;
+    if (typeArguments == null || otherTypeArguments == null) {
+      return typeArguments == null && otherTypeArguments == null;
+    }
+    if (typeArguments.length != otherTypeArguments.length) {
+      return false;
+    }
+    for (var i = 0; i < typeArguments.length; i++) {
+      if (typeArguments[i] != otherTypeArguments[i]) {
+        return false;
+      }
+    }
+    return true;
+  }
 
   @override
   StringState convertToString() {
@@ -1269,7 +1312,32 @@
       if (rightElement == null) {
         return BoolState.UNKNOWN_VALUE;
       }
-      return BoolState.from(_element == rightElement);
+
+      var element = _element;
+      var otherElement = rightOperand._element;
+      var elementsAreEqual = identical(element, otherElement) ||
+          (element != null &&
+              otherElement != null &&
+              otherElement.kind == element.kind &&
+              otherElement.location == element.location);
+      if (!elementsAreEqual) {
+        return BoolState.FALSE_STATE;
+      }
+      var typeArguments = _typeArguments;
+      var otherTypeArguments = rightOperand._typeArguments;
+      if (typeArguments == null || otherTypeArguments == null) {
+        return BoolState.from(
+            typeArguments == null && otherTypeArguments == null);
+      }
+      if (typeArguments.length != otherTypeArguments.length) {
+        return BoolState.FALSE_STATE;
+      }
+      for (var i = 0; i < typeArguments.length; i++) {
+        if (typeArguments[i] != otherTypeArguments[i]) {
+          return BoolState.FALSE_STATE;
+        }
+      }
+      return BoolState.TRUE_STATE;
     }
     return BoolState.FALSE_STATE;
   }
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index edcf6c3..f1b79a3 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
-import 'dart:typed_data';
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/session.dart';
@@ -42,8 +41,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
-import 'package:analyzer/src/macro/impl/error.dart' as macro;
 import 'package:analyzer/src/summary2/ast_binary_tokens.dart';
 import 'package:analyzer/src/summary2/bundle_reader.dart';
 import 'package:analyzer/src/summary2/reference.dart';
@@ -417,7 +414,7 @@
 
 /// An [AbstractClassElementImpl] which is a class.
 class ClassElementImpl extends AbstractClassElementImpl
-    with TypeParameterizedElementMixin, HasMacroExecutionErrors {
+    with TypeParameterizedElementMixin {
   /// The superclass of the class, or `null` for [Object].
   InterfaceType? _supertype;
 
@@ -975,10 +972,6 @@
   @override
   late Source source;
 
-  /// The content of the [source] for which this element model was built.
-  /// Might be `null` if we don't have it (for example in google3 summaries).
-  String? sourceContent;
-
   @override
   LineInfo? lineInfo;
 
@@ -990,22 +983,6 @@
   @override
   late Source librarySource;
 
-  /// If this unit has macro-generated elements, and is created in the
-  /// environment where the file content is available (e.g. interactive
-  /// analysis, and not batch analysis), then this is a combination of the
-  /// user-written code and macro-generated declarations.
-  ///
-  /// For elements created from the user-written code [Element.nameOffset]s
-  /// are offsets in the user-written code.
-  ///
-  /// For macro-generated elements [Element.nameOffset]s are offsets in the
-  /// combined file containing both user-written and generated code.
-  String? macroGeneratedContent;
-
-  /// If this unit has macro-generated elements, information about each one
-  /// is stored here, so that it can be combined to [macroGeneratedContent].
-  List<MacroGenerationData>? macroGenerationDataList;
-
   /// A list containing all of the top-level accessors (getters and setters)
   /// contained in this compilation unit.
   List<PropertyAccessorElement> _accessors = const [];
@@ -1432,7 +1409,7 @@
 /// A concrete implementation of a [ConstructorElement].
 class ConstructorElementImpl extends ExecutableElementImpl
     with ConstructorElementMixin
-    implements ConstructorElement, HasMacroGenerationData {
+    implements ConstructorElement {
   /// The constructor to which this constructor is redirecting.
   ConstructorElement? _redirectedConstructor;
 
@@ -1441,9 +1418,6 @@
   List<ConstructorInitializer> _constantInitializers = const [];
 
   @override
-  MacroGenerationData? macro;
-
-  @override
   int? periodOffset;
 
   @override
@@ -2414,11 +2388,6 @@
   /// children of this element's parent.
   String get identifier => name!;
 
-  /// The informative data, or `null` if the element is synthetic, or if the
-  /// informative data is not available in this environment (e.g. semantics
-  /// only summaries in Bazel).
-  ElementInformativeDataSetImpl? get informative => null;
-
   bool get isNonFunctionTypeAliasesEnabled {
     return library!.featureSet.isEnabled(Feature.nonfunction_type_aliases);
   }
@@ -2635,51 +2604,6 @@
   FunctionType get typeInternal;
 }
 
-/// Informative data about an [ElementImpl].
-class ElementInformativeDataImpl {
-  /// The offset of the beginning of the element's code in the file.
-  final int codeOffset;
-
-  /// The length of the element's code in the file.
-  final int codeLength;
-
-  /// The documentation comment for this element.
-  final String? docComment;
-
-  /// The offset of the name of this element in the file that contains the
-  /// declaration of this element.
-  final int nameOffset;
-
-  ElementInformativeDataImpl({
-    required this.codeOffset,
-    required this.codeLength,
-    required this.docComment,
-    required this.nameOffset,
-  });
-}
-
-/// The set of informative data about an [ElementImpl].
-class ElementInformativeDataSetImpl {
-  /// Informative data in the user-written file.
-  ///
-  /// This property is `null` if the element was macro-generated.
-  final ElementInformativeDataImpl? written;
-
-  /// Informative data in the combined file, which is the user-written file
-  /// augmented with macro-generated declarations.
-  ///
-  /// This property cannot be `null`, because each element is either declared
-  /// by the user directly (so has [written] which is then transformed), or
-  /// is macro-generated, or is synthetic (so we don't have this object
-  /// at all).
-  final ElementInformativeDataImpl combined;
-
-  ElementInformativeDataSetImpl({
-    required this.written,
-    required this.combined,
-  });
-}
-
 /// A concrete implementation of an [ElementLocation].
 class ElementLocationImpl implements ElementLocation {
   /// The character used to separate components in the encoded form.
@@ -2735,14 +2659,7 @@
   }
 
   @override
-  int get hashCode {
-    int result = 0;
-    for (int i = 0; i < _components.length; i++) {
-      String component = _components[i];
-      result = JenkinsSmiHash.combine(result, component.hashCode);
-    }
-    return result;
-  }
+  int get hashCode => Object.hashAll(_components);
 
   @override
   bool operator ==(Object object) {
@@ -3326,7 +3243,6 @@
 
 /// A concrete implementation of a [FieldElement].
 class FieldElementImpl extends PropertyInducingElementImpl
-    with HasMacroExecutionErrors
     implements FieldElement {
   /// True if this field inherits from a covariant parameter. This happens
   /// when it overrides a field in a supertype that is covariant.
@@ -3582,19 +3498,6 @@
   }
 }
 
-mixin HasMacroExecutionErrors {
-  /// The list of errors recorded during execution of macro builders
-  /// over this element.
-  List<macro.MacroExecutionError> macroExecutionErrors = [];
-}
-
-/// This interface is implemented by [Element]s that can be added by macros.
-abstract class HasMacroGenerationData {
-  /// If this element was added by a macro, the code of a declaration that
-  /// was produced by the macro.
-  MacroGenerationData? macro;
-}
-
 /// A concrete implementation of a [HideElementCombinator].
 class HideElementCombinatorImpl implements HideElementCombinator {
   @override
@@ -3735,6 +3638,12 @@
   @override
   final AnalysisSession session;
 
+  /// If `true`, then this library is valid in the session.
+  ///
+  /// A library becomes invalid when one of its files, or one of its
+  /// dependencies, changes.
+  bool isValid = true;
+
   /// The language version for the library.
   LibraryLanguageVersion? _languageVersion;
 
@@ -4273,56 +4182,8 @@
       visitor.visitLocalVariableElement(this);
 }
 
-/// Information about a macro-produced [Element].
-class MacroGenerationData {
-  /// The sequential id of this macro-produced element, for an element created
-  /// for a declaration that was macro-generated later this value is greater.
-  ///
-  /// This is different from [ElementImpl.id], which is also incrementing,
-  /// but shows the order in which elements were built from declarations,
-  /// not the order of declarations, and we process all field declarations
-  /// before method declarations.
-  final int id;
-
-  /// The code that was produced by the macro. It is used to compose full
-  /// code of a unit to display to the user, so that new declarations are
-  /// added to the end of the unit or existing classes.
-  ///
-  /// When a class is generated, its code might have some members, or might
-  /// be empty, and new elements might be macro-generated into it.
-  final String code;
-
-  /// Informative data derived from the [code], such as offsets.
-  final Uint8List informative;
-
-  /// If this element is macro-generated into a class declaration, this is
-  /// the index of this class declaration in the unit.
-  final int? classDeclarationIndex;
-
-  /// The offset in [CompilationUnitElementImpl.macroGeneratedContent],
-  /// where the [code] is located. This offset depends on the informative
-  /// data, as any other offset.
-  late int codeOffset;
-
-  /// Similar to [codeOffset], but the offset of the prefix before [code].
-  late int insertOffset;
-
-  /// The length of the string inserted at [insertOffset]. This string
-  /// consists of the [code] itself, with leading and trailing whitespaces
-  /// and newlines for better formatting.
-  late int insertLength;
-
-  MacroGenerationData({
-    required this.id,
-    required this.code,
-    required this.informative,
-    required this.classDeclarationIndex,
-  });
-}
-
 /// A concrete implementation of a [MethodElement].
-class MethodElementImpl extends ExecutableElementImpl
-    implements MethodElement, HasMacroGenerationData {
+class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
   /// Is `true` if this method is `operator==`, and there is no explicit
   /// type specified for its formal parameter, in this method or in any
   /// overridden methods other than the one declared in `Object`.
@@ -4332,9 +4193,6 @@
   /// this variable is not a subject of type inference, or there was no error.
   TopLevelInferenceError? typeInferenceError;
 
-  @override
-  MacroGenerationData? macro;
-
   /// Initialize a newly created method element to have the given [name] at the
   /// given [offset].
   MethodElementImpl(String name, int offset) : super(name, offset);
@@ -5136,14 +4994,11 @@
 
 /// A concrete implementation of a [PropertyAccessorElement].
 class PropertyAccessorElementImpl extends ExecutableElementImpl
-    implements PropertyAccessorElement, HasMacroGenerationData {
+    implements PropertyAccessorElement {
   /// The variable associated with this accessor.
   @override
   late PropertyInducingElement variable;
 
-  @override
-  MacroGenerationData? macro;
-
   /// Initialize a newly created property accessor element to have the given
   /// [name] and [offset].
   PropertyAccessorElementImpl(String name, int offset) : super(name, offset);
diff --git a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
index f4077d4..06fb704 100644
--- a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
+++ b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
@@ -551,10 +551,10 @@
       return;
     }
     if (errorNode is ConstructorName &&
-        !(errorNode.type.type as InterfaceType).element.hasOptionalTypeArgs) {
+        !(errorNode.type2.type as InterfaceType).element.hasOptionalTypeArgs) {
       String constructorName = errorNode.name == null
-          ? errorNode.type.name.name
-          : '${errorNode.type}.${errorNode.name}';
+          ? errorNode.type2.name.name
+          : '${errorNode.type2}.${errorNode.name}';
       errorReporter.reportErrorForNode(
           HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION,
           errorNode,
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
index 4f0e447..1be5afd 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
@@ -8,7 +8,6 @@
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_system.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 
 /// Failure because of there is no most specific signature in [candidates].
 class CandidatesConflict extends Conflict {
@@ -43,7 +42,8 @@
 
 /// Manages knowledge about interface types and their members.
 class InheritanceManager3 {
-  static final _noSuchMethodName = Name(null, 'noSuchMethod');
+  static final _noSuchMethodName =
+      Name(null, FunctionElement.NO_SUCH_METHOD_METHOD_NAME);
 
   /// Cached instance interfaces for [ClassElement].
   final Map<ClassElement, Interface> _interfaces = {};
@@ -884,7 +884,7 @@
 
   factory Name(Uri? libraryUri, String name) {
     if (name.startsWith('_')) {
-      var hashCode = JenkinsSmiHash.hash2(libraryUri.hashCode, name.hashCode);
+      var hashCode = Object.hash(libraryUri.hashCode, name.hashCode);
       return Name._internal(libraryUri, name, false, hashCode);
     } else {
       return Name._internal(null, name, true, name.hashCode);
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 846f845..5e1f329 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -1348,60 +1348,6 @@
     return result;
   }
 
-  /// If there is a single type which is at least as specific as all of the
-  /// types in [types], return it.  Otherwise return `null`.
-  static DartType? findMostSpecificType(
-      List<DartType> types, TypeSystemImpl typeSystem) {
-    // The << relation ("more specific than") is a partial ordering on types,
-    // so to find the most specific type of a set, we keep a bucket of the most
-    // specific types seen so far such that no type in the bucket is more
-    // specific than any other type in the bucket.
-    List<DartType> bucket = <DartType>[];
-
-    // Then we consider each type in turn.
-    for (DartType type in types) {
-      // If any existing type in the bucket is more specific than this type,
-      // then we can ignore this type.
-      if (bucket.any((DartType t) => typeSystem.isSubtypeOf(t, type))) {
-        continue;
-      }
-      // Otherwise, we need to add this type to the bucket and remove any types
-      // that are less specific than it.
-      bool added = false;
-      int i = 0;
-      while (i < bucket.length) {
-        if (typeSystem.isSubtypeOf(type, bucket[i])) {
-          if (added) {
-            if (i < bucket.length - 1) {
-              bucket[i] = bucket.removeLast();
-            } else {
-              bucket.removeLast();
-            }
-          } else {
-            bucket[i] = type;
-            i++;
-            added = true;
-          }
-        } else {
-          i++;
-        }
-      }
-      if (!added) {
-        bucket.add(type);
-      }
-    }
-
-    // Now that we are finished, if there is exactly one type left in the
-    // bucket, it is the most specific type.
-    if (bucket.length == 1) {
-      return bucket[0];
-    }
-
-    // Otherwise, there is no single type that is more specific than the
-    // others.
-    return null;
-  }
-
   /// Returns a "smart" version of the "least upper bound" of the given types.
   ///
   /// If these types have the same element and differ only in terms of the type
diff --git a/pkg/analyzer/lib/src/dart/element/type_algebra.dart b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
index 9057b2c..1ffe3d4 100644
--- a/pkg/analyzer/lib/src/dart/element/type_algebra.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
@@ -443,14 +443,7 @@
     inner.invertVariance();
 
     var returnType = type.returnType.accept(inner);
-
-    var alias = type.alias;
-    var newAlias = alias != null
-        ? InstantiatedTypeAliasElementImpl(
-            element: alias.element,
-            typeArguments: _mapList(alias.typeArguments),
-          )
-        : null;
+    var alias = _mapAlias(type.alias);
 
     if (useCounter == before) return type;
 
@@ -459,7 +452,7 @@
       parameters: parameters,
       returnType: returnType,
       nullabilitySuffix: type.nullabilitySuffix,
-      alias: newAlias,
+      alias: alias,
     );
   }
 
@@ -509,12 +502,13 @@
 
   @override
   DartType visitInterfaceType(InterfaceType type) {
-    if (type.typeArguments.isEmpty) {
+    if (type.typeArguments.isEmpty && type.alias == null) {
       return type;
     }
 
     int before = useCounter;
     var typeArguments = _mapList(type.typeArguments);
+    var alias = _mapAlias(type.alias);
     if (useCounter == before) {
       return type;
     }
@@ -523,6 +517,7 @@
       element: type.element,
       typeArguments: typeArguments,
       nullabilitySuffix: type.nullabilitySuffix,
+      alias: alias,
     );
   }
 
@@ -569,6 +564,17 @@
   @override
   DartType visitVoidType(VoidType type) => type;
 
+  InstantiatedTypeAliasElementImpl? _mapAlias(
+    InstantiatedTypeAliasElement? alias,
+  ) {
+    if (alias != null) {
+      return InstantiatedTypeAliasElementImpl(
+        element: alias.element,
+        typeArguments: _mapList(alias.typeArguments),
+      );
+    }
+  }
+
   List<DartType> _mapList(List<DartType> types) {
     return types.map((e) => e.accept(this)).toList();
   }
diff --git a/pkg/analyzer/lib/src/dart/element/type_system.dart b/pkg/analyzer/lib/src/dart/element/type_system.dart
index 711f2ab..ce90a43 100644
--- a/pkg/analyzer/lib/src/dart/element/type_system.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_system.dart
@@ -228,35 +228,22 @@
       return (flatten(S) as TypeImpl).withNullability(nullabilitySuffix);
     }
 
+    // otherwise if T is FutureOr<S> then flatten(T) = S
+    // otherwise if T is Future<S> then flatten(T) = S (shortcut)
     if (type is InterfaceType) {
-      // Implement the cases:
-      //  - "If T = FutureOr<S> then flatten(T) = S."
-      //  - "If T = Future<S> then flatten(T) = S."
       if (type.isDartAsyncFutureOr || type.isDartAsyncFuture) {
-        return type.typeArguments.isNotEmpty
-            ? type.typeArguments[0]
-            : DynamicTypeImpl.instance;
-      }
-      // Implement the case: "Otherwise if T <: Future then let S be a type
-      // such that T << Future<S> and for all R, if T << Future<R> then S << R.
-      // Then flatten(T) = S."
-      //
-      // In other words, given the set of all types R such that T << Future<R>,
-      // let S be the most specific of those types, if any such S exists.
-      //
-      // Since we only care about the most specific type, it is sufficient to
-      // look at the types appearing as a parameter to Future in the type
-      // hierarchy of T.  We don't need to consider the supertypes of those
-      // types, since they are by definition less specific.
-      List<DartType> candidateTypes =
-          _searchTypeHierarchyForFutureTypeParameters(type);
-      var flattenResult =
-          InterfaceTypeImpl.findMostSpecificType(candidateTypes, this);
-      if (flattenResult != null) {
-        return flattenResult;
+        return type.typeArguments[0];
       }
     }
-    // Implement the case: "In any other circumstance, flatten(T) = T."
+
+    // otherwise if T <: Future then let S be a type such that T <: Future<S>
+    //   and for all R, if T <: Future<R> then S <: R; then flatten(T) = S
+    var futureType = type.asInstanceOf(typeProvider.futureElement);
+    if (futureType != null) {
+      return futureType.typeArguments[0];
+    }
+
+    // otherwise flatten(T) = T
     return type;
   }
 
@@ -329,7 +316,9 @@
   /// return the function type for the call method, otherwise return null.
   FunctionType? getCallMethodType(DartType t) {
     if (t is InterfaceType) {
-      return t.lookUpMethod2('call', t.element.library)?.type;
+      return t
+          .lookUpMethod2(FunctionElement.CALL_METHOD_NAME, t.element.library)
+          ?.type;
     }
     return null;
   }
@@ -1854,31 +1843,6 @@
     );
   }
 
-  /// Starting from the given [type], search its class hierarchy for types of
-  /// the form Future<R>, and return a list of the resulting R's.
-  List<DartType> _searchTypeHierarchyForFutureTypeParameters(
-      InterfaceType type) {
-    List<DartType> result = <DartType>[];
-    HashSet<ClassElement> visitedClasses = HashSet<ClassElement>();
-    void recurse(InterfaceType type) {
-      if (type.isDartAsyncFuture && type.typeArguments.isNotEmpty) {
-        result.add(type.typeArguments[0]);
-      }
-      if (visitedClasses.add(type.element)) {
-        if (type.superclass != null) {
-          recurse(type.superclass!);
-        }
-        for (InterfaceType interface in type.interfaces) {
-          recurse(interface);
-        }
-        visitedClasses.remove(type.element);
-      }
-    }
-
-    recurse(type);
-    return result;
-  }
-
   static NullabilitySuffix _promotedTypeParameterTypeNullability(
     NullabilitySuffix nullabilityOfType,
     NullabilitySuffix nullabilityOfBound,
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
index d8600d8..07984a3 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
@@ -2,416 +2,4 @@
 // for details. All 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/analyzer_error_code.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/// The diagnostic codes associated with `dart:ffi`.
-class FfiCode extends AnalyzerErrorCode {
-  /**
-   * No parameters.
-   */
-  static const FfiCode ANNOTATION_ON_POINTER_FIELD = FfiCode(
-      name: 'ANNOTATION_ON_POINTER_FIELD',
-      message:
-          "Fields in a struct class whose type is 'Pointer' should not have "
-          "any annotations.",
-      correction: "Try removing the annotation.");
-
-  /**
-   * Parameters:
-   * 0: the name of the argument
-   */
-  static const FfiCode ARGUMENT_MUST_BE_A_CONSTANT = FfiCode(
-      name: 'ARGUMENT_MUST_BE_A_CONSTANT',
-      message: "Argument '{0}' must be a constant.",
-      correction: "Try replacing the value with a literal or const.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode CREATION_OF_STRUCT_OR_UNION = FfiCode(
-    name: 'CREATION_OF_STRUCT_OR_UNION',
-    message: "Subclasses of 'Struct' and 'Union' are backed by native memory, "
-        "and can't be instantiated by a generative constructor.",
-    correction: "Try allocating it via allocation, or load from a 'Pointer'.",
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the struct class
-   */
-  static const FfiCode EMPTY_STRUCT = FfiCode(
-      name: 'EMPTY_STRUCT',
-      message: "Struct '{0}' is empty. Empty structs are undefined behavior.",
-      correction: "Try adding a field to '{0}' or use a different Struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode EXTRA_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'EXTRA_ANNOTATION_ON_STRUCT_FIELD',
-      message: "Fields in a struct class must have exactly one annotation "
-          "indicating the native type.",
-      correction: "Try removing the extra annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode EXTRA_SIZE_ANNOTATION_CARRAY = FfiCode(
-      name: 'EXTRA_SIZE_ANNOTATION_CARRAY',
-      message: "'Array's must have exactly one 'Array' annotation.",
-      correction: "Try removing the extra annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FFI_NATIVE_ONLY_STATIC = FfiCode(
-      name: 'FFI_NATIVE_ONLY_STATIC',
-      message: "FfiNative annotations can only be used on static functions.",
-      correction: "Change the method to static.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
-      name: 'FIELD_IN_STRUCT_WITH_INITIALIZER',
-      message:
-          "Fields in subclasses of 'Struct' and 'Union' can't have initializers.",
-      correction:
-          "Try removing the initializer and marking the field as external.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_INITIALIZER_IN_STRUCT = FfiCode(
-      name: 'FIELD_INITIALIZER_IN_STRUCT',
-      message:
-          "Constructors in subclasses of 'Struct' and 'Union' can't have field "
-          "initializers.",
-      correction: "Try removing the field initializer and marking the field as"
-          " external.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_MUST_BE_EXTERNAL_IN_STRUCT = FfiCode(
-      name: 'FIELD_MUST_BE_EXTERNAL_IN_STRUCT',
-      message:
-          "Fields of 'Struct' and 'Union' subclasses must be marked external.",
-      correction: "Try adding the 'external' modifier.");
-
-  /**
-   * Parameters:
-   * 0: the name of the struct class
-   */
-  static const FfiCode GENERIC_STRUCT_SUBCLASS = FfiCode(
-      name: 'GENERIC_STRUCT_SUBCLASS',
-      message:
-          "The class '{0}' can't extend 'Struct' or 'Union' because it is generic.",
-      correction: "Try removing the type parameters from '{0}'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode INVALID_EXCEPTION_VALUE = FfiCode(
-      name: 'INVALID_EXCEPTION_VALUE',
-      message:
-          "The method 'Pointer.fromFunction' must not have an exceptional return "
-          "value (the second argument) when the return type of the function is "
-          "either 'void', 'Handle' or 'Pointer'.",
-      correction: "Try removing the exceptional return value.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode INVALID_FIELD_TYPE_IN_STRUCT = FfiCode(
-      name: 'INVALID_FIELD_TYPE_IN_STRUCT',
-      message:
-          "Fields in struct classes can't have the type '{0}'. They can only "
-          "be declared as 'int', 'double', 'Array', 'Pointer', or subtype of "
-          "'Struct' or 'Union'.",
-      correction:
-          "Try using 'int', 'double', 'Array', 'Pointer', or subtype of "
-          "'Struct' or 'Union'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode LEAF_CALL_MUST_NOT_RETURN_HANDLE = FfiCode(
-      name: 'LEAF_CALL_MUST_NOT_RETURN_HANDLE',
-      message: "FFI leaf call must not return a Handle.",
-      correction: "Try changing the return type to primitive or struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode LEAF_CALL_MUST_NOT_TAKE_HANDLE = FfiCode(
-      name: 'LEAF_CALL_MUST_NOT_TAKE_HANDLE',
-      message: "FFI leaf call must not take arguments of type Handle.",
-      correction: "Try changing the argument type to primitive or struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISMATCHED_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'MISMATCHED_ANNOTATION_ON_STRUCT_FIELD',
-      message: "The annotation does not match the declared type of the field.",
-      correction: "Try using a different annotation or changing the declared "
-          "type to match.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'MISSING_ANNOTATION_ON_STRUCT_FIELD',
-      message:
-          "Fields in a struct class must either have the type 'Pointer' or an "
-          "annotation indicating the native type.",
-      correction: "Try adding an annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_EXCEPTION_VALUE = FfiCode(
-      name: 'MISSING_EXCEPTION_VALUE',
-      message:
-          "The method 'Pointer.fromFunction' must have an exceptional return "
-          "value (the second argument) when the return type of the function is "
-          "neither 'void', 'Handle' or 'Pointer'.",
-      correction: "Try adding an exceptional return value.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode MISSING_FIELD_TYPE_IN_STRUCT = FfiCode(
-      name: 'MISSING_FIELD_TYPE_IN_STRUCT',
-      message:
-          "Fields in struct classes must have an explicitly declared type of "
-          "'int', 'double' or 'Pointer'.",
-      correction: "Try using 'int', 'double' or 'Pointer'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_SIZE_ANNOTATION_CARRAY = FfiCode(
-      name: 'MISSING_SIZE_ANNOTATION_CARRAY',
-      message: "'Array's must have exactly one 'Array' annotation.",
-      correction: "Try adding a 'Array' annotation.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a valid dart:ffi native type.
-   * 1: the name of the function whose invocation depends on this relationship
-   */
-  static const FfiCode MUST_BE_A_NATIVE_FUNCTION_TYPE = FfiCode(
-      name: 'MUST_BE_A_NATIVE_FUNCTION_TYPE',
-      message:
-          "The type '{0}' given to '{1}' must be a valid 'dart:ffi' native "
-          "function type.",
-      correction: "Try changing the type to only use members for 'dart:ffi'.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a subtype
-   * 1: the supertype that the subtype is compared to
-   * 2: the name of the function whose invocation depends on this relationship
-   */
-  static const FfiCode MUST_BE_A_SUBTYPE = FfiCode(
-      name: 'MUST_BE_A_SUBTYPE',
-      message: "The type '{0}' must be a subtype of '{1}' for '{2}'.",
-      correction: "Try changing one or both of the type arguments.");
-
-  /**
-   * Parameters:
-   * 0: the name of the function, method, or constructor having type arguments
-   */
-  static const FfiCode NON_CONSTANT_TYPE_ARGUMENT = FfiCode(
-      name: 'NON_CONSTANT_TYPE_ARGUMENT',
-      message:
-          "The type arguments to '{0}' must be compile time constants but type "
-          "parameters are not constants.",
-      correction: "Try changing the type argument to be a constant type.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a valid dart:ffi native type.
-   */
-  static const FfiCode NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER = FfiCode(
-      name: 'NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER',
-      message: "The type argument for the pointer '{0}' must be a "
-          "'NativeFunction' in order to use 'asFunction'.",
-      correction: "Try changing the type argument to be a 'NativeFunction'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode NON_POSITIVE_ARRAY_DIMENSION = FfiCode(
-      name: 'NON_POSITIVE_INPUT_ON_ARRAY',
-      message: "Array dimensions must be positive numbers.",
-      correction: "Try changing the input to a positive number.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode NON_SIZED_TYPE_ARGUMENT = FfiCode(
-      name: 'NON_SIZED_TYPE_ARGUMENT',
-      message:
-          "Type arguments to '{0}' can't have the type '{1}'. They can only "
-          "be declared as native integer, 'Float', 'Double', 'Pointer', or "
-          "subtype of 'Struct' or 'Union'.",
-      correction: "Try using a native integer, 'Float', 'Double', 'Pointer', "
-          "or subtype of 'Struct' or 'Union'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode PACKED_ANNOTATION = FfiCode(
-      name: 'PACKED_ANNOTATION',
-      message: "Structs must have at most one 'Packed' annotation.",
-      correction: "Try removing extra 'Packed' annotations.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode PACKED_ANNOTATION_ALIGNMENT = FfiCode(
-      name: 'PACKED_ANNOTATION_ALIGNMENT',
-      message: "Only packing to 1, 2, 4, 8, and 16 bytes is supported.",
-      correction:
-          "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16.");
-
-  /**
-   * Parameters:
-   * 0: the name of the outer struct
-   * 1: the name of the struct being nested
-   */
-  static const FfiCode PACKED_NESTING_NON_PACKED = FfiCode(
-      name: 'PACKED_NESTING_NON_PACKED',
-      message:
-          "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' is not supported.",
-      correction:
-          "Try packing the nested struct or packing the nested struct more tightly.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode SIZE_ANNOTATION_DIMENSIONS = FfiCode(
-      name: 'SIZE_ANNOTATION_DIMENSIONS',
-      message:
-          "'Array's must have an 'Array' annotation that matches the dimensions.",
-      correction: "Try adjusting the arguments in the 'Array' annotation.");
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_EXTENDS = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't extend '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_EXTENDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't implement '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_WITH = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't mix in '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_WITH',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message: "The class '{0}' can't extend '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message:
-        "The class '{0}' can't implement '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_WITH = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message: "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_WITH',
-  );
-
-  @override
-  final ErrorType type;
-
-  /// Initialize a newly created error code to have the given [name]. If
-  /// [uniqueName] is provided, then it will be used to construct the unique
-  /// name for the code, otherwise the name will be used to construct the unique
-  /// 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.
-  ///
-  /// If [hasPublishedDocs] is `true` then a URL for the docs will be generated.
-  const FfiCode({
-    String? correction,
-    bool hasPublishedDocs = false,
-    required String message,
-    required String name,
-    ErrorType type = ErrorType.COMPILE_TIME_ERROR,
-    String? uniqueName,
-  })  : type = type,
-        super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'FfiCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => type.severity;
-}
+export 'package:analyzer/src/dart/error/ffi_code.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
new file mode 100644
index 0000000..8edc5cf
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
@@ -0,0 +1,404 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+import "package:analyzer/src/error/analyzer_error_code.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class FfiCode extends AnalyzerErrorCode {
+  /**
+   * No parameters.
+   */
+  static const FfiCode ANNOTATION_ON_POINTER_FIELD = FfiCode(
+    'ANNOTATION_ON_POINTER_FIELD',
+    "Fields in a struct class whose type is 'Pointer' should not have any annotations.",
+    correction: "Try removing the annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the argument
+   */
+  static const FfiCode ARGUMENT_MUST_BE_A_CONSTANT = FfiCode(
+    'ARGUMENT_MUST_BE_A_CONSTANT',
+    "Argument '{0}' must be a constant.",
+    correction: "Try replacing the value with a literal or const.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode CREATION_OF_STRUCT_OR_UNION = FfiCode(
+    'CREATION_OF_STRUCT_OR_UNION',
+    "Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor.",
+    correction: "Try allocating it via allocation, or load from a 'Pointer'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the struct class
+   */
+  static const FfiCode EMPTY_STRUCT = FfiCode(
+    'EMPTY_STRUCT',
+    "Struct '{0}' is empty. Empty structs are undefined behavior.",
+    correction: "Try adding a field to '{0}' or use a different Struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode EXTRA_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'EXTRA_ANNOTATION_ON_STRUCT_FIELD',
+    "Fields in a struct class must have exactly one annotation indicating the native type.",
+    correction: "Try removing the extra annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode EXTRA_SIZE_ANNOTATION_CARRAY = FfiCode(
+    'EXTRA_SIZE_ANNOTATION_CARRAY',
+    "'Array's must have exactly one 'Array' annotation.",
+    correction: "Try removing the extra annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FFI_NATIVE_ONLY_STATIC = FfiCode(
+    'FFI_NATIVE_ONLY_STATIC',
+    "FfiNative annotations can only be used on static functions.",
+    correction: "Change the method to static.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_INITIALIZER_IN_STRUCT = FfiCode(
+    'FIELD_INITIALIZER_IN_STRUCT',
+    "Constructors in subclasses of 'Struct' and 'Union' can't have field initializers.",
+    correction:
+        "Try removing the field initializer and marking the field as external.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
+    'FIELD_IN_STRUCT_WITH_INITIALIZER',
+    "Fields in subclasses of 'Struct' and 'Union' can't have initializers.",
+    correction:
+        "Try removing the initializer and marking the field as external.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_MUST_BE_EXTERNAL_IN_STRUCT = FfiCode(
+    'FIELD_MUST_BE_EXTERNAL_IN_STRUCT',
+    "Fields of 'Struct' and 'Union' subclasses must be marked external.",
+    correction: "Try adding the 'external' modifier.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the struct class
+   */
+  static const FfiCode GENERIC_STRUCT_SUBCLASS = FfiCode(
+    'GENERIC_STRUCT_SUBCLASS',
+    "The class '{0}' can't extend 'Struct' or 'Union' because it is generic.",
+    correction: "Try removing the type parameters from '{0}'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode INVALID_EXCEPTION_VALUE = FfiCode(
+    'INVALID_EXCEPTION_VALUE',
+    "The method 'Pointer.fromFunction' must not have an exceptional return value (the second argument) when the return type of the function is either 'void', 'Handle' or 'Pointer'.",
+    correction: "Try removing the exceptional return value.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode INVALID_FIELD_TYPE_IN_STRUCT = FfiCode(
+    'INVALID_FIELD_TYPE_IN_STRUCT',
+    "Fields in struct classes can't have the type '{0}'. They can only be declared as 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'.",
+    correction:
+        "Try using 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode LEAF_CALL_MUST_NOT_RETURN_HANDLE = FfiCode(
+    'LEAF_CALL_MUST_NOT_RETURN_HANDLE',
+    "FFI leaf call must not return a Handle.",
+    correction: "Try changing the return type to primitive or struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode LEAF_CALL_MUST_NOT_TAKE_HANDLE = FfiCode(
+    'LEAF_CALL_MUST_NOT_TAKE_HANDLE',
+    "FFI leaf call must not take arguments of type Handle.",
+    correction: "Try changing the argument type to primitive or struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISMATCHED_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'MISMATCHED_ANNOTATION_ON_STRUCT_FIELD',
+    "The annotation does not match the declared type of the field.",
+    correction:
+        "Try using a different annotation or changing the declared type to match.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'MISSING_ANNOTATION_ON_STRUCT_FIELD',
+    "Fields in a struct class must either have the type 'Pointer' or an annotation indicating the native type.",
+    correction: "Try adding an annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_EXCEPTION_VALUE = FfiCode(
+    'MISSING_EXCEPTION_VALUE',
+    "The method 'Pointer.fromFunction' must have an exceptional return value (the second argument) when the return type of the function is neither 'void', 'Handle' or 'Pointer'.",
+    correction: "Try adding an exceptional return value.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode MISSING_FIELD_TYPE_IN_STRUCT = FfiCode(
+    'MISSING_FIELD_TYPE_IN_STRUCT',
+    "Fields in struct classes must have an explicitly declared type of 'int', 'double' or 'Pointer'.",
+    correction: "Try using 'int', 'double' or 'Pointer'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_SIZE_ANNOTATION_CARRAY = FfiCode(
+    'MISSING_SIZE_ANNOTATION_CARRAY',
+    "'Array's must have exactly one 'Array' annotation.",
+    correction: "Try adding a 'Array' annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a valid dart:ffi native type.
+   * 1: the name of the function whose invocation depends on this relationship
+   */
+  static const FfiCode MUST_BE_A_NATIVE_FUNCTION_TYPE = FfiCode(
+    'MUST_BE_A_NATIVE_FUNCTION_TYPE',
+    "The type '{0}' given to '{1}' must be a valid 'dart:ffi' native function type.",
+    correction: "Try changing the type to only use members for 'dart:ffi'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a subtype
+   * 1: the supertype that the subtype is compared to
+   * 2: the name of the function whose invocation depends on this relationship
+   */
+  static const FfiCode MUST_BE_A_SUBTYPE = FfiCode(
+    'MUST_BE_A_SUBTYPE',
+    "The type '{0}' must be a subtype of '{1}' for '{2}'.",
+    correction: "Try changing one or both of the type arguments.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the function, method, or constructor having type arguments
+   */
+  static const FfiCode NON_CONSTANT_TYPE_ARGUMENT = FfiCode(
+    'NON_CONSTANT_TYPE_ARGUMENT',
+    "The type arguments to '{0}' must be compile time constants but type parameters are not constants.",
+    correction: "Try changing the type argument to be a constant type.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a valid dart:ffi native type.
+   */
+  static const FfiCode NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER = FfiCode(
+    'NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER',
+    "The type argument for the pointer '{0}' must be a 'NativeFunction' in order to use 'asFunction'.",
+    correction: "Try changing the type argument to be a 'NativeFunction'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode NON_POSITIVE_ARRAY_DIMENSION = FfiCode(
+    'NON_POSITIVE_ARRAY_DIMENSION',
+    "Array dimensions must be positive numbers.",
+    correction: "Try changing the input to a positive number.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode NON_SIZED_TYPE_ARGUMENT = FfiCode(
+    'NON_SIZED_TYPE_ARGUMENT',
+    "Type arguments to '{0}' can't have the type '{1}'. They can only be declared as native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'.",
+    correction:
+        "Try using a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode PACKED_ANNOTATION = FfiCode(
+    'PACKED_ANNOTATION',
+    "Structs must have at most one 'Packed' annotation.",
+    correction: "Try removing extra 'Packed' annotations.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode PACKED_ANNOTATION_ALIGNMENT = FfiCode(
+    'PACKED_ANNOTATION_ALIGNMENT',
+    "Only packing to 1, 2, 4, 8, and 16 bytes is supported.",
+    correction:
+        "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the outer struct
+   * 1: the name of the struct being nested
+   */
+  static const FfiCode PACKED_NESTING_NON_PACKED = FfiCode(
+    'PACKED_NESTING_NON_PACKED',
+    "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' is not supported.",
+    correction:
+        "Try packing the nested struct or packing the nested struct more tightly.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode SIZE_ANNOTATION_DIMENSIONS = FfiCode(
+    'SIZE_ANNOTATION_DIMENSIONS',
+    "'Array's must have an 'Array' annotation that matches the dimensions.",
+    correction: "Try adjusting the arguments in the 'Array' annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_EXTENDS = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't extend '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_EXTENDS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't implement '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_WITH = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't mix in '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_WITH',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't extend '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't implement '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_WITH = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_WITH',
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const FfiCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'FfiCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index ba78ccb..2ef3842 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -2,3569 +2,4 @@
 // for details. All 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/analyzer_error_code.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The hints and coding recommendations for best practices which are not
- * mentioned in the Dart Language Specification.
- */
-class HintCode extends AnalyzerErrorCode {
-  /**
-   * Parameters:
-   * 0: the name of the actual argument type
-   * 1: the name of the expected function return type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation of
-  // `Future.catchError` has an argument that is a function whose parameters
-  // aren't compatible with the arguments that will be passed to the function
-  // when it's invoked. The static type of the first argument to `catchError`
-  // is just `Function`, even though the function that is passed in is expected
-  // to have either a single parameter of type `Object` or two parameters of
-  // type `Object` and `StackTrace`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` doesn't take any parameters, but the function is
-  // required to take at least one parameter:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!() => 0!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` takes three parameters, but it can't have more than
-  // two required parameters:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!(one, two, three) => 0!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because even though the closure
-  // being passed to `catchError` takes one parameter, the closure doesn't have
-  // a type that is compatible with `Object`:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!(String error) => 0!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the function being passed to `catchError` so that it has either one
-  // or two required parameters, and the parameters have the required types:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError((Object error) => 0);
-  // }
-  // ```
-  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER =
-      HintCode(
-          'ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER',
-          "The argument type '{0}' can't be assigned to the parameter type "
-              "'{1} Function(Object)' or '{1} Function(Object, StackTrace)'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Users should not assign values marked `@doNotStore`.
-   */
-  static const HintCode ASSIGNMENT_OF_DO_NOT_STORE = HintCode(
-      'ASSIGNMENT_OF_DO_NOT_STORE',
-      "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.",
-      correction: "Try removing the assignment.");
-
-  /**
-   * When the target expression uses '?.' operator, it can be `null`, so all the
-   * subsequent invocations should also use '?.' operator.
-   */
-  static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = HintCode(
-      'CAN_BE_NULL_AFTER_NULL_AWARE',
-      "The receiver uses '?.', so its value can be null.",
-      correction: "Replace the '.' with a '?.' in the invocation.");
-
-  /**
-   * Dead code is code that is never reached, this can happen for instance if a
-   * statement follows a return statement.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when code is found that won't be
-  // executed because execution will never reach the code.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the invocation of
-  // `print` occurs after the function has returned:
-  //
-  // ```dart
-  // void f() {
-  //   return;
-  //   [!print('here');!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the code isn't needed, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   return;
-  // }
-  // ```
-  //
-  // If the code needs to be executed, then either move the code to a place
-  // where it will be executed:
-  //
-  // ```dart
-  // void f() {
-  //   print('here');
-  //   return;
-  // }
-  // ```
-  //
-  // Or, rewrite the code before it, so that it can be reached:
-  //
-  // ```dart
-  // void f({bool skipPrinting = true}) {
-  //   if (skipPrinting) {
-  //     return;
-  //   }
-  //   print('here');
-  // }
-  // ```
-  static const HintCode DEAD_CODE = HintCode('DEAD_CODE', "Dead code.",
-      correction: "Try removing the code, or "
-          "fixing the code before it so that it can be reached.",
-      hasPublishedDocs: true);
-
-  /**
-   * Dead code is code that is never reached. This case covers cases where the
-   * user has catch clauses after `catch (e)` or `on Object catch (e)`.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found that
-  // can't be executed because it’s after a `catch` clause of the form
-  // `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
-  // the thrown object is selected, and both of those forms will match any
-  // object, so no `catch` clauses that follow them will be selected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } catch (e) {
-  //   } [!on String {
-  //   }!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the clause should be selectable, then move the clause before the general
-  // clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on String {
-  //   } catch (e) {
-  //   }
-  // }
-  // ```
-  //
-  // If the clause doesn't need to be selectable, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } catch (e) {
-  //   }
-  // }
-  // ```
-  static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = HintCode(
-      'DEAD_CODE_CATCH_FOLLOWING_CATCH',
-      "Dead code: Catch clauses after a 'catch (e)' or an "
-          "'on Object catch (e)' are never reached.",
-      correction:
-          "Try reordering the catch clauses so that they can be reached, or "
-          "removing the unreachable catch clauses.",
-      hasPublishedDocs: true);
-
-  /**
-   * Dead code is code that is never reached. This case covers cases where the
-   * user has an on-catch clause such as `on A catch (e)`, where a supertype of
-   * `A` was already caught.
-   *
-   * Parameters:
-   * 0: name of the subtype
-   * 1: name of the supertype
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found that
-  // can't be executed because it is after a `catch` clause that catches either
-  // the same type or a supertype of the clause's type. The first `catch` clause
-  // that matches the thrown object is selected, and the earlier clause always
-  // matches anything matchable by the highlighted clause, so the highlighted
-  // clause will never be selected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on num {
-  //   } [!on int {
-  //   }!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the clause should be selectable, then move the clause before the general
-  // clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on int {
-  //   } on num {
-  //   }
-  // }
-  // ```
-  //
-  // If the clause doesn't need to be selectable, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on num {
-  //   }
-  // }
-  // ```
-  static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = HintCode(
-      'DEAD_CODE_ON_CATCH_SUBTYPE',
-      "Dead code: This on-catch block won’t be executed because '{0}' is a "
-          "subtype of '{1}' and hence will have been caught already.",
-      correction:
-          "Try reordering the catch clauses so that this block can be reached, "
-          "or removing the unreachable catch clause.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class `Function` is used in
-  // either the `extends`, `implements`, or `with` clause of a class or mixin.
-  // Using the class `Function` in this way has no semantic value, so it's
-  // effectively dead code.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `Function` is used as
-  // the superclass of `F`:
-  //
-  // ```dart
-  // class F extends [!Function!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the class `Function` from whichever clause it's in, and remove the
-  // whole clause if `Function` is the only type in the clause:
-  //
-  // ```dart
-  // class F {}
-  // ```
-  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION', "Extending 'Function' is deprecated.",
-      correction: "Try removing 'Function' from the 'extends' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_EXTENDS_FUNCTION');
-
-  /**
-   * Users should not create a class named `Function` anymore.
-   */
-  static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = HintCode(
-      'DEPRECATED_FUNCTION_CLASS_DECLARATION',
-      "Declaring a class named 'Function' is deprecated.",
-      correction: "Try renaming the class.");
-
-  /**
-   * No parameters.
-   */
-  static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION',
-      "Implementing 'Function' has no effect.",
-      correction: "Try removing 'Function' from the 'implements' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_IMPLEMENTS_FUNCTION');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a deprecated library or class
-  // member is used in a different package.
-  //
-  // #### Examples
-  //
-  // If the method `m` in the class `C` is annotated with `@deprecated`, then
-  // the following code produces this diagnostic:
-  //
-  // ```dart
-  // void f(C c) {
-  //   c.[!m!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The documentation for declarations that are annotated with `@deprecated`
-  // should indicate what code to use in place of the deprecated code.
-  static const HintCode DEPRECATED_MEMBER_USE = HintCode(
-      'DEPRECATED_MEMBER_USE', "'{0}' is deprecated and shouldn't be used.",
-      correction: "Try replacing the use of the deprecated member with the "
-          "replacement.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a deprecated library member or
-  // class member is used in the same package in which it's declared.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is deprecated:
-  //
-  // ```dart
-  // @deprecated
-  // var x = 0;
-  // var y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The fix depends on what's been deprecated and what the replacement is. The
-  // documentation for deprecated declarations should indicate what code to use
-  // in place of the deprecated code.
-  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE = HintCode(
-      'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
-      "'{0}' is deprecated and shouldn't be used.",
-      correction: "Try replacing the use of the deprecated member with the "
-          "replacement.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: message details
-   */
-  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE =
-      HintCode(
-    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
-    "'{0}' is deprecated and shouldn't be used. {1}.",
-    correction: "Try replacing the use of the deprecated member with the "
-        "replacement.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: message details
-   */
-  static const HintCode DEPRECATED_MEMBER_USE_WITH_MESSAGE = HintCode(
-    'DEPRECATED_MEMBER_USE',
-    "'{0}' is deprecated and shouldn't be used. {1}.",
-    correction: "Try replacing the use of the deprecated member with the "
-        "replacement.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.DEPRECATED_MEMBER_USE_WITH_MESSAGE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode DEPRECATED_MIXIN_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION', "Mixing in 'Function' is deprecated.",
-      correction: "Try removing 'Function' from the 'with' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_MIXIN_FUNCTION');
-
-  /**
-   * Hint to use the ~/ operator.
-   */
-  static const HintCode DIVISION_OPTIMIZATION = HintCode(
-      'DIVISION_OPTIMIZATION',
-      "The operator x ~/ y is more efficient than (x / y).toInt().",
-      correction: "Try re-writing the expression to use the '~/' operator.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name occurs multiple times in
-  // a `hide` clause. Repeating the name is unnecessary.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `min` is
-  // hidden more than once:
-  //
-  // ```dart
-  // import 'dart:math' hide min, [!min!];
-  //
-  // var x = pi;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name was mistyped in one or more places, then correct the mistyped
-  // names:
-  //
-  // ```dart
-  // import 'dart:math' hide max, min;
-  //
-  // var x = pi;
-  // ```
-  //
-  // If the name wasn't mistyped, then remove the unnecessary name from the
-  // list:
-  //
-  // ```dart
-  // import 'dart:math' hide min;
-  //
-  // var x = pi;
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the diagnostic being ignored
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a diagnostic name appears in an
-  // `ignore` comment, but the diagnostic is already being ignored, either
-  // because it's already included in the same `ignore` comment or because it
-  // appears in an `ignore-in-file` comment.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the diagnostic named
-  // `unused_local_variable` is already being ignored for the whole file so it
-  // doesn't need to be ignored on a specific line:
-  //
-  // ```dart
-  // // ignore_for_file: unused_local_variable
-  // void f() {
-  //   // ignore: [!unused_local_variable!]
-  //   var x = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the diagnostic named
-  // `unused_local_variable` is being ignored twice on the same line:
-  //
-  // ```dart
-  // void f() {
-  //   // ignore: unused_local_variable, [!unused_local_variable!]
-  //   var x = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the ignore comment, or remove the unnecessary diagnostic name if the
-  // ignore comment is ignoring more than one diagnostic:
-  //
-  // ```dart
-  // // ignore_for_file: unused_local_variable
-  // void f() {
-  //   var x = 0;
-  // }
-  // ```
-  static const HintCode DUPLICATE_IGNORE = HintCode(
-      'DUPLICATE_IGNORE',
-      "The diagnostic '{0}' doesn't need to be ignored here because it's "
-          "already being ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.",
-      hasPublishedDocs: true);
-
-  /**
-   * Duplicate imports.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import directive is found
-  // that is the same as an import before it in the file. The second import
-  // doesn’t add value and should be removed.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  // import [!'package:meta/meta.dart'!];
-  //
-  // @sealed class C {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary import:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @sealed class C {}
-  // ```
-  static const HintCode DUPLICATE_IMPORT = HintCode(
-      'DUPLICATE_IMPORT', "Duplicate import.",
-      correction: "Try removing all but one import of the library.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name occurs multiple times in
-  // a `show` clause. Repeating the name is unnecessary.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `min` is shown
-  // more than once:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!min!];
-  //
-  // var x = min(2, min(0, 1));
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name was mistyped in one or more places, then correct the mistyped
-  // names:
-  //
-  // ```dart
-  // import 'dart:math' show max, min;
-  //
-  // var x = max(2, min(0, 1));
-  // ```
-  //
-  // If the name wasn't mistyped, then remove the unnecessary name from the
-  // list:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(2, min(0, 1));
-  // ```
-  static const HintCode DUPLICATE_SHOWN_NAME =
-      HintCode('DUPLICATE_SHOWN_NAME', "Duplicate shown name.",
-          correction: "Try removing the repeated name from the list of shown "
-              "members.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an element in a non-constant set
-  // is the same as a previous element in the same set. If two elements are the
-  // same, then the second value is ignored, which makes having both elements
-  // pointless and likely signals a bug.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the element `1` appears
-  // twice:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 1;
-  // var s = <int>{a, [!b!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If both elements should be included in the set, then change one of the
-  // elements:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 2;
-  // var s = <int>{a, b};
-  // ```
-  //
-  // If only one of the elements is needed, then remove the one that isn't
-  // needed:
-  //
-  // ```dart
-  // const a = 1;
-  // var s = <int>{a};
-  // ```
-  //
-  // Note that literal sets preserve the order of their elements, so the choice
-  // of which element to remove might affect the order in which elements are
-  // returned by an iterator.
-  static const HintCode EQUAL_ELEMENTS_IN_SET = HintCode(
-      'EQUAL_ELEMENTS_IN_SET',
-      "Two elements in a set literal shouldn't be equal.",
-      correction: "Change or remove the duplicate element.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key in a non-constant map is
-  // the same as a previous key in the same map. If two keys are the same, then
-  // the second value overwrites the first value, which makes having both pairs
-  // pointless and likely signals a bug.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the keys `a` and `b`
-  // have the same value:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 1;
-  // var m = <int, String>{a: 'a', [!b!]: 'b'};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If both entries should be included in the map, then change one of the keys:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 2;
-  // var m = <int, String>{a: 'a', b: 'b'};
-  // ```
-  //
-  // If only one of the entries is needed, then remove the one that isn't
-  // needed:
-  //
-  // ```dart
-  // const a = 1;
-  // var m = <int, String>{a: 'a'};
-  // ```
-  //
-  // Note that literal maps preserve the order of their entries, so the choice
-  // of which entry to remove might affect the order in which the keys and
-  // values are returned by an iterator.
-  static const HintCode EQUAL_KEYS_IN_MAP = HintCode(
-      'EQUAL_KEYS_IN_MAP', "Two keys in a map literal shouldn't be equal.",
-      correction: "Change or remove the duplicate key.",
-      hasPublishedDocs: true);
-
-  /**
-   * It is a bad practice for a source file in a package "lib" directory
-   * hierarchy to traverse outside that directory hierarchy. For example, a
-   * source file in the "lib" directory should not contain a directive such as
-   * `import '../web/some.dart'` which references a file outside the lib
-   * directory.
-   */
-  static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE =
-      HintCode(
-          'FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE',
-          "A file in the 'lib' directory shouldn't import a file outside the "
-              "'lib' directory.",
-          correction: "Try removing the import, or "
-              "moving the imported file inside the 'lib' directory.");
-
-  /**
-   * It is a bad practice for a source file ouside a package "lib" directory
-   * hierarchy to traverse into that directory hierarchy. For example, a source
-   * file in the "web" directory should not contain a directive such as
-   * `import '../lib/some.dart'` which references a file inside the lib
-   * directory.
-   */
-  static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE =
-      HintCode(
-          'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE',
-          "A file outside the 'lib' directory shouldn't reference a file "
-              "inside the 'lib' directory using a relative path.",
-          correction: "Try using a package: URI instead.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library that declares a
-  // function named `loadLibrary` is imported using a deferred import. A
-  // deferred import introduces an implicit function named `loadLibrary`. This
-  // function is used to load the contents of the deferred library, and the
-  // implicit function hides the explicit declaration in the deferred library.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines a function named `loadLibrary`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // void loadLibrary(Library library) {}
-  //
-  // class Library {}
-  // ```
-  //
-  // The following code produces this diagnostic because the implicit
-  // declaration of `a.loadLibrary` is hiding the explicit declaration of
-  // `loadLibrary` in `a.dart`:
-  //
-  // ```dart
-  // [!import 'a.dart' deferred as a;!]
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the imported library isn't required to be deferred, then remove the
-  // keyword `deferred`:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // If the imported library is required to be deferred and you need to
-  // reference the imported function, then rename the function in the imported
-  // library:
-  //
-  // ```dart
-  // void populateLibrary(Library library) {}
-  //
-  // class Library {}
-  // ```
-  //
-  // If the imported library is required to be deferred and you don't need to
-  // reference the imported function, then add a `hide` clause:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a hide loadLibrary;
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // If type arguments shouldn't be required for the class, then mark the class
-  // with the `@optionalTypeArgs` annotation (from `package:meta`):
-  static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = HintCode(
-      'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION',
-      "The imported library defines a top-level function named 'loadLibrary' "
-          "that is hidden by deferring this library.",
-      correction: "Try changing the import to not be deferred, or "
-          "rename the function in the imported library.",
-      hasPublishedDocs: true);
-
-  /**
-   * https://github.com/dart-lang/sdk/issues/44063
-   */
-  static const HintCode IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE = HintCode(
-    'IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE',
-    "The library '{0}' is legacy, and should not be imported into "
-        "a null safe library.",
-    correction: "Try migrating the imported library.",
-  );
-
-  /**
-   * When "strict-inference" is enabled, collection literal types must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_COLLECTION_LITERAL = HintCode(
-      'INFERENCE_FAILURE_ON_COLLECTION_LITERAL',
-      "The type argument(s) of '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in function invocations must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_INVOCATION = HintCode(
-      'INFERENCE_FAILURE_ON_FUNCTION_INVOCATION',
-      "The type argument(s) of the function '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, recursive local functions, top-level
-   * functions, methods, and function-typed function parameters must all
-   * specify a return type. See the strict-inference resource:
-   *
-   * https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md
-   */
-  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE = HintCode(
-      'INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE',
-      "The return type of '{0}' cannot be inferred.",
-      correction: "Declare the return type of '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in function invocations must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_GENERIC_INVOCATION = HintCode(
-      'INFERENCE_FAILURE_ON_GENERIC_INVOCATION',
-      "The type argument(s) of the generic function type '{0}' can't be "
-          "inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in instance creation
-   * (constructor calls) must be inferred via the context type, or have type
-   * arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
-      'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
-      "The type argument(s) of the constructor '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" in enabled, uninitialized variables must be
-   * declared with a specific type.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE = HintCode(
-      'INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE',
-      "The type of {0} can't be inferred without either a type or "
-          "initializer.",
-      correction: "Try specifying the type of the variable.");
-
-  /**
-   * When "strict-inference" in enabled, function parameters must be
-   * declared with a specific type, or inherit a type.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_UNTYPED_PARAMETER = HintCode(
-      'INFERENCE_FAILURE_ON_UNTYPED_PARAMETER',
-      "The type of {0} can't be inferred; a type must be explicitly provided.",
-      correction: "Try specifying the type of the parameter.");
-
-  /**
-   * Parameters:
-   * 0: the name of the annotation
-   * 1: the list of valid targets
-   */
-  static const HintCode INVALID_ANNOTATION_TARGET = HintCode(
-      'INVALID_ANNOTATION_TARGET',
-      "The annotation '{0}' can only be used on {1}");
-
-  /**
-   * This hint is generated anywhere where an element annotated with `@internal`
-   * is exported as a part of a package's public API.
-   *
-   * Parameters:
-   * 0: the name of the element
-   */
-  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT = HintCode(
-      'INVALID_EXPORT_OF_INTERNAL_ELEMENT',
-      "The member '{0}' can't be exported as a part of a package's public "
-          "API.",
-      correction: "Try using a hide clause to hide '{0}'.");
-
-  /**
-   * This hint is generated anywhere where an element annotated with `@internal`
-   * is exported indirectly as a part of a package's public API.
-   *
-   * Parameters:
-   * 0: the name of the element
-   */
-  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY = HintCode(
-      'INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY',
-      "The member '{0}' can't be exported as a part of a package's public "
-          "API, but is indirectly exported as part of the signature of '{1}'.",
-      correction: "Try using a hide clause to hide '{0}'.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * anything other than a method.
-   */
-  static const HintCode INVALID_FACTORY_ANNOTATION = HintCode(
-      'INVALID_FACTORY_ANNOTATION',
-      "Only methods can be annotated as factories.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * a method that does not declare a return type.
-   */
-  static const HintCode INVALID_FACTORY_METHOD_DECL = HintCode(
-      'INVALID_FACTORY_METHOD_DECL',
-      "Factory method '{0}' must have a return type.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * a non-abstract method that can return anything other than a newly allocated
-   * object.
-   *
-   * Parameters:
-   * 0: the name of the method
-   */
-  static const HintCode INVALID_FACTORY_METHOD_IMPL = HintCode(
-      'INVALID_FACTORY_METHOD_IMPL',
-      "Factory method '{0}' doesn't return a newly allocated object.");
-
-  /**
-   * This hint is generated anywhere an @immutable annotation is associated with
-   * anything other than a class.
-   */
-  static const HintCode INVALID_IMMUTABLE_ANNOTATION = HintCode(
-      'INVALID_IMMUTABLE_ANNOTATION',
-      "Only classes can be annotated as being immutable.");
-
-  /**
-   * This hint is generated anywhere a @internal annotation is associated with
-   * an element found in a package's public API.
-   */
-  static const HintCode INVALID_INTERNAL_ANNOTATION = HintCode(
-      'INVALID_INTERNAL_ANNOTATION',
-      "Only public elements in a package's private API can be annotated as "
-          "being internal.");
-
-  /// 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 = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override number must begin with '@dart'",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
-  );
-
-  /// 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 = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
-  );
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
-  );
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The language version override must be before any declaration or "
-        "directive.",
-    correction:
-        "Try moving the language version override to the top of the file.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
-  );
-
-  /// 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 = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
-  );
-
-  /// 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 = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
-  );
-
-  /// 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 = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
-  );
-
-  /// 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 =
-      HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "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'.",
-    uniqueName:
-        'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
-  );
-
-  /// 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 =
-      HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    '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'.",
-    uniqueName: 'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the `@literal` annotation is
-  // applied to anything other than a const constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the constructor isn't
-  // a `const` constructor:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   [!@literal!]
-  //   C();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `x` isn't a
-  // constructor:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // [!@literal!]
-  // var x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the annotation is on a constructor and the constructor should always be
-  // invoked with `const`, when possible, then mark the constructor with the
-  // `const` keyword:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  // ```
-  //
-  // If the constructor can't be marked as `const`, then remove the annotation.
-  //
-  // If the annotation is on anything other than a constructor, then remove the
-  // annotation:
-  //
-  // ```dart
-  // var x;
-  // ```
-  static const HintCode INVALID_LITERAL_ANNOTATION = HintCode(
-      'INVALID_LITERAL_ANNOTATION',
-      "Only const constructors can have the `@literal` annotation.",
-      hasPublishedDocs: true);
-
-  /**
-   * This hint is generated anywhere where `@nonVirtual` annotates something
-   * other than a non-abstract instance member in a class or mixin.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_NON_VIRTUAL_ANNOTATION = HintCode(
-      'INVALID_NON_VIRTUAL_ANNOTATION',
-      "The member '{0}' can't be '@nonVirtual' because it isn't a concrete "
-          "instance member.",
-      correction: "Try removing @nonVirtual.");
-
-  /**
-   * This hint is generated anywhere where an instance member annotated with
-   * `@nonVirtual` is overridden in a subclass.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER = HintCode(
-      'INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER',
-      "The member '{0}' is declared non-virtual in '{1}' and can't be "
-          "overridden in subclasses.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a named
-   * parameter with a default value.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_NAMED_PARAM = HintCode(
-      'INVALID_REQUIRED_NAMED_PARAM',
-      "The type parameter '{0}' is annotated with @required but only named "
-          "parameters without a default value can be annotated with it.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates an optional
-   * positional parameter.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM = HintCode(
-      'INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM',
-      "Incorrect use of the annotation @required on the optional "
-          "positional parameter '{0}'. Optional positional parameters "
-          "cannot be required.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a non named
-   * parameter or a named parameter with default value.
-   *
-   * Parameters:
-   * 0: the name of the member
-   *
-   * Deprecated: Use the more specific [INVALID_REQUIRED_NAMED_PARAM],
-   * [INVALID_REQUIRED_OPTIONAL_POSITION_PARAM], and
-   * [INVALID_REQUIRED_POSITION_PARAM]
-   */
-  @deprecated
-  static const HintCode INVALID_REQUIRED_PARAM = HintCode(
-      'INVALID_REQUIRED_PARAM',
-      "The type parameter '{0}' is annotated with @required but only named "
-          "parameters without default value can be annotated with it.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a non optional
-   * positional parameter.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_POSITIONAL_PARAM = HintCode(
-      'INVALID_REQUIRED_POSITIONAL_PARAM',
-      "Redundant use of the annotation @required on the required positional "
-          "parameter '{0}'.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@sealed` annotates something other
-   * than a class.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_SEALED_ANNOTATION = HintCode(
-      'INVALID_SEALED_ANNOTATION',
-      "The member '{0}' is annotated with '@sealed' but only classes can be "
-          "annotated with it.",
-      correction: "Remove @sealed.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with `@internal`
-   * is used outside of the package in which it is declared.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_USE_OF_INTERNAL_MEMBER = HintCode(
-      'INVALID_USE_OF_INTERNAL_MEMBER',
-      "The member '{0}' can only be used within its package.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with `@protected`
-   * is used outside of an instance member of a subclass.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = HintCode(
-      'INVALID_USE_OF_PROTECTED_MEMBER',
-      "The member '{0}' can only be used within instance members of subclasses "
-          "of '{1}'.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with
-   * `@visibleForOverriding` is used for another purpose than overriding it.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER',
-      "The member '{0}' can only be used for overriding.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with
-   * `@visibleForTemplate` is used outside of a "template" Dart file.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER',
-      "The member '{0}' can only be used within '{1}' or a template "
-          "library.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with
-   * `@visibleForTesting` is used outside the defining library, or a test.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER',
-      "The member '{0}' can only be used within '{1}' or a test.");
-
-  /**
-   * This hint is generated anywhere where a private declaration is annotated
-   * with `@visibleForTemplate` or `@visibleForTesting`.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the annotation
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when either the `@visibleForTemplate`
-  // or `@visibleForTesting` annotation is applied to a non-public declaration.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // [!@visibleForTesting!]
-  // void _someFunction() {}
-  //
-  // void f() => _someFunction();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the declaration doesn't need to be used by test code, then remove the
-  // annotation:
-  //
-  // ```dart
-  // void _someFunction() {}
-  //
-  // void f() => _someFunction();
-  // ```
-  //
-  // If it does, then make it public:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @visibleForTesting
-  // void someFunction() {}
-  //
-  // void f() => someFunction();
-  // ```
-  static const HintCode INVALID_VISIBILITY_ANNOTATION = HintCode(
-      'INVALID_VISIBILITY_ANNOTATION',
-      "The member '{0}' is annotated with '{1}', but this annotation is only "
-          "meaningful on declarations of public members.",
-      hasPublishedDocs: true);
-
-  /// Hint when an `@visibleForOverriding` annotation is used on something that
-  /// isn't an interface member.
-  static const HintCode INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION = HintCode(
-    'INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION',
-    "The declaration '{0}' is annotated with 'visibleForOverriding'. As '{0}' "
-        "is not an interface member that could be overriden, the annotation is "
-        'meaningless.',
-  );
-
-  /**
-   * Generate a hint for an element that is annotated with `@JS(...)` whose
-   * library declaration is not similarly annotated.
-   */
-  static const HintCode MISSING_JS_LIB_ANNOTATION = HintCode(
-      'MISSING_JS_LIB_ANNOTATION',
-      "The @JS() annotation can only be used if it is also declared on the "
-          "library directive.",
-      correction: "Try adding the annotation to the library directive.");
-
-  /**
-   * Generate a hint for a constructor, function or method invocation where a
-   * required parameter is missing.
-   *
-   * Parameters:
-   * 0: the name of the parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function with a
-  // named parameter that is annotated as being required is invoked without
-  // providing a value for the parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the named parameter `x`
-  // is required:
-  //
-  // ```dart
-  // %language=2.9
-  // import 'package:meta/meta.dart';
-  //
-  // void f({@required int x}) {}
-  //
-  // void g() {
-  //   [!f!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Provide the required value:
-  //
-  // ```dart
-  // %language=2.9
-  // import 'package:meta/meta.dart';
-  //
-  // void f({@required int x}) {}
-  //
-  // void g() {
-  //   f(x: 2);
-  // }
-  // ```
-  static const HintCode MISSING_REQUIRED_PARAM = HintCode(
-      'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for a constructor, function or method invocation where a
-   * required parameter is missing.
-   *
-   * Parameters:
-   * 0: the name of the parameter
-   * 1: message details
-   */
-  static const HintCode MISSING_REQUIRED_PARAM_WITH_DETAILS = HintCode(
-    'MISSING_REQUIRED_PARAM',
-    "The parameter '{0}' is required. {1}.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the declared return type
-   */
-  // #### Description
-  //
-  // Any function or method that doesn't end with either an explicit return or a
-  // throw implicitly returns `null`. This is rarely the desired behavior. The
-  // analyzer produces this diagnostic when it finds an implicit return.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` doesn't end with a
-  // return:
-  //
-  // ```dart
-  // %language=2.9
-  // int [!f!](int x) {
-  //   if (x < 0) {
-  //     return 0;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add a `return` statement that makes the return value explicit, even if
-  // `null` is the appropriate value.
-  static const HintCode MISSING_RETURN = HintCode(
-      'MISSING_RETURN',
-      "This function has a return type of '{0}', but doesn't end with a "
-          "return statement.",
-      correction: "Try adding a return statement, "
-          "or changing the return type to 'void'.",
-      hasPublishedDocs: true);
-
-  /**
-   * This hint is generated anywhere where a `@sealed` class is used as a
-   * a superclass constraint of a mixin.
-   *
-   * Parameters:
-   * 0: the name of the sealed class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the superclass constraint of a
-  // mixin is a class from a different package that was marked as `@sealed`.
-  // Classes that are sealed can't be extended, implemented, mixed in, or used
-  // as a superclass constraint.
-  //
-  // #### Examples
-  //
-  // If the package `p` defines a sealed class:
-  //
-  // ```dart
-  // %uri="package:p/p.dart"
-  // import 'package:meta/meta.dart';
-  //
-  // @sealed
-  // class C {}
-  // ```
-  //
-  // Then, the following code, when in a package other than `p`, produces this
-  // diagnostic:
-  //
-  // ```dart
-  // import 'package:p/p.dart';
-  //
-  // [!mixin M on C {}!]
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the classes that use the mixin don't need to be subclasses of the sealed
-  // class, then consider adding a field and delegating to the wrapped instance
-  // of the sealed class.
-  static const HintCode MIXIN_ON_SEALED_CLASS = HintCode(
-      'MIXIN_ON_SEALED_CLASS',
-      "The class '{0}' shouldn't be used as a mixin constraint because it is "
-          "sealed, and any class mixing in this mixin must have '{0}' as a "
-          "superclass.",
-      correction:
-          "Try composing with this class, or refer to its documentation for "
-          "more information.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for classes that inherit from classes annotated with
-   * `@immutable` but that are not immutable.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an immutable class defines one
-  // or more instance fields that aren't final. A class is immutable if it's
-  // marked as being immutable using the annotation `@immutable` or if it's a
-  // subclass of an immutable class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field `x` isn't
-  // final:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @immutable
-  // class [!C!] {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If instances of the class should be immutable, then add the keyword `final`
-  // to all non-final field declarations:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @immutable
-  // class C {
-  //   final int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // If the instances of the class should be mutable, then remove the
-  // annotation, or choose a different superclass if the annotation is
-  // inherited:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  static const HintCode MUST_BE_IMMUTABLE = HintCode(
-      'MUST_BE_IMMUTABLE',
-      "This class (or a class that this class inherits from) is marked as "
-          "'@immutable', but one or more of its instance fields aren't final: "
-          "{0}",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the class declaring the overridden method
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method that overrides a method
-  // that is annotated as `@mustCallSuper` doesn't invoke the overridden method
-  // as required.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the method `m` in `B`
-  // doesn't invoke the overridden method `m` in `A`:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class A {
-  //   @mustCallSuper
-  //   m() {}
-  // }
-  //
-  // class B extends A {
-  //   @override
-  //   [!m!]() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an invocation of the overridden method in the overriding method:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class A {
-  //   @mustCallSuper
-  //   m() {}
-  // }
-  //
-  // class B extends A {
-  //   @override
-  //   m() {
-  //     super.m();
-  //   }
-  // }
-  // ```
-  static const HintCode MUST_CALL_SUPER = HintCode(
-      'MUST_CALL_SUPER',
-      "This method overrides a method annotated as '@mustCallSuper' in '{0}', "
-          "but doesn't invoke the overridden method.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for non-const instance creation using a constructor
-   * annotated with `@literal`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the annotated constructor
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor that has the
-  // `@literal` annotation is invoked without using the `const` keyword, but all
-  // of the arguments to the constructor are constants. The annotation indicates
-  // that the constructor should be used to create a constant value whenever
-  // possible.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  //
-  // C f() => [!C()!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add the keyword `const` before the constructor invocation:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  //
-  // void f() => const C();
-  // ```
-  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR = HintCode(
-      'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
-      "This instance creation must be 'const', because the {0} constructor is "
-          "marked as '@literal'.",
-      correction: "Try adding a 'const' keyword.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for non-const instance creation (with the `new` keyword)
-   * using a constructor annotated with `@literal`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the annotated constructor
-   */
-  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW =
-      HintCode(
-    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
-    "This instance creation must be 'const', because the {0} constructor "
-        "is marked as '@literal'.",
-    correction: "Try replacing the 'new' keyword with 'const'.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW',
-  );
-
-  /**
-   * Users should not use `Future.value` or `Completer.complete` with a null
-   * argument if the type argument is non-nullable.
-   */
-  static const HintCode NULL_ARGUMENT_TO_NON_NULL_TYPE = HintCode(
-      'NULL_ARGUMENT_TO_NON_NULL_TYPE',
-      "'{0}' should not be called with a null argument for the non-nullable "
-          "type argument '{1}'",
-      correction: 'Try adding a non-null argument.');
-
-  /**
-   * When the left operand of a binary expression uses '?.' operator, it can be
-   * `null`.
-   */
-  static const HintCode NULL_AWARE_BEFORE_OPERATOR = HintCode(
-      'NULL_AWARE_BEFORE_OPERATOR',
-      "The left operand uses '?.', so its value can be null.");
-
-  /**
-   * A condition in a control flow statement could evaluate to `null` because it
-   * uses the null-aware '?.' operator.
-   */
-  static const HintCode NULL_AWARE_IN_CONDITION = HintCode(
-      'NULL_AWARE_IN_CONDITION',
-      "The value of the '?.' operator can be 'null', which isn't appropriate "
-          "in a condition.",
-      correction:
-          "Try replacing the '?.' with a '.', testing the left-hand side for "
-          "null if necessary.");
-
-  /**
-   * A condition in operands of a logical operator could evaluate to `null`
-   * because it uses the null-aware '?.' operator.
-   */
-  static const HintCode NULL_AWARE_IN_LOGICAL_OPERATOR = HintCode(
-      'NULL_AWARE_IN_LOGICAL_OPERATOR',
-      "The value of the '?.' operator can be 'null', which isn't appropriate "
-          "as an operand of a logical operator.");
-
-  /**
-   * This hint indicates that a null literal is null-checked with `!`, but null
-   * is never not null.
-   */
-  static const HintCode NULL_CHECK_ALWAYS_FAILS = HintCode(
-      'NULL_CHECK_ALWAYS_FAILS',
-      "This null-check will always throw an exception because the expression "
-          "will always evaluate to 'null'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type following `on` in a
-  // `catch` clause is a nullable type. It isn't valid to specify a nullable
-  // type because it isn't possible to catch `null` (because it's a runtime
-  // error to throw `null`).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the exception type is
-  // specified to allow `null` when `null` can't be thrown:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on [!FormatException?!] {
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on FormatException {
-  //   }
-  // }
-  // ```
-  static const HintCode NULLABLE_TYPE_IN_CATCH_CLAUSE = HintCode(
-      'NULLABLE_TYPE_IN_CATCH_CLAUSE',
-      "A potentially nullable type can't be used in an 'on' clause because it "
-          "isn't valid to throw a nullable expression.",
-      correction: "Try using a non-nullable type.",
-      hasPublishedDocs: true);
-
-  /**
-   * A field with the override annotation does not override a getter or setter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_FIELD = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The field doesn't override an inherited getter or setter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD',
-  );
-
-  /**
-   * A getter with the override annotation does not override an existing getter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The getter doesn't override an inherited getter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER',
-  );
-
-  /**
-   * A method with the override annotation does not override an existing method.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class member is annotated with
-  // the `@override` annotation, but the member isn’t declared in any of the
-  // supertypes of the class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` isn't declared in
-  // any of the supertypes of `C`:
-  //
-  // ```dart
-  // class C {
-  //   @override
-  //   String [!m!]() => '';
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the member is intended to override a member with a different name, then
-  // update the member to have the same name:
-  //
-  // ```dart
-  // class C {
-  //   @override
-  //   String toString() => '';
-  // }
-  // ```
-  //
-  // If the member is intended to override a member that was removed from the
-  // superclass, then consider removing the member from the subclass.
-  //
-  // If the member can't be removed, then remove the annotation.
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The method doesn't override an inherited method.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD',
-  );
-
-  /**
-   * A setter with the override annotation does not override an existing setter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The setter doesn't override an inherited setter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER',
-  );
-
-  /**
-   * It is a bad practice for a package import to reference anything outside the
-   * given package, or more generally, it is bad practice for a package import
-   * to contain a "..". For example, a source file should not contain a
-   * directive such as `import 'package:foo/../some.dart'`.
-   */
-  static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = HintCode(
-      'PACKAGE_IMPORT_CONTAINS_DOT_DOT',
-      "A package import shouldn't contain '..'.");
-
-  /**
-   * It is not an error to call or tear-off a method, setter, or getter, or to
-   * read or write a field, on a receiver of static type `Never`.
-   * Implementations that provide feedback about dead or unreachable code are
-   * encouraged to indicate that any arguments to the invocation are
-   * unreachable.
-   *
-   * It is not an error to apply an expression of type `Never` in the function
-   * position of a function call. Implementations that provide feedback about
-   * dead or unreachable code are encouraged to indicate that any arguments to
-   * the call are unreachable.
-   *
-   * Parameters: none
-   */
-  static const HintCode RECEIVER_OF_TYPE_NEVER = HintCode(
-      'RECEIVER_OF_TYPE_NEVER',
-      "The receiver is of type 'Never', and will never complete with a value.",
-      correction: "Try checking for throw expressions or type errors in the "
-          "receiver");
-
-  /**
-   * Users should not return values marked `@doNotStore` from functions,
-   * methods or getters not marked `@doNotStore`.
-   */
-  static const HintCode RETURN_OF_DO_NOT_STORE = HintCode(
-      'RETURN_OF_DO_NOT_STORE',
-      "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless "
-          "'{1}' is also annotated.",
-      correction: "Annotate '{1}' with 'doNotStore'.");
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the type of the Future
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation of
-  // `Future.catchError` has an argument whose return type isn't compatible with
-  // the type returned by the instance of `Future`. At runtime, the method
-  // `catchError` attempts to return the value from the callback as the result
-  // of the future, which results in another exception being thrown.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `future` is declared to
-  // return an `int` while `callback` is declared to return a `String`, and
-  // `String` isn't a subtype of `int`:
-  //
-  // ```dart
-  // void f(Future<int> future, String Function(dynamic, StackTrace) callback) {
-  //   future.catchError([!callback!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` returns an `int` while `future` is declared to
-  // return a `String`:
-  //
-  // ```dart
-  // void f(Future<String> future) {
-  //   future.catchError((error, stackTrace) => [!3!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the instance of `Future` is declared correctly, then change the callback
-  // to match:
-  //
-  // ```dart
-  // void f(Future<int> future, int Function(dynamic, StackTrace) callback) {
-  //   future.catchError(callback);
-  // }
-  // ```
-  //
-  // If the declaration of the instance of `Future` is wrong, then change it to
-  // match the callback:
-  //
-  // ```dart
-  // void f(Future<String> future, String Function(dynamic, StackTrace) callback) {
-  //   future.catchError(callback);
-  // }
-  // ```
-  static const HintCode RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR = HintCode(
-      'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
-      "A value of type '{0}' can't be returned by the 'onError' handler "
-          "because it must be assignable to '{1}'.",
-      hasPublishedDocs: true,
-      uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR');
-
-  /**
-   * Parameters:
-   * 0: the return type of the function
-   * 1: the expected return type as defined by the type of the Future
-   */
-  static const HintCode RETURN_TYPE_INVALID_FOR_CATCH_ERROR = HintCode(
-      'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
-      "The return type '{0}' isn't assignable to '{1}', as required by "
-          "'Future.catchError'.",
-      hasPublishedDocs: true,
-      uniqueName: 'RETURN_TYPE_INVALID_FOR_CATCH_ERROR');
-
-  /**
-   * No parameters.
-   */
-  // #### 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
-  // earlier versions, these classes weren't defined in `dart:core`, so the
-  // import was necessary.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.1.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.0.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // void f([!Future!] f) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the classes to be referenced:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then import the
-  // `dart:async` library.
-  //
-  // ```dart
-  // import 'dart:async';
-  //
-  // void f(Future f) {}
-  // ```
-  static const HintCode SDK_VERSION_ASYNC_EXPORTED_FROM_CORE = HintCode(
-      'SDK_VERSION_ASYNC_EXPORTED_FROM_CORE',
-      "The class '{0}' wasn't exported from 'dart:core' until version 2.1, "
-          "but this code is required to be able to run on earlier versions.",
-      correction:
-          "Try either importing 'dart:async' or 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][] 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
-  //
-  // 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 bool a = true;
-  // const bool b = false;
-  // const bool c = a [!&!] b;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operators 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 these operators, or change the code so that the expression
-  // isn't in a [constant context][]:
-  //
-  // ```dart
-  // const bool a = true;
-  // const bool b = false;
-  // bool c = a & b;
-  // ```
-  static const HintCode SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT',
-      "The use of the operator '{0}' for 'bool' operands in a constant context "
-          "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);
-
-  /**
-   * A constructor cannot be torn off without the 'constructor-tearoffs'
-   * language feature.
-   *
-   * There is also a [ParserError.EXPERIMENT_NOT_ENABLED] code which catches
-   * some cases of constructor tearoff features (like `List<int>.filled;`).
-   * Other constructor tearoff cases are not realized until resolution
-   * (like `List.filled;`).
-   */
-  static const HintCode SDK_VERSION_CONSTRUCTOR_TEAROFFS = HintCode(
-      'SDK_VERSION_CONSTRUCTOR_TEAROFFS',
-      "Tearing off a constructor requires the 'constructor-tearoffs' "
-          "language feature.",
-      // TODO(srawlins): Update this text to something like "Try updating
-      // your pubspec.yaml to set the minimum SDK constraint to 2.14 or
-      // higher, and running 'pub get'."
-      correction: "Try enabling the experiment by including "
-          "'--enable-experiment=constructor-tearoffs' in the 'dart' command.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the operator `==` is used on a
-  // 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
-  //
-  // 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
-  // %language=2.9
-  // class C {}
-  // const C a = null;
-  // const C b = null;
-  // const bool same = a [!==!] b;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operator 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 the `==` operator, or change the code so that the
-  // expression isn't in a [constant context][]:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {}
-  // const C a = null;
-  // const C b = null;
-  // bool same = a == b;
-  // ```
-  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
-      "Using the operator '==' for non-primitive types 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 an extension declaration or an
-  // extension override is found in code that has an SDK constraint whose lower
-  // bound is less than 2.6.0. Using extensions 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.6.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //  sdk: '>=2.4.0 <2.7.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // [!extension!] E on String {
-  //   void sayHello() {
-  //     print('Hello $this');
-  //   }
-  // }
-  // ```
-  //
-  // #### 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.6.0 <2.7.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of extensions. The most common way to do this is to rewrite
-  // the members of the extension as top-level functions (or methods) that take
-  // the value that would have been bound to `this` as a parameter:
-  //
-  // ```dart
-  // void sayHello(String s) {
-  //   print('Hello $s');
-  // }
-  // ```
-  static const HintCode SDK_VERSION_EXTENSION_METHODS = HintCode(
-      'SDK_VERSION_EXTENSION_METHODS',
-      "Extension methods weren't supported until version 2.6.0, "
-          "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 the operator `>>>` is used in
-  // code that has an SDK constraint whose lower bound is less than 2.X.0. This
-  // operator 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.X.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //  sdk: '>=2.0.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // int x = 3 [!>>>!] 4;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operator to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not use the `>>>` operator:
-  //
-  // ```dart
-  // int x = logicalShiftRight(3, 4);
-  //
-  // int logicalShiftRight(int leftOperand, int rightOperand) {
-  //   int divisor = 1 << rightOperand;
-  //   if (divisor == 0) {
-  //     return 0;
-  //   }
-  //   return leftOperand ~/ divisor;
-  // }
-  // ``` */
-  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = HintCode(
-      'SDK_VERSION_GT_GT_GT_OPERATOR',
-      "The operator '>>>' 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.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an `is` 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 `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
-  //
-  // 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 Object x = 4;
-  // const y = [!x is int!] ? 0 : 1;
-  // ```
-  //
-  // #### 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 the `is` operator, or, if that isn't possible, change the
-  // code so that the `is` expression isn't in a
-  // [constant context][]:
-  //
-  // ```dart
-  // const Object x = 4;
-  // var y = x is int ? 0 : 1;
-  // ```
-  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
-      "The use of an is expression in a constant context 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 a reference to the class `Never`
-  // is found in code that has an SDK constraint whose lower bound is less than
-  // 2.12.0. This class wasn't defined 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.12.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.5.0 <2.6.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // [!Never!] n;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the type to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.12.0 <2.13.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not reference this class:
-  //
-  // ```dart
-  // dynamic x;
-  // ```
-  static const HintCode SDK_VERSION_NEVER = HintCode(
-      'SDK_VERSION_NEVER',
-      "The type 'Never' wasn't supported until version 2.12.0, 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 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
-  // 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.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.2.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // var digits = [[!for (int i = 0; i < 10; i++) i!]];
-  // ```
-  //
-  // #### 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.3.0 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of those elements:
-  //
-  // ```dart
-  // var digits = _initializeDigits();
-  //
-  // List<int> _initializeDigits() {
-  //   var digits = <int>[];
-  //   for (int i = 0; i < 10; i++) {
-  //     digits.add(i);
-  //   }
-  //   return digits;
-  // }
-  // ```
-  static const HintCode SDK_VERSION_UI_AS_CODE = HintCode(
-      'SDK_VERSION_UI_AS_CODE',
-      "The for, if, and spread elements weren't supported until version 2.3.0, "
-          "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 an if or spread element inside
-  // 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
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.5.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.4.0 <2.6.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // const b = [[!...a!]];
-  // ```
-  //
-  // #### 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.5.0 <2.6.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of those elements:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // const b = [1, 2];
-  // ```
-  //
-  // If that isn't possible, change the code so that the element isn't in a
-  // [constant context][]:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // var b = [...a];
-  // ```
-  static const HintCode SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT',
-      "The if and spread elements weren't supported in constant expressions "
-          "until version 2.5.0, but this code is required to be able to run on "
-          "earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * When "strict-raw-types" is enabled, "raw types" must have type arguments.
-   *
-   * A "raw type" is a type name that does not use inference to fill in missing
-   * type arguments; instead, each type argument is instantiated to its bound.
-   */
-  static const HintCode STRICT_RAW_TYPE = HintCode('STRICT_RAW_TYPE',
-      "The generic type '{0}' should have explicit type arguments but doesn't.",
-      correction: "Use explicit type arguments for '{0}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the sealed class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a sealed class (one that either
-  // has the `@sealed` annotation or inherits or mixes in a sealed class) is
-  // referenced in either the `extends`, `implements`, or `with` clause of a
-  // class or mixin declaration if the declaration isn't in the same package as
-  // the sealed class.
-  //
-  // #### Example
-  //
-  // Given a library in a package other than the package being analyzed that
-  // contains the following:
-  //
-  // ```dart
-  // %uri="package:a/a.dart"
-  // import 'package:meta/meta.dart';
-  //
-  // class A {}
-  //
-  // @sealed
-  // class B {}
-  // ```
-  //
-  // The following code produces this diagnostic because `C`, which isn't in the
-  // same package as `B`, is extending the sealed class `B`:
-  //
-  // ```dart
-  // import 'package:a/a.dart';
-  //
-  // [!class C extends B {}!]
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the class doesn't need to be a subtype of the sealed class, then change
-  // the declaration so that it isn't:
-  //
-  // ```dart
-  // import 'package:a/a.dart';
-  //
-  // class B extends A {}
-  // ```
-  //
-  // If the class needs to be a subtype of the sealed class, then either change
-  // the sealed class so that it's no longer sealed or move the subclass into
-  // the same package as the sealed class.
-  static const HintCode SUBTYPE_OF_SEALED_CLASS = HintCode(
-      'SUBTYPE_OF_SEALED_CLASS',
-      "The class '{0}' shouldn't be extended, mixed in, or implemented because "
-          "it's sealed.",
-      correction:
-          "Try composing instead of inheriting, or refer to the documentation "
-          "of '{0}' for more information.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's a type check (using the
-  // `as` operator) where the type is `Null`. There's only one value whose type
-  // is `Null`, so the code is both more readable and more performant when it
-  // tests for `null` explicitly.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the code is testing to
-  // see whether the value of `s` is `null` by using a type check:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if ([!s is Null!]) {
-  //     return;
-  //   }
-  //   print(s);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the code is testing to
-  // see whether the value of `s` is something other than `null` by using a type
-  // check:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if ([!s is! Null!]) {
-  //     print(s);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the type check with the equivalent comparison with `null`:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if (s == null) {
-  //     return;
-  //   }
-  //   print(s);
-  // }
-  // ```
-  static const HintCode TYPE_CHECK_IS_NOT_NULL = HintCode(
-      'TYPE_CHECK_WITH_NULL',
-      "Tests for non-null should be done with '!= null'.",
-      correction: "Try replacing the 'is! Null' check with '!= null'.",
-      hasPublishedDocs: true,
-      uniqueName: 'TYPE_CHECK_IS_NOT_NULL');
-
-  /**
-   * No parameters.
-   */
-  static const HintCode TYPE_CHECK_IS_NULL = HintCode(
-      'TYPE_CHECK_WITH_NULL', "Tests for null should be done with '== null'.",
-      correction: "Try replacing the 'is Null' check with '== null'.",
-      hasPublishedDocs: true,
-      uniqueName: 'TYPE_CHECK_IS_NULL');
-
-  /**
-   * Parameters:
-   * 0: the name of the library being imported
-   * 1: the name in the hide clause that isn't defined in the library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a hide combinator includes a
-  // name that isn't defined by the library being imported.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `dart:math` doesn't
-  // define the name `String`:
-  //
-  // ```dart
-  // import 'dart:math' hide [!String!], max;
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different name should be hidden, then correct the name. Otherwise,
-  // remove the name from the list:
-  //
-  // ```dart
-  // import 'dart:math' hide max;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNDEFINED_HIDDEN_NAME = HintCode(
-      'UNDEFINED_HIDDEN_NAME',
-      "The library '{0}' doesn't export a member with the hidden name '{1}'.",
-      correction: "Try removing the name from the list of hidden members.",
-      hasPublishedDocs: true);
-
-  /**
-   * This hint is generated when an `@UnusedResult.unless` annotation
-   * references an undefined parameter.
-   *
-   * Parameters:
-   * 0: the name of the undefined parameter
-   * 1: the name of the targeted member
-   */
-  static const HintCode UNDEFINED_REFERENCED_PARAMETER = HintCode(
-      'UNDEFINED_REFERENCED_PARAMETER',
-      "The parameter '{0}' is not defined by '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the library being imported
-   * 1: the name in the show clause that isn't defined in the library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a show combinator includes a
-  // name that isn't defined by the library being imported.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `dart:math` doesn't
-  // define the name `String`:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!String!];
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different name should be shown, then correct the name. Otherwise,
-  // remove the name from the list:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNDEFINED_SHOWN_NAME = HintCode('UNDEFINED_SHOWN_NAME',
-      "The library '{0}' doesn't export a member with the shown name '{1}'.",
-      correction: "Try removing the name from the list of shown members.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-diagnostic being ignored
-   */
-  static const HintCode UNIGNORABLE_IGNORE = HintCode(
-      'UNIGNORABLE_IGNORE', "The diagnostic '{0}' can't be ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value being cast is already
-  // known to be of the type that it's being cast to.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `n` is already known to
-  // be an `int` as a result of the `is` test:
-  //
-  // ```dart
-  // void f(num n) {
-  //   if (n is int) {
-  //     ([!n as int!]).isEven;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary cast:
-  //
-  // ```dart
-  // void f(num n) {
-  //   if (n is int) {
-  //     n.isEven;
-  //   }
-  // }
-  // ```
-  static const HintCode UNNECESSARY_CAST = HintCode(
-      'UNNECESSARY_CAST', "Unnecessary cast.",
-      correction: "Try removing the cast.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the diagnostic being ignored
-   */
-  static const HintCode UNNECESSARY_IGNORE = HintCode(
-      'UNNECESSARY_IGNORE',
-      "The diagnostic '{0}' isn't produced at this location so it doesn't "
-          "need to be ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.");
-
-  static const HintCode UNNECESSARY_IMPORT = HintCode(
-      'UNNECESSARY_IMPORT',
-      "The import of '{0}' is unnecessary as all of the used elements are also "
-          "provided by the import of '{1}'.",
-      correction: 'Try removing the import directive.');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's a declaration of
-  // `noSuchMethod`, the only thing the declaration does is invoke the
-  // overridden declaration, and the overridden declaration isn't the
-  // declaration in `Object`.
-  //
-  // Overriding the implementation of `Object`'s `noSuchMethod` (no matter what
-  // the implementation does) signals to the analyzer that it shouldn't flag any
-  // inherited abstract methods that aren't implemented in that class. This
-  // works even if the overriding implementation is inherited from a superclass,
-  // so there's no value to declare it again in a subclass.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the declaration of
-  // `noSuchMethod` in `A` makes the declaration of `noSuchMethod` in `B`
-  // unnecessary:
-  //
-  // ```dart
-  // class A {
-  //   @override
-  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
-  // }
-  // class B extends A {
-  //   @override
-  //   dynamic [!noSuchMethod!](y) {
-  //     return super.noSuchMethod(y);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary declaration:
-  //
-  // ```dart
-  // class A {
-  //   @override
-  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
-  // }
-  // class B extends A {}
-  // ```
-  static const HintCode UNNECESSARY_NO_SUCH_METHOD = HintCode(
-      'UNNECESSARY_NO_SUCH_METHOD', "Unnecessary 'noSuchMethod' declaration.",
-      correction: "Try removing the declaration of 'noSuchMethod'.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an equality comparison
-  // (either `==` or `!=`) with one operand of `null` and the other operand
-  // can't be `null`. Such comparisons are always either `true` or `false`, so
-  // they serve no purpose.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` can never be
-  // `null`, so the comparison always evaluates to `true`:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if (x [!!= null!]) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `x` can never be
-  // `null`, so the comparison always evaluates to `false`:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if (x [!== null!]) {
-  //     throw ArgumentError("x can't be null");
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the other operand should be able to be `null`, then change the type of
-  // the operand:
-  //
-  // ```dart
-  // void f(int? x) {
-  //   if (x != null) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  //
-  // If the other operand really can't be `null`, then remove the condition:
-  //
-  // ```dart
-  // void f(int x) {
-  //   print(x);
-  // }
-  // ```
-  static const HintCode UNNECESSARY_NULL_COMPARISON_FALSE = HintCode(
-    'UNNECESSARY_NULL_COMPARISON',
-    "The operand can't be null, so the condition is always false.",
-    correction: "Try removing the condition, an enclosing condition, "
-        "or the whole conditional statement.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_NULL_COMPARISON_FALSE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode UNNECESSARY_NULL_COMPARISON_TRUE = HintCode(
-    'UNNECESSARY_NULL_COMPARISON',
-    "The operand can't be null, so the condition is always true.",
-    correction: "Remove the condition.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_NULL_COMPARISON_TRUE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type
-   */
-  static const HintCode UNNECESSARY_QUESTION_MARK = HintCode(
-      'UNNECESSARY_QUESTION_MARK',
-      "The '?' is unnecessary because '{0}' is nullable without it.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of a type check (using
-  // either `is` or `is!`) is known at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the test `a is Object?`
-  // is always `true`:
-  //
-  // ```dart
-  // bool f<T>(T a) => [!a is Object?!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type check doesn't check what you intended to check, then change the
-  // test:
-  //
-  // ```dart
-  // bool f<T>(T a) => a is Object;
-  // ```
-  //
-  // If the type check does check what you intended to check, then replace the
-  // type check with its known value or completely remove it:
-  //
-  // ```dart
-  // bool f<T>(T a) => true;
-  // ```
-  static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = HintCode(
-    'UNNECESSARY_TYPE_CHECK',
-    "Unnecessary type check; the result is always 'false'.",
-    correction: "Try correcting the type check, or removing the type check.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_TYPE_CHECK_FALSE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = HintCode(
-    'UNNECESSARY_TYPE_CHECK',
-    "Unnecessary type check; the result is always 'true'.",
-    correction: "Try correcting the type check, or removing the type check.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_TYPE_CHECK_TRUE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the exception variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found, and
-  // neither the exception parameter nor the optional stack trace parameter are
-  // used in the `catch` block.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `e` isn't referenced:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     int.parse(';');
-  //   } on FormatException catch ([!e!]) {
-  //     // ignored
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unused `catch` clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     int.parse(';');
-  //   } on FormatException {
-  //     // ignored
-  //   }
-  // }
-  // ```
-  static const HintCode UNUSED_CATCH_CLAUSE = HintCode(
-      'UNUSED_CATCH_CLAUSE',
-      "The exception variable '{0}' isn't used, so the 'catch' clause can be "
-          "removed.",
-      // TODO(brianwilkerson) Split this error code so that we can differentiate
-      // between removing the catch clause and replacing the catch clause with
-      // an on clause.
-      correction: "Try removing the catch clause.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the stack trace variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the stack trace parameter in a
-  // `catch` clause isn't referenced within the body of the `catch` block.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `stackTrace` isn't
-  // referenced:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } catch (exception, [!stackTrace!]) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the stack trace parameter, then add a reference to
-  // it. Otherwise, remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } catch (exception) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const HintCode UNUSED_CATCH_STACK = HintCode('UNUSED_CATCH_STACK',
-      "The stack trace variable '{0}' isn't used and can be removed.",
-      correction: "Try removing the stack trace variable, or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name that is declared but not referenced
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a private declaration isn't
-  // referenced in the library that contains the declaration. The following
-  // kinds of declarations are analyzed:
-  // - Private top-level declarations, such as classes, enums, mixins, typedefs,
-  //   top-level variables, and top-level functions
-  // - Private static and instance methods
-  // - Optional parameters of private functions for which a value is never
-  //   passed, even when the parameter doesn't have a private name
-  //
-  // #### Examples
-  //
-  // Assuming that no code in the library references `_C`, the following code
-  // produces this diagnostic:
-  //
-  // ```dart
-  // class [!_C!] {}
-  // ```
-  //
-  // Assuming that no code in the library passes a value for `y` in any
-  // invocation of `_m`, the following code produces this diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   void _m(int x, [int [!y!]]) {}
-  //
-  //   void n() => _m(0);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the declaration isn't needed, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   void _m(int x) {}
-  //
-  //   void n() => _m(0);
-  // }
-  // ```
-  //
-  // If the declaration is intended to be used, then add the code to use it.
-  static const HintCode UNUSED_ELEMENT = HintCode(
-      'UNUSED_ELEMENT', "The declaration '{0}' isn't referenced.",
-      correction: "Try removing the declaration of '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the parameter that is declared but not used
-   */
-  static const HintCode UNUSED_ELEMENT_PARAMETER = HintCode(
-    'UNUSED_ELEMENT',
-    "A value for optional parameter '{0}' isn't ever given.",
-    correction: "Try removing the unused parameter.",
-    hasPublishedDocs: true,
-    uniqueName: 'HintCode.UNUSED_ELEMENT_PARAMETER',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the unused field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a private field is declared but
-  // never read, even if it's written in one or more places.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `_x` isn't referenced
-  // anywhere in the library:
-  //
-  // ```dart
-  // %language=2.9
-  // class Point {
-  //   int [!_x!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field isn't needed, then remove it.
-  //
-  // If the field was intended to be used, then add the missing code.
-  static const HintCode UNUSED_FIELD = HintCode(
-      'UNUSED_FIELD', "The value of the field '{0}' isn't used.",
-      correction: "Try removing the field, or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the content of the unused import's uri
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import isn't needed because
-  // none of the names that are imported are referenced within the importing
-  // library.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because nothing defined in
-  // `dart:async` is referenced in the library:
-  //
-  // ```dart
-  // import [!'dart:async'!];
-  //
-  // void main() {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the import isn't needed, then remove it.
-  //
-  // If some of the imported names are intended to be used, then add the missing
-  // code.
-  static const HintCode UNUSED_IMPORT = HintCode(
-      'UNUSED_IMPORT', "Unused import: '{0}'.",
-      correction: "Try removing the import directive.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the label that isn't used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a label that isn't used is
-  // found.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the label `loop` isn't
-  // referenced anywhere in the method:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   [!loop:!] for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the label isn't needed, then remove it:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //   }
-  // }
-  // ```
-  //
-  // If the label is needed, then use it:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   loop: for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //     break loop;
-  //   }
-  // }
-  // ```
-  // TODO(brianwilkerson) Highlight the identifier without the colon.
-  static const HintCode UNUSED_LABEL =
-      HintCode('UNUSED_LABEL', "The label '{0}' isn't used.",
-          correction: "Try removing the label, or "
-              "using it in either a 'break' or 'continue' statement.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the unused variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable is declared but
-  // never read, even if it's written in one or more places.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `count` is
-  // never read:
-  //
-  // ```dart
-  // void main() {
-  //   int [!count!] = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the variable isn't needed, then remove it.
-  //
-  // If the variable was intended to be used, then add the missing code.
-  static const HintCode UNUSED_LOCAL_VARIABLE = HintCode(
-      'UNUSED_LOCAL_VARIABLE',
-      "The value of the local variable '{0}' isn't used.",
-      correction: "Try removing the variable or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * The result of invoking a method, property, or function annotated with
-   * `@useResult` must be used (assigned, passed to a function as an argument,
-   * or returned by a function).
-   *
-   * Parameters:
-   * 0: the name of the annotated method, property or function
-   */
-  static const HintCode UNUSED_RESULT = HintCode(
-    'UNUSED_RESULT',
-    "'{0}' should be used.",
-    correction: "Try using the result by invoking a member, passing it to a "
-        "function, or returning it from this function.",
-    hasPublishedDocs: false,
-  );
-
-  /**
-   * The result of invoking a method, property, or function annotated with
-   * `@useResult` must be used (assigned, passed to a function as an argument,
-   * or returned by a function).
-   *
-   * Parameters:
-   * 0: the name of the annotated method, property or function
-   * 1: message details
-   */
-  static const HintCode UNUSED_RESULT_WITH_MESSAGE = HintCode(
-    'UNUSED_RESULT',
-    "'{0}' should be used. {1}.",
-    // todo(pq): consider passing in correction details:
-    // https://github.com/dart-lang/sdk/issues/46066
-    correction:
-        "Try using the result by invoking a member, passing it to a function, "
-        "or returning it from this function.",
-    hasPublishedDocs: false,
-    uniqueName: 'HintCode.UNUSED_RESULT_WITH_MESSAGE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name that is shown but not used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a show combinator includes a
-  // name that isn't used within the library. Because it isn't referenced, the
-  // name can be removed.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the function `max`
-  // isn't used:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!max!];
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either use the name or remove it:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNUSED_SHOWN_NAME = HintCode(
-      'UNUSED_SHOWN_NAME', "The name {0} is shown, but isn’t used.",
-      correction: "Try removing the name from the list of shown members.",
-      hasPublishedDocs: true);
-
-  /**
-   * Users should not import or export Dart native extensions via 'dart-ext:'.
-   */
-  static const HintCode USE_OF_NATIVE_EXTENSION = HintCode(
-      'USE_OF_NATIVE_EXTENSION',
-      "Dart native extensions are deprecated and will not be available in Dart "
-          "2.15",
-      correction: "Try using dart:ffi for C interop.");
-
-  /**
-   * 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 HintCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'HintCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
-
-  @override
-  ErrorType get type => ErrorType.HINT;
-}
+export 'package:analyzer/src/dart/error/hint_codes.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
new file mode 100644
index 0000000..f1f850a
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
@@ -0,0 +1,3916 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+import "package:analyzer/src/error/analyzer_error_code.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class HintCode extends AnalyzerErrorCode {
+  /**
+   * Parameters:
+   * 0: the name of the actual argument type
+   * 1: the name of the expected function return type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation of
+  // `Future.catchError` has an argument that is a function whose parameters
+  // aren't compatible with the arguments that will be passed to the function
+  // when it's invoked. The static type of the first argument to `catchError`
+  // is just `Function`, even though the function that is passed in is expected
+  // to have either a single parameter of type `Object` or two parameters of
+  // type `Object` and `StackTrace`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` doesn't take any parameters, but the function is
+  // required to take at least one parameter:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!() => 0!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` takes three parameters, but it can't have more than
+  // two required parameters:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!(one, two, three) => 0!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because even though the closure
+  // being passed to `catchError` takes one parameter, the closure doesn't have
+  // a type that is compatible with `Object`:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!(String error) => 0!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the function being passed to `catchError` so that it has either one
+  // or two required parameters, and the parameters have the required types:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError((Object error) => 0);
+  // }
+  // ```
+  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER =
+      HintCode(
+    'ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER',
+    "The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Users should not assign values marked `@doNotStore`.
+   */
+  static const HintCode ASSIGNMENT_OF_DO_NOT_STORE = HintCode(
+    'ASSIGNMENT_OF_DO_NOT_STORE',
+    "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.",
+    correction: "Try removing the assignment.",
+  );
+
+  /**
+   * When the target expression uses '?.' operator, it can be `null`, so all the
+   * subsequent invocations should also use '?.' operator.
+   */
+  static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = HintCode(
+    'CAN_BE_NULL_AFTER_NULL_AWARE',
+    "The receiver uses '?.', so its value can be null.",
+    correction: "Replace the '.' with a '?.' in the invocation.",
+  );
+
+  /**
+   * Dead code is code that is never reached, this can happen for instance if a
+   * statement follows a return statement.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when code is found that won't be
+  // executed because execution will never reach the code.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the invocation of
+  // `print` occurs after the function has returned:
+  //
+  // ```dart
+  // void f() {
+  //   return;
+  //   [!print('here');!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the code isn't needed, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   return;
+  // }
+  // ```
+  //
+  // If the code needs to be executed, then either move the code to a place
+  // where it will be executed:
+  //
+  // ```dart
+  // void f() {
+  //   print('here');
+  //   return;
+  // }
+  // ```
+  //
+  // Or, rewrite the code before it, so that it can be reached:
+  //
+  // ```dart
+  // void f({bool skipPrinting = true}) {
+  //   if (skipPrinting) {
+  //     return;
+  //   }
+  //   print('here');
+  // }
+  // ```
+  static const HintCode DEAD_CODE = HintCode(
+    'DEAD_CODE',
+    "Dead code.",
+    correction:
+        "Try removing the code, or fixing the code before it so that it can be reached.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Dead code is code that is never reached. This case covers cases where the
+   * user has catch clauses after `catch (e)` or `on Object catch (e)`.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it’s after a `catch` clause of the form
+  // `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
+  // the thrown object is selected, and both of those forms will match any
+  // object, so no `catch` clauses that follow them will be selected.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } catch (e) {
+  //   } [!on String {
+  //   }!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the clause should be selectable, then move the clause before the general
+  // clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on String {
+  //   } catch (e) {
+  //   }
+  // }
+  // ```
+  //
+  // If the clause doesn't need to be selectable, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } catch (e) {
+  //   }
+  // }
+  // ```
+  static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = HintCode(
+    'DEAD_CODE_CATCH_FOLLOWING_CATCH',
+    "Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached.",
+    correction:
+        "Try reordering the catch clauses so that they can be reached, or removing the unreachable catch clauses.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Dead code is code that is never reached. This case covers cases where the
+   * user has an on-catch clause such as `on A catch (e)`, where a supertype of
+   * `A` was already caught.
+   *
+   * Parameters:
+   * 0: name of the subtype
+   * 1: name of the supertype
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it is after a `catch` clause that catches either
+  // the same type or a supertype of the clause's type. The first `catch` clause
+  // that matches the thrown object is selected, and the earlier clause always
+  // matches anything matchable by the highlighted clause, so the highlighted
+  // clause will never be selected.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on num {
+  //   } [!on int {
+  //   }!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the clause should be selectable, then move the clause before the general
+  // clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on int {
+  //   } on num {
+  //   }
+  // }
+  // ```
+  //
+  // If the clause doesn't need to be selectable, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on num {
+  //   }
+  // }
+  // ```
+  static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = HintCode(
+    'DEAD_CODE_ON_CATCH_SUBTYPE',
+    "Dead code: This on-catch block won’t be executed because '{0}' is a subtype of '{1}' and hence will have been caught already.",
+    correction:
+        "Try reordering the catch clauses so that this block can be reached, or removing the unreachable catch clause.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the class `Function` is used in
+  // either the `extends`, `implements`, or `with` clause of a class or mixin.
+  // Using the class `Function` in this way has no semantic value, so it's
+  // effectively dead code.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `Function` is used as
+  // the superclass of `F`:
+  //
+  // ```dart
+  // class F extends [!Function!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the class `Function` from whichever clause it's in, and remove the
+  // whole clause if `Function` is the only type in the clause:
+  //
+  // ```dart
+  // class F {}
+  // ```
+  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Extending 'Function' is deprecated.",
+    correction: "Try removing 'Function' from the 'extends' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_EXTENDS_FUNCTION',
+  );
+
+  /**
+   * Users should not create a class named `Function` anymore.
+   */
+  static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = HintCode(
+    'DEPRECATED_FUNCTION_CLASS_DECLARATION',
+    "Declaring a class named 'Function' is deprecated.",
+    correction: "Try renaming the class.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Implementing 'Function' has no effect.",
+    correction: "Try removing 'Function' from the 'implements' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_IMPLEMENTS_FUNCTION',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a deprecated library or class
+  // member is used in a different package.
+  //
+  // #### Examples
+  //
+  // If the method `m` in the class `C` is annotated with `@deprecated`, then
+  // the following code produces this diagnostic:
+  //
+  // ```dart
+  // void f(C c) {
+  //   c.[!m!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The documentation for declarations that are annotated with `@deprecated`
+  // should indicate what code to use in place of the deprecated code.
+  static const HintCode DEPRECATED_MEMBER_USE = HintCode(
+    'DEPRECATED_MEMBER_USE',
+    "'{0}' is deprecated and shouldn't be used.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a deprecated library member or
+  // class member is used in the same package in which it's declared.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is deprecated:
+  //
+  // ```dart
+  // @deprecated
+  // var x = 0;
+  // var y = [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The fix depends on what's been deprecated and what the replacement is. The
+  // documentation for deprecated declarations should indicate what code to use
+  // in place of the deprecated code.
+  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE = HintCode(
+    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
+    "'{0}' is deprecated and shouldn't be used.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   * 1: message details
+   */
+  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE =
+      HintCode(
+    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
+    "'{0}' is deprecated and shouldn't be used. {1}.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   * 1: message details
+   */
+  static const HintCode DEPRECATED_MEMBER_USE_WITH_MESSAGE = HintCode(
+    'DEPRECATED_MEMBER_USE',
+    "'{0}' is deprecated and shouldn't be used. {1}.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MEMBER_USE_WITH_MESSAGE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode DEPRECATED_MIXIN_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Mixing in 'Function' is deprecated.",
+    correction: "Try removing 'Function' from the 'with' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MIXIN_FUNCTION',
+  );
+
+  /**
+   * Hint to use the ~/ operator.
+   */
+  static const HintCode DIVISION_OPTIMIZATION = HintCode(
+    'DIVISION_OPTIMIZATION',
+    "The operator x ~/ y is more efficient than (x / y).toInt().",
+    correction: "Try re-writing the expression to use the '~/' operator.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name occurs multiple times in
+  // a `hide` clause. Repeating the name is unnecessary.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `min` is
+  // hidden more than once:
+  //
+  // ```dart
+  // import 'dart:math' hide min, [!min!];
+  //
+  // var x = pi;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name was mistyped in one or more places, then correct the mistyped
+  // names:
+  //
+  // ```dart
+  // import 'dart:math' hide max, min;
+  //
+  // var x = pi;
+  // ```
+  //
+  // If the name wasn't mistyped, then remove the unnecessary name from the
+  // list:
+  //
+  // ```dart
+  // import 'dart:math' hide min;
+  //
+  // var x = pi;
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the diagnostic being ignored
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a diagnostic name appears in an
+  // `ignore` comment, but the diagnostic is already being ignored, either
+  // because it's already included in the same `ignore` comment or because it
+  // appears in an `ignore-in-file` comment.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the diagnostic named
+  // `unused_local_variable` is already being ignored for the whole file so it
+  // doesn't need to be ignored on a specific line:
+  //
+  // ```dart
+  // // ignore_for_file: unused_local_variable
+  // void f() {
+  //   // ignore: [!unused_local_variable!]
+  //   var x = 0;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the diagnostic named
+  // `unused_local_variable` is being ignored twice on the same line:
+  //
+  // ```dart
+  // void f() {
+  //   // ignore: unused_local_variable, [!unused_local_variable!]
+  //   var x = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the ignore comment, or remove the unnecessary diagnostic name if the
+  // ignore comment is ignoring more than one diagnostic:
+  //
+  // ```dart
+  // // ignore_for_file: unused_local_variable
+  // void f() {
+  //   var x = 0;
+  // }
+  // ```
+  static const HintCode DUPLICATE_IGNORE = HintCode(
+    'DUPLICATE_IGNORE',
+    "The diagnostic '{0}' doesn't need to be ignored here because it's already being ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Duplicate imports.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import directive is found
+  // that is the same as an import before it in the file. The second import
+  // doesn’t add value and should be removed.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  // import [!'package:meta/meta.dart'!];
+  //
+  // @sealed class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary import:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @sealed class C {}
+  // ```
+  static const HintCode DUPLICATE_IMPORT = HintCode(
+    'DUPLICATE_IMPORT',
+    "Duplicate import.",
+    correction: "Try removing all but one import of the library.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name occurs multiple times in
+  // a `show` clause. Repeating the name is unnecessary.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `min` is shown
+  // more than once:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!min!];
+  //
+  // var x = min(2, min(0, 1));
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name was mistyped in one or more places, then correct the mistyped
+  // names:
+  //
+  // ```dart
+  // import 'dart:math' show max, min;
+  //
+  // var x = max(2, min(0, 1));
+  // ```
+  //
+  // If the name wasn't mistyped, then remove the unnecessary name from the
+  // list:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(2, min(0, 1));
+  // ```
+  static const HintCode DUPLICATE_SHOWN_NAME = HintCode(
+    'DUPLICATE_SHOWN_NAME',
+    "Duplicate shown name.",
+    correction:
+        "Try removing the repeated name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an element in a non-constant set
+  // is the same as a previous element in the same set. If two elements are the
+  // same, then the second value is ignored, which makes having both elements
+  // pointless and likely signals a bug.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the element `1` appears
+  // twice:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 1;
+  // var s = <int>{a, [!b!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If both elements should be included in the set, then change one of the
+  // elements:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 2;
+  // var s = <int>{a, b};
+  // ```
+  //
+  // If only one of the elements is needed, then remove the one that isn't
+  // needed:
+  //
+  // ```dart
+  // const a = 1;
+  // var s = <int>{a};
+  // ```
+  //
+  // Note that literal sets preserve the order of their elements, so the choice
+  // of which element to remove might affect the order in which elements are
+  // returned by an iterator.
+  static const HintCode EQUAL_ELEMENTS_IN_SET = HintCode(
+    'EQUAL_ELEMENTS_IN_SET',
+    "Two elements in a set literal shouldn't be equal.",
+    correction: "Change or remove the duplicate element.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key in a non-constant map is
+  // the same as a previous key in the same map. If two keys are the same, then
+  // the second value overwrites the first value, which makes having both pairs
+  // pointless and likely signals a bug.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the keys `a` and `b`
+  // have the same value:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 1;
+  // var m = <int, String>{a: 'a', [!b!]: 'b'};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If both entries should be included in the map, then change one of the keys:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 2;
+  // var m = <int, String>{a: 'a', b: 'b'};
+  // ```
+  //
+  // If only one of the entries is needed, then remove the one that isn't
+  // needed:
+  //
+  // ```dart
+  // const a = 1;
+  // var m = <int, String>{a: 'a'};
+  // ```
+  //
+  // Note that literal maps preserve the order of their entries, so the choice
+  // of which entry to remove might affect the order in which the keys and
+  // values are returned by an iterator.
+  static const HintCode EQUAL_KEYS_IN_MAP = HintCode(
+    'EQUAL_KEYS_IN_MAP',
+    "Two keys in a map literal shouldn't be equal.",
+    correction: "Change or remove the duplicate key.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * It is a bad practice for a source file in a package "lib" directory
+   * hierarchy to traverse outside that directory hierarchy. For example, a
+   * source file in the "lib" directory should not contain a directive such as
+   * `import '../web/some.dart'` which references a file outside the lib
+   * directory.
+   */
+  static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE =
+      HintCode(
+    'FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE',
+    "A file in the 'lib' directory shouldn't import a file outside the 'lib' directory.",
+    correction:
+        "Try removing the import, or moving the imported file inside the 'lib' directory.",
+  );
+
+  /**
+   * It is a bad practice for a source file ouside a package "lib" directory
+   * hierarchy to traverse into that directory hierarchy. For example, a source
+   * file in the "web" directory should not contain a directive such as
+   * `import '../lib/some.dart'` which references a file inside the lib
+   * directory.
+   */
+  static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE =
+      HintCode(
+    'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE',
+    "A file outside the 'lib' directory shouldn't reference a file inside the 'lib' directory using a relative path.",
+    correction: "Try using a package: URI instead.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library that declares a
+  // function named `loadLibrary` is imported using a deferred import. A
+  // deferred import introduces an implicit function named `loadLibrary`. This
+  // function is used to load the contents of the deferred library, and the
+  // implicit function hides the explicit declaration in the deferred library.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines a function named `loadLibrary`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // void loadLibrary(Library library) {}
+  //
+  // class Library {}
+  // ```
+  //
+  // The following code produces this diagnostic because the implicit
+  // declaration of `a.loadLibrary` is hiding the explicit declaration of
+  // `loadLibrary` in `a.dart`:
+  //
+  // ```dart
+  // [!import 'a.dart' deferred as a;!]
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the imported library isn't required to be deferred, then remove the
+  // keyword `deferred`:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // If the imported library is required to be deferred and you need to
+  // reference the imported function, then rename the function in the imported
+  // library:
+  //
+  // ```dart
+  // void populateLibrary(Library library) {}
+  //
+  // class Library {}
+  // ```
+  //
+  // If the imported library is required to be deferred and you don't need to
+  // reference the imported function, then add a `hide` clause:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a hide loadLibrary;
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // If type arguments shouldn't be required for the class, then mark the class
+  // with the `@optionalTypeArgs` annotation (from `package:meta`):
+  static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = HintCode(
+    'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION',
+    "The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this library.",
+    correction:
+        "Try changing the import to not be deferred, or rename the function in the imported library.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * https://github.com/dart-lang/sdk/issues/44063
+   */
+  static const HintCode IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE = HintCode(
+    'IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE',
+    "The library '{0}' is legacy, and should not be imported into a null safe library.",
+    correction: "Try migrating the imported library.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, collection literal types must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_COLLECTION_LITERAL = HintCode(
+    'INFERENCE_FAILURE_ON_COLLECTION_LITERAL',
+    "The type argument(s) of '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in function invocations must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_INVOCATION = HintCode(
+    'INFERENCE_FAILURE_ON_FUNCTION_INVOCATION',
+    "The type argument(s) of the function '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, recursive local functions, top-level
+   * functions, methods, and function-typed function parameters must all
+   * specify a return type. See the strict-inference resource:
+   *
+   * https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md
+   */
+  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE = HintCode(
+    'INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE',
+    "The return type of '{0}' cannot be inferred.",
+    correction: "Declare the return type of '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in function invocations must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_GENERIC_INVOCATION = HintCode(
+    'INFERENCE_FAILURE_ON_GENERIC_INVOCATION',
+    "The type argument(s) of the generic function type '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in instance creation
+   * (constructor calls) must be inferred via the context type, or have type
+   * arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
+    'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
+    "The type argument(s) of the constructor '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" in enabled, uninitialized variables must be
+   * declared with a specific type.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE = HintCode(
+    'INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE',
+    "The type of {0} can't be inferred without either a type or initializer.",
+    correction: "Try specifying the type of the variable.",
+  );
+
+  /**
+   * When "strict-inference" in enabled, function parameters must be
+   * declared with a specific type, or inherit a type.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_UNTYPED_PARAMETER = HintCode(
+    'INFERENCE_FAILURE_ON_UNTYPED_PARAMETER',
+    "The type of {0} can't be inferred; a type must be explicitly provided.",
+    correction: "Try specifying the type of the parameter.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the annotation
+   * 1: the list of valid targets
+   */
+  static const HintCode INVALID_ANNOTATION_TARGET = HintCode(
+    'INVALID_ANNOTATION_TARGET',
+    "The annotation '{0}' can only be used on {1}",
+  );
+
+  /**
+   * This hint is generated anywhere where an element annotated with `@internal`
+   * is exported as a part of a package's public API.
+   *
+   * Parameters:
+   * 0: the name of the element
+   */
+  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT = HintCode(
+    'INVALID_EXPORT_OF_INTERNAL_ELEMENT',
+    "The member '{0}' can't be exported as a part of a package's public API.",
+    correction: "Try using a hide clause to hide '{0}'.",
+  );
+
+  /**
+   * This hint is generated anywhere where an element annotated with `@internal`
+   * is exported indirectly as a part of a package's public API.
+   *
+   * Parameters:
+   * 0: the name of the element
+   */
+  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY =
+      HintCode(
+    'INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY',
+    "The member '{0}' can't be exported as a part of a package's public API, but is indirectly exported as part of the signature of '{1}'.",
+    correction: "Try using a hide clause to hide '{0}'.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * anything other than a method.
+   */
+  static const HintCode INVALID_FACTORY_ANNOTATION = HintCode(
+    'INVALID_FACTORY_ANNOTATION',
+    "Only methods can be annotated as factories.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * a method that does not declare a return type.
+   */
+  static const HintCode INVALID_FACTORY_METHOD_DECL = HintCode(
+    'INVALID_FACTORY_METHOD_DECL',
+    "Factory method '{0}' must have a return type.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * a non-abstract method that can return anything other than a newly allocated
+   * object.
+   *
+   * Parameters:
+   * 0: the name of the method
+   */
+  static const HintCode INVALID_FACTORY_METHOD_IMPL = HintCode(
+    'INVALID_FACTORY_METHOD_IMPL',
+    "Factory method '{0}' doesn't return a newly allocated object.",
+  );
+
+  /**
+   * This hint is generated anywhere an @immutable annotation is associated with
+   * anything other than a class.
+   */
+  static const HintCode INVALID_IMMUTABLE_ANNOTATION = HintCode(
+    'INVALID_IMMUTABLE_ANNOTATION',
+    "Only classes can be annotated as being immutable.",
+  );
+
+  /**
+   * This hint is generated anywhere a @internal annotation is associated with
+   * an element found in a package's public API.
+   */
+  static const HintCode INVALID_INTERNAL_ANNOTATION = HintCode(
+    'INVALID_INTERNAL_ANNOTATION',
+    "Only public elements in a package's private API can be annotated as being internal.",
+  );
+
+  /**
+   * 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 = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override number must begin with '@dart'",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
+  );
+
+  /**
+   * 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 = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
+  );
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
+  );
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The language version override must be before any declaration or directive.",
+    correction:
+        "Try moving the language version override to the top of the file.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
+  );
+
+  /**
+   * 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 = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
+  );
+
+  /**
+   * 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 = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
+  );
+
+  /**
+   * 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 = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
+  );
+
+  /**
+   * 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 =
+      HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
+  );
+
+  /**
+   * 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 =
+      HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "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'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the `@literal` annotation is
+  // applied to anything other than a const constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the constructor isn't
+  // a `const` constructor:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   [!@literal!]
+  //   C();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `x` isn't a
+  // constructor:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@literal!]
+  // var x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the annotation is on a constructor and the constructor should always be
+  // invoked with `const`, when possible, then mark the constructor with the
+  // `const` keyword:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  // ```
+  //
+  // If the constructor can't be marked as `const`, then remove the annotation.
+  //
+  // If the annotation is on anything other than a constructor, then remove the
+  // annotation:
+  //
+  // ```dart
+  // var x;
+  // ```
+  static const HintCode INVALID_LITERAL_ANNOTATION = HintCode(
+    'INVALID_LITERAL_ANNOTATION',
+    "Only const constructors can have the `@literal` annotation.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * This hint is generated anywhere where `@nonVirtual` annotates something
+   * other than a non-abstract instance member in a class or mixin.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_NON_VIRTUAL_ANNOTATION = HintCode(
+    'INVALID_NON_VIRTUAL_ANNOTATION',
+    "The member '{0}' can't be '@nonVirtual' because it isn't a concrete instance member.",
+    correction: "Try removing @nonVirtual.",
+  );
+
+  /**
+   * This hint is generated anywhere where an instance member annotated with
+   * `@nonVirtual` is overridden in a subclass.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER = HintCode(
+    'INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER',
+    "The member '{0}' is declared non-virtual in '{1}' and can't be overridden in subclasses.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates a named
+   * parameter with a default value.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_NAMED_PARAM = HintCode(
+    'INVALID_REQUIRED_NAMED_PARAM',
+    "The type parameter '{0}' is annotated with @required but only named parameters without a default value can be annotated with it.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates an optional
+   * positional parameter.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM = HintCode(
+    'INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM',
+    "Incorrect use of the annotation @required on the optional positional parameter '{0}'. Optional positional parameters cannot be required.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates a non optional
+   * positional parameter.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_POSITIONAL_PARAM = HintCode(
+    'INVALID_REQUIRED_POSITIONAL_PARAM',
+    "Redundant use of the annotation @required on the required positional parameter '{0}'.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@sealed` annotates something other
+   * than a class.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_SEALED_ANNOTATION = HintCode(
+    'INVALID_SEALED_ANNOTATION',
+    "The member '{0}' is annotated with '@sealed' but only classes can be annotated with it.",
+    correction: "Remove @sealed.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with `@internal`
+   * is used outside of the package in which it is declared.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_USE_OF_INTERNAL_MEMBER = HintCode(
+    'INVALID_USE_OF_INTERNAL_MEMBER',
+    "The member '{0}' can only be used within its package.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with `@protected`
+   * is used outside of an instance member of a subclass.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = HintCode(
+    'INVALID_USE_OF_PROTECTED_MEMBER',
+    "The member '{0}' can only be used within instance members of subclasses of '{1}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance member that is
+  // annotated with `visibleForOverriding` is referenced outside the library in
+  // which it's declared for any reason other than to override it.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` containing the following declaration:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @visibleForOverriding
+  //   void a() {}
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the method `m` is being
+  // invoked even though the only reason it's public is to allow it to be
+  // overridden:
+  //
+  // ```dart
+  // import 'a.dart';
+  //
+  // class B extends A {
+  //   void b() {
+  //     [!a!]();
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the invalid use of the member.
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER',
+    "The member '{0}' can only be used for overriding.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with
+   * `@visibleForTemplate` is used outside of a "template" Dart file.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER',
+    "The member '{0}' can only be used within '{1}' or a template library.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with
+   * `@visibleForTesting` is used outside the defining library, or a test.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER',
+    "The member '{0}' can only be used within '{1}' or a test.",
+  );
+
+  /**
+   * This hint is generated anywhere where a private declaration is annotated
+   * with `@visibleForTemplate` or `@visibleForTesting`.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the annotation
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the `@visibleForTemplate`
+  // or `@visibleForTesting` annotation is applied to a non-public declaration.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@visibleForTesting!]
+  // void _someFunction() {}
+  //
+  // void f() => _someFunction();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the declaration doesn't need to be used by test code, then remove the
+  // annotation:
+  //
+  // ```dart
+  // void _someFunction() {}
+  //
+  // void f() => _someFunction();
+  // ```
+  //
+  // If it does, then make it public:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @visibleForTesting
+  // void someFunction() {}
+  //
+  // void f() => someFunction();
+  // ```
+  static const HintCode INVALID_VISIBILITY_ANNOTATION = HintCode(
+    'INVALID_VISIBILITY_ANNOTATION',
+    "The member '{0}' is annotated with '{1}', but this annotation is only meaningful on declarations of public members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when anything other than a public
+  // instance member of a class is annotated with `visibleForOverriding`.
+  // Because only public instance members can be overridden outside the defining
+  // library, there's no value to annotating any other declarations.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the annotation is on a
+  // class, and classes can't be overridden:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@visibleForOverriding!]
+  // class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the annotation:
+  //
+  // ```dart
+  // class C {}
+  // ```
+  static const HintCode INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION = HintCode(
+    'INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION',
+    "The declaration '{0}' is annotated with 'visibleForOverriding'. Because '{0}' isn't an interface member that could be overridden, the annotation is meaningless.",
+  );
+
+  /**
+   * Generate a hint for an element that is annotated with `@JS(...)` whose
+   * library declaration is not similarly annotated.
+   */
+  static const HintCode MISSING_JS_LIB_ANNOTATION = HintCode(
+    'MISSING_JS_LIB_ANNOTATION',
+    "The @JS() annotation can only be used if it is also declared on the library directive.",
+    correction: "Try adding the annotation to the library directive.",
+  );
+
+  /**
+   * Generate a hint for a constructor, function or method invocation where a
+   * required parameter is missing.
+   *
+   * Parameters:
+   * 0: the name of the parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function with a
+  // named parameter that is annotated as being required is invoked without
+  // providing a value for the parameter.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the named parameter `x`
+  // is required:
+  //
+  // ```dart
+  // %language=2.9
+  // import 'package:meta/meta.dart';
+  //
+  // void f({@required int x}) {}
+  //
+  // void g() {
+  //   [!f!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Provide the required value:
+  //
+  // ```dart
+  // %language=2.9
+  // import 'package:meta/meta.dart';
+  //
+  // void f({@required int x}) {}
+  //
+  // void g() {
+  //   f(x: 2);
+  // }
+  // ```
+  static const HintCode MISSING_REQUIRED_PARAM = HintCode(
+    'MISSING_REQUIRED_PARAM',
+    "The parameter '{0}' is required.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for a constructor, function or method invocation where a
+   * required parameter is missing.
+   *
+   * Parameters:
+   * 0: the name of the parameter
+   * 1: message details
+   */
+  static const HintCode MISSING_REQUIRED_PARAM_WITH_DETAILS = HintCode(
+    'MISSING_REQUIRED_PARAM',
+    "The parameter '{0}' is required. {1}.",
+    hasPublishedDocs: true,
+    uniqueName: 'MISSING_REQUIRED_PARAM_WITH_DETAILS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the declared return type
+   */
+  // #### Description
+  //
+  // Any function or method that doesn't end with either an explicit return or a
+  // throw implicitly returns `null`. This is rarely the desired behavior. The
+  // analyzer produces this diagnostic when it finds an implicit return.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` doesn't end with a
+  // return:
+  //
+  // ```dart
+  // %language=2.9
+  // int [!f!](int x) {
+  //   if (x < 0) {
+  //     return 0;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add a `return` statement that makes the return value explicit, even if
+  // `null` is the appropriate value.
+  static const HintCode MISSING_RETURN = HintCode(
+    'MISSING_RETURN',
+    "This function has a return type of '{0}', but doesn't end with a return statement.",
+    correction:
+        "Try adding a return statement, or changing the return type to 'void'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * This hint is generated anywhere where a `@sealed` class is used as a
+   * a superclass constraint of a mixin.
+   *
+   * Parameters:
+   * 0: the name of the sealed class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the superclass constraint of a
+  // mixin is a class from a different package that was marked as `@sealed`.
+  // Classes that are sealed can't be extended, implemented, mixed in, or used
+  // as a superclass constraint.
+  //
+  // #### Examples
+  //
+  // If the package `p` defines a sealed class:
+  //
+  // ```dart
+  // %uri="package:p/p.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // @sealed
+  // class C {}
+  // ```
+  //
+  // Then, the following code, when in a package other than `p`, produces this
+  // diagnostic:
+  //
+  // ```dart
+  // import 'package:p/p.dart';
+  //
+  // [!mixin M on C {}!]
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the classes that use the mixin don't need to be subclasses of the sealed
+  // class, then consider adding a field and delegating to the wrapped instance
+  // of the sealed class.
+  static const HintCode MIXIN_ON_SEALED_CLASS = HintCode(
+    'MIXIN_ON_SEALED_CLASS',
+    "The class '{0}' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '{0}' as a superclass.",
+    correction:
+        "Try composing with this class, or refer to its documentation for more information.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for classes that inherit from classes annotated with
+   * `@immutable` but that are not immutable.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an immutable class defines one
+  // or more instance fields that aren't final. A class is immutable if it's
+  // marked as being immutable using the annotation `@immutable` or if it's a
+  // subclass of an immutable class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field `x` isn't
+  // final:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @immutable
+  // class [!C!] {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If instances of the class should be immutable, then add the keyword `final`
+  // to all non-final field declarations:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @immutable
+  // class C {
+  //   final int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // If the instances of the class should be mutable, then remove the
+  // annotation, or choose a different superclass if the annotation is
+  // inherited:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  static const HintCode MUST_BE_IMMUTABLE = HintCode(
+    'MUST_BE_IMMUTABLE',
+    "This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: {0}",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class declaring the overridden method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method that overrides a method
+  // that is annotated as `@mustCallSuper` doesn't invoke the overridden method
+  // as required.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the method `m` in `B`
+  // doesn't invoke the overridden method `m` in `A`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @mustCallSuper
+  //   m() {}
+  // }
+  //
+  // class B extends A {
+  //   @override
+  //   [!m!]() {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an invocation of the overridden method in the overriding method:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @mustCallSuper
+  //   m() {}
+  // }
+  //
+  // class B extends A {
+  //   @override
+  //   m() {
+  //     super.m();
+  //   }
+  // }
+  // ```
+  static const HintCode MUST_CALL_SUPER = HintCode(
+    'MUST_CALL_SUPER',
+    "This method overrides a method annotated as '@mustCallSuper' in '{0}', but doesn't invoke the overridden method.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for non-const instance creation using a constructor
+   * annotated with `@literal`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the annotated constructor
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor that has the
+  // `@literal` annotation is invoked without using the `const` keyword, but all
+  // of the arguments to the constructor are constants. The annotation indicates
+  // that the constructor should be used to create a constant value whenever
+  // possible.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  //
+  // C f() => [!C()!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add the keyword `const` before the constructor invocation:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  //
+  // void f() => const C();
+  // ```
+  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR = HintCode(
+    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
+    "This instance creation must be 'const', because the {0} constructor is marked as '@literal'.",
+    correction: "Try adding a 'const' keyword.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for non-const instance creation (with the `new` keyword)
+   * using a constructor annotated with `@literal`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the annotated constructor
+   */
+  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW =
+      HintCode(
+    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
+    "This instance creation must be 'const', because the {0} constructor is marked as '@literal'.",
+    correction: "Try replacing the 'new' keyword with 'const'.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type following `on` in a
+  // `catch` clause is a nullable type. It isn't valid to specify a nullable
+  // type because it isn't possible to catch `null` (because it's a runtime
+  // error to throw `null`).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the exception type is
+  // specified to allow `null` when `null` can't be thrown:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on [!FormatException?!] {
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on FormatException {
+  //   }
+  // }
+  // ```
+  static const HintCode NULLABLE_TYPE_IN_CATCH_CLAUSE = HintCode(
+    'NULLABLE_TYPE_IN_CATCH_CLAUSE',
+    "A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expression.",
+    correction: "Try using a non-nullable type.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the method being invoked
+   * 1: the type argument associated with the method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when `null` is passed to either the
+  // constructor `Future.value` or the method `Completer.complete` when the type
+  // argument used to create the instance was non-nullable. Even though the type
+  // system can't express this restriction, passing in a `null` results in a
+  // runtime exception.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `null` is being passed
+  // to the constructor `Future.value` even though the type argument is the
+  // non-nullable type `String`:
+  //
+  // ```dart
+  // Future<String> f() {
+  //   return Future.value([!null!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Pass in a non-null value:
+  //
+  // ```dart
+  // Future<String> f() {
+  //   return Future.value('');
+  // }
+  // ```
+  static const HintCode NULL_ARGUMENT_TO_NON_NULL_TYPE = HintCode(
+    'NULL_ARGUMENT_TO_NON_NULL_TYPE',
+    "'{0}' shouldn't be called with a null argument for the non-nullable type argument '{1}'.",
+    correction: "Try adding a non-null argument.",
+  );
+
+  /**
+   * When the left operand of a binary expression uses '?.' operator, it can be
+   * `null`.
+   */
+  static const HintCode NULL_AWARE_BEFORE_OPERATOR = HintCode(
+    'NULL_AWARE_BEFORE_OPERATOR',
+    "The left operand uses '?.', so its value can be null.",
+  );
+
+  /**
+   * A condition in a control flow statement could evaluate to `null` because it
+   * uses the null-aware '?.' operator.
+   */
+  static const HintCode NULL_AWARE_IN_CONDITION = HintCode(
+    'NULL_AWARE_IN_CONDITION',
+    "The value of the '?.' operator can be 'null', which isn't appropriate in a condition.",
+    correction:
+        "Try replacing the '?.' with a '.', testing the left-hand side for null if necessary.",
+  );
+
+  /**
+   * A condition in operands of a logical operator could evaluate to `null`
+   * because it uses the null-aware '?.' operator.
+   */
+  static const HintCode NULL_AWARE_IN_LOGICAL_OPERATOR = HintCode(
+    'NULL_AWARE_IN_LOGICAL_OPERATOR',
+    "The value of the '?.' operator can be 'null', which isn't appropriate as an operand of a logical operator.",
+  );
+
+  /**
+   * This hint indicates that a null literal is null-checked with `!`, but null
+   * is never not null.
+   */
+  static const HintCode NULL_CHECK_ALWAYS_FAILS = HintCode(
+    'NULL_CHECK_ALWAYS_FAILS',
+    "This null-check will always throw an exception because the expression will always evaluate to 'null'.",
+  );
+
+  /**
+   * A field with the override annotation does not override a getter or setter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_FIELD = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The field doesn't override an inherited getter or setter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_FIELD',
+  );
+
+  /**
+   * A getter with the override annotation does not override an existing getter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The getter doesn't override an inherited getter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_GETTER',
+  );
+
+  /**
+   * A method with the override annotation does not override an existing method.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class member is annotated with
+  // the `@override` annotation, but the member isn’t declared in any of the
+  // supertypes of the class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` isn't declared in
+  // any of the supertypes of `C`:
+  //
+  // ```dart
+  // class C {
+  //   @override
+  //   String [!m!]() => '';
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the member is intended to override a member with a different name, then
+  // update the member to have the same name:
+  //
+  // ```dart
+  // class C {
+  //   @override
+  //   String toString() => '';
+  // }
+  // ```
+  //
+  // If the member is intended to override a member that was removed from the
+  // superclass, then consider removing the member from the subclass.
+  //
+  // If the member can't be removed, then remove the annotation.
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The method doesn't override an inherited method.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_METHOD',
+  );
+
+  /**
+   * A setter with the override annotation does not override an existing setter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The setter doesn't override an inherited setter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_SETTER',
+  );
+
+  /**
+   * It is a bad practice for a package import to reference anything outside the
+   * given package, or more generally, it is bad practice for a package import
+   * to contain a "..". For example, a source file should not contain a
+   * directive such as `import 'package:foo/../some.dart'`.
+   */
+  static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = HintCode(
+    'PACKAGE_IMPORT_CONTAINS_DOT_DOT',
+    "A package import shouldn't contain '..'.",
+  );
+
+  /**
+   * It is not an error to call or tear-off a method, setter, or getter, or to
+   * read or write a field, on a receiver of static type `Never`.
+   * Implementations that provide feedback about dead or unreachable code are
+   * encouraged to indicate that any arguments to the invocation are
+   * unreachable.
+   *
+   * It is not an error to apply an expression of type `Never` in the function
+   * position of a function call. Implementations that provide feedback about
+   * dead or unreachable code are encouraged to indicate that any arguments to
+   * the call are unreachable.
+   *
+   * Parameters: none
+   */
+  static const HintCode RECEIVER_OF_TYPE_NEVER = HintCode(
+    'RECEIVER_OF_TYPE_NEVER',
+    "The receiver is of type 'Never', and will never complete with a value.",
+    correction:
+        "Try checking for throw expressions or type errors in the receiver",
+  );
+
+  /**
+   * Users should not return values marked `@doNotStore` from functions,
+   * methods or getters not marked `@doNotStore`.
+   */
+  static const HintCode RETURN_OF_DO_NOT_STORE = HintCode(
+    'RETURN_OF_DO_NOT_STORE',
+    "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless '{1}' is also annotated.",
+    correction: "Annotate '{1}' with 'doNotStore'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the type of the Future
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation of
+  // `Future.catchError` has an argument whose return type isn't compatible with
+  // the type returned by the instance of `Future`. At runtime, the method
+  // `catchError` attempts to return the value from the callback as the result
+  // of the future, which results in another exception being thrown.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `future` is declared to
+  // return an `int` while `callback` is declared to return a `String`, and
+  // `String` isn't a subtype of `int`:
+  //
+  // ```dart
+  // void f(Future<int> future, String Function(dynamic, StackTrace) callback) {
+  //   future.catchError([!callback!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` returns an `int` while `future` is declared to
+  // return a `String`:
+  //
+  // ```dart
+  // void f(Future<String> future) {
+  //   future.catchError((error, stackTrace) => [!3!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the instance of `Future` is declared correctly, then change the callback
+  // to match:
+  //
+  // ```dart
+  // void f(Future<int> future, int Function(dynamic, StackTrace) callback) {
+  //   future.catchError(callback);
+  // }
+  // ```
+  //
+  // If the declaration of the instance of `Future` is wrong, then change it to
+  // match the callback:
+  //
+  // ```dart
+  // void f(Future<String> future, String Function(dynamic, StackTrace) callback) {
+  //   future.catchError(callback);
+  // }
+  // ```
+  static const HintCode RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR = HintCode(
+    'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
+    "A value of type '{0}' can't be returned by the 'onError' handler because it must be assignable to '{1}'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR',
+  );
+
+  /**
+   * Parameters:
+   * 0: the return type of the function
+   * 1: the expected return type as defined by the type of the Future
+   */
+  static const HintCode RETURN_TYPE_INVALID_FOR_CATCH_ERROR = HintCode(
+    'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
+    "The return type '{0}' isn't assignable to '{1}', as required by 'Future.catchError'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_TYPE_INVALID_FOR_CATCH_ERROR',
+  );
+
+  /**
+   * 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
+  // earlier versions, these classes weren't defined in `dart:core`, so the
+  // import was necessary.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.1.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.0.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // void f([!Future!] f) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the classes to be referenced:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then import the
+  // `dart:async` library.
+  //
+  // ```dart
+  // import 'dart:async';
+  //
+  // void f(Future f) {}
+  // ```
+  static const HintCode SDK_VERSION_ASYNC_EXPORTED_FROM_CORE = HintCode(
+    'SDK_VERSION_ASYNC_EXPORTED_FROM_CORE',
+    "The class '{0}' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.",
+    correction:
+        "Try either importing 'dart:async' or updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### 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 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.
+  //
+  // #### 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 bool a = true;
+  // const bool b = false;
+  // const bool c = a [!&!] b;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operators 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 these operators, or change the code so that the expression
+  // isn't in a [constant context][]:
+  //
+  // ```dart
+  // const bool a = true;
+  // const bool b = false;
+  // bool c = a & b;
+  // ```
+  static const HintCode SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT',
+    "The use of the operator '{0}' for 'bool' operands in a constant context 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.
+   *
+   * There is also a [ParserError.EXPERIMENT_NOT_ENABLED] code which catches
+   * some cases of constructor tearoff features (like `List<int>.filled;`).
+   * Other constructor tearoff cases are not realized until resolution
+   * (like `List.filled;`).
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor tear-off is found
+  // in code that has an SDK constraint whose lower bound is less than 2.15.
+  // Constructor tear-offs weren't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Example
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.15:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.9.0 <2.15.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // %language=2.14
+  // var setConstructor = [!Set.identity!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.15.0 <2.16.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not use constructor tear-offs:
+  //
+  // ```dart
+  // %language=2.14
+  // var setConstructor = () => Set.identity();
+  // ```
+  static const HintCode SDK_VERSION_CONSTRUCTOR_TEAROFFS = HintCode(
+    'SDK_VERSION_CONSTRUCTOR_TEAROFFS',
+    "Tearing off a constructor requires the 'constructor-tearoffs' language feature.",
+    correction:
+        "Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the operator `==` is used on a
+  // 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
+  //
+  // 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
+  // %language=2.9
+  // class C {}
+  // const C a = null;
+  // const C b = null;
+  // const bool same = a [!==!] b;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator 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 the `==` operator, or change the code so that the
+  // expression isn't in a [constant context][]:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {}
+  // const C a = null;
+  // const C b = null;
+  // bool same = a == b;
+  // ```
+  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
+    "Using the operator '==' for non-primitive types 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 an extension declaration or an
+  // extension override is found in code that has an SDK constraint whose lower
+  // bound is less than 2.6.0. Using extensions 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.6.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //  sdk: '>=2.4.0 <2.7.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // [!extension!] E on String {
+  //   void sayHello() {
+  //     print('Hello $this');
+  //   }
+  // }
+  // ```
+  //
+  // #### 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.6.0 <2.7.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of extensions. The most common way to do this is to rewrite
+  // the members of the extension as top-level functions (or methods) that take
+  // the value that would have been bound to `this` as a parameter:
+  //
+  // ```dart
+  // void sayHello(String s) {
+  //   print('Hello $s');
+  // }
+  // ```
+  static const HintCode SDK_VERSION_EXTENSION_METHODS = HintCode(
+    'SDK_VERSION_EXTENSION_METHODS',
+    "Extension methods weren't supported until version 2.6.0, 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 the operator `>>>` is used in
+  // code that has an SDK constraint whose lower bound is less than 2.14.0. This
+  // operator 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.14.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //  sdk: '>=2.0.0 <2.15.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // int x = 3 [!>>>!] 4;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.14.0 <2.15.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not use the `>>>` operator:
+  //
+  // ```dart
+  // int x = logicalShiftRight(3, 4);
+  //
+  // int logicalShiftRight(int leftOperand, int rightOperand) {
+  //   int divisor = 1 << rightOperand;
+  //   if (divisor == 0) {
+  //     return 0;
+  //   }
+  //   return leftOperand ~/ divisor;
+  // }
+  // ```
+  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = HintCode(
+    'SDK_VERSION_GT_GT_GT_OPERATOR',
+    "The operator '>>>' wasn't supported until version 2.14.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an `is` 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 `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
+  //
+  // 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 Object x = 4;
+  // const y = [!x is int!] ? 0 : 1;
+  // ```
+  //
+  // #### 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 the `is` operator, or, if that isn't possible, change the
+  // code so that the `is` expression isn't in a
+  // [constant context][]:
+  //
+  // ```dart
+  // const Object x = 4;
+  // var y = x is int ? 0 : 1;
+  // ```
+  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
+    "The use of an is expression in a constant context 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 a reference to the class `Never`
+  // is found in code that has an SDK constraint whose lower bound is less than
+  // 2.12.0. This class wasn't defined 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.12.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.5.0 <2.6.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // [!Never!] n;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the type to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.12.0 <2.13.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not reference this class:
+  //
+  // ```dart
+  // dynamic x;
+  // ```
+  static const HintCode SDK_VERSION_NEVER = HintCode(
+    'SDK_VERSION_NEVER',
+    "The type 'Never' wasn't supported until version 2.12.0, 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 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
+  // 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.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.2.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // var digits = [[!for (int i = 0; i < 10; i++) i!]];
+  // ```
+  //
+  // #### 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.3.0 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of those elements:
+  //
+  // ```dart
+  // var digits = _initializeDigits();
+  //
+  // List<int> _initializeDigits() {
+  //   var digits = <int>[];
+  //   for (int i = 0; i < 10; i++) {
+  //     digits.add(i);
+  //   }
+  //   return digits;
+  // }
+  // ```
+  static const HintCode SDK_VERSION_UI_AS_CODE = HintCode(
+    'SDK_VERSION_UI_AS_CODE',
+    "The for, if, and spread elements weren't supported until version 2.3.0, 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 an if or spread element inside
+  // 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
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.5.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.4.0 <2.6.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // const b = [[!...a!]];
+  // ```
+  //
+  // #### 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.5.0 <2.6.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of those elements:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // const b = [1, 2];
+  // ```
+  //
+  // If that isn't possible, change the code so that the element isn't in a
+  // [constant context][]:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // var b = [...a];
+  // ```
+  static const HintCode SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT',
+    "The if and spread elements weren't supported in constant expressions until version 2.5.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * When "strict-raw-types" is enabled, "raw types" must have type arguments.
+   *
+   * A "raw type" is a type name that does not use inference to fill in missing
+   * type arguments; instead, each type argument is instantiated to its bound.
+   */
+  static const HintCode STRICT_RAW_TYPE = HintCode(
+    'STRICT_RAW_TYPE',
+    "The generic type '{0}' should have explicit type arguments but doesn't.",
+    correction: "Use explicit type arguments for '{0}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the sealed class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a sealed class (one that either
+  // has the `@sealed` annotation or inherits or mixes in a sealed class) is
+  // referenced in either the `extends`, `implements`, or `with` clause of a
+  // class or mixin declaration if the declaration isn't in the same package as
+  // the sealed class.
+  //
+  // #### Example
+  //
+  // Given a library in a package other than the package being analyzed that
+  // contains the following:
+  //
+  // ```dart
+  // %uri="package:a/a.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // class A {}
+  //
+  // @sealed
+  // class B {}
+  // ```
+  //
+  // The following code produces this diagnostic because `C`, which isn't in the
+  // same package as `B`, is extending the sealed class `B`:
+  //
+  // ```dart
+  // import 'package:a/a.dart';
+  //
+  // [!class C extends B {}!]
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the class doesn't need to be a subtype of the sealed class, then change
+  // the declaration so that it isn't:
+  //
+  // ```dart
+  // import 'package:a/a.dart';
+  //
+  // class B extends A {}
+  // ```
+  //
+  // If the class needs to be a subtype of the sealed class, then either change
+  // the sealed class so that it's no longer sealed or move the subclass into
+  // the same package as the sealed class.
+  static const HintCode SUBTYPE_OF_SEALED_CLASS = HintCode(
+    'SUBTYPE_OF_SEALED_CLASS',
+    "The class '{0}' shouldn't be extended, mixed in, or implemented because it's sealed.",
+    correction:
+        "Try composing instead of inheriting, or refer to the documentation of '{0}' for more information.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's a type check (using the
+  // `as` operator) where the type is `Null`. There's only one value whose type
+  // is `Null`, so the code is both more readable and more performant when it
+  // tests for `null` explicitly.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the code is testing to
+  // see whether the value of `s` is `null` by using a type check:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if ([!s is Null!]) {
+  //     return;
+  //   }
+  //   print(s);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the code is testing to
+  // see whether the value of `s` is something other than `null` by using a type
+  // check:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if ([!s is! Null!]) {
+  //     print(s);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the type check with the equivalent comparison with `null`:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if (s == null) {
+  //     return;
+  //   }
+  //   print(s);
+  // }
+  // ```
+  static const HintCode TYPE_CHECK_IS_NOT_NULL = HintCode(
+    'TYPE_CHECK_WITH_NULL',
+    "Tests for non-null should be done with '!= null'.",
+    correction: "Try replacing the 'is! Null' check with '!= null'.",
+    hasPublishedDocs: true,
+    uniqueName: 'TYPE_CHECK_IS_NOT_NULL',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode TYPE_CHECK_IS_NULL = HintCode(
+    'TYPE_CHECK_WITH_NULL',
+    "Tests for null should be done with '== null'.",
+    correction: "Try replacing the 'is Null' check with '== null'.",
+    hasPublishedDocs: true,
+    uniqueName: 'TYPE_CHECK_IS_NULL',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the library being imported
+   * 1: the name in the hide clause that isn't defined in the library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a hide combinator includes a
+  // name that isn't defined by the library being imported.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `dart:math` doesn't
+  // define the name `String`:
+  //
+  // ```dart
+  // import 'dart:math' hide [!String!], max;
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different name should be hidden, then correct the name. Otherwise,
+  // remove the name from the list:
+  //
+  // ```dart
+  // import 'dart:math' hide max;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNDEFINED_HIDDEN_NAME = HintCode(
+    'UNDEFINED_HIDDEN_NAME',
+    "The library '{0}' doesn't export a member with the hidden name '{1}'.",
+    correction: "Try removing the name from the list of hidden members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the undefined parameter
+   * 1: the name of the targeted member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an annotation of the form
+  // `@UnusedResult.unless(parameterDefined: parameterName)` specifies a
+  // parameter name that isn't defined by the annotated function.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the function `f`
+  // doesn't have a parameter named `b`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @UseResult.unless(parameterDefined: [!'b'!])
+  // int f([int? a]) => a ?? 0;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the argument named `parameterDefined` to match the name of one of
+  // the parameters to the function:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @UseResult.unless(parameterDefined: 'a')
+  // int f([int? a]) => a ?? 0;
+  // ```
+  static const HintCode UNDEFINED_REFERENCED_PARAMETER = HintCode(
+    'UNDEFINED_REFERENCED_PARAMETER',
+    "The parameter '{0}' is not defined by '{1}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the library being imported
+   * 1: the name in the show clause that isn't defined in the library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a show combinator includes a
+  // name that isn't defined by the library being imported.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `dart:math` doesn't
+  // define the name `String`:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!String!];
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different name should be shown, then correct the name. Otherwise,
+  // remove the name from the list:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNDEFINED_SHOWN_NAME = HintCode(
+    'UNDEFINED_SHOWN_NAME',
+    "The library '{0}' doesn't export a member with the shown name '{1}'.",
+    correction: "Try removing the name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the non-diagnostic being ignored
+   */
+  static const HintCode UNIGNORABLE_IGNORE = HintCode(
+    'UNIGNORABLE_IGNORE',
+    "The diagnostic '{0}' can't be ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value being cast is already
+  // known to be of the type that it's being cast to.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `n` is already known to
+  // be an `int` as a result of the `is` test:
+  //
+  // ```dart
+  // void f(num n) {
+  //   if (n is int) {
+  //     ([!n as int!]).isEven;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary cast:
+  //
+  // ```dart
+  // void f(num n) {
+  //   if (n is int) {
+  //     n.isEven;
+  //   }
+  // }
+  // ```
+  static const HintCode UNNECESSARY_CAST = HintCode(
+    'UNNECESSARY_CAST',
+    "Unnecessary cast.",
+    correction: "Try removing the cast.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the diagnostic being ignored
+   */
+  static const HintCode UNNECESSARY_IGNORE = HintCode(
+    'UNNECESSARY_IGNORE',
+    "The diagnostic '{0}' isn't produced at this location so it doesn't need to be ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the uri that is not necessary
+   * 1: the uri that makes it unnecessary
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import isn't needed because
+  // all of the names that are imported and referenced within the importing
+  // library are also visible through another import.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` that contains the following:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {}
+  // ```
+  //
+  // And, given a file named `b.dart` that contains the following:
+  //
+  // ```dart
+  // %uri="lib/b.dart"
+  // export 'a.dart';
+  //
+  // class B {}
+  // ```
+  //
+  // The following code produces this diagnostic because the class `A`, which is
+  // imported from `a.dart`, is also imported from `b.dart`. Removing the import
+  // of `a.dart` leaves the semantics unchanged:
+  //
+  // ```dart
+  // import [!'a.dart'!];
+  // import 'b.dart';
+  //
+  // void f(A a, B b) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the import isn't needed, then remove it.
+  //
+  // If some of the names imported by this import are intended to be used but
+  // aren't yet, and if those names aren't imported by other imports, then add
+  // the missing references to those names.
+  static const HintCode UNNECESSARY_IMPORT = HintCode(
+    'UNNECESSARY_IMPORT',
+    "The import of '{0}' is unnecessary because all of the used elements are also provided by the import of '{1}'.",
+    correction: "Try removing the import directive.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's a declaration of
+  // `noSuchMethod`, the only thing the declaration does is invoke the
+  // overridden declaration, and the overridden declaration isn't the
+  // declaration in `Object`.
+  //
+  // Overriding the implementation of `Object`'s `noSuchMethod` (no matter what
+  // the implementation does) signals to the analyzer that it shouldn't flag any
+  // inherited abstract methods that aren't implemented in that class. This
+  // works even if the overriding implementation is inherited from a superclass,
+  // so there's no value to declare it again in a subclass.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the declaration of
+  // `noSuchMethod` in `A` makes the declaration of `noSuchMethod` in `B`
+  // unnecessary:
+  //
+  // ```dart
+  // class A {
+  //   @override
+  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
+  // }
+  // class B extends A {
+  //   @override
+  //   dynamic [!noSuchMethod!](y) {
+  //     return super.noSuchMethod(y);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary declaration:
+  //
+  // ```dart
+  // class A {
+  //   @override
+  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
+  // }
+  // class B extends A {}
+  // ```
+  static const HintCode UNNECESSARY_NO_SUCH_METHOD = HintCode(
+    'UNNECESSARY_NO_SUCH_METHOD',
+    "Unnecessary 'noSuchMethod' declaration.",
+    correction: "Try removing the declaration of 'noSuchMethod'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an equality comparison
+  // (either `==` or `!=`) with one operand of `null` and the other operand
+  // can't be `null`. Such comparisons are always either `true` or `false`, so
+  // they serve no purpose.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` can never be
+  // `null`, so the comparison always evaluates to `true`:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if (x [!!= null!]) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `x` can never be
+  // `null`, so the comparison always evaluates to `false`:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if (x [!== null!]) {
+  //     throw ArgumentError("x can't be null");
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the other operand should be able to be `null`, then change the type of
+  // the operand:
+  //
+  // ```dart
+  // void f(int? x) {
+  //   if (x != null) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  //
+  // If the other operand really can't be `null`, then remove the condition:
+  //
+  // ```dart
+  // void f(int x) {
+  //   print(x);
+  // }
+  // ```
+  static const HintCode UNNECESSARY_NULL_COMPARISON_FALSE = HintCode(
+    'UNNECESSARY_NULL_COMPARISON',
+    "The operand can't be null, so the condition is always false.",
+    correction:
+        "Try removing the condition, an enclosing condition, or the whole conditional statement.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_NULL_COMPARISON_FALSE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode UNNECESSARY_NULL_COMPARISON_TRUE = HintCode(
+    'UNNECESSARY_NULL_COMPARISON',
+    "The operand can't be null, so the condition is always true.",
+    correction: "Remove the condition.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_NULL_COMPARISON_TRUE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the type `dynamic` or the
+  // type `Null` is followed by a question mark. Both of these types are
+  // inherently nullable so the question mark doesn't change the semantics.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the question mark
+  // following `dynamic` isn't necessary:
+  //
+  // ```dart
+  // dynamic[!?!] x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unneeded question mark:
+  //
+  // ```dart
+  // dynamic x;
+  // ```
+  static const HintCode UNNECESSARY_QUESTION_MARK = HintCode(
+    'UNNECESSARY_QUESTION_MARK',
+    "The '?' is unnecessary because '{0}' is nullable without it.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of a type check (using
+  // either `is` or `is!`) is known at compile time.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the test `a is Object?`
+  // is always `true`:
+  //
+  // ```dart
+  // bool f<T>(T a) => [!a is Object?!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type check doesn't check what you intended to check, then change the
+  // test:
+  //
+  // ```dart
+  // bool f<T>(T a) => a is Object;
+  // ```
+  //
+  // If the type check does check what you intended to check, then replace the
+  // type check with its known value or completely remove it:
+  //
+  // ```dart
+  // bool f<T>(T a) => true;
+  // ```
+  static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = HintCode(
+    'UNNECESSARY_TYPE_CHECK',
+    "Unnecessary type check; the result is always 'false'.",
+    correction: "Try correcting the type check, or removing the type check.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_TYPE_CHECK_FALSE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = HintCode(
+    'UNNECESSARY_TYPE_CHECK',
+    "Unnecessary type check; the result is always 'true'.",
+    correction: "Try correcting the type check, or removing the type check.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_TYPE_CHECK_TRUE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the exception variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found, and
+  // neither the exception parameter nor the optional stack trace parameter are
+  // used in the `catch` block.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `e` isn't referenced:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     int.parse(';');
+  //   } on FormatException catch ([!e!]) {
+  //     // ignored
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unused `catch` clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     int.parse(';');
+  //   } on FormatException {
+  //     // ignored
+  //   }
+  // }
+  // ```
+  static const HintCode UNUSED_CATCH_CLAUSE = HintCode(
+    'UNUSED_CATCH_CLAUSE',
+    "The exception variable '{0}' isn't used, so the 'catch' clause can be removed.",
+    correction: "Try removing the catch clause.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the stack trace variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the stack trace parameter in a
+  // `catch` clause isn't referenced within the body of the `catch` block.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `stackTrace` isn't
+  // referenced:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } catch (exception, [!stackTrace!]) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the stack trace parameter, then add a reference to
+  // it. Otherwise, remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } catch (exception) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const HintCode UNUSED_CATCH_STACK = HintCode(
+    'UNUSED_CATCH_STACK',
+    "The stack trace variable '{0}' isn't used and can be removed.",
+    correction: "Try removing the stack trace variable, or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name that is declared but not referenced
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a private declaration isn't
+  // referenced in the library that contains the declaration. The following
+  // kinds of declarations are analyzed:
+  // - Private top-level declarations, such as classes, enums, mixins, typedefs,
+  //   top-level variables, and top-level functions
+  // - Private static and instance methods
+  // - Optional parameters of private functions for which a value is never
+  //   passed, even when the parameter doesn't have a private name
+  //
+  // #### Examples
+  //
+  // Assuming that no code in the library references `_C`, the following code
+  // produces this diagnostic:
+  //
+  // ```dart
+  // class [!_C!] {}
+  // ```
+  //
+  // Assuming that no code in the library passes a value for `y` in any
+  // invocation of `_m`, the following code produces this diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   void _m(int x, [int [!y!]]) {}
+  //
+  //   void n() => _m(0);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the declaration isn't needed, then remove it:
+  //
+  // ```dart
+  // class C {
+  //   void _m(int x) {}
+  //
+  //   void n() => _m(0);
+  // }
+  // ```
+  //
+  // If the declaration is intended to be used, then add the code to use it.
+  static const HintCode UNUSED_ELEMENT = HintCode(
+    'UNUSED_ELEMENT',
+    "The declaration '{0}' isn't referenced.",
+    correction: "Try removing the declaration of '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the parameter that is declared but not used
+   */
+  static const HintCode UNUSED_ELEMENT_PARAMETER = HintCode(
+    'UNUSED_ELEMENT',
+    "A value for optional parameter '{0}' isn't ever given.",
+    correction: "Try removing the unused parameter.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNUSED_ELEMENT_PARAMETER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unused field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a private field is declared but
+  // never read, even if it's written in one or more places.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field
+  // `_originalValue` isn't read anywhere in the library:
+  //
+  // ```dart
+  // class C {
+  //   final String [!_originalValue!];
+  //   final String _currentValue;
+  //
+  //   C(this._originalValue) : _currentValue = _originalValue;
+  //
+  //   String get value => _currentValue;
+  // }
+  // ```
+  //
+  // It might appear that the field `_originalValue` is being read in the
+  // initializer (`_currentValue = _originalValue`), but that is actually a
+  // reference to the parameter of the same name, not a reference to the field.
+  //
+  // #### Common fixes
+  //
+  // If the field isn't needed, then remove it.
+  //
+  // If the field was intended to be used, then add the missing code.
+  static const HintCode UNUSED_FIELD = HintCode(
+    'UNUSED_FIELD',
+    "The value of the field '{0}' isn't used.",
+    correction: "Try removing the field, or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the content of the unused import's uri
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import isn't needed because
+  // none of the names that are imported are referenced within the importing
+  // library.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because nothing defined in
+  // `dart:async` is referenced in the library:
+  //
+  // ```dart
+  // import [!'dart:async'!];
+  //
+  // void main() {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the import isn't needed, then remove it.
+  //
+  // If some of the imported names are intended to be used, then add the missing
+  // code.
+  static const HintCode UNUSED_IMPORT = HintCode(
+    'UNUSED_IMPORT',
+    "Unused import: '{0}'.",
+    correction: "Try removing the import directive.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the label that isn't used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a label that isn't used is
+  // found.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the label `loop` isn't
+  // referenced anywhere in the method:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   [!loop:!] for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the label isn't needed, then remove it:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //   }
+  // }
+  // ```
+  //
+  // If the label is needed, then use it:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   loop: for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //     break loop;
+  //   }
+  // }
+  // ```
+  // TODO(brianwilkerson) Highlight the identifier without the colon.
+  static const HintCode UNUSED_LABEL = HintCode(
+    'UNUSED_LABEL',
+    "The label '{0}' isn't used.",
+    correction:
+        "Try removing the label, or using it in either a 'break' or 'continue' statement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unused variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a local variable is declared but
+  // never read, even if it's written in one or more places.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the value of `count` is
+  // never read:
+  //
+  // ```dart
+  // void main() {
+  //   int [!count!] = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the variable isn't needed, then remove it.
+  //
+  // If the variable was intended to be used, then add the missing code.
+  static const HintCode UNUSED_LOCAL_VARIABLE = HintCode(
+    'UNUSED_LOCAL_VARIABLE',
+    "The value of the local variable '{0}' isn't used.",
+    correction: "Try removing the variable or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the annotated method, property or function
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function annotated with
+  // `useResult` is invoked, and the value returned by that function isn't used.
+  // The value is considered to be used if a member of the value is invoked, if
+  // the value is passed to another function, or if the value is assigned to a
+  // variable or field.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of
+  // `c.a()` isn't used, even though the method `a` is annotated with
+  // `useResult`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   c.[!a!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to invoke the annotated function, then use the value that
+  // was returned:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   print(c.a());
+  // }
+  // ```
+  //
+  // If you intended to invoke a different function, then correct the name of
+  // the function being invoked:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   c.b();
+  // }
+  // ```
+  static const HintCode UNUSED_RESULT = HintCode(
+    'UNUSED_RESULT',
+    "The value of '{0}' should be used.",
+    correction:
+        "Try using the result by invoking a member, passing it to a function, or returning it from this function.",
+  );
+
+  /**
+   * The result of invoking a method, property, or function annotated with
+   * `@useResult` must be used (assigned, passed to a function as an argument,
+   * or returned by a function).
+   *
+   * Parameters:
+   * 0: the name of the annotated method, property or function
+   * 1: message details
+   */
+  static const HintCode UNUSED_RESULT_WITH_MESSAGE = HintCode(
+    'UNUSED_RESULT',
+    "'{0}' should be used. {1}.",
+    correction:
+        "Try using the result by invoking a member, passing it to a function, or returning it from this function.",
+    uniqueName: 'UNUSED_RESULT_WITH_MESSAGE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name that is shown but not used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a show combinator includes a
+  // name that isn't used within the library. Because it isn't referenced, the
+  // name can be removed.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the function `max`
+  // isn't used:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!max!];
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either use the name or remove it:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNUSED_SHOWN_NAME = HintCode(
+    'UNUSED_SHOWN_NAME',
+    "The name {0} is shown, but isn’t used.",
+    correction: "Try removing the name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library is imported using the
+  // `dart-ext` scheme.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the native library `x`
+  // is being imported using a scheme of `dart-ext`:
+  //
+  // ```dart
+  // [!import 'dart-ext:x';!]
+  // int f() native 'string';
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rewrite the code to use `dart:ffi` as a way of invoking the contents of the
+  // native library.
+  static const HintCode USE_OF_NATIVE_EXTENSION = HintCode(
+    'USE_OF_NATIVE_EXTENSION',
+    "Dart native extensions are deprecated and aren’t available in Dart 2.15.",
+    correction: "Try using dart:ffi for C interop.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const HintCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'HintCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
+
+  @override
+  ErrorType get type => ErrorType.HINT;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
new file mode 100644
index 0000000..88cb1ff
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
@@ -0,0 +1,1080 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+part "syntactic_errors.g.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class ParserErrorCode extends ErrorCode {
+  static const ParserErrorCode ABSTRACT_CLASS_MEMBER = _ABSTRACT_CLASS_MEMBER;
+
+  static const ParserErrorCode ABSTRACT_ENUM = ParserErrorCode(
+    'ABSTRACT_ENUM',
+    "Enums can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD =
+      _ABSTRACT_EXTERNAL_FIELD;
+
+  static const ParserErrorCode ABSTRACT_LATE_FIELD = _ABSTRACT_LATE_FIELD;
+
+  static const ParserErrorCode ABSTRACT_STATIC_FIELD = _ABSTRACT_STATIC_FIELD;
+
+  static const ParserErrorCode ABSTRACT_STATIC_METHOD = ParserErrorCode(
+    'ABSTRACT_STATIC_METHOD',
+    "Static methods can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = ParserErrorCode(
+    'ABSTRACT_TOP_LEVEL_FUNCTION',
+    "Top-level functions can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = ParserErrorCode(
+    'ABSTRACT_TOP_LEVEL_VARIABLE',
+    "Top-level variables can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TYPEDEF = ParserErrorCode(
+    'ABSTRACT_TYPEDEF',
+    "Typedefs can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT =
+      _ANNOTATION_ON_TYPE_ARGUMENT;
+
+  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
+      _ANNOTATION_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
+      _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
+
+  /**
+   * 16.32 Identifier Reference: It is a compile-time error if any of the
+   * identifiers async, await, or yield is used as an identifier in a function
+   * body marked with either async, async, or sync.
+   */
+  static const ParserErrorCode ASYNC_KEYWORD_USED_AS_IDENTIFIER =
+      ParserErrorCode(
+    'ASYNC_KEYWORD_USED_AS_IDENTIFIER',
+    "The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function.",
+  );
+
+  static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT =
+      _BINARY_OPERATOR_WRITTEN_OUT;
+
+  static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = _BREAK_OUTSIDE_OF_LOOP;
+
+  static const ParserErrorCode CATCH_SYNTAX = _CATCH_SYNTAX;
+
+  static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS =
+      _CATCH_SYNTAX_EXTRA_PARAMETERS;
+
+  static const ParserErrorCode CLASS_IN_CLASS = _CLASS_IN_CLASS;
+
+  static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
+
+  static const ParserErrorCode CONFLICTING_MODIFIERS = _CONFLICTING_MODIFIERS;
+
+  static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE =
+      _CONSTRUCTOR_WITH_RETURN_TYPE;
+
+  static const ParserErrorCode CONSTRUCTOR_WITH_TYPE_ARGUMENTS =
+      _CONSTRUCTOR_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode CONST_AND_FINAL = _CONST_AND_FINAL;
+
+  static const ParserErrorCode CONST_CLASS = _CONST_CLASS;
+
+  static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
+    'CONST_CONSTRUCTOR_WITH_BODY',
+    "Const constructors can't have a body.",
+    correction: "Try removing either the 'const' keyword or the body.",
+  );
+
+  static const ParserErrorCode CONST_ENUM = ParserErrorCode(
+    'CONST_ENUM',
+    "Enums can't be declared to be 'const'.",
+    correction: "Try removing the 'const' keyword.",
+  );
+
+  static const ParserErrorCode CONST_FACTORY = _CONST_FACTORY;
+
+  static const ParserErrorCode CONST_METHOD = _CONST_METHOD;
+
+  static const ParserErrorCode CONST_TYPEDEF = ParserErrorCode(
+    'CONST_TYPEDEF',
+    "Type aliases can't be declared to be 'const'.",
+    correction: "Try removing the 'const' keyword.",
+  );
+
+  static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP =
+      _CONTINUE_OUTSIDE_OF_LOOP;
+
+  static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE =
+      _CONTINUE_WITHOUT_LABEL_IN_CASE;
+
+  static const ParserErrorCode COVARIANT_AND_STATIC = _COVARIANT_AND_STATIC;
+
+  static const ParserErrorCode COVARIANT_CONSTRUCTOR = ParserErrorCode(
+    'COVARIANT_CONSTRUCTOR',
+    "A constructor can't be declared to be 'covariant'.",
+    correction: "Try removing the keyword 'covariant'.",
+  );
+
+  static const ParserErrorCode COVARIANT_MEMBER = _COVARIANT_MEMBER;
+
+  static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
+      ParserErrorCode(
+    'COVARIANT_TOP_LEVEL_DECLARATION',
+    "Top-level declarations can't be declared to be covariant.",
+    correction: "Try removing the keyword 'covariant'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function type associated with
+  // a parameter includes optional parameters that have a default value. This
+  // isn't allowed because the default values of parameters aren't part of the
+  // function's type, and therefore including them doesn't provide any value.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the parameter `p` has a
+  // default value even though it's part of the type of the parameter `g`:
+  //
+  // ```dart
+  // void f(void Function([int p [!=!] 0]) g) {
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the default value from the function-type's parameter:
+  //
+  // ```dart
+  // void f(void Function([int p]) g) {
+  // }
+  // ```
+  static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE = ParserErrorCode(
+    'DEFAULT_VALUE_IN_FUNCTION_TYPE',
+    "Parameters in a function type can't have default values.",
+    correction: "Try removing the default value.",
+    hasPublishedDocs: true,
+  );
+
+  static const ParserErrorCode DEFERRED_AFTER_PREFIX = _DEFERRED_AFTER_PREFIX;
+
+  static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION =
+      _DIRECTIVE_AFTER_DECLARATION;
+
+  /**
+   * Parameters:
+   * 0: the modifier that was duplicated
+   */
+  static const ParserErrorCode DUPLICATED_MODIFIER = _DUPLICATED_MODIFIER;
+
+  static const ParserErrorCode DUPLICATE_DEFERRED = _DUPLICATE_DEFERRED;
+
+  /**
+   * Parameters:
+   * 0: the label that was duplicated
+   */
+  static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT =
+      _DUPLICATE_LABEL_IN_SWITCH_STATEMENT;
+
+  static const ParserErrorCode DUPLICATE_PREFIX = _DUPLICATE_PREFIX;
+
+  static const ParserErrorCode EMPTY_ENUM_BODY = ParserErrorCode(
+    'EMPTY_ENUM_BODY',
+    "An enum must declare at least one constant name.",
+    correction: "Try declaring a constant.",
+  );
+
+  static const ParserErrorCode ENUM_IN_CLASS = _ENUM_IN_CLASS;
+
+  static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND =
+      _EQUALITY_CANNOT_BE_EQUALITY_OPERAND;
+
+  static const ParserErrorCode EXPECTED_BODY = _EXPECTED_BODY;
+
+  static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = ParserErrorCode(
+    'EXPECTED_CASE_OR_DEFAULT',
+    "Expected 'case' or 'default'.",
+    correction: "Try placing this code inside a case clause.",
+  );
+
+  static const ParserErrorCode EXPECTED_CLASS_MEMBER = ParserErrorCode(
+    'EXPECTED_CLASS_MEMBER',
+    "Expected a class member.",
+    correction: "Try placing this code inside a class member.",
+  );
+
+  static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
+
+  static const ParserErrorCode EXPECTED_EXECUTABLE = ParserErrorCode(
+    'EXPECTED_EXECUTABLE',
+    "Expected a method, getter, setter or operator declaration.",
+    correction:
+        "This appears to be incomplete code. Try removing it or completing it.",
+  );
+
+  static const ParserErrorCode EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD =
+      _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD;
+
+  static const ParserErrorCode EXPECTED_INSTEAD = _EXPECTED_INSTEAD;
+
+  static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = ParserErrorCode(
+    'EXPECTED_LIST_OR_MAP_LITERAL',
+    "Expected a list or map literal.",
+    correction:
+        "Try inserting a list or map literal, or remove the type arguments.",
+  );
+
+  static const ParserErrorCode EXPECTED_STRING_LITERAL = ParserErrorCode(
+    'EXPECTED_STRING_LITERAL',
+    "Expected a string literal.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the token that was expected but not found
+   */
+  static const ParserErrorCode EXPECTED_TOKEN = ParserErrorCode(
+    'EXPECTED_TOKEN',
+    "Expected to find '{0}'.",
+  );
+
+  static const ParserErrorCode EXPECTED_TYPE_NAME = ParserErrorCode(
+    'EXPECTED_TYPE_NAME',
+    "Expected a type name.",
+  );
+
+  static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
+
+  static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
+      _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an abstract declaration is
+  // declared in an extension. Extensions can declare only concrete members.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the method `a` doesn't
+  // have a body:
+  //
+  // ```dart
+  // extension E on String {
+  //   int [!a!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either provide an implementation for the member or remove it.
+  static const ParserErrorCode EXTENSION_DECLARES_ABSTRACT_MEMBER =
+      _EXTENSION_DECLARES_ABSTRACT_MEMBER;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor declaration is
+  // found in an extension. It isn't valid to define a constructor because
+  // extensions aren't classes, and it isn't possible to create an instance of
+  // an extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there is a constructor
+  // declaration in `E`:
+  //
+  // ```dart
+  // extension E on String {
+  //   [!E!]() : super();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the constructor or replace it with a static method.
+  static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR =
+      _EXTENSION_DECLARES_CONSTRUCTOR;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance field declaration is
+  // found in an extension. It isn't valid to define an instance field because
+  // extensions can only add behavior, not state.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `s` is an instance
+  // field:
+  //
+  // ```dart
+  // %language=2.9
+  // extension E on String {
+  //   String [!s!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the field, make it a static field, or convert it to be a getter,
+  // setter, or method.
+  static const ParserErrorCode EXTENSION_DECLARES_INSTANCE_FIELD =
+      _EXTENSION_DECLARES_INSTANCE_FIELD;
+
+  static const ParserErrorCode EXTERNAL_CLASS = _EXTERNAL_CLASS;
+
+  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY =
+      _EXTERNAL_CONSTRUCTOR_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER =
+      _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER;
+
+  static const ParserErrorCode EXTERNAL_ENUM = _EXTERNAL_ENUM;
+
+  static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION =
+      _EXTERNAL_FACTORY_REDIRECTION;
+
+  static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY =
+      _EXTERNAL_FACTORY_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_FIELD = _EXTERNAL_FIELD;
+
+  static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_GETTER_WITH_BODY',
+    "External getters can't have a body.",
+    correction:
+        "Try removing the body of the getter, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_LATE_FIELD = _EXTERNAL_LATE_FIELD;
+
+  static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY =
+      _EXTERNAL_METHOD_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_OPERATOR_WITH_BODY',
+    "External operators can't have a body.",
+    correction:
+        "Try removing the body of the operator, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_SETTER_WITH_BODY',
+    "External setters can't have a body.",
+    correction:
+        "Try removing the body of the setter, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_TYPEDEF = _EXTERNAL_TYPEDEF;
+
+  static const ParserErrorCode EXTRANEOUS_MODIFIER = _EXTRANEOUS_MODIFIER;
+
+  static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
+      _FACTORY_TOP_LEVEL_DECLARATION;
+
+  static const ParserErrorCode FACTORY_WITHOUT_BODY = ParserErrorCode(
+    'FACTORY_WITHOUT_BODY',
+    "A non-redirecting 'factory' constructor must have a body.",
+    correction: "Try adding a body to the constructor.",
+  );
+
+  static const ParserErrorCode FACTORY_WITH_INITIALIZERS = ParserErrorCode(
+    'FACTORY_WITH_INITIALIZERS',
+    "A 'factory' constructor can't have initializers.",
+    correction:
+        "Try removing the 'factory' keyword to make this a generative constructor, or removing the initializers.",
+  );
+
+  static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+      _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
+
+  static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
+      _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
+
+  static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
+
+  static const ParserErrorCode FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
+      _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER;
+
+  static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
+
+  static const ParserErrorCode FINAL_CLASS = ParserErrorCode(
+    'FINAL_CLASS',
+    "Classes can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_CONSTRUCTOR = ParserErrorCode(
+    'FINAL_CONSTRUCTOR',
+    "A constructor can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_ENUM = ParserErrorCode(
+    'FINAL_ENUM',
+    "Enums can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_METHOD = ParserErrorCode(
+    'FINAL_METHOD',
+    "Getters, setters and methods can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_TYPEDEF = ParserErrorCode(
+    'FINAL_TYPEDEF',
+    "Typedefs can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = ParserErrorCode(
+    'FUNCTION_TYPED_PARAMETER_VAR',
+    "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.",
+    correction: "Try replacing the keyword with a return type.",
+  );
+
+  static const ParserErrorCode GETTER_CONSTRUCTOR = _GETTER_CONSTRUCTOR;
+
+  static const ParserErrorCode GETTER_IN_FUNCTION = ParserErrorCode(
+    'GETTER_IN_FUNCTION',
+    "Getters can't be defined within methods or functions.",
+    correction:
+        "Try moving the getter outside the method or function, or converting the getter to a function.",
+  );
+
+  static const ParserErrorCode GETTER_WITH_PARAMETERS = ParserErrorCode(
+    'GETTER_WITH_PARAMETERS',
+    "Getters must be declared without a parameter list.",
+    correction:
+        "Try removing the parameter list, or removing the keyword 'get' to define a method rather than a getter.",
+  );
+
+  static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE =
+      _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS =
+      _IMPLEMENTS_BEFORE_EXTENDS;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_ON = _IMPLEMENTS_BEFORE_ON;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = _IMPLEMENTS_BEFORE_WITH;
+
+  static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
+      _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+
+  static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH =
+      _INITIALIZED_VARIABLE_IN_FOR_EACH;
+
+  static const ParserErrorCode INVALID_AWAIT_IN_FOR = _INVALID_AWAIT_IN_FOR;
+
+  /**
+   * Parameters:
+   * 0: the invalid escape sequence
+   */
+  static const ParserErrorCode INVALID_CODE_POINT = ParserErrorCode(
+    'INVALID_CODE_POINT',
+    "The escape sequence '{0}' isn't a valid code point.",
+  );
+
+  static const ParserErrorCode INVALID_COMMENT_REFERENCE = ParserErrorCode(
+    'INVALID_COMMENT_REFERENCE',
+    "Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else.",
+  );
+
+  static const ParserErrorCode INVALID_CONSTRUCTOR_NAME =
+      _INVALID_CONSTRUCTOR_NAME;
+
+  static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = ParserErrorCode(
+    'INVALID_GENERIC_FUNCTION_TYPE',
+    "Invalid generic function type.",
+    correction:
+        "Try using a generic function type (returnType 'Function(' parameters ')').",
+  );
+
+  static const ParserErrorCode INVALID_HEX_ESCAPE = _INVALID_HEX_ESCAPE;
+
+  static const ParserErrorCode INVALID_INITIALIZER = _INVALID_INITIALIZER;
+
+  static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
+      ParserErrorCode(
+    'INVALID_LITERAL_IN_CONFIGURATION',
+    "The literal in a configuration can't contain interpolation.",
+    correction: "Try removing the interpolation expressions.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the operator that is invalid
+   */
+  static const ParserErrorCode INVALID_OPERATOR = _INVALID_OPERATOR;
+
+  /**
+   * Parameters:
+   * 0: the operator being applied to 'super'
+   *
+   * Only generated by the old parser.
+   * Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
+   */
+  static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = ParserErrorCode(
+    'INVALID_OPERATOR_FOR_SUPER',
+    "The operator '{0}' can't be used with 'super'.",
+  );
+
+  static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
+      _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
+
+  static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = ParserErrorCode(
+    'INVALID_STAR_AFTER_ASYNC',
+    "The modifier 'async*' isn't allowed for an expression function body.",
+    correction: "Try converting the body to a block.",
+  );
+
+  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
+      _INVALID_SUPER_IN_INITIALIZER;
+
+  static const ParserErrorCode INVALID_SYNC = ParserErrorCode(
+    'INVALID_SYNC',
+    "The modifier 'sync' isn't allowed for an expression function body.",
+    correction: "Try converting the body to a block.",
+  );
+
+  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
+      _INVALID_THIS_IN_INITIALIZER;
+
+  static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a member declared inside an
+  // extension uses the keyword `covariant` in the declaration of a parameter.
+  // Extensions aren't classes and don't have subclasses, so the keyword serves
+  // no purpose.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `i` is marked as being
+  // covariant:
+  //
+  // ```dart
+  // extension E on String {
+  //   void a([!covariant!] int i) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the `covariant` keyword:
+  //
+  // ```dart
+  // extension E on String {
+  //   void a(int i) {}
+  // }
+  // ```
+  static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
+      _INVALID_USE_OF_COVARIANT_IN_EXTENSION;
+
+  static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
+      _LIBRARY_DIRECTIVE_NOT_FIRST;
+
+  static const ParserErrorCode LITERAL_WITH_CLASS = _LITERAL_WITH_CLASS;
+
+  static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW =
+      _LITERAL_WITH_CLASS_AND_NEW;
+
+  static const ParserErrorCode LITERAL_WITH_NEW = _LITERAL_WITH_NEW;
+
+  static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER =
+      ParserErrorCode(
+    'LOCAL_FUNCTION_DECLARATION_MODIFIER',
+    "Local function declarations can't specify any modifiers.",
+    correction: "Try removing the modifier.",
+  );
+
+  static const ParserErrorCode MEMBER_WITH_CLASS_NAME = _MEMBER_WITH_CLASS_NAME;
+
+  static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR =
+      _MISSING_ASSIGNABLE_SELECTOR;
+
+  static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
+      _MISSING_ASSIGNMENT_IN_INITIALIZER;
+
+  static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
+      _MISSING_CATCH_OR_FINALLY;
+
+  static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = ParserErrorCode(
+    'MISSING_CLOSING_PARENTHESIS',
+    "The closing parenthesis is missing.",
+    correction: "Try adding the closing parenthesis.",
+  );
+
+  static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE =
+      _MISSING_CONST_FINAL_VAR_OR_TYPE;
+
+  static const ParserErrorCode MISSING_ENUM_BODY = ParserErrorCode(
+    'MISSING_ENUM_BODY',
+    "An enum definition must have a body with at least one constant name.",
+    correction: "Try adding a body and defining at least one constant.",
+  );
+
+  static const ParserErrorCode MISSING_EXPRESSION_IN_INITIALIZER =
+      ParserErrorCode(
+    'MISSING_EXPRESSION_IN_INITIALIZER',
+    "Expected an expression after the assignment operator.",
+    correction:
+        "Try adding the value to be assigned, or remove the assignment operator.",
+  );
+
+  static const ParserErrorCode MISSING_EXPRESSION_IN_THROW =
+      _MISSING_EXPRESSION_IN_THROW;
+
+  static const ParserErrorCode MISSING_FUNCTION_BODY = ParserErrorCode(
+    'MISSING_FUNCTION_BODY',
+    "A function body must be provided.",
+    correction: "Try adding a function body.",
+  );
+
+  static const ParserErrorCode MISSING_FUNCTION_KEYWORD = ParserErrorCode(
+    'MISSING_FUNCTION_KEYWORD',
+    "Function types must have the keyword 'Function' before the parameter list.",
+    correction: "Try adding the keyword 'Function'.",
+  );
+
+  static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = ParserErrorCode(
+    'MISSING_FUNCTION_PARAMETERS',
+    "Functions must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_GET = ParserErrorCode(
+    'MISSING_GET',
+    "Getters must have the keyword 'get' before the getter name.",
+    correction: "Try adding the keyword 'get'.",
+  );
+
+  static const ParserErrorCode MISSING_IDENTIFIER = ParserErrorCode(
+    'MISSING_IDENTIFIER',
+    "Expected an identifier.",
+  );
+
+  static const ParserErrorCode MISSING_INITIALIZER = _MISSING_INITIALIZER;
+
+  static const ParserErrorCode MISSING_KEYWORD_OPERATOR =
+      _MISSING_KEYWORD_OPERATOR;
+
+  static const ParserErrorCode MISSING_METHOD_PARAMETERS = ParserErrorCode(
+    'MISSING_METHOD_PARAMETERS',
+    "Methods must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_FOR_NAMED_PARAMETER =
+      ParserErrorCode(
+    'MISSING_NAME_FOR_NAMED_PARAMETER',
+    "Named parameters in a function type must have a name",
+    correction:
+        "Try providing a name for the parameter or removing the curly braces.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE =
+      ParserErrorCode(
+    'MISSING_NAME_IN_LIBRARY_DIRECTIVE',
+    "Library directives must include a library name.",
+    correction:
+        "Try adding a library name after the keyword 'library', or remove the library directive if the library doesn't have any parts.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE =
+      ParserErrorCode(
+    'MISSING_NAME_IN_PART_OF_DIRECTIVE',
+    "Part-of directives must include a library name.",
+    correction: "Try adding a library name after the 'of'.",
+  );
+
+  static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT =
+      _MISSING_PREFIX_IN_DEFERRED_IMPORT;
+
+  static const ParserErrorCode MISSING_STAR_AFTER_SYNC = ParserErrorCode(
+    'MISSING_STAR_AFTER_SYNC',
+    "The modifier 'sync' must be followed by a star ('*').",
+    correction: "Try removing the modifier, or add a star.",
+  );
+
+  static const ParserErrorCode MISSING_STATEMENT = _MISSING_STATEMENT;
+
+  /**
+   * Parameters:
+   * 0: the terminator that is missing
+   */
+  static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'MISSING_TERMINATOR_FOR_PARAMETER_GROUP',
+    "There is no '{0}' to close the parameter group.",
+    correction: "Try inserting a '{0}' at the end of the group.",
+  );
+
+  static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = ParserErrorCode(
+    'MISSING_TYPEDEF_PARAMETERS',
+    "Typedefs must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = ParserErrorCode(
+    'MISSING_VARIABLE_IN_FOR_EACH',
+    "A loop variable must be declared in a for-each loop before the 'in', but none was found.",
+    correction: "Try declaring a loop variable.",
+  );
+
+  static const ParserErrorCode MIXED_PARAMETER_GROUPS = ParserErrorCode(
+    'MIXED_PARAMETER_GROUPS',
+    "Can't have both positional and named parameters in a single parameter list.",
+    correction: "Try choosing a single style of optional parameters.",
+  );
+
+  static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR =
+      _MIXIN_DECLARES_CONSTRUCTOR;
+
+  static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
+
+  static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
+      _MULTIPLE_EXTENDS_CLAUSES;
+
+  static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = ParserErrorCode(
+    'MULTIPLE_IMPLEMENTS_CLAUSES',
+    "Each class or mixin definition can have at most one implements clause.",
+    correction:
+        "Try combining all of the implements clauses into a single clause.",
+  );
+
+  static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES =
+      _MULTIPLE_LIBRARY_DIRECTIVES;
+
+  static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS =
+      ParserErrorCode(
+    'MULTIPLE_NAMED_PARAMETER_GROUPS',
+    "Can't have multiple groups of named parameters in a single parameter list.",
+    correction: "Try combining all of the groups into a single group.",
+  );
+
+  static const ParserErrorCode MULTIPLE_ON_CLAUSES = _MULTIPLE_ON_CLAUSES;
+
+  static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
+      _MULTIPLE_PART_OF_DIRECTIVES;
+
+  static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS =
+      ParserErrorCode(
+    'MULTIPLE_POSITIONAL_PARAMETER_GROUPS',
+    "Can't have multiple groups of positional parameters in a single parameter list.",
+    correction: "Try combining all of the groups into a single group.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of variables being declared
+   */
+  static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = ParserErrorCode(
+    'MULTIPLE_VARIABLES_IN_FOR_EACH',
+    "A single loop variable must be declared in a for-each loop before the 'in', but {0} were found.",
+    correction:
+        "Try moving all but one of the declarations inside the loop body.",
+  );
+
+  static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS =
+      _MULTIPLE_VARIANCE_MODIFIERS;
+
+  static const ParserErrorCode MULTIPLE_WITH_CLAUSES = _MULTIPLE_WITH_CLAUSES;
+
+  static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = ParserErrorCode(
+    'NAMED_FUNCTION_EXPRESSION',
+    "Function expressions can't be named.",
+    correction:
+        "Try removing the name, or moving the function expression to a function declaration statement.",
+  );
+
+  static const ParserErrorCode NAMED_FUNCTION_TYPE = ParserErrorCode(
+    'NAMED_FUNCTION_TYPE',
+    "Function types can't be named.",
+    correction: "Try replacing the name with the keyword 'Function'.",
+  );
+
+  static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
+    'NAMED_PARAMETER_OUTSIDE_GROUP',
+    "Named parameters must be enclosed in curly braces ('{' and '}').",
+    correction: "Try surrounding the named parameters in curly braces.",
+  );
+
+  static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = ParserErrorCode(
+    'NATIVE_CLAUSE_IN_NON_SDK_CODE',
+    "Native clause can only be used in the SDK and code that is loaded through native extensions.",
+    correction: "Try removing the native clause.",
+  );
+
+  static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
+      _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION;
+
+  static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE =
+      ParserErrorCode(
+    'NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE',
+    "Native functions can only be declared in the SDK and code that is loaded through native extensions.",
+    correction: "Try removing the word 'native'.",
+  );
+
+  static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = ParserErrorCode(
+    'NON_CONSTRUCTOR_FACTORY',
+    "Only a constructor can be declared to be a factory.",
+    correction: "Try removing the keyword 'factory'.",
+  );
+
+  static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = ParserErrorCode(
+    'NON_IDENTIFIER_LIBRARY_NAME',
+    "The name of a library must be an identifier.",
+    correction: "Try using an identifier as the name of the library.",
+  );
+
+  static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = ParserErrorCode(
+    'NON_PART_OF_DIRECTIVE_IN_PART',
+    "The part-of directive must be the only directive in a part.",
+    correction:
+        "Try removing the other directives, or moving them to the library for which this is a part.",
+  );
+
+  static const ParserErrorCode NON_STRING_LITERAL_AS_URI = ParserErrorCode(
+    'NON_STRING_LITERAL_AS_URI',
+    "The URI must be a string literal.",
+    correction: "Try enclosing the URI in either single or double quotes.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the operator that the user is trying to define
+   */
+  static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = ParserErrorCode(
+    'NON_USER_DEFINABLE_OPERATOR',
+    "The operator '{0}' isn't user definable.",
+  );
+
+  static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS =
+      ParserErrorCode(
+    'NORMAL_BEFORE_OPTIONAL_PARAMETERS',
+    "Normal parameters must occur before optional parameters.",
+    correction:
+        "Try moving all of the normal parameters before the optional parameters.",
+  );
+
+  static const ParserErrorCode NULL_AWARE_CASCADE_OUT_OF_ORDER =
+      _NULL_AWARE_CASCADE_OUT_OF_ORDER;
+
+  static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT =
+      ParserErrorCode(
+    'POSITIONAL_AFTER_NAMED_ARGUMENT',
+    "Positional arguments must occur before named arguments.",
+    correction:
+        "Try moving all of the positional arguments before the named arguments.",
+  );
+
+  static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP =
+      ParserErrorCode(
+    'POSITIONAL_PARAMETER_OUTSIDE_GROUP',
+    "Positional parameters must be enclosed in square brackets ('[' and ']').",
+    correction: "Try surrounding the positional parameters in square brackets.",
+  );
+
+  static const ParserErrorCode PREFIX_AFTER_COMBINATOR =
+      _PREFIX_AFTER_COMBINATOR;
+
+  static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
+      _REDIRECTING_CONSTRUCTOR_WITH_BODY;
+
+  static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
+      _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR;
+
+  static const ParserErrorCode SETTER_CONSTRUCTOR = _SETTER_CONSTRUCTOR;
+
+  static const ParserErrorCode SETTER_IN_FUNCTION = ParserErrorCode(
+    'SETTER_IN_FUNCTION',
+    "Setters can't be defined within methods or functions.",
+    correction: "Try moving the setter outside the method or function.",
+  );
+
+  static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
+
+  static const ParserErrorCode STATIC_CONSTRUCTOR = _STATIC_CONSTRUCTOR;
+
+  static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = ParserErrorCode(
+    'STATIC_GETTER_WITHOUT_BODY',
+    "A 'static' getter must have a body.",
+    correction:
+        "Try adding a body to the getter, or removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode STATIC_OPERATOR = _STATIC_OPERATOR;
+
+  static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = ParserErrorCode(
+    'STATIC_SETTER_WITHOUT_BODY',
+    "A 'static' setter must have a body.",
+    correction:
+        "Try adding a body to the setter, or removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = ParserErrorCode(
+    'STATIC_TOP_LEVEL_DECLARATION',
+    "Top-level declarations can't be declared to be static.",
+    correction: "Try removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE =
+      _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE;
+
+  static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES =
+      _SWITCH_HAS_MULTIPLE_DEFAULT_CASES;
+
+  static const ParserErrorCode TOP_LEVEL_OPERATOR = _TOP_LEVEL_OPERATOR;
+
+  static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
+
+  static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
+      _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
+
+  static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
+
+  static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
+      _TYPE_PARAMETER_ON_CONSTRUCTOR;
+
+  /**
+   * 7.1.1 Operators: Type parameters are not syntactically supported on an
+   * operator.
+   */
+  static const ParserErrorCode TYPE_PARAMETER_ON_OPERATOR = ParserErrorCode(
+    'TYPE_PARAMETER_ON_OPERATOR',
+    "Types parameters aren't allowed when defining an operator.",
+    correction: "Try removing the type parameters.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the starting character that was missing
+   */
+  static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP',
+    "There is no '{0}' to open a parameter group.",
+    correction: "Try inserting the '{0}' at the appropriate location.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the unexpected text that was found
+   */
+  static const ParserErrorCode UNEXPECTED_TOKEN = ParserErrorCode(
+    'UNEXPECTED_TOKEN',
+    "Unexpected text '{0}'.",
+    correction: "Try removing the text.",
+  );
+
+  static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
+
+  static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
+
+  static const ParserErrorCode VAR_CLASS = ParserErrorCode(
+    'VAR_CLASS',
+    "Classes can't be declared to be 'var'.",
+    correction: "Try removing the keyword 'var'.",
+  );
+
+  static const ParserErrorCode VAR_ENUM = ParserErrorCode(
+    'VAR_ENUM',
+    "Enums can't be declared to be 'var'.",
+    correction: "Try removing the keyword 'var'.",
+  );
+
+  static const ParserErrorCode VAR_RETURN_TYPE = _VAR_RETURN_TYPE;
+
+  static const ParserErrorCode VAR_TYPEDEF = ParserErrorCode(
+    'VAR_TYPEDEF',
+    "Typedefs can't be declared to be 'var'.",
+    correction:
+        "Try removing the keyword 'var', or replacing it with the name of the return type.",
+  );
+
+  static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
+      _VOID_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode WITH_BEFORE_EXTENDS = _WITH_BEFORE_EXTENDS;
+
+  static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
+      ParserErrorCode(
+    'WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
+    "The default value of a positional parameter should be preceded by '='.",
+    correction: "Try replacing the ':' with '='.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the terminator that was expected
+   * 1: the terminator that was found
+   */
+  static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'WRONG_TERMINATOR_FOR_PARAMETER_GROUP',
+    "Expected '{0}' to close parameter group.",
+    correction: "Try replacing '{0}' with '{1}'.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const ParserErrorCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'ParserErrorCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
+
+  @override
+  ErrorType get type => ErrorType.SYNTACTIC_ERROR;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index e1358f1..6d60a5f 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -2,955 +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.
 
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The errors produced during syntactic analysis (scanning and parsing).
- */
-import 'package:analyzer/error/error.dart';
-
 export 'package:_fe_analyzer_shared/src/scanner/errors.dart'
     show ScannerErrorCode;
-
-part 'syntactic_errors.g.dart';
-
-/**
- * The error codes used for errors detected by the parser. 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 ParserErrorCode extends ErrorCode {
-  static const ParserErrorCode ABSTRACT_CLASS_MEMBER = _ABSTRACT_CLASS_MEMBER;
-
-  static const ParserErrorCode ABSTRACT_ENUM = ParserErrorCode(
-      'ABSTRACT_ENUM', "Enums can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD =
-      _ABSTRACT_EXTERNAL_FIELD;
-
-  static const ParserErrorCode ABSTRACT_LATE_FIELD = _ABSTRACT_LATE_FIELD;
-
-  static const ParserErrorCode ABSTRACT_STATIC_FIELD = _ABSTRACT_STATIC_FIELD;
-
-  static const ParserErrorCode ABSTRACT_STATIC_METHOD = ParserErrorCode(
-      'ABSTRACT_STATIC_METHOD',
-      "Static methods can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = ParserErrorCode(
-      'ABSTRACT_TOP_LEVEL_FUNCTION',
-      "Top-level functions can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = ParserErrorCode(
-      'ABSTRACT_TOP_LEVEL_VARIABLE',
-      "Top-level variables can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TYPEDEF = ParserErrorCode(
-      'ABSTRACT_TYPEDEF', "Typedefs can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT =
-      _ANNOTATION_ON_TYPE_ARGUMENT;
-
-  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
-      _ANNOTATION_WITH_TYPE_ARGUMENTS;
-
-  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
-      _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
-
-  /**
-   * 16.32 Identifier Reference: It is a compile-time error if any of the
-   * identifiers async, await, or yield is used as an identifier in a function
-   * body marked with either async, async*, or sync*.
-   */
-  static const ParserErrorCode ASYNC_KEYWORD_USED_AS_IDENTIFIER =
-      ParserErrorCode(
-          'ASYNC_KEYWORD_USED_AS_IDENTIFIER',
-          "The keywords 'await' and 'yield' can't be used as "
-              "identifiers in an asynchronous or generator function.");
-
-  static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT =
-      _BINARY_OPERATOR_WRITTEN_OUT;
-
-  static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = _BREAK_OUTSIDE_OF_LOOP;
-
-  static const ParserErrorCode CATCH_SYNTAX = _CATCH_SYNTAX;
-
-  static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS =
-      _CATCH_SYNTAX_EXTRA_PARAMETERS;
-
-  static const ParserErrorCode CLASS_IN_CLASS = _CLASS_IN_CLASS;
-
-  static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
-
-  static const ParserErrorCode CONFLICTING_MODIFIERS = _CONFLICTING_MODIFIERS;
-
-  static const ParserErrorCode CONST_AND_FINAL = _CONST_AND_FINAL;
-
-  static const ParserErrorCode CONST_CLASS = _CONST_CLASS;
-
-  static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-      'CONST_CONSTRUCTOR_WITH_BODY', "Const constructors can't have a body.",
-      correction: "Try removing either the 'const' keyword or the body.");
-
-  static const ParserErrorCode CONST_ENUM = ParserErrorCode(
-      'CONST_ENUM', "Enums can't be declared to be 'const'.",
-      correction: "Try removing the 'const' keyword.");
-
-  static const ParserErrorCode CONST_FACTORY = _CONST_FACTORY;
-
-  static const ParserErrorCode CONST_METHOD = _CONST_METHOD;
-
-  static const ParserErrorCode CONST_TYPEDEF = ParserErrorCode(
-      'CONST_TYPEDEF', "Type aliases can't be declared to be 'const'.",
-      correction: "Try removing the 'const' keyword.");
-
-  static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE =
-      _CONSTRUCTOR_WITH_RETURN_TYPE;
-
-  static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP =
-      _CONTINUE_OUTSIDE_OF_LOOP;
-
-  static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE =
-      _CONTINUE_WITHOUT_LABEL_IN_CASE;
-
-  static const ParserErrorCode COVARIANT_AND_STATIC = _COVARIANT_AND_STATIC;
-
-  static const ParserErrorCode COVARIANT_CONSTRUCTOR = ParserErrorCode(
-      'COVARIANT_CONSTRUCTOR',
-      "A constructor can't be declared to be 'covariant'.",
-      correction: "Try removing the keyword 'covariant'.");
-
-  static const ParserErrorCode COVARIANT_MEMBER = _COVARIANT_MEMBER;
-
-  static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
-      ParserErrorCode('COVARIANT_TOP_LEVEL_DECLARATION',
-          "Top-level declarations can't be declared to be covariant.",
-          correction: "Try removing the keyword 'covariant'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function type associated with
-  // a parameter includes optional parameters that have a default value. This
-  // isn't allowed because the default values of parameters aren't part of the
-  // function's type, and therefore including them doesn't provide any value.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the parameter `p` has a
-  // default value even though it's part of the type of the parameter `g`:
-  //
-  // ```dart
-  // void f(void Function([int p [!=!] 0]) g) {
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the default value from the function-type's parameter:
-  //
-  // ```dart
-  // void f(void Function([int p]) g) {
-  // }
-  // ```
-  static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE = ParserErrorCode(
-      'DEFAULT_VALUE_IN_FUNCTION_TYPE',
-      "Parameters in a function type can't have default values.",
-      correction: "Try removing the default value.",
-      hasPublishedDocs: true);
-
-  static const ParserErrorCode DEFERRED_AFTER_PREFIX = _DEFERRED_AFTER_PREFIX;
-
-  static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION =
-      _DIRECTIVE_AFTER_DECLARATION;
-
-  static const ParserErrorCode DUPLICATE_DEFERRED = _DUPLICATE_DEFERRED;
-
-  /**
-   * Parameters:
-   * 0: the label that was duplicated
-   */
-  static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT =
-      _DUPLICATE_LABEL_IN_SWITCH_STATEMENT;
-
-  static const ParserErrorCode DUPLICATE_PREFIX = _DUPLICATE_PREFIX;
-
-  /**
-   * Parameters:
-   * 0: the modifier that was duplicated
-   */
-  static const ParserErrorCode DUPLICATED_MODIFIER = _DUPLICATED_MODIFIER;
-
-  static const ParserErrorCode EMPTY_ENUM_BODY = ParserErrorCode(
-      'EMPTY_ENUM_BODY', "An enum must declare at least one constant name.",
-      correction: "Try declaring a constant.");
-
-  static const ParserErrorCode ENUM_IN_CLASS = _ENUM_IN_CLASS;
-
-  static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND =
-      _EQUALITY_CANNOT_BE_EQUALITY_OPERAND;
-
-  static const ParserErrorCode EXPECTED_BODY = _EXPECTED_BODY;
-
-  static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = ParserErrorCode(
-      'EXPECTED_CASE_OR_DEFAULT', "Expected 'case' or 'default'.",
-      correction: "Try placing this code inside a case clause.");
-
-  static const ParserErrorCode EXPECTED_CLASS_MEMBER = ParserErrorCode(
-      'EXPECTED_CLASS_MEMBER', "Expected a class member.",
-      correction: "Try placing this code inside a class member.");
-
-  static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
-
-  static const ParserErrorCode EXPECTED_EXECUTABLE = ParserErrorCode(
-      'EXPECTED_EXECUTABLE',
-      "Expected a method, getter, setter or operator declaration.",
-      correction:
-          "This appears to be incomplete code. Try removing it or completing it.");
-
-  static const ParserErrorCode EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD =
-      _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD;
-
-  static const ParserErrorCode EXPECTED_INSTEAD = _EXPECTED_INSTEAD;
-
-  static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = ParserErrorCode(
-      'EXPECTED_LIST_OR_MAP_LITERAL', "Expected a list or map literal.",
-      correction:
-          "Try inserting a list or map literal, or remove the type arguments.");
-
-  static const ParserErrorCode EXPECTED_STRING_LITERAL =
-      ParserErrorCode('EXPECTED_STRING_LITERAL', "Expected a string literal.");
-
-  /**
-   * Parameters:
-   * 0: the token that was expected but not found
-   */
-  static const ParserErrorCode EXPECTED_TOKEN =
-      ParserErrorCode('EXPECTED_TOKEN', "Expected to find '{0}'.");
-
-  static const ParserErrorCode EXPECTED_TYPE_NAME =
-      ParserErrorCode('EXPECTED_TYPE_NAME', "Expected a type name.");
-
-  static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
-
-  static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
-      _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an abstract declaration is
-  // declared in an extension. Extensions can declare only concrete members.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the method `a` doesn't
-  // have a body:
-  //
-  // ```dart
-  // extension E on String {
-  //   int [!a!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either provide an implementation for the member or remove it.
-  static const ParserErrorCode EXTENSION_DECLARES_ABSTRACT_MEMBER =
-      _EXTENSION_DECLARES_ABSTRACT_MEMBER;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor declaration is
-  // found in an extension. It isn't valid to define a constructor because
-  // extensions aren't classes, and it isn't possible to create an instance of
-  // an extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there is a constructor
-  // declaration in `E`:
-  //
-  // ```dart
-  // extension E on String {
-  //   [!E!]() : super();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the constructor or replace it with a static method.
-  static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR =
-      _EXTENSION_DECLARES_CONSTRUCTOR;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance field declaration is
-  // found in an extension. It isn't valid to define an instance field because
-  // extensions can only add behavior, not state.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `s` is an instance
-  // field:
-  //
-  // ```dart
-  // %language=2.9
-  // extension E on String {
-  //   String [!s!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the field, make it a static field, or convert it to be a getter,
-  // setter, or method.
-  static const ParserErrorCode EXTENSION_DECLARES_INSTANCE_FIELD =
-      _EXTENSION_DECLARES_INSTANCE_FIELD;
-
-  static const ParserErrorCode EXTERNAL_CLASS = _EXTERNAL_CLASS;
-
-  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY =
-      _EXTERNAL_CONSTRUCTOR_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER =
-      _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER;
-
-  static const ParserErrorCode EXTERNAL_ENUM = _EXTERNAL_ENUM;
-
-  static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION =
-      _EXTERNAL_FACTORY_REDIRECTION;
-
-  static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY =
-      _EXTERNAL_FACTORY_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_FIELD = _EXTERNAL_FIELD;
-
-  static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_GETTER_WITH_BODY', "External getters can't have a body.",
-      correction: "Try removing the body of the getter, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_LATE_FIELD = _EXTERNAL_LATE_FIELD;
-
-  static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY =
-      _EXTERNAL_METHOD_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_OPERATOR_WITH_BODY', "External operators can't have a body.",
-      correction: "Try removing the body of the operator, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_SETTER_WITH_BODY', "External setters can't have a body.",
-      correction: "Try removing the body of the setter, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_TYPEDEF = _EXTERNAL_TYPEDEF;
-
-  static const ParserErrorCode EXTRANEOUS_MODIFIER = _EXTRANEOUS_MODIFIER;
-
-  static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
-      _FACTORY_TOP_LEVEL_DECLARATION;
-
-  static const ParserErrorCode FACTORY_WITH_INITIALIZERS = ParserErrorCode(
-      'FACTORY_WITH_INITIALIZERS',
-      "A 'factory' constructor can't have initializers.",
-      correction:
-          "Try removing the 'factory' keyword to make this a generative constructor, or "
-          "removing the initializers.");
-
-  static const ParserErrorCode FACTORY_WITHOUT_BODY = ParserErrorCode(
-      'FACTORY_WITHOUT_BODY',
-      "A non-redirecting 'factory' constructor must have a body.",
-      correction: "Try adding a body to the constructor.");
-
-  static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
-      _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
-
-  static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
-      _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
-
-  static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
-
-  static const ParserErrorCode FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
-      _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER;
-
-  static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
-
-  static const ParserErrorCode FINAL_CLASS = ParserErrorCode(
-      'FINAL_CLASS', "Classes can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_CONSTRUCTOR = ParserErrorCode(
-      'FINAL_CONSTRUCTOR', "A constructor can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_ENUM = ParserErrorCode(
-      'FINAL_ENUM', "Enums can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_METHOD = ParserErrorCode('FINAL_METHOD',
-      "Getters, setters and methods can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_TYPEDEF = ParserErrorCode(
-      'FINAL_TYPEDEF', "Typedefs can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = ParserErrorCode(
-      'FUNCTION_TYPED_PARAMETER_VAR',
-      "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.",
-      correction: "Try replacing the keyword with a return type.");
-
-  static const ParserErrorCode GETTER_CONSTRUCTOR = _GETTER_CONSTRUCTOR;
-
-  static const ParserErrorCode GETTER_IN_FUNCTION = ParserErrorCode(
-      'GETTER_IN_FUNCTION',
-      "Getters can't be defined within methods or functions.",
-      correction: "Try moving the getter outside the method or function, or "
-          "converting the getter to a function.");
-
-  static const ParserErrorCode GETTER_WITH_PARAMETERS = ParserErrorCode(
-      'GETTER_WITH_PARAMETERS',
-      "Getters must be declared without a parameter list.",
-      correction: "Try removing the parameter list, or "
-          "removing the keyword 'get' to define a method rather than a getter.");
-
-  static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE =
-      _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS =
-      _IMPLEMENTS_BEFORE_EXTENDS;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_ON = _IMPLEMENTS_BEFORE_ON;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = _IMPLEMENTS_BEFORE_WITH;
-
-  static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
-      _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
-
-  static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH =
-      _INITIALIZED_VARIABLE_IN_FOR_EACH;
-
-  static const ParserErrorCode INVALID_AWAIT_IN_FOR = _INVALID_AWAIT_IN_FOR;
-
-  /**
-   * Parameters:
-   * 0: the invalid escape sequence
-   */
-  static const ParserErrorCode INVALID_CODE_POINT = ParserErrorCode(
-      'INVALID_CODE_POINT',
-      "The escape sequence '{0}' isn't a valid code point.");
-
-  static const ParserErrorCode INVALID_COMMENT_REFERENCE = ParserErrorCode(
-      'INVALID_COMMENT_REFERENCE',
-      "Comment references should contain a possibly prefixed identifier and "
-          "can start with 'new', but shouldn't contain anything else.");
-
-  static const ParserErrorCode INVALID_CONSTRUCTOR_NAME =
-      _INVALID_CONSTRUCTOR_NAME;
-
-  static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = ParserErrorCode(
-      'INVALID_GENERIC_FUNCTION_TYPE', "Invalid generic function type.",
-      correction:
-          "Try using a generic function type (returnType 'Function(' parameters ')').");
-
-  static const ParserErrorCode INVALID_HEX_ESCAPE = _INVALID_HEX_ESCAPE;
-
-  static const ParserErrorCode INVALID_INITIALIZER = _INVALID_INITIALIZER;
-
-  static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
-      ParserErrorCode('INVALID_LITERAL_IN_CONFIGURATION',
-          "The literal in a configuration can't contain interpolation.",
-          correction: "Try removing the interpolation expressions.");
-
-  /**
-   * Parameters:
-   * 0: the operator that is invalid
-   */
-  static const ParserErrorCode INVALID_OPERATOR = _INVALID_OPERATOR;
-
-  /**
-   * Parameters:
-   * 0: the operator being applied to 'super'
-   *
-   * Only generated by the old parser.
-   * Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
-   */
-  static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = ParserErrorCode(
-      'INVALID_OPERATOR_FOR_SUPER',
-      "The operator '{0}' can't be used with 'super'.");
-
-  static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
-      _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
-
-  static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = ParserErrorCode(
-      'INVALID_STAR_AFTER_ASYNC',
-      "The modifier 'async*' isn't allowed for an expression function body.",
-      correction: "Try converting the body to a block.");
-
-  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
-      _INVALID_SUPER_IN_INITIALIZER;
-
-  static const ParserErrorCode INVALID_SYNC = ParserErrorCode('INVALID_SYNC',
-      "The modifier 'sync' isn't allowed for an expression function body.",
-      correction: "Try converting the body to a block.");
-
-  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
-      _INVALID_THIS_IN_INITIALIZER;
-
-  static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a member declared inside an
-  // extension uses the keyword `covariant` in the declaration of a parameter.
-  // Extensions aren't classes and don't have subclasses, so the keyword serves
-  // no purpose.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` is marked as being
-  // covariant:
-  //
-  // ```dart
-  // extension E on String {
-  //   void a([!covariant!] int i) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the `covariant` keyword:
-  //
-  // ```dart
-  // extension E on String {
-  //   void a(int i) {}
-  // }
-  // ```
-  static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
-      _INVALID_USE_OF_COVARIANT_IN_EXTENSION;
-
-  static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
-      _LIBRARY_DIRECTIVE_NOT_FIRST;
-
-  static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW =
-      _LITERAL_WITH_CLASS_AND_NEW;
-
-  static const ParserErrorCode LITERAL_WITH_CLASS = _LITERAL_WITH_CLASS;
-
-  static const ParserErrorCode LITERAL_WITH_NEW = _LITERAL_WITH_NEW;
-
-  static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER =
-      ParserErrorCode('LOCAL_FUNCTION_DECLARATION_MODIFIER',
-          "Local function declarations can't specify any modifiers.",
-          correction: "Try removing the modifier.");
-
-  static const ParserErrorCode MEMBER_WITH_CLASS_NAME = _MEMBER_WITH_CLASS_NAME;
-
-  static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR =
-      _MISSING_ASSIGNABLE_SELECTOR;
-
-  static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
-      _MISSING_ASSIGNMENT_IN_INITIALIZER;
-
-  static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
-      _MISSING_CATCH_OR_FINALLY;
-
-  static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = ParserErrorCode(
-      'MISSING_CLOSING_PARENTHESIS', "The closing parenthesis is missing.",
-      correction: "Try adding the closing parenthesis.");
-
-  static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE =
-      _MISSING_CONST_FINAL_VAR_OR_TYPE;
-
-  static const ParserErrorCode MISSING_ENUM_BODY = ParserErrorCode(
-      'MISSING_ENUM_BODY',
-      "An enum definition must have a body with at least one constant name.",
-      correction: "Try adding a body and defining at least one constant.");
-
-  static const ParserErrorCode MISSING_EXPRESSION_IN_INITIALIZER =
-      ParserErrorCode('MISSING_EXPRESSION_IN_INITIALIZER',
-          "Expected an expression after the assignment operator.",
-          correction: "Try adding the value to be assigned, or "
-              "remove the assignment operator.");
-
-  static const ParserErrorCode MISSING_EXPRESSION_IN_THROW =
-      _MISSING_EXPRESSION_IN_THROW;
-
-  static const ParserErrorCode MISSING_FUNCTION_BODY = ParserErrorCode(
-      'MISSING_FUNCTION_BODY', "A function body must be provided.",
-      correction: "Try adding a function body.");
-
-  static const ParserErrorCode MISSING_FUNCTION_KEYWORD = ParserErrorCode(
-      'MISSING_FUNCTION_KEYWORD',
-      "Function types must have the keyword 'Function' before the parameter list.",
-      correction: "Try adding the keyword 'Function'.");
-
-  static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = ParserErrorCode(
-      'MISSING_FUNCTION_PARAMETERS',
-      "Functions must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_GET = ParserErrorCode('MISSING_GET',
-      "Getters must have the keyword 'get' before the getter name.",
-      correction: "Try adding the keyword 'get'.");
-
-  static const ParserErrorCode MISSING_IDENTIFIER =
-      ParserErrorCode('MISSING_IDENTIFIER', "Expected an identifier.");
-
-  static const ParserErrorCode MISSING_INITIALIZER = _MISSING_INITIALIZER;
-
-  static const ParserErrorCode MISSING_KEYWORD_OPERATOR =
-      _MISSING_KEYWORD_OPERATOR;
-
-  static const ParserErrorCode MISSING_METHOD_PARAMETERS = ParserErrorCode(
-      'MISSING_METHOD_PARAMETERS',
-      "Methods must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_NAME_FOR_NAMED_PARAMETER = ParserErrorCode(
-      'MISSING_NAME_FOR_NAMED_PARAMETER',
-      "Named parameters in a function type must have a name",
-      correction:
-          "Try providing a name for the parameter or removing the curly braces.");
-
-  static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = ParserErrorCode(
-      'MISSING_NAME_IN_LIBRARY_DIRECTIVE',
-      "Library directives must include a library name.",
-      correction: "Try adding a library name after the keyword 'library', or "
-          "remove the library directive if the library doesn't have any parts.");
-
-  static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE =
-      ParserErrorCode('MISSING_NAME_IN_PART_OF_DIRECTIVE',
-          "Part-of directives must include a library name.",
-          correction: "Try adding a library name after the 'of'.");
-
-  static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT =
-      _MISSING_PREFIX_IN_DEFERRED_IMPORT;
-
-  static const ParserErrorCode MISSING_STAR_AFTER_SYNC = ParserErrorCode(
-      'MISSING_STAR_AFTER_SYNC',
-      "The modifier 'sync' must be followed by a star ('*').",
-      correction: "Try removing the modifier, or add a star.");
-
-  static const ParserErrorCode MISSING_STATEMENT = _MISSING_STATEMENT;
-
-  /**
-   * Parameters:
-   * 0: the terminator that is missing
-   */
-  static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('MISSING_TERMINATOR_FOR_PARAMETER_GROUP',
-          "There is no '{0}' to close the parameter group.",
-          correction: "Try inserting a '{0}' at the end of the group.");
-
-  static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = ParserErrorCode(
-      'MISSING_TYPEDEF_PARAMETERS',
-      "Typedefs must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = ParserErrorCode(
-      'MISSING_VARIABLE_IN_FOR_EACH',
-      "A loop variable must be declared in a for-each loop before the 'in', but none was found.",
-      correction: "Try declaring a loop variable.");
-
-  static const ParserErrorCode MIXED_PARAMETER_GROUPS = ParserErrorCode(
-      'MIXED_PARAMETER_GROUPS',
-      "Can't have both positional and named parameters in a single parameter list.",
-      correction: "Try choosing a single style of optional parameters.");
-
-  static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR =
-      _MIXIN_DECLARES_CONSTRUCTOR;
-
-  static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
-
-  static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
-      _MULTIPLE_EXTENDS_CLAUSES;
-
-  static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = ParserErrorCode(
-      'MULTIPLE_IMPLEMENTS_CLAUSES',
-      "Each class or mixin definition can have at most one implements clause.",
-      correction:
-          "Try combining all of the implements clauses into a single clause.");
-
-  static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES =
-      _MULTIPLE_LIBRARY_DIRECTIVES;
-
-  static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = ParserErrorCode(
-      'MULTIPLE_NAMED_PARAMETER_GROUPS',
-      "Can't have multiple groups of named parameters in a single parameter list.",
-      correction: "Try combining all of the groups into a single group.");
-
-  static const ParserErrorCode MULTIPLE_ON_CLAUSES = _MULTIPLE_ON_CLAUSES;
-
-  static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
-      _MULTIPLE_PART_OF_DIRECTIVES;
-
-  static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS =
-      ParserErrorCode('MULTIPLE_POSITIONAL_PARAMETER_GROUPS',
-          "Can't have multiple groups of positional parameters in a single parameter list.",
-          correction: "Try combining all of the groups into a single group.");
-
-  /**
-   * Parameters:
-   * 0: the number of variables being declared
-   */
-  static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = ParserErrorCode(
-      'MULTIPLE_VARIABLES_IN_FOR_EACH',
-      "A single loop variable must be declared in a for-each loop before "
-          "the 'in', but {0} were found.",
-      correction:
-          "Try moving all but one of the declarations inside the loop body.");
-
-  static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS =
-      _MULTIPLE_VARIANCE_MODIFIERS;
-
-  static const ParserErrorCode MULTIPLE_WITH_CLAUSES = _MULTIPLE_WITH_CLAUSES;
-
-  static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = ParserErrorCode(
-      'NAMED_FUNCTION_EXPRESSION', "Function expressions can't be named.",
-      correction: "Try removing the name, or "
-          "moving the function expression to a function declaration statement.");
-
-  static const ParserErrorCode NAMED_FUNCTION_TYPE = ParserErrorCode(
-      'NAMED_FUNCTION_TYPE', "Function types can't be named.",
-      correction: "Try replacing the name with the keyword 'Function'.");
-
-  static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
-      'NAMED_PARAMETER_OUTSIDE_GROUP',
-      "Named parameters must be enclosed in curly braces ('{' and '}').",
-      correction: "Try surrounding the named parameters in curly braces.");
-
-  static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = ParserErrorCode(
-      'NATIVE_CLAUSE_IN_NON_SDK_CODE',
-      "Native clause can only be used in the SDK and code that is loaded "
-          "through native extensions.",
-      correction: "Try removing the native clause.");
-
-  static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
-      _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION;
-
-  static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE =
-      ParserErrorCode(
-          'NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE',
-          "Native functions can only be declared in the SDK and code that is "
-              "loaded through native extensions.",
-          correction: "Try removing the word 'native'.");
-
-  static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = ParserErrorCode(
-      'NON_CONSTRUCTOR_FACTORY',
-      "Only a constructor can be declared to be a factory.",
-      correction: "Try removing the keyword 'factory'.");
-
-  static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = ParserErrorCode(
-      'NON_IDENTIFIER_LIBRARY_NAME',
-      "The name of a library must be an identifier.",
-      correction: "Try using an identifier as the name of the library.");
-
-  static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = ParserErrorCode(
-      'NON_PART_OF_DIRECTIVE_IN_PART',
-      "The part-of directive must be the only directive in a part.",
-      correction: "Try removing the other directives, or "
-          "moving them to the library for which this is a part.");
-
-  static const ParserErrorCode NON_STRING_LITERAL_AS_URI = ParserErrorCode(
-      'NON_STRING_LITERAL_AS_URI', "The URI must be a string literal.",
-      correction: "Try enclosing the URI in either single or double quotes.");
-
-  /**
-   * Parameters:
-   * 0: the operator that the user is trying to define
-   */
-  static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = ParserErrorCode(
-      'NON_USER_DEFINABLE_OPERATOR',
-      "The operator '{0}' isn't user definable.");
-
-  static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = ParserErrorCode(
-      'NORMAL_BEFORE_OPTIONAL_PARAMETERS',
-      "Normal parameters must occur before optional parameters.",
-      correction:
-          "Try moving all of the normal parameters before the optional parameters.");
-
-  static const ErrorCode NULL_AWARE_CASCADE_OUT_OF_ORDER =
-      _NULL_AWARE_CASCADE_OUT_OF_ORDER;
-
-  static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = ParserErrorCode(
-      'POSITIONAL_AFTER_NAMED_ARGUMENT',
-      "Positional arguments must occur before named arguments.",
-      correction:
-          "Try moving all of the positional arguments before the named arguments.");
-
-  static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
-      'POSITIONAL_PARAMETER_OUTSIDE_GROUP',
-      "Positional parameters must be enclosed in square brackets ('[' and ']').",
-      correction:
-          "Try surrounding the positional parameters in square brackets.");
-
-  static const ParserErrorCode PREFIX_AFTER_COMBINATOR =
-      _PREFIX_AFTER_COMBINATOR;
-
-  static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
-      _REDIRECTING_CONSTRUCTOR_WITH_BODY;
-
-  static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
-      _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR;
-
-  static const ParserErrorCode SETTER_CONSTRUCTOR = _SETTER_CONSTRUCTOR;
-
-  static const ParserErrorCode SETTER_IN_FUNCTION = ParserErrorCode(
-      'SETTER_IN_FUNCTION',
-      "Setters can't be defined within methods or functions.",
-      correction: "Try moving the setter outside the method or function.");
-
-  static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
-
-  static const ParserErrorCode STATIC_CONSTRUCTOR = _STATIC_CONSTRUCTOR;
-
-  static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = ParserErrorCode(
-      'STATIC_GETTER_WITHOUT_BODY', "A 'static' getter must have a body.",
-      correction:
-          "Try adding a body to the getter, or removing the keyword 'static'.");
-
-  static const ParserErrorCode STATIC_OPERATOR = _STATIC_OPERATOR;
-
-  static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = ParserErrorCode(
-      'STATIC_SETTER_WITHOUT_BODY', "A 'static' setter must have a body.",
-      correction:
-          "Try adding a body to the setter, or removing the keyword 'static'.");
-
-  static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = ParserErrorCode(
-      'STATIC_TOP_LEVEL_DECLARATION',
-      "Top-level declarations can't be declared to be static.",
-      correction: "Try removing the keyword 'static'.");
-
-  static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE =
-      _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE;
-
-  static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES =
-      _SWITCH_HAS_MULTIPLE_DEFAULT_CASES;
-
-  static const ParserErrorCode TOP_LEVEL_OPERATOR = _TOP_LEVEL_OPERATOR;
-
-  static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
-      _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
-
-  static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
-
-  static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
-      _TYPE_PARAMETER_ON_CONSTRUCTOR;
-
-  /**
-   * 7.1.1 Operators: Type parameters are not syntactically supported on an
-   * operator.
-   */
-  static const ParserErrorCode TYPE_PARAMETER_ON_OPERATOR = ParserErrorCode(
-      'TYPE_PARAMETERS_ON_OPERATOR',
-      "Types parameters aren't allowed when defining an operator.",
-      correction: "Try removing the type parameters.");
-
-  static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
-
-  /**
-   * Parameters:
-   * 0: the starting character that was missing
-   */
-  static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP',
-          "There is no '{0}' to open a parameter group.",
-          correction: "Try inserting the '{0}' at the appropriate location.");
-
-  /**
-   * Parameters:
-   * 0: the unexpected text that was found
-   */
-  static const ParserErrorCode UNEXPECTED_TOKEN = ParserErrorCode(
-      'UNEXPECTED_TOKEN', "Unexpected text '{0}'.",
-      correction: "Try removing the text.");
-
-  static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
-
-  static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
-
-  static const ParserErrorCode VAR_CLASS = ParserErrorCode(
-      'VAR_CLASS', "Classes can't be declared to be 'var'.",
-      correction: "Try removing the keyword 'var'.");
-
-  static const ParserErrorCode VAR_ENUM = ParserErrorCode(
-      'VAR_ENUM', "Enums can't be declared to be 'var'.",
-      correction: "Try removing the keyword 'var'.");
-
-  static const ParserErrorCode VAR_RETURN_TYPE = _VAR_RETURN_TYPE;
-
-  static const ParserErrorCode VAR_TYPEDEF =
-      ParserErrorCode('VAR_TYPEDEF', "Typedefs can't be declared to be 'var'.",
-          correction: "Try removing the keyword 'var', or "
-              "replacing it with the name of the return type.");
-
-  static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
-      _VOID_WITH_TYPE_ARGUMENTS;
-
-  static const ParserErrorCode WITH_BEFORE_EXTENDS = _WITH_BEFORE_EXTENDS;
-
-  static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
-      ParserErrorCode('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
-          "The default value of a positional parameter should be preceded by '='.",
-          correction: "Try replacing the ':' with '='.");
-
-  /**
-   * Parameters:
-   * 0: the terminator that was expected
-   * 1: the terminator that was found
-   */
-  static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('WRONG_TERMINATOR_FOR_PARAMETER_GROUP',
-          "Expected '{0}' to close parameter group.",
-          correction: "Try replacing '{0}' with '{1}'.");
-
-  /**
-   * 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 ParserErrorCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'ParserErrorCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.SYNTACTIC_ERROR;
-}
+export 'package:analyzer/src/dart/error/syntactic_errors.analyzer.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index 36a49fe..4db09fe 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -4,7 +4,7 @@
 // Instead modify 'pkg/front_end/messages.yaml' and run
 // 'dart pkg/analyzer/tool/messages/generate.dart' to update.
 
-part of 'syntactic_errors.dart';
+part of 'syntactic_errors.analyzer.g.dart';
 
 final fastaAnalyzerErrorCodes = <ErrorCode?>[
   null,
@@ -125,554 +125,727 @@
   _LITERAL_WITH_CLASS_AND_NEW,
   _LITERAL_WITH_CLASS,
   _LITERAL_WITH_NEW,
+  _CONSTRUCTOR_WITH_TYPE_ARGUMENTS,
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = ParserErrorCode(
-    'ABSTRACT_CLASS_MEMBER',
-    r"Members of classes can't be declared to be 'abstract'.",
-    correction:
-        "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.");
+  'ABSTRACT_CLASS_MEMBER',
+  "Members of classes can't be declared to be 'abstract'.",
+  correction:
+      "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.",
+);
 
 const ParserErrorCode _ABSTRACT_EXTERNAL_FIELD = ParserErrorCode(
-    'ABSTRACT_EXTERNAL_FIELD',
-    r"Fields can't be declared both 'abstract' and 'external'.",
-    correction: "Try removing the 'abstract' or 'external' keyword.");
+  'ABSTRACT_EXTERNAL_FIELD',
+  "Fields can't be declared both 'abstract' and 'external'.",
+  correction: "Try removing the 'abstract' or 'external' keyword.",
+);
 
 const ParserErrorCode _ABSTRACT_LATE_FIELD = ParserErrorCode(
-    'ABSTRACT_LATE_FIELD', r"Abstract fields cannot be late.",
-    correction: "Try removing the 'abstract' or 'late' keyword.");
+  'ABSTRACT_LATE_FIELD',
+  "Abstract fields cannot be late.",
+  correction: "Try removing the 'abstract' or 'late' keyword.",
+);
 
 const ParserErrorCode _ABSTRACT_STATIC_FIELD = ParserErrorCode(
-    'ABSTRACT_STATIC_FIELD', r"Static fields can't be declared 'abstract'.",
-    correction: "Try removing the 'abstract' or 'static' keyword.");
+  'ABSTRACT_STATIC_FIELD',
+  "Static fields can't be declared 'abstract'.",
+  correction: "Try removing the 'abstract' or 'static' keyword.",
+);
 
 const ParserErrorCode _ANNOTATION_ON_TYPE_ARGUMENT = ParserErrorCode(
-    'ANNOTATION_ON_TYPE_ARGUMENT',
-    r"Type arguments can't have annotations because they aren't declarations.");
+  'ANNOTATION_ON_TYPE_ARGUMENT',
+  "Type arguments can't have annotations because they aren't declarations.",
+);
 
 const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS = ParserErrorCode(
-    'ANNOTATION_WITH_TYPE_ARGUMENTS',
-    r"An annotation can't use type arguments.");
+  'ANNOTATION_WITH_TYPE_ARGUMENTS',
+  "An annotation can't use type arguments.",
+);
 
 const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
-    ParserErrorCode('ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
-        r"An annotation with type arguments must be followed by an argument list.");
+    ParserErrorCode(
+  'ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
+  "An annotation with type arguments must be followed by an argument list.",
+);
 
 const ParserErrorCode _BINARY_OPERATOR_WRITTEN_OUT = ParserErrorCode(
-    'BINARY_OPERATOR_WRITTEN_OUT',
-    r"Binary operator '#string' is written as '#string2' instead of the written out word.",
-    correction: "Try replacing '#string' with '#string2'.");
+  'BINARY_OPERATOR_WRITTEN_OUT',
+  "Binary operator '{0}' is written as '{1}' instead of the written out word.",
+  correction: "Try replacing '{0}' with '{1}'.",
+);
 
 const ParserErrorCode _BREAK_OUTSIDE_OF_LOOP = ParserErrorCode(
-    'BREAK_OUTSIDE_OF_LOOP',
-    r"A break statement can't be used outside of a loop or switch statement.",
-    correction: "Try removing the break statement.");
+  'BREAK_OUTSIDE_OF_LOOP',
+  "A break statement can't be used outside of a loop or switch statement.",
+  correction: "Try removing the break statement.",
+);
 
-const ParserErrorCode _CATCH_SYNTAX = ParserErrorCode('CATCH_SYNTAX',
-    r"'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
-    correction:
-        "No types are needed, the first is given by 'on', the second is always 'StackTrace'.");
+const ParserErrorCode _CATCH_SYNTAX = ParserErrorCode(
+  'CATCH_SYNTAX',
+  "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+  correction:
+      "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+);
 
 const ParserErrorCode _CATCH_SYNTAX_EXTRA_PARAMETERS = ParserErrorCode(
-    'CATCH_SYNTAX_EXTRA_PARAMETERS',
-    r"'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
-    correction:
-        "No types are needed, the first is given by 'on', the second is always 'StackTrace'.");
+  'CATCH_SYNTAX_EXTRA_PARAMETERS',
+  "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+  correction:
+      "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+);
 
 const ParserErrorCode _CLASS_IN_CLASS = ParserErrorCode(
-    'CLASS_IN_CLASS', r"Classes can't be declared inside other classes.",
-    correction: "Try moving the class to the top-level.");
+  'CLASS_IN_CLASS',
+  "Classes can't be declared inside other classes.",
+  correction: "Try moving the class to the top-level.",
+);
 
 const ParserErrorCode _COLON_IN_PLACE_OF_IN = ParserErrorCode(
-    'COLON_IN_PLACE_OF_IN', r"For-in loops use 'in' rather than a colon.",
-    correction: "Try replacing the colon with the keyword 'in'.");
+  'COLON_IN_PLACE_OF_IN',
+  "For-in loops use 'in' rather than a colon.",
+  correction: "Try replacing the colon with the keyword 'in'.",
+);
 
 const ParserErrorCode _CONFLICTING_MODIFIERS = ParserErrorCode(
-    'CONFLICTING_MODIFIERS',
-    r"Members can't be declared to be both '#string' and '#string2'.",
-    correction: "Try removing one of the keywords.");
+  'CONFLICTING_MODIFIERS',
+  "Members can't be declared to be both '{0}' and '{1}'.",
+  correction: "Try removing one of the keywords.",
+);
 
 const ParserErrorCode _CONSTRUCTOR_WITH_RETURN_TYPE = ParserErrorCode(
-    'CONSTRUCTOR_WITH_RETURN_TYPE', r"Constructors can't have a return type.",
-    correction: "Try removing the return type.");
+  'CONSTRUCTOR_WITH_RETURN_TYPE',
+  "Constructors can't have a return type.",
+  correction: "Try removing the return type.",
+);
 
-const ParserErrorCode _CONST_AND_FINAL = ParserErrorCode('CONST_AND_FINAL',
-    r"Members can't be declared to be both 'const' and 'final'.",
-    correction: "Try removing either the 'const' or 'final' keyword.");
+const ParserErrorCode _CONSTRUCTOR_WITH_TYPE_ARGUMENTS = ParserErrorCode(
+  'CONSTRUCTOR_WITH_TYPE_ARGUMENTS',
+  "A constructor invocation can't have type arguments after the constructor name.",
+  correction:
+      "Try removing the type arguments or placing them after the class name.",
+);
+
+const ParserErrorCode _CONST_AND_FINAL = ParserErrorCode(
+  'CONST_AND_FINAL',
+  "Members can't be declared to be both 'const' and 'final'.",
+  correction: "Try removing either the 'const' or 'final' keyword.",
+);
 
 const ParserErrorCode _CONST_CLASS = ParserErrorCode(
-    'CONST_CLASS', r"Classes can't be declared to be 'const'.",
-    correction:
-        "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s).");
+  'CONST_CLASS',
+  "Classes can't be declared to be 'const'.",
+  correction:
+      "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s).",
+);
 
-const ParserErrorCode _CONST_FACTORY = ParserErrorCode('CONST_FACTORY',
-    r"Only redirecting factory constructors can be declared to be 'const'.",
-    correction:
-        "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.");
+const ParserErrorCode _CONST_FACTORY = ParserErrorCode(
+  'CONST_FACTORY',
+  "Only redirecting factory constructors can be declared to be 'const'.",
+  correction:
+      "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.",
+);
 
-const ParserErrorCode _CONST_METHOD = ParserErrorCode('CONST_METHOD',
-    r"Getters, setters and methods can't be declared to be 'const'.",
-    correction: "Try removing the 'const' keyword.");
+const ParserErrorCode _CONST_METHOD = ParserErrorCode(
+  'CONST_METHOD',
+  "Getters, setters and methods can't be declared to be 'const'.",
+  correction: "Try removing the 'const' keyword.",
+);
 
 const ParserErrorCode _CONTINUE_OUTSIDE_OF_LOOP = ParserErrorCode(
-    'CONTINUE_OUTSIDE_OF_LOOP',
-    r"A continue statement can't be used outside of a loop or switch statement.",
-    correction: "Try removing the continue statement.");
+  'CONTINUE_OUTSIDE_OF_LOOP',
+  "A continue statement can't be used outside of a loop or switch statement.",
+  correction: "Try removing the continue statement.",
+);
 
 const ParserErrorCode _CONTINUE_WITHOUT_LABEL_IN_CASE = ParserErrorCode(
-    'CONTINUE_WITHOUT_LABEL_IN_CASE',
-    r"A continue statement in a switch statement must have a label as a target.",
-    correction:
-        "Try adding a label associated with one of the case clauses to the continue statement.");
+  'CONTINUE_WITHOUT_LABEL_IN_CASE',
+  "A continue statement in a switch statement must have a label as a target.",
+  correction:
+      "Try adding a label associated with one of the case clauses to the continue statement.",
+);
 
 const ParserErrorCode _COVARIANT_AND_STATIC = ParserErrorCode(
-    'COVARIANT_AND_STATIC',
-    r"Members can't be declared to be both 'covariant' and 'static'.",
-    correction: "Try removing either the 'covariant' or 'static' keyword.");
+  'COVARIANT_AND_STATIC',
+  "Members can't be declared to be both 'covariant' and 'static'.",
+  correction: "Try removing either the 'covariant' or 'static' keyword.",
+);
 
-const ParserErrorCode _COVARIANT_MEMBER = ParserErrorCode('COVARIANT_MEMBER',
-    r"Getters, setters and methods can't be declared to be 'covariant'.",
-    correction: "Try removing the 'covariant' keyword.");
+const ParserErrorCode _COVARIANT_MEMBER = ParserErrorCode(
+  'COVARIANT_MEMBER',
+  "Getters, setters and methods can't be declared to be 'covariant'.",
+  correction: "Try removing the 'covariant' keyword.",
+);
 
 const ParserErrorCode _DEFERRED_AFTER_PREFIX = ParserErrorCode(
-    'DEFERRED_AFTER_PREFIX',
-    r"The deferred keyword should come immediately before the prefix ('as' clause).",
-    correction: "Try moving the deferred keyword before the prefix.");
+  'DEFERRED_AFTER_PREFIX',
+  "The deferred keyword should come immediately before the prefix ('as' clause).",
+  correction: "Try moving the deferred keyword before the prefix.",
+);
 
 const ParserErrorCode _DIRECTIVE_AFTER_DECLARATION = ParserErrorCode(
-    'DIRECTIVE_AFTER_DECLARATION',
-    r"Directives must appear before any declarations.",
-    correction: "Try moving the directive before any declarations.");
+  'DIRECTIVE_AFTER_DECLARATION',
+  "Directives must appear before any declarations.",
+  correction: "Try moving the directive before any declarations.",
+);
 
 const ParserErrorCode _DUPLICATED_MODIFIER = ParserErrorCode(
-    'DUPLICATED_MODIFIER', r"The modifier '#lexeme' was already specified.",
-    correction: "Try removing all but one occurrence of the modifier.");
+  'DUPLICATED_MODIFIER',
+  "The modifier '{0}' was already specified.",
+  correction: "Try removing all but one occurrence of the modifier.",
+);
 
 const ParserErrorCode _DUPLICATE_DEFERRED = ParserErrorCode(
-    'DUPLICATE_DEFERRED',
-    r"An import directive can only have one 'deferred' keyword.",
-    correction: "Try removing all but one 'deferred' keyword.");
+  'DUPLICATE_DEFERRED',
+  "An import directive can only have one 'deferred' keyword.",
+  correction: "Try removing all but one 'deferred' keyword.",
+);
 
 const ParserErrorCode _DUPLICATE_LABEL_IN_SWITCH_STATEMENT = ParserErrorCode(
-    'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
-    r"The label '#name' was already used in this switch statement.",
-    correction: "Try choosing a different name for this label.");
+  'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
+  "The label '{0}' was already used in this switch statement.",
+  correction: "Try choosing a different name for this label.",
+);
 
-const ParserErrorCode _DUPLICATE_PREFIX = ParserErrorCode('DUPLICATE_PREFIX',
-    r"An import directive can only have one prefix ('as' clause).",
-    correction: "Try removing all but one prefix.");
+const ParserErrorCode _DUPLICATE_PREFIX = ParserErrorCode(
+  'DUPLICATE_PREFIX',
+  "An import directive can only have one prefix ('as' clause).",
+  correction: "Try removing all but one prefix.",
+);
 
 const ParserErrorCode _ENUM_IN_CLASS = ParserErrorCode(
-    'ENUM_IN_CLASS', r"Enums can't be declared inside classes.",
-    correction: "Try moving the enum to the top-level.");
+  'ENUM_IN_CLASS',
+  "Enums can't be declared inside classes.",
+  correction: "Try moving the enum to the top-level.",
+);
 
 const ParserErrorCode _EQUALITY_CANNOT_BE_EQUALITY_OPERAND = ParserErrorCode(
-    'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
-    r"A comparison expression can't be an operand of another comparison expression.",
-    correction: "Try putting parentheses around one of the comparisons.");
+  'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
+  "A comparison expression can't be an operand of another comparison expression.",
+  correction: "Try putting parentheses around one of the comparisons.",
+);
 
 const ParserErrorCode _EXPECTED_BODY = ParserErrorCode(
-    'EXPECTED_BODY', r"A #string must have a body, even if it is empty.",
-    correction: "Try adding an empty body.");
+  'EXPECTED_BODY',
+  "A {0} must have a body, even if it is empty.",
+  correction: "Try adding an empty body.",
+);
 
-const ParserErrorCode _EXPECTED_ELSE_OR_COMMA =
-    ParserErrorCode('EXPECTED_ELSE_OR_COMMA', r"Expected 'else' or comma.");
+const ParserErrorCode _EXPECTED_ELSE_OR_COMMA = ParserErrorCode(
+  'EXPECTED_ELSE_OR_COMMA',
+  "Expected 'else' or comma.",
+);
 
 const ParserErrorCode _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD = ParserErrorCode(
-    'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
-    r"'#lexeme' can't be used as an identifier because it's a keyword.",
-    correction: "Try renaming this to be an identifier that isn't a keyword.");
+  'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
+  "'{0}' can't be used as an identifier because it's a keyword.",
+  correction: "Try renaming this to be an identifier that isn't a keyword.",
+);
 
-const ParserErrorCode _EXPECTED_INSTEAD =
-    ParserErrorCode('EXPECTED_INSTEAD', r"Expected '#string' instead of this.");
+const ParserErrorCode _EXPECTED_INSTEAD = ParserErrorCode(
+  'EXPECTED_INSTEAD',
+  "Expected '{0}' instead of this.",
+);
 
 const ParserErrorCode _EXPERIMENT_NOT_ENABLED = ParserErrorCode(
-    'EXPERIMENT_NOT_ENABLED',
-    r"This requires the '#string' language feature to be enabled.",
-    correction:
-        "Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'.");
+  'EXPERIMENT_NOT_ENABLED',
+  "This requires the '{0}' language feature to be enabled.",
+  correction:
+      "Try updating your pubspec.yaml to set the minimum SDK constraint to {1} or higher, and running 'pub get'.",
+);
 
 const ParserErrorCode _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
-    'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-    r"Export directives must precede part directives.",
-    correction: "Try moving the export directives before the part directives.");
+  'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+  "Export directives must precede part directives.",
+  correction: "Try moving the export directives before the part directives.",
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_ABSTRACT_MEMBER = ParserErrorCode(
-    'EXTENSION_DECLARES_ABSTRACT_MEMBER',
-    r"Extensions can't declare abstract members.",
-    correction: "Try providing an implementation for the member.",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_ABSTRACT_MEMBER',
+  "Extensions can't declare abstract members.",
+  correction: "Try providing an implementation for the member.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_CONSTRUCTOR = ParserErrorCode(
-    'EXTENSION_DECLARES_CONSTRUCTOR', r"Extensions can't declare constructors.",
-    correction: "Try removing the constructor declaration.",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_CONSTRUCTOR',
+  "Extensions can't declare constructors.",
+  correction: "Try removing the constructor declaration.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_INSTANCE_FIELD = ParserErrorCode(
-    'EXTENSION_DECLARES_INSTANCE_FIELD',
-    r"Extensions can't declare instance fields",
-    correction:
-        "Try removing the field declaration or making it a static field",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_INSTANCE_FIELD',
+  "Extensions can't declare instance fields",
+  correction: "Try removing the field declaration or making it a static field",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTERNAL_CLASS = ParserErrorCode(
-    'EXTERNAL_CLASS', r"Classes can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_CLASS',
+  "Classes can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_CONSTRUCTOR_WITH_BODY',
-    r"External constructors can't have a body.",
-    correction:
-        "Try removing the body of the constructor, or removing the keyword 'external'.");
+  'EXTERNAL_CONSTRUCTOR_WITH_BODY',
+  "External constructors can't have a body.",
+  correction:
+      "Try removing the body of the constructor, or removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER = ParserErrorCode(
-    'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
-    r"An external constructor can't have any initializers.");
+  'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
+  "An external constructor can't have any initializers.",
+);
 
 const ParserErrorCode _EXTERNAL_ENUM = ParserErrorCode(
-    'EXTERNAL_ENUM', r"Enums can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_ENUM',
+  "Enums can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_FACTORY_REDIRECTION = ParserErrorCode(
-    'EXTERNAL_FACTORY_REDIRECTION', r"A redirecting factory can't be external.",
-    correction: "Try removing the 'external' modifier.");
+  'EXTERNAL_FACTORY_REDIRECTION',
+  "A redirecting factory can't be external.",
+  correction: "Try removing the 'external' modifier.",
+);
 
 const ParserErrorCode _EXTERNAL_FACTORY_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_FACTORY_WITH_BODY', r"External factories can't have a body.",
-    correction:
-        "Try removing the body of the factory, or removing the keyword 'external'.");
+  'EXTERNAL_FACTORY_WITH_BODY',
+  "External factories can't have a body.",
+  correction:
+      "Try removing the body of the factory, or removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_FIELD = ParserErrorCode(
-    'EXTERNAL_FIELD', r"Fields can't be declared to be 'external'.",
-    correction:
-        "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.");
+  'EXTERNAL_FIELD',
+  "Fields can't be declared to be 'external'.",
+  correction:
+      "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.",
+);
 
 const ParserErrorCode _EXTERNAL_LATE_FIELD = ParserErrorCode(
-    'EXTERNAL_LATE_FIELD', r"External fields cannot be late.",
-    correction: "Try removing the 'external' or 'late' keyword.");
+  'EXTERNAL_LATE_FIELD',
+  "External fields cannot be late.",
+  correction: "Try removing the 'external' or 'late' keyword.",
+);
 
 const ParserErrorCode _EXTERNAL_METHOD_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_METHOD_WITH_BODY',
-    r"An external or native method can't have a body.");
+  'EXTERNAL_METHOD_WITH_BODY',
+  "An external or native method can't have a body.",
+);
 
 const ParserErrorCode _EXTERNAL_TYPEDEF = ParserErrorCode(
-    'EXTERNAL_TYPEDEF', r"Typedefs can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_TYPEDEF',
+  "Typedefs can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTRANEOUS_MODIFIER = ParserErrorCode(
-    'EXTRANEOUS_MODIFIER', r"Can't have modifier '#lexeme' here.",
-    correction: "Try removing '#lexeme'.");
+  'EXTRANEOUS_MODIFIER',
+  "Can't have modifier '{0}' here.",
+  correction: "Try removing '{0}'.",
+);
 
 const ParserErrorCode _FACTORY_TOP_LEVEL_DECLARATION = ParserErrorCode(
-    'FACTORY_TOP_LEVEL_DECLARATION',
-    r"Top-level declarations can't be declared to be 'factory'.",
-    correction: "Try removing the keyword 'factory'.");
+  'FACTORY_TOP_LEVEL_DECLARATION',
+  "Top-level declarations can't be declared to be 'factory'.",
+  correction: "Try removing the keyword 'factory'.",
+);
 
-const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS = ParserErrorCode(
-    'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
-    r"A field can only be initialized in its declaring class",
-    correction:
-        "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.");
+const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+    ParserErrorCode(
+  'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
+  "A field can only be initialized in its declaring class",
+  correction:
+      "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.",
+);
 
 const ParserErrorCode _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = ParserErrorCode(
-    'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
-    r"Field formal parameters can only be used in a constructor.",
-    correction: "Try removing 'this.'.");
+  'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
+  "Field formal parameters can only be used in a constructor.",
+  correction: "Try removing 'this.'.",
+);
 
 const ParserErrorCode _FINAL_AND_COVARIANT = ParserErrorCode(
-    'FINAL_AND_COVARIANT',
-    r"Members can't be declared to be both 'final' and 'covariant'.",
-    correction: "Try removing either the 'final' or 'covariant' keyword.");
+  'FINAL_AND_COVARIANT',
+  "Members can't be declared to be both 'final' and 'covariant'.",
+  correction: "Try removing either the 'final' or 'covariant' keyword.",
+);
 
-const ParserErrorCode _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER = ParserErrorCode(
-    'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
-    r"Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
-    correction:
-        "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.");
+const ParserErrorCode _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
+    ParserErrorCode(
+  'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
+  "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
+  correction:
+      "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.",
+);
 
 const ParserErrorCode _FINAL_AND_VAR = ParserErrorCode(
-    'FINAL_AND_VAR', r"Members can't be declared to be both 'final' and 'var'.",
-    correction: "Try removing the keyword 'var'.");
+  'FINAL_AND_VAR',
+  "Members can't be declared to be both 'final' and 'var'.",
+  correction: "Try removing the keyword 'var'.",
+);
 
 const ParserErrorCode _GETTER_CONSTRUCTOR = ParserErrorCode(
-    'GETTER_CONSTRUCTOR', r"Constructors can't be a getter.",
-    correction: "Try removing 'get'.");
+  'GETTER_CONSTRUCTOR',
+  "Constructors can't be a getter.",
+  correction: "Try removing 'get'.",
+);
 
 const ParserErrorCode _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = ParserErrorCode(
-    'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
-    r"Illegal assignment to non-assignable expression.");
+  'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
+  "Illegal assignment to non-assignable expression.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_EXTENDS = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_EXTENDS',
-    r"The extends clause must be before the implements clause.",
-    correction: "Try moving the extends clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_EXTENDS',
+  "The extends clause must be before the implements clause.",
+  correction: "Try moving the extends clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_ON = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_ON',
-    r"The on clause must be before the implements clause.",
-    correction: "Try moving the on clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_ON',
+  "The on clause must be before the implements clause.",
+  correction: "Try moving the on clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_WITH = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_WITH',
-    r"The with clause must be before the implements clause.",
-    correction: "Try moving the with clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_WITH',
+  "The with clause must be before the implements clause.",
+  correction: "Try moving the with clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
-    'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-    r"Import directives must precede part directives.",
-    correction: "Try moving the import directives before the part directives.");
+  'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+  "Import directives must precede part directives.",
+  correction: "Try moving the import directives before the part directives.",
+);
 
 const ParserErrorCode _INITIALIZED_VARIABLE_IN_FOR_EACH = ParserErrorCode(
-    'INITIALIZED_VARIABLE_IN_FOR_EACH',
-    r"The loop variable in a for-each loop can't be initialized.",
-    correction:
-        "Try removing the initializer, or using a different kind of loop.");
+  'INITIALIZED_VARIABLE_IN_FOR_EACH',
+  "The loop variable in a for-each loop can't be initialized.",
+  correction:
+      "Try removing the initializer, or using a different kind of loop.",
+);
 
 const ParserErrorCode _INVALID_AWAIT_IN_FOR = ParserErrorCode(
-    'INVALID_AWAIT_IN_FOR',
-    r"The keyword 'await' isn't allowed for a normal 'for' statement.",
-    correction: "Try removing the keyword, or use a for-each statement.");
+  'INVALID_AWAIT_IN_FOR',
+  "The keyword 'await' isn't allowed for a normal 'for' statement.",
+  correction: "Try removing the keyword, or use a for-each statement.",
+);
 
 const ParserErrorCode _INVALID_CONSTRUCTOR_NAME = ParserErrorCode(
-    'INVALID_CONSTRUCTOR_NAME',
-    r"The name of a constructor must match the name of the enclosing class.");
+  'INVALID_CONSTRUCTOR_NAME',
+  "The name of a constructor must match the name of the enclosing class.",
+);
 
 const ParserErrorCode _INVALID_HEX_ESCAPE = ParserErrorCode(
-    'INVALID_HEX_ESCAPE',
-    r"An escape sequence starting with '\x' must be followed by 2 hexadecimal digits.");
+  'INVALID_HEX_ESCAPE',
+  "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits.",
+);
 
 const ParserErrorCode _INVALID_INITIALIZER = ParserErrorCode(
-    'INVALID_INITIALIZER', r"Not a valid initializer.",
-    correction: "To initialize a field, use the syntax 'name = value'.");
+  'INVALID_INITIALIZER',
+  "Not a valid initializer.",
+  correction: "To initialize a field, use the syntax 'name = value'.",
+);
 
-const ParserErrorCode _INVALID_OPERATOR = ParserErrorCode('INVALID_OPERATOR',
-    r"The string '#lexeme' isn't a user-definable operator.");
+const ParserErrorCode _INVALID_OPERATOR = ParserErrorCode(
+  'INVALID_OPERATOR',
+  "The string '{0}' isn't a user-definable operator.",
+);
 
 const ParserErrorCode _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
-    ParserErrorCode('INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
-        r"The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
-        correction: "Try replacing '?.' with '.'");
+    ParserErrorCode(
+  'INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
+  "The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
+  correction: "Try replacing '?.' with '.'",
+);
 
 const ParserErrorCode _INVALID_SUPER_IN_INITIALIZER = ParserErrorCode(
-    'INVALID_SUPER_IN_INITIALIZER',
-    r"Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')");
+  'INVALID_SUPER_IN_INITIALIZER',
+  "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')",
+);
 
 const ParserErrorCode _INVALID_THIS_IN_INITIALIZER = ParserErrorCode(
-    'INVALID_THIS_IN_INITIALIZER',
-    r"Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())");
+  'INVALID_THIS_IN_INITIALIZER',
+  "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())",
+);
 
 const ParserErrorCode _INVALID_UNICODE_ESCAPE = ParserErrorCode(
-    'INVALID_UNICODE_ESCAPE',
-    r"An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.");
+  'INVALID_UNICODE_ESCAPE',
+  "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.",
+);
 
 const ParserErrorCode _INVALID_USE_OF_COVARIANT_IN_EXTENSION = ParserErrorCode(
-    'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
-    r"Can't have modifier '#lexeme' in an extension.",
-    correction: "Try removing '#lexeme'.",
-    hasPublishedDocs: true);
+  'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
+  "Can't have modifier '{0}' in an extension.",
+  correction: "Try removing '{0}'.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _LIBRARY_DIRECTIVE_NOT_FIRST = ParserErrorCode(
-    'LIBRARY_DIRECTIVE_NOT_FIRST',
-    r"The library directive must appear before all other directives.",
-    correction:
-        "Try moving the library directive before any other directives.");
+  'LIBRARY_DIRECTIVE_NOT_FIRST',
+  "The library directive must appear before all other directives.",
+  correction: "Try moving the library directive before any other directives.",
+);
 
 const ParserErrorCode _LITERAL_WITH_CLASS = ParserErrorCode(
-    'LITERAL_WITH_CLASS',
-    r"The name of the class '#lexeme' can't be included in a #string literal.",
-    correction: "Try removing '#lexeme'");
+  'LITERAL_WITH_CLASS',
+  "A {0} literal can't be prefixed by '{1}'.",
+  correction: "Try removing '{1}'",
+);
 
 const ParserErrorCode _LITERAL_WITH_CLASS_AND_NEW = ParserErrorCode(
-    'LITERAL_WITH_CLASS_AND_NEW',
-    r"Neither 'new' nor the name of the class '#lexeme' can be included in a #string literal.",
-    correction: "Try removing 'new' and '#lexeme'");
+  'LITERAL_WITH_CLASS_AND_NEW',
+  "A {0} literal can't be prefixed by 'new {1}'.",
+  correction: "Try removing 'new' and '{1}'",
+);
 
 const ParserErrorCode _LITERAL_WITH_NEW = ParserErrorCode(
-    'LITERAL_WITH_NEW', r"A literal can't use 'new'.",
-    correction: "Try removing 'new'");
+  'LITERAL_WITH_NEW',
+  "A literal can't be prefixed by 'new'.",
+  correction: "Try removing 'new'",
+);
 
 const ParserErrorCode _MEMBER_WITH_CLASS_NAME = ParserErrorCode(
-    'MEMBER_WITH_CLASS_NAME',
-    r"A class member can't have the same name as the enclosing class.",
-    correction: "Try renaming the member.");
+  'MEMBER_WITH_CLASS_NAME',
+  "A class member can't have the same name as the enclosing class.",
+  correction: "Try renaming the member.",
+);
 
 const ParserErrorCode _MISSING_ASSIGNABLE_SELECTOR = ParserErrorCode(
-    'MISSING_ASSIGNABLE_SELECTOR',
-    r"Missing selector such as '.identifier' or '[0]'.",
-    correction: "Try adding a selector.");
+  'MISSING_ASSIGNABLE_SELECTOR',
+  "Missing selector such as '.identifier' or '[0]'.",
+  correction: "Try adding a selector.",
+);
 
 const ParserErrorCode _MISSING_ASSIGNMENT_IN_INITIALIZER = ParserErrorCode(
-    'MISSING_ASSIGNMENT_IN_INITIALIZER',
-    r"Expected an assignment after the field name.",
-    correction: "To initialize a field, use the syntax 'name = value'.");
+  'MISSING_ASSIGNMENT_IN_INITIALIZER',
+  "Expected an assignment after the field name.",
+  correction: "To initialize a field, use the syntax 'name = value'.",
+);
 
 const ParserErrorCode _MISSING_CATCH_OR_FINALLY = ParserErrorCode(
-    'MISSING_CATCH_OR_FINALLY',
-    r"A try block must be followed by an 'on', 'catch', or 'finally' clause.",
-    correction:
-        "Try adding either a catch or finally clause, or remove the try statement.");
+  'MISSING_CATCH_OR_FINALLY',
+  "A try block must be followed by an 'on', 'catch', or 'finally' clause.",
+  correction:
+      "Try adding either a catch or finally clause, or remove the try statement.",
+);
 
 const ParserErrorCode _MISSING_CONST_FINAL_VAR_OR_TYPE = ParserErrorCode(
-    'MISSING_CONST_FINAL_VAR_OR_TYPE',
-    r"Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
-    correction:
-        "Try adding the name of the type of the variable or the keyword 'var'.");
+  'MISSING_CONST_FINAL_VAR_OR_TYPE',
+  "Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
+  correction:
+      "Try adding the name of the type of the variable or the keyword 'var'.",
+);
 
 const ParserErrorCode _MISSING_EXPRESSION_IN_THROW = ParserErrorCode(
-    'MISSING_EXPRESSION_IN_THROW', r"Missing expression after 'throw'.",
-    correction:
-        "Add an expression after 'throw' or use 'rethrow' to throw a caught exception");
+  'MISSING_EXPRESSION_IN_THROW',
+  "Missing expression after 'throw'.",
+  correction:
+      "Add an expression after 'throw' or use 'rethrow' to throw a caught exception",
+);
 
-const ParserErrorCode _MISSING_INITIALIZER =
-    ParserErrorCode('MISSING_INITIALIZER', r"Expected an initializer.");
+const ParserErrorCode _MISSING_INITIALIZER = ParserErrorCode(
+  'MISSING_INITIALIZER',
+  "Expected an initializer.",
+);
 
 const ParserErrorCode _MISSING_KEYWORD_OPERATOR = ParserErrorCode(
-    'MISSING_KEYWORD_OPERATOR',
-    r"Operator declarations must be preceded by the keyword 'operator'.",
-    correction: "Try adding the keyword 'operator'.");
+  'MISSING_KEYWORD_OPERATOR',
+  "Operator declarations must be preceded by the keyword 'operator'.",
+  correction: "Try adding the keyword 'operator'.",
+);
 
 const ParserErrorCode _MISSING_PREFIX_IN_DEFERRED_IMPORT = ParserErrorCode(
-    'MISSING_PREFIX_IN_DEFERRED_IMPORT',
-    r"Deferred imports should have a prefix.",
-    correction: "Try adding a prefix to the import by adding an 'as' clause.");
+  'MISSING_PREFIX_IN_DEFERRED_IMPORT',
+  "Deferred imports should have a prefix.",
+  correction: "Try adding a prefix to the import by adding an 'as' clause.",
+);
 
-const ParserErrorCode _MISSING_STATEMENT =
-    ParserErrorCode('MISSING_STATEMENT', r"Expected a statement.");
+const ParserErrorCode _MISSING_STATEMENT = ParserErrorCode(
+  'MISSING_STATEMENT',
+  "Expected a statement.",
+);
 
 const ParserErrorCode _MIXIN_DECLARES_CONSTRUCTOR = ParserErrorCode(
-    'MIXIN_DECLARES_CONSTRUCTOR', r"Mixins can't declare constructors.");
+  'MIXIN_DECLARES_CONSTRUCTOR',
+  "Mixins can't declare constructors.",
+);
 
 const ParserErrorCode _MODIFIER_OUT_OF_ORDER = ParserErrorCode(
-    'MODIFIER_OUT_OF_ORDER',
-    r"The modifier '#string' should be before the modifier '#string2'.",
-    correction: "Try re-ordering the modifiers.");
+  'MODIFIER_OUT_OF_ORDER',
+  "The modifier '{0}' should be before the modifier '{1}'.",
+  correction: "Try re-ordering the modifiers.",
+);
 
 const ParserErrorCode _MULTIPLE_EXTENDS_CLAUSES = ParserErrorCode(
-    'MULTIPLE_EXTENDS_CLAUSES',
-    r"Each class definition can have at most one extends clause.",
-    correction:
-        "Try choosing one superclass and define your class to implement (or mix in) the others.");
+  'MULTIPLE_EXTENDS_CLAUSES',
+  "Each class definition can have at most one extends clause.",
+  correction:
+      "Try choosing one superclass and define your class to implement (or mix in) the others.",
+);
 
 const ParserErrorCode _MULTIPLE_LIBRARY_DIRECTIVES = ParserErrorCode(
-    'MULTIPLE_LIBRARY_DIRECTIVES',
-    r"Only one library directive may be declared in a file.",
-    correction: "Try removing all but one of the library directives.");
+  'MULTIPLE_LIBRARY_DIRECTIVES',
+  "Only one library directive may be declared in a file.",
+  correction: "Try removing all but one of the library directives.",
+);
 
 const ParserErrorCode _MULTIPLE_ON_CLAUSES = ParserErrorCode(
-    'MULTIPLE_ON_CLAUSES',
-    r"Each mixin definition can have at most one on clause.",
-    correction: "Try combining all of the on clauses into a single clause.");
+  'MULTIPLE_ON_CLAUSES',
+  "Each mixin definition can have at most one on clause.",
+  correction: "Try combining all of the on clauses into a single clause.",
+);
 
 const ParserErrorCode _MULTIPLE_PART_OF_DIRECTIVES = ParserErrorCode(
-    'MULTIPLE_PART_OF_DIRECTIVES',
-    r"Only one part-of directive may be declared in a file.",
-    correction: "Try removing all but one of the part-of directives.");
+  'MULTIPLE_PART_OF_DIRECTIVES',
+  "Only one part-of directive may be declared in a file.",
+  correction: "Try removing all but one of the part-of directives.",
+);
 
 const ParserErrorCode _MULTIPLE_VARIANCE_MODIFIERS = ParserErrorCode(
-    'MULTIPLE_VARIANCE_MODIFIERS',
-    r"Each type parameter can have at most one variance modifier.",
-    correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.");
+  'MULTIPLE_VARIANCE_MODIFIERS',
+  "Each type parameter can have at most one variance modifier.",
+  correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.",
+);
 
 const ParserErrorCode _MULTIPLE_WITH_CLAUSES = ParserErrorCode(
-    'MULTIPLE_WITH_CLAUSES',
-    r"Each class definition can have at most one with clause.",
-    correction: "Try combining all of the with clauses into a single clause.");
+  'MULTIPLE_WITH_CLAUSES',
+  "Each class definition can have at most one with clause.",
+  correction: "Try combining all of the with clauses into a single clause.",
+);
 
 const ParserErrorCode _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION = ParserErrorCode(
-    'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
-    r"Native clause in this form is deprecated.",
-    correction:
-        "Try removing this native clause and adding @native() or @native('native-name') before the declaration.");
+  'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
+  "Native clause in this form is deprecated.",
+  correction:
+      "Try removing this native clause and adding @native() or @native('native-name') before the declaration.",
+);
 
 const ParserErrorCode _NULL_AWARE_CASCADE_OUT_OF_ORDER = ParserErrorCode(
-    'NULL_AWARE_CASCADE_OUT_OF_ORDER',
-    r"The '?..' cascade operator must be first in the cascade sequence.",
-    correction:
-        "Try moving the '?..' operator to be the first cascade operator in the sequence.");
+  'NULL_AWARE_CASCADE_OUT_OF_ORDER',
+  "The '?..' cascade operator must be first in the cascade sequence.",
+  correction:
+      "Try moving the '?..' operator to be the first cascade operator in the sequence.",
+);
 
 const ParserErrorCode _PREFIX_AFTER_COMBINATOR = ParserErrorCode(
-    'PREFIX_AFTER_COMBINATOR',
-    r"The prefix ('as' clause) should come before any show/hide combinators.",
-    correction: "Try moving the prefix before the combinators.");
+  'PREFIX_AFTER_COMBINATOR',
+  "The prefix ('as' clause) should come before any show/hide combinators.",
+  correction: "Try moving the prefix before the combinators.",
+);
 
 const ParserErrorCode _REDIRECTING_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-    'REDIRECTING_CONSTRUCTOR_WITH_BODY',
-    r"Redirecting constructors can't have a body.",
-    correction:
-        "Try removing the body, or not making this a redirecting constructor.");
+  'REDIRECTING_CONSTRUCTOR_WITH_BODY',
+  "Redirecting constructors can't have a body.",
+  correction:
+      "Try removing the body, or not making this a redirecting constructor.",
+);
 
 const ParserErrorCode _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = ParserErrorCode(
-    'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
-    r"Only factory constructor can specify '=' redirection.",
-    correction:
-        "Try making this a factory constructor, or remove the redirection.");
+  'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
+  "Only factory constructor can specify '=' redirection.",
+  correction:
+      "Try making this a factory constructor, or remove the redirection.",
+);
 
 const ParserErrorCode _SETTER_CONSTRUCTOR = ParserErrorCode(
-    'SETTER_CONSTRUCTOR', r"Constructors can't be a setter.",
-    correction: "Try removing 'set'.");
+  'SETTER_CONSTRUCTOR',
+  "Constructors can't be a setter.",
+  correction: "Try removing 'set'.",
+);
 
-const ParserErrorCode _STACK_OVERFLOW = ParserErrorCode('STACK_OVERFLOW',
-    r"The file has too many nested expressions or statements.",
-    correction: "Try simplifying the code.");
+const ParserErrorCode _STACK_OVERFLOW = ParserErrorCode(
+  'STACK_OVERFLOW',
+  "The file has too many nested expressions or statements.",
+  correction: "Try simplifying the code.",
+);
 
 const ParserErrorCode _STATIC_CONSTRUCTOR = ParserErrorCode(
-    'STATIC_CONSTRUCTOR', r"Constructors can't be static.",
-    correction: "Try removing the keyword 'static'.");
+  'STATIC_CONSTRUCTOR',
+  "Constructors can't be static.",
+  correction: "Try removing the keyword 'static'.",
+);
 
 const ParserErrorCode _STATIC_OPERATOR = ParserErrorCode(
-    'STATIC_OPERATOR', r"Operators can't be static.",
-    correction: "Try removing the keyword 'static'.");
+  'STATIC_OPERATOR',
+  "Operators can't be static.",
+  correction: "Try removing the keyword 'static'.",
+);
 
 const ParserErrorCode _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = ParserErrorCode(
-    'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
-    r"The default case should be the last case in a switch statement.",
-    correction: "Try moving the default case after the other case clauses.");
+  'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
+  "The default case should be the last case in a switch statement.",
+  correction: "Try moving the default case after the other case clauses.",
+);
 
 const ParserErrorCode _SWITCH_HAS_MULTIPLE_DEFAULT_CASES = ParserErrorCode(
-    'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
-    r"The 'default' case can only be declared once.",
-    correction: "Try removing all but one default case.");
+  'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
+  "The 'default' case can only be declared once.",
+  correction: "Try removing all but one default case.",
+);
 
 const ParserErrorCode _TOP_LEVEL_OPERATOR = ParserErrorCode(
-    'TOP_LEVEL_OPERATOR', r"Operators must be declared within a class.",
-    correction:
-        "Try removing the operator, moving it to a class, or converting it to be a function.");
+  'TOP_LEVEL_OPERATOR',
+  "Operators must be declared within a class.",
+  correction:
+      "Try removing the operator, moving it to a class, or converting it to be a function.",
+);
 
 const ParserErrorCode _TYPEDEF_IN_CLASS = ParserErrorCode(
-    'TYPEDEF_IN_CLASS', r"Typedefs can't be declared inside classes.",
-    correction: "Try moving the typedef to the top-level.");
+  'TYPEDEF_IN_CLASS',
+  "Typedefs can't be declared inside classes.",
+  correction: "Try moving the typedef to the top-level.",
+);
 
 const ParserErrorCode _TYPE_ARGUMENTS_ON_TYPE_VARIABLE = ParserErrorCode(
-    'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
-    r"Can't use type arguments with type variable '#name'.",
-    correction: "Try removing the type arguments.");
+  'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
+  "Can't use type arguments with type variable '{0}'.",
+  correction: "Try removing the type arguments.",
+);
 
 const ParserErrorCode _TYPE_BEFORE_FACTORY = ParserErrorCode(
-    'TYPE_BEFORE_FACTORY', r"Factory constructors cannot have a return type.",
-    correction: "Try removing the type appearing before 'factory'.");
+  'TYPE_BEFORE_FACTORY',
+  "Factory constructors cannot have a return type.",
+  correction: "Try removing the type appearing before 'factory'.",
+);
 
 const ParserErrorCode _TYPE_PARAMETER_ON_CONSTRUCTOR = ParserErrorCode(
-    'TYPE_PARAMETER_ON_CONSTRUCTOR',
-    r"Constructors can't have type parameters.",
-    correction: "Try removing the type parameters.");
+  'TYPE_PARAMETER_ON_CONSTRUCTOR',
+  "Constructors can't have type parameters.",
+  correction: "Try removing the type parameters.",
+);
 
-const ParserErrorCode _VAR_AND_TYPE = ParserErrorCode('VAR_AND_TYPE',
-    r"Variables can't be declared using both 'var' and a type name.",
-    correction: "Try removing 'var.'");
+const ParserErrorCode _VAR_AND_TYPE = ParserErrorCode(
+  'VAR_AND_TYPE',
+  "Variables can't be declared using both 'var' and a type name.",
+  correction: "Try removing 'var.'",
+);
 
 const ParserErrorCode _VAR_AS_TYPE_NAME = ParserErrorCode(
-    'VAR_AS_TYPE_NAME', r"The keyword 'var' can't be used as a type name.");
+  'VAR_AS_TYPE_NAME',
+  "The keyword 'var' can't be used as a type name.",
+);
 
 const ParserErrorCode _VAR_RETURN_TYPE = ParserErrorCode(
-    'VAR_RETURN_TYPE', r"The return type can't be 'var'.",
-    correction:
-        "Try removing the keyword 'var', or replacing it with the name of the return type.");
+  'VAR_RETURN_TYPE',
+  "The return type can't be 'var'.",
+  correction:
+      "Try removing the keyword 'var', or replacing it with the name of the return type.",
+);
 
 const ParserErrorCode _VOID_WITH_TYPE_ARGUMENTS = ParserErrorCode(
-    'VOID_WITH_TYPE_ARGUMENTS', r"Type 'void' can't have type arguments.",
-    correction: "Try removing the type arguments.");
+  'VOID_WITH_TYPE_ARGUMENTS',
+  "Type 'void' can't have type arguments.",
+  correction: "Try removing the type arguments.",
+);
 
 const ParserErrorCode _WITH_BEFORE_EXTENDS = ParserErrorCode(
-    'WITH_BEFORE_EXTENDS',
-    r"The extends clause must be before the with clause.",
-    correction: "Try moving the extends clause before the with clause.");
+  'WITH_BEFORE_EXTENDS',
+  "The extends clause must be before the with clause.",
+  correction: "Try moving the extends clause before the with clause.",
+);
diff --git a/pkg/analyzer/lib/src/dart/error/todo_codes.dart b/pkg/analyzer/lib/src/dart/error/todo_codes.dart
index 6b3d5c9..e1f955a 100644
--- a/pkg/analyzer/lib/src/dart/error/todo_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/todo_codes.dart
@@ -8,6 +8,51 @@
 // _documentation comment_ when each is written as an end-of-line comment.
 // ignore_for_file: slash_for_doc_comments
 
+/// Static helper methods and properties for working with [TodoCode]s.
+class Todo {
+  static const _codes = {
+    'TODO': TodoCode.TODO,
+    'FIXME': TodoCode.FIXME,
+    'HACK': TodoCode.HACK,
+    'UNDONE': TodoCode.UNDONE,
+  };
+
+  /// This matches the two common Dart task styles
+  ///
+  /// * TODO:
+  /// * TODO(username):
+  ///
+  /// As well as
+  /// * TODO
+  ///
+  /// But not
+  /// * todo
+  /// * TODOS
+  ///
+  /// It also supports wrapped TODOs where the next line is indented by a space:
+  ///
+  ///   /**
+  ///    * TODO(username): This line is
+  ///    *  wrapped onto the next line
+  ///    */
+  ///
+  /// The matched kind of the TODO (TODO, FIXME, etc.) is returned in named
+  /// captures of "kind1", "kind2" (since it is not possible to reuse a name
+  /// across different parts of the regex).
+  static RegExp TODO_REGEX = RegExp(
+      '([\\s/\\*])(((?<kind1>$_TODO_KIND_PATTERN)[^\\w\\d][^\\r\\n]*(?:\\n\\s*\\*  [^\\r\\n]*)*)'
+      '|((?<kind2>$_TODO_KIND_PATTERN):?\$))');
+
+  static final _TODO_KIND_PATTERN = _codes.keys.join('|');
+
+  Todo._() {
+    throw UnimplementedError('Do not construct');
+  }
+
+  /// Returns the TodoCode for [kind], falling back to [TodoCode.TODO].
+  static TodoCode forKind(String kind) => _codes[kind] ?? TodoCode.TODO;
+}
+
 /**
  * The error code indicating a marker in code for work that needs to be finished
  * or revisited.
@@ -33,43 +78,6 @@
    */
   static const TodoCode UNDONE = TodoCode('UNDONE');
 
-  static const _codes = {
-    'TODO': TODO,
-    'FIXME': FIXME,
-    'HACK': HACK,
-    'UNDONE': UNDONE,
-  };
-
-  /**
-   * This matches the two common Dart task styles
-   *
-   * * TODO:
-   * * TODO(username):
-   *
-   * As well as
-   * * TODO
-   *
-   * But not
-   * * todo
-   * * TODOS
-   *
-   * It also supports wrapped TODOs where the next line is indented by a space:
-   *
-   *   /**
-   *    * TODO(username): This line is
-   *    *  wrapped onto the next line
-   *    */
-   *
-   * The matched kind of the TODO (TODO, FIXME, etc.) is returned in named
-   * captures of "kind1", "kind2" (since it is not possible to reuse a name
-   * across different parts of the regex).
-   */
-  static RegExp TODO_REGEX = RegExp(
-      '([\\s/\\*])(((?<kind1>$_TODO_KIND_PATTERN)[^\\w\\d][^\\r\\n]*(?:\\n\\s*\\*  [^\\r\\n]*)*)'
-      '|((?<kind2>$_TODO_KIND_PATTERN):?\$))');
-
-  static final _TODO_KIND_PATTERN = _codes.keys.join('|');
-
   /**
    * Initialize a newly created error code to have the given [name].
    */
@@ -85,7 +93,4 @@
 
   @override
   ErrorType get type => ErrorType.TODO;
-
-  /// Returns the TodoCode for [kind], falling back to [TODO].
-  static TodoCode forKind(String kind) => _codes[kind] ?? TODO;
 }
diff --git a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
index 359d754..1fa7152 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
@@ -100,7 +100,7 @@
   TypeSystemImpl get _typeSystem => _libraryElement.typeSystem;
 
   /// Compute analysis results for all units of the library.
-  Map<FileState, UnitAnalysisResult> analyzeSync({
+  Map<FileState, UnitAnalysisResult> analyze({
     required String? completionPath,
     required int? completionOffset,
     required OperationPerformanceImpl performance,
@@ -413,7 +413,7 @@
 
     bool isIgnored(AnalysisError error) {
       int errorLine = lineInfo.getLocation(error.offset).lineNumber;
-      return ignoreInfo.ignoredAt(error.errorCode.name, errorLine);
+      return ignoreInfo.ignoredAt(error.errorCode, errorLine);
     }
 
     return errors.where((AnalysisError e) => !isIgnored(e)).toList();
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index 26f8a6d..daf5dbd 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -31,7 +31,6 @@
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/bundle_reader.dart';
-import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/summary2/link.dart' as link2;
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/reference.dart';
@@ -527,7 +526,7 @@
 
         try {
           results = performance!.run('analyze', (performance) {
-            return libraryAnalyzer.analyzeSync(
+            return libraryAnalyzer.analyze(
               completionPath: completionOffset != null ? completionPath : null,
               completionOffset: completionOffset,
               performance: performance,
@@ -835,15 +834,12 @@
       var resolutionData = byteStore.get(resolutionKey, cycle.signature);
       var resolutionBytes = resolutionData?.bytes;
 
-      var unitsInformativeData = <Uri, InformativeUnitData>{};
+      var unitsInformativeBytes = <Uri, Uint8List>{};
       for (var library in cycle.libraries) {
         for (var file in library.libraryFiles) {
           var informativeBytes = file.informativeBytes;
           if (informativeBytes != null) {
-            unitsInformativeData[file.uri] = InformativeUnitData(
-              content: file.getContentWithSameDigest(),
-              bytes: informativeBytes,
-            );
+            unitsInformativeBytes[file.uri] = informativeBytes;
           }
         }
       }
@@ -913,7 +909,7 @@
         elementFactory.addBundle(
           BundleReader(
             elementFactory: elementFactory,
-            unitsInformativeData: unitsInformativeData,
+            unitsInformativeBytes: unitsInformativeBytes,
             resolutionBytes: resolutionBytes as Uint8List,
           ),
         );
diff --git a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
index caf21ee..1b78dc9 100644
--- a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
@@ -6,6 +6,7 @@
 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';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
@@ -26,7 +27,9 @@
 class AstRewriter {
   final ErrorReporter _errorReporter;
 
-  AstRewriter(this._errorReporter);
+  final TypeProvider _typeProvider;
+
+  AstRewriter(this._errorReporter, this._typeProvider);
 
   /// Possibly rewrites [node] as a [MethodInvocation] with a
   /// [FunctionReference] target.
@@ -42,12 +45,18 @@
       // Either `new` or `const` has been specified.
       return node;
     }
-    var typeName = node.constructorName.type.name;
+    var typeName = node.constructorName.type2.name;
     if (typeName is SimpleIdentifier) {
       var element = nameScope.lookup(typeName.name).getter;
-      if (element is FunctionElement || element is MethodElement) {
+      if (element is FunctionElement ||
+          element is MethodElement ||
+          element is PropertyAccessorElement) {
         return _toMethodInvocationOfFunctionReference(
             node: node, function: typeName);
+      } else if (element is TypeAliasElement &&
+          element.aliasedElement is GenericFunctionTypeElement) {
+        return _toMethodInvocationOfAliasedTypeLiteral(
+            node: node, function: typeName, element: element);
       }
     } else if (typeName is PrefixedIdentifier) {
       var prefixElement = nameScope.lookup(typeName.prefix.name).getter;
@@ -57,6 +66,10 @@
         if (element is FunctionElement) {
           return _toMethodInvocationOfFunctionReference(
               node: node, function: typeName);
+        } else if (element is TypeAliasElement &&
+            element.aliasedElement is GenericFunctionTypeElement) {
+          return _toMethodInvocationOfAliasedTypeLiteral(
+              node: node, function: typeName, element: element);
         }
 
         // If `element` is a [ClassElement], or a [TypeAliasElement] aliasing
@@ -212,24 +225,27 @@
   /// The [PrefixedIdentifier] may need to be rewritten as a
   /// [ConstructorReference].
   AstNode prefixedIdentifier(Scope nameScope, PrefixedIdentifier node) {
-    if (node.parent is Annotation) {
+    var parent = node.parent;
+    if (parent is Annotation) {
       // An annotations which is a const constructor invocation can initially be
       // represented with a [PrefixedIdentifier]. Do not rewrite such nodes.
       return node;
     }
-    if (node.parent is CommentReference) {
+    if (parent is CommentReference) {
       // TODO(srawlins): This probably should be rewritten to a
       // [ConstructorReference] at some point.
       return node;
     }
+    if (parent is AssignmentExpression && parent.leftHandSide == node) {
+      // A constructor cannot be assigned to, in some expression like
+      // `C.new = foo`; do not rewrite.
+      return node;
+    }
     var identifier = node.identifier;
     if (identifier.isSynthetic) {
       // This isn't a constructor reference.
       return node;
     }
-    if (node.parent is AssignmentExpression) {
-      return node;
-    }
     var prefix = node.prefix;
     var element = nameScope.lookup(prefix.name).getter;
     if (element is ClassElement) {
@@ -266,21 +282,31 @@
       return node;
     }
     var receiver = node.target!;
-    if (receiver is! FunctionReference) {
-      return node;
-    }
     var propertyName = node.propertyName;
     if (propertyName.isSynthetic) {
       // This isn't a constructor reference.
       return node;
     }
-    // A [ConstructorReference] with explicit type arguments is initially parsed
-    // as a [PropertyAccess] with a [FunctionReference] target; for example:
-    // `List<int>.filled` or `core.List<int>.filled`.
-    var receiverIdentifier = receiver.function;
-    if (receiverIdentifier is! Identifier) {
-      // If [receiverIdentifier] is not an Identifier then [node] is not a
-      // ConstructorReference.
+
+    Identifier receiverIdentifier;
+    TypeArgumentList? typeArguments;
+    if (receiver is PrefixedIdentifier) {
+      receiverIdentifier = receiver;
+    } else if (receiver is FunctionReference) {
+      // A [ConstructorReference] with explicit type arguments is initially
+      // parsed as a [PropertyAccess] with a [FunctionReference] target; for
+      // example: `List<int>.filled` or `core.List<int>.filled`.
+      var function = receiver.function;
+      if (function is! Identifier) {
+        // If [receiverIdentifier] is not an Identifier then [node] is not a
+        // ConstructorReference.
+        return node;
+      }
+      receiverIdentifier = function;
+      typeArguments = receiver.typeArguments;
+    } else {
+      // If the receiver is not (initially) a prefixed identifier or a function
+      // reference, then [node] is not a constructor reference.
       return node;
     }
 
@@ -310,7 +336,7 @@
       return _toConstructorReference_propertyAccess(
         node: node,
         receiver: receiverIdentifier,
-        typeArguments: receiver.typeArguments!,
+        typeArguments: typeArguments,
         classElement: element,
       );
     } else if (element is TypeAliasElement) {
@@ -323,7 +349,7 @@
         return _toConstructorReference_propertyAccess(
           node: node,
           receiver: receiverIdentifier,
-          typeArguments: receiver.typeArguments!,
+          typeArguments: typeArguments,
           classElement: aliasedType.element,
         );
       }
@@ -365,7 +391,10 @@
           [classElement.name, constructorElement.name]);
     }
 
-    var typeName = astFactory.typeName(typeNameIdentifier, typeArguments);
+    var typeName = astFactory.namedType(
+      name: typeNameIdentifier,
+      typeArguments: typeArguments,
+    );
     var constructorName = astFactory.constructorName(
         typeName, node.operator, constructorIdentifier);
     var instanceCreationExpression = astFactory.instanceCreationExpression(
@@ -384,7 +413,7 @@
       return node;
     }
 
-    var typeName = astFactory.typeName(node.prefix, null);
+    var typeName = astFactory.namedType(name: node.prefix);
     var constructorName =
         astFactory.constructorName(typeName, node.period, node.identifier);
     var constructorReference =
@@ -393,15 +422,30 @@
     return constructorReference;
   }
 
-  ConstructorReference _toConstructorReference_propertyAccess({
+  AstNode _toConstructorReference_propertyAccess({
     required PropertyAccess node,
     required Identifier receiver,
-    required TypeArgumentList typeArguments,
+    required TypeArgumentList? typeArguments,
     required ClassElement classElement,
   }) {
+    var name = node.propertyName.name;
+    var constructorElement = name == 'new'
+        ? classElement.unnamedConstructor
+        : classElement.getNamedConstructor(name);
+    if (constructorElement == null && typeArguments == null) {
+      // If there is no constructor by this name, and no type arguments,
+      // do not rewrite the node. If there _are_ type arguments (like
+      // `prefix.C<int>.name`, then it looks more like a constructor tearoff
+      // than anything else, so continue with the rewrite.
+      return node;
+    }
+
     var operator = node.operator;
 
-    var typeName = astFactory.typeName(receiver, typeArguments);
+    var typeName = astFactory.namedType(
+      name: receiver,
+      typeArguments: typeArguments,
+    );
     var constructorName =
         astFactory.constructorName(typeName, operator, node.propertyName);
     var constructorReference =
@@ -415,10 +459,14 @@
     required SimpleIdentifier prefixIdentifier,
     required SimpleIdentifier typeIdentifier,
   }) {
-    var typeName = astFactory.typeName(
-        astFactory.prefixedIdentifier(
-            prefixIdentifier, node.operator!, typeIdentifier),
-        node.typeArguments);
+    var typeName = astFactory.namedType(
+      name: astFactory.prefixedIdentifier(
+        prefixIdentifier,
+        node.operator!,
+        typeIdentifier,
+      ),
+      typeArguments: node.typeArguments,
+    );
     var constructorName = astFactory.constructorName(typeName, null, null);
     var instanceCreationExpression = astFactory.instanceCreationExpression(
         null, constructorName, node.argumentList);
@@ -430,7 +478,10 @@
     required MethodInvocation node,
     required SimpleIdentifier typeIdentifier,
   }) {
-    var typeName = astFactory.typeName(typeIdentifier, node.typeArguments);
+    var typeName = astFactory.namedType(
+      name: typeIdentifier,
+      typeArguments: node.typeArguments,
+    );
     var constructorName = astFactory.constructorName(typeName, null, null);
     var instanceCreationExpression = astFactory.instanceCreationExpression(
         null, constructorName, node.argumentList);
@@ -457,7 +508,7 @@
           typeArguments,
           [classElement.name, constructorElement.name]);
     }
-    var typeName = astFactory.typeName(typeIdentifier, null);
+    var typeName = astFactory.namedType(name: typeIdentifier);
     var constructorName = astFactory.constructorName(
         typeName, node.operator, constructorIdentifier);
     // TODO(scheglov) I think we should drop "typeArguments" below.
@@ -468,13 +519,37 @@
     return instanceCreationExpression;
   }
 
+  MethodInvocation _toMethodInvocationOfAliasedTypeLiteral({
+    required InstanceCreationExpression node,
+    required Identifier function,
+    required TypeAliasElement element,
+  }) {
+    var typeName = astFactory.namedType(
+      name: node.constructorName.type2.name,
+      typeArguments: node.constructorName.type2.typeArguments,
+    );
+    typeName.type = element.aliasedType;
+    typeName.name.staticType = element.aliasedType;
+    var typeLiteral = astFactory.typeLiteral(typeName: typeName);
+    typeLiteral.staticType = _typeProvider.typeType;
+    var methodInvocation = astFactory.methodInvocation(
+      typeLiteral,
+      node.constructorName.period,
+      node.constructorName.name!,
+      null,
+      node.argumentList,
+    );
+    NodeReplacer.replace(node, methodInvocation);
+    return methodInvocation;
+  }
+
   MethodInvocation _toMethodInvocationOfFunctionReference({
     required InstanceCreationExpression node,
     required Identifier function,
   }) {
     var functionReference = astFactory.functionReference(
       function: function,
-      typeArguments: node.constructorName.type.typeArguments,
+      typeArguments: node.constructorName.type2.typeArguments,
     );
     var methodInvocation = astFactory.methodInvocation(
       functionReference,
diff --git a/pkg/analyzer/lib/src/dart/resolver/constructor_reference_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/constructor_reference_resolver.dart
index 75ac605..a9fd9af 100644
--- a/pkg/analyzer/lib/src/dart/resolver/constructor_reference_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/constructor_reference_resolver.dart
@@ -20,7 +20,7 @@
 
   void resolve(ConstructorReferenceImpl node) {
     if (!_resolver.isConstructorTearoffsEnabled &&
-        node.constructorName.type.typeArguments == null) {
+        node.constructorName.type2.typeArguments == null) {
       // Only report this if [node] has no explicit type arguments; otherwise
       // the parser has already reported an error.
       _resolver.errorReporter.reportErrorForNode(
@@ -49,7 +49,7 @@
       //
       // Only report errors when the constructor tearoff feature is enabled,
       // to avoid reporting redundant errors.
-      var enclosingElement = node.constructorName.type.name.staticElement;
+      var enclosingElement = node.constructorName.type2.name.staticElement;
       if (enclosingElement is TypeAliasElement) {
         enclosingElement = enclosingElement.aliasedType.element;
       }
@@ -123,7 +123,7 @@
         constructorName.staticElement = constructorElement.declaration;
         constructorName.name?.staticElement = constructorElement.declaration;
         node.staticType = inferred;
-        constructorName.type.type = null;
+        constructorName.type2.type = null;
       }
     } else {
       var constructorElement = constructorName.staticElement;
@@ -132,7 +132,7 @@
       } else {
         node.staticType = constructorElement.type;
       }
-      constructorName.type.type = null;
+      constructorName.type2.type = null;
     }
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
index f1a6fd8..7a39ba8 100644
--- a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
@@ -443,6 +443,9 @@
       node.expression.accept(this)!;
 
   @override
+  bool visitNamedType(NamedType node) => false;
+
+  @override
   bool visitNode(AstNode node) {
     throw StateError(
         'Missing a visit method for a node of type ${node.runtimeType}');
@@ -554,10 +557,7 @@
   }
 
   @override
-  bool visitTypeLiteral(TypeLiteral node) => _nodeExits(node.typeName);
-
-  @override
-  bool visitTypeName(TypeName node) => false;
+  bool visitTypeLiteral(TypeLiteral node) => _nodeExits(node.type);
 
   @override
   bool visitVariableDeclaration(VariableDeclaration node) {
diff --git a/pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart
index 4db5773..a611f9f 100644
--- a/pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/function_reference_resolver.dart
@@ -61,7 +61,7 @@
         _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
           typeArguments,
-          [function.constructorName.type.name, function.constructorName.name],
+          [function.constructorName.type2.name, function.constructorName.name],
         );
         _resolve(node: node, rawType: function.staticType);
       }
@@ -69,14 +69,47 @@
       // TODO(srawlins): Handle `function` being a [SuperExpression].
 
       function.accept(_resolver);
-      if (function.staticType is FunctionType) {
-        _resolve(node: node, rawType: function.staticType);
+      var functionType = function.staticType;
+      if (functionType == null) {
+        _resolveDisallowedExpression(node, functionType);
+      } else if (functionType is FunctionType) {
+        _resolve(node: node, rawType: functionType);
       } else {
-        _resolveDisallowedExpression(node, function.staticType);
+        var callMethodType =
+            _resolver.typeSystem.getCallMethodType(functionType);
+        if (callMethodType != null) {
+          _resolve(node: node, rawType: callMethodType);
+        } else {
+          _resolveDisallowedExpression(node, functionType);
+        }
       }
     }
   }
 
+  /// Checks for a type instantiation of a `dynamic`-typed expression.
+  ///
+  /// Returns `true` if an error was reported, and resolution can stop.
+  bool _checkDynamicTypeInstantiation(FunctionReferenceImpl node,
+      PrefixedIdentifierImpl function, Element prefixElement) {
+    DartType? prefixType;
+    if (prefixElement is VariableElement) {
+      prefixType = prefixElement.type;
+    } else if (prefixElement is PropertyAccessorElement) {
+      prefixType = prefixElement.returnType;
+    }
+
+    if (prefixType != null && prefixType.isDynamic) {
+      _errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
+        function,
+        [],
+      );
+      node.staticType = DynamicTypeImpl.instance;
+      return true;
+    }
+    return false;
+  }
+
   List<DartType> _checkTypeArguments(
     TypeArgumentList typeArgumentList,
     String? name,
@@ -271,6 +304,32 @@
     _resolve(node: node, rawType: member.type, name: propertyName.name);
   }
 
+  /// Resolve a possible function tearoff of a [FunctionElement] receiver.
+  ///
+  /// There are three possible valid cases: tearing off the `call` method of a
+  /// function element, tearing off an extension element declared on [Function],
+  /// and tearing off an extension element declared on a function type.
+  Element? _resolveFunctionTypeFunction(
+    Expression receiver,
+    SimpleIdentifier methodName,
+    FunctionType receiverType,
+  ) {
+    var methodElement = _resolver.typePropertyResolver
+        .resolve(
+          receiver: receiver,
+          receiverType: receiverType,
+          name: methodName.name,
+          propertyErrorEntity: methodName,
+          nameErrorEntity: methodName,
+        )
+        .getter;
+    if (methodElement != null && methodElement.isStatic) {
+      _reportInvalidAccessToStaticMember(methodName, methodElement,
+          implicitReceiver: false);
+    }
+    return methodElement;
+  }
+
   void _resolvePrefixedIdentifierFunction(
       FunctionReferenceImpl node, PrefixedIdentifierImpl function) {
     var prefixElement = function.prefix.scopeLookupResult!.getter;
@@ -287,14 +346,16 @@
     }
 
     function.prefix.staticElement = prefixElement;
+    function.prefix.staticType = prefixElement.referenceType;
+    var functionName = function.identifier.name;
+
     if (prefixElement is PrefixElement) {
-      var functionName = function.identifier.name;
       var functionElement = prefixElement.scope.lookup(functionName).getter;
       if (functionElement == null) {
         _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME,
           function.identifier,
-          [function.identifier.name, function.prefix.name],
+          [functionName, function.prefix.name],
         );
         function.staticType = DynamicTypeImpl.instance;
         node.staticType = DynamicTypeImpl.instance;
@@ -306,46 +367,36 @@
       }
     }
 
-    DartType? prefixType;
-    if (prefixElement is VariableElement) {
-      prefixType = prefixElement.type;
-    } else if (prefixElement is PropertyAccessorElement) {
-      prefixType = prefixElement.returnType;
-    }
-
-    function.prefix.staticType = prefixType;
-    if (prefixType != null && prefixType.isDynamic) {
-      _errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
-        function,
-        [],
-      );
-      node.staticType = DynamicTypeImpl.instance;
+    if (_checkDynamicTypeInstantiation(node, function, prefixElement)) {
       return;
     }
 
-    var methodElement = _resolveTypeProperty(
+    if (prefixElement is FunctionElement &&
+        functionName == FunctionElement.CALL_METHOD_NAME) {
+      _resolve(
+        node: node,
+        rawType: prefixElement.type,
+        name: functionName,
+      );
+      return;
+    }
+
+    var functionType = _resolveTypeProperty(
       receiver: function.prefix,
-      receiverElement: prefixElement,
       name: function.identifier,
       nameErrorEntity: function,
     );
 
-    if (methodElement is MethodElement) {
-      function.identifier.staticElement = methodElement;
-      function.staticType = methodElement.type;
-      _resolve(
-        node: node,
-        rawType: methodElement.type,
-        name: function.identifier.name,
-      );
-      return;
-    }
-
-    if (methodElement is PropertyAccessorElement) {
-      function.accept(_resolver);
-      _resolveDisallowedExpression(node, methodElement.returnType);
-      return;
+    if (functionType != null) {
+      if (functionType is FunctionType) {
+        function.staticType = functionType;
+        _resolve(
+          node: node,
+          rawType: functionType,
+          name: functionName,
+        );
+        return;
+      }
     }
 
     function.accept(_resolver);
@@ -373,38 +424,12 @@
         node.staticType = DynamicTypeImpl.instance;
         return;
       }
-    } else if (target is PrefixedIdentifierImpl) {
-      var prefixElement = target.prefix.scopeLookupResult!.getter;
-      if (prefixElement is PrefixElement) {
-        var prefixName = target.identifier.name;
-        var targetElement = prefixElement.scope.lookup(prefixName).getter;
-
-        var methodElement = _resolveTypeProperty(
-          receiver: target,
-          receiverElement: targetElement,
-          name: function.propertyName,
-          nameErrorEntity: function,
-        );
-
-        if (methodElement == null) {
-          // TODO(srawlins): Can we get here?
-          node.staticType = DynamicTypeImpl.instance;
-          return;
-        } else {
-          _resolveReceiverPrefix(node, prefixElement, target, methodElement);
-          return;
-        }
-      } else {
-        // TODO(srawlins): Can we get here?
-        node.staticType = DynamicTypeImpl.instance;
-        return;
-      }
     } else if (target is ExtensionOverrideImpl) {
       _resolveExtensionOverride(node, function, target);
       return;
     } else {
-      targetType = target.typeOrThrow;
-      if (targetType.isDynamic) {
+      var targetType = target.staticType;
+      if (targetType != null && targetType.isDynamic) {
         _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
           node,
@@ -413,6 +438,29 @@
         node.staticType = DynamicTypeImpl.instance;
         return;
       }
+      var functionType = _resolveTypeProperty(
+        receiver: target,
+        name: function.propertyName,
+        nameErrorEntity: function,
+      );
+
+      if (functionType == null) {
+        // The target is known, but the method is not; [UNDEFINED_GETTER] is
+        // reported elsewhere.
+        node.staticType = DynamicTypeImpl.instance;
+        return;
+      } else {
+        if (functionType is FunctionType) {
+          function.staticType = functionType;
+          _resolve(
+            node: node,
+            rawType: functionType,
+            name: function.propertyName.name,
+          );
+        }
+
+        return;
+      }
     }
 
     var propertyElement = _resolver.typePropertyResolver
@@ -440,7 +488,7 @@
   void _resolveReceiverPrefix(
     FunctionReferenceImpl node,
     PrefixElement prefixElement,
-    PrefixedIdentifier prefix,
+    PrefixedIdentifierImpl prefix,
     Element element,
   ) {
     if (element is MultiplyDefinedElement) {
@@ -477,10 +525,19 @@
         name: element.name,
       );
       return;
+    } else if (element is ExtensionElement) {
+      prefix.identifier.staticElement = element;
+      prefix.identifier.staticType = DynamicTypeImpl.instance;
+      prefix.staticType = DynamicTypeImpl.instance;
+      _resolveDisallowedExpression(node, DynamicTypeImpl.instance);
+      return;
     }
 
-    // TODO(srawlins): Report undefined prefixed identifier.
-
+    assert(
+      false,
+      'Member of prefixed element, $prefixElement, is not a class, mixin, '
+      'type alias, or executable element: $element (${element.runtimeType})',
+    );
     node.staticType = DynamicTypeImpl.instance;
   }
 
@@ -554,7 +611,13 @@
       // `prefix.C<int>.name` is initially represented as a [PropertyAccess]
       // with a [FunctionReference] target.
       if (node.parent is PropertyAccess) {
-        _resolveConstructorReference(node);
+        if (element is TypeAliasElement &&
+            element.aliasedType is FunctionType) {
+          function.staticElement = element;
+          _resolveTypeAlias(node: node, element: element, typeAlias: function);
+        } else {
+          _resolveConstructorReference(node);
+        }
         return;
       } else if (element is ClassElement) {
         function.staticElement = element;
@@ -590,6 +653,11 @@
       function.staticType = element.type;
       _resolve(node: node, rawType: element.type);
       return;
+    } else if (element is ExtensionElement) {
+      function.staticElement = element;
+      function.staticType = DynamicTypeImpl.instance;
+      _resolveDisallowedExpression(node, DynamicTypeImpl.instance);
+      return;
     } else {
       _resolveDisallowedExpression(node, DynamicTypeImpl.instance);
       return;
@@ -634,7 +702,14 @@
     required DartType instantiatedType,
     required Identifier name,
   }) {
-    var typeName = astFactory.typeName(name, node.typeArguments);
+    // TODO(srawlins): set the static element of [typeName].
+    // This involves a fair amount of resolution, as [name] may be a prefixed
+    // identifier, etc. [TypeName]s should be resolved in [ResolutionVisitor],
+    // and this could be done for nodes like this via [AstRewriter].
+    var typeName = astFactory.namedType(
+      name: name,
+      typeArguments: node.typeArguments,
+    );
     typeName.type = instantiatedType;
     typeName.name.staticType = instantiatedType;
     var typeLiteral = astFactory.typeLiteral(typeName: typeName);
@@ -642,45 +717,52 @@
     NodeReplacer.replace(node, typeLiteral);
   }
 
-  /// Resolves [name] as a property on [receiver] (with element
-  /// [receiverElement]).
+  /// Resolves [name] as a property on [receiver].
   ///
-  /// Returns `null` if [receiverElement] is `null`, a [TypeParameterElement],
-  /// or a [TypeAliasElement] for a non-interface type.
-  ExecutableElement? _resolveTypeProperty({
+  /// Returns `null` if [receiver]'s type is `null`, a [TypeParameterType],
+  /// or a type alias for a non-interface type.
+  DartType? _resolveTypeProperty({
     required Expression receiver,
-    required Element? receiverElement,
-    required SimpleIdentifier name,
+    required SimpleIdentifierImpl name,
     required SyntacticEntity nameErrorEntity,
   }) {
-    if (receiverElement == null) {
-      return null;
-    }
-    if (receiverElement is TypeParameterElement) {
-      return null;
-    }
-    if (receiverElement is ClassElement) {
-      return _resolveStaticElement(receiverElement, name);
-    } else if (receiverElement is TypeAliasElement) {
-      var aliasedType = receiverElement.aliasedType;
-      if (aliasedType is InterfaceType) {
-        return _resolveStaticElement(aliasedType.element, name);
-      } else {
-        return null;
+    if (receiver is Identifier) {
+      var receiverElement = receiver.staticElement;
+      if (receiverElement is ClassElement) {
+        var element = _resolveStaticElement(receiverElement, name);
+        name.staticElement = element;
+        // TODO(srawlins): Should this use referenceType? E.g. if `element`
+        // is a function-typed static getter.
+        return element?.type;
+      } else if (receiverElement is TypeAliasElement) {
+        var aliasedType = receiverElement.aliasedType;
+        if (aliasedType is InterfaceType) {
+          var element = _resolveStaticElement(aliasedType.element, name);
+          name.staticElement = element;
+          // TODO(srawlins): Should this use referenceType? E.g. if `element`
+          // is a function-typed static getter.
+          return element?.type;
+        } else {
+          return null;
+        }
       }
     }
 
-    DartType receiverType;
-    if (receiverElement is VariableElement) {
-      receiverType = receiverElement.type;
-    } else if (receiverElement is PropertyAccessorElement) {
-      receiverType = receiverElement.returnType;
-    } else {
-      assert(false,
-          'Unexpected receiverElement type: ${receiverElement.runtimeType}');
+    var receiverType = receiver.staticType;
+    if (receiverType == null) {
       return null;
+    } else if (receiverType is TypeParameterType) {
+      return null;
+    } else if (receiverType is FunctionType) {
+      if (name.name == FunctionElement.CALL_METHOD_NAME) {
+        return receiverType;
+      }
+      var element = _resolveFunctionTypeFunction(receiver, name, receiverType);
+      name.staticElement = element;
+      return element?.referenceType;
     }
-    var methodElement = _resolver.typePropertyResolver
+
+    var element = _resolver.typePropertyResolver
         .resolve(
           receiver: receiver,
           receiverType: receiverType,
@@ -689,10 +771,35 @@
           nameErrorEntity: nameErrorEntity,
         )
         .getter;
-    if (methodElement != null && methodElement.isStatic) {
-      _reportInvalidAccessToStaticMember(name, methodElement,
+    name.staticElement = element;
+    if (element != null && element.isStatic) {
+      _reportInvalidAccessToStaticMember(name, element,
           implicitReceiver: false);
     }
-    return methodElement;
+    return element?.referenceType;
+  }
+}
+
+extension on Element {
+  /// Returns the 'type' of `this`, when accessed as a "reference", not
+  /// immediately followed by parentheses and arguments.
+  ///
+  /// For all elements that don't have a type (for example, [ExportElement]),
+  /// `null` is returned. For [PropertyAccessorElement], the return value is
+  /// returned. For all other elements, their `type` property is returned.
+  DartType? get referenceType {
+    if (this is ConstructorElement) {
+      return (this as ConstructorElement).type;
+    } else if (this is FunctionElement) {
+      return (this as FunctionElement).type;
+    } else if (this is PropertyAccessorElement) {
+      return (this as PropertyAccessorElement).returnType;
+    } else if (this is MethodElement) {
+      return (this as MethodElement).type;
+    } else if (this is VariableElement) {
+      return (this as VariableElement).type;
+    } else {
+      return null;
+    }
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/resolver/instance_creation_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/instance_creation_expression_resolver.dart
index cf4574c..f824a1e 100644
--- a/pkg/analyzer/lib/src/dart/resolver/instance_creation_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/instance_creation_expression_resolver.dart
@@ -13,7 +13,7 @@
 /// This resolver is responsible for rewriting a given
 /// [InstanceCreationExpression] as a [MethodInvocation] if the parsed
 /// [ConstructorName]'s `type` resolves to a [FunctionReference] or
-/// [ConstructorReference], instead of a [TypeName].
+/// [ConstructorReference], instead of a [NamedType].
 class InstanceCreationExpressionResolver {
   /// The resolver driving this participant.
   final ResolverVisitor _resolver;
@@ -36,7 +36,7 @@
     // InstanceCreationExpression needs to be rewritten as a MethodInvocation
     // with a target of `a.m<int>` (a FunctionReference) and a name of `apply`.
     if (node.keyword == null) {
-      var typeNameTypeArguments = node.constructorName.type.typeArguments;
+      var typeNameTypeArguments = node.constructorName.type2.typeArguments;
       if (typeNameTypeArguments != null) {
         // This could be a method call on a function reference or a constructor
         // reference.
@@ -50,7 +50,7 @@
 
   void _inferArgumentTypes(covariant InstanceCreationExpressionImpl node) {
     var constructorName = node.constructorName;
-    var typeName = constructorName.type;
+    var typeName = constructorName.type2;
     var typeArguments = typeName.typeArguments;
     var elementToInfer = _resolver.inferenceHelper.constructorElementToInfer(
       constructorName: constructorName,
@@ -90,7 +90,7 @@
             ResolverVisitor.resolveArgumentsToParameters(
                 arguments, inferred.parameters, null);
 
-        constructorName.type.type = inferred.returnType;
+        constructorName.type2.type = inferred.returnType;
 
         // Update the static element as well. This is used in some cases, such
         // as computing constant values. It is stored in two places.
@@ -124,7 +124,7 @@
         node.argumentList, whyNotPromotedList);
   }
 
-  /// Resolve [node] which has a [TypeName] with type arguments (given as
+  /// Resolve [node] which has a [NamedType] with type arguments (given as
   /// [typeNameTypeArguments]).
   ///
   /// The instance creation expression may actually be a method call on a
@@ -133,7 +133,7 @@
     InstanceCreationExpressionImpl node,
     TypeArgumentListImpl typeNameTypeArguments,
   ) {
-    var typeNameName = node.constructorName.type.name;
+    var typeNameName = node.constructorName.type2.name;
     if (typeNameName is SimpleIdentifierImpl) {
       // TODO(srawlins): Lookup the name and potentially rewrite `node` as a
       // [MethodInvocation].
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 f665fe8f..36357aa 100644
--- a/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
@@ -97,7 +97,7 @@
     List<TypeParameterElement>? typeParameters;
     ConstructorElement? rawElement;
 
-    var typeName = constructorName.type;
+    var typeName = constructorName.type2;
     var typeArguments = typeName.typeArguments;
     var typeElement = typeName.name.staticElement;
     if (typeElement is ClassElement) {
@@ -247,7 +247,7 @@
   /// generic function type from the surrounding context.
   DartType inferTearOff(
     Expression expression,
-    SimpleIdentifier identifier,
+    SimpleIdentifierImpl identifier,
     DartType tearOffType,
   ) {
     var context = InferenceContext.getContext(expression);
@@ -255,12 +255,11 @@
       var typeArguments = _typeSystem.inferFunctionTypeInstantiation(
         context,
         tearOffType,
-        errorReporter: _resolver.errorReporter,
+        errorReporter: _errorReporter,
         errorNode: expression,
         genericMetadataIsEnabled: _genericMetadataIsEnabled,
       )!;
-      (identifier as SimpleIdentifierImpl).tearOffTypeArgumentTypes =
-          typeArguments;
+      identifier.tearOffTypeArgumentTypes = typeArguments;
       if (typeArguments.isNotEmpty) {
         return tearOffType.instantiate(typeArguments);
       }
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 7be20ef..580be8a 100644
--- a/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
@@ -97,15 +97,15 @@
   }
 
   @override
-  void visitTypeAnnotation(TypeAnnotation node) {
+  void visitNamedType(NamedType node) {
     _assertLegacyType(node.type);
-    super.visitTypeAnnotation(node);
+    super.visitNamedType(node);
   }
 
   @override
-  void visitTypeName(TypeName node) {
+  void visitTypeAnnotation(TypeAnnotation node) {
     _assertLegacyType(node.type);
-    super.visitTypeName(node);
+    super.visitTypeAnnotation(node);
   }
 
   @override
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 d5d7b50..6833dd3 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -164,6 +164,21 @@
       return;
     }
 
+    if (receiver is TypeLiteralImpl &&
+        receiver.type.typeArguments != null &&
+        receiver.type.type is FunctionType) {
+      // There is no possible resolution for a property access of a function
+      // type literal (which can only be a type instantiation of a type alias
+      // of a function type).
+      _resolver.errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.UNDEFINED_METHOD_ON_FUNCTION_TYPE,
+        nameNode,
+        [name, receiver.type.name.name],
+      );
+      _setDynamicResolution(node, whyNotPromotedList: whyNotPromotedList);
+      return;
+    }
+
     _resolveReceiverType(
       node: node,
       receiver: receiver,
diff --git a/pkg/analyzer/lib/src/dart/resolver/named_type_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/named_type_resolver.dart
new file mode 100644
index 0000000..9cf8cfd
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/resolver/named_type_resolver.dart
@@ -0,0 +1,659 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All 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/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/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';
+import 'package:analyzer/src/diagnostic/diagnostic_factory.dart';
+import 'package:analyzer/src/error/codes.dart';
+
+/// Helper for resolving types.
+///
+/// The client must set [nameScope] before calling [resolve].
+class NamedTypeResolver {
+  final LibraryElementImpl _libraryElement;
+  final TypeSystemImpl typeSystem;
+  final DartType dynamicType;
+  final bool isNonNullableByDefault;
+  final ErrorReporter errorReporter;
+
+  late Scope nameScope;
+
+  /// If not `null`, the element of the [ClassDeclaration], or the
+  /// [ClassTypeAlias] being resolved.
+  ClassElement? enclosingClass;
+
+  /// If not `null`, a direct child of an [ExtendsClause], [WithClause],
+  /// or [ImplementsClause].
+  NamedType? classHierarchy_namedType;
+
+  /// If not `null`, a direct child the [WithClause] in the [enclosingClass].
+  NamedType? withClause_namedType;
+
+  /// If not `null`, the [NamedType] of the redirected constructor being
+  /// resolved, in the [enclosingClass].
+  NamedType? redirectedConstructor_namedType;
+
+  /// If [resolve] finds out that the given [NamedType] with a
+  /// [PrefixedIdentifier] name is actually the name of a class and the name of
+  /// the constructor, it rewrites the [ConstructorName] to correctly represent
+  /// the type and the constructor name, and set this field to the rewritten
+  /// [ConstructorName]. Otherwise this field will be set `null`.
+  ConstructorName? rewriteResult;
+
+  /// If [resolve] reported an error, this flag is set to `true`.
+  bool hasErrorReported = false;
+
+  NamedTypeResolver(this._libraryElement, TypeProvider typeProvider,
+      this.isNonNullableByDefault, this.errorReporter)
+      : typeSystem = _libraryElement.typeSystem,
+        dynamicType = typeProvider.dynamicType;
+
+  bool get _genericMetadataIsEnabled =>
+      enclosingClass!.library.featureSet.isEnabled(Feature.generic_metadata);
+
+  NullabilitySuffix get _noneOrStarSuffix {
+    return isNonNullableByDefault
+        ? NullabilitySuffix.none
+        : NullabilitySuffix.star;
+  }
+
+  /// Resolve the given [NamedType] - set its element and static type. Only the
+  /// given [node] is resolved, all its children must be already resolved.
+  ///
+  /// The client must set [nameScope] before calling [resolve].
+  void resolve(TypeNameImpl node) {
+    rewriteResult = null;
+    hasErrorReported = false;
+
+    var typeIdentifier = node.name;
+    if (typeIdentifier is PrefixedIdentifierImpl) {
+      var prefix = typeIdentifier.prefix;
+      var prefixName = prefix.name;
+      var prefixElement = nameScope.lookup(prefixName).getter;
+      prefix.staticElement = prefixElement;
+
+      if (prefixElement == null) {
+        _resolveToElement(node, null);
+        return;
+      }
+
+      if (prefixElement is ClassElement || prefixElement is TypeAliasElement) {
+        _rewriteToConstructorName(node, typeIdentifier);
+        return;
+      }
+
+      if (prefixElement is PrefixElement) {
+        var nameNode = typeIdentifier.identifier;
+        var name = nameNode.name;
+
+        var element = prefixElement.scope.lookup(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 SimpleIdentifierImpl;
+      var name = nameNode.name;
+
+      if (name == 'void') {
+        node.type = VoidTypeImpl.instance;
+        return;
+      }
+
+      var element = nameScope.lookup(name).getter;
+      nameNode.staticElement = element;
+      _resolveToElement(node, element);
+    }
+  }
+
+  /// Return type arguments, exactly [parameterCount].
+  List<DartType> _buildTypeArguments(
+      NamedType node, TypeArgumentList argumentList, int parameterCount) {
+    var arguments = argumentList.arguments;
+    var argumentCount = arguments.length;
+
+    if (argumentCount != parameterCount) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
+        node,
+        [node.name.name, parameterCount, argumentCount],
+      );
+      return List.filled(parameterCount, DynamicTypeImpl.instance);
+    }
+
+    if (parameterCount == 0) {
+      return const <DartType>[];
+    }
+
+    return List.generate(
+      parameterCount,
+      (i) => arguments[i].typeOrThrow,
+    );
+  }
+
+  NullabilitySuffix _getNullability(NamedType node) {
+    if (isNonNullableByDefault) {
+      if (node.question != null) {
+        return NullabilitySuffix.question;
+      } else {
+        return NullabilitySuffix.none;
+      }
+    }
+    return NullabilitySuffix.star;
+  }
+
+  /// We are resolving the [NamedType] in a redirecting constructor of the
+  /// [enclosingClass].
+  InterfaceType _inferRedirectedConstructor(ClassElement element) {
+    if (element == enclosingClass) {
+      return element.thisType;
+    } else {
+      var typeParameters = element.typeParameters;
+      if (typeParameters.isEmpty) {
+        return element.thisType;
+      } else {
+        var typeArguments = typeSystem.inferGenericFunctionOrType(
+          typeParameters: typeParameters,
+          parameters: const [],
+          declaredReturnType: element.thisType,
+          argumentTypes: const [],
+          contextReturnType: enclosingClass!.thisType,
+          genericMetadataIsEnabled: _genericMetadataIsEnabled,
+        )!;
+        return element.instantiate(
+          typeArguments: typeArguments,
+          nullabilitySuffix: _noneOrStarSuffix,
+        );
+      }
+    }
+  }
+
+  DartType _instantiateElement(NamedType node, Element element) {
+    var nullability = _getNullability(node);
+
+    var argumentList = node.typeArguments;
+    if (argumentList != null) {
+      if (element is ClassElement) {
+        var typeArguments = _buildTypeArguments(
+          node,
+          argumentList,
+          element.typeParameters.length,
+        );
+        return element.instantiate(
+          typeArguments: typeArguments,
+          nullabilitySuffix: nullability,
+        );
+      } else if (element is TypeAliasElement) {
+        var typeArguments = _buildTypeArguments(
+          node,
+          argumentList,
+          element.typeParameters.length,
+        );
+        var type = element.instantiate(
+          typeArguments: typeArguments,
+          nullabilitySuffix: nullability,
+        );
+        type = typeSystem.toLegacyType(type);
+        return _verifyTypeAliasForContext(node, element, type);
+      } else if (_isInstanceCreation(node)) {
+        _ErrorHelper(errorReporter).reportNewWithNonType(node);
+        return dynamicType;
+      } else if (element is DynamicElementImpl) {
+        _buildTypeArguments(node, argumentList, 0);
+        return DynamicTypeImpl.instance;
+      } else if (element is NeverElementImpl) {
+        _buildTypeArguments(node, argumentList, 0);
+        return _instantiateElementNever(nullability);
+      } else if (element is TypeParameterElement) {
+        _buildTypeArguments(node, argumentList, 0);
+        return element.instantiate(
+          nullabilitySuffix: nullability,
+        );
+      } else {
+        _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, element);
+        return dynamicType;
+      }
+    }
+
+    if (element is ClassElement) {
+      if (identical(node, withClause_namedType)) {
+        for (var mixin in enclosingClass!.mixins) {
+          if (mixin.element == element) {
+            return mixin;
+          }
+        }
+      }
+
+      if (identical(node, redirectedConstructor_namedType)) {
+        return _inferRedirectedConstructor(element);
+      }
+
+      return typeSystem.instantiateToBounds2(
+        classElement: element,
+        nullabilitySuffix: nullability,
+      );
+    } else if (element is TypeAliasElement) {
+      var type = typeSystem.instantiateToBounds2(
+        typeAliasElement: element,
+        nullabilitySuffix: nullability,
+      );
+      return _verifyTypeAliasForContext(node, element, type);
+    } else if (_isInstanceCreation(node)) {
+      _ErrorHelper(errorReporter).reportNewWithNonType(node);
+      return dynamicType;
+    } else if (element is DynamicElementImpl) {
+      return DynamicTypeImpl.instance;
+    } else if (element is NeverElementImpl) {
+      return _instantiateElementNever(nullability);
+    } else if (element is TypeParameterElement) {
+      return element.instantiate(
+        nullabilitySuffix: nullability,
+      );
+    } else {
+      _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, element);
+      return dynamicType;
+    }
+  }
+
+  DartType _instantiateElementNever(NullabilitySuffix nullability) {
+    if (isNonNullableByDefault) {
+      return NeverTypeImpl.instance.withNullability(nullability);
+    } else {
+      return typeSystem.typeProvider.nullType;
+    }
+  }
+
+  void _resolveToElement(TypeNameImpl node, Element? element) {
+    if (element == null) {
+      node.type = dynamicType;
+      if (!_libraryElement.shouldIgnoreUndefinedIdentifier(node.name)) {
+        _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, null);
+      }
+      return;
+    }
+
+    if (element is MultiplyDefinedElement) {
+      node.type = dynamicType;
+      return;
+    }
+
+    var type = _instantiateElement(node, element);
+    type = _verifyNullability(node, type);
+    node.type = type;
+  }
+
+  /// 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(
+    TypeNameImpl node,
+    PrefixedIdentifier typeIdentifier,
+  ) {
+    var constructorName = node.parent;
+    if (constructorName is ConstructorNameImpl &&
+        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],
+      );
+    }
+  }
+
+  /// If the [node] appears in a location where a nullable type is not allowed,
+  /// but the [type] is nullable (because the question mark was specified,
+  /// or the type alias is nullable), report an error, and return the
+  /// corresponding non-nullable type.
+  DartType _verifyNullability(NamedType node, DartType type) {
+    if (identical(node, classHierarchy_namedType)) {
+      if (type.nullabilitySuffix == NullabilitySuffix.question) {
+        var parent = node.parent;
+        if (parent is ExtendsClause || parent is ClassTypeAlias) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE,
+            node,
+          );
+        } else if (parent is ImplementsClause) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE,
+            node,
+          );
+        } else if (parent is OnClause) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE,
+            node,
+          );
+        } else if (parent is WithClause) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE,
+            node,
+          );
+        }
+        return (type as TypeImpl).withNullability(NullabilitySuffix.none);
+      }
+    }
+
+    return type;
+  }
+
+  DartType _verifyTypeAliasForContext(
+    NamedType node,
+    TypeAliasElement element,
+    DartType type,
+  ) {
+    // If a type alias that expands to a type parameter.
+    if (element.aliasedType is TypeParameterType) {
+      var parent = node.parent;
+      if (parent is ConstructorName) {
+        var errorNode = _ErrorHelper._getErrorNode(node);
+        var constructorUsage = parent.parent;
+        if (constructorUsage is InstanceCreationExpression) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode
+                .INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER,
+            errorNode,
+          );
+        } else if (constructorUsage is ConstructorDeclaration &&
+            constructorUsage.redirectedConstructor == parent) {
+          errorReporter.reportErrorForNode(
+            CompileTimeErrorCode
+                .REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER,
+            errorNode,
+          );
+        } else {
+          throw UnimplementedError('${constructorUsage.runtimeType}');
+        }
+        return dynamicType;
+      }
+
+      // Report if this type is used as a class in hierarchy.
+      ErrorCode? errorCode;
+      if (parent is ExtendsClause) {
+        errorCode =
+            CompileTimeErrorCode.EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
+      } else if (parent is ImplementsClause) {
+        errorCode = CompileTimeErrorCode
+            .IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
+      } else if (parent is OnClause) {
+        errorCode =
+            CompileTimeErrorCode.MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
+      } else if (parent is WithClause) {
+        errorCode =
+            CompileTimeErrorCode.MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
+      }
+      if (errorCode != null) {
+        var errorNode = _ErrorHelper._getErrorNode(node);
+        errorReporter.reportErrorForNode(errorCode, errorNode);
+        hasErrorReported = true;
+        return dynamicType;
+      }
+    }
+    if (type is! InterfaceType && _isInstanceCreation(node)) {
+      _ErrorHelper(errorReporter).reportNewWithNonType(node);
+      return dynamicType;
+    }
+    return type;
+  }
+
+  static bool _isInstanceCreation(NamedType node) {
+    var parent = node.parent;
+    return parent is ConstructorName &&
+        parent.parent is InstanceCreationExpression;
+  }
+}
+
+/// Helper for reporting errors during type name resolution.
+class _ErrorHelper {
+  final ErrorReporter errorReporter;
+
+  _ErrorHelper(this.errorReporter);
+
+  bool reportNewWithNonType(NamedType node) {
+    var constructorName = node.parent;
+    if (constructorName is ConstructorName) {
+      var instanceCreation = constructorName.parent;
+      if (instanceCreation is InstanceCreationExpression) {
+        var identifier = node.name;
+        var errorNode = _getErrorNode(node);
+        errorReporter.reportErrorForNode(
+          instanceCreation.isConst
+              ? CompileTimeErrorCode.CONST_WITH_NON_TYPE
+              : CompileTimeErrorCode.NEW_WITH_NON_TYPE,
+          errorNode,
+          [identifier.name],
+        );
+        return true;
+      }
+    }
+    return false;
+  }
+
+  void reportNullOrNonTypeElement(NamedType node, Element? element) {
+    var identifier = node.name;
+    var errorNode = _getErrorNode(node);
+
+    if (errorNode.name == 'boolean') {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN,
+        errorNode,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (_isTypeInCatchClause(node)) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE,
+        identifier,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (_isTypeInAsExpression(node)) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.CAST_TO_NON_TYPE,
+        identifier,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (_isTypeInIsExpression(node)) {
+      if (element != null) {
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.TYPE_TEST_WITH_NON_TYPE,
+          identifier,
+          [identifier.name],
+        );
+      } else {
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME,
+          identifier,
+          [identifier.name],
+        );
+      }
+      return;
+    }
+
+    if (_isRedirectingConstructor(node)) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.REDIRECT_TO_NON_CLASS,
+        identifier,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (_isTypeInTypeArgumentList(node)) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT,
+        identifier,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (reportNewWithNonType(node)) {
+      return;
+    }
+
+    var parent = node.parent;
+    if (parent is ExtendsClause ||
+        parent is ImplementsClause ||
+        parent is WithClause ||
+        parent is ClassTypeAlias) {
+      // Ignored. The error will be reported elsewhere.
+      return;
+    }
+
+    if (element is LocalVariableElement ||
+        (element is FunctionElement &&
+            element.enclosingElement is ExecutableElement)) {
+      errorReporter.reportError(
+        DiagnosticFactory().referencedBeforeDeclaration(
+          errorReporter.source,
+          identifier,
+          element: element,
+        ),
+      );
+      return;
+    }
+
+    if (element != null) {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NOT_A_TYPE,
+        identifier,
+        [identifier.name],
+      );
+      return;
+    }
+
+    if (identifier is SimpleIdentifier && identifier.name == 'await') {
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
+        node,
+      );
+      return;
+    }
+
+    errorReporter.reportErrorForNode(
+      CompileTimeErrorCode.UNDEFINED_CLASS,
+      identifier,
+      [identifier.name],
+    );
+  }
+
+  /// Returns the simple identifier of the given (maybe prefixed) identifier.
+  static Identifier _getErrorNode(NamedType node) {
+    Identifier identifier = node.name;
+    if (identifier is PrefixedIdentifier) {
+      // The prefixed identifier can be:
+      // 1. new importPrefix.NamedType()
+      // 2. new NamedType.constructorName()
+      // 3. new unresolved.Unresolved()
+      if (identifier.prefix.staticElement is PrefixElement) {
+        return identifier.identifier;
+      } else {
+        return identifier;
+      }
+    } else {
+      return identifier;
+    }
+  }
+
+  /// Check if the [node] is the type in a redirected constructor name.
+  static bool _isRedirectingConstructor(NamedType node) {
+    var parent = node.parent;
+    if (parent is ConstructorName) {
+      var grandParent = parent.parent;
+      if (grandParent is ConstructorDeclaration) {
+        return identical(grandParent.redirectedConstructor, parent);
+      }
+    }
+    return false;
+  }
+
+  /// Checks if the [node] is the type in an `as` expression.
+  static bool _isTypeInAsExpression(NamedType node) {
+    var parent = node.parent;
+    if (parent is AsExpression) {
+      return identical(parent.type, node);
+    }
+    return false;
+  }
+
+  /// Checks if the [node] is the exception type in a `catch` clause.
+  static bool _isTypeInCatchClause(NamedType node) {
+    var parent = node.parent;
+    if (parent is CatchClause) {
+      return identical(parent.exceptionType, node);
+    }
+    return false;
+  }
+
+  /// Checks if the [node] is the type in an `is` expression.
+  static bool _isTypeInIsExpression(NamedType node) {
+    var parent = node.parent;
+    if (parent is IsExpression) {
+      return identical(parent.type, node);
+    }
+    return false;
+  }
+
+  /// Checks if the [node] is an element in a type argument list.
+  static bool _isTypeInTypeArgumentList(NamedType node) {
+    return node.parent is TypeArgumentList;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart
index b24466b..14d554a 100644
--- a/pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/prefixed_identifier_resolver.dart
@@ -63,7 +63,7 @@
       identifier.staticType = type;
       return;
     } else if (element is TypeAliasElement) {
-      if (node.parent is TypeName) {
+      if (node.parent is NamedType) {
         // no type
       } else {
         var type = _typeProvider.typeType;
@@ -129,7 +129,7 @@
         parent is MethodInvocation ||
         parent is PrefixedIdentifier && parent.prefix == node ||
         parent is PropertyAccess ||
-        parent is TypeName) {
+        parent is NamedType) {
       return false;
     }
     return true;
diff --git a/pkg/analyzer/lib/src/dart/resolver/property_element_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/property_element_resolver.dart
index 84c1ec2..e8f3c35 100644
--- a/pkg/analyzer/lib/src/dart/resolver/property_element_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/property_element_resolver.dart
@@ -197,6 +197,19 @@
     required bool hasRead,
     required bool hasWrite,
   }) {
+    var ancestorCascade = node.ancestorCascade;
+    if (ancestorCascade != null) {
+      return _resolve(
+        node: node,
+        target: ancestorCascade.target,
+        isCascaded: true,
+        isNullAware: ancestorCascade.isNullAware,
+        propertyName: node,
+        hasRead: hasRead,
+        hasWrite: hasWrite,
+      );
+    }
+
     Element? readElementRequested;
     Element? readElementRecovery;
     if (hasRead) {
@@ -350,7 +363,8 @@
 
     var targetType = target.typeOrThrow;
 
-    if (targetType is FunctionType && propertyName.name == 'call') {
+    if (targetType is FunctionType &&
+        propertyName.name == FunctionElement.CALL_METHOD_NAME) {
       return PropertyElementResolverResult(
         functionTypeCallType: targetType,
       );
@@ -368,6 +382,26 @@
       targetType = _typeSystem.promoteToNonNull(targetType);
     }
 
+    if (target is TypeLiteral && target.type.type is FunctionType) {
+      // There is no possible resolution for a property access of a function
+      // type literal (which can only be a type instantiation of a type alias
+      // of a function type).
+      if (hasRead) {
+        _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.UNDEFINED_GETTER_ON_FUNCTION_TYPE,
+          propertyName,
+          [propertyName.name, target.type.name.name],
+        );
+      } else {
+        _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.UNDEFINED_SETTER_ON_FUNCTION_TYPE,
+          propertyName,
+          [propertyName.name, target.type.name.name],
+        );
+      }
+      return PropertyElementResolverResult();
+    }
+
     var result = _resolver.typePropertyResolver.resolve(
       receiver: target,
       receiverType: targetType,
@@ -458,7 +492,7 @@
           _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.PRIVATE_SETTER,
             propertyName,
-            [propertyName.name, typeReference.name],
+            [propertyName.name],
           );
         }
         _checkForStaticAccessToInstanceMember(propertyName, writeElement);
diff --git a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
index 9efde38..1793675 100644
--- a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
@@ -18,8 +18,8 @@
 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/named_type_resolver.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
-import 'package:analyzer/src/dart/resolver/type_name_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/declaration_resolver.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -53,7 +53,7 @@
 /// 1. Set existing top-level elements from [_elementWalker] to corresponding
 ///    nodes in AST.
 /// 2. Create and set new elements for local declarations.
-/// 3. Resolve all [TypeName]s - set elements and types.
+/// 3. Resolve all [NamedType]s - set elements and types.
 /// 4. Resolve all [GenericFunctionType]s - set their types.
 /// 5. Rewrite AST where resolution provides a more accurate understanding.
 class ResolutionVisitor extends RecursiveAstVisitor<void> {
@@ -63,7 +63,7 @@
   final bool _isNonNullableByDefault;
   final ErrorReporter _errorReporter;
   final AstRewriter _astRewriter;
-  final TypeNameResolver _typeNameResolver;
+  final NamedTypeResolver _typeNameResolver;
 
   /// This index is incremented every time we visit a [LibraryDirective].
   /// There is just one [LibraryElement], so we can support only one node.
@@ -103,7 +103,7 @@
       isNonNullableByDefault: isNonNullableByDefault,
     );
 
-    var typeNameResolver = TypeNameResolver(
+    var typeNameResolver = NamedTypeResolver(
       libraryElement,
       typeProvider,
       isNonNullableByDefault,
@@ -116,7 +116,7 @@
       unitElement,
       isNonNullableByDefault,
       errorReporter,
-      AstRewriter(errorReporter),
+      AstRewriter(errorReporter, typeProvider),
       typeNameResolver,
       nameScope,
       elementWalker,
@@ -235,7 +235,7 @@
           ErrorCode errorCode = withClause == null
               ? CompileTimeErrorCode.EXTENDS_NON_CLASS
               : CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS;
-          _resolveType(extendsClause.superclass, errorCode, asClass: true);
+          _resolveType(extendsClause.superclass2, errorCode, asClass: true);
         }
 
         _resolveWithClause(withClause);
@@ -265,7 +265,7 @@
         node.typeParameters?.accept(this);
 
         _resolveType(
-          node.superclass,
+          node.superclass2,
           CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS,
           asClass: true,
         );
@@ -761,7 +761,7 @@
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
     var newNode = _astRewriter.instanceCreationExpression(_nameScope, node);
     if (newNode != node) {
-      if (node.constructorName.type.typeArguments != null &&
+      if (node.constructorName.type2.typeArguments != null &&
           newNode is MethodInvocation &&
           newNode.target is FunctionReference &&
           !_libraryElement.featureSet.isEnabled(Feature.constructor_tearoffs)) {
@@ -882,6 +882,18 @@
   }
 
   @override
+  void visitNamedType(covariant TypeNameImpl node) {
+    node.typeArguments?.accept(this);
+
+    _typeNameResolver.nameScope = _nameScope;
+    _typeNameResolver.resolve(node);
+
+    if (_typeNameResolver.rewriteResult != null) {
+      _typeNameResolver.rewriteResult!.accept(this);
+    }
+  }
+
+  @override
   void visitPartDirective(PartDirective node) {
     _withElementWalker(null, () {
       super.visitPartDirective(node);
@@ -988,18 +1000,6 @@
   }
 
   @override
-  void visitTypeName(covariant TypeNameImpl node) {
-    node.typeArguments?.accept(this);
-
-    _typeNameResolver.nameScope = _nameScope;
-    _typeNameResolver.resolveTypeName(node);
-
-    if (_typeNameResolver.rewriteResult != null) {
-      _typeNameResolver.rewriteResult!.accept(this);
-    }
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     var element = node.declaredElement as TypeParameterElementImpl;
 
@@ -1223,7 +1223,7 @@
     if (clause == null) return;
 
     _resolveTypes(
-      clause.interfaces,
+      clause.interfaces2,
       CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
     );
   }
@@ -1232,7 +1232,7 @@
     if (clause == null) return;
 
     _resolveTypes(
-      clause.superclassConstraints,
+      clause.superclassConstraints2,
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
     );
   }
@@ -1241,46 +1241,46 @@
     var redirectedConstructor = node.redirectedConstructor;
     if (redirectedConstructor == null) return;
 
-    var typeName = redirectedConstructor.type;
-    _typeNameResolver.redirectedConstructor_typeName = typeName;
+    var namedType = redirectedConstructor.type2;
+    _typeNameResolver.redirectedConstructor_namedType = namedType;
 
     redirectedConstructor.accept(this);
 
-    _typeNameResolver.redirectedConstructor_typeName = null;
+    _typeNameResolver.redirectedConstructor_namedType = null;
   }
 
-  /// Return the [InterfaceType] of the given [typeName].
+  /// Return the [InterfaceType] of the given [namedType].
   ///
   /// If the resulting type is not a valid interface type, return `null`.
   ///
   /// The flag [asClass] specifies if the type will be used as a class, so mixin
   /// declarations are not valid (they declare interfaces and mixins, but not
   /// classes).
-  void _resolveType(TypeNameImpl typeName, ErrorCode errorCode,
+  void _resolveType(TypeNameImpl namedType, ErrorCode errorCode,
       {bool asClass = false}) {
-    _typeNameResolver.classHierarchy_typeName = typeName;
-    visitTypeName(typeName);
-    _typeNameResolver.classHierarchy_typeName = null;
+    _typeNameResolver.classHierarchy_namedType = namedType;
+    visitNamedType(namedType);
+    _typeNameResolver.classHierarchy_namedType = null;
 
     if (_typeNameResolver.hasErrorReported) {
       return;
     }
 
-    DartType type = typeName.typeOrThrow;
+    DartType type = namedType.typeOrThrow;
     if (type is InterfaceType) {
       ClassElement element = type.element;
       if (element.isEnum || element.isMixin && asClass) {
-        _errorReporter.reportErrorForNode(errorCode, typeName);
+        _errorReporter.reportErrorForNode(errorCode, namedType);
         return;
       }
       return;
     }
 
-    // If the type is not an InterfaceType, then visitTypeName() sets the type
+    // If the type is not an InterfaceType, then visitNamedType() sets the type
     // to be a DynamicTypeImpl
-    Identifier name = typeName.name;
+    Identifier name = namedType.name;
     if (!_libraryElement.shouldIgnoreUndefinedIdentifier(name)) {
-      _errorReporter.reportErrorForNode(errorCode, name, [name.name]);
+      _errorReporter.reportErrorForNode(errorCode, name);
     }
   }
 
@@ -1293,22 +1293,22 @@
   ///        be an enum
   /// @param dynamicTypeError the error to produce if the type name is "dynamic"
   /// @return an array containing all of the types that were resolved.
-  void _resolveTypes(NodeList<TypeName> typeNames, ErrorCode errorCode) {
-    for (var typeName in typeNames) {
-      _resolveType(typeName as TypeNameImpl, errorCode);
+  void _resolveTypes(NodeList<NamedType> namedTypes, ErrorCode errorCode) {
+    for (var namedType in namedTypes) {
+      _resolveType(namedType as TypeNameImpl, errorCode);
     }
   }
 
   void _resolveWithClause(WithClause? clause) {
     if (clause == null) return;
 
-    for (var typeName in clause.mixinTypes) {
-      _typeNameResolver.withClause_typeName = typeName;
+    for (var namedType in clause.mixinTypes2) {
+      _typeNameResolver.withClause_namedType = namedType;
       _resolveType(
-        typeName as TypeNameImpl,
+        namedType as TypeNameImpl,
         CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
       );
-      _typeNameResolver.withClause_typeName = null;
+      _typeNameResolver.withClause_namedType = null;
     }
   }
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/simple_identifier_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/simple_identifier_resolver.dart
index 4c872f9..198ba56 100644
--- a/pkg/analyzer/lib/src/dart/resolver/simple_identifier_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/simple_identifier_resolver.dart
@@ -82,7 +82,7 @@
         parent is MethodInvocation ||
         parent is PrefixedIdentifier && parent.prefix == node ||
         parent is PropertyAccess ||
-        parent is TypeName) {
+        parent is NamedType) {
       return false;
     }
     return true;
diff --git a/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
deleted file mode 100644
index 3f3c167..0000000
--- a/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
+++ /dev/null
@@ -1,659 +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/dart/analysis/features.dart';
-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/error.dart';
-import 'package:analyzer/error/listener.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_system.dart';
-import 'package:analyzer/src/diagnostic/diagnostic_factory.dart';
-import 'package:analyzer/src/error/codes.dart';
-
-/// Helper for resolving types.
-///
-/// The client must set [nameScope] before calling [resolveTypeName].
-class TypeNameResolver {
-  final LibraryElementImpl _libraryElement;
-  final TypeSystemImpl typeSystem;
-  final DartType dynamicType;
-  final bool isNonNullableByDefault;
-  final ErrorReporter errorReporter;
-
-  late Scope nameScope;
-
-  /// If not `null`, the element of the [ClassDeclaration], or the
-  /// [ClassTypeAlias] being resolved.
-  ClassElement? enclosingClass;
-
-  /// If not `null`, a direct child of an [ExtendsClause], [WithClause],
-  /// or [ImplementsClause].
-  TypeName? classHierarchy_typeName;
-
-  /// If not `null`, a direct child the [WithClause] in the [enclosingClass].
-  TypeName? withClause_typeName;
-
-  /// If not `null`, the [TypeName] of the redirected constructor being
-  /// resolved, in the [enclosingClass].
-  TypeName? redirectedConstructor_typeName;
-
-  /// If [resolveTypeName] finds out that the given [TypeName] with a
-  /// [PrefixedIdentifier] name is actually the name of a class and the name of
-  /// the constructor, it rewrites the [ConstructorName] to correctly represent
-  /// the type and the constructor name, and set this field to the rewritten
-  /// [ConstructorName]. Otherwise this field will be set `null`.
-  ConstructorName? rewriteResult;
-
-  /// If [resolveTypeName] reported an error, this flag is set to `true`.
-  bool hasErrorReported = false;
-
-  TypeNameResolver(this._libraryElement, TypeProvider typeProvider,
-      this.isNonNullableByDefault, this.errorReporter)
-      : typeSystem = _libraryElement.typeSystem,
-        dynamicType = typeProvider.dynamicType;
-
-  bool get _genericMetadataIsEnabled =>
-      enclosingClass!.library.featureSet.isEnabled(Feature.generic_metadata);
-
-  NullabilitySuffix get _noneOrStarSuffix {
-    return isNonNullableByDefault
-        ? NullabilitySuffix.none
-        : NullabilitySuffix.star;
-  }
-
-  /// Resolve the given [TypeName] - set its element and static type. Only the
-  /// given [node] is resolved, all its children must be already resolved.
-  ///
-  /// The client must set [nameScope] before calling [resolveTypeName].
-  void resolveTypeName(TypeNameImpl node) {
-    rewriteResult = null;
-    hasErrorReported = false;
-
-    var typeIdentifier = node.name;
-    if (typeIdentifier is PrefixedIdentifierImpl) {
-      var prefix = typeIdentifier.prefix;
-      var prefixName = prefix.name;
-      var prefixElement = nameScope.lookup(prefixName).getter;
-      prefix.staticElement = prefixElement;
-
-      if (prefixElement == null) {
-        _resolveToElement(node, null);
-        return;
-      }
-
-      if (prefixElement is ClassElement || prefixElement is TypeAliasElement) {
-        _rewriteToConstructorName(node, typeIdentifier);
-        return;
-      }
-
-      if (prefixElement is PrefixElement) {
-        var nameNode = typeIdentifier.identifier;
-        var name = nameNode.name;
-
-        var element = prefixElement.scope.lookup(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 SimpleIdentifierImpl;
-      var name = nameNode.name;
-
-      if (name == 'void') {
-        node.type = VoidTypeImpl.instance;
-        return;
-      }
-
-      var element = nameScope.lookup(name).getter;
-      nameNode.staticElement = element;
-      _resolveToElement(node, element);
-    }
-  }
-
-  /// Return type arguments, exactly [parameterCount].
-  List<DartType> _buildTypeArguments(
-      TypeName node, TypeArgumentList argumentList, int parameterCount) {
-    var arguments = argumentList.arguments;
-    var argumentCount = arguments.length;
-
-    if (argumentCount != parameterCount) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
-        node,
-        [node.name.name, parameterCount, argumentCount],
-      );
-      return List.filled(parameterCount, DynamicTypeImpl.instance);
-    }
-
-    if (parameterCount == 0) {
-      return const <DartType>[];
-    }
-
-    return List.generate(
-      parameterCount,
-      (i) => arguments[i].typeOrThrow,
-    );
-  }
-
-  NullabilitySuffix _getNullability(TypeName node) {
-    if (isNonNullableByDefault) {
-      if (node.question != null) {
-        return NullabilitySuffix.question;
-      } else {
-        return NullabilitySuffix.none;
-      }
-    }
-    return NullabilitySuffix.star;
-  }
-
-  /// We are resolving the [TypeName] in a redirecting constructor of the
-  /// [enclosingClass].
-  InterfaceType _inferRedirectedConstructor(ClassElement element) {
-    if (element == enclosingClass) {
-      return element.thisType;
-    } else {
-      var typeParameters = element.typeParameters;
-      if (typeParameters.isEmpty) {
-        return element.thisType;
-      } else {
-        var typeArguments = typeSystem.inferGenericFunctionOrType(
-          typeParameters: typeParameters,
-          parameters: const [],
-          declaredReturnType: element.thisType,
-          argumentTypes: const [],
-          contextReturnType: enclosingClass!.thisType,
-          genericMetadataIsEnabled: _genericMetadataIsEnabled,
-        )!;
-        return element.instantiate(
-          typeArguments: typeArguments,
-          nullabilitySuffix: _noneOrStarSuffix,
-        );
-      }
-    }
-  }
-
-  DartType _instantiateElement(TypeName node, Element element) {
-    var nullability = _getNullability(node);
-
-    var argumentList = node.typeArguments;
-    if (argumentList != null) {
-      if (element is ClassElement) {
-        var typeArguments = _buildTypeArguments(
-          node,
-          argumentList,
-          element.typeParameters.length,
-        );
-        return element.instantiate(
-          typeArguments: typeArguments,
-          nullabilitySuffix: nullability,
-        );
-      } else if (element is TypeAliasElement) {
-        var typeArguments = _buildTypeArguments(
-          node,
-          argumentList,
-          element.typeParameters.length,
-        );
-        var type = element.instantiate(
-          typeArguments: typeArguments,
-          nullabilitySuffix: nullability,
-        );
-        type = typeSystem.toLegacyType(type);
-        return _verifyTypeAliasForContext(node, element, type);
-      } else if (_isInstanceCreation(node)) {
-        _ErrorHelper(errorReporter).reportNewWithNonType(node);
-        return dynamicType;
-      } else if (element is DynamicElementImpl) {
-        _buildTypeArguments(node, argumentList, 0);
-        return DynamicTypeImpl.instance;
-      } else if (element is NeverElementImpl) {
-        _buildTypeArguments(node, argumentList, 0);
-        return _instantiateElementNever(nullability);
-      } else if (element is TypeParameterElement) {
-        _buildTypeArguments(node, argumentList, 0);
-        return element.instantiate(
-          nullabilitySuffix: nullability,
-        );
-      } else {
-        _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, element);
-        return dynamicType;
-      }
-    }
-
-    if (element is ClassElement) {
-      if (identical(node, withClause_typeName)) {
-        for (var mixin in enclosingClass!.mixins) {
-          if (mixin.element == element) {
-            return mixin;
-          }
-        }
-      }
-
-      if (identical(node, redirectedConstructor_typeName)) {
-        return _inferRedirectedConstructor(element);
-      }
-
-      return typeSystem.instantiateToBounds2(
-        classElement: element,
-        nullabilitySuffix: nullability,
-      );
-    } else if (element is TypeAliasElement) {
-      var type = typeSystem.instantiateToBounds2(
-        typeAliasElement: element,
-        nullabilitySuffix: nullability,
-      );
-      return _verifyTypeAliasForContext(node, element, type);
-    } else if (_isInstanceCreation(node)) {
-      _ErrorHelper(errorReporter).reportNewWithNonType(node);
-      return dynamicType;
-    } else if (element is DynamicElementImpl) {
-      return DynamicTypeImpl.instance;
-    } else if (element is NeverElementImpl) {
-      return _instantiateElementNever(nullability);
-    } else if (element is TypeParameterElement) {
-      return element.instantiate(
-        nullabilitySuffix: nullability,
-      );
-    } else {
-      _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, element);
-      return dynamicType;
-    }
-  }
-
-  DartType _instantiateElementNever(NullabilitySuffix nullability) {
-    if (isNonNullableByDefault) {
-      return NeverTypeImpl.instance.withNullability(nullability);
-    } else {
-      return typeSystem.typeProvider.nullType;
-    }
-  }
-
-  void _resolveToElement(TypeNameImpl node, Element? element) {
-    if (element == null) {
-      node.type = dynamicType;
-      if (!_libraryElement.shouldIgnoreUndefinedIdentifier(node.name)) {
-        _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, null);
-      }
-      return;
-    }
-
-    if (element is MultiplyDefinedElement) {
-      node.type = dynamicType;
-      return;
-    }
-
-    var type = _instantiateElement(node, element);
-    type = _verifyNullability(node, type);
-    node.type = type;
-  }
-
-  /// 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(
-    TypeNameImpl node,
-    PrefixedIdentifier typeIdentifier,
-  ) {
-    var constructorName = node.parent;
-    if (constructorName is ConstructorNameImpl &&
-        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],
-      );
-    }
-  }
-
-  /// If the [node] appears in a location where a nullable type is not allowed,
-  /// but the [type] is nullable (because the question mark was specified,
-  /// or the type alias is nullable), report an error, and return the
-  /// corresponding non-nullable type.
-  DartType _verifyNullability(TypeName node, DartType type) {
-    if (identical(node, classHierarchy_typeName)) {
-      if (type.nullabilitySuffix == NullabilitySuffix.question) {
-        var parent = node.parent;
-        if (parent is ExtendsClause || parent is ClassTypeAlias) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE,
-            node,
-          );
-        } else if (parent is ImplementsClause) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE,
-            node,
-          );
-        } else if (parent is OnClause) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE,
-            node,
-          );
-        } else if (parent is WithClause) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE,
-            node,
-          );
-        }
-        return (type as TypeImpl).withNullability(NullabilitySuffix.none);
-      }
-    }
-
-    return type;
-  }
-
-  DartType _verifyTypeAliasForContext(
-    TypeName node,
-    TypeAliasElement element,
-    DartType type,
-  ) {
-    // If a type alias that expands to a type parameter.
-    if (element.aliasedType is TypeParameterType) {
-      var parent = node.parent;
-      if (parent is ConstructorName) {
-        var errorNode = _ErrorHelper._getErrorNode(node);
-        var constructorUsage = parent.parent;
-        if (constructorUsage is InstanceCreationExpression) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode
-                .INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER,
-            errorNode,
-          );
-        } else if (constructorUsage is ConstructorDeclaration &&
-            constructorUsage.redirectedConstructor == parent) {
-          errorReporter.reportErrorForNode(
-            CompileTimeErrorCode
-                .REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER,
-            errorNode,
-          );
-        } else {
-          throw UnimplementedError('${constructorUsage.runtimeType}');
-        }
-        return dynamicType;
-      }
-
-      // Report if this type is used as a class in hierarchy.
-      ErrorCode? errorCode;
-      if (parent is ExtendsClause) {
-        errorCode =
-            CompileTimeErrorCode.EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
-      } else if (parent is ImplementsClause) {
-        errorCode = CompileTimeErrorCode
-            .IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
-      } else if (parent is OnClause) {
-        errorCode =
-            CompileTimeErrorCode.MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
-      } else if (parent is WithClause) {
-        errorCode =
-            CompileTimeErrorCode.MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER;
-      }
-      if (errorCode != null) {
-        var errorNode = _ErrorHelper._getErrorNode(node);
-        errorReporter.reportErrorForNode(errorCode, errorNode);
-        hasErrorReported = true;
-        return dynamicType;
-      }
-    }
-    if (type is! InterfaceType && _isInstanceCreation(node)) {
-      _ErrorHelper(errorReporter).reportNewWithNonType(node);
-      return dynamicType;
-    }
-    return type;
-  }
-
-  static bool _isInstanceCreation(TypeName node) {
-    var parent = node.parent;
-    return parent is ConstructorName &&
-        parent.parent is InstanceCreationExpression;
-  }
-}
-
-/// Helper for reporting errors during type name resolution.
-class _ErrorHelper {
-  final ErrorReporter errorReporter;
-
-  _ErrorHelper(this.errorReporter);
-
-  bool reportNewWithNonType(TypeName node) {
-    var constructorName = node.parent;
-    if (constructorName is ConstructorName) {
-      var instanceCreation = constructorName.parent;
-      if (instanceCreation is InstanceCreationExpression) {
-        var identifier = node.name;
-        var errorNode = _getErrorNode(node);
-        errorReporter.reportErrorForNode(
-          instanceCreation.isConst
-              ? CompileTimeErrorCode.CONST_WITH_NON_TYPE
-              : CompileTimeErrorCode.NEW_WITH_NON_TYPE,
-          errorNode,
-          [identifier.name],
-        );
-        return true;
-      }
-    }
-    return false;
-  }
-
-  void reportNullOrNonTypeElement(TypeName node, Element? element) {
-    var identifier = node.name;
-    var errorNode = _getErrorNode(node);
-
-    if (errorNode.name == 'boolean') {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN,
-        errorNode,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (_isTypeInCatchClause(node)) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE,
-        identifier,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (_isTypeInAsExpression(node)) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.CAST_TO_NON_TYPE,
-        identifier,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (_isTypeInIsExpression(node)) {
-      if (element != null) {
-        errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.TYPE_TEST_WITH_NON_TYPE,
-          identifier,
-          [identifier.name],
-        );
-      } else {
-        errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME,
-          identifier,
-          [identifier.name],
-        );
-      }
-      return;
-    }
-
-    if (_isRedirectingConstructor(node)) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.REDIRECT_TO_NON_CLASS,
-        identifier,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (_isTypeInTypeArgumentList(node)) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT,
-        identifier,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (reportNewWithNonType(node)) {
-      return;
-    }
-
-    var parent = node.parent;
-    if (parent is ExtendsClause ||
-        parent is ImplementsClause ||
-        parent is WithClause ||
-        parent is ClassTypeAlias) {
-      // Ignored. The error will be reported elsewhere.
-      return;
-    }
-
-    if (element is LocalVariableElement ||
-        (element is FunctionElement &&
-            element.enclosingElement is ExecutableElement)) {
-      errorReporter.reportError(
-        DiagnosticFactory().referencedBeforeDeclaration(
-          errorReporter.source,
-          identifier,
-          element: element,
-        ),
-      );
-      return;
-    }
-
-    if (element != null) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.NOT_A_TYPE,
-        identifier,
-        [identifier.name],
-      );
-      return;
-    }
-
-    if (identifier is SimpleIdentifier && identifier.name == 'await') {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
-        node,
-      );
-      return;
-    }
-
-    errorReporter.reportErrorForNode(
-      CompileTimeErrorCode.UNDEFINED_CLASS,
-      identifier,
-      [identifier.name],
-    );
-  }
-
-  /// Returns the simple identifier of the given (maybe prefixed) identifier.
-  static Identifier _getErrorNode(TypeName node) {
-    Identifier identifier = node.name;
-    if (identifier is PrefixedIdentifier) {
-      // The prefixed identifier can be:
-      // 1. new importPrefix.TypeName()
-      // 2. new TypeName.constructorName()
-      // 3. new unresolved.Unresolved()
-      if (identifier.prefix.staticElement is PrefixElement) {
-        return identifier.identifier;
-      } else {
-        return identifier;
-      }
-    } else {
-      return identifier;
-    }
-  }
-
-  /// Check if the [node] is the type in a redirected constructor name.
-  static bool _isRedirectingConstructor(TypeName node) {
-    var parent = node.parent;
-    if (parent is ConstructorName) {
-      var grandParent = parent.parent;
-      if (grandParent is ConstructorDeclaration) {
-        return identical(grandParent.redirectedConstructor, parent);
-      }
-    }
-    return false;
-  }
-
-  /// Checks if the [node] is the type in an `as` expression.
-  static bool _isTypeInAsExpression(TypeName node) {
-    var parent = node.parent;
-    if (parent is AsExpression) {
-      return identical(parent.type, node);
-    }
-    return false;
-  }
-
-  /// Checks if the [node] is the exception type in a `catch` clause.
-  static bool _isTypeInCatchClause(TypeName node) {
-    var parent = node.parent;
-    if (parent is CatchClause) {
-      return identical(parent.exceptionType, node);
-    }
-    return false;
-  }
-
-  /// Checks if the [node] is the type in an `is` expression.
-  static bool _isTypeInIsExpression(TypeName node) {
-    var parent = node.parent;
-    if (parent is IsExpression) {
-      return identical(parent.type, node);
-    }
-    return false;
-  }
-
-  /// Checks if the [node] is an element in a type argument list.
-  static bool _isTypeInTypeArgumentList(TypeName node) {
-    return node.parent is TypeArgumentList;
-  }
-}
diff --git a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
index 1f2aaf5..fc870ea 100644
--- a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
@@ -112,8 +112,10 @@
       }
 
       CompileTimeErrorCode errorCode;
+      List<String> arguments;
       if (parentExpression == null) {
         errorCode = CompileTimeErrorCode.UNCHECKED_INVOCATION_OF_NULLABLE_VALUE;
+        arguments = [];
       } else {
         if (parentExpression is CascadeExpression) {
           parentExpression = parentExpression.cascadeSections.first;
@@ -121,16 +123,20 @@
         if (parentExpression is BinaryExpression) {
           errorCode = CompileTimeErrorCode
               .UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE;
+          arguments = [name];
         } else if (parentExpression is MethodInvocation ||
             parentExpression is MethodReferenceExpression) {
           errorCode = CompileTimeErrorCode
               .UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE;
+          arguments = [name];
         } else if (parentExpression is FunctionExpressionInvocation) {
           errorCode =
               CompileTimeErrorCode.UNCHECKED_INVOCATION_OF_NULLABLE_VALUE;
+          arguments = [];
         } else {
           errorCode =
               CompileTimeErrorCode.UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE;
+          arguments = [name];
         }
       }
 
@@ -150,7 +156,7 @@
       }
       _resolver.nullableDereferenceVerifier.report(
           errorCode, propertyErrorEntity, receiverType,
-          arguments: [name], messages: messages);
+          arguments: arguments, messages: messages);
       _reportedGetterError = true;
       _reportedSetterError = true;
 
@@ -170,14 +176,16 @@
         if (_hasGetterOrSetter) {
           return _toResult();
         }
-        if (receiverTypeResolved.isDartCoreFunction && _name == 'call') {
+        if (receiverTypeResolved.isDartCoreFunction &&
+            _name == FunctionElement.CALL_METHOD_NAME) {
           _needsGetterError = false;
           _needsSetterError = false;
           return _toResult();
         }
       }
 
-      if (receiverTypeResolved is FunctionType && _name == 'call') {
+      if (receiverTypeResolved is FunctionType &&
+          _name == FunctionElement.CALL_METHOD_NAME) {
         return _toResult();
       }
 
diff --git a/pkg/analyzer/lib/src/error/best_practices_verifier.dart b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
index edf4483..62bf4a9 100644
--- a/pkg/analyzer/lib/src/error/best_practices_verifier.dart
+++ b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
@@ -240,7 +240,7 @@
           _errorReporter.reportErrorForNode(
               HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION,
               node,
-              [declaredElement.name, node.name.name]);
+              [declaredElement.name]);
         }
 
         if (parent is TopLevelVariableDeclaration) {
@@ -698,6 +698,24 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    var question = node.question;
+    if (question != null) {
+      var name = node.name.name;
+      var type = node.typeOrThrow;
+      // Only report non-aliased, non-user-defined `Null?` and `dynamic?`. Do
+      // not report synthetic `dynamic` in place of an unresolved type.
+      if ((type.element == _nullType.element ||
+              (type.isDynamic && name == 'dynamic')) &&
+          type.alias == null) {
+        _errorReporter.reportErrorForToken(
+            HintCode.UNNECESSARY_QUESTION_MARK, question, [name]);
+      }
+    }
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitPostfixExpression(PostfixExpression node) {
     _deprecatedVerifier.postfixExpression(node);
     if (node.operator.type == TokenType.BANG &&
@@ -771,24 +789,6 @@
     }
   }
 
-  @override
-  void visitTypeName(TypeName node) {
-    var question = node.question;
-    if (question != null) {
-      var name = node.name.name;
-      var type = node.typeOrThrow;
-      // Only report non-aliased, non-user-defined `Null?` and `dynamic?`. Do
-      // not report synthetic `dynamic` in place of an unresolved type.
-      if ((type.element == _nullType.element ||
-              (type.isDynamic && name == 'dynamic')) &&
-          type.alias == null) {
-        _errorReporter.reportErrorForToken(
-            HintCode.UNNECESSARY_QUESTION_MARK, question, [name]);
-      }
-    }
-    super.visitTypeName(node);
-  }
-
   /// Check for the passed is expression for the unnecessary type check hint
   /// codes as well as null checks expressed using an is expression.
   ///
@@ -798,71 +798,58 @@
   /// [HintCode.UNNECESSARY_TYPE_CHECK_TRUE], and
   /// [HintCode.UNNECESSARY_TYPE_CHECK_FALSE].
   bool _checkAllTypeChecks(IsExpression node) {
-    Expression expression = node.expression;
-    TypeAnnotation typeName = node.type;
-    var rhsType = typeName.type as TypeImpl;
-    var rhsNameStr = typeName is TypeName ? typeName.name.name : null;
-    // if x is dynamic
-    if (rhsType.isDynamic && rhsNameStr == Keyword.DYNAMIC.lexeme) {
-      if (node.notOperator == null) {
-        // the is case
-        _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_TRUE, node);
-      } else {
-        // the is not case
-        _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_FALSE, node);
-      }
-      return true;
+    var leftNode = node.expression;
+    var rightNode = node.type;
+    var rightType = rightNode.type as TypeImpl;
+
+    void report() {
+      _errorReporter.reportErrorForNode(
+        node.notOperator == null
+            ? HintCode.UNNECESSARY_TYPE_CHECK_TRUE
+            : HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
+        node,
+      );
     }
+
+    // `is dynamic` or `is! dynamic`
+    if (rightType.isDynamic) {
+      var rightTypeStr = rightNode is NamedType ? rightNode.name.name : null;
+      if (rightTypeStr == Keyword.DYNAMIC.lexeme) {
+        report();
+        return true;
+      }
+      return false;
+    }
+
     // `is Null` or `is! Null`
-    if (rhsType.isDartCoreNull) {
-      if (expression is NullLiteral) {
-        if (node.notOperator == null) {
-          _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
-            node,
-          );
-        } else {
-          _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
-            node,
-          );
-        }
+    if (rightType.isDartCoreNull) {
+      if (leftNode is NullLiteral) {
+        report();
       } else {
-        if (node.notOperator == null) {
-          _errorReporter.reportErrorForNode(
-            HintCode.TYPE_CHECK_IS_NULL,
-            node,
-          );
-        } else {
-          _errorReporter.reportErrorForNode(
-            HintCode.TYPE_CHECK_IS_NOT_NULL,
-            node,
-          );
-        }
+        _errorReporter.reportErrorForNode(
+          node.notOperator == null
+              ? HintCode.TYPE_CHECK_IS_NULL
+              : HintCode.TYPE_CHECK_IS_NOT_NULL,
+          node,
+        );
       }
       return true;
     }
-    // `is Object` or `is! Object`
-    if (rhsType.isDartCoreObject) {
-      var nullability = rhsType.nullabilitySuffix;
-      if (nullability == NullabilitySuffix.star ||
-          nullability == NullabilitySuffix.question) {
-        if (node.notOperator == null) {
-          _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
-            node,
-          );
-        } else {
-          _errorReporter.reportErrorForNode(
-            HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
-            node,
-          );
-        }
+
+    if (_isNonNullableByDefault) {
+      var leftType = leftNode.typeOrThrow;
+      if (_typeSystem.isSubtypeOf(leftType, rightType)) {
+        report();
+        return true;
+      }
+    } else {
+      // In legacy all types are subtypes of `Object`.
+      if (rightType.isDartCoreObject) {
+        report();
         return true;
       }
     }
+
     return false;
   }
 
@@ -1209,7 +1196,7 @@
       // TODO(jwren) We should modify ConstructorElement.getDisplayName(), or
       // have the logic centralized elsewhere, instead of doing this logic
       // here.
-      String fullConstructorName = constructorName.type.name.name;
+      String fullConstructorName = constructorName.type2.name.name;
       if (constructorName.name != null) {
         fullConstructorName = '$fullConstructorName.${constructorName.name}';
       }
@@ -1240,9 +1227,7 @@
         prefix.name, FunctionElement.LOAD_LIBRARY_NAME);
     if (loadLibraryElement != null) {
       _errorReporter.reportErrorForNode(
-          HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
-          node,
-          [importedLibrary.name]);
+          HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, node);
       return true;
     }
     return false;
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 0ea830f..1687c1d 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -2,15537 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/analyzer_error_code.dart';
-
 export 'package:analyzer/src/analysis_options/error/option_codes.dart';
 export 'package:analyzer/src/dart/error/hint_codes.dart';
 export 'package:analyzer/src/dart/error/lint_codes.dart';
 export 'package:analyzer/src/dart/error/todo_codes.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The error 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 {
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a field that has the `abstract`
-  // modifier also has an initializer.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `f` is marked as
-  // `abstract` and has an initializer:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int [!f!] = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `f` is marked as
-  // `abstract` and there's an initializer in the constructor:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int f;
-  //
-  //   C() : [!f!] = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field must be abstract, then remove the initializer:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int f;
-  // }
-  // ```
-  //
-  // If the field isn't required to be abstract, then remove the keyword:
-  //
-  // ```dart
-  // abstract class C {
-  //   int f = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
-      CompileTimeErrorCode(
-    'ABSTRACT_FIELD_INITIALIZER',
-    "Abstract fields can't have initializers.",
-    correction: "Try removing the field initializer or the 'abstract' keyword "
-        "from the field declaration.",
-    hasPublishedDocs: true,
-    uniqueName: 'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
-      CompileTimeErrorCode('ABSTRACT_FIELD_INITIALIZER',
-          "Abstract fields can't have initializers.",
-          correction: "Try removing the initializer or the 'abstract' keyword.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the display name for the kind of the found abstract member
-   * 1: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an inherited member is
-  // referenced using `super`, but there is no concrete implementation of the
-  // member in the superclass chain. Abstract members can't be invoked.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `B` doesn't inherit a
-  // concrete implementation of `a`:
-  //
-  // ```dart
-  // abstract class A {
-  //   int get a;
-  // }
-  // class B extends A {
-  //   int get a => super.[!a!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the invocation of the abstract member, possibly replacing it with an
-  // invocation of a concrete member.
-  // TODO(brianwilkerson) This either needs to be generalized (use 'member'
-  //  rather than '{0}') or split into multiple codes.
-  static const CompileTimeErrorCode ABSTRACT_SUPER_MEMBER_REFERENCE =
-      CompileTimeErrorCode('ABSTRACT_SUPER_MEMBER_REFERENCE',
-          "The {0} '{1}' is always abstract in the supertype.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the ambiguous element
-   * 1: the name of the first library in which the type is found
-   * 2: the name of the second library in which the type is found
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when two or more export directives
-  // cause the same name to be exported from multiple libraries.
-  //
-  // #### Example
-  //
-  // Given a file named `a.dart` containing
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class C {}
-  // ```
-  //
-  // And a file named `b.dart` containing
-  //
-  // ```dart
-  // %uri="lib/b.dart"
-  // class C {}
-  // ```
-  //
-  // The following code produces this diagnostic because the name `C` is being
-  // exported from both `a.dart` and `b.dart`:
-  //
-  // ```dart
-  // export 'a.dart';
-  // export [!'b.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If none of the names in one of the libraries needs to be exported, then
-  // remove the unnecessary export directives:
-  //
-  // ```dart
-  // export 'a.dart';
-  // ```
-  //
-  // If all of the export directives are needed, then hide the name in all
-  // except one of the directives:
-  //
-  // ```dart
-  // export 'a.dart';
-  // export 'b.dart' hide C;
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_EXPORT = CompileTimeErrorCode(
-      'AMBIGUOUS_EXPORT',
-      "The name '{0}' is defined in the libraries '{1}' and '{2}'.",
-      correction: "Try removing the export of one of the libraries, or "
-          "explicitly hiding the name in one of the export directives.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the first declaring extension
-   * 2: the name of the second declaring extension
-   */
-  // #### Description
-  //
-  // When code refers to a member of an object (for example, `o.m()` or `o.m` or
-  // `o[i]`) where the static type of `o` doesn't declare the member (`m` or
-  // `[]`, for example), then the analyzer tries to find the member in an
-  // extension. For example, if the member is `m`, then the analyzer looks for
-  // extensions that declare a member named `m` and have an extended type that
-  // the static type of `o` can be assigned to. When there's more than one such
-  // extension in scope, the extension whose extended type is most specific is
-  // selected.
-  //
-  // The analyzer produces this diagnostic when none of the extensions has an
-  // extended type that's more specific than the extended types of all of the
-  // other extensions, making the reference to the member ambiguous.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there's no way to
-  // choose between the member in `E1` and the member in `E2`:
-  //
-  // ```dart
-  // extension E1 on String {
-  //   int get charCount => 1;
-  // }
-  //
-  // extension E2 on String {
-  //   int get charCount => 2;
-  // }
-  //
-  // void f(String s) {
-  //   print(s.[!charCount!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need both extensions, then you can delete or hide one of them.
-  //
-  // If you need both, then explicitly select the one you want to use by using
-  // an extension override:
-  //
-  // ```dart
-  // extension E1 on String {
-  //   int get charCount => length;
-  // }
-  //
-  // extension E2 on String {
-  //   int get charCount => length;
-  // }
-  //
-  // void f(String s) {
-  //   print(E2(s).charCount);
-  // }
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
-          "A member named '{0}' is defined in extensions {1}, and "
-              "none are more specific.",
-          correction:
-              "Try using an extension override to specify the extension "
-              "you want to be chosen.",
-          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
-  //
-  // Because map and set literals use the same delimiters (`{` and `}`), the
-  // analyzer looks at the type arguments and the elements to determine which
-  // kind of literal you meant. When there are no type arguments, then the
-  // analyzer uses the types of the elements. If all of the elements are literal
-  // map entries and all of the spread operators are spreading a `Map` then it's
-  // a `Map`. If none of the elements are literal map entries and all of the
-  // spread operators are spreading an `Iterable`, then it's a `Set`. If neither
-  // of those is true then it's ambiguous.
-  //
-  // The analyzer produces this diagnostic when at least one element is a
-  // literal map entry or a spread operator spreading a `Map`, and at least one
-  // element is neither of these, making it impossible for the analyzer to
-  // determine whether you are writing a map literal or a set literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     [!{...a, ...b, ...c}!];
-  // ```
-  //
-  // The list `b` can only be spread into a set, and the maps `a` and `c` can
-  // only be spread into a map, and the literal can't be both.
-  //
-  // #### Common fixes
-  //
-  // There are two common ways to fix this problem. The first is to remove all
-  // of the spread elements of one kind or another, so that the elements are
-  // consistent. In this case, that likely means removing the list and deciding
-  // what to do about the now unused parameter:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     {...a, ...c};
-  // ```
-  //
-  // The second fix is to change the elements of one kind into elements that are
-  // consistent with the other elements. For example, you can add the elements
-  // of the list as keys that map to themselves:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     {...a, for (String s in b) s: s, ...c};
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
-          "The literal can't be either a map or a set because it contains at "
-              "least one literal map entry or a spread operator spreading a "
-              "'Map', and at least one element which is neither of these.",
-          correction:
-              "Try removing or changing some of the elements so that all of "
-              "the elements are consistent.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // Because map and set literals use the same delimiters (`{` and `}`), the
-  // analyzer looks at the type arguments and the elements to determine which
-  // kind of literal you meant. When there are no type arguments and all of the
-  // elements are spread elements (which are allowed in both kinds of literals)
-  // then the analyzer uses the types of the expressions that are being spread.
-  // If all of the expressions have the type `Iterable`, then it's a set
-  // literal; if they all have the type `Map`, then it's a map literal.
-  //
-  // This diagnostic is produced when none of the expressions being spread have
-  // a type that allows the analyzer to decide whether you were writing a map
-  // literal or a set literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // union(a, b) => [!{...a, ...b}!];
-  // ```
-  //
-  // The problem occurs because there are no type arguments, and there is no
-  // information about the type of either `a` or `b`.
-  //
-  // #### Common fixes
-  //
-  // There are three common ways to fix this problem. The first is to add type
-  // arguments to the literal. For example, if the literal is intended to be a
-  // map literal, you might write something like this:
-  //
-  // ```dart
-  // union(a, b) => <String, String>{...a, ...b};
-  // ```
-  //
-  // The second fix is to add type information so that the expressions have
-  // either the type `Iterable` or the type `Map`. You can add an explicit cast
-  // or, in this case, add types to the declarations of the two parameters:
-  //
-  // ```dart
-  // union(List<int> a, List<int> b) => {...a, ...b};
-  // ```
-  //
-  // The third fix is to add context information. In this case, that means
-  // adding a return type to the function:
-  //
-  // ```dart
-  // Set<String> union(a, b) => {...a, ...b};
-  // ```
-  //
-  // In other cases, you might add a type somewhere else. For example, say the
-  // original code looks like this:
-  //
-  // ```dart
-  // union(a, b) {
-  //   var x = [!{...a, ...b}!];
-  //   return x;
-  // }
-  // ```
-  //
-  // You might add a type annotation on `x`, like this:
-  //
-  // ```dart
-  // union(a, b) {
-  //   Map<String, String> x = {...a, ...b};
-  //   return x;
-  // }
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
-          "This literal must be either a map or a set, but the elements don't "
-              "have enough information for type inference to work.",
-          correction:
-              "Try adding type arguments to the literal (one for sets, two "
-              "for maps).",
-          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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // String f(String x) => x;
-  // String g(num y) => f(y.toString());
-  // ```
-  //
-  // Another approach is to add explicit type tests and fallback code:
-  //
-  // ```dart
-  // %language=2.9
-  // 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a redirecting constructor (a
-  // constructor that redirects to another constructor in the same class) has an
-  // assert in the initializer list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the unnamed constructor
-  // is a redirecting constructor and also has an assert in the initializer
-  // list:
-  //
-  // ```dart
-  // class C {
-  //   C(int x) : [!assert(x > 0)!], this.name();
-  //   C.name() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the assert isn't needed, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   C(int x) : this.name();
-  //   C.name() {}
-  // }
-  // ```
-  //
-  // If the assert is needed, then convert the constructor into a factory
-  // constructor:
-  //
-  // ```dart
-  // class C {
-  //   factory C(int x) {
-  //     assert(x > 0);
-  //     return C.name();
-  //   }
-  //   C.name() {}
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
-      CompileTimeErrorCode('ASSERT_IN_REDIRECTING_CONSTRUCTOR',
-          "A redirecting constructor can't have an 'assert' initializer.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an assignment to a
-  // top-level variable, a static field, or a local variable that has the
-  // `const` modifier. The value of a compile-time constant can't be changed at
-  // runtime.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `c` is being assigned a
-  // value even though it has the `const` modifier:
-  //
-  // ```dart
-  // const c = 0;
-  //
-  // void f() {
-  //   [!c!] = 1;
-  //   print(c);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the variable must be assignable, then remove the `const` modifier:
-  //
-  // ```dart
-  // var c = 0;
-  //
-  // void f() {
-  //   c = 1;
-  //   print(c);
-  // }
-  // ```
-  //
-  // If the constant shouldn't be changed, then either remove the assignment or
-  // use a local variable in place of references to the constant:
-  //
-  // ```dart
-  // const c = 0;
-  //
-  // void f() {
-  //   var v = 1;
-  //   print(v);
-  // }
-  // ```
-  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.",
-      hasPublishedDocs: true);
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a function appears
-  // on the left-hand side of an assignment expression.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the assignment to the
-  // function `f` is invalid:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   [!f!] = () {};
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the right-hand side should be assigned to something else, such as a
-  // local variable, then change the left-hand side:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   var x = () {};
-  //   print(x);
-  // }
-  // ```
-  //
-  // If the intent is to change the implementation of the function, then define
-  // a function-valued variable instead of a function:
-  //
-  // ```dart
-  // void Function() f = () {};
-  //
-  // void g() {
-  //   f = () {};
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
-      CompileTimeErrorCode(
-          'ASSIGNMENT_TO_FUNCTION', "Functions can't be assigned a value.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a type name appears
-  // on the left-hand side of an assignment expression.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the assignment to the
-  // class `C` is invalid:
-  //
-  // ```dart
-  // class C {}
-  //
-  // void f() {
-  //   [!C!] = null;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the right-hand side should be assigned to something else, such as a
-  // local variable, then change the left-hand side:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   var c = null;
-  //   print(c);
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
-      'ASSIGNMENT_TO_TYPE', "Types can't be assigned a value.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an async for-in loop is found in
-  // a function or method whose body isn't marked as being either `async` or
-  // `async*`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of `f` isn't
-  // marked as being either `async` or `async*`, but `f` contains an async
-  // for-in loop:
-  //
-  // ```dart
-  // void f(list) {
-  //   await for (var e [!in!] list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function should return a `Future`, then mark the body with `async`:
-  //
-  // ```dart
-  // Future<void> f(list) async {
-  //   await for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // If the function should return a `Stream` of values, then mark the body with
-  // `async*`:
-  //
-  // ```dart
-  // Stream<void> f(list) async* {
-  //   await for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // If the function should be synchronous, then remove the `await` before the
-  // loop:
-  //
-  // ```dart
-  // void f(list) {
-  //   for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT =
-      CompileTimeErrorCode('ASYNC_FOR_IN_WRONG_CONTEXT',
-          "The async for-in loop can only be used in an async function.",
-          correction:
-              "Try marking the function body with either 'async' or 'async*', "
-              "or removing the 'await' before the for-in loop.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable that has the
-  // `late` modifier uses an `await` expression in the initializer.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because an `await` expression
-  // is used in the initializer for `v`, a local variable that is marked `late`:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   late var v = [!await!] 42;
-  //   return v;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the initializer can be rewritten to not use `await`, then rewrite it:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   late var v = 42;
-  //   return v;
-  // }
-  // ```
-  //
-  // If the initializer can't be rewritten, then remove the `late` modifier:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   var v = await 42;
-  //   return v;
-  // }
-  // ```
-  static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
-      CompileTimeErrorCode(
-          'AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
-          "The 'await' expression can't be used in a 'late' local variable's "
-              "initializer.",
-          correction:
-              "Try removing the 'late' modifier, or rewriting the initializer "
-              "without using the 'await' expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * 16.30 Await Expressions: It is a compile-time error if the function
-   * immediately enclosing _a_ is not declared asynchronous. (Where _a_ is the
-   * await expression.)
-   */
-  static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT =
-      CompileTimeErrorCode('AWAIT_IN_WRONG_CONTEXT',
-          "The await expression can only be used in an async function.",
-          correction:
-              "Try marking the function body with either 'async' or 'async*'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function has a
-  // return type that's [potentially non-nullable][] but would implicitly return
-  // `null` if control reached the end of the function.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the method `m` has an
-  // implicit return of `null` inserted at the end of the method, but the method
-  // is declared to not return `null`:
-  //
-  // ```dart
-  // class C {
-  //   int [!m!](int t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the method `m` has an
-  // implicit return of `null` inserted at the end of the method, but because
-  // the class `C` can be instantiated with a non-nullable type argument, the
-  // method is effectively declared to not return `null`:
-  //
-  // ```dart
-  // class C<T> {
-  //   T [!m!](T t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a reasonable value that can be returned, then add a `return`
-  // statement at the end of the method:
-  //
-  // ```dart
-  // class C<T> {
-  //   T m(T t) {
-  //     print(t);
-  //     return t;
-  //   }
-  // }
-  // ```
-  //
-  // If the method won't reach the implicit return, then add a `throw` at the
-  // end of the method:
-  //
-  // ```dart
-  // class C<T> {
-  //   T m(T t) {
-  //     print(t);
-  //     throw '';
-  //   }
-  // }
-  // ```
-  //
-  // If the method intentionally returns `null` at the end, then change the
-  // return type so that it's valid to return `null`:
-  //
-  // ```dart
-  // class C<T> {
-  //   T? m(T t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode BODY_MIGHT_COMPLETE_NORMALLY =
-      CompileTimeErrorCode(
-          'BODY_MIGHT_COMPLETE_NORMALLY',
-          "The body might complete normally, causing 'null' to be returned, "
-              "but the return type is a potentially non-nullable type.",
-          correction:
-              "Try adding either a return or a throw statement at the end.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a break in a case clause inside
-  // a switch statement has a label that is associated with another case clause.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the label `l` is
-  // associated with the case clause for `0`:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     l: case 0:
-  //       break;
-  //     case 1:
-  //       break [!l!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the intent is to transfer control to the statement after the switch,
-  // then remove the label from the break statement:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     case 0:
-  //       break;
-  //     case 1:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the intent is to transfer control to a different case block, then use
-  // `continue` rather than `break`:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     l: case 0:
-  //       break;
-  //     case 1:
-  //       continue l;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
-      CompileTimeErrorCode('BREAK_LABEL_ON_SWITCH_MEMBER',
-          "A break label resolves to the 'case' or 'default' statement.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name used in the declaration
-  // of a class, extension, mixin, typedef, type parameter, or import prefix is
-  // a built-in identifier. Built-in identifiers can’t be used to name any of
-  // these kinds of declarations.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `mixin` is a built-in
-  // identifier:
-  //
-  // ```dart
-  // extension [!mixin!] on int {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Choose a different name for the declaration.
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as an extension name.",
-          correction: "Try choosing a different name for the extension.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a prefix name.",
-          correction: "Try choosing a different name for the prefix.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a built-in identifier is used
-  // where a type name is expected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `import` can't be used
-  // as a type because it's a built-in identifier:
-  //
-  // ```dart
-  // [!import!]<int> x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the built-in identifier with the name of a valid type:
-  //
-  // ```dart
-  // List<int> x;
-  // ```
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE',
-          "The built-in identifier '{0}' can't be used as a type.",
-          correction: "Try correcting the name to match an existing type.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a type name.",
-          correction: "Try choosing a different name for the type.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
-      CompileTimeErrorCode(
-          'BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a type parameter "
-              "name.",
-          correction: "Try choosing a different name for the type parameter.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a typedef name.",
-          correction: "Try choosing a different name for the typedef.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME');
-
-  /**
-   * 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
-  // %language=2.9
-  // void f(int x) {
-  //   switch (x) {
-  //     [!case!] 0:
-  //       x += 2;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add one of the required terminators:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int x) {
-  //   switch (x) {
-  //     case 0:
-  //       x += 2;
-  //       break;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode CASE_BLOCK_NOT_TERMINATED =
-      CompileTimeErrorCode(
-          '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);
-
-  /**
-   * Parameters:
-   * 0: the this of the switch case expression
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of the expression
-  // following the keyword `case` has an implementation of the `==` operator
-  // other than the one in `Object`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the expression
-  // following the keyword `case` (`C(0)`) has the type `C`, and the class `C`
-  // overrides the `==` operator:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   switch (c) {
-  //     case [!C(0)!]:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there isn't a strong reason not to do so, then rewrite the code to use
-  // an if-else structure:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   if (c == C(0)) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // If you can't rewrite the switch statement and the implementation of `==`
-  // isn't necessary, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  // }
-  //
-  // void f(C c) {
-  //   switch (c) {
-  //     case C(0):
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If you can't rewrite the switch statement and you can't remove the
-  // definition of `==`, then find some other value that can be used to control
-  // the switch:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   switch (c.value) {
-  //     case 0:
-  //       break;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS =
-      CompileTimeErrorCode(
-          'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
-          "The switch case expression type '{0}' can't override the '==' "
-              "operator.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the case expression
-   * 1: the type of the switch expression
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression following `case`
-  // in a `switch` statement has a static type that isn't a subtype of the
-  // static type of the expression following `switch`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `1` is an `int`, which
-  // isn't a subtype of `String` (the type of `s`):
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch (s) {
-  //     case [!1!]:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value of the `case` expression is wrong, then change the `case`
-  // expression so that it has the required type:
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch (s) {
-  //     case '1':
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the value of the `case` expression is correct, then change the `switch`
-  // expression to have the required type:
-  //
-  // ```dart
-  // void f(int s) {
-  //   switch (s) {
-  //     case 1:
-  //       break;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE =
-      CompileTimeErrorCode(
-          'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
-          "The switch case expression type '{0}' must be a subtype of the "
-              "switch expression type '{1}'.",
-          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 member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The instance member '{0}' can't be accessed on a class "
-              "instantiation.",
-          correction:
-              "Try changing the member name to the name of a constructor.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The static member '{0}' can't be accessed on a class instantiation.",
-          correction: "Try removing the type arguments from the class name, or "
-              "changing the member name to the name of a constructor.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The class '{0} doesn't have a constructor named '{1}.",
-          correction: "Try invoking a different constructor, or defining a "
-              "constructor named '{1}'.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER');
-
-  /**
-   * 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);
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a named constructor and either a
-  // static method or static field have the same name. Both are accessed using
-  // the name of the class, so having the same name makes the reference
-  // ambiguous.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the static field `foo`
-  // and the named constructor `foo` have the same name:
-  //
-  // ```dart
-  // class C {
-  //   C.[!foo!]();
-  //   static int foo = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the static method `foo`
-  // and the named constructor `foo` have the same name:
-  //
-  // ```dart
-  // class C {
-  //   C.[!foo!]();
-  //   static void foo() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the member or the constructor.
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static field "
-              "in this class.",
-          correction: "Try renaming either the constructor or the field.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and getter
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static getter "
-              "in this class.",
-          correction: "Try renaming either the constructor or the getter.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static method "
-              "in this class.",
-          correction: "Try renaming either the constructor or the method.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and setter
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static setter "
-              "in this class.",
-          correction: "Try renaming either the constructor or the setter.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER');
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a getter or a setter with basename `n`, and has a
-   * method named `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting field
-   * 1: the name of the conflicting field
-   * 2: the name of the class defining the method with which the field conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_FIELD_AND_METHOD =
-      CompileTimeErrorCode(
-          'CONFLICTING_FIELD_AND_METHOD',
-          "Class '{0}' can't define field '{1}' and have method '{2}.{1}' "
-              "with the same name.",
-          correction: "Try converting the getter to a method, or "
-              "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}");
-
-  /**
-   * Parameters:
-   * 0: the name of the class implementing the conflicting interface
-   * 1: the first conflicting type
-   * 2: the second conflicting type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class attempts to implement a
-  // generic interface multiple times, and the values of the type arguments
-  // aren't the same.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `C` is defined to
-  // implement both `I<int>` (because it extends `A`) and `I<String>` (because
-  // it implements`B`), but `int` and `String` aren't the same type:
-  //
-  // ```dart
-  // class I<T> {}
-  // class A implements I<int> {}
-  // class B implements I<String> {}
-  // class [!C!] extends A implements B {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rework the type hierarchy to avoid this situation. For example, you might
-  // make one or both of the inherited types generic so that `C` can specify the
-  // same type for both type arguments:
-  //
-  // ```dart
-  // class I<T> {}
-  // class A<S> implements I<S> {}
-  // class B implements I<String> {}
-  // class C extends A<String> implements B {}
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
-      CompileTimeErrorCode(
-          'CONFLICTING_GENERIC_INTERFACES',
-          "The class '{0}' can't implement both '{1}' and '{2}' because the "
-              "type arguments are different.",
-          hasPublishedDocs: true);
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a method named `n`, and has a getter or a setter
-   * with basename `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting method
-   * 1: the name of the conflicting method
-   * 2: the name of the class defining the field with which the method conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
-      CompileTimeErrorCode(
-          'CONFLICTING_METHOD_AND_FIELD',
-          "Class '{0}' can't define method '{1}' and have field '{2}.{1}' "
-              "with the same name.",
-          correction: "Try converting the method to a getter, or "
-              "renaming the method to a name that doesn't conflict.");
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a static member with basename `n`, and has an
-   * instance member with basename `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting member
-   * 1: the name of the conflicting static member
-   * 2: the name of the class defining the field with which the method conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_STATIC_AND_INSTANCE =
-      CompileTimeErrorCode(
-          'CONFLICTING_STATIC_AND_INSTANCE',
-          "Class '{0}' can't define static member '{1}' and have instance "
-              "member '{2}.{1}' with the same name.",
-          correction:
-              "Try renaming the member to a name that doesn't conflict.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class, mixin, or extension
-  // declaration declares a type parameter with the same name as the class,
-  // mixin, or extension that declares it.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `C`
-  // has the same name as the class `C` of which it's a part:
-  //
-  // ```dart
-  // class C<[!C!]> {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the type parameter, or the class, mixin, or extension:
-  //
-  // ```dart
-  // class C<T> {}
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the class in "
-        "which the type variable is defined.",
-    correction: "Try renaming either the type variable or the class.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_EXTENSION =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the extension "
-        "in which the type variable is defined.",
-    correction: "Try renaming either the type variable or the extension.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class, mixin, or extension
-  // declaration declares a type parameter with the same name as one of the
-  // members of the class, mixin, or extension that declares it.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // has the same name as the field `T`:
-  //
-  // ```dart
-  // class C<[!T!]> {
-  //   int T = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the type parameter or the member with which it conflicts:
-  //
-  // ```dart
-  // class C<T> {
-  //   int total = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this class.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this mixin.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode
-      CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION = CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this extension.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the mixin in "
-        "which the type variable is defined.",
-    correction: "Try renaming either the type variable or the mixin.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
-  );
-
-  /**
-   * 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.",
-          correction: "Try removing the throw statement, or "
-              "removing the keyword 'const'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor has the keyword
-  // `const`, but a field in the class is initialized to a non-constant value.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `s` is
-  // initialized to a non-constant value:
-  //
-  // ```dart
-  // class C {
-  //   final String s = 3.toString();
-  //   [!const!] C();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field can be initialized to a constant value, then change the
-  // initializer to a constant expression:
-  //
-  // ```dart
-  // class C {
-  //   final String s = '3';
-  //   const C();
-  // }
-  // ```
-  //
-  // If the field can't be initialized to a constant value, then remove the
-  // keyword `const` from the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final String s = 3.toString();
-  //   C();
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST =
-      CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
-          "Can't define the 'const' constructor because the field '{0}' is "
-              "initialized with a non-constant value.",
-          correction: "Try initializing the field to a constant value, or "
-              "removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
-   * or implicitly, in the initializer list of a constant constructor must
-   * specify a constant constructor of the superclass of the immediately
-   * enclosing class or a compile-time error occurs.
-   *
-   * 12.1 Mixin Application: For each generative constructor named ... an
-   * implicitly declared constructor named ... is declared. If Sq is a
-   * generative const constructor, and M does not declare any fields, Cq is
-   * also a const constructor.
-   *
-   * Parameters:
-   * 0: the name of the instance field.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD =
-      CompileTimeErrorCode(
-    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-    "This constructor can't be declared 'const' because a mixin adds the "
-        "instance field: {0}.",
-    correction: "Try removing the 'const' keyword or removing the 'with' "
-        "clause from the class declaration, or removing the field from "
-        "the mixin class.",
-    uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-  );
-
-  /**
-   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
-   * or implicitly, in the initializer list of a constant constructor must
-   * specify a constant constructor of the superclass of the immediately
-   * enclosing class or a compile-time error occurs.
-   *
-   * 12.1 Mixin Application: For each generative constructor named ... an
-   * implicitly declared constructor named ... is declared. If Sq is a
-   * generative const constructor, and M does not declare any fields, Cq is
-   * also a const constructor.
-   *
-   * Parameters:
-   * 0: the names of the instance fields.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS =
-      CompileTimeErrorCode(
-    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-    "This constructor can't be declared 'const' because the mixins add "
-        "the instance fields: {0}.",
-    correction: "Try removing the 'const' keyword or removing the 'with' "
-        "clause from the class declaration, or removing the fields from "
-        "the mixin classes.",
-    uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the superclass
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor that is marked as
-  // `const` invokes a constructor from its superclass that isn't marked as
-  // `const`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the `const` constructor
-  // in `B` invokes the constructor `nonConst` from the class `A`, and the
-  // superclass constructor isn't a `const` constructor:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : [!super.nonConst()!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it isn't essential to invoke the superclass constructor that is
-  // currently being invoked, then invoke a constant constructor from the
-  // superclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : super();
-  // }
-  // ```
-  //
-  // If it's essential that the current constructor be invoked and if you can
-  // modify it, then add `const` to the constructor in the superclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   const A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : super.nonConst();
-  // }
-  // ```
-  //
-  // If it's essential that the current constructor be invoked and you can't
-  // modify it, then remove `const` from the constructor in the subclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   B() : super.nonConst();
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
-      CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
-          "A constant constructor can't call a non-constant super constructor "
-              "of '{0}'.",
-          correction: "Try calling a constant constructor in the superclass, "
-              "or removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor is marked as a
-  // const constructor, but the constructor is defined in a class that has at
-  // least one non-final instance field (either directly or by inheritance).
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field `x` isn't
-  // final:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   const [!C!](this.x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's possible to mark all of the fields as final, then do so:
-  //
-  // ```dart
-  // class C {
-  //   final int x;
-  //
-  //   const C(this.x);
-  // }
-  // ```
-  //
-  // If it isn't possible to mark all of the fields as final, then remove the
-  // keyword `const` from the constructor:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD =
-      CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD',
-          "Can't define a const constructor for a class with non-final fields.",
-          correction: "Try making all of the fields final, or "
-              "removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class from a library that is
-  // imported using a deferred import is used to create a `const` object.
-  // Constants are evaluated at compile time, and classes from deferred
-  // libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because it attempts to create a
-  // `const` instance of a class from a deferred library:
-  //
-  // ```dart
-  // import 'dart:convert' deferred as convert;
-  //
-  // const json2 = [!convert.JsonCodec()!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the object isn't required to be a constant, then change the code so that
-  // a non-constant instance is created:
-  //
-  // ```dart
-  // import 'dart:convert' deferred as convert;
-  //
-  // final json2 = convert.JsonCodec();
-  // ```
-  //
-  // If the object must be a constant, then remove `deferred` from the import
-  // directive:
-  //
-  // ```dart
-  // import 'dart:convert' as convert;
-  //
-  // const json2 = convert.JsonCodec();
-  // ```
-  static const CompileTimeErrorCode CONST_DEFERRED_CLASS = CompileTimeErrorCode(
-      'CONST_DEFERRED_CLASS', "Deferred classes can't be created with 'const'.",
-      correction: "Try using 'new' to create the instance, or "
-          "changing the import to not be deferred.",
-      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_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.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_BOOL',
-      "In constant expressions, operands of this operator must be of type "
-          "'bool'.");
-
-  /**
-   * 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.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_INT =
-      CompileTimeErrorCode(
-          'CONST_EVAL_TYPE_BOOL_INT',
-          "In constant expressions, operands of this operator must be of type "
-              "'bool' or 'int'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
-   * e1 and e2 are constant expressions that evaluate to a numeric, string or
-   * boolean value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING =
-      CompileTimeErrorCode(
-          'CONST_EVAL_TYPE_BOOL_NUM_STRING',
-          "In constant expressions, operands of this operator must be of type "
-              "'bool', 'num', 'String' or 'null'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2,
-   * e1 | e2, e1 >> e2 or e1 << e2, where e, e1 and e2 are constant expressions
-   * that evaluate to an integer value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_INT',
-      "In constant expressions, operands of this operator must be of type "
-          "'int'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
-   * e2, e1 / e2, e1 ~/ e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2,
-   * where e, e1 and e2 are constant expressions that evaluate to a numeric
-   * value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_NUM',
-      "In constant expressions, operands of this operator must be of type "
-          "'num'.");
-
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_TYPE',
-      "In constant expressions, operands of this operator must be of type "
-          "'Type'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type of the initializer expression
-   * 1: the name of the type of the field
-   */
-  static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE =
-      CompileTimeErrorCode(
-    '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",
-    hasPublishedDocs: true,
-    uniqueName: 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a value that isn't statically
-  // known to be a constant is assigned to a variable that's declared to be a
-  // `const` variable.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` isn't declared to
-  // be `const`:
-  //
-  // ```dart
-  // var x = 0;
-  // const y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value being assigned can be declared to be `const`, then change the
-  // declaration:
-  //
-  // ```dart
-  // const x = 0;
-  // const y = x;
-  // ```
-  //
-  // If the value can't be declared to be `const`, then remove the `const`
-  // modifier from the variable, possibly using `final` in its place:
-  //
-  // ```dart
-  // var x = 0;
-  // final y = x;
-  // ```
-  static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
-      CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE',
-          "Const variables must be initialized with a constant value.",
-          correction:
-              "Try changing the initializer to be a constant expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `const` variable is
-  // initialized using a `const` variable from a library that is imported using
-  // a deferred import. Constants are evaluated at compile time, and values from
-  // deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the variable `pi` is
-  // being initialized using the constant `math.pi` from the library
-  // `dart:math`, and `dart:math` is imported as a deferred library:
-  //
-  // ```dart
-  // import 'dart:math' deferred as math;
-  //
-  // const pi = [!math.pi!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the value of the constant from the imported
-  // library, then remove the keyword `deferred`:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // const pi = math.pi;
-  // ```
-  //
-  // If you don't need to reference the imported constant, then remove the
-  // reference:
-  //
-  // ```dart
-  // const pi = 3.14;
-  // ```
-  static const CompileTimeErrorCode
-      CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used to initialize "
-              "a 'const' variable.",
-          correction:
-              "Try initializing the variable without referencing members of "
-              "the deferred library, or changing the import to not be "
-              "deferred.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance field is marked as
-  // being const.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is an instance
-  // field:
-  //
-  // ```dart
-  // class C {
-  //   [!const!] int f = 3;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field needs to be an instance field, then remove the keyword
-  // `const`, or replace it with `final`:
-  //
-  // ```dart
-  // class C {
-  //   final int f = 3;
-  // }
-  // ```
-  //
-  // If the field really should be a const field, then make it a static field:
-  //
-  // ```dart
-  // class C {
-  //   static const int f = 3;
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_INSTANCE_FIELD = CompileTimeErrorCode(
-      'CONST_INSTANCE_FIELD', "Only static fields can be declared as const.",
-      correction: "Try declaring the field as final, or adding the keyword "
-          "'static'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the entry's key
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class of object used as a
-  // key in a constant map literal implements the `==` operator. The
-  // implementation of constant maps uses the `==` operator, so any
-  // implementation other than the one inherited from `Object` requires
-  // executing arbitrary code at compile time, which isn't supported.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constant map
-  // contains a key whose type is `C`, and the class `C` overrides the
-  // implementation of `==`:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // const map = {[!C()!] : 0};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you can remove the implementation of `==` from the class, then do so:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // const map = {C() : 0};
-  // ```
-  //
-  // If you can't remove the implementation of `==` from the class, then make
-  // the map be non-constant:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // final map = {C() : 0};
-  // ```
-  static const CompileTimeErrorCode
-      CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = CompileTimeErrorCode(
-          'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
-          "The type of a key in a constant map can't override the '==' "
-              "operator, but the class '{0}' does.",
-          correction: "Try using a different value for the key, or "
-              "removing the keyword 'const' from the map.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a variable that is declared to
-  // be a constant doesn't have an initializer.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `c` isn't initialized:
-  //
-  // ```dart
-  // const [!c!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an initializer:
-  //
-  // ```dart
-  // const c = 'c';
-  // ```
-  static const CompileTimeErrorCode CONST_NOT_INITIALIZED =
-      CompileTimeErrorCode(
-          'CONST_NOT_INITIALIZED', "The constant '{0}' must be initialized.",
-          correction: "Try adding an initialization to the declaration.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the element
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class of object used as an
-  // element in a constant set literal implements the `==` operator. The
-  // implementation of constant sets uses the `==` operator, so any
-  // implementation other than the one inherited from `Object` requires
-  // executing arbitrary code at compile time, which isn't supported.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constant set
-  // contains an element whose type is `C`, and the class `C` overrides the
-  // implementation of `==`:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // const set = {[!C()!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you can remove the implementation of `==` from the class, then do so:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // const set = {C()};
-  // ```
-  //
-  // If you can't remove the implementation of `==` from the class, then make
-  // the set be non-constant:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // final set = {C()};
-  // ```
-  static const CompileTimeErrorCode CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS =
-      CompileTimeErrorCode(
-          'CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS',
-          "The type of an element in a constant set can't override the '==' "
-              "operator, but the type '{0}' does.",
-          correction: "Try using a different value for the element, or "
-              "removing the keyword 'const' from the set.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression of a spread
-  // operator in a constant list or set evaluates to something other than a list
-  // or a set.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `list1` is
-  // `null`, which is neither a list nor a set:
-  //
-  // ```dart
-  // %language=2.9
-  // const List<int> list1 = null;
-  // const List<int> list2 = [...[!list1!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the expression to something that evaluates to either a constant list
-  // or a constant set:
-  //
-  // ```dart
-  // %language=2.9
-  // const List<int> list1 = [];
-  // const List<int> list2 = [...list1];
-  // ```
-  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_LIST_OR_SET =
-      CompileTimeErrorCode('CONST_SPREAD_EXPECTED_LIST_OR_SET',
-          "A list or a set is expected in this spread.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression of a spread
-  // operator in a constant map evaluates to something other than a map.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `map1` is
-  // `null`, which isn't a map:
-  //
-  // ```dart
-  // %language=2.9
-  // const Map<String, int> map1 = null;
-  // const Map<String, int> map2 = {...[!map1!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the expression to something that evaluates to a constant map:
-  //
-  // ```dart
-  // %language=2.9
-  // const Map<String, int> map1 = {};
-  // const Map<String, int> map2 = {...map1};
-  // ```
-  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_MAP =
-      CompileTimeErrorCode(
-          'CONST_SPREAD_EXPECTED_MAP', "A map is expected in this spread.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the keyword `const` is used to
-  // invoke a constructor that isn't marked with `const`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the constructor in `A`
-  // isn't a const constructor:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // A f() => [!const!] A();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's desirable and possible to make the class a constant class (by
-  // making all of the fields of the class, including inherited fields, final),
-  // then add the keyword `const` to the constructor:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  // }
-  //
-  // A f() => const A();
-  // ```
-  //
-  // Otherwise, remove the keyword `const`:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // A f() => A();
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_NON_CONST = CompileTimeErrorCode(
-      'CONST_WITH_NON_CONST',
-      "The constructor being called isn't a const constructor.",
-      correction: "Try removing 'const' from the constructor invocation.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a const constructor is invoked
-  // with an argument that isn't a constant expression.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` isn't a constant:
-  //
-  // ```dart
-  // class C {
-  //   final int i;
-  //   const C(this.i);
-  // }
-  // C f(int i) => const C([!i!]);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either make all of the arguments constant expressions, or remove the
-  // `const` keyword to use the non-constant form of the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final int i;
-  //   const C(this.i);
-  // }
-  // C f(int i) => C(i);
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT =
-      CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT',
-          "Arguments of a constant creation must be constant expressions.",
-          correction: "Try making the argument a valid constant, or "
-              "use 'new' to call the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-type element
-   */
-  static const CompileTimeErrorCode CONST_WITH_NON_TYPE = CompileTimeErrorCode(
-    'CREATION_WITH_NON_TYPE',
-    "The name '{0}' isn't a class.",
-    correction: "Try correcting the name to match an existing class.",
-    hasPublishedDocs: true,
-    isUnresolvedIdentifier: true,
-    uniqueName: 'CONST_WITH_NON_TYPE',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type parameter is used as a
-  // type argument in a `const` invocation of a constructor. This isn't allowed
-  // because the value of the type parameter (the actual type that will be used
-  // at runtime) can't be known at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // is being used as a type argument when creating a constant:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<T> newC<T>() => const C<[!T!]>();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type that will be used for the type parameter can be known at
-  // compile time, then remove the use of the type parameter:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<int> newC() => const C<int>();
-  // ```
-  //
-  // If the type that will be used for the type parameter can't be known until
-  // runtime, then remove the keyword `const`:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<T> newC<T>() => C<T>();
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS =
-      CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS',
-          "A constant creation can't use a type parameter as a type argument.",
-          correction: "Try replacing the type parameter with a different type.",
-          hasPublishedDocs: true);
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
-   * a constant constructor declared by the type <i>T</i>.
-   *
-   * Parameters:
-   * 0: the name of the type
-   * 1: the name of the requested constant constructor
-   */
-  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR =
-      CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR',
-          "The class '{0}' doesn't have a constant constructor '{1}'.",
-          correction: "Try calling a different constructor.");
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
-   * a constant constructor declared by the type <i>T</i>.
-   *
-   * Parameters:
-   * 0: the name of the type
-   */
-  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
-      CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
-          "The class '{0}' doesn't have an unnamed constant constructor.",
-          correction: "Try calling a different constructor.");
-
-  static const CompileTimeErrorCode CONTINUE_LABEL_ON_SWITCH =
-      CompileTimeErrorCode('CONTINUE_LABEL_ON_SWITCH',
-          "A continue label resolves to switch, must be loop or switch member");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a use of the default
-  // constructor for the class `List` in code that has opted in to null safety.
-  //
-  // #### Example
-  //
-  // Assuming the following code is opted in to null safety, it produces this
-  // diagnostic because it uses the default `List` constructor:
-  //
-  // ```dart
-  // var l = [!List<int>!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If no initial size is provided, then convert the code to use a list
-  // literal:
-  //
-  // ```dart
-  // var l = <int>[];
-  // ```
-  //
-  // If an initial size needs to be provided and there is a single reasonable
-  // initial value for the elements, then use `List.filled`:
-  //
-  // ```dart
-  // var l = List.filled(3, 0);
-  // ```
-  //
-  // If an initial size needs to be provided but each element needs to be
-  // computed, then use `List.generate`:
-  //
-  // ```dart
-  // var l = List.generate(3, (i) => i);
-  // ```
-  static const CompileTimeErrorCode DEFAULT_LIST_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'DEFAULT_LIST_CONSTRUCTOR',
-          "The default 'List' constructor isn't available when null safety is "
-              "enabled.",
-          correction: "Try using a list literal, 'List.filled' or "
-              "'List.generate'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a factory constructor that
-  // redirects to another constructor specifies a default value for an optional
-  // parameter.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the factory constructor
-  // in `A` has a default value for the optional parameter `x`:
-  //
-  // ```dart
-  // class A {
-  //   factory A([int [!x!] = 0]) = B;
-  // }
-  //
-  // class B implements A {
-  //   B([int x = 1]) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the default value from the factory constructor:
-  //
-  // ```dart
-  // class A {
-  //   factory A([int x]) = B;
-  // }
-  //
-  // class B implements A {
-  //   B([int x = 1]) {}
-  // }
-  // ```
-  //
-  // Note that this fix might change the value used when the optional parameter
-  // is omitted. If that happens, and if that change is a problem, then consider
-  // making the optional parameter a required parameter in the factory method:
-  //
-  // ```dart
-  // class A {
-  //  factory A(int x) = B;
-  // }
-  //
-  // class B implements A {
-  //   B([int x = 1]) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = CompileTimeErrorCode(
-          'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR',
-          "Default values aren't allowed in factory constructors that redirect "
-              "to another constructor.",
-          correction: "Try removing the default value.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  /* #### Description
-  //
-  // The analyzer produces this diagnostic when a named parameter has both the
-  // `required` modifier and a default value. If the parameter is required, then
-  // a value for the parameter is always provided at the call sites, so the
-  // default value can never be used.
-  //
-  // #### Examples
-  //
-  // The following code generates this diagnostic:
-  //
-  // ```dart
-  // void log({required String [!message!] = 'no message'}) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the parameter is really required, then remove the default value:
-  //
-  // ```dart
-  // void log({required String message}) {}
-  // ```
-  //
-  // If the parameter isn't always required, then remove the `required`
-  // modifier:
-  //
-  // ```dart
-  // void log({String message = 'no message'}) {}
-  // ``` */
-  static const CompileTimeErrorCode DEFAULT_VALUE_ON_REQUIRED_PARAMETER =
-      CompileTimeErrorCode('DEFAULT_VALUE_ON_REQUIRED_PARAMETER',
-          "Required named parameters can't have a default value.",
-          correction: "Try removing either the default value or the 'required' "
-              "modifier.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library that is imported using
-  // a deferred import declares an extension that is visible in the importing
-  // library. Extension methods are resolved at compile time, and extensions
-  // from deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines a named extension:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class C {}
-  //
-  // extension E on String {
-  //   int get size => length;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the named extension is
-  // visible to the library:
-  //
-  // ```dart
-  // import [!'a.dart'!] deferred as a;
-  //
-  // void f() {
-  //   a.C();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the library must be imported as `deferred`, then either add a `show`
-  // clause listing the names being referenced or add a `hide` clause listing
-  // all of the named extensions. Adding a `show` clause would look like this:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a show C;
-  //
-  // void f() {
-  //   a.C();
-  // }
-  // ```
-  //
-  // Adding a `hide` clause would look like this:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a hide E;
-  //
-  // void f() {
-  //   a.C();
-  // }
-  // ```
-  //
-  // With the first fix, the benefit is that if new extensions are added to the
-  // imported library, then the extensions won't cause a diagnostic to be
-  // generated.
-  //
-  // If the library doesn't need to be imported as `deferred`, or if you need to
-  // make use of the extension method declared in it, then remove the keyword
-  // `deferred`:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // void f() {
-  //   a.C();
-  // }
-  // ```
-  static const CompileTimeErrorCode DEFERRED_IMPORT_OF_EXTENSION =
-      CompileTimeErrorCode('DEFERRED_IMPORT_OF_EXTENSION',
-          "Imports of deferred libraries must hide all extensions.",
-          correction:
-              "Try adding either a show combinator listing the names you need "
-              "to reference or a hide combinator listing all of the "
-              "extensions.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the variable that is invalid
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when [definite assignment][] analysis
-  // shows that a local variable that's marked as `late` is read before being
-  // assigned.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` wasn't assigned a
-  // value before being read:
-  //
-  // ```dart
-  // void f(bool b) {
-  //   late int x;
-  //   print([!x!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Assign a value to the variable before reading from it:
-  //
-  // ```dart
-  // void f(bool b) {
-  //   late int x;
-  //   x = b ? 1 : 0;
-  //   print(x);
-  // }
-  // ```
-  static const CompileTimeErrorCode DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE =
-      CompileTimeErrorCode(
-          'DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE',
-          "The late local variable '{0}' is definitely unassigned at this "
-              "point.",
-          correction:
-              "Ensure that it is assigned on necessary execution paths.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class declares more than one
-  // unnamed constructor or when it declares more than one constructor with the
-  // same name.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there are two
-  // declarations for the unnamed constructor:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  //
-  //   [!C!]();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because there are two
-  // declarations for the constructor named `m`:
-  //
-  // ```dart
-  // class C {
-  //   C.m();
-  //
-  //   [!C.m!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there are multiple unnamed constructors and all of the constructors are
-  // needed, then give all of them, or all except one of them, a name:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  //
-  //   C.n();
-  // }
-  // ```
-  //
-  // If there are multiple unnamed constructors and all except one of them are
-  // unneeded, then remove the constructors that aren't needed:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  // }
-  // ```
-  //
-  // If there are multiple named constructors and all of the constructors are
-  // needed, then rename all except one of them:
-  //
-  // ```dart
-  // class C {
-  //   C.m();
-  //
-  //   C.n();
-  // }
-  // ```
-  //
-  // If there are multiple named constructors and all except one of them are
-  // unneeded, then remove the constructorsthat aren't needed:
-  //
-  // ```dart
-  // class C {
-  //   C.m();
-  // }
-  // ```
-  static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT =
-      CompileTimeErrorCode(
-    'DUPLICATE_CONSTRUCTOR',
-    "The unnamed constructor is already defined.",
-    correction: "Try giving one of the constructors a name.",
-    hasPublishedDocs: true,
-    uniqueName: 'DUPLICATE_CONSTRUCTOR_DEFAULT',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the duplicate entity
-   */
-  static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME =
-      CompileTimeErrorCode(
-    'DUPLICATE_CONSTRUCTOR',
-    "The constructor with name '{0}' is already defined.",
-    correction: "Try renaming one of the constructors.",
-    hasPublishedDocs: true,
-    uniqueName: 'DUPLICATE_CONSTRUCTOR_NAME',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the duplicate entity
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name is declared, and there is
-  // a previous declaration with the same name in the same scope.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `x` is
-  // declared twice:
-  //
-  // ```dart
-  // int x = 0;
-  // int [!x!] = 1;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Choose a different name for one of the declarations.
-  //
-  // ```dart
-  // int x = 0;
-  // int y = 1;
-  // ```
-  static const CompileTimeErrorCode DUPLICATE_DEFINITION = CompileTimeErrorCode(
-      'DUPLICATE_DEFINITION', "The name '{0}' is already defined.",
-      correction: "Try renaming one of the declarations.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's more than one field
-  // formal parameter for the same field in a constructor's parameter list. It
-  // isn't useful to assign a value that will immediately be overwritten.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `this.f` appears twice
-  // in the parameter list:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f, this.[!f!]) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove one of the field formal parameters:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode DUPLICATE_FIELD_FORMAL_PARAMETER =
-      CompileTimeErrorCode(
-          'DUPLICATE_FIELD_FORMAL_PARAMETER',
-          "The field '{0}' can't be initialized by multiple parameters in the "
-              "same constructor.",
-          correction: "Try removing one of the parameters, or "
-              "using different fields.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the parameter that was duplicated
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation has two or more
-  // named arguments that have the same name.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there are two arguments
-  // with the name `a`:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(C c) {
-  //   c.m(a: 0, [!a!]: 1);
-  // }
-  //
-  // class C {
-  //   void m({int a, int b}) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If one of the arguments should have a different name, then change the name:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(C c) {
-  //   c.m(a: 0, b: 1);
-  // }
-  //
-  // class C {
-  //   void m({int a, int b}) {}
-  // }
-  // ```
-  //
-  // If one of the arguments is wrong, then remove it:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(C c) {
-  //   c.m(a: 1);
-  // }
-  //
-  // class C {
-  //   void m({int a, int b}) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT =
-      CompileTimeErrorCode('DUPLICATE_NAMED_ARGUMENT',
-          "The argument for the named parameter '{0}' was already specified.",
-          correction: "Try removing one of the named arguments, or "
-              "correcting one of the names to reference a different named "
-              "parameter.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the URI of the duplicate part
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a single file is referenced in
-  // multiple part directives.
-  //
-  // #### Example
-  //
-  // Given a file named `part.dart` containing
-  //
-  // ```dart
-  // %uri="lib/part.dart"
-  // part of lib;
-  // ```
-  //
-  // The following code produces this diagnostic because the file `part.dart` is
-  // included multiple times:
-  //
-  // ```dart
-  // library lib;
-  //
-  // part 'part.dart';
-  // part [!'part.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove all except the first of the duplicated part directives:
-  //
-  // ```dart
-  // library lib;
-  //
-  // part 'part.dart';
-  // ```
-  static const CompileTimeErrorCode DUPLICATE_PART = CompileTimeErrorCode(
-      'DUPLICATE_PART',
-      "The library already contains a part with the URI '{0}'.",
-      correction:
-          "Try removing all except one of the duplicated part directives.",
-      hasPublishedDocs: true);
-
-  static const CompileTimeErrorCode ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING =
-      CompileTimeErrorCode('ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING',
-          "The name of the enum constant can't be the same as the enum's name.",
-          correction: "Try renaming the constant.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when two elements in a constant set
-  // literal have the same value. The set can only contain each value once,
-  // which means that one of the values is unnecessary.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the string `'a'` is
-  // specified twice:
-  //
-  // ```dart
-  // const Set<String> set = {'a', [!'a'!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove one of the duplicate values:
-  //
-  // ```dart
-  // const Set<String> set = {'a'};
-  // ```
-  //
-  // Note that literal sets preserve the order of their elements, so the choice
-  // of which element to remove might affect the order in which elements are
-  // returned by an iterator.
-  static const CompileTimeErrorCode EQUAL_ELEMENTS_IN_CONST_SET =
-      CompileTimeErrorCode('EQUAL_ELEMENTS_IN_CONST_SET',
-          "Two elements in a constant set literal can't be equal.",
-          correction: "Change or remove the duplicate element.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key in a constant map is the
-  // same as a previous key in the same map. If two keys are the same, then the
-  // second value would overwrite the first value, which makes having both pairs
-  // pointless.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the key `1` is used
-  // twice:
-  //
-  // ```dart
-  // const map = <int, String>{1: 'a', 2: 'b', [!1!]: 'c', 4: 'd'};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If both entries should be included in the map, then change one of the keys
-  // to be different:
-  //
-  // ```dart
-  // const map = <int, String>{1: 'a', 2: 'b', 3: 'c', 4: 'd'};
-  // ```
-  //
-  // If only one of the entries is needed, then remove the one that isn't
-  // needed:
-  //
-  // ```dart
-  // const map = <int, String>{1: 'a', 2: 'b', 4: 'd'};
-  // ```
-  //
-  // Note that literal maps preserve the order of their entries, so the choice
-  // of which entry to remove might affect the order in which keys and values
-  // are returned by an iterator.
-  static const CompileTimeErrorCode EQUAL_KEYS_IN_CONST_MAP =
-      CompileTimeErrorCode('EQUAL_KEYS_IN_CONST_MAP',
-          "Two keys in a constant map literal can't be equal.",
-          correction: "Change or remove the duplicate key.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a list literal has more than one
-  // type argument.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the list literal has
-  // two type arguments when it can have at most one:
-  //
-  // ```dart
-  // var l = [!<int, int>!][];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove all except one of the type arguments:
-  //
-  // ```dart
-  // var l = <int>[];
-  // ```
-  static const CompileTimeErrorCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS =
-      CompileTimeErrorCode('EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
-          "List literals require one type argument or none, but {0} found.",
-          correction: "Try adjusting the number of type arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a set literal has more than one
-  // type argument.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the set literal has
-  // three type arguments when it can have at most one:
-  //
-  // ```dart
-  // var s = [!<int, String, int>!]{0, 'a', 1};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove all except one of the type arguments:
-  //
-  // ```dart
-  // var s = <int>{0, 1};
-  // ```
-  static const CompileTimeErrorCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
-      CompileTimeErrorCode('EXPECTED_ONE_SET_TYPE_ARGUMENTS',
-          "Set literals require one type argument or none, but {0} were found.",
-          correction: "Try adjusting the number of type arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a map literal has either one or
-  // more than two type arguments.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the map literal has
-  // three type arguments when it can have either two or zero:
-  //
-  // ```dart
-  // var m = [!<int, String, int>!]{};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove all except two of the type arguments:
-  //
-  // ```dart
-  // var m = <int, String>{};
-  // ```
-  static const CompileTimeErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS =
-      CompileTimeErrorCode('EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
-          "Map literals require two type arguments or none, but {0} found.",
-          correction: "Try adjusting the number of type arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the uri pointing to a library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an export whose `dart:`
-  // URI references an internal library.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `_interceptors` is an
-  // internal library:
-  //
-  // ```dart
-  // export [!'dart:_interceptors'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the export directive.
-  static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY =
-      CompileTimeErrorCode('EXPORT_INTERNAL_LIBRARY',
-          "The library '{0}' is internal and can't be exported.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of a symbol defined in a legacy library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library that was opted in to
-  // null safety exports another library, and the exported library is opted out
-  // of null safety.
-  //
-  // #### Example
-  //
-  // Given a library that is opted out of null safety:
-  //
-  // ```dart
-  // %uri="lib/optedOut.dart"
-  // // @dart = 2.8
-  // String s;
-  // ```
-  //
-  // The following code produces this diagnostic because it's exporting symbols
-  // from an opted-out library:
-  //
-  // ```dart
-  // export [!'optedOut.dart'!];
-  //
-  // class C {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you're able to do so, migrate the exported library so that it doesn't
-  // need to opt out:
-  //
-  // ```dart
-  // String? s;
-  // ```
-  //
-  // If you can't migrate the library, then remove the export:
-  //
-  // ```dart
-  // class C {}
-  // ```
-  //
-  // If the exported library (the one that is opted out) itself exports an
-  // opted-in library, then it's valid for your library to indirectly export the
-  // symbols from the opted-in library. You can do so by adding a hide
-  // combinator to the export directive in your library that hides all of the
-  // names declared in the opted-out library.
-  static const CompileTimeErrorCode EXPORT_LEGACY_SYMBOL = CompileTimeErrorCode(
-      'EXPORT_LEGACY_SYMBOL',
-      "The symbol '{0}' is defined in a legacy library, and can't be "
-          "re-exported from a library with null safety enabled.",
-      correction: "Try removing the export or migrating the legacy library.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the uri pointing to a non-library declaration
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an export directive references a
-  // part rather than a library.
-  //
-  // #### Example
-  //
-  // Given a file named `part.dart` containing
-  //
-  // ```dart
-  // %uri="lib/part.dart"
-  // part of lib;
-  // ```
-  //
-  // The following code produces this diagnostic because the file `part.dart` is
-  // a part, and only libraries can be exported:
-  //
-  // ```dart
-  // library lib;
-  //
-  // export [!'part.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either remove the export directive, or change the URI to be the URI of the
-  // library containing the part.
-  static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY =
-      CompileTimeErrorCode('EXPORT_OF_NON_LIBRARY',
-          "The exported library '{0}' can't have a part-of directive.",
-          correction: "Try exporting the library that the part is a part of.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the analyzer finds an
-  // expression, rather than a map entry, in what appears to be a map literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // var map = <String, int>{'a': 0, 'b': 1, [!'c'!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the expression is intended to compute either a key or a value in an
-  // entry, fix the issue by replacing the expression with the key or the value.
-  // For example:
-  //
-  // ```dart
-  // var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
-  // ```
-  static const CompileTimeErrorCode EXPRESSION_IN_MAP = CompileTimeErrorCode(
-      'EXPRESSION_IN_MAP', "Expressions can't be used in a map literal.",
-      correction: "Try removing the expression or converting it to be a map "
-          "entry.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type (class or mixin) is a
-  // subtype of a class from a library being imported using a deferred import.
-  // The supertypes of a type must be compiled at the same time as the type, and
-  // classes from deferred libraries aren't compiled until the library is
-  // loaded.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines the class `A`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {}
-  // ```
-  //
-  // The following code produces this diagnostic because the superclass of `B`
-  // is declared in a deferred library:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // class B extends [!a.A!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to create a subtype of a type from the deferred library, then
-  // remove the `deferred` keyword:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // class B extends a.A {}
-  // ```
-  static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS =
-      CompileTimeErrorCode(
-          'SUBTYPE_OF_DEFERRED_CLASS', "Classes can't extend deferred classes.",
-          correction: "Try specifying a different superclass, or "
-              "removing the extends clause.",
-          hasPublishedDocs: true,
-          uniqueName: 'EXTENDS_DEFERRED_CLASS');
-
-  /**
-   * Parameters:
-   * 0: the name of the disallowed type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when one of the restricted classes is
-  // used in either an `extends`, `implements`, `with`, or `on` clause. The
-  // classes `bool`, `double`, `FutureOr`, `int`, `Null`, `num`, and `String`
-  // are all restricted in this way, to allow for more efficient
-  // implementations.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `String` is used in an
-  // `extends` clause:
-  //
-  // ```dart
-  // class A extends [!String!] {}
-  // ```
-  //
-  // The following code produces this diagnostic because `String` is used in an
-  // `implements` clause:
-  //
-  // ```dart
-  // class B implements [!String!] {}
-  // ```
-  //
-  // The following code produces this diagnostic because `String` is used in a
-  // `with` clause:
-  //
-  // ```dart
-  // class C with [!String!] {}
-  // ```
-  //
-  // The following code produces this diagnostic because `String` is used in an
-  // `on` clause:
-  //
-  // ```dart
-  // mixin M on [!String!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different type should be specified, then replace the type:
-  //
-  // ```dart
-  // class A extends Object {}
-  // ```
-  //
-  // If there isn't a different type that would be appropriate, then remove the
-  // type, and possibly the whole clause:
-  //
-  // ```dart
-  // class B {}
-  // ```
-  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
-      CompileTimeErrorCode(
-    'SUBTYPE_OF_DISALLOWED_TYPE',
-    "Classes can't extend '{0}'.",
-    correction: "Try specifying a different superclass, or "
-        "removing the extends clause.",
-    hasPublishedDocs: true,
-    uniqueName: 'EXTENDS_DISALLOWED_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name in the extends clause
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an `extends` clause contains a
-  // name that is declared to be something other than a class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is declared to be a
-  // function:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // class C extends [!f!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want the class to extend a class other than `Object`, then replace
-  // the name in the `extends` clause with the name of that class:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // class C extends B {}
-  //
-  // class B {}
-  // ```
-  //
-  // If you want the class to extend `Object`, then remove the `extends` clause:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // class C {}
-  // ```
-  static const CompileTimeErrorCode EXTENDS_NON_CLASS = CompileTimeErrorCode(
-      'EXTENDS_NON_CLASS', "Classes can only extend other classes.",
-      correction:
-          "Try specifying a different superclass, or removing the extends "
-          "clause.",
-      hasPublishedDocs: true,
-      isUnresolvedIdentifier: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type alias that expands to a
-  // type parameter is used in an `extends`, `implements`, `with`, or `on`
-  // clause.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type alias `T`,
-  // which expands to the type parameter `S`, is used in the `extends` clause of
-  // the class `C`:
-  //
-  // ```dart
-  // typedef T<S> = S;
-  //
-  // class C extends [!T!]<Object> {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use the value of the type argument directly:
-  //
-  // ```dart
-  // typedef T<S> = S;
-  //
-  // class C extends Object {}
-  // ```
-  static const CompileTimeErrorCode
-      EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
-          "A type alias that expands to a type parameter can't be used as a "
-              "superclass.",
-          correction:
-              "Try specifying a different superclass, or removing the extends "
-              "clause.",
-          hasPublishedDocs: true,
-          uniqueName: 'EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER');
-
-  /**
-   * Parameters:
-   * 0: the name of the extension
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of an extension is used
-  // in an expression other than in an extension override or to qualify an
-  // access to a static member of the extension. Because classes define a type,
-  // the name of a class can be used to refer to the instance of `Type`
-  // representing the type of the class. Extensions, on the other hand, don't
-  // define a type and can't be used as a type literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `E` is an extension:
-  //
-  // ```dart
-  // extension E on int {
-  //   static String m() => '';
-  // }
-  //
-  // var x = [!E!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name of the extension with a name that can be referenced, such
-  // as a static member defined on the extension:
-  //
-  // ```dart
-  // extension E on int {
-  //   static String m() => '';
-  // }
-  //
-  // var x = E.m();
-  // ```
-  static const CompileTimeErrorCode EXTENSION_AS_EXPRESSION =
-      CompileTimeErrorCode('EXTENSION_AS_EXPRESSION',
-          "Extension '{0}' can't be used as an expression.",
-          correction: "Try replacing it with a valid expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the extension defining the conflicting member
-   * 1: the name of the conflicting static member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension declaration
-  // contains both an instance member and a static member that have the same
-  // name. The instance member and the static member can't have the same name
-  // because it's unclear which member is being referenced by an unqualified use
-  // of the name within the body of the extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `a` is being
-  // used for two different members:
-  //
-  // ```dart
-  // extension E on Object {
-  //   int get a => 0;
-  //   static int [!a!]() => 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename or remove one of the members:
-  //
-  // ```dart
-  // extension E on Object {
-  //   int get a => 0;
-  //   static int b() => 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTENSION_CONFLICTING_STATIC_AND_INSTANCE =
-      CompileTimeErrorCode(
-          'EXTENSION_CONFLICTING_STATIC_AND_INSTANCE',
-          "Extension '{0}' can't define static member '{1}' and an instance "
-              "member with the same name.",
-          correction:
-              "Try renaming the member to a name that doesn't conflict.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension declaration
-  // declares a member with the same name as a member declared in the class
-  // `Object`. Such a member can never be used because the member in `Object` is
-  // always found first.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `toString` is defined
-  // by `Object`:
-  //
-  // ```dart
-  // extension E on String {
-  //   String [!toString!]() => this;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the member or rename it so that the name doesn't conflict with the
-  // member in `Object`:
-  //
-  // ```dart
-  // extension E on String {
-  //   String displayString() => this;
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTENSION_DECLARES_MEMBER_OF_OBJECT =
-      CompileTimeErrorCode(
-          'EXTENSION_DECLARES_MEMBER_OF_OBJECT',
-          "Extensions can't declare members with the same name as a member "
-              "declared by 'Object'.",
-          correction: "Try specifying a different name for the member.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is the
-  // receiver of the invocation of a static member. Similar to static members in
-  // classes, the static members of an extension should be accessed using the
-  // name of the extension, not an extension override.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` is static:
-  //
-  // ```dart
-  // extension E on String {
-  //   static void m() {}
-  // }
-  //
-  // void f() {
-  //   E('').[!m!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the extension override with the name of the extension:
-  //
-  // ```dart
-  // extension E on String {
-  //   static void m() {}
-  // }
-  //
-  // void f() {
-  //   E.m();
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER =
-      CompileTimeErrorCode(
-          'EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER',
-          "An extension override can't be used to access a static member from "
-              "an extension.",
-          correction: "Try using just the name of the extension.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the argument
-   * 1: the extended type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the argument to an extension
-  // override isn't assignable to the type being extended by the extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `3` isn't a `String`:
-  //
-  // ```dart
-  // extension E on String {
-  //   void method() {}
-  // }
-  //
-  // void f() {
-  //   E([!3!]).method();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you're using the correct extension, then update the argument to have the
-  // correct type:
-  //
-  // ```dart
-  // extension E on String {
-  //   void method() {}
-  // }
-  //
-  // void f() {
-  //   E(3.toString()).method();
-  // }
-  // ```
-  //
-  // If there's a different extension that's valid for the type of the argument,
-  // then either replace the name of the extension or unwrap the argument so
-  // that the correct extension is found.
-  static const CompileTimeErrorCode EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE =
-      CompileTimeErrorCode(
-          'EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE',
-          "The type of the argument to the extension override '{0}' "
-              "isn't assignable to the extended type '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is used as
-  // the receiver of a cascade expression. The value of a cascade expression
-  // `e..m` is the value of the receiver `e`, but extension overrides aren't
-  // expressions and don't have a value.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `E(3)` isn't an
-  // expression:
-  //
-  // ```dart
-  // extension E on int {
-  //   void m() {}
-  // }
-  // f() {
-  //   [!E!](3)..m();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use `.` rather than `..`:
-  //
-  // ```dart
-  // extension E on int {
-  //   void m() {}
-  // }
-  // f() {
-  //   E(3).m();
-  // }
-  // ```
-  //
-  // If there are multiple cascaded accesses, you'll need to duplicate the
-  // extension override for each one.
-  static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITH_CASCADE =
-      CompileTimeErrorCode(
-          'EXTENSION_OVERRIDE_WITH_CASCADE',
-          "Extension overrides have no value so they can't be used as the "
-              "receiver of a cascade expression.",
-          correction: "Try using '.' instead of '..'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is found
-  // that isn't being used to access one of the members of the extension. The
-  // extension override syntax doesn't have any runtime semantics; it only
-  // controls which member is selected at compile time.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `E(i)` isn't an
-  // expression:
-  //
-  // ```dart
-  // extension E on int {
-  //   int get a => 0;
-  // }
-  //
-  // void f(int i) {
-  //   print([!E(i)!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to invoke one of the members of the extension, then add the
-  // invocation:
-  //
-  // ```dart
-  // extension E on int {
-  //   int get a => 0;
-  // }
-  //
-  // void f(int i) {
-  //   print(E(i).a);
-  // }
-  // ```
-  //
-  // If you don't want to invoke a member, then unwrap the argument:
-  //
-  // ```dart
-  // extension E on int {
-  //   int get a => 0;
-  // }
-  //
-  // void f(int i) {
-  //   print(i);
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITHOUT_ACCESS =
-      CompileTimeErrorCode('EXTENSION_OVERRIDE_WITHOUT_ACCESS',
-          "An extension override can only be used to access instance members.",
-          correction: "Consider adding an access to an instance member.",
-          hasPublishedDocs: true);
-
-  static const CompileTimeErrorCode EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER =
-      CompileTimeErrorCode('EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER',
-          'External fields cannot have initializers.',
-          correction:
-              "Try removing the field initializer or the 'external' keyword "
-              "from the field declaration.");
-
-  static const CompileTimeErrorCode EXTERNAL_FIELD_INITIALIZER =
-      CompileTimeErrorCode('EXTERNAL_FIELD_INITIALIZER',
-          'External fields cannot have initializers.',
-          correction:
-              "Try removing the initializer or the 'external' keyword.");
-
-  static const CompileTimeErrorCode EXTERNAL_VARIABLE_INITIALIZER =
-      CompileTimeErrorCode('EXTERNAL_VARIABLE_INITIALIZER',
-          'External variables cannot have initializers.',
-          correction:
-              "Try removing the initializer or the 'external' keyword.");
-
-  /**
-   * Parameters:
-   * 0: the maximum number of positional arguments
-   * 1: the actual number of positional arguments given
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function invocation
-  // has more positional arguments than the method or function allows.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` defines 2
-  // parameters but is invoked with 3 arguments:
-  //
-  // ```dart
-  // void f(int a, int b) {}
-  // void g() {
-  //   f(1, 2, [!3!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the arguments that don't correspond to parameters:
-  //
-  // ```dart
-  // void f(int a, int b) {}
-  // void g() {
-  //   f(1, 2);
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS =
-      CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS',
-          "Too many positional arguments: {0} expected, but {1} found.",
-          correction: "Try removing the extra arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the maximum number of positional arguments
-   * 1: the actual number of positional arguments given
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function invocation
-  // has more positional arguments than the method or function allows, but the
-  // method or function defines named parameters.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` defines 2
-  // positional parameters but has a named parameter that could be used for the
-  // third argument:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int a, int b, {int c}) {}
-  // void g() {
-  //   f(1, 2, [!3!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If some of the arguments should be values for named parameters, then add
-  // the names before the arguments:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int a, int b, {int c}) {}
-  // void g() {
-  //   f(1, 2, c: 3);
-  // }
-  // ```
-  //
-  // Otherwise, remove the arguments that don't correspond to positional
-  // parameters:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int a, int b, {int c}) {}
-  // void g() {
-  //   f(1, 2);
-  // }
-  // ```
-  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
-      CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
-          "Too many positional arguments: {0} expected, but {1} found.",
-          correction: "Try removing the extra positional arguments, "
-              "or specifying the name for named arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the field being initialized multiple times
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the initializer list of a
-  // constructor initializes a field more than once. There is no value to allow
-  // both initializers because only the last value is preserved.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `f` is being
-  // initialized twice:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C() : f = 0, [!f!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove one of the initializers:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C() : f = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
-      CompileTimeErrorCode('FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS',
-          "The field '{0}' can't be initialized twice in the same constructor.",
-          correction: "Try removing one of the initializations.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a field is initialized in both
-  // the parameter list and in the initializer list of a constructor.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `f` is
-  // initialized both by a field formal parameter and in the initializer list:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f) : [!f!] = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field should be initialized by the parameter, then remove the
-  // initialization in the initializer list:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  // }
-  // ```
-  //
-  // If the field should be initialized in the initializer list and the
-  // parameter isn't needed, then remove the parameter:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C() : f = 0;
-  // }
-  // ```
-  //
-  // If the field should be initialized in the initializer list and the
-  // parameter is needed, then make it a normal parameter:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(int g) : f = g * 2;
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = CompileTimeErrorCode(
-          'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
-          "Fields can't be initialized in both the parameter list and the "
-              "initializers.",
-          correction: "Try removing one of the initializations.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a factory constructor has a
-  // field formal parameter. Factory constructors can't assign values to fields
-  // because no instance is created; hence, there is no field to assign.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the factory constructor
-  // uses a field formal parameter:
-  //
-  // ```dart
-  // class C {
-  //   int? f;
-  //
-  //   factory C([!this.f!]) => throw 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the field formal parameter with a normal parameter:
-  //
-  // ```dart
-  // class C {
-  //   int? f;
-  //
-  //   factory C(int f) => throw 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'FIELD_INITIALIZER_FACTORY_CONSTRUCTOR',
-          "Initializing formal parameters can't be used in factory "
-              "constructors.",
-          correction: "Try using a normal parameter.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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.
-   */
-  static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
-      CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
-          "Initializing formal parameters can only be used in constructors.",
-          correction: "Try using a normal parameter.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a redirecting constructor
-  // initializes a field in the object. This isn't allowed because the instance
-  // that has the field hasn't been created at the point at which it should be
-  // initialized.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constructor
-  // `C.zero`, which redirects to the constructor `C`, has a field formal
-  // parameter that initializes the field `f`:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  //
-  //   C.zero([!this.f!]) : this(f);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the constructor
-  // `C.zero`, which redirects to the constructor `C`, has an initializer that
-  // initializes the field `f`:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  //
-  //   C.zero() : [!f = 0!], this(1);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the initialization is done by a field formal parameter, then use a
-  // normal parameter:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  //
-  //   C.zero(int f) : this(f);
-  // }
-  // ```
-  //
-  // If the initialization is done in an initializer, then remove the
-  // initializer:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  //
-  //   C.zero() : this(0);
-  // }
-  // ```
-  static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
-      CompileTimeErrorCode('FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR',
-          "The redirecting constructor can't have a field initializer.",
-          correction:
-              "Try initializing the field in the constructor being redirected "
-              "to.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the type of the field formal parameter
-   * 1: the name of the type of the field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of a field formal
-  // parameter isn't assignable to the type of the field being initialized.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field formal
-  // parameter has the type `String`, but the type of the field is `int`. The
-  // parameter must have a type that is a subtype of the field's type.
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C([!String this.f!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the field is incorrect, then change the type of the field to
-  // match the type of the parameter, and consider removing the type from the
-  // parameter:
-  //
-  // ```dart
-  // class C {
-  //   String f;
-  //
-  //   C(this.f);
-  // }
-  // ```
-  //
-  // If the type of the parameter is incorrect, then remove the type of the
-  // parameter:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(this.f);
-  // }
-  // ```
-  //
-  // If the types of both the field and the parameter are correct, then use an
-  // initializer rather than a field formal parameter to convert the parameter
-  // value into a value of the correct type:
-  //
-  // ```dart
-  // class C {
-  //   int f;
-  //
-  //   C(String s) : f = int.parse(s);
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the field in question
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a final field is initialized
-  // twice: once where it's declared and once by a constructor's parameter.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `f` is
-  // initialized twice:
-  //
-  // ```dart
-  // class C {
-  //   final int f = 0;
-  //
-  //   C(this.[!f!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field should have the same value for all instances, then remove the
-  // initialization in the parameter list:
-  //
-  // ```dart
-  // class C {
-  //   final int f = 0;
-  //
-  //   C();
-  // }
-  // ```
-  //
-  // If the field can have different values in different instances, then remove
-  // the initialization in the declaration:
-  //
-  // ```dart
-  // class C {
-  //   final int f;
-  //
-  //   C(this.f);
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-    "All final variables must be initialized, but '{0}' isn't.",
-    correction: "Try adding an initializer for the field.",
-    hasPublishedDocs: true,
-    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
-  );
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-    "All final variables must be initialized, but '{0}' and '{1}' "
-        "aren't.",
-    correction: "Try adding initializers for the fields.",
-    hasPublishedDocs: true,
-    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
-  );
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-    "All final variables must be initialized, but '{0}', '{1}', and {2} "
-        "others aren't.",
-    correction: "Try adding initializers for the fields.",
-    hasPublishedDocs: true,
-    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
-  );
-
-  /**
-   * 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.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the `Iterable` or `Stream` in a
-  // for-in loop has an element type that can't be assigned to the loop
-  // variable.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `<String>[]` has an
-  // element type of `String`, and `String` can't be assigned to the type of `e`
-  // (`int`):
-  //
-  // ```dart
-  // void f() {
-  //   for (int e in [!<String>[]!]) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the loop variable is correct, then update the type of the
-  // iterable:
-  //
-  // ```dart
-  // void f() {
-  //   for (int e in <int>[]) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // If the type of the iterable is correct, then update the type of the loop
-  // variable:
-  //
-  // ```dart
-  // void f() {
-  //   for (String e in <String>[]) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  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}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the loop variable declared in a
-  // for-in loop is declared to be a `const`. The variable can't be a `const`
-  // because the value can't be computed at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the loop variable `x`
-  // is declared to be a `const`:
-  //
-  // ```dart
-  // void f() {
-  //   for ([!const!] x in [0, 1, 2]) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a type annotation, then remove the `const` modifier from the
-  // declaration.
-  //
-  // If there's no type, then replace the `const` modifier with `final`, `var`,
-  // or a type annotation:
-  //
-  // ```dart
-  // void f() {
-  //   for (final x in [0, 1, 2]) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode FOR_IN_WITH_CONST_VARIABLE =
-      CompileTimeErrorCode('FOR_IN_WITH_CONST_VARIABLE',
-          "A for-in loop variable can't be a 'const'.",
-          correction: "Try removing the 'const' modifier from the variable, or "
-              "use a different variable.",
-          hasPublishedDocs: true);
-
-  /**
-   * It is a compile-time error if a generic function type is used as a bound
-   * for a formal type parameter of a class or a function.
-   */
-  static const CompileTimeErrorCode GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND =
-      CompileTimeErrorCode('GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND',
-          "Generic function types can't be used as type parameter bounds",
-          correction: "Try making the free variable in the function type part "
-              "of the larger declaration signature");
-
-  /**
-   * It is a compile-time error if a generic function type is used as an actual
-   * type argument.
-   */
-  static const CompileTimeErrorCode
-      GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT = CompileTimeErrorCode(
-          'GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT',
-          "A generic function type can't be a type argument.",
-          correction: "Try removing type parameters from the generic function "
-              "type, or using 'dynamic' as the type argument here.");
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC = CompileTimeErrorCode(
-    'GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC',
-    "A method tearoff on a target whose type is 'dynamic' can't have type "
-        "arguments.",
-    correction:
-        "Specify the type of the target, or remove the type arguments from the "
-        "method tearoff.",
-  );
-
-  /**
-   * 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.");
-
-  /**
-   * 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
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the return type of a getter
-  // isn't a subtype of the type of the parameter of a setter with the same
-  // name.
-  //
-  // The subtype relationship is a requirement whether the getter and setter are
-  // in the same class or whether one of them is in a superclass of the other.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the return type of the
-  // getter `x` is `num`, the parameter type of the setter `x` is `int`, and
-  // `num` isn't a subtype of `int`:
-  //
-  // ```dart
-  // class C {
-  //   num get [!x!] => 0;
-  //
-  //   set x(int y) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the getter is correct, then change the type of the setter:
-  //
-  // ```dart
-  // class C {
-  //   num get x => 0;
-  //
-  //   set x(num y) {}
-  // }
-  // ```
-  //
-  // If the type of the setter is correct, then change the type of the getter:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //
-  //   set x(int y) {}
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  static const CompileTimeErrorCode IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as values in "
-              "an if condition inside a const collection literal.",
-          correction: "Try making the deferred import non-deferred.");
-
-  /**
-   * 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 either
-  // `Stream` or a supertype of `Stream`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the
-  // function `f` has the 'async*' modifier even though the return type `int`
-  // isn't a supertype of `Stream`:
-  //
-  // ```dart
-  // [!int!] f() async* {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function should be asynchronous, then change the return type to be
-  // either `Stream` or a supertype of `Stream`:
-  //
-  // ```dart
-  // Stream<int> f() async* {}
-  // ```
-  //
-  // If the function should be synchronous, then remove the `async*` modifier:
-  //
-  // ```dart
-  // int f() => 0;
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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() => 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the body of a function has the
-  // `sync*` modifier even though the return type of the function isn't either
-  // `Iterable` or a supertype of `Iterable`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the
-  // function `f` has the 'sync*' modifier even though the return type `int`
-  // isn't a supertype of `Iterable`:
-  //
-  // ```dart
-  // [!int!] f() sync* {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function should return an iterable, then change the return type to
-  // be either `Iterable` or a supertype of `Iterable`:
-  //
-  // ```dart
-  // Iterable<int> f() sync* {}
-  // ```
-  //
-  // If the function should return a single value, then remove the `sync*`
-  // modifier:
-  //
-  // ```dart
-  // int f() => 0;
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS =
-      CompileTimeErrorCode('SUBTYPE_OF_DEFERRED_CLASS',
-          "Classes and mixins can't implement deferred classes.",
-          correction: "Try specifying a different interface, "
-              "removing the class from the list, or "
-              "changing the import to not be deferred.",
-          hasPublishedDocs: true,
-          uniqueName: 'IMPLEMENTS_DEFERRED_CLASS');
-
-  /**
-   * Parameters:
-   * 0: the name of the disallowed type
-   */
-  static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS =
-      CompileTimeErrorCode(
-    'SUBTYPE_OF_DISALLOWED_TYPE',
-    "Classes and mixins can't implement '{0}'.",
-    correction: "Try specifying a different interface, or "
-        "remove the class from the list.",
-    hasPublishedDocs: true,
-    uniqueName: 'IMPLEMENTS_DISALLOWED_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the interface that was not found
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name used in the `implements`
-  // clause of a class or mixin declaration is defined to be something other
-  // than a class or mixin.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is a variable
-  // rather than a class or mixin:
-  //
-  // ```dart
-  // var x;
-  // class C implements [!x!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name is the name of an existing class or mixin that's already being
-  // imported, then add a prefix to the import so that the local definition of
-  // the name doesn't shadow the imported name.
-  //
-  // If the name is the name of an existing class or mixin that isn't being
-  // imported, then add an import, with a prefix, for the library in which it’s
-  // declared.
-  //
-  // Otherwise, either replace the name in the `implements` clause with the name
-  // of an existing class or mixin, or remove the name from the `implements`
-  // clause.
-  static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = CompileTimeErrorCode(
-      'IMPLEMENTS_NON_CLASS',
-      "Classes and mixins can only implement other classes and mixins.",
-      correction:
-          "Try specifying a class or mixin, or remove the name from the "
-          "list.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the interface that is implemented more than once
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a single class is specified more
-  // than once in an `implements` clause.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `A` is in the list
-  // twice:
-  //
-  // ```dart
-  // class A {}
-  // class B implements A, [!A!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove all except one occurrence of the class name:
-  //
-  // ```dart
-  // class A {}
-  // class B implements A {}
-  // ```
-  static const CompileTimeErrorCode IMPLEMENTS_REPEATED = CompileTimeErrorCode(
-      'IMPLEMENTS_REPEATED', "'{0}' can only be implemented once.",
-      correction: "Try removing all but one occurrence of the class name.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the class that appears in both "extends" and "implements"
-   *    clauses
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when one class is listed in both the
-  // `extends` and `implements` clauses of another class.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `A` is used
-  // in both the `extends` and `implements` clauses for the class `B`:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B extends A implements [!A!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to inherit the implementation from the class, then remove the
-  // class from the `implements` clause:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B extends A {}
-  // ```
-  //
-  // If you don't want to inherit the implementation from the class, then remove
-  // the `extends` clause:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B implements A {}
-  // ```
-  static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS =
-      CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS',
-          "'{0}' can't be used in both the 'extends' and 'implements' clauses.",
-          correction: "Try removing one of the occurrences.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
-          "A type alias that expands to a type parameter can't be implemented.",
-          correction: "Try specifying a class or mixin, or removing the list.",
-          hasPublishedDocs: true,
-          uniqueName: 'IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER');
-
-  /**
-   * Parameters:
-   * 0: the name of the instance member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a reference to an
-  // instance member in a constructor's initializer list.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `defaultX` is an
-  // instance member:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C() : x = [!defaultX!];
-  //
-  //   int get defaultX => 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the member can be made static, then do so:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C() : x = defaultX;
-  //
-  //   static int get defaultX => 0;
-  // }
-  // ```
-  //
-  // If not, then replace the reference in the initializer with a different
-  // expression that doesn't use an instance member:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C() : x = 0;
-  //
-  //   int get defaultX => 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER =
-      CompileTimeErrorCode('IMPLICIT_THIS_REFERENCE_IN_INITIALIZER',
-          "The instance member '{0}' can't be accessed in an initializer.",
-          correction:
-              'Try replacing the reference to the instance member with a '
-              'different expression',
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the uri pointing to a library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an import whose `dart:`
-  // URI references an internal library.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `_interceptors` is an
-  // internal library:
-  //
-  // ```dart
-  // import [!'dart:_interceptors'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the import directive.
-  static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY =
-      CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY',
-          "The library '{0}' is internal and can't be imported.",
-          hasPublishedDocs: true);
-
-  /**
-   * 14.1 Imports: It is a compile-time error if the specified URI of an
-   * immediate import does not refer to a library declaration.
-   *
-   * Parameters:
-   * 0: the uri pointing to a non-library declaration
-   */
-  static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY =
-      CompileTimeErrorCode('IMPORT_OF_NON_LIBRARY',
-          "The imported library '{0}' can't have a part-of directive.",
-          correction: "Try importing the library that the part is a part of.");
-
-  /**
-   * 13.9 Switch: It is a compile-time error if values of the expressions
-   * <i>e<sub>k</sub></i> are not instances of the same class <i>C</i>, for all
-   * <i>1 &lt;= k &lt;= n</i>.
-   *
-   * Parameters:
-   * 0: the expression source code that is the unexpected type
-   * 1: the name of the expected type
-   */
-  static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES =
-      CompileTimeErrorCode('INCONSISTENT_CASE_EXPRESSION_TYPES',
-          "Case expressions must have the same types, '{0}' isn't a '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the instance member with inconsistent inheritance.
-   * 1: the list of all inherited signatures for this member.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class inherits two or more
-  // conflicting signatures for a member and doesn't provide an implementation
-  // that satisfies all the inherited signatures.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `C` is inheriting the
-  // declaration of `m` from `A`, and that implementation isn't consistent with
-  // the signature of `m` that's inherited from `B`:
-  //
-  // ```dart
-  // %language=2.9
-  // class A {
-  //   void m({int a}) {}
-  // }
-  //
-  // class B {
-  //   void m({int b}) {}
-  // }
-  //
-  // class [!C!] extends A implements B {
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an implementation of the method that satisfies all the inherited
-  // signatures:
-  //
-  // ```dart
-  // %language=2.9
-  // class A {
-  //   void m({int a}) {}
-  // }
-  //
-  // class B {
-  //   void m({int b}) {}
-  // }
-  //
-  // class C extends A implements B {
-  //   void m({int a, int b}) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode INCONSISTENT_INHERITANCE =
-      CompileTimeErrorCode('INCONSISTENT_INHERITANCE',
-          "Superinterfaces don't have a valid override for '{0}': {1}.",
-          correction:
-              "Try adding an explicit override that is consistent with all "
-              "of the inherited members.",
-          hasPublishedDocs: true);
-
-  /**
-   * 11.1.1 Inheritance and Overriding. Let `I` be the implicit interface of a
-   * class `C` declared in library `L`. `I` inherits all members of
-   * `inherited(I, L)` and `I` overrides `m'` if `m' ∈ overrides(I, L)`. It is
-   * a compile-time error if `m` is a method and `m'` is a getter, or if `m`
-   * is a getter and `m'` is a method.
-   *
-   * Parameters:
-   * 0: the name of the the instance member with inconsistent inheritance.
-   * 1: the name of the superinterface that declares the name as a getter.
-   * 2: the name of the superinterface that declares the name as a method.
-   */
-  static const CompileTimeErrorCode INCONSISTENT_INHERITANCE_GETTER_AND_METHOD =
-      CompileTimeErrorCode(
-          'INCONSISTENT_INHERITANCE_GETTER_AND_METHOD',
-          "'{0}' is inherited as a getter (from '{1}') and also a "
-              "method (from '{2}').",
-          correction:
-              "Try adjusting the supertypes of this class to remove the "
-              "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
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor initializes a
-  // field that isn't declared in the class containing the constructor.
-  // Constructors can't initialize fields that aren't declared and fields that
-  // are inherited from superclasses.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the initializer is
-  // initializing `x`, but `x` isn't a field in the class:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C() : [!x = 0!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different field should be initialized, then change the name to the
-  // name of the field:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C() : y = 0;
-  // }
-  // ```
-  //
-  // If the field must be declared, then add a declaration:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int x;
-  //   int y;
-  //
-  //   C() : x = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTENT_FIELD =
-      CompileTimeErrorCode('INITIALIZER_FOR_NON_EXISTENT_FIELD',
-          "'{0}' isn't a field in the enclosing class.",
-          correction: "Try correcting the name to match an existing field, or "
-              "defining a field named '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the initializing formal that is a static variable in the
-   *    immediately enclosing class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a static field is initialized in
-  // a constructor using either a field formal parameter or an assignment in the
-  // initializer list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the static field `a` is
-  // being initialized by the field formal parameter `this.a`:
-  //
-  // ```dart
-  // class C {
-  //   static int? a;
-  //   C([!this.a!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field should be an instance field, then remove the keyword `static`:
-  //
-  // ```dart
-  // class C {
-  //   int? a;
-  //   C(this.a);
-  // }
-  // ```
-  //
-  // If you intended to initialize an instance field and typed the wrong name,
-  // then correct the name of the field being initialized:
-  //
-  // ```dart
-  // class C {
-  //   static int? a;
-  //   int? b;
-  //   C(this.b);
-  // }
-  // ```
-  //
-  // If you really want to initialize the static field, then move the
-  // initialization into the constructor body:
-  //
-  // ```dart
-  // class C {
-  //   static int? a;
-  //   C(int? c) {
-  //     a = c;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD =
-      CompileTimeErrorCode(
-          'INITIALIZER_FOR_STATIC_FIELD',
-          "'{0}' is a static field in the enclosing class. Fields initialized "
-              "in a constructor can't be static.",
-          correction: "Try removing the initialization.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the initializing formal that is not an instance variable in
-   *    the immediately enclosing class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a field formal parameter is
-  // found in a constructor in a class that doesn't declare the field being
-  // initialized. Constructors can't initialize fields that aren't declared and
-  // fields that are inherited from superclasses.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field `x` isn't
-  // defined:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C([!this.x!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field name was wrong, then change it to the name of an existing
-  // field:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C(this.y);
-  // }
-  // ```
-  //
-  // If the field name is correct but hasn't yet been defined, then declare the
-  // field:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int x;
-  //   int y;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // If the parameter is needed but shouldn't initialize a field, then convert
-  // it to a normal parameter and use it:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C(int x) : y = x * 2;
-  // }
-  // ```
-  //
-  // If the parameter isn't needed, then remove it:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int y;
-  //
-  //   C();
-  // }
-  // ```
-  static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD =
-      CompileTimeErrorCode('INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD',
-          "'{0}' isn't a field in the enclosing class.",
-          correction: "Try correcting the name to match an existing field, or "
-              "defining a field named '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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
-  //
-  // The analyzer produces this diagnostic when a factory constructor contains
-  // an unqualified reference to an instance member. In a generative
-  // constructor, the instance of the class is created and initialized before
-  // the body of the constructor is executed, so the instance can be bound to
-  // `this` and accessed just like it would be in an instance method. But, in a
-  // factory constructor, the instance isn't created before executing the body,
-  // so `this` can't be used to reference it.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` isn't in scope in
-  // the factory constructor:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //   factory C() {
-  //     return C._([!x!]);
-  //   }
-  //   C._(this.x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rewrite the code so that it doesn't reference the instance member:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //   factory C() {
-  //     return C._(0);
-  //   }
-  //   C._(this.x);
-  // }
-  // ```
-  static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY =
-      CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_FACTORY',
-          "Instance members can't be accessed from a factory constructor.",
-          correction: "Try removing the reference to the instance member.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a static method contains an
-  // unqualified reference to an instance member.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the instance field `x`
-  // is being referenced in a static method:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int x;
-  //
-  //   static int m() {
-  //     return [!x!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the method must reference the instance member, then it can't be static,
-  // so remove the keyword:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int x;
-  //
-  //   int m() {
-  //     return x;
-  //   }
-  // }
-  // ```
-  //
-  // If the method can't be made an instance method, then add a parameter so
-  // that an instance of the class can be passed in:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   int x;
-  //
-  //   static int m(C c) {
-  //     return c.x;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC =
-      CompileTimeErrorCode('INSTANCE_MEMBER_ACCESS_FROM_STATIC',
-          "Instance members can't be accessed from a static method.",
-          correction: "Try removing the reference to the instance member, or "
-              "removing the keyword 'static' from the method.",
-          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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an enum is instantiated. It's
-  // invalid to create an instance of an enum by invoking a constructor; only
-  // the instances named in the declaration of the enum can exist.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the enum `E` is being
-  // instantiated:
-  //
-  // ```dart
-  // enum E {a}
-  //
-  // var e = [!E!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intend to use an instance of the enum, then reference one of the
-  // constants defined in the enum:
-  //
-  // ```dart
-  // enum E {a}
-  //
-  // var e = E.a;
-  // ```
-  //
-  // If you intend to use an instance of a class, then use the name of that class in place of the name of the enum.
-  static const CompileTimeErrorCode INSTANTIATE_ENUM = CompileTimeErrorCode(
-      'INSTANTIATE_ENUM', "Enums can't be instantiated.",
-      correction: "Try using one of the defined constants.",
-      hasPublishedDocs: true);
-
-  /**
-   * It is a compile-time error for an instance creation `C<T1, .. Tk>(...)` or
-   * `C<T1, .. Tk>.name()` (where `k` may be zero, which means that the type
-   * argument list is absent) if `C` denotes a type alias that expands to a
-   * type variable.
-   */
-  static const CompileTimeErrorCode
-      INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
-          "Type aliases that expand to a type parameter can't be instantiated.",
-          correction: "Try replacing it with a class.");
-
-  /**
-   * Parameters:
-   * 0: the lexeme of the integer
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an integer literal is being
-  // implicitly converted to a double, but can't be represented as a 64-bit
-  // double without overflow or loss of precision. Integer literals are
-  // implicitly converted to a double if the context requires the type `double`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the integer value
-  // `9223372036854775807` can't be represented exactly as a double:
-  //
-  // ```dart
-  // double x = [!9223372036854775807!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to use the exact value, then use the class `BigInt` to
-  // represent the value:
-  //
-  // ```dart
-  // var x = BigInt.parse('9223372036854775807');
-  // ```
-  //
-  // If you need to use a double, then change the value to one that can be
-  // represented exactly:
-  //
-  // ```dart
-  // double x = 9223372036854775808;
-  // ```
-  static const CompileTimeErrorCode INTEGER_LITERAL_IMPRECISE_AS_DOUBLE =
-      CompileTimeErrorCode(
-          'INTEGER_LITERAL_IMPRECISE_AS_DOUBLE',
-          "The integer literal is being used as a double, but can't be "
-              "represented as a 64-bit double without overflow or loss of "
-              "precision: '{0}'.",
-          correction:
-              "Try using the class 'BigInt', or switch to the closest valid "
-              "double: '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an integer literal has a value
-  // that is too large (positive) or too small (negative) to be represented in a
-  // 64-bit word.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the value can't be
-  // represented in 64 bits:
-  //
-  // ```dart
-  // var x = [!9223372036854775810!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to represent the current value, then wrap it in an instance of
-  // the class `BigInt`:
-  //
-  // ```dart
-  // var x = BigInt.parse('9223372036854775810');
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an annotation is found that is
-  // using something that is neither a variable marked as `const` or the
-  // invocation of a `const` constructor.
-  //
-  // Getters can't be used as annotations.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the variable `v` isn't
-  // a `const` variable:
-  //
-  // ```dart
-  // var v = 0;
-  //
-  // [!@v!]
-  // void f() {
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `f` isn't a variable:
-  //
-  // ```dart
-  // [!@f!]
-  // void f() {
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `f` isn't a
-  // constructor:
-  //
-  // ```dart
-  // [!@f()!]
-  // void f() {
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `g` is a getter:
-  //
-  // ```dart
-  // [!@g!]
-  // int get g => 0;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the annotation is referencing a variable that isn't a `const`
-  // constructor, add the keyword `const` to the variable's declaration:
-  //
-  // ```dart
-  // const v = 0;
-  //
-  // @v
-  // void f() {
-  // }
-  // ```
-  //
-  // If the annotation isn't referencing a variable, then remove it:
-  //
-  // ```dart
-  // int v = 0;
-  //
-  // void f() {
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_ANNOTATION = CompileTimeErrorCode(
-      'INVALID_ANNOTATION',
-      "Annotation must be either a const variable reference or const "
-          "constructor invocation.",
-      hasPublishedDocs: true);
-
-  static const CompileTimeErrorCode
-      INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used in annotations.",
-          correction: "Try moving the constant from the deferred library,"
-              " or removing 'deferred' from the import.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constant from a library that
-  // is imported using a deferred import is used as an annotation. Annotations
-  // are evaluated at compile time, and constants from deferred libraries aren't
-  // available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constant `pi` is
-  // being used as an annotation when the library `dart:math` is imported as
-  // `deferred`:
-  //
-  // ```dart
-  // import 'dart:math' deferred as math;
-  //
-  // @[!math.pi!]
-  // void f() {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the constant as an annotation, then remove the
-  // keyword `deferred` from the import:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // @math.pi
-  // void f() {}
-  // ```
-  //
-  // If you can use a different constant as an annotation, then replace the
-  // annotation with a different constant:
-  //
-  // ```dart
-  // @deprecated
-  // void f() {}
-  // ```
-  static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as "
-              "annotations.",
-          correction: "Try removing the annotation, or "
-              "changing the import to not be deferred.",
-          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 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.
-   *
-   * See TODOs in ConstantVisitor
-   */
-  static const CompileTimeErrorCode INVALID_CONSTANT =
-      CompileTimeErrorCode('INVALID_CONSTANT', "Invalid constant value.");
-
-  /**
-   * 7.6 Constructors: It is a compile-time error if the name of a constructor
-   * is not a constructor name.
-   */
-  static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME =
-      CompileTimeErrorCode(
-          'INVALID_CONSTRUCTOR_NAME', "Invalid constructor name.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override doesn't
-  // have exactly one argument. The argument is the expression used to compute
-  // the value of `this` within the extension method, so there must be one
-  // argument.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there are no arguments:
-  //
-  // ```dart
-  // extension E on String {
-  //   String join(String other) => '$this $other';
-  // }
-  //
-  // void f() {
-  //   E[!()!].join('b');
-  // }
-  // ```
-  //
-  // And, the following code produces this diagnostic because there's more than
-  // one argument:
-  //
-  // ```dart
-  // extension E on String {
-  //   String join(String other) => '$this $other';
-  // }
-  //
-  // void f() {
-  //   E[!('a', 'b')!].join('c');
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Provide one argument for the extension override:
-  //
-  // ```dart
-  // extension E on String {
-  //   String join(String other) => '$this $other';
-  // }
-  //
-  // void f() {
-  //   E('a').join('b');
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_EXTENSION_ARGUMENT_COUNT =
-      CompileTimeErrorCode(
-          'INVALID_EXTENSION_ARGUMENT_COUNT',
-          "Extension overrides must have exactly one argument: "
-              "the value of 'this' in the extension method.",
-          correction: "Try specifying exactly one argument.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a factory
-  // constructor isn't the same as the name of the surrounding class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name of the factory
-  // constructor (`A`) isn't the same as the surrounding class (`C`):
-  //
-  // ```dart
-  // class A {}
-  //
-  // class C {
-  //   factory [!A!]() => throw 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the factory returns an instance of the surrounding class, then rename
-  // the factory:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class C {
-  //   factory C() => throw 0;
-  // }
-  // ```
-  //
-  // If the factory returns an instance of a different class, then move the
-  // factory to that class:
-  //
-  // ```dart
-  // class A {
-  //   factory A() => throw 0;
-  // }
-  //
-  // class C {}
-  // ```
-  //
-  // If the factory returns an instance of a different class, but you can't
-  // modify that class or don't want to move the factory, then convert it to be
-  // a static method:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class C {
-  //   static A a() => throw 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS =
-      CompileTimeErrorCode(
-          'INVALID_FACTORY_NAME_NOT_A_CLASS',
-          "The name of a factory constructor must be the same as the name of "
-              "the immediately enclosing class.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the declared member that is not a valid override.
-   * 1: the name of the interface that declares the member.
-   * 2: the type of the declared member in the interface.
-   * 3. the name of the interface with the overridden member.
-   * 4. the type of the overridden member.
-   *
-   * These parameters must be kept in sync with those of
-   * [CompileTimeErrorCode.INVALID_OVERRIDE].
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when all of the following are true:
-  //
-  // - A class defines an abstract member.
-  // - There is a concrete implementation of that member in a superclass.
-  // - The concrete implementation isn't a valid implementation of the abstract
-  //   method.
-  //
-  // The concrete implementation can be invalid because of incompatibilities in
-  // either the return type, the types of parameters, or the type variables.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the method `A.add` has
-  // a parameter of type `int`, and the overriding method `B.add` has a
-  // corresponding parameter of type `num`:
-  //
-  // ```dart
-  // class A {
-  //   int add(int a) => a;
-  // }
-  // class [!B!] extends A {
-  //   int add(num a);
-  // }
-  // ```
-  //
-  // This is a problem because in an invocation of `B.add` like the following:
-  //
-  // ```dart
-  // void f(B b) {
-  //   b.add(3.4);
-  // }
-  // ```
-  //
-  // `B.add` is expecting to be able to take, for example, a `double`, but when
-  // the method `A.add` is executed (because it's the only concrete
-  // implementation of `add`), a runtime exception will be thrown because a
-  // `double` can't be assigned to a parameter of type `int`.
-  //
-  // #### Common fixes
-  //
-  // If the method in the subclass can conform to the implementation in the
-  // superclass, then change the declaration in the subclass (or remove it if
-  // it's the same):
-  //
-  // ```dart
-  // class A {
-  //   int add(int a) => a;
-  // }
-  // class B	extends A {
-  //   int add(int a);
-  // }
-  // ```
-  //
-  // If the method in the superclass can be generalized to be a valid
-  // implementation of the method in the subclass, then change the superclass
-  // method:
-  //
-  // ```dart
-  // class A {
-  //   int add(num a) => a.floor();
-  // }
-  // class B	extends A {
-  //   int add(num a);
-  // }
-  // ```
-  //
-  // If neither the method in the superclass nor the method in the subclass can
-  // be changed, then provide a concrete implementation of the method in the
-  // subclass:
-  //
-  // ```dart
-  // class A {
-  //   int add(int a) => a;
-  // }
-  // class B	extends A {
-  //   int add(num a) => a.floor();
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_IMPLEMENTATION_OVERRIDE =
-      CompileTimeErrorCode(
-          'INVALID_IMPLEMENTATION_OVERRIDE',
-          "'{1}.{0}' ('{2}') isn't a valid concrete implementation of "
-              "'{3}.{0}' ('{4}').",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a generic function type has a
-  // function-valued parameter that is written using the older inline function
-  // type syntax.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the parameter `f`, in
-  // the generic function type used to define `F`, uses the inline function
-  // type syntax:
-  //
-  // ```dart
-  // typedef F = int Function(int f[!(!]String s));
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use the generic function syntax for the parameter's type:
-  //
-  // ```dart
-  // typedef F = int Function(int Function(String));
-  // ```
-  static const CompileTimeErrorCode INVALID_INLINE_FUNCTION_TYPE =
-      CompileTimeErrorCode(
-          'INVALID_INLINE_FUNCTION_TYPE',
-          "Inline function types can't be used for parameters in a generic "
-              "function type.",
-          correction: "Try using a generic function type "
-              "(returnType 'Function(' parameters ')').",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the invalid modifier
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the body of a constructor is
-  // prefixed by one of the following modifiers: `async`, `async*`, or `sync*`.
-  // Constructor bodies must be synchronous.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the
-  // constructor for `C` is marked as being `async`:
-  //
-  // ```dart
-  // class C {
-  //   C() [!async!] {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the constructor can be synchronous, then remove the modifier:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  // }
-  // ```
-  //
-  // If the constructor can't be synchronous, then use a static method to create
-  // the instance instead:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  //   static Future<C> c() async {
-  //     return C();
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_MODIFIER_ON_CONSTRUCTOR =
-      CompileTimeErrorCode('INVALID_MODIFIER_ON_CONSTRUCTOR',
-          "The modifier '{0}' can't be applied to the body of a constructor.",
-          correction: "Try removing the modifier.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the invalid modifier
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the body of a setter is prefixed
-  // by one of the following modifiers: `async`, `async*`, or `sync*`. Setter
-  // bodies must be synchronous.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the setter
-  // `x` is marked as being `async`:
-  //
-  // ```dart
-  // class C {
-  //   set x(int i) [!async!] {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the setter can be synchronous, then remove the modifier:
-  //
-  // ```dart
-  // class C {
-  //   set x(int i) {}
-  // }
-  // ```
-  //
-  // If the setter can't be synchronous, then use a method to set the value
-  // instead:
-  //
-  // ```dart
-  // class C {
-  //   void x(int i) async {}
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_MODIFIER_ON_SETTER =
-      CompileTimeErrorCode('INVALID_MODIFIER_ON_SETTER',
-          "The modifier '{0}' can't be applied to the body of a setter.",
-          correction: "Try removing the modifier.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the declared member that is not a valid override.
-   * 1: the name of the interface that declares the member.
-   * 2: the type of the declared member in the interface.
-   * 3. the name of the interface with the overridden member.
-   * 4. the type of the overridden member.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a member of a class is found
-  // that overrides a member from a supertype and the override isn't valid. An
-  // override is valid if all of these are true:
-  // * It allows all of the arguments allowed by the overridden member.
-  // * It doesn't require any arguments that aren't required by the overridden
-  //   member.
-  // * The type of every parameter of the overridden member is assignable to the
-  //   corresponding parameter of the override.
-  // * The return type of the override is assignable to the return type of the
-  //   overridden member.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the type of the
-  // parameter `s` (`String`) isn't assignable to the type of the parameter `i`
-  // (`int`):
-  //
-  // ```dart
-  // class A {
-  //   void m(int i) {}
-  // }
-  //
-  // class B extends A {
-  //   void [!m!](String s) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the invalid method is intended to override the method from the
-  // superclass, then change it to conform:
-  //
-  // ```dart
-  // class A {
-  //   void m(int i) {}
-  // }
-  //
-  // class B extends A {
-  //   void m(int i) {}
-  // }
-  // ```
-  //
-  // If it isn't intended to override the method from the superclass, then
-  // rename it:
-  //
-  // ```dart
-  // class A {
-  //   void m(int i) {}
-  // }
-  //
-  // class B extends A {
-  //   void m2(String s) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_OVERRIDE = CompileTimeErrorCode(
-      'INVALID_OVERRIDE',
-      "'{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when `this` is used outside of an
-  // instance method or a generative constructor. The reserved word `this` is
-  // only defined in the context of an instance method or a generative
-  // constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `v` is a top-level
-  // variable:
-  //
-  // ```dart
-  // C f() => [!this!];
-  //
-  // class C {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use a variable of the appropriate type in place of `this`, declaring it if
-  // necessary:
-  //
-  // ```dart
-  // C f(C c) => c;
-  //
-  // class C {}
-  // ```
-  static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS =
-      CompileTimeErrorCode('INVALID_REFERENCE_TO_THIS',
-          "Invalid reference to 'this' expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the initializer list of a
-  // constructor contains an invocation of a constructor in the superclass, but
-  // the invocation isn't the last item in the initializer list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the invocation of the
-  // superclass' constructor isn't the last item in the initializer list:
-  //
-  // ```dart
-  // class A {
-  //   A(int x);
-  // }
-  //
-  // class B extends A {
-  //   B(int x) : [!super!](x), assert(x >= 0);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Move the invocation of the superclass' constructor to the end of the
-  // initializer list:
-  //
-  // ```dart
-  // class A {
-  //   A(int x);
-  // }
-  //
-  // class B extends A {
-  //   B(int x) : assert(x >= 0), super(x);
-  // }
-  // ```
-  static const CompileTimeErrorCode INVALID_SUPER_INVOCATION =
-      CompileTimeErrorCode('INVALID_SUPER_INVOCATION',
-          "The superclass call must be last in an initializer list: '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the type parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type parameter is used as a
-  // type argument in a list, map, or set literal that is prefixed by `const`.
-  // This isn't allowed because the value of the type parameter (the actual type
-  // that will be used at runtime) can't be known at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // is being used as a type argument when creating a constant list:
-  //
-  // ```dart
-  // List<T> newList<T>() => const <[!T!]>[];
-  // ```
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // is being used as a type argument when creating a constant map:
-  //
-  // ```dart
-  // Map<String, T> newSet<T>() => const <String, [!T!]>{};
-  // ```
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // is being used as a type argument when creating a constant set:
-  //
-  // ```dart
-  // Set<T> newSet<T>() => const <[!T!]>{};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type that will be used for the type parameter can be known at
-  // compile time, then remove the type parameter:
-  //
-  // ```dart
-  // List<int> newList() => const <int>[];
-  // ```
-  //
-  // If the type that will be used for the type parameter can't be known until
-  // runtime, then remove the keyword `const`:
-  //
-  // ```dart
-  // List<T> newList<T>() => <T>[];
-  // ```
-  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST =
-      CompileTimeErrorCode(
-    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
-    "Constant list literals can't include a type parameter as a type "
-        "argument, such as '{0}'.",
-    correction: "Try replacing the type parameter with a different type.",
-    hasPublishedDocs: true,
-    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_LIST',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type parameter
-   */
-  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP =
-      CompileTimeErrorCode(
-    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
-    "Constant map literals can't include a type parameter as a type "
-        "argument, such as '{0}'.",
-    correction: "Try replacing the type parameter with a different type.",
-    hasPublishedDocs: true,
-    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type parameter
-   */
-  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_SET =
-      CompileTimeErrorCode(
-    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
-    "Constant set literals can't include a type parameter as a type "
-        "argument, such as '{0}'.",
-    correction: "Try replacing the type parameter with a different type.",
-    hasPublishedDocs: true,
-    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_SET',
-  );
-
-  /**
-   * Parameters:
-   * 0: the URI that is invalid
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a URI in a directive doesn't
-  // conform to the syntax of a valid URI.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `'#'` isn't a valid
-  // URI:
-  //
-  // ```dart
-  // import [!'#'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the invalid URI with a valid URI.
-  static const CompileTimeErrorCode INVALID_URI = CompileTimeErrorCode(
-      'INVALID_URI', "Invalid URI syntax: '{0}'.",
-      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 dereferenced.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` will always be
-  // `null`:
-  //
-  // ```dart
-  // 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
-  // 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
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is used to
-  // invoke a function but the extension doesn't declare a `call` method.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't define a `call` method:
-  //
-  // ```dart
-  // extension E on String {}
-  //
-  // void f() {
-  //   [!E('')!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the extension is intended to define a `call` method, then declare it:
-  //
-  // ```dart
-  // extension E on String {
-  //   int call() => 0;
-  // }
-  //
-  // void f() {
-  //   E('')();
-  // }
-  // ```
-  //
-  // If the extended type defines a `call` method, then remove the extension
-  // override.
-  //
-  // If the `call` method isn't defined, then rewrite the code so that it
-  // doesn't invoke the `call` method.
-  static const CompileTimeErrorCode INVOCATION_OF_EXTENSION_WITHOUT_CALL =
-      CompileTimeErrorCode(
-          'INVOCATION_OF_EXTENSION_WITHOUT_CALL',
-          "The extension '{0}' doesn't define a 'call' method so the override "
-              "can't be used in an invocation.",
-          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);
-
-  /**
-   * Parameters:
-   * 0: the name of the unresolvable label
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `break` or `continue`
-  // statement references a label that is declared in a method or function
-  // containing the function in which the `break` or `continue` statement
-  // appears. The `break` and `continue` statements can't be used to transfer
-  // control outside the function that contains them.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the label `loop` is
-  // declared outside the local function `g`:
-  //
-  // ```dart
-  // void f() {
-  //   loop:
-  //   while (true) {
-  //     void g() {
-  //       break [!loop!];
-  //     }
-  //
-  //     g();
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Try rewriting the code so that it isn't necessary to transfer control
-  // outside the local function, possibly by inlining the local function:
-  //
-  // ```dart
-  // void f() {
-  //   loop:
-  //   while (true) {
-  //     break loop;
-  //   }
-  // }
-  // ```
-  //
-  // If that isn't possible, then try rewriting the local function so that a
-  // value returned by the function can be used to determine whether control is
-  // transferred:
-  //
-  // ```dart
-  // void f() {
-  //   loop:
-  //   while (true) {
-  //     bool g() {
-  //       return true;
-  //     }
-  //
-  //     if (g()) {
-  //       break loop;
-  //     }
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = CompileTimeErrorCode(
-      'LABEL_IN_OUTER_SCOPE',
-      "Can't reference label '{0}' declared in an outer method.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the unresolvable label
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a reference to a label
-  // that isn't defined in the scope of the `break` or `continue` statement that
-  // is referencing it.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the label `loop` isn't
-  // defined anywhere:
-  //
-  // ```dart
-  // void f() {
-  //   for (int i = 0; i < 10; i++) {
-  //     for (int j = 0; j < 10; j++) {
-  //       break [!loop!];
-  //     }
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the label should be on the innermost enclosing `do`, `for`, `switch`, or
-  // `while` statement, then remove the label:
-  //
-  // ```dart
-  // void f() {
-  //   for (int i = 0; i < 10; i++) {
-  //     for (int j = 0; j < 10; j++) {
-  //       break;
-  //     }
-  //   }
-  // }
-  // ```
-  //
-  // If the label should be on some other statement, then add the label:
-  //
-  // ```dart
-  // void f() {
-  //   loop: for (int i = 0; i < 10; i++) {
-  //     for (int j = 0; j < 10; j++) {
-  //       break loop;
-  //     }
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode LABEL_UNDEFINED = CompileTimeErrorCode(
-      'LABEL_UNDEFINED', "Can't reference an undefined label '{0}'.",
-      correction: "Try defining the label, or "
-          "correcting the name to match an existing label.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class that has at least one
-  // `const` constructor also has a field marked both `late` and `final`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `A` has a
-  // `const` constructor and the `final` field `f` is marked as `late`:
-  //
-  // ```dart
-  // class A {
-  //   [!late!] final int f;
-  //
-  //   const A();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field doesn't need to be marked `late`, then remove the `late`
-  // modifier from the field:
-  //
-  // ```dart
-  // class A {
-  //   final int f = 0;
-  //
-  //   const A();
-  // }
-  // ```
-  //
-  // If the field must be marked `late`, then remove the `const` modifier from
-  // the constructors:
-  //
-  // ```dart
-  // class A {
-  //   late final int f;
-  //
-  //   A();
-  // }
-  // ```
-  static const CompileTimeErrorCode LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR',
-          "Can't have a late final field in a class with a generative "
-              "const constructor.",
-          correction: "Try removing the 'late' modifier, or don't declare "
-              "'const' constructors.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the analyzer can prove that a
-  // local variable marked as both `late` and `final` was already assigned a
-  // value at the point where another assignment occurs.
-  //
-  // Because `final` variables can only be assigned once, subsequent assignments
-  // are guaranteed to fail, so they're flagged.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the `final` variable
-  // `v` is assigned a value in two places:
-  //
-  // ```dart
-  // int f() {
-  //   late final int v;
-  //   v = 0;
-  //   [!v!] += 1;
-  //   return v;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to be able to reassign the variable, then remove the `final`
-  // keyword:
-  //
-  // ```dart
-  // int f() {
-  //   late int v;
-  //   v = 0;
-  //   v += 1;
-  //   return v;
-  // }
-  // ```
-  //
-  // If you don't need to reassign the variable, then remove all except the
-  // first of the assignments:
-  //
-  // ```dart
-  // int f() {
-  //   late final int v;
-  //   v = 0;
-  //   return v;
-  // }
-  // ```
-  static const CompileTimeErrorCode LATE_FINAL_LOCAL_ALREADY_ASSIGNED =
-      CompileTimeErrorCode('LATE_FINAL_LOCAL_ALREADY_ASSIGNED',
-          "The late final local variable is already assigned.",
-          correction: "Try removing the 'final' modifier, or don't reassign "
-              "the value.",
-          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 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);
-
-  /**
-   * Parameters:
-   * 0: the name of the macro
-   * 1: the message
-   */
-  static const CompileTimeErrorCode MACRO_EXECUTION_ERROR =
-      CompileTimeErrorCode(
-          'MACRO_EXECUTION_ERROR', "Exception thrown by macro {0}: {1}");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the first positional parameter
-  // of a function named `main` isn't a supertype of `List<String>`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `List<int>` isn't a
-  // supertype of `List<String>`:
-  //
-  // ```dart
-  // void main([!List<int>!] args) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function is an entry point, then change the type of the first
-  // positional parameter to be a supertype of `List<String>`:
-  //
-  // ```dart
-  // void main(List<String> args) {}
-  // ```
-  //
-  // If the function isn't an entry point, then change the name of the function:
-  //
-  // ```dart
-  // void f(List<int> args) {}
-  // ```
-  static const CompileTimeErrorCode MAIN_FIRST_POSITIONAL_PARAMETER_TYPE =
-      CompileTimeErrorCode(
-    'MAIN_FIRST_POSITIONAL_PARAMETER_TYPE',
-    "The type of the first positional parameter of the 'main' function must be "
-        "a supertype of 'List<String>'.",
-    correction: "Try changing the type of the parameter.",
-    hasPublishedDocs: true,
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function named `main` has one
-  // or more required named parameters.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the function named
-  // `main` has a required named parameter (`x`):
-  //
-  // ```dart
-  // void [!main!]({required int x}) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function is an entry point, then remove the `required` keyword:
-  //
-  // ```dart
-  // void main({int? x}) {}
-  // ```
-  //
-  // If the function isn't an entry point, then change the name of the function:
-  //
-  // ```dart
-  // void f({required int x}) {}
-  // ```
-  static const CompileTimeErrorCode MAIN_HAS_REQUIRED_NAMED_PARAMETERS =
-      CompileTimeErrorCode('MAIN_HAS_REQUIRED_NAMED_PARAMETERS',
-          "The function 'main' can't have any required named parameters.",
-          correction:
-              "Try using a different name for the function, or removing the "
-              "'required' modifier.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function named `main` has more
-  // than two required positional parameters.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the function `main` has
-  // three required positional parameters:
-  //
-  // ```dart
-  // void [!main!](List<String> args, int x, int y) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function is an entry point and the extra parameters aren't used,
-  // then remove them:
-  //
-  // ```dart
-  // void main(List<String> args, int x) {}
-  // ```
-  //
-  // If the function is an entry point, but the extra parameters used are for
-  // when the function isn't being used as an entry point, then make the extra
-  // parameters optional:
-  //
-  // ```dart
-  // void main(List<String> args, int x, [int y = 0]) {}
-  // ```
-  //
-  // If the function isn't an entry point, then change the name of the function:
-  //
-  // ```dart
-  // void f(List<String> args, int x, int y) {}
-  // ```
-  static const CompileTimeErrorCode
-      MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS = CompileTimeErrorCode(
-          'MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS',
-          "The function 'main' can't have more than two required positional "
-              "parameters.",
-          correction:
-              "Try using a different name for the function, or removing extra "
-              "parameters.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library contains a declaration
-  // of the name `main` that isn't the declaration of a top-level function.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `main` is
-  // being used to declare a top-level variable:
-  //
-  // ```dart
-  // var [!main!] = 3;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use a different name for the declaration:
-  //
-  // ```dart
-  // var mainIndex = 3;
-  // ```
-  static const CompileTimeErrorCode MAIN_IS_NOT_FUNCTION = CompileTimeErrorCode(
-      'MAIN_IS_NOT_FUNCTION',
-      "The declaration named 'main' must be a function.",
-      correction: "Try using a different name for this declaration.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a map entry (a key/value pair)
-  // is found in a set literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the literal has a map
-  // entry even though it's a set literal:
-  //
-  // ```dart
-  // const collection = <String>{[!'a' : 'b'!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended for the collection to be a map, then change the code so
-  // that it is a map. In the previous example, you could do this by adding
-  // another type argument:
-  //
-  // ```dart
-  // const collection = <String, String>{'a' : 'b'};
-  // ```
-  //
-  // In other cases, you might need to change the explicit type from `Set` to
-  // `Map`.
-  //
-  // If you intended for the collection to be a set, then remove the map entry,
-  // possibly by replacing the colon with a comma if both values should be
-  // included in the set:
-  //
-  // ```dart
-  // const collection = <String>{'a', 'b'};
-  // ```
-  static const CompileTimeErrorCode MAP_ENTRY_NOT_IN_MAP = CompileTimeErrorCode(
-      'MAP_ENTRY_NOT_IN_MAP', "Map entries can only be used in a map literal.",
-      correction: "Try converting the collection to a map or removing the map "
-          "entry.",
-      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 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.
-   */
-  static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL =
-      CompileTimeErrorCode(
-          'MISSING_CONST_IN_LIST_LITERAL',
-          "List literals must be prefixed with 'const' when used as a constant "
-              "expression.",
-          correction: "Try adding the keyword 'const' before the literal.");
-
-  /**
-   * 12.1 Constants: A constant expression is ... a constant map literal.
-   */
-  static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL =
-      CompileTimeErrorCode(
-          'MISSING_CONST_IN_MAP_LITERAL',
-          "Map literals must be prefixed with 'const' when used as a constant "
-              "expression.",
-          correction: "Try adding the keyword 'const' before the literal.");
-
-  /**
-   * 12.1 Constants: A constant expression is ... a constant set literal.
-   */
-  static const CompileTimeErrorCode MISSING_CONST_IN_SET_LITERAL =
-      CompileTimeErrorCode(
-          'MISSING_CONST_IN_SET_LITERAL',
-          "Set literals must be prefixed with 'const' when used as a constant "
-              "expression.",
-          correction: "Try adding the keyword 'const' before the literal.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when either the Dart or Flutter SDK
-  // isn’t installed correctly, and, as a result, one of the `dart:` libraries
-  // can't be found.
-  //
-  // #### Common fixes
-  //
-  // Reinstall the Dart or Flutter SDK.
-  static const CompileTimeErrorCode MISSING_DART_LIBRARY = CompileTimeErrorCode(
-      'MISSING_DART_LIBRARY', "Required library '{0}' is missing.",
-      correction: "Re-install the Dart or Flutter SDK.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an optional parameter, whether
-  // 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
-  //
-  // The following code produces this diagnostic because `x` can't be `null`,
-  // and no non-`null` default value is specified:
-  //
-  // ```dart
-  // void f([int [!x!]]) {}
-  // ```
-  //
-  // As does this:
-  //
-  // ```dart
-  // void g({int [!x!]}) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to use `null` to indicate that no value was provided, then you
-  // need to make the type nullable:
-  //
-  // ```dart
-  // void f([int? x]) {}
-  // void g({int? x}) {}
-  // ```
-  //
-  // If the parameter can't be null, then either provide a default value:
-  //
-  // ```dart
-  // void f([int x = 1]) {}
-  // void g({int x = 2}) {}
-  // ```
-  //
-  // or make the parameter a required parameter:
-  //
-  // ```dart
-  // void f(int x) {}
-  // void g({required int x}) {}
-  // ```
-  static const CompileTimeErrorCode MISSING_DEFAULT_VALUE_FOR_PARAMETER =
-      CompileTimeErrorCode(
-          'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
-          "The parameter '{0}' can't have a value of 'null' because of its "
-              "type, but the implicit default value is 'null'.",
-          correction:
-              "Try adding either an explicit non-'null' default value or the "
-              "'required' modifier.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation of a function is
-  // missing a required named parameter.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the invocation of `f`
-  // doesn't include a value for the required named parameter `end`:
-  //
-  // ```dart
-  // void f(int start, {required int end}) {}
-  // void g() {
-  //   [!f!](3);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add a named argument corresponding to the missing required parameter:
-  //
-  // ```dart
-  // void f(int start, {required int end}) {}
-  // void g() {
-  //   f(3, end: 5);
-  // }
-  // ```
-  static const CompileTimeErrorCode MISSING_REQUIRED_ARGUMENT =
-      CompileTimeErrorCode(
-          'MISSING_REQUIRED_ARGUMENT',
-          "The named parameter '{0}' is required, but there's no corresponding "
-              "argument.",
-          correction: "Try adding the required argument.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the super-invoked member
-   * 1: the display name of the type of the super-invoked member in the mixin
-   * 2: the display name of the type of the concrete member in the class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a mixin that invokes a method
-  // using `super` is used in a class where the concrete implementation of that
-  // method has a different signature than the signature defined for that method
-  // by the mixin's `on` type. The reason this is an error is because the
-  // invocation in the mixin might invoke the method in a way that's
-  // incompatible with the method that will actually be executed.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `C` uses the
-  // mixin `M`, the mixin `M` invokes `foo` using `super`, and the abstract
-  // version of `foo` declared in `I` (the mixin's `on` type) doesn't have the
-  // same signature as the concrete version of `foo` declared in `A`:
-  //
-  // ```dart
-  // class I {
-  //   void foo([int? p]) {}
-  // }
-  //
-  // class A {
-  //   void foo(int p) {}
-  // }
-  //
-  // abstract class B extends A implements I {
-  //   @override
-  //   void foo([int? p]);
-  // }
-  //
-  // mixin M on I {
-  //   void bar() {
-  //     super.foo(42);
-  //   }
-  // }
-  //
-  // abstract class C extends B with [!M!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the class doesn't need to use the mixin, then remove it from the `with`
-  // clause:
-  //
-  // ```dart
-  // class I {
-  //   void foo([int? p]) {}
-  // }
-  //
-  // class A {
-  //   void foo(int? p) {}
-  // }
-  //
-  // abstract class B extends A implements I {
-  //   @override
-  //   void foo([int? p]);
-  // }
-  //
-  // mixin M on I {
-  //   void bar() {
-  //     super.foo(42);
-  //   }
-  // }
-  //
-  // abstract class C extends B {}
-  // ```
-  //
-  // If the class needs to use the mixin, then ensure that there's a concrete
-  // implementation of the method that conforms to the signature expected by the
-  // mixin:
-  //
-  // ```dart
-  // class I {
-  //   void foo([int? p]) {}
-  // }
-  //
-  // class A {
-  //   void foo(int? p) {}
-  // }
-  //
-  // abstract class B extends A implements I {
-  //   @override
-  //   void foo([int? p]) {
-  //     super.foo(p);
-  //   }
-  // }
-  //
-  // mixin M on I {
-  //   void bar() {
-  //     super.foo(42);
-  //   }
-  // }
-  //
-  // abstract class C extends B with M {}
-  // ```
-  static const CompileTimeErrorCode
-      MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE =
-      CompileTimeErrorCode(
-          'MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE',
-          "The super-invoked member '{0}' has the type '{1}', and the concrete "
-              "member in the class has the type '{2}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the display name of the member without a concrete implementation
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a [mixin application][] contains
-  // an invocation of a member from its superclass, and there's no concrete
-  // member of that name in the mixin application's superclass.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the mixin `M` contains
-  // the invocation `super.m()`, and the class `A`, which is the superclass of
-  // the [mixin application][] `A+M`, doesn't define a concrete implementation
-  // of `m`:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // mixin M on A {
-  //   void bar() {
-  //     super.m();
-  //   }
-  // }
-  //
-  // abstract class B extends A with [!M!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended to apply the mixin `M` to a different class, one that has a
-  // concrete implementation of `m`, then change the superclass of `B` to that
-  // class:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // mixin M on A {
-  //   void bar() {
-  //     super.m();
-  //   }
-  // }
-  //
-  // class C implements A {
-  //   void m() {}
-  // }
-  //
-  // abstract class B extends C with M {}
-  // ```
-  //
-  // If you need to make `B` a subclass of `A`, then add a concrete
-  // implementation of `m` in `A`:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m() {}
-  // }
-  //
-  // mixin M on A {
-  //   void bar() {
-  //     super.m();
-  //   }
-  // }
-  //
-  // abstract class B extends A with M {}
-  // ```
-  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}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the display name of the mixin
-   * 1: the display name of the superclass
-   * 2: the display name of the type that is not implemented
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a mixin that has a superclass
-  // constraint is used in a [mixin application][] with a superclass that
-  // doesn't implement the required constraint.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the mixin `M` requires
-  //that the class to which it's applied be a subclass of `A`, but `Object`
-  // isn't a subclass of `A`:
-  //
-  // ```dart
-  // class A {}
-  //
-  // mixin M on A {}
-  //
-  // class X = Object with [!M!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to use the mixin, then change the superclass to be either the
-  // same as or a subclass of the superclass constraint:
-  //
-  // ```dart
-  // class A {}
-  //
-  // mixin M on A {}
-  //
-  // class X = A with M;
-  // ```
-  static const CompileTimeErrorCode
-      MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE = CompileTimeErrorCode(
-          'MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE',
-          "'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement "
-              "'{2}'.",
-          correction: "Try extending the class '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the mixin that is invalid
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class is used as a mixin and
-  // the mixed-in class defines a constructor.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `A`, which
-  // defines a constructor, is being used as a mixin:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // class B with [!A!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's possible to convert the class to a mixin, then do so:
-  //
-  // ```dart
-  // mixin A {
-  // }
-  //
-  // class B with A {}
-  // ```
-  //
-  // If the class can't be a mixin and it's possible to remove the constructor,
-  // then do so:
-  //
-  // ```dart
-  // class A {
-  // }
-  //
-  // class B with A {}
-  // ```
-  //
-  // If the class can't be a mixin and you can't remove the constructor, then
-  // try extending or implementing the class rather than mixing it in:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // class B extends A {}
-  // ```
-  static const CompileTimeErrorCode MIXIN_CLASS_DECLARES_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'MIXIN_CLASS_DECLARES_CONSTRUCTOR',
-          "The class '{0}' can't be used as a mixin because it declares a "
-              "constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * The <i>mixinMember</i> production allows the same instance or static
-   * members that a class would allow, but no constructors (for now).
-   */
-  static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'MIXIN_DECLARES_CONSTRUCTOR', "Mixins can't declare constructors.");
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = CompileTimeErrorCode(
-      'SUBTYPE_OF_DEFERRED_CLASS', "Classes can't mixin deferred classes.",
-      correction: "Try changing the import to not be deferred.",
-      hasPublishedDocs: true,
-      uniqueName: 'MIXIN_DEFERRED_CLASS');
-
-  static const CompileTimeErrorCode
-      MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES = CompileTimeErrorCode(
-          'MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES',
-          "Type parameters couldn't be inferred for the mixin '{0}' because "
-              "the base class implements the mixin's supertype constraint "
-              "'{1}' in multiple conflicting ways");
-
-  static const CompileTimeErrorCode MIXIN_INFERENCE_NO_MATCHING_CLASS =
-      CompileTimeErrorCode(
-          'MIXIN_INFERENCE_NO_MATCHING_CLASS',
-          "Type parameters couldn't be inferred for the mixin '{0}' because "
-              "the base class doesn't implement the mixin's supertype "
-              "constraint '{1}'");
-
-  static const CompileTimeErrorCode MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION =
-      CompileTimeErrorCode(
-          'MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION',
-          "Type parameters couldn't be inferred for the mixin '{0}' because "
-              "no type parameter substitution could be found matching the "
-              "mixin's supertype constraints");
-
-  /**
-   * Parameters:
-   * 0: the name of the mixin that is invalid
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class that extends a class
-  // other than `Object` is used as a mixin.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `B`, which
-  // extends `A`, is being used as a mixin by `C`:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B extends A {}
-  //
-  // class C with [!B!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the class being used as a mixin can be changed to extend `Object`, then
-  // change it:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B {}
-  //
-  // class C with B {}
-  // ```
-  //
-  // If the class being used as a mixin can't be changed and the class that's
-  // using it extends `Object`, then extend the class being used as a mixin:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B extends A {}
-  //
-  // class C extends B {}
-  // ```
-  //
-  // If the class doesn't extend `Object` or if you want to be able to mix in
-  // the behavior from `B` in other places, then create a real mixin:
-  //
-  // ```dart
-  // class A {}
-  //
-  // mixin M on A {}
-  //
-  // class B extends A with M {}
-  //
-  // class C extends A with M {}
-  // ```
-  static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT =
-      CompileTimeErrorCode(
-          'MIXIN_INHERITS_FROM_NOT_OBJECT',
-          "The class '{0}' can't be used as a mixin because it extends a class "
-              "other than 'Object'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a mixin is instantiated.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the mixin `M` is being
-  // instantiated:
-  //
-  // ```dart
-  // mixin M {}
-  //
-  // var m = [!M!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intend to use an instance of a class, then use the name of that
-  // class in place of the name of the mixin.
-  static const CompileTimeErrorCode MIXIN_INSTANTIATE = CompileTimeErrorCode(
-      'MIXIN_INSTANTIATE', "Mixins can't be instantiated.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the disallowed type
-   */
-  static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS =
-      CompileTimeErrorCode(
-    'SUBTYPE_OF_DISALLOWED_TYPE',
-    "Classes can't mixin '{0}'.",
-    correction: "Try specifying a different class or mixin, or "
-        "remove the class or mixin from the list.",
-    hasPublishedDocs: true,
-    uniqueName: 'MIXIN_OF_DISALLOWED_CLASS',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name in a `with` clause is
-  // defined to be something other than a mixin or a class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `F` is defined to be a
-  // function type:
-  //
-  // ```dart
-  // typedef F = int Function(String);
-  //
-  // class C with [!F!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the invalid name from the list, possibly replacing it with the name
-  // of the intended mixin or class:
-  //
-  // ```dart
-  // typedef F = int Function(String);
-  //
-  // class C {}
-  // ```
-  static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = CompileTimeErrorCode(
-      'MIXIN_OF_NON_CLASS', "Classes can only mix in mixins and classes.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
-          "A type alias that expands to a type parameter can't be mixed in.",
-          hasPublishedDocs: true,
-          uniqueName: 'MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER');
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
-          "A type alias that expands to a type parameter can't be used as a "
-              "superclass constraint.",
-          hasPublishedDocs: true,
-          uniqueName: 'MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER');
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS = CompileTimeErrorCode(
-          'MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS',
-          "Deferred classes can't be used as super-class constraints.",
-          correction: "Try changing the import to not be deferred.");
-
-  /**
-   * Parameters:
-   * 0: the name of the disallowed type
-   */
-  static const CompileTimeErrorCode
-      MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS = CompileTimeErrorCode(
-    'SUBTYPE_OF_DISALLOWED_TYPE',
-    "''{0}' can't be used as a superclass constraint.",
-    correction: "Try specifying a different super-class constraint, or "
-        "remove the 'on' clause.",
-    hasPublishedDocs: true,
-    uniqueName: 'MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type following the `on`
-  // keyword in a mixin declaration is neither a class nor a mixin.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `F` is neither a class
-  // nor a mixin:
-  //
-  // ```dart
-  // typedef F = void Function();
-  //
-  // mixin M on [!F!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type was intended to be a class but was mistyped, then replace the
-  // name.
-  //
-  // Otherwise, remove the type from the `on` clause.
-  static const CompileTimeErrorCode MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE =
-      CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE',
-          "Only classes and mixins can be used as superclass constraints.",
-          hasPublishedDocs: true);
-
-  /**
-   * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not
-   * denote a class available in the immediately enclosing scope.
-   */
-  static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS =
-      CompileTimeErrorCode('MIXIN_WITH_NON_CLASS_SUPERCLASS',
-          "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.
-   */
-  static const CompileTimeErrorCode
-      MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = CompileTimeErrorCode(
-          'MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
-          "Constructors can have at most one 'this' redirection.",
-          correction: "Try removing all but one of the redirections.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the initializer list of a
-  // constructor contains more than one invocation of a constructor from the
-  // superclass. The initializer list is required to have exactly one such call,
-  // which can either be explicit or implicit.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the initializer list
-  // for `B`’s constructor invokes both the constructor `one` and the
-  // constructor `two` from the superclass `A`:
-  //
-  // ```dart
-  // class A {
-  //   int? x;
-  //   String? s;
-  //   A.one(this.x);
-  //   A.two(this.s);
-  // }
-  //
-  // class B extends A {
-  //   B() : super.one(0), [!super.two('')!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If one of the super constructors will initialize the instance fully, then
-  // remove the other:
-  //
-  // ```dart
-  // class A {
-  //   int? x;
-  //   String? s;
-  //   A.one(this.x);
-  //   A.two(this.s);
-  // }
-  //
-  // class B extends A {
-  //   B() : super.one(0);
-  // }
-  // ```
-  //
-  // If the initialization achieved by one of the super constructors can be
-  // performed in the body of the constructor, then remove its super invocation
-  // and perform the initialization in the body:
-  //
-  // ```dart
-  // class A {
-  //   int? x;
-  //   String? s;
-  //   A.one(this.x);
-  //   A.two(this.s);
-  // }
-  //
-  // class B extends A {
-  //   B() : super.one(0) {
-  //     s = '';
-  //   }
-  // }
-  // ```
-  //
-  // If the initialization can only be performed in a constructor in the
-  // superclass, then either add a new constructor or modify one of the existing
-  // constructors so there's a constructor that allows all the required
-  // initialization to occur in a single call:
-  //
-  // ```dart
-  // class A {
-  //   int? x;
-  //   String? s;
-  //   A.one(this.x);
-  //   A.two(this.s);
-  //   A.three(this.x, this.s);
-  // }
-  //
-  // class B extends A {
-  //   B() : super.three(0, '');
-  // }
-  // ```
-  static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS =
-      CompileTimeErrorCode('MULTIPLE_SUPER_INITIALIZERS',
-          "A constructor can have at most one 'super' initializer.",
-          correction: "Try removing all but one of the 'super' initializers.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-type element
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance creation using
-  // either `new` or `const` specifies a name that isn't defined as a class.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `f` is a function
-  // rather than a class:
-  //
-  // ```dart
-  // int f() => 0;
-  //
-  // void g() {
-  //   new [!f!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a class should be created, then replace the invalid name with the name
-  // of a valid class:
-  //
-  // ```dart
-  // int f() => 0;
-  //
-  // void g() {
-  //   new Object();
-  // }
-  // ```
-  //
-  // If the name is the name of a function and you want that function to be
-  // invoked, then remove the `new` or `const` keyword:
-  //
-  // ```dart
-  // int f() => 0;
-  //
-  // void g() {
-  //   f();
-  // }
-  // ```
-  static const CompileTimeErrorCode NEW_WITH_NON_TYPE = CompileTimeErrorCode(
-    'CREATION_WITH_NON_TYPE',
-    "The name '{0}' isn't a class.",
-    correction: "Try correcting the name to match an existing class.",
-    hasPublishedDocs: true,
-    isUnresolvedIdentifier: true,
-    uniqueName: 'NEW_WITH_NON_TYPE',
-  );
-
-  /**
-   * 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 an unnamed constructor.",
-          correction:
-              "Try using one of the named constructors defined in '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an annotation consists of a
-  // single identifier, but that identifier is the name of a class rather than a
-  // variable. To create an instance of the class, the identifier must be
-  // followed by an argument list.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `C` is a class, and a
-  // class can't be used as an annotation without invoking a `const` constructor
-  // from the class:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // [!@C!]
-  // var x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add the missing argument list:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // @C()
-  // var x;
-  // ```
-  static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS =
-      CompileTimeErrorCode('NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS',
-          "Annotation creation must have arguments.",
-          correction: "Try adding an empty argument list.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the class where override error was detected
-   * 1: the list of candidate signatures which cannot be combined
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there is a method declaration
-  // for which one or more types needs to be inferred, and those types can't be
-  // inferred because none of the overridden methods has a function type that is
-  // a supertype of all the other overridden methods, as specified by
-  // [override inference][].
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the method `m` declared
-  // in the class `C` is missing both the return type and the type of the
-  // parameter `a`, and neither of the missing types can be inferred for it:
-  //
-  // ```dart
-  // abstract class A {
-  //   A m(String a);
-  // }
-  //
-  // abstract class B {
-  //   B m(int a);
-  // }
-  //
-  // abstract class C implements A, B {
-  //   [!m!](a);
-  // }
-  // ```
-  //
-  // In this example, override inference can't be performed because the
-  // overridden methods are incompatible in these ways:
-  // - Neither parameter type (`String` and `int`) is a supertype of the other.
-  // - Neither return type is a subtype of the other.
-  //
-  // #### Common fixes
-  //
-  // If possible, add types to the method in the subclass that are consistent
-  // with the types from all the overridden methods:
-  //
-  // ```dart
-  // abstract class A {
-  //   A m(String a);
-  // }
-  //
-  // abstract class B {
-  //   B m(int a);
-  // }
-  //
-  // abstract class C implements A, B {
-  //   C m(Object a);
-  // }
-  // ```
-  static const CompileTimeErrorCode NO_COMBINED_SUPER_SIGNATURE =
-      CompileTimeErrorCode('NO_COMBINED_SUPER_SIGNATURE',
-          "Can't infer missing types in '{0}' from overridden methods: {1}.",
-          correction: "Try providing explicit types for this method's "
-              "parameters and return type.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the superclass that does not define an implicitly invoked
-   *    constructor
-   */
-  static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT =
-      CompileTimeErrorCode(
-    'NO_DEFAULT_SUPER_CONSTRUCTOR',
-    "The superclass '{0}' doesn't have a zero argument constructor.",
-    correction: "Try declaring a zero argument constructor in '{0}', or "
-        "explicitly invoking a different constructor in '{0}'.",
-    uniqueName: 'NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT',
-  );
-
-  /**
-   * 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.
-   *
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the superclass
-   */
-  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
-   * 1: the name of the subclass that does not contain any explicit constructors
-   */
-  static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT =
-      CompileTimeErrorCode(
-    'NO_DEFAULT_SUPER_CONSTRUCTOR',
-    "The superclass '{0}' doesn't have a zero argument constructor.",
-    correction: "Try declaring a zero argument constructor in '{0}', or "
-        "declaring a constructor in {1} that explicitly invokes a "
-        "constructor in '{0}'.",
-    uniqueName: 'NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT',
-  );
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-    "Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and "
-        "{4} more.",
-    correction: "Try implementing the missing methods, or make the class "
-        "abstract.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS',
-  );
-
-  /**
-   * 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 = CompileTimeErrorCode(
-    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-    "Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'.",
-    correction: "Try implementing the missing methods, or make the class "
-        "abstract.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR',
-  );
-
-  /**
-   * 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 = CompileTimeErrorCode(
-    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-    "Missing concrete implementation of '{0}'.",
-    correction: "Try implementing the missing method, or make the class "
-        "abstract.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE',
-  );
-
-  /**
-   * 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 = CompileTimeErrorCode(
-    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-    "Missing concrete implementations of '{0}', '{1}', and '{2}'.",
-    correction: "Try implementing the missing methods, or make the class "
-        "abstract.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
-  );
-
-  /**
-   * 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 = CompileTimeErrorCode(
-    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-    "Missing concrete implementations of '{0}' and '{1}'.",
-    correction: "Try implementing the missing methods, or make the class "
-        "abstract.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO',
-  );
-
-  /**
-   * 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.
-   */
-  static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT =
-      CompileTimeErrorCode(
-          'NON_CONST_MAP_AS_EXPRESSION_STATEMENT',
-          "A non-constant map or set literal without type arguments can't be "
-              "used as an expression statement.");
-
-  /**
-   * No parameters.
-   */
-  // #### 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.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `j` isn't a constant:
-  //
-  // ```dart
-  // void f(int i, int j) {
-  //   switch (i) {
-  //     case [!j!]:
-  //       // ...
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either make the expression a constant expression, or rewrite the `switch`
-  // statement as a sequence of `if` statements:
-  //
-  // ```dart
-  // void f(int i, int j) {
-  //   if (i == j) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION =
-      CompileTimeErrorCode(
-          'NON_CONSTANT_CASE_EXPRESSION', "Case expressions must be constant.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression in a case clause
-  // references a constant from a library that is imported using a deferred
-  // import. In order for switch statements to be compiled efficiently, the
-  // constants referenced in case clauses need to be available at compile time,
-  // and constants from deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines the constant `zero`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // const zero = 0;
-  // ```
-  //
-  // The following code produces this diagnostic because the library `a.dart` is
-  // imported using a `deferred` import, and the constant `a.zero`, declared in
-  // the imported library, is used in a case clause:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // void f(int x) {
-  //   switch (x) {
-  //     case [!a.zero!]:
-  //       // ...
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the constant from the imported library, then
-  // remove the `deferred` keyword:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // void f(int x) {
-  //   switch (x) {
-  //     case a.zero:
-  //       // ...
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If you need to reference the constant from the imported library and also
-  // need the imported library to be deferred, then rewrite the switch statement
-  // as a sequence of `if` statements:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // void f(int x) {
-  //   if (x == a.zero) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // If you don't need to reference the constant, then replace the case
-  // expression:
-  //
-  // ```dart
-  // void f(int x) {
-  //   switch (x) {
-  //     case 0:
-  //       // ...
-  //       break;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
-          'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as a case "
-              "expression.",
-          correction:
-              "Try re-writing the switch as a series of if statements, or "
-              "changing the import to not be deferred.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an optional parameter, either
-  // named or positional, has a default value that isn't a compile-time
-  // constant.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // var defaultValue = 3;
-  //
-  // void f([int value = [!defaultValue!]]) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the default value can be converted to be a constant, then convert it:
-  //
-  // ```dart
-  // %language=2.9
-  // const defaultValue = 3;
-  //
-  // void f([int value = defaultValue]) {}
-  // ```
-  //
-  // If the default value needs to change over time, then apply the default
-  // value inside the function:
-  //
-  // ```dart
-  // %language=2.9
-  // var defaultValue = 3;
-  //
-  // void f([int value]) {
-  //   value ??= defaultValue;
-  // }
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE =
-      CompileTimeErrorCode('NON_CONSTANT_DEFAULT_VALUE',
-          "The default value of an optional parameter must be constant.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the default value of an optional
-  // parameter uses a constant from a library imported using a deferred import.
-  // Default values need to be available at compile time, and constants from
-  // deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines the constant `zero`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // const zero = 0;
-  // ```
-  //
-  // The following code produces this diagnostic because `zero` is declared in a
-  // library imported using a deferred import:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // void f({int x = [!a.zero!]}) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the constant from the imported library, then
-  // remove the `deferred` keyword:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // void f({int x = a.zero}) {}
-  // ```
-  //
-  // If you don't need to reference the constant, then replace the default
-  // value:
-  //
-  // ```dart
-  // void f({int x = 0}) {}
-  // ```
-  static const CompileTimeErrorCode
-      NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
-          'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as a default "
-              "parameter value.",
-          correction:
-              "Try leaving the default as null and initializing the parameter "
-              "inside the function body.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // 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][]).
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` isn't a constant,
-  // even though it appears in an implicitly constant list literal:
-  //
-  // ```dart
-  // var x = 2;
-  // var y = const <int>[0, 1, [!x!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the list needs to be a constant list, then convert the element to be a
-  // constant. In the example above, you might add the `const` keyword to the
-  // declaration of `x`:
-  //
-  // ```dart
-  // const x = 2;
-  // var y = const <int>[0, 1, x];
-  // ```
-  //
-  // If the expression can't be made a constant, then the list can't be a
-  // constant either, so you must change the code so that the list isn't a
-  // constant. In the example above this means removing the `const` keyword
-  // before the list literal:
-  //
-  // ```dart
-  // var x = 2;
-  // var y = <int>[0, 1, x];
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT =
-      CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT',
-          "The values in a const list literal must be constants.",
-          correction: "Try removing the keyword 'const' from the list literal.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a collection literal that is
-  // either explicitly (because it's prefixed by the `const` keyword) or
-  // implicitly (because it appears in a [constant context][]) a constant
-  // contains a value that is declared in a library that is imported using a
-  // deferred import. Constants are evaluated at compile time, and values from
-  // deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines the constant `zero`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // const zero = 0;
-  // ```
-  //
-  // The following code produces this diagnostic because the constant list
-  // literal contains `a.zero`, which is imported using a `deferred` import:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // var l = const [[!a.zero!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the collection literal isn't required to be constant, then remove the
-  // `const` keyword:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a;
-  //
-  // var l = [a.zero];
-  // ```
-  //
-  // If the collection is required to be constant and the imported constant must
-  // be referenced, then remove the keyword `deferred` from the import:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // var l = const [a.zero];
-  // ```
-  //
-  // If you don't need to reference the constant, then replace it with a
-  // suitable value:
-  //
-  // ```dart
-  // var l = const [0];
-  // ```
-  static const CompileTimeErrorCode
-      NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
-          'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as values in "
-              "a 'const' list literal.",
-          correction: "Try removing the keyword 'const' from the list literal "
-              "or removing the keyword 'deferred' from the import.",
-          hasPublishedDocs: true,
-          uniqueName: 'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY');
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key in a constant map literal
-  // isn't a constant value.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic beause `a` isn't a constant:
-  //
-  // ```dart
-  // var a = 'a';
-  // var m = const {[!a!]: 0};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the map needs to be a constant map, then make the key a constant:
-  //
-  // ```dart
-  // const a = 'a';
-  // var m = const {a: 0};
-  // ```
-  //
-  // If the map doesn't need to be a constant map, then remove the `const`
-  // keyword:
-  //
-  // ```dart
-  // var a = 'a';
-  // var m = {a: 0};
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = CompileTimeErrorCode(
-      'NON_CONSTANT_MAP_KEY',
-      "The keys in a const map literal must be constant.",
-      correction: "Try removing the keyword 'const' from the map literal.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as keys in a "
-              "'const' map literal.",
-          correction:
-              "Try removing the keyword 'const' from the map literal or removing "
-              "the keyword 'deferred' from the import.",
-          hasPublishedDocs: true,
-          uniqueName: 'NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a value in a constant map
-  // literal isn't a constant value.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `a` isn't a constant:
-  //
-  // ```dart
-  // var a = 'a';
-  // var m = const {0: [!a!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the map needs to be a constant map, then make the key a constant:
-  //
-  // ```dart
-  // const a = 'a';
-  // var m = const {0: a};
-  // ```
-  //
-  // If the map doesn't need to be a constant map, then remove the `const`
-  // keyword:
-  //
-  // ```dart
-  // var a = 'a';
-  // var m = {0: a};
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE =
-      CompileTimeErrorCode('NON_CONSTANT_MAP_VALUE',
-          "The values in a const map literal must be constant.",
-          correction: "Try removing the keyword 'const' from the map literal.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
-          'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as values in "
-              "a 'const' map literal.",
-          correction:
-              "Try removing the keyword 'const' from the map literal or removing "
-              "the keyword 'deferred' from the import.",
-          hasPublishedDocs: true,
-          uniqueName: 'NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constant set literal contains
-  // an element that isn't a compile-time constant.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` isn't a constant:
-  //
-  // ```dart
-  // var i = 0;
-  //
-  // var s = const {[!i!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the element can be changed to be a constant, then change it:
-  //
-  // ```dart
-  // const i = 0;
-  //
-  // var s = const {i};
-  // ```
-  //
-  // If the element can't be a constant, then remove the keyword `const`:
-  //
-  // ```dart
-  // var i = 0;
-  //
-  // var s = {i};
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_SET_ELEMENT =
-      CompileTimeErrorCode('NON_CONSTANT_SET_ELEMENT',
-          "The values in a const set literal must be constants.",
-          correction: "Try removing the keyword 'const' from the set literal.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the non-generative constructor
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the initializer list of a
-  // constructor invokes a constructor from the superclass, and the invoked
-  // constructor is a factory constructor. Only a generative constructor can be
-  // invoked in the initializer list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the invocation of the
-  // constructor `super.one()` is invoking a factory constructor:
-  //
-  // ```dart
-  // class A {
-  //   factory A.one() = B;
-  //   A.two();
-  // }
-  //
-  // class B extends A {
-  //   B() : [!super.one()!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the super invocation to invoke a generative constructor:
-  //
-  // ```dart
-  // class A {
-  //   factory A.one() = B;
-  //   A.two();
-  // }
-  //
-  // class B extends A {
-  //   B() : super.two();
-  // }
-  // ```
-  //
-  // If the generative constructor is the unnamed constructor, and if there are
-  // no arguments being passed to it, then you can remove the super invocation.
-  static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'NON_GENERATIVE_CONSTRUCTOR',
-          "The generative constructor '{0}' is expected, but a factory was "
-              "found.",
-          correction:
-              "Try calling a different constructor of the superclass, or "
-              "making the called constructor not be a factory constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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 unnamed constructor of superclass '{0}' (called by the 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.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the body of a factory
-  // constructor is marked with `async`, `async*`, or `sync*`. All constructors,
-  // including factory constructors, are required to return an instance of the
-  // class in which they're declared, not a `Future`, `Stream`, or `Iterator`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the factory
-  // constructor is marked with `async`:
-  //
-  // ```dart
-  // class C {
-  //   factory C() [!async!] {
-  //     return C._();
-  //   }
-  //   C._();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the member must be declared as a factory constructor, then remove the
-  // keyword appearing before the body:
-  //
-  // ```dart
-  // class C {
-  //   factory C() {
-  //     return C._();
-  //   }
-  //   C._();
-  // }
-  // ```
-  //
-  // If the member must return something other than an instance of the enclosing
-  // class, then make the member a static method:
-  //
-  // ```dart
-  // class C {
-  //   static Future<C> m() async {
-  //     return C._();
-  //   }
-  //   C._();
-  // }
-  // ```
-  static const CompileTimeErrorCode NON_SYNC_FACTORY = CompileTimeErrorCode(
-      'NON_SYNC_FACTORY',
-      "Factory bodies can't use 'async', 'async*', or 'sync*'.",
-      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 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
-  // %language=2.9
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on [!f!] {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the name to the type of object that should be caught:
-  //
-  // ```dart
-  // %language=2.9
-  // 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);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a declaration of the operator
-  // `[]=` has a return type other than `void`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the declaration of the
-  // operator `[]=` has a return type of `int`:
-  //
-  // ```dart
-  // class C {
-  //   [!int!] operator []=(int index, int value) => 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the return type to `void`:
-  //
-  // ```dart
-  // class C {
-  //   void operator []=(int index, int value) => 0;
-  // }
-  // ```
-  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'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a setter is defined with a
-  // return type other than `void`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the setter `p` has a
-  // return type of `int`:
-  //
-  // ```dart
-  // class C {
-  //   [!int!] set p(int i) => 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the return type to `void` or omit the return type:
-  //
-  // ```dart
-  // class C {
-  //   set p(int i) => 0;
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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 [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
-  //   the reference based on the specification of [definite assignment][].
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` can't have a value
-  // of `null`, but is referenced before a value was assigned to it:
-  //
-  // ```dart
-  // String f() {
-  //   int x;
-  //   return [!x!].toString();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the assignment to `x`
-  // might not be executed, so it might have a value of `null`:
-  //
-  // ```dart
-  // int g(bool b) {
-  //   int x;
-  //   if (b) {
-  //     x = 1;
-  //   }
-  //   return [!x!] * 2;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the analyzer can't
-  // prove, based on definite assignment analysis, that `x` won't be referenced
-  // without having a value assigned to it:
-  //
-  // ```dart
-  // int h(bool b) {
-  //   int x;
-  //   if (b) {
-  //     x = 1;
-  //   }
-  //   if (b) {
-  //     return [!x!] * 2;
-  //   }
-  //   return 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If `null` is a valid value, then make the variable nullable:
-  //
-  // ```dart
-  // String f() {
-  //   int? x;
-  //   return x!.toString();
-  // }
-  // ```
-  //
-  // If `null` isn’t a valid value, and there's a reasonable default value, then
-  // add an initializer:
-  //
-  // ```dart
-  // int g(bool b) {
-  //   int x = 2;
-  //   if (b) {
-  //     x = 1;
-  //   }
-  //   return x * 2;
-  // }
-  // ```
-  //
-  // Otherwise, ensure that a value was assigned on every possible code path
-  // before the value is accessed:
-  //
-  // ```dart
-  // int g(bool b) {
-  //   int x;
-  //   if (b) {
-  //     x = 1;
-  //   } else {
-  //     x = 2;
-  //   }
-  //   return x * 2;
-  // }
-  // ```
-  //
-  // You can also mark the variable as `late`, which removes the diagnostic, but
-  // if the variable isn't assigned a value before it's accessed, then it
-  // results in an exception being thrown at runtime. This approach should only
-  // be used if you're sure that the variable will always be assigned, even
-  // though the analyzer can't prove it based on definite assignment analysis.
-  //
-  // ```dart
-  // int h(bool b) {
-  //   late int x;
-  //   if (b) {
-  //     x = 1;
-  //   }
-  //   if (b) {
-  //     return x * 2;
-  //   }
-  //   return 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE =
-      CompileTimeErrorCode(
-          'NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE',
-          "The non-nullable local variable '{0}' must be assigned before it "
-              "can be used.",
-          correction: "Try giving it an initializer expression, or ensure that "
-              "it's assigned on every execution path.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the operator that is not a binary operator.
-   */
-  static const CompileTimeErrorCode NOT_BINARY_OPERATOR = CompileTimeErrorCode(
-      'NOT_BINARY_OPERATOR', "'{0}' isn't a binary operator.");
-
-  /**
-   * Parameters:
-   * 0: the expected number of required arguments
-   * 1: the actual number of positional arguments given
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function invocation
-  // has fewer positional arguments than the number of required positional
-  // parameters.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` declares two
-  // required parameters, but only one argument is provided:
-  //
-  // ```dart
-  // void f(int a, int b) {}
-  // void g() {
-  //   f[!(0)!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add arguments corresponding to the remaining parameters:
-  //
-  // ```dart
-  // void f(int a, int b) {}
-  // void g() {
-  //   f(0, 1);
-  // }
-  // ```
-  static const CompileTimeErrorCode NOT_ENOUGH_POSITIONAL_ARGUMENTS =
-      CompileTimeErrorCode('NOT_ENOUGH_POSITIONAL_ARGUMENTS',
-          "{0} positional argument(s) expected, but {1} found.",
-          correction: "Try adding the missing arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the field that is not initialized
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a field is declared and has all
-  // these characteristics:
-  // - Has a type that's [potentially non-nullable][]
-  // - Doesn't have an initializer
-  // - Isn't marked as `late`
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` is implicitly
-  // initialized to `null` when it isn't allowed to be `null`:
-  //
-  // ```dart
-  // class C {
-  //   int [!x!];
-  // }
-  // ```
-  //
-  // Similarly, the following code produces this diagnostic because `x` is
-  // implicitly initialized to `null`, when it isn't allowed to be `null`, by
-  // one of the constructors, even though it's initialized by other
-  // constructors:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  //
-  //   [!C!].n();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a reasonable default value for the field that’s the same for all
-  // instances, then add an initializer expression:
-  //
-  // ```dart
-  // class C {
-  //   int x = 0;
-  // }
-  // ```
-  //
-  // If the value of the field should be provided when an instance is created,
-  // then add a constructor that sets the value of the field or update an
-  // existing constructor:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // You can also mark the field as `late`, which removes the diagnostic, but if
-  // the field isn't assigned a value before it's accessed, then it results in
-  // an exception being thrown at runtime. This approach should only be used if
-  // you're sure that the field will always be assigned before it's referenced.
-  //
-  // ```dart
-  // class C {
-  //   late int x;
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD = CompileTimeErrorCode(
-          'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD',
-          "Non-nullable instance field '{0}' must be initialized.",
-          correction: "Try adding an initializer expression, "
-              "or a generative constructor that initializes it, "
-              "or mark it 'late'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the field that is not initialized
-   */
-  static const CompileTimeErrorCode
-      NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR =
-      CompileTimeErrorCode(
-    'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD',
-    "Non-nullable instance field '{0}' must be initialized.",
-    correction: "Try adding an initializer expression, "
-        "or add a field initializer in this constructor, "
-        "or mark it 'late'.",
-    hasPublishedDocs: true,
-    uniqueName: 'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the variable that is invalid
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a static field or top-level
-  // variable has a type that's non-nullable and doesn't have an initializer.
-  // Fields and variables that don't have an initializer are normally
-  // initialized to `null`, but the type of the field or variable doesn't allow
-  // it to be set to `null`, so an explicit initializer must be provided.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `f` can't be
-  // initialized to `null`:
-  //
-  // ```dart
-  // class C {
-  //   static int [!f!];
-  // }
-  // ```
-  //
-  // Similarly, the following code produces this diagnostic because the
-  // top-level variable `v` can't be initialized to `null`:
-  //
-  // ```dart
-  // int [!v!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field or variable can't be initialized to `null`, then add an
-  // initializer that sets it to a non-null value:
-  //
-  // ```dart
-  // class C {
-  //   static int f = 0;
-  // }
-  // ```
-  //
-  // If the field or variable should be initialized to `null`, then change the
-  // type to be nullable:
-  //
-  // ```dart
-  // int? v;
-  // ```
-  //
-  // If the field or variable can't be initialized in the declaration but will
-  // always be initialized before it's referenced, then mark it as being `late`:
-  //
-  // ```dart
-  // class C {
-  //   static late int f;
-  // }
-  // ```
-  static const CompileTimeErrorCode NOT_INITIALIZED_NON_NULLABLE_VARIABLE =
-      CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_VARIABLE',
-          "The non-nullable variable '{0}' must be initialized.",
-          correction: "Try adding an initializer expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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.
-   */
-  static const CompileTimeErrorCode DISALLOWED_TYPE_INSTANTIATION_EXPRESSION =
-      CompileTimeErrorCode(
-          'DISALLOWED_TYPE_INSTANTIATION_EXPRESSION',
-          'Only a generic type, generic function, generic instance method, or '
-              'generic constructor can be type instantiated.',
-          correction:
-              'Try instantiating the type(s) of a generic type, generic '
-              'function, generic instance method, or generic constructor.');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of the
-  // expression of a spread element that appears in either a list literal or a
-  // set literal doesn't implement the type `Iterable`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // var m = <String, int>{'a': 0, 'b': 1};
-  // var s = <String>{...[!m!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The most common fix is to replace the expression with one that produces an
-  // iterable object:
-  //
-  // ```dart
-  // var m = <String, int>{'a': 0, 'b': 1};
-  // var s = <String>{...m.keys};
-  // ```
-  static const CompileTimeErrorCode NOT_ITERABLE_SPREAD = CompileTimeErrorCode(
-      'NOT_ITERABLE_SPREAD',
-      "Spread elements in list or set literals must implement 'Iterable'.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of the
-  // expression of a spread element that appears in a map literal doesn't
-  // implement the type `Map`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `l` isn't a `Map`:
-  //
-  // ```dart
-  // var l =  <String>['a', 'b'];
-  // var m = <int, String>{...[!l!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The most common fix is to replace the expression with one that produces a
-  // map:
-  //
-  // ```dart
-  // var l =  <String>['a', 'b'];
-  // var m = <int, String>{...l.asMap()};
-  // ```
-  static const CompileTimeErrorCode NOT_MAP_SPREAD = CompileTimeErrorCode(
-      'NOT_MAP_SPREAD', "Spread elements in map literals must implement 'Map'.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode NOT_NULL_AWARE_NULL_SPREAD =
-      CompileTimeErrorCode(
-          'NOT_NULL_AWARE_NULL_SPREAD',
-          "The Null typed expression can't be used with a non-null-aware "
-              "spread.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class declaration uses an
-  // `extends` clause to specify a superclass, and the superclass is followed by
-  // a `?`.
-  //
-  // It isn't valid to specify a nullable superclass because doing so would have
-  // no meaning; it wouldn't change either the interface or implementation being
-  // inherited by the class containing the `extends` clause.
-  //
-  // Note, however, that it _is_ valid to use a nullable type as a type argument
-  // to the superclass, such as `class A extends B<C?> {}`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in an `extends` clause:
-  //
-  // ```dart
-  // class A {}
-  // class B extends [!A?!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // class A {}
-  // class B extends A {}
-  // ```
-  static const CompileTimeErrorCode NULLABLE_TYPE_IN_EXTENDS_CLAUSE =
-      CompileTimeErrorCode('NULLABLE_TYPE_IN_EXTENDS_CLAUSE',
-          "A class can't extend a nullable type.",
-          correction: "Try removing the question mark.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class or mixin declaration has
-  // an `implements` clause, and an interface is followed by a `?`.
-  //
-  // It isn't valid to specify a nullable interface because doing so would have
-  // no meaning; it wouldn't change the interface being inherited by the class
-  // containing the `implements` clause.
-  //
-  // Note, however, that it _is_ valid to use a nullable type as a type argument
-  // to the interface, such as `class A implements B<C?> {}`.
-  //
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in an `implements` clause:
-  //
-  // ```dart
-  // class A {}
-  // class B implements [!A?!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // class A {}
-  // class B implements A {}
-  // ```
-  static const CompileTimeErrorCode NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE =
-      CompileTimeErrorCode('NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE',
-          "A class or mixin can't implement a nullable type.",
-          correction: "Try removing the question mark.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a mixin declaration uses an `on`
-  // clause to specify a superclass constraint, and the class that's specified
-  // is followed by a `?`.
-  //
-  // It isn't valid to specify a nullable superclass constraint because doing so
-  // would have no meaning; it wouldn't change the interface being depended on
-  // by the mixin containing the `on` clause.
-  //
-  // Note, however, that it _is_ valid to use a nullable type as a type argument
-  // to the superclass constraint, such as `mixin A on B<C?> {}`.
-  //
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `A?` is a nullable type
-  // and nullable types can't be used in an `on` clause:
-  //
-  // ```dart
-  // class C {}
-  // mixin M on [!C?!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // class C {}
-  // mixin M on C {}
-  // ```
-  static const CompileTimeErrorCode NULLABLE_TYPE_IN_ON_CLAUSE =
-      CompileTimeErrorCode('NULLABLE_TYPE_IN_ON_CLAUSE',
-          "A mixin can't have a nullable type as a superclass constraint.",
-          correction: "Try removing the question mark.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class or mixin declaration has
-  // a `with` clause, and a mixin is followed by a `?`.
-  //
-  // It isn't valid to specify a nullable mixin because doing so would have no
-  // meaning; it wouldn't change either the interface or implementation being
-  // inherited by the class containing the `with` clause.
-  //
-  // Note, however, that it _is_ valid to use a nullable type as a type argument
-  // to the mixin, such as `class A with B<C?> {}`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in a `with` clause:
-  //
-  // ```dart
-  // mixin M {}
-  // class C with [!M?!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // mixin M {}
-  // class C with M {}
-  // ```
-  static const CompileTimeErrorCode NULLABLE_TYPE_IN_WITH_CLAUSE =
-      CompileTimeErrorCode('NULLABLE_TYPE_IN_WITH_CLAUSE',
-          "A class or mixin can't mix in a nullable type.",
-          correction: "Try removing the question mark.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.9 Superclasses: It is a compile-time error to specify an extends clause
-   * for class Object.
-   */
-  static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS =
-      CompileTimeErrorCode('OBJECT_CANNOT_EXTEND_ANOTHER_CLASS',
-          "The class 'Object' can't extend any other class.");
-
-  /**
-   * Parameters:
-   * 0: the name of the interface that is implemented more than once
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the same type is listed in the
-  // superclass constraints of a mixin multiple times.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `A` is included twice
-  // in the superclass constraints for `M`:
-  //
-  // ```dart
-  // mixin M on A, [!A!] {
-  // }
-  //
-  // class A {}
-  // class B {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different type should be included in the superclass constraints, then
-  // replace one of the occurrences with the other type:
-  //
-  // ```dart
-  // mixin M on A, B {
-  // }
-  //
-  // class A {}
-  // class B {}
-  // ```
-  //
-  // If no other type was intended, then remove the repeated type name:
-  //
-  // ```dart
-  // mixin M on A {
-  // }
-  //
-  // class A {}
-  // class B {}
-  // ```
-  static const CompileTimeErrorCode ON_REPEATED = CompileTimeErrorCode(
-      'ON_REPEATED',
-      "The type '{0}' can be included in the superclass constraints only once.",
-      correction: "Try removing all except one occurrence of the type name.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when one or more of the parameters in
-  // an operator declaration are optional.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the parameter `other`
-  // is an optional parameter:
-  //
-  // ```dart
-  // class C {
-  //   C operator +([[!C? other!]]) => this;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Make all of the parameters be required parameters:
-  //
-  // ```dart
-  // class C {
-  //   C operator +(C other) => this;
-  // }
-  // ```
-  static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR =
-      CompileTimeErrorCode('OPTIONAL_PARAMETER_IN_OPERATOR',
-          "Optional parameters aren't allowed when defining an operator.",
-          correction: "Try removing the optional parameters.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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
-  //
-  // The analyzer produces this diagnostic when a part directive is found and
-  // the referenced file doesn't have a part-of directive.
-  //
-  // #### Examples
-  //
-  // Given a file (`a.dart`) containing:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {}
-  // ```
-  //
-  // The following code produces this diagnostic because `a.dart` doesn't
-  // contain a part-of directive:
-  //
-  // ```dart
-  // part [!'a.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the referenced file is intended to be a part of another library, then
-  // add a part-of directive to the file:
-  //
-  // ```dart
-  // part of 'test.dart';
-  //
-  // class A {}
-  // ```
-  //
-  // If the referenced file is intended to be a library, then replace the part
-  // directive with an import directive:
-  //
-  // ```dart
-  // import 'a.dart';
-  // ```
-  static const CompileTimeErrorCode PART_OF_NON_PART = CompileTimeErrorCode(
-      'PART_OF_NON_PART',
-      "The included part '{0}' must have a part-of directive.",
-      correction: "Try adding a part-of directive to '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the URI of the expected library
-   * 1: the non-matching actual library name from the "part of" declaration
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library that doesn't have a
-  // `library` directive (and hence has no name) contains a `part` directive and
-  // the `part of` directive in the part file uses a name to specify the library
-  // that it's a part of.
-  //
-  // #### Example
-  //
-  // Given a part file named `part_file.dart` containing the following code:
-  //
-  // ```dart
-  // %uri="lib/part_file.dart"
-  // part of lib;
-  // ```
-  //
-  // The following code produces this diagnostic because the library including
-  // the part file doesn't have a name even though the part file uses a name to
-  // specify which library it's a part of:
-  //
-  // ```dart
-  // part [!'part_file.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the `part of` directive in the part file to specify its library by
-  // URI:
-  //
-  // ```dart
-  // part of 'test.dart';
-  // ```
-  static const CompileTimeErrorCode PART_OF_UNNAMED_LIBRARY =
-      CompileTimeErrorCode(
-          'PART_OF_UNNAMED_LIBRARY',
-          "The library is unnamed. A URI is expected, not a library name "
-              "'{0}', in the part-of directive.",
-          correction:
-              "Try changing the part-of directive to a URI, or try including a "
-              "different part.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the prefix
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name is used as both an import
-  // prefix and the name of a top-level declaration in the same library.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `f` is used as both an
-  // import prefix and the name of a function:
-  //
-  // ```dart
-  // import 'dart:math' as f;
-  //
-  // int [!f!]() => f.min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to use the name for the import prefix, then rename the
-  // top-level declaration:
-  //
-  // ```dart
-  // import 'dart:math' as f;
-  //
-  // int g() => f.min(0, 1);
-  // ```
-  //
-  // If you want to use the name for the top-level declaration, then rename the
-  // import prefix:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // int f() => math.min(0, 1);
-  // ```
-  static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER =
-      CompileTimeErrorCode(
-          'PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER',
-          "The name '{0}' is already used as an import prefix and can't be "
-              "used to name a top-level element.",
-          correction:
-              "Try renaming either the top-level element or the prefix.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the prefix
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import prefix is used by
-  // itself, without accessing any of the names declared in the libraries
-  // associated with the prefix. Prefixes aren't variables, and therefore can't
-  // be used as a value.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the prefix `math` is
-  // being used as if it were a variable:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // void f() {
-  //   print([!math!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the code is incomplete, then reference something in one of the libraries
-  // associated with the prefix:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // void f() {
-  //   print(math.pi);
-  // }
-  // ```
-  //
-  // If the name is wrong, then correct the name.
-  static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT =
-      CompileTimeErrorCode(
-          'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT',
-          "The name '{0}' refers to an import prefix, so it must be followed "
-              "by '.'.",
-          correction:
-              "Try correcting the name to refer to something other than a "
-              "prefix, or renaming the prefix.",
-          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.");
-
-  /**
-   * Parameters:
-   * 0: the private name that collides
-   * 1: the name of the first mixin
-   * 2: the name of the second mixin
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when two mixins that define the same
-  // private member are used together in a single class in a library other than
-  // the one that defines the mixins.
-  //
-  // #### Example
-  //
-  // Given a file named `a.dart` containing the following code:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {
-  //   void _foo() {}
-  // }
-  //
-  // class B {
-  //   void _foo() {}
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the classes `A` and `B`
-  // both define the method `_foo`:
-  //
-  // ```dart
-  // import 'a.dart';
-  //
-  // class C extends Object with A, [!B!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need both of the mixins, then remove one of them from the
-  // `with` clause:
-  //
-  // ```dart
-  // import 'a.dart';
-  //
-  // class C extends Object with A, [!B!] {}
-  // ```
-  //
-  // If you need both of the mixins, then rename the conflicting member in one
-  // of the two mixins.
-  static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION =
-      CompileTimeErrorCode(
-          'PRIVATE_COLLISION_IN_MIXIN_APPLICATION',
-          "The private name '{0}', defined by '{1}', "
-              "conflicts with the same name defined by '{2}'.",
-          correction: "Try removing '{1}' from the 'with' clause.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a named parameter
-  // starts with an underscore.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the named parameter
-  // `_x` starts with an underscore:
-  //
-  // ```dart
-  // class C {
-  //   void m({int [!_x!] = 0}) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename the parameter so that it doesn't start with an underscore:
-  //
-  // ```dart
-  // class C {
-  //   void m({int x = 0}) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER =
-      CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER',
-          "Named parameters can't start with an underscore.",
-          hasPublishedDocs: true);
-
-  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.");
-
-  static const CompileTimeErrorCode READ_POTENTIALLY_UNASSIGNED_FINAL =
-      CompileTimeErrorCode(
-    'READ_POTENTIALLY_UNASSIGNED_FINAL',
-    "The final variable '{0}' can't be read because it is potentially "
-        "unassigned at this point.",
-    correction: "Ensure that it is assigned on necessary execution paths.",
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of a compile-time
-  // constant is defined in terms of itself, either directly or indirectly,
-  // creating an infinite loop.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic twice because both of the
-  // constants are defined in terms of the other:
-  //
-  // ```dart
-  // const [!secondsPerHour!] = minutesPerHour * 60;
-  // const [!minutesPerHour!] = secondsPerHour / 60;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Break the cycle by finding an alternative way of defining at least one of
-  // the constants:
-  //
-  // ```dart
-  // const secondsPerHour = minutesPerHour * 60;
-  // const minutesPerHour = 60;
-  // ```
-  static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT =
-      CompileTimeErrorCode('RECURSIVE_COMPILE_TIME_CONSTANT',
-          "The compile-time constant expression depends on itself.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   *
-   * TODO(scheglov) review this later, there are no explicit "it is a
-   * compile-time error" in specification. But it was added to the co19 and
-   * there is same error for factories.
-   *
-   * https://code.google.com/p/dart/issues/detail?id=954
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor redirects to
-  // itself, either directly or indirectly, creating an infinite loop.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the generative
-  // constructors `C.a` and `C.b` each redirect to the other:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : [!this.b()!];
-  //   C.b() : [!this.a()!];
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the factory
-  // constructors `A` and `B` each redirect to the other:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = [!B!];
-  // }
-  // class B implements A {
-  //   factory B() = [!A!];
-  //   B.named();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // In the case of generative constructors, break the cycle by finding defining
-  // at least one of the constructors to not redirect to another constructor:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b();
-  //   C.b();
-  // }
-  // ```
-  //
-  // In the case of factory constructors, break the cycle by defining at least
-  // one of the factory constructors to do one of the following:
-  //
-  // - Redirect to a generative constructor:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = B;
-  // }
-  // class B implements A {
-  //   factory B() = B.named;
-  //   B.named();
-  // }
-  // ```
-  //
-  // - Not redirect to another constructor:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = B;
-  // }
-  // class B implements A {
-  //   factory B() {
-  //     return B.named();
-  //   }
-  //
-  //   B.named();
-  // }
-  // ```
-  //
-  // - Not be a factory constructor:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = B;
-  // }
-  // class B implements A {
-  //   B();
-  //   B.named();
-  // }
-  // ```
-  static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT =
-      CompileTimeErrorCode(
-          'RECURSIVE_CONSTRUCTOR_REDIRECT',
-          "Constructors can't redirect to themselves either directly or "
-              "indirectly.",
-          correction: 'Try changing one of the constructors in the loop to not '
-              'redirect.',
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT =
-      CompileTimeErrorCode(
-          'RECURSIVE_CONSTRUCTOR_REDIRECT',
-          "Constructors can't redirect to themselves either directly or "
-              "indirectly.",
-          correction: 'Try changing one of the constructors in the loop to not '
-              'redirect.',
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_FACTORY_REDIRECT');
-
-  /**
-   * Parameters:
-   * 0: the name of the class that implements itself recursively
-   * 1: a string representation of the implements loop
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's a circularity in the
-  // type hierarchy. This happens when a type, either directly or indirectly,
-  // is declared to be a subtype of itself.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the class `A` is
-  // declared to be a subtype of `B`, and `B` is a subtype of `A`:
-  //
-  // ```dart
-  // class [!A!] extends B {}
-  // class B implements A {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the type hierarchy so that there's no circularity.
-  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE =
-      CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE',
-          "'{0}' can't be a superinterface of itself: {1}.",
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE');
-
-  /**
-   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
-   * class <i>C</i> is a superinterface of itself.
-   *
-   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
-   * superinterface of itself.
-   *
-   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
-   * superclass of itself.
-   *
-   * Parameters:
-   * 0: the name of the class that implements itself recursively
-   */
-  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_EXTENDS =
-      CompileTimeErrorCode(
-          'RECURSIVE_INTERFACE_INHERITANCE', "'{0}' can't extend itself.",
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_EXTENDS');
-
-  /**
-   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
-   * class <i>C</i> is a superinterface of itself.
-   *
-   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
-   * superinterface of itself.
-   *
-   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
-   * superclass of itself.
-   *
-   * Parameters:
-   * 0: the name of the class that implements itself recursively
-   */
-  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS =
-      CompileTimeErrorCode(
-          'RECURSIVE_INTERFACE_INHERITANCE', "'{0}' can't implement itself.",
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS');
-
-  /**
-   * Parameters:
-   * 0: the name of the mixin that constraints itself recursively
-   */
-  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_ON =
-      CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE',
-          "'{0}' can't use itself as a superclass constraint.",
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_ON');
-
-  /**
-   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
-   * class <i>C</i> is a superinterface of itself.
-   *
-   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
-   * superinterface of itself.
-   *
-   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
-   * superclass of itself.
-   *
-   * Parameters:
-   * 0: the name of the class that implements itself recursively
-   */
-  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_WITH =
-      CompileTimeErrorCode('RECURSIVE_INTERFACE_INHERITANCE',
-          "'{0}' can't use itself as a mixin.",
-          hasPublishedDocs: true,
-          uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_WITH');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a generative constructor
-  // redirects to a constructor that isn't defined.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constructor `C.a`
-  // redirects to the constructor `C.b`, but `C.b` isn't defined:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : [!this.b()!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the missing constructor must be called, then define it:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b();
-  //   C.b();
-  // }
-  // ```
-  //
-  // If the missing constructor doesn't need to be called, then remove the
-  // redirect:
-  //
-  // ```dart
-  // class C {
-  //   C.a();
-  // }
-  // ```
-  static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR =
-      CompileTimeErrorCode('REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR',
-          "The constructor '{0}' couldn't be found in '{1}'.",
-          correction: "Try redirecting to a different constructor, or "
-              "defining the constructor named '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a generative constructor
-  // redirects to a factory constructor.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the generative
-  // constructor `C.a` redirects to the factory constructor `C.b`:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : [!this.b()!];
-  //   factory C.b() => C.a();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the generative constructor doesn't need to redirect to another
-  // constructor, then remove the redirect.
-  //
-  // ```dart
-  // class C {
-  //   C.a();
-  //   factory C.b() => C.a();
-  // }
-  // ```
-  //
-  // If the generative constructor must redirect to another constructor, then
-  // make the other constructor be a generative (non-factory) constructor:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b();
-  //   C.b();
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR = CompileTimeErrorCode(
-          'REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR',
-          "Generative constructors can't redirect to a factory constructor.",
-          correction: "Try redirecting to a different constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * A factory constructor can't redirect to a non-generative constructor of an
-   * abstract class.
-   */
-  static const CompileTimeErrorCode REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR',
-          "The redirecting constructor '{0}' can't redirect to a constructor "
-              "of the abstract class '{1}'.",
-          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.
-   */
-  static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR =
-      CompileTimeErrorCode('REDIRECT_TO_MISSING_CONSTRUCTOR',
-          "The constructor '{0}' couldn't be found in '{1}'.",
-          correction: "Try redirecting to a different constructor, or "
-              "define the constructor named '{0}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the non-type referenced in the redirect
-   */
-  // #### Description
-  //
-  // One way to implement a factory constructor is to redirect to another
-  // constructor by referencing the name of the constructor. The analyzer
-  // produces this diagnostic when the redirect is to something other than a
-  // constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is a function:
-  //
-  // ```dart
-  // C f() => throw 0;
-  //
-  // class C {
-  //   factory C() = [!f!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the constructor isn't defined, then either define it or replace it with
-  // a constructor that is defined.
-  //
-  // If the constructor is defined but the class that defines it isn't visible,
-  // then you probably need to add an import.
-  //
-  // If you're trying to return the value returned by a function, then rewrite
-  // the constructor to return the value from the constructor's body:
-  //
-  // ```dart
-  // C f() => throw 0;
-  //
-  // class C {
-  //   factory C() => f();
-  // }
-  // ```
-  static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS =
-      CompileTimeErrorCode(
-          'REDIRECT_TO_NON_CLASS',
-          "The name '{0}' isn't a type and can't be used in a redirected "
-              "constructor.",
-          correction: "Try redirecting to a different constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor marked as `const`
-  // redirects to a constructor that isn't marked as `const`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constructor `C.a`
-  // is marked as `const` but redirects to the constructor `C.b`, which isn't:
-  //
-  // ```dart
-  // class C {
-  //   const C.a() : this.[!b!]();
-  //   C.b();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the non-constant constructor can be marked as `const`, then mark it as
-  // `const`:
-  //
-  // ```dart
-  // class C {
-  //   const C.a() : this.b();
-  //   const C.b();
-  // }
-  // ```
-  //
-  // If the non-constant constructor can't be marked as `const`, then either
-  // remove the redirect or remove `const` from the redirecting constructor:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b();
-  //   C.b();
-  // }
-  // ```
-  static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'REDIRECT_TO_NON_CONST_CONSTRUCTOR',
-          "A constant redirecting constructor can't redirect to a non-constant "
-              "constructor.",
-          correction: "Try redirecting to a different constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * It is a compile-time error for a redirecting factory constructor to have
-   * a body which is a type alias that expands to a type variable, or a body
-   * which is a parameterized type of the form `F<T1, .. Tk>`, where `F` is
-   * a type alias that expands to a type variable.
-   */
-  static const CompileTimeErrorCode
-      REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
-          'REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
-          "Redirecting constructor can't redirect to a type alias "
-              "that expands to a type parameter.",
-          correction: "Try replacing it with a class.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a variable is referenced before
-  // it’s declared. In Dart, variables are visible everywhere in the block in
-  // which they are declared, but can only be referenced after they are
-  // declared.
-  //
-  // The analyzer also produces a context message that indicates where the
-  // declaration is located.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` is used before it
-  // is declared:
-  //
-  // ```dart
-  // %language=2.9
-  // void f() {
-  //   print([!i!]);
-  //   int i = 5;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended to reference the local variable, move the declaration
-  // before the first reference:
-  //
-  // ```dart
-  // %language=2.9
-  // void f() {
-  //   int i = 5;
-  //   print(i);
-  // }
-  // ```
-  //
-  // If you intended to reference a name from an outer scope, such as a
-  // parameter, instance field or top-level variable, then rename the local
-  // declaration so that it doesn't hide the outer variable.
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int i) {
-  //   print(i);
-  //   int x = 5;
-  //   print(x);
-  // }
-  // ```
-  static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION =
-      CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION',
-          "Local variable '{0}' can't be referenced before it is declared.",
-          correction: "Try moving the declaration to before the first use, or "
-              "renaming the local variable so that it doesn't hide a name from "
-              "an enclosing scope.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `rethrow` statement is outside
-  // a `catch` clause. The `rethrow` statement is used to throw a caught
-  // exception again, but there's no caught exception outside of a `catch`
-  // clause.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the`rethrow` statement
-  // is outside of a `catch` clause:
-  //
-  // ```dart
-  // void f() {
-  //   [!rethrow!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you're trying to rethrow an exception, then wrap the `rethrow` statement
-  // in a `catch` clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } catch (exception) {
-  //     rethrow;
-  //   }
-  // }
-  // ```
-  //
-  // If you're trying to throw a new exception, then replace the `rethrow`
-  // statement with a `throw` expression:
-  //
-  // ```dart
-  // void f() {
-  //   throw UnsupportedError('Not yet implemented');
-  // }
-  // ```
-  static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH =
-      CompileTimeErrorCode('RETHROW_OUTSIDE_CATCH',
-          "A rethrow must be inside of a catch clause.",
-          correction:
-              "Try moving the expression into a catch clause, or using a "
-              "'throw' expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a generative constructor
-  // contains a `return` statement that specifies a value to be returned.
-  // Generative constructors always return the object that was created, and
-  // therefore can't return a different object.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the `return` statement
-  // has an expression:
-  //
-  // ```dart
-  // class C {
-  //   C() {
-  //     return [!this!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the constructor should create a new instance, then remove either the
-  // `return` statement or the expression:
-  //
-  // ```dart
-  // class C {
-  //   C();
-  // }
-  // ```
-  //
-  // If the constructor shouldn't create a new instance, then convert it to be a
-  // factory constructor:
-  //
-  // ```dart
-  // class C {
-  //   factory C() {
-  //     return _instance;
-  //   }
-  //
-  //   static C _instance = C._();
-  //
-  //   C._();
-  // }
-  // ```
-  static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR =
-      CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR',
-          "Constructors can't return values.",
-          correction: "Try removing the return statement or using a factory "
-              "constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a generator function (one whose
-  // body is marked with either `async*` or `sync*`) uses a `return` statement
-  // to return a value. In both cases, they should use `yield` instead of
-  // `return`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the method `f` is a
-  // generator and is using `return` to return a value:
-  //
-  // ```dart
-  // Iterable<int> f() sync* {
-  //   [!return 3!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the method is intended to be a generator, then use `yield` to return a
-  // value:
-  //
-  // ```dart
-  // Iterable<int> f() sync* {
-  //   yield 3;
-  // }
-  // ```
-  //
-  // If the method isn't intended to be a generator, then remove the modifier
-  // from the body (or use `async` if you're returning a future):
-  //
-  // ```dart
-  // int f() {
-  //   return 3;
-  // }
-  // ```
-  static const CompileTimeErrorCode RETURN_IN_GENERATOR = CompileTimeErrorCode(
-      'RETURN_IN_GENERATOR',
-      "Can't return a value from a generator function that uses the 'async*' "
-          "or 'sync*' modifier.",
-      // TODO(srawlins): Splitting this code into two cases, one for block-
-      // bodied, and one for expression-bodied, would improve each correction
-      // message. This split would have to be done in the parser.
-      correction: "Try replacing 'return' with 'yield', using a block function "
-          "body, or changing the method body modifier.",
-      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 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 =
-      CompileTimeErrorCode(
-    'RETURN_OF_INVALID_TYPE',
-    "A value of type '{0}' can't be returned from the constructor '{2}' "
-        "because it has a return type of '{1}'.",
-    hasPublishedDocs: true,
-    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR',
-  );
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'RETURN_OF_INVALID_TYPE',
-    "A value of type '{0}' can't be returned from the function '{2}' because "
-        "it has a return type of '{1}'.",
-    hasPublishedDocs: true,
-    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_FUNCTION',
-  );
-
-  /**
-   * 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 =
-      CompileTimeErrorCode(
-    'RETURN_OF_INVALID_TYPE',
-    "A value of type '{0}' can't be returned from the method '{2}' because "
-        "it has a return type of '{1}'.",
-    hasPublishedDocs: true,
-    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_METHOD',
-  );
-
-  /**
-   * 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);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode SET_ELEMENT_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as values in "
-              "a 'const' set literal.",
-          correction:
-              "Try removing the keyword 'const' from the set literal or removing "
-              "the keyword 'deferred' from the import.",
-          hasPublishedDocs: true,
-          uniqueName: 'SET_ELEMENT_FROM_DEFERRED_LIBRARY');
-
-  /**
-   * Parameters:
-   * 0: the actual type of the set element
-   * 1: the expected type of the set element
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an element in a set literal has
-  // a type that isn't assignable to the element type of the set.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type of the string
-  // literal `'0'` is `String`, which isn't assignable to `int`, the element
-  // type of the set:
-  //
-  // ```dart
-  // var s = <int>{[!'0'!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the element type of the set literal is wrong, then change the element
-  // type of the set:
-  //
-  // ```dart
-  // var s = <String>{'0'};
-  // ```
-  //
-  // If the type of the element is wrong, then change the element:
-  //
-  // ```dart
-  // var s = <int>{'0'.length};
-  // ```
-  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}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a prefix in a deferred import is
-  // also used as a prefix in other imports (whether deferred or not). The
-  // prefix in a deferred import can't be shared with other imports because the
-  // prefix is used to load the imported library.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the prefix `x` is used
-  // as the prefix for a deferred import and is also used for one other import:
-  //
-  // ```dart
-  // import 'dart:math' [!deferred!] as x;
-  // import 'dart:convert' as x;
-  //
-  // var y = x.json.encode(x.min(0, 1));
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you can use a different name for the deferred import, then do so:
-  //
-  // ```dart
-  // import 'dart:math' deferred as math;
-  // import 'dart:convert' as x;
-  //
-  // var y = x.json.encode(math.min(0, 1));
-  // ```
-  //
-  // If you can use a different name for the other imports, then do so:
-  //
-  // ```dart
-  // import 'dart:math' deferred as x;
-  // import 'dart:convert' as convert;
-  //
-  // var y = convert.json.encode(x.min(0, 1));
-  // ```
-  static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX =
-      CompileTimeErrorCode(
-          'SHARED_DEFERRED_PREFIX',
-          "The prefix of a deferred import can't be used in other import "
-              "directives.",
-          correction: "Try renaming one of the prefixes.",
-          hasPublishedDocs: true);
-
-  static const CompileTimeErrorCode SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be spread into a "
-              "const literal.",
-          correction: "Try making the deferred import non-deferred.");
-
-  /**
-   * 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // 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
-  //
-  // The analyzer produces this diagnostic when a member declared inside an
-  // extension uses the `super` keyword . Extensions aren't classes and don't
-  // have superclasses, so the `super` keyword serves no purpose.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `super` can't be used
-  // in an extension:
-  //
-  // ```dart
-  // extension E on Object {
-  //   String get displayString => [!super!].toString();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the `super` keyword :
-  //
-  // ```dart
-  // extension E on Object {
-  //   String get displayString => toString();
-  // }
-  // ```
-  static const CompileTimeErrorCode SUPER_IN_EXTENSION = CompileTimeErrorCode(
-      'SUPER_IN_EXTENSION',
-      "The 'super' keyword can't be used in an extension because an "
-          "extension doesn't have a superclass.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the keyword `super` is used
-  // outside of a instance method.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `super` is used in a
-  // top-level function:
-  //
-  // ```dart
-  // void f() {
-  //   [!super!].f();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rewrite the code to not use `super`.
-  static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT =
-      CompileTimeErrorCode(
-          'SUPER_IN_INVALID_CONTEXT', "Invalid context for 'super' invocation.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor that redirects to
-  // another constructor also attempts to invoke a constructor from the
-  // superclass. The superclass constructor will be invoked when the constructor
-  // that the redirecting constructor is redirected to is invoked.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constructor `C.a`
-  // both redirects to `C.b` and invokes a constructor from the superclass:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b(), [!super()!];
-  //   C.b();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the invocation of the `super` constructor:
-  //
-  // ```dart
-  // class C {
-  //   C.a() : this.b();
-  //   C.b();
-  // }
-  // ```
-  static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR =
-      CompileTimeErrorCode('SUPER_IN_REDIRECTING_CONSTRUCTOR',
-          "The redirecting constructor can't have a 'super' initializer.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
-   * is a compile-time error if a generative constructor of class Object
-   * includes a superinitializer.
-   */
-  static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT =
-      CompileTimeErrorCode('SUPER_INITIALIZER_IN_OBJECT',
-          "The class 'Object' can't invoke a constructor from a superclass.");
-
-  /**
-   * It is an error if any case of a switch statement except the last case (the
-   * default case if present) may complete normally. The previous syntactic
-   * restriction requiring the last statement of each case to be one of an
-   * enumerated list of statements (break, continue, return, throw, or rethrow)
-   * is removed.
-   */
-  static const CompileTimeErrorCode SWITCH_CASE_COMPLETES_NORMALLY =
-      CompileTimeErrorCode('SWITCH_CASE_COMPLETES_NORMALLY',
-          "The 'case' should not complete normally.",
-          correction: "Try adding 'break', or 'return', etc.");
-
-  /**
-   * 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // 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);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      TEAROFF_OF_GENERATIVE_CONSTRUCTOR_OF_ABSTRACT_CLASS =
-      CompileTimeErrorCode(
-          'TEAROFF_OF_GENERATIVE_CONSTRUCTOR_OF_ABSTRACT_CLASS',
-          "A generative constructor of an abstract class can't be torn off",
-          correction: "Try tearing off a constructor of a concrete class, or a "
-              "non-generative constructor.");
-
-  /**
-   * Parameters:
-   * 0: the type that can't be thrown
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of the expression in a
-  // throw expression isn't assignable to `Object`. It isn't valid to throw
-  // `null`, so it isn't valid to use an expression that might evaluate to
-  // `null`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `s` might be `null`:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   throw [!s!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an explicit null check to the expression:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   throw s!;
-  // }
-  // ```
-  static const CompileTimeErrorCode THROW_OF_INVALID_TYPE = CompileTimeErrorCode(
-      'THROW_OF_INVALID_TYPE',
-      "The type '{0}' of the thrown expression must be assignable to 'Object'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the element whose type could not be inferred.
-   * 1: The [TopLevelInferenceError]'s arguments that led to the cycle.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a top-level variable has no type
-  // annotation and the variable's initializer refers to the variable, either
-  // directly or indirectly.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the variables `x` and
-  // `y` are defined in terms of each other, and neither has an explicit type,
-  // so the type of the other can't be inferred:
-  //
-  // ```dart
-  // var x = y;
-  // var y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the two variables don't need to refer to each other, then break the
-  // cycle:
-  //
-  // ```dart
-  // var x = 0;
-  // var y = x;
-  // ```
-  //
-  // If the two variables need to refer to each other, then give at least one of
-  // them an explicit type:
-  //
-  // ```dart
-  // int x = y;
-  // var y = x;
-  // ```
-  //
-  // Note, however, that while this code doesn't produce any diagnostics, it
-  // will produce a stack overflow at runtime unless at least one of the
-  // variables is assigned a value that doesn't depend on the other variables
-  // before any of the variables in the cycle are referenced.
-  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.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a typedef refers to itself,
-  // either directly or indirectly.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `F` depends on itself
-  // indirectly through `G`:
-  //
-  // ```dart
-  // typedef [!F!] = void Function(G);
-  // typedef G = void Function(F);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change one or more of the typedefs in the cycle so that none of them refer
-  // to themselves:
-  //
-  // ```dart
-  // typedef F = void Function(G);
-  // typedef G = void Function(int);
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the type that is deferred and being used in a type
-   *    annotation
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type annotation is in a
-  // variable declaration, or the type used in a cast (`as`) or type test (`is`)
-  // is a type declared in a library that is imported using a deferred import.
-  // These types are required to be available at compile time, but aren't.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type of the
-  // parameter `f` is imported from a deferred library:
-  //
-  // ```dart
-  // import 'dart:io' deferred as io;
-  //
-  // void f([!io.File!] f) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the imported type, then remove the `deferred`
-  // keyword:
-  //
-  // ```dart
-  // import 'dart:io' as io;
-  //
-  // void f(io.File f) {}
-  // ```
-  //
-  // If the import is required to be deferred and there's another type that is
-  // appropriate, then use that type in place of the type from the deferred
-  // library.
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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 type parameter
-   * 2: the substituted bound of the type parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type argument isn't the same
-  // as or a subclass of the bounds of the corresponding type parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `String` isn't a
-  // subclass of `num`:
-  //
-  // ```dart
-  // class A<E extends num> {}
-  //
-  // var a = A<[!String!]>();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the type argument to be a subclass of the bounds:
-  //
-  // ```dart
-  // class A<E extends num> {}
-  //
-  // var a = A<int>();
-  // ```
-  static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS =
-      CompileTimeErrorCode(
-    'TYPE_ARGUMENT_NOT_MATCHING_BOUNDS',
-    "'{0}' doesn't conform to the bound '{2}' of the type parameter '{1}'.",
-    correction: "Try using a type that is or is a subclass of '{2}'.",
-    hasPublishedDocs: true,
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a static member references a
-  // type parameter that is declared for the class. Type parameters only have
-  // meaning for instances of the class.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the static method
-  // `hasType` has a reference to the type parameter `T`:
-  //
-  // ```dart
-  // class C<T> {
-  //   static bool hasType(Object o) => o is [!T!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the member can be an instance member, then remove the keyword `static`:
-  //
-  // ```dart
-  // class C<T> {
-  //   bool hasType(Object o) => o is T;
-  // }
-  // ```
-  //
-  // If the member must be a static member, then make the member be generic:
-  //
-  // ```dart
-  // class C<T> {
-  //   static bool hasType<S>(Object o) => o is S;
-  // }
-  // ```
-  //
-  // Note, however, that there isn’t a relationship between `T` and `S`, so this
-  // second option changes the semantics from what was likely to be intended.
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the type parameter
-   * 1: the name of the bounding type
-   *
-   * See [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the bound of a type parameter
-  // (the type following the `extends` keyword) is either directly or indirectly
-  // the type parameter itself. Stating that the type parameter must be the same
-  // as itself or a subtype of itself or a subtype of itself isn't helpful
-  // because it will always be the same as itself.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the bound of `T` is
-  // `T`:
-  //
-  // ```dart
-  // class C<[!T!] extends T> {}
-  // ```
-  //
-  // The following code produces this diagnostic because the bound of `T1` is
-  // `T2`, and the bound of `T2` is `T1`, effectively making the bound of `T1`
-  // be `T1`:
-  //
-  // ```dart
-  // class C<[!T1!] extends T2, T2 extends T1> {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type parameter needs to be a subclass of some type, then replace the
-  // bound with the required type:
-  //
-  // ```dart
-  // class C<T extends num> {}
-  // ```
-  //
-  // If the type parameter can be any type, then remove the `extends` clause:
-  //
-  // ```dart
-  // class C<T> {}
-  // ```
-  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 the same as or a subclass of '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the right-hand side of an `is`
-  // or `is!` test isn't a type.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the right-hand side is
-  // a parameter, not a type:
-  //
-  // ```dart
-  // typedef B = int Function(int);
-  //
-  // void f(Object a, B b) {
-  //   if (a is [!b!]) {
-  //     return;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended to use a type test, then replace the right-hand side with a
-  // type:
-  //
-  // ```dart
-  // typedef B = int Function(int);
-  //
-  // void f(Object a, B b) {
-  //   if (a is B) {
-  //     return;
-  //   }
-  // }
-  // ```
-  //
-  // If you intended to use a different kind of test, then change the test:
-  //
-  // ```dart
-  // typedef B = int Function(int);
-  //
-  // void f(Object a, B b) {
-  //   if (a == b) {
-  //     return;
-  //   }
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 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);
-
-  static const CompileTimeErrorCode UNCHECKED_INVOCATION_OF_NULLABLE_VALUE =
-      CompileTimeErrorCode('UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "The function can't be unconditionally invoked because it can be 'null'.",
-          correction: "Try adding a null check ('!').",
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_INVOCATION_OF_NULLABLE_VALUE');
-
-  static const CompileTimeErrorCode
-      UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "The method '{0}' can't be unconditionally invoked because the "
-              "receiver can be 'null'.",
-          correction:
-              "Try making the call conditional (using '?.') or adding a null "
-              "check to the target ('!').",
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE');
-
-  static const CompileTimeErrorCode
-      UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "The operator '{0}' can't be unconditionally invoked because the "
-              "receiver can be 'null'.",
-          correction: "Try adding a null check to the target ('!').",
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE');
-
-  static const CompileTimeErrorCode
-      UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "The property '{0}' can't be unconditionally accessed because the "
-              "receiver can be 'null'.",
-          correction:
-              "Try making the access conditional (using '?.') or adding a null "
-              "check to the target ('!').",
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE');
-
-  // #### 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
-  // 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
-  // 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
-  // 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
-  // void f(String? s) {
-  //   if (s!.length > 3) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "A nullable expression can't be used as a condition.",
-          correction:
-              "Try checking that the value isn't 'null' before using it as a "
-              'condition.',
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION');
-
-  static const CompileTimeErrorCode
-      UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "A nullable expression can't be used as an iterator in a for-in "
-              'loop.',
-          correction:
-              "Try checking that the value isn't 'null' before using it as an "
-              'iterator.',
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR');
-
-  static const CompileTimeErrorCode UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD =
-      CompileTimeErrorCode('UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "A nullable expression can't be used in a spread.",
-          correction:
-              "Try checking that the value isn't 'null' before using it in a "
-              'spread, or use a null-aware spread.',
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD');
-
-  static const CompileTimeErrorCode
-      UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH = CompileTimeErrorCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "A nullable expression can't be used in a yield-each statement.",
-          correction:
-              "Try checking that the value isn't 'null' before using it in a "
-              'yield-each statement.',
-          hasPublishedDocs: true,
-          uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name that isn't defined is
-  // used as an annotation.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `undefined`
-  // isn't defined:
-  //
-  // ```dart
-  // [!@undefined!]
-  // void f() {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name is correct, but it isn’t declared yet, then declare the name as
-  // a constant value:
-  //
-  // ```dart
-  // const undefined = 'undefined';
-  //
-  // @undefined
-  // void f() {}
-  // ```
-  //
-  // If the name is wrong, replace the name with the name of a valid constant:
-  //
-  // ```dart
-  // @deprecated
-  // void f() {}
-  // ```
-  //
-  // Otherwise, remove the annotation.
-  static const CompileTimeErrorCode UNDEFINED_ANNOTATION = CompileTimeErrorCode(
-      'UNDEFINED_ANNOTATION', "Undefined name '{0}' used as an annotation.",
-      correction: "Try defining the name or importing it from another library.",
-      hasPublishedDocs: true,
-      isUnresolvedIdentifier: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the undefined class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of a class 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 `Piont` isn't defined:
-  //
-  // ```dart
-  // class Point {}
-  //
-  // void f([!Piont!] p) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // the name of a class that is defined. The example above can be corrected by
-  // fixing the spelling of the class:
-  //
-  // ```dart
-  // class Point {}
-  //
-  // void f(Point p) {}
-  // ```
-  //
-  // If the class is defined but isn't visible, then you probably need to add an
-  // import.
-  static const CompileTimeErrorCode UNDEFINED_CLASS = CompileTimeErrorCode(
-      'UNDEFINED_CLASS', "Undefined class '{0}'.",
-      correction: "Try changing the name to the name of an existing class, or "
-          "creating a class with the name '{0}'.",
-      hasPublishedDocs: true,
-      isUnresolvedIdentifier: true);
-
-  /**
-   * Same as [CompileTimeErrorCode.UNDEFINED_CLASS], but to catch using
-   * "boolean" instead of "bool" in order to improve the correction message.
-   *
-   * Parameters:
-   * 0: the name of the undefined class
-   */
-  static const CompileTimeErrorCode UNDEFINED_CLASS_BOOLEAN =
-      CompileTimeErrorCode('UNDEFINED_CLASS', "Undefined class '{0}'.",
-          correction: "Try using the type 'bool'.",
-          hasPublishedDocs: true,
-          isUnresolvedIdentifier: true,
-          uniqueName: 'UNDEFINED_CLASS_BOOLEAN');
-
-  /**
-   * Parameters:
-   * 0: the name of the superclass that does not define the invoked constructor
-   * 1: the name of the constructor being invoked
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a superclass constructor is
-  // invoked in the initializer list of a constructor, but the superclass
-  // doesn't define the constructor being invoked.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `A` doesn't have an
-  // unnamed constructor:
-  //
-  // ```dart
-  // class A {
-  //   A.n();
-  // }
-  // class B extends A {
-  //   B() : [!super()!];
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `A` doesn't have a
-  // constructor named `m`:
-  //
-  // ```dart
-  // class A {
-  //   A.n();
-  // }
-  // class B extends A {
-  //   B() : [!super.m()!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the superclass defines a constructor that should be invoked, then change
-  // the constructor being invoked:
-  //
-  // ```dart
-  // class A {
-  //   A.n();
-  // }
-  // class B extends A {
-  //   B() : super.n();
-  // }
-  // ```
-  //
-  // If the superclass doesn't define an appropriate constructor, then define
-  // the constructor being invoked:
-  //
-  // ```dart
-  // class A {
-  //   A.m();
-  //   A.n();
-  // }
-  // class B extends A {
-  //   B() : super.m();
-  // }
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER =
-      CompileTimeErrorCode('UNDEFINED_CONSTRUCTOR_IN_INITIALIZER',
-          "The class '{0}' doesn't have a constructor named '{1}'.",
-          correction: "Try defining a constructor named '{1}' in '{0}', or "
-              "invoking a different constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the superclass that does not define the invoked constructor
-   */
-  static const CompileTimeErrorCode
-      UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = CompileTimeErrorCode(
-    'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER',
-    "The class '{0}' doesn't have an unnamed constructor.",
-    correction: "Try defining an unnamed constructor in '{0}', or "
-        "invoking a different constructor.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
-  );
-
-  /**
-   * 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
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is used to
-  // invoke a getter, but the getter isn't defined by the specified extension.
-  // The analyzer also produces this diagnostic when a static getter is
-  // referenced but isn't defined by the specified extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare an instance getter named `b`:
-  //
-  // ```dart
-  // extension E on String {
-  //   String get a => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String get b => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').[!b!];
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare a static getter named `a`:
-  //
-  // ```dart
-  // extension E on String {}
-  //
-  // var x = E.[!a!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name of the getter is incorrect, then change it to the name of an
-  // existing getter:
-  //
-  // ```dart
-  // extension E on String {
-  //   String get a => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String get b => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').a;
-  // }
-  // ```
-  //
-  // If the name of the getter is correct but the name of the extension is
-  // wrong, then change the name of the extension to the correct name:
-  //
-  // ```dart
-  // extension E on String {
-  //   String get a => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String get b => 'b';
-  // }
-  //
-  // void f() {
-  //   F('c').b;
-  // }
-  // ```
-  //
-  // If the name of the getter and extension are both correct, but the getter
-  // isn't defined, then define the getter:
-  //
-  // ```dart
-  // extension E on String {
-  //   String get a => 'a';
-  //   String get b => 'z';
-  // }
-  //
-  // extension F on String {
-  //   String get b => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').b;
-  // }
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_EXTENSION_GETTER =
-      CompileTimeErrorCode('UNDEFINED_EXTENSION_GETTER',
-          "The getter '{0}' isn't defined for the extension '{1}'.",
-          correction:
-              "Try correcting the name to the name of an existing getter, or "
-              "defining a getter named '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the method that is undefined
-   * 1: the name of the extension that was explicitly specified
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is used to
-  // invoke a method, but the method isn't defined by the specified extension.
-  // The analyzer also produces this diagnostic when a static method is
-  // referenced but isn't defined by the specified extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare an instance method named `b`:
-  //
-  // ```dart
-  // extension E on String {
-  //   String a() => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String b() => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').[!b!]();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare a static method named `a`:
-  //
-  // ```dart
-  // extension E on String {}
-  //
-  // var x = E.[!a!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name of the method is incorrect, then change it to the name of an
-  // existing method:
-  //
-  // ```dart
-  // extension E on String {
-  //   String a() => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String b() => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').a();
-  // }
-  // ```
-  //
-  // If the name of the method is correct, but the name of the extension is
-  // wrong, then change the name of the extension to the correct name:
-  //
-  // ```dart
-  // extension E on String {
-  //   String a() => 'a';
-  // }
-  //
-  // extension F on String {
-  //   String b() => 'b';
-  // }
-  //
-  // void f() {
-  //   F('c').b();
-  // }
-  // ```
-  //
-  // If the name of the method and extension are both correct, but the method
-  // isn't defined, then define the method:
-  //
-  // ```dart
-  // extension E on String {
-  //   String a() => 'a';
-  //   String b() => 'z';
-  // }
-  //
-  // extension F on String {
-  //   String b() => 'b';
-  // }
-  //
-  // void f() {
-  //   E('c').b();
-  // }
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_EXTENSION_METHOD =
-      CompileTimeErrorCode('UNDEFINED_EXTENSION_METHOD',
-          "The method '{0}' isn't defined for the extension '{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 that is undefined
-   * 1: the name of the extension that was explicitly specified
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an operator is invoked on a
-  // specific extension when that extension doesn't implement the operator.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't define the operator `*`:
-  //
-  // ```dart
-  // var x = E('') [!*!] 4;
-  //
-  // extension E on String {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the extension is expected to implement the operator, then add an
-  // implementation of the operator to the extension:
-  //
-  // ```dart
-  // var x = E('') * 4;
-  //
-  // extension E on String {
-  //   int operator *(int multiplier) => length * multiplier;
-  // }
-  // ```
-  //
-  // If the operator is defined by a different extension, then change the name
-  // of the extension to the name of the one that defines the operator.
-  //
-  // If the operator is defined on the argument of the extension override, then
-  // remove the extension override:
-  //
-  // ```dart
-  // var x = '' * 4;
-  //
-  // extension E on String {}
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_EXTENSION_OPERATOR =
-      CompileTimeErrorCode('UNDEFINED_EXTENSION_OPERATOR',
-          "The operator '{0}' isn't defined for the extension '{1}'.",
-          correction: "Try defining the operator '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the setter that is undefined
-   * 1: the name of the extension that was explicitly specified
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension override is used to
-  // invoke a setter, but the setter isn't defined by the specified extension.
-  // The analyzer also produces this diagnostic when a static setter is
-  // referenced but isn't defined by the specified extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare an instance setter named `b`:
-  //
-  // ```dart
-  // extension E on String {
-  //   set a(String v) {}
-  // }
-  //
-  // extension F on String {
-  //   set b(String v) {}
-  // }
-  //
-  // void f() {
-  //   E('c').[!b!] = 'd';
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the extension `E`
-  // doesn't declare a static setter named `a`:
-  //
-  // ```dart
-  // extension E on String {}
-  //
-  // void f() {
-  //   E.[!a!] = 3;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name of the setter is incorrect, then change it to the name of an
-  // existing setter:
-  //
-  // ```dart
-  // extension E on String {
-  //   set a(String v) {}
-  // }
-  //
-  // extension F on String {
-  //   set b(String v) {}
-  // }
-  //
-  // void f() {
-  //   E('c').a = 'd';
-  // }
-  // ```
-  //
-  // If the name of the setter is correct, but the name of the extension is
-  // wrong, then change the name of the extension to the correct name:
-  //
-  // ```dart
-  // extension E on String {
-  //   set a(String v) {}
-  // }
-  //
-  // extension F on String {
-  //   set b(String v) {}
-  // }
-  //
-  // void f() {
-  //   F('c').b = 'd';
-  // }
-  // ```
-  //
-  // If the name of the setter and extension are both correct, but the setter
-  // isn't defined, then define the setter:
-  //
-  // ```dart
-  // extension E on String {
-  //   set a(String v) {}
-  //   set b(String v) {}
-  // }
-  //
-  // extension F on String {
-  //   set b(String v) {}
-  // }
-  //
-  // void f() {
-  //   E('c').b = 'd';
-  // }
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_EXTENSION_SETTER =
-      CompileTimeErrorCode('UNDEFINED_EXTENSION_SETTER',
-          "The setter '{0}' isn't defined for the extension '{1}'.",
-          correction:
-              "Try correcting the name to the name of an existing setter, or "
-              "defining a setter 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 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
-  //
-  // The analyzer produces this diagnostic when a method or function invocation
-  // has a named argument, but the method or function being invoked doesn't
-  // define a parameter with the same name.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` doesn't declare a
-  // named parameter named `a`:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   m({int b}) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.m([!a!]: 1);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the argument name is mistyped, then replace it with the correct name.
-  // The example above can be fixed by changing `a` to `b`:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   m({int b}) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.m(b: 1);
-  // }
-  // ```
-  //
-  // If a subclass adds a parameter with the name in question, then cast the
-  // receiver to the subclass:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   m({int b}) {}
-  // }
-  //
-  // class D extends C {
-  //   m({int a, int b}) {}
-  // }
-  //
-  // void f(C c) {
-  //   (c as D).m(a: 1);
-  // }
-  // ```
-  //
-  // If the parameter should be added to the function, then add it:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   m({int a, int b}) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.m(a: 1);
-  // }
-  // ```
-  static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER =
-      CompileTimeErrorCode('UNDEFINED_NAMED_PARAMETER',
-          "The named parameter '{0}' isn't defined.",
-          correction:
-              "Try correcting the name to an existing named parameter's name, "
-              "or defining a named parameter with the name '{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 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);
-
-  /**
-   * 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_MEMBER',
-    "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.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNDEFINED_SUPER_GETTER',
-  );
-
-  /**
-   * 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 member (method,
-  // getter, setter, or operator) is referenced using `super`, but there’s no
-  // member with that name in the superclass chain.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `Object` doesn't define
-  // a method named `n`:
-  //
-  // ```dart
-  // class C {
-  //   void m() {
-  //     super.[!n!]();
-  //   }
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `Object` doesn't define
-  // a getter named `g`:
-  //
-  // ```dart
-  // class C {
-  //   void m() {
-  //     super.[!g!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the inherited member you intend to invoke has a different name, then
-  // make the name of the invoked member match the inherited member.
-  //
-  // If the member you intend to invoke is defined in the same class, then
-  // remove the `super.`.
-  //
-  // If the member isn’t defined, then either add the member to one of the
-  // superclasses or remove the invocation.
-  static const CompileTimeErrorCode UNDEFINED_SUPER_METHOD =
-      CompileTimeErrorCode(
-    'UNDEFINED_SUPER_MEMBER',
-    "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,
-    uniqueName: 'UNDEFINED_SUPER_METHOD',
-  );
-
-  /**
-   * 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_MEMBER',
-    "The operator '{0}' isn't defined in a superclass of '{1}'.",
-    correction: "Try defining the operator '{0}' in a superclass.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNDEFINED_SUPER_OPERATOR',
-  );
-
-  /**
-   * 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_MEMBER',
-    "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.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNDEFINED_SUPER_SETTER',
-  );
-
-  /**
-   * 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
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when code in one class references a
-  // static member in a superclass without prefixing the member's name with the
-  // name of the superclass. Static members can only be referenced without a
-  // prefix in the class in which they're declared.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the static field `x` is
-  // referenced in the getter `g` without prefixing it with the name of the
-  // defining class:
-  //
-  // ```dart
-  // class A {
-  //   static int x = 3;
-  // }
-  //
-  // class B extends A {
-  //   int get g => [!x!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Prefix the name of the static member with the name of the declaring class:
-  //
-  // ```dart
-  // class A {
-  //   static int x = 3;
-  // }
-  //
-  // class B extends A {
-  //   int get g => A.x;
-  // }
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the defining type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an undefined name is found, and
-  // the name is the same as a static member of the extended type or one of its
-  // superclasses.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` is a static member
-  // of the extended type `C`:
-  //
-  // ```dart
-  // class C {
-  //   static void m() {}
-  // }
-  //
-  // extension E on C {
-  //   void f() {
-  //     [!m!]();
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you're trying to reference a static member that's declared outside the
-  // extension, then add the name of the class or extension before the reference
-  // to the member:
-  //
-  // ```dart
-  // class C {
-  //   static void m() {}
-  // }
-  //
-  // extension E on C {
-  //   void f() {
-  //     C.m();
-  //   }
-  // }
-  // ```
-  //
-  // If you're referencing a member that isn't declared yet, add a declaration:
-  //
-  // ```dart
-  // class C {
-  //   static void m() {}
-  // }
-  //
-  // extension E on C {
-  //   void f() {
-  //     m();
-  //   }
-  //
-  //   void m() {}
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE =
-      CompileTimeErrorCode(
-          'UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE',
-          "Static members from the extended type or one of its superclasses "
-              "must be qualified by the name of the defining type.",
-          correction: "Try adding '{0}.' before the name.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the URI pointing to a non-existent file
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import, export, or part
-  // directive is found where the URI refers to a file that doesn't exist.
-  //
-  // #### Examples
-  //
-  // If the file `lib.dart` doesn't exist, the following code produces this
-  // diagnostic:
-  //
-  // ```dart
-  // import [!'lib.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the URI was mistyped or invalid, then correct the URI.
-  //
-  // If the URI is correct, then create the file.
-  static const CompileTimeErrorCode URI_DOES_NOT_EXIST = CompileTimeErrorCode(
-      'URI_DOES_NOT_EXIST', "Target of URI doesn't exist: '{0}'.",
-      correction: "Try creating the file referenced by the URI, or "
-          "Try using a URI for a file that does exist.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the URI pointing to a non-existent file
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import, export, or part
-  // directive is found where the URI refers to a file that doesn't exist and
-  // the name of the file ends with a pattern that's commonly produced by code
-  // generators, such as one of the following:
-  // - `.g.dart`
-  // - `.pb.dart`
-  // - `.pbenum.dart`
-  // - `.pbserver.dart`
-  // - `.pbjson.dart`
-  // - `.template.dart`
-  //
-  // #### Examples
-  //
-  // If the file `lib.g.dart` doesn't exist, the following code produces this
-  // diagnostic:
-  //
-  // ```dart
-  // import [!'lib.g.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the file is a generated file, then run the generator that generates the
-  // file.
-  //
-  // If the file isn't a generated file, then check the spelling of the URI or
-  // create the file.
-  static const CompileTimeErrorCode URI_HAS_NOT_BEEN_GENERATED =
-      CompileTimeErrorCode('URI_HAS_NOT_BEEN_GENERATED',
-          "Target of URI hasn't been generated: '{0}'.",
-          correction: "Try running the generator that will generate the file "
-              "referenced by the URI.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the string literal in an
-  // `import`, `export`, or `part` directive contains an interpolation. The
-  // resolution of the URIs in directives must happen before the declarations
-  // are compiled, so expressions can’t be  evaluated  while determining the
-  // values of the URIs.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the string in the
-  // `import` directive contains an interpolation:
-  //
-  // ```dart
-  // import [!'dart:$m'!];
-  //
-  // const m = 'math';
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the interpolation from the URI:
-  //
-  // ```dart
-  // import 'dart:math';
-  //
-  // var zero = min(0, 0);
-  // ```
-  static const CompileTimeErrorCode URI_WITH_INTERPOLATION =
-      CompileTimeErrorCode(
-          'URI_WITH_INTERPOLATION', "URIs can't use string interpolation.",
-          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 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
-  // %language=2.9
-  // 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
-  // %language=2.9
-  // const Object x = 0;
-  // const String y = '$x';
-  // ```
-  //
-  // If the assigned value is correct, then change the declaration to have the
-  // correct type:
-  //
-  // ```dart
-  // %language=2.9
-  // 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
-   * 2: the number of parameters found in the operator declaration
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a declaration of an operator has
-  // the wrong number of parameters.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the operator `+` must
-  // have a single parameter corresponding to the right operand:
-  //
-  // ```dart
-  // class C {
-  //   int operator [!+!](a, b) => 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add or remove parameters to match the required number:
-  //
-  // ```dart
-  // class C {
-  //   int operator +(a) => 0;
-  // }
-  // ```
-  // TODO(brianwilkerson) It would be good to add a link to the spec or some
-  //  other documentation that lists the number of parameters for each operator,
-  //  but I don't know what to link to.
-  static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR =
-      CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR',
-          "Operator '{0}' should declare exactly {1} parameters, but {2} "
-              "found.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.1.1 Operators: It is a compile time error if the arity of the
-   * user-declared operator - is not 0 or 1.
-   *
-   * Parameters:
-   * 0: the number of parameters found in the operator declaration
-   */
-  static const CompileTimeErrorCode
-      WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR',
-          "Operator '-' should declare 0 or 1 parameter, but {0} found.",
-          hasPublishedDocs: true,
-          uniqueName: 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a setter is found that doesn't
-  // declare exactly one required positional parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the setter `s` declares
-  // two required parameters:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   set [!s!](int x, int y) {}
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the setter `s` declares
-  // one optional parameter:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   set [!s!]([int x]) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the declaration so that there's exactly one required positional
-  // parameter:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   set s(int x) {}
-  // }
-  // ```
-  static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER =
-      CompileTimeErrorCode('WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER',
-          "Setters must declare exactly one required positional parameter.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the type being referenced (<i>G</i>)
-   * 1: the number of type parameters that were declared
-   * 2: the number of type arguments provided
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type that has type parameters
-  // is used and type arguments are provided, but the number of type arguments
-  // isn't the same as the number of type parameters.
-  //
-  // The analyzer also produces this diagnostic when a constructor is invoked
-  // and the number of type arguments doesn't match the number of type
-  // parameters declared for the class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `C` has one type
-  // parameter but two type arguments are provided when it is used as a type
-  // annotation:
-  //
-  // ```dart
-  // class C<E> {}
-  //
-  // void f([!C<int, int>!] x) {}
-  // ```
-  //
-  // The following code produces this diagnostic because `C` declares one type
-  // parameter, but two type arguments are provided when creating an instance:
-  //
-  // ```dart
-  // class C<E> {}
-  //
-  // var c = [!C<int, int>!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add or remove type arguments, as necessary, to match the number of type
-  // parameters defined for the type:
-  //
-  // ```dart
-  // class C<E> {}
-  //
-  // void f(C<int> x) {}
-  // ```
-  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.",
-          correction:
-              "Try adjusting the number of type arguments to match the number "
-              "of type parameters.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the number of type parameters that were declared
-   * 1: the number of type arguments provided
-   */
-  static const CompileTimeErrorCode
-      WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION = CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION',
-          "This function is declared with {0} type parameters, "
-              "but {1} type arguments were given.",
-          correction:
-              "Try adjusting the number of type arguments to match the number "
-              "of type parameters.",
-          hasPublishedDocs: true,
-          uniqueName: 'WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION');
-
-  /**
-   * Parameters:
-   * 0: the name of the class being instantiated
-   * 1: the name of the constructor being invoked
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when type arguments are provided
-  // after the name of a named constructor. Constructors can't declare type
-  // parameters, so invocations can only provide the type arguments associated
-  // with the class, and those type arguments are required to follow the name of
-  // the class rather than the name of the constructor.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameters
-  // (`<String>`) follow the name of the constructor rather than the name of the
-  // class:
-  //
-  // ```dart
-  // class C<T> {
-  //   C.named();
-  // }
-  // C f() => C.named[!<String>!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type arguments are for the class' type parameters, then move the
-  // type arguments to follow the class name:
-  //
-  // ```dart
-  // class C<T> {
-  //   C.named();
-  // }
-  // C f() => C<String>.named();
-  // ```
-  //
-  // If the type arguments aren't for the class' type parameters, then remove
-  // them:
-  //
-  // ```dart
-  // class C<T> {
-  //   C.named();
-  // }
-  // C f() => C.named();
-  // ```
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the extension being referenced
-   * 1: the number of type parameters that were declared
-   * 2: the number of type arguments provided
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension that has type
-  // parameters is used and type arguments are provided, but the number of type
-  // arguments isn't the same as the number of type parameters.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the extension `E` is
-  // declared to have a single type parameter (`T`), but the extension override
-  // has two type arguments:
-  //
-  // ```dart
-  // extension E<T> on List<T> {
-  //   int get len => length;
-  // }
-  //
-  // void f(List<int> p) {
-  //   E[!<int, String>!](p).len;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the type arguments so that there are the same number of type
-  // arguments as there are type parameters:
-  //
-  // ```dart
-  // extension E<T> on List<T> {
-  //   int get len => length;
-  // }
-  //
-  // void f(List<int> p) {
-  //   E<int>(p).len;
-  // }
-  // ```
-  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION =
-      CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION',
-          "The extension '{0}' is declared with {1} type parameters, "
-              "but {2} type arguments were given.",
-          correction: "Try adjusting the number of type arguments.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the function being referenced
-   * 1: the number of type parameters that were declared
-   * 2: the number of type arguments provided
-   */
-  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION =
-      CompileTimeErrorCode(
-          'WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION',
-          "The function '{0}' is declared with {1} type parameters, "
-              "but {2} type arguments were given.",
-          correction:
-              "Try adjusting the number of type arguments to match the number "
-              "of type parameters.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the method being referenced (<i>G</i>)
-   * 1: the number of type parameters that were declared
-   * 2: the number of type arguments provided
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function is invoked
-  // with a different number of type arguments than the number of type
-  // parameters specified in its declaration. There must either be no type
-  // arguments or the number of arguments must match the number of parameters.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the invocation of the
-  // method `m` has two type arguments, but the declaration of `m` only has one
-  // type parameter:
-  //
-  // ```dart
-  // class C {
-  //   int m<A>(A a) => 0;
-  // }
-  //
-  // int f(C c) => c.m[!<int, int>!](2);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type arguments are necessary, then make them match the number of
-  // type parameters by either adding or removing type arguments:
-  //
-  // ```dart
-  // class C {
-  //   int m<A>(A a) => 0;
-  // }
-  //
-  // int f(C c) => c.m<int>(2);
-  // ```
-  //
-  // If the type arguments aren't necessary, then remove them:
-  //
-  // ```dart
-  // class C {
-  //   int m<A>(A a) => 0;
-  // }
-  //
-  // int f(C c) => c.m(2);
-  // ```
-  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 are given.",
-          correction: "Try adjusting the number of type arguments.",
-          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'.",
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `yield` or `yield*` statement
-  // appears in a function whose body isn't marked with one of the `async*` or
-  // `sync*` modifiers.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `yield` is being used
-  // in a function whose body doesn't have a modifier:
-  //
-  // ```dart
-  // Iterable<int> get digits {
-  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `yield*` is being used
-  // in a function whose body has the `async` modifier rather than the `async*`
-  // modifier:
-  //
-  // ```dart
-  // Stream<int> get digits async {
-  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add a modifier, or change the existing modifier to be either `async*` or
-  // `sync*`:
-  //
-  // ```dart
-  // Iterable<int> get digits sync* {
-  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
-  // }
-  // ```
-  static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR =
-      CompileTimeErrorCode(
-          'YIELD_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.",
-          hasPublishedDocs: true,
-          uniqueName: 'YIELD_EACH_IN_NON_GENERATOR');
-
-  /**
-   * ?? Yield: It is a compile-time error if a yield statement appears in a
-   * function that is not a generator function.
-   * 
-   * No parameters.
-   */
-  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.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the expression after `yield`
-   * 1: the return type of the function containing the `yield`
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of object produced by a
-  // `yield` expression doesn't match the type of objects that are to be
-  // returned from the `Iterable` or `Stream` types that are returned from a
-  // generator (a function or method marked with either `sync*` or `async*`).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the getter `zero` is
-  // declared to return an `Iterable` that returns integers, but the `yield` is
-  // returning a string from the iterable:
-  //
-  // ```dart
-  // Iterable<int> get zero sync* {
-  //   yield [!'0'!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the return type of the function is correct, then fix the expression
-  // following the keyword `yield` to return the correct type:
-  //
-  // ```dart
-  // Iterable<int> get zero sync* {
-  //   yield 0;
-  // }
-  // ```
-  //
-  // If the expression following the `yield` is correct, then change the return
-  // type of the function to allow it:
-  //
-  // ```dart
-  // Iterable<String> get zero sync* {
-  //   yield '0';
-  // }
-  // ```
-  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}'.",
-          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 CompileTimeErrorCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    bool isUnresolvedIdentifier = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          isUnresolvedIdentifier: isUnresolvedIdentifier,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'CompileTimeErrorCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-/**
- * This class has experimental Language-specific codes.
- *
- * Currently it only contains codes related to implicit dynamic.
- */
-class LanguageCode extends ErrorCode {
-  /**
-   * This is appended to the end of an error message about implicit dynamic.
-   *
-   * The idea is to make sure the user is aware that this error message is the
-   * result of turning on a particular option, and they are free to turn it
-   * back off.
-   */
-  static const String _implicitDynamicCorrection =
-      "Try adding an explicit type, or remove implicit-dynamic from your "
-      "analysis options file.";
-
-  static const LanguageCode IMPLICIT_DYNAMIC_FIELD = LanguageCode(
-      'IMPLICIT_DYNAMIC_FIELD', "Missing field type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_FUNCTION = LanguageCode(
-      'IMPLICIT_DYNAMIC_FUNCTION',
-      "Missing type arguments for generic function '{0}<{1}>'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_INVOKE = LanguageCode(
-      'IMPLICIT_DYNAMIC_INVOKE',
-      "Missing type arguments for calling generic function type '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_LIST_LITERAL = LanguageCode(
-      'IMPLICIT_DYNAMIC_LIST_LITERAL',
-      "Missing type argument for list literal.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_MAP_LITERAL = LanguageCode(
-      'IMPLICIT_DYNAMIC_MAP_LITERAL', "Missing type arguments for map literal.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_METHOD = LanguageCode(
-      'IMPLICIT_DYNAMIC_METHOD',
-      "Missing type arguments for generic method '{0}<{1}>'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_PARAMETER = LanguageCode(
-      'IMPLICIT_DYNAMIC_PARAMETER', "Missing parameter type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_RETURN = LanguageCode(
-      'IMPLICIT_DYNAMIC_RETURN', "Missing return type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_TYPE = LanguageCode(
-      'IMPLICIT_DYNAMIC_TYPE', "Missing type arguments for generic type '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const LanguageCode IMPLICIT_DYNAMIC_VARIABLE = LanguageCode(
-      'IMPLICIT_DYNAMIC_VARIABLE', "Missing variable type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  @override
-  final ErrorType type = ErrorType.COMPILE_TIME_ERROR;
-
-  /**
-   * Initialize a newly created language code to have the given [type] and
-   * [name].
-   *
-   * The message associated with the code will be created from the given
-   * [message] template. The correction associated with the code will be
-   * created from the optional [correction] template.
-   */
-  const LanguageCode(String name, String message,
-      {String? correction, bool hasPublishedDocs = false})
-      : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: 'LanguageCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => type.severity;
-}
-
-/**
- * The error codes used for static 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 StaticWarningCode extends AnalyzerErrorCode {
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic in two cases.
-  //
-  // The first is when the left operand of an `??` operator can't be `null`.
-  // The right operand is only evaluated if the left operand has the value
-  // `null`, and because the left operand can't be `null`, the right operand is
-  // never evaluated.
-  //
-  // The second is when the left-hand side of an assignment using the `??=`
-  // operator can't be `null`. The right-hand side is only evaluated if the
-  // left-hand side has the value `null`, and because the left-hand side can't
-  // be `null`, the right-hand side is never evaluated.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` can't be `null`:
-  //
-  // ```dart
-  // int f(int x) {
-  //   return x ?? [!0!];
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `f` can't be `null`:
-  //
-  // ```dart
-  // class C {
-  //   int f = -1;
-  //
-  //   void m(int x) {
-  //     f ??= [!x!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the diagnostic is reported for an `??` operator, then remove the `??`
-  // operator and the right operand:
-  //
-  // ```dart
-  // int f(int x) {
-  //   return x;
-  // }
-  // ```
-  //
-  // If the diagnostic is reported for an assignment, and the assignment isn't
-  // needed, then remove the assignment:
-  //
-  // ```dart
-  // class C {
-  //   int f = -1;
-  //
-  //   void m(int x) {
-  //   }
-  // }
-  // ```
-  //
-  // If the assignment is needed, but should be based on a different condition,
-  // then rewrite the code to use `=` and the different condition:
-  //
-  // ```dart
-  // class C {
-  //   int f = -1;
-  //
-  //   void m(int x) {
-  //     if (f < 0) {
-  //       f = x;
-  //     }
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode DEAD_NULL_AWARE_EXPRESSION = StaticWarningCode(
-      '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.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the null-aware operator that is invalid
-   * 1: the non-null-aware operator that can replace the invalid operator
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a null-aware operator (`?.`,
-  // `?..`, `?[`, `?..[`, or `...?`) is used on a target that's known to be
-  // non-nullable.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `s` can't be `null`:
-  //
-  // ```dart
-  // int? getLength(String s) {
-  //   return s[!?.!]length;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `a` can't be `null`:
-  //
-  // ```dart
-  // var a = [];
-  // var b = [[!...?!]a];
-  // ```
-  //
-  // The following code produces this diagnostic because `s?.length` can't
-  // return `null`:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   s?.length[!?.!]isEven;
-  // }
-  // ```
-  //
-  // The reason `s?.length` can't return `null` is because the null-aware
-  // operator following `s` short-circuits the evaluation of both `length` and
-  // `isEven` if `s` is `null`. In other words, if `s` is `null`, then neither
-  // `length` nor `isEven` will be invoked, and if `s` is non-`null`, then
-  // `length` can't return a `null` value. Either way, `isEven` can't be invoked
-  // on a `null` value, so the null-aware operator is not necessary. See
-  // [Understanding null safety](/null-safety/understanding-null-safety#smarter-null-aware-methods)
-  // for more details.
-  //
-  // The following code produces this diagnostic because `s` can't be `null`.
-  //
-  // ```dart
-  // void f(Object? o) {
-  //   var s = o as String;
-  //   s[!?.!]length;
-  // }
-  // ```
-  //
-  // The reason `s` can't be null, despite the fact that `o` can be `null`, is
-  // because of the cast to `String`, which is a non-nullable type. If `o` ever
-  // has the value `null`, the cast will fail and the invocation of `length`
-  // will not happen.
-  //
-  // #### Common fixes
-  //
-  // Replace the null-aware operator with a non-null-aware equivalent; for
-  // example, change `?.` to  `.`:
-  //
-  // ```dart
-  // int getLength(String s) {
-  //   return s.length;
-  // }
-  // ```
-  //
-  // (Note that the return type was also changed to be non-nullable, which might
-  // not be appropriate in some cases.)
-  static const StaticWarningCode INVALID_NULL_AWARE_OPERATOR =
-      StaticWarningCode(
-          'INVALID_NULL_AWARE_OPERATOR',
-          "The receiver can't be null, so the null-aware operator '{0}' is "
-              "unnecessary.",
-          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 = StaticWarningCode(
-    'INVALID_NULL_AWARE_OPERATOR',
-    "The receiver 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,
-    uniqueName: 'INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT',
-  );
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i>, the signature of
-   * <i>m2</i> explicitly specifies a default value for a formal parameter
-   * <i>p</i> and the signature of <i>m1</i> specifies a different default value
-   * for <i>p</i>.
-   */
-  static const StaticWarningCode
-      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = StaticWarningCode(
-          '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.");
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i>, the signature of
-   * <i>m2</i> explicitly specifies a default value for a formal parameter
-   * <i>p</i> and the signature of <i>m1</i> specifies a different default value
-   * for <i>p</i>.
-   */
-  static const StaticWarningCode
-      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = StaticWarningCode(
-          'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL',
-          "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.");
-
-  /**
-   * Parameters:
-   * 0: the name of the constant that is missing
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `switch` statement for an enum
-  // doesn't include an option for one of the values in the enumeration.
-  //
-  // Note that `null` is always a possible value for an enum and therefore also
-  // must be handled.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the enum constant `e2`
-  // isn't handled:
-  //
-  // ```dart
-  // enum E { e1, e2 }
-  //
-  // void f(E e) {
-  //   [!switch (e)!] {
-  //     case E.e1:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's special handling for the missing values, then add a `case`
-  // clause for each of the missing values:
-  //
-  // ```dart
-  // enum E { e1, e2 }
-  //
-  // void f(E e) {
-  //   switch (e) {
-  //     case E.e1:
-  //       break;
-  //     case E.e2:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the missing values should be handled the same way, then add a `default`
-  // clause:
-  //
-  // ```dart
-  // enum E { e1, e2 }
-  //
-  // void f(E e) {
-  //   switch (e) {
-  //     case E.e1:
-  //       break;
-  //     default:
-  //       break;
-  //   }
-  // }
-  // ```
-  // TODO(brianwilkerson) This documentation will need to be updated when NNBD
-  //  ships.
-  static const StaticWarningCode MISSING_ENUM_CONSTANT_IN_SWITCH =
-      StaticWarningCode(
-          '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.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the operand of the `!` operator
-  // can't be `null`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` can't be `null`:
-  //
-  // ```dart
-  // int f(int x) {
-  //   return x[!!!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the null check operator (`!`):
-  //
-  // ```dart
-  // int f(int x) {
-  //   return x;
-  // }
-  // ```
-  static const StaticWarningCode UNNECESSARY_NON_NULL_ASSERTION =
-      StaticWarningCode('UNNECESSARY_NON_NULL_ASSERTION',
-          "The '!' will have no effect because the receiver can't be null.",
-          correction: "Try removing the '!' operator.", 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 StaticWarningCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    bool isUnresolvedIdentifier = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          isUnresolvedIdentifier: isUnresolvedIdentifier,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'StaticWarningCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
+export 'package:analyzer/src/error/codes.g.dart';
diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart
new file mode 100644
index 0000000..eb89966
--- /dev/null
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -0,0 +1,16058 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+import "package:analyzer/src/error/analyzer_error_code.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class CompileTimeErrorCode extends AnalyzerErrorCode {
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a field that has the `abstract`
+  // modifier also has an initializer.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `f` is marked as
+  // `abstract` and has an initializer:
+  //
+  // ```dart
+  // abstract class C {
+  //   abstract int [!f!] = 0;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `f` is marked as
+  // `abstract` and there's an initializer in the constructor:
+  //
+  // ```dart
+  // abstract class C {
+  //   abstract int f;
+  //
+  //   C() : [!f!] = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field must be abstract, then remove the initializer:
+  //
+  // ```dart
+  // abstract class C {
+  //   abstract int f;
+  // }
+  // ```
+  //
+  // If the field isn't required to be abstract, then remove the keyword:
+  //
+  // ```dart
+  // abstract class C {
+  //   int f = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
+      CompileTimeErrorCode(
+    'ABSTRACT_FIELD_INITIALIZER',
+    "Abstract fields can't have initializers.",
+    correction:
+        "Try removing the field initializer or the 'abstract' keyword from the field declaration.",
+    hasPublishedDocs: true,
+    uniqueName: 'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
+      CompileTimeErrorCode(
+    'ABSTRACT_FIELD_INITIALIZER',
+    "Abstract fields can't have initializers.",
+    correction: "Try removing the initializer or the 'abstract' keyword.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the display name for the kind of the found abstract member
+   * 1: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an inherited member is
+  // referenced using `super`, but there is no concrete implementation of the
+  // member in the superclass chain. Abstract members can't be invoked.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `B` doesn't inherit a
+  // concrete implementation of `a`:
+  //
+  // ```dart
+  // abstract class A {
+  //   int get a;
+  // }
+  // class B extends A {
+  //   int get a => super.[!a!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the invocation of the abstract member, possibly replacing it with an
+  // invocation of a concrete member.
+  // TODO(brianwilkerson) This either needs to be generalized (use 'member'
+  //  rather than '{0}') or split into multiple codes.
+  static const CompileTimeErrorCode ABSTRACT_SUPER_MEMBER_REFERENCE =
+      CompileTimeErrorCode(
+    'ABSTRACT_SUPER_MEMBER_REFERENCE',
+    "The {0} '{1}' is always abstract in the supertype.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the ambiguous element
+   * 1: the name of the first library in which the type is found
+   * 2: the name of the second library in which the type is found
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when two or more export directives
+  // cause the same name to be exported from multiple libraries.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` containing
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class C {}
+  // ```
+  //
+  // And a file named `b.dart` containing
+  //
+  // ```dart
+  // %uri="lib/b.dart"
+  // class C {}
+  // ```
+  //
+  // The following code produces this diagnostic because the name `C` is being
+  // exported from both `a.dart` and `b.dart`:
+  //
+  // ```dart
+  // export 'a.dart';
+  // export [!'b.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If none of the names in one of the libraries needs to be exported, then
+  // remove the unnecessary export directives:
+  //
+  // ```dart
+  // export 'a.dart';
+  // ```
+  //
+  // If all of the export directives are needed, then hide the name in all
+  // except one of the directives:
+  //
+  // ```dart
+  // export 'a.dart';
+  // export 'b.dart' hide C;
+  // ```
+  static const CompileTimeErrorCode AMBIGUOUS_EXPORT = CompileTimeErrorCode(
+    'AMBIGUOUS_EXPORT',
+    "The name '{0}' is defined in the libraries '{1}' and '{2}'.",
+    correction:
+        "Try removing the export of one of the libraries, or explicitly hiding the name in one of the export directives.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the first declaring extension
+   * 2: the name of the second declaring extension
+   */
+  // #### Description
+  //
+  // When code refers to a member of an object (for example, `o.m()` or `o.m` or
+  // `o[i]`) where the static type of `o` doesn't declare the member (`m` or
+  // `[]`, for example), then the analyzer tries to find the member in an
+  // extension. For example, if the member is `m`, then the analyzer looks for
+  // extensions that declare a member named `m` and have an extended type that
+  // the static type of `o` can be assigned to. When there's more than one such
+  // extension in scope, the extension whose extended type is most specific is
+  // selected.
+  //
+  // The analyzer produces this diagnostic when none of the extensions has an
+  // extended type that's more specific than the extended types of all of the
+  // other extensions, making the reference to the member ambiguous.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there's no way to
+  // choose between the member in `E1` and the member in `E2`:
+  //
+  // ```dart
+  // extension E1 on String {
+  //   int get charCount => 1;
+  // }
+  //
+  // extension E2 on String {
+  //   int get charCount => 2;
+  // }
+  //
+  // void f(String s) {
+  //   print(s.[!charCount!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need both extensions, then you can delete or hide one of them.
+  //
+  // If you need both, then explicitly select the one you want to use by using
+  // an extension override:
+  //
+  // ```dart
+  // extension E1 on String {
+  //   int get charCount => length;
+  // }
+  //
+  // extension E2 on String {
+  //   int get charCount => length;
+  // }
+  //
+  // void f(String s) {
+  //   print(E2(s).charCount);
+  // }
+  // ```
+  static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
+      CompileTimeErrorCode(
+    'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
+    "A member named '{0}' is defined in extensions {1}, and none are more specific.",
+    correction:
+        "Try using an extension override to specify the extension you want to be chosen.",
+    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
+  //
+  // Because map and set literals use the same delimiters (`{` and `}`), the
+  // analyzer looks at the type arguments and the elements to determine which
+  // kind of literal you meant. When there are no type arguments, then the
+  // analyzer uses the types of the elements. If all of the elements are literal
+  // map entries and all of the spread operators are spreading a `Map` then it's
+  // a `Map`. If none of the elements are literal map entries and all of the
+  // spread operators are spreading an `Iterable`, then it's a `Set`. If neither
+  // of those is true then it's ambiguous.
+  //
+  // The analyzer produces this diagnostic when at least one element is a
+  // literal map entry or a spread operator spreading a `Map`, and at least one
+  // element is neither of these, making it impossible for the analyzer to
+  // determine whether you are writing a map literal or a set literal.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     [!{...a, ...b, ...c}!];
+  // ```
+  //
+  // The list `b` can only be spread into a set, and the maps `a` and `c` can
+  // only be spread into a map, and the literal can't be both.
+  //
+  // #### Common fixes
+  //
+  // There are two common ways to fix this problem. The first is to remove all
+  // of the spread elements of one kind or another, so that the elements are
+  // consistent. In this case, that likely means removing the list and deciding
+  // what to do about the now unused parameter:
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     {...a, ...c};
+  // ```
+  //
+  // The second fix is to change the elements of one kind into elements that are
+  // consistent with the other elements. For example, you can add the elements
+  // of the list as keys that map to themselves:
+  //
+  // ```dart
+  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+  //     {...a, for (String s in b) s: s, ...c};
+  // ```
+  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
+      CompileTimeErrorCode(
+    'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
+    "The literal can't be either a map or a set because it contains at least one literal map entry or a spread operator spreading a 'Map', and at least one element which is neither of these.",
+    correction:
+        "Try removing or changing some of the elements so that all of the elements are consistent.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // Because map and set literals use the same delimiters (`{` and `}`), the
+  // analyzer looks at the type arguments and the elements to determine which
+  // kind of literal you meant. When there are no type arguments and all of the
+  // elements are spread elements (which are allowed in both kinds of literals)
+  // then the analyzer uses the types of the expressions that are being spread.
+  // If all of the expressions have the type `Iterable`, then it's a set
+  // literal; if they all have the type `Map`, then it's a map literal.
+  //
+  // This diagnostic is produced when none of the expressions being spread have
+  // a type that allows the analyzer to decide whether you were writing a map
+  // literal or a set literal.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // union(a, b) => [!{...a, ...b}!];
+  // ```
+  //
+  // The problem occurs because there are no type arguments, and there is no
+  // information about the type of either `a` or `b`.
+  //
+  // #### Common fixes
+  //
+  // There are three common ways to fix this problem. The first is to add type
+  // arguments to the literal. For example, if the literal is intended to be a
+  // map literal, you might write something like this:
+  //
+  // ```dart
+  // union(a, b) => <String, String>{...a, ...b};
+  // ```
+  //
+  // The second fix is to add type information so that the expressions have
+  // either the type `Iterable` or the type `Map`. You can add an explicit cast
+  // or, in this case, add types to the declarations of the two parameters:
+  //
+  // ```dart
+  // union(List<int> a, List<int> b) => {...a, ...b};
+  // ```
+  //
+  // The third fix is to add context information. In this case, that means
+  // adding a return type to the function:
+  //
+  // ```dart
+  // Set<String> union(a, b) => {...a, ...b};
+  // ```
+  //
+  // In other cases, you might add a type somewhere else. For example, say the
+  // original code looks like this:
+  //
+  // ```dart
+  // union(a, b) {
+  //   var x = [!{...a, ...b}!];
+  //   return x;
+  // }
+  // ```
+  //
+  // You might add a type annotation on `x`, like this:
+  //
+  // ```dart
+  // union(a, b) {
+  //   Map<String, String> x = {...a, ...b};
+  //   return x;
+  // }
+  // ```
+  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
+      CompileTimeErrorCode(
+    'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
+    "This literal must be either a map or a set, but the elements don't have enough information for type inference to work.",
+    correction:
+        "Try adding type arguments to the literal (one for sets, two for maps).",
+    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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // String f(String x) => x;
+  // String g(num y) => f(y.toString());
+  // ```
+  //
+  // Another approach is to add explicit type tests and fallback code:
+  //
+  // ```dart
+  // %language=2.9
+  // 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a redirecting constructor (a
+  // constructor that redirects to another constructor in the same class) has an
+  // assert in the initializer list.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the unnamed constructor
+  // is a redirecting constructor and also has an assert in the initializer
+  // list:
+  //
+  // ```dart
+  // class C {
+  //   C(int x) : [!assert(x > 0)!], this.name();
+  //   C.name() {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the assert isn't needed, then remove it:
+  //
+  // ```dart
+  // class C {
+  //   C(int x) : this.name();
+  //   C.name() {}
+  // }
+  // ```
+  //
+  // If the assert is needed, then convert the constructor into a factory
+  // constructor:
+  //
+  // ```dart
+  // class C {
+  //   factory C(int x) {
+  //     assert(x > 0);
+  //     return C.name();
+  //   }
+  //   C.name() {}
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'ASSERT_IN_REDIRECTING_CONSTRUCTOR',
+    "A redirecting constructor can't have an 'assert' initializer.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an assignment to a
+  // top-level variable, a static field, or a local variable that has the
+  // `const` modifier. The value of a compile-time constant can't be changed at
+  // runtime.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `c` is being assigned a
+  // value even though it has the `const` modifier:
+  //
+  // ```dart
+  // const c = 0;
+  //
+  // void f() {
+  //   [!c!] = 1;
+  //   print(c);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the variable must be assignable, then remove the `const` modifier:
+  //
+  // ```dart
+  // var c = 0;
+  //
+  // void f() {
+  //   c = 1;
+  //   print(c);
+  // }
+  // ```
+  //
+  // If the constant shouldn't be changed, then either remove the assignment or
+  // use a local variable in place of references to the constant:
+  //
+  // ```dart
+  // const c = 0;
+  //
+  // void f() {
+  //   var v = 1;
+  //   print(v);
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name of a function appears
+  // on the left-hand side of an assignment expression.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the assignment to the
+  // function `f` is invalid:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // void g() {
+  //   [!f!] = () {};
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the right-hand side should be assigned to something else, such as a
+  // local variable, then change the left-hand side:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // void g() {
+  //   var x = () {};
+  //   print(x);
+  // }
+  // ```
+  //
+  // If the intent is to change the implementation of the function, then define
+  // a function-valued variable instead of a function:
+  //
+  // ```dart
+  // void Function() f = () {};
+  //
+  // void g() {
+  //   f = () {};
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
+      CompileTimeErrorCode(
+    'ASSIGNMENT_TO_FUNCTION',
+    "Functions can't be assigned a value.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name of a type name appears
+  // on the left-hand side of an assignment expression.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the assignment to the
+  // class `C` is invalid:
+  //
+  // ```dart
+  // class C {}
+  //
+  // void f() {
+  //   [!C!] = null;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the right-hand side should be assigned to something else, such as a
+  // local variable, then change the left-hand side:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // void g() {
+  //   var c = null;
+  //   print(c);
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
+    'ASSIGNMENT_TO_TYPE',
+    "Types can't be assigned a value.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an async for-in loop is found in
+  // a function or method whose body isn't marked as being either `async` or
+  // `async*`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of `f` isn't
+  // marked as being either `async` or `async*`, but `f` contains an async
+  // for-in loop:
+  //
+  // ```dart
+  // void f(list) {
+  //   await for (var e [!in!] list) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function should return a `Future`, then mark the body with `async`:
+  //
+  // ```dart
+  // Future<void> f(list) async {
+  //   await for (var e in list) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  //
+  // If the function should return a `Stream` of values, then mark the body with
+  // `async*`:
+  //
+  // ```dart
+  // Stream<void> f(list) async* {
+  //   await for (var e in list) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  //
+  // If the function should be synchronous, then remove the `await` before the
+  // loop:
+  //
+  // ```dart
+  // void f(list) {
+  //   for (var e in list) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT =
+      CompileTimeErrorCode(
+    'ASYNC_FOR_IN_WRONG_CONTEXT',
+    "The async for-in loop can only be used in an async function.",
+    correction:
+        "Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for-in loop.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a local variable that has the
+  // `late` modifier uses an `await` expression in the initializer.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because an `await` expression
+  // is used in the initializer for `v`, a local variable that is marked `late`:
+  //
+  // ```dart
+  // Future<int> f() async {
+  //   late var v = [!await!] 42;
+  //   return v;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the initializer can be rewritten to not use `await`, then rewrite it:
+  //
+  // ```dart
+  // Future<int> f() async {
+  //   late var v = 42;
+  //   return v;
+  // }
+  // ```
+  //
+  // If the initializer can't be rewritten, then remove the `late` modifier:
+  //
+  // ```dart
+  // Future<int> f() async {
+  //   var v = await 42;
+  //   return v;
+  // }
+  // ```
+  static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
+      CompileTimeErrorCode(
+    'AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
+    "The 'await' expression can't be used in a 'late' local variable's initializer.",
+    correction:
+        "Try removing the 'late' modifier, or rewriting the initializer without using the 'await' expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 16.30 Await Expressions: It is a compile-time error if the function
+   * immediately enclosing _a_ is not declared asynchronous. (Where _a_ is the
+   * await expression.)
+   */
+  static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT =
+      CompileTimeErrorCode(
+    'AWAIT_IN_WRONG_CONTEXT',
+    "The await expression can only be used in an async function.",
+    correction:
+        "Try marking the function body with either 'async' or 'async*'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function has a
+  // return type that's [potentially non-nullable][] but would implicitly return
+  // `null` if control reached the end of the function.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the method `m` has an
+  // implicit return of `null` inserted at the end of the method, but the method
+  // is declared to not return `null`:
+  //
+  // ```dart
+  // class C {
+  //   int [!m!](int t) {
+  //     print(t);
+  //   }
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the method `m` has an
+  // implicit return of `null` inserted at the end of the method, but because
+  // the class `C` can be instantiated with a non-nullable type argument, the
+  // method is effectively declared to not return `null`:
+  //
+  // ```dart
+  // class C<T> {
+  //   T [!m!](T t) {
+  //     print(t);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's a reasonable value that can be returned, then add a `return`
+  // statement at the end of the method:
+  //
+  // ```dart
+  // class C<T> {
+  //   T m(T t) {
+  //     print(t);
+  //     return t;
+  //   }
+  // }
+  // ```
+  //
+  // If the method won't reach the implicit return, then add a `throw` at the
+  // end of the method:
+  //
+  // ```dart
+  // class C<T> {
+  //   T m(T t) {
+  //     print(t);
+  //     throw '';
+  //   }
+  // }
+  // ```
+  //
+  // If the method intentionally returns `null` at the end, then change the
+  // return type so that it's valid to return `null`:
+  //
+  // ```dart
+  // class C<T> {
+  //   T? m(T t) {
+  //     print(t);
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode BODY_MIGHT_COMPLETE_NORMALLY =
+      CompileTimeErrorCode(
+    'BODY_MIGHT_COMPLETE_NORMALLY',
+    "The body might complete normally, causing 'null' to be returned, but the return type is a potentially non-nullable type.",
+    correction: "Try adding either a return or a throw statement at the end.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a break in a case clause inside
+  // a switch statement has a label that is associated with another case clause.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the label `l` is
+  // associated with the case clause for `0`:
+  //
+  // ```dart
+  // void f(int i) {
+  //   switch (i) {
+  //     l: case 0:
+  //       break;
+  //     case 1:
+  //       break [!l!];
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the intent is to transfer control to the statement after the switch,
+  // then remove the label from the break statement:
+  //
+  // ```dart
+  // void f(int i) {
+  //   switch (i) {
+  //     case 0:
+  //       break;
+  //     case 1:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If the intent is to transfer control to a different case block, then use
+  // `continue` rather than `break`:
+  //
+  // ```dart
+  // void f(int i) {
+  //   switch (i) {
+  //     l: case 0:
+  //       break;
+  //     case 1:
+  //       continue l;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
+      CompileTimeErrorCode(
+    'BREAK_LABEL_ON_SWITCH_MEMBER',
+    "A break label resolves to the 'case' or 'default' statement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name used in the declaration
+  // of a class, extension, mixin, typedef, type parameter, or import prefix is
+  // a built-in identifier. Built-in identifiers can’t be used to name any of
+  // these kinds of declarations.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `mixin` is a built-in
+  // identifier:
+  //
+  // ```dart
+  // extension [!mixin!] on int {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Choose a different name for the declaration.
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_IN_DECLARATION',
+    "The built-in identifier '{0}' can't be used as an extension name.",
+    correction: "Try choosing a different name for the extension.",
+    hasPublishedDocs: true,
+    uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME',
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_IN_DECLARATION',
+    "The built-in identifier '{0}' can't be used as a prefix name.",
+    correction: "Try choosing a different name for the prefix.",
+    hasPublishedDocs: true,
+    uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME',
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a built-in identifier is used
+  // where a type name is expected.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `import` can't be used
+  // as a type because it's a built-in identifier:
+  //
+  // ```dart
+  // [!import!]<int> x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the built-in identifier with the name of a valid type:
+  //
+  // ```dart
+  // List<int> x;
+  // ```
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_AS_TYPE',
+    "The built-in identifier '{0}' can't be used as a type.",
+    correction: "Try correcting the name to match an existing type.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_IN_DECLARATION',
+    "The built-in identifier '{0}' can't be used as a typedef name.",
+    correction: "Try choosing a different name for the typedef.",
+    hasPublishedDocs: true,
+    uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_IN_DECLARATION',
+    "The built-in identifier '{0}' can't be used as a type name.",
+    correction: "Try choosing a different name for the type.",
+    hasPublishedDocs: true,
+    uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME',
+  );
+
+  /**
+   * Parameters:
+   * 0: the built-in identifier that is being used
+   */
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
+      CompileTimeErrorCode(
+    'BUILT_IN_IDENTIFIER_IN_DECLARATION',
+    "The built-in identifier '{0}' can't be used as a type parameter name.",
+    correction: "Try choosing a different name for the type parameter.",
+    hasPublishedDocs: true,
+    uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
+  );
+
+  /**
+   * 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
+  // %language=2.9
+  // void f(int x) {
+  //   switch (x) {
+  //     [!case!] 0:
+  //       x += 2;
+  //     default:
+  //       x += 1;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add one of the required terminators:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(int x) {
+  //   switch (x) {
+  //     case 0:
+  //       x += 2;
+  //       break;
+  //     default:
+  //       x += 1;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode CASE_BLOCK_NOT_TERMINATED =
+      CompileTimeErrorCode(
+    '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,
+  );
+
+  /**
+   * Parameters:
+   * 0: the this of the switch case expression
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type of the expression
+  // following the keyword `case` has an implementation of the `==` operator
+  // other than the one in `Object`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the expression
+  // following the keyword `case` (`C(0)`) has the type `C`, and the class `C`
+  // overrides the `==` operator:
+  //
+  // ```dart
+  // class C {
+  //   final int value;
+  //
+  //   const C(this.value);
+  //
+  //   bool operator ==(Object other) {
+  //     return false;
+  //   }
+  // }
+  //
+  // void f(C c) {
+  //   switch (c) {
+  //     case [!C(0)!]:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there isn't a strong reason not to do so, then rewrite the code to use
+  // an if-else structure:
+  //
+  // ```dart
+  // class C {
+  //   final int value;
+  //
+  //   const C(this.value);
+  //
+  //   bool operator ==(Object other) {
+  //     return false;
+  //   }
+  // }
+  //
+  // void f(C c) {
+  //   if (c == C(0)) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // If you can't rewrite the switch statement and the implementation of `==`
+  // isn't necessary, then remove it:
+  //
+  // ```dart
+  // class C {
+  //   final int value;
+  //
+  //   const C(this.value);
+  // }
+  //
+  // void f(C c) {
+  //   switch (c) {
+  //     case C(0):
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If you can't rewrite the switch statement and you can't remove the
+  // definition of `==`, then find some other value that can be used to control
+  // the switch:
+  //
+  // ```dart
+  // class C {
+  //   final int value;
+  //
+  //   const C(this.value);
+  //
+  //   bool operator ==(Object other) {
+  //     return false;
+  //   }
+  // }
+  //
+  // void f(C c) {
+  //   switch (c.value) {
+  //     case 0:
+  //       break;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS =
+      CompileTimeErrorCode(
+    'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
+    "The switch case expression type '{0}' can't override the '==' operator.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the case expression
+   * 1: the type of the switch expression
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the expression following `case`
+  // in a `switch` statement has a static type that isn't a subtype of the
+  // static type of the expression following `switch`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `1` is an `int`, which
+  // isn't a subtype of `String` (the type of `s`):
+  //
+  // ```dart
+  // void f(String s) {
+  //   switch (s) {
+  //     case [!1!]:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value of the `case` expression is wrong, then change the `case`
+  // expression so that it has the required type:
+  //
+  // ```dart
+  // void f(String s) {
+  //   switch (s) {
+  //     case '1':
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If the value of the `case` expression is correct, then change the `switch`
+  // expression to have the required type:
+  //
+  // ```dart
+  // void f(int s) {
+  //   switch (s) {
+  //     case 1:
+  //       break;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE =
+      CompileTimeErrorCode(
+    'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
+    "The switch case expression type '{0}' must be a subtype of the switch expression type '{1}'.",
+    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 member
+   */
+  static const CompileTimeErrorCode
+      CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER = CompileTimeErrorCode(
+    'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
+    "The instance member '{0}' can't be accessed on a class instantiation.",
+    correction: "Try changing the member name to the name of a constructor.",
+    uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const CompileTimeErrorCode
+      CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER = CompileTimeErrorCode(
+    'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
+    "The static member '{0}' can't be accessed on a class instantiation.",
+    correction:
+        "Try removing the type arguments from the class name, or changing the member name to the name of a constructor.",
+    uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const CompileTimeErrorCode
+      CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER = CompileTimeErrorCode(
+    'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
+    "The class '{0} doesn't have a constructor named '{1}.",
+    correction:
+        "Try invoking a different constructor, or defining a constructor named '{1}'.",
+    uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER',
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the constructor and field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a named constructor and either a
+  // static method or static field have the same name. Both are accessed using
+  // the name of the class, so having the same name makes the reference
+  // ambiguous.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the static field `foo`
+  // and the named constructor `foo` have the same name:
+  //
+  // ```dart
+  // class C {
+  //   C.[!foo!]();
+  //   static int foo = 0;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the static method `foo`
+  // and the named constructor `foo` have the same name:
+  //
+  // ```dart
+  // class C {
+  //   C.[!foo!]();
+  //   static void foo() {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rename either the member or the constructor.
+  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
+      CompileTimeErrorCode(
+    'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
+    "'{0}' can't be used to name both a constructor and a static field in this class.",
+    correction: "Try renaming either the constructor or the field.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the constructor and getter
+   */
+  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER =
+      CompileTimeErrorCode(
+    'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
+    "'{0}' can't be used to name both a constructor and a static getter in this class.",
+    correction: "Try renaming either the constructor or the getter.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the constructor
+   */
+  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
+      CompileTimeErrorCode(
+    'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
+    "'{0}' can't be used to name both a constructor and a static method in this class.",
+    correction: "Try renaming either the constructor or the method.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the constructor and setter
+   */
+  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER =
+      CompileTimeErrorCode(
+    'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
+    "'{0}' can't be used to name both a constructor and a static setter in this class.",
+    correction: "Try renaming either the constructor or the setter.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER',
+  );
+
+  /**
+   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+   * error if `C` declares a getter or a setter with basename `n`, and has a
+   * method named `n`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the conflicting field
+   * 1: the name of the conflicting field
+   * 2: the name of the class defining the method with which the field conflicts
+   */
+  static const CompileTimeErrorCode CONFLICTING_FIELD_AND_METHOD =
+      CompileTimeErrorCode(
+    'CONFLICTING_FIELD_AND_METHOD',
+    "Class '{0}' can't define field '{1}' and have method '{2}.{1}' with the same name.",
+    correction:
+        "Try converting the getter to a method, or renaming the field to a name that doesn't conflict.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class implementing the conflicting interface
+   * 1: the first conflicting type
+   * 2: the second conflicting type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class attempts to implement a
+  // generic interface multiple times, and the values of the type arguments
+  // aren't the same.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `C` is defined to
+  // implement both `I<int>` (because it extends `A`) and `I<String>` (because
+  // it implements`B`), but `int` and `String` aren't the same type:
+  //
+  // ```dart
+  // class I<T> {}
+  // class A implements I<int> {}
+  // class B implements I<String> {}
+  // class [!C!] extends A implements B {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rework the type hierarchy to avoid this situation. For example, you might
+  // make one or both of the inherited types generic so that `C` can specify the
+  // same type for both type arguments:
+  //
+  // ```dart
+  // class I<T> {}
+  // class A<S> implements I<S> {}
+  // class B implements I<String> {}
+  // class C extends A<String> implements B {}
+  // ```
+  static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
+      CompileTimeErrorCode(
+    'CONFLICTING_GENERIC_INTERFACES',
+    "The class '{0}' can't implement both '{1}' and '{2}' because the type arguments are different.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+   * error if `C` declares a method named `n`, and has a getter or a setter
+   * with basename `n`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the conflicting method
+   * 1: the name of the conflicting method
+   * 2: the name of the class defining the field with which the method conflicts
+   */
+  static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
+      CompileTimeErrorCode(
+    'CONFLICTING_METHOD_AND_FIELD',
+    "Class '{0}' can't define method '{1}' and have field '{2}.{1}' with the same name.",
+    correction:
+        "Try converting the method to a getter, or renaming the method to a name that doesn't conflict.",
+  );
+
+  /**
+   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+   * error if `C` declares a static member with basename `n`, and has an
+   * instance member with basename `n`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the conflicting member
+   * 1: the name of the conflicting static member
+   * 2: the name of the class defining the field with which the method conflicts
+   */
+  static const CompileTimeErrorCode CONFLICTING_STATIC_AND_INSTANCE =
+      CompileTimeErrorCode(
+    'CONFLICTING_STATIC_AND_INSTANCE',
+    "Class '{0}' can't define static member '{1}' and have instance member '{2}.{1}' with the same name.",
+    correction: "Try renaming the member to a name that doesn't conflict.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class, mixin, or extension
+  // declaration declares a type parameter with the same name as the class,
+  // mixin, or extension that declares it.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type parameter `C`
+  // has the same name as the class `C` of which it's a part:
+  //
+  // ```dart
+  // class C<[!C!]> {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rename either the type parameter, or the class, mixin, or extension:
+  //
+  // ```dart
+  // class C<T> {}
+  // ```
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
+    "'{0}' can't be used to name both a type variable and the class in which the type variable is defined.",
+    correction: "Try renaming either the type variable or the class.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_EXTENSION =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
+    "'{0}' can't be used to name both a type variable and the extension in which the type variable is defined.",
+    correction: "Try renaming either the type variable or the extension.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class, mixin, or extension
+  // declaration declares a type parameter with the same name as one of the
+  // members of the class, mixin, or extension that declares it.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type parameter `T`
+  // has the same name as the field `T`:
+  //
+  // ```dart
+  // class C<[!T!]> {
+  //   int T = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rename either the type parameter or the member with which it conflicts:
+  //
+  // ```dart
+  // class C<T> {
+  //   int total = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
+    "'{0}' can't be used to name both a type variable and a member in this class.",
+    correction: "Try renaming either the type variable or the member.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode
+      CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION = CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
+    "'{0}' can't be used to name both a type variable and a member in this extension.",
+    correction: "Try renaming either the type variable or the member.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
+    "'{0}' can't be used to name both a type variable and a member in this mixin.",
+    correction: "Try renaming either the type variable or the member.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type variable
+   */
+  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
+      CompileTimeErrorCode(
+    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
+    "'{0}' can't be used to name both a type variable and the mixin in which the type variable is defined.",
+    correction: "Try renaming either the type variable or the mixin.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
+  );
+
+  /**
+   * 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.",
+    correction:
+        "Try removing the throw statement, or removing the keyword 'const'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor has the keyword
+  // `const`, but a field in the class is initialized to a non-constant value.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field `s` is
+  // initialized to a non-constant value:
+  //
+  // ```dart
+  // class C {
+  //   final String s = 3.toString();
+  //   [!const!] C();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field can be initialized to a constant value, then change the
+  // initializer to a constant expression:
+  //
+  // ```dart
+  // class C {
+  //   final String s = '3';
+  //   const C();
+  // }
+  // ```
+  //
+  // If the field can't be initialized to a constant value, then remove the
+  // keyword `const` from the constructor:
+  //
+  // ```dart
+  // class C {
+  //   final String s = 3.toString();
+  //   C();
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
+    "Can't define the 'const' constructor because the field '{0}' is initialized with a non-constant value.",
+    correction:
+        "Try initializing the field to a constant value, or removing the keyword 'const' from the constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
+   * or implicitly, in the initializer list of a constant constructor must
+   * specify a constant constructor of the superclass of the immediately
+   * enclosing class or a compile-time error occurs.
+   *
+   * 12.1 Mixin Application: For each generative constructor named ... an
+   * implicitly declared constructor named ... is declared. If Sq is a
+   * generative const constructor, and M does not declare any fields, Cq is
+   * also a const constructor.
+   *
+   * Parameters:
+   * 0: the name of the instance field.
+   */
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
+    "This constructor can't be declared 'const' because a mixin adds the instance field: {0}.",
+    correction:
+        "Try removing the 'const' keyword or removing the 'with' clause from the class declaration, or removing the field from the mixin class.",
+  );
+
+  /**
+   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
+   * or implicitly, in the initializer list of a constant constructor must
+   * specify a constant constructor of the superclass of the immediately
+   * enclosing class or a compile-time error occurs.
+   *
+   * 12.1 Mixin Application: For each generative constructor named ... an
+   * implicitly declared constructor named ... is declared. If Sq is a
+   * generative const constructor, and M does not declare any fields, Cq is
+   * also a const constructor.
+   *
+   * Parameters:
+   * 0: the names of the instance fields.
+   */
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
+    "This constructor can't be declared 'const' because the mixins add the instance fields: {0}.",
+    correction:
+        "Try removing the 'const' keyword or removing the 'with' clause from the class declaration, or removing the fields from the mixin classes.",
+    uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the superclass
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor that is marked as
+  // `const` invokes a constructor from its superclass that isn't marked as
+  // `const`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the `const` constructor
+  // in `B` invokes the constructor `nonConst` from the class `A`, and the
+  // superclass constructor isn't a `const` constructor:
+  //
+  // ```dart
+  // class A {
+  //   const A();
+  //   A.nonConst();
+  // }
+  //
+  // class B extends A {
+  //   const B() : [!super.nonConst()!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it isn't essential to invoke the superclass constructor that is
+  // currently being invoked, then invoke a constant constructor from the
+  // superclass:
+  //
+  // ```dart
+  // class A {
+  //   const A();
+  //   A.nonConst();
+  // }
+  //
+  // class B extends A {
+  //   const B() : super();
+  // }
+  // ```
+  //
+  // If it's essential that the current constructor be invoked and if you can
+  // modify it, then add `const` to the constructor in the superclass:
+  //
+  // ```dart
+  // class A {
+  //   const A();
+  //   const A.nonConst();
+  // }
+  //
+  // class B extends A {
+  //   const B() : super.nonConst();
+  // }
+  // ```
+  //
+  // If it's essential that the current constructor be invoked and you can't
+  // modify it, then remove `const` from the constructor in the subclass:
+  //
+  // ```dart
+  // class A {
+  //   const A();
+  //   A.nonConst();
+  // }
+  //
+  // class B extends A {
+  //   B() : super.nonConst();
+  // }
+  // ```
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
+    "A constant constructor can't call a non-constant super constructor of '{0}'.",
+    correction:
+        "Try calling a constant constructor in the superclass, or removing the keyword 'const' from the constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor is marked as a
+  // const constructor, but the constructor is defined in a class that has at
+  // least one non-final instance field (either directly or by inheritance).
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field `x` isn't
+  // final:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   const [!C!](this.x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it's possible to mark all of the fields as final, then do so:
+  //
+  // ```dart
+  // class C {
+  //   final int x;
+  //
+  //   const C(this.x);
+  // }
+  // ```
+  //
+  // If it isn't possible to mark all of the fields as final, then remove the
+  // keyword `const` from the constructor:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD',
+    "Can't define a const constructor for a class with non-final fields.",
+    correction:
+        "Try making all of the fields final, or removing the keyword 'const' from the constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class from a library that is
+  // imported using a deferred import is used to create a `const` object.
+  // Constants are evaluated at compile time, and classes from deferred
+  // libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because it attempts to create a
+  // `const` instance of a class from a deferred library:
+  //
+  // ```dart
+  // import 'dart:convert' deferred as convert;
+  //
+  // const json2 = [!convert.JsonCodec()!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the object isn't required to be a constant, then change the code so that
+  // a non-constant instance is created:
+  //
+  // ```dart
+  // import 'dart:convert' deferred as convert;
+  //
+  // final json2 = convert.JsonCodec();
+  // ```
+  //
+  // If the object must be a constant, then remove `deferred` from the import
+  // directive:
+  //
+  // ```dart
+  // import 'dart:convert' as convert;
+  //
+  // const json2 = convert.JsonCodec();
+  // ```
+  static const CompileTimeErrorCode CONST_DEFERRED_CLASS = CompileTimeErrorCode(
+    'CONST_DEFERRED_CLASS',
+    "Deferred classes can't be created with 'const'.",
+    correction:
+        "Try using 'new' to create the instance, or changing the import to not be deferred.",
+    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_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.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_BOOL',
+    "In constant expressions, operands of this operator must be of type 'bool'.",
+  );
+
+  /**
+   * 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.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_INT =
+      CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_BOOL_INT',
+    "In constant expressions, operands of this operator must be of type 'bool' or 'int'.",
+  );
+
+  /**
+   * 16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
+   * e1 and e2 are constant expressions that evaluate to a numeric, string or
+   * boolean value or to null.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING =
+      CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_BOOL_NUM_STRING',
+    "In constant expressions, operands of this operator must be of type 'bool', 'num', 'String' or 'null'.",
+  );
+
+  /**
+   * 16.12.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2,
+   * e1 | e2, e1 >> e2 or e1 << e2, where e, e1 and e2 are constant expressions
+   * that evaluate to an integer value or to null.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_INT',
+    "In constant expressions, operands of this operator must be of type 'int'.",
+  );
+
+  /**
+   * 16.12.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1
+   * e2, e1 / e2, e1 ~/ e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2,
+   * where e, e1 and e2 are constant expressions that evaluate to a numeric
+   * value or to null.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_NUM',
+    "In constant expressions, operands of this operator must be of type 'num'.",
+  );
+
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE = CompileTimeErrorCode(
+    'CONST_EVAL_TYPE_TYPE',
+    "In constant expressions, operands of this operator must be of type 'Type'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type of the initializer expression
+   * 1: the name of the type of the field
+   */
+  static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+    '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",
+    hasPublishedDocs: true,
+    uniqueName: 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a value that isn't statically
+  // known to be a constant is assigned to a variable that's declared to be a
+  // `const` variable.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` isn't declared to
+  // be `const`:
+  //
+  // ```dart
+  // var x = 0;
+  // const y = [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value being assigned can be declared to be `const`, then change the
+  // declaration:
+  //
+  // ```dart
+  // const x = 0;
+  // const y = x;
+  // ```
+  //
+  // If the value can't be declared to be `const`, then remove the `const`
+  // modifier from the variable, possibly using `final` in its place:
+  //
+  // ```dart
+  // var x = 0;
+  // final y = x;
+  // ```
+  static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
+      CompileTimeErrorCode(
+    'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE',
+    "Const variables must be initialized with a constant value.",
+    correction: "Try changing the initializer to be a constant expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `const` variable is
+  // initialized using a `const` variable from a library that is imported using
+  // a deferred import. Constants are evaluated at compile time, and values from
+  // deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the variable `pi` is
+  // being initialized using the constant `math.pi` from the library
+  // `dart:math`, and `dart:math` is imported as a deferred library:
+  //
+  // ```dart
+  // import 'dart:math' deferred as math;
+  //
+  // const pi = [!math.pi!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the value of the constant from the imported
+  // library, then remove the keyword `deferred`:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // const pi = math.pi;
+  // ```
+  //
+  // If you don't need to reference the imported constant, then remove the
+  // reference:
+  //
+  // ```dart
+  // const pi = 3.14;
+  // ```
+  static const CompileTimeErrorCode
+      CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used to initialize a 'const' variable.",
+    correction:
+        "Try initializing the variable without referencing members of the deferred library, or changing the import to not be deferred.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance field is marked as
+  // being const.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is an instance
+  // field:
+  //
+  // ```dart
+  // class C {
+  //   [!const!] int f = 3;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field needs to be an instance field, then remove the keyword
+  // `const`, or replace it with `final`:
+  //
+  // ```dart
+  // class C {
+  //   final int f = 3;
+  // }
+  // ```
+  //
+  // If the field really should be a const field, then make it a static field:
+  //
+  // ```dart
+  // class C {
+  //   static const int f = 3;
+  // }
+  // ```
+  static const CompileTimeErrorCode CONST_INSTANCE_FIELD = CompileTimeErrorCode(
+    'CONST_INSTANCE_FIELD',
+    "Only static fields can be declared as const.",
+    correction:
+        "Try declaring the field as final, or adding the keyword 'static'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the entry's key
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the class of object used as a
+  // key in a constant map literal implements the `==` operator. The
+  // implementation of constant maps uses the `==` operator, so any
+  // implementation other than the one inherited from `Object` requires
+  // executing arbitrary code at compile time, which isn't supported.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constant map
+  // contains a key whose type is `C`, and the class `C` overrides the
+  // implementation of `==`:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  //
+  //   bool operator ==(Object other) => true;
+  // }
+  //
+  // const map = {[!C()!] : 0};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you can remove the implementation of `==` from the class, then do so:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  // }
+  //
+  // const map = {C() : 0};
+  // ```
+  //
+  // If you can't remove the implementation of `==` from the class, then make
+  // the map be non-constant:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  //
+  //   bool operator ==(Object other) => true;
+  // }
+  //
+  // final map = {C() : 0};
+  // ```
+  static const CompileTimeErrorCode
+      CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = CompileTimeErrorCode(
+    'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
+    "The type of a key in a constant map can't override the '==' operator, but the class '{0}' does.",
+    correction:
+        "Try using a different value for the key, or removing the keyword 'const' from the map.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the uninitialized final variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a variable that is declared to
+  // be a constant doesn't have an initializer.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `c` isn't initialized:
+  //
+  // ```dart
+  // const [!c!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an initializer:
+  //
+  // ```dart
+  // const c = 'c';
+  // ```
+  static const CompileTimeErrorCode CONST_NOT_INITIALIZED =
+      CompileTimeErrorCode(
+    'CONST_NOT_INITIALIZED',
+    "The constant '{0}' must be initialized.",
+    correction: "Try adding an initialization to the declaration.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the element
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the class of object used as an
+  // element in a constant set literal implements the `==` operator. The
+  // implementation of constant sets uses the `==` operator, so any
+  // implementation other than the one inherited from `Object` requires
+  // executing arbitrary code at compile time, which isn't supported.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constant set
+  // contains an element whose type is `C`, and the class `C` overrides the
+  // implementation of `==`:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  //
+  //   bool operator ==(Object other) => true;
+  // }
+  //
+  // const set = {[!C()!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you can remove the implementation of `==` from the class, then do so:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  // }
+  //
+  // const set = {C()};
+  // ```
+  //
+  // If you can't remove the implementation of `==` from the class, then make
+  // the set be non-constant:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  //
+  //   bool operator ==(Object other) => true;
+  // }
+  //
+  // final set = {C()};
+  // ```
+  static const CompileTimeErrorCode CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS =
+      CompileTimeErrorCode(
+    'CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS',
+    "The type of an element in a constant set can't override the '==' operator, but the type '{0}' does.",
+    correction:
+        "Try using a different value for the element, or removing the keyword 'const' from the set.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the expression of a spread
+  // operator in a constant list or set evaluates to something other than a list
+  // or a set.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the value of `list1` is
+  // `null`, which is neither a list nor a set:
+  //
+  // ```dart
+  // %language=2.9
+  // const List<int> list1 = null;
+  // const List<int> list2 = [...[!list1!]];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the expression to something that evaluates to either a constant list
+  // or a constant set:
+  //
+  // ```dart
+  // %language=2.9
+  // const List<int> list1 = [];
+  // const List<int> list2 = [...list1];
+  // ```
+  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_LIST_OR_SET =
+      CompileTimeErrorCode(
+    'CONST_SPREAD_EXPECTED_LIST_OR_SET',
+    "A list or a set is expected in this spread.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the expression of a spread
+  // operator in a constant map evaluates to something other than a map.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the value of `map1` is
+  // `null`, which isn't a map:
+  //
+  // ```dart
+  // %language=2.9
+  // const Map<String, int> map1 = null;
+  // const Map<String, int> map2 = {...[!map1!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the expression to something that evaluates to a constant map:
+  //
+  // ```dart
+  // %language=2.9
+  // const Map<String, int> map1 = {};
+  // const Map<String, int> map2 = {...map1};
+  // ```
+  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_MAP =
+      CompileTimeErrorCode(
+    'CONST_SPREAD_EXPECTED_MAP',
+    "A map is expected in this spread.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the keyword `const` is used to
+  // invoke a constructor that isn't marked with `const`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the constructor in `A`
+  // isn't a const constructor:
+  //
+  // ```dart
+  // class A {
+  //   A();
+  // }
+  //
+  // A f() => [!const!] A();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it's desirable and possible to make the class a constant class (by
+  // making all of the fields of the class, including inherited fields, final),
+  // then add the keyword `const` to the constructor:
+  //
+  // ```dart
+  // class A {
+  //   const A();
+  // }
+  //
+  // A f() => const A();
+  // ```
+  //
+  // Otherwise, remove the keyword `const`:
+  //
+  // ```dart
+  // class A {
+  //   A();
+  // }
+  //
+  // A f() => A();
+  // ```
+  static const CompileTimeErrorCode CONST_WITH_NON_CONST = CompileTimeErrorCode(
+    'CONST_WITH_NON_CONST',
+    "The constructor being called isn't a const constructor.",
+    correction: "Try removing 'const' from the constructor invocation.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a const constructor is invoked
+  // with an argument that isn't a constant expression.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `i` isn't a constant:
+  //
+  // ```dart
+  // class C {
+  //   final int i;
+  //   const C(this.i);
+  // }
+  // C f(int i) => const C([!i!]);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either make all of the arguments constant expressions, or remove the
+  // `const` keyword to use the non-constant form of the constructor:
+  //
+  // ```dart
+  // class C {
+  //   final int i;
+  //   const C(this.i);
+  // }
+  // C f(int i) => C(i);
+  // ```
+  static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT =
+      CompileTimeErrorCode(
+    'CONST_WITH_NON_CONSTANT_ARGUMENT',
+    "Arguments of a constant creation must be constant expressions.",
+    correction:
+        "Try making the argument a valid constant, or use 'new' to call the constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the non-type element
+   */
+  static const CompileTimeErrorCode CONST_WITH_NON_TYPE = CompileTimeErrorCode(
+    'CREATION_WITH_NON_TYPE',
+    "The name '{0}' isn't a class.",
+    correction: "Try correcting the name to match an existing class.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+    uniqueName: 'CONST_WITH_NON_TYPE',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type parameter is used as a
+  // type argument in a `const` invocation of a constructor. This isn't allowed
+  // because the value of the type parameter (the actual type that will be used
+  // at runtime) can't be known at compile time.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type parameter `T`
+  // is being used as a type argument when creating a constant:
+  //
+  // ```dart
+  // class C<T> {
+  //   const C();
+  // }
+  //
+  // C<T> newC<T>() => const C<[!T!]>();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type that will be used for the type parameter can be known at
+  // compile time, then remove the use of the type parameter:
+  //
+  // ```dart
+  // class C<T> {
+  //   const C();
+  // }
+  //
+  // C<int> newC() => const C<int>();
+  // ```
+  //
+  // If the type that will be used for the type parameter can't be known until
+  // runtime, then remove the keyword `const`:
+  //
+  // ```dart
+  // class C<T> {
+  //   const C();
+  // }
+  //
+  // C<T> newC<T>() => C<T>();
+  // ```
+  static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS =
+      CompileTimeErrorCode(
+    'CONST_WITH_TYPE_PARAMETERS',
+    "A constant creation can't use a type parameter as a type argument.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF = CompileTimeErrorCode(
+    'CONST_WITH_TYPE_PARAMETERS',
+    "A constant constructor tearoff can't use a type parameter as a type argument.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF = CompileTimeErrorCode(
+    'CONST_WITH_TYPE_PARAMETERS',
+    "A constant function tearoff can't use a type parameter as a type argument.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+    uniqueName: 'CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF',
+  );
+
+  /**
+   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
+   * a constant constructor declared by the type <i>T</i>.
+   *
+   * Parameters:
+   * 0: the name of the type
+   * 1: the name of the requested constant constructor
+   */
+  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'CONST_WITH_UNDEFINED_CONSTRUCTOR',
+    "The class '{0}' doesn't have a constant constructor '{1}'.",
+    correction: "Try calling a different constructor.",
+  );
+
+  /**
+   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
+   * a constant constructor declared by the type <i>T</i>.
+   *
+   * Parameters:
+   * 0: the name of the type
+   */
+  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
+      CompileTimeErrorCode(
+    'CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
+    "The class '{0}' doesn't have an unnamed constant constructor.",
+    correction: "Try calling a different constructor.",
+  );
+
+  static const CompileTimeErrorCode CONTINUE_LABEL_ON_SWITCH =
+      CompileTimeErrorCode(
+    'CONTINUE_LABEL_ON_SWITCH',
+    "A continue label resolves to switch, must be loop or switch member",
+  );
+
+  /**
+   * 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}",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a use of the default
+  // constructor for the class `List` in code that has opted in to null safety.
+  //
+  // #### Example
+  //
+  // Assuming the following code is opted in to null safety, it produces this
+  // diagnostic because it uses the default `List` constructor:
+  //
+  // ```dart
+  // var l = [!List<int>!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If no initial size is provided, then convert the code to use a list
+  // literal:
+  //
+  // ```dart
+  // var l = <int>[];
+  // ```
+  //
+  // If an initial size needs to be provided and there is a single reasonable
+  // initial value for the elements, then use `List.filled`:
+  //
+  // ```dart
+  // var l = List.filled(3, 0);
+  // ```
+  //
+  // If an initial size needs to be provided but each element needs to be
+  // computed, then use `List.generate`:
+  //
+  // ```dart
+  // var l = List.generate(3, (i) => i);
+  // ```
+  static const CompileTimeErrorCode DEFAULT_LIST_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'DEFAULT_LIST_CONSTRUCTOR',
+    "The default 'List' constructor isn't available when null safety is enabled.",
+    correction: "Try using a list literal, 'List.filled' or 'List.generate'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a factory constructor that
+  // redirects to another constructor specifies a default value for an optional
+  // parameter.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the factory constructor
+  // in `A` has a default value for the optional parameter `x`:
+  //
+  // ```dart
+  // class A {
+  //   factory A([int [!x!] = 0]) = B;
+  // }
+  //
+  // class B implements A {
+  //   B([int x = 1]) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the default value from the factory constructor:
+  //
+  // ```dart
+  // class A {
+  //   factory A([int x]) = B;
+  // }
+  //
+  // class B implements A {
+  //   B([int x = 1]) {}
+  // }
+  // ```
+  //
+  // Note that this fix might change the value used when the optional parameter
+  // is omitted. If that happens, and if that change is a problem, then consider
+  // making the optional parameter a required parameter in the factory method:
+  //
+  // ```dart
+  // class A {
+  //  factory A(int x) = B;
+  // }
+  //
+  // class B implements A {
+  //   B([int x = 1]) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR = CompileTimeErrorCode(
+    'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR',
+    "Default values aren't allowed in factory constructors that redirect to another constructor.",
+    correction: "Try removing the default value.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a named parameter has both the
+  // `required` modifier and a default value. If the parameter is required, then
+  // a value for the parameter is always provided at the call sites, so the
+  // default value can never be used.
+  //
+  // #### Examples
+  //
+  // The following code generates this diagnostic:
+  //
+  // ```dart
+  // void log({required String [!message!] = 'no message'}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the parameter is really required, then remove the default value:
+  //
+  // ```dart
+  // void log({required String message}) {}
+  // ```
+  //
+  // If the parameter isn't always required, then remove the `required`
+  // modifier:
+  //
+  // ```dart
+  // void log({String message = 'no message'}) {}
+  // ```
+  static const CompileTimeErrorCode DEFAULT_VALUE_ON_REQUIRED_PARAMETER =
+      CompileTimeErrorCode(
+    'DEFAULT_VALUE_ON_REQUIRED_PARAMETER',
+    "Required named parameters can't have a default value.",
+    correction:
+        "Try removing either the default value or the 'required' modifier.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library that is imported using
+  // a deferred import declares an extension that is visible in the importing
+  // library. Extension methods are resolved at compile time, and extensions
+  // from deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines a named extension:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class C {}
+  //
+  // extension E on String {
+  //   int get size => length;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the named extension is
+  // visible to the library:
+  //
+  // ```dart
+  // import [!'a.dart'!] deferred as a;
+  //
+  // void f() {
+  //   a.C();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the library must be imported as `deferred`, then either add a `show`
+  // clause listing the names being referenced or add a `hide` clause listing
+  // all of the named extensions. Adding a `show` clause would look like this:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a show C;
+  //
+  // void f() {
+  //   a.C();
+  // }
+  // ```
+  //
+  // Adding a `hide` clause would look like this:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a hide E;
+  //
+  // void f() {
+  //   a.C();
+  // }
+  // ```
+  //
+  // With the first fix, the benefit is that if new extensions are added to the
+  // imported library, then the extensions won't cause a diagnostic to be
+  // generated.
+  //
+  // If the library doesn't need to be imported as `deferred`, or if you need to
+  // make use of the extension method declared in it, then remove the keyword
+  // `deferred`:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // void f() {
+  //   a.C();
+  // }
+  // ```
+  static const CompileTimeErrorCode DEFERRED_IMPORT_OF_EXTENSION =
+      CompileTimeErrorCode(
+    'DEFERRED_IMPORT_OF_EXTENSION',
+    "Imports of deferred libraries must hide all extensions.",
+    correction:
+        "Try adding either a show combinator listing the names you need to reference or a hide combinator listing all of the extensions.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the variable that is invalid
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when [definite assignment][] analysis
+  // shows that a local variable that's marked as `late` is read before being
+  // assigned.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` wasn't assigned a
+  // value before being read:
+  //
+  // ```dart
+  // void f(bool b) {
+  //   late int x;
+  //   print([!x!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Assign a value to the variable before reading from it:
+  //
+  // ```dart
+  // void f(bool b) {
+  //   late int x;
+  //   x = b ? 1 : 0;
+  //   print(x);
+  // }
+  // ```
+  static const CompileTimeErrorCode DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE =
+      CompileTimeErrorCode(
+    'DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE',
+    "The late local variable '{0}' is definitely unassigned at this point.",
+    correction: "Ensure that it is assigned on necessary execution paths.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode DISALLOWED_TYPE_INSTANTIATION_EXPRESSION =
+      CompileTimeErrorCode(
+    'DISALLOWED_TYPE_INSTANTIATION_EXPRESSION',
+    "Only a generic type, generic function, generic instance method, or generic constructor can be type instantiated.",
+    correction:
+        "Try instantiating the type(s) of a generic type, generic function, generic instance method, or generic constructor.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class declares more than one
+  // unnamed constructor or when it declares more than one constructor with the
+  // same name.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there are two
+  // declarations for the unnamed constructor:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  //
+  //   [!C!]();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because there are two
+  // declarations for the constructor named `m`:
+  //
+  // ```dart
+  // class C {
+  //   C.m();
+  //
+  //   [!C.m!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there are multiple unnamed constructors and all of the constructors are
+  // needed, then give all of them, or all except one of them, a name:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  //
+  //   C.n();
+  // }
+  // ```
+  //
+  // If there are multiple unnamed constructors and all except one of them are
+  // unneeded, then remove the constructors that aren't needed:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  // }
+  // ```
+  //
+  // If there are multiple named constructors and all of the constructors are
+  // needed, then rename all except one of them:
+  //
+  // ```dart
+  // class C {
+  //   C.m();
+  //
+  //   C.n();
+  // }
+  // ```
+  //
+  // If there are multiple named constructors and all except one of them are
+  // unneeded, then remove the constructorsthat aren't needed:
+  //
+  // ```dart
+  // class C {
+  //   C.m();
+  // }
+  // ```
+  static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT =
+      CompileTimeErrorCode(
+    'DUPLICATE_CONSTRUCTOR',
+    "The unnamed constructor is already defined.",
+    correction: "Try giving one of the constructors a name.",
+    hasPublishedDocs: true,
+    uniqueName: 'DUPLICATE_CONSTRUCTOR_DEFAULT',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the duplicate entity
+   */
+  static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_NAME =
+      CompileTimeErrorCode(
+    'DUPLICATE_CONSTRUCTOR',
+    "The constructor with name '{0}' is already defined.",
+    correction: "Try renaming one of the constructors.",
+    hasPublishedDocs: true,
+    uniqueName: 'DUPLICATE_CONSTRUCTOR_NAME',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the duplicate entity
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name is declared, and there is
+  // a previous declaration with the same name in the same scope.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `x` is
+  // declared twice:
+  //
+  // ```dart
+  // int x = 0;
+  // int [!x!] = 1;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Choose a different name for one of the declarations.
+  //
+  // ```dart
+  // int x = 0;
+  // int y = 1;
+  // ```
+  static const CompileTimeErrorCode DUPLICATE_DEFINITION = CompileTimeErrorCode(
+    'DUPLICATE_DEFINITION',
+    "The name '{0}' is already defined.",
+    correction: "Try renaming one of the declarations.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's more than one field
+  // formal parameter for the same field in a constructor's parameter list. It
+  // isn't useful to assign a value that will immediately be overwritten.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `this.f` appears twice
+  // in the parameter list:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f, this.[!f!]) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove one of the field formal parameters:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode DUPLICATE_FIELD_FORMAL_PARAMETER =
+      CompileTimeErrorCode(
+    'DUPLICATE_FIELD_FORMAL_PARAMETER',
+    "The field '{0}' can't be initialized by multiple parameters in the same constructor.",
+    correction:
+        "Try removing one of the parameters, or using different fields.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the parameter that was duplicated
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation has two or more
+  // named arguments that have the same name.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there are two arguments
+  // with the name `a`:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(C c) {
+  //   c.m(a: 0, [!a!]: 1);
+  // }
+  //
+  // class C {
+  //   void m({int a, int b}) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If one of the arguments should have a different name, then change the name:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(C c) {
+  //   c.m(a: 0, b: 1);
+  // }
+  //
+  // class C {
+  //   void m({int a, int b}) {}
+  // }
+  // ```
+  //
+  // If one of the arguments is wrong, then remove it:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(C c) {
+  //   c.m(a: 1);
+  // }
+  //
+  // class C {
+  //   void m({int a, int b}) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode DUPLICATE_NAMED_ARGUMENT =
+      CompileTimeErrorCode(
+    'DUPLICATE_NAMED_ARGUMENT',
+    "The argument for the named parameter '{0}' was already specified.",
+    correction:
+        "Try removing one of the named arguments, or correcting one of the names to reference a different named parameter.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the URI of the duplicate part
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a single file is referenced in
+  // multiple part directives.
+  //
+  // #### Example
+  //
+  // Given a file named `part.dart` containing
+  //
+  // ```dart
+  // %uri="lib/part.dart"
+  // part of lib;
+  // ```
+  //
+  // The following code produces this diagnostic because the file `part.dart` is
+  // included multiple times:
+  //
+  // ```dart
+  // library lib;
+  //
+  // part 'part.dart';
+  // part [!'part.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove all except the first of the duplicated part directives:
+  //
+  // ```dart
+  // library lib;
+  //
+  // part 'part.dart';
+  // ```
+  static const CompileTimeErrorCode DUPLICATE_PART = CompileTimeErrorCode(
+    'DUPLICATE_PART',
+    "The library already contains a part with the URI '{0}'.",
+    correction:
+        "Try removing all except one of the duplicated part directives.",
+    hasPublishedDocs: true,
+  );
+
+  static const CompileTimeErrorCode ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING =
+      CompileTimeErrorCode(
+    'ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING',
+    "The name of the enum constant can't be the same as the enum's name.",
+    correction: "Try renaming the constant.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when two elements in a constant set
+  // literal have the same value. The set can only contain each value once,
+  // which means that one of the values is unnecessary.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the string `'a'` is
+  // specified twice:
+  //
+  // ```dart
+  // const Set<String> set = {'a', [!'a'!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove one of the duplicate values:
+  //
+  // ```dart
+  // const Set<String> set = {'a'};
+  // ```
+  //
+  // Note that literal sets preserve the order of their elements, so the choice
+  // of which element to remove might affect the order in which elements are
+  // returned by an iterator.
+  static const CompileTimeErrorCode EQUAL_ELEMENTS_IN_CONST_SET =
+      CompileTimeErrorCode(
+    'EQUAL_ELEMENTS_IN_CONST_SET',
+    "Two elements in a constant set literal can't be equal.",
+    correction: "Change or remove the duplicate element.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key in a constant map is the
+  // same as a previous key in the same map. If two keys are the same, then the
+  // second value would overwrite the first value, which makes having both pairs
+  // pointless.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the key `1` is used
+  // twice:
+  //
+  // ```dart
+  // const map = <int, String>{1: 'a', 2: 'b', [!1!]: 'c', 4: 'd'};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If both entries should be included in the map, then change one of the keys
+  // to be different:
+  //
+  // ```dart
+  // const map = <int, String>{1: 'a', 2: 'b', 3: 'c', 4: 'd'};
+  // ```
+  //
+  // If only one of the entries is needed, then remove the one that isn't
+  // needed:
+  //
+  // ```dart
+  // const map = <int, String>{1: 'a', 2: 'b', 4: 'd'};
+  // ```
+  //
+  // Note that literal maps preserve the order of their entries, so the choice
+  // of which entry to remove might affect the order in which keys and values
+  // are returned by an iterator.
+  static const CompileTimeErrorCode EQUAL_KEYS_IN_CONST_MAP =
+      CompileTimeErrorCode(
+    'EQUAL_KEYS_IN_CONST_MAP',
+    "Two keys in a constant map literal can't be equal.",
+    correction: "Change or remove the duplicate key.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a list literal has more than one
+  // type argument.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the list literal has
+  // two type arguments when it can have at most one:
+  //
+  // ```dart
+  // var l = [!<int, int>!][];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove all except one of the type arguments:
+  //
+  // ```dart
+  // var l = <int>[];
+  // ```
+  static const CompileTimeErrorCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+    'EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
+    "List literals require one type argument or none, but {0} found.",
+    correction: "Try adjusting the number of type arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a set literal has more than one
+  // type argument.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the set literal has
+  // three type arguments when it can have at most one:
+  //
+  // ```dart
+  // var s = [!<int, String, int>!]{0, 'a', 1};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove all except one of the type arguments:
+  //
+  // ```dart
+  // var s = <int>{0, 1};
+  // ```
+  static const CompileTimeErrorCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+    'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
+    "Set literals require one type argument or none, but {0} were found.",
+    correction: "Try adjusting the number of type arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a map literal has either one or
+  // more than two type arguments.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the map literal has
+  // three type arguments when it can have either two or zero:
+  //
+  // ```dart
+  // var m = [!<int, String, int>!]{};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove all except two of the type arguments:
+  //
+  // ```dart
+  // var m = <int, String>{};
+  // ```
+  static const CompileTimeErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+    'EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
+    "Map literals require two type arguments or none, but {0} found.",
+    correction: "Try adjusting the number of type arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the uri pointing to a library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an export whose `dart:`
+  // URI references an internal library.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `_interceptors` is an
+  // internal library:
+  //
+  // ```dart
+  // export [!'dart:_interceptors'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the export directive.
+  static const CompileTimeErrorCode EXPORT_INTERNAL_LIBRARY =
+      CompileTimeErrorCode(
+    'EXPORT_INTERNAL_LIBRARY',
+    "The library '{0}' is internal and can't be exported.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of a symbol defined in a legacy library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library that was opted in to
+  // null safety exports another library, and the exported library is opted out
+  // of null safety.
+  //
+  // #### Example
+  //
+  // Given a library that is opted out of null safety:
+  //
+  // ```dart
+  // %uri="lib/optedOut.dart"
+  // // @dart = 2.8
+  // String s;
+  // ```
+  //
+  // The following code produces this diagnostic because it's exporting symbols
+  // from an opted-out library:
+  //
+  // ```dart
+  // export [!'optedOut.dart'!];
+  //
+  // class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you're able to do so, migrate the exported library so that it doesn't
+  // need to opt out:
+  //
+  // ```dart
+  // String? s;
+  // ```
+  //
+  // If you can't migrate the library, then remove the export:
+  //
+  // ```dart
+  // class C {}
+  // ```
+  //
+  // If the exported library (the one that is opted out) itself exports an
+  // opted-in library, then it's valid for your library to indirectly export the
+  // symbols from the opted-in library. You can do so by adding a hide
+  // combinator to the export directive in your library that hides all of the
+  // names declared in the opted-out library.
+  static const CompileTimeErrorCode EXPORT_LEGACY_SYMBOL = CompileTimeErrorCode(
+    'EXPORT_LEGACY_SYMBOL',
+    "The symbol '{0}' is defined in a legacy library, and can't be re-exported from a library with null safety enabled.",
+    correction: "Try removing the export or migrating the legacy library.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the uri pointing to a non-library declaration
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an export directive references a
+  // part rather than a library.
+  //
+  // #### Example
+  //
+  // Given a file named `part.dart` containing
+  //
+  // ```dart
+  // %uri="lib/part.dart"
+  // part of lib;
+  // ```
+  //
+  // The following code produces this diagnostic because the file `part.dart` is
+  // a part, and only libraries can be exported:
+  //
+  // ```dart
+  // library lib;
+  //
+  // export [!'part.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either remove the export directive, or change the URI to be the URI of the
+  // library containing the part.
+  static const CompileTimeErrorCode EXPORT_OF_NON_LIBRARY =
+      CompileTimeErrorCode(
+    'EXPORT_OF_NON_LIBRARY',
+    "The exported library '{0}' can't have a part-of directive.",
+    correction: "Try exporting the library that the part is a part of.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the analyzer finds an
+  // expression, rather than a map entry, in what appears to be a map literal.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // var map = <String, int>{'a': 0, 'b': 1, [!'c'!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the expression is intended to compute either a key or a value in an
+  // entry, fix the issue by replacing the expression with the key or the value.
+  // For example:
+  //
+  // ```dart
+  // var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
+  // ```
+  static const CompileTimeErrorCode EXPRESSION_IN_MAP = CompileTimeErrorCode(
+    'EXPRESSION_IN_MAP',
+    "Expressions can't be used in a map literal.",
+    correction:
+        "Try removing the expression or converting it to be a map entry.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type (class or mixin) is a
+  // subtype of a class from a library being imported using a deferred import.
+  // The supertypes of a type must be compiled at the same time as the type, and
+  // classes from deferred libraries aren't compiled until the library is
+  // loaded.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines the class `A`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {}
+  // ```
+  //
+  // The following code produces this diagnostic because the superclass of `B`
+  // is declared in a deferred library:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // class B extends [!a.A!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to create a subtype of a type from the deferred library, then
+  // remove the `deferred` keyword:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // class B extends a.A {}
+  // ```
+  static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS =
+      CompileTimeErrorCode(
+    'SUBTYPE_OF_DEFERRED_CLASS',
+    "Classes can't extend deferred classes.",
+    correction:
+        "Try specifying a different superclass, or removing the extends clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'EXTENDS_DEFERRED_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the disallowed type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when one of the restricted classes is
+  // used in either an `extends`, `implements`, `with`, or `on` clause. The
+  // classes `bool`, `double`, `FutureOr`, `int`, `Null`, `num`, and `String`
+  // are all restricted in this way, to allow for more efficient
+  // implementations.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `String` is used in an
+  // `extends` clause:
+  //
+  // ```dart
+  // class A extends [!String!] {}
+  // ```
+  //
+  // The following code produces this diagnostic because `String` is used in an
+  // `implements` clause:
+  //
+  // ```dart
+  // class B implements [!String!] {}
+  // ```
+  //
+  // The following code produces this diagnostic because `String` is used in a
+  // `with` clause:
+  //
+  // ```dart
+  // class C with [!String!] {}
+  // ```
+  //
+  // The following code produces this diagnostic because `String` is used in an
+  // `on` clause:
+  //
+  // ```dart
+  // mixin M on [!String!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different type should be specified, then replace the type:
+  //
+  // ```dart
+  // class A extends Object {}
+  // ```
+  //
+  // If there isn't a different type that would be appropriate, then remove the
+  // type, and possibly the whole clause:
+  //
+  // ```dart
+  // class B {}
+  // ```
+  static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS =
+      CompileTimeErrorCode(
+    'SUBTYPE_OF_DISALLOWED_TYPE',
+    "Classes can't extend '{0}'.",
+    correction:
+        "Try specifying a different superclass, or removing the extends clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'EXTENDS_DISALLOWED_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name in the extends clause
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an `extends` clause contains a
+  // name that is declared to be something other than a class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is declared to be a
+  // function:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // class C extends [!f!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want the class to extend a class other than `Object`, then replace
+  // the name in the `extends` clause with the name of that class:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // class C extends B {}
+  //
+  // class B {}
+  // ```
+  //
+  // If you want the class to extend `Object`, then remove the `extends` clause:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // class C {}
+  // ```
+  static const CompileTimeErrorCode EXTENDS_NON_CLASS = CompileTimeErrorCode(
+    'EXTENDS_NON_CLASS',
+    "Classes can only extend other classes.",
+    correction:
+        "Try specifying a different superclass, or removing the extends clause.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type alias that expands to a
+  // type parameter is used in an `extends`, `implements`, `with`, or `on`
+  // clause.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type alias `T`,
+  // which expands to the type parameter `S`, is used in the `extends` clause of
+  // the class `C`:
+  //
+  // ```dart
+  // typedef T<S> = S;
+  //
+  // class C extends [!T!]<Object> {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use the value of the type argument directly:
+  //
+  // ```dart
+  // typedef T<S> = S;
+  //
+  // class C extends Object {}
+  // ```
+  static const CompileTimeErrorCode
+      EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
+    "A type alias that expands to a type parameter can't be used as a superclass.",
+    correction:
+        "Try specifying a different superclass, or removing the extends clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the extension
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name of an extension is used
+  // in an expression other than in an extension override or to qualify an
+  // access to a static member of the extension. Because classes define a type,
+  // the name of a class can be used to refer to the instance of `Type`
+  // representing the type of the class. Extensions, on the other hand, don't
+  // define a type and can't be used as a type literal.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `E` is an extension:
+  //
+  // ```dart
+  // extension E on int {
+  //   static String m() => '';
+  // }
+  //
+  // var x = [!E!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the name of the extension with a name that can be referenced, such
+  // as a static member defined on the extension:
+  //
+  // ```dart
+  // extension E on int {
+  //   static String m() => '';
+  // }
+  //
+  // var x = E.m();
+  // ```
+  static const CompileTimeErrorCode EXTENSION_AS_EXPRESSION =
+      CompileTimeErrorCode(
+    'EXTENSION_AS_EXPRESSION',
+    "Extension '{0}' can't be used as an expression.",
+    correction: "Try replacing it with a valid expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the extension defining the conflicting member
+   * 1: the name of the conflicting static member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension declaration
+  // contains both an instance member and a static member that have the same
+  // name. The instance member and the static member can't have the same name
+  // because it's unclear which member is being referenced by an unqualified use
+  // of the name within the body of the extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `a` is being
+  // used for two different members:
+  //
+  // ```dart
+  // extension E on Object {
+  //   int get a => 0;
+  //   static int [!a!]() => 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rename or remove one of the members:
+  //
+  // ```dart
+  // extension E on Object {
+  //   int get a => 0;
+  //   static int b() => 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTENSION_CONFLICTING_STATIC_AND_INSTANCE =
+      CompileTimeErrorCode(
+    'EXTENSION_CONFLICTING_STATIC_AND_INSTANCE',
+    "Extension '{0}' can't define static member '{1}' and an instance member with the same name.",
+    correction: "Try renaming the member to a name that doesn't conflict.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension declaration
+  // declares a member with the same name as a member declared in the class
+  // `Object`. Such a member can never be used because the member in `Object` is
+  // always found first.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `toString` is defined
+  // by `Object`:
+  //
+  // ```dart
+  // extension E on String {
+  //   String [!toString!]() => this;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the member or rename it so that the name doesn't conflict with the
+  // member in `Object`:
+  //
+  // ```dart
+  // extension E on String {
+  //   String displayString() => this;
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTENSION_DECLARES_MEMBER_OF_OBJECT =
+      CompileTimeErrorCode(
+    'EXTENSION_DECLARES_MEMBER_OF_OBJECT',
+    "Extensions can't declare members with the same name as a member declared by 'Object'.",
+    correction: "Try specifying a different name for the member.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is the
+  // receiver of the invocation of a static member. Similar to static members in
+  // classes, the static members of an extension should be accessed using the
+  // name of the extension, not an extension override.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` is static:
+  //
+  // ```dart
+  // extension E on String {
+  //   static void m() {}
+  // }
+  //
+  // void f() {
+  //   E('').[!m!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the extension override with the name of the extension:
+  //
+  // ```dart
+  // extension E on String {
+  //   static void m() {}
+  // }
+  //
+  // void f() {
+  //   E.m();
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER =
+      CompileTimeErrorCode(
+    'EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER',
+    "An extension override can't be used to access a static member from an extension.",
+    correction: "Try using just the name of the extension.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the argument
+   * 1: the extended type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the argument to an extension
+  // override isn't assignable to the type being extended by the extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `3` isn't a `String`:
+  //
+  // ```dart
+  // extension E on String {
+  //   void method() {}
+  // }
+  //
+  // void f() {
+  //   E([!3!]).method();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you're using the correct extension, then update the argument to have the
+  // correct type:
+  //
+  // ```dart
+  // extension E on String {
+  //   void method() {}
+  // }
+  //
+  // void f() {
+  //   E(3.toString()).method();
+  // }
+  // ```
+  //
+  // If there's a different extension that's valid for the type of the argument,
+  // then either replace the name of the extension or unwrap the argument so
+  // that the correct extension is found.
+  static const CompileTimeErrorCode EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+    'EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE',
+    "The type of the argument to the extension override '{0}' isn't assignable to the extended type '{1}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is found
+  // that isn't being used to access one of the members of the extension. The
+  // extension override syntax doesn't have any runtime semantics; it only
+  // controls which member is selected at compile time.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `E(i)` isn't an
+  // expression:
+  //
+  // ```dart
+  // extension E on int {
+  //   int get a => 0;
+  // }
+  //
+  // void f(int i) {
+  //   print([!E(i)!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to invoke one of the members of the extension, then add the
+  // invocation:
+  //
+  // ```dart
+  // extension E on int {
+  //   int get a => 0;
+  // }
+  //
+  // void f(int i) {
+  //   print(E(i).a);
+  // }
+  // ```
+  //
+  // If you don't want to invoke a member, then unwrap the argument:
+  //
+  // ```dart
+  // extension E on int {
+  //   int get a => 0;
+  // }
+  //
+  // void f(int i) {
+  //   print(i);
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITHOUT_ACCESS =
+      CompileTimeErrorCode(
+    'EXTENSION_OVERRIDE_WITHOUT_ACCESS',
+    "An extension override can only be used to access instance members.",
+    correction: "Consider adding an access to an instance member.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is used as
+  // the receiver of a cascade expression. The value of a cascade expression
+  // `e..m` is the value of the receiver `e`, but extension overrides aren't
+  // expressions and don't have a value.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `E(3)` isn't an
+  // expression:
+  //
+  // ```dart
+  // extension E on int {
+  //   void m() {}
+  // }
+  // f() {
+  //   [!E!](3)..m();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use `.` rather than `..`:
+  //
+  // ```dart
+  // extension E on int {
+  //   void m() {}
+  // }
+  // f() {
+  //   E(3).m();
+  // }
+  // ```
+  //
+  // If there are multiple cascaded accesses, you'll need to duplicate the
+  // extension override for each one.
+  static const CompileTimeErrorCode EXTENSION_OVERRIDE_WITH_CASCADE =
+      CompileTimeErrorCode(
+    'EXTENSION_OVERRIDE_WITH_CASCADE',
+    "Extension overrides have no value so they can't be used as the receiver of a cascade expression.",
+    correction: "Try using '.' instead of '..'.",
+    hasPublishedDocs: true,
+  );
+
+  static const CompileTimeErrorCode EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER =
+      CompileTimeErrorCode(
+    'EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER',
+    "External fields cannot have initializers.",
+    correction:
+        "Try removing the field initializer or the 'external' keyword from the field declaration.",
+  );
+
+  static const CompileTimeErrorCode EXTERNAL_FIELD_INITIALIZER =
+      CompileTimeErrorCode(
+    'EXTERNAL_FIELD_INITIALIZER',
+    "External fields cannot have initializers.",
+    correction: "Try removing the initializer or the 'external' keyword.",
+  );
+
+  static const CompileTimeErrorCode EXTERNAL_VARIABLE_INITIALIZER =
+      CompileTimeErrorCode(
+    'EXTERNAL_VARIABLE_INITIALIZER',
+    "External variables cannot have initializers.",
+    correction: "Try removing the initializer or the 'external' keyword.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the maximum number of positional arguments
+   * 1: the actual number of positional arguments given
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function invocation
+  // has more positional arguments than the method or function allows.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` defines 2
+  // parameters but is invoked with 3 arguments:
+  //
+  // ```dart
+  // void f(int a, int b) {}
+  // void g() {
+  //   f(1, 2, [!3!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the arguments that don't correspond to parameters:
+  //
+  // ```dart
+  // void f(int a, int b) {}
+  // void g() {
+  //   f(1, 2);
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS =
+      CompileTimeErrorCode(
+    'EXTRA_POSITIONAL_ARGUMENTS',
+    "Too many positional arguments: {0} expected, but {1} found.",
+    correction: "Try removing the extra arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the maximum number of positional arguments
+   * 1: the actual number of positional arguments given
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function invocation
+  // has more positional arguments than the method or function allows, but the
+  // method or function defines named parameters.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` defines 2
+  // positional parameters but has a named parameter that could be used for the
+  // third argument:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(int a, int b, {int c}) {}
+  // void g() {
+  //   f(1, 2, [!3!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If some of the arguments should be values for named parameters, then add
+  // the names before the arguments:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(int a, int b, {int c}) {}
+  // void g() {
+  //   f(1, 2, c: 3);
+  // }
+  // ```
+  //
+  // Otherwise, remove the arguments that don't correspond to positional
+  // parameters:
+  //
+  // ```dart
+  // %language=2.9
+  // void f(int a, int b, {int c}) {}
+  // void g() {
+  //   f(1, 2);
+  // }
+  // ```
+  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
+      CompileTimeErrorCode(
+    'EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
+    "Too many positional arguments: {0} expected, but {1} found.",
+    correction:
+        "Try removing the extra positional arguments, or specifying the name for named arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field being initialized multiple times
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the initializer list of a
+  // constructor initializes a field more than once. There is no value to allow
+  // both initializers because only the last value is preserved.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field `f` is being
+  // initialized twice:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C() : f = 0, [!f!] = 1;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove one of the initializers:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C() : f = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS =
+      CompileTimeErrorCode(
+    'FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS',
+    "The field '{0}' can't be initialized twice in the same constructor.",
+    correction: "Try removing one of the initializations.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a field is initialized in both
+  // the parameter list and in the initializer list of a constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field `f` is
+  // initialized both by a field formal parameter and in the initializer list:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f) : [!f!] = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field should be initialized by the parameter, then remove the
+  // initialization in the initializer list:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  // }
+  // ```
+  //
+  // If the field should be initialized in the initializer list and the
+  // parameter isn't needed, then remove the parameter:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C() : f = 0;
+  // }
+  // ```
+  //
+  // If the field should be initialized in the initializer list and the
+  // parameter is needed, then make it a normal parameter:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(int g) : f = g * 2;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER = CompileTimeErrorCode(
+    'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
+    "Fields can't be initialized in both the parameter list and the initializers.",
+    correction: "Try removing one of the initializations.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a factory constructor has a
+  // field formal parameter. Factory constructors can't assign values to fields
+  // because no instance is created; hence, there is no field to assign.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the factory constructor
+  // uses a field formal parameter:
+  //
+  // ```dart
+  // class C {
+  //   int? f;
+  //
+  //   factory C([!this.f!]) => throw 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the field formal parameter with a normal parameter:
+  //
+  // ```dart
+  // class C {
+  //   int? f;
+  //
+  //   factory C(int f) => throw 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode FIELD_INITIALIZER_FACTORY_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'FIELD_INITIALIZER_FACTORY_CONSTRUCTOR',
+    "Initializing formal parameters can't be used in factory constructors.",
+    correction: "Try using a normal parameter.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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.
+   */
+  static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
+    "Initializing formal parameters can only be used in constructors.",
+    correction: "Try using a normal parameter.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a redirecting constructor
+  // initializes a field in the object. This isn't allowed because the instance
+  // that has the field hasn't been created at the point at which it should be
+  // initialized.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor
+  // `C.zero`, which redirects to the constructor `C`, has a field formal
+  // parameter that initializes the field `f`:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  //
+  //   C.zero([!this.f!]) : this(f);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the constructor
+  // `C.zero`, which redirects to the constructor `C`, has an initializer that
+  // initializes the field `f`:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  //
+  //   C.zero() : [!f = 0!], this(1);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the initialization is done by a field formal parameter, then use a
+  // normal parameter:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  //
+  //   C.zero(int f) : this(f);
+  // }
+  // ```
+  //
+  // If the initialization is done in an initializer, then remove the
+  // initializer:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  //
+  //   C.zero() : this(0);
+  // }
+  // ```
+  static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR',
+    "The redirecting constructor can't have a field initializer.",
+    correction:
+        "Try initializing the field in the constructor being redirected to.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type of the field formal parameter
+   * 1: the name of the type of the field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type of a field formal
+  // parameter isn't assignable to the type of the field being initialized.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field formal
+  // parameter has the type `String`, but the type of the field is `int`. The
+  // parameter must have a type that is a subtype of the field's type.
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C([!String this.f!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the field is incorrect, then change the type of the field to
+  // match the type of the parameter, and consider removing the type from the
+  // parameter:
+  //
+  // ```dart
+  // class C {
+  //   String f;
+  //
+  //   C(this.f);
+  // }
+  // ```
+  //
+  // If the type of the parameter is incorrect, then remove the type of the
+  // parameter:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(this.f);
+  // }
+  // ```
+  //
+  // If the types of both the field and the parameter are correct, then use an
+  // initializer rather than a field formal parameter to convert the parameter
+  // value into a value of the correct type:
+  //
+  // ```dart
+  // class C {
+  //   int f;
+  //
+  //   C(String s) : f = int.parse(s);
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field in question
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a final field is initialized
+  // twice: once where it's declared and once by a constructor's parameter.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field `f` is
+  // initialized twice:
+  //
+  // ```dart
+  // class C {
+  //   final int f = 0;
+  //
+  //   C(this.[!f!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field should have the same value for all instances, then remove the
+  // initialization in the parameter list:
+  //
+  // ```dart
+  // class C {
+  //   final int f = 0;
+  //
+  //   C();
+  // }
+  // ```
+  //
+  // If the field can have different values in different instances, then remove
+  // the initialization in the declaration:
+  //
+  // ```dart
+  // class C {
+  //   final int f;
+  //
+  //   C(this.f);
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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.",
+    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 =
+      CompileTimeErrorCode(
+    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+    "All final variables must be initialized, but '{0}' isn't.",
+    correction: "Try adding an initializer for the field.",
+    hasPublishedDocs: true,
+    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
+  );
+
+  /**
+   * 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 =
+      CompileTimeErrorCode(
+    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+    "All final variables must be initialized, but '{0}' and '{1}' aren't.",
+    correction: "Try adding initializers for the fields.",
+    hasPublishedDocs: true,
+    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
+  );
+
+  /**
+   * 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 =
+      CompileTimeErrorCode(
+    'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+    "All final variables must be initialized, but '{0}', '{1}', and {2} others aren't.",
+    correction: "Try adding initializers for the fields.",
+    hasPublishedDocs: true,
+    uniqueName: 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS',
+  );
+
+  /**
+   * 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.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the `Iterable` or `Stream` in a
+  // for-in loop has an element type that can't be assigned to the loop
+  // variable.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `<String>[]` has an
+  // element type of `String`, and `String` can't be assigned to the type of `e`
+  // (`int`):
+  //
+  // ```dart
+  // void f() {
+  //   for (int e in [!<String>[]!]) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the loop variable is correct, then update the type of the
+  // iterable:
+  //
+  // ```dart
+  // void f() {
+  //   for (int e in <int>[]) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  //
+  // If the type of the iterable is correct, then update the type of the loop
+  // variable:
+  //
+  // ```dart
+  // void f() {
+  //   for (String e in <String>[]) {
+  //     print(e);
+  //   }
+  // }
+  // ```
+  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}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the loop variable declared in a
+  // for-in loop is declared to be a `const`. The variable can't be a `const`
+  // because the value can't be computed at compile time.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the loop variable `x`
+  // is declared to be a `const`:
+  //
+  // ```dart
+  // void f() {
+  //   for ([!const!] x in [0, 1, 2]) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's a type annotation, then remove the `const` modifier from the
+  // declaration.
+  //
+  // If there's no type, then replace the `const` modifier with `final`, `var`,
+  // or a type annotation:
+  //
+  // ```dart
+  // void f() {
+  //   for (final x in [0, 1, 2]) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode FOR_IN_WITH_CONST_VARIABLE =
+      CompileTimeErrorCode(
+    'FOR_IN_WITH_CONST_VARIABLE',
+    "A for-in loop variable can't be a 'const'.",
+    correction:
+        "Try removing the 'const' modifier from the variable, or use a different variable.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * It is a compile-time error if a generic function type is used as a bound
+   * for a formal type parameter of a class or a function.
+   */
+  static const CompileTimeErrorCode GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND =
+      CompileTimeErrorCode(
+    'GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND',
+    "Generic function types can't be used as type parameter bounds",
+    correction:
+        "Try making the free variable in the function type part of the larger declaration signature",
+  );
+
+  /**
+   * It is a compile-time error if a generic function type is used as an actual
+   * type argument.
+   */
+  static const CompileTimeErrorCode
+      GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT = CompileTimeErrorCode(
+    'GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT',
+    "A generic function type can't be a type argument.",
+    correction:
+        "Try removing type parameters from the generic function type, or using 'dynamic' as the type argument here.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance method is being torn
+  // off from a receiver whose type is `dynamic`, and the tear-off includes type
+  // arguments. Because the analyzer can't know how many type parameters the
+  // method has, or whether it has any type parameters, there's no way it can
+  // validate that the type arguments are correct. As a result, the type
+  // arguments aren't allowed.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type of `p` is
+  // `dynamic` and the tear-off of `m` has type arguments:
+  //
+  // ```dart
+  // void f(dynamic list) {
+  //   [!list.fold!]<int>;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you can use a more specific type than `dynamic`, then change the type of
+  // the receiver:
+  //
+  // ```dart
+  // void f(List<Object> list) {
+  //   list.fold<int>;
+  // }
+  // ```
+  //
+  // If you can't use a more specific type, then remove the type arguments:
+  //
+  // ```dart
+  // void f(dynamic list) {
+  //   list.cast;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC = CompileTimeErrorCode(
+    'GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC',
+    "A method tear-off on a receiver whose type is 'dynamic' can't have type arguments.",
+    correction:
+        "Specify the type of the receiver, or remove the type arguments from the method tear-off.",
+  );
+
+  /**
+   * 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.",
+  );
+
+  /**
+   * 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
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the return type of a getter
+  // isn't a subtype of the type of the parameter of a setter with the same
+  // name.
+  //
+  // The subtype relationship is a requirement whether the getter and setter are
+  // in the same class or whether one of them is in a superclass of the other.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the return type of the
+  // getter `x` is `num`, the parameter type of the setter `x` is `int`, and
+  // `num` isn't a subtype of `int`:
+  //
+  // ```dart
+  // class C {
+  //   num get [!x!] => 0;
+  //
+  //   set x(int y) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the getter is correct, then change the type of the setter:
+  //
+  // ```dart
+  // class C {
+  //   num get x => 0;
+  //
+  //   set x(num y) {}
+  // }
+  // ```
+  //
+  // If the type of the setter is correct, then change the type of the getter:
+  //
+  // ```dart
+  // class C {
+  //   int get x => 0;
+  //
+  //   set x(int y) {}
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  static const CompileTimeErrorCode IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as values in an if condition inside a const collection literal.",
+    correction: "Try making the deferred import non-deferred.",
+  );
+
+  /**
+   * 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 either
+  // `Stream` or a supertype of `Stream`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the
+  // function `f` has the 'async*' modifier even though the return type `int`
+  // isn't a supertype of `Stream`:
+  //
+  // ```dart
+  // [!int!] f() async* {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function should be asynchronous, then change the return type to be
+  // either `Stream` or a supertype of `Stream`:
+  //
+  // ```dart
+  // Stream<int> f() async* {}
+  // ```
+  //
+  // If the function should be synchronous, then remove the `async*` modifier:
+  //
+  // ```dart
+  // int f() => 0;
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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() => 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the body of a function has the
+  // `sync*` modifier even though the return type of the function isn't either
+  // `Iterable` or a supertype of `Iterable`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the
+  // function `f` has the 'sync*' modifier even though the return type `int`
+  // isn't a supertype of `Iterable`:
+  //
+  // ```dart
+  // [!int!] f() sync* {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function should return an iterable, then change the return type to
+  // be either `Iterable` or a supertype of `Iterable`:
+  //
+  // ```dart
+  // Iterable<int> f() sync* {}
+  // ```
+  //
+  // If the function should return a single value, then remove the `sync*`
+  // modifier:
+  //
+  // ```dart
+  // int f() => 0;
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS =
+      CompileTimeErrorCode(
+    'SUBTYPE_OF_DEFERRED_CLASS',
+    "Classes and mixins can't implement deferred classes.",
+    correction:
+        "Try specifying a different interface, removing the class from the list, or changing the import to not be deferred.",
+    hasPublishedDocs: true,
+    uniqueName: 'IMPLEMENTS_DEFERRED_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the disallowed type
+   */
+  static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS =
+      CompileTimeErrorCode(
+    'SUBTYPE_OF_DISALLOWED_TYPE',
+    "Classes and mixins can't implement '{0}'.",
+    correction:
+        "Try specifying a different interface, or remove the class from the list.",
+    hasPublishedDocs: true,
+    uniqueName: 'IMPLEMENTS_DISALLOWED_CLASS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the interface that was not found
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name used in the `implements`
+  // clause of a class or mixin declaration is defined to be something other
+  // than a class or mixin.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is a variable
+  // rather than a class or mixin:
+  //
+  // ```dart
+  // var x;
+  // class C implements [!x!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name is the name of an existing class or mixin that's already being
+  // imported, then add a prefix to the import so that the local definition of
+  // the name doesn't shadow the imported name.
+  //
+  // If the name is the name of an existing class or mixin that isn't being
+  // imported, then add an import, with a prefix, for the library in which it’s
+  // declared.
+  //
+  // Otherwise, either replace the name in the `implements` clause with the name
+  // of an existing class or mixin, or remove the name from the `implements`
+  // clause.
+  static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = CompileTimeErrorCode(
+    'IMPLEMENTS_NON_CLASS',
+    "Classes and mixins can only implement other classes and mixins.",
+    correction:
+        "Try specifying a class or mixin, or remove the name from the list.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the interface that is implemented more than once
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a single class is specified more
+  // than once in an `implements` clause.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `A` is in the list
+  // twice:
+  //
+  // ```dart
+  // class A {}
+  // class B implements A, [!A!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove all except one occurrence of the class name:
+  //
+  // ```dart
+  // class A {}
+  // class B implements A {}
+  // ```
+  static const CompileTimeErrorCode IMPLEMENTS_REPEATED = CompileTimeErrorCode(
+    'IMPLEMENTS_REPEATED',
+    "'{0}' can only be implemented once.",
+    correction: "Try removing all but one occurrence of the class name.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class that appears in both "extends" and "implements"
+   *    clauses
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when one class is listed in both the
+  // `extends` and `implements` clauses of another class.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `A` is used
+  // in both the `extends` and `implements` clauses for the class `B`:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B extends A implements [!A!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to inherit the implementation from the class, then remove the
+  // class from the `implements` clause:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B extends A {}
+  // ```
+  //
+  // If you don't want to inherit the implementation from the class, then remove
+  // the `extends` clause:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B implements A {}
+  // ```
+  static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS =
+      CompileTimeErrorCode(
+    'IMPLEMENTS_SUPER_CLASS',
+    "'{0}' can't be used in both the 'extends' and 'implements' clauses.",
+    correction: "Try removing one of the occurrences.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
+    "A type alias that expands to a type parameter can't be implemented.",
+    correction: "Try specifying a class or mixin, or removing the list.",
+    hasPublishedDocs: true,
+    uniqueName: 'IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the instance member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a reference to an
+  // instance member in a constructor's initializer list.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `defaultX` is an
+  // instance member:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C() : x = [!defaultX!];
+  //
+  //   int get defaultX => 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the member can be made static, then do so:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C() : x = defaultX;
+  //
+  //   static int get defaultX => 0;
+  // }
+  // ```
+  //
+  // If not, then replace the reference in the initializer with a different
+  // expression that doesn't use an instance member:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C() : x = 0;
+  //
+  //   int get defaultX => 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode IMPLICIT_THIS_REFERENCE_IN_INITIALIZER =
+      CompileTimeErrorCode(
+    'IMPLICIT_THIS_REFERENCE_IN_INITIALIZER',
+    "The instance member '{0}' can't be accessed in an initializer.",
+    correction:
+        "Try replacing the reference to the instance member with a different expression",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the uri pointing to a library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an import whose `dart:`
+  // URI references an internal library.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `_interceptors` is an
+  // internal library:
+  //
+  // ```dart
+  // import [!'dart:_interceptors'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the import directive.
+  static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY =
+      CompileTimeErrorCode(
+    'IMPORT_INTERNAL_LIBRARY',
+    "The library '{0}' is internal and can't be imported.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 14.1 Imports: It is a compile-time error if the specified URI of an
+   * immediate import does not refer to a library declaration.
+   *
+   * Parameters:
+   * 0: the uri pointing to a non-library declaration
+   */
+  static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY =
+      CompileTimeErrorCode(
+    'IMPORT_OF_NON_LIBRARY',
+    "The imported library '{0}' can't have a part-of directive.",
+    correction: "Try importing the library that the part is a part of.",
+  );
+
+  /**
+   * 13.9 Switch: It is a compile-time error if values of the expressions
+   * <i>e<sub>k</sub></i> are not instances of the same class <i>C</i>, for all
+   * <i>1 &lt;= k &lt;= n</i>.
+   *
+   * Parameters:
+   * 0: the expression source code that is the unexpected type
+   * 1: the name of the expected type
+   */
+  static const CompileTimeErrorCode INCONSISTENT_CASE_EXPRESSION_TYPES =
+      CompileTimeErrorCode(
+    'INCONSISTENT_CASE_EXPRESSION_TYPES',
+    "Case expressions must have the same types, '{0}' isn't a '{1}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the instance member with inconsistent inheritance.
+   * 1: the list of all inherited signatures for this member.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class inherits two or more
+  // conflicting signatures for a member and doesn't provide an implementation
+  // that satisfies all the inherited signatures.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `C` is inheriting the
+  // declaration of `m` from `A`, and that implementation isn't consistent with
+  // the signature of `m` that's inherited from `B`:
+  //
+  // ```dart
+  // %language=2.9
+  // class A {
+  //   void m({int a}) {}
+  // }
+  //
+  // class B {
+  //   void m({int b}) {}
+  // }
+  //
+  // class [!C!] extends A implements B {
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an implementation of the method that satisfies all the inherited
+  // signatures:
+  //
+  // ```dart
+  // %language=2.9
+  // class A {
+  //   void m({int a}) {}
+  // }
+  //
+  // class B {
+  //   void m({int b}) {}
+  // }
+  //
+  // class C extends A implements B {
+  //   void m({int a, int b}) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode INCONSISTENT_INHERITANCE =
+      CompileTimeErrorCode(
+    'INCONSISTENT_INHERITANCE',
+    "Superinterfaces don't have a valid override for '{0}': {1}.",
+    correction:
+        "Try adding an explicit override that is consistent with all of the inherited members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 11.1.1 Inheritance and Overriding. Let `I` be the implicit interface of a
+   * class `C` declared in library `L`. `I` inherits all members of
+   * `inherited(I, L)` and `I` overrides `m'` if `m' ∈ overrides(I, L)`. It is
+   * a compile-time error if `m` is a method and `m'` is a getter, or if `m`
+   * is a getter and `m'` is a method.
+   *
+   * Parameters:
+   * 0: the name of the the instance member with inconsistent inheritance.
+   * 1: the name of the superinterface that declares the name as a getter.
+   * 2: the name of the superinterface that declares the name as a method.
+   */
+  static const CompileTimeErrorCode INCONSISTENT_INHERITANCE_GETTER_AND_METHOD =
+      CompileTimeErrorCode(
+    'INCONSISTENT_INHERITANCE_GETTER_AND_METHOD',
+    "'{0}' is inherited as a getter (from '{1}') and also a method (from '{2}').",
+    correction:
+        "Try adjusting the supertypes of this class to remove the 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
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor initializes a
+  // field that isn't declared in the class containing the constructor.
+  // Constructors can't initialize fields that aren't declared and fields that
+  // are inherited from superclasses.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the initializer is
+  // initializing `x`, but `x` isn't a field in the class:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C() : [!x = 0!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different field should be initialized, then change the name to the
+  // name of the field:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C() : y = 0;
+  // }
+  // ```
+  //
+  // If the field must be declared, then add a declaration:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int x;
+  //   int y;
+  //
+  //   C() : x = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode INITIALIZER_FOR_NON_EXISTENT_FIELD =
+      CompileTimeErrorCode(
+    'INITIALIZER_FOR_NON_EXISTENT_FIELD',
+    "'{0}' isn't a field in the enclosing class.",
+    correction:
+        "Try correcting the name to match an existing field, or defining a field named '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the initializing formal that is a static variable in the
+   *    immediately enclosing class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a static field is initialized in
+  // a constructor using either a field formal parameter or an assignment in the
+  // initializer list.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the static field `a` is
+  // being initialized by the field formal parameter `this.a`:
+  //
+  // ```dart
+  // class C {
+  //   static int? a;
+  //   C([!this.a!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field should be an instance field, then remove the keyword `static`:
+  //
+  // ```dart
+  // class C {
+  //   int? a;
+  //   C(this.a);
+  // }
+  // ```
+  //
+  // If you intended to initialize an instance field and typed the wrong name,
+  // then correct the name of the field being initialized:
+  //
+  // ```dart
+  // class C {
+  //   static int? a;
+  //   int? b;
+  //   C(this.b);
+  // }
+  // ```
+  //
+  // If you really want to initialize the static field, then move the
+  // initialization into the constructor body:
+  //
+  // ```dart
+  // class C {
+  //   static int? a;
+  //   C(int? c) {
+  //     a = c;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode INITIALIZER_FOR_STATIC_FIELD =
+      CompileTimeErrorCode(
+    'INITIALIZER_FOR_STATIC_FIELD',
+    "'{0}' is a static field in the enclosing class. Fields initialized in a constructor can't be static.",
+    correction: "Try removing the initialization.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the initializing formal that is not an instance variable in
+   *    the immediately enclosing class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a field formal parameter is
+  // found in a constructor in a class that doesn't declare the field being
+  // initialized. Constructors can't initialize fields that aren't declared and
+  // fields that are inherited from superclasses.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field `x` isn't
+  // defined:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C([!this.x!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field name was wrong, then change it to the name of an existing
+  // field:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C(this.y);
+  // }
+  // ```
+  //
+  // If the field name is correct but hasn't yet been defined, then declare the
+  // field:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int x;
+  //   int y;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // If the parameter is needed but shouldn't initialize a field, then convert
+  // it to a normal parameter and use it:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C(int x) : y = x * 2;
+  // }
+  // ```
+  //
+  // If the parameter isn't needed, then remove it:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int y;
+  //
+  //   C();
+  // }
+  // ```
+  static const CompileTimeErrorCode INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD =
+      CompileTimeErrorCode(
+    'INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD',
+    "'{0}' isn't a field in the enclosing class.",
+    correction:
+        "Try correcting the name to match an existing field, or defining a field named '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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
+  //
+  // The analyzer produces this diagnostic when a factory constructor contains
+  // an unqualified reference to an instance member. In a generative
+  // constructor, the instance of the class is created and initialized before
+  // the body of the constructor is executed, so the instance can be bound to
+  // `this` and accessed just like it would be in an instance method. But, in a
+  // factory constructor, the instance isn't created before executing the body,
+  // so `this` can't be used to reference it.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` isn't in scope in
+  // the factory constructor:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //   factory C() {
+  //     return C._([!x!]);
+  //   }
+  //   C._(this.x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rewrite the code so that it doesn't reference the instance member:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //   factory C() {
+  //     return C._(0);
+  //   }
+  //   C._(this.x);
+  // }
+  // ```
+  static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_FACTORY =
+      CompileTimeErrorCode(
+    'INSTANCE_MEMBER_ACCESS_FROM_FACTORY',
+    "Instance members can't be accessed from a factory constructor.",
+    correction: "Try removing the reference to the instance member.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a static method contains an
+  // unqualified reference to an instance member.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the instance field `x`
+  // is being referenced in a static method:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int x;
+  //
+  //   static int m() {
+  //     return [!x!];
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the method must reference the instance member, then it can't be static,
+  // so remove the keyword:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int x;
+  //
+  //   int m() {
+  //     return x;
+  //   }
+  // }
+  // ```
+  //
+  // If the method can't be made an instance method, then add a parameter so
+  // that an instance of the class can be passed in:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   int x;
+  //
+  //   static int m(C c) {
+  //     return c.x;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode INSTANCE_MEMBER_ACCESS_FROM_STATIC =
+      CompileTimeErrorCode(
+    'INSTANCE_MEMBER_ACCESS_FROM_STATIC',
+    "Instance members can't be accessed from a static method.",
+    correction:
+        "Try removing the reference to the instance member, or removing the keyword 'static' from the method.",
+    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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an enum is instantiated. It's
+  // invalid to create an instance of an enum by invoking a constructor; only
+  // the instances named in the declaration of the enum can exist.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the enum `E` is being
+  // instantiated:
+  //
+  // ```dart
+  // enum E {a}
+  //
+  // var e = [!E!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intend to use an instance of the enum, then reference one of the
+  // constants defined in the enum:
+  //
+  // ```dart
+  // enum E {a}
+  //
+  // var e = E.a;
+  // ```
+  //
+  // If you intend to use an instance of a class, then use the name of that class in place of the name of the enum.
+  static const CompileTimeErrorCode INSTANTIATE_ENUM = CompileTimeErrorCode(
+    'INSTANTIATE_ENUM',
+    "Enums can't be instantiated.",
+    correction: "Try using one of the defined constants.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor invocation is
+  // found where the type being instantiated is a type alias for one of the type
+  // parameters of the type alias. This isn’t allowed because the value of the
+  // type parameter is a type rather than a class.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because it creates an instance
+  // of `A`, even though `A` is a type alias that is defined to be equivalent to
+  // a type parameter:
+  //
+  // ```dart
+  // typedef A<T> = T;
+  //
+  // void f() {
+  //   const [!A!]<int>();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use either a class name or a type alias defined to be a class, rather than
+  // a type alias defined to be a type parameter:
+  //
+  // ```dart
+  // typedef A<T> = C<T>;
+  //
+  // void f() {
+  //   const A<int>();
+  // }
+  //
+  // class C<T> {
+  //   const C();
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+    "Type aliases that expand to a type parameter can't be instantiated.",
+    correction: "Try replacing it with a class.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the lexeme of the integer
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an integer literal is being
+  // implicitly converted to a double, but can't be represented as a 64-bit
+  // double without overflow or loss of precision. Integer literals are
+  // implicitly converted to a double if the context requires the type `double`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the integer value
+  // `9223372036854775807` can't be represented exactly as a double:
+  //
+  // ```dart
+  // double x = [!9223372036854775807!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to use the exact value, then use the class `BigInt` to
+  // represent the value:
+  //
+  // ```dart
+  // var x = BigInt.parse('9223372036854775807');
+  // ```
+  //
+  // If you need to use a double, then change the value to one that can be
+  // represented exactly:
+  //
+  // ```dart
+  // double x = 9223372036854775808;
+  // ```
+  static const CompileTimeErrorCode INTEGER_LITERAL_IMPRECISE_AS_DOUBLE =
+      CompileTimeErrorCode(
+    'INTEGER_LITERAL_IMPRECISE_AS_DOUBLE',
+    "The integer literal is being used as a double, but can't be represented as a 64-bit double without overflow or loss of precision: '{0}'.",
+    correction:
+        "Try using the class 'BigInt', or switch to the closest valid double: '{1}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an integer literal has a value
+  // that is too large (positive) or too small (negative) to be represented in a
+  // 64-bit word.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the value can't be
+  // represented in 64 bits:
+  //
+  // ```dart
+  // var x = [!9223372036854775810!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to represent the current value, then wrap it in an instance of
+  // the class `BigInt`:
+  //
+  // ```dart
+  // var x = BigInt.parse('9223372036854775810');
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an annotation is found that is
+  // using something that is neither a variable marked as `const` or the
+  // invocation of a `const` constructor.
+  //
+  // Getters can't be used as annotations.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the variable `v` isn't
+  // a `const` variable:
+  //
+  // ```dart
+  // var v = 0;
+  //
+  // [!@v!]
+  // void f() {
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `f` isn't a variable:
+  //
+  // ```dart
+  // [!@f!]
+  // void f() {
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `f` isn't a
+  // constructor:
+  //
+  // ```dart
+  // [!@f()!]
+  // void f() {
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `g` is a getter:
+  //
+  // ```dart
+  // [!@g!]
+  // int get g => 0;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the annotation is referencing a variable that isn't a `const`
+  // constructor, add the keyword `const` to the variable's declaration:
+  //
+  // ```dart
+  // const v = 0;
+  //
+  // @v
+  // void f() {
+  // }
+  // ```
+  //
+  // If the annotation isn't referencing a variable, then remove it:
+  //
+  // ```dart
+  // int v = 0;
+  //
+  // void f() {
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_ANNOTATION = CompileTimeErrorCode(
+    'INVALID_ANNOTATION',
+    "Annotation must be either a const variable reference or const constructor invocation.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constant defined in a library
+  // that is imported as a deferred library is referenced in the argument list
+  // of an annotation. Annotations are evaluated at compile time, and values
+  // from deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constant `pi` is
+  // being referenced in the argument list of an annotation, even though the
+  // library that defines it is being imported as a deferred library:
+  //
+  // ```dart
+  // import 'dart:math' deferred as math;
+  //
+  // class C {
+  //   const C(double d);
+  // }
+  //
+  // @C([!math.pi!])
+  // void f () {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the imported constant, then remove the `deferred`
+  // keyword:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // class C {
+  //   const C(double d);
+  // }
+  //
+  // @C(math.pi)
+  // void f () {}
+  // ```
+  //
+  // If the import is required to be deferred and there's another constant that
+  // is appropriate, then use that constant in place of the constant from the
+  // deferred library.
+  static const CompileTimeErrorCode
+      INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used in annotations.",
+    correction:
+        "Try moving the constant from the deferred library, or removing 'deferred' from the import.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constant from a library that
+  // is imported using a deferred import is used as an annotation. Annotations
+  // are evaluated at compile time, and constants from deferred libraries aren't
+  // available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constant `pi` is
+  // being used as an annotation when the library `dart:math` is imported as
+  // `deferred`:
+  //
+  // ```dart
+  // import 'dart:math' deferred as math;
+  //
+  // @[!math.pi!]
+  // void f() {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the constant as an annotation, then remove the
+  // keyword `deferred` from the import:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // @math.pi
+  // void f() {}
+  // ```
+  //
+  // If you can use a different constant as an annotation, then replace the
+  // annotation with a different constant:
+  //
+  // ```dart
+  // @deprecated
+  // void f() {}
+  // ```
+  static const CompileTimeErrorCode INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as annotations.",
+    correction:
+        "Try removing the annotation, or changing the import to not be deferred.",
+    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 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.
+   *
+   * See TODOs in ConstantVisitor
+   */
+  static const CompileTimeErrorCode INVALID_CONSTANT = CompileTimeErrorCode(
+    'INVALID_CONSTANT',
+    "Invalid constant value.",
+  );
+
+  /**
+   * 7.6 Constructors: It is a compile-time error if the name of a constructor
+   * is not a constructor name.
+   */
+  static const CompileTimeErrorCode INVALID_CONSTRUCTOR_NAME =
+      CompileTimeErrorCode(
+    'INVALID_CONSTRUCTOR_NAME',
+    "Invalid constructor name.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override doesn't
+  // have exactly one argument. The argument is the expression used to compute
+  // the value of `this` within the extension method, so there must be one
+  // argument.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there are no arguments:
+  //
+  // ```dart
+  // extension E on String {
+  //   String join(String other) => '$this $other';
+  // }
+  //
+  // void f() {
+  //   E[!()!].join('b');
+  // }
+  // ```
+  //
+  // And, the following code produces this diagnostic because there's more than
+  // one argument:
+  //
+  // ```dart
+  // extension E on String {
+  //   String join(String other) => '$this $other';
+  // }
+  //
+  // void f() {
+  //   E[!('a', 'b')!].join('c');
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Provide one argument for the extension override:
+  //
+  // ```dart
+  // extension E on String {
+  //   String join(String other) => '$this $other';
+  // }
+  //
+  // void f() {
+  //   E('a').join('b');
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_EXTENSION_ARGUMENT_COUNT =
+      CompileTimeErrorCode(
+    'INVALID_EXTENSION_ARGUMENT_COUNT',
+    "Extension overrides must have exactly one argument: the value of 'this' in the extension method.",
+    correction: "Try specifying exactly one argument.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name of a factory
+  // constructor isn't the same as the name of the surrounding class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name of the factory
+  // constructor (`A`) isn't the same as the surrounding class (`C`):
+  //
+  // ```dart
+  // class A {}
+  //
+  // class C {
+  //   factory [!A!]() => throw 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the factory returns an instance of the surrounding class, then rename
+  // the factory:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class C {
+  //   factory C() => throw 0;
+  // }
+  // ```
+  //
+  // If the factory returns an instance of a different class, then move the
+  // factory to that class:
+  //
+  // ```dart
+  // class A {
+  //   factory A() => throw 0;
+  // }
+  //
+  // class C {}
+  // ```
+  //
+  // If the factory returns an instance of a different class, but you can't
+  // modify that class or don't want to move the factory, then convert it to be
+  // a static method:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class C {
+  //   static A a() => throw 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_FACTORY_NAME_NOT_A_CLASS =
+      CompileTimeErrorCode(
+    'INVALID_FACTORY_NAME_NOT_A_CLASS',
+    "The name of a factory constructor must be the same as the name of the immediately enclosing class.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the declared member that is not a valid override.
+   * 1: the name of the interface that declares the member.
+   * 2: the type of the declared member in the interface.
+   * 3. the name of the interface with the overridden member.
+   * 4. the type of the overridden member.
+   *
+   * These parameters must be kept in sync with those of
+   * [CompileTimeErrorCode.INVALID_OVERRIDE].
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when all of the following are true:
+  //
+  // - A class defines an abstract member.
+  // - There is a concrete implementation of that member in a superclass.
+  // - The concrete implementation isn't a valid implementation of the abstract
+  //   method.
+  //
+  // The concrete implementation can be invalid because of incompatibilities in
+  // either the return type, the types of parameters, or the type variables.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the method `A.add` has
+  // a parameter of type `int`, and the overriding method `B.add` has a
+  // corresponding parameter of type `num`:
+  //
+  // ```dart
+  // class A {
+  //   int add(int a) => a;
+  // }
+  // class [!B!] extends A {
+  //   int add(num a);
+  // }
+  // ```
+  //
+  // This is a problem because in an invocation of `B.add` like the following:
+  //
+  // ```dart
+  // void f(B b) {
+  //   b.add(3.4);
+  // }
+  // ```
+  //
+  // `B.add` is expecting to be able to take, for example, a `double`, but when
+  // the method `A.add` is executed (because it's the only concrete
+  // implementation of `add`), a runtime exception will be thrown because a
+  // `double` can't be assigned to a parameter of type `int`.
+  //
+  // #### Common fixes
+  //
+  // If the method in the subclass can conform to the implementation in the
+  // superclass, then change the declaration in the subclass (or remove it if
+  // it's the same):
+  //
+  // ```dart
+  // class A {
+  //   int add(int a) => a;
+  // }
+  // class B	extends A {
+  //   int add(int a);
+  // }
+  // ```
+  //
+  // If the method in the superclass can be generalized to be a valid
+  // implementation of the method in the subclass, then change the superclass
+  // method:
+  //
+  // ```dart
+  // class A {
+  //   int add(num a) => a.floor();
+  // }
+  // class B	extends A {
+  //   int add(num a);
+  // }
+  // ```
+  //
+  // If neither the method in the superclass nor the method in the subclass can
+  // be changed, then provide a concrete implementation of the method in the
+  // subclass:
+  //
+  // ```dart
+  // class A {
+  //   int add(int a) => a;
+  // }
+  // class B	extends A {
+  //   int add(num a) => a.floor();
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_IMPLEMENTATION_OVERRIDE =
+      CompileTimeErrorCode(
+    'INVALID_IMPLEMENTATION_OVERRIDE',
+    "'{1}.{0}' ('{2}') isn't a valid concrete implementation of '{3}.{0}' ('{4}').",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generic function type has a
+  // function-valued parameter that is written using the older inline function
+  // type syntax.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the parameter `f`, in
+  // the generic function type used to define `F`, uses the inline function
+  // type syntax:
+  //
+  // ```dart
+  // typedef F = int Function(int f[!(!]String s));
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use the generic function syntax for the parameter's type:
+  //
+  // ```dart
+  // typedef F = int Function(int Function(String));
+  // ```
+  static const CompileTimeErrorCode INVALID_INLINE_FUNCTION_TYPE =
+      CompileTimeErrorCode(
+    'INVALID_INLINE_FUNCTION_TYPE',
+    "Inline function types can't be used for parameters in a generic function type.",
+    correction:
+        "Try using a generic function type (returnType 'Function(' parameters ')').",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the invalid modifier
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the body of a constructor is
+  // prefixed by one of the following modifiers: `async`, `async*`, or `sync*`.
+  // Constructor bodies must be synchronous.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the
+  // constructor for `C` is marked as being `async`:
+  //
+  // ```dart
+  // class C {
+  //   C() [!async!] {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the constructor can be synchronous, then remove the modifier:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  // }
+  // ```
+  //
+  // If the constructor can't be synchronous, then use a static method to create
+  // the instance instead:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  //   static Future<C> c() async {
+  //     return C();
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_MODIFIER_ON_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'INVALID_MODIFIER_ON_CONSTRUCTOR',
+    "The modifier '{0}' can't be applied to the body of a constructor.",
+    correction: "Try removing the modifier.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the invalid modifier
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the body of a setter is prefixed
+  // by one of the following modifiers: `async`, `async*`, or `sync*`. Setter
+  // bodies must be synchronous.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the setter
+  // `x` is marked as being `async`:
+  //
+  // ```dart
+  // class C {
+  //   set x(int i) [!async!] {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the setter can be synchronous, then remove the modifier:
+  //
+  // ```dart
+  // class C {
+  //   set x(int i) {}
+  // }
+  // ```
+  //
+  // If the setter can't be synchronous, then use a method to set the value
+  // instead:
+  //
+  // ```dart
+  // class C {
+  //   void x(int i) async {}
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_MODIFIER_ON_SETTER =
+      CompileTimeErrorCode(
+    'INVALID_MODIFIER_ON_SETTER',
+    "Setters can't use 'async', 'async*', or 'sync*'.",
+    correction: "Try removing the modifier.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the declared member that is not a valid override.
+   * 1: the name of the interface that declares the member.
+   * 2: the type of the declared member in the interface.
+   * 3. the name of the interface with the overridden member.
+   * 4. the type of the overridden member.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a member of a class is found
+  // that overrides a member from a supertype and the override isn't valid. An
+  // override is valid if all of these are true:
+  // * It allows all of the arguments allowed by the overridden member.
+  // * It doesn't require any arguments that aren't required by the overridden
+  //   member.
+  // * The type of every parameter of the overridden member is assignable to the
+  //   corresponding parameter of the override.
+  // * The return type of the override is assignable to the return type of the
+  //   overridden member.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the type of the
+  // parameter `s` (`String`) isn't assignable to the type of the parameter `i`
+  // (`int`):
+  //
+  // ```dart
+  // class A {
+  //   void m(int i) {}
+  // }
+  //
+  // class B extends A {
+  //   void [!m!](String s) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the invalid method is intended to override the method from the
+  // superclass, then change it to conform:
+  //
+  // ```dart
+  // class A {
+  //   void m(int i) {}
+  // }
+  //
+  // class B extends A {
+  //   void m(int i) {}
+  // }
+  // ```
+  //
+  // If it isn't intended to override the method from the superclass, then
+  // rename it:
+  //
+  // ```dart
+  // class A {
+  //   void m(int i) {}
+  // }
+  //
+  // class B extends A {
+  //   void m2(String s) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_OVERRIDE = CompileTimeErrorCode(
+    'INVALID_OVERRIDE',
+    "'{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}').",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when `this` is used outside of an
+  // instance method or a generative constructor. The reserved word `this` is
+  // only defined in the context of an instance method or a generative
+  // constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `v` is a top-level
+  // variable:
+  //
+  // ```dart
+  // C f() => [!this!];
+  //
+  // class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use a variable of the appropriate type in place of `this`, declaring it if
+  // necessary:
+  //
+  // ```dart
+  // C f(C c) => c;
+  //
+  // class C {}
+  // ```
+  static const CompileTimeErrorCode INVALID_REFERENCE_TO_THIS =
+      CompileTimeErrorCode(
+    'INVALID_REFERENCE_TO_THIS',
+    "Invalid reference to 'this' expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the initializer list of a
+  // constructor contains an invocation of a constructor in the superclass, but
+  // the invocation isn't the last item in the initializer list.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of the
+  // superclass' constructor isn't the last item in the initializer list:
+  //
+  // ```dart
+  // class A {
+  //   A(int x);
+  // }
+  //
+  // class B extends A {
+  //   B(int x) : [!super!](x), assert(x >= 0);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Move the invocation of the superclass' constructor to the end of the
+  // initializer list:
+  //
+  // ```dart
+  // class A {
+  //   A(int x);
+  // }
+  //
+  // class B extends A {
+  //   B(int x) : assert(x >= 0), super(x);
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_SUPER_INVOCATION =
+      CompileTimeErrorCode(
+    'INVALID_SUPER_INVOCATION',
+    "The superclass call must be last in an initializer list: '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type parameter is used as a
+  // type argument in a list, map, or set literal that is prefixed by `const`.
+  // This isn't allowed because the value of the type parameter (the actual type
+  // that will be used at runtime) can't be known at compile time.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type parameter `T`
+  // is being used as a type argument when creating a constant list:
+  //
+  // ```dart
+  // List<T> newList<T>() => const <[!T!]>[];
+  // ```
+  //
+  // The following code produces this diagnostic because the type parameter `T`
+  // is being used as a type argument when creating a constant map:
+  //
+  // ```dart
+  // Map<String, T> newSet<T>() => const <String, [!T!]>{};
+  // ```
+  //
+  // The following code produces this diagnostic because the type parameter `T`
+  // is being used as a type argument when creating a constant set:
+  //
+  // ```dart
+  // Set<T> newSet<T>() => const <[!T!]>{};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type that will be used for the type parameter can be known at
+  // compile time, then remove the type parameter:
+  //
+  // ```dart
+  // List<int> newList() => const <int>[];
+  // ```
+  //
+  // If the type that will be used for the type parameter can't be known until
+  // runtime, then remove the keyword `const`:
+  //
+  // ```dart
+  // List<T> newList<T>() => <T>[];
+  // ```
+  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_LIST =
+      CompileTimeErrorCode(
+    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
+    "Constant list literals can't include a type parameter as a type argument, such as '{0}'.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_LIST',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type parameter
+   */
+  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_MAP =
+      CompileTimeErrorCode(
+    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
+    "Constant map literals can't include a type parameter as a type argument, such as '{0}'.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_MAP',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type parameter
+   */
+  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_SET =
+      CompileTimeErrorCode(
+    'INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL',
+    "Constant set literals can't include a type parameter as a type argument, such as '{0}'.",
+    correction: "Try replacing the type parameter with a different type.",
+    hasPublishedDocs: true,
+    uniqueName: 'INVALID_TYPE_ARGUMENT_IN_CONST_SET',
+  );
+
+  /**
+   * Parameters:
+   * 0: the URI that is invalid
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a URI in a directive doesn't
+  // conform to the syntax of a valid URI.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `'#'` isn't a valid
+  // URI:
+  //
+  // ```dart
+  // import [!'#'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the invalid URI with a valid URI.
+  static const CompileTimeErrorCode INVALID_URI = CompileTimeErrorCode(
+    'INVALID_URI',
+    "Invalid URI syntax: '{0}'.",
+    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 dereferenced.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` will always be
+  // `null`:
+  //
+  // ```dart
+  // 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
+  // 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
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is used to
+  // invoke a function but the extension doesn't declare a `call` method.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't define a `call` method:
+  //
+  // ```dart
+  // extension E on String {}
+  //
+  // void f() {
+  //   [!E('')!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the extension is intended to define a `call` method, then declare it:
+  //
+  // ```dart
+  // extension E on String {
+  //   int call() => 0;
+  // }
+  //
+  // void f() {
+  //   E('')();
+  // }
+  // ```
+  //
+  // If the extended type defines a `call` method, then remove the extension
+  // override.
+  //
+  // If the `call` method isn't defined, then rewrite the code so that it
+  // doesn't invoke the `call` method.
+  static const CompileTimeErrorCode INVOCATION_OF_EXTENSION_WITHOUT_CALL =
+      CompileTimeErrorCode(
+    'INVOCATION_OF_EXTENSION_WITHOUT_CALL',
+    "The extension '{0}' doesn't define a 'call' method so the override can't be used in an invocation.",
+    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.",
+    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,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unresolvable label
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `break` or `continue`
+  // statement references a label that is declared in a method or function
+  // containing the function in which the `break` or `continue` statement
+  // appears. The `break` and `continue` statements can't be used to transfer
+  // control outside the function that contains them.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the label `loop` is
+  // declared outside the local function `g`:
+  //
+  // ```dart
+  // void f() {
+  //   loop:
+  //   while (true) {
+  //     void g() {
+  //       break [!loop!];
+  //     }
+  //
+  //     g();
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Try rewriting the code so that it isn't necessary to transfer control
+  // outside the local function, possibly by inlining the local function:
+  //
+  // ```dart
+  // void f() {
+  //   loop:
+  //   while (true) {
+  //     break loop;
+  //   }
+  // }
+  // ```
+  //
+  // If that isn't possible, then try rewriting the local function so that a
+  // value returned by the function can be used to determine whether control is
+  // transferred:
+  //
+  // ```dart
+  // void f() {
+  //   loop:
+  //   while (true) {
+  //     bool g() {
+  //       return true;
+  //     }
+  //
+  //     if (g()) {
+  //       break loop;
+  //     }
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode LABEL_IN_OUTER_SCOPE = CompileTimeErrorCode(
+    'LABEL_IN_OUTER_SCOPE',
+    "Can't reference label '{0}' declared in an outer method.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unresolvable label
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a reference to a label
+  // that isn't defined in the scope of the `break` or `continue` statement that
+  // is referencing it.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the label `loop` isn't
+  // defined anywhere:
+  //
+  // ```dart
+  // void f() {
+  //   for (int i = 0; i < 10; i++) {
+  //     for (int j = 0; j < 10; j++) {
+  //       break [!loop!];
+  //     }
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the label should be on the innermost enclosing `do`, `for`, `switch`, or
+  // `while` statement, then remove the label:
+  //
+  // ```dart
+  // void f() {
+  //   for (int i = 0; i < 10; i++) {
+  //     for (int j = 0; j < 10; j++) {
+  //       break;
+  //     }
+  //   }
+  // }
+  // ```
+  //
+  // If the label should be on some other statement, then add the label:
+  //
+  // ```dart
+  // void f() {
+  //   loop: for (int i = 0; i < 10; i++) {
+  //     for (int j = 0; j < 10; j++) {
+  //       break loop;
+  //     }
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode LABEL_UNDEFINED = CompileTimeErrorCode(
+    'LABEL_UNDEFINED',
+    "Can't reference an undefined label '{0}'.",
+    correction:
+        "Try defining the label, or correcting the name to match an existing label.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class that has at least one
+  // `const` constructor also has a field marked both `late` and `final`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `A` has a
+  // `const` constructor and the `final` field `f` is marked as `late`:
+  //
+  // ```dart
+  // class A {
+  //   [!late!] final int f;
+  //
+  //   const A();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field doesn't need to be marked `late`, then remove the `late`
+  // modifier from the field:
+  //
+  // ```dart
+  // class A {
+  //   final int f = 0;
+  //
+  //   const A();
+  // }
+  // ```
+  //
+  // If the field must be marked `late`, then remove the `const` modifier from
+  // the constructors:
+  //
+  // ```dart
+  // class A {
+  //   late final int f;
+  //
+  //   A();
+  // }
+  // ```
+  static const CompileTimeErrorCode LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR',
+    "Can't have a late final field in a class with a generative const constructor.",
+    correction:
+        "Try removing the 'late' modifier, or don't declare 'const' constructors.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the analyzer can prove that a
+  // local variable marked as both `late` and `final` was already assigned a
+  // value at the point where another assignment occurs.
+  //
+  // Because `final` variables can only be assigned once, subsequent assignments
+  // are guaranteed to fail, so they're flagged.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the `final` variable
+  // `v` is assigned a value in two places:
+  //
+  // ```dart
+  // int f() {
+  //   late final int v;
+  //   v = 0;
+  //   [!v!] += 1;
+  //   return v;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to be able to reassign the variable, then remove the `final`
+  // keyword:
+  //
+  // ```dart
+  // int f() {
+  //   late int v;
+  //   v = 0;
+  //   v += 1;
+  //   return v;
+  // }
+  // ```
+  //
+  // If you don't need to reassign the variable, then remove all except the
+  // first of the assignments:
+  //
+  // ```dart
+  // int f() {
+  //   late final int v;
+  //   v = 0;
+  //   return v;
+  // }
+  // ```
+  static const CompileTimeErrorCode LATE_FINAL_LOCAL_ALREADY_ASSIGNED =
+      CompileTimeErrorCode(
+    'LATE_FINAL_LOCAL_ALREADY_ASSIGNED',
+    "The late final local variable is already assigned.",
+    correction:
+        "Try removing the 'final' modifier, or don't reassign the value.",
+    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 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
+  //
+  // The analyzer produces this diagnostic when the first positional parameter
+  // of a function named `main` isn't a supertype of `List<String>`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `List<int>` isn't a
+  // supertype of `List<String>`:
+  //
+  // ```dart
+  // void main([!List<int>!] args) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function is an entry point, then change the type of the first
+  // positional parameter to be a supertype of `List<String>`:
+  //
+  // ```dart
+  // void main(List<String> args) {}
+  // ```
+  //
+  // If the function isn't an entry point, then change the name of the function:
+  //
+  // ```dart
+  // void f(List<int> args) {}
+  // ```
+  static const CompileTimeErrorCode MAIN_FIRST_POSITIONAL_PARAMETER_TYPE =
+      CompileTimeErrorCode(
+    'MAIN_FIRST_POSITIONAL_PARAMETER_TYPE',
+    "The type of the first positional parameter of the 'main' function must be a supertype of 'List<String>'.",
+    correction: "Try changing the type of the parameter.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function named `main` has one
+  // or more required named parameters.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the function named
+  // `main` has a required named parameter (`x`):
+  //
+  // ```dart
+  // void [!main!]({required int x}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function is an entry point, then remove the `required` keyword:
+  //
+  // ```dart
+  // void main({int? x}) {}
+  // ```
+  //
+  // If the function isn't an entry point, then change the name of the function:
+  //
+  // ```dart
+  // void f({required int x}) {}
+  // ```
+  static const CompileTimeErrorCode MAIN_HAS_REQUIRED_NAMED_PARAMETERS =
+      CompileTimeErrorCode(
+    'MAIN_HAS_REQUIRED_NAMED_PARAMETERS',
+    "The function 'main' can't have any required named parameters.",
+    correction:
+        "Try using a different name for the function, or removing the 'required' modifier.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function named `main` has more
+  // than two required positional parameters.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the function `main` has
+  // three required positional parameters:
+  //
+  // ```dart
+  // void [!main!](List<String> args, int x, int y) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function is an entry point and the extra parameters aren't used,
+  // then remove them:
+  //
+  // ```dart
+  // void main(List<String> args, int x) {}
+  // ```
+  //
+  // If the function is an entry point, but the extra parameters used are for
+  // when the function isn't being used as an entry point, then make the extra
+  // parameters optional:
+  //
+  // ```dart
+  // void main(List<String> args, int x, [int y = 0]) {}
+  // ```
+  //
+  // If the function isn't an entry point, then change the name of the function:
+  //
+  // ```dart
+  // void f(List<String> args, int x, int y) {}
+  // ```
+  static const CompileTimeErrorCode
+      MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS = CompileTimeErrorCode(
+    'MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS',
+    "The function 'main' can't have more than two required positional parameters.",
+    correction:
+        "Try using a different name for the function, or removing extra parameters.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library contains a declaration
+  // of the name `main` that isn't the declaration of a top-level function.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `main` is
+  // being used to declare a top-level variable:
+  //
+  // ```dart
+  // var [!main!] = 3;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use a different name for the declaration:
+  //
+  // ```dart
+  // var mainIndex = 3;
+  // ```
+  static const CompileTimeErrorCode MAIN_IS_NOT_FUNCTION = CompileTimeErrorCode(
+    'MAIN_IS_NOT_FUNCTION',
+    "The declaration named 'main' must be a function.",
+    correction: "Try using a different name for this declaration.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a map entry (a key/value pair)
+  // is found in a set literal.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the literal has a map
+  // entry even though it's a set literal:
+  //
+  // ```dart
+  // const collection = <String>{[!'a' : 'b'!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended for the collection to be a map, then change the code so
+  // that it is a map. In the previous example, you could do this by adding
+  // another type argument:
+  //
+  // ```dart
+  // const collection = <String, String>{'a' : 'b'};
+  // ```
+  //
+  // In other cases, you might need to change the explicit type from `Set` to
+  // `Map`.
+  //
+  // If you intended for the collection to be a set, then remove the map entry,
+  // possibly by replacing the colon with a comma if both values should be
+  // included in the set:
+  //
+  // ```dart
+  // const collection = <String>{'a', 'b'};
+  // ```
+  static const CompileTimeErrorCode MAP_ENTRY_NOT_IN_MAP = CompileTimeErrorCode(
+    'MAP_ENTRY_NOT_IN_MAP',
+    "Map entries can only be used in a map literal.",
+    correction:
+        "Try converting the collection to a map or removing the map entry.",
+    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 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.
+   */
+  static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL =
+      CompileTimeErrorCode(
+    'MISSING_CONST_IN_LIST_LITERAL',
+    "List literals must be prefixed with 'const' when used as a constant expression.",
+    correction: "Try adding the keyword 'const' before the literal.",
+  );
+
+  /**
+   * 12.1 Constants: A constant expression is ... a constant map literal.
+   */
+  static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL =
+      CompileTimeErrorCode(
+    'MISSING_CONST_IN_MAP_LITERAL',
+    "Map literals must be prefixed with 'const' when used as a constant expression.",
+    correction: "Try adding the keyword 'const' before the literal.",
+  );
+
+  /**
+   * 12.1 Constants: A constant expression is ... a constant set literal.
+   */
+  static const CompileTimeErrorCode MISSING_CONST_IN_SET_LITERAL =
+      CompileTimeErrorCode(
+    'MISSING_CONST_IN_SET_LITERAL',
+    "Set literals must be prefixed with 'const' when used as a constant expression.",
+    correction: "Try adding the keyword 'const' before the literal.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the Dart or Flutter SDK
+  // isn’t installed correctly, and, as a result, one of the `dart:` libraries
+  // can't be found.
+  //
+  // #### Common fixes
+  //
+  // Reinstall the Dart or Flutter SDK.
+  static const CompileTimeErrorCode MISSING_DART_LIBRARY = CompileTimeErrorCode(
+    'MISSING_DART_LIBRARY',
+    "Required library '{0}' is missing.",
+    correction: "Re-install the Dart or Flutter SDK.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an optional parameter, whether
+  // 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
+  //
+  // The following code produces this diagnostic because `x` can't be `null`,
+  // and no non-`null` default value is specified:
+  //
+  // ```dart
+  // void f([int [!x!]]) {}
+  // ```
+  //
+  // As does this:
+  //
+  // ```dart
+  // void g({int [!x!]}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to use `null` to indicate that no value was provided, then you
+  // need to make the type nullable:
+  //
+  // ```dart
+  // void f([int? x]) {}
+  // void g({int? x}) {}
+  // ```
+  //
+  // If the parameter can't be null, then either provide a default value:
+  //
+  // ```dart
+  // void f([int x = 1]) {}
+  // void g({int x = 2}) {}
+  // ```
+  //
+  // or make the parameter a required parameter:
+  //
+  // ```dart
+  // void f(int x) {}
+  // void g({required int x}) {}
+  // ```
+  static const CompileTimeErrorCode MISSING_DEFAULT_VALUE_FOR_PARAMETER =
+      CompileTimeErrorCode(
+    'MISSING_DEFAULT_VALUE_FOR_PARAMETER',
+    "The parameter '{0}' can't have a value of 'null' because of its type, but the implicit default value is 'null'.",
+    correction:
+        "Try adding either an explicit non-'null' default value or the 'required' modifier.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation of a function is
+  // missing a required named parameter.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of `f`
+  // doesn't include a value for the required named parameter `end`:
+  //
+  // ```dart
+  // void f(int start, {required int end}) {}
+  // void g() {
+  //   [!f!](3);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add a named argument corresponding to the missing required parameter:
+  //
+  // ```dart
+  // void f(int start, {required int end}) {}
+  // void g() {
+  //   f(3, end: 5);
+  // }
+  // ```
+  static const CompileTimeErrorCode MISSING_REQUIRED_ARGUMENT =
+      CompileTimeErrorCode(
+    'MISSING_REQUIRED_ARGUMENT',
+    "The named parameter '{0}' is required, but there's no corresponding argument.",
+    correction: "Try adding the required argument.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the super-invoked member
+   * 1: the display name of the type of the super-invoked member in the mixin
+   * 2: the display name of the type of the concrete member in the class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a mixin that invokes a method
+  // using `super` is used in a class where the concrete implementation of that
+  // method has a different signature than the signature defined for that method
+  // by the mixin's `on` type. The reason this is an error is because the
+  // invocation in the mixin might invoke the method in a way that's
+  // incompatible with the method that will actually be executed.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `C` uses the
+  // mixin `M`, the mixin `M` invokes `foo` using `super`, and the abstract
+  // version of `foo` declared in `I` (the mixin's `on` type) doesn't have the
+  // same signature as the concrete version of `foo` declared in `A`:
+  //
+  // ```dart
+  // class I {
+  //   void foo([int? p]) {}
+  // }
+  //
+  // class A {
+  //   void foo(int p) {}
+  // }
+  //
+  // abstract class B extends A implements I {
+  //   @override
+  //   void foo([int? p]);
+  // }
+  //
+  // mixin M on I {
+  //   void bar() {
+  //     super.foo(42);
+  //   }
+  // }
+  //
+  // abstract class C extends B with [!M!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the class doesn't need to use the mixin, then remove it from the `with`
+  // clause:
+  //
+  // ```dart
+  // class I {
+  //   void foo([int? p]) {}
+  // }
+  //
+  // class A {
+  //   void foo(int? p) {}
+  // }
+  //
+  // abstract class B extends A implements I {
+  //   @override
+  //   void foo([int? p]);
+  // }
+  //
+  // mixin M on I {
+  //   void bar() {
+  //     super.foo(42);
+  //   }
+  // }
+  //
+  // abstract class C extends B {}
+  // ```
+  //
+  // If the class needs to use the mixin, then ensure that there's a concrete
+  // implementation of the method that conforms to the signature expected by the
+  // mixin:
+  //
+  // ```dart
+  // class I {
+  //   void foo([int? p]) {}
+  // }
+  //
+  // class A {
+  //   void foo(int? p) {}
+  // }
+  //
+  // abstract class B extends A implements I {
+  //   @override
+  //   void foo([int? p]) {
+  //     super.foo(p);
+  //   }
+  // }
+  //
+  // mixin M on I {
+  //   void bar() {
+  //     super.foo(42);
+  //   }
+  // }
+  //
+  // abstract class C extends B with M {}
+  // ```
+  static const CompileTimeErrorCode
+      MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE =
+      CompileTimeErrorCode(
+    'MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE',
+    "The super-invoked member '{0}' has the type '{1}', and the concrete member in the class has the type '{2}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the display name of the mixin
+   * 1: the display name of the superclass
+   * 2: the display name of the type that is not implemented
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a mixin that has a superclass
+  // constraint is used in a [mixin application][] with a superclass that
+  // doesn't implement the required constraint.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the mixin `M` requires
+  // that the class to which it's applied be a subclass of `A`, but `Object`
+  // isn't a subclass of `A`:
+  //
+  // ```dart
+  // class A {}
+  //
+  // mixin M on A {}
+  //
+  // class X = Object with [!M!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to use the mixin, then change the superclass to be either the
+  // same as or a subclass of the superclass constraint:
+  //
+  // ```dart
+  // class A {}
+  //
+  // mixin M on A {}
+  //
+  // class X = A with M;
+  // ```
+  static const CompileTimeErrorCode
+      MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE = CompileTimeErrorCode(
+    'MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE',
+    "'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'.",
+    correction: "Try extending the class '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the display name of the member without a concrete implementation
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a [mixin application][] contains
+  // an invocation of a member from its superclass, and there's no concrete
+  // member of that name in the mixin application's superclass.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the mixin `M` contains
+  // the invocation `super.m()`, and the class `A`, which is the superclass of
+  // the [mixin application][] `A+M`, doesn't define a concrete implementation
+  // of `m`:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // mixin M on A {
+  //   void bar() {
+  //     super.m();
+  //   }
+  // }
+  //
+  // abstract class B extends A with [!M!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to apply the mixin `M` to a different class, one that has a
+  // concrete implementation of `m`, then change the superclass of `B` to that
+  // class:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // mixin M on A {
+  //   void bar() {
+  //     super.m();
+  //   }
+  // }
+  //
+  // class C implements A {
+  //   void m() {}
+  // }
+  //
+  // abstract class B extends C with M {}
+  // ```
+  //
+  // If you need to make `B` a subclass of `A`, then add a concrete
+  // implementation of `m` in `A`:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m() {}
+  // }
+  //
+  // mixin M on A {
+  //   void bar() {
+  //     super.m();
+  //   }
+  // }
+  //
+  // abstract class B extends A with M {}
+  // ```
+  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}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the mixin that is invalid
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class is used as a mixin and
+  // the mixed-in class defines a constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `A`, which
+  // defines a constructor, is being used as a mixin:
+  //
+  // ```dart
+  // class A {
+  //   A();
+  // }
+  //
+  // class B with [!A!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it's possible to convert the class to a mixin, then do so:
+  //
+  // ```dart
+  // mixin A {
+  // }
+  //
+  // class B with A {}
+  // ```
+  //
+  // If the class can't be a mixin and it's possible to remove the constructor,
+  // then do so:
+  //
+  // ```dart
+  // class A {
+  // }
+  //
+  // class B with A {}
+  // ```
+  //
+  // If the class can't be a mixin and you can't remove the constructor, then
+  // try extending or implementing the class rather than mixing it in:
+  //
+  // ```dart
+  // class A {
+  //   A();
+  // }
+  //
+  // class B extends A {}
+  // ```
+  static const CompileTimeErrorCode MIXIN_CLASS_DECLARES_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'MIXIN_CLASS_DECLARES_CONSTRUCTOR',
+    "The class '{0}' can't be used as a mixin because it declares a constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * The <i>mixinMember</i> production allows the same instance or static
+   * members that a class would allow, but no constructors (for now).
+   */
+  static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'MIXIN_DECLARES_CONSTRUCTOR',
+    "Mixins can't declare constructors.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = CompileTimeErrorCode(
+    'SUBTYPE_OF_DEFERRED_CLASS',
+    "Classes can't mixin deferred classes.",
+    correction: "Try changing the import to not be deferred.",
+    hasPublishedDocs: true,
+    uniqueName: 'MIXIN_DEFERRED_CLASS',
+  );
+
+  static const CompileTimeErrorCode
+      MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES = CompileTimeErrorCode(
+    'MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES',
+    "Type parameters couldn't be inferred for the mixin '{0}' because the base class implements the mixin's supertype constraint '{1}' in multiple conflicting ways",
+  );
+
+  static const CompileTimeErrorCode MIXIN_INFERENCE_NO_MATCHING_CLASS =
+      CompileTimeErrorCode(
+    'MIXIN_INFERENCE_NO_MATCHING_CLASS',
+    "Type parameters couldn't be inferred for the mixin '{0}' because the base class doesn't implement the mixin's supertype constraint '{1}'",
+  );
+
+  static const CompileTimeErrorCode MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION =
+      CompileTimeErrorCode(
+    'MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION',
+    "Type parameters couldn't be inferred for the mixin '{0}' because no type parameter substitution could be found matching the mixin's supertype constraints",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the mixin that is invalid
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class that extends a class
+  // other than `Object` is used as a mixin.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `B`, which
+  // extends `A`, is being used as a mixin by `C`:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B extends A {}
+  //
+  // class C with [!B!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the class being used as a mixin can be changed to extend `Object`, then
+  // change it:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B {}
+  //
+  // class C with B {}
+  // ```
+  //
+  // If the class being used as a mixin can't be changed and the class that's
+  // using it extends `Object`, then extend the class being used as a mixin:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B extends A {}
+  //
+  // class C extends B {}
+  // ```
+  //
+  // If the class doesn't extend `Object` or if you want to be able to mix in
+  // the behavior from `B` in other places, then create a real mixin:
+  //
+  // ```dart
+  // class A {}
+  //
+  // mixin M on A {}
+  //
+  // class B extends A with M {}
+  //
+  // class C extends A with M {}
+  // ```
+  static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT =
+      CompileTimeErrorCode(
+    'MIXIN_INHERITS_FROM_NOT_OBJECT',
+    "The class '{0}' can't be used as a mixin because it extends a class other than 'Object'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a mixin is instantiated.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the mixin `M` is being
+  // instantiated:
+  //
+  // ```dart
+  // mixin M {}
+  //
+  // var m = [!M!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intend to use an instance of a class, then use the name of that
+  // class in place of the name of the mixin.
+  static const CompileTimeErrorCode MIXIN_INSTANTIATE = CompileTimeErrorCode(
+    'MIXIN_INSTANTIATE',
+    "Mixins can't be instantiated.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the disallowed type
+   */
+  static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS =
+      CompileTimeErrorCode(
+    'SUBTYPE_OF_DISALLOWED_TYPE',
+    "Classes can't mixin '{0}'.",
+    correction:
+        "Try specifying a different class or mixin, or remove the class or mixin from the list.",
+    hasPublishedDocs: true,
+    uniqueName: 'MIXIN_OF_DISALLOWED_CLASS',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name in a `with` clause is
+  // defined to be something other than a mixin or a class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `F` is defined to be a
+  // function type:
+  //
+  // ```dart
+  // typedef F = int Function(String);
+  //
+  // class C with [!F!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the invalid name from the list, possibly replacing it with the name
+  // of the intended mixin or class:
+  //
+  // ```dart
+  // typedef F = int Function(String);
+  //
+  // class C {}
+  // ```
+  static const CompileTimeErrorCode MIXIN_OF_NON_CLASS = CompileTimeErrorCode(
+    'MIXIN_OF_NON_CLASS',
+    "Classes can only mix in mixins and classes.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
+    "A type alias that expands to a type parameter can't be mixed in.",
+    hasPublishedDocs: true,
+    uniqueName: 'MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER',
+    "A type alias that expands to a type parameter can't be used as a superclass constraint.",
+    hasPublishedDocs: true,
+    uniqueName: 'MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS = CompileTimeErrorCode(
+    'MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS',
+    "Deferred classes can't be used as super-class constraints.",
+    correction: "Try changing the import to not be deferred.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the disallowed type
+   */
+  static const CompileTimeErrorCode
+      MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS = CompileTimeErrorCode(
+    'SUBTYPE_OF_DISALLOWED_TYPE',
+    "''{0}' can't be used as a superclass constraint.",
+    correction:
+        "Try specifying a different super-class constraint, or remove the 'on' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type following the `on`
+  // keyword in a mixin declaration is neither a class nor a mixin.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `F` is neither a class
+  // nor a mixin:
+  //
+  // ```dart
+  // typedef F = void Function();
+  //
+  // mixin M on [!F!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type was intended to be a class but was mistyped, then replace the
+  // name.
+  //
+  // Otherwise, remove the type from the `on` clause.
+  static const CompileTimeErrorCode MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE =
+      CompileTimeErrorCode(
+    'MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE',
+    "Only classes and mixins can be used as superclass constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not
+   * denote a class available in the immediately enclosing scope.
+   */
+  static const CompileTimeErrorCode MIXIN_WITH_NON_CLASS_SUPERCLASS =
+      CompileTimeErrorCode(
+    'MIXIN_WITH_NON_CLASS_SUPERCLASS',
+    "Mixin can only be applied to class.",
+  );
+
+  /**
+   * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
+   * in which case its only action is to invoke another generative constructor.
+   */
+  static const CompileTimeErrorCode
+      MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS = CompileTimeErrorCode(
+    'MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
+    "Constructors can have at most one 'this' redirection.",
+    correction: "Try removing all but one of the redirections.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the initializer list of a
+  // constructor contains more than one invocation of a constructor from the
+  // superclass. The initializer list is required to have exactly one such call,
+  // which can either be explicit or implicit.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the initializer list
+  // for `B`’s constructor invokes both the constructor `one` and the
+  // constructor `two` from the superclass `A`:
+  //
+  // ```dart
+  // class A {
+  //   int? x;
+  //   String? s;
+  //   A.one(this.x);
+  //   A.two(this.s);
+  // }
+  //
+  // class B extends A {
+  //   B() : super.one(0), [!super.two('')!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If one of the super constructors will initialize the instance fully, then
+  // remove the other:
+  //
+  // ```dart
+  // class A {
+  //   int? x;
+  //   String? s;
+  //   A.one(this.x);
+  //   A.two(this.s);
+  // }
+  //
+  // class B extends A {
+  //   B() : super.one(0);
+  // }
+  // ```
+  //
+  // If the initialization achieved by one of the super constructors can be
+  // performed in the body of the constructor, then remove its super invocation
+  // and perform the initialization in the body:
+  //
+  // ```dart
+  // class A {
+  //   int? x;
+  //   String? s;
+  //   A.one(this.x);
+  //   A.two(this.s);
+  // }
+  //
+  // class B extends A {
+  //   B() : super.one(0) {
+  //     s = '';
+  //   }
+  // }
+  // ```
+  //
+  // If the initialization can only be performed in a constructor in the
+  // superclass, then either add a new constructor or modify one of the existing
+  // constructors so there's a constructor that allows all the required
+  // initialization to occur in a single call:
+  //
+  // ```dart
+  // class A {
+  //   int? x;
+  //   String? s;
+  //   A.one(this.x);
+  //   A.two(this.s);
+  //   A.three(this.x, this.s);
+  // }
+  //
+  // class B extends A {
+  //   B() : super.three(0, '');
+  // }
+  // ```
+  static const CompileTimeErrorCode MULTIPLE_SUPER_INITIALIZERS =
+      CompileTimeErrorCode(
+    'MULTIPLE_SUPER_INITIALIZERS',
+    "A constructor can have at most one 'super' initializer.",
+    correction: "Try removing all but one of the 'super' initializers.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the non-type element
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance creation using
+  // either `new` or `const` specifies a name that isn't defined as a class.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `f` is a function
+  // rather than a class:
+  //
+  // ```dart
+  // int f() => 0;
+  //
+  // void g() {
+  //   new [!f!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a class should be created, then replace the invalid name with the name
+  // of a valid class:
+  //
+  // ```dart
+  // int f() => 0;
+  //
+  // void g() {
+  //   new Object();
+  // }
+  // ```
+  //
+  // If the name is the name of a function and you want that function to be
+  // invoked, then remove the `new` or `const` keyword:
+  //
+  // ```dart
+  // int f() => 0;
+  //
+  // void g() {
+  //   f();
+  // }
+  // ```
+  static const CompileTimeErrorCode NEW_WITH_NON_TYPE = CompileTimeErrorCode(
+    'CREATION_WITH_NON_TYPE',
+    "The name '{0}' isn't a class.",
+    correction: "Try correcting the name to match an existing class.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+    uniqueName: 'NEW_WITH_NON_TYPE',
+  );
+
+  /**
+   * 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 an unnamed 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 CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS =
+      CompileTimeErrorCode(
+    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+    "Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and {4} more.",
+    correction:
+        "Try implementing the missing methods, or make the class abstract.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS',
+  );
+
+  /**
+   * 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 = CompileTimeErrorCode(
+    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+    "Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'.",
+    correction:
+        "Try implementing the missing methods, or make the class abstract.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR',
+  );
+
+  /**
+   * 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 = CompileTimeErrorCode(
+    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+    "Missing concrete implementation of '{0}'.",
+    correction:
+        "Try implementing the missing method, or make the class abstract.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE',
+  );
+
+  /**
+   * 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 = CompileTimeErrorCode(
+    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+    "Missing concrete implementations of '{0}', '{1}', and '{2}'.",
+    correction:
+        "Try implementing the missing methods, or make the class abstract.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
+  );
+
+  /**
+   * 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 = CompileTimeErrorCode(
+    'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+    "Missing concrete implementations of '{0}' and '{1}'.",
+    correction:
+        "Try implementing the missing methods, or make the class abstract.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO',
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### 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.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `j` isn't a constant:
+  //
+  // ```dart
+  // void f(int i, int j) {
+  //   switch (i) {
+  //     case [!j!]:
+  //       // ...
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either make the expression a constant expression, or rewrite the `switch`
+  // statement as a sequence of `if` statements:
+  //
+  // ```dart
+  // void f(int i, int j) {
+  //   if (i == j) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_CASE_EXPRESSION =
+      CompileTimeErrorCode(
+    'NON_CONSTANT_CASE_EXPRESSION',
+    "Case expressions must be constant.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the expression in a case clause
+  // references a constant from a library that is imported using a deferred
+  // import. In order for switch statements to be compiled efficiently, the
+  // constants referenced in case clauses need to be available at compile time,
+  // and constants from deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines the constant `zero`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // const zero = 0;
+  // ```
+  //
+  // The following code produces this diagnostic because the library `a.dart` is
+  // imported using a `deferred` import, and the constant `a.zero`, declared in
+  // the imported library, is used in a case clause:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // void f(int x) {
+  //   switch (x) {
+  //     case [!a.zero!]:
+  //       // ...
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the constant from the imported library, then
+  // remove the `deferred` keyword:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // void f(int x) {
+  //   switch (x) {
+  //     case a.zero:
+  //       // ...
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If you need to reference the constant from the imported library and also
+  // need the imported library to be deferred, then rewrite the switch statement
+  // as a sequence of `if` statements:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // void f(int x) {
+  //   if (x == a.zero) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // If you don't need to reference the constant, then replace the case
+  // expression:
+  //
+  // ```dart
+  // void f(int x) {
+  //   switch (x) {
+  //     case 0:
+  //       // ...
+  //       break;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
+    'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as a case expression.",
+    correction:
+        "Try re-writing the switch as a series of if statements, or changing the import to not be deferred.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an optional parameter, either
+  // named or positional, has a default value that isn't a compile-time
+  // constant.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // var defaultValue = 3;
+  //
+  // void f([int value = [!defaultValue!]]) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the default value can be converted to be a constant, then convert it:
+  //
+  // ```dart
+  // %language=2.9
+  // const defaultValue = 3;
+  //
+  // void f([int value = defaultValue]) {}
+  // ```
+  //
+  // If the default value needs to change over time, then apply the default
+  // value inside the function:
+  //
+  // ```dart
+  // %language=2.9
+  // var defaultValue = 3;
+  //
+  // void f([int value]) {
+  //   value ??= defaultValue;
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_DEFAULT_VALUE =
+      CompileTimeErrorCode(
+    'NON_CONSTANT_DEFAULT_VALUE',
+    "The default value of an optional parameter must be constant.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the default value of an optional
+  // parameter uses a constant from a library imported using a deferred import.
+  // Default values need to be available at compile time, and constants from
+  // deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines the constant `zero`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // const zero = 0;
+  // ```
+  //
+  // The following code produces this diagnostic because `zero` is declared in a
+  // library imported using a deferred import:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // void f({int x = [!a.zero!]}) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the constant from the imported library, then
+  // remove the `deferred` keyword:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // void f({int x = a.zero}) {}
+  // ```
+  //
+  // If you don't need to reference the constant, then replace the default
+  // value:
+  //
+  // ```dart
+  // void f({int x = 0}) {}
+  // ```
+  static const CompileTimeErrorCode
+      NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
+    'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as a default parameter value.",
+    correction:
+        "Try leaving the default as null and initializing the parameter inside the function body.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // 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][]).
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` isn't a constant,
+  // even though it appears in an implicitly constant list literal:
+  //
+  // ```dart
+  // var x = 2;
+  // var y = const <int>[0, 1, [!x!]];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the list needs to be a constant list, then convert the element to be a
+  // constant. In the example above, you might add the `const` keyword to the
+  // declaration of `x`:
+  //
+  // ```dart
+  // const x = 2;
+  // var y = const <int>[0, 1, x];
+  // ```
+  //
+  // If the expression can't be made a constant, then the list can't be a
+  // constant either, so you must change the code so that the list isn't a
+  // constant. In the example above this means removing the `const` keyword
+  // before the list literal:
+  //
+  // ```dart
+  // var x = 2;
+  // var y = <int>[0, 1, x];
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT =
+      CompileTimeErrorCode(
+    'NON_CONSTANT_LIST_ELEMENT',
+    "The values in a const list literal must be constants.",
+    correction: "Try removing the keyword 'const' from the list literal.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a collection literal that is
+  // either explicitly (because it's prefixed by the `const` keyword) or
+  // implicitly (because it appears in a [constant context][]) a constant
+  // contains a value that is declared in a library that is imported using a
+  // deferred import. Constants are evaluated at compile time, and values from
+  // deferred libraries aren't available at compile time.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines the constant `zero`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // const zero = 0;
+  // ```
+  //
+  // The following code produces this diagnostic because the constant list
+  // literal contains `a.zero`, which is imported using a `deferred` import:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // var l = const [[!a.zero!]];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the collection literal isn't required to be constant, then remove the
+  // `const` keyword:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a;
+  //
+  // var l = [a.zero];
+  // ```
+  //
+  // If the collection is required to be constant and the imported constant must
+  // be referenced, then remove the keyword `deferred` from the import:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // var l = const [a.zero];
+  // ```
+  //
+  // If you don't need to reference the constant, then replace it with a
+  // suitable value:
+  //
+  // ```dart
+  // var l = const [0];
+  // ```
+  static const CompileTimeErrorCode
+      NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
+    'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as values in a 'const' list literal.",
+    correction:
+        "Try removing the keyword 'const' from the list literal or removing the keyword 'deferred' from the import.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY',
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key in a constant map literal
+  // isn't a constant value.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic beause `a` isn't a constant:
+  //
+  // ```dart
+  // var a = 'a';
+  // var m = const {[!a!]: 0};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the map needs to be a constant map, then make the key a constant:
+  //
+  // ```dart
+  // const a = 'a';
+  // var m = const {a: 0};
+  // ```
+  //
+  // If the map doesn't need to be a constant map, then remove the `const`
+  // keyword:
+  //
+  // ```dart
+  // var a = 'a';
+  // var m = {a: 0};
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY = CompileTimeErrorCode(
+    'NON_CONSTANT_MAP_KEY',
+    "The keys in a const map literal must be constant.",
+    correction: "Try removing the keyword 'const' from the map literal.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as keys in a 'const' map literal.",
+    correction:
+        "Try removing the keyword 'const' from the map literal or removing the keyword 'deferred' from the import.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a value in a constant map
+  // literal isn't a constant value.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `a` isn't a constant:
+  //
+  // ```dart
+  // var a = 'a';
+  // var m = const {0: [!a!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the map needs to be a constant map, then make the key a constant:
+  //
+  // ```dart
+  // const a = 'a';
+  // var m = const {0: a};
+  // ```
+  //
+  // If the map doesn't need to be a constant map, then remove the `const`
+  // keyword:
+  //
+  // ```dart
+  // var a = 'a';
+  // var m = {0: a};
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_MAP_VALUE =
+      CompileTimeErrorCode(
+    'NON_CONSTANT_MAP_VALUE',
+    "The values in a const map literal must be constant.",
+    correction: "Try removing the keyword 'const' from the map literal.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode
+      NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = CompileTimeErrorCode(
+    'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as values in a 'const' map literal.",
+    correction:
+        "Try removing the keyword 'const' from the map literal or removing the keyword 'deferred' from the import.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constant set literal contains
+  // an element that isn't a compile-time constant.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `i` isn't a constant:
+  //
+  // ```dart
+  // var i = 0;
+  //
+  // var s = const {[!i!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the element can be changed to be a constant, then change it:
+  //
+  // ```dart
+  // const i = 0;
+  //
+  // var s = const {i};
+  // ```
+  //
+  // If the element can't be a constant, then remove the keyword `const`:
+  //
+  // ```dart
+  // var i = 0;
+  //
+  // var s = {i};
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_SET_ELEMENT =
+      CompileTimeErrorCode(
+    'NON_CONSTANT_SET_ELEMENT',
+    "The values in a const set literal must be constants.",
+    correction: "Try removing the keyword 'const' from the set literal.",
+    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.
+   */
+  static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT =
+      CompileTimeErrorCode(
+    'NON_CONST_MAP_AS_EXPRESSION_STATEMENT',
+    "A non-constant map or set literal without type arguments can't be used as an expression statement.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the non-generative constructor
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the initializer list of a
+  // constructor invokes a constructor from the superclass, and the invoked
+  // constructor is a factory constructor. Only a generative constructor can be
+  // invoked in the initializer list.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of the
+  // constructor `super.one()` is invoking a factory constructor:
+  //
+  // ```dart
+  // class A {
+  //   factory A.one() = B;
+  //   A.two();
+  // }
+  //
+  // class B extends A {
+  //   B() : [!super.one()!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the super invocation to invoke a generative constructor:
+  //
+  // ```dart
+  // class A {
+  //   factory A.one() = B;
+  //   A.two();
+  // }
+  //
+  // class B extends A {
+  //   B() : super.two();
+  // }
+  // ```
+  //
+  // If the generative constructor is the unnamed constructor, and if there are
+  // no arguments being passed to it, then you can remove the super invocation.
+  static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'NON_GENERATIVE_CONSTRUCTOR',
+    "The generative constructor '{0}' is expected, but a factory was found.",
+    correction:
+        "Try calling a different constructor of the superclass, or making the called constructor not be a factory constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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 unnamed constructor of superclass '{0}' (called by the 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.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the body of a factory
+  // constructor is marked with `async`, `async*`, or `sync*`. All constructors,
+  // including factory constructors, are required to return an instance of the
+  // class in which they're declared, not a `Future`, `Stream`, or `Iterator`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the factory
+  // constructor is marked with `async`:
+  //
+  // ```dart
+  // class C {
+  //   factory C() [!async!] {
+  //     return C._();
+  //   }
+  //   C._();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the member must be declared as a factory constructor, then remove the
+  // keyword appearing before the body:
+  //
+  // ```dart
+  // class C {
+  //   factory C() {
+  //     return C._();
+  //   }
+  //   C._();
+  // }
+  // ```
+  //
+  // If the member must return something other than an instance of the enclosing
+  // class, then make the member a static method:
+  //
+  // ```dart
+  // class C {
+  //   static Future<C> m() async {
+  //     return C._();
+  //   }
+  //   C._();
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_SYNC_FACTORY = CompileTimeErrorCode(
+    'NON_SYNC_FACTORY',
+    "Factory bodies can't use 'async', 'async*', or 'sync*'.",
+    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 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
+  // %language=2.9
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on [!f!] {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the name to the type of object that should be caught:
+  //
+  // ```dart
+  // %language=2.9
+  // 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a declaration of the operator
+  // `[]=` has a return type other than `void`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the declaration of the
+  // operator `[]=` has a return type of `int`:
+  //
+  // ```dart
+  // class C {
+  //   [!int!] operator []=(int index, int value) => 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the return type to `void`:
+  //
+  // ```dart
+  // class C {
+  //   void operator []=(int index, int value) => 0;
+  // }
+  // ```
+  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'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a setter is defined with a
+  // return type other than `void`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the setter `p` has a
+  // return type of `int`:
+  //
+  // ```dart
+  // class C {
+  //   [!int!] set p(int i) => 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the return type to `void` or omit the return type:
+  //
+  // ```dart
+  // class C {
+  //   set p(int i) => 0;
+  // }
+  // ```
+  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.",
+    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 [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
+  //   the reference based on the specification of [definite assignment][].
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` can't have a value
+  // of `null`, but is referenced before a value was assigned to it:
+  //
+  // ```dart
+  // String f() {
+  //   int x;
+  //   return [!x!].toString();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the assignment to `x`
+  // might not be executed, so it might have a value of `null`:
+  //
+  // ```dart
+  // int g(bool b) {
+  //   int x;
+  //   if (b) {
+  //     x = 1;
+  //   }
+  //   return [!x!] * 2;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the analyzer can't
+  // prove, based on definite assignment analysis, that `x` won't be referenced
+  // without having a value assigned to it:
+  //
+  // ```dart
+  // int h(bool b) {
+  //   int x;
+  //   if (b) {
+  //     x = 1;
+  //   }
+  //   if (b) {
+  //     return [!x!] * 2;
+  //   }
+  //   return 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If `null` is a valid value, then make the variable nullable:
+  //
+  // ```dart
+  // String f() {
+  //   int? x;
+  //   return x!.toString();
+  // }
+  // ```
+  //
+  // If `null` isn’t a valid value, and there's a reasonable default value, then
+  // add an initializer:
+  //
+  // ```dart
+  // int g(bool b) {
+  //   int x = 2;
+  //   if (b) {
+  //     x = 1;
+  //   }
+  //   return x * 2;
+  // }
+  // ```
+  //
+  // Otherwise, ensure that a value was assigned on every possible code path
+  // before the value is accessed:
+  //
+  // ```dart
+  // int g(bool b) {
+  //   int x;
+  //   if (b) {
+  //     x = 1;
+  //   } else {
+  //     x = 2;
+  //   }
+  //   return x * 2;
+  // }
+  // ```
+  //
+  // You can also mark the variable as `late`, which removes the diagnostic, but
+  // if the variable isn't assigned a value before it's accessed, then it
+  // results in an exception being thrown at runtime. This approach should only
+  // be used if you're sure that the variable will always be assigned, even
+  // though the analyzer can't prove it based on definite assignment analysis.
+  //
+  // ```dart
+  // int h(bool b) {
+  //   late int x;
+  //   if (b) {
+  //     x = 1;
+  //   }
+  //   if (b) {
+  //     return x * 2;
+  //   }
+  //   return 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE =
+      CompileTimeErrorCode(
+    'NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE',
+    "The non-nullable local variable '{0}' must be assigned before it can be used.",
+    correction:
+        "Try giving it an initializer expression, or ensure that it's assigned on every execution path.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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 operator that is not a binary operator.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an operator that can only be
+  // used as a unary operator is used as a binary operator.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the operator `~` can
+  // only be used as a unary operator:
+  //
+  // ```dart
+  // var a = 5 [!~!] 3;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the operator with the correct binary operator:
+  //
+  // ```dart
+  // var a = 5 - 3;
+  // ```
+  static const CompileTimeErrorCode NOT_BINARY_OPERATOR = CompileTimeErrorCode(
+    'NOT_BINARY_OPERATOR',
+    "'{0}' isn't a binary operator.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the expected number of required arguments
+   * 1: the actual number of positional arguments given
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function invocation
+  // has fewer positional arguments than the number of required positional
+  // parameters.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` declares two
+  // required parameters, but only one argument is provided:
+  //
+  // ```dart
+  // void f(int a, int b) {}
+  // void g() {
+  //   f[!(0)!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add arguments corresponding to the remaining parameters:
+  //
+  // ```dart
+  // void f(int a, int b) {}
+  // void g() {
+  //   f(0, 1);
+  // }
+  // ```
+  static const CompileTimeErrorCode NOT_ENOUGH_POSITIONAL_ARGUMENTS =
+      CompileTimeErrorCode(
+    'NOT_ENOUGH_POSITIONAL_ARGUMENTS',
+    "{0} positional argument(s) expected, but {1} found.",
+    correction: "Try adding the missing arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field that is not initialized
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a field is declared and has all
+  // these characteristics:
+  // - Has a type that's [potentially non-nullable][]
+  // - Doesn't have an initializer
+  // - Isn't marked as `late`
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` is implicitly
+  // initialized to `null` when it isn't allowed to be `null`:
+  //
+  // ```dart
+  // class C {
+  //   int [!x!];
+  // }
+  // ```
+  //
+  // Similarly, the following code produces this diagnostic because `x` is
+  // implicitly initialized to `null`, when it isn't allowed to be `null`, by
+  // one of the constructors, even though it's initialized by other
+  // constructors:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C(this.x);
+  //
+  //   [!C!].n();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's a reasonable default value for the field that’s the same for all
+  // instances, then add an initializer expression:
+  //
+  // ```dart
+  // class C {
+  //   int x = 0;
+  // }
+  // ```
+  //
+  // If the value of the field should be provided when an instance is created,
+  // then add a constructor that sets the value of the field or update an
+  // existing constructor:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // You can also mark the field as `late`, which removes the diagnostic, but if
+  // the field isn't assigned a value before it's accessed, then it results in
+  // an exception being thrown at runtime. This approach should only be used if
+  // you're sure that the field will always be assigned before it's referenced.
+  //
+  // ```dart
+  // class C {
+  //   late int x;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD = CompileTimeErrorCode(
+    'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD',
+    "Non-nullable instance field '{0}' must be initialized.",
+    correction:
+        "Try adding an initializer expression, or a generative constructor that initializes it, or mark it 'late'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the field that is not initialized
+   */
+  static const CompileTimeErrorCode
+      NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD',
+    "Non-nullable instance field '{0}' must be initialized.",
+    correction:
+        "Try adding an initializer expression, or add a field initializer in this constructor, or mark it 'late'.",
+    hasPublishedDocs: true,
+    uniqueName: 'NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the variable that is invalid
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a static field or top-level
+  // variable has a type that's non-nullable and doesn't have an initializer.
+  // Fields and variables that don't have an initializer are normally
+  // initialized to `null`, but the type of the field or variable doesn't allow
+  // it to be set to `null`, so an explicit initializer must be provided.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the field `f` can't be
+  // initialized to `null`:
+  //
+  // ```dart
+  // class C {
+  //   static int [!f!];
+  // }
+  // ```
+  //
+  // Similarly, the following code produces this diagnostic because the
+  // top-level variable `v` can't be initialized to `null`:
+  //
+  // ```dart
+  // int [!v!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the field or variable can't be initialized to `null`, then add an
+  // initializer that sets it to a non-null value:
+  //
+  // ```dart
+  // class C {
+  //   static int f = 0;
+  // }
+  // ```
+  //
+  // If the field or variable should be initialized to `null`, then change the
+  // type to be nullable:
+  //
+  // ```dart
+  // int? v;
+  // ```
+  //
+  // If the field or variable can't be initialized in the declaration but will
+  // always be initialized before it's referenced, then mark it as being `late`:
+  //
+  // ```dart
+  // class C {
+  //   static late int f;
+  // }
+  // ```
+  static const CompileTimeErrorCode NOT_INITIALIZED_NON_NULLABLE_VARIABLE =
+      CompileTimeErrorCode(
+    'NOT_INITIALIZED_NON_NULLABLE_VARIABLE',
+    "The non-nullable variable '{0}' must be initialized.",
+    correction: "Try adding an initializer expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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
+  // expression of a spread element that appears in either a list literal or a
+  // set literal doesn't implement the type `Iterable`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // var m = <String, int>{'a': 0, 'b': 1};
+  // var s = <String>{...[!m!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The most common fix is to replace the expression with one that produces an
+  // iterable object:
+  //
+  // ```dart
+  // var m = <String, int>{'a': 0, 'b': 1};
+  // var s = <String>{...m.keys};
+  // ```
+  static const CompileTimeErrorCode NOT_ITERABLE_SPREAD = CompileTimeErrorCode(
+    'NOT_ITERABLE_SPREAD',
+    "Spread elements in list or set literals must implement 'Iterable'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the static type of the
+  // expression of a spread element that appears in a map literal doesn't
+  // implement the type `Map`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `l` isn't a `Map`:
+  //
+  // ```dart
+  // var l =  <String>['a', 'b'];
+  // var m = <int, String>{...[!l!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The most common fix is to replace the expression with one that produces a
+  // map:
+  //
+  // ```dart
+  // var l =  <String>['a', 'b'];
+  // var m = <int, String>{...l.asMap()};
+  // ```
+  static const CompileTimeErrorCode NOT_MAP_SPREAD = CompileTimeErrorCode(
+    'NOT_MAP_SPREAD',
+    "Spread elements in map literals must implement 'Map'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode NOT_NULL_AWARE_NULL_SPREAD =
+      CompileTimeErrorCode(
+    'NOT_NULL_AWARE_NULL_SPREAD',
+    "The Null typed expression can't be used with a non-null-aware spread.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an annotation consists of a
+  // single identifier, but that identifier is the name of a class rather than a
+  // variable. To create an instance of the class, the identifier must be
+  // followed by an argument list.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `C` is a class, and a
+  // class can't be used as an annotation without invoking a `const` constructor
+  // from the class:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  // }
+  //
+  // [!@C!]
+  // var x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add the missing argument list:
+  //
+  // ```dart
+  // class C {
+  //   const C();
+  // }
+  //
+  // @C()
+  // var x;
+  // ```
+  static const CompileTimeErrorCode NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS =
+      CompileTimeErrorCode(
+    'NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS',
+    "Annotation creation must have arguments.",
+    correction: "Try adding an empty argument list.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class where override error was detected
+   * 1: the list of candidate signatures which cannot be combined
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there is a method declaration
+  // for which one or more types needs to be inferred, and those types can't be
+  // inferred because none of the overridden methods has a function type that is
+  // a supertype of all the other overridden methods, as specified by
+  // [override inference][].
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the method `m` declared
+  // in the class `C` is missing both the return type and the type of the
+  // parameter `a`, and neither of the missing types can be inferred for it:
+  //
+  // ```dart
+  // abstract class A {
+  //   A m(String a);
+  // }
+  //
+  // abstract class B {
+  //   B m(int a);
+  // }
+  //
+  // abstract class C implements A, B {
+  //   [!m!](a);
+  // }
+  // ```
+  //
+  // In this example, override inference can't be performed because the
+  // overridden methods are incompatible in these ways:
+  // - Neither parameter type (`String` and `int`) is a supertype of the other.
+  // - Neither return type is a subtype of the other.
+  //
+  // #### Common fixes
+  //
+  // If possible, add types to the method in the subclass that are consistent
+  // with the types from all the overridden methods:
+  //
+  // ```dart
+  // abstract class A {
+  //   A m(String a);
+  // }
+  //
+  // abstract class B {
+  //   B m(int a);
+  // }
+  //
+  // abstract class C implements A, B {
+  //   C m(Object a);
+  // }
+  // ```
+  static const CompileTimeErrorCode NO_COMBINED_SUPER_SIGNATURE =
+      CompileTimeErrorCode(
+    'NO_COMBINED_SUPER_SIGNATURE',
+    "Can't infer missing types in '{0}' from overridden methods: {1}.",
+    correction:
+        "Try providing explicit types for this method's parameters and return type.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the superclass that does not define an implicitly invoked
+   *    constructor
+   */
+  static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT =
+      CompileTimeErrorCode(
+    'NO_DEFAULT_SUPER_CONSTRUCTOR',
+    "The superclass '{0}' doesn't have a zero argument constructor.",
+    correction:
+        "Try declaring a zero argument constructor in '{0}', or explicitly invoking a different constructor in '{0}'.",
+    uniqueName: 'NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the superclass that does not define an implicitly invoked
+   *    constructor
+   * 1: the name of the subclass that does not contain any explicit constructors
+   */
+  static const CompileTimeErrorCode NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT =
+      CompileTimeErrorCode(
+    'NO_DEFAULT_SUPER_CONSTRUCTOR',
+    "The superclass '{0}' doesn't have a zero argument constructor.",
+    correction:
+        "Try declaring a zero argument constructor in '{0}', or declaring a constructor in {1} that explicitly invokes a constructor in '{0}'.",
+    uniqueName: 'NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT',
+  );
+
+  /**
+   * 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.
+   *
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the superclass
+   */
+  static const CompileTimeErrorCode NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS =
+      CompileTimeErrorCode(
+    'NO_GENERATIVE_CONSTRUCTORS_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.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class declaration uses an
+  // `extends` clause to specify a superclass, and the superclass is followed by
+  // a `?`.
+  //
+  // It isn't valid to specify a nullable superclass because doing so would have
+  // no meaning; it wouldn't change either the interface or implementation being
+  // inherited by the class containing the `extends` clause.
+  //
+  // Note, however, that it _is_ valid to use a nullable type as a type argument
+  // to the superclass, such as `class A extends B<C?> {}`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `A?` is a nullable
+  // type, and nullable types can't be used in an `extends` clause:
+  //
+  // ```dart
+  // class A {}
+  // class B extends [!A?!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // class A {}
+  // class B extends A {}
+  // ```
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_EXTENDS_CLAUSE =
+      CompileTimeErrorCode(
+    'NULLABLE_TYPE_IN_EXTENDS_CLAUSE',
+    "A class can't extend a nullable type.",
+    correction: "Try removing the question mark.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class or mixin declaration has
+  // an `implements` clause, and an interface is followed by a `?`.
+  //
+  // It isn't valid to specify a nullable interface because doing so would have
+  // no meaning; it wouldn't change the interface being inherited by the class
+  // containing the `implements` clause.
+  //
+  // Note, however, that it _is_ valid to use a nullable type as a type argument
+  // to the interface, such as `class A implements B<C?> {}`.
+  //
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `A?` is a nullable
+  // type, and nullable types can't be used in an `implements` clause:
+  //
+  // ```dart
+  // class A {}
+  // class B implements [!A?!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // class A {}
+  // class B implements A {}
+  // ```
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE =
+      CompileTimeErrorCode(
+    'NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE',
+    "A class or mixin can't implement a nullable type.",
+    correction: "Try removing the question mark.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a mixin declaration uses an `on`
+  // clause to specify a superclass constraint, and the class that's specified
+  // is followed by a `?`.
+  //
+  // It isn't valid to specify a nullable superclass constraint because doing so
+  // would have no meaning; it wouldn't change the interface being depended on
+  // by the mixin containing the `on` clause.
+  //
+  // Note, however, that it _is_ valid to use a nullable type as a type argument
+  // to the superclass constraint, such as `mixin A on B<C?> {}`.
+  //
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `A?` is a nullable type
+  // and nullable types can't be used in an `on` clause:
+  //
+  // ```dart
+  // class C {}
+  // mixin M on [!C?!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // class C {}
+  // mixin M on C {}
+  // ```
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_ON_CLAUSE =
+      CompileTimeErrorCode(
+    'NULLABLE_TYPE_IN_ON_CLAUSE',
+    "A mixin can't have a nullable type as a superclass constraint.",
+    correction: "Try removing the question mark.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class or mixin declaration has
+  // a `with` clause, and a mixin is followed by a `?`.
+  //
+  // It isn't valid to specify a nullable mixin because doing so would have no
+  // meaning; it wouldn't change either the interface or implementation being
+  // inherited by the class containing the `with` clause.
+  //
+  // Note, however, that it _is_ valid to use a nullable type as a type argument
+  // to the mixin, such as `class A with B<C?> {}`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `A?` is a nullable
+  // type, and nullable types can't be used in a `with` clause:
+  //
+  // ```dart
+  // mixin M {}
+  // class C with [!M?!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // mixin M {}
+  // class C with M {}
+  // ```
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_WITH_CLAUSE =
+      CompileTimeErrorCode(
+    'NULLABLE_TYPE_IN_WITH_CLAUSE',
+    "A class or mixin can't mix in a nullable type.",
+    correction: "Try removing the question mark.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 7.9 Superclasses: It is a compile-time error to specify an extends clause
+   * for class Object.
+   */
+  static const CompileTimeErrorCode OBJECT_CANNOT_EXTEND_ANOTHER_CLASS =
+      CompileTimeErrorCode(
+    'OBJECT_CANNOT_EXTEND_ANOTHER_CLASS',
+    "The class 'Object' can't extend any other class.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the interface that is implemented more than once
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the same type is listed in the
+  // superclass constraints of a mixin multiple times.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `A` is included twice
+  // in the superclass constraints for `M`:
+  //
+  // ```dart
+  // mixin M on A, [!A!] {
+  // }
+  //
+  // class A {}
+  // class B {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different type should be included in the superclass constraints, then
+  // replace one of the occurrences with the other type:
+  //
+  // ```dart
+  // mixin M on A, B {
+  // }
+  //
+  // class A {}
+  // class B {}
+  // ```
+  //
+  // If no other type was intended, then remove the repeated type name:
+  //
+  // ```dart
+  // mixin M on A {
+  // }
+  //
+  // class A {}
+  // class B {}
+  // ```
+  static const CompileTimeErrorCode ON_REPEATED = CompileTimeErrorCode(
+    'ON_REPEATED',
+    "The type '{0}' can be included in the superclass constraints only once.",
+    correction: "Try removing all except one occurrence of the type name.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when one or more of the parameters in
+  // an operator declaration are optional.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the parameter `other`
+  // is an optional parameter:
+  //
+  // ```dart
+  // class C {
+  //   C operator +([[!C? other!]]) => this;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Make all of the parameters be required parameters:
+  //
+  // ```dart
+  // class C {
+  //   C operator +(C other) => this;
+  // }
+  // ```
+  static const CompileTimeErrorCode OPTIONAL_PARAMETER_IN_OPERATOR =
+      CompileTimeErrorCode(
+    'OPTIONAL_PARAMETER_IN_OPERATOR',
+    "Optional parameters aren't allowed when defining an operator.",
+    correction: "Try removing the optional parameters.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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
+  //
+  // The analyzer produces this diagnostic when a part directive is found and
+  // the referenced file doesn't have a part-of directive.
+  //
+  // #### Examples
+  //
+  // Given a file (`a.dart`) containing:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {}
+  // ```
+  //
+  // The following code produces this diagnostic because `a.dart` doesn't
+  // contain a part-of directive:
+  //
+  // ```dart
+  // part [!'a.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the referenced file is intended to be a part of another library, then
+  // add a part-of directive to the file:
+  //
+  // ```dart
+  // part of 'test.dart';
+  //
+  // class A {}
+  // ```
+  //
+  // If the referenced file is intended to be a library, then replace the part
+  // directive with an import directive:
+  //
+  // ```dart
+  // import 'a.dart';
+  // ```
+  static const CompileTimeErrorCode PART_OF_NON_PART = CompileTimeErrorCode(
+    'PART_OF_NON_PART',
+    "The included part '{0}' must have a part-of directive.",
+    correction: "Try adding a part-of directive to '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the URI of the expected library
+   * 1: the non-matching actual library name from the "part of" declaration
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library that doesn't have a
+  // `library` directive (and hence has no name) contains a `part` directive and
+  // the `part of` directive in the part file uses a name to specify the library
+  // that it's a part of.
+  //
+  // #### Example
+  //
+  // Given a part file named `part_file.dart` containing the following code:
+  //
+  // ```dart
+  // %uri="lib/part_file.dart"
+  // part of lib;
+  // ```
+  //
+  // The following code produces this diagnostic because the library including
+  // the part file doesn't have a name even though the part file uses a name to
+  // specify which library it's a part of:
+  //
+  // ```dart
+  // part [!'part_file.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the `part of` directive in the part file to specify its library by
+  // URI:
+  //
+  // ```dart
+  // part of 'test.dart';
+  // ```
+  static const CompileTimeErrorCode PART_OF_UNNAMED_LIBRARY =
+      CompileTimeErrorCode(
+    'PART_OF_UNNAMED_LIBRARY',
+    "The library is unnamed. A URI is expected, not a library name '{0}', in the part-of directive.",
+    correction:
+        "Try changing the part-of directive to a URI, or try including a different part.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the prefix
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name is used as both an import
+  // prefix and the name of a top-level declaration in the same library.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `f` is used as both an
+  // import prefix and the name of a function:
+  //
+  // ```dart
+  // import 'dart:math' as f;
+  //
+  // int [!f!]() => f.min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to use the name for the import prefix, then rename the
+  // top-level declaration:
+  //
+  // ```dart
+  // import 'dart:math' as f;
+  //
+  // int g() => f.min(0, 1);
+  // ```
+  //
+  // If you want to use the name for the top-level declaration, then rename the
+  // import prefix:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // int f() => math.min(0, 1);
+  // ```
+  static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER =
+      CompileTimeErrorCode(
+    'PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER',
+    "The name '{0}' is already used as an import prefix and can't be used to name a top-level element.",
+    correction: "Try renaming either the top-level element or the prefix.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the prefix
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import prefix is used by
+  // itself, without accessing any of the names declared in the libraries
+  // associated with the prefix. Prefixes aren't variables, and therefore can't
+  // be used as a value.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the prefix `math` is
+  // being used as if it were a variable:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // void f() {
+  //   print([!math!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the code is incomplete, then reference something in one of the libraries
+  // associated with the prefix:
+  //
+  // ```dart
+  // import 'dart:math' as math;
+  //
+  // void f() {
+  //   print(math.pi);
+  // }
+  // ```
+  //
+  // If the name is wrong, then correct the name.
+  static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT =
+      CompileTimeErrorCode(
+    'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT',
+    "The name '{0}' refers to an import prefix, so it must be followed by '.'.",
+    correction:
+        "Try correcting the name to refer to something other than a prefix, or renaming the prefix.",
+    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.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the private name that collides
+   * 1: the name of the first mixin
+   * 2: the name of the second mixin
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when two mixins that define the same
+  // private member are used together in a single class in a library other than
+  // the one that defines the mixins.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` containing the following code:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {
+  //   void _foo() {}
+  // }
+  //
+  // class B {
+  //   void _foo() {}
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the classes `A` and `B`
+  // both define the method `_foo`:
+  //
+  // ```dart
+  // import 'a.dart';
+  //
+  // class C extends Object with A, [!B!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need both of the mixins, then remove one of them from the
+  // `with` clause:
+  //
+  // ```dart
+  // import 'a.dart';
+  //
+  // class C extends Object with A, [!B!] {}
+  // ```
+  //
+  // If you need both of the mixins, then rename the conflicting member in one
+  // of the two mixins.
+  static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION =
+      CompileTimeErrorCode(
+    'PRIVATE_COLLISION_IN_MIXIN_APPLICATION',
+    "The private name '{0}', defined by '{1}', conflicts with the same name defined by '{2}'.",
+    correction: "Try removing '{1}' from the 'with' clause.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name of a named parameter
+  // starts with an underscore.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the named parameter
+  // `_x` starts with an underscore:
+  //
+  // ```dart
+  // class C {
+  //   void m({int [!_x!] = 0}) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rename the parameter so that it doesn't start with an underscore:
+  //
+  // ```dart
+  // class C {
+  //   void m({int x = 0}) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER =
+      CompileTimeErrorCode(
+    'PRIVATE_OPTIONAL_PARAMETER',
+    "Named parameters can't start with an underscore.",
+    hasPublishedDocs: true,
+  );
+
+  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.",
+  );
+
+  static const CompileTimeErrorCode READ_POTENTIALLY_UNASSIGNED_FINAL =
+      CompileTimeErrorCode(
+    'READ_POTENTIALLY_UNASSIGNED_FINAL',
+    "The final variable '{0}' can't be read because it is potentially unassigned at this point.",
+    correction: "Ensure that it is assigned on necessary execution paths.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of a compile-time
+  // constant is defined in terms of itself, either directly or indirectly,
+  // creating an infinite loop.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic twice because both of the
+  // constants are defined in terms of the other:
+  //
+  // ```dart
+  // const [!secondsPerHour!] = minutesPerHour * 60;
+  // const [!minutesPerHour!] = secondsPerHour / 60;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Break the cycle by finding an alternative way of defining at least one of
+  // the constants:
+  //
+  // ```dart
+  // const secondsPerHour = minutesPerHour * 60;
+  // const minutesPerHour = 60;
+  // ```
+  static const CompileTimeErrorCode RECURSIVE_COMPILE_TIME_CONSTANT =
+      CompileTimeErrorCode(
+    'RECURSIVE_COMPILE_TIME_CONSTANT',
+    "The compile-time constant expression depends on itself.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   *
+   * TODO(scheglov) review this later, there are no explicit "it is a
+   * compile-time error" in specification. But it was added to the co19 and
+   * there is same error for factories.
+   *
+   * https://code.google.com/p/dart/issues/detail?id=954
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor redirects to
+  // itself, either directly or indirectly, creating an infinite loop.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the generative
+  // constructors `C.a` and `C.b` each redirect to the other:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : [!this.b()!];
+  //   C.b() : [!this.a()!];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the factory
+  // constructors `A` and `B` each redirect to the other:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = [!B!];
+  // }
+  // class B implements A {
+  //   factory B() = [!A!];
+  //   B.named();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // In the case of generative constructors, break the cycle by finding defining
+  // at least one of the constructors to not redirect to another constructor:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b();
+  //   C.b();
+  // }
+  // ```
+  //
+  // In the case of factory constructors, break the cycle by defining at least
+  // one of the factory constructors to do one of the following:
+  //
+  // - Redirect to a generative constructor:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = B;
+  // }
+  // class B implements A {
+  //   factory B() = B.named;
+  //   B.named();
+  // }
+  // ```
+  //
+  // - Not redirect to another constructor:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = B;
+  // }
+  // class B implements A {
+  //   factory B() {
+  //     return B.named();
+  //   }
+  //
+  //   B.named();
+  // }
+  // ```
+  //
+  // - Not be a factory constructor:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = B;
+  // }
+  // class B implements A {
+  //   B();
+  //   B.named();
+  // }
+  // ```
+  static const CompileTimeErrorCode RECURSIVE_CONSTRUCTOR_REDIRECT =
+      CompileTimeErrorCode(
+    'RECURSIVE_CONSTRUCTOR_REDIRECT',
+    "Constructors can't redirect to themselves either directly or indirectly.",
+    correction:
+        "Try changing one of the constructors in the loop to not redirect.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode RECURSIVE_FACTORY_REDIRECT =
+      CompileTimeErrorCode(
+    'RECURSIVE_CONSTRUCTOR_REDIRECT',
+    "Constructors can't redirect to themselves either directly or indirectly.",
+    correction:
+        "Try changing one of the constructors in the loop to not redirect.",
+    hasPublishedDocs: true,
+    uniqueName: 'RECURSIVE_FACTORY_REDIRECT',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class that implements itself recursively
+   * 1: a string representation of the implements loop
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's a circularity in the
+  // type hierarchy. This happens when a type, either directly or indirectly,
+  // is declared to be a subtype of itself.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the class `A` is
+  // declared to be a subtype of `B`, and `B` is a subtype of `A`:
+  //
+  // ```dart
+  // class [!A!] extends B {}
+  // class B implements A {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the type hierarchy so that there's no circularity.
+  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE =
+      CompileTimeErrorCode(
+    'RECURSIVE_INTERFACE_INHERITANCE',
+    "'{0}' can't be a superinterface of itself: {1}.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
+   * class <i>C</i> is a superinterface of itself.
+   *
+   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
+   * superinterface of itself.
+   *
+   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+   * superclass of itself.
+   *
+   * Parameters:
+   * 0: the name of the class that implements itself recursively
+   */
+  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_EXTENDS =
+      CompileTimeErrorCode(
+    'RECURSIVE_INTERFACE_INHERITANCE',
+    "'{0}' can't extend itself.",
+    hasPublishedDocs: true,
+    uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_EXTENDS',
+  );
+
+  /**
+   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
+   * class <i>C</i> is a superinterface of itself.
+   *
+   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
+   * superinterface of itself.
+   *
+   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+   * superclass of itself.
+   *
+   * Parameters:
+   * 0: the name of the class that implements itself recursively
+   */
+  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS =
+      CompileTimeErrorCode(
+    'RECURSIVE_INTERFACE_INHERITANCE',
+    "'{0}' can't implement itself.",
+    hasPublishedDocs: true,
+    uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the mixin that constraints itself recursively
+   */
+  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_ON =
+      CompileTimeErrorCode(
+    'RECURSIVE_INTERFACE_INHERITANCE',
+    "'{0}' can't use itself as a superclass constraint.",
+    hasPublishedDocs: true,
+    uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_ON',
+  );
+
+  /**
+   * 7.10 Superinterfaces: It is a compile-time error if the interface of a
+   * class <i>C</i> is a superinterface of itself.
+   *
+   * 8.1 Superinterfaces: It is a compile-time error if an interface is a
+   * superinterface of itself.
+   *
+   * 7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+   * superclass of itself.
+   *
+   * Parameters:
+   * 0: the name of the class that implements itself recursively
+   */
+  static const CompileTimeErrorCode RECURSIVE_INTERFACE_INHERITANCE_WITH =
+      CompileTimeErrorCode(
+    'RECURSIVE_INTERFACE_INHERITANCE',
+    "'{0}' can't use itself as a mixin.",
+    hasPublishedDocs: true,
+    uniqueName: 'RECURSIVE_INTERFACE_INHERITANCE_WITH',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generative constructor
+  // redirects to a constructor that isn't defined.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor `C.a`
+  // redirects to the constructor `C.b`, but `C.b` isn't defined:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : [!this.b()!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the missing constructor must be called, then define it:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b();
+  //   C.b();
+  // }
+  // ```
+  //
+  // If the missing constructor doesn't need to be called, then remove the
+  // redirect:
+  //
+  // ```dart
+  // class C {
+  //   C.a();
+  // }
+  // ```
+  static const CompileTimeErrorCode REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR',
+    "The constructor '{0}' couldn't be found in '{1}'.",
+    correction:
+        "Try redirecting to a different constructor, or defining the constructor named '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generative constructor
+  // redirects to a factory constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the generative
+  // constructor `C.a` redirects to the factory constructor `C.b`:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : [!this.b()!];
+  //   factory C.b() => C.a();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the generative constructor doesn't need to redirect to another
+  // constructor, then remove the redirect.
+  //
+  // ```dart
+  // class C {
+  //   C.a();
+  //   factory C.b() => C.a();
+  // }
+  // ```
+  //
+  // If the generative constructor must redirect to another constructor, then
+  // make the other constructor be a generative (non-factory) constructor:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b();
+  //   C.b();
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR = CompileTimeErrorCode(
+    'REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR',
+    "Generative constructors can't redirect to a factory constructor.",
+    correction: "Try redirecting to a different constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * A factory constructor can't redirect to a non-generative constructor of an
+   * abstract class.
+   */
+  static const CompileTimeErrorCode REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR',
+    "The redirecting constructor '{0}' can't redirect to a constructor of the abstract class '{1}'.",
+    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.
+   */
+  static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'REDIRECT_TO_MISSING_CONSTRUCTOR',
+    "The constructor '{0}' couldn't be found in '{1}'.",
+    correction:
+        "Try redirecting to a different constructor, or define the constructor named '{0}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the non-type referenced in the redirect
+   */
+  // #### Description
+  //
+  // One way to implement a factory constructor is to redirect to another
+  // constructor by referencing the name of the constructor. The analyzer
+  // produces this diagnostic when the redirect is to something other than a
+  // constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is a function:
+  //
+  // ```dart
+  // C f() => throw 0;
+  //
+  // class C {
+  //   factory C() = [!f!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the constructor isn't defined, then either define it or replace it with
+  // a constructor that is defined.
+  //
+  // If the constructor is defined but the class that defines it isn't visible,
+  // then you probably need to add an import.
+  //
+  // If you're trying to return the value returned by a function, then rewrite
+  // the constructor to return the value from the constructor's body:
+  //
+  // ```dart
+  // C f() => throw 0;
+  //
+  // class C {
+  //   factory C() => f();
+  // }
+  // ```
+  static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS =
+      CompileTimeErrorCode(
+    'REDIRECT_TO_NON_CLASS',
+    "The name '{0}' isn't a type and can't be used in a redirected constructor.",
+    correction: "Try redirecting to a different constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor marked as `const`
+  // redirects to a constructor that isn't marked as `const`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor `C.a`
+  // is marked as `const` but redirects to the constructor `C.b`, which isn't:
+  //
+  // ```dart
+  // class C {
+  //   const C.a() : this.[!b!]();
+  //   C.b();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the non-constant constructor can be marked as `const`, then mark it as
+  // `const`:
+  //
+  // ```dart
+  // class C {
+  //   const C.a() : this.b();
+  //   const C.b();
+  // }
+  // ```
+  //
+  // If the non-constant constructor can't be marked as `const`, then either
+  // remove the redirect or remove `const` from the redirecting constructor:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b();
+  //   C.b();
+  // }
+  // ```
+  static const CompileTimeErrorCode REDIRECT_TO_NON_CONST_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'REDIRECT_TO_NON_CONST_CONSTRUCTOR',
+    "A constant redirecting constructor can't redirect to a non-constant constructor.",
+    correction: "Try redirecting to a different constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a redirecting factory
+  // constructor redirects to a type alias, and the type alias expands to one of
+  // the type parameters of the type alias. This isn’t allowed because the value
+  // of the type parameter is a type rather than a class.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the redirect to `B<A>`
+  // is to a type alias whose value is `T`, even though it looks like the value
+  // should be `A`:
+  //
+  // ```dart
+  // class A implements C {}
+  //
+  // typedef B<T> = T;
+  //
+  // abstract class C {
+  //   factory C() = [!B!]<A>;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use either a class name or a type alias that is defined to be a class
+  // rather than a type alias defined to be a type parameter:
+  //
+  // ```dart
+  // class A implements C {}
+  //
+  // abstract class C {
+  //   factory C() = A;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER = CompileTimeErrorCode(
+    'REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER',
+    "A redirecting constructor can't redirect to a type alias that expands to a type parameter.",
+    correction: "Try replacing it with a class.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a variable is referenced before
+  // it’s declared. In Dart, variables are visible everywhere in the block in
+  // which they are declared, but can only be referenced after they are
+  // declared.
+  //
+  // The analyzer also produces a context message that indicates where the
+  // declaration is located.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `i` is used before it
+  // is declared:
+  //
+  // ```dart
+  // %language=2.9
+  // void f() {
+  //   print([!i!]);
+  //   int i = 5;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to reference the local variable, move the declaration
+  // before the first reference:
+  //
+  // ```dart
+  // %language=2.9
+  // void f() {
+  //   int i = 5;
+  //   print(i);
+  // }
+  // ```
+  //
+  // If you intended to reference a name from an outer scope, such as a
+  // parameter, instance field or top-level variable, then rename the local
+  // declaration so that it doesn't hide the outer variable.
+  //
+  // ```dart
+  // %language=2.9
+  // void f(int i) {
+  //   print(i);
+  //   int x = 5;
+  //   print(x);
+  // }
+  // ```
+  static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION =
+      CompileTimeErrorCode(
+    'REFERENCED_BEFORE_DECLARATION',
+    "Local variable '{0}' can't be referenced before it is declared.",
+    correction:
+        "Try moving the declaration to before the first use, or renaming the local variable so that it doesn't hide a name from an enclosing scope.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `rethrow` statement is outside
+  // a `catch` clause. The `rethrow` statement is used to throw a caught
+  // exception again, but there's no caught exception outside of a `catch`
+  // clause.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the`rethrow` statement
+  // is outside of a `catch` clause:
+  //
+  // ```dart
+  // void f() {
+  //   [!rethrow!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you're trying to rethrow an exception, then wrap the `rethrow` statement
+  // in a `catch` clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } catch (exception) {
+  //     rethrow;
+  //   }
+  // }
+  // ```
+  //
+  // If you're trying to throw a new exception, then replace the `rethrow`
+  // statement with a `throw` expression:
+  //
+  // ```dart
+  // void f() {
+  //   throw UnsupportedError('Not yet implemented');
+  // }
+  // ```
+  static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH =
+      CompileTimeErrorCode(
+    'RETHROW_OUTSIDE_CATCH',
+    "A rethrow must be inside of a catch clause.",
+    correction:
+        "Try moving the expression into a catch clause, or using a 'throw' expression.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generative constructor
+  // contains a `return` statement that specifies a value to be returned.
+  // Generative constructors always return the object that was created, and
+  // therefore can't return a different object.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the `return` statement
+  // has an expression:
+  //
+  // ```dart
+  // class C {
+  //   C() {
+  //     return [!this!];
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the constructor should create a new instance, then remove either the
+  // `return` statement or the expression:
+  //
+  // ```dart
+  // class C {
+  //   C();
+  // }
+  // ```
+  //
+  // If the constructor shouldn't create a new instance, then convert it to be a
+  // factory constructor:
+  //
+  // ```dart
+  // class C {
+  //   factory C() {
+  //     return _instance;
+  //   }
+  //
+  //   static C _instance = C._();
+  //
+  //   C._();
+  // }
+  // ```
+  static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'RETURN_IN_GENERATIVE_CONSTRUCTOR',
+    "Constructors can't return values.",
+    correction:
+        "Try removing the return statement or using a factory constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generator function (one whose
+  // body is marked with either `async*` or `sync*`) uses either a `return`
+  // statement to return a value or implicitly returns a value because of using
+  // `=>`. In any of these cases, they should use `yield` instead of `return`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the method `f` is a
+  // generator and is using `return` to return a value:
+  //
+  // ```dart
+  // Iterable<int> f() sync* {
+  //   [!return 3!];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the function `f` is a
+  // generator and is implicitly returning a value:
+  //
+  // ```dart
+  // Stream<int> f() async* [!=>!] 3;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function is using `=>` for the body of the function, then convert it
+  // to a block function body, and use `yield` to return a value:
+  //
+  // ```dart
+  // Stream<int> f() async* {
+  //   yield 3;
+  // }
+  // ```
+  //
+  // If the method is intended to be a generator, then use `yield` to return a
+  // value:
+  //
+  // ```dart
+  // Iterable<int> f() sync* {
+  //   yield 3;
+  // }
+  // ```
+  //
+  // If the method isn't intended to be a generator, then remove the modifier
+  // from the body (or use `async` if you're returning a future):
+  //
+  // ```dart
+  // int f() {
+  //   return 3;
+  // }
+  // ```
+  static const CompileTimeErrorCode RETURN_IN_GENERATOR = CompileTimeErrorCode(
+    'RETURN_IN_GENERATOR',
+    "Can't return a value from a generator function that uses the 'async*' or 'sync*' modifier.",
+    correction:
+        "Try replacing 'return' with 'yield', using a block function body, or changing the method body modifier.",
+    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 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 =
+      CompileTimeErrorCode(
+    'RETURN_OF_INVALID_TYPE',
+    "A value of type '{0}' can't be returned from the constructor '{2}' because it has a return type of '{1}'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR',
+  );
+
+  /**
+   * 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 =
+      CompileTimeErrorCode(
+    'RETURN_OF_INVALID_TYPE',
+    "A value of type '{0}' can't be returned from the function '{2}' because it has a return type of '{1}'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_FUNCTION',
+  );
+
+  /**
+   * 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 =
+      CompileTimeErrorCode(
+    'RETURN_OF_INVALID_TYPE',
+    "A value of type '{0}' can't be returned from the method '{2}' because it has a return type of '{1}'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_METHOD',
+  );
+
+  /**
+   * 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  static const CompileTimeErrorCode SET_ELEMENT_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be used as values in a 'const' set literal.",
+    correction:
+        "Try removing the keyword 'const' from the set literal or removing the keyword 'deferred' from the import.",
+    hasPublishedDocs: true,
+    uniqueName: 'SET_ELEMENT_FROM_DEFERRED_LIBRARY',
+  );
+
+  /**
+   * Parameters:
+   * 0: the actual type of the set element
+   * 1: the expected type of the set element
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an element in a set literal has
+  // a type that isn't assignable to the element type of the set.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type of the string
+  // literal `'0'` is `String`, which isn't assignable to `int`, the element
+  // type of the set:
+  //
+  // ```dart
+  // var s = <int>{[!'0'!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the element type of the set literal is wrong, then change the element
+  // type of the set:
+  //
+  // ```dart
+  // var s = <String>{'0'};
+  // ```
+  //
+  // If the type of the element is wrong, then change the element:
+  //
+  // ```dart
+  // var s = <int>{'0'.length};
+  // ```
+  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}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a prefix in a deferred import is
+  // also used as a prefix in other imports (whether deferred or not). The
+  // prefix in a deferred import can't be shared with other imports because the
+  // prefix is used to load the imported library.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the prefix `x` is used
+  // as the prefix for a deferred import and is also used for one other import:
+  //
+  // ```dart
+  // import 'dart:math' [!deferred!] as x;
+  // import 'dart:convert' as x;
+  //
+  // var y = x.json.encode(x.min(0, 1));
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you can use a different name for the deferred import, then do so:
+  //
+  // ```dart
+  // import 'dart:math' deferred as math;
+  // import 'dart:convert' as x;
+  //
+  // var y = x.json.encode(math.min(0, 1));
+  // ```
+  //
+  // If you can use a different name for the other imports, then do so:
+  //
+  // ```dart
+  // import 'dart:math' deferred as x;
+  // import 'dart:convert' as convert;
+  //
+  // var y = convert.json.encode(x.min(0, 1));
+  // ```
+  static const CompileTimeErrorCode SHARED_DEFERRED_PREFIX =
+      CompileTimeErrorCode(
+    'SHARED_DEFERRED_PREFIX',
+    "The prefix of a deferred import can't be used in other import directives.",
+    correction: "Try renaming one of the prefixes.",
+    hasPublishedDocs: true,
+  );
+
+  static const CompileTimeErrorCode SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY =
+      CompileTimeErrorCode(
+    'SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY',
+    "Constant values from a deferred library can't be spread into a const literal.",
+    correction: "Try making the deferred import non-deferred.",
+  );
+
+  /**
+   * 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // 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,
+  );
+
+  /**
+   * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
+   * is a compile-time error if a generative constructor of class Object
+   * includes a superinitializer.
+   */
+  static const CompileTimeErrorCode SUPER_INITIALIZER_IN_OBJECT =
+      CompileTimeErrorCode(
+    'SUPER_INITIALIZER_IN_OBJECT',
+    "The class 'Object' can't invoke a constructor from a superclass.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a member declared inside an
+  // extension uses the `super` keyword . Extensions aren't classes and don't
+  // have superclasses, so the `super` keyword serves no purpose.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `super` can't be used
+  // in an extension:
+  //
+  // ```dart
+  // extension E on Object {
+  //   String get displayString => [!super!].toString();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the `super` keyword :
+  //
+  // ```dart
+  // extension E on Object {
+  //   String get displayString => toString();
+  // }
+  // ```
+  static const CompileTimeErrorCode SUPER_IN_EXTENSION = CompileTimeErrorCode(
+    'SUPER_IN_EXTENSION',
+    "The 'super' keyword can't be used in an extension because an extension doesn't have a superclass.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the keyword `super` is used
+  // outside of a instance method.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `super` is used in a
+  // top-level function:
+  //
+  // ```dart
+  // void f() {
+  //   [!super!].f();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rewrite the code to not use `super`.
+  static const CompileTimeErrorCode SUPER_IN_INVALID_CONTEXT =
+      CompileTimeErrorCode(
+    'SUPER_IN_INVALID_CONTEXT',
+    "Invalid context for 'super' invocation.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor that redirects to
+  // another constructor also attempts to invoke a constructor from the
+  // superclass. The superclass constructor will be invoked when the constructor
+  // that the redirecting constructor is redirected to is invoked.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor `C.a`
+  // both redirects to `C.b` and invokes a constructor from the superclass:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b(), [!super()!];
+  //   C.b();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the invocation of the `super` constructor:
+  //
+  // ```dart
+  // class C {
+  //   C.a() : this.b();
+  //   C.b();
+  // }
+  // ```
+  static const CompileTimeErrorCode SUPER_IN_REDIRECTING_CONSTRUCTOR =
+      CompileTimeErrorCode(
+    'SUPER_IN_REDIRECTING_CONSTRUCTOR',
+    "The redirecting constructor can't have a 'super' initializer.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * It is an error if any case of a switch statement except the last case (the
+   * default case if present) may complete normally. The previous syntactic
+   * restriction requiring the last statement of each case to be one of an
+   * enumerated list of statements (break, continue, return, throw, or rethrow)
+   * is removed.
+   */
+  static const CompileTimeErrorCode SWITCH_CASE_COMPLETES_NORMALLY =
+      CompileTimeErrorCode(
+    'SWITCH_CASE_COMPLETES_NORMALLY',
+    "The 'case' should not complete normally.",
+    correction: "Try adding 'break', or 'return', etc.",
+  );
+
+  /**
+   * 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // 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,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a generative constructor from an
+  // abstract class is being torn off. This isn't allowed because it isn't valid
+  // to create an instance of an abstract class, which means that there isn't
+  // any valid use for the torn off constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor `C.new`
+  // is being torn off and the class `C` is an abstract class:
+  //
+  // ```dart
+  // abstract class C {
+  //   C();
+  // }
+  //
+  // void f() {
+  //   [!C.new!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Tear off the constructor of a concrete class.
+  static const CompileTimeErrorCode
+      TEAROFF_OF_GENERATIVE_CONSTRUCTOR_OF_ABSTRACT_CLASS =
+      CompileTimeErrorCode(
+    'TEAROFF_OF_GENERATIVE_CONSTRUCTOR_OF_ABSTRACT_CLASS',
+    "A generative constructor of an abstract class can't be torn off.",
+    correction:
+        "Try tearing off a constructor of a concrete class, or a non-generative constructor.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that can't be thrown
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type of the expression in a
+  // throw expression isn't assignable to `Object`. It isn't valid to throw
+  // `null`, so it isn't valid to use an expression that might evaluate to
+  // `null`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `s` might be `null`:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   throw [!s!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an explicit null check to the expression:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   throw s!;
+  // }
+  // ```
+  static const CompileTimeErrorCode THROW_OF_INVALID_TYPE =
+      CompileTimeErrorCode(
+    'THROW_OF_INVALID_TYPE',
+    "The type '{0}' of the thrown expression must be assignable to 'Object'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the element whose type could not be inferred.
+   * 1: The [TopLevelInferenceError]'s arguments that led to the cycle.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a top-level variable has no type
+  // annotation and the variable's initializer refers to the variable, either
+  // directly or indirectly.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the variables `x` and
+  // `y` are defined in terms of each other, and neither has an explicit type,
+  // so the type of the other can't be inferred:
+  //
+  // ```dart
+  // var x = y;
+  // var y = [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the two variables don't need to refer to each other, then break the
+  // cycle:
+  //
+  // ```dart
+  // var x = 0;
+  // var y = x;
+  // ```
+  //
+  // If the two variables need to refer to each other, then give at least one of
+  // them an explicit type:
+  //
+  // ```dart
+  // int x = y;
+  // var y = x;
+  // ```
+  //
+  // Note, however, that while this code doesn't produce any diagnostics, it
+  // will produce a stack overflow at runtime unless at least one of the
+  // variables is assigned a value that doesn't depend on the other variables
+  // before any of the variables in the cycle are referenced.
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a typedef refers to itself,
+  // either directly or indirectly.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `F` depends on itself
+  // indirectly through `G`:
+  //
+  // ```dart
+  // typedef [!F!] = void Function(G);
+  // typedef G = void Function(F);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change one or more of the typedefs in the cycle so that none of them refer
+  // to themselves:
+  //
+  // ```dart
+  // typedef F = void Function(G);
+  // typedef G = void Function(int);
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type that is deferred and being used in a type
+   *    annotation
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type annotation is in a
+  // variable declaration, or the type used in a cast (`as`) or type test (`is`)
+  // is a type declared in a library that is imported using a deferred import.
+  // These types are required to be available at compile time, but aren't.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type of the
+  // parameter `f` is imported from a deferred library:
+  //
+  // ```dart
+  // import 'dart:io' deferred as io;
+  //
+  // void f([!io.File!] f) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the imported type, then remove the `deferred`
+  // keyword:
+  //
+  // ```dart
+  // import 'dart:io' as io;
+  //
+  // void f(io.File f) {}
+  // ```
+  //
+  // If the import is required to be deferred and there's another type that is
+  // appropriate, then use that type in place of the type from the deferred
+  // library.
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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 type parameter
+   * 2: the substituted bound of the type parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type argument isn't the same
+  // as or a subclass of the bounds of the corresponding type parameter.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `String` isn't a
+  // subclass of `num`:
+  //
+  // ```dart
+  // class A<E extends num> {}
+  //
+  // var a = A<[!String!]>();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the type argument to be a subclass of the bounds:
+  //
+  // ```dart
+  // class A<E extends num> {}
+  //
+  // var a = A<int>();
+  // ```
+  static const CompileTimeErrorCode TYPE_ARGUMENT_NOT_MATCHING_BOUNDS =
+      CompileTimeErrorCode(
+    'TYPE_ARGUMENT_NOT_MATCHING_BOUNDS',
+    "'{0}' doesn't conform to the bound '{2}' of the type parameter '{1}'.",
+    correction: "Try using a type that is or is a subclass of '{2}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a static member references a
+  // type parameter that is declared for the class. Type parameters only have
+  // meaning for instances of the class.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the static method
+  // `hasType` has a reference to the type parameter `T`:
+  //
+  // ```dart
+  // class C<T> {
+  //   static bool hasType(Object o) => o is [!T!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the member can be an instance member, then remove the keyword `static`:
+  //
+  // ```dart
+  // class C<T> {
+  //   bool hasType(Object o) => o is T;
+  // }
+  // ```
+  //
+  // If the member must be a static member, then make the member be generic:
+  //
+  // ```dart
+  // class C<T> {
+  //   static bool hasType<S>(Object o) => o is S;
+  // }
+  // ```
+  //
+  // Note, however, that there isn’t a relationship between `T` and `S`, so this
+  // second option changes the semantics from what was likely to be intended.
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type parameter
+   * 1: the name of the bounding type
+   *
+   * See [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the bound of a type parameter
+  // (the type following the `extends` keyword) is either directly or indirectly
+  // the type parameter itself. Stating that the type parameter must be the same
+  // as itself or a subtype of itself or a subtype of itself isn't helpful
+  // because it will always be the same as itself.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the bound of `T` is
+  // `T`:
+  //
+  // ```dart
+  // class C<[!T!] extends T> {}
+  // ```
+  //
+  // The following code produces this diagnostic because the bound of `T1` is
+  // `T2`, and the bound of `T2` is `T1`, effectively making the bound of `T1`
+  // be `T1`:
+  //
+  // ```dart
+  // class C<[!T1!] extends T2, T2 extends T1> {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type parameter needs to be a subclass of some type, then replace the
+  // bound with the required type:
+  //
+  // ```dart
+  // class C<T extends num> {}
+  // ```
+  //
+  // If the type parameter can be any type, then remove the `extends` clause:
+  //
+  // ```dart
+  // class C<T> {}
+  // ```
+  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 the same as or a subclass of '{1}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the right-hand side of an `is`
+  // or `is!` test isn't a type.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the right-hand side is
+  // a parameter, not a type:
+  //
+  // ```dart
+  // typedef B = int Function(int);
+  //
+  // void f(Object a, B b) {
+  //   if (a is [!b!]) {
+  //     return;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to use a type test, then replace the right-hand side with a
+  // type:
+  //
+  // ```dart
+  // typedef B = int Function(int);
+  //
+  // void f(Object a, B b) {
+  //   if (a is B) {
+  //     return;
+  //   }
+  // }
+  // ```
+  //
+  // If you intended to use a different kind of test, then change the test:
+  //
+  // ```dart
+  // typedef B = int Function(int);
+  //
+  // void f(Object a, B b) {
+  //   if (a == b) {
+  //     return;
+  //   }
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 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,
+  );
+
+  static const CompileTimeErrorCode UNCHECKED_INVOCATION_OF_NULLABLE_VALUE =
+      CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "The function can't be unconditionally invoked because it can be 'null'.",
+    correction: "Try adding a null check ('!').",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_INVOCATION_OF_NULLABLE_VALUE',
+  );
+
+  static const CompileTimeErrorCode
+      UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "The method '{0}' can't be unconditionally invoked because the receiver can be 'null'.",
+    correction:
+        "Try making the call conditional (using '?.') or adding a null check to the target ('!').",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE',
+  );
+
+  static const CompileTimeErrorCode
+      UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "The operator '{0}' can't be unconditionally invoked because the receiver can be 'null'.",
+    correction: "Try adding a null check to the target ('!').",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE',
+  );
+
+  static const CompileTimeErrorCode
+      UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "The property '{0}' can't be unconditionally accessed because the receiver can be 'null'.",
+    correction:
+        "Try making the access conditional (using '?.') or adding a null check to the target ('!').",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE',
+  );
+
+  // #### 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
+  // 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
+  // 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
+  // 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
+  // void f(String? s) {
+  //   if (s!.length > 3) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "A nullable expression can't be used as a condition.",
+    correction:
+        "Try checking that the value isn't 'null' before using it as a condition.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION',
+  );
+
+  static const CompileTimeErrorCode
+      UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "A nullable expression can't be used as an iterator in a for-in loop.",
+    correction:
+        "Try checking that the value isn't 'null' before using it as an iterator.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR',
+  );
+
+  static const CompileTimeErrorCode UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD =
+      CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "A nullable expression can't be used in a spread.",
+    correction:
+        "Try checking that the value isn't 'null' before using it in a spread, or use a null-aware spread.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD',
+  );
+
+  static const CompileTimeErrorCode
+      UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH = CompileTimeErrorCode(
+    'UNCHECKED_USE_OF_NULLABLE_VALUE',
+    "A nullable expression can't be used in a yield-each statement.",
+    correction:
+        "Try checking that the value isn't 'null' before using it in a yield-each statement.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name that isn't defined is
+  // used as an annotation.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `undefined`
+  // isn't defined:
+  //
+  // ```dart
+  // [!@undefined!]
+  // void f() {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name is correct, but it isn’t declared yet, then declare the name as
+  // a constant value:
+  //
+  // ```dart
+  // const undefined = 'undefined';
+  //
+  // @undefined
+  // void f() {}
+  // ```
+  //
+  // If the name is wrong, replace the name with the name of a valid constant:
+  //
+  // ```dart
+  // @deprecated
+  // void f() {}
+  // ```
+  //
+  // Otherwise, remove the annotation.
+  static const CompileTimeErrorCode UNDEFINED_ANNOTATION = CompileTimeErrorCode(
+    'UNDEFINED_ANNOTATION',
+    "Undefined name '{0}' used as an annotation.",
+    correction: "Try defining the name or importing it from another library.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the undefined class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of a class 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 `Piont` isn't defined:
+  //
+  // ```dart
+  // class Point {}
+  //
+  // void f([!Piont!] p) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // the name of a class that is defined. The example above can be corrected by
+  // fixing the spelling of the class:
+  //
+  // ```dart
+  // class Point {}
+  //
+  // void f(Point p) {}
+  // ```
+  //
+  // If the class is defined but isn't visible, then you probably need to add an
+  // import.
+  static const CompileTimeErrorCode UNDEFINED_CLASS = CompileTimeErrorCode(
+    'UNDEFINED_CLASS',
+    "Undefined class '{0}'.",
+    correction:
+        "Try changing the name to the name of an existing class, or creating a class with the name '{0}'.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+  );
+
+  /**
+   * Same as [CompileTimeErrorCode.UNDEFINED_CLASS], but to catch using
+   * "boolean" instead of "bool" in order to improve the correction message.
+   *
+   * Parameters:
+   * 0: the name of the undefined class
+   */
+  static const CompileTimeErrorCode UNDEFINED_CLASS_BOOLEAN =
+      CompileTimeErrorCode(
+    'UNDEFINED_CLASS',
+    "Undefined class '{0}'.",
+    correction: "Try using the type 'bool'.",
+    hasPublishedDocs: true,
+    isUnresolvedIdentifier: true,
+    uniqueName: 'UNDEFINED_CLASS_BOOLEAN',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the superclass that does not define the invoked constructor
+   * 1: the name of the constructor being invoked
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a superclass constructor is
+  // invoked in the initializer list of a constructor, but the superclass
+  // doesn't define the constructor being invoked.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `A` doesn't have an
+  // unnamed constructor:
+  //
+  // ```dart
+  // class A {
+  //   A.n();
+  // }
+  // class B extends A {
+  //   B() : [!super()!];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `A` doesn't have a
+  // constructor named `m`:
+  //
+  // ```dart
+  // class A {
+  //   A.n();
+  // }
+  // class B extends A {
+  //   B() : [!super.m()!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the superclass defines a constructor that should be invoked, then change
+  // the constructor being invoked:
+  //
+  // ```dart
+  // class A {
+  //   A.n();
+  // }
+  // class B extends A {
+  //   B() : super.n();
+  // }
+  // ```
+  //
+  // If the superclass doesn't define an appropriate constructor, then define
+  // the constructor being invoked:
+  //
+  // ```dart
+  // class A {
+  //   A.m();
+  //   A.n();
+  // }
+  // class B extends A {
+  //   B() : super.m();
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_CONSTRUCTOR_IN_INITIALIZER =
+      CompileTimeErrorCode(
+    'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER',
+    "The class '{0}' doesn't have a constructor named '{1}'.",
+    correction:
+        "Try defining a constructor named '{1}' in '{0}', or invoking a different constructor.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the superclass that does not define the invoked constructor
+   */
+  static const CompileTimeErrorCode
+      UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT = CompileTimeErrorCode(
+    'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER',
+    "The class '{0}' doesn't have an unnamed constructor.",
+    correction:
+        "Try defining an unnamed constructor in '{0}', or invoking a different constructor.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT',
+  );
+
+  /**
+   * 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
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is used to
+  // invoke a getter, but the getter isn't defined by the specified extension.
+  // The analyzer also produces this diagnostic when a static getter is
+  // referenced but isn't defined by the specified extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare an instance getter named `b`:
+  //
+  // ```dart
+  // extension E on String {
+  //   String get a => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String get b => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').[!b!];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare a static getter named `a`:
+  //
+  // ```dart
+  // extension E on String {}
+  //
+  // var x = E.[!a!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name of the getter is incorrect, then change it to the name of an
+  // existing getter:
+  //
+  // ```dart
+  // extension E on String {
+  //   String get a => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String get b => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').a;
+  // }
+  // ```
+  //
+  // If the name of the getter is correct but the name of the extension is
+  // wrong, then change the name of the extension to the correct name:
+  //
+  // ```dart
+  // extension E on String {
+  //   String get a => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String get b => 'b';
+  // }
+  //
+  // void f() {
+  //   F('c').b;
+  // }
+  // ```
+  //
+  // If the name of the getter and extension are both correct, but the getter
+  // isn't defined, then define the getter:
+  //
+  // ```dart
+  // extension E on String {
+  //   String get a => 'a';
+  //   String get b => 'z';
+  // }
+  //
+  // extension F on String {
+  //   String get b => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').b;
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_EXTENSION_GETTER =
+      CompileTimeErrorCode(
+    'UNDEFINED_EXTENSION_GETTER',
+    "The getter '{0}' isn't defined for the extension '{1}'.",
+    correction:
+        "Try correcting the name to the name of an existing getter, or defining a getter named '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the method that is undefined
+   * 1: the name of the extension that was explicitly specified
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is used to
+  // invoke a method, but the method isn't defined by the specified extension.
+  // The analyzer also produces this diagnostic when a static method is
+  // referenced but isn't defined by the specified extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare an instance method named `b`:
+  //
+  // ```dart
+  // extension E on String {
+  //   String a() => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String b() => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').[!b!]();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare a static method named `a`:
+  //
+  // ```dart
+  // extension E on String {}
+  //
+  // var x = E.[!a!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name of the method is incorrect, then change it to the name of an
+  // existing method:
+  //
+  // ```dart
+  // extension E on String {
+  //   String a() => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String b() => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').a();
+  // }
+  // ```
+  //
+  // If the name of the method is correct, but the name of the extension is
+  // wrong, then change the name of the extension to the correct name:
+  //
+  // ```dart
+  // extension E on String {
+  //   String a() => 'a';
+  // }
+  //
+  // extension F on String {
+  //   String b() => 'b';
+  // }
+  //
+  // void f() {
+  //   F('c').b();
+  // }
+  // ```
+  //
+  // If the name of the method and extension are both correct, but the method
+  // isn't defined, then define the method:
+  //
+  // ```dart
+  // extension E on String {
+  //   String a() => 'a';
+  //   String b() => 'z';
+  // }
+  //
+  // extension F on String {
+  //   String b() => 'b';
+  // }
+  //
+  // void f() {
+  //   E('c').b();
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_EXTENSION_METHOD =
+      CompileTimeErrorCode(
+    'UNDEFINED_EXTENSION_METHOD',
+    "The method '{0}' isn't defined for the extension '{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 that is undefined
+   * 1: the name of the extension that was explicitly specified
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an operator is invoked on a
+  // specific extension when that extension doesn't implement the operator.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't define the operator `*`:
+  //
+  // ```dart
+  // var x = E('') [!*!] 4;
+  //
+  // extension E on String {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the extension is expected to implement the operator, then add an
+  // implementation of the operator to the extension:
+  //
+  // ```dart
+  // var x = E('') * 4;
+  //
+  // extension E on String {
+  //   int operator *(int multiplier) => length * multiplier;
+  // }
+  // ```
+  //
+  // If the operator is defined by a different extension, then change the name
+  // of the extension to the name of the one that defines the operator.
+  //
+  // If the operator is defined on the argument of the extension override, then
+  // remove the extension override:
+  //
+  // ```dart
+  // var x = '' * 4;
+  //
+  // extension E on String {}
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_EXTENSION_OPERATOR =
+      CompileTimeErrorCode(
+    'UNDEFINED_EXTENSION_OPERATOR',
+    "The operator '{0}' isn't defined for the extension '{1}'.",
+    correction: "Try defining the operator '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the setter that is undefined
+   * 1: the name of the extension that was explicitly specified
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension override is used to
+  // invoke a setter, but the setter isn't defined by the specified extension.
+  // The analyzer also produces this diagnostic when a static setter is
+  // referenced but isn't defined by the specified extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare an instance setter named `b`:
+  //
+  // ```dart
+  // extension E on String {
+  //   set a(String v) {}
+  // }
+  //
+  // extension F on String {
+  //   set b(String v) {}
+  // }
+  //
+  // void f() {
+  //   E('c').[!b!] = 'd';
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the extension `E`
+  // doesn't declare a static setter named `a`:
+  //
+  // ```dart
+  // extension E on String {}
+  //
+  // void f() {
+  //   E.[!a!] = 3;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name of the setter is incorrect, then change it to the name of an
+  // existing setter:
+  //
+  // ```dart
+  // extension E on String {
+  //   set a(String v) {}
+  // }
+  //
+  // extension F on String {
+  //   set b(String v) {}
+  // }
+  //
+  // void f() {
+  //   E('c').a = 'd';
+  // }
+  // ```
+  //
+  // If the name of the setter is correct, but the name of the extension is
+  // wrong, then change the name of the extension to the correct name:
+  //
+  // ```dart
+  // extension E on String {
+  //   set a(String v) {}
+  // }
+  //
+  // extension F on String {
+  //   set b(String v) {}
+  // }
+  //
+  // void f() {
+  //   F('c').b = 'd';
+  // }
+  // ```
+  //
+  // If the name of the setter and extension are both correct, but the setter
+  // isn't defined, then define the setter:
+  //
+  // ```dart
+  // extension E on String {
+  //   set a(String v) {}
+  //   set b(String v) {}
+  // }
+  //
+  // extension F on String {
+  //   set b(String v) {}
+  // }
+  //
+  // void f() {
+  //   E('c').b = 'd';
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_EXTENSION_SETTER =
+      CompileTimeErrorCode(
+    'UNDEFINED_EXTENSION_SETTER',
+    "The setter '{0}' isn't defined for the extension '{1}'.",
+    correction:
+        "Try correcting the name to the name of an existing setter, or defining a setter 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 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 getter
+   * 1: the name of the function type alias
+   */
+  static const CompileTimeErrorCode UNDEFINED_GETTER_ON_FUNCTION_TYPE =
+      CompileTimeErrorCode(
+    'UNDEFINED_GETTER',
+    "The getter '{0}' isn't defined for the '{1}' function type.",
+    correction:
+        "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension getter on 'Type'.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_GETTER_ON_FUNCTION_TYPE',
+  );
+
+  /**
+   * 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 method
+   * 1: the name of the function type alias
+   */
+  static const CompileTimeErrorCode UNDEFINED_METHOD_ON_FUNCTION_TYPE =
+      CompileTimeErrorCode(
+    'UNDEFINED_METHOD',
+    "The method '{0}' isn't defined for the '{1}' function type.",
+    correction:
+        "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension method on 'Type'.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_METHOD_ON_FUNCTION_TYPE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the requested named parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function invocation
+  // has a named argument, but the method or function being invoked doesn't
+  // define a parameter with the same name.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` doesn't declare a
+  // named parameter named `a`:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   m({int b}) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.m([!a!]: 1);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the argument name is mistyped, then replace it with the correct name.
+  // The example above can be fixed by changing `a` to `b`:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   m({int b}) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.m(b: 1);
+  // }
+  // ```
+  //
+  // If a subclass adds a parameter with the name in question, then cast the
+  // receiver to the subclass:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   m({int b}) {}
+  // }
+  //
+  // class D extends C {
+  //   m({int a, int b}) {}
+  // }
+  //
+  // void f(C c) {
+  //   (c as D).m(a: 1);
+  // }
+  // ```
+  //
+  // If the parameter should be added to the function, then add it:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   m({int a, int b}) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.m(a: 1);
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER =
+      CompileTimeErrorCode(
+    'UNDEFINED_NAMED_PARAMETER',
+    "The named parameter '{0}' isn't defined.",
+    correction:
+        "Try correcting the name to an existing named parameter's name, or defining a named parameter with the name '{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 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,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the setter
+   * 1: the name of the function type alias
+   */
+  static const CompileTimeErrorCode UNDEFINED_SETTER_ON_FUNCTION_TYPE =
+      CompileTimeErrorCode(
+    'UNDEFINED_SETTER',
+    "The setter '{0}' isn't defined for the '{1}' function type.",
+    correction:
+        "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension getter on 'Type'.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_SETTER_ON_FUNCTION_TYPE',
+  );
+
+  /**
+   * 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_MEMBER',
+    "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.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_SUPER_GETTER',
+  );
+
+  /**
+   * 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 member (method,
+  // getter, setter, or operator) is referenced using `super`, but there’s no
+  // member with that name in the superclass chain.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `Object` doesn't define
+  // a method named `n`:
+  //
+  // ```dart
+  // class C {
+  //   void m() {
+  //     super.[!n!]();
+  //   }
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `Object` doesn't define
+  // a getter named `g`:
+  //
+  // ```dart
+  // class C {
+  //   void m() {
+  //     super.[!g!];
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the inherited member you intend to invoke has a different name, then
+  // make the name of the invoked member match the inherited member.
+  //
+  // If the member you intend to invoke is defined in the same class, then
+  // remove the `super.`.
+  //
+  // If the member isn’t defined, then either add the member to one of the
+  // superclasses or remove the invocation.
+  static const CompileTimeErrorCode UNDEFINED_SUPER_METHOD =
+      CompileTimeErrorCode(
+    'UNDEFINED_SUPER_MEMBER',
+    "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,
+    uniqueName: 'UNDEFINED_SUPER_METHOD',
+  );
+
+  /**
+   * 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_MEMBER',
+    "The operator '{0}' isn't defined in a superclass of '{1}'.",
+    correction: "Try defining the operator '{0}' in a superclass.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_SUPER_OPERATOR',
+  );
+
+  /**
+   * 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_MEMBER',
+    "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.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNDEFINED_SUPER_SETTER',
+  );
+
+  /**
+   * 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
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when code in one class references a
+  // static member in a superclass without prefixing the member's name with the
+  // name of the superclass. Static members can only be referenced without a
+  // prefix in the class in which they're declared.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the static field `x` is
+  // referenced in the getter `g` without prefixing it with the name of the
+  // defining class:
+  //
+  // ```dart
+  // class A {
+  //   static int x = 3;
+  // }
+  //
+  // class B extends A {
+  //   int get g => [!x!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Prefix the name of the static member with the name of the declaring class:
+  //
+  // ```dart
+  // class A {
+  //   static int x = 3;
+  // }
+  //
+  // class B extends A {
+  //   int get g => A.x;
+  // }
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the defining type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an undefined name is found, and
+  // the name is the same as a static member of the extended type or one of its
+  // superclasses.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` is a static member
+  // of the extended type `C`:
+  //
+  // ```dart
+  // class C {
+  //   static void m() {}
+  // }
+  //
+  // extension E on C {
+  //   void f() {
+  //     [!m!]();
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you're trying to reference a static member that's declared outside the
+  // extension, then add the name of the class or extension before the reference
+  // to the member:
+  //
+  // ```dart
+  // class C {
+  //   static void m() {}
+  // }
+  //
+  // extension E on C {
+  //   void f() {
+  //     C.m();
+  //   }
+  // }
+  // ```
+  //
+  // If you're referencing a member that isn't declared yet, add a declaration:
+  //
+  // ```dart
+  // class C {
+  //   static void m() {}
+  // }
+  //
+  // extension E on C {
+  //   void f() {
+  //     m();
+  //   }
+  //
+  //   void m() {}
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE =
+      CompileTimeErrorCode(
+    'UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE',
+    "Static members from the extended type or one of its superclasses must be qualified by the name of the defining type.",
+    correction: "Try adding '{0}.' before the name.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the URI pointing to a non-existent file
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import, export, or part
+  // directive is found where the URI refers to a file that doesn't exist.
+  //
+  // #### Examples
+  //
+  // If the file `lib.dart` doesn't exist, the following code produces this
+  // diagnostic:
+  //
+  // ```dart
+  // import [!'lib.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the URI was mistyped or invalid, then correct the URI.
+  //
+  // If the URI is correct, then create the file.
+  static const CompileTimeErrorCode URI_DOES_NOT_EXIST = CompileTimeErrorCode(
+    'URI_DOES_NOT_EXIST',
+    "Target of URI doesn't exist: '{0}'.",
+    correction:
+        "Try creating the file referenced by the URI, or Try using a URI for a file that does exist.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the URI pointing to a non-existent file
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import, export, or part
+  // directive is found where the URI refers to a file that doesn't exist and
+  // the name of the file ends with a pattern that's commonly produced by code
+  // generators, such as one of the following:
+  // - `.g.dart`
+  // - `.pb.dart`
+  // - `.pbenum.dart`
+  // - `.pbserver.dart`
+  // - `.pbjson.dart`
+  // - `.template.dart`
+  //
+  // #### Examples
+  //
+  // If the file `lib.g.dart` doesn't exist, the following code produces this
+  // diagnostic:
+  //
+  // ```dart
+  // import [!'lib.g.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the file is a generated file, then run the generator that generates the
+  // file.
+  //
+  // If the file isn't a generated file, then check the spelling of the URI or
+  // create the file.
+  static const CompileTimeErrorCode URI_HAS_NOT_BEEN_GENERATED =
+      CompileTimeErrorCode(
+    'URI_HAS_NOT_BEEN_GENERATED',
+    "Target of URI hasn't been generated: '{0}'.",
+    correction:
+        "Try running the generator that will generate the file referenced by the URI.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the string literal in an
+  // `import`, `export`, or `part` directive contains an interpolation. The
+  // resolution of the URIs in directives must happen before the declarations
+  // are compiled, so expressions can’t be  evaluated  while determining the
+  // values of the URIs.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the string in the
+  // `import` directive contains an interpolation:
+  //
+  // ```dart
+  // import [!'dart:$m'!];
+  //
+  // const m = 'math';
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the interpolation from the URI:
+  //
+  // ```dart
+  // import 'dart:math';
+  //
+  // var zero = min(0, 0);
+  // ```
+  static const CompileTimeErrorCode URI_WITH_INTERPOLATION =
+      CompileTimeErrorCode(
+    'URI_WITH_INTERPOLATION',
+    "URIs can't use string interpolation.",
+    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 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
+  // %language=2.9
+  // 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
+  // %language=2.9
+  // const Object x = 0;
+  // const String y = '$x';
+  // ```
+  //
+  // If the assigned value is correct, then change the declaration to have the
+  // correct type:
+  //
+  // ```dart
+  // %language=2.9
+  // 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
+   * 2: the number of parameters found in the operator declaration
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a declaration of an operator has
+  // the wrong number of parameters.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the operator `+` must
+  // have a single parameter corresponding to the right operand:
+  //
+  // ```dart
+  // class C {
+  //   int operator [!+!](a, b) => 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add or remove parameters to match the required number:
+  //
+  // ```dart
+  // class C {
+  //   int operator +(a) => 0;
+  // }
+  // ```
+  // TODO(brianwilkerson) It would be good to add a link to the spec or some
+  //  other documentation that lists the number of parameters for each operator,
+  //  but I don't know what to link to.
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR =
+      CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR',
+    "Operator '{0}' should declare exactly {1} parameters, but {2} found.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * 7.1.1 Operators: It is a compile time error if the arity of the
+   * user-declared operator - is not 0 or 1.
+   *
+   * Parameters:
+   * 0: the number of parameters found in the operator declaration
+   */
+  static const CompileTimeErrorCode
+      WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS = CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR',
+    "Operator '-' should declare 0 or 1 parameter, but {0} found.",
+    hasPublishedDocs: true,
+    uniqueName: 'WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a setter is found that doesn't
+  // declare exactly one required positional parameter.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the setter `s` declares
+  // two required parameters:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   set [!s!](int x, int y) {}
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the setter `s` declares
+  // one optional parameter:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   set [!s!]([int x]) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the declaration so that there's exactly one required positional
+  // parameter:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   set s(int x) {}
+  // }
+  // ```
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER =
+      CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER',
+    "Setters must declare exactly one required positional parameter.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type being referenced (<i>G</i>)
+   * 1: the number of type parameters that were declared
+   * 2: the number of type arguments provided
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a type that has type parameters
+  // is used and type arguments are provided, but the number of type arguments
+  // isn't the same as the number of type parameters.
+  //
+  // The analyzer also produces this diagnostic when a constructor is invoked
+  // and the number of type arguments doesn't match the number of type
+  // parameters declared for the class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `C` has one type
+  // parameter but two type arguments are provided when it is used as a type
+  // annotation:
+  //
+  // ```dart
+  // class C<E> {}
+  //
+  // void f([!C<int, int>!] x) {}
+  // ```
+  //
+  // The following code produces this diagnostic because `C` declares one type
+  // parameter, but two type arguments are provided when creating an instance:
+  //
+  // ```dart
+  // class C<E> {}
+  //
+  // var c = [!C<int, int>!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add or remove type arguments, as necessary, to match the number of type
+  // parameters defined for the type:
+  //
+  // ```dart
+  // class C<E> {}
+  //
+  // void f(C<int> x) {}
+  // ```
+  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.",
+    correction:
+        "Try adjusting the number of type arguments to match the number of type parameters.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of type parameters that were declared
+   * 1: the number of type arguments provided
+   */
+  static const CompileTimeErrorCode
+      WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION = CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION',
+    "This function is declared with {0} type parameters, but {1} type arguments were given.",
+    correction:
+        "Try adjusting the number of type arguments to match the number of type parameters.",
+    uniqueName: 'WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class being instantiated
+   * 1: the name of the constructor being invoked
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when type arguments are provided
+  // after the name of a named constructor. Constructors can't declare type
+  // parameters, so invocations can only provide the type arguments associated
+  // with the class, and those type arguments are required to follow the name of
+  // the class rather than the name of the constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type parameters
+  // (`<String>`) follow the name of the constructor rather than the name of the
+  // class:
+  //
+  // ```dart
+  // class C<T> {
+  //   C.named();
+  // }
+  // C f() => C.named[!<String>!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type arguments are for the class' type parameters, then move the
+  // type arguments to follow the class name:
+  //
+  // ```dart
+  // class C<T> {
+  //   C.named();
+  // }
+  // C f() => C<String>.named();
+  // ```
+  //
+  // If the type arguments aren't for the class' type parameters, then remove
+  // them:
+  //
+  // ```dart
+  // class C<T> {
+  //   C.named();
+  // }
+  // C f() => C.named();
+  // ```
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the extension being referenced
+   * 1: the number of type parameters that were declared
+   * 2: the number of type arguments provided
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension that has type
+  // parameters is used and type arguments are provided, but the number of type
+  // arguments isn't the same as the number of type parameters.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the extension `E` is
+  // declared to have a single type parameter (`T`), but the extension override
+  // has two type arguments:
+  //
+  // ```dart
+  // extension E<T> on List<T> {
+  //   int get len => length;
+  // }
+  //
+  // void f(List<int> p) {
+  //   E[!<int, String>!](p).len;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the type arguments so that there are the same number of type
+  // arguments as there are type parameters:
+  //
+  // ```dart
+  // extension E<T> on List<T> {
+  //   int get len => length;
+  // }
+  //
+  // void f(List<int> p) {
+  //   E<int>(p).len;
+  // }
+  // ```
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION =
+      CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION',
+    "The extension '{0}' is declared with {1} type parameters, but {2} type arguments were given.",
+    correction: "Try adjusting the number of type arguments.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the function being referenced
+   * 1: the number of type parameters that were declared
+   * 2: the number of type arguments provided
+   */
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION =
+      CompileTimeErrorCode(
+    'WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION',
+    "The function '{0}' is declared with {1} type parameters, but {2} type arguments were given.",
+    correction:
+        "Try adjusting the number of type arguments to match the number of type parameters.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the method being referenced (<i>G</i>)
+   * 1: the number of type parameters that were declared
+   * 2: the number of type arguments provided
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function is invoked
+  // with a different number of type arguments than the number of type
+  // parameters specified in its declaration. There must either be no type
+  // arguments or the number of arguments must match the number of parameters.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of the
+  // method `m` has two type arguments, but the declaration of `m` only has one
+  // type parameter:
+  //
+  // ```dart
+  // class C {
+  //   int m<A>(A a) => 0;
+  // }
+  //
+  // int f(C c) => c.m[!<int, int>!](2);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type arguments are necessary, then make them match the number of
+  // type parameters by either adding or removing type arguments:
+  //
+  // ```dart
+  // class C {
+  //   int m<A>(A a) => 0;
+  // }
+  //
+  // int f(C c) => c.m<int>(2);
+  // ```
+  //
+  // If the type arguments aren't necessary, then remove them:
+  //
+  // ```dart
+  // class C {
+  //   int m<A>(A a) => 0;
+  // }
+  //
+  // int f(C c) => c.m(2);
+  // ```
+  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 are given.",
+    correction: "Try adjusting the number of type arguments.",
+    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'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `yield` or `yield*` statement
+  // appears in a function whose body isn't marked with one of the `async*` or
+  // `sync*` modifiers.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `yield` is being used
+  // in a function whose body doesn't have a modifier:
+  //
+  // ```dart
+  // Iterable<int> get digits {
+  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `yield*` is being used
+  // in a function whose body has the `async` modifier rather than the `async*`
+  // modifier:
+  //
+  // ```dart
+  // Stream<int> get digits async {
+  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add a modifier, or change the existing modifier to be either `async*` or
+  // `sync*`:
+  //
+  // ```dart
+  // Iterable<int> get digits sync* {
+  //   yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+  // }
+  // ```
+  static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR =
+      CompileTimeErrorCode(
+    'YIELD_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.",
+    hasPublishedDocs: true,
+    uniqueName: 'YIELD_EACH_IN_NON_GENERATOR',
+  );
+
+  /**
+   * ?? Yield: It is a compile-time error if a yield statement appears in a
+   * function that is not a generator function.
+   *
+   * No parameters.
+   */
+  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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the expression after `yield`
+   * 1: the return type of the function containing the `yield`
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type of object produced by a
+  // `yield` expression doesn't match the type of objects that are to be
+  // returned from the `Iterable` or `Stream` types that are returned from a
+  // generator (a function or method marked with either `sync*` or `async*`).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the getter `zero` is
+  // declared to return an `Iterable` that returns integers, but the `yield` is
+  // returning a string from the iterable:
+  //
+  // ```dart
+  // Iterable<int> get zero sync* {
+  //   yield [!'0'!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the return type of the function is correct, then fix the expression
+  // following the keyword `yield` to return the correct type:
+  //
+  // ```dart
+  // Iterable<int> get zero sync* {
+  //   yield 0;
+  // }
+  // ```
+  //
+  // If the expression following the `yield` is correct, then change the return
+  // type of the function to allow it:
+  //
+  // ```dart
+  // Iterable<String> get zero sync* {
+  //   yield '0';
+  // }
+  // ```
+  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}'.",
+    hasPublishedDocs: true,
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const CompileTimeErrorCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'CompileTimeErrorCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
+
+class LanguageCode extends ErrorCode {
+  static const LanguageCode IMPLICIT_DYNAMIC_FIELD = LanguageCode(
+    'IMPLICIT_DYNAMIC_FIELD',
+    "Missing field type for '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_FUNCTION = LanguageCode(
+    'IMPLICIT_DYNAMIC_FUNCTION',
+    "Missing type arguments for generic function '{0}<{1}>'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_INVOKE = LanguageCode(
+    'IMPLICIT_DYNAMIC_INVOKE',
+    "Missing type arguments for calling generic function type '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_LIST_LITERAL = LanguageCode(
+    'IMPLICIT_DYNAMIC_LIST_LITERAL',
+    "Missing type argument for list literal.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_MAP_LITERAL = LanguageCode(
+    'IMPLICIT_DYNAMIC_MAP_LITERAL',
+    "Missing type arguments for map literal.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_METHOD = LanguageCode(
+    'IMPLICIT_DYNAMIC_METHOD',
+    "Missing type arguments for generic method '{0}<{1}>'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_PARAMETER = LanguageCode(
+    'IMPLICIT_DYNAMIC_PARAMETER',
+    "Missing parameter type for '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_RETURN = LanguageCode(
+    'IMPLICIT_DYNAMIC_RETURN',
+    "Missing return type for '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_TYPE = LanguageCode(
+    'IMPLICIT_DYNAMIC_TYPE',
+    "Missing type arguments for generic type '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  static const LanguageCode IMPLICIT_DYNAMIC_VARIABLE = LanguageCode(
+    'IMPLICIT_DYNAMIC_VARIABLE',
+    "Missing variable type for '{0}'.",
+    correction:
+        "Try adding an explicit type, or remove implicit-dynamic from your analysis options file.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const LanguageCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'LanguageCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
+
+class StaticWarningCode extends AnalyzerErrorCode {
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic in two cases.
+  //
+  // The first is when the left operand of an `??` operator can't be `null`.
+  // The right operand is only evaluated if the left operand has the value
+  // `null`, and because the left operand can't be `null`, the right operand is
+  // never evaluated.
+  //
+  // The second is when the left-hand side of an assignment using the `??=`
+  // operator can't be `null`. The right-hand side is only evaluated if the
+  // left-hand side has the value `null`, and because the left-hand side can't
+  // be `null`, the right-hand side is never evaluated.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` can't be `null`:
+  //
+  // ```dart
+  // int f(int x) {
+  //   return x ?? [!0!];
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `f` can't be `null`:
+  //
+  // ```dart
+  // class C {
+  //   int f = -1;
+  //
+  //   void m(int x) {
+  //     f ??= [!x!];
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the diagnostic is reported for an `??` operator, then remove the `??`
+  // operator and the right operand:
+  //
+  // ```dart
+  // int f(int x) {
+  //   return x;
+  // }
+  // ```
+  //
+  // If the diagnostic is reported for an assignment, and the assignment isn't
+  // needed, then remove the assignment:
+  //
+  // ```dart
+  // class C {
+  //   int f = -1;
+  //
+  //   void m(int x) {
+  //   }
+  // }
+  // ```
+  //
+  // If the assignment is needed, but should be based on a different condition,
+  // then rewrite the code to use `=` and the different condition:
+  //
+  // ```dart
+  // class C {
+  //   int f = -1;
+  //
+  //   void m(int x) {
+  //     if (f < 0) {
+  //       f = x;
+  //     }
+  //   }
+  // }
+  // ```
+  static const StaticWarningCode DEAD_NULL_AWARE_EXPRESSION = StaticWarningCode(
+    '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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the null-aware operator that is invalid
+   * 1: the non-null-aware operator that can replace the invalid operator
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a null-aware operator (`?.`,
+  // `?..`, `?[`, `?..[`, or `...?`) is used on a receiver that's known to be
+  // non-nullable.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `s` can't be `null`:
+  //
+  // ```dart
+  // int? getLength(String s) {
+  //   return s[!?.!]length;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `a` can't be `null`:
+  //
+  // ```dart
+  // var a = [];
+  // var b = [[!...?!]a];
+  // ```
+  //
+  // The following code produces this diagnostic because `s?.length` can't
+  // return `null`:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   s?.length[!?.!]isEven;
+  // }
+  // ```
+  //
+  // The reason `s?.length` can't return `null` is because the null-aware
+  // operator following `s` short-circuits the evaluation of both `length` and
+  // `isEven` if `s` is `null`. In other words, if `s` is `null`, then neither
+  // `length` nor `isEven` will be invoked, and if `s` is non-`null`, then
+  // `length` can't return a `null` value. Either way, `isEven` can't be invoked
+  // on a `null` value, so the null-aware operator is not necessary. See
+  // [Understanding null safety](/null-safety/understanding-null-safety#smarter-null-aware-methods)
+  // for more details.
+  //
+  // The following code produces this diagnostic because `s` can't be `null`.
+  //
+  // ```dart
+  // void f(Object? o) {
+  //   var s = o as String;
+  //   s[!?.!]length;
+  // }
+  // ```
+  //
+  // The reason `s` can't be null, despite the fact that `o` can be `null`, is
+  // because of the cast to `String`, which is a non-nullable type. If `o` ever
+  // has the value `null`, the cast will fail and the invocation of `length`
+  // will not happen.
+  //
+  // #### Common fixes
+  //
+  // Replace the null-aware operator with a non-null-aware equivalent; for
+  // example, change `?.` to  `.`:
+  //
+  // ```dart
+  // int getLength(String s) {
+  //   return s.length;
+  // }
+  // ```
+  //
+  // (Note that the return type was also changed to be non-nullable, which might
+  // not be appropriate in some cases.)
+  static const StaticWarningCode INVALID_NULL_AWARE_OPERATOR =
+      StaticWarningCode(
+    'INVALID_NULL_AWARE_OPERATOR',
+    "The receiver can't be null, so the null-aware operator '{0}' is unnecessary.",
+    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 = StaticWarningCode(
+    'INVALID_NULL_AWARE_OPERATOR',
+    "The receiver 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,
+    uniqueName: 'INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT',
+  );
+
+  /**
+   * 7.1 Instance Methods: It is a static warning if an instance method
+   * <i>m1</i> overrides an instance member <i>m2</i>, the signature of
+   * <i>m2</i> explicitly specifies a default value for a formal parameter
+   * <i>p</i> and the signature of <i>m1</i> specifies a different default value
+   * for <i>p</i>.
+   */
+  static const StaticWarningCode
+      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = StaticWarningCode(
+    '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.",
+  );
+
+  /**
+   * 7.1 Instance Methods: It is a static warning if an instance method
+   * <i>m1</i> overrides an instance member <i>m2</i>, the signature of
+   * <i>m2</i> explicitly specifies a default value for a formal parameter
+   * <i>p</i> and the signature of <i>m1</i> specifies a different default value
+   * for <i>p</i>.
+   */
+  static const StaticWarningCode
+      INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL = StaticWarningCode(
+    'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL',
+    "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.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the constant that is missing
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `switch` statement for an enum
+  // doesn't include an option for one of the values in the enumeration.
+  //
+  // Note that `null` is always a possible value for an enum and therefore also
+  // must be handled.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the enum constant `e2`
+  // isn't handled:
+  //
+  // ```dart
+  // enum E { e1, e2 }
+  //
+  // void f(E e) {
+  //   [!switch (e)!] {
+  //     case E.e1:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's special handling for the missing values, then add a `case`
+  // clause for each of the missing values:
+  //
+  // ```dart
+  // enum E { e1, e2 }
+  //
+  // void f(E e) {
+  //   switch (e) {
+  //     case E.e1:
+  //       break;
+  //     case E.e2:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If the missing values should be handled the same way, then add a `default`
+  // clause:
+  //
+  // ```dart
+  // enum E { e1, e2 }
+  //
+  // void f(E e) {
+  //   switch (e) {
+  //     case E.e1:
+  //       break;
+  //     default:
+  //       break;
+  //   }
+  // }
+  // ```
+  // TODO(brianwilkerson) This documentation will need to be updated when NNBD
+  //  ships.
+  static const StaticWarningCode MISSING_ENUM_CONSTANT_IN_SWITCH =
+      StaticWarningCode(
+    '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.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the operand of the `!` operator
+  // can't be `null`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` can't be `null`:
+  //
+  // ```dart
+  // int f(int x) {
+  //   return x[!!!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the null check operator (`!`):
+  //
+  // ```dart
+  // int f(int x) {
+  //   return x;
+  // }
+  // ```
+  static const StaticWarningCode UNNECESSARY_NON_NULL_ASSERTION =
+      StaticWarningCode(
+    'UNNECESSARY_NON_NULL_ASSERTION',
+    "The '!' will have no effect because the receiver can't be null.",
+    correction: "Try removing the '!' operator.",
+    hasPublishedDocs: true,
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const StaticWarningCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'StaticWarningCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/error/correct_override.dart b/pkg/analyzer/lib/src/error/correct_override.dart
index e16cad4..4c821b5 100644
--- a/pkg/analyzer/lib/src/error/correct_override.dart
+++ b/pkg/analyzer/lib/src/error/correct_override.dart
@@ -69,7 +69,8 @@
   /// Fill [_thisTypeForSubtype]. If [_thisMember] has covariant formal
   /// parameters, replace their types with `Object?` or `Object`.
   void _computeThisTypeForSubtype() {
-    var parameters = _thisMember.parameters;
+    var type = _thisMember.type;
+    var parameters = type.parameters;
 
     List<ParameterElement>? newParameters;
     for (var i = 0; i < parameters.length; i++) {
@@ -84,7 +85,6 @@
       }
     }
 
-    var type = _thisMember.type;
     if (newParameters != null) {
       _thisTypeForSubtype = FunctionTypeImpl(
         typeFormals: type.typeFormals,
diff --git a/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart b/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
index 9415a30..ca0efc9 100644
--- a/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
+++ b/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
@@ -14,7 +14,7 @@
   static final Set<String> _enumInstanceMembers = {
     'hashCode',
     'index',
-    'noSuchMethod',
+    FunctionElement.NO_SUCH_METHOD_METHOD_NAME,
     'runtimeType',
     'toString',
   };
diff --git a/pkg/analyzer/lib/src/error/ignore_validator.dart b/pkg/analyzer/lib/src/error/ignore_validator.dart
index 5b9844a..d245ee9e 100644
--- a/pkg/analyzer/lib/src/error/ignore_validator.dart
+++ b/pkg/analyzer/lib/src/error/ignore_validator.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/ignore_comments/ignore_info.dart';
 
 /// Used to validate the ignore comments in a single file.
@@ -46,28 +45,44 @@
     // Report and remove any un-ignorable or duplicated names.
     //
     var namesIgnoredForFile = <String>{};
+    var typesIgnoredForFile = <String>{};
     var unignorable = <DiagnosticName>[];
-    var duplicated = <DiagnosticName>[];
-    for (var ignoredName in ignoredForFile) {
-      var name = ignoredName.name;
-      if (_unignorableNames.contains(name)) {
-        unignorable.add(ignoredName);
-      } else if (!namesIgnoredForFile.add(name)) {
-        duplicated.add(ignoredName);
+    var duplicated = <IgnoredElement>[];
+    for (var ignoredElement in ignoredForFile) {
+      if (ignoredElement is DiagnosticName) {
+        var name = ignoredElement.name;
+        if (_unignorableNames.contains(name)) {
+          unignorable.add(ignoredElement);
+        } else if (!namesIgnoredForFile.add(name)) {
+          duplicated.add(ignoredElement);
+        }
+      } else if (ignoredElement is DiagnosticType) {
+        if (!typesIgnoredForFile.add(ignoredElement.type)) {
+          duplicated.add(ignoredElement);
+        }
       }
     }
     _reportUnknownAndDuplicateIgnores(unignorable, duplicated, ignoredForFile);
     for (var ignoredOnLine in ignoredOnLineMap.values) {
       var namedIgnoredOnLine = <String>{};
-      var unignorable = <DiagnosticName>[];
-      var duplicated = <DiagnosticName>[];
-      for (var ignoredName in ignoredOnLine) {
-        var name = ignoredName.name;
-        if (_unignorableNames.contains(name)) {
-          unignorable.add(ignoredName);
-        } else if (namesIgnoredForFile.contains(name) ||
-            !namedIgnoredOnLine.add(name)) {
-          duplicated.add(ignoredName);
+      var typesIgnoredOnLine = <String>{};
+      var unignorable = <IgnoredElement>[];
+      var duplicated = <IgnoredElement>[];
+      for (var ignoredElement in ignoredOnLine) {
+        if (ignoredElement is DiagnosticName) {
+          var name = ignoredElement.name;
+          if (_unignorableNames.contains(name)) {
+            unignorable.add(ignoredElement);
+          } else if (namesIgnoredForFile.contains(name) ||
+              !namedIgnoredOnLine.add(name)) {
+            duplicated.add(ignoredElement);
+          }
+        } else if (ignoredElement is DiagnosticType) {
+          var type = ignoredElement.type;
+          if (typesIgnoredForFile.contains(type) ||
+              !typesIgnoredOnLine.add(type)) {
+            duplicated.add(ignoredElement);
+          }
         }
       }
       _reportUnknownAndDuplicateIgnores(unignorable, duplicated, ignoredOnLine);
@@ -96,8 +111,8 @@
 
   /// Report the names that are [unignorable] or [duplicated] and remove them
   /// from the [list] of names from which they were extracted.
-  void _reportUnknownAndDuplicateIgnores(List<DiagnosticName> unignorable,
-      List<DiagnosticName> duplicated, List<DiagnosticName> list) {
+  void _reportUnknownAndDuplicateIgnores(List<IgnoredElement> unignorable,
+      List<IgnoredElement> duplicated, List<IgnoredElement> list) {
     // TODO(brianwilkerson) Uncomment the code below after the unignorable
     //  ignores in the Flutter code base have been cleaned up.
     // for (var unignorableName in unignorable) {
@@ -106,16 +121,26 @@
     //       unignorableName.offset, name.length, [name]);
     //   list.remove(unignorableName);
     // }
-    for (var ignoredName in duplicated) {
-      var name = ignoredName.name;
-      _errorReporter.reportErrorForOffset(
-          HintCode.DUPLICATE_IGNORE, ignoredName.offset, name.length, [name]);
-      list.remove(ignoredName);
+    for (var ignoredElement in duplicated) {
+      if (ignoredElement is DiagnosticName) {
+        var name = ignoredElement.name;
+        _errorReporter.reportErrorForOffset(HintCode.DUPLICATE_IGNORE,
+            ignoredElement.offset, name.length, [name]);
+        list.remove(ignoredElement);
+      } else if (ignoredElement is DiagnosticType) {
+        _errorReporter.reportErrorForOffset(
+          HintCode.DUPLICATE_IGNORE,
+          ignoredElement.offset,
+          ignoredElement.length,
+          [ignoredElement.type],
+        );
+        list.remove(ignoredElement);
+      }
     }
   }
 
   /// Report the [ignoredNames] as being unnecessary.
-  void _reportUnnecessaryIgnores(List<DiagnosticName> ignoredNames) {
+  void _reportUnnecessaryIgnores(List<IgnoredElement> ignoredNames) {
     // TODO(brianwilkerson) Uncomment the code below after the unnecessary
     //  ignores in the Flutter code base have been cleaned up.
     // for (var ignoredName in ignoredNames) {
@@ -140,8 +165,9 @@
   }
 }
 
-extension on List<DiagnosticName> {
+extension on List<IgnoredElement> {
   void removeByName(String name) {
-    removeWhere((ignoredName) => ignoredName.name == name);
+    removeWhere((ignoredElement) =>
+        ignoredElement is DiagnosticName && ignoredElement.name == name);
   }
 }
diff --git a/pkg/analyzer/lib/src/error/imports_verifier.dart b/pkg/analyzer/lib/src/error/imports_verifier.dart
index 4568292..878fdee 100644
--- a/pkg/analyzer/lib/src/error/imports_verifier.dart
+++ b/pkg/analyzer/lib/src/error/imports_verifier.dart
@@ -339,8 +339,7 @@
       int length = identifiers.length;
       for (int i = 0; i < length; i++) {
         Identifier identifier = identifiers[i];
-        reporter.reportErrorForNode(
-            HintCode.DUPLICATE_HIDDEN_NAME, identifier, [identifier.name]);
+        reporter.reportErrorForNode(HintCode.DUPLICATE_HIDDEN_NAME, identifier);
       }
     });
     _duplicateShownNamesMap.forEach(
@@ -348,8 +347,7 @@
       int length = identifiers.length;
       for (int i = 0; i < length; i++) {
         Identifier identifier = identifiers[i];
-        reporter.reportErrorForNode(
-            HintCode.DUPLICATE_SHOWN_NAME, identifier, [identifier.name]);
+        reporter.reportErrorForNode(HintCode.DUPLICATE_SHOWN_NAME, identifier);
       }
     });
   }
diff --git a/pkg/analyzer/lib/src/error/inheritance_override.dart b/pkg/analyzer/lib/src/error/inheritance_override.dart
index 696dfb6..0746ffd 100644
--- a/pkg/analyzer/lib/src/error/inheritance_override.dart
+++ b/pkg/analyzer/lib/src/error/inheritance_override.dart
@@ -45,7 +45,7 @@
           classNameNode: declaration.name,
           implementsClause: declaration.implementsClause,
           members: declaration.members,
-          superclass: declaration.extendsClause?.superclass,
+          superclass: declaration.extendsClause?.superclass2,
           withClause: declaration.withClause,
         ).verify();
       } else if (declaration is ClassTypeAlias) {
@@ -58,7 +58,7 @@
           library: library,
           classNameNode: declaration.name,
           implementsClause: declaration.implementsClause,
-          superclass: declaration.superclass,
+          superclass: declaration.superclass2,
           withClause: declaration.withClause,
         ).verify();
       } else if (declaration is MixinDeclaration) {
@@ -100,7 +100,7 @@
   final List<ClassMember> members;
   final ImplementsClause? implementsClause;
   final OnClause? onClause;
-  final TypeName? superclass;
+  final NamedType? superclass;
   final WithClause? withClause;
 
   final List<InterfaceType> directSuperInterfaces = [];
@@ -152,7 +152,7 @@
     //   class C extends S&M2 { ...members of C... }
     // So, we need to check members of each mixin against superinterfaces
     // of `S`, and superinterfaces of all previous mixins.
-    var mixinNodes = withClause?.mixinTypes;
+    var mixinNodes = withClause?.mixinTypes2;
     var mixinTypes = classElement.mixins;
     for (var i = 0; i < mixinTypes.length; i++) {
       var mixinType = mixinTypes[i];
@@ -318,10 +318,10 @@
     }
   }
 
-  /// Verify that the given [typeName] does not extend, implement, or mixes-in
+  /// Verify that the given [namedType] does not extend, implement, or mixes-in
   /// types such as `num` or `String`.
-  bool _checkDirectSuperType(TypeName typeName, ErrorCode errorCode) {
-    if (typeName.isSynthetic) {
+  bool _checkDirectSuperType(NamedType namedType, ErrorCode errorCode) {
+    if (namedType.isSynthetic) {
       return false;
     }
 
@@ -331,10 +331,10 @@
       return false;
     }
 
-    DartType type = typeName.typeOrThrow;
+    DartType type = namedType.typeOrThrow;
     if (type is InterfaceType &&
         typeProvider.isNonSubtypableClass(type.element)) {
-      reporter.reportErrorForNode(errorCode, typeName, [type]);
+      reporter.reportErrorForNode(errorCode, namedType, [type]);
       return true;
     }
 
@@ -347,9 +347,9 @@
   bool _checkDirectSuperTypes() {
     var hasError = false;
     if (implementsClause != null) {
-      for (var typeName in implementsClause!.interfaces) {
+      for (var namedType in implementsClause!.interfaces2) {
         if (_checkDirectSuperType(
-          typeName,
+          namedType,
           CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
         )) {
           hasError = true;
@@ -357,9 +357,9 @@
       }
     }
     if (onClause != null) {
-      for (var typeName in onClause!.superclassConstraints) {
+      for (var namedType in onClause!.superclassConstraints2) {
         if (_checkDirectSuperType(
-          typeName,
+          namedType,
           CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS,
         )) {
           hasError = true;
@@ -375,9 +375,9 @@
       }
     }
     if (withClause != null) {
-      for (var typeName in withClause!.mixinTypes) {
+      for (var namedType in withClause!.mixinTypes2) {
         if (_checkDirectSuperType(
-          typeName,
+          namedType,
           CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
         )) {
           hasError = true;
diff --git a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
index 35834b5..4a5d28e 100644
--- a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
+++ b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
@@ -47,6 +47,7 @@
       List<DiagnosticMessage>? messages}) {
     if (receiverType == _typeSystem.typeProvider.nullType) {
       errorCode = CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE;
+      arguments = [];
     }
     if (errorEntity is AstNode) {
       _errorReporter.reportErrorForNode(
diff --git a/pkg/analyzer/lib/src/error/todo_finder.dart b/pkg/analyzer/lib/src/error/todo_finder.dart
index cbb1d38..e6a4df3 100644
--- a/pkg/analyzer/lib/src/error/todo_finder.dart
+++ b/pkg/analyzer/lib/src/error/todo_finder.dart
@@ -66,7 +66,7 @@
   /// any continuations).
   Token? _scrapeTodoComment(Token commentToken, LineInfo lineInfo) {
     Iterable<RegExpMatch> matches =
-        TodoCode.TODO_REGEX.allMatches(commentToken.lexeme);
+        Todo.TODO_REGEX.allMatches(commentToken.lexeme);
     // Track the comment that will be returned for looking for the next todo.
     // This will be moved along if additional comments are consumed by multiline
     // TODOs.
@@ -110,7 +110,7 @@
                   // And indented more than the original 'todo' text.
                   columnOfFirstNoneMarkerOrWhitespace == column + 1 &&
                   // And not their own todos.
-                  !TodoCode.TODO_REGEX.hasMatch(nextComment.lexeme);
+                  !Todo.TODO_REGEX.hasMatch(nextComment.lexeme);
           if (!isContinuation) {
             break;
           }
@@ -127,7 +127,7 @@
       }
 
       _errorReporter.reportErrorForOffset(
-          TodoCode.forKind(todoKind), offset, end - offset, [todoText]);
+          Todo.forKind(todoKind), offset, end - offset, [todoText]);
     }
 
     return nextComment;
diff --git a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
index 71ab7b9..83fbc88 100644
--- a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
+++ b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
@@ -33,7 +33,7 @@
       _libraryElement.typeSystem as TypeSystemImpl;
 
   void checkConstructorReference(ConstructorReference node) {
-    var classElement = node.constructorName.type.name.staticElement;
+    var classElement = node.constructorName.type2.name.staticElement;
     List<TypeParameterElement> typeParameters;
     if (classElement is TypeAliasElement) {
       typeParameters = classElement.typeParameters;
@@ -46,7 +46,7 @@
     if (typeParameters.isEmpty) {
       return;
     }
-    var typeArgumentList = node.constructorName.type.typeArguments;
+    var typeArgumentList = node.constructorName.type2.typeArguments;
     if (typeArgumentList == null) {
       return;
     }
@@ -147,6 +147,15 @@
     _checkForImplicitDynamicInvoke(node);
   }
 
+  void checkNamedType(NamedType node) {
+    _checkForTypeArgumentNotMatchingBounds(node);
+    var parent = node.parent;
+    if (parent is! ConstructorName ||
+        parent.parent is! InstanceCreationExpression) {
+      _checkForRawTypeName(node);
+    }
+  }
+
   void checkSetLiteral(SetOrMapLiteral node) {
     var typeArguments = node.typeArguments;
     if (typeArguments != null) {
@@ -162,15 +171,6 @@
     _checkForImplicitDynamicTypedLiteral(node);
   }
 
-  void checkTypeName(TypeName node) {
-    _checkForTypeArgumentNotMatchingBounds(node);
-    var parent = node.parent;
-    if (parent is! ConstructorName ||
-        parent.parent is! InstanceCreationExpression) {
-      _checkForRawTypeName(node);
-    }
-  }
-
   void _checkForImplicitDynamicInvoke(InvocationExpression node) {
     if (_options.implicitDynamic || node.typeArguments != null) {
       return;
@@ -232,10 +232,10 @@
   /// This checks if [node] refers to a generic type and does not have explicit
   /// or inferred type arguments. When that happens, it reports error code
   /// [HintCode.STRICT_RAW_TYPE].
-  void _checkForRawTypeName(TypeName node) {
-    AstNode parentEscapingTypeArguments(TypeName node) {
+  void _checkForRawTypeName(NamedType node) {
+    AstNode parentEscapingTypeArguments(NamedType node) {
       var parent = node.parent!;
-      while (parent is TypeArgumentList || parent is TypeName) {
+      while (parent is TypeArgumentList || parent is NamedType) {
         if (parent.parent == null) {
           return parent;
         }
@@ -262,10 +262,10 @@
     }
   }
 
-  /// Verify that the type arguments in the given [typeName] are all within
+  /// Verify that the type arguments in the given [namedType] are all within
   /// their bounds.
-  void _checkForTypeArgumentNotMatchingBounds(TypeName typeName) {
-    var type = typeName.type;
+  void _checkForTypeArgumentNotMatchingBounds(NamedType namedType) {
+    var type = namedType.type;
     if (type == null) {
       return;
     }
@@ -298,7 +298,7 @@
         if (!_libraryElement.featureSet.isEnabled(Feature.generic_metadata)) {
           _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT,
-            _typeArgumentErrorNode(typeName, i),
+            _typeArgumentErrorNode(namedType, i),
           );
           continue;
         }
@@ -326,11 +326,11 @@
     }
 
     // If not allowed to be super-bounded, report issues.
-    if (!_shouldAllowSuperBoundedTypes(typeName)) {
+    if (!_shouldAllowSuperBoundedTypes(namedType)) {
       for (var issue in issues) {
         _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-          _typeArgumentErrorNode(typeName, issue.index),
+          _typeArgumentErrorNode(namedType, issue.index),
           [issue.argument, issue.parameter.name, issue.parameterBound],
         );
       }
@@ -365,7 +365,7 @@
       if (!_typeSystem.isSubtypeOf(typeArgument, bound)) {
         _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-          _typeArgumentErrorNode(typeName, i),
+          _typeArgumentErrorNode(namedType, i),
           [typeArgument, typeParameter.name, bound],
         );
       }
@@ -442,7 +442,7 @@
   void _checkTypeArgumentConst(
       NodeList<TypeAnnotation> arguments, ErrorCode errorCode) {
     for (TypeAnnotation type in arguments) {
-      if (type is TypeName && type.type is TypeParameterType) {
+      if (type is NamedType && type.type is TypeParameterType) {
         _errorReporter.reportErrorForNode(errorCode, type, [type.name]);
       }
     }
@@ -515,10 +515,10 @@
     return false;
   }
 
-  /// Determines if the given [typeName] occurs in a context where super-bounded
-  /// types are allowed.
-  bool _shouldAllowSuperBoundedTypes(TypeName typeName) {
-    var parent = typeName.parent;
+  /// Determines if the given [namedType] occurs in a context where
+  /// super-bounded types are allowed.
+  bool _shouldAllowSuperBoundedTypes(NamedType namedType) {
+    var parent = namedType.parent;
     if (parent is ExtendsClause) return false;
     if (parent is OnClause) return false;
     if (parent is ClassTypeAlias) return false;
@@ -530,7 +530,7 @@
   }
 
   /// Return the type arguments at [index] from [node], or the [node] itself.
-  static TypeAnnotation _typeArgumentErrorNode(TypeName node, int index) {
+  static TypeAnnotation _typeArgumentErrorNode(NamedType node, int index) {
     var typeArguments = node.typeArguments?.arguments;
     if (typeArguments != null && index < typeArguments.length) {
       return typeArguments[index];
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 7035778..0d64b24 100644
--- a/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
+++ b/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
@@ -92,6 +92,12 @@
   }
 
   @override
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    usedElements.addElement(node.staticElement);
+    super.visitFunctionExpressionInvocation(node);
+  }
+
+  @override
   void visitIndexExpression(IndexExpression node) {
     var element = node.writeOrReadElement;
     usedElements.addMember(element);
@@ -246,7 +252,7 @@
       return;
     }
     // Ignore places where the element is not actually used.
-    if (node.parent is TypeName) {
+    if (node.parent is NamedType) {
       if (element is ClassElement) {
         AstNode parent2 = node.parent!.parent!;
         if (parent2 is IsExpression) {
diff --git a/pkg/analyzer/lib/src/error/use_result_verifier.dart b/pkg/analyzer/lib/src/error/use_result_verifier.dart
index cc2d3bf..1899064 100644
--- a/pkg/analyzer/lib/src/error/use_result_verifier.dart
+++ b/pkg/analyzer/lib/src/error/use_result_verifier.dart
@@ -52,6 +52,11 @@
   }
 
   void _check(AstNode node, Element element) {
+    if (node.parent is CommentReference) {
+      // Don't flag references in comments.
+      return;
+    }
+
     var annotation = _getUseResultMetadata(element);
     if (annotation == null) {
       return;
@@ -140,9 +145,11 @@
       return false;
     }
 
-    if (parent is ParenthesizedExpression ||
-        parent is ConditionalExpression ||
-        parent is CascadeExpression) {
+    if (parent is CascadeExpression) {
+      return parent.target == node;
+    }
+
+    if (parent is ParenthesizedExpression || parent is ConditionalExpression) {
       return _isUsed(parent);
     }
 
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 9968a05..9abd454 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -254,10 +254,11 @@
       name: name,
       typeParameters: typeParameters,
       onKeyword: Tokens.on_(),
-      extendedType: ast.typeName(
-        _tmpSimpleIdentifier(),
-        null,
+      extendedType: ast.namedType(
+        name: _tmpSimpleIdentifier(),
       ), // extendedType is set in [endExtensionDeclaration]
+      showClause: null,
+      hideClause: null,
       leftBracket: Tokens.openCurlyBracket(),
       rightBracket: Tokens.closeCurlyBracket(),
       members: [],
@@ -1108,8 +1109,16 @@
     var constructorName = pop() as SimpleIdentifier?;
     var typeArguments = pop() as TypeArgumentList?;
     var typeNameIdentifier = pop() as Identifier;
-    push(ast.constructorName(ast.typeName(typeNameIdentifier, typeArguments),
-        periodBeforeName, constructorName));
+    push(
+      ast.constructorName(
+        ast.namedType(
+          name: typeNameIdentifier,
+          typeArguments: typeArguments,
+        ),
+        periodBeforeName,
+        constructorName,
+      ),
+    );
   }
 
   @override
@@ -1192,7 +1201,7 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token token) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token token) {
     if (typeKeyword != null && !enableExtensionTypes) {
       var feature = ExperimentalFeatures.extension_types;
       handleRecoverableError(
@@ -1203,11 +1212,29 @@
           typeKeyword,
           typeKeyword);
     }
+
+    if ((showKeyword != null || hideKeyword != null) && !enableExtensionTypes) {
+      var feature = ExperimentalFeatures.extension_types;
+      handleRecoverableError(
+          templateExperimentNotEnabled.withArguments(
+            feature.enableString,
+            _versionAsString(ExperimentStatus.currentVersion),
+          ),
+          (showKeyword ?? hideKeyword)!,
+          (showKeyword ?? hideKeyword)!);
+    }
+
+    ShowClause? showClause = pop(NullValue.ShowClause) as ShowClause?;
+    HideClause? hideClause = pop(NullValue.HideClause) as HideClause?;
+
     var type = pop() as TypeAnnotation;
+
     extensionDeclaration!
       ..extendedType = type
       ..onKeyword = onKeyword
-      ..typeKeyword = typeKeyword;
+      ..typeKeyword = typeKeyword
+      ..showClause = showClause
+      ..hideClause = hideClause;
     extensionDeclaration = null;
   }
 
@@ -1968,11 +1995,11 @@
 
     ImplementsClause? implementsClause;
     if (implementsKeyword != null) {
-      var interfaces = pop() as List<TypeName>;
+      var interfaces = pop() as List<NamedType>;
       implementsClause = ast.implementsClause(implementsKeyword, interfaces);
     }
     var withClause = pop(NullValue.WithClause) as WithClause;
-    var superclass = pop() as TypeName;
+    var superclass = pop() as NamedType;
     var modifiers = pop() as _Modifiers?;
     var typeParameters = pop() as TypeParameterList?;
     var name = pop() as SimpleIdentifier;
@@ -2291,7 +2318,7 @@
   @override
   void endTypeList(int count) {
     debugEvent("TypeList");
-    push(popTypedList<TypeName>(count) ?? NullValue.TypeList);
+    push(popTypedList<NamedType>(count) ?? NullValue.TypeList);
   }
 
   @override
@@ -2511,7 +2538,7 @@
       pop();
       typeCount--;
     }
-    var supertype = pop() as TypeName?;
+    var supertype = pop() as NamedType?;
     if (supertype != null) {
       push(ast.extendsClause(extendsKeyword!, supertype));
     } else {
@@ -2572,7 +2599,7 @@
     debugEvent("ClassImplements");
 
     if (implementsKeyword != null) {
-      var interfaces = popTypedList2<TypeName>(interfacesCount);
+      var interfaces = popTypedList2<NamedType>(interfacesCount);
       push(ast.implementsClause(implementsKeyword, interfaces));
     } else {
       push(NullValue.IdentifierList);
@@ -2582,7 +2609,7 @@
   @override
   void handleClassWithClause(Token withKeyword) {
     assert(optional('with', withKeyword));
-    var mixinTypes = pop() as List<TypeName>;
+    var mixinTypes = pop() as List<NamedType>;
     push(ast.withClause(withKeyword, mixinTypes));
   }
 
@@ -2706,6 +2733,29 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    assert(optionalOrNull('hide', hideKeyword));
+    assert(optionalOrNull('show', showKeyword));
+    debugEvent("ExtensionShowHide");
+
+    HideClause? hideClause;
+    if (hideKeyword != null) {
+      var elements = popTypedList2<ShowHideClauseElement>(hideElementCount);
+      hideClause = ast.hideClause(hideKeyword: hideKeyword, elements: elements);
+    }
+
+    ShowClause? showClause;
+    if (showKeyword != null) {
+      var elements = popTypedList2<ShowHideClauseElement>(showElementCount);
+      showClause = ast.showClause(showKeyword: showKeyword, elements: elements);
+    }
+
+    push(hideClause ?? NullValue.HideClause);
+    push(showClause ?? NullValue.ShowClause);
+  }
+
+  @override
   void handleFinallyBlock(Token finallyKeyword) {
     debugEvent("FinallyBlock");
     // The finally block is popped in "endTryStatement".
@@ -3205,7 +3255,7 @@
     debugEvent("MixinOn");
 
     if (onKeyword != null) {
-      var types = popTypedList2<TypeName>(typeCount);
+      var types = popTypedList2<NamedType>(typeCount);
       push(ast.onClause(onKeyword, types));
     } else {
       push(NullValue.IdentifierList);
@@ -3225,7 +3275,7 @@
   @override
   void handleNamedMixinApplicationWithClause(Token withKeyword) {
     assert(optionalOrNull('with', withKeyword));
-    var mixinTypes = pop() as List<TypeName>;
+    var mixinTypes = pop() as List<NamedType>;
     push(ast.withClause(withKeyword, mixinTypes));
   }
 
@@ -3385,7 +3435,7 @@
     var extendsClause = pop(NullValue.ExtendsClause) as ExtendsClause?;
     var declaration = declarations.last as ClassDeclarationImpl;
     if (extendsClause != null) {
-      if (declaration.extendsClause?.superclass == null) {
+      if (declaration.extendsClause?.superclass2 == null) {
         declaration.extendsClause = extendsClause;
       }
     }
@@ -3393,15 +3443,15 @@
       if (declaration.withClause == null) {
         declaration.withClause = withClause;
       } else {
-        declaration.withClause!.mixinTypes.addAll(withClause.mixinTypes);
+        declaration.withClause!.mixinTypes2.addAll(withClause.mixinTypes2);
       }
     }
     if (implementsClause != null) {
       if (declaration.implementsClause == null) {
         declaration.implementsClause = implementsClause;
       } else {
-        declaration.implementsClause!.interfaces
-            .addAll(implementsClause.interfaces);
+        declaration.implementsClause!.interfaces2
+            .addAll(implementsClause.interfaces2);
       }
     }
   }
@@ -3443,16 +3493,16 @@
       if (mixinDeclaration!.onClause == null) {
         mixinDeclaration!.onClause = onClause;
       } else {
-        mixinDeclaration!.onClause!.superclassConstraints
-            .addAll(onClause.superclassConstraints);
+        mixinDeclaration!.onClause!.superclassConstraints2
+            .addAll(onClause.superclassConstraints2);
       }
     }
     if (implementsClause != null) {
       if (mixinDeclaration!.implementsClause == null) {
         mixinDeclaration!.implementsClause = implementsClause;
       } else {
-        mixinDeclaration!.implementsClause!.interfaces
-            .addAll(implementsClause.interfaces);
+        mixinDeclaration!.implementsClause!.interfaces2
+            .addAll(implementsClause.interfaces2);
       }
     }
   }
@@ -3479,6 +3529,22 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    debugEvent("handleShowHideIdentifier");
+
+    assert(modifier == null ||
+        modifier.stringValue! == "get" ||
+        modifier.stringValue! == "set" ||
+        modifier.stringValue! == "operator");
+
+    SimpleIdentifier name = ast.simpleIdentifier(identifier);
+    ShowHideElement element =
+        ast.showHideElement(modifier: modifier, name: name);
+
+    push(element);
+  }
+
+  @override
   void handleSpreadExpression(Token spreadToken) {
     var expression = pop() as Expression;
     if (enableSpreadCollections) {
@@ -3555,7 +3621,13 @@
 
     var arguments = pop() as TypeArgumentList?;
     var name = pop() as Identifier;
-    push(ast.typeName(name, arguments, question: questionMark));
+    push(
+      ast.namedType(
+        name: name,
+        typeArguments: arguments,
+        question: questionMark,
+      ),
+    );
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index f5e935f..f207a06 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -317,13 +317,6 @@
             offset,
             length);
         return;
-      case "WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR":
-        errorReporter?.reportErrorMessage(
-            CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-            offset,
-            length,
-            message);
-        return;
       case "WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER":
         errorReporter?.reportErrorForOffset(
             ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER,
@@ -347,12 +340,8 @@
     if (index > 0 && index < fastaAnalyzerErrorCodes.length) {
       var errorCode = fastaAnalyzerErrorCodes[index];
       if (errorCode != null) {
-        errorReporter!.reportError(AnalysisError.withNamedArguments(
-            errorReporter!.source,
-            offset,
-            length,
-            errorCode,
-            message.arguments));
+        errorReporter!.reportError(AnalysisError(errorReporter!.source, offset,
+            length, errorCode, message.arguments.values.toList()));
         return;
       }
     }
@@ -369,8 +358,8 @@
   void _reportByCode(
       ErrorCode errorCode, Message message, int offset, int length) {
     if (errorReporter != null) {
-      errorReporter!.reportError(AnalysisError.withNamedArguments(
-          errorReporter!.source, offset, length, errorCode, message.arguments));
+      errorReporter!.reportError(AnalysisError(errorReporter!.source, offset,
+          length, errorCode, message.arguments.values.toList()));
     }
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/declaration_resolver.dart b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
index 570ef8f..650fde4 100644
--- a/pkg/analyzer/lib/src/generated/declaration_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
@@ -107,16 +107,6 @@
             (element.aliasedElement as GenericFunctionTypeElement).parameters,
         _typeParameters = element.typeParameters;
 
-  String? get _unitSourceContent {
-    Element? element = this.element;
-    while (element != null) {
-      if (element is CompilationUnitElementImpl) {
-        return element.sourceContent;
-      }
-      element = element.enclosingElement;
-    }
-  }
-
   void consumeLocalElements() {
     _functionIndex = _functions!.length;
   }
@@ -138,8 +128,7 @@
         '[accessors: $accessors]'
         '[element.source: ${element.source?.fullName}]'
         '[libraryFilePath: $libraryFilePath]'
-        '[unitFilePath: $unitFilePath]'
-        '[unitSourceContent: $_unitSourceContent]',
+        '[unitFilePath: $unitFilePath]',
       );
     }
     return _accessors![_accessorIndex++] as PropertyAccessorElementImpl;
@@ -158,8 +147,7 @@
         '[classes: $classes]'
         '[element.source: ${element.source?.fullName}]'
         '[libraryFilePath: $libraryFilePath]'
-        '[unitFilePath: $unitFilePath]'
-        '[unitSourceContent: $_unitSourceContent]',
+        '[unitFilePath: $unitFilePath]',
       );
     }
     return _classes![_classIndex++] as ClassElementImpl;
@@ -215,8 +203,7 @@
         '[variables: $variables]'
         '[element.source: ${element.source?.fullName}]'
         '[libraryFilePath: $libraryFilePath]'
-        '[unitFilePath: $unitFilePath]'
-        '[unitSourceContent: $_unitSourceContent]',
+        '[unitFilePath: $unitFilePath]',
       );
     }
     return _variables![_variableIndex++] as VariableElementImpl;
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 7785699..7f2a709 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -238,7 +238,7 @@
 
   @override
   void visitConstructorName(covariant ConstructorNameImpl node) {
-    var type = node.type.type;
+    var type = node.type2.type;
     if (type == null) {
       return;
     }
@@ -476,7 +476,7 @@
     // TODO(brianwilkerson) Defer this check until we know there's an error (by
     // in-lining _resolveArgumentsToFunction below).
     var declaration = node.thisOrAncestorOfType<ClassDeclaration>();
-    var superclassName = declaration?.extendsClause?.superclass.name;
+    var superclassName = declaration?.extendsClause?.superclass2.name;
     if (superclassName != null &&
         _resolver.definingLibrary
             .shouldIgnoreUndefinedIdentifier(superclassName)) {
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 31e2553..ecedd89 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -45,7 +45,6 @@
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/this_access_tracker.dart';
-import 'package:analyzer/src/macro/impl/error.dart' as macro;
 import 'package:collection/collection.dart';
 
 class EnclosingExecutableContext {
@@ -445,15 +444,14 @@
     var outerClass = _enclosingClass;
     try {
       _isInNativeClass = node.nativeClause != null;
-      var enclosingClass = node.declaredElement as ClassElementImpl;
-      _enclosingClass = enclosingClass;
+      _enclosingClass = node.declaredElement as ClassElementImpl;
 
       List<ClassMember> members = node.members;
       _duplicateDefinitionVerifier.checkClass(node);
       _checkForBuiltInIdentifierAsName(
           node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
       _checkForConflictingClassTypeVariableErrorCodes();
-      var superclass = node.extendsClause?.superclass;
+      var superclass = node.extendsClause?.superclass2;
       var implementsClause = node.implementsClause;
       var withClause = node.withClause;
 
@@ -470,10 +468,6 @@
       _checkForBadFunctionUse(node);
       _checkForWrongTypeParameterVarianceInSuperinterfaces();
       _checkForMainFunction(node.name);
-      _reportMacroExecutionErrors(
-        node.metadata,
-        enclosingClass.macroExecutionErrors,
-      );
       super.visitClassDeclaration(node);
     } finally {
       _isInNativeClass = false;
@@ -490,7 +484,7 @@
     try {
       _enclosingClass = node.declaredElement as ClassElementImpl;
       _checkClassInheritance(
-          node, node.superclass, node.withClause, node.implementsClause);
+          node, node.superclass2, node.withClause, node.implementsClause);
       _checkForMainFunction(node.name);
       _checkForWrongTypeParameterVarianceInSuperinterfaces();
     } finally {
@@ -654,10 +648,6 @@
       _checkForNotInitializedNonNullableStaticField(node);
       _checkForWrongTypeParameterVarianceInField(node);
       _checkForLateFinalFieldWithConstConstructor(node);
-      _reportMacroExecutionErrors(
-        node.metadata,
-        node.firstElement.macroExecutionErrors,
-      );
       super.visitFieldDeclaration(node);
     } finally {
       _isInStaticVariableDeclaration = false;
@@ -833,7 +823,7 @@
 
   @override
   void visitImplementsClause(ImplementsClause node) {
-    node.interfaces.forEach(_checkForImplicitDynamicType);
+    node.interfaces2.forEach(_checkForImplicitDynamicType);
     super.visitImplementsClause(node);
   }
 
@@ -868,23 +858,24 @@
   @override
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
     ConstructorName constructorName = node.constructorName;
-    TypeName typeName = constructorName.type;
-    DartType type = typeName.typeOrThrow;
+    NamedType namedType = constructorName.type2;
+    DartType type = namedType.typeOrThrow;
     if (type is InterfaceType) {
-      _checkForConstOrNewWithAbstractClass(node, typeName, type);
-      _checkForConstOrNewWithEnum(node, typeName, type);
-      _checkForConstOrNewWithMixin(node, typeName, type);
+      _checkForConstOrNewWithAbstractClass(node, namedType, type);
+      _checkForConstOrNewWithEnum(node, namedType, type);
+      _checkForConstOrNewWithMixin(node, namedType, type);
       _requiredParametersVerifier.visitInstanceCreationExpression(node);
       if (node.isConst) {
         _checkForConstWithNonConst(node);
-        _checkForConstWithUndefinedConstructor(node, constructorName, typeName);
-        _checkForConstDeferredClass(node, constructorName, typeName);
+        _checkForConstWithUndefinedConstructor(
+            node, constructorName, namedType);
+        _checkForConstDeferredClass(node, constructorName, namedType);
       } else {
-        _checkForNewWithUndefinedConstructor(node, constructorName, typeName);
+        _checkForNewWithUndefinedConstructor(node, constructorName, namedType);
       }
       _checkForListConstructor(node, type);
     }
-    _checkForImplicitDynamicType(typeName);
+    _checkForImplicitDynamicType(namedType);
     super.visitInstanceCreationExpression(node);
   }
 
@@ -1000,6 +991,12 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _typeArgumentsVerifier.checkNamedType(node);
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     // TODO(brianwilkerson) Figure out the right rule for when 'native' is
     // allowed.
@@ -1217,12 +1214,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    _typeArgumentsVerifier.checkTypeName(node);
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _checkForBuiltInIdentifierAsName(node.name,
         CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME);
@@ -1288,7 +1279,7 @@
 
   @override
   void visitWithClause(WithClause node) {
-    node.mixinTypes.forEach(_checkForImplicitDynamicType);
+    node.mixinTypes2.forEach(_checkForImplicitDynamicType);
     super.visitWithClause(node);
   }
 
@@ -1296,7 +1287,7 @@
   /// interfaces.
   void _checkClassInheritance(
       NamedCompilationUnitMember node,
-      TypeName? superclass,
+      NamedType? superclass,
       WithClause? withClause,
       ImplementsClause? implementsClause) {
     // Only check for all of the inheritance logic around clauses if there
@@ -1308,7 +1299,7 @@
         !_checkForNoGenerativeConstructorsInSuperclass(superclass)) {
       _checkForImplicitDynamicType(superclass);
       _checkForExtendsDeferredClass(superclass);
-      _checkForRepeatedType(implementsClause?.interfaces,
+      _checkForRepeatedType(implementsClause?.interfaces2,
           CompileTimeErrorCode.IMPLEMENTS_REPEATED);
       _checkImplementsSuperClass(implementsClause);
       _checkMixinsSuperClass(withClause);
@@ -1383,9 +1374,9 @@
     bool problemReported = false;
     int mixinTypeIndex = -1;
     for (int mixinNameIndex = 0;
-        mixinNameIndex < withClause.mixinTypes.length;
+        mixinNameIndex < withClause.mixinTypes2.length;
         mixinNameIndex++) {
-      TypeName mixinName = withClause.mixinTypes[mixinNameIndex];
+      NamedType mixinName = withClause.mixinTypes2[mixinNameIndex];
       DartType mixinType = mixinName.typeOrThrow;
       if (mixinType is InterfaceType) {
         mixinTypeIndex++;
@@ -1435,11 +1426,11 @@
     if (redirectedElement == null) {
       // If the element is null, we check for the
       // REDIRECT_TO_MISSING_CONSTRUCTOR case
-      TypeName constructorTypeName = redirectedConstructor.type;
-      DartType redirectedType = constructorTypeName.typeOrThrow;
+      NamedType constructorNamedType = redirectedConstructor.type2;
+      DartType redirectedType = constructorNamedType.typeOrThrow;
       if (redirectedType.element != null && !redirectedType.isDynamic) {
         // Prepare the constructor name
-        String constructorStrName = constructorTypeName.name.name;
+        String constructorStrName = constructorNamedType.name.name;
         if (redirectedConstructor.name != null) {
           constructorStrName += ".${redirectedConstructor.name!.name}";
         }
@@ -1615,15 +1606,15 @@
     }
 
     if (extendsClause != null) {
-      var superElement = extendsClause.superclass.name.staticElement;
+      var superElement = extendsClause.superclass2.name.staticElement;
       if (superElement != null && superElement.name == "Function") {
         errorReporter.reportErrorForNode(
-            HintCode.DEPRECATED_EXTENDS_FUNCTION, extendsClause.superclass);
+            HintCode.DEPRECATED_EXTENDS_FUNCTION, extendsClause.superclass2);
       }
     }
 
     if (implementsClause != null) {
-      for (var interface in implementsClause.interfaces) {
+      for (var interface in implementsClause.interfaces2) {
         var type = interface.type;
         if (type != null && type.isDartCoreFunction) {
           errorReporter.reportErrorForNode(
@@ -1636,7 +1627,7 @@
     }
 
     if (withClause != null) {
-      for (TypeName type in withClause.mixinTypes) {
+      for (NamedType type in withClause.mixinTypes2) {
         var mixinElement = type.name.staticElement;
         if (mixinElement != null && mixinElement.name == "Function") {
           errorReporter.reportErrorForNode(
@@ -1979,17 +1970,15 @@
 
   /// Verify that the given 'const' instance creation [expression] is not
   /// creating a deferred type. The [constructorName] is the constructor name,
-  /// always non-`null`. The [typeName] is the name of the type defining the
+  /// always non-`null`. The [namedType] is the name of the type defining the
   /// constructor, always non-`null`.
   ///
   /// See [CompileTimeErrorCode.CONST_DEFERRED_CLASS].
   void _checkForConstDeferredClass(InstanceCreationExpression expression,
-      ConstructorName constructorName, TypeName typeName) {
-    if (typeName.isDeferred) {
+      ConstructorName constructorName, NamedType namedType) {
+    if (namedType.isDeferred) {
       errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.CONST_DEFERRED_CLASS,
-          constructorName,
-          [typeName.name.name]);
+          CompileTimeErrorCode.CONST_DEFERRED_CLASS, constructorName);
     }
   }
 
@@ -2005,13 +1994,13 @@
   }
 
   /// Verify that the given instance creation [expression] is not being invoked
-  /// on an abstract class. The [typeName] is the [TypeName] of the
+  /// on an abstract class. The [namedType] is the [NamedType] of the
   /// [ConstructorName] from the [InstanceCreationExpression], this is the AST
   /// node that the error is attached to. The [type] is the type being
   /// constructed with this [InstanceCreationExpression].
   void _checkForConstOrNewWithAbstractClass(
       InstanceCreationExpression expression,
-      TypeName typeName,
+      NamedType namedType,
       InterfaceType type) {
     if (type.element.isAbstract && !type.element.isMixin) {
       var element = expression.constructorName.staticElement;
@@ -2020,36 +2009,36 @@
             (expression as InstanceCreationExpressionImpl).isImplicit;
         if (!isImplicit) {
           errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
+              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, namedType);
         } else {
           errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
+              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, namedType);
         }
       }
     }
   }
 
   /// Verify that the given instance creation [expression] is not being invoked
-  /// on an enum. The [typeName] is the [TypeName] of the [ConstructorName] from
+  /// on an enum. The [namedType] is the [NamedType] of the [ConstructorName] from
   /// the [InstanceCreationExpression], this is the AST node that the error is
   /// attached to. The [type] is the type being constructed with this
   /// [InstanceCreationExpression].
   ///
   /// See [CompileTimeErrorCode.INSTANTIATE_ENUM].
   void _checkForConstOrNewWithEnum(InstanceCreationExpression expression,
-      TypeName typeName, InterfaceType type) {
+      NamedType namedType, InterfaceType type) {
     if (type.element.isEnum) {
       errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.INSTANTIATE_ENUM, typeName);
+          CompileTimeErrorCode.INSTANTIATE_ENUM, namedType);
     }
   }
 
   /// Verify that the given [expression] is not a mixin instantiation.
   void _checkForConstOrNewWithMixin(InstanceCreationExpression expression,
-      TypeName typeName, InterfaceType type) {
+      NamedType namedType, InterfaceType type) {
     if (type.element.isMixin) {
       errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MIXIN_INSTANTIATE, typeName);
+          CompileTimeErrorCode.MIXIN_INSTANTIATE, namedType);
     }
   }
 
@@ -2075,7 +2064,7 @@
 
   /// Verify that if the given 'const' instance creation [expression] is being
   /// invoked on the resolved constructor. The [constructorName] is the
-  /// constructor name, always non-`null`. The [typeName] is the name of the
+  /// constructor name, always non-`null`. The [namedType] is the name of the
   /// type defining the constructor, always non-`null`.
   ///
   /// This method assumes that the instance creation was tested to be 'const'
@@ -2086,12 +2075,12 @@
   void _checkForConstWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
-      TypeName typeName) {
+      NamedType namedType) {
     // OK if resolved
     if (constructorName.staticElement != null) {
       return;
     }
-    DartType type = typeName.typeOrThrow;
+    DartType type = namedType.typeOrThrow;
     if (type is InterfaceType) {
       ClassElement element = type.element;
       if (element.isEnum) {
@@ -2099,7 +2088,7 @@
         return;
       }
     }
-    Identifier className = typeName.name;
+    Identifier className = namedType.name;
     // report as named or default constructor absence
     var name = constructorName.name;
     if (name != null) {
@@ -2208,7 +2197,7 @@
     }
 
     // Use an explicit string instead of [loopType] to remove the "<E>".
-    String loopTypeName = awaitKeyword != null ? "Stream" : "Iterable";
+    String loopNamedType = awaitKeyword != null ? "Stream" : "Iterable";
 
     // The object being iterated has to implement Iterable<T> for some T that
     // is assignable to the variable's type.
@@ -2227,7 +2216,7 @@
       errorReporter.reportErrorForNode(
         CompileTimeErrorCode.FOR_IN_OF_INVALID_TYPE,
         node.iterable,
-        [iterableType, loopTypeName],
+        [iterableType, loopNamedType],
       );
       return false;
     }
@@ -2251,7 +2240,7 @@
       errorReporter.reportErrorForNode(
         CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
         node.iterable,
-        [iterableType, loopTypeName, variableType],
+        [iterableType, loopNamedType, variableType],
       );
     }
 
@@ -2324,7 +2313,7 @@
   /// Verify that the given extends [clause] does not extend a deferred class.
   ///
   /// See [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS].
-  void _checkForExtendsDeferredClass(TypeName? superclass) {
+  void _checkForExtendsDeferredClass(NamedType? superclass) {
     if (superclass == null) {
       return;
     }
@@ -2336,7 +2325,7 @@
   /// 'num' or 'String'.
   ///
   /// See [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS].
-  bool _checkForExtendsDisallowedClass(TypeName? superclass) {
+  bool _checkForExtendsDisallowedClass(NamedType? superclass) {
     if (superclass == null) {
       return false;
     }
@@ -2344,7 +2333,7 @@
         superclass, CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS);
   }
 
-  /// Verify that the given [typeName] does not extend, implement or mixin
+  /// Verify that the given [namedType] does not extend, implement or mixin
   /// classes that are deferred.
   ///
   /// See [_checkForExtendsDeferredClass],
@@ -2355,18 +2344,18 @@
   /// [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS], and
   /// [CompileTimeErrorCode.MIXIN_DEFERRED_CLASS].
   bool _checkForExtendsOrImplementsDeferredClass(
-      TypeName typeName, ErrorCode errorCode) {
-    if (typeName.isSynthetic) {
+      NamedType namedType, ErrorCode errorCode) {
+    if (namedType.isSynthetic) {
       return false;
     }
-    if (typeName.isDeferred) {
-      errorReporter.reportErrorForNode(errorCode, typeName);
+    if (namedType.isDeferred) {
+      errorReporter.reportErrorForNode(errorCode, namedType);
       return true;
     }
     return false;
   }
 
-  /// Verify that the given [typeName] does not extend, implement or mixin
+  /// Verify that the given [namedType] does not extend, implement or mixin
   /// classes such as 'num' or 'String'.
   ///
   /// TODO(scheglov) Remove this method, when all inheritance / override
@@ -2374,8 +2363,8 @@
   /// inheritance is completely wrong, so that we don't need to check anything
   /// else.
   bool _checkForExtendsOrImplementsDisallowedClass(
-      TypeName typeName, ErrorCode errorCode) {
-    if (typeName.isSynthetic) {
+      NamedType namedType, ErrorCode errorCode) {
+    if (namedType.isSynthetic) {
       return false;
     }
     // The SDK implementation may implement disallowed types. For example,
@@ -2383,7 +2372,7 @@
     if (_currentLibrary.source.isInSystemLibrary) {
       return false;
     }
-    var type = typeName.type;
+    var type = namedType.type;
     return type is InterfaceType &&
         _typeProvider.isNonSubtypableClass(type.element);
   }
@@ -2396,7 +2385,7 @@
         name == 'hashCode' ||
         name == 'toString' ||
         name == 'runtimeType' ||
-        name == 'noSuchMethod') {
+        name == FunctionElement.NO_SUCH_METHOD_METHOD_NAME) {
       errorReporter.reportErrorForNode(
         CompileTimeErrorCode.EXTENSION_DECLARES_MEMBER_OF_OBJECT,
         node.name,
@@ -2526,9 +2515,7 @@
     DartType type = node.typeOrThrow;
     if (type is FunctionType && type.typeFormals.isNotEmpty) {
       errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND,
-          node,
-          [type]);
+          CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, node);
     }
   }
 
@@ -2542,7 +2529,7 @@
       return false;
     }
     bool foundError = false;
-    for (TypeName type in clause.interfaces) {
+    for (NamedType type in clause.interfaces2) {
       if (_checkForExtendsOrImplementsDisallowedClass(
           type, CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS)) {
         foundError = true;
@@ -2591,7 +2578,7 @@
   void _checkForImplicitDynamicType(TypeAnnotation? node) {
     if (_options.implicitDynamic ||
         node == null ||
-        (node is TypeName && node.typeArguments != null)) {
+        (node is NamedType && node.typeArguments != null)) {
       return;
     }
     DartType type = node.typeOrThrow;
@@ -3050,7 +3037,7 @@
   ///
   /// See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR].
   bool _checkForMixinClassDeclaresConstructor(
-      TypeName mixinName, ClassElement mixinElement) {
+      NamedType mixinName, ClassElement mixinElement) {
     for (ConstructorElement constructor in mixinElement.constructors) {
       if (!constructor.isSynthetic && !constructor.isFactory) {
         errorReporter.reportErrorForNode(
@@ -3070,7 +3057,7 @@
   ///
   /// See [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT].
   bool _checkForMixinInheritsNotFromObject(
-      TypeName mixinName, ClassElement mixinElement) {
+      NamedType mixinName, ClassElement mixinElement) {
     var mixinSupertype = mixinElement.supertype;
     if (mixinSupertype == null || mixinSupertype.isDartCoreObject) {
       var mixins = mixinElement.mixins;
@@ -3091,7 +3078,8 @@
   /// Check that superclass constrains for the mixin type of [mixinName] at
   /// the [mixinIndex] position in the mixins list are satisfied by the
   /// [_enclosingClass], or a previous mixin.
-  bool _checkForMixinSuperclassConstraints(int mixinIndex, TypeName mixinName) {
+  bool _checkForMixinSuperclassConstraints(
+      int mixinIndex, NamedType mixinName) {
     InterfaceType mixinType = mixinName.type as InterfaceType;
     for (var constraint in mixinType.superclassConstraints) {
       var superType = _enclosingClass!.supertype as InterfaceTypeImpl;
@@ -3125,7 +3113,7 @@
   /// Check that the superclass of the given [mixinElement] at the given
   /// [mixinIndex] in the list of mixins of [_enclosingClass] has concrete
   /// implementations of all the super-invoked members of the [mixinElement].
-  bool _checkForMixinSuperInvokedMembers(int mixinIndex, TypeName mixinName,
+  bool _checkForMixinSuperInvokedMembers(int mixinIndex, NamedType mixinName,
       ClassElement mixinElement, InterfaceType mixinType) {
     var mixinElementImpl = mixinElement as ClassElementImpl;
     if (mixinElementImpl.superInvokedNames.isEmpty) {
@@ -3177,7 +3165,7 @@
   /// library that defines a private member that conflicts with a private name
   /// from the same library but from a superclass or a different mixin.
   void _checkForMixinWithConflictingPrivateMember(
-      WithClause? withClause, TypeName? superclassName) {
+      WithClause? withClause, NamedType? superclassName) {
     if (withClause == null) {
       return;
     }
@@ -3192,18 +3180,18 @@
     /// (which is defined in the given [library]) and it conflicts with another
     /// definition of that name inherited from the superclass.
     bool isConflictingName(
-        String name, LibraryElement library, TypeName typeName) {
+        String name, LibraryElement library, NamedType namedType) {
       if (Identifier.isPrivateName(name)) {
         Map<String, String> names =
             mixedInNames.putIfAbsent(library, () => <String, String>{});
         if (names.containsKey(name)) {
           errorReporter.reportErrorForNode(
               CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION,
-              typeName,
-              [name, typeName.name.name, names[name]]);
+              namedType,
+              [name, namedType.name.name, names[name]]);
           return true;
         }
-        names[name] = typeName.name.name;
+        names[name] = namedType.name.name;
         var inheritedMember = _inheritanceManager.getMember2(
           declaredSupertype.element,
           Name(library.source.uri, name),
@@ -3212,9 +3200,9 @@
         if (inheritedMember != null) {
           errorReporter.reportErrorForNode(
               CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION,
-              typeName, [
+              namedType, [
             name,
-            typeName.name.name,
+            namedType.name.name,
             inheritedMember.enclosingElement.name
           ]);
           return true;
@@ -3223,7 +3211,7 @@
       return false;
     }
 
-    for (TypeName mixinType in withClause.mixinTypes) {
+    for (NamedType mixinType in withClause.mixinTypes2) {
       DartType type = mixinType.typeOrThrow;
       if (type is InterfaceType) {
         LibraryElement library = type.element.library;
@@ -3276,8 +3264,8 @@
   }
 
   /// Verify that the given instance creation [expression] invokes an existing
-  /// constructor. The [constructorName] is the constructor name. The [typeName]
-  /// is the name of the type defining the constructor.
+  /// constructor. The [constructorName] is the constructor name.
+  /// The [namedType] is the name of the type defining the constructor.
   ///
   /// This method assumes that the instance creation was tested to be 'new'
   /// before being called.
@@ -3286,12 +3274,12 @@
   void _checkForNewWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
-      TypeName typeName) {
+      NamedType namedType) {
     // OK if resolved
     if (constructorName.staticElement != null) {
       return;
     }
-    DartType type = typeName.typeOrThrow;
+    DartType type = namedType.typeOrThrow;
     if (type is InterfaceType) {
       ClassElement element = type.element;
       if (element.isEnum || element.isMixin) {
@@ -3300,7 +3288,7 @@
       }
     }
     // prepare class name
-    Identifier className = typeName.name;
+    Identifier className = namedType.name;
     // report as named or default constructor absence
     var name = constructorName.name;
     if (name != null) {
@@ -3365,7 +3353,7 @@
     }
   }
 
-  bool _checkForNoGenerativeConstructorsInSuperclass(TypeName? superclass) {
+  bool _checkForNoGenerativeConstructorsInSuperclass(NamedType? superclass) {
     var superType = _enclosingClass!.supertype;
     if (superType == null) {
       return false;
@@ -3445,16 +3433,16 @@
     }
   }
 
-  /// Verify the [typeName], used as the return type of a setter, is valid
+  /// Verify the [namedType], used as the return type of a setter, is valid
   /// (either `null` or the type 'void').
   ///
   /// See [StaticWarningCode.NON_VOID_RETURN_FOR_SETTER].
-  void _checkForNonVoidReturnTypeForSetter(TypeAnnotation? typeName) {
-    if (typeName != null) {
-      DartType type = typeName.typeOrThrow;
+  void _checkForNonVoidReturnTypeForSetter(TypeAnnotation? namedType) {
+    if (namedType != null) {
+      DartType type = namedType.typeOrThrow;
       if (!type.isVoid) {
         errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, typeName);
+            CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, namedType);
       }
     }
   }
@@ -3552,17 +3540,17 @@
       return false;
     }
     bool problemReported = false;
-    for (TypeName typeName in onClause.superclassConstraints) {
-      DartType type = typeName.typeOrThrow;
+    for (NamedType namedType in onClause.superclassConstraints2) {
+      DartType type = namedType.typeOrThrow;
       if (type is InterfaceType) {
         if (_checkForExtendsOrImplementsDisallowedClass(
-            typeName,
+            namedType,
             CompileTimeErrorCode
                 .MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS)) {
           problemReported = true;
         } else {
           if (_checkForExtendsOrImplementsDeferredClass(
-              typeName,
+              namedType,
               CompileTimeErrorCode
                   .MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS)) {
             problemReported = true;
@@ -3741,8 +3729,8 @@
           redirectedClass.isAbstract &&
           redirectedElement != null &&
           !redirectedElement.isFactory) {
-        String enclosingTypeName = _enclosingClass!.displayName;
-        String constructorStrName = enclosingTypeName;
+        String enclosingNamedType = _enclosingClass!.displayName;
+        String constructorStrName = enclosingNamedType;
         if (declaration.name != null) {
           constructorStrName += ".${declaration.name!.name}";
         }
@@ -3765,15 +3753,15 @@
           RedirectingConstructorInvocation invocation = initializer;
           var redirectingElement = invocation.staticElement;
           if (redirectingElement == null) {
-            String enclosingTypeName = _enclosingClass!.displayName;
-            String constructorStrName = enclosingTypeName;
+            String enclosingNamedType = _enclosingClass!.displayName;
+            String constructorStrName = enclosingNamedType;
             if (invocation.constructorName != null) {
               constructorStrName += ".${invocation.constructorName!.name}";
             }
             errorReporter.reportErrorForNode(
                 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR,
                 invocation,
-                [constructorStrName, enclosingTypeName]);
+                [constructorStrName, enclosingNamedType]);
           } else {
             if (redirectingElement.isFactory) {
               errorReporter.reportErrorForNode(
@@ -3848,20 +3836,20 @@
     }
   }
 
-  void _checkForRepeatedType(List<TypeName>? typeNames, ErrorCode errorCode) {
-    if (typeNames == null) {
+  void _checkForRepeatedType(List<NamedType>? namedTypes, ErrorCode errorCode) {
+    if (namedTypes == null) {
       return;
     }
 
-    int count = typeNames.length;
+    int count = namedTypes.length;
     List<bool> detectedRepeatOnIndex = List<bool>.filled(count, false);
     for (int i = 0; i < count; i++) {
       if (!detectedRepeatOnIndex[i]) {
-        var type = typeNames[i].type;
+        var type = namedTypes[i].type;
         if (type is InterfaceType) {
           var element = type.element;
           for (int j = i + 1; j < count; j++) {
-            var otherNode = typeNames[j];
+            var otherNode = namedTypes[j];
             var otherType = otherNode.type;
             if (otherType is InterfaceType && otherType.element == element) {
               detectedRepeatOnIndex[j] = true;
@@ -4039,7 +4027,7 @@
   ///
   /// See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
   void _checkForTypeAnnotationDeferredClass(TypeAnnotation? type) {
-    if (type is TypeName && type.isDeferred) {
+    if (type is NamedType && type.isDeferred) {
       errorReporter.reportErrorForNode(
           CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS,
           type,
@@ -4064,7 +4052,7 @@
         TypeParameter? current = parameter;
         for (var step = 0; current != null; step++) {
           var bound = current.bound;
-          if (bound is TypeName) {
+          if (bound is NamedType) {
             current = elementToNode[bound.name.staticElement];
           } else {
             current = null;
@@ -4617,7 +4605,7 @@
       return;
     }
 
-    for (var interfaceNode in implementsClause.interfaces) {
+    for (var interfaceNode in implementsClause.interfaces2) {
       var type = interfaceNode.type;
       if (type is InterfaceType && type.element == superElement) {
         errorReporter.reportErrorForNode(
@@ -4640,16 +4628,16 @@
     var interfacesMerger = InterfacesMerger(typeSystem);
     interfacesMerger.addWithSupertypes(supertype);
 
-    for (var typeName in withClause.mixinTypes) {
-      var mixinType = typeName.type;
+    for (var namedType in withClause.mixinTypes2) {
+      var mixinType = namedType.type;
       if (mixinType is InterfaceType) {
         var mixinElement = mixinType.element;
-        if (typeName.typeArguments == null) {
+        if (namedType.typeArguments == null) {
           var mixinSupertypeConstraints = typeSystem
               .gatherMixinSupertypeConstraintsForInference(mixinElement);
           if (mixinSupertypeConstraints.isNotEmpty) {
             var matchingInterfaceTypes = _findInterfaceTypesForConstraints(
-              typeName,
+              namedType,
               mixinSupertypeConstraints,
               interfacesMerger.typeList,
             );
@@ -4668,8 +4656,8 @@
                 errorReporter.reportErrorForToken(
                     CompileTimeErrorCode
                         .MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
-                    typeName.name.beginToken,
-                    [typeName]);
+                    namedType.name.beginToken,
+                    [namedType]);
               }
             }
           }
@@ -4689,11 +4677,11 @@
         !_checkForImplementsClauseErrorCodes(implementsClause)) {
 //      _checkForImplicitDynamicType(superclass);
       _checkForRepeatedType(
-        onClause?.superclassConstraints,
+        onClause?.superclassConstraints2,
         CompileTimeErrorCode.ON_REPEATED,
       );
       _checkForRepeatedType(
-        implementsClause?.interfaces,
+        implementsClause?.interfaces2,
         CompileTimeErrorCode.IMPLEMENTS_REPEATED,
       );
       _checkForConflictingGenerics(node);
@@ -4714,7 +4702,7 @@
       return;
     }
 
-    for (var mixinNode in withClause.mixinTypes) {
+    for (var mixinNode in withClause.mixinTypes2) {
       var type = mixinNode.type;
       if (type is InterfaceType && type.element == superElement) {
         errorReporter.reportErrorForNode(
@@ -4814,7 +4802,7 @@
     }
   }
 
-  InterfaceType? _findInterfaceTypeForMixin(TypeName mixin,
+  InterfaceType? _findInterfaceTypeForMixin(NamedType mixin,
       InterfaceType supertypeConstraint, List<InterfaceType> interfaceTypes) {
     var element = supertypeConstraint.element;
     InterfaceType? foundInterfaceType;
@@ -4842,7 +4830,7 @@
   }
 
   List<InterfaceType>? _findInterfaceTypesForConstraints(
-      TypeName mixin,
+      NamedType mixin,
       List<InterfaceType> supertypeConstraints,
       List<InterfaceType> interfaceTypes) {
     var result = <InterfaceType>[];
@@ -5001,23 +4989,6 @@
     return null;
   }
 
-  /// Report [macroExecutionErrors] at the corresponding [annotations].
-  void _reportMacroExecutionErrors(
-    List<Annotation> annotations,
-    List<macro.MacroExecutionError> macroExecutionErrors,
-  ) {
-    for (var macroExecutionError in macroExecutionErrors) {
-      errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.MACRO_EXECUTION_ERROR,
-        annotations[macroExecutionError.annotationIndex],
-        [
-          macroExecutionError.macroName,
-          macroExecutionError.message,
-        ],
-      );
-    }
-  }
-
   void _withEnclosingExecutable(
     ExecutableElement element,
     void Function() operation,
@@ -5128,7 +5099,7 @@
   _UninstantiatedBoundChecker(this._errorReporter);
 
   @override
-  void visitTypeName(TypeName node) {
+  void visitNamedType(NamedType node) {
     var typeArgs = node.typeArguments;
     if (typeArgs != null) {
       typeArgs.accept(this);
diff --git a/pkg/analyzer/lib/src/generated/ffi_verifier.dart b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
index 576627a..76f07fd 100644
--- a/pkg/analyzer/lib/src/generated/ffi_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
@@ -69,7 +69,7 @@
     // Only the Allocator, Opaque and Struct class may be extended.
     var extendsClause = node.extendsClause;
     if (extendsClause != null) {
-      final TypeName superclass = extendsClause.superclass;
+      final NamedType superclass = extendsClause.superclass2;
       final ffiClass = superclass.ffiClass;
       if (ffiClass != null) {
         final className = ffiClass.name;
@@ -99,7 +99,7 @@
     }
 
     // No classes from the FFI may be explicitly implemented.
-    void checkSupertype(TypeName typename, FfiCode subtypeOfFfiCode,
+    void checkSupertype(NamedType typename, FfiCode subtypeOfFfiCode,
         FfiCode subtypeOfStructCode) {
       final superName = typename.name.staticElement?.name;
       if (superName == _allocatorClassName) {
@@ -116,14 +116,14 @@
 
     var implementsClause = node.implementsClause;
     if (implementsClause != null) {
-      for (TypeName type in implementsClause.interfaces) {
+      for (NamedType type in implementsClause.interfaces2) {
         checkSupertype(type, FfiCode.SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS,
             FfiCode.SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS);
       }
     }
     var withClause = node.withClause;
     if (withClause != null) {
-      for (TypeName type in withClause.mixinTypes) {
+      for (NamedType type in withClause.mixinTypes2) {
         checkSupertype(type, FfiCode.SUBTYPE_OF_FFI_CLASS_IN_WITH,
             FfiCode.SUBTYPE_OF_STRUCT_CLASS_IN_WITH);
       }
@@ -701,8 +701,15 @@
       } else if (declaredType.isArray) {
         final typeArg = (declaredType as InterfaceType).typeArguments.single;
         if (!_isSized(typeArg)) {
+          AstNode errorNode = fieldType;
+          if (fieldType is NamedType) {
+            var typeArguments = fieldType.typeArguments?.arguments;
+            if (typeArguments != null && typeArguments.isNotEmpty) {
+              errorNode = typeArguments[0];
+            }
+          }
           _errorReporter.reportErrorForNode(FfiCode.NON_SIZED_TYPE_ARGUMENT,
-              fieldType, [_arrayClassName, typeArg.toString()]);
+              errorNode, [_arrayClassName, typeArg]);
         }
         final arrayDimensions = declaredType.arrayDimensions;
         _validateSizeOfAnnotation(fieldType, annotations, arrayDimensions);
@@ -873,8 +880,13 @@
     final annotation = ffiPackedAnnotations.first;
     final value = annotation.elementAnnotation?.packedMemberAlignment;
     if (![1, 2, 4, 8, 16].contains(value)) {
+      AstNode errorNode = annotation;
+      var arguments = annotation.arguments?.arguments;
+      if (arguments != null && arguments.isNotEmpty) {
+        errorNode = arguments[0];
+      }
       _errorReporter.reportErrorForNode(
-          FfiCode.PACKED_ANNOTATION_ALIGNMENT, annotation);
+          FfiCode.PACKED_ANNOTATION_ALIGNMENT, errorNode);
     }
   }
 
@@ -975,11 +987,28 @@
       _errorReporter.reportErrorForNode(
           FfiCode.SIZE_ANNOTATION_DIMENSIONS, annotation);
     }
-    // Check dimensions is positive
-    for (int dimension in dimensions) {
-      if (dimension <= 0) {
+
+    // Check dimensions are positive
+    List<AstNode>? getArgumentNodes() {
+      var arguments = annotation.arguments?.arguments;
+      if (arguments != null && arguments.length == 1) {
+        var firstArgument = arguments[0];
+        if (firstArgument is ListLiteral) {
+          return firstArgument.elements;
+        }
+      }
+      return arguments;
+    }
+
+    for (int i = 0; i < dimensions.length; i++) {
+      if (dimensions[i] <= 0) {
+        AstNode errorNode = annotation;
+        var argumentNodes = getArgumentNodes();
+        if (argumentNodes != null && argumentNodes.isNotEmpty) {
+          errorNode = argumentNodes[i];
+        }
         _errorReporter.reportErrorForNode(
-            FfiCode.NON_POSITIVE_ARRAY_DIMENSION, annotation);
+            FfiCode.NON_POSITIVE_ARRAY_DIMENSION, errorNode);
       }
     }
   }
@@ -1325,7 +1354,7 @@
   }
 }
 
-extension on TypeName {
+extension on NamedType {
   /// If this is a name of class from `dart:ffi`, return it.
   ClassElement? get ffiClass {
     return name.staticElement.ffiClass;
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index ff6050c..d1b9366 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -13,101 +13,11 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/fasta/ast_builder.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 export 'package:analyzer/src/dart/error/syntactic_errors.dart';
 
-/// A simple data-holder for a method that needs to return multiple values.
-class CommentAndMetadata {
-  /// The documentation comment that was parsed, or `null` if none was given.
-  final Comment? comment;
-
-  /// The metadata that was parsed, or `null` if none was given.
-  final List<Annotation>? metadata;
-
-  /// Initialize a newly created holder with the given [comment] and [metadata].
-  CommentAndMetadata(this.comment, this.metadata);
-
-  /// Return `true` if some metadata was parsed.
-  bool get hasMetadata => metadata != null && metadata!.isNotEmpty;
-}
-
-/// A simple data-holder for a method that needs to return multiple values.
-class FinalConstVarOrType {
-  /// The 'final', 'const' or 'var' keyword, or `null` if none was given.
-  final Token keyword;
-
-  /// The type, or `null` if no type was specified.
-  final TypeAnnotation type;
-
-  /// Initialize a newly created holder with the given [keyword] and [type].
-  FinalConstVarOrType(this.keyword, this.type);
-}
-
-/// A simple data-holder for a method that needs to return multiple values.
-class Modifiers {
-  /// The token representing the keyword 'abstract', or `null` if the keyword
-  /// was not found.
-  Token? abstractKeyword;
-
-  /// The token representing the keyword 'const', or `null` if the keyword was
-  /// not found.
-  Token? constKeyword;
-
-  /// The token representing the keyword 'covariant', or `null` if the keyword
-  /// was not found.
-  Token? covariantKeyword;
-
-  /// The token representing the keyword 'external', or `null` if the keyword
-  /// was not found.
-  Token? externalKeyword;
-
-  /// The token representing the keyword 'factory', or `null` if the keyword was
-  /// not found.
-  Token? factoryKeyword;
-
-  /// The token representing the keyword 'final', or `null` if the keyword was
-  /// not found.
-  Token? finalKeyword;
-
-  /// The token representing the keyword 'static', or `null` if the keyword was
-  /// not found.
-  Token? staticKeyword;
-
-  /// The token representing the keyword 'var', or `null` if the keyword was not
-  /// found.
-  Token? varKeyword;
-
-  @override
-  String toString() {
-    StringBuffer buffer = StringBuffer();
-    bool needsSpace = _appendKeyword(buffer, false, abstractKeyword);
-    needsSpace = _appendKeyword(buffer, needsSpace, constKeyword);
-    needsSpace = _appendKeyword(buffer, needsSpace, externalKeyword);
-    needsSpace = _appendKeyword(buffer, needsSpace, factoryKeyword);
-    needsSpace = _appendKeyword(buffer, needsSpace, finalKeyword);
-    needsSpace = _appendKeyword(buffer, needsSpace, staticKeyword);
-    _appendKeyword(buffer, needsSpace, varKeyword);
-    return buffer.toString();
-  }
-
-  /// If the given [keyword] is not `null`, append it to the given [buffer],
-  /// prefixing it with a space if [needsSpace] is `true`. Return `true` if
-  /// subsequent keywords need to be prefixed with a space.
-  bool _appendKeyword(StringBuffer buffer, bool needsSpace, Token? keyword) {
-    if (keyword != null) {
-      if (needsSpace) {
-        buffer.writeCharCode(0x20);
-      }
-      buffer.write(keyword.lexeme);
-      return true;
-    }
-    return needsSpace;
-  }
-}
-
 /// A parser used to parse tokens into an AST structure.
 class Parser {
   late Token currentToken;
@@ -338,13 +248,13 @@
     return astBuilder.pop() as TypeArgumentList;
   }
 
-  TypeName parseTypeName(bool inExpression) {
+  NamedType parseTypeName(bool inExpression) {
     Token previous = fastaParser.syntheticPreviousToken(currentToken);
     currentToken = fasta
         .computeType(previous, true, !inExpression)
         .parseType(previous, fastaParser)
         .next!;
-    return astBuilder.pop() as TypeName;
+    return astBuilder.pop() as NamedType;
   }
 
   TypeParameter parseTypeParameter() {
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 3b579a5..919a698 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -291,6 +291,11 @@
   late final SimpleIdentifierResolver _simpleIdentifierResolver =
       SimpleIdentifierResolver(this, flowAnalysis);
 
+  late final PropertyElementResolver _propertyElementResolver =
+      PropertyElementResolver(this);
+
+  late final AnnotationResolver _annotationResolver = AnnotationResolver(this);
+
   /// Initialize a newly created visitor to resolve the nodes in an AST node.
   ///
   /// The [definingLibrary] is the element for the library containing the node
@@ -575,8 +580,12 @@
                   computeMemberId(whyNotPromotedVisitor.propertyReference!);
               args.add('target: $id');
             }
-            if (whyNotPromotedVisitor.propertyType != null) {
-              args.add('type: ${whyNotPromotedVisitor.propertyType}');
+            var propertyType = whyNotPromotedVisitor.propertyType;
+            if (propertyType != null) {
+              var propertyTypeStr = propertyType.getDisplayString(
+                withNullability: true,
+              );
+              args.add('type: $propertyTypeStr');
             }
             if (args.isNotEmpty) {
               nonPromotionReasonText += '(${args.join(', ')})';
@@ -696,8 +705,7 @@
       node.target?.accept(this);
       startNullAwareIndexExpression(node);
 
-      var resolver = PropertyElementResolver(this);
-      var result = resolver.resolveIndexExpression(
+      var result = _propertyElementResolver.resolveIndexExpression(
         node: node,
         hasRead: hasRead,
         hasWrite: true,
@@ -717,8 +725,7 @@
     } else if (node is PrefixedIdentifier) {
       node.prefix.accept(this);
 
-      var resolver = PropertyElementResolver(this);
-      return resolver.resolvePrefixedIdentifier(
+      return _propertyElementResolver.resolvePrefixedIdentifier(
         node: node,
         hasRead: hasRead,
         hasWrite: true,
@@ -727,16 +734,14 @@
       node.target?.accept(this);
       startNullAwarePropertyAccess(node);
 
-      var resolver = PropertyElementResolver(this);
-      return resolver.resolvePropertyAccess(
+      return _propertyElementResolver.resolvePropertyAccess(
         node: node,
         hasRead: hasRead,
         hasWrite: true,
       );
-    } else if (node is SimpleIdentifier) {
-      var resolver = PropertyElementResolver(this);
-      var result = resolver.resolveSimpleIdentifier(
-        node: node as SimpleIdentifierImpl,
+    } else if (node is SimpleIdentifierImpl) {
+      var result = _propertyElementResolver.resolveSimpleIdentifier(
+        node: node,
         hasRead: hasRead,
         hasWrite: true,
       );
@@ -892,7 +897,7 @@
   @override
   void visitAnnotation(covariant AnnotationImpl node) {
     var whyNotPromotedList = <Map<DartType, NonPromotionReason> Function()>[];
-    AnnotationResolver(this).resolve(node, whyNotPromotedList);
+    _annotationResolver.resolve(node, whyNotPromotedList);
     var arguments = node.arguments;
     if (arguments != null) {
       checkForArgumentTypesNotAssignableInList(arguments, whyNotPromotedList);
@@ -1237,13 +1242,8 @@
 
   @override
   void visitConstructorName(ConstructorName node) {
-    //
-    // We do not visit either the type name, because it won't be visited anyway,
-    // or the name, because it needs to be visited in the context of the
-    // constructor name.
-    //
+    node.type2.accept(this);
     node.accept(elementResolver);
-    node.accept(typeAnalyzer);
   }
 
   @override
@@ -1428,15 +1428,17 @@
       _enclosingFunction = outerFunction;
     }
 
-    // TODO(scheglov) encapsulate
-    var bodyContext = BodyInferenceContext.of(
-      node.functionExpression.body,
-    );
-    checkForBodyMayCompleteNormally(
-      returnType: bodyContext?.contextType,
-      body: node.functionExpression.body,
-      errorNode: node.name,
-    );
+    if (!node.isSetter) {
+      // TODO(scheglov) encapsulate
+      var bodyContext = BodyInferenceContext.of(
+        node.functionExpression.body,
+      );
+      checkForBodyMayCompleteNormally(
+        returnType: bodyContext?.contextType,
+        body: node.functionExpression.body,
+        errorNode: node.name,
+      );
+    }
     flowAnalysis.executableDeclaration_exit(
       node.functionExpression.body,
       isLocal,
@@ -1521,11 +1523,13 @@
     CollectionElement thenElement = node.thenElement;
     flowAnalysis.flow?.ifStatement_thenBegin(condition, node);
     thenElement.accept(this);
+    nullSafetyDeadCodeVerifier.flowEnd(thenElement);
 
     var elseElement = node.elseElement;
     if (elseElement != null) {
       flowAnalysis.flow?.ifStatement_elseBegin();
       elseElement.accept(this);
+      nullSafetyDeadCodeVerifier.flowEnd(elseElement);
     }
 
     flowAnalysis.flow?.ifStatement_end(elseElement != null);
@@ -1572,8 +1576,7 @@
     node.target?.accept(this);
     startNullAwareIndexExpression(node);
 
-    var resolver = PropertyElementResolver(this);
-    var result = resolver.resolveIndexExpression(
+    var result = _propertyElementResolver.resolveIndexExpression(
       node: node,
       hasRead: true,
       hasWrite: false,
@@ -1655,13 +1658,15 @@
       _thisType = null;
     }
 
-    // TODO(scheglov) encapsulate
-    var bodyContext = BodyInferenceContext.of(node.body);
-    checkForBodyMayCompleteNormally(
-      returnType: bodyContext?.contextType,
-      body: node.body,
-      errorNode: node.name,
-    );
+    if (!node.isSetter) {
+      // TODO(scheglov) encapsulate
+      var bodyContext = BodyInferenceContext.of(node.body);
+      checkForBodyMayCompleteNormally(
+        returnType: bodyContext?.contextType,
+        body: node.body,
+        errorNode: node.name,
+      );
+    }
     flowAnalysis.executableDeclaration_exit(node.body, false);
     flowAnalysis.topLevelDeclaration_exit();
     nullSafetyDeadCodeVerifier.flowEnd(node);
@@ -1734,6 +1739,15 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    // All TypeName(s) are already resolved, so we don't resolve it here.
+    // But there might be type arguments with Expression(s), such as default
+    // values for formal parameters of GenericFunctionType(s). These are
+    // invalid, but if they exist, they should be resolved.
+    node.typeArguments?.accept(this);
+  }
+
+  @override
   void visitNode(AstNode node) {
     checkUnreachableNode(node);
     node.visitChildren(this);
@@ -1774,8 +1788,7 @@
     node.target?.accept(this);
     startNullAwarePropertyAccess(node);
 
-    var resolver = PropertyElementResolver(this);
-    var result = resolver.resolvePropertyAccess(
+    var result = _propertyElementResolver.resolvePropertyAccess(
       node: node,
       hasRead: true,
       hasWrite: false,
@@ -2001,9 +2014,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {}
-
-  @override
   void visitVariableDeclaration(VariableDeclaration node) {
     _variableDeclarationResolver.resolve(node as VariableDeclarationImpl);
 
@@ -2444,7 +2454,7 @@
     node.documentationComment?.accept(this);
     node.name.accept(this);
     node.typeParameters?.accept(this);
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
     node.withClause.accept(this);
     node.implementsClause?.accept(this);
   }
@@ -2924,6 +2934,14 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    // All TypeName(s) are already resolved, so we don't resolve it here.
+    // But there might be type arguments with Expression(s), such as
+    // annotations on formal parameters of GenericFunctionType(s).
+    node.typeArguments?.accept(this);
+  }
+
+  @override
   void visitPrefixedIdentifier(PrefixedIdentifier node) {
     // Do not visit the identifier after the `.`, since it is not meant to be
     // looked up in the current scope.
@@ -3044,9 +3062,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {}
-
-  @override
   void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
 
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 4c44ba5..bcd3487 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -180,7 +180,7 @@
   void visitInstanceCreationExpression(
       covariant InstanceCreationExpressionImpl node) {
     _inferInstanceCreationExpression(node);
-    recordStaticType(node, node.constructorName.type.typeOrThrow);
+    recordStaticType(node, node.constructorName.type2.typeOrThrow);
   }
 
   /// <blockquote>
@@ -365,7 +365,7 @@
       return;
     }
 
-    var typeName = constructorName.type;
+    var typeName = constructorName.type2;
     var typeArguments = typeName.typeArguments;
 
     var constructorType = elementToInfer.asType;
diff --git a/pkg/analyzer/lib/src/generated/super_context.dart b/pkg/analyzer/lib/src/generated/super_context.dart
index 461d250..8902ebb 100644
--- a/pkg/analyzer/lib/src/generated/super_context.dart
+++ b/pkg/analyzer/lib/src/generated/super_context.dart
@@ -39,6 +39,10 @@
             : SuperContext.static;
       } else if (node is ConstructorFieldInitializer) {
         return SuperContext.static;
+      } else if (node is FieldDeclaration) {
+        return node.staticKeyword == null && node.fields.lateKeyword != null
+            ? SuperContext.valid
+            : SuperContext.static;
       } else if (node is MethodDeclaration) {
         if (node.isStatic) {
           return SuperContext.static;
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 71aab4d..6077d91 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -261,7 +261,7 @@
           String name,
           TypeParameterList? typeParameters,
           Keyword? abstractKeyword,
-          TypeName superclass,
+          NamedType superclass,
           WithClause withClause,
           ImplementsClause? implementsClause) =>
       astFactory.classTypeAlias(
@@ -402,7 +402,7 @@
           TokenFactory.tokenFromType(TokenType.EQ),
           expression);
 
-  static ConstructorNameImpl constructorName(TypeName type, String? name) =>
+  static ConstructorNameImpl constructorName(NamedType type, String? name) =>
       astFactory.constructorName(
           type,
           name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
@@ -511,7 +511,7 @@
       astFactory.expressionStatement(
           expression, TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
-  static ExtendsClauseImpl extendsClause(TypeName type) => astFactory
+  static ExtendsClauseImpl extendsClause(NamedType type) => astFactory
       .extendsClause(TokenFactory.tokenFromKeyword(Keyword.EXTENDS), type);
 
   static ExtensionDeclarationImpl extensionDeclaration(
@@ -519,6 +519,8 @@
           required bool isExtensionTypeDeclaration,
           TypeParameterList? typeParameters,
           required TypeAnnotation extendedType,
+          ShowClause? showClause,
+          HideClause? hideClause,
           List<ClassMember> members = const []}) =>
       astFactory.extensionDeclaration(
           comment: null,
@@ -531,6 +533,8 @@
           typeParameters: typeParameters,
           onKeyword: TokenFactory.tokenFromKeyword(Keyword.ON),
           extendedType: extendedType,
+          showClause: showClause,
+          hideClause: hideClause,
           leftBracket: TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
           members: members,
           rightBracket:
@@ -720,6 +724,11 @@
           functionType,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
+  static HideClauseImpl hideClause(List<ShowHideClauseElement> elements) =>
+      astFactory.hideClause(
+          hideKeyword: TokenFactory.tokenFromString("hide"),
+          elements: elements);
+
   static HideCombinatorImpl hideCombinator(
           List<SimpleIdentifier> identifiers) =>
       astFactory.hideCombinator(
@@ -786,7 +795,7 @@
               : TokenFactory.tokenFromKeyword(Keyword.ELSE),
           elseStatement);
 
-  static ImplementsClauseImpl implementsClause(List<TypeName> types) =>
+  static ImplementsClauseImpl implementsClause(List<NamedType> types) =>
       astFactory.implementsClause(
           TokenFactory.tokenFromKeyword(Keyword.IMPLEMENTS), types);
 
@@ -854,12 +863,12 @@
           argumentList(arguments));
 
   static InstanceCreationExpressionImpl instanceCreationExpression2(
-          Keyword? keyword, TypeName type,
+          Keyword? keyword, NamedType type,
           [List<Expression> arguments = const []]) =>
       instanceCreationExpression3(keyword, type, null, arguments);
 
   static InstanceCreationExpressionImpl instanceCreationExpression3(
-          Keyword? keyword, TypeName type, String? identifier,
+          Keyword? keyword, NamedType type, String? identifier,
           [List<Expression> arguments = const []]) =>
       instanceCreationExpression(
           keyword,
@@ -1205,6 +1214,11 @@
         rightBracket: TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET),
       );
 
+  static ShowClauseImpl showClause(List<ShowHideClauseElement> elements) =>
+      astFactory.showClause(
+          showKeyword: TokenFactory.tokenFromString("show"),
+          elements: elements);
+
   static ShowCombinatorImpl showCombinator(
           List<SimpleIdentifier> identifiers) =>
       astFactory.showCombinator(
@@ -1214,6 +1228,24 @@
       astFactory.showCombinator(
           TokenFactory.tokenFromString("show"), identifierList(identifiers));
 
+  static ShowHideElementImpl showHideElement(String name) =>
+      astFactory.showHideElement(modifier: null, name: identifier3(name));
+
+  static ShowHideElementImpl showHideElementGetter(String name) =>
+      astFactory.showHideElement(
+          modifier: TokenFactory.tokenFromString("get"),
+          name: identifier3(name));
+
+  static ShowHideElementImpl showHideElementOperator(String name) =>
+      astFactory.showHideElement(
+          modifier: TokenFactory.tokenFromString("operator"),
+          name: identifier3(name));
+
+  static ShowHideElementImpl showHideElementSetter(String name) =>
+      astFactory.showHideElement(
+          modifier: TokenFactory.tokenFromString("set"),
+          name: identifier3(name));
+
   static SimpleFormalParameterImpl simpleFormalParameter(
           Keyword keyword, String parameterName) =>
       simpleFormalParameter2(keyword, null, parameterName);
@@ -1412,13 +1444,19 @@
 
   static TypeNameImpl typeName3(Identifier name,
           [List<TypeAnnotation>? arguments]) =>
-      astFactory.typeName(name, typeArgumentList(arguments));
+      astFactory.namedType(
+        name: name,
+        typeArguments: typeArgumentList(arguments),
+      );
 
   static TypeNameImpl typeName4(String name,
           [List<TypeAnnotation>? arguments, bool question = false]) =>
-      astFactory.typeName(identifier3(name), typeArgumentList(arguments),
-          question:
-              question ? TokenFactory.tokenFromType(TokenType.QUESTION) : null);
+      astFactory.namedType(
+        name: identifier3(name),
+        typeArguments: typeArgumentList(arguments),
+        question:
+            question ? TokenFactory.tokenFromType(TokenType.QUESTION) : null,
+      );
 
   static TypeParameterImpl typeParameter(String name) =>
       astFactory.typeParameter(null, null, identifier3(name), null, null);
@@ -1499,7 +1537,7 @@
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           body);
 
-  static WithClauseImpl withClause(List<TypeName> types) =>
+  static WithClauseImpl withClause(List<NamedType> types) =>
       astFactory.withClause(TokenFactory.tokenFromKeyword(Keyword.WITH), types);
 
   static YieldStatementImpl yieldEachStatement(Expression expression) =>
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index b53f44c..a33890a 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -8,7 +8,6 @@
 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/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -203,8 +202,8 @@
     return spec;
   }
 
-  static LibraryElementImpl library(AnalysisContext context, String libraryName,
-      {bool isNonNullableByDefault = true}) {
+  static LibraryElementImpl library(
+      AnalysisContext context, String libraryName) {
     String fileName = "/$libraryName.dart";
     CompilationUnitElementImpl unit = compilationUnit(fileName);
     LibraryElementImpl library = LibraryElementImpl(
@@ -213,10 +212,7 @@
       libraryName,
       0,
       libraryName.length,
-      FeatureSet.fromEnableFlags2(
-        sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
-        flags: isNonNullableByDefault ? [EnableString.non_nullable] : [],
-      ),
+      FeatureSet.latestLanguageVersion(),
     );
     library.definingCompilationUnit = unit;
     return library;
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index bfd1e08..d9e6742 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -42,58 +42,6 @@
 /// null.
 String? toUpperCase(Object? value) => value?.toString().toUpperCase();
 
-/// Jenkins hash function, optimized for small integers.
-///
-/// Static methods borrowed from sdk/lib/math/jenkins_smi_hash.dart.  Non-static
-/// methods are an enhancement for the "front_end" package.
-///
-/// Where performance is critical, use [hash2], [hash3], or [hash4], or the
-/// pattern `finish(combine(combine(...combine(0, a), b)..., z))`, where a..z
-/// are hash codes to be combined.
-///
-/// For ease of use, you may also use this pattern:
-/// `(new JenkinsSmiHash()..add(a)..add(b)....add(z)).hashCode`, where a..z are
-/// the sub-objects whose hashes should be combined.  This pattern performs the
-/// same operations as the performance critical variant, but allocates an extra
-/// object.
-class JenkinsSmiHash {
-  int _hash = 0;
-
-  /// Finalizes the hash and return the resulting hashcode.
-  @override
-  int get hashCode => finish(_hash);
-
-  /// Accumulates the object [o] into the hash.
-  void add(Object o) {
-    _hash = combine(_hash, o.hashCode);
-  }
-
-  /// Accumulates the hash code [value] into the running hash [hash].
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  /// Finalizes a running hash produced by [combine].
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  /// Combines together two hash codes.
-  static int hash2(int a, int b) => finish(combine(combine(0, a), b));
-
-  /// Combines together three hash codes.
-  static int hash3(int a, int b, int c) =>
-      finish(combine(combine(combine(0, a), b), c));
-
-  /// Combines together four hash codes.
-  static int hash4(int a, int b, int c, int d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
-
 /// A simple limited queue.
 class LimitedQueue<E> extends ListQueue<E> {
   final int limit;
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
index e0c34fd..f6df998 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
@@ -33,6 +33,10 @@
   /// field.
   bool? _checkConstantUpdate2018;
 
+  /// A cached flag indicating whether references to the triple-shift features
+  /// need to be checked. Use [checkTripleShift] to access this field.
+  bool? _checkTripleShift;
+
   /// A cached flag indicating whether uses of extension method features need to
   /// be checked. Use [checkExtensionMethods] to access this field.
   bool? _checkExtensionMethods;
@@ -63,6 +67,10 @@
   SdkConstraintVerifier(this._errorReporter, this._containingLibrary,
       this._typeProvider, this._versionConstraint);
 
+  /// Return a range covering every version up to, but not including, 2.14.0.
+  VersionRange get before_2_14_0 =>
+      VersionRange(max: Version.parse('2.14.0'), includeMax: false);
+
   /// Return a range covering every version up to, but not including, 2.1.0.
   VersionRange get before_2_1_0 =>
       VersionRange(max: Version.parse('2.1.0'), includeMax: false);
@@ -105,6 +113,11 @@
   bool get checkSetLiterals =>
       _checkSetLiterals ??= !before_2_2_0.intersect(_versionConstraint).isEmpty;
 
+  /// Return `true` if references to the constant-update-2018 features need to
+  /// be checked.
+  bool get checkTripleShift => _checkTripleShift ??=
+      !before_2_14_0.intersect(_versionConstraint).isEmpty;
+
   /// Return `true` if references to the ui-as-code features (control flow and
   /// spread collections) need to be checked.
   bool get checkUiAsCode =>
@@ -121,35 +134,37 @@
 
   @override
   void visitBinaryExpression(BinaryExpression node) {
-    if (checkConstantUpdate2018) {
+    if (checkTripleShift) {
       TokenType operatorType = node.operator.type;
       if (operatorType == TokenType.GT_GT_GT) {
         _errorReporter.reportErrorForToken(
             HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.operator);
-      } else if ((operatorType == TokenType.AMPERSAND ||
-              operatorType == TokenType.BAR ||
-              operatorType == TokenType.CARET) &&
-          node.inConstantContext) {
-        if (node.leftOperand.typeOrThrow.isDartCoreBool) {
-          _errorReporter.reportErrorForToken(
-              HintCode.SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT,
-              node.operator,
-              [node.operator.lexeme]);
-        }
-      } else if (operatorType == TokenType.EQ_EQ && node.inConstantContext) {
-        bool primitive(Expression node) {
-          DartType type = node.typeOrThrow;
-          return type.isDartCoreBool ||
-              type.isDartCoreDouble ||
-              type.isDartCoreInt ||
-              type.isDartCoreNull ||
-              type.isDartCoreString;
-        }
+      } else if (checkConstantUpdate2018) {
+        if ((operatorType == TokenType.AMPERSAND ||
+                operatorType == TokenType.BAR ||
+                operatorType == TokenType.CARET) &&
+            node.inConstantContext) {
+          if (node.leftOperand.typeOrThrow.isDartCoreBool) {
+            _errorReporter.reportErrorForToken(
+                HintCode.SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT,
+                node.operator,
+                [node.operator.lexeme]);
+          }
+        } else if (operatorType == TokenType.EQ_EQ && node.inConstantContext) {
+          bool primitive(Expression node) {
+            DartType type = node.typeOrThrow;
+            return type.isDartCoreBool ||
+                type.isDartCoreDouble ||
+                type.isDartCoreInt ||
+                type.isDartCoreNull ||
+                type.isDartCoreString;
+          }
 
-        if (!primitive(node.leftOperand) || !primitive(node.rightOperand)) {
-          _errorReporter.reportErrorForToken(
-              HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
-              node.operator);
+          if (!primitive(node.leftOperand) || !primitive(node.rightOperand)) {
+            _errorReporter.reportErrorForToken(
+                HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
+                node.operator);
+          }
         }
       }
     }
@@ -210,7 +225,7 @@
 
   @override
   void visitMethodDeclaration(MethodDeclaration node) {
-    if (checkConstantUpdate2018 && node.isOperator && node.name.name == '>>>') {
+    if (checkTripleShift && node.isOperator && node.name.name == '>>>') {
       _errorReporter.reportErrorForNode(
           HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.name);
     }
diff --git a/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
index b2e5b12..4b37ce5 100644
--- a/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
+++ b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
@@ -4,14 +4,14 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 
 /// The name and location of a diagnostic name in an ignore comment.
-class DiagnosticName {
+class DiagnosticName implements IgnoredElement {
   /// 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
@@ -19,10 +19,40 @@
   DiagnosticName(this.name, this.offset);
 
   /// Return `true` if this diagnostic name matches the given error code.
-  bool matches(String errorCode) => name == errorCode;
+  @override
+  bool matches(ErrorCode errorCode) {
+    if (name == errorCode.name.toLowerCase()) {
+      return true;
+    }
+    var uniqueName = errorCode.uniqueName;
+    var period = uniqueName.indexOf('.');
+    if (period >= 0) {
+      uniqueName = uniqueName.substring(period + 1);
+    }
+    return name == uniqueName.toLowerCase();
+  }
 }
 
-/// Information about analysis `//ignore:` and `//ignore_for_file` comments
+class DiagnosticType implements IgnoredElement {
+  final String type;
+
+  final int offset;
+
+  final int length;
+
+  DiagnosticType(String type, this.offset, this.length)
+      : type = type.toLowerCase();
+
+  @override
+  bool matches(ErrorCode errorCode) =>
+      type == errorCode.type.name.toLowerCase();
+}
+
+abstract class IgnoredElement {
+  bool matches(ErrorCode errorCode);
+}
+
+/// Information about analysis `//ignore:` and `//ignore_for_file:` comments
 /// within a source file.
 class IgnoreInfo {
   /// A regular expression for matching 'ignore' comments.
@@ -36,13 +66,13 @@
   static final RegExp IGNORE_FOR_FILE_MATCHER =
       RegExp(r'//[ ]*ignore_for_file:');
 
-  /// A table mapping line numbers to the diagnostics that are ignored on that
-  /// line.
-  final Map<int, List<DiagnosticName>> _ignoredOnLine = {};
+  /// A table mapping line numbers to the elements (diagnostics and diagnostic
+  /// types) that are ignored on that line.
+  final Map<int, List<IgnoredElement>> _ignoredOnLine = {};
 
-  /// A list containing all of the diagnostics that are ignored for the whole
-  /// file.
-  final List<DiagnosticName> _ignoredForFile = [];
+  /// A list containing all of the elements (diagnostics and diagnostic types)
+  /// that are ignored for the whole file.
+  final List<IgnoredElement> _ignoredForFile = [];
 
   /// Initialize a newly created instance of this class to represent the ignore
   /// comments in the given compilation [unit].
@@ -62,9 +92,9 @@
         }
         _ignoredOnLine
             .putIfAbsent(lineNumber, () => [])
-            .addAll(comment.diagnosticNames);
+            .addAll(comment.ignoredElements);
       } else if (lexeme.contains('ignore_for_file:')) {
-        _ignoredForFile.addAll(comment.diagnosticNames);
+        _ignoredForFile.addAll(comment.ignoredElements);
       }
     }
   }
@@ -75,26 +105,24 @@
 
   /// Return a list containing all of the diagnostics that are ignored for the
   /// whole file.
-  List<DiagnosticName> get ignoredForFile => _ignoredForFile.toList();
+  List<IgnoredElement> get ignoredForFile => _ignoredForFile.toList();
 
   /// Return a table mapping line numbers to the diagnostics that are ignored on
   /// that line.
-  Map<int, List<DiagnosticName>> get ignoredOnLine {
-    Map<int, List<DiagnosticName>> ignoredOnLine = {};
+  Map<int, List<IgnoredElement>> get ignoredOnLine {
+    Map<int, List<IgnoredElement>> ignoredOnLine = {};
     for (var entry in _ignoredOnLine.entries) {
       ignoredOnLine[entry.key] = entry.value.toList();
     }
     return ignoredOnLine;
   }
 
-  /// Return `true` if the [errorCode] (case-insensitive) is ignored at the
-  /// given [line].
-  bool ignoredAt(String errorCode, int line) {
+  /// Return `true` if the [errorCode] is ignored at the given [line].
+  bool ignoredAt(ErrorCode errorCode, int line) {
     var ignoredDiagnostics = _ignoredOnLine[line];
     if (ignoredForFile.isEmpty && ignoredDiagnostics == null) {
       return false;
     }
-    errorCode = errorCode.toLowerCase();
     if (ignoredForFile.any((name) => name.matches(errorCode))) {
       return true;
     }
@@ -135,21 +163,28 @@
   /// more restrictive in this test.
   static final _errorCodeNameRegExp = RegExp(r'^[a-zA-Z][_a-z0-9A-Z]*$');
 
+  static final _errorTypeRegExp =
+      RegExp(r'^type[ ]*=[ ]*lint', caseSensitive: false);
+
   /// Return the diagnostic names contained in this comment, assuming that it is
   /// a correctly formatted ignore comment.
-  Iterable<DiagnosticName> get diagnosticNames sync* {
-    bool isValidErrorCodeName(String text) {
-      return text.contains(_errorCodeNameRegExp);
-    }
-
+  Iterable<IgnoredElement> get ignoredElements sync* {
     int offset = lexeme.indexOf(':') + 1;
     var names = lexeme.substring(offset).split(',');
     offset += this.offset;
     for (var name in names) {
       var trimmedName = name.trim();
-      if (trimmedName.isNotEmpty && isValidErrorCodeName(trimmedName)) {
-        var innerOffset = name.indexOf(trimmedName);
-        yield DiagnosticName(trimmedName.toLowerCase(), offset + innerOffset);
+      if (trimmedName.isNotEmpty) {
+        if (trimmedName.contains(_errorCodeNameRegExp)) {
+          var innerOffset = name.indexOf(trimmedName);
+          yield DiagnosticName(trimmedName.toLowerCase(), offset + innerOffset);
+        } else {
+          var match = _errorTypeRegExp.matchAsPrefix(trimmedName);
+          if (match != null) {
+            var innerOffset = name.indexOf(trimmedName);
+            yield DiagnosticType('lint', offset + innerOffset, name.length);
+          }
+        }
       }
       offset += name.length + 1;
     }
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index c77fc12..b43bd0c 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -2,36 +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 '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;
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.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/performance_logger.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/lint/io.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/project.dart';
 import 'package:analyzer/src/lint/registry.dart';
-import 'package:analyzer/src/services/lint.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/task/options.dart';
-import 'package:analyzer/src/util/sdk.dart';
-import 'package:path/path.dart' as p;
 import 'package:yaml/yaml.dart';
 
 AnalysisOptionsProvider _optionsProvider = AnalysisOptionsProvider();
@@ -48,8 +34,10 @@
   io.exit(exitCode);
 }
 
-AnalysisOptionsImpl _buildAnalyzerOptions(LinterOptions options) {
-  AnalysisOptionsImpl analysisOptions = AnalysisOptionsImpl();
+void _updateAnalyzerOptions(
+  AnalysisOptionsImpl analysisOptions,
+  LinterOptions options,
+) {
   if (options.analysisOptions != null) {
     YamlMap map =
         _optionsProvider.getOptionsFromString(options.analysisOptions);
@@ -60,7 +48,6 @@
   analysisOptions.lint = options.enableLints;
   analysisOptions.enableTiming = options.enableTiming;
   analysisOptions.lintRules = options.enabledLints.toList(growable: false);
-  return analysisOptions;
 }
 
 class DriverOptions {
@@ -111,172 +98,78 @@
 }
 
 class LintDriver {
-  /// The sources which have been analyzed so far.  This is used to avoid
-  /// analyzing a source more than once, and to compute the total number of
-  /// sources analyzed for statistics.
-  final Set<Source> _sourcesAnalyzed = HashSet<Source>();
+  /// The files which have been analyzed so far.  This is used to compute the
+  /// total number of files analyzed for statistics.
+  final Set<String> _filesAnalyzed = {};
 
   final LinterOptions options;
 
   LintDriver(this.options);
 
   /// Return the number of sources that have been analyzed so far.
-  int get numSourcesAnalyzed => _sourcesAnalyzed.length;
-
-  List<UriResolver> get resolvers {
-    // TODO(brianwilkerson) Use the context builder to compute all of the resolvers.
-    ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-
-    DartSdk sdk = options.mockSdk ??
-        FolderBasedDartSdk(
-            resourceProvider, resourceProvider.getFolder(sdkDir));
-
-    List<UriResolver> resolvers = [DartUriResolver(sdk)];
-
-    var packageUriResolver = _getPackageUriResolver();
-    if (packageUriResolver != null) {
-      resolvers.add(packageUriResolver);
-    }
-
-    // File URI resolver must come last so that files inside "/lib" are
-    // are analyzed via "package:" URI's.
-    resolvers.add(ResourceUriResolver(resourceProvider));
-    return resolvers;
-  }
-
-  ResourceProvider get resourceProvider => options.resourceProvider;
-
-  String get sdkDir {
-    // In case no SDK has been specified, fall back to inferring it.
-    return options.dartSdkPath ?? getSdkPath();
-  }
+  int get numSourcesAnalyzed => _filesAnalyzed.length;
 
   Future<List<AnalysisErrorInfo>> analyze(Iterable<io.File> files) async {
     AnalysisEngine.instance.instrumentationService = StdInstrumentation();
 
-    SourceFactory sourceFactory = SourceFactory(resolvers);
+    // TODO(scheglov) Enforce normalized absolute paths in the config.
+    var packageConfigPath = options.packageConfigPath;
+    packageConfigPath = _absoluteNormalizedPath.ifNotNull(packageConfigPath);
 
-    PerformanceLog log = PerformanceLog(null);
-    AnalysisDriverScheduler scheduler = AnalysisDriverScheduler(log);
-    AnalysisDriver analysisDriver = AnalysisDriver.tmp1(
-      scheduler: scheduler,
-      logger: log,
-      resourceProvider: resourceProvider,
-      byteStore: MemoryByteStore(),
-      sourceFactory: sourceFactory,
-      analysisOptions: _buildAnalyzerOptions(options),
-      packages: Packages.empty,
+    var contextCollection = AnalysisContextCollectionImpl(
+      resourceProvider: options.resourceProvider,
+      packagesFile: packageConfigPath,
+      sdkPath: options.dartSdkPath,
+      includedPaths:
+          files.map((file) => _absoluteNormalizedPath(file.path)).toList(),
+      updateAnalysisOptions: (analysisOptions) {
+        _updateAnalyzerOptions(analysisOptions, options);
+      },
     );
 
-    _setAnalysisDriverAnalysisContext(analysisDriver, files);
-
-    analysisDriver.results.listen((_) {});
-    analysisDriver.exceptions.listen((_) {});
-    scheduler.start();
-
-    List<Source> sources = [];
+    AnalysisSession? projectAnalysisSession;
     for (io.File file in files) {
-      File sourceFile =
-          resourceProvider.getFile(p.normalize(file.absolute.path));
-      Source source = sourceFile.createSource();
-      var uri = sourceFactory.restoreUri(source);
-      if (uri != null) {
-        // Ensure that we analyze the file using its canonical URI (e.g. if
-        // it's in "/lib", analyze it using a "package:" URI).
-        source = sourceFile.createSource(uri);
-      }
-
-      sources.add(source);
-      analysisDriver.addFile(source.fullName);
+      var path = _absoluteNormalizedPath(file.path);
+      _filesAnalyzed.add(path);
+      var analysisContext = contextCollection.contextFor(path);
+      var analysisSession = analysisContext.currentSession;
+      projectAnalysisSession = analysisSession;
     }
 
-    DartProject project = await DartProject.create(analysisDriver, sources);
-    Registry.ruleRegistry.forEach((lint) {
-      if (lint is ProjectVisitor) {
-        (lint as ProjectVisitor).visit(project);
-      }
-    });
+    if (projectAnalysisSession != null) {
+      var project = await DartProject.create(
+        projectAnalysisSession,
+        _filesAnalyzed.toList(),
+      );
+      Registry.ruleRegistry.forEach((lint) {
+        if (lint is ProjectVisitor) {
+          (lint as ProjectVisitor).visit(project);
+        }
+      });
+    }
 
-    List<AnalysisErrorInfo> errors = [];
-    for (Source source in sources) {
-      var errorsResult = await analysisDriver.getErrors2(source.fullName);
+    var result = <AnalysisErrorInfo>[];
+    for (var path in _filesAnalyzed) {
+      var analysisContext = contextCollection.contextFor(path);
+      var analysisSession = analysisContext.currentSession;
+      var errorsResult = await analysisSession.getErrors(path);
       if (errorsResult is ErrorsResult) {
-        errors.add(
+        result.add(
           AnalysisErrorInfoImpl(
             errorsResult.errors,
             errorsResult.lineInfo,
           ),
         );
-        _sourcesAnalyzed.add(source);
       }
     }
-
-    return errors;
+    return result;
   }
 
-  void registerLinters(AnalysisContext context) {
-    if (options.enableLints) {
-      setLints(context, options.enabledLints.toList(growable: false));
-    }
-  }
-
-  PackageMapUriResolver? _getPackageUriResolver() {
-    var packageConfigPath = options.packageConfigPath;
-    if (packageConfigPath != null) {
-      var resourceProvider = PhysicalResourceProvider.INSTANCE;
-      var pathContext = resourceProvider.pathContext;
-      packageConfigPath = pathContext.absolute(packageConfigPath);
-      packageConfigPath = pathContext.normalize(packageConfigPath);
-
-      try {
-        var packages = parsePackagesFile(
-          resourceProvider,
-          resourceProvider.getFile(packageConfigPath),
-        );
-
-        var packageMap = <String, List<Folder>>{};
-        for (var package in packages.packages) {
-          packageMap[package.name] = [package.libFolder];
-        }
-
-        return PackageMapUriResolver(resourceProvider, packageMap);
-      } catch (e) {
-        printAndFail(
-          'Unable to read package config data from $packageConfigPath: $e',
-        );
-      }
-    }
-    return null;
-  }
-
-  void _setAnalysisDriverAnalysisContext(
-    AnalysisDriver analysisDriver,
-    Iterable<io.File> files,
-  ) {
-    if (files.isEmpty) {
-      return;
-    }
-
-    var rootPath = p.normalize(files.first.absolute.path);
-
-    var apiContextRoots = api.ContextLocator(
-      resourceProvider: resourceProvider,
-    ).locateRoots(
-      includedPaths: [rootPath],
-      excludedPaths: [],
-    );
-
-    if (apiContextRoots.isEmpty) {
-      return;
-    }
-
-    analysisDriver.configure(
-      analysisContext: api.DriverBasedAnalysisContext(
-        resourceProvider,
-        apiContextRoots.first,
-        analysisDriver,
-      ),
-    );
+  String _absoluteNormalizedPath(String path) {
+    var pathContext = options.resourceProvider.pathContext;
+    path = pathContext.absolute(path);
+    path = pathContext.normalize(path);
+    return path;
   }
 }
 
@@ -307,3 +200,14 @@
     }
   }
 }
+
+extension _UnaryFunctionExtension<T, R> on R Function(T) {
+  /// Invoke this function if [t] is not `null`, otherwise return `null`.
+  R? ifNotNull(T? t) {
+    if (t != null) {
+      return this(t);
+    } else {
+      return null;
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index 8670eee..0c8f774 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -35,7 +35,6 @@
         AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/resolver.dart' show ScopeResolverVisitor;
 import 'package:analyzer/src/generated/source.dart' show LineInfo;
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/lint/analysis.dart';
 import 'package:analyzer/src/lint/config.dart';
 import 'package:analyzer/src/lint/io.dart';
@@ -154,12 +153,12 @@
 }
 
 class FileGlobFilter extends LintFilter {
-  Iterable<Glob> includes;
-  Iterable<Glob> excludes;
+  List<Glob> includes;
+  List<Glob> excludes;
 
   FileGlobFilter(Iterable<String> includeGlobs, Iterable<String> excludeGlobs)
-      : includes = includeGlobs.map((glob) => Glob(glob)),
-        excludes = excludeGlobs.map((glob) => Glob(glob));
+      : includes = includeGlobs.map((glob) => Glob(glob)).toList(),
+        excludes = excludeGlobs.map((glob) => Glob(glob)).toList();
 
   @override
   bool filter(AnalysisError lint) {
diff --git a/pkg/analyzer/lib/src/lint/linter_visitor.dart b/pkg/analyzer/lib/src/lint/linter_visitor.dart
index 424d04a..7fe8635 100644
--- a/pkg/analyzer/lib/src/lint/linter_visitor.dart
+++ b/pkg/analyzer/lib/src/lint/linter_visitor.dart
@@ -496,6 +496,12 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _runSubscriptions(node, registry._forNamedType);
+    super.visitNamedType(node);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     _runSubscriptions(node, registry._forNativeClause);
     super.visitNativeClause(node);
@@ -695,12 +701,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    _runSubscriptions(node, registry._forTypeName);
-    super.visitTypeName(node);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _runSubscriptions(node, registry._forTypeParameter);
     super.visitTypeParameter(node);
@@ -861,6 +861,7 @@
   final List<_Subscription<MethodInvocation>> _forMethodInvocation = [];
   final List<_Subscription<MixinDeclaration>> _forMixinDeclaration = [];
   final List<_Subscription<NamedExpression>> _forNamedExpression = [];
+  final List<_Subscription<NamedType>> _forNamedType = [];
   final List<_Subscription<NativeClause>> _forNativeClause = [];
   final List<_Subscription<NativeFunctionBody>> _forNativeFunctionBody = [];
   final List<_Subscription<NullLiteral>> _forNullLiteral = [];
@@ -899,7 +900,6 @@
       _forTopLevelVariableDeclaration = [];
   final List<_Subscription<TryStatement>> _forTryStatement = [];
   final List<_Subscription<TypeArgumentList>> _forTypeArgumentList = [];
-  final List<_Subscription<TypeName>> _forTypeName = [];
   final List<_Subscription<TypeParameter>> _forTypeParameter = [];
   final List<_Subscription<TypeParameterList>> _forTypeParameterList = [];
   final List<_Subscription<VariableDeclaration>> _forVariableDeclaration = [];
@@ -1263,6 +1263,10 @@
     _forNamedExpression.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  void addNamedType(LintRule linter, AstVisitor visitor) {
+    _forNamedType.add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addNativeClause(LintRule linter, AstVisitor visitor) {
     _forNativeClause.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
@@ -1407,8 +1411,9 @@
     _forTypeArgumentList.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  @Deprecated('Use addNamedType() instead')
   void addTypeName(LintRule linter, AstVisitor visitor) {
-    _forTypeName.add(_Subscription(linter, visitor, _getTimer(linter)));
+    addNamedType(linter, visitor);
   }
 
   void addTypeParameter(LintRule linter, AstVisitor visitor) {
diff --git a/pkg/analyzer/lib/src/lint/project.dart b/pkg/analyzer/lib/src/lint/project.dart
index a461bc7..38da850 100644
--- a/pkg/analyzer/lib/src/lint/project.dart
+++ b/pkg/analyzer/lib/src/lint/project.dart
@@ -5,10 +5,9 @@
 import 'dart:io';
 
 import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/lint/io.dart';
 import 'package:analyzer/src/lint/pub.dart';
 import 'package:collection/collection.dart';
@@ -44,15 +43,16 @@
   /// Project root.
   final Directory root;
 
-  /// Create a Dart project for the corresponding [driver] and [sources].
+  /// Create a Dart project for the corresponding [analysisSession] and [files].
   /// If a [dir] is unspecified the current working directory will be
   /// used.
   ///
   /// Note: clients should call [create] which performs API model initialization.
-  DartProject._(AnalysisDriver driver, List<Source> sources, {Directory? dir})
+  DartProject._(AnalysisSession analysisSession, List<String> files,
+      {Directory? dir})
       : root = dir ?? Directory.current {
     _pubspec = _findAndParsePubspec(root);
-    _apiModel = _ApiModel(driver, sources, root);
+    _apiModel = _ApiModel(analysisSession, files, root);
   }
 
   /// The project's name.
@@ -84,13 +84,14 @@
     return p.basename(root.path);
   }
 
-  /// Create an initialized Dart project for the corresponding [driver] and
-  /// [sources].
+  /// Create an initialized Dart project for the corresponding [analysisSession]
+  /// and [files].
   /// If a [dir] is unspecified the current working directory will be
   /// used.
-  static Future<DartProject> create(AnalysisDriver driver, List<Source> sources,
+  static Future<DartProject> create(
+      AnalysisSession analysisSession, List<String> files,
       {Directory? dir}) async {
-    DartProject project = DartProject._(driver, sources, dir: dir);
+    DartProject project = DartProject._(analysisSession, files, dir: dir);
     await project._apiModel._calculate();
     return project;
   }
@@ -103,12 +104,12 @@
 
 /// Captures the project's API as defined by pub package layout standards.
 class _ApiModel {
-  final AnalysisDriver driver;
-  final List<Source>? sources;
+  final AnalysisSession analysisSession;
+  final List<String> files;
   final Directory root;
   final Set<Element> elements = {};
 
-  _ApiModel(this.driver, this.sources, this.root) {
+  _ApiModel(this.analysisSession, this.files, this.root) {
     _calculate();
   }
 
@@ -124,17 +125,16 @@
   }
 
   Future<void> _calculate() async {
-    if (sources == null || sources!.isEmpty) {
+    if (files.isEmpty) {
       return;
     }
 
     String libDir = root.path + '/lib';
     String libSrcDir = libDir + '/src';
 
-    for (Source source in sources!) {
-      String path = source.uri.path;
-      if (path.startsWith(libDir) && !path.startsWith(libSrcDir)) {
-        var result = await driver.getResult2(source.fullName);
+    for (var file in files) {
+      if (file.startsWith(libDir) && !file.startsWith(libSrcDir)) {
+        var result = await analysisSession.getResolvedUnit(file);
         if (result is ResolvedUnitResult) {
           LibraryElement library = result.libraryElement;
 
diff --git a/pkg/analyzer/lib/src/macro/api/code.dart b/pkg/analyzer/lib/src/macro/api/code.dart
deleted file mode 100644
index a3fed07..0000000
--- a/pkg/analyzer/lib/src/macro/api/code.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.
-
-/// Combines [parts] into a [String].
-/// Must only contain [Code] or [String] instances.
-String _combineParts(List<Object> parts) {
-  var buffer = StringBuffer();
-
-  void write(Object part) {
-    if (part is String) {
-      buffer.write(part);
-    } else if (part is Code) {
-      buffer.write(part.code);
-    } else if (part is Iterable<Object>) {
-      part.forEach(write);
-    } else {
-      throw UnsupportedError(
-        'Only String, Code, and List(s) of them are '
-        'allowed but got ${part.runtimeType}',
-      );
-    }
-  }
-
-  write(parts);
-  return buffer.toString();
-}
-
-/// The representation of a piece of code.
-abstract class Code {
-  String get code;
-
-  @override
-  String toString() => code;
-}
-
-/// A piece of code representing a syntactically valid declaration.
-class Declaration extends Code {
-  @override
-  final String code;
-
-  Declaration(this.code);
-
-  /// Creates a [Declaration] from [parts], which must be of type [Code],
-  /// [String], or [Iterable]s of them.
-  factory Declaration.fromParts(List<Object> parts) =>
-      Declaration(_combineParts(parts));
-}
-
-/// A piece of code that can't be parsed into a valid language construct in its
-/// current form. No validation or parsing is performed.
-class Fragment extends Code {
-  @override
-  final String code;
-
-  Fragment(this.code);
-
-  /// Creates a [Fragment] from [parts], which must be of type [Code],
-  /// [String], or [Iterable]s of them.
-  factory Fragment.fromParts(List<Object> parts) =>
-      Fragment(_combineParts(parts));
-}
diff --git a/pkg/analyzer/lib/src/macro/api/macro.dart b/pkg/analyzer/lib/src/macro/api/macro.dart
deleted file mode 100644
index 78eb6c0..0000000
--- a/pkg/analyzer/lib/src/macro/api/macro.dart
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/ast/ast.dart' as ast;
-import 'package:analyzer/src/macro/api/code.dart';
-
-/// The api used by [DeclarationMacro]s to contribute new declarations to the
-/// current class.
-///
-/// Note that this is available to macros that run directly on classes, as well
-/// as macros that run on any members of a class.
-abstract class ClassDeclarationBuilder implements DeclarationBuilder {
-  /// Adds a new declaration to the surrounding class.
-  void addToClass(Declaration declaration);
-}
-
-/// The interface for [DeclarationMacro]s that can be applied to classes.
-abstract class ClassDeclarationMacro implements DeclarationMacro {
-  void visitClassDeclaration(
-      ast.ClassDeclaration declaration, ClassDeclarationBuilder builder);
-}
-
-/// The api used by [DeclarationMacro]s to contribute new declarations to the
-/// current library.
-abstract class DeclarationBuilder {
-  /// Adds a new regular declaration to the surrounding library.
-  ///
-  /// Note that type declarations are not supported.
-  void addToLibrary(Declaration declaration);
-
-  /// Return the [Code] of the [node].
-  Code typeAnnotationCode(ast.TypeAnnotation node);
-}
-
-/// The marker interface for macros that are allowed to contribute new
-/// declarations to the program, including both top level and class level
-/// declarations.
-///
-/// These macros run after [TypeMacro] macros, but before [DefinitionMacro]
-/// macros.
-///
-/// These macros can resolve type annotations to specific declarations, and
-/// inspect type hierarchies, but they cannot inspect the declarations on those
-/// type annotations, since new declarations could still be added in this phase.
-abstract class DeclarationMacro implements Macro {}
-
-/// The marker interface for macros that are only allowed to implement or wrap
-/// existing declarations in the program. They cannot introduce any new
-/// declarations that are visible to the program, but are allowed to add
-/// declarations that only they can see.
-///
-/// These macros run after all other types of macros.
-///
-/// These macros can fully reflect on the program since the static shape is
-/// fully defined by the time they run.
-abstract class DefinitionMacro implements Macro {}
-
-/// The interface for [DeclarationMacro]s that can be applied to fields.
-abstract class FieldDeclarationMacro implements DeclarationMacro {
-  void visitFieldDeclaration(
-    ast.FieldDeclaration declaration,
-    ClassDeclarationBuilder builder,
-  );
-}
-
-/// The marker interface for all types of macros.
-abstract class Macro {}
-
-/// The marker interface for macros that are allowed to contribute new type
-/// declarations into the program.
-///
-/// These macros run before all other types of macros.
-///
-/// In exchange for the power to add new type declarations, these macros have
-/// limited introspections capabilities, since new types can be added in this
-/// phase you cannot follow type references back to their declarations.
-abstract class TypeMacro implements Macro {}
diff --git a/pkg/analyzer/lib/src/macro/builders/data_class.dart b/pkg/analyzer/lib/src/macro/builders/data_class.dart
deleted file mode 100644
index a4a0393..0000000
--- a/pkg/analyzer/lib/src/macro/builders/data_class.dart
+++ /dev/null
@@ -1,105 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/ast/ast.dart' as ast;
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/macro/api/code.dart';
-import 'package:analyzer/src/macro/api/macro.dart';
-
-class AutoConstructorMacro implements ClassDeclarationMacro {
-  const AutoConstructorMacro();
-
-  @override
-  void visitClassDeclaration(
-    ast.ClassDeclaration node,
-    ClassDeclarationBuilder builder,
-  ) {
-    // TODO(scheglov) Should we provide the element as a parameter?
-    var classElement = node.declaredElement!;
-    var typeSystem = classElement.library.typeSystem;
-
-    if (classElement.unnamedConstructor != null) {
-      throw ArgumentError(
-        'Cannot generate a constructor because one already exists',
-      );
-    }
-
-    var fieldsCode = classElement.fields.map((field) {
-      var isNullable = typeSystem.isNullable(field.type);
-      var requiredKeyword = isNullable ? '' : 'required ';
-      return '${requiredKeyword}this.${field.name}';
-    }).join(', ');
-
-    // TODO(scheglov) super constructor
-
-    builder.addToClass(
-      Declaration('${classElement.name}({$fieldsCode});'),
-    );
-  }
-}
-
-class DataClassMacro implements ClassDeclarationMacro {
-  const DataClassMacro();
-
-  @override
-  void visitClassDeclaration(
-    ast.ClassDeclaration declaration,
-    ClassDeclarationBuilder builder,
-  ) {
-    const AutoConstructorMacro().visitClassDeclaration(declaration, builder);
-    const HashCodeMacro().visitClassDeclaration(declaration, builder);
-    const ToStringMacro().visitClassDeclaration(declaration, builder);
-  }
-}
-
-class HashCodeMacro implements ClassDeclarationMacro {
-  const HashCodeMacro();
-
-  @override
-  void visitClassDeclaration(
-    ast.ClassDeclaration node,
-    ClassDeclarationBuilder builder,
-  ) {
-    var expression = node.declaredElement!.allFields
-        .map((e) => '${e.name}.hashCode')
-        .join(' ^ ');
-    builder.addToClass(
-      Declaration('''
-  @override
-  int get hashCode => $expression;
-'''),
-    );
-  }
-}
-
-class ToStringMacro implements ClassDeclarationMacro {
-  const ToStringMacro();
-
-  @override
-  void visitClassDeclaration(
-    ast.ClassDeclaration node,
-    ClassDeclarationBuilder builder,
-  ) {
-    var classElement = node.declaredElement!;
-    var fieldsCode = classElement.allFields.map((field) {
-      var name = field.name;
-      return '$name: \$$name';
-    }).join(', ');
-    builder.addToClass(
-      Declaration('''
-  @override
-  String toString() => '${classElement.name}($fieldsCode)';
-'''),
-    );
-  }
-}
-
-extension on ClassElement {
-  Iterable<FieldElement> get allFields sync* {
-    for (ClassElement? class_ = this; class_ != null;) {
-      yield* class_.fields.where((e) => !e.isSynthetic);
-      class_ = class_.supertype?.element;
-    }
-  }
-}
diff --git a/pkg/analyzer/lib/src/macro/builders/observable.dart b/pkg/analyzer/lib/src/macro/builders/observable.dart
deleted file mode 100644
index dac5565..0000000
--- a/pkg/analyzer/lib/src/macro/builders/observable.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/ast/ast.dart' as ast;
-import 'package:analyzer/src/macro/api/code.dart';
-import 'package:analyzer/src/macro/api/macro.dart';
-
-class ObservableMacro implements FieldDeclarationMacro {
-  const ObservableMacro();
-
-  @override
-  void visitFieldDeclaration(
-    ast.FieldDeclaration node,
-    ClassDeclarationBuilder builder,
-  ) {
-    var typeNode = node.fields.type;
-    if (typeNode == null) {
-      throw ArgumentError('@observable can only annotate typed fields.');
-    }
-    var typeCode = builder.typeAnnotationCode(typeNode);
-
-    var fields = node.fields.variables;
-    for (var field in fields) {
-      var name = field.name.name;
-      if (!name.startsWith('_')) {
-        throw ArgumentError(
-          '@observable can only annotate private fields, and it will create '
-          'public getters and setters for them, but the public field '
-          '$name was annotated.',
-        );
-      }
-      var publicName = name.substring(1);
-
-      var getter = Declaration(
-        '  $typeCode get $publicName => $name;',
-      );
-      builder.addToClass(getter);
-
-      var setter = Declaration('''
-  set $publicName($typeCode val) {
-    print('Setting $publicName to \${val}');
-    $name = val;
-  }
-''');
-      builder.addToClass(setter);
-    }
-  }
-}
diff --git a/pkg/analyzer/lib/src/macro/impl/error.dart b/pkg/analyzer/lib/src/macro/impl/error.dart
deleted file mode 100644
index 8c2780c..0000000
--- a/pkg/analyzer/lib/src/macro/impl/error.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.
-
-/// Error that happened during executing a macro builder.
-class MacroExecutionError {
-  final int annotationIndex;
-  final String macroName;
-  final String message;
-
-  MacroExecutionError({
-    required this.annotationIndex,
-    required this.macroName,
-    required this.message,
-  });
-}
diff --git a/pkg/analyzer/lib/src/macro/impl/macro.dart b/pkg/analyzer/lib/src/macro/impl/macro.dart
deleted file mode 100644
index 32c6358..0000000
--- a/pkg/analyzer/lib/src/macro/impl/macro.dart
+++ /dev/null
@@ -1,222 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/analysis/utilities.dart';
-import 'package:analyzer/dart/ast/ast.dart' as ast;
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/visitor.dart';
-import 'package:analyzer/src/dart/ast/ast.dart' as ast;
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/macro/api/code.dart';
-import 'package:analyzer/src/macro/api/macro.dart';
-import 'package:analyzer/src/summary2/informative_data.dart';
-import 'package:analyzer/src/summary2/library_builder.dart';
-
-class ClassDeclarationBuilderImpl extends DeclarationBuilderImpl
-    implements ClassDeclarationBuilder {
-  final LinkingUnit linkingUnit;
-
-  /// The index of [node] among other [ast.ClassDeclarationImpl]s.
-  final int nodeIndex;
-
-  final ast.ClassDeclarationImpl node;
-
-  ClassDeclarationBuilderImpl(
-    this.linkingUnit,
-    this.nodeIndex,
-    this.node,
-  );
-
-  @override
-  void addToClass(Declaration declaration) {
-    var declarationCode = declaration.code.trim();
-
-    // TODO(scheglov) feature set
-    // TODO(scheglov) throw if errors?
-    var parseResult = parseString(
-      content: 'class ${node.name.name} { $declarationCode }',
-    );
-    var parsedDeclarations = parseResult.unit.declarations;
-    var parsedClass = parsedDeclarations.single as ast.ClassDeclaration;
-    var parsedMember = parsedClass.members.single;
-    _rebaseOffsets(parsedMember);
-
-    node.members.add(parsedMember);
-
-    var macroGeneratedContent = linkingUnit.macroGeneratedContent;
-    var collected = _Declaration(
-      data: MacroGenerationData(
-        id: macroGeneratedContent.nextId++,
-        code: declarationCode,
-        informative: writeDeclarationInformative(parsedMember),
-        classDeclarationIndex: nodeIndex,
-      ),
-      node: parsedMember,
-    );
-    macroGeneratedContent._declarations.add(collected);
-  }
-
-  /// We parsed [node] in the context of some synthetic code string, its
-  /// current offsets only have meaning relative to the begin offset of the
-  /// [node]. So, we update offsets accordingly.
-  static void _rebaseOffsets(ast.AstNode node) {
-    var baseOffset = node.offset;
-    for (Token? t = node.beginToken;
-        t != null && t != node.endToken;
-        t = t.next) {
-      t.offset -= baseOffset;
-    }
-  }
-}
-
-class DeclarationBuilderImpl implements DeclarationBuilder {
-  @override
-  void addToLibrary(Declaration declaration) {
-    // TODO: implement addToLibrary
-  }
-
-  @override
-  Code typeAnnotationCode(ast.TypeAnnotation node) {
-    return Fragment(node.toSource());
-  }
-}
-
-class MacroGeneratedContent {
-  final LinkingUnit linkingUnit;
-  final List<_Declaration> _declarations = [];
-  int nextId = 0;
-
-  MacroGeneratedContent(this.linkingUnit);
-
-  /// Finish building of elements: combine the source code of the unit with
-  /// macro-generated pieces of code; update offsets of macro-generated
-  /// elements to use offsets inside this combined code.
-  void finish() {
-    // Don't set empty values, keep it null.
-    if (_declarations.isEmpty) {
-      return;
-    }
-
-    // Sort declarations by:
-    // 1. The top-level declaration location.
-    // 2. The ordering in the top-level declaration.
-    // We need (2) because `sort` is not stable.
-    _declarations.sort((a, b) {
-      const indexForUnit = 1 << 24;
-      var aIndex = a.data.classDeclarationIndex ?? indexForUnit;
-      var bIndex = b.data.classDeclarationIndex ?? indexForUnit;
-      if (aIndex != bIndex) {
-        return aIndex - bIndex;
-      }
-      return a.data.id - b.data.id;
-    });
-
-    const classMemberCodePrefix = '\n  ';
-    const classMemberCodeSuffix = '\n';
-    // TODO(scheglov) make it required?
-    var generatedContent = linkingUnit.input.sourceContent!;
-    var shift = 0;
-    var classDeclarations = linkingUnit.input.unit.declarations
-        .whereType<ast.ClassDeclaration>()
-        .toList();
-    for (var declaration in _declarations) {
-      var classIndex = declaration.data.classDeclarationIndex;
-      if (classIndex != null) {
-        var targetClass = classDeclarations[classIndex];
-        var code = classMemberCodePrefix +
-            declaration.data.code +
-            classMemberCodeSuffix;
-        var insertOffset = shift + targetClass.rightBracket.offset;
-        declaration.data.insertOffset = insertOffset;
-        declaration.data.codeOffset =
-            insertOffset + classMemberCodePrefix.length;
-        generatedContent = generatedContent.substring(0, insertOffset) +
-            code +
-            generatedContent.substring(insertOffset);
-        declaration.data.insertLength = code.length;
-        shift += code.length;
-      } else {
-        throw UnimplementedError();
-      }
-
-      var node = declaration.node;
-      if (node is ast.Declaration) {
-        var element = node.declaredElement as ElementImpl;
-        element.accept(
-          _ShiftOffsetsElementVisitor(declaration.data.codeOffset),
-        );
-        if (element is HasMacroGenerationData) {
-          (element as HasMacroGenerationData).macro = declaration.data;
-        }
-      }
-    }
-
-    linkingUnit.element.macroGeneratedContent = generatedContent;
-    linkingUnit.element.macroGenerationDataList =
-        _declarations.map((e) => e.data).toList();
-  }
-}
-
-/// [MacroGenerationData] plus its linking [node] (to get the element).
-class _Declaration {
-  final MacroGenerationData data;
-  final ast.AstNode node;
-
-  _Declaration({
-    required this.data,
-    required this.node,
-  });
-}
-
-/// TODO(scheglov) Enhance to support more nodes.
-/// For now only nodes that are currently used in tests are supported.
-/// Which is probably enough for experiments, but should be improved if this
-/// is something we are going to do for real.
-class _ShiftOffsetsAstVisitor extends RecursiveAstVisitor<void> {
-  final int shift;
-
-  _ShiftOffsetsAstVisitor(this.shift);
-
-  @override
-  void visitAnnotation(ast.Annotation node) {
-    _token(node.atSign);
-    super.visitAnnotation(node);
-  }
-
-  @override
-  void visitSimpleIdentifier(ast.SimpleIdentifier node) {
-    _token(node.token);
-  }
-
-  void _token(Token token) {
-    token.offset += shift;
-  }
-}
-
-/// Macro-generated elements are created from pieces of code that are rebased
-/// to start at zero-th offset. When we later know that actual offset in the
-/// combined (source + generated) code of the unit, we shift the offsets.
-class _ShiftOffsetsElementVisitor extends GeneralizingElementVisitor<void> {
-  final int shift;
-
-  _ShiftOffsetsElementVisitor(this.shift);
-
-  @override
-  void visitElement(covariant ElementImpl element) {
-    element.nameOffset += shift;
-    _metadata(element.metadata);
-    super.visitElement(element);
-  }
-
-  void _metadata(List<ElementAnnotation> metadata) {
-    for (var annotation in metadata) {
-      annotation as ElementAnnotationImpl;
-      annotation.annotationAst.accept(
-        _ShiftOffsetsAstVisitor(shift),
-      );
-    }
-  }
-}
diff --git a/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
index cd3116d..0cd9a11 100644
--- a/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
+++ b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
@@ -2,95 +2,4 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-
-/// The error codes used for warnings in analysis options files. The convention
-/// for this class is for the name of the error code to indicate the problem
-/// that caused the error to be generated and for the error message to explain
-/// what is wrong and, when appropriate, how the problem can be corrected.
-class ManifestWarningCode extends ErrorCode {
-  /// A code indicating that a specified hardware feature is not supported on
-  /// Chrome OS.
-  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
-      ManifestWarningCode(
-          'UNSUPPORTED_CHROME_OS_HARDWARE',
-          'The feature {0} is not supported on Chrome OS, consider making it '
-              'optional.',
-          correction:
-              'Try adding `android:required="false"` for this feature.');
-
-  /// A code indicating that a specified feature is not supported on Chrome OS.
-  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
-      ManifestWarningCode(
-          'UNSUPPORTED_CHROME_OS_FEATURE',
-          'The feature {0} is not supported on Chrome OS, consider making it '
-              'optional.',
-          correction: "Try changing to `android:required=\"false\"` for this "
-              "feature.");
-
-  /// A code indicating that the touchscreen feature is not specified in the
-  /// manifest.
-  static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = ManifestWarningCode(
-      'NO_TOUCHSCREEN_FEATURE',
-      'The default "android.hardware.touchscreen" needs to be optional for '
-          'Chrome OS. ',
-      correction: "Consider adding "
-          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />"
-          " to the manifest.");
-
-  /// A code indicating that a specified permission is not supported on Chrome
-  /// OS.
-  static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
-      ManifestWarningCode(
-          'PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
-          'Permission makes app incompatible for Chrome OS, consider adding '
-              'optional {0} feature tag, ',
-          correction: " Try adding `<uses-feature "
-              "android:name=\"{0}\"  android:required=\"false\">`.");
-
-  /// A code indicating that the camera permissions is not supported on Chrome
-  /// OS.
-  static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE = ManifestWarningCode(
-      'CAMERA_PERMISSIONS_INCOMPATIBLE',
-      "Camera permissions make app incompatible for Chrome OS, consider adding "
-          "optional features \"android.hardware.camera\" and \"android.hardware.camera.autofocus\".",
-      correction: "Try adding `<uses-feature "
-          "android:name=\"android.hardware.camera\"  android:required=\"false\">` "
-          "`<uses-feature "
-          "android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.");
-
-  /// A code indicating that the activity is set to be non resizable.
-  static const ManifestWarningCode NON_RESIZABLE_ACTIVITY = ManifestWarningCode(
-      'NON_RESIZABLE_ACTIVITY',
-      "The `<activity>` element should be allowed to be resized to allow "
-          "users to take advantage of the multi-window environment on Chrome OS",
-      correction: "Consider declaring the corresponding "
-          "activity element with `resizableActivity=\"true\"` attribute.");
-
-  /// A code indicating that the activity is locked to an orientation.
-  static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
-      ManifestWarningCode(
-          'SETTING_ORIENTATION_ON_ACTIVITY',
-          "The `<activity>` element should not be locked to any orientation so "
-              "that users can take advantage of the multi-window environments "
-              "and larger screens on Chrome OS",
-          correction:
-              "Consider declaring the corresponding activity element with"
-              " `screenOrientation=\"unspecified\"` or `\"fullSensor\"` attribute.");
-
-  /// Initialize a newly created warning code to have the given [name],
-  /// [message] and [correction].
-  const ManifestWarningCode(String name, String message, {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'ManifestWarningCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
+export 'package:analyzer/src/manifest/manifest_warning_code.g.dart';
diff --git a/pkg/analyzer/lib/src/manifest/manifest_warning_code.g.dart b/pkg/analyzer/lib/src/manifest/manifest_warning_code.g.dart
new file mode 100644
index 0000000..73c4915
--- /dev/null
+++ b/pkg/analyzer/lib/src/manifest/manifest_warning_code.g.dart
@@ -0,0 +1,117 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class ManifestWarningCode extends ErrorCode {
+  /**
+   * A code indicating that the camera permissions is not supported on Chrome
+   * OS.
+   */
+  static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE =
+      ManifestWarningCode(
+    'CAMERA_PERMISSIONS_INCOMPATIBLE',
+    "Camera permissions make app incompatible for Chrome OS, consider adding optional features \"android.hardware.camera\" and \"android.hardware.camera.autofocus\".",
+    correction:
+        "Try adding `<uses-feature android:name=\"android.hardware.camera\"  android:required=\"false\">` `<uses-feature android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.",
+  );
+
+  /**
+   * A code indicating that the activity is set to be non resizable.
+   */
+  static const ManifestWarningCode NON_RESIZABLE_ACTIVITY = ManifestWarningCode(
+    'NON_RESIZABLE_ACTIVITY',
+    "The `<activity>` element should be allowed to be resized to allow users to take advantage of the multi-window environment on Chrome OS",
+    correction:
+        "Consider declaring the corresponding activity element with `resizableActivity=\"true\"` attribute.",
+  );
+
+  /**
+   * A code indicating that the touchscreen feature is not specified in the
+   * manifest.
+   */
+  static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = ManifestWarningCode(
+    'NO_TOUCHSCREEN_FEATURE',
+    "The default \"android.hardware.touchscreen\" needs to be optional for Chrome OS. ",
+    correction:
+        "Consider adding <uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" /> to the manifest.",
+  );
+
+  /**
+   * A code indicating that a specified permission is not supported on Chrome
+   * OS.
+   */
+  static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
+      ManifestWarningCode(
+    'PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
+    "Permission makes app incompatible for Chrome OS, consider adding optional {0} feature tag, ",
+    correction:
+        " Try adding `<uses-feature android:name=\"{0}\"  android:required=\"false\">`.",
+  );
+
+  /**
+   * A code indicating that the activity is locked to an orientation.
+   */
+  static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
+      ManifestWarningCode(
+    'SETTING_ORIENTATION_ON_ACTIVITY',
+    "The `<activity>` element should not be locked to any orientation so that users can take advantage of the multi-window environments and larger screens on Chrome OS",
+    correction:
+        "Consider declaring the corresponding activity element with `screenOrientation=\"unspecified\"` or `\"fullSensor\"` attribute.",
+  );
+
+  /**
+   * A code indicating that a specified feature is not supported on Chrome OS.
+   */
+  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
+      ManifestWarningCode(
+    'UNSUPPORTED_CHROME_OS_FEATURE',
+    "The feature {0} is not supported on Chrome OS, consider making it optional.",
+    correction:
+        "Try changing to `android:required=\"false\"` for this feature.",
+  );
+
+  /**
+   * A code indicating that a specified hardware feature is not supported on
+   * Chrome OS.
+   */
+  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
+      ManifestWarningCode(
+    'UNSUPPORTED_CHROME_OS_HARDWARE',
+    "The feature {0} is not supported on Chrome OS, consider making it optional.",
+    correction: "Try adding `android:required=\"false\"` for this feature.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const ManifestWarningCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'ManifestWarningCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
index 5f90845..746e79c 100644
--- a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
+++ b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
@@ -2,564 +2,4 @@
 // for details. All 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';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/// The error codes used for warnings in pubspec files. The convention for this
-/// class is for the name of the error code to indicate the problem that caused
-/// the error to be generated and for the error message to explain what is wrong
-/// and, when appropriate, how the problem can be corrected.
-class PubspecWarningCode extends ErrorCode {
-  /**
-   * Parameters:
-   * 0: the path to the asset as given in the file.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an asset list contains a value
-  // referencing a file that doesn't exist.
-  //
-  // #### Example
-  //
-  // Assuming that the file `doesNotExist.gif` doesn't exist, the following code
-  // produces this diagnostic because it's listed as an asset:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets:
-  //     - doesNotExist.gif
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the path is correct, then create a file at that path.
-  //
-  // If the path isn't correct, then change the path to match the path of the
-  // file containing the asset.
-  static const PubspecWarningCode ASSET_DOES_NOT_EXIST = PubspecWarningCode(
-      'ASSET_DOES_NOT_EXIST', "The asset file '{0}' doesn't exist.",
-      correction: "Try creating the file or fixing the path to the file.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the path to the asset directory as given in the file.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an asset list contains a value
-  // referencing a directory that doesn't exist.
-  //
-  // #### Example
-  //
-  // Assuming that the directory `assets` doesn't exist, the following code
-  // produces this diagnostic because it's listed as a directory containing
-  // assets:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets:
-  //     - assets/
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the path is correct, then create a directory at that path.
-  //
-  // If the path isn't correct, then change the path to match the path of the
-  // directory containing the assets.
-  static const PubspecWarningCode ASSET_DIRECTORY_DOES_NOT_EXIST =
-      PubspecWarningCode('ASSET_DIRECTORY_DOES_NOT_EXIST',
-          "The asset directory '{0}' doesn't exist.",
-          correction: "Try creating the directory or fixing the path to the "
-              "directory.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of the `asset` key
-  // isn't a list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the value of the assets
-  // key is a string when a list is expected:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets: assets/
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the value of the asset list so that it's a list:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets:
-  //     - assets/
-  // ```
-  static const PubspecWarningCode ASSET_FIELD_NOT_LIST = PubspecWarningCode(
-      'ASSET_FIELD_NOT_LIST',
-      "The value of the 'asset' field is expected to be a list of relative "
-          "file paths.",
-      correction:
-          "Try converting the value to be a list of relative file paths.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an asset list contains a value
-  // that isn't a string.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the asset list contains
-  // a map:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets:
-  //     - image.gif: true
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the asset list so that it only contains valid POSIX-style file
-  // paths:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   assets:
-  //     - image.gif
-  // ```
-  static const PubspecWarningCode ASSET_NOT_STRING = PubspecWarningCode(
-      'ASSET_NOT_STRING', "Assets are required to be file paths (strings).",
-      correction: "Try converting the value to be a string.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of either the
-  // `dependencies` or `dev_dependencies` key isn't a map.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the value of the
-  // top-level `dependencies` key is a list:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   - meta
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use a map as the value of the `dependencies` key:
-  //
-  // ```yaml
-  // %uri='pubspec.yaml'
-  // name: example
-  // dependencies:
-  //   meta: ^1.0.2
-  // ```
-  static const PubspecWarningCode DEPENDENCIES_FIELD_NOT_MAP =
-      PubspecWarningCode('DEPENDENCIES_FIELD_NOT_MAP',
-          "The value of the '{0}' field is expected to be a map.",
-          correction: "Try converting the value to be a map.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key is used in a
-  // `pubspec.yaml` file that was deprecated. Unused keys take up space and
-  // might imply semantics that are no longer valid.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the `author` key is no
-  // longer being used:
-  //
-  // ```dart
-  // %uri="pubspec.yaml"
-  // name: example
-  // author: 'Dash'
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the deprecated key:
-  //
-  // ```dart
-  // %uri="pubspec.yaml"
-  // name: example
-  // ```
-  static const PubspecWarningCode DEPRECATED_FIELD = PubspecWarningCode(
-      'DEPRECATED_FIELD',
-      "The '{0}' field is no longer used and can be removed.",
-      correction: "Try removing the field.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of the `flutter` key
-  // isn't a map.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the value of the
-  // top-level `flutter` key is a string:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter: true
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to specify Flutter-specific options, then change the value to
-  // be a map:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // flutter:
-  //   uses-material-design: true
-  // ```
-  //
-  // If you don't need to specify Flutter-specific options, then remove the
-  // `flutter` key:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // ```
-  static const PubspecWarningCode FLUTTER_FIELD_NOT_MAP = PubspecWarningCode(
-      'FLUTTER_FIELD_NOT_MAP',
-      "The value of the 'flutter' field is expected to be a map.",
-      correction: "Try converting the value to be a map.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the kind of dependency.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a package under either
-  // `dependencies` or `dev_dependencies` is not a pub, `git`, or `path` based
-  // dependency.
-  //
-  // See [Package dependencies](https://dart.dev/tools/pub/dependencies) for
-  // more information about the kind of dependencies that are supported.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the dependency on the
-  // package `transmogrify` is not a pub, `git`, or `path` based dependency:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   transmogrify:
-  //     hosted:
-  //       name: transmogrify
-  //       url: http://your-package-server.com
-  //     version: ^1.4.0
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to publish your package to `pub.dev`, then change the
-  // dependencies to ones that are supported by `pub`.
-  //
-  // If you don't want to publish your package to `pub.dev`, then add a
-  // `publish_to: none` entry to mark the package as one that isn't intended to
-  // be published:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // publish_to: none
-  // dependencies:
-  //   transmogrify:
-  //     hosted:
-  //       name: transmogrify
-  //       url: http://your-package-server.com
-  //     version: ^1.4.0
-  // ```
-  static const PubspecWarningCode INVALID_DEPENDENCY = PubspecWarningCode(
-      'INVALID_DEPENDENCY',
-      "Publishable packages can't have '{0}' dependencies.",
-      correction:
-          "Try adding a 'publish_to: none' entry to mark the package as not "
-          "for publishing or remove the {0} dependency.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's no top-level `name` key.
-  // The `name` key provides the name of the package, which is required.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the package doesn't
-  // have a name:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // dependencies:
-  //   meta: ^1.0.2
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add the top-level key `name` with a value that's the name of the package:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   meta: ^1.0.2
-  // ```
-  static const PubspecWarningCode MISSING_NAME = PubspecWarningCode(
-      'MISSING_NAME', "The 'name' field is required but missing.",
-      correction: "Try adding a field named 'name'.", hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the top-level `name` key has a
-  // value that isn't a string.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the value following the
-  // `name` key is a list:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name:
-  //   - example
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the value with a string:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // ```
-  static const PubspecWarningCode NAME_NOT_STRING = PubspecWarningCode(
-      'NAME_NOT_STRING',
-      "The value of the 'name' field is required to be a string.",
-      correction: "Try converting the value to be a string.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the path to the dependency as given in the file.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a dependency has a `path` key
-  // referencing a directory that doesn't exist.
-  //
-  // #### Example
-  //
-  // Assuming that the directory `doesNotExist` doesn't exist, the following
-  // code produces this diagnostic because it's listed as the path of a package:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   local_package:
-  //     path: doesNotExist
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the path is correct, then create a directory at that path.
-  //
-  // If the path isn't correct, then change the path to match the path to the
-  // root of the package.
-  static const PubspecWarningCode PATH_DOES_NOT_EXIST = PubspecWarningCode(
-      'PATH_DOES_NOT_EXIST', "The path '{0}' doesn't exist.",
-      correction:
-          "Try creating the referenced path or using a path that exists.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the path as given in the file.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a dependency has a `path` key
-  // whose value is a string, but isn't a POSIX-style path.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the path following the
-  // `path` key is a Windows path:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   local_package:
-  //     path: E:\local_package
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Convert the path to a POSIX path.
-  static const PubspecWarningCode PATH_NOT_POSIX = PubspecWarningCode(
-      'PATH_NOT_POSIX', "The path '{0}' isn't a POSIX-style path.",
-      correction: "Try converting the value to a POSIX-style path.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the path to the dependency as given in the file.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a dependency has a `path` key
-  // that references a directory that doesn't contain a `pubspec.yaml` file.
-  //
-  // #### Example
-  //
-  // Assuming that the directory `local_package` doesn't contain a file named
-  // `pubspec.yaml`, the following code produces this diagnostic because it's
-  // listed as the path of a package:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: example
-  // dependencies:
-  //   local_package:
-  //     path: local_package
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the path is intended to be the root of a package, then add a
-  // `pubspec.yaml` file in the directory:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // name: local_package
-  // ```
-  //
-  // If the path is wrong, then replace it with a the correct path.
-  static const PubspecWarningCode PATH_PUBSPEC_DOES_NOT_EXIST = PubspecWarningCode(
-      'PATH_PUBSPEC_DOES_NOT_EXIST',
-      "The directory '{0}' doesn't contain a pubspec.",
-      correction:
-          "Try creating a pubspec in the referenced directory or using a path that has a pubspec.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the package in the dev_dependency list.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's an entry under
-  // `dev_dependencies` for a package that is also listed under `dependencies`.
-  // The packages under `dependencies` are available to all of the code in the
-  // package, so there's no need to also list them under `dev_dependencies`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the package `meta` is
-  // listed under both `dependencies` and `dev_dependencies`:
-  //
-  // ```yaml
-  // %uri='pubspec.yaml'
-  // name: example
-  // dependencies:
-  //   meta: ^1.0.2
-  // dev_dependencies:
-  //   meta: ^1.0.2
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the entry under `dev_dependencies` (and the `dev_dependencies` key
-  // if that's the only package listed there):
-  //
-  // ```yaml
-  // %uri='pubspec.yaml'
-  // name: example
-  // dependencies:
-  //   meta: ^1.0.2
-  // ```
-  static const PubspecWarningCode UNNECESSARY_DEV_DEPENDENCY =
-      PubspecWarningCode(
-          'UNNECESSARY_DEV_DEPENDENCY',
-          "The dev dependency on {0} is unnecessary because there is also a "
-              "normal dependency on that package.",
-          correction: "Try removing the dev dependency.",
-          hasPublishedDocs: true);
-
-  /// Initialize a newly created warning code to have the given [name],
-  /// [message] and [correction].
-  const PubspecWarningCode(String name, String message,
-      {String? correction, bool hasPublishedDocs = false})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'PubspecWarningCode.$name',
-          hasPublishedDocs: hasPublishedDocs,
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
+export 'package:analyzer/src/pubspec/pubspec_warning_code.g.dart';
diff --git a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart
new file mode 100644
index 0000000..fe4471c
--- /dev/null
+++ b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart
@@ -0,0 +1,589 @@
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class PubspecWarningCode extends ErrorCode {
+  /**
+   * Parameters:
+   * 0: the path to the asset directory as given in the file.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an asset list contains a value
+  // referencing a directory that doesn't exist.
+  //
+  // #### Example
+  //
+  // Assuming that the directory `assets` doesn't exist, the following code
+  // produces this diagnostic because it's listed as a directory containing
+  // assets:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets:
+  //     - assets/
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the path is correct, then create a directory at that path.
+  //
+  // If the path isn't correct, then change the path to match the path of the
+  // directory containing the assets.
+  static const PubspecWarningCode ASSET_DIRECTORY_DOES_NOT_EXIST =
+      PubspecWarningCode(
+    'ASSET_DIRECTORY_DOES_NOT_EXIST',
+    "The asset directory '{0}' doesn't exist.",
+    correction:
+        "Try creating the directory or fixing the path to the directory.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the path to the asset as given in the file.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an asset list contains a value
+  // referencing a file that doesn't exist.
+  //
+  // #### Example
+  //
+  // Assuming that the file `doesNotExist.gif` doesn't exist, the following code
+  // produces this diagnostic because it's listed as an asset:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets:
+  //     - doesNotExist.gif
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the path is correct, then create a file at that path.
+  //
+  // If the path isn't correct, then change the path to match the path of the
+  // file containing the asset.
+  static const PubspecWarningCode ASSET_DOES_NOT_EXIST = PubspecWarningCode(
+    'ASSET_DOES_NOT_EXIST',
+    "The asset file '{0}' doesn't exist.",
+    correction: "Try creating the file or fixing the path to the file.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of the `asset` key
+  // isn't a list.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the value of the assets
+  // key is a string when a list is expected:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets: assets/
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the value of the asset list so that it's a list:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets:
+  //     - assets/
+  // ```
+  static const PubspecWarningCode ASSET_FIELD_NOT_LIST = PubspecWarningCode(
+    'ASSET_FIELD_NOT_LIST',
+    "The value of the 'asset' field is expected to be a list of relative file paths.",
+    correction: "Try converting the value to be a list of relative file paths.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an asset list contains a value
+  // that isn't a string.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the asset list contains
+  // a map:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets:
+  //     - image.gif: true
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the asset list so that it only contains valid POSIX-style file
+  // paths:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   assets:
+  //     - image.gif
+  // ```
+  static const PubspecWarningCode ASSET_NOT_STRING = PubspecWarningCode(
+    'ASSET_NOT_STRING',
+    "Assets are required to be file paths (strings).",
+    correction: "Try converting the value to be a string.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of either the
+  // `dependencies` or `dev_dependencies` key isn't a map.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the value of the
+  // top-level `dependencies` key is a list:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   - meta
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use a map as the value of the `dependencies` key:
+  //
+  // ```yaml
+  // %uri='pubspec.yaml'
+  // name: example
+  // dependencies:
+  //   meta: ^1.0.2
+  // ```
+  static const PubspecWarningCode DEPENDENCIES_FIELD_NOT_MAP =
+      PubspecWarningCode(
+    'DEPENDENCIES_FIELD_NOT_MAP',
+    "The value of the '{0}' field is expected to be a map.",
+    correction: "Try converting the value to be a map.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key is used in a
+  // `pubspec.yaml` file that was deprecated. Unused keys take up space and
+  // might imply semantics that are no longer valid.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the `author` key is no
+  // longer being used:
+  //
+  // ```dart
+  // %uri="pubspec.yaml"
+  // name: example
+  // author: 'Dash'
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the deprecated key:
+  //
+  // ```dart
+  // %uri="pubspec.yaml"
+  // name: example
+  // ```
+  static const PubspecWarningCode DEPRECATED_FIELD = PubspecWarningCode(
+    'DEPRECATED_FIELD',
+    "The '{0}' field is no longer used and can be removed.",
+    correction: "Try removing the field.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of the `flutter` key
+  // isn't a map.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the value of the
+  // top-level `flutter` key is a string:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter: true
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to specify Flutter-specific options, then change the value to
+  // be a map:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // flutter:
+  //   uses-material-design: true
+  // ```
+  //
+  // If you don't need to specify Flutter-specific options, then remove the
+  // `flutter` key:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // ```
+  static const PubspecWarningCode FLUTTER_FIELD_NOT_MAP = PubspecWarningCode(
+    'FLUTTER_FIELD_NOT_MAP',
+    "The value of the 'flutter' field is expected to be a map.",
+    correction: "Try converting the value to be a map.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the kind of dependency.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a package under either
+  // `dependencies` or `dev_dependencies` is not a pub, `git`, or `path` based
+  // dependency.
+  //
+  // See [Package dependencies](https://dart.dev/tools/pub/dependencies) for
+  // more information about the kind of dependencies that are supported.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the dependency on the
+  // package `transmogrify` is not a pub, `git`, or `path` based dependency:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   transmogrify:
+  //     hosted:
+  //       name: transmogrify
+  //       url: http://your-package-server.com
+  //     version: ^1.4.0
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to publish your package to `pub.dev`, then change the
+  // dependencies to ones that are supported by `pub`.
+  //
+  // If you don't want to publish your package to `pub.dev`, then add a
+  // `publish_to: none` entry to mark the package as one that isn't intended to
+  // be published:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // publish_to: none
+  // dependencies:
+  //   transmogrify:
+  //     hosted:
+  //       name: transmogrify
+  //       url: http://your-package-server.com
+  //     version: ^1.4.0
+  // ```
+  static const PubspecWarningCode INVALID_DEPENDENCY = PubspecWarningCode(
+    'INVALID_DEPENDENCY',
+    "Publishable packages can't have '{0}' dependencies.",
+    correction:
+        "Try adding a 'publish_to: none' entry to mark the package as not for publishing or remove the {0} dependency.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's no top-level `name` key.
+  // The `name` key provides the name of the package, which is required.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the package doesn't
+  // have a name:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // dependencies:
+  //   meta: ^1.0.2
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add the top-level key `name` with a value that's the name of the package:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   meta: ^1.0.2
+  // ```
+  static const PubspecWarningCode MISSING_NAME = PubspecWarningCode(
+    'MISSING_NAME',
+    "The 'name' field is required but missing.",
+    correction: "Try adding a field named 'name'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the top-level `name` key has a
+  // value that isn't a string.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the value following the
+  // `name` key is a list:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name:
+  //   - example
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the value with a string:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // ```
+  static const PubspecWarningCode NAME_NOT_STRING = PubspecWarningCode(
+    'NAME_NOT_STRING',
+    "The value of the 'name' field is required to be a string.",
+    correction: "Try converting the value to be a string.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the path to the dependency as given in the file.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a dependency has a `path` key
+  // referencing a directory that doesn't exist.
+  //
+  // #### Example
+  //
+  // Assuming that the directory `doesNotExist` doesn't exist, the following
+  // code produces this diagnostic because it's listed as the path of a package:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   local_package:
+  //     path: doesNotExist
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the path is correct, then create a directory at that path.
+  //
+  // If the path isn't correct, then change the path to match the path to the
+  // root of the package.
+  static const PubspecWarningCode PATH_DOES_NOT_EXIST = PubspecWarningCode(
+    'PATH_DOES_NOT_EXIST',
+    "The path '{0}' doesn't exist.",
+    correction: "Try creating the referenced path or using a path that exists.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the path as given in the file.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a dependency has a `path` key
+  // whose value is a string, but isn't a POSIX-style path.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the path following the
+  // `path` key is a Windows path:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   local_package:
+  //     path: E:\local_package
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Convert the path to a POSIX path.
+  static const PubspecWarningCode PATH_NOT_POSIX = PubspecWarningCode(
+    'PATH_NOT_POSIX',
+    "The path '{0}' isn't a POSIX-style path.",
+    correction: "Try converting the value to a POSIX-style path.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the path to the dependency as given in the file.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a dependency has a `path` key
+  // that references a directory that doesn't contain a `pubspec.yaml` file.
+  //
+  // #### Example
+  //
+  // Assuming that the directory `local_package` doesn't contain a file named
+  // `pubspec.yaml`, the following code produces this diagnostic because it's
+  // listed as the path of a package:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: example
+  // dependencies:
+  //   local_package:
+  //     path: local_package
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the path is intended to be the root of a package, then add a
+  // `pubspec.yaml` file in the directory:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // name: local_package
+  // ```
+  //
+  // If the path is wrong, then replace it with a the correct path.
+  static const PubspecWarningCode PATH_PUBSPEC_DOES_NOT_EXIST =
+      PubspecWarningCode(
+    'PATH_PUBSPEC_DOES_NOT_EXIST',
+    "The directory '{0}' doesn't contain a pubspec.",
+    correction:
+        "Try creating a pubspec in the referenced directory or using a path that has a pubspec.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the package in the dev_dependency list.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's an entry under
+  // `dev_dependencies` for a package that is also listed under `dependencies`.
+  // The packages under `dependencies` are available to all of the code in the
+  // package, so there's no need to also list them under `dev_dependencies`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the package `meta` is
+  // listed under both `dependencies` and `dev_dependencies`:
+  //
+  // ```yaml
+  // %uri='pubspec.yaml'
+  // name: example
+  // dependencies:
+  //   meta: ^1.0.2
+  // dev_dependencies:
+  //   meta: ^1.0.2
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the entry under `dev_dependencies` (and the `dev_dependencies` key
+  // if that's the only package listed there):
+  //
+  // ```yaml
+  // %uri='pubspec.yaml'
+  // name: example
+  // dependencies:
+  //   meta: ^1.0.2
+  // ```
+  static const PubspecWarningCode UNNECESSARY_DEV_DEPENDENCY =
+      PubspecWarningCode(
+    'UNNECESSARY_DEV_DEPENDENCY',
+    "The dev dependency on {0} is unnecessary because there is also a normal dependency on that package.",
+    correction: "Try removing the dev dependency.",
+    hasPublishedDocs: true,
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const PubspecWarningCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'PubspecWarningCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/services/available_declarations.dart b/pkg/analyzer/lib/src/services/available_declarations.dart
index 715eef2..588b150 100644
--- a/pkg/analyzer/lib/src/services/available_declarations.dart
+++ b/pkg/analyzer/lib/src/services/available_declarations.dart
@@ -1694,7 +1694,7 @@
             returnType: _getTypeAnnotationString(functionType.returnType),
             typeParameters: functionType.typeParameters?.toSource(),
           );
-        } else if (type is TypeName && type.name.name.isNotEmpty) {
+        } else if (type is NamedType && type.name.name.isNotEmpty) {
           addDeclaration(
             isDeprecated: isDeprecated,
             kind: DeclarationKind.TYPE_ALIAS,
diff --git a/pkg/analyzer/lib/src/source/package_map_resolver.dart b/pkg/analyzer/lib/src/source/package_map_resolver.dart
index 86bf901..0feee31 100644
--- a/pkg/analyzer/lib/src/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/src/source/package_map_resolver.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:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/util/asserts.dart' as asserts;
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 4d7e28d..75c773b 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -73,6 +73,12 @@
   /// Right: location.
   IS_REFERENCED_BY,
 
+  /// Left: a constructor.
+  ///   Is referenced by a constructor tear-off at, which is special because
+  ///   the name of the constructor is required (`new` for unnamed).
+  /// Right: location.
+  IS_REFERENCED_BY_CONSTRUCTOR_TEAR_OFF,
+
   /// Left: unresolved member name.
   ///   Is read at.
   /// Right: location.
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index ea3274f..ee5b366 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -545,6 +545,12 @@
   /// Right: location.
   IS_REFERENCED_BY,
 
+  /// Left: a constructor.
+  ///   Is referenced by a constructor tear-off at, which is special because
+  ///   the name of the constructor is required (`new` for unnamed).
+  /// Right: location.
+  IS_REFERENCED_BY_CONSTRUCTOR_TEAR_OFF,
+
   /// Left: unresolved member name.
   ///   Is read at.
   /// Right: location.
@@ -558,7 +564,7 @@
   /// Left: unresolved member name.
   ///   Is written at.
   /// Right: location.
-  IS_WRITTEN_BY
+  IS_WRITTEN_BY,
 }
 
 /// When we need to reference a synthetic element in [PackageIndex] we use a
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index adff68e..557f22c 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary2/package_bundle_format.dart';
 
 /// A [ConflictingSummaryException] indicates that two different summaries
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_flags.dart b/pkg/analyzer/lib/src/summary2/ast_binary_flags.dart
index 8feb2f2..19cf6cf 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_flags.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_flags.dart
@@ -76,8 +76,8 @@
     FieldFormalParameter,
     GenericFunctionType,
     IndexExpression,
+    NamedType,
     PropertyAccess,
-    TypeName,
   );
 
   static final _hasSeparatorColon = _checkBit(
@@ -98,8 +98,8 @@
 
   static final _hasTypeArguments = _checkBit(
     0,
+    NamedType,
     TypedLiteral,
-    TypeName,
   );
 
   static final _isAbstract = _checkBit(
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index a75433d..f5a151f 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -165,8 +165,8 @@
         return _readTypeArgumentList();
       case Tag.TypeLiteral:
         return _readTypeLiteral();
-      case Tag.TypeName:
-        return _readTypeName();
+      case Tag.NamedType:
+        return _readNamedType();
       case Tag.TypeParameter:
         return _readTypeParameter();
       case Tag.TypeParameterList:
@@ -331,7 +331,7 @@
   }
 
   ConstructorName _readConstructorName() {
-    var type = readNode() as TypeName;
+    var type = readNode() as NamedType;
     var name = _readOptionalNode() as SimpleIdentifier?;
 
     var node = astFactory.constructorName(
@@ -805,14 +805,20 @@
     var typeArguments = _readOptionalNode() as TypeArgumentList?;
     var arguments = readNode() as ArgumentList;
 
+    Token? operator;
+    if (AstBinaryFlags.hasQuestion(flags)) {
+      operator = AstBinaryFlags.hasPeriod(flags)
+          ? Tokens.questionPeriod()
+          : Tokens.questionPeriodPeriod();
+    } else if (AstBinaryFlags.hasPeriod(flags)) {
+      operator = Tokens.period();
+    } else if (AstBinaryFlags.hasPeriod2(flags)) {
+      operator = Tokens.periodPeriod();
+    }
+
     var node = astFactory.methodInvocation(
       target,
-      Tokens.choose(
-        AstBinaryFlags.hasPeriod(flags),
-        Tokens.period(),
-        AstBinaryFlags.hasPeriod2(flags),
-        Tokens.periodPeriod(),
-      ),
+      operator,
       methodName,
       typeArguments,
       arguments,
@@ -858,6 +864,20 @@
     return node;
   }
 
+  NamedType _readNamedType() {
+    var flags = _readByte();
+    var name = readNode() as Identifier;
+    var typeArguments = _readOptionalNode() as TypeArgumentList?;
+
+    var node = astFactory.namedType(
+      name: name,
+      typeArguments: typeArguments,
+      question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
+    );
+    node.type = _reader.readType();
+    return node;
+  }
+
   List<T> _readNodeList<T>() {
     var length = _reader.readUInt30();
     return List.generate(length, (_) => readNode() as T);
@@ -1142,26 +1162,12 @@
   }
 
   TypeLiteral _readTypeLiteral() {
-    var typeName = readNode() as TypeName;
+    var typeName = readNode() as NamedType;
     var node = astFactory.typeLiteral(typeName: typeName);
     _readExpressionResolution(node);
     return node;
   }
 
-  TypeName _readTypeName() {
-    var flags = _readByte();
-    var name = readNode() as Identifier;
-    var typeArguments = _readOptionalNode() as TypeArgumentList?;
-
-    var node = astFactory.typeName(
-      name,
-      typeArguments,
-      question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
-    );
-    node.type = _reader.readType();
-    return node;
-  }
-
   TypeParameter _readTypeParameter() {
     var name = _readDeclarationName();
     var bound = _readOptionalNode() as TypeAnnotation?;
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart b/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
index 91f911c..dfb26a2 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
@@ -72,6 +72,7 @@
   static const int MethodInvocation = 59;
   static const int MixinDeclaration = 67;
   static const int NamedExpression = 60;
+  static const int NamedType = 39;
   static const int NullLiteral = 49;
   static const int ParenthesizedExpression = 53;
   static const int PostfixExpression = 94;
@@ -93,7 +94,6 @@
   static const int ThrowExpression = 81;
   static const int TypeArgumentList = 38;
   static const int TypeLiteral = 102;
-  static const int TypeName = 39;
   static const int TypeParameter = 40;
   static const int TypeParameterList = 41;
   static const int VariableDeclaration = 42;
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
index 6287bc4..6ad2224 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -166,7 +166,7 @@
     // We need to inform the applier about the right shape of the AST.
     // _sink.writeByte(node.name != null ? 1 : 0);
 
-    _writeNode(node.type);
+    _writeNode(node.type2);
     _writeOptionalNode(node.name);
 
     _sink.writeElement(node.staticElement);
@@ -485,12 +485,18 @@
   void visitMethodInvocation(MethodInvocation node) {
     _writeByte(Tag.MethodInvocation);
 
+    var operatorType = node.operator?.type;
     _writeByte(
       AstBinaryFlags.encode(
-        hasPeriod: node.operator?.type == TokenType.PERIOD,
-        hasPeriod2: node.operator?.type == TokenType.PERIOD_PERIOD,
+        hasPeriod: operatorType == TokenType.PERIOD ||
+            operatorType == TokenType.QUESTION_PERIOD,
+        hasPeriod2: operatorType == TokenType.PERIOD_PERIOD ||
+            operatorType == TokenType.QUESTION_PERIOD_PERIOD,
+        hasQuestion: operatorType == TokenType.QUESTION_PERIOD ||
+            operatorType == TokenType.QUESTION_PERIOD_PERIOD,
       ),
     );
+
     _writeOptionalNode(node.target);
     _writeNode(node.methodName);
     _storeInvocationExpression(node);
@@ -507,6 +513,23 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _writeByte(Tag.NamedType);
+
+    _writeByte(
+      AstBinaryFlags.encode(
+        hasQuestion: node.question != null,
+        hasTypeArguments: node.typeArguments != null,
+      ),
+    );
+
+    _writeNode(node.name);
+    _writeOptionalNode(node.typeArguments);
+
+    _sink.writeType(node.type);
+  }
+
+  @override
   void visitNullLiteral(NullLiteral node) {
     _writeByte(Tag.NullLiteral);
     _storeExpression(node);
@@ -721,28 +744,11 @@
   @override
   void visitTypeLiteral(TypeLiteral node) {
     _writeByte(Tag.TypeLiteral);
-    _writeNode(node.typeName);
+    _writeNode(node.type);
     _storeExpression(node);
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    _writeByte(Tag.TypeName);
-
-    _writeByte(
-      AstBinaryFlags.encode(
-        hasQuestion: node.question != null,
-        hasTypeArguments: node.typeArguments != null,
-      ),
-    );
-
-    _writeNode(node.name);
-    _writeOptionalNode(node.typeArguments);
-
-    _sink.writeType(node.type);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _writeByte(Tag.TypeParameter);
     _writeDeclarationName(node.name);
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
index 52f9b94e..b763df3 100644
--- a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -28,6 +28,7 @@
   void visitAnnotation(Annotation node) {
     _token(node.atSign);
     node.name.accept(this);
+    node.typeArguments?.accept(this);
     _token(node.period);
     node.constructorName?.accept(this);
     node.arguments?.accept(this);
@@ -164,7 +165,7 @@
     node.name.accept(this);
     node.typeParameters?.accept(this);
     _token(node.equals);
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
     node.withClause.accept(this);
     node.implementsClause?.accept(this);
     _token(node.semicolon);
@@ -228,12 +229,17 @@
 
   @override
   void visitConstructorName(ConstructorName node) {
-    node.type.accept(this);
+    node.type2.accept(this);
     _token(node.period);
     node.name?.accept(this);
   }
 
   @override
+  void visitConstructorReference(ConstructorReference node) {
+    node.constructorName.accept(this);
+  }
+
+  @override
   void visitContinueStatement(ContinueStatement node) {
     _token(node.continueKeyword);
     node.label?.accept(this);
@@ -330,7 +336,7 @@
   @override
   void visitExtendsClause(ExtendsClause node) {
     _token(node.extendsKeyword);
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
   }
 
   @override
@@ -342,6 +348,8 @@
     node.typeParameters?.accept(this);
     _token(node.onKeyword);
     node.extendedType.accept(this);
+    node.showClause?.accept(this);
+    node.hideClause?.accept(this);
     _token(node.leftBracket);
     node.members.accept(this);
     _token(node.rightBracket);
@@ -485,6 +493,12 @@
   }
 
   @override
+  void visitFunctionReference(FunctionReference node) {
+    node.function.accept(this);
+    node.typeArguments?.accept(this);
+  }
+
+  @override
   void visitFunctionTypeAlias(FunctionTypeAlias node) {
     _compilationUnitMember(node);
     _token(node.typedefKeyword);
@@ -556,7 +570,7 @@
   @override
   void visitImplementsClause(ImplementsClause node) {
     _token(node.implementsKeyword);
-    _nodeList(node.interfaces, node.endToken.next);
+    _nodeList(node.interfaces2, node.endToken.next);
   }
 
   @override
@@ -697,6 +711,13 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    node.name.accept(this);
+    node.typeArguments?.accept(this);
+    _token(node.question);
+  }
+
+  @override
   void visitNativeClause(NativeClause node) {
     _token(node.nativeKeyword);
     node.name?.accept(this);
@@ -717,7 +738,7 @@
   @override
   void visitOnClause(OnClause node) {
     _token(node.onKeyword);
-    _nodeList(node.superclassConstraints, node.endToken.next);
+    _nodeList(node.superclassConstraints2, node.endToken.next);
   }
 
   @override
@@ -930,13 +951,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    node.name.accept(this);
-    node.typeArguments?.accept(this);
-    _token(node.question);
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _declaration(node);
     // TODO (kallentu) : Clean up TypeParameterImpl casting once variance is
@@ -989,7 +1003,7 @@
   @override
   void visitWithClause(WithClause node) {
     _token(node.withKeyword);
-    _nodeList(node.mixinTypes, node.endToken.next);
+    _nodeList(node.mixinTypes2, node.endToken.next);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index 8767463..bd9248b 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -18,7 +18,6 @@
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/macro/impl/error.dart' as macro;
 import 'package:analyzer/src/summary2/ast_binary_reader.dart';
 import 'package:analyzer/src/summary2/ast_binary_tag.dart';
 import 'package:analyzer/src/summary2/data_reader.dart';
@@ -31,16 +30,16 @@
 
 class BundleReader {
   final SummaryDataReader _reader;
-  final Map<Uri, InformativeUnitData> _unitsInformativeData;
+  final Map<Uri, Uint8List> _unitsInformativeBytes;
 
   final Map<String, LibraryReader> libraryMap = {};
 
   BundleReader({
     required LinkedElementFactory elementFactory,
     required Uint8List resolutionBytes,
-    Map<Uri, InformativeUnitData> unitsInformativeData = const {},
+    Map<Uri, Uint8List> unitsInformativeBytes = const {},
   })  : _reader = SummaryDataReader(resolutionBytes),
-        _unitsInformativeData = unitsInformativeData {
+        _unitsInformativeBytes = unitsInformativeBytes {
     _reader.offset = _reader.bytes.length - 4 * 4;
     var baseResolutionOffset = _reader.readUInt32();
     var librariesOffset = _reader.readUInt32();
@@ -70,7 +69,7 @@
       libraryMap[uriStr] = LibraryReader._(
         elementFactory: elementFactory,
         reader: _reader,
-        unitsInformativeData: _unitsInformativeData,
+        unitsInformativeBytes: _unitsInformativeBytes,
         baseResolutionOffset: baseResolutionOffset,
         referenceReader: referenceReader,
         reference: reference,
@@ -413,12 +412,11 @@
 class LibraryReader {
   final LinkedElementFactory _elementFactory;
   final SummaryDataReader _reader;
-  final Map<Uri, InformativeUnitData> _unitsInformativeData;
+  final Map<Uri, Uint8List> _unitsInformativeBytes;
   final int _baseResolutionOffset;
   final _ReferenceReader _referenceReader;
   final Reference _reference;
   final int _offset;
-  final Map<int, MacroGenerationData> _macroDeclarations = {};
 
   final Uint32List _classMembersLengths;
   int _classMembersLengthsIndex = 0;
@@ -428,7 +426,7 @@
   LibraryReader._({
     required LinkedElementFactory elementFactory,
     required SummaryDataReader reader,
-    required Map<Uri, InformativeUnitData> unitsInformativeData,
+    required Map<Uri, Uint8List> unitsInformativeBytes,
     required int baseResolutionOffset,
     required _ReferenceReader referenceReader,
     required Reference reference,
@@ -436,7 +434,7 @@
     required Uint32List classMembersLengths,
   })  : _elementFactory = elementFactory,
         _reader = reader,
-        _unitsInformativeData = unitsInformativeData,
+        _unitsInformativeBytes = unitsInformativeBytes,
         _baseResolutionOffset = baseResolutionOffset,
         _referenceReader = referenceReader,
         _reference = reference,
@@ -494,10 +492,8 @@
 
     _declareDartCoreDynamicNever();
 
-    InformativeDataApplier(_elementFactory).applyTo(
-      _unitsInformativeData,
-      libraryElement,
-    );
+    InformativeDataApplier(_elementFactory, _unitsInformativeBytes)
+        .applyTo(libraryElement);
 
     return libraryElement;
   }
@@ -529,10 +525,6 @@
     element.setLinkedData(reference, linkedData);
     ClassElementFlags.read(_reader, element);
 
-    element.macroExecutionErrors = _reader.readTypedList(
-      _readMacroExecutionError,
-    );
-
     element.typeParameters = _readTypeParameters();
 
     if (!element.isMixinApplication) {
@@ -595,7 +587,6 @@
       element.setLinkedData(reference, linkedData);
       ConstructorElementFlags.read(_reader, element);
       element.parameters = _readParameters(element, reference);
-      _readMacro(element, element);
       return element;
     });
   }
@@ -765,9 +756,6 @@
 
     FieldElementFlags.read(_reader, element);
     element.typeInferenceError = _readTopLevelInferenceError();
-    element.macroExecutionErrors = _reader.readTypedList(
-      _readMacroExecutionError,
-    );
     element.createImplicitAccessors(classReference, name);
 
     return element;
@@ -859,29 +847,6 @@
     return LibraryLanguageVersion(package: package, override: override);
   }
 
-  void _readMacro(Element element, HasMacroGenerationData hasMacro) {
-    var id = _reader.readOptionalUInt30();
-    if (id != null) {
-      var data = _macroDeclarations[id]!;
-      hasMacro.macro = data;
-      InformativeDataApplier(
-        _elementFactory,
-        baseOffset: data.codeOffset,
-      ).applyToDeclaration(
-        element,
-        data.informative,
-      );
-    }
-  }
-
-  macro.MacroExecutionError _readMacroExecutionError() {
-    return macro.MacroExecutionError(
-      annotationIndex: _reader.readUInt30(),
-      macroName: _reader.readStringReference(),
-      message: _reader.readStringReference(),
-    );
-  }
-
   List<MethodElementImpl> _readMethods(
     CompilationUnitElementImpl unitElement,
     ElementImpl enclosingElement,
@@ -905,7 +870,6 @@
       element.typeParameters = _readTypeParameters();
       element.parameters = _readParameters(element, reference);
       element.typeInferenceError = _readTopLevelInferenceError();
-      _readMacro(element, element);
       return element;
     });
   }
@@ -1047,7 +1011,6 @@
     element.setLinkedData(reference, linkedData);
 
     element.parameters = _readParameters(element, reference);
-    _readMacro(element, element);
     return element;
   }
 
@@ -1266,9 +1229,7 @@
 
     unitElement.uri = _reader.readOptionalStringReference();
     unitElement.isSynthetic = _reader.readBool();
-    unitElement.sourceContent = _reader.readOptionalStringUtf8();
 
-    _readUnitMacroGenerationDataList(unitElement);
     _readClasses(unitElement, unitReference);
     _readEnums(unitElement, unitReference);
     _readExtensions(unitElement, unitReference);
@@ -1286,28 +1247,6 @@
     return unitElement;
   }
 
-  void _readUnitMacroGenerationDataList(
-    CompilationUnitElementImpl unitElement,
-  ) {
-    var length = _reader.readUInt30();
-    if (length == 0) {
-      return;
-    }
-
-    var dataList = List.generate(length, (index) {
-      return MacroGenerationData(
-        id: _reader.readUInt30(),
-        code: _reader.readStringUtf8(),
-        informative: _reader.readUint8List(),
-        classDeclarationIndex: _reader.readOptionalUInt30(),
-      );
-    });
-    unitElement.macroGenerationDataList = dataList;
-    for (var data in dataList) {
-      _macroDeclarations[data.id] = data;
-    }
-  }
-
   static Variance? _decodeVariance(int index) {
     var tag = TypeParameterVarianceTag.values[index];
     switch (tag) {
diff --git a/pkg/analyzer/lib/src/summary2/bundle_writer.dart b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
index 3103c35..f6fdf85 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
@@ -14,7 +14,6 @@
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
-import 'package:analyzer/src/macro/impl/error.dart' as macro;
 import 'package:analyzer/src/summary2/ast_binary_tag.dart';
 import 'package:analyzer/src/summary2/ast_binary_writer.dart';
 import 'package:analyzer/src/summary2/data_writer.dart';
@@ -130,11 +129,6 @@
     _sink._writeStringReference(element.name);
     ClassElementFlags.write(_sink, element);
 
-    _writeList(
-      element.macroExecutionErrors,
-      _sink._writeMacroExecutionError,
-    );
-
     _resolutionSink._writeAnnotationList(element.metadata);
 
     _writeTypeParameters(element.typeParameters, () {
@@ -168,7 +162,6 @@
 
     _resolutionSink.localElements.withElements(element.parameters, () {
       _writeList(element.parameters, _writeParameterElement);
-      _writeMacro(element.macro);
       _resolutionSink.writeElement(element.redirectedConstructor);
       _resolutionSink._writeNodeList(element.constantInitializers);
     });
@@ -231,10 +224,6 @@
     _sink.writeBool(element is ConstFieldElementImpl);
     FieldElementFlags.write(_sink, element);
     _sink._writeTopLevelInferenceError(element.typeInferenceError);
-    _writeList(
-      element.macroExecutionErrors,
-      _sink._writeMacroExecutionError,
-    );
     _resolutionSink._writeAnnotationList(element.metadata);
     _resolutionSink.writeType(element.type);
     _resolutionSink._writeOptionalNode(element.constantInitializer);
@@ -285,10 +274,6 @@
     }
   }
 
-  void _writeMacro(MacroGenerationData? macro) {
-    _sink.writeOptionalUInt30(macro?.id);
-  }
-
   void _writeMethodElement(MethodElement element) {
     element as MethodElementImpl;
     _sink.writeUInt30(_resolutionSink.offset);
@@ -302,8 +287,6 @@
       _sink._writeTopLevelInferenceError(element.typeInferenceError);
       _resolutionSink.writeType(element.returnType);
     });
-
-    _writeMacro(element.macro);
   }
 
   void _writeMixinElement(ClassElement element) {
@@ -378,9 +361,7 @@
 
     _resolutionSink._writeAnnotationList(element.metadata);
     _resolutionSink.writeType(element.returnType);
-
     _writeList(element.parameters, _writeParameterElement);
-    _writeMacro(element.macro);
   }
 
   void _writeReferences(List<Reference> references) {
@@ -449,9 +430,7 @@
     _sink._writeStringReference('${unitElement.source.uri}');
     _sink._writeOptionalStringReference(unitElement.uri);
     _sink.writeBool(unitElement.isSynthetic);
-    _sink.writeOptionalStringUtf8(unitElement.sourceContent);
     _resolutionSink._writeAnnotationList(unitElement.metadata);
-    _writeUnitElementMacroGenerationDataList(unitElement);
     _writeList(unitElement.classes, _writeClassElement);
     _writeList(unitElement.enums, _writeEnumElement);
     _writeList(unitElement.extensions, _writeExtensionElement);
@@ -471,18 +450,6 @@
     );
   }
 
-  void _writeUnitElementMacroGenerationDataList(
-    CompilationUnitElementImpl unitElement,
-  ) {
-    var dataList = unitElement.macroGenerationDataList ?? [];
-    _writeList<MacroGenerationData>(dataList, (data) {
-      _sink.writeUInt30(data.id);
-      _sink.writeStringUtf8(data.code);
-      _sink.writeUint8List(data.informative);
-      _sink.writeOptionalUInt30(data.classDeclarationIndex);
-    });
-  }
-
   static TypeParameterVarianceTag _encodeVariance(
       TypeParameterElementImpl element) {
     if (element.isLegacyCovariant) {
@@ -984,12 +951,6 @@
     }
   }
 
-  void _writeMacroExecutionError(macro.MacroExecutionError error) {
-    writeUInt30(error.annotationIndex);
-    _writeStringReference(error.macroName);
-    _writeStringReference(error.message);
-  }
-
   void _writeOptionalStringReference(String? value) {
     if (value != null) {
       writeBool(true);
diff --git a/pkg/analyzer/lib/src/summary2/default_types_builder.dart b/pkg/analyzer/lib/src/summary2/default_types_builder.dart
index 388c95b..356de04 100644
--- a/pkg/analyzer/lib/src/summary2/default_types_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/default_types_builder.dart
@@ -122,7 +122,7 @@
             current != null && step < typeParameters.length;
             ++step) {
           var bound = current.bound;
-          if (bound is TypeName) {
+          if (bound is NamedType) {
             var typeNameIdentifier = bound.name;
             if (typeNameIdentifier is SimpleIdentifier) {
               current = typeParametersByName[typeNameIdentifier.name];
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index a503d40..c375b8c 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -89,19 +89,6 @@
     }
   }
 
-  /// Build elements for [members] and add into the [element].
-  void buildMacroClassMembers(
-    ClassElementImpl element,
-    List<ClassMember> members,
-  ) {
-    var holder = _buildClassMembers(element, members);
-
-    element.accessors.addAll(holder.propertyAccessors);
-    element.constructors.addAll(holder.constructors);
-    element.fields.addAll(holder.properties.whereType<FieldElementImpl>());
-    element.methods.addAll(holder.methods);
-  }
-
   @override
   void visitClassDeclaration(covariant ClassDeclarationImpl node) {
     var nameNode = node.name;
@@ -161,7 +148,7 @@
       }
     });
 
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
     node.withClause.accept(this);
     node.implementsClause?.accept(this);
   }
@@ -240,7 +227,7 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
   }
 
   @override
@@ -601,7 +588,7 @@
 
   @override
   void visitImplementsClause(ImplementsClause node) {
-    node.interfaces.accept(this);
+    node.interfaces2.accept(this);
   }
 
   @override
@@ -745,8 +732,13 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    node.typeArguments?.accept(this);
+  }
+
+  @override
   void visitOnClause(OnClause node) {
-    node.superclassConstraints.accept(this);
+    node.superclassConstraints2.accept(this);
   }
 
   @override
@@ -868,11 +860,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    node.typeArguments?.accept(this);
-  }
-
-  @override
   void visitTypeParameter(covariant TypeParameterImpl node) {
     var nameNode = node.name;
     var name = nameNode.name;
@@ -895,7 +882,7 @@
 
   @override
   void visitWithClause(WithClause node) {
-    node.mixinTypes.accept(this);
+    node.mixinTypes2.accept(this);
   }
 
   List<ElementAnnotation> _buildAnnotations(List<Annotation> nodeList) {
@@ -903,7 +890,7 @@
   }
 
   _EnclosingContext _buildClassMembers(
-      ElementImpl element, List<ClassMember> members) {
+      ElementImpl element, NodeList<ClassMember> members) {
     var hasConstConstructor = members.any((e) {
       return e is ConstructorDeclaration && e.constKeyword != null;
     });
@@ -919,9 +906,29 @@
     var element = node.declaredElement as ClassElementImpl;
     var holder = _buildClassMembers(element, node.members);
     element.accessors = holder.propertyAccessors;
-    element.constructors = holder.constructors;
     element.fields = holder.properties.whereType<FieldElement>().toList();
     element.methods = holder.methods;
+
+    var constructors = holder.constructors;
+    if (constructors.isEmpty) {
+      var containerRef = element.reference!.getChild('@constructor');
+      constructors = [
+        ConstructorElementImpl('', -1)
+          ..isSynthetic = true
+          ..reference = containerRef.getChild(''),
+      ];
+    }
+    element.constructors = constructors;
+
+    // We have all fields and constructors.
+    // Now we can resolve field formal parameters.
+    for (var constructor in constructors) {
+      for (var parameter in constructor.parameters) {
+        if (parameter is FieldFormalParameterElementImpl) {
+          parameter.field = element.getField(parameter.name);
+        }
+      }
+    }
   }
 
   void _buildExecutableElementChildren({
@@ -1025,7 +1032,9 @@
   bool _shouldBeConstField(FieldDeclaration node) {
     var fields = node.fields;
     return fields.isConst ||
-        fields.isFinal && _enclosingContext.hasConstConstructor;
+        !node.isStatic &&
+            fields.isFinal &&
+            _enclosingContext.hasConstConstructor;
   }
 
   void _visitPropertyFirst<T extends AstNode>(List<AstNode> nodes) {
diff --git a/pkg/analyzer/lib/src/summary2/element_flags.dart b/pkg/analyzer/lib/src/summary2/element_flags.dart
index 529a06f..e808000 100644
--- a/pkg/analyzer/lib/src/summary2/element_flags.dart
+++ b/pkg/analyzer/lib/src/summary2/element_flags.dart
@@ -8,8 +8,8 @@
 
 class ClassElementFlags {
   static const int _isAbstract = 1 << 0;
-  static const int _isMixinApplication = 1 << 2;
-  static const int _isSimplyBounded = 1 << 3;
+  static const int _isMixinApplication = 1 << 1;
+  static const int _isSimplyBounded = 1 << 2;
 
   static void read(SummaryDataReader reader, ClassElementImpl element) {
     var byte = reader.readByte();
@@ -60,8 +60,8 @@
   static const int _isCovariant = 1 << 5;
   static const int _isExternal = 1 << 6;
   static const int _isFinal = 1 << 7;
-  static const int _isLate = 1 << 9;
-  static const int _isStatic = 1 << 10;
+  static const int _isLate = 1 << 8;
+  static const int _isStatic = 1 << 9;
 
   static void read(SummaryDataReader reader, FieldElementImpl element) {
     var byte = reader.readUInt30();
@@ -161,8 +161,8 @@
   static const int _isAbstract = 1 << 1;
   static const int _isAsynchronous = 1 << 2;
   static const int _isExternal = 1 << 3;
-  static const int _isGenerator = 1 << 5;
-  static const int _isStatic = 1 << 6;
+  static const int _isGenerator = 1 << 4;
+  static const int _isStatic = 1 << 5;
 
   static void read(SummaryDataReader reader, MethodElementImpl element) {
     var byte = reader.readByte();
@@ -217,8 +217,8 @@
   static const int _isAbstract = 1 << 3;
   static const int _isAsynchronous = 1 << 4;
   static const int _isExternal = 1 << 5;
-  static const int _isGenerator = 1 << 7;
-  static const int _isStatic = 1 << 8;
+  static const int _isGenerator = 1 << 6;
+  static const int _isStatic = 1 << 7;
 
   static void read(
     SummaryDataReader reader,
diff --git a/pkg/analyzer/lib/src/summary2/informative_data.dart b/pkg/analyzer/lib/src/summary2/informative_data.dart
index 23218d0..c592b1f 100644
--- a/pkg/analyzer/lib/src/summary2/informative_data.dart
+++ b/pkg/analyzer/lib/src/summary2/informative_data.dart
@@ -19,15 +19,6 @@
 import 'package:analyzer/src/util/comment.dart';
 import 'package:collection/collection.dart';
 
-/// Write the informative data (mostly offsets) of the given [node].
-/// Throw [UnimplementedError] if [node] is not supported.
-Uint8List writeDeclarationInformative(AstNode node) {
-  var byteSink = ByteSink();
-  var sink = BufferedSink(byteSink);
-  _InformativeDataWriter(sink).writeDeclaration(node);
-  return sink.flushAndTake();
-}
-
 Uint8List writeUnitInformative(CompilationUnit unit) {
   var byteSink = ByteSink();
   var sink = BufferedSink(byteSink);
@@ -41,15 +32,10 @@
 /// offsets are different from `nameOffset` for example, which are applied
 /// directly after creating corresponding elements during a library loading.
 class ApplyConstantOffsets {
-  final int _baseOffset;
   Uint32List? _offsets;
   void Function(_OffsetsApplier)? _function;
 
-  ApplyConstantOffsets(
-    this._offsets,
-    this._function, {
-    int baseOffset = 0,
-  }) : _baseOffset = baseOffset;
+  ApplyConstantOffsets(this._offsets, this._function);
 
   void perform() {
     var offsets = _offsets;
@@ -57,7 +43,6 @@
     if (offsets != null && function != null) {
       var applier = _OffsetsApplier(
         _SafeListIterator(offsets),
-        baseOffset: _baseOffset,
       );
       function.call(applier);
       // Clear the references to possible closure data.
@@ -70,17 +55,14 @@
 
 class InformativeDataApplier {
   final LinkedElementFactory _elementFactory;
-  final int _baseOffset;
+  final Map<Uri, Uint8List> _unitsInformativeBytes2;
 
   InformativeDataApplier(
-    this._elementFactory, {
-    int baseOffset = 0,
-  }) : _baseOffset = baseOffset;
+    this._elementFactory,
+    this._unitsInformativeBytes2,
+  );
 
-  void applyTo(
-    Map<Uri, InformativeUnitData> unitsInformativeData,
-    LibraryElementImpl libraryElement,
-  ) {
+  void applyTo(LibraryElementImpl libraryElement) {
     if (_elementFactory.isApplyingInformativeData) {
       throw StateError('Unexpected recursion.');
     }
@@ -90,9 +72,9 @@
     for (var i = 0; i < unitElements.length; i++) {
       var unitElement = unitElements[i] as CompilationUnitElementImpl;
       var unitUri = unitElement.source.uri;
-      var unitInfoData = unitsInformativeData[unitUri];
-      if (unitInfoData != null) {
-        var unitReader = SummaryDataReader(unitInfoData.bytes);
+      var unitInfoBytes = _unitsInformativeBytes2[unitUri];
+      if (unitInfoBytes != null) {
+        var unitReader = SummaryDataReader(unitInfoBytes);
         var unitInfo = _InfoUnit(unitReader);
 
         if (i == 0) {
@@ -101,7 +83,6 @@
 
         unitElement.setCodeRange(unitInfo.codeOffset, unitInfo.codeLength);
         unitElement.lineInfo = LineInfo(unitInfo.lineStarts);
-        _setUnitMacroGeneratedContent(unitElement, unitInfoData, unitInfo);
 
         _applyToAccessors(unitElement.accessors, unitInfo.accessors);
 
@@ -159,49 +140,35 @@
     _elementFactory.isApplyingInformativeData = false;
   }
 
-  /// Read informative data from [bytes], and apply it to [element].
-  /// The data and the [element] must correspond to each other.
-  void applyToDeclaration(Element element, Uint8List bytes) {
-    if (_elementFactory.isApplyingInformativeData) {
-      throw StateError('Unexpected recursion.');
-    }
-    _elementFactory.isApplyingInformativeData = true;
-
-    var reader = SummaryDataReader(bytes);
-
-    var kindIndex = reader.readByte();
-    var kind = _DeclarationKind.values[kindIndex];
-
-    if (kind == _DeclarationKind.constructorDeclaration &&
-        element is ConstructorElement) {
-      var info = _InfoConstructorDeclaration(reader);
-      _applyToConstructor(element, info);
-    } else if (kind == _DeclarationKind.methodDeclaration &&
-        element is MethodElement) {
-      var info = _InfoMethodDeclaration(reader);
-      _applyToMethod(element, info);
-    } else if (kind == _DeclarationKind.methodDeclaration &&
-        element is PropertyAccessorElement) {
-      var info = _InfoMethodDeclaration(reader);
-      _applyToPropertyAccessor(element, info);
-    } else {
-      throw UnimplementedError(
-        'Unsupported kind: $kind, '
-        'or element: ${element.runtimeType}',
-      );
-    }
-
-    _elementFactory.isApplyingInformativeData = false;
-  }
-
   void _applyToAccessors(
     List<PropertyAccessorElement> elementList,
     List<_InfoMethodDeclaration> infoList,
   ) {
-    forCorrespondingPairs(
+    forCorrespondingPairs<PropertyAccessorElement, _InfoMethodDeclaration>(
       elementList.notSynthetic,
       infoList,
-      _applyToPropertyAccessor,
+      (element, info) {
+        element as PropertyAccessorElementImpl;
+        element.setCodeRange(info.codeOffset, info.codeLength);
+        element.nameOffset = info.nameOffset;
+        element.documentationComment = info.documentationComment;
+        _applyToFormalParameters(
+          element.parameters_unresolved,
+          info.parameters,
+        );
+
+        var linkedData = element.linkedData;
+        if (linkedData is PropertyAccessorElementLinkedData) {
+          linkedData.applyConstantOffsets = ApplyConstantOffsets(
+            info.constantOffsets,
+            (applier) {
+              applier.applyToMetadata(element);
+              applier.applyToTypeParameters(element.typeParameters);
+              applier.applyToFormalParameters(element.parameters);
+            },
+          );
+        }
+      },
     );
   }
 
@@ -273,32 +240,6 @@
     );
   }
 
-  void _applyToConstructor(
-    ConstructorElement element,
-    _InfoConstructorDeclaration info,
-  ) {
-    element as ConstructorElementImpl;
-    element.setCodeRange(info.codeOffset, info.codeLength);
-    element.periodOffset = info.periodOffset;
-    element.nameOffset = _baseOffset + info.nameOffset;
-    element.nameEnd = info.nameEnd;
-    element.documentationComment = info.documentationComment;
-    _applyToFormalParameters(
-      element.parameters_unresolved,
-      info.parameters,
-    );
-
-    var linkedData = element.linkedData as ConstructorElementLinkedData;
-    linkedData.applyConstantOffsets = ApplyConstantOffsets(
-      info.constantOffsets,
-      (applier) {
-        applier.applyToMetadata(element);
-        applier.applyToFormalParameters(element.parameters);
-        applier.applyToConstructorInitializers(element);
-      },
-    );
-  }
-
   void _applyToConstructors(
     List<ConstructorElement> elementList,
     List<_InfoConstructorDeclaration> infoList,
@@ -306,7 +247,28 @@
     forCorrespondingPairs<ConstructorElement, _InfoConstructorDeclaration>(
       elementList,
       infoList,
-      _applyToConstructor,
+      (element, info) {
+        element as ConstructorElementImpl;
+        element.setCodeRange(info.codeOffset, info.codeLength);
+        element.periodOffset = info.periodOffset;
+        element.nameOffset = info.nameOffset;
+        element.nameEnd = info.nameEnd;
+        element.documentationComment = info.documentationComment;
+        _applyToFormalParameters(
+          element.parameters_unresolved,
+          info.parameters,
+        );
+
+        var linkedData = element.linkedData as ConstructorElementLinkedData;
+        linkedData.applyConstantOffsets = ApplyConstantOffsets(
+          info.constantOffsets,
+          (applier) {
+            applier.applyToMetadata(element);
+            applier.applyToFormalParameters(element.parameters);
+            applier.applyToConstructorInitializers(element);
+          },
+        );
+      },
     );
   }
 
@@ -401,7 +363,7 @@
       (element, info) {
         element as ParameterElementImpl;
         element.setCodeRange(info.codeOffset, info.codeLength);
-        element.nameOffset = _baseOffset + info.nameOffset;
+        element.nameOffset = info.nameOffset;
         _applyToTypeParameters(element.typeParameters, info.typeParameters);
         _applyToFormalParameters(element.parameters, info.parameters);
       },
@@ -537,32 +499,6 @@
     );
   }
 
-  void _applyToMethod(MethodElement element, _InfoMethodDeclaration info) {
-    element as MethodElementImpl;
-    element.setCodeRange(info.codeOffset, info.codeLength);
-    element.nameOffset = _baseOffset + info.nameOffset;
-    element.documentationComment = info.documentationComment;
-    _applyToTypeParameters(
-      element.typeParameters_unresolved,
-      info.typeParameters,
-    );
-    _applyToFormalParameters(
-      element.parameters_unresolved,
-      info.parameters,
-    );
-
-    var linkedData = element.linkedData as MethodElementLinkedData;
-    linkedData.applyConstantOffsets = ApplyConstantOffsets(
-      info.constantOffsets,
-      (applier) {
-        applier.applyToMetadata(element);
-        applier.applyToTypeParameters(element.typeParameters);
-        applier.applyToFormalParameters(element.parameters);
-      },
-      baseOffset: _baseOffset,
-    );
-  }
-
   void _applyToMethods(
     List<MethodElement> elementList,
     List<_InfoMethodDeclaration> infoList,
@@ -570,7 +506,30 @@
     forCorrespondingPairs<MethodElement, _InfoMethodDeclaration>(
       elementList,
       infoList,
-      _applyToMethod,
+      (element, info) {
+        element as MethodElementImpl;
+        element.setCodeRange(info.codeOffset, info.codeLength);
+        element.nameOffset = info.nameOffset;
+        element.documentationComment = info.documentationComment;
+        _applyToTypeParameters(
+          element.typeParameters_unresolved,
+          info.typeParameters,
+        );
+        _applyToFormalParameters(
+          element.parameters_unresolved,
+          info.parameters,
+        );
+
+        var linkedData = element.linkedData as MethodElementLinkedData;
+        linkedData.applyConstantOffsets = ApplyConstantOffsets(
+          info.constantOffsets,
+          (applier) {
+            applier.applyToMetadata(element);
+            applier.applyToTypeParameters(element.typeParameters);
+            applier.applyToFormalParameters(element.parameters);
+          },
+        );
+      },
     );
   }
 
@@ -601,33 +560,6 @@
     );
   }
 
-  void _applyToPropertyAccessor(
-    PropertyAccessorElement element,
-    _InfoMethodDeclaration info,
-  ) {
-    element as PropertyAccessorElementImpl;
-    element.setCodeRange(info.codeOffset, info.codeLength);
-    element.nameOffset = _baseOffset + info.nameOffset;
-    element.documentationComment = info.documentationComment;
-    _applyToFormalParameters(
-      element.parameters_unresolved,
-      info.parameters,
-    );
-
-    var linkedData = element.linkedData;
-    if (linkedData is PropertyAccessorElementLinkedData) {
-      linkedData.applyConstantOffsets = ApplyConstantOffsets(
-        info.constantOffsets,
-        (applier) {
-          applier.applyToMetadata(element);
-          applier.applyToTypeParameters(element.typeParameters);
-          applier.applyToFormalParameters(element.parameters);
-        },
-        baseOffset: _baseOffset,
-      );
-    }
-  }
-
   void _applyToTopLevelVariable(
     TopLevelVariableElement element,
     _InfoTopLevelVariable info,
@@ -662,38 +594,6 @@
     );
   }
 
-  void _setUnitMacroGeneratedContent(
-    CompilationUnitElementImpl unitElement,
-    InformativeUnitData unitInfoData,
-    _InfoUnit unitInfo,
-  ) {
-    var macroGenerationDataList = unitElement.macroGenerationDataList;
-    if (macroGenerationDataList != null) {
-      const classMemberCodePrefix = '\n  ';
-      const classMemberCodeSuffix = '\n';
-      var generatedContent = unitInfoData.content;
-      var shift = 0;
-      for (var data in macroGenerationDataList) {
-        var classIndex = data.classDeclarationIndex;
-        if (classIndex != null) {
-          var targetClass = unitInfo.classDeclarations[classIndex];
-          var code = classMemberCodePrefix + data.code + classMemberCodeSuffix;
-          var insertOffset = shift + targetClass.rightBracketOffset;
-          data.insertOffset = insertOffset;
-          data.codeOffset = insertOffset + classMemberCodePrefix.length;
-          generatedContent = generatedContent.substring(0, insertOffset) +
-              code +
-              generatedContent.substring(insertOffset);
-          data.insertLength = code.length;
-          shift += code.length;
-        } else {
-          throw UnimplementedError();
-        }
-      }
-      unitElement.macroGeneratedContent = generatedContent;
-    }
-  }
-
   void _setupApplyConstantOffsetsForTypeAlias(
     TypeAliasElementImpl element,
     Uint32List constantOffsets, {
@@ -729,30 +629,10 @@
   }
 }
 
-/// Informative data about a source file.
-class InformativeUnitData {
-  /// The content of the file.
-  final String content;
-
-  /// Informative data derived from the [content], such as offsets.
-  final Uint8List bytes;
-
-  InformativeUnitData({
-    required this.content,
-    required this.bytes,
-  });
-}
-
-enum _DeclarationKind {
-  constructorDeclaration,
-  methodDeclaration,
-}
-
 class _InfoClassDeclaration {
   final int codeOffset;
   final int codeLength;
   final int nameOffset;
-  final int rightBracketOffset;
   final String? documentationComment;
   final List<_InfoTypeParameter> typeParameters;
   final List<_InfoConstructorDeclaration> constructors;
@@ -767,7 +647,6 @@
       codeOffset: reader.readUInt30(),
       codeLength: reader.readUInt30(),
       nameOffset: reader.readUInt30() - nameOffsetDelta,
-      rightBracketOffset: reader.readUInt30(),
       documentationComment: reader.readStringUtf8().nullIfEmpty,
       typeParameters: reader.readTypedList(
         () => _InfoTypeParameter(reader),
@@ -792,7 +671,6 @@
     required this.codeOffset,
     required this.codeLength,
     required this.nameOffset,
-    required this.rightBracketOffset,
     required this.documentationComment,
     required this.typeParameters,
     required this.constructors,
@@ -1256,7 +1134,6 @@
       sink.writeUInt30(node.offset);
       sink.writeUInt30(node.length);
       sink.writeUInt30(node.name.offset);
-      sink.writeUInt30(node.rightBracket.offset);
       _writeDocumentationComment(node);
       _writeTypeParameters(node.typeParameters);
       _writeConstructors(node.members);
@@ -1302,7 +1179,6 @@
       sink.writeUInt30(node.offset);
       sink.writeUInt30(node.length);
       sink.writeUInt30(1 + (node.name?.offset ?? -1));
-      sink.writeUInt30(node.rightBracket.offset);
       _writeDocumentationComment(node);
       _writeTypeParameters(node.typeParameters);
       _writeConstructors(node.members);
@@ -1392,7 +1268,6 @@
       sink.writeUInt30(node.offset);
       sink.writeUInt30(node.length);
       sink.writeUInt30(node.name.offset);
-      sink.writeUInt30(node.rightBracket.offset);
       _writeDocumentationComment(node);
       _writeTypeParameters(node.typeParameters);
       _writeConstructors(node.members);
@@ -1414,18 +1289,6 @@
     );
   }
 
-  void writeDeclaration(AstNode node) {
-    if (node is ConstructorDeclaration) {
-      sink.addByte(_DeclarationKind.constructorDeclaration.index);
-      _writeConstructor(node);
-    } else if (node is MethodDeclaration) {
-      sink.addByte(_DeclarationKind.methodDeclaration.index);
-      _writeMethod(node);
-    } else {
-      throw UnimplementedError('(${node.runtimeType}) $node');
-    }
-  }
-
   int _codeOffsetForVariable(VariableDeclaration node) {
     var codeOffset = node.offset;
     var variableList = node.parent as VariableDeclarationList;
@@ -1442,24 +1305,22 @@
     });
   }
 
-  void _writeConstructor(ConstructorDeclaration node) {
-    sink.writeUInt30(node.offset);
-    sink.writeUInt30(node.length);
-    sink.writeOptionalUInt30(node.period?.offset);
-    var nameNode = node.name ?? node.returnType;
-    sink.writeUInt30(nameNode.offset);
-    sink.writeUInt30(nameNode.end);
-    _writeDocumentationComment(node);
-    _writeFormalParameters(node.parameters);
-    _writeOffsets(
-      metadata: node.metadata,
-      formalParameters: node.parameters,
-      constructorInitializers: node.initializers,
-    );
-  }
-
   void _writeConstructors(List<ClassMember> members) {
-    sink.writeList2<ConstructorDeclaration>(members, _writeConstructor);
+    sink.writeList2<ConstructorDeclaration>(members, (node) {
+      sink.writeUInt30(node.offset);
+      sink.writeUInt30(node.length);
+      sink.writeOptionalUInt30(node.period?.offset);
+      var nameNode = node.name ?? node.returnType;
+      sink.writeUInt30(nameNode.offset);
+      sink.writeUInt30(nameNode.end);
+      _writeDocumentationComment(node);
+      _writeFormalParameters(node.parameters);
+      _writeOffsets(
+        metadata: node.metadata,
+        formalParameters: node.parameters,
+        constructorInitializers: node.initializers,
+      );
+    });
   }
 
   void _writeDocumentationComment(AnnotatedNode node) {
@@ -1522,7 +1383,19 @@
           .whereType<MethodDeclaration>()
           .where((e) => e.isGetter || e.isSetter)
           .toList(),
-      _writeMethod,
+      (node) {
+        sink.writeUInt30(node.offset);
+        sink.writeUInt30(node.length);
+        sink.writeUInt30(node.name.offset);
+        _writeDocumentationComment(node);
+        _writeTypeParameters(node.typeParameters);
+        _writeFormalParameters(node.parameters);
+        _writeOffsets(
+          metadata: node.metadata,
+          typeParameters: node.typeParameters,
+          formalParameters: node.parameters,
+        );
+      },
     );
   }
 
@@ -1547,27 +1420,25 @@
     );
   }
 
-  void _writeMethod(MethodDeclaration node) {
-    sink.writeUInt30(node.offset);
-    sink.writeUInt30(node.length);
-    sink.writeUInt30(node.name.offset);
-    _writeDocumentationComment(node);
-    _writeTypeParameters(node.typeParameters);
-    _writeFormalParameters(node.parameters);
-    _writeOffsets(
-      metadata: node.metadata,
-      typeParameters: node.typeParameters,
-      formalParameters: node.parameters,
-    );
-  }
-
   void _writeMethods(List<ClassMember> members) {
     sink.writeList<MethodDeclaration>(
       members
           .whereType<MethodDeclaration>()
           .where((e) => !(e.isGetter || e.isSetter))
           .toList(),
-      _writeMethod,
+      (node) {
+        sink.writeUInt30(node.offset);
+        sink.writeUInt30(node.length);
+        sink.writeUInt30(node.name.offset);
+        _writeDocumentationComment(node);
+        _writeTypeParameters(node.typeParameters);
+        _writeFormalParameters(node.parameters);
+        _writeOffsets(
+          metadata: node.metadata,
+          typeParameters: node.typeParameters,
+          formalParameters: node.parameters,
+        );
+      },
     );
   }
 
@@ -1803,12 +1674,8 @@
 
 class _OffsetsApplier extends _OffsetsAstVisitor {
   final _SafeListIterator<int> _iterator;
-  final int _baseOffset;
 
-  _OffsetsApplier(
-    this._iterator, {
-    int baseOffset = 0,
-  }) : _baseOffset = baseOffset;
+  _OffsetsApplier(this._iterator);
 
   void applyToConstantInitializer(Element element) {
     if (element is ConstVariableElement) {
@@ -1862,7 +1729,7 @@
   void handleToken(Token token) {
     var offset = _iterator.take();
     if (offset != null) {
-      token.offset = _baseOffset + offset;
+      token.offset = offset;
     }
   }
 
@@ -1953,7 +1820,7 @@
 
   @override
   void visitConstructorName(ConstructorName node) {
-    node.type.accept(this);
+    node.type2.accept(this);
     _tokenOrNull(node.period);
     node.name?.accept(this);
   }
diff --git a/pkg/analyzer/lib/src/summary2/library_builder.dart b/pkg/analyzer/lib/src/summary2/library_builder.dart
index 10620eb..f389647 100644
--- a/pkg/analyzer/lib/src/summary2/library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/library_builder.dart
@@ -5,15 +5,9 @@
 import 'package:analyzer/dart/ast/ast.dart' as ast;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/ast.dart' as ast;
-import 'package:analyzer/src/dart/ast/extensions.dart';
 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';
-import 'package:analyzer/src/macro/api/macro.dart' as macro;
-import 'package:analyzer/src/macro/builders/data_class.dart' as macro;
-import 'package:analyzer/src/macro/builders/observable.dart' as macro;
-import 'package:analyzer/src/macro/impl/error.dart' as macro;
-import 'package:analyzer/src/macro/impl/macro.dart' as macro;
 import 'package:analyzer/src/summary2/combinator.dart';
 import 'package:analyzer/src/summary2/constructor_initializer_resolver.dart';
 import 'package:analyzer/src/summary2/default_value_resolver.dart';
@@ -147,38 +141,6 @@
     }
   }
 
-  /// We don't create default constructors during building elements from AST,
-  /// there might be macros that will add one later. So, this method is
-  /// invoked after all macros that affect element models.
-  void processClassConstructors() {
-    // TODO(scheglov) We probably don't need constructors for mixins.
-    var classes = element.topLevelElements
-        .whereType<ClassElementImpl>()
-        .where((e) => !e.isMixinApplication)
-        .toList();
-
-    for (var element in classes) {
-      if (element.constructors.isEmpty) {
-        var containerRef = element.reference!.getChild('@constructor');
-        element.constructors = [
-          ConstructorElementImpl('', -1)
-            ..isSynthetic = true
-            ..reference = containerRef.getChild(''),
-        ];
-      }
-
-      // We have all fields and constructors.
-      // Now we can resolve field formal parameters.
-      for (var constructor in element.constructors) {
-        for (var parameter in constructor.parameters) {
-          if (parameter is FieldFormalParameterElementImpl) {
-            parameter.field = element.getField(parameter.name);
-          }
-        }
-      }
-    }
-  }
-
   void resolveConstructors() {
     ConstructorInitializerResolver(linker, element).resolve();
   }
@@ -201,139 +163,6 @@
     }
   }
 
-  /// Run built-in declaration macros.
-  void runDeclarationMacros() {
-    /// If [node] has a macro annotation with the required [name],
-    /// return the index of this annotation node.
-    int? hasMacroAnnotation(ast.AnnotatedNode node, String name) {
-      var metadata = node.metadata;
-      for (var i = 0; i < metadata.length; i++) {
-        var annotation = metadata[i];
-        var nameNode = annotation.name;
-        if (nameNode is ast.SimpleIdentifier &&
-            annotation.arguments == null &&
-            annotation.constructorName == null &&
-            nameNode.name == name) {
-          var nameElement = element.scope.lookup(name).getter;
-          if (nameElement != null &&
-              nameElement.library?.name == 'analyzer.macro.annotations') {
-            return i;
-          }
-        }
-      }
-      return null;
-    }
-
-    /// Build types for type annotations in new [nodes].
-    void resolveTypeAnnotations(
-      List<ast.AstNode> nodes, {
-      ClassElementImpl? classElement,
-    }) {
-      var nodesToBuildType = NodesToBuildType();
-      var resolver = ReferenceResolver(linker, nodesToBuildType, element);
-      if (classElement != null) {
-        resolver.enterScopeClassElement(classElement);
-      }
-      for (var node in nodes) {
-        node.accept(resolver);
-      }
-      TypesBuilder(linker).build(nodesToBuildType);
-    }
-
-    for (var linkingUnit in units) {
-      var classDeclarationIndex = -1;
-      for (var declaration in linkingUnit.node.declarations) {
-        if (declaration is ast.ClassDeclarationImpl) {
-          classDeclarationIndex++;
-          var macroExecutionErrors = <macro.MacroExecutionError>[];
-
-          var members = declaration.members.toList();
-          var classBuilder = macro.ClassDeclarationBuilderImpl(
-            linkingUnit,
-            classDeclarationIndex,
-            declaration,
-          );
-
-          void runClassMacro(
-            String name,
-            macro.ClassDeclarationMacro Function() newInstance,
-          ) {
-            var annotationIndex = hasMacroAnnotation(declaration, name);
-            if (annotationIndex != null) {
-              try {
-                newInstance().visitClassDeclaration(
-                  declaration,
-                  classBuilder,
-                );
-              } catch (e) {
-                macroExecutionErrors.add(
-                  macro.MacroExecutionError(
-                    annotationIndex: annotationIndex,
-                    macroName: name,
-                    message: e.toString(),
-                  ),
-                );
-              }
-            }
-          }
-
-          runClassMacro('autoConstructor', () => macro.AutoConstructorMacro());
-          runClassMacro('dataClass', () => macro.DataClassMacro());
-          runClassMacro('hashCode', () => macro.HashCodeMacro());
-          runClassMacro('toString', () => macro.ToStringMacro());
-
-          var classElement = declaration.declaredElement as ClassElementImpl;
-          classElement.macroExecutionErrors = macroExecutionErrors;
-
-          for (var member in members) {
-            if (member is ast.FieldDeclarationImpl) {
-              var macroExecutionErrors = <macro.MacroExecutionError>[];
-
-              void runFieldMacro(
-                String name,
-                macro.FieldDeclarationMacro Function() newInstance,
-              ) {
-                var annotationIndex = hasMacroAnnotation(member, name);
-                if (annotationIndex != null) {
-                  try {
-                    newInstance().visitFieldDeclaration(member, classBuilder);
-                  } catch (e) {
-                    macroExecutionErrors.add(
-                      macro.MacroExecutionError(
-                        annotationIndex: annotationIndex,
-                        macroName: name,
-                        message: e.toString(),
-                      ),
-                    );
-                  }
-                }
-              }
-
-              runFieldMacro('observable', () => macro.ObservableMacro());
-              member.firstElement.macroExecutionErrors = macroExecutionErrors;
-            }
-          }
-
-          var newMembers = declaration.members.sublist(members.length);
-          if (newMembers.isNotEmpty) {
-            var elementBuilder = ElementBuilder(
-              libraryBuilder: this,
-              unitReference: linkingUnit.reference,
-              unitElement: linkingUnit.element,
-            );
-            var classElement = declaration.declaredElement as ClassElementImpl;
-            elementBuilder.buildMacroClassMembers(classElement, newMembers);
-            resolveTypeAnnotations(newMembers, classElement: classElement);
-          }
-        }
-      }
-    }
-
-    for (var linkingUnit in units) {
-      linkingUnit.macroGeneratedContent.finish();
-    }
-  }
-
   void storeExportScope() {
     exports = exportScope.map.values.toList();
     linker.elementFactory.setExportsOfLibrary('$uri', exports);
@@ -415,7 +244,6 @@
       unitElement.librarySource = inputLibrary.source;
       unitElement.lineInfo = unitNode.lineInfo;
       unitElement.source = inputUnit.source;
-      unitElement.sourceContent = inputUnit.sourceContent;
       unitElement.uri = inputUnit.partUriStr;
       unitElement.setCodeRange(0, unitNode.length);
 
@@ -461,8 +289,6 @@
   final Reference reference;
   final ast.CompilationUnitImpl node;
   final CompilationUnitElementImpl element;
-  late final macro.MacroGeneratedContent macroGeneratedContent =
-      macro.MacroGeneratedContent(this);
 
   LinkingUnit({
     required this.input,
diff --git a/pkg/analyzer/lib/src/summary2/link.dart b/pkg/analyzer/lib/src/summary2/link.dart
index 7a33308..db4d362 100644
--- a/pkg/analyzer/lib/src/summary2/link.dart
+++ b/pkg/analyzer/lib/src/summary2/link.dart
@@ -10,7 +10,6 @@
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
-import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary2/bundle_writer.dart';
 import 'package:analyzer/src/summary2/detach_nodes.dart';
@@ -93,7 +92,6 @@
     _createTypeSystem();
     _buildEnumChildren();
     _resolveTypes();
-    _runDeclarationMacros();
     _performTopLevelInference();
     _resolveConstructors();
     _resolveConstantInitializers();
@@ -214,13 +212,6 @@
     TypesBuilder(this).build(nodesToBuildType);
   }
 
-  void _runDeclarationMacros() {
-    for (var library in builders.values) {
-      library.runDeclarationMacros();
-      library.processClassConstructors();
-    }
-  }
-
   void _writeLibraries() {
     var bundleWriter = BundleWriter(
       elementFactory.dynamicRef,
@@ -275,8 +266,6 @@
 }
 
 class LinkResult {
-  @Deprecated('This field is not used anymore')
-  final Uint8List astBytes = Uint8List(0);
   final Uint8List resolutionBytes;
 
   LinkResult({
diff --git a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
index e83e492..456548e 100644
--- a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
@@ -164,6 +164,13 @@
     return libraryReaders[uriStr] != null;
   }
 
+  /// We are about to discard this factory, mark all libraries invalid.
+  void invalidateAllLibraries() {
+    for (var libraryReference in rootReference.children) {
+      _invalidateLibrary(libraryReference);
+    }
+  }
+
   LibraryElementImpl? libraryOfUri(String uriStr) {
     var reference = rootReference.getChild(uriStr);
     return elementOfReference(reference) as LibraryElementImpl?;
@@ -189,7 +196,8 @@
     for (var uriStr in uriStrSet) {
       _exportsOfLibrary.remove(uriStr);
       libraryReaders.remove(uriStr);
-      rootReference.removeChild(uriStr);
+      var libraryReference = rootReference.removeChild(uriStr);
+      _invalidateLibrary(libraryReference);
     }
 
     analysisSession.classHierarchy.removeOfLibraries(uriStrSet);
@@ -239,4 +247,11 @@
 
     libraryElement.createLoadLibraryFunction();
   }
+
+  void _invalidateLibrary(Reference? libraryReference) {
+    var libraryElement = libraryReference?.element;
+    if (libraryElement is LibraryElementImpl) {
+      libraryElement.isValid = false;
+    }
+  }
 }
diff --git a/pkg/analyzer/lib/src/summary2/named_type_builder.dart b/pkg/analyzer/lib/src/summary2/named_type_builder.dart
index a7364a7..5c3473b 100644
--- a/pkg/analyzer/lib/src/summary2/named_type_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/named_type_builder.dart
@@ -17,7 +17,7 @@
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/type_builder.dart';
 
-/// The type builder for a [TypeName].
+/// The type builder for a [NamedType].
 class NamedTypeBuilder extends TypeBuilder {
   /// TODO(scheglov) Replace with `DartType` in `TypeAliasElementImpl`.
   static const _aliasedTypeKey = '_aliasedType';
diff --git a/pkg/analyzer/lib/src/summary2/package_bundle_format.dart b/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
index f87e585..f6d3bd2 100644
--- a/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
+++ b/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
@@ -21,7 +21,6 @@
   }
 
   Uint8List finish({
-    @Deprecated('This parameter is not used anymore') Uint8List? astBytes,
     required Uint8List resolutionBytes,
     PackageBundleSdk? sdk,
   }) {
diff --git a/pkg/analyzer/lib/src/summary2/reference.dart b/pkg/analyzer/lib/src/summary2/reference.dart
index e73b634..8c305bd 100644
--- a/pkg/analyzer/lib/src/summary2/reference.dart
+++ b/pkg/analyzer/lib/src/summary2/reference.dart
@@ -65,8 +65,8 @@
     return map[name] ??= Reference._(this, name);
   }
 
-  void removeChild(String name) {
-    _children?.remove(name);
+  Reference? removeChild(String name) {
+    return _children?.remove(name);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
index 1cba245..ef6c180 100644
--- a/pkg/analyzer/lib/src/summary2/reference_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -45,10 +45,6 @@
         scope = libraryElement.scope,
         isNNBD = libraryElement.isNonNullableByDefault;
 
-  void enterScopeClassElement(ClassElementImpl element) {
-    scope = TypeParameterScope(scope, element.typeParameters);
-  }
-
   @override
   void visitBlockFunctionBody(BlockFunctionBody node) {}
 
@@ -84,7 +80,7 @@
     LinkingNodeContext(node, scope);
 
     node.typeParameters?.accept(this);
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
     node.withClause.accept(this);
     node.implementsClause?.accept(this);
     nodesToBuildType.addDeclaration(node);
@@ -125,7 +121,7 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    node.superclass.accept(this);
+    node.superclass2.accept(this);
   }
 
   @override
@@ -273,7 +269,7 @@
 
   @override
   void visitImplementsClause(ImplementsClause node) {
-    node.interfaces.accept(this);
+    node.interfaces2.accept(this);
   }
 
   @override
@@ -315,28 +311,7 @@
   }
 
   @override
-  void visitOnClause(OnClause node) {
-    node.superclassConstraints.accept(this);
-  }
-
-  @override
-  void visitSimpleFormalParameter(SimpleFormalParameter node) {
-    node.type?.accept(this);
-    nodesToBuildType.addDeclaration(node);
-  }
-
-  @override
-  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
-    node.variables.accept(this);
-  }
-
-  @override
-  void visitTypeArgumentList(TypeArgumentList node) {
-    node.arguments.accept(this);
-  }
-
-  @override
-  void visitTypeName(covariant TypeNameImpl node) {
+  void visitNamedType(covariant TypeNameImpl node) {
     var typeIdentifier = node.name;
 
     Element? element;
@@ -390,6 +365,27 @@
   }
 
   @override
+  void visitOnClause(OnClause node) {
+    node.superclassConstraints2.accept(this);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    node.type?.accept(this);
+    nodesToBuildType.addDeclaration(node);
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    node.variables.accept(this);
+  }
+
+  @override
+  void visitTypeArgumentList(TypeArgumentList node) {
+    node.arguments.accept(this);
+  }
+
+  @override
   void visitTypeParameter(TypeParameter node) {
     var bound = node.bound;
     if (bound != null) {
@@ -412,7 +408,7 @@
 
   @override
   void visitWithClause(WithClause node) {
-    node.mixinTypes.accept(this);
+    node.mixinTypes2.accept(this);
   }
 
   NullabilitySuffix _getNullabilitySuffix(bool hasQuestion) {
diff --git a/pkg/analyzer/lib/src/summary2/simply_bounded.dart b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
index f279f1b..cc9870c 100644
--- a/pkg/analyzer/lib/src/summary2/simply_bounded.dart
+++ b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
@@ -252,7 +252,7 @@
   /// Otherwise `true` is returned.
   bool _visitType(List<SimplyBoundedNode> dependencies, TypeAnnotation type,
       bool allowTypeParameters) {
-    if (type is TypeName) {
+    if (type is NamedType) {
       var element = type.name.staticElement;
 
       if (element is TypeParameterElement) {
diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
index 7c85b60d..6640e26 100644
--- a/pkg/analyzer/lib/src/summary2/top_level_inference.dart
+++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
@@ -384,7 +384,7 @@
 
     if (node.initializer != null) {
       var inferenceNode =
-          _VariableInferenceNode(_walker, _unitElement, _scope, node);
+          _VariableInferenceNode(_walker, _unitElement, _scope, element, node);
       _walker._nodes[element] = inferenceNode;
       (element as PropertyInducingElementImpl).typeInference =
           _PropertyInducingElementTypeInference(inferenceNode);
@@ -413,6 +413,7 @@
   final CompilationUnitElementImpl _unitElement;
   final TypeSystemImpl _typeSystem;
   final Scope _scope;
+  final PropertyInducingElement _element;
   final VariableDeclaration _node;
 
   @override
@@ -422,6 +423,7 @@
     this._walker,
     this._unitElement,
     this._scope,
+    this._element,
     this._node,
   ) : _typeSystem = _unitElement.library.typeSystem;
 
@@ -502,8 +504,12 @@
   }
 
   void _resolveInitializer({required bool forDependencies}) {
-    var astResolver =
-        AstResolver(_walker._linker, _unitElement, _scope, _node.initializer!);
+    var enclosingElement = _element.enclosingElement;
+    var enclosingClassElement =
+        enclosingElement is ClassElement ? enclosingElement : null;
+    var astResolver = AstResolver(
+        _walker._linker, _unitElement, _scope, _node.initializer!,
+        enclosingClassElement: enclosingClassElement);
     astResolver.resolveExpression(() => _node.initializer!,
         buildElements: forDependencies);
   }
diff --git a/pkg/analyzer/lib/src/summary2/type_alias.dart b/pkg/analyzer/lib/src/summary2/type_alias.dart
index b48b646..2c241ad 100644
--- a/pkg/analyzer/lib/src/summary2/type_alias.dart
+++ b/pkg/analyzer/lib/src/summary2/type_alias.dart
@@ -85,7 +85,7 @@
     if (hasSelfReference) return;
     if (node == null) return;
 
-    if (node is TypeName) {
+    if (node is NamedType) {
       var element = node.name.staticElement;
       if (element is! ElementImpl) {
         return;
diff --git a/pkg/analyzer/lib/src/summary2/types_builder.dart b/pkg/analyzer/lib/src/summary2/types_builder.dart
index 4f9d087..48731a7 100644
--- a/pkg/analyzer/lib/src/summary2/types_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/types_builder.dart
@@ -40,7 +40,7 @@
   return true;
 }
 
-List<InterfaceType> _toInterfaceTypeList(List<TypeName>? nodeList) {
+List<InterfaceType> _toInterfaceTypeList(List<NamedType>? nodeList) {
   if (nodeList != null) {
     return nodeList
         .map((e) => e.type)
@@ -122,7 +122,7 @@
 
     var extendsClause = node.extendsClause;
     if (extendsClause != null) {
-      var type = extendsClause.superclass.type;
+      var type = extendsClause.superclass2.type;
       if (type is InterfaceType && _isInterfaceTypeClass(type)) {
         element.supertype = type;
       } else {
@@ -135,18 +135,18 @@
     }
 
     element.mixins = _toInterfaceTypeList(
-      node.withClause?.mixinTypes,
+      node.withClause?.mixinTypes2,
     );
 
     element.interfaces = _toInterfaceTypeList(
-      node.implementsClause?.interfaces,
+      node.implementsClause?.interfaces2,
     );
   }
 
   void _classTypeAlias(ClassTypeAlias node) {
     var element = node.declaredElement as ClassElementImpl;
 
-    var superType = node.superclass.type;
+    var superType = node.superclass2.type;
     if (superType is InterfaceType && _isInterfaceTypeInterface(superType)) {
       element.supertype = superType;
     } else {
@@ -154,11 +154,11 @@
     }
 
     element.mixins = _toInterfaceTypeList(
-      node.withClause.mixinTypes,
+      node.withClause.mixinTypes2,
     );
 
     element.interfaces = _toInterfaceTypeList(
-      node.implementsClause?.interfaces,
+      node.implementsClause?.interfaces2,
     );
   }
 
@@ -286,7 +286,7 @@
     var element = node.declaredElement as MixinElementImpl;
 
     var constraints = _toInterfaceTypeList(
-      node.onClause?.superclassConstraints,
+      node.onClause?.superclassConstraints2,
     );
     if (constraints.isEmpty) {
       constraints = [_objectType(element)];
@@ -294,7 +294,7 @@
     element.superclassConstraints = constraints;
 
     element.interfaces = _toInterfaceTypeList(
-      node.implementsClause?.interfaces,
+      node.implementsClause?.interfaces2,
     );
   }
 
@@ -363,7 +363,7 @@
   void perform(WithClause? withClause) {
     if (withClause == null) return;
 
-    for (var mixinNode in withClause.mixinTypes) {
+    for (var mixinNode in withClause.mixinTypes2) {
       var mixinType = _inferSingle(mixinNode as TypeNameImpl);
       interfacesMerger.addWithSupertypes(mixinType);
     }
@@ -513,7 +513,7 @@
       } finally {
         element.mixinInferenceCallback = null;
         element.mixins = _toInterfaceTypeList(
-          withClause.mixinTypes,
+          withClause.mixinTypes2,
         );
       }
     }
diff --git a/pkg/analyzer/lib/src/test_utilities/find_node.dart b/pkg/analyzer/lib/src/test_utilities/find_node.dart
index aeea523..575fe79 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_node.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_node.dart
@@ -244,6 +244,10 @@
     return _node(search, (n) => n is NamedExpression);
   }
 
+  NamedType namedType(String search) {
+    return _node(search, (n) => n is NamedType);
+  }
+
   NullLiteral nullLiteral(String search) {
     return _node(search, (n) => n is NullLiteral);
   }
@@ -370,10 +374,6 @@
     return _node(search, (n) => n is TypeLiteral);
   }
 
-  TypeName typeName(String search) {
-    return _node(search, (n) => n is TypeName);
-  }
-
   TypeParameter typeParameter(String search) {
     return _node(search, (n) => n is TypeParameter);
   }
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index 47cc45d0..a05f61d 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -365,6 +365,7 @@
   int operator -();
   int operator <<(int shiftAmount);
   int operator >>(int shiftAmount);
+  int operator >>>(int shiftAmount);
   int operator ^(int other);
   int operator |(int other);
   int operator ~();
@@ -531,6 +532,10 @@
   int get index;
 }
 
+abstract class _Enum extends Enum {
+  String _name;
+}
+
 abstract class Pattern {
   Iterable<Match> allMatches(String string, [int start = 0]);
 }
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index db72308..b75a215 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -4,13 +4,10 @@
 
 import 'dart:async';
 import 'dart:collection';
-import 'dart:core';
 
 import 'package:analyzer/file_system/file_system.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/generated/source_io.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/util/uri.dart';
 import 'package:analyzer/src/workspace/bazel_watcher.dart';
@@ -188,6 +185,9 @@
   @override
   final String root;
 
+  /// Either `blaze` or `bazel`.
+  final String symlinkPrefix;
+
   /// The absolute path to the optional read only workspace root, in the
   /// `READONLY` folder if a git-based workspace, or `null`.
   final String? readonly;
@@ -206,6 +206,9 @@
   /// to avoid this in cases when `BUILD` files are always available.
   final bool _lookForBuildFileSubstitutes;
 
+  /// The language version for this workspace, `null` if cannot be read.
+  final Version? _languageVersion;
+
   /// The cache of packages. The key is the directory path, the value is
   /// the corresponding package.
   final Map<String, BazelWorkspacePackage> _directoryToPackage = {};
@@ -215,11 +218,13 @@
   BazelWorkspace._(
     this.provider,
     this.root,
+    this.symlinkPrefix,
     this.readonly,
     this.binPaths,
     this.genfiles, {
     required bool lookForBuildFileSubstitutes,
-  }) : _lookForBuildFileSubstitutes = lookForBuildFileSubstitutes;
+  })  : _lookForBuildFileSubstitutes = lookForBuildFileSubstitutes,
+        _languageVersion = _readLanguageVersion(provider, root);
 
   /// Stream of files that we tried to find along with their potential or actual
   /// paths.
@@ -261,9 +266,14 @@
       if (relative == '.') {
         return null;
       }
-      // First check genfiles and bin directories
-      var generatedCandidates = <String>[genfiles, ...binPaths]
-          .map((prefix) => context.join(prefix, relative));
+      // First check genfiles and bin directories. Note that we always use the
+      // symlinks and not the [binPaths] or [genfiles] to make sure we use the
+      // files corresponding to the most recent build configuration and get
+      // consistent view of all the generated files.
+      var generatedCandidates = [
+        '$symlinkPrefix-genfiles',
+        '$symlinkPrefix-bin'
+      ].map((prefix) => context.join(root, context.join(prefix, relative)));
       for (var path in generatedCandidates) {
         File file = provider.getFile(path);
         if (file.exists) {
@@ -454,9 +464,9 @@
           var binPaths = _findBinFolderPaths(folder);
           String symlinkPrefix =
               _findSymlinkPrefix(provider, root, binPaths: binPaths);
-          binPaths ??= [context.join(root, '$symlinkPrefix-bin')];
-          return BazelWorkspace._(provider, root, readonlyRoot, binPaths,
-              context.join(root, '$symlinkPrefix-genfiles'),
+          binPaths = binPaths..add(context.join(root, '$symlinkPrefix-bin'));
+          return BazelWorkspace._(provider, root, symlinkPrefix, readonlyRoot,
+              binPaths, context.join(root, '$symlinkPrefix-genfiles'),
               lookForBuildFileSubstitutes: lookForBuildFileSubstitutes);
         }
       }
@@ -467,8 +477,13 @@
         var binPaths = _findBinFolderPaths(parent);
         String symlinkPrefix =
             _findSymlinkPrefix(provider, root, binPaths: binPaths);
-        binPaths ??= [context.join(root, '$symlinkPrefix-bin')];
-        return BazelWorkspace._(provider, root, null /* readonly */, binPaths,
+        binPaths = binPaths..add(context.join(root, '$symlinkPrefix-bin'));
+        return BazelWorkspace._(
+            provider,
+            root,
+            symlinkPrefix,
+            null /* readonly */,
+            binPaths,
             context.join(root, '$symlinkPrefix-genfiles'),
             lookForBuildFileSubstitutes: lookForBuildFileSubstitutes);
       }
@@ -479,8 +494,13 @@
         var binPaths = _findBinFolderPaths(folder);
         String symlinkPrefix =
             _findSymlinkPrefix(provider, root, binPaths: binPaths);
-        binPaths ??= [context.join(root, '$symlinkPrefix-bin')];
-        return BazelWorkspace._(provider, root, null /* readonly */, binPaths,
+        binPaths = binPaths..add(context.join(root, '$symlinkPrefix-bin'));
+        return BazelWorkspace._(
+            provider,
+            root,
+            symlinkPrefix,
+            null /* readonly */,
+            binPaths,
             context.join(root, '$symlinkPrefix-genfiles'),
             lookForBuildFileSubstitutes: lookForBuildFileSubstitutes);
       }
@@ -499,11 +519,12 @@
   /// the immediate folders found in `$root/blaze-out/` and `$root/bazel-out/`
   /// for folders named "bin".
   ///
-  /// If no "bin" folder is found in any of those locations, `null` is returned.
-  static List<String>? _findBinFolderPaths(Folder root) {
+  /// If no "bin" folder is found in any of those locations, empty list is
+  /// returned.
+  static List<String> _findBinFolderPaths(Folder root) {
     var out = _firstExistingFolder(root, ['blaze-out', 'bazel-out']);
     if (out == null) {
-      return null;
+      return [];
     }
 
     List<String> binPaths = [];
@@ -515,7 +536,7 @@
         binPaths.add(possibleBin.path);
       }
     }
-    return binPaths.isEmpty ? null : binPaths;
+    return binPaths;
   }
 
   /// Return the symlink prefix, _X_, for folders `X-bin` or `X-genfiles`.
@@ -547,6 +568,33 @@
   static Folder? _firstExistingFolder(Folder root, List<String> names) => names
       .map((name) => root.getChildAssumingFolder(name))
       .firstWhereOrNull((folder) => folder.exists);
+
+  /// Return the default language version of the workspace.
+  ///
+  /// Return `null` if cannot be read, for example because the file does not
+  /// exist, or is not available in this build configuration (batch analysis).
+  static Version? _readLanguageVersion(
+    ResourceProvider resourceProvider,
+    String rootPath,
+  ) {
+    var file = resourceProvider.getFile(
+      resourceProvider.pathContext.joinAll(
+        [rootPath, 'dart', 'build_defs', 'bzl', 'language.bzl'],
+      ),
+    );
+
+    String content;
+    try {
+      content = file.readAsStringSync();
+    } on FileSystemException {
+      return null;
+    }
+
+    final pattern = RegExp(r'_version_null_safety\s*=\s*"(\d+\.\d+)"');
+    for (var match in pattern.allMatches(content)) {
+      return Version.parse('${match.group(1)}.0');
+    }
+  }
 }
 
 /// Information about a package defined in a BazelWorkspace.
@@ -580,7 +628,7 @@
   @override
   Version? get languageVersion {
     _readBuildFile();
-    return _languageVersion;
+    return _languageVersion ?? workspace._languageVersion;
   }
 
   @override
@@ -656,7 +704,7 @@
           .join()
           .contains('dart_package(null_safety=True');
       if (hasNonNullableFlag) {
-        _enabledExperiments = [EnableString.non_nullable];
+        // Enabled by default.
       } else {
         _languageVersion = Version.parse('2.9.0');
       }
diff --git a/pkg/analyzer/lib/src/workspace/bazel_watcher.dart b/pkg/analyzer/lib/src/workspace/bazel_watcher.dart
index 05ce4a6..b3f09ec 100644
--- a/pkg/analyzer/lib/src/workspace/bazel_watcher.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel_watcher.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:core';
 import 'dart:io' as io;
 import 'dart:isolate';
 import 'dart:math';
@@ -11,7 +10,6 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/service.dart';
-import 'package:pedantic/pedantic.dart';
 import 'package:watcher/watcher.dart';
 
 Future<void> _isolateMain(SendPort sendPort) async {
@@ -33,7 +31,7 @@
   final List<String> _candidates;
 
   /// The time of last modification of the file under [_validPath].
-  _TimestampAndLength? _lastModified;
+  _ModifiedInfo? _lastModified;
 
   /// The resource provider used for polling the files.
   final ResourceProvider _provider;
@@ -47,7 +45,7 @@
   /// Checks if the file corresponding to the watched path has changed and
   /// returns the event or `null` if nothing changed.
   WatchEvent? poll() {
-    _TimestampAndLength? modified;
+    _ModifiedInfo? modified;
     if (_validPath == null) {
       var info = _pollAll();
       if (info != null) {
@@ -108,22 +106,23 @@
 
   /// Returns the modified time of the path or `null` if the file does not
   /// exist.
-  _TimestampAndLength? _pollOne(String path) {
+  _ModifiedInfo? _pollOne(String path) {
     try {
       // This might seem a bit convoluted but is necessary to deal with a
       // symlink to a directory (e.g., `bazel-bin`).
-      var resource = _provider.getResource(
-          _provider.getResource(path).resolveSymbolicLinksSync().path);
-      if (resource is File) {
-        var timestamp = resource.modificationStamp;
-        var length = resource.lengthSync;
-        return _TimestampAndLength(timestamp, length);
-      } else if (resource is Folder) {
+
+      var pathResource = _provider.getResource(path);
+      var symlinkTarget = pathResource.resolveSymbolicLinksSync().path;
+      var resolvedResource = _provider.getResource(symlinkTarget);
+      if (resolvedResource is File) {
+        var timestamp = resolvedResource.modificationStamp;
+        var length = resolvedResource.lengthSync;
+        return _ModifiedInfo(timestamp, length, symlinkTarget);
+      } else if (resolvedResource is Folder) {
         // `ResourceProvider` doesn't currently support getting timestamps of a
-        // folder, so we use a dummy value here. But it's still useful: this
-        // will correctly generate `ADD` or `REMOVE` events (we'll be just
-        // unable to generate any `CHANGE` events).
-        return _TimestampAndLength(0, 0);
+        // folder, so we use a dummy value here. But this shouldn't really
+        // matter, since the `symlinkTarget` should detect any modifications.
+        return _ModifiedInfo(0, 0, symlinkTarget);
       }
     } on FileSystemException catch (_) {
       // File doesn't exist, so return null.
@@ -417,7 +416,7 @@
 
 class FileInfo {
   String path;
-  _TimestampAndLength modified;
+  _ModifiedInfo modified;
   FileInfo(this.path, this.modified);
 }
 
@@ -525,6 +524,46 @@
   }
 }
 
+/// Data used to determines if a file has changed.
+///
+/// This turns out to be important for tracking files that change a lot, like
+/// the `command.log` that we use to detect the finished build.  Bazel writes to
+/// the file continuously and because the resolution of a timestamp is pretty
+/// low, it's quite possible to receive the same timestamp even though the file
+/// has changed.  We use its length to remedy that.  It's not perfect (for that
+/// we'd have to compute the hash), but it should be reasonable trade-off (to
+/// avoid any performance impact from reading and hashing the file).
+class _ModifiedInfo {
+  final int timestamp;
+  final int length;
+
+  /// Stores the resolved path in case a symlink or just the path for ordinary
+  /// files.
+  final String symlinkTarget;
+
+  _ModifiedInfo(this.timestamp, this.length, this.symlinkTarget);
+
+  @override
+  int get hashCode =>
+      // We don't really need to compute hashes, just check the equality. But
+      // throw in case someone expects this to work.
+      throw UnimplementedError(
+          '_ModifiedInfo.hashCode has not been implemented yet');
+
+  @override
+  bool operator ==(Object other) {
+    if (other is! _ModifiedInfo) return false;
+    return timestamp == other.timestamp &&
+        length == other.length &&
+        symlinkTarget == other.symlinkTarget;
+  }
+
+  // For debugging only.
+  @override
+  String toString() => '_ModifiedInfo('
+      'timestamp=$timestamp, length=$length, symlinkTarget=$symlinkTarget)';
+}
+
 class _Multiset<T> {
   final _counts = <T, int>{};
 
@@ -563,36 +602,3 @@
 
   _PerWorkspaceData(this.trigger, this.pollSubscription);
 }
-
-/// Stores the timestamp of a file and its length.
-///
-/// This turns out to be important for tracking files that change a lot, like
-/// the `command.log` that we use to detect the finished build.  Bazel writes to
-/// the file continuously and because the resolution of a timestamp is pretty
-/// low, it's quite possible to receive the same timestamp even though the file
-/// has changed.  We use its length to remedy that.  It's not perfect (for that
-/// we'd have to compute the hash), but it should be reasonable trade-off (to
-/// avoid any performance impact from reading and hashing the file).
-class _TimestampAndLength {
-  final int timestamp;
-  final int length;
-  _TimestampAndLength(this.timestamp, this.length);
-
-  @override
-  int get hashCode =>
-      // We don't really need to compute hashes, just check the equality. But
-      // throw in case someone expects this to work.
-      throw UnimplementedError(
-          '_TimestampAndLength.hashCode has not been implemented yet');
-
-  @override
-  bool operator ==(Object other) {
-    if (other is! _TimestampAndLength) return false;
-    return timestamp == other.timestamp && length == other.length;
-  }
-
-  // For debugging only.
-  @override
-  String toString() =>
-      '_TimestampAndLength(timestamp=$timestamp, length=$length)';
-}
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index 1746ddd..e22ce32 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.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 'dart:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index 7e0c179..ba6e15c 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.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 'dart:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/lint/pub.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/summary/api_signature.dart';
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
new file mode 100644
index 0000000..f5cd801
--- /dev/null
+++ b/pkg/analyzer/messages.yaml
@@ -0,0 +1,18774 @@
+# 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.
+
+# This file is organized as a two level map, where the outer key corresponds to
+# the name of an analyzer error class (e.g. CompileTimeErrorCode), and the inner
+# key corresponds to the name of a static variable in that class, describing a
+# single diagnostic message. Ideally, each entry contains three parts:
+#
+# 1. A message template (problemMessage).
+#
+# 2. A suggestion for how to correct the problem (correctionMessage).
+#
+# 3. User-facing documentation for the problem (documentation).
+#
+# A message shouldn't indicate which kind of diagnostic it is, for example,
+# warning or error. This is implied by the analyzer error class. For example,
+# all entries in `StaticWarningCode` are warnings.
+#
+# See the file [lib/src/fasta/diagnostics.md] for more details on how to write
+# good diagnostic messages.
+#
+# A message used for internal errors should have key that starts with
+# "InternalProblem". This way, UX review can prioritize it accordingly.
+#
+# Eventually, we'd like to have all diagnostics in one shared location. However,
+# for now, we have analyzer error codes and CFE error codes in separate files.
+# See `pkg/front_end/messages.yaml` for the CFE error codes.
+#
+# ## Parameter Substitution in problemMessage and correctionMessage
+#
+# The fields `problemMessage` and `correctionMessage` are subject to parameter
+# substitution. When the compiler reports a problem, it may also specify a list
+# of values to be substituted into the message. Parameters are declared using
+# placeholders of the form `{INTEGER}`, e.g. `{0}` is the zeroth parameter.
+
+AnalysisOptionsErrorCode:
+  INCLUDED_FILE_PARSE_ERROR:
+    problemMessage: "{3} in {0}({1}..{2})"
+    comment: |-
+      An error code indicating that there is a syntactic error in the included
+      file.
+
+      Parameters:
+      0: the path of the file containing the error
+      1: the starting offset of the text in the file that contains the error
+      2: the ending offset of the text in the file that contains the error
+      3: the error message
+  PARSE_ERROR:
+    problemMessage: "{0}"
+    comment: |-
+      An error code indicating that there is a syntactic error in the file.
+
+      Parameters:
+      0: the error message from the parse error
+AnalysisOptionsHintCode:
+  PREVIEW_DART_2_SETTING_DEPRECATED:
+    problemMessage: "The 'enablePreviewDart2' setting is deprecated."
+    correctionMessage: It is no longer necessary to explicitly enable Dart 2.
+    comment: |-
+      An error code indicating that the enablePreviewDart2 setting is
+      deprecated.
+  STRONG_MODE_SETTING_DEPRECATED:
+    problemMessage: "The 'strong-mode: true' setting is deprecated."
+    correctionMessage: It is no longer necessary to explicitly enable strong mode.
+    comment: "An error code indicating that strong-mode: true is deprecated."
+  SUPER_MIXINS_SETTING_DEPRECATED:
+    problemMessage: "The 'enableSuperMixins' setting is deprecated."
+    correctionMessage: "Support has been added to the language for 'mixin' based mixins."
+    comment: |-
+      An error code indicating that the enablePreviewDart2 setting is
+      deprecated.
+AnalysisOptionsWarningCode:
+  ANALYSIS_OPTION_DEPRECATED:
+    problemMessage: "The option '{0}' is no longer supported."
+    comment: An error code indicating that the given option is deprecated.
+  INCLUDED_FILE_WARNING:
+    problemMessage: "Warning in the included options file {0}({1}..{2}): {3}"
+    comment: |-
+      An error code indicating a specified include file has a warning.
+
+      Parameters:
+      0: the path of the file containing the warnings
+      1: the starting offset of the text in the file that contains the warning
+      2: the ending offset of the text in the file that contains the warning
+      3: the warning message
+  INCLUDE_FILE_NOT_FOUND:
+    problemMessage: "The include file '{0}' in '{1}' can't be found when analyzing '{2}'."
+    comment: |-
+      An error code indicating a specified include file could not be found.
+
+      Parameters:
+      0: the uri of the file to be included
+      1: the path of the file containing the include directive
+      2: the path of the context being analyzed
+  INVALID_OPTION:
+    problemMessage: "Invalid option specified for '{0}': {1}"
+    comment: |-
+      An error code indicating that a plugin is being configured with an invalid
+      value for an option and a detail message is provided.
+  INVALID_SECTION_FORMAT:
+    problemMessage: "Invalid format for the '{0}' section."
+    comment: |-
+      An error code indicating an invalid format for an options file section.
+
+      Parameters:
+      0: the section name
+  SPEC_MODE_REMOVED:
+    problemMessage: "The option 'strong-mode: false' is no longer supported."
+    correctionMessage: "It's recommended to remove the 'strong-mode:' setting (and make your code Dart 2 compliant)."
+    comment: "An error code indicating that strong-mode: false is has been removed."
+  UNRECOGNIZED_ERROR_CODE:
+    problemMessage: "'{0}' isn't a recognized error code."
+    comment: |-
+      An error code indicating that an unrecognized error code is being used to
+      specify an error filter.
+
+      Parameters:
+      0: the unrecognized error code
+  UNSUPPORTED_OPTION_WITHOUT_VALUES:
+    problemMessage: "The option '{1}' isn't supported by '{0}'."
+    comment: |-
+      An error code indicating that a plugin is being configured with an
+      unsupported option and legal options are provided.
+
+      Parameters:
+      0: the plugin name
+      1: the unsupported option key
+  UNSUPPORTED_OPTION_WITH_LEGAL_VALUE:
+    problemMessage: "The option '{1}' isn't supported by '{0}'. Try using the only supported option: '{2}'."
+    comment: |-
+      An error code indicating that a plugin is being configured with an
+      unsupported option where there is just one legal value.
+
+      Parameters:
+      0: the plugin name
+      1: the unsupported option key
+      2: the legal value
+  UNSUPPORTED_OPTION_WITH_LEGAL_VALUES:
+    problemMessage: "The option '{1}' isn't supported by '{0}'."
+    correctionMessage: "Try using one of the supported options: {2}."
+    comment: |-
+      An error code indicating that a plugin is being configured with an
+      unsupported option and legal options are provided.
+
+      Parameters:
+      0: the plugin name
+      1: the unsupported option key
+      2: legal values
+  UNSUPPORTED_VALUE:
+    problemMessage: "The value '{1}' isn't supported by '{0}'."
+    correctionMessage: "Try using one of the supported options: {2}."
+    comment: |-
+      An error code indicating that an option entry is being configured with an
+      unsupported value.
+
+      Parameters:
+      0: the option name
+      1: the unsupported value
+      2: legal values
+CompileTimeErrorCode:
+  ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER:
+    sharedName: ABSTRACT_FIELD_INITIALIZER
+    problemMessage: "Abstract fields can't have initializers."
+    correctionMessage: "Try removing the field initializer or the 'abstract' keyword from the field declaration."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a field that has the `abstract`
+      modifier also has an initializer.
+
+      #### Example
+
+      The following code produces this diagnostic because `f` is marked as
+      `abstract` and has an initializer:
+
+      ```dart
+      abstract class C {
+        abstract int [!f!] = 0;
+      }
+      ```
+
+      The following code produces this diagnostic because `f` is marked as
+      `abstract` and there's an initializer in the constructor:
+
+      ```dart
+      abstract class C {
+        abstract int f;
+
+        C() : [!f!] = 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If the field must be abstract, then remove the initializer:
+
+      ```dart
+      abstract class C {
+        abstract int f;
+      }
+      ```
+
+      If the field isn't required to be abstract, then remove the keyword:
+
+      ```dart
+      abstract class C {
+        int f = 0;
+      }
+      ```
+  ABSTRACT_FIELD_INITIALIZER:
+    problemMessage: "Abstract fields can't have initializers."
+    correctionMessage: "Try removing the initializer or the 'abstract' keyword."
+    hasPublishedDocs: true
+    comment: No parameters.
+  ABSTRACT_SUPER_MEMBER_REFERENCE:
+    problemMessage: "The {0} '{1}' is always abstract in the supertype."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the display name for the kind of the found abstract member
+      1: the name of the member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an inherited member is
+      referenced using `super`, but there is no concrete implementation of the
+      member in the superclass chain. Abstract members can't be invoked.
+
+      #### Examples
+
+      The following code produces this diagnostic because `B` doesn't inherit a
+      concrete implementation of `a`:
+
+      ```dart
+      abstract class A {
+        int get a;
+      }
+      class B extends A {
+        int get a => super.[!a!];
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the invocation of the abstract member, possibly replacing it with an
+      invocation of a concrete member.
+      TODO(brianwilkerson) This either needs to be generalized (use 'member'
+       rather than '{0}') or split into multiple codes.
+  AMBIGUOUS_EXPORT:
+    problemMessage: "The name '{0}' is defined in the libraries '{1}' and '{2}'."
+    correctionMessage: Try removing the export of one of the libraries, or explicitly hiding the name in one of the export directives.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the ambiguous element
+      1: the name of the first library in which the type is found
+      2: the name of the second library in which the type is found
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when two or more export directives
+      cause the same name to be exported from multiple libraries.
+
+      #### Example
+
+      Given a file named `a.dart` containing
+
+      ```dart
+      %uri="lib/a.dart"
+      class C {}
+      ```
+
+      And a file named `b.dart` containing
+
+      ```dart
+      %uri="lib/b.dart"
+      class C {}
+      ```
+
+      The following code produces this diagnostic because the name `C` is being
+      exported from both `a.dart` and `b.dart`:
+
+      ```dart
+      export 'a.dart';
+      export [!'b.dart'!];
+      ```
+
+      #### Common fixes
+
+      If none of the names in one of the libraries needs to be exported, then
+      remove the unnecessary export directives:
+
+      ```dart
+      export 'a.dart';
+      ```
+
+      If all of the export directives are needed, then hide the name in all
+      except one of the directives:
+
+      ```dart
+      export 'a.dart';
+      export 'b.dart' hide C;
+      ```
+  AMBIGUOUS_EXTENSION_MEMBER_ACCESS:
+    problemMessage: "A member named '{0}' is defined in extensions {1}, and none are more specific."
+    correctionMessage: Try using an extension override to specify the extension you want to be chosen.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+      1: the name of the first declaring extension
+      2: the name of the second declaring extension
+    documentation: |-
+      #### Description
+
+      When code refers to a member of an object (for example, `o.m()` or `o.m` or
+      `o[i]`) where the static type of `o` doesn't declare the member (`m` or
+      `[]`, for example), then the analyzer tries to find the member in an
+      extension. For example, if the member is `m`, then the analyzer looks for
+      extensions that declare a member named `m` and have an extended type that
+      the static type of `o` can be assigned to. When there's more than one such
+      extension in scope, the extension whose extended type is most specific is
+      selected.
+
+      The analyzer produces this diagnostic when none of the extensions has an
+      extended type that's more specific than the extended types of all of the
+      other extensions, making the reference to the member ambiguous.
+
+      #### Examples
+
+      The following code produces this diagnostic because there's no way to
+      choose between the member in `E1` and the member in `E2`:
+
+      ```dart
+      extension E1 on String {
+        int get charCount => 1;
+      }
+
+      extension E2 on String {
+        int get charCount => 2;
+      }
+
+      void f(String s) {
+        print(s.[!charCount!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If you don't need both extensions, then you can delete or hide one of them.
+
+      If you need both, then explicitly select the one you want to use by using
+      an extension override:
+
+      ```dart
+      extension E1 on String {
+        int get charCount => length;
+      }
+
+      extension E2 on String {
+        int get charCount => length;
+      }
+
+      void f(String s) {
+        print(E2(s).charCount);
+      }
+      ```
+  AMBIGUOUS_IMPORT:
+    problemMessage: "The name '{0}' is defined in the libraries {1}."
+    correctionMessage: "Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports."
+    hasPublishedDocs: true
+    comment: |-
+      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
+    documentation: |-
+      #### 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) {}
+      ```
+  AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH:
+    problemMessage: "The literal can't be either a map or a set because it contains at least one literal map entry or a spread operator spreading a 'Map', and at least one element which is neither of these."
+    correctionMessage: Try removing or changing some of the elements so that all of the elements are consistent.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      Because map and set literals use the same delimiters (`{` and `}`), the
+      analyzer looks at the type arguments and the elements to determine which
+      kind of literal you meant. When there are no type arguments, then the
+      analyzer uses the types of the elements. If all of the elements are literal
+      map entries and all of the spread operators are spreading a `Map` then it's
+      a `Map`. If none of the elements are literal map entries and all of the
+      spread operators are spreading an `Iterable`, then it's a `Set`. If neither
+      of those is true then it's ambiguous.
+
+      The analyzer produces this diagnostic when at least one element is a
+      literal map entry or a spread operator spreading a `Map`, and at least one
+      element is neither of these, making it impossible for the analyzer to
+      determine whether you are writing a map literal or a set literal.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+          [!{...a, ...b, ...c}!];
+      ```
+
+      The list `b` can only be spread into a set, and the maps `a` and `c` can
+      only be spread into a map, and the literal can't be both.
+
+      #### Common fixes
+
+      There are two common ways to fix this problem. The first is to remove all
+      of the spread elements of one kind or another, so that the elements are
+      consistent. In this case, that likely means removing the list and deciding
+      what to do about the now unused parameter:
+
+      ```dart
+      union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+          {...a, ...c};
+      ```
+
+      The second fix is to change the elements of one kind into elements that are
+      consistent with the other elements. For example, you can add the elements
+      of the list as keys that map to themselves:
+
+      ```dart
+      union(Map<String, String> a, List<String> b, Map<String, String> c) =>
+          {...a, for (String s in b) s: s, ...c};
+      ```
+  AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER:
+    problemMessage: "This literal must be either a map or a set, but the elements don't have enough information for type inference to work."
+    correctionMessage: Try adding type arguments to the literal (one for sets, two for maps).
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      Because map and set literals use the same delimiters (`{` and `}`), the
+      analyzer looks at the type arguments and the elements to determine which
+      kind of literal you meant. When there are no type arguments and all of the
+      elements are spread elements (which are allowed in both kinds of literals)
+      then the analyzer uses the types of the expressions that are being spread.
+      If all of the expressions have the type `Iterable`, then it's a set
+      literal; if they all have the type `Map`, then it's a map literal.
+
+      This diagnostic is produced when none of the expressions being spread have
+      a type that allows the analyzer to decide whether you were writing a map
+      literal or a set literal.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      union(a, b) => [!{...a, ...b}!];
+      ```
+
+      The problem occurs because there are no type arguments, and there is no
+      information about the type of either `a` or `b`.
+
+      #### Common fixes
+
+      There are three common ways to fix this problem. The first is to add type
+      arguments to the literal. For example, if the literal is intended to be a
+      map literal, you might write something like this:
+
+      ```dart
+      union(a, b) => <String, String>{...a, ...b};
+      ```
+
+      The second fix is to add type information so that the expressions have
+      either the type `Iterable` or the type `Map`. You can add an explicit cast
+      or, in this case, add types to the declarations of the two parameters:
+
+      ```dart
+      union(List<int> a, List<int> b) => {...a, ...b};
+      ```
+
+      The third fix is to add context information. In this case, that means
+      adding a return type to the function:
+
+      ```dart
+      Set<String> union(a, b) => {...a, ...b};
+      ```
+
+      In other cases, you might add a type somewhere else. For example, say the
+      original code looks like this:
+
+      ```dart
+      union(a, b) {
+        var x = [!{...a, ...b}!];
+        return x;
+      }
+      ```
+
+      You might add a type annotation on `x`, like this:
+
+      ```dart
+      union(a, b) {
+        Map<String, String> x = {...a, ...b};
+        return x;
+      }
+      ```
+  ARGUMENT_TYPE_NOT_ASSIGNABLE:
+    problemMessage: "The argument type '{0}' can't be assigned to the parameter type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the actual argument type
+      1: the name of the expected type
+    documentation: |-
+      #### 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
+      %language=2.9
+      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
+      %language=2.9
+      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
+      %language=2.9
+      String f(String x) => x;
+      String g(num y) => f(y.toString());
+      ```
+
+      Another approach is to add explicit type tests and fallback code:
+
+      ```dart
+      %language=2.9
+      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);
+      ```
+  ASSERT_IN_REDIRECTING_CONSTRUCTOR:
+    problemMessage: "A redirecting constructor can't have an 'assert' initializer."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a redirecting constructor (a
+      constructor that redirects to another constructor in the same class) has an
+      assert in the initializer list.
+
+      #### Example
+
+      The following code produces this diagnostic because the unnamed constructor
+      is a redirecting constructor and also has an assert in the initializer
+      list:
+
+      ```dart
+      class C {
+        C(int x) : [!assert(x > 0)!], this.name();
+        C.name() {}
+      }
+      ```
+
+      #### Common fixes
+
+      If the assert isn't needed, then remove it:
+
+      ```dart
+      class C {
+        C(int x) : this.name();
+        C.name() {}
+      }
+      ```
+
+      If the assert is needed, then convert the constructor into a factory
+      constructor:
+
+      ```dart
+      class C {
+        factory C(int x) {
+          assert(x > 0);
+          return C.name();
+        }
+        C.name() {}
+      }
+      ```
+  ASSIGNMENT_TO_CONST:
+    problemMessage: "Constant variables can't be assigned a value."
+    correctionMessage: "Try removing the assignment, or remove the modifier 'const' from the variable."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds an assignment to a
+      top-level variable, a static field, or a local variable that has the
+      `const` modifier. The value of a compile-time constant can't be changed at
+      runtime.
+
+      #### Example
+
+      The following code produces this diagnostic because `c` is being assigned a
+      value even though it has the `const` modifier:
+
+      ```dart
+      const c = 0;
+
+      void f() {
+        [!c!] = 1;
+        print(c);
+      }
+      ```
+
+      #### Common fixes
+
+      If the variable must be assignable, then remove the `const` modifier:
+
+      ```dart
+      var c = 0;
+
+      void f() {
+        c = 1;
+        print(c);
+      }
+      ```
+
+      If the constant shouldn't be changed, then either remove the assignment or
+      use a local variable in place of references to the constant:
+
+      ```dart
+      const c = 0;
+
+      void f() {
+        var v = 1;
+        print(v);
+      }
+      ```
+  ASSIGNMENT_TO_FINAL:
+    problemMessage: "'{0}' can't be used as a setter because it's final."
+    correctionMessage: "Try finding a different setter, or making '{0}' non-final."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the final variable
+    documentation: |-
+      #### 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;
+      }
+      ```
+  ASSIGNMENT_TO_FINAL_LOCAL:
+    problemMessage: "The final variable '{0}' can only be set once."
+    correctionMessage: "Try making '{0}' non-final."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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);
+      }
+      ```
+  ASSIGNMENT_TO_FINAL_NO_SETTER:
+    problemMessage: "There isn’t a setter named '{0}' in class '{1}'."
+    correctionMessage: Try correcting the name to reference an existing setter, or declare the setter.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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;
+      }
+      ```
+  ASSIGNMENT_TO_FUNCTION:
+    problemMessage: "Functions can't be assigned a value."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name of a function appears
+      on the left-hand side of an assignment expression.
+
+      #### Example
+
+      The following code produces this diagnostic because the assignment to the
+      function `f` is invalid:
+
+      ```dart
+      void f() {}
+
+      void g() {
+        [!f!] = () {};
+      }
+      ```
+
+      #### Common fixes
+
+      If the right-hand side should be assigned to something else, such as a
+      local variable, then change the left-hand side:
+
+      ```dart
+      void f() {}
+
+      void g() {
+        var x = () {};
+        print(x);
+      }
+      ```
+
+      If the intent is to change the implementation of the function, then define
+      a function-valued variable instead of a function:
+
+      ```dart
+      void Function() f = () {};
+
+      void g() {
+        f = () {};
+      }
+      ```
+  ASSIGNMENT_TO_METHOD:
+    problemMessage: "Methods can't be assigned a value."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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.
+  ASSIGNMENT_TO_TYPE:
+    problemMessage: "Types can't be assigned a value."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name of a type name appears
+      on the left-hand side of an assignment expression.
+
+      #### Example
+
+      The following code produces this diagnostic because the assignment to the
+      class `C` is invalid:
+
+      ```dart
+      class C {}
+
+      void f() {
+        [!C!] = null;
+      }
+      ```
+
+      #### Common fixes
+
+      If the right-hand side should be assigned to something else, such as a
+      local variable, then change the left-hand side:
+
+      ```dart
+      void f() {}
+
+      void g() {
+        var c = null;
+        print(c);
+      }
+      ```
+  ASYNC_FOR_IN_WRONG_CONTEXT:
+    problemMessage: The async for-in loop can only be used in an async function.
+    correctionMessage: "Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for-in loop."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an async for-in loop is found in
+      a function or method whose body isn't marked as being either `async` or
+      `async*`.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of `f` isn't
+      marked as being either `async` or `async*`, but `f` contains an async
+      for-in loop:
+
+      ```dart
+      void f(list) {
+        await for (var e [!in!] list) {
+          print(e);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the function should return a `Future`, then mark the body with `async`:
+
+      ```dart
+      Future<void> f(list) async {
+        await for (var e in list) {
+          print(e);
+        }
+      }
+      ```
+
+      If the function should return a `Stream` of values, then mark the body with
+      `async*`:
+
+      ```dart
+      Stream<void> f(list) async* {
+        await for (var e in list) {
+          print(e);
+        }
+      }
+      ```
+
+      If the function should be synchronous, then remove the `await` before the
+      loop:
+
+      ```dart
+      void f(list) {
+        for (var e in list) {
+          print(e);
+        }
+      }
+      ```
+  AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER:
+    problemMessage: "The 'await' expression can't be used in a 'late' local variable's initializer."
+    correctionMessage: "Try removing the 'late' modifier, or rewriting the initializer without using the 'await' expression."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a local variable that has the
+      `late` modifier uses an `await` expression in the initializer.
+
+      #### Example
+
+      The following code produces this diagnostic because an `await` expression
+      is used in the initializer for `v`, a local variable that is marked `late`:
+
+      ```dart
+      Future<int> f() async {
+        late var v = [!await!] 42;
+        return v;
+      }
+      ```
+
+      #### Common fixes
+
+      If the initializer can be rewritten to not use `await`, then rewrite it:
+
+      ```dart
+      Future<int> f() async {
+        late var v = 42;
+        return v;
+      }
+      ```
+
+      If the initializer can't be rewritten, then remove the `late` modifier:
+
+      ```dart
+      Future<int> f() async {
+        var v = await 42;
+        return v;
+      }
+      ```
+  AWAIT_IN_WRONG_CONTEXT:
+    problemMessage: The await expression can only be used in an async function.
+    correctionMessage: "Try marking the function body with either 'async' or 'async*'."
+    comment: |-
+      16.30 Await Expressions: It is a compile-time error if the function
+      immediately enclosing _a_ is not declared asynchronous. (Where _a_ is the
+      await expression.)
+  BODY_MIGHT_COMPLETE_NORMALLY:
+    problemMessage: "The body might complete normally, causing 'null' to be returned, but the return type is a potentially non-nullable type."
+    correctionMessage: Try adding either a return or a throw statement at the end.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function has a
+      return type that's [potentially non-nullable][] but would implicitly return
+      `null` if control reached the end of the function.
+
+      #### Example
+
+      The following code produces this diagnostic because the method `m` has an
+      implicit return of `null` inserted at the end of the method, but the method
+      is declared to not return `null`:
+
+      ```dart
+      class C {
+        int [!m!](int t) {
+          print(t);
+        }
+      }
+      ```
+
+      The following code produces this diagnostic because the method `m` has an
+      implicit return of `null` inserted at the end of the method, but because
+      the class `C` can be instantiated with a non-nullable type argument, the
+      method is effectively declared to not return `null`:
+
+      ```dart
+      class C<T> {
+        T [!m!](T t) {
+          print(t);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If there's a reasonable value that can be returned, then add a `return`
+      statement at the end of the method:
+
+      ```dart
+      class C<T> {
+        T m(T t) {
+          print(t);
+          return t;
+        }
+      }
+      ```
+
+      If the method won't reach the implicit return, then add a `throw` at the
+      end of the method:
+
+      ```dart
+      class C<T> {
+        T m(T t) {
+          print(t);
+          throw '';
+        }
+      }
+      ```
+
+      If the method intentionally returns `null` at the end, then change the
+      return type so that it's valid to return `null`:
+
+      ```dart
+      class C<T> {
+        T? m(T t) {
+          print(t);
+        }
+      }
+      ```
+  BREAK_LABEL_ON_SWITCH_MEMBER:
+    problemMessage: "A break label resolves to the 'case' or 'default' statement."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a break in a case clause inside
+      a switch statement has a label that is associated with another case clause.
+
+      #### Example
+
+      The following code produces this diagnostic because the label `l` is
+      associated with the case clause for `0`:
+
+      ```dart
+      void f(int i) {
+        switch (i) {
+          l: case 0:
+            break;
+          case 1:
+            break [!l!];
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the intent is to transfer control to the statement after the switch,
+      then remove the label from the break statement:
+
+      ```dart
+      void f(int i) {
+        switch (i) {
+          case 0:
+            break;
+          case 1:
+            break;
+        }
+      }
+      ```
+
+      If the intent is to transfer control to a different case block, then use
+      `continue` rather than `break`:
+
+      ```dart
+      void f(int i) {
+        switch (i) {
+          l: case 0:
+            break;
+          case 1:
+            continue l;
+        }
+      }
+      ```
+  BUILT_IN_IDENTIFIER_AS_TYPE:
+    problemMessage: "The built-in identifier '{0}' can't be used as a type."
+    correctionMessage: Try correcting the name to match an existing type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a built-in identifier is used
+      where a type name is expected.
+
+      #### Examples
+
+      The following code produces this diagnostic because `import` can't be used
+      as a type because it's a built-in identifier:
+
+      ```dart
+      [!import!]<int> x;
+      ```
+
+      #### Common fixes
+
+      Replace the built-in identifier with the name of a valid type:
+
+      ```dart
+      List<int> x;
+      ```
+  BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME:
+    sharedName: BUILT_IN_IDENTIFIER_IN_DECLARATION
+    problemMessage: "The built-in identifier '{0}' can't be used as an extension name."
+    correctionMessage: Try choosing a different name for the extension.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name used in the declaration
+      of a class, extension, mixin, typedef, type parameter, or import prefix is
+      a built-in identifier. Built-in identifiers can’t be used to name any of
+      these kinds of declarations.
+
+      #### Example
+
+      The following code produces this diagnostic because `mixin` is a built-in
+      identifier:
+
+      ```dart
+      extension [!mixin!] on int {}
+      ```
+
+      #### Common fixes
+
+      Choose a different name for the declaration.
+  BUILT_IN_IDENTIFIER_AS_PREFIX_NAME:
+    sharedName: BUILT_IN_IDENTIFIER_IN_DECLARATION
+    problemMessage: "The built-in identifier '{0}' can't be used as a prefix name."
+    correctionMessage: Try choosing a different name for the prefix.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+  BUILT_IN_IDENTIFIER_AS_TYPE_NAME:
+    sharedName: BUILT_IN_IDENTIFIER_IN_DECLARATION
+    problemMessage: "The built-in identifier '{0}' can't be used as a type name."
+    correctionMessage: Try choosing a different name for the type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+  BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME:
+    sharedName: BUILT_IN_IDENTIFIER_IN_DECLARATION
+    problemMessage: "The built-in identifier '{0}' can't be used as a type parameter name."
+    correctionMessage: Try choosing a different name for the type parameter.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+  BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME:
+    sharedName: BUILT_IN_IDENTIFIER_IN_DECLARATION
+    problemMessage: "The built-in identifier '{0}' can't be used as a typedef name."
+    correctionMessage: Try choosing a different name for the typedef.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the built-in identifier that is being used
+  CASE_BLOCK_NOT_TERMINATED:
+    problemMessage: "The last statement of the 'case' should be 'break', 'continue', 'rethrow', 'return', or 'throw'."
+    correctionMessage: Try adding one of the required statements.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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
+      %language=2.9
+      void f(int x) {
+        switch (x) {
+          [!case!] 0:
+            x += 2;
+          default:
+            x += 1;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Add one of the required terminators:
+
+      ```dart
+      %language=2.9
+      void f(int x) {
+        switch (x) {
+          case 0:
+            x += 2;
+            break;
+          default:
+            x += 1;
+        }
+      }
+      ```
+  CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS:
+    problemMessage: "The switch case expression type '{0}' can't override the '==' operator."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the this of the switch case expression
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type of the expression
+      following the keyword `case` has an implementation of the `==` operator
+      other than the one in `Object`.
+
+      #### Example
+
+      The following code produces this diagnostic because the expression
+      following the keyword `case` (`C(0)`) has the type `C`, and the class `C`
+      overrides the `==` operator:
+
+      ```dart
+      class C {
+        final int value;
+
+        const C(this.value);
+
+        bool operator ==(Object other) {
+          return false;
+        }
+      }
+
+      void f(C c) {
+        switch (c) {
+          case [!C(0)!]:
+            break;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If there isn't a strong reason not to do so, then rewrite the code to use
+      an if-else structure:
+
+      ```dart
+      class C {
+        final int value;
+
+        const C(this.value);
+
+        bool operator ==(Object other) {
+          return false;
+        }
+      }
+
+      void f(C c) {
+        if (c == C(0)) {
+          // ...
+        }
+      }
+      ```
+
+      If you can't rewrite the switch statement and the implementation of `==`
+      isn't necessary, then remove it:
+
+      ```dart
+      class C {
+        final int value;
+
+        const C(this.value);
+      }
+
+      void f(C c) {
+        switch (c) {
+          case C(0):
+            break;
+        }
+      }
+      ```
+
+      If you can't rewrite the switch statement and you can't remove the
+      definition of `==`, then find some other value that can be used to control
+      the switch:
+
+      ```dart
+      class C {
+        final int value;
+
+        const C(this.value);
+
+        bool operator ==(Object other) {
+          return false;
+        }
+      }
+
+      void f(C c) {
+        switch (c.value) {
+          case 0:
+            break;
+        }
+      }
+      ```
+  CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE:
+    problemMessage: "The switch case expression type '{0}' must be a subtype of the switch expression type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the case expression
+      1: the type of the switch expression
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the expression following `case`
+      in a `switch` statement has a static type that isn't a subtype of the
+      static type of the expression following `switch`.
+
+      #### Example
+
+      The following code produces this diagnostic because `1` is an `int`, which
+      isn't a subtype of `String` (the type of `s`):
+
+      ```dart
+      void f(String s) {
+        switch (s) {
+          case [!1!]:
+            break;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the value of the `case` expression is wrong, then change the `case`
+      expression so that it has the required type:
+
+      ```dart
+      void f(String s) {
+        switch (s) {
+          case '1':
+            break;
+        }
+      }
+      ```
+
+      If the value of the `case` expression is correct, then change the `switch`
+      expression to have the required type:
+
+      ```dart
+      void f(int s) {
+        switch (s) {
+          case 1:
+            break;
+        }
+      }
+      ```
+  CAST_TO_NON_TYPE:
+    problemMessage: "The name '{0}' isn't a type, so it can't be used in an 'as' expression."
+    correctionMessage: "Try changing the name to the name of an existing type, or creating a type with the name '{0}'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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;
+      ```
+  CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER:
+    sharedName: CLASS_INSTANTIATION_ACCESS_TO_MEMBER
+    problemMessage: "The instance member '{0}' can't be accessed on a class instantiation."
+    correctionMessage: Try changing the member name to the name of a constructor.
+    comment: |-
+      Parameters:
+      0: the name of the member
+  CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER:
+    sharedName: CLASS_INSTANTIATION_ACCESS_TO_MEMBER
+    problemMessage: "The class '{0} doesn't have a constructor named '{1}."
+    correctionMessage: "Try invoking a different constructor, or defining a constructor named '{1}'."
+    comment: |-
+      Parameters:
+      0: the name of the member
+  CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER:
+    sharedName: CLASS_INSTANTIATION_ACCESS_TO_MEMBER
+    problemMessage: "The static member '{0}' can't be accessed on a class instantiation."
+    correctionMessage: Try removing the type arguments from the class name, or changing the member name to the name of a constructor.
+    comment: |-
+      Parameters:
+      0: the name of the member
+  NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY:
+    sharedName: COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
+    problemMessage: "Constant values from a deferred library can't be used as keys in a 'const' map literal."
+    correctionMessage: "Try removing the keyword 'const' from the map literal or removing the keyword 'deferred' from the import."
+    hasPublishedDocs: true
+    comment: No parameters.
+  NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY:
+    sharedName: COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
+    problemMessage: "Constant values from a deferred library can't be used as values in a 'const' list literal."
+    correctionMessage: "Try removing the keyword 'const' from the list literal or removing the keyword 'deferred' from the import."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a collection literal that is
+      either explicitly (because it's prefixed by the `const` keyword) or
+      implicitly (because it appears in a [constant context][]) a constant
+      contains a value that is declared in a library that is imported using a
+      deferred import. Constants are evaluated at compile time, and values from
+      deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines the constant `zero`:
+
+      ```dart
+      %uri="lib/a.dart"
+      const zero = 0;
+      ```
+
+      The following code produces this diagnostic because the constant list
+      literal contains `a.zero`, which is imported using a `deferred` import:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      var l = const [[!a.zero!]];
+      ```
+
+      #### Common fixes
+
+      If the collection literal isn't required to be constant, then remove the
+      `const` keyword:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      var l = [a.zero];
+      ```
+
+      If the collection is required to be constant and the imported constant must
+      be referenced, then remove the keyword `deferred` from the import:
+
+      ```dart
+      import 'a.dart' as a;
+
+      var l = const [a.zero];
+      ```
+
+      If you don't need to reference the constant, then replace it with a
+      suitable value:
+
+      ```dart
+      var l = const [0];
+      ```
+  SET_ELEMENT_FROM_DEFERRED_LIBRARY:
+    sharedName: COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
+    problemMessage: "Constant values from a deferred library can't be used as values in a 'const' set literal."
+    correctionMessage: "Try removing the keyword 'const' from the set literal or removing the keyword 'deferred' from the import."
+    hasPublishedDocs: true
+    comment: No parameters.
+  NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY:
+    sharedName: COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
+    problemMessage: "Constant values from a deferred library can't be used as values in a 'const' map literal."
+    correctionMessage: "Try removing the keyword 'const' from the map literal or removing the keyword 'deferred' from the import."
+    hasPublishedDocs: true
+    comment: No parameters.
+  CONCRETE_CLASS_WITH_ABSTRACT_MEMBER:
+    problemMessage: "'{0}' must have a method body because '{1}' isn't abstract."
+    correctionMessage: "Try making '{1}' abstract, or adding a body to '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the abstract method
+      1: the name of the enclosing class
+    documentation: |-
+      #### 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();
+      }
+      ```
+  CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD:
+    sharedName: CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
+    problemMessage: "'{0}' can't be used to name both a constructor and a static field in this class."
+    correctionMessage: Try renaming either the constructor or the field.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the constructor and field
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a named constructor and either a
+      static method or static field have the same name. Both are accessed using
+      the name of the class, so having the same name makes the reference
+      ambiguous.
+
+      #### Example
+
+      The following code produces this diagnostic because the static field `foo`
+      and the named constructor `foo` have the same name:
+
+      ```dart
+      class C {
+        C.[!foo!]();
+        static int foo = 0;
+      }
+      ```
+
+      The following code produces this diagnostic because the static method `foo`
+      and the named constructor `foo` have the same name:
+
+      ```dart
+      class C {
+        C.[!foo!]();
+        static void foo() {}
+      }
+      ```
+
+      #### Common fixes
+
+      Rename either the member or the constructor.
+  CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER:
+    sharedName: CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
+    problemMessage: "'{0}' can't be used to name both a constructor and a static getter in this class."
+    correctionMessage: Try renaming either the constructor or the getter.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the constructor and getter
+  CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD:
+    sharedName: CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
+    problemMessage: "'{0}' can't be used to name both a constructor and a static method in this class."
+    correctionMessage: Try renaming either the constructor or the method.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the constructor
+  CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER:
+    sharedName: CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
+    problemMessage: "'{0}' can't be used to name both a constructor and a static setter in this class."
+    correctionMessage: Try renaming either the constructor or the setter.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the constructor and setter
+  CONFLICTING_FIELD_AND_METHOD:
+    problemMessage: "Class '{0}' can't define field '{1}' and have method '{2}.{1}' with the same name."
+    correctionMessage: "Try converting the getter to a method, or renaming the field to a name that doesn't conflict."
+    comment: |-
+      10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+      error if `C` declares a getter or a setter with basename `n`, and has a
+      method named `n`.
+
+      Parameters:
+      0: the name of the class defining the conflicting field
+      1: the name of the conflicting field
+      2: the name of the class defining the method with which the field conflicts
+  CONFLICTING_GENERIC_INTERFACES:
+    problemMessage: "The class '{0}' can't implement both '{1}' and '{2}' because the type arguments are different."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class implementing the conflicting interface
+      1: the first conflicting type
+      2: the second conflicting type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class attempts to implement a
+      generic interface multiple times, and the values of the type arguments
+      aren't the same.
+
+      #### Example
+
+      The following code produces this diagnostic because `C` is defined to
+      implement both `I<int>` (because it extends `A`) and `I<String>` (because
+      it implements`B`), but `int` and `String` aren't the same type:
+
+      ```dart
+      class I<T> {}
+      class A implements I<int> {}
+      class B implements I<String> {}
+      class [!C!] extends A implements B {}
+      ```
+
+      #### Common fixes
+
+      Rework the type hierarchy to avoid this situation. For example, you might
+      make one or both of the inherited types generic so that `C` can specify the
+      same type for both type arguments:
+
+      ```dart
+      class I<T> {}
+      class A<S> implements I<S> {}
+      class B implements I<String> {}
+      class C extends A<String> implements B {}
+      ```
+  CONFLICTING_METHOD_AND_FIELD:
+    problemMessage: "Class '{0}' can't define method '{1}' and have field '{2}.{1}' with the same name."
+    correctionMessage: "Try converting the method to a getter, or renaming the method to a name that doesn't conflict."
+    comment: |-
+      10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+      error if `C` declares a method named `n`, and has a getter or a setter
+      with basename `n`.
+
+      Parameters:
+      0: the name of the class defining the conflicting method
+      1: the name of the conflicting method
+      2: the name of the class defining the field with which the method conflicts
+  CONFLICTING_STATIC_AND_INSTANCE:
+    problemMessage: "Class '{0}' can't define static member '{1}' and have instance member '{2}.{1}' with the same name."
+    correctionMessage: "Try renaming the member to a name that doesn't conflict."
+    comment: |-
+      10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
+      error if `C` declares a static member with basename `n`, and has an
+      instance member with basename `n`.
+
+      Parameters:
+      0: the name of the class defining the conflicting member
+      1: the name of the conflicting static member
+      2: the name of the class defining the field with which the method conflicts
+  CONFLICTING_TYPE_VARIABLE_AND_CLASS:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_CONTAINER
+    problemMessage: "'{0}' can't be used to name both a type variable and the class in which the type variable is defined."
+    correctionMessage: Try renaming either the type variable or the class.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class, mixin, or extension
+      declaration declares a type parameter with the same name as the class,
+      mixin, or extension that declares it.
+
+      #### Example
+
+      The following code produces this diagnostic because the type parameter `C`
+      has the same name as the class `C` of which it's a part:
+
+      ```dart
+      class C<[!C!]> {}
+      ```
+
+      #### Common fixes
+
+      Rename either the type parameter, or the class, mixin, or extension:
+
+      ```dart
+      class C<T> {}
+      ```
+  CONFLICTING_TYPE_VARIABLE_AND_EXTENSION:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_CONTAINER
+    problemMessage: "'{0}' can't be used to name both a type variable and the extension in which the type variable is defined."
+    correctionMessage: Try renaming either the type variable or the extension.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+  CONFLICTING_TYPE_VARIABLE_AND_MIXIN:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_CONTAINER
+    problemMessage: "'{0}' can't be used to name both a type variable and the mixin in which the type variable is defined."
+    correctionMessage: Try renaming either the type variable or the mixin.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+  CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_MEMBER
+    problemMessage: "'{0}' can't be used to name both a type variable and a member in this class."
+    correctionMessage: Try renaming either the type variable or the member.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class, mixin, or extension
+      declaration declares a type parameter with the same name as one of the
+      members of the class, mixin, or extension that declares it.
+
+      #### Example
+
+      The following code produces this diagnostic because the type parameter `T`
+      has the same name as the field `T`:
+
+      ```dart
+      class C<[!T!]> {
+        int T = 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Rename either the type parameter or the member with which it conflicts:
+
+      ```dart
+      class C<T> {
+        int total = 0;
+      }
+      ```
+  CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_MEMBER
+    problemMessage: "'{0}' can't be used to name both a type variable and a member in this mixin."
+    correctionMessage: Try renaming either the type variable or the member.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+  CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION:
+    sharedName: CONFLICTING_TYPE_VARIABLE_AND_MEMBER
+    problemMessage: "'{0}' can't be used to name both a type variable and a member in this extension."
+    correctionMessage: Try renaming either the type variable or the member.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type variable
+  CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH:
+    problemMessage: "In a const constructor, a value of type '{0}' can't be assigned to the field '{1}', which has type '{2}'."
+    correctionMessage: "Try using a subtype, or removing the keyword 'const'."
+    comment: |-
+      16.12.2 Const: It is a compile-time error if evaluation of a constant
+      object results in an uncaught exception being thrown.
+  CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH:
+    problemMessage: "A value of type '{0}' can't be assigned to a parameter of type '{1}' in a const constructor."
+    correctionMessage: "Try using a subtype, or removing the keyword 'const'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the runtime value of the argument
+      1: the static type of the parameter
+    documentation: |-
+      #### 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');
+      }
+      ```
+  CONST_CONSTRUCTOR_THROWS_EXCEPTION:
+    problemMessage: "Const constructors can't throw exceptions."
+    correctionMessage: "Try removing the throw statement, or removing the keyword 'const'."
+    comment: |-
+      16.12.2 Const: It is a compile-time error if evaluation of a constant
+      object results in an uncaught exception being thrown.
+  CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST:
+    problemMessage: "Can't define the 'const' constructor because the field '{0}' is initialized with a non-constant value."
+    correctionMessage: "Try initializing the field to a constant value, or removing the keyword 'const' from the constructor."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor has the keyword
+      `const`, but a field in the class is initialized to a non-constant value.
+
+      #### Example
+
+      The following code produces this diagnostic because the field `s` is
+      initialized to a non-constant value:
+
+      ```dart
+      class C {
+        final String s = 3.toString();
+        [!const!] C();
+      }
+      ```
+
+      #### Common fixes
+
+      If the field can be initialized to a constant value, then change the
+      initializer to a constant expression:
+
+      ```dart
+      class C {
+        final String s = '3';
+        const C();
+      }
+      ```
+
+      If the field can't be initialized to a constant value, then remove the
+      keyword `const` from the constructor:
+
+      ```dart
+      class C {
+        final String s = 3.toString();
+        C();
+      }
+      ```
+  CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD:
+    problemMessage: "This constructor can't be declared 'const' because a mixin adds the instance field: {0}."
+    correctionMessage: "Try removing the 'const' keyword or removing the 'with' clause from the class declaration, or removing the field from the mixin class."
+    comment: |-
+      7.6.3 Constant Constructors: The superinitializer that appears, explicitly
+      or implicitly, in the initializer list of a constant constructor must
+      specify a constant constructor of the superclass of the immediately
+      enclosing class or a compile-time error occurs.
+
+      12.1 Mixin Application: For each generative constructor named ... an
+      implicitly declared constructor named ... is declared. If Sq is a
+      generative const constructor, and M does not declare any fields, Cq is
+      also a const constructor.
+
+      Parameters:
+      0: the name of the instance field.
+  CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS:
+    sharedName: CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD
+    problemMessage: "This constructor can't be declared 'const' because the mixins add the instance fields: {0}."
+    correctionMessage: "Try removing the 'const' keyword or removing the 'with' clause from the class declaration, or removing the fields from the mixin classes."
+    comment: |-
+      7.6.3 Constant Constructors: The superinitializer that appears, explicitly
+      or implicitly, in the initializer list of a constant constructor must
+      specify a constant constructor of the superclass of the immediately
+      enclosing class or a compile-time error occurs.
+
+      12.1 Mixin Application: For each generative constructor named ... an
+      implicitly declared constructor named ... is declared. If Sq is a
+      generative const constructor, and M does not declare any fields, Cq is
+      also a const constructor.
+
+      Parameters:
+      0: the names of the instance fields.
+  CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER:
+    problemMessage: "A constant constructor can't call a non-constant super constructor of '{0}'."
+    correctionMessage: "Try calling a constant constructor in the superclass, or removing the keyword 'const' from the constructor."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the superclass
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor that is marked as
+      `const` invokes a constructor from its superclass that isn't marked as
+      `const`.
+
+      #### Example
+
+      The following code produces this diagnostic because the `const` constructor
+      in `B` invokes the constructor `nonConst` from the class `A`, and the
+      superclass constructor isn't a `const` constructor:
+
+      ```dart
+      class A {
+        const A();
+        A.nonConst();
+      }
+
+      class B extends A {
+        const B() : [!super.nonConst()!];
+      }
+      ```
+
+      #### Common fixes
+
+      If it isn't essential to invoke the superclass constructor that is
+      currently being invoked, then invoke a constant constructor from the
+      superclass:
+
+      ```dart
+      class A {
+        const A();
+        A.nonConst();
+      }
+
+      class B extends A {
+        const B() : super();
+      }
+      ```
+
+      If it's essential that the current constructor be invoked and if you can
+      modify it, then add `const` to the constructor in the superclass:
+
+      ```dart
+      class A {
+        const A();
+        const A.nonConst();
+      }
+
+      class B extends A {
+        const B() : super.nonConst();
+      }
+      ```
+
+      If it's essential that the current constructor be invoked and you can't
+      modify it, then remove `const` from the constructor in the subclass:
+
+      ```dart
+      class A {
+        const A();
+        A.nonConst();
+      }
+
+      class B extends A {
+        B() : super.nonConst();
+      }
+      ```
+  CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD:
+    problemMessage: "Can't define a const constructor for a class with non-final fields."
+    correctionMessage: "Try making all of the fields final, or removing the keyword 'const' from the constructor."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor is marked as a
+      const constructor, but the constructor is defined in a class that has at
+      least one non-final instance field (either directly or by inheritance).
+
+      #### Examples
+
+      The following code produces this diagnostic because the field `x` isn't
+      final:
+
+      ```dart
+      class C {
+        int x;
+
+        const [!C!](this.x);
+      }
+      ```
+
+      #### Common fixes
+
+      If it's possible to mark all of the fields as final, then do so:
+
+      ```dart
+      class C {
+        final int x;
+
+        const C(this.x);
+      }
+      ```
+
+      If it isn't possible to mark all of the fields as final, then remove the
+      keyword `const` from the constructor:
+
+      ```dart
+      class C {
+        int x;
+
+        C(this.x);
+      }
+      ```
+  CONST_DEFERRED_CLASS:
+    problemMessage: "Deferred classes can't be created with 'const'."
+    correctionMessage: "Try using 'new' to create the instance, or changing the import to not be deferred."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class from a library that is
+      imported using a deferred import is used to create a `const` object.
+      Constants are evaluated at compile time, and classes from deferred
+      libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      The following code produces this diagnostic because it attempts to create a
+      `const` instance of a class from a deferred library:
+
+      ```dart
+      import 'dart:convert' deferred as convert;
+
+      const json2 = [!convert.JsonCodec()!];
+      ```
+
+      #### Common fixes
+
+      If the object isn't required to be a constant, then change the code so that
+      a non-constant instance is created:
+
+      ```dart
+      import 'dart:convert' deferred as convert;
+
+      final json2 = convert.JsonCodec();
+      ```
+
+      If the object must be a constant, then remove `deferred` from the import
+      directive:
+
+      ```dart
+      import 'dart:convert' as convert;
+
+      const json2 = convert.JsonCodec();
+      ```
+  CONST_EVAL_THROWS_EXCEPTION:
+    problemMessage: Evaluation of this constant expression throws an exception.
+    comment: |-
+      16.12.2 Const: It is a compile-time error if evaluation of a constant
+      object results in an uncaught exception being thrown.
+  CONST_EVAL_THROWS_IDBZE:
+    problemMessage: Evaluation of this constant expression throws an IntegerDivisionByZeroException.
+    comment: |-
+      16.12.2 Const: It is a compile-time error if evaluation of a constant
+      object results in an uncaught exception being thrown.
+  CONST_EVAL_TYPE_BOOL:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'bool'."
+    comment: |-
+      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.
+  CONST_EVAL_TYPE_BOOL_INT:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'bool' or 'int'."
+    comment: |-
+      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.
+  CONST_EVAL_TYPE_BOOL_NUM_STRING:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'bool', 'num', 'String' or 'null'."
+    comment: |-
+      16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
+      e1 and e2 are constant expressions that evaluate to a numeric, string or
+      boolean value or to null.
+  CONST_EVAL_TYPE_INT:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'int'."
+    comment: |-
+      16.12.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2,
+      e1 | e2, e1 >> e2 or e1 << e2, where e, e1 and e2 are constant expressions
+      that evaluate to an integer value or to null.
+  CONST_EVAL_TYPE_NUM:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'num'."
+    comment: |-
+      16.12.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1
+      e2, e1 / e2, e1 ~/ e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2,
+      where e, e1 and e2 are constant expressions that evaluate to a numeric
+      value or to null.
+  CONST_EVAL_TYPE_TYPE:
+    problemMessage: "In constant expressions, operands of this operator must be of type 'Type'."
+  CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE:
+    problemMessage: Const variables must be initialized with a constant value.
+    correctionMessage: Try changing the initializer to be a constant expression.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a value that isn't statically
+      known to be a constant is assigned to a variable that's declared to be a
+      `const` variable.
+
+      #### Examples
+
+      The following code produces this diagnostic because `x` isn't declared to
+      be `const`:
+
+      ```dart
+      var x = 0;
+      const y = [!x!];
+      ```
+
+      #### Common fixes
+
+      If the value being assigned can be declared to be `const`, then change the
+      declaration:
+
+      ```dart
+      const x = 0;
+      const y = x;
+      ```
+
+      If the value can't be declared to be `const`, then remove the `const`
+      modifier from the variable, possibly using `final` in its place:
+
+      ```dart
+      var x = 0;
+      final y = x;
+      ```
+  CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used to initialize a 'const' variable."
+    correctionMessage: Try initializing the variable without referencing members of the deferred library, or changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `const` variable is
+      initialized using a `const` variable from a library that is imported using
+      a deferred import. Constants are evaluated at compile time, and values from
+      deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      The following code produces this diagnostic because the variable `pi` is
+      being initialized using the constant `math.pi` from the library
+      `dart:math`, and `dart:math` is imported as a deferred library:
+
+      ```dart
+      import 'dart:math' deferred as math;
+
+      const pi = [!math.pi!];
+      ```
+
+      #### Common fixes
+
+      If you need to reference the value of the constant from the imported
+      library, then remove the keyword `deferred`:
+
+      ```dart
+      import 'dart:math' as math;
+
+      const pi = math.pi;
+      ```
+
+      If you don't need to reference the imported constant, then remove the
+      reference:
+
+      ```dart
+      const pi = 3.14;
+      ```
+  CONST_INSTANCE_FIELD:
+    problemMessage: Only static fields can be declared as const.
+    correctionMessage: "Try declaring the field as final, or adding the keyword 'static'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an instance field is marked as
+      being const.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` is an instance
+      field:
+
+      ```dart
+      class C {
+        [!const!] int f = 3;
+      }
+      ```
+
+      #### Common fixes
+
+      If the field needs to be an instance field, then remove the keyword
+      `const`, or replace it with `final`:
+
+      ```dart
+      class C {
+        final int f = 3;
+      }
+      ```
+
+      If the field really should be a const field, then make it a static field:
+
+      ```dart
+      class C {
+        static const int f = 3;
+      }
+      ```
+  CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS:
+    problemMessage: "The type of a key in a constant map can't override the '==' operator, but the class '{0}' does."
+    correctionMessage: "Try using a different value for the key, or removing the keyword 'const' from the map."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the entry's key
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the class of object used as a
+      key in a constant map literal implements the `==` operator. The
+      implementation of constant maps uses the `==` operator, so any
+      implementation other than the one inherited from `Object` requires
+      executing arbitrary code at compile time, which isn't supported.
+
+      #### Example
+
+      The following code produces this diagnostic because the constant map
+      contains a key whose type is `C`, and the class `C` overrides the
+      implementation of `==`:
+
+      ```dart
+      class C {
+        const C();
+
+        bool operator ==(Object other) => true;
+      }
+
+      const map = {[!C()!] : 0};
+      ```
+
+      #### Common fixes
+
+      If you can remove the implementation of `==` from the class, then do so:
+
+      ```dart
+      class C {
+        const C();
+      }
+
+      const map = {C() : 0};
+      ```
+
+      If you can't remove the implementation of `==` from the class, then make
+      the map be non-constant:
+
+      ```dart
+      class C {
+        const C();
+
+        bool operator ==(Object other) => true;
+      }
+
+      final map = {C() : 0};
+      ```
+  CONST_NOT_INITIALIZED:
+    problemMessage: "The constant '{0}' must be initialized."
+    correctionMessage: Try adding an initialization to the declaration.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the uninitialized final variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a variable that is declared to
+      be a constant doesn't have an initializer.
+
+      #### Examples
+
+      The following code produces this diagnostic because `c` isn't initialized:
+
+      ```dart
+      const [!c!];
+      ```
+
+      #### Common fixes
+
+      Add an initializer:
+
+      ```dart
+      const c = 'c';
+      ```
+  CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS:
+    problemMessage: "The type of an element in a constant set can't override the '==' operator, but the type '{0}' does."
+    correctionMessage: "Try using a different value for the element, or removing the keyword 'const' from the set."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the element
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the class of object used as an
+      element in a constant set literal implements the `==` operator. The
+      implementation of constant sets uses the `==` operator, so any
+      implementation other than the one inherited from `Object` requires
+      executing arbitrary code at compile time, which isn't supported.
+
+      #### Example
+
+      The following code produces this diagnostic because the constant set
+      contains an element whose type is `C`, and the class `C` overrides the
+      implementation of `==`:
+
+      ```dart
+      class C {
+        const C();
+
+        bool operator ==(Object other) => true;
+      }
+
+      const set = {[!C()!]};
+      ```
+
+      #### Common fixes
+
+      If you can remove the implementation of `==` from the class, then do so:
+
+      ```dart
+      class C {
+        const C();
+      }
+
+      const set = {C()};
+      ```
+
+      If you can't remove the implementation of `==` from the class, then make
+      the set be non-constant:
+
+      ```dart
+      class C {
+        const C();
+
+        bool operator ==(Object other) => true;
+      }
+
+      final set = {C()};
+      ```
+  CONST_SPREAD_EXPECTED_LIST_OR_SET:
+    problemMessage: A list or a set is expected in this spread.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the expression of a spread
+      operator in a constant list or set evaluates to something other than a list
+      or a set.
+
+      #### Examples
+
+      The following code produces this diagnostic because the value of `list1` is
+      `null`, which is neither a list nor a set:
+
+      ```dart
+      %language=2.9
+      const List<int> list1 = null;
+      const List<int> list2 = [...[!list1!]];
+      ```
+
+      #### Common fixes
+
+      Change the expression to something that evaluates to either a constant list
+      or a constant set:
+
+      ```dart
+      %language=2.9
+      const List<int> list1 = [];
+      const List<int> list2 = [...list1];
+      ```
+  CONST_SPREAD_EXPECTED_MAP:
+    problemMessage: A map is expected in this spread.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the expression of a spread
+      operator in a constant map evaluates to something other than a map.
+
+      #### Examples
+
+      The following code produces this diagnostic because the value of `map1` is
+      `null`, which isn't a map:
+
+      ```dart
+      %language=2.9
+      const Map<String, int> map1 = null;
+      const Map<String, int> map2 = {...[!map1!]};
+      ```
+
+      #### Common fixes
+
+      Change the expression to something that evaluates to a constant map:
+
+      ```dart
+      %language=2.9
+      const Map<String, int> map1 = {};
+      const Map<String, int> map2 = {...map1};
+      ```
+  CONST_WITH_NON_CONST:
+    problemMessage: "The constructor being called isn't a const constructor."
+    correctionMessage: "Try removing 'const' from the constructor invocation."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the keyword `const` is used to
+      invoke a constructor that isn't marked with `const`.
+
+      #### Examples
+
+      The following code produces this diagnostic because the constructor in `A`
+      isn't a const constructor:
+
+      ```dart
+      class A {
+        A();
+      }
+
+      A f() => [!const!] A();
+      ```
+
+      #### Common fixes
+
+      If it's desirable and possible to make the class a constant class (by
+      making all of the fields of the class, including inherited fields, final),
+      then add the keyword `const` to the constructor:
+
+      ```dart
+      class A {
+        const A();
+      }
+
+      A f() => const A();
+      ```
+
+      Otherwise, remove the keyword `const`:
+
+      ```dart
+      class A {
+        A();
+      }
+
+      A f() => A();
+      ```
+  CONST_WITH_NON_CONSTANT_ARGUMENT:
+    problemMessage: Arguments of a constant creation must be constant expressions.
+    correctionMessage: "Try making the argument a valid constant, or use 'new' to call the constructor."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a const constructor is invoked
+      with an argument that isn't a constant expression.
+
+      #### Examples
+
+      The following code produces this diagnostic because `i` isn't a constant:
+
+      ```dart
+      class C {
+        final int i;
+        const C(this.i);
+      }
+      C f(int i) => const C([!i!]);
+      ```
+
+      #### Common fixes
+
+      Either make all of the arguments constant expressions, or remove the
+      `const` keyword to use the non-constant form of the constructor:
+
+      ```dart
+      class C {
+        final int i;
+        const C(this.i);
+      }
+      C f(int i) => C(i);
+      ```
+  CONST_WITH_TYPE_PARAMETERS:
+    problemMessage: "A constant creation can't use a type parameter as a type argument."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type parameter is used as a
+      type argument in a `const` invocation of a constructor. This isn't allowed
+      because the value of the type parameter (the actual type that will be used
+      at runtime) can't be known at compile time.
+
+      #### Example
+
+      The following code produces this diagnostic because the type parameter `T`
+      is being used as a type argument when creating a constant:
+
+      ```dart
+      class C<T> {
+        const C();
+      }
+
+      C<T> newC<T>() => const C<[!T!]>();
+      ```
+
+      #### Common fixes
+
+      If the type that will be used for the type parameter can be known at
+      compile time, then remove the use of the type parameter:
+
+      ```dart
+      class C<T> {
+        const C();
+      }
+
+      C<int> newC() => const C<int>();
+      ```
+
+      If the type that will be used for the type parameter can't be known until
+      runtime, then remove the keyword `const`:
+
+      ```dart
+      class C<T> {
+        const C();
+      }
+
+      C<T> newC<T>() => C<T>();
+      ```
+  CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF:
+    sharedName: CONST_WITH_TYPE_PARAMETERS
+    problemMessage: "A constant constructor tearoff can't use a type parameter as a type argument."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: No parameters.
+  CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF:
+    sharedName: CONST_WITH_TYPE_PARAMETERS
+    problemMessage: "A constant function tearoff can't use a type parameter as a type argument."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: No parameters.
+  CONST_WITH_UNDEFINED_CONSTRUCTOR:
+    problemMessage: "The class '{0}' doesn't have a constant constructor '{1}'."
+    correctionMessage: Try calling a different constructor.
+    comment: |-
+      16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
+      a constant constructor declared by the type <i>T</i>.
+
+      Parameters:
+      0: the name of the type
+      1: the name of the requested constant constructor
+  CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT:
+    problemMessage: "The class '{0}' doesn't have an unnamed constant constructor."
+    correctionMessage: Try calling a different constructor.
+    comment: |-
+      16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
+      a constant constructor declared by the type <i>T</i>.
+
+      Parameters:
+      0: the name of the type
+  CONTINUE_LABEL_ON_SWITCH:
+    problemMessage: A continue label resolves to switch, must be loop or switch member
+  COULD_NOT_INFER:
+    problemMessage: "Couldn't infer type parameter '{0}'.{1}"
+    comment: |-
+      Parameters:
+      0: the name of the type parameter
+      1: detail text explaining why the type could not be inferred
+  NEW_WITH_NON_TYPE:
+    sharedName: CREATION_WITH_NON_TYPE
+    problemMessage: "The name '{0}' isn't a class."
+    correctionMessage: Try correcting the name to match an existing class.
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the non-type element
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an instance creation using
+      either `new` or `const` specifies a name that isn't defined as a class.
+
+      #### Example
+
+      The following code produces this diagnostic because `f` is a function
+      rather than a class:
+
+      ```dart
+      int f() => 0;
+
+      void g() {
+        new [!f!]();
+      }
+      ```
+
+      #### Common fixes
+
+      If a class should be created, then replace the invalid name with the name
+      of a valid class:
+
+      ```dart
+      int f() => 0;
+
+      void g() {
+        new Object();
+      }
+      ```
+
+      If the name is the name of a function and you want that function to be
+      invoked, then remove the `new` or `const` keyword:
+
+      ```dart
+      int f() => 0;
+
+      void g() {
+        f();
+      }
+      ```
+  CONST_WITH_NON_TYPE:
+    sharedName: CREATION_WITH_NON_TYPE
+    problemMessage: "The name '{0}' isn't a class."
+    correctionMessage: Try correcting the name to match an existing class.
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the non-type element
+  DEFAULT_LIST_CONSTRUCTOR:
+    problemMessage: "The default 'List' constructor isn't available when null safety is enabled."
+    correctionMessage: "Try using a list literal, 'List.filled' or 'List.generate'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds a use of the default
+      constructor for the class `List` in code that has opted in to null safety.
+
+      #### Example
+
+      Assuming the following code is opted in to null safety, it produces this
+      diagnostic because it uses the default `List` constructor:
+
+      ```dart
+      var l = [!List<int>!]();
+      ```
+
+      #### Common fixes
+
+      If no initial size is provided, then convert the code to use a list
+      literal:
+
+      ```dart
+      var l = <int>[];
+      ```
+
+      If an initial size needs to be provided and there is a single reasonable
+      initial value for the elements, then use `List.filled`:
+
+      ```dart
+      var l = List.filled(3, 0);
+      ```
+
+      If an initial size needs to be provided but each element needs to be
+      computed, then use `List.generate`:
+
+      ```dart
+      var l = List.generate(3, (i) => i);
+      ```
+  DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR:
+    problemMessage: "Default values aren't allowed in factory constructors that redirect to another constructor."
+    correctionMessage: Try removing the default value.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a factory constructor that
+      redirects to another constructor specifies a default value for an optional
+      parameter.
+
+      #### Example
+
+      The following code produces this diagnostic because the factory constructor
+      in `A` has a default value for the optional parameter `x`:
+
+      ```dart
+      class A {
+        factory A([int [!x!] = 0]) = B;
+      }
+
+      class B implements A {
+        B([int x = 1]) {}
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the default value from the factory constructor:
+
+      ```dart
+      class A {
+        factory A([int x]) = B;
+      }
+
+      class B implements A {
+        B([int x = 1]) {}
+      }
+      ```
+
+      Note that this fix might change the value used when the optional parameter
+      is omitted. If that happens, and if that change is a problem, then consider
+      making the optional parameter a required parameter in the factory method:
+
+      ```dart
+      class A {
+       factory A(int x) = B;
+      }
+
+      class B implements A {
+        B([int x = 1]) {}
+      }
+      ```
+  DEFAULT_VALUE_ON_REQUIRED_PARAMETER:
+    problemMessage: "Required named parameters can't have a default value."
+    correctionMessage: "Try removing either the default value or the 'required' modifier."
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a named parameter has both the
+      `required` modifier and a default value. If the parameter is required, then
+      a value for the parameter is always provided at the call sites, so the
+      default value can never be used.
+
+      #### Examples
+
+      The following code generates this diagnostic:
+
+      ```dart
+      void log({required String [!message!] = 'no message'}) {}
+      ```
+
+      #### Common fixes
+
+      If the parameter is really required, then remove the default value:
+
+      ```dart
+      void log({required String message}) {}
+      ```
+
+      If the parameter isn't always required, then remove the `required`
+      modifier:
+
+      ```dart
+      void log({String message = 'no message'}) {}
+      ```
+  DEFERRED_IMPORT_OF_EXTENSION:
+    problemMessage: Imports of deferred libraries must hide all extensions.
+    correctionMessage: Try adding either a show combinator listing the names you need to reference or a hide combinator listing all of the extensions.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library that is imported using
+      a deferred import declares an extension that is visible in the importing
+      library. Extension methods are resolved at compile time, and extensions
+      from deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines a named extension:
+
+      ```dart
+      %uri="lib/a.dart"
+      class C {}
+
+      extension E on String {
+        int get size => length;
+      }
+      ```
+
+      The following code produces this diagnostic because the named extension is
+      visible to the library:
+
+      ```dart
+      import [!'a.dart'!] deferred as a;
+
+      void f() {
+        a.C();
+      }
+      ```
+
+      #### Common fixes
+
+      If the library must be imported as `deferred`, then either add a `show`
+      clause listing the names being referenced or add a `hide` clause listing
+      all of the named extensions. Adding a `show` clause would look like this:
+
+      ```dart
+      import 'a.dart' deferred as a show C;
+
+      void f() {
+        a.C();
+      }
+      ```
+
+      Adding a `hide` clause would look like this:
+
+      ```dart
+      import 'a.dart' deferred as a hide E;
+
+      void f() {
+        a.C();
+      }
+      ```
+
+      With the first fix, the benefit is that if new extensions are added to the
+      imported library, then the extensions won't cause a diagnostic to be
+      generated.
+
+      If the library doesn't need to be imported as `deferred`, or if you need to
+      make use of the extension method declared in it, then remove the keyword
+      `deferred`:
+
+      ```dart
+      import 'a.dart' as a;
+
+      void f() {
+        a.C();
+      }
+      ```
+  DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE:
+    problemMessage: "The late local variable '{0}' is definitely unassigned at this point."
+    correctionMessage: Ensure that it is assigned on necessary execution paths.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the variable that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when [definite assignment][] analysis
+      shows that a local variable that's marked as `late` is read before being
+      assigned.
+
+      #### Example
+
+      The following code produces this diagnostic because `x` wasn't assigned a
+      value before being read:
+
+      ```dart
+      void f(bool b) {
+        late int x;
+        print([!x!]);
+      }
+      ```
+
+      #### Common fixes
+
+      Assign a value to the variable before reading from it:
+
+      ```dart
+      void f(bool b) {
+        late int x;
+        x = b ? 1 : 0;
+        print(x);
+      }
+      ```
+  DISALLOWED_TYPE_INSTANTIATION_EXPRESSION:
+    problemMessage: Only a generic type, generic function, generic instance method, or generic constructor can be type instantiated.
+    correctionMessage: Try instantiating the type(s) of a generic type, generic function, generic instance method, or generic constructor.
+    comment: No parameters.
+  DUPLICATE_CONSTRUCTOR_NAME:
+    sharedName: DUPLICATE_CONSTRUCTOR
+    problemMessage: "The constructor with name '{0}' is already defined."
+    correctionMessage: Try renaming one of the constructors.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the duplicate entity
+  DUPLICATE_CONSTRUCTOR_DEFAULT:
+    sharedName: DUPLICATE_CONSTRUCTOR
+    problemMessage: The unnamed constructor is already defined.
+    correctionMessage: Try giving one of the constructors a name.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class declares more than one
+      unnamed constructor or when it declares more than one constructor with the
+      same name.
+
+      #### Examples
+
+      The following code produces this diagnostic because there are two
+      declarations for the unnamed constructor:
+
+      ```dart
+      class C {
+        C();
+
+        [!C!]();
+      }
+      ```
+
+      The following code produces this diagnostic because there are two
+      declarations for the constructor named `m`:
+
+      ```dart
+      class C {
+        C.m();
+
+        [!C.m!]();
+      }
+      ```
+
+      #### Common fixes
+
+      If there are multiple unnamed constructors and all of the constructors are
+      needed, then give all of them, or all except one of them, a name:
+
+      ```dart
+      class C {
+        C();
+
+        C.n();
+      }
+      ```
+
+      If there are multiple unnamed constructors and all except one of them are
+      unneeded, then remove the constructors that aren't needed:
+
+      ```dart
+      class C {
+        C();
+      }
+      ```
+
+      If there are multiple named constructors and all of the constructors are
+      needed, then rename all except one of them:
+
+      ```dart
+      class C {
+        C.m();
+
+        C.n();
+      }
+      ```
+
+      If there are multiple named constructors and all except one of them are
+      unneeded, then remove the constructorsthat aren't needed:
+
+      ```dart
+      class C {
+        C.m();
+      }
+      ```
+  DUPLICATE_DEFINITION:
+    problemMessage: "The name '{0}' is already defined."
+    correctionMessage: Try renaming one of the declarations.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the duplicate entity
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name is declared, and there is
+      a previous declaration with the same name in the same scope.
+
+      #### Examples
+
+      The following code produces this diagnostic because the name `x` is
+      declared twice:
+
+      ```dart
+      int x = 0;
+      int [!x!] = 1;
+      ```
+
+      #### Common fixes
+
+      Choose a different name for one of the declarations.
+
+      ```dart
+      int x = 0;
+      int y = 1;
+      ```
+  DUPLICATE_FIELD_FORMAL_PARAMETER:
+    problemMessage: "The field '{0}' can't be initialized by multiple parameters in the same constructor."
+    correctionMessage: Try removing one of the parameters, or using different fields.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's more than one field
+      formal parameter for the same field in a constructor's parameter list. It
+      isn't useful to assign a value that will immediately be overwritten.
+
+      #### Example
+
+      The following code produces this diagnostic because `this.f` appears twice
+      in the parameter list:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f, this.[!f!]) {}
+      }
+      ```
+
+      #### Common fixes
+
+      Remove one of the field formal parameters:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f) {}
+      }
+      ```
+  DUPLICATE_NAMED_ARGUMENT:
+    problemMessage: "The argument for the named parameter '{0}' was already specified."
+    correctionMessage: Try removing one of the named arguments, or correcting one of the names to reference a different named parameter.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the parameter that was duplicated
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an invocation has two or more
+      named arguments that have the same name.
+
+      #### Examples
+
+      The following code produces this diagnostic because there are two arguments
+      with the name `a`:
+
+      ```dart
+      %language=2.9
+      void f(C c) {
+        c.m(a: 0, [!a!]: 1);
+      }
+
+      class C {
+        void m({int a, int b}) {}
+      }
+      ```
+
+      #### Common fixes
+
+      If one of the arguments should have a different name, then change the name:
+
+      ```dart
+      %language=2.9
+      void f(C c) {
+        c.m(a: 0, b: 1);
+      }
+
+      class C {
+        void m({int a, int b}) {}
+      }
+      ```
+
+      If one of the arguments is wrong, then remove it:
+
+      ```dart
+      %language=2.9
+      void f(C c) {
+        c.m(a: 1);
+      }
+
+      class C {
+        void m({int a, int b}) {}
+      }
+      ```
+  DUPLICATE_PART:
+    problemMessage: "The library already contains a part with the URI '{0}'."
+    correctionMessage: Try removing all except one of the duplicated part directives.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the URI of the duplicate part
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a single file is referenced in
+      multiple part directives.
+
+      #### Example
+
+      Given a file named `part.dart` containing
+
+      ```dart
+      %uri="lib/part.dart"
+      part of lib;
+      ```
+
+      The following code produces this diagnostic because the file `part.dart` is
+      included multiple times:
+
+      ```dart
+      library lib;
+
+      part 'part.dart';
+      part [!'part.dart'!];
+      ```
+
+      #### Common fixes
+
+      Remove all except the first of the duplicated part directives:
+
+      ```dart
+      library lib;
+
+      part 'part.dart';
+      ```
+  ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING:
+    problemMessage: "The name of the enum constant can't be the same as the enum's name."
+    correctionMessage: Try renaming the constant.
+  EQUAL_ELEMENTS_IN_CONST_SET:
+    problemMessage: "Two elements in a constant set literal can't be equal."
+    correctionMessage: Change or remove the duplicate element.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when two elements in a constant set
+      literal have the same value. The set can only contain each value once,
+      which means that one of the values is unnecessary.
+
+      #### Examples
+
+      The following code produces this diagnostic because the string `'a'` is
+      specified twice:
+
+      ```dart
+      const Set<String> set = {'a', [!'a'!]};
+      ```
+
+      #### Common fixes
+
+      Remove one of the duplicate values:
+
+      ```dart
+      const Set<String> set = {'a'};
+      ```
+
+      Note that literal sets preserve the order of their elements, so the choice
+      of which element to remove might affect the order in which elements are
+      returned by an iterator.
+  EQUAL_KEYS_IN_CONST_MAP:
+    problemMessage: "Two keys in a constant map literal can't be equal."
+    correctionMessage: Change or remove the duplicate key.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a key in a constant map is the
+      same as a previous key in the same map. If two keys are the same, then the
+      second value would overwrite the first value, which makes having both pairs
+      pointless.
+
+      #### Examples
+
+      The following code produces this diagnostic because the key `1` is used
+      twice:
+
+      ```dart
+      const map = <int, String>{1: 'a', 2: 'b', [!1!]: 'c', 4: 'd'};
+      ```
+
+      #### Common fixes
+
+      If both entries should be included in the map, then change one of the keys
+      to be different:
+
+      ```dart
+      const map = <int, String>{1: 'a', 2: 'b', 3: 'c', 4: 'd'};
+      ```
+
+      If only one of the entries is needed, then remove the one that isn't
+      needed:
+
+      ```dart
+      const map = <int, String>{1: 'a', 2: 'b', 4: 'd'};
+      ```
+
+      Note that literal maps preserve the order of their entries, so the choice
+      of which entry to remove might affect the order in which keys and values
+      are returned by an iterator.
+  EXPECTED_ONE_LIST_TYPE_ARGUMENTS:
+    problemMessage: "List literals require one type argument or none, but {0} found."
+    correctionMessage: Try adjusting the number of type arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the number of provided type arguments
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a list literal has more than one
+      type argument.
+
+      #### Example
+
+      The following code produces this diagnostic because the list literal has
+      two type arguments when it can have at most one:
+
+      ```dart
+      var l = [!<int, int>!][];
+      ```
+
+      #### Common fixes
+
+      Remove all except one of the type arguments:
+
+      ```dart
+      var l = <int>[];
+      ```
+  EXPECTED_ONE_SET_TYPE_ARGUMENTS:
+    problemMessage: "Set literals require one type argument or none, but {0} were found."
+    correctionMessage: Try adjusting the number of type arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the number of provided type arguments
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a set literal has more than one
+      type argument.
+
+      #### Example
+
+      The following code produces this diagnostic because the set literal has
+      three type arguments when it can have at most one:
+
+      ```dart
+      var s = [!<int, String, int>!]{0, 'a', 1};
+      ```
+
+      #### Common fixes
+
+      Remove all except one of the type arguments:
+
+      ```dart
+      var s = <int>{0, 1};
+      ```
+  EXPECTED_TWO_MAP_TYPE_ARGUMENTS:
+    problemMessage: "Map literals require two type arguments or none, but {0} found."
+    correctionMessage: Try adjusting the number of type arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the number of provided type arguments
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a map literal has either one or
+      more than two type arguments.
+
+      #### Example
+
+      The following code produces this diagnostic because the map literal has
+      three type arguments when it can have either two or zero:
+
+      ```dart
+      var m = [!<int, String, int>!]{};
+      ```
+
+      #### Common fixes
+
+      Remove all except two of the type arguments:
+
+      ```dart
+      var m = <int, String>{};
+      ```
+  EXPORT_INTERNAL_LIBRARY:
+    problemMessage: "The library '{0}' is internal and can't be exported."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the uri pointing to a library
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds an export whose `dart:`
+      URI references an internal library.
+
+      #### Example
+
+      The following code produces this diagnostic because `_interceptors` is an
+      internal library:
+
+      ```dart
+      export [!'dart:_interceptors'!];
+      ```
+
+      #### Common fixes
+
+      Remove the export directive.
+  EXPORT_LEGACY_SYMBOL:
+    problemMessage: "The symbol '{0}' is defined in a legacy library, and can't be re-exported from a library with null safety enabled."
+    correctionMessage: Try removing the export or migrating the legacy library.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of a symbol defined in a legacy library
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library that was opted in to
+      null safety exports another library, and the exported library is opted out
+      of null safety.
+
+      #### Example
+
+      Given a library that is opted out of null safety:
+
+      ```dart
+      %uri="lib/optedOut.dart"
+      // @dart = 2.8
+      String s;
+      ```
+
+      The following code produces this diagnostic because it's exporting symbols
+      from an opted-out library:
+
+      ```dart
+      export [!'optedOut.dart'!];
+
+      class C {}
+      ```
+
+      #### Common fixes
+
+      If you're able to do so, migrate the exported library so that it doesn't
+      need to opt out:
+
+      ```dart
+      String? s;
+      ```
+
+      If you can't migrate the library, then remove the export:
+
+      ```dart
+      class C {}
+      ```
+
+      If the exported library (the one that is opted out) itself exports an
+      opted-in library, then it's valid for your library to indirectly export the
+      symbols from the opted-in library. You can do so by adding a hide
+      combinator to the export directive in your library that hides all of the
+      names declared in the opted-out library.
+  EXPORT_OF_NON_LIBRARY:
+    problemMessage: "The exported library '{0}' can't have a part-of directive."
+    correctionMessage: Try exporting the library that the part is a part of.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the uri pointing to a non-library declaration
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an export directive references a
+      part rather than a library.
+
+      #### Example
+
+      Given a file named `part.dart` containing
+
+      ```dart
+      %uri="lib/part.dart"
+      part of lib;
+      ```
+
+      The following code produces this diagnostic because the file `part.dart` is
+      a part, and only libraries can be exported:
+
+      ```dart
+      library lib;
+
+      export [!'part.dart'!];
+      ```
+
+      #### Common fixes
+
+      Either remove the export directive, or change the URI to be the URI of the
+      library containing the part.
+  EXPRESSION_IN_MAP:
+    problemMessage: "Expressions can't be used in a map literal."
+    correctionMessage: Try removing the expression or converting it to be a map entry.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the analyzer finds an
+      expression, rather than a map entry, in what appears to be a map literal.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      var map = <String, int>{'a': 0, 'b': 1, [!'c'!]};
+      ```
+
+      #### Common fixes
+
+      If the expression is intended to compute either a key or a value in an
+      entry, fix the issue by replacing the expression with the key or the value.
+      For example:
+
+      ```dart
+      var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
+      ```
+  EXTENDS_NON_CLASS:
+    problemMessage: Classes can only extend other classes.
+    correctionMessage: Try specifying a different superclass, or removing the extends clause.
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name in the extends clause
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an `extends` clause contains a
+      name that is declared to be something other than a class.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` is declared to be a
+      function:
+
+      ```dart
+      void f() {}
+
+      class C extends [!f!] {}
+      ```
+
+      #### Common fixes
+
+      If you want the class to extend a class other than `Object`, then replace
+      the name in the `extends` clause with the name of that class:
+
+      ```dart
+      void f() {}
+
+      class C extends B {}
+
+      class B {}
+      ```
+
+      If you want the class to extend `Object`, then remove the `extends` clause:
+
+      ```dart
+      void f() {}
+
+      class C {}
+      ```
+  EXTENSION_AS_EXPRESSION:
+    problemMessage: "Extension '{0}' can't be used as an expression."
+    correctionMessage: Try replacing it with a valid expression.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the extension
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name of an extension is used
+      in an expression other than in an extension override or to qualify an
+      access to a static member of the extension. Because classes define a type,
+      the name of a class can be used to refer to the instance of `Type`
+      representing the type of the class. Extensions, on the other hand, don't
+      define a type and can't be used as a type literal.
+
+      #### Examples
+
+      The following code produces this diagnostic because `E` is an extension:
+
+      ```dart
+      extension E on int {
+        static String m() => '';
+      }
+
+      var x = [!E!];
+      ```
+
+      #### Common fixes
+
+      Replace the name of the extension with a name that can be referenced, such
+      as a static member defined on the extension:
+
+      ```dart
+      extension E on int {
+        static String m() => '';
+      }
+
+      var x = E.m();
+      ```
+  EXTENSION_CONFLICTING_STATIC_AND_INSTANCE:
+    problemMessage: "Extension '{0}' can't define static member '{1}' and an instance member with the same name."
+    correctionMessage: "Try renaming the member to a name that doesn't conflict."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the extension defining the conflicting member
+      1: the name of the conflicting static member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension declaration
+      contains both an instance member and a static member that have the same
+      name. The instance member and the static member can't have the same name
+      because it's unclear which member is being referenced by an unqualified use
+      of the name within the body of the extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because the name `a` is being
+      used for two different members:
+
+      ```dart
+      extension E on Object {
+        int get a => 0;
+        static int [!a!]() => 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Rename or remove one of the members:
+
+      ```dart
+      extension E on Object {
+        int get a => 0;
+        static int b() => 0;
+      }
+      ```
+  EXTENSION_DECLARES_MEMBER_OF_OBJECT:
+    problemMessage: "Extensions can't declare members with the same name as a member declared by 'Object'."
+    correctionMessage: Try specifying a different name for the member.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension declaration
+      declares a member with the same name as a member declared in the class
+      `Object`. Such a member can never be used because the member in `Object` is
+      always found first.
+
+      #### Examples
+
+      The following code produces this diagnostic because `toString` is defined
+      by `Object`:
+
+      ```dart
+      extension E on String {
+        String [!toString!]() => this;
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the member or rename it so that the name doesn't conflict with the
+      member in `Object`:
+
+      ```dart
+      extension E on String {
+        String displayString() => this;
+      }
+      ```
+  EXTENSION_OVERRIDE_ACCESS_TO_STATIC_MEMBER:
+    problemMessage: "An extension override can't be used to access a static member from an extension."
+    correctionMessage: Try using just the name of the extension.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is the
+      receiver of the invocation of a static member. Similar to static members in
+      classes, the static members of an extension should be accessed using the
+      name of the extension, not an extension override.
+
+      #### Examples
+
+      The following code produces this diagnostic because `m` is static:
+
+      ```dart
+      extension E on String {
+        static void m() {}
+      }
+
+      void f() {
+        E('').[!m!]();
+      }
+      ```
+
+      #### Common fixes
+
+      Replace the extension override with the name of the extension:
+
+      ```dart
+      extension E on String {
+        static void m() {}
+      }
+
+      void f() {
+        E.m();
+      }
+      ```
+  EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE:
+    problemMessage: "The type of the argument to the extension override '{0}' isn't assignable to the extended type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the argument
+      1: the extended type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the argument to an extension
+      override isn't assignable to the type being extended by the extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because `3` isn't a `String`:
+
+      ```dart
+      extension E on String {
+        void method() {}
+      }
+
+      void f() {
+        E([!3!]).method();
+      }
+      ```
+
+      #### Common fixes
+
+      If you're using the correct extension, then update the argument to have the
+      correct type:
+
+      ```dart
+      extension E on String {
+        void method() {}
+      }
+
+      void f() {
+        E(3.toString()).method();
+      }
+      ```
+
+      If there's a different extension that's valid for the type of the argument,
+      then either replace the name of the extension or unwrap the argument so
+      that the correct extension is found.
+  EXTENSION_OVERRIDE_WITHOUT_ACCESS:
+    problemMessage: An extension override can only be used to access instance members.
+    correctionMessage: Consider adding an access to an instance member.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is found
+      that isn't being used to access one of the members of the extension. The
+      extension override syntax doesn't have any runtime semantics; it only
+      controls which member is selected at compile time.
+
+      #### Examples
+
+      The following code produces this diagnostic because `E(i)` isn't an
+      expression:
+
+      ```dart
+      extension E on int {
+        int get a => 0;
+      }
+
+      void f(int i) {
+        print([!E(i)!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If you want to invoke one of the members of the extension, then add the
+      invocation:
+
+      ```dart
+      extension E on int {
+        int get a => 0;
+      }
+
+      void f(int i) {
+        print(E(i).a);
+      }
+      ```
+
+      If you don't want to invoke a member, then unwrap the argument:
+
+      ```dart
+      extension E on int {
+        int get a => 0;
+      }
+
+      void f(int i) {
+        print(i);
+      }
+      ```
+  EXTENSION_OVERRIDE_WITH_CASCADE:
+    problemMessage: "Extension overrides have no value so they can't be used as the receiver of a cascade expression."
+    correctionMessage: "Try using '.' instead of '..'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is used as
+      the receiver of a cascade expression. The value of a cascade expression
+      `e..m` is the value of the receiver `e`, but extension overrides aren't
+      expressions and don't have a value.
+
+      #### Examples
+
+      The following code produces this diagnostic because `E(3)` isn't an
+      expression:
+
+      ```dart
+      extension E on int {
+        void m() {}
+      }
+      f() {
+        [!E!](3)..m();
+      }
+      ```
+
+      #### Common fixes
+
+      Use `.` rather than `..`:
+
+      ```dart
+      extension E on int {
+        void m() {}
+      }
+      f() {
+        E(3).m();
+      }
+      ```
+
+      If there are multiple cascaded accesses, you'll need to duplicate the
+      extension override for each one.
+  EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER:
+    problemMessage: External fields cannot have initializers.
+    correctionMessage: "Try removing the field initializer or the 'external' keyword from the field declaration."
+  EXTERNAL_FIELD_INITIALIZER:
+    problemMessage: External fields cannot have initializers.
+    correctionMessage: "Try removing the initializer or the 'external' keyword."
+  EXTERNAL_VARIABLE_INITIALIZER:
+    problemMessage: External variables cannot have initializers.
+    correctionMessage: "Try removing the initializer or the 'external' keyword."
+  EXTRA_POSITIONAL_ARGUMENTS:
+    problemMessage: "Too many positional arguments: {0} expected, but {1} found."
+    correctionMessage: Try removing the extra arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the maximum number of positional arguments
+      1: the actual number of positional arguments given
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function invocation
+      has more positional arguments than the method or function allows.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` defines 2
+      parameters but is invoked with 3 arguments:
+
+      ```dart
+      void f(int a, int b) {}
+      void g() {
+        f(1, 2, [!3!]);
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the arguments that don't correspond to parameters:
+
+      ```dart
+      void f(int a, int b) {}
+      void g() {
+        f(1, 2);
+      }
+      ```
+  EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED:
+    problemMessage: "Too many positional arguments: {0} expected, but {1} found."
+    correctionMessage: Try removing the extra positional arguments, or specifying the name for named arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the maximum number of positional arguments
+      1: the actual number of positional arguments given
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function invocation
+      has more positional arguments than the method or function allows, but the
+      method or function defines named parameters.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` defines 2
+      positional parameters but has a named parameter that could be used for the
+      third argument:
+
+      ```dart
+      %language=2.9
+      void f(int a, int b, {int c}) {}
+      void g() {
+        f(1, 2, [!3!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If some of the arguments should be values for named parameters, then add
+      the names before the arguments:
+
+      ```dart
+      %language=2.9
+      void f(int a, int b, {int c}) {}
+      void g() {
+        f(1, 2, c: 3);
+      }
+      ```
+
+      Otherwise, remove the arguments that don't correspond to positional
+      parameters:
+
+      ```dart
+      %language=2.9
+      void f(int a, int b, {int c}) {}
+      void g() {
+        f(1, 2);
+      }
+      ```
+  FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS:
+    problemMessage: "The field '{0}' can't be initialized twice in the same constructor."
+    correctionMessage: Try removing one of the initializations.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field being initialized multiple times
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the initializer list of a
+      constructor initializes a field more than once. There is no value to allow
+      both initializers because only the last value is preserved.
+
+      #### Example
+
+      The following code produces this diagnostic because the field `f` is being
+      initialized twice:
+
+      ```dart
+      class C {
+        int f;
+
+        C() : f = 0, [!f!] = 1;
+      }
+      ```
+
+      #### Common fixes
+
+      Remove one of the initializers:
+
+      ```dart
+      class C {
+        int f;
+
+        C() : f = 0;
+      }
+      ```
+  FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION:
+    problemMessage: "Fields can't be initialized in the constructor if they are final and were already initialized at their declaration."
+    correctionMessage: Try removing one of the initializations.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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;
+      }
+      ```
+  FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER:
+    problemMessage: "Fields can't be initialized in both the parameter list and the initializers."
+    correctionMessage: Try removing one of the initializations.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a field is initialized in both
+      the parameter list and in the initializer list of a constructor.
+
+      #### Example
+
+      The following code produces this diagnostic because the field `f` is
+      initialized both by a field formal parameter and in the initializer list:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f) : [!f!] = 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If the field should be initialized by the parameter, then remove the
+      initialization in the initializer list:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+      }
+      ```
+
+      If the field should be initialized in the initializer list and the
+      parameter isn't needed, then remove the parameter:
+
+      ```dart
+      class C {
+        int f;
+
+        C() : f = 0;
+      }
+      ```
+
+      If the field should be initialized in the initializer list and the
+      parameter is needed, then make it a normal parameter:
+
+      ```dart
+      class C {
+        int f;
+
+        C(int g) : f = g * 2;
+      }
+      ```
+  FIELD_INITIALIZER_FACTORY_CONSTRUCTOR:
+    problemMessage: "Initializing formal parameters can't be used in factory constructors."
+    correctionMessage: Try using a normal parameter.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a factory constructor has a
+      field formal parameter. Factory constructors can't assign values to fields
+      because no instance is created; hence, there is no field to assign.
+
+      #### Example
+
+      The following code produces this diagnostic because the factory constructor
+      uses a field formal parameter:
+
+      ```dart
+      class C {
+        int? f;
+
+        factory C([!this.f!]) => throw 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Replace the field formal parameter with a normal parameter:
+
+      ```dart
+      class C {
+        int? f;
+
+        factory C(int f) => throw 0;
+      }
+      ```
+  FIELD_INITIALIZER_NOT_ASSIGNABLE:
+    problemMessage: "The initializer type '{0}' can't be assigned to the field type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type of the initializer expression
+      1: the name of the type of the field
+    documentation: |-
+      #### 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;
+      }
+      ```
+  CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE:
+    sharedName: FIELD_INITIALIZER_NOT_ASSIGNABLE
+    problemMessage: "The initializer type '{0}' can't be assigned to the field type '{1}' in a const constructor."
+    correctionMessage: "Try using a subtype, or removing the 'const' keyword"
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type of the initializer expression
+      1: the name of the type of the field
+  FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR:
+    problemMessage: Initializing formal parameters can only be used in constructors.
+    correctionMessage: Try using a normal parameter.
+    comment: |-
+      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.
+  FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR:
+    problemMessage: "The redirecting constructor can't have a field initializer."
+    correctionMessage: Try initializing the field in the constructor being redirected to.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a redirecting constructor
+      initializes a field in the object. This isn't allowed because the instance
+      that has the field hasn't been created at the point at which it should be
+      initialized.
+
+      #### Example
+
+      The following code produces this diagnostic because the constructor
+      `C.zero`, which redirects to the constructor `C`, has a field formal
+      parameter that initializes the field `f`:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+
+        C.zero([!this.f!]) : this(f);
+      }
+      ```
+
+      The following code produces this diagnostic because the constructor
+      `C.zero`, which redirects to the constructor `C`, has an initializer that
+      initializes the field `f`:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+
+        C.zero() : [!f = 0!], this(1);
+      }
+      ```
+
+      #### Common fixes
+
+      If the initialization is done by a field formal parameter, then use a
+      normal parameter:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+
+        C.zero(int f) : this(f);
+      }
+      ```
+
+      If the initialization is done in an initializer, then remove the
+      initializer:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+
+        C.zero() : this(0);
+      }
+      ```
+  FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE:
+    problemMessage: "The parameter type '{0}' is incompatible with the field type '{1}'."
+    correctionMessage: "Try changing or removing the parameter's type, or changing the field's type."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type of the field formal parameter
+      1: the name of the type of the field
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type of a field formal
+      parameter isn't assignable to the type of the field being initialized.
+
+      #### Example
+
+      The following code produces this diagnostic because the field formal
+      parameter has the type `String`, but the type of the field is `int`. The
+      parameter must have a type that is a subtype of the field's type.
+
+      ```dart
+      class C {
+        int f;
+
+        C([!String this.f!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the type of the field is incorrect, then change the type of the field to
+      match the type of the parameter, and consider removing the type from the
+      parameter:
+
+      ```dart
+      class C {
+        String f;
+
+        C(this.f);
+      }
+      ```
+
+      If the type of the parameter is incorrect, then remove the type of the
+      parameter:
+
+      ```dart
+      class C {
+        int f;
+
+        C(this.f);
+      }
+      ```
+
+      If the types of both the field and the parameter are correct, then use an
+      initializer rather than a field formal parameter to convert the parameter
+      value into a value of the correct type:
+
+      ```dart
+      class C {
+        int f;
+
+        C(String s) : f = int.parse(s);
+      }
+      ```
+  FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR:
+    problemMessage: "'{0}' is final and was given a value when it was declared, so it can't be set to a new value."
+    correctionMessage: Try removing one of the initializations.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field in question
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a final field is initialized
+      twice: once where it's declared and once by a constructor's parameter.
+
+      #### Example
+
+      The following code produces this diagnostic because the field `f` is
+      initialized twice:
+
+      ```dart
+      class C {
+        final int f = 0;
+
+        C(this.[!f!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the field should have the same value for all instances, then remove the
+      initialization in the parameter list:
+
+      ```dart
+      class C {
+        final int f = 0;
+
+        C();
+      }
+      ```
+
+      If the field can have different values in different instances, then remove
+      the initialization in the declaration:
+
+      ```dart
+      class C {
+        final int f;
+
+        C(this.f);
+      }
+      ```
+  FINAL_NOT_INITIALIZED:
+    problemMessage: "The final variable '{0}' must be initialized."
+    correctionMessage: Try initializing the variable.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the uninitialized final variable
+    documentation: |-
+      #### 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;
+      }
+      ```
+  FINAL_NOT_INITIALIZED_CONSTRUCTOR_1:
+    sharedName: FINAL_NOT_INITIALIZED_CONSTRUCTOR
+    problemMessage: "All final variables must be initialized, but '{0}' isn't."
+    correctionMessage: Try adding an initializer for the field.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the uninitialized final variable
+    documentation: |-
+      #### 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();
+      }
+      ```
+  FINAL_NOT_INITIALIZED_CONSTRUCTOR_2:
+    sharedName: FINAL_NOT_INITIALIZED_CONSTRUCTOR
+    problemMessage: "All final variables must be initialized, but '{0}' and '{1}' aren't."
+    correctionMessage: Try adding initializers for the fields.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the uninitialized final variable
+      1: the name of the uninitialized final variable
+  FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS:
+    sharedName: FINAL_NOT_INITIALIZED_CONSTRUCTOR
+    problemMessage: "All final variables must be initialized, but '{0}', '{1}', and {2} others aren't."
+    correctionMessage: Try adding initializers for the fields.
+    hasPublishedDocs: true
+    comment: |-
+      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
+  FOR_IN_OF_INVALID_ELEMENT_TYPE:
+    problemMessage: "The type '{0}' used in the 'for' loop must implement '{1}' with a type argument that can be assigned to '{2}'."
+    hasPublishedDocs: true
+    comment: |-
+      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.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the `Iterable` or `Stream` in a
+      for-in loop has an element type that can't be assigned to the loop
+      variable.
+
+      #### Example
+
+      The following code produces this diagnostic because `<String>[]` has an
+      element type of `String`, and `String` can't be assigned to the type of `e`
+      (`int`):
+
+      ```dart
+      void f() {
+        for (int e in [!<String>[]!]) {
+          print(e);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the type of the loop variable is correct, then update the type of the
+      iterable:
+
+      ```dart
+      void f() {
+        for (int e in <int>[]) {
+          print(e);
+        }
+      }
+      ```
+
+      If the type of the iterable is correct, then update the type of the loop
+      variable:
+
+      ```dart
+      void f() {
+        for (String e in <String>[]) {
+          print(e);
+        }
+      }
+      ```
+  FOR_IN_OF_INVALID_TYPE:
+    problemMessage: "The type '{0}' used in the 'for' loop must implement {1}."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the iterable expression.
+      1: the sequence type -- Iterable for `for` or Stream for `await for`.
+    documentation: |-
+      #### 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);
+        }
+      }
+      ```
+  FOR_IN_WITH_CONST_VARIABLE:
+    problemMessage: "A for-in loop variable can't be a 'const'."
+    correctionMessage: "Try removing the 'const' modifier from the variable, or use a different variable."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the loop variable declared in a
+      for-in loop is declared to be a `const`. The variable can't be a `const`
+      because the value can't be computed at compile time.
+
+      #### Example
+
+      The following code produces this diagnostic because the loop variable `x`
+      is declared to be a `const`:
+
+      ```dart
+      void f() {
+        for ([!const!] x in [0, 1, 2]) {
+          print(x);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If there's a type annotation, then remove the `const` modifier from the
+      declaration.
+
+      If there's no type, then replace the `const` modifier with `final`, `var`,
+      or a type annotation:
+
+      ```dart
+      void f() {
+        for (final x in [0, 1, 2]) {
+          print(x);
+        }
+      }
+      ```
+  GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND:
+    problemMessage: "Generic function types can't be used as type parameter bounds"
+    correctionMessage: Try making the free variable in the function type part of the larger declaration signature
+    comment: |-
+      It is a compile-time error if a generic function type is used as a bound
+      for a formal type parameter of a class or a function.
+  GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT:
+    problemMessage: "A generic function type can't be a type argument."
+    correctionMessage: "Try removing type parameters from the generic function type, or using 'dynamic' as the type argument here."
+    comment: |-
+      It is a compile-time error if a generic function type is used as an actual
+      type argument.
+  GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC:
+    problemMessage: "A method tear-off on a receiver whose type is 'dynamic' can't have type arguments."
+    correctionMessage: Specify the type of the receiver, or remove the type arguments from the method tear-off.
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an instance method is being torn
+      off from a receiver whose type is `dynamic`, and the tear-off includes type
+      arguments. Because the analyzer can't know how many type parameters the
+      method has, or whether it has any type parameters, there's no way it can
+      validate that the type arguments are correct. As a result, the type
+      arguments aren't allowed.
+
+      #### Example
+
+      The following code produces this diagnostic because the type of `p` is
+      `dynamic` and the tear-off of `m` has type arguments:
+
+      ```dart
+      void f(dynamic list) {
+        [!list.fold!]<int>;
+      }
+      ```
+
+      #### Common fixes
+
+      If you can use a more specific type than `dynamic`, then change the type of
+      the receiver:
+
+      ```dart
+      void f(List<Object> list) {
+        list.fold<int>;
+      }
+      ```
+
+      If you can't use a more specific type, then remove the type arguments:
+
+      ```dart
+      void f(dynamic list) {
+        list.cast;
+      }
+      ```
+  GETTER_NOT_ASSIGNABLE_SETTER_TYPES:
+    problemMessage: "The return type of getter '{0}' is '{1}' which isn't assignable to the type '{2}' of its setter '{3}'."
+    correctionMessage: Try changing the types so that they are compatible.
+    comment: |-
+      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
+  GETTER_NOT_SUBTYPE_SETTER_TYPES:
+    problemMessage: "The return type of getter '{0}' is '{1}' which isn't a subtype of the type '{2}' of its setter '{3}'."
+    correctionMessage: Try changing the types so that they are compatible.
+    hasPublishedDocs: true
+    comment: |-
+      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
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the return type of a getter
+      isn't a subtype of the type of the parameter of a setter with the same
+      name.
+
+      The subtype relationship is a requirement whether the getter and setter are
+      in the same class or whether one of them is in a superclass of the other.
+
+      #### Example
+
+      The following code produces this diagnostic because the return type of the
+      getter `x` is `num`, the parameter type of the setter `x` is `int`, and
+      `num` isn't a subtype of `int`:
+
+      ```dart
+      class C {
+        num get [!x!] => 0;
+
+        set x(int y) {}
+      }
+      ```
+
+      #### Common fixes
+
+      If the type of the getter is correct, then change the type of the setter:
+
+      ```dart
+      class C {
+        num get x => 0;
+
+        set x(num y) {}
+      }
+      ```
+
+      If the type of the setter is correct, then change the type of the getter:
+
+      ```dart
+      class C {
+        int get x => 0;
+
+        set x(int y) {}
+      }
+      ```
+  IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used as values in an if condition inside a const collection literal."
+    correctionMessage: Try making the deferred import non-deferred.
+  ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE:
+    problemMessage: "Functions marked 'async*' must have a return type that is a supertype of 'Stream<T>' for some type 'T'."
+    correctionMessage: "Try fixing the return type of the function, or removing the modifier 'async*' from the function body."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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 either
+      `Stream` or a supertype of `Stream`.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of the
+      function `f` has the 'async*' modifier even though the return type `int`
+      isn't a supertype of `Stream`:
+
+      ```dart
+      [!int!] f() async* {}
+      ```
+
+      #### Common fixes
+
+      If the function should be asynchronous, then change the return type to be
+      either `Stream` or a supertype of `Stream`:
+
+      ```dart
+      Stream<int> f() async* {}
+      ```
+
+      If the function should be synchronous, then remove the `async*` modifier:
+
+      ```dart
+      int f() => 0;
+      ```
+  ILLEGAL_ASYNC_RETURN_TYPE:
+    problemMessage: "Functions marked 'async' must have a return type assignable to 'Future'."
+    correctionMessage: "Try fixing the return type of the function, or removing the modifier 'async' from the function body."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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() => 0;
+      ```
+  ILLEGAL_SYNC_GENERATOR_RETURN_TYPE:
+    problemMessage: "Functions marked 'sync*' must have a return type that is a supertype of 'Iterable<T>' for some type 'T'."
+    correctionMessage: "Try fixing the return type of the function, or removing the modifier 'sync*' from the function body."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the body of a function has the
+      `sync*` modifier even though the return type of the function isn't either
+      `Iterable` or a supertype of `Iterable`.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of the
+      function `f` has the 'sync*' modifier even though the return type `int`
+      isn't a supertype of `Iterable`:
+
+      ```dart
+      [!int!] f() sync* {}
+      ```
+
+      #### Common fixes
+
+      If the function should return an iterable, then change the return type to
+      be either `Iterable` or a supertype of `Iterable`:
+
+      ```dart
+      Iterable<int> f() sync* {}
+      ```
+
+      If the function should return a single value, then remove the `sync*`
+      modifier:
+
+      ```dart
+      int f() => 0;
+      ```
+  IMPLEMENTS_NON_CLASS:
+    problemMessage: Classes and mixins can only implement other classes and mixins.
+    correctionMessage: Try specifying a class or mixin, or remove the name from the list.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the interface that was not found
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name used in the `implements`
+      clause of a class or mixin declaration is defined to be something other
+      than a class or mixin.
+
+      #### Examples
+
+      The following code produces this diagnostic because `x` is a variable
+      rather than a class or mixin:
+
+      ```dart
+      var x;
+      class C implements [!x!] {}
+      ```
+
+      #### Common fixes
+
+      If the name is the name of an existing class or mixin that's already being
+      imported, then add a prefix to the import so that the local definition of
+      the name doesn't shadow the imported name.
+
+      If the name is the name of an existing class or mixin that isn't being
+      imported, then add an import, with a prefix, for the library in which it’s
+      declared.
+
+      Otherwise, either replace the name in the `implements` clause with the name
+      of an existing class or mixin, or remove the name from the `implements`
+      clause.
+  IMPLEMENTS_REPEATED:
+    problemMessage: "'{0}' can only be implemented once."
+    correctionMessage: Try removing all but one occurrence of the class name.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the interface that is implemented more than once
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a single class is specified more
+      than once in an `implements` clause.
+
+      #### Examples
+
+      The following code produces this diagnostic because `A` is in the list
+      twice:
+
+      ```dart
+      class A {}
+      class B implements A, [!A!] {}
+      ```
+
+      #### Common fixes
+
+      Remove all except one occurrence of the class name:
+
+      ```dart
+      class A {}
+      class B implements A {}
+      ```
+  IMPLEMENTS_SUPER_CLASS:
+    problemMessage: "'{0}' can't be used in both the 'extends' and 'implements' clauses."
+    correctionMessage: Try removing one of the occurrences.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class that appears in both "extends" and "implements"
+         clauses
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when one class is listed in both the
+      `extends` and `implements` clauses of another class.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `A` is used
+      in both the `extends` and `implements` clauses for the class `B`:
+
+      ```dart
+      class A {}
+
+      class B extends A implements [!A!] {}
+      ```
+
+      #### Common fixes
+
+      If you want to inherit the implementation from the class, then remove the
+      class from the `implements` clause:
+
+      ```dart
+      class A {}
+
+      class B extends A {}
+      ```
+
+      If you don't want to inherit the implementation from the class, then remove
+      the `extends` clause:
+
+      ```dart
+      class A {}
+
+      class B implements A {}
+      ```
+  IMPLICIT_THIS_REFERENCE_IN_INITIALIZER:
+    problemMessage: "The instance member '{0}' can't be accessed in an initializer."
+    correctionMessage: Try replacing the reference to the instance member with a different expression
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the instance member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds a reference to an
+      instance member in a constructor's initializer list.
+
+      #### Examples
+
+      The following code produces this diagnostic because `defaultX` is an
+      instance member:
+
+      ```dart
+      class C {
+        int x;
+
+        C() : x = [!defaultX!];
+
+        int get defaultX => 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If the member can be made static, then do so:
+
+      ```dart
+      class C {
+        int x;
+
+        C() : x = defaultX;
+
+        static int get defaultX => 0;
+      }
+      ```
+
+      If not, then replace the reference in the initializer with a different
+      expression that doesn't use an instance member:
+
+      ```dart
+      class C {
+        int x;
+
+        C() : x = 0;
+
+        int get defaultX => 0;
+      }
+      ```
+  IMPORT_INTERNAL_LIBRARY:
+    problemMessage: "The library '{0}' is internal and can't be imported."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the uri pointing to a library
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds an import whose `dart:`
+      URI references an internal library.
+
+      #### Example
+
+      The following code produces this diagnostic because `_interceptors` is an
+      internal library:
+
+      ```dart
+      import [!'dart:_interceptors'!];
+      ```
+
+      #### Common fixes
+
+      Remove the import directive.
+  IMPORT_OF_NON_LIBRARY:
+    problemMessage: "The imported library '{0}' can't have a part-of directive."
+    correctionMessage: Try importing the library that the part is a part of.
+    comment: |-
+      14.1 Imports: It is a compile-time error if the specified URI of an
+      immediate import does not refer to a library declaration.
+
+      Parameters:
+      0: the uri pointing to a non-library declaration
+  INCONSISTENT_CASE_EXPRESSION_TYPES:
+    problemMessage: "Case expressions must have the same types, '{0}' isn't a '{1}'."
+    comment: |-
+      13.9 Switch: It is a compile-time error if values of the expressions
+      <i>e<sub>k</sub></i> are not instances of the same class <i>C</i>, for all
+      <i>1 &lt;= k &lt;= n</i>.
+
+      Parameters:
+      0: the expression source code that is the unexpected type
+      1: the name of the expected type
+  INCONSISTENT_INHERITANCE:
+    problemMessage: "Superinterfaces don't have a valid override for '{0}': {1}."
+    correctionMessage: Try adding an explicit override that is consistent with all of the inherited members.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the instance member with inconsistent inheritance.
+      1: the list of all inherited signatures for this member.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class inherits two or more
+      conflicting signatures for a member and doesn't provide an implementation
+      that satisfies all the inherited signatures.
+
+      #### Example
+
+      The following code produces this diagnostic because `C` is inheriting the
+      declaration of `m` from `A`, and that implementation isn't consistent with
+      the signature of `m` that's inherited from `B`:
+
+      ```dart
+      %language=2.9
+      class A {
+        void m({int a}) {}
+      }
+
+      class B {
+        void m({int b}) {}
+      }
+
+      class [!C!] extends A implements B {
+      }
+      ```
+
+      #### Common fixes
+
+      Add an implementation of the method that satisfies all the inherited
+      signatures:
+
+      ```dart
+      %language=2.9
+      class A {
+        void m({int a}) {}
+      }
+
+      class B {
+        void m({int b}) {}
+      }
+
+      class C extends A implements B {
+        void m({int a, int b}) {}
+      }
+      ```
+  INCONSISTENT_INHERITANCE_GETTER_AND_METHOD:
+    problemMessage: "'{0}' is inherited as a getter (from '{1}') and also a method (from '{2}')."
+    correctionMessage: Try adjusting the supertypes of this class to remove the inconsistency.
+    comment: |-
+      11.1.1 Inheritance and Overriding. Let `I` be the implicit interface of a
+      class `C` declared in library `L`. `I` inherits all members of
+      `inherited(I, L)` and `I` overrides `m'` if `m' ∈ overrides(I, L)`. It is
+      a compile-time error if `m` is a method and `m'` is a getter, or if `m`
+      is a getter and `m'` is a method.
+
+      Parameters:
+      0: the name of the the instance member with inconsistent inheritance.
+      1: the name of the superinterface that declares the name as a getter.
+      2: the name of the superinterface that declares the name as a method.
+  INCONSISTENT_LANGUAGE_VERSION_OVERRIDE:
+    problemMessage: Parts must have exactly the same language version override as the library.
+    comment: |-
+      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
+  INITIALIZER_FOR_NON_EXISTENT_FIELD:
+    problemMessage: "'{0}' isn't a field in the enclosing class."
+    correctionMessage: "Try correcting the name to match an existing field, or defining a field named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the initializing formal that is not an instance variable in
+         the immediately enclosing class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor initializes a
+      field that isn't declared in the class containing the constructor.
+      Constructors can't initialize fields that aren't declared and fields that
+      are inherited from superclasses.
+
+      #### Examples
+
+      The following code produces this diagnostic because the initializer is
+      initializing `x`, but `x` isn't a field in the class:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C() : [!x = 0!];
+      }
+      ```
+
+      #### Common fixes
+
+      If a different field should be initialized, then change the name to the
+      name of the field:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C() : y = 0;
+      }
+      ```
+
+      If the field must be declared, then add a declaration:
+
+      ```dart
+      %language=2.9
+      class C {
+        int x;
+        int y;
+
+        C() : x = 0;
+      }
+      ```
+  INITIALIZER_FOR_STATIC_FIELD:
+    problemMessage: "'{0}' is a static field in the enclosing class. Fields initialized in a constructor can't be static."
+    correctionMessage: Try removing the initialization.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the initializing formal that is a static variable in the
+         immediately enclosing class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a static field is initialized in
+      a constructor using either a field formal parameter or an assignment in the
+      initializer list.
+
+      #### Example
+
+      The following code produces this diagnostic because the static field `a` is
+      being initialized by the field formal parameter `this.a`:
+
+      ```dart
+      class C {
+        static int? a;
+        C([!this.a!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the field should be an instance field, then remove the keyword `static`:
+
+      ```dart
+      class C {
+        int? a;
+        C(this.a);
+      }
+      ```
+
+      If you intended to initialize an instance field and typed the wrong name,
+      then correct the name of the field being initialized:
+
+      ```dart
+      class C {
+        static int? a;
+        int? b;
+        C(this.b);
+      }
+      ```
+
+      If you really want to initialize the static field, then move the
+      initialization into the constructor body:
+
+      ```dart
+      class C {
+        static int? a;
+        C(int? c) {
+          a = c;
+        }
+      }
+      ```
+  INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD:
+    problemMessage: "'{0}' isn't a field in the enclosing class."
+    correctionMessage: "Try correcting the name to match an existing field, or defining a field named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the initializing formal that is not an instance variable in
+         the immediately enclosing class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a field formal parameter is
+      found in a constructor in a class that doesn't declare the field being
+      initialized. Constructors can't initialize fields that aren't declared and
+      fields that are inherited from superclasses.
+
+      #### Examples
+
+      The following code produces this diagnostic because the field `x` isn't
+      defined:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C([!this.x!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the field name was wrong, then change it to the name of an existing
+      field:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C(this.y);
+      }
+      ```
+
+      If the field name is correct but hasn't yet been defined, then declare the
+      field:
+
+      ```dart
+      %language=2.9
+      class C {
+        int x;
+        int y;
+
+        C(this.x);
+      }
+      ```
+
+      If the parameter is needed but shouldn't initialize a field, then convert
+      it to a normal parameter and use it:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C(int x) : y = x * 2;
+      }
+      ```
+
+      If the parameter isn't needed, then remove it:
+
+      ```dart
+      %language=2.9
+      class C {
+        int y;
+
+        C();
+      }
+      ```
+  INSTANCE_ACCESS_TO_STATIC_MEMBER:
+    problemMessage: "Static {1} '{0}' can't be accessed through an instance."
+    correctionMessage: "Try using the class '{2}' to access the {1}."
+    hasPublishedDocs: true
+    comment: |-
+      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
+    documentation: |-
+      #### 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;
+      }
+      ```
+  INSTANCE_MEMBER_ACCESS_FROM_FACTORY:
+    problemMessage: "Instance members can't be accessed from a factory constructor."
+    correctionMessage: Try removing the reference to the instance member.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a factory constructor contains
+      an unqualified reference to an instance member. In a generative
+      constructor, the instance of the class is created and initialized before
+      the body of the constructor is executed, so the instance can be bound to
+      `this` and accessed just like it would be in an instance method. But, in a
+      factory constructor, the instance isn't created before executing the body,
+      so `this` can't be used to reference it.
+
+      #### Examples
+
+      The following code produces this diagnostic because `x` isn't in scope in
+      the factory constructor:
+
+      ```dart
+      class C {
+        int x;
+        factory C() {
+          return C._([!x!]);
+        }
+        C._(this.x);
+      }
+      ```
+
+      #### Common fixes
+
+      Rewrite the code so that it doesn't reference the instance member:
+
+      ```dart
+      class C {
+        int x;
+        factory C() {
+          return C._(0);
+        }
+        C._(this.x);
+      }
+      ```
+  INSTANCE_MEMBER_ACCESS_FROM_STATIC:
+    problemMessage: "Instance members can't be accessed from a static method."
+    correctionMessage: "Try removing the reference to the instance member, or removing the keyword 'static' from the method."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a static method contains an
+      unqualified reference to an instance member.
+
+      #### Examples
+
+      The following code produces this diagnostic because the instance field `x`
+      is being referenced in a static method:
+
+      ```dart
+      %language=2.9
+      class C {
+        int x;
+
+        static int m() {
+          return [!x!];
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the method must reference the instance member, then it can't be static,
+      so remove the keyword:
+
+      ```dart
+      %language=2.9
+      class C {
+        int x;
+
+        int m() {
+          return x;
+        }
+      }
+      ```
+
+      If the method can't be made an instance method, then add a parameter so
+      that an instance of the class can be passed in:
+
+      ```dart
+      %language=2.9
+      class C {
+        int x;
+
+        static int m(C c) {
+          return c.x;
+        }
+      }
+      ```
+  INSTANTIATE_ABSTRACT_CLASS:
+    problemMessage: "Abstract classes can't be instantiated."
+    correctionMessage: Try creating an instance of a concrete subtype.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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.
+  INSTANTIATE_ENUM:
+    problemMessage: "Enums can't be instantiated."
+    correctionMessage: Try using one of the defined constants.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an enum is instantiated. It's
+      invalid to create an instance of an enum by invoking a constructor; only
+      the instances named in the declaration of the enum can exist.
+
+      #### Example
+
+      The following code produces this diagnostic because the enum `E` is being
+      instantiated:
+
+      ```dart
+      enum E {a}
+
+      var e = [!E!]();
+      ```
+
+      #### Common fixes
+
+      If you intend to use an instance of the enum, then reference one of the
+      constants defined in the enum:
+
+      ```dart
+      enum E {a}
+
+      var e = E.a;
+      ```
+
+      If you intend to use an instance of a class, then use the name of that class in place of the name of the enum.
+  INSTANTIATE_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    problemMessage: "Type aliases that expand to a type parameter can't be instantiated."
+    correctionMessage: Try replacing it with a class.
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor invocation is
+      found where the type being instantiated is a type alias for one of the type
+      parameters of the type alias. This isn’t allowed because the value of the
+      type parameter is a type rather than a class.
+
+      #### Example
+
+      The following code produces this diagnostic because it creates an instance
+      of `A`, even though `A` is a type alias that is defined to be equivalent to
+      a type parameter:
+
+      ```dart
+      typedef A<T> = T;
+
+      void f() {
+        const [!A!]<int>();
+      }
+      ```
+
+      #### Common fixes
+
+      Use either a class name or a type alias defined to be a class, rather than
+      a type alias defined to be a type parameter:
+
+      ```dart
+      typedef A<T> = C<T>;
+
+      void f() {
+        const A<int>();
+      }
+
+      class C<T> {
+        const C();
+      }
+      ```
+  INTEGER_LITERAL_IMPRECISE_AS_DOUBLE:
+    problemMessage: "The integer literal is being used as a double, but can't be represented as a 64-bit double without overflow or loss of precision: '{0}'."
+    correctionMessage: "Try using the class 'BigInt', or switch to the closest valid double: '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the lexeme of the integer
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an integer literal is being
+      implicitly converted to a double, but can't be represented as a 64-bit
+      double without overflow or loss of precision. Integer literals are
+      implicitly converted to a double if the context requires the type `double`.
+
+      #### Example
+
+      The following code produces this diagnostic because the integer value
+      `9223372036854775807` can't be represented exactly as a double:
+
+      ```dart
+      double x = [!9223372036854775807!];
+      ```
+
+      #### Common fixes
+
+      If you need to use the exact value, then use the class `BigInt` to
+      represent the value:
+
+      ```dart
+      var x = BigInt.parse('9223372036854775807');
+      ```
+
+      If you need to use a double, then change the value to one that can be
+      represented exactly:
+
+      ```dart
+      double x = 9223372036854775808;
+      ```
+  INTEGER_LITERAL_OUT_OF_RANGE:
+    problemMessage: "The integer literal {0} can't be represented in 64 bits."
+    correctionMessage: "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."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an integer literal has a value
+      that is too large (positive) or too small (negative) to be represented in a
+      64-bit word.
+
+      #### Example
+
+      The following code produces this diagnostic because the value can't be
+      represented in 64 bits:
+
+      ```dart
+      var x = [!9223372036854775810!];
+      ```
+
+      #### Common fixes
+
+      If you need to represent the current value, then wrap it in an instance of
+      the class `BigInt`:
+
+      ```dart
+      var x = BigInt.parse('9223372036854775810');
+      ```
+  INVALID_ANNOTATION:
+    problemMessage: Annotation must be either a const variable reference or const constructor invocation.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an annotation is found that is
+      using something that is neither a variable marked as `const` or the
+      invocation of a `const` constructor.
+
+      Getters can't be used as annotations.
+
+      #### Example
+
+      The following code produces this diagnostic because the variable `v` isn't
+      a `const` variable:
+
+      ```dart
+      var v = 0;
+
+      [!@v!]
+      void f() {
+      }
+      ```
+
+      The following code produces this diagnostic because `f` isn't a variable:
+
+      ```dart
+      [!@f!]
+      void f() {
+      }
+      ```
+
+      The following code produces this diagnostic because `f` isn't a
+      constructor:
+
+      ```dart
+      [!@f()!]
+      void f() {
+      }
+      ```
+
+      The following code produces this diagnostic because `g` is a getter:
+
+      ```dart
+      [!@g!]
+      int get g => 0;
+      ```
+
+      #### Common fixes
+
+      If the annotation is referencing a variable that isn't a `const`
+      constructor, add the keyword `const` to the variable's declaration:
+
+      ```dart
+      const v = 0;
+
+      @v
+      void f() {
+      }
+      ```
+
+      If the annotation isn't referencing a variable, then remove it:
+
+      ```dart
+      int v = 0;
+
+      void f() {
+      }
+      ```
+  INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used in annotations."
+    correctionMessage: "Try moving the constant from the deferred library, or removing 'deferred' from the import."
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constant defined in a library
+      that is imported as a deferred library is referenced in the argument list
+      of an annotation. Annotations are evaluated at compile time, and values
+      from deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      The following code produces this diagnostic because the constant `pi` is
+      being referenced in the argument list of an annotation, even though the
+      library that defines it is being imported as a deferred library:
+
+      ```dart
+      import 'dart:math' deferred as math;
+
+      class C {
+        const C(double d);
+      }
+
+      @C([!math.pi!])
+      void f () {}
+      ```
+
+      #### Common fixes
+
+      If you need to reference the imported constant, then remove the `deferred`
+      keyword:
+
+      ```dart
+      import 'dart:math' as math;
+
+      class C {
+        const C(double d);
+      }
+
+      @C(math.pi)
+      void f () {}
+      ```
+
+      If the import is required to be deferred and there's another constant that
+      is appropriate, then use that constant in place of the constant from the
+      deferred library.
+  INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used as annotations."
+    correctionMessage: Try removing the annotation, or changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constant from a library that
+      is imported using a deferred import is used as an annotation. Annotations
+      are evaluated at compile time, and constants from deferred libraries aren't
+      available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      The following code produces this diagnostic because the constant `pi` is
+      being used as an annotation when the library `dart:math` is imported as
+      `deferred`:
+
+      ```dart
+      import 'dart:math' deferred as math;
+
+      @[!math.pi!]
+      void f() {}
+      ```
+
+      #### Common fixes
+
+      If you need to reference the constant as an annotation, then remove the
+      keyword `deferred` from the import:
+
+      ```dart
+      import 'dart:math' as math;
+
+      @math.pi
+      void f() {}
+      ```
+
+      If you can use a different constant as an annotation, then replace the
+      annotation with a different constant:
+
+      ```dart
+      @deprecated
+      void f() {}
+      ```
+  INVALID_ASSIGNMENT:
+    problemMessage: "A value of type '{0}' can't be assigned to a variable of type '{1}'."
+    correctionMessage: "Try changing the type of the variable, or casting the right-hand type to '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the right hand side type
+      1: the name of the left hand side type
+    documentation: |-
+      #### 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;
+      ```
+  INVALID_CAST_FUNCTION:
+    problemMessage: "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."
+    comment: |-
+      Parameters:
+      0: the type of the function
+      1: the expected function type
+  INVALID_CAST_FUNCTION_EXPR:
+    problemMessage: "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)."
+    comment: |-
+      Parameters:
+      0: the type of the torn-off function expression
+      1: the expected function type
+  INVALID_CAST_LITERAL:
+    problemMessage: "The literal '{0}' with type '{1}' isn't of expected type '{2}'."
+    comment: |-
+      Parameters:
+      0: the type of the literal
+      1: the expected type
+  INVALID_CAST_LITERAL_LIST:
+    problemMessage: "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."
+    comment: |-
+      Parameters:
+      0: the type of the list literal
+      1: the expected type
+  INVALID_CAST_LITERAL_MAP:
+    problemMessage: "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."
+    comment: |-
+      Parameters:
+      0: the type of the map literal
+      1: the expected type
+  INVALID_CAST_LITERAL_SET:
+    problemMessage: "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."
+    comment: |-
+      Parameters:
+      0: the type of the set literal
+      1: the expected type
+  INVALID_CAST_METHOD:
+    problemMessage: "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."
+    comment: |-
+      Parameters:
+      0: the type of the torn-off method
+      1: the expected function type
+  INVALID_CAST_NEW_EXPR:
+    problemMessage: "The constructor returns type '{0}' that isn't of expected type '{1}'."
+    comment: |-
+      Parameters:
+      0: the type of the instantiated object
+      1: the expected type
+  INVALID_CONSTANT:
+    problemMessage: Invalid constant value.
+    comment: |-
+      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.
+
+      See TODOs in ConstantVisitor
+  INVALID_CONSTRUCTOR_NAME:
+    problemMessage: Invalid constructor name.
+    comment: |-
+      7.6 Constructors: It is a compile-time error if the name of a constructor
+      is not a constructor name.
+  INVALID_EXTENSION_ARGUMENT_COUNT:
+    problemMessage: "Extension overrides must have exactly one argument: the value of 'this' in the extension method."
+    correctionMessage: Try specifying exactly one argument.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override doesn't
+      have exactly one argument. The argument is the expression used to compute
+      the value of `this` within the extension method, so there must be one
+      argument.
+
+      #### Examples
+
+      The following code produces this diagnostic because there are no arguments:
+
+      ```dart
+      extension E on String {
+        String join(String other) => '$this $other';
+      }
+
+      void f() {
+        E[!()!].join('b');
+      }
+      ```
+
+      And, the following code produces this diagnostic because there's more than
+      one argument:
+
+      ```dart
+      extension E on String {
+        String join(String other) => '$this $other';
+      }
+
+      void f() {
+        E[!('a', 'b')!].join('c');
+      }
+      ```
+
+      #### Common fixes
+
+      Provide one argument for the extension override:
+
+      ```dart
+      extension E on String {
+        String join(String other) => '$this $other';
+      }
+
+      void f() {
+        E('a').join('b');
+      }
+      ```
+  INVALID_FACTORY_NAME_NOT_A_CLASS:
+    problemMessage: The name of a factory constructor must be the same as the name of the immediately enclosing class.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name of a factory
+      constructor isn't the same as the name of the surrounding class.
+
+      #### Examples
+
+      The following code produces this diagnostic because the name of the factory
+      constructor (`A`) isn't the same as the surrounding class (`C`):
+
+      ```dart
+      class A {}
+
+      class C {
+        factory [!A!]() => throw 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If the factory returns an instance of the surrounding class, then rename
+      the factory:
+
+      ```dart
+      class A {}
+
+      class C {
+        factory C() => throw 0;
+      }
+      ```
+
+      If the factory returns an instance of a different class, then move the
+      factory to that class:
+
+      ```dart
+      class A {
+        factory A() => throw 0;
+      }
+
+      class C {}
+      ```
+
+      If the factory returns an instance of a different class, but you can't
+      modify that class or don't want to move the factory, then convert it to be
+      a static method:
+
+      ```dart
+      class A {}
+
+      class C {
+        static A a() => throw 0;
+      }
+      ```
+  INVALID_IMPLEMENTATION_OVERRIDE:
+    problemMessage: "'{1}.{0}' ('{2}') isn't a valid concrete implementation of '{3}.{0}' ('{4}')."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the declared member that is not a valid override.
+      1: the name of the interface that declares the member.
+      2: the type of the declared member in the interface.
+      3. the name of the interface with the overridden member.
+      4. the type of the overridden member.
+
+      These parameters must be kept in sync with those of
+      [CompileTimeErrorCode.INVALID_OVERRIDE].
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when all of the following are true:
+
+      - A class defines an abstract member.
+      - There is a concrete implementation of that member in a superclass.
+      - The concrete implementation isn't a valid implementation of the abstract
+        method.
+
+      The concrete implementation can be invalid because of incompatibilities in
+      either the return type, the types of parameters, or the type variables.
+
+      #### Example
+
+      The following code produces this diagnostic because the method `A.add` has
+      a parameter of type `int`, and the overriding method `B.add` has a
+      corresponding parameter of type `num`:
+
+      ```dart
+      class A {
+        int add(int a) => a;
+      }
+      class [!B!] extends A {
+        int add(num a);
+      }
+      ```
+
+      This is a problem because in an invocation of `B.add` like the following:
+
+      ```dart
+      void f(B b) {
+        b.add(3.4);
+      }
+      ```
+
+      `B.add` is expecting to be able to take, for example, a `double`, but when
+      the method `A.add` is executed (because it's the only concrete
+      implementation of `add`), a runtime exception will be thrown because a
+      `double` can't be assigned to a parameter of type `int`.
+
+      #### Common fixes
+
+      If the method in the subclass can conform to the implementation in the
+      superclass, then change the declaration in the subclass (or remove it if
+      it's the same):
+
+      ```dart
+      class A {
+        int add(int a) => a;
+      }
+      class B	extends A {
+        int add(int a);
+      }
+      ```
+
+      If the method in the superclass can be generalized to be a valid
+      implementation of the method in the subclass, then change the superclass
+      method:
+
+      ```dart
+      class A {
+        int add(num a) => a.floor();
+      }
+      class B	extends A {
+        int add(num a);
+      }
+      ```
+
+      If neither the method in the superclass nor the method in the subclass can
+      be changed, then provide a concrete implementation of the method in the
+      subclass:
+
+      ```dart
+      class A {
+        int add(int a) => a;
+      }
+      class B	extends A {
+        int add(num a) => a.floor();
+      }
+      ```
+  INVALID_INLINE_FUNCTION_TYPE:
+    problemMessage: "Inline function types can't be used for parameters in a generic function type."
+    correctionMessage: "Try using a generic function type (returnType 'Function(' parameters ')')."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generic function type has a
+      function-valued parameter that is written using the older inline function
+      type syntax.
+
+      #### Example
+
+      The following code produces this diagnostic because the parameter `f`, in
+      the generic function type used to define `F`, uses the inline function
+      type syntax:
+
+      ```dart
+      typedef F = int Function(int f[!(!]String s));
+      ```
+
+      #### Common fixes
+
+      Use the generic function syntax for the parameter's type:
+
+      ```dart
+      typedef F = int Function(int Function(String));
+      ```
+  INVALID_MODIFIER_ON_CONSTRUCTOR:
+    problemMessage: "The modifier '{0}' can't be applied to the body of a constructor."
+    correctionMessage: Try removing the modifier.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the invalid modifier
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the body of a constructor is
+      prefixed by one of the following modifiers: `async`, `async*`, or `sync*`.
+      Constructor bodies must be synchronous.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of the
+      constructor for `C` is marked as being `async`:
+
+      ```dart
+      class C {
+        C() [!async!] {}
+      }
+      ```
+
+      #### Common fixes
+
+      If the constructor can be synchronous, then remove the modifier:
+
+      ```dart
+      class C {
+        C();
+      }
+      ```
+
+      If the constructor can't be synchronous, then use a static method to create
+      the instance instead:
+
+      ```dart
+      class C {
+        C();
+        static Future<C> c() async {
+          return C();
+        }
+      }
+      ```
+  INVALID_MODIFIER_ON_SETTER:
+    problemMessage: "Setters can't use 'async', 'async*', or 'sync*'."
+    correctionMessage: Try removing the modifier.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the invalid modifier
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the body of a setter is prefixed
+      by one of the following modifiers: `async`, `async*`, or `sync*`. Setter
+      bodies must be synchronous.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of the setter
+      `x` is marked as being `async`:
+
+      ```dart
+      class C {
+        set x(int i) [!async!] {}
+      }
+      ```
+
+      #### Common fixes
+
+      If the setter can be synchronous, then remove the modifier:
+
+      ```dart
+      class C {
+        set x(int i) {}
+      }
+      ```
+
+      If the setter can't be synchronous, then use a method to set the value
+      instead:
+
+      ```dart
+      class C {
+        void x(int i) async {}
+      }
+      ```
+  INVALID_OVERRIDE:
+    problemMessage: "'{1}.{0}' ('{2}') isn't a valid override of '{3}.{0}' ('{4}')."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the declared member that is not a valid override.
+      1: the name of the interface that declares the member.
+      2: the type of the declared member in the interface.
+      3. the name of the interface with the overridden member.
+      4. the type of the overridden member.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a member of a class is found
+      that overrides a member from a supertype and the override isn't valid. An
+      override is valid if all of these are true:
+      * It allows all of the arguments allowed by the overridden member.
+      * It doesn't require any arguments that aren't required by the overridden
+        member.
+      * The type of every parameter of the overridden member is assignable to the
+        corresponding parameter of the override.
+      * The return type of the override is assignable to the return type of the
+        overridden member.
+
+      #### Examples
+
+      The following code produces this diagnostic because the type of the
+      parameter `s` (`String`) isn't assignable to the type of the parameter `i`
+      (`int`):
+
+      ```dart
+      class A {
+        void m(int i) {}
+      }
+
+      class B extends A {
+        void [!m!](String s) {}
+      }
+      ```
+
+      #### Common fixes
+
+      If the invalid method is intended to override the method from the
+      superclass, then change it to conform:
+
+      ```dart
+      class A {
+        void m(int i) {}
+      }
+
+      class B extends A {
+        void m(int i) {}
+      }
+      ```
+
+      If it isn't intended to override the method from the superclass, then
+      rename it:
+
+      ```dart
+      class A {
+        void m(int i) {}
+      }
+
+      class B extends A {
+        void m2(String s) {}
+      }
+      ```
+  INVALID_REFERENCE_TO_THIS:
+    problemMessage: "Invalid reference to 'this' expression."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when `this` is used outside of an
+      instance method or a generative constructor. The reserved word `this` is
+      only defined in the context of an instance method or a generative
+      constructor.
+
+      #### Examples
+
+      The following code produces this diagnostic because `v` is a top-level
+      variable:
+
+      ```dart
+      C f() => [!this!];
+
+      class C {}
+      ```
+
+      #### Common fixes
+
+      Use a variable of the appropriate type in place of `this`, declaring it if
+      necessary:
+
+      ```dart
+      C f(C c) => c;
+
+      class C {}
+      ```
+  INVALID_SUPER_INVOCATION:
+    problemMessage: "The superclass call must be last in an initializer list: '{0}'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the initializer list of a
+      constructor contains an invocation of a constructor in the superclass, but
+      the invocation isn't the last item in the initializer list.
+
+      #### Example
+
+      The following code produces this diagnostic because the invocation of the
+      superclass' constructor isn't the last item in the initializer list:
+
+      ```dart
+      class A {
+        A(int x);
+      }
+
+      class B extends A {
+        B(int x) : [!super!](x), assert(x >= 0);
+      }
+      ```
+
+      #### Common fixes
+
+      Move the invocation of the superclass' constructor to the end of the
+      initializer list:
+
+      ```dart
+      class A {
+        A(int x);
+      }
+
+      class B extends A {
+        B(int x) : assert(x >= 0), super(x);
+      }
+      ```
+  INVALID_TYPE_ARGUMENT_IN_CONST_LIST:
+    sharedName: INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL
+    problemMessage: "Constant list literals can't include a type parameter as a type argument, such as '{0}'."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type parameter
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type parameter is used as a
+      type argument in a list, map, or set literal that is prefixed by `const`.
+      This isn't allowed because the value of the type parameter (the actual type
+      that will be used at runtime) can't be known at compile time.
+
+      #### Example
+
+      The following code produces this diagnostic because the type parameter `T`
+      is being used as a type argument when creating a constant list:
+
+      ```dart
+      List<T> newList<T>() => const <[!T!]>[];
+      ```
+
+      The following code produces this diagnostic because the type parameter `T`
+      is being used as a type argument when creating a constant map:
+
+      ```dart
+      Map<String, T> newSet<T>() => const <String, [!T!]>{};
+      ```
+
+      The following code produces this diagnostic because the type parameter `T`
+      is being used as a type argument when creating a constant set:
+
+      ```dart
+      Set<T> newSet<T>() => const <[!T!]>{};
+      ```
+
+      #### Common fixes
+
+      If the type that will be used for the type parameter can be known at
+      compile time, then remove the type parameter:
+
+      ```dart
+      List<int> newList() => const <int>[];
+      ```
+
+      If the type that will be used for the type parameter can't be known until
+      runtime, then remove the keyword `const`:
+
+      ```dart
+      List<T> newList<T>() => <T>[];
+      ```
+  INVALID_TYPE_ARGUMENT_IN_CONST_MAP:
+    sharedName: INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL
+    problemMessage: "Constant map literals can't include a type parameter as a type argument, such as '{0}'."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type parameter
+  INVALID_TYPE_ARGUMENT_IN_CONST_SET:
+    sharedName: INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL
+    problemMessage: "Constant set literals can't include a type parameter as a type argument, such as '{0}'."
+    correctionMessage: Try replacing the type parameter with a different type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type parameter
+  INVALID_URI:
+    problemMessage: "Invalid URI syntax: '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the URI that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a URI in a directive doesn't
+      conform to the syntax of a valid URI.
+
+      #### Examples
+
+      The following code produces this diagnostic because `'#'` isn't a valid
+      URI:
+
+      ```dart
+      import [!'#'!];
+      ```
+
+      #### Common fixes
+
+      Replace the invalid URI with a valid URI.
+  INVALID_USE_OF_COVARIANT:
+    problemMessage: "The 'covariant' keyword can only be used for parameters in instance methods or before non-final instance fields."
+    correctionMessage: "Try removing the 'covariant' keyword."
+    comment: "The 'covariant' keyword was found in an inappropriate location."
+  INVALID_USE_OF_NULL_VALUE:
+    problemMessage: "An expression whose value is always 'null' can't be dereferenced."
+    correctionMessage: Try changing the type of the expression.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an expression whose value will
+      always be `null` is dereferenced.
+
+      #### Example
+
+      The following code produces this diagnostic because `x` will always be
+      `null`:
+
+      ```dart
+      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
+      int f(String? x) {
+        return x!.length;
+      }
+      ```
+  INVOCATION_OF_EXTENSION_WITHOUT_CALL:
+    problemMessage: "The extension '{0}' doesn't define a 'call' method so the override can't be used in an invocation."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the extension
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is used to
+      invoke a function but the extension doesn't declare a `call` method.
+
+      #### Examples
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't define a `call` method:
+
+      ```dart
+      extension E on String {}
+
+      void f() {
+        [!E('')!]();
+      }
+      ```
+
+      #### Common fixes
+
+      If the extension is intended to define a `call` method, then declare it:
+
+      ```dart
+      extension E on String {
+        int call() => 0;
+      }
+
+      void f() {
+        E('')();
+      }
+      ```
+
+      If the extended type defines a `call` method, then remove the extension
+      override.
+
+      If the `call` method isn't defined, then rewrite the code so that it
+      doesn't invoke the `call` method.
+  INVOCATION_OF_NON_FUNCTION:
+    problemMessage: "'{0}' isn't a function."
+    correctionMessage: "Try correcting the name to match an existing function, or define a method or function named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the identifier that is not a function type
+    documentation: |-
+      #### 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.
+  INVOCATION_OF_NON_FUNCTION_EXPRESSION:
+    problemMessage: "The expression doesn't evaluate to a function, so it can't be invoked."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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();
+      ```
+  LABEL_IN_OUTER_SCOPE:
+    problemMessage: "Can't reference label '{0}' declared in an outer method."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the unresolvable label
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `break` or `continue`
+      statement references a label that is declared in a method or function
+      containing the function in which the `break` or `continue` statement
+      appears. The `break` and `continue` statements can't be used to transfer
+      control outside the function that contains them.
+
+      #### Example
+
+      The following code produces this diagnostic because the label `loop` is
+      declared outside the local function `g`:
+
+      ```dart
+      void f() {
+        loop:
+        while (true) {
+          void g() {
+            break [!loop!];
+          }
+
+          g();
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Try rewriting the code so that it isn't necessary to transfer control
+      outside the local function, possibly by inlining the local function:
+
+      ```dart
+      void f() {
+        loop:
+        while (true) {
+          break loop;
+        }
+      }
+      ```
+
+      If that isn't possible, then try rewriting the local function so that a
+      value returned by the function can be used to determine whether control is
+      transferred:
+
+      ```dart
+      void f() {
+        loop:
+        while (true) {
+          bool g() {
+            return true;
+          }
+
+          if (g()) {
+            break loop;
+          }
+        }
+      }
+      ```
+  LABEL_UNDEFINED:
+    problemMessage: "Can't reference an undefined label '{0}'."
+    correctionMessage: Try defining the label, or correcting the name to match an existing label.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the unresolvable label
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds a reference to a label
+      that isn't defined in the scope of the `break` or `continue` statement that
+      is referencing it.
+
+      #### Example
+
+      The following code produces this diagnostic because the label `loop` isn't
+      defined anywhere:
+
+      ```dart
+      void f() {
+        for (int i = 0; i < 10; i++) {
+          for (int j = 0; j < 10; j++) {
+            break [!loop!];
+          }
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the label should be on the innermost enclosing `do`, `for`, `switch`, or
+      `while` statement, then remove the label:
+
+      ```dart
+      void f() {
+        for (int i = 0; i < 10; i++) {
+          for (int j = 0; j < 10; j++) {
+            break;
+          }
+        }
+      }
+      ```
+
+      If the label should be on some other statement, then add the label:
+
+      ```dart
+      void f() {
+        loop: for (int i = 0; i < 10; i++) {
+          for (int j = 0; j < 10; j++) {
+            break loop;
+          }
+        }
+      }
+      ```
+  LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR:
+    problemMessage: "Can't have a late final field in a class with a generative const constructor."
+    correctionMessage: "Try removing the 'late' modifier, or don't declare 'const' constructors."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class that has at least one
+      `const` constructor also has a field marked both `late` and `final`.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `A` has a
+      `const` constructor and the `final` field `f` is marked as `late`:
+
+      ```dart
+      class A {
+        [!late!] final int f;
+
+        const A();
+      }
+      ```
+
+      #### Common fixes
+
+      If the field doesn't need to be marked `late`, then remove the `late`
+      modifier from the field:
+
+      ```dart
+      class A {
+        final int f = 0;
+
+        const A();
+      }
+      ```
+
+      If the field must be marked `late`, then remove the `const` modifier from
+      the constructors:
+
+      ```dart
+      class A {
+        late final int f;
+
+        A();
+      }
+      ```
+  LATE_FINAL_LOCAL_ALREADY_ASSIGNED:
+    problemMessage: The late final local variable is already assigned.
+    correctionMessage: "Try removing the 'final' modifier, or don't reassign the value."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the analyzer can prove that a
+      local variable marked as both `late` and `final` was already assigned a
+      value at the point where another assignment occurs.
+
+      Because `final` variables can only be assigned once, subsequent assignments
+      are guaranteed to fail, so they're flagged.
+
+      #### Example
+
+      The following code produces this diagnostic because the `final` variable
+      `v` is assigned a value in two places:
+
+      ```dart
+      int f() {
+        late final int v;
+        v = 0;
+        [!v!] += 1;
+        return v;
+      }
+      ```
+
+      #### Common fixes
+
+      If you need to be able to reassign the variable, then remove the `final`
+      keyword:
+
+      ```dart
+      int f() {
+        late int v;
+        v = 0;
+        v += 1;
+        return v;
+      }
+      ```
+
+      If you don't need to reassign the variable, then remove all except the
+      first of the assignments:
+
+      ```dart
+      int f() {
+        late final int v;
+        v = 0;
+        return v;
+      }
+      ```
+  LIST_ELEMENT_TYPE_NOT_ASSIGNABLE:
+    problemMessage: "The element type '{0}' can't be assigned to the list type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the actual type of the list element
+      1: the expected type of the list element
+    documentation: |-
+      #### 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];
+      ```
+  MAIN_FIRST_POSITIONAL_PARAMETER_TYPE:
+    problemMessage: "The type of the first positional parameter of the 'main' function must be a supertype of 'List<String>'."
+    correctionMessage: Try changing the type of the parameter.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the first positional parameter
+      of a function named `main` isn't a supertype of `List<String>`.
+
+      #### Example
+
+      The following code produces this diagnostic because `List<int>` isn't a
+      supertype of `List<String>`:
+
+      ```dart
+      void main([!List<int>!] args) {}
+      ```
+
+      #### Common fixes
+
+      If the function is an entry point, then change the type of the first
+      positional parameter to be a supertype of `List<String>`:
+
+      ```dart
+      void main(List<String> args) {}
+      ```
+
+      If the function isn't an entry point, then change the name of the function:
+
+      ```dart
+      void f(List<int> args) {}
+      ```
+  MAIN_HAS_REQUIRED_NAMED_PARAMETERS:
+    problemMessage: "The function 'main' can't have any required named parameters."
+    correctionMessage: "Try using a different name for the function, or removing the 'required' modifier."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a function named `main` has one
+      or more required named parameters.
+
+      #### Example
+
+      The following code produces this diagnostic because the function named
+      `main` has a required named parameter (`x`):
+
+      ```dart
+      void [!main!]({required int x}) {}
+      ```
+
+      #### Common fixes
+
+      If the function is an entry point, then remove the `required` keyword:
+
+      ```dart
+      void main({int? x}) {}
+      ```
+
+      If the function isn't an entry point, then change the name of the function:
+
+      ```dart
+      void f({required int x}) {}
+      ```
+  MAIN_HAS_TOO_MANY_REQUIRED_POSITIONAL_PARAMETERS:
+    problemMessage: "The function 'main' can't have more than two required positional parameters."
+    correctionMessage: Try using a different name for the function, or removing extra parameters.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a function named `main` has more
+      than two required positional parameters.
+
+      #### Example
+
+      The following code produces this diagnostic because the function `main` has
+      three required positional parameters:
+
+      ```dart
+      void [!main!](List<String> args, int x, int y) {}
+      ```
+
+      #### Common fixes
+
+      If the function is an entry point and the extra parameters aren't used,
+      then remove them:
+
+      ```dart
+      void main(List<String> args, int x) {}
+      ```
+
+      If the function is an entry point, but the extra parameters used are for
+      when the function isn't being used as an entry point, then make the extra
+      parameters optional:
+
+      ```dart
+      void main(List<String> args, int x, [int y = 0]) {}
+      ```
+
+      If the function isn't an entry point, then change the name of the function:
+
+      ```dart
+      void f(List<String> args, int x, int y) {}
+      ```
+  MAIN_IS_NOT_FUNCTION:
+    problemMessage: "The declaration named 'main' must be a function."
+    correctionMessage: Try using a different name for this declaration.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library contains a declaration
+      of the name `main` that isn't the declaration of a top-level function.
+
+      #### Example
+
+      The following code produces this diagnostic because the name `main` is
+      being used to declare a top-level variable:
+
+      ```dart
+      var [!main!] = 3;
+      ```
+
+      #### Common fixes
+
+      Use a different name for the declaration:
+
+      ```dart
+      var mainIndex = 3;
+      ```
+  MAP_ENTRY_NOT_IN_MAP:
+    problemMessage: Map entries can only be used in a map literal.
+    correctionMessage: Try converting the collection to a map or removing the map entry.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a map entry (a key/value pair)
+      is found in a set literal.
+
+      #### Examples
+
+      The following code produces this diagnostic because the literal has a map
+      entry even though it's a set literal:
+
+      ```dart
+      const collection = <String>{[!'a' : 'b'!]};
+      ```
+
+      #### Common fixes
+
+      If you intended for the collection to be a map, then change the code so
+      that it is a map. In the previous example, you could do this by adding
+      another type argument:
+
+      ```dart
+      const collection = <String, String>{'a' : 'b'};
+      ```
+
+      In other cases, you might need to change the explicit type from `Set` to
+      `Map`.
+
+      If you intended for the collection to be a set, then remove the map entry,
+      possibly by replacing the colon with a comma if both values should be
+      included in the set:
+
+      ```dart
+      const collection = <String>{'a', 'b'};
+      ```
+  MAP_KEY_TYPE_NOT_ASSIGNABLE:
+    problemMessage: "The element type '{0}' can't be assigned to the map key type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the expression being used as a key
+      1: the type of keys declared for the map
+    documentation: |-
+      #### 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'};
+      ```
+  MAP_VALUE_TYPE_NOT_ASSIGNABLE:
+    problemMessage: "The element type '{0}' can't be assigned to the map value type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the expression being used as a value
+      1: the type of values declared for the map
+    documentation: |-
+      #### 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};
+      ```
+  MISSING_CONST_IN_LIST_LITERAL:
+    problemMessage: "List literals must be prefixed with 'const' when used as a constant expression."
+    correctionMessage: "Try adding the keyword 'const' before the literal."
+    comment: "12.1 Constants: A constant expression is ... a constant list literal."
+  MISSING_CONST_IN_MAP_LITERAL:
+    problemMessage: "Map literals must be prefixed with 'const' when used as a constant expression."
+    correctionMessage: "Try adding the keyword 'const' before the literal."
+    comment: "12.1 Constants: A constant expression is ... a constant map literal."
+  MISSING_CONST_IN_SET_LITERAL:
+    problemMessage: "Set literals must be prefixed with 'const' when used as a constant expression."
+    correctionMessage: "Try adding the keyword 'const' before the literal."
+    comment: "12.1 Constants: A constant expression is ... a constant set literal."
+  MISSING_DART_LIBRARY:
+    problemMessage: "Required library '{0}' is missing."
+    correctionMessage: Re-install the Dart or Flutter SDK.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when either the Dart or Flutter SDK
+      isn’t installed correctly, and, as a result, one of the `dart:` libraries
+      can't be found.
+
+      #### Common fixes
+
+      Reinstall the Dart or Flutter SDK.
+  MISSING_DEFAULT_VALUE_FOR_PARAMETER:
+    problemMessage: "The parameter '{0}' can't have a value of 'null' because of its type, but the implicit default value is 'null'."
+    correctionMessage: "Try adding either an explicit non-'null' default value or the 'required' modifier."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an optional parameter, whether
+      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
+
+      The following code produces this diagnostic because `x` can't be `null`,
+      and no non-`null` default value is specified:
+
+      ```dart
+      void f([int [!x!]]) {}
+      ```
+
+      As does this:
+
+      ```dart
+      void g({int [!x!]}) {}
+      ```
+
+      #### Common fixes
+
+      If you want to use `null` to indicate that no value was provided, then you
+      need to make the type nullable:
+
+      ```dart
+      void f([int? x]) {}
+      void g({int? x}) {}
+      ```
+
+      If the parameter can't be null, then either provide a default value:
+
+      ```dart
+      void f([int x = 1]) {}
+      void g({int x = 2}) {}
+      ```
+
+      or make the parameter a required parameter:
+
+      ```dart
+      void f(int x) {}
+      void g({required int x}) {}
+      ```
+  MISSING_REQUIRED_ARGUMENT:
+    problemMessage: "The named parameter '{0}' is required, but there's no corresponding argument."
+    correctionMessage: Try adding the required argument.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the parameter
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an invocation of a function is
+      missing a required named parameter.
+
+      #### Example
+
+      The following code produces this diagnostic because the invocation of `f`
+      doesn't include a value for the required named parameter `end`:
+
+      ```dart
+      void f(int start, {required int end}) {}
+      void g() {
+        [!f!](3);
+      }
+      ```
+
+      #### Common fixes
+
+      Add a named argument corresponding to the missing required parameter:
+
+      ```dart
+      void f(int start, {required int end}) {}
+      void g() {
+        f(3, end: 5);
+      }
+      ```
+  MIXINS_SUPER_CLASS:
+    problemMessage: "'{0}' can't be used in both 'extends' and 'with' clauses."
+    correctionMessage: Try removing one of the occurrences.
+    comment: |-
+      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
+  MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE:
+    problemMessage: "The super-invoked member '{0}' has the type '{1}', and the concrete member in the class has the type '{2}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the super-invoked member
+      1: the display name of the type of the super-invoked member in the mixin
+      2: the display name of the type of the concrete member in the class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a mixin that invokes a method
+      using `super` is used in a class where the concrete implementation of that
+      method has a different signature than the signature defined for that method
+      by the mixin's `on` type. The reason this is an error is because the
+      invocation in the mixin might invoke the method in a way that's
+      incompatible with the method that will actually be executed.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `C` uses the
+      mixin `M`, the mixin `M` invokes `foo` using `super`, and the abstract
+      version of `foo` declared in `I` (the mixin's `on` type) doesn't have the
+      same signature as the concrete version of `foo` declared in `A`:
+
+      ```dart
+      class I {
+        void foo([int? p]) {}
+      }
+
+      class A {
+        void foo(int p) {}
+      }
+
+      abstract class B extends A implements I {
+        @override
+        void foo([int? p]);
+      }
+
+      mixin M on I {
+        void bar() {
+          super.foo(42);
+        }
+      }
+
+      abstract class C extends B with [!M!] {}
+      ```
+
+      #### Common fixes
+
+      If the class doesn't need to use the mixin, then remove it from the `with`
+      clause:
+
+      ```dart
+      class I {
+        void foo([int? p]) {}
+      }
+
+      class A {
+        void foo(int? p) {}
+      }
+
+      abstract class B extends A implements I {
+        @override
+        void foo([int? p]);
+      }
+
+      mixin M on I {
+        void bar() {
+          super.foo(42);
+        }
+      }
+
+      abstract class C extends B {}
+      ```
+
+      If the class needs to use the mixin, then ensure that there's a concrete
+      implementation of the method that conforms to the signature expected by the
+      mixin:
+
+      ```dart
+      class I {
+        void foo([int? p]) {}
+      }
+
+      class A {
+        void foo(int? p) {}
+      }
+
+      abstract class B extends A implements I {
+        @override
+        void foo([int? p]) {
+          super.foo(p);
+        }
+      }
+
+      mixin M on I {
+        void bar() {
+          super.foo(42);
+        }
+      }
+
+      abstract class C extends B with M {}
+      ```
+  MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE:
+    problemMessage: "'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'."
+    correctionMessage: "Try extending the class '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the display name of the mixin
+      1: the display name of the superclass
+      2: the display name of the type that is not implemented
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a mixin that has a superclass
+      constraint is used in a [mixin application][] with a superclass that
+      doesn't implement the required constraint.
+
+      #### Example
+
+      The following code produces this diagnostic because the mixin `M` requires
+      that the class to which it's applied be a subclass of `A`, but `Object`
+      isn't a subclass of `A`:
+
+      ```dart
+      class A {}
+
+      mixin M on A {}
+
+      class X = Object with [!M!];
+      ```
+
+      #### Common fixes
+
+      If you need to use the mixin, then change the superclass to be either the
+      same as or a subclass of the superclass constraint:
+
+      ```dart
+      class A {}
+
+      mixin M on A {}
+
+      class X = A with M;
+      ```
+  MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER:
+    problemMessage: "The class doesn't have a concrete implementation of the super-invoked member '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the display name of the member without a concrete implementation
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a [mixin application][] contains
+      an invocation of a member from its superclass, and there's no concrete
+      member of that name in the mixin application's superclass.
+
+      #### Example
+
+      The following code produces this diagnostic because the mixin `M` contains
+      the invocation `super.m()`, and the class `A`, which is the superclass of
+      the [mixin application][] `A+M`, doesn't define a concrete implementation
+      of `m`:
+
+      ```dart
+      abstract class A {
+        void m();
+      }
+
+      mixin M on A {
+        void bar() {
+          super.m();
+        }
+      }
+
+      abstract class B extends A with [!M!] {}
+      ```
+
+      #### Common fixes
+
+      If you intended to apply the mixin `M` to a different class, one that has a
+      concrete implementation of `m`, then change the superclass of `B` to that
+      class:
+
+      ```dart
+      abstract class A {
+        void m();
+      }
+
+      mixin M on A {
+        void bar() {
+          super.m();
+        }
+      }
+
+      class C implements A {
+        void m() {}
+      }
+
+      abstract class B extends C with M {}
+      ```
+
+      If you need to make `B` a subclass of `A`, then add a concrete
+      implementation of `m` in `A`:
+
+      ```dart
+      abstract class A {
+        void m() {}
+      }
+
+      mixin M on A {
+        void bar() {
+          super.m();
+        }
+      }
+
+      abstract class B extends A with M {}
+      ```
+  MIXIN_CLASS_DECLARES_CONSTRUCTOR:
+    problemMessage: "The class '{0}' can't be used as a mixin because it declares a constructor."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the mixin that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class is used as a mixin and
+      the mixed-in class defines a constructor.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `A`, which
+      defines a constructor, is being used as a mixin:
+
+      ```dart
+      class A {
+        A();
+      }
+
+      class B with [!A!] {}
+      ```
+
+      #### Common fixes
+
+      If it's possible to convert the class to a mixin, then do so:
+
+      ```dart
+      mixin A {
+      }
+
+      class B with A {}
+      ```
+
+      If the class can't be a mixin and it's possible to remove the constructor,
+      then do so:
+
+      ```dart
+      class A {
+      }
+
+      class B with A {}
+      ```
+
+      If the class can't be a mixin and you can't remove the constructor, then
+      try extending or implementing the class rather than mixing it in:
+
+      ```dart
+      class A {
+        A();
+      }
+
+      class B extends A {}
+      ```
+  MIXIN_DECLARES_CONSTRUCTOR:
+    problemMessage: "Mixins can't declare constructors."
+    comment: |-
+      The <i>mixinMember</i> production allows the same instance or static
+      members that a class would allow, but no constructors (for now).
+  MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES:
+    problemMessage: "Type parameters couldn't be inferred for the mixin '{0}' because the base class implements the mixin's supertype constraint '{1}' in multiple conflicting ways"
+  MIXIN_INFERENCE_NO_MATCHING_CLASS:
+    problemMessage: "Type parameters couldn't be inferred for the mixin '{0}' because the base class doesn't implement the mixin's supertype constraint '{1}'"
+  MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION:
+    problemMessage: "Type parameters couldn't be inferred for the mixin '{0}' because no type parameter substitution could be found matching the mixin's supertype constraints"
+  MIXIN_INHERITS_FROM_NOT_OBJECT:
+    problemMessage: "The class '{0}' can't be used as a mixin because it extends a class other than 'Object'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the mixin that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class that extends a class
+      other than `Object` is used as a mixin.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `B`, which
+      extends `A`, is being used as a mixin by `C`:
+
+      ```dart
+      class A {}
+
+      class B extends A {}
+
+      class C with [!B!] {}
+      ```
+
+      #### Common fixes
+
+      If the class being used as a mixin can be changed to extend `Object`, then
+      change it:
+
+      ```dart
+      class A {}
+
+      class B {}
+
+      class C with B {}
+      ```
+
+      If the class being used as a mixin can't be changed and the class that's
+      using it extends `Object`, then extend the class being used as a mixin:
+
+      ```dart
+      class A {}
+
+      class B extends A {}
+
+      class C extends B {}
+      ```
+
+      If the class doesn't extend `Object` or if you want to be able to mix in
+      the behavior from `B` in other places, then create a real mixin:
+
+      ```dart
+      class A {}
+
+      mixin M on A {}
+
+      class B extends A with M {}
+
+      class C extends A with M {}
+      ```
+  MIXIN_INSTANTIATE:
+    problemMessage: "Mixins can't be instantiated."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a mixin is instantiated.
+
+      #### Example
+
+      The following code produces this diagnostic because the mixin `M` is being
+      instantiated:
+
+      ```dart
+      mixin M {}
+
+      var m = [!M!]();
+      ```
+
+      #### Common fixes
+
+      If you intend to use an instance of a class, then use the name of that
+      class in place of the name of the mixin.
+  MIXIN_OF_NON_CLASS:
+    problemMessage: Classes can only mix in mixins and classes.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name in a `with` clause is
+      defined to be something other than a mixin or a class.
+
+      #### Examples
+
+      The following code produces this diagnostic because `F` is defined to be a
+      function type:
+
+      ```dart
+      typedef F = int Function(String);
+
+      class C with [!F!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the invalid name from the list, possibly replacing it with the name
+      of the intended mixin or class:
+
+      ```dart
+      typedef F = int Function(String);
+
+      class C {}
+      ```
+  MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS:
+    problemMessage: "Deferred classes can't be used as super-class constraints."
+    correctionMessage: Try changing the import to not be deferred.
+    comment: No parameters.
+  MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE:
+    problemMessage: Only classes and mixins can be used as superclass constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type following the `on`
+      keyword in a mixin declaration is neither a class nor a mixin.
+
+      #### Examples
+
+      The following code produces this diagnostic because `F` is neither a class
+      nor a mixin:
+
+      ```dart
+      typedef F = void Function();
+
+      mixin M on [!F!] {}
+      ```
+
+      #### Common fixes
+
+      If the type was intended to be a class but was mistyped, then replace the
+      name.
+
+      Otherwise, remove the type from the `on` clause.
+  MIXIN_WITH_NON_CLASS_SUPERCLASS:
+    problemMessage: Mixin can only be applied to class.
+    comment: |-
+      9.1 Mixin Application: It is a compile-time error if <i>S</i> does not
+      denote a class available in the immediately enclosing scope.
+  MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS:
+    problemMessage: "Constructors can have at most one 'this' redirection."
+    correctionMessage: Try removing all but one of the redirections.
+    comment: |-
+      7.6.1 Generative Constructors: A generative constructor may be redirecting,
+      in which case its only action is to invoke another generative constructor.
+  MULTIPLE_SUPER_INITIALIZERS:
+    problemMessage: "A constructor can have at most one 'super' initializer."
+    correctionMessage: "Try removing all but one of the 'super' initializers."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the initializer list of a
+      constructor contains more than one invocation of a constructor from the
+      superclass. The initializer list is required to have exactly one such call,
+      which can either be explicit or implicit.
+
+      #### Example
+
+      The following code produces this diagnostic because the initializer list
+      for `B`’s constructor invokes both the constructor `one` and the
+      constructor `two` from the superclass `A`:
+
+      ```dart
+      class A {
+        int? x;
+        String? s;
+        A.one(this.x);
+        A.two(this.s);
+      }
+
+      class B extends A {
+        B() : super.one(0), [!super.two('')!];
+      }
+      ```
+
+      #### Common fixes
+
+      If one of the super constructors will initialize the instance fully, then
+      remove the other:
+
+      ```dart
+      class A {
+        int? x;
+        String? s;
+        A.one(this.x);
+        A.two(this.s);
+      }
+
+      class B extends A {
+        B() : super.one(0);
+      }
+      ```
+
+      If the initialization achieved by one of the super constructors can be
+      performed in the body of the constructor, then remove its super invocation
+      and perform the initialization in the body:
+
+      ```dart
+      class A {
+        int? x;
+        String? s;
+        A.one(this.x);
+        A.two(this.s);
+      }
+
+      class B extends A {
+        B() : super.one(0) {
+          s = '';
+        }
+      }
+      ```
+
+      If the initialization can only be performed in a constructor in the
+      superclass, then either add a new constructor or modify one of the existing
+      constructors so there's a constructor that allows all the required
+      initialization to occur in a single call:
+
+      ```dart
+      class A {
+        int? x;
+        String? s;
+        A.one(this.x);
+        A.two(this.s);
+        A.three(this.x, this.s);
+      }
+
+      class B extends A {
+        B() : super.three(0, '');
+      }
+      ```
+  NEW_WITH_UNDEFINED_CONSTRUCTOR:
+    problemMessage: "The class '{0}' doesn't have a constructor named '{1}'."
+    correctionMessage: "Try invoking a different constructor, or define a constructor named '{1}'."
+    comment: |-
+      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>.
+  NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT:
+    problemMessage: "The class '{0}' doesn't have an unnamed constructor."
+    correctionMessage: "Try using one of the named constructors defined in '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class being instantiated
+    documentation: |-
+      #### 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();
+      ```
+  NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS:
+    sharedName: NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+    problemMessage: "Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and {4} more."
+    correctionMessage: Try implementing the missing methods, or make the class abstract.
+    hasPublishedDocs: true
+    comment: |-
+      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
+  NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR:
+    sharedName: NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+    problemMessage: "Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'."
+    correctionMessage: Try implementing the missing methods, or make the class abstract.
+    hasPublishedDocs: true
+    comment: |-
+      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
+  NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE:
+    sharedName: NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+    problemMessage: "Missing concrete implementation of '{0}'."
+    correctionMessage: Try implementing the missing method, or make the class abstract.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+    documentation: |-
+      #### 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 {}
+      ```
+  NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE:
+    sharedName: NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+    problemMessage: "Missing concrete implementations of '{0}', '{1}', and '{2}'."
+    correctionMessage: Try implementing the missing methods, or make the class abstract.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the first member
+      1: the name of the second member
+      2: the name of the third member
+  NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO:
+    sharedName: NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+    problemMessage: "Missing concrete implementations of '{0}' and '{1}'."
+    correctionMessage: Try implementing the missing methods, or make the class abstract.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the first member
+      1: the name of the second member
+  NON_BOOL_CONDITION:
+    problemMessage: "Conditions must have a static type of 'bool'."
+    correctionMessage: Try changing the condition.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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) {
+          // ...
+        }
+      }
+      ```
+  NON_BOOL_EXPRESSION:
+    problemMessage: "The expression in an assert must be of type 'bool'."
+    correctionMessage: Try changing the expression.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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);
+      }
+      ```
+  NON_BOOL_NEGATION_EXPRESSION:
+    problemMessage: "A negation operand must have a static type of 'bool'."
+    correctionMessage: "Try changing the operand to the '!' operator."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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);
+      ```
+  NON_BOOL_OPERAND:
+    problemMessage: "The operands of the operator '{0}' must be assignable to 'bool'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the lexeme of the logical operator
+    documentation: |-
+      #### 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;
+      ```
+  NON_CONSTANT_ANNOTATION_CONSTRUCTOR:
+    problemMessage: Annotation creation can only call a const constructor.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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.
+  NON_CONSTANT_CASE_EXPRESSION:
+    problemMessage: Case expressions must be constant.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the expression in a `case`
+      clause isn't a constant expression.
+
+      #### Examples
+
+      The following code produces this diagnostic because `j` isn't a constant:
+
+      ```dart
+      void f(int i, int j) {
+        switch (i) {
+          case [!j!]:
+            // ...
+            break;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Either make the expression a constant expression, or rewrite the `switch`
+      statement as a sequence of `if` statements:
+
+      ```dart
+      void f(int i, int j) {
+        if (i == j) {
+          // ...
+        }
+      }
+      ```
+  NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used as a case expression."
+    correctionMessage: Try re-writing the switch as a series of if statements, or changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the expression in a case clause
+      references a constant from a library that is imported using a deferred
+      import. In order for switch statements to be compiled efficiently, the
+      constants referenced in case clauses need to be available at compile time,
+      and constants from deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines the constant `zero`:
+
+      ```dart
+      %uri="lib/a.dart"
+      const zero = 0;
+      ```
+
+      The following code produces this diagnostic because the library `a.dart` is
+      imported using a `deferred` import, and the constant `a.zero`, declared in
+      the imported library, is used in a case clause:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      void f(int x) {
+        switch (x) {
+          case [!a.zero!]:
+            // ...
+            break;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If you need to reference the constant from the imported library, then
+      remove the `deferred` keyword:
+
+      ```dart
+      import 'a.dart' as a;
+
+      void f(int x) {
+        switch (x) {
+          case a.zero:
+            // ...
+            break;
+        }
+      }
+      ```
+
+      If you need to reference the constant from the imported library and also
+      need the imported library to be deferred, then rewrite the switch statement
+      as a sequence of `if` statements:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      void f(int x) {
+        if (x == a.zero) {
+          // ...
+        }
+      }
+      ```
+
+      If you don't need to reference the constant, then replace the case
+      expression:
+
+      ```dart
+      void f(int x) {
+        switch (x) {
+          case 0:
+            // ...
+            break;
+        }
+      }
+      ```
+  NON_CONSTANT_DEFAULT_VALUE:
+    problemMessage: The default value of an optional parameter must be constant.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an optional parameter, either
+      named or positional, has a default value that isn't a compile-time
+      constant.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      %language=2.9
+      var defaultValue = 3;
+
+      void f([int value = [!defaultValue!]]) {}
+      ```
+
+      #### Common fixes
+
+      If the default value can be converted to be a constant, then convert it:
+
+      ```dart
+      %language=2.9
+      const defaultValue = 3;
+
+      void f([int value = defaultValue]) {}
+      ```
+
+      If the default value needs to change over time, then apply the default
+      value inside the function:
+
+      ```dart
+      %language=2.9
+      var defaultValue = 3;
+
+      void f([int value]) {
+        value ??= defaultValue;
+      }
+      ```
+  NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be used as a default parameter value."
+    correctionMessage: Try leaving the default as null and initializing the parameter inside the function body.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the default value of an optional
+      parameter uses a constant from a library imported using a deferred import.
+      Default values need to be available at compile time, and constants from
+      deferred libraries aren't available at compile time.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines the constant `zero`:
+
+      ```dart
+      %uri="lib/a.dart"
+      const zero = 0;
+      ```
+
+      The following code produces this diagnostic because `zero` is declared in a
+      library imported using a deferred import:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      void f({int x = [!a.zero!]}) {}
+      ```
+
+      #### Common fixes
+
+      If you need to reference the constant from the imported library, then
+      remove the `deferred` keyword:
+
+      ```dart
+      import 'a.dart' as a;
+
+      void f({int x = a.zero}) {}
+      ```
+
+      If you don't need to reference the constant, then replace the default
+      value:
+
+      ```dart
+      void f({int x = 0}) {}
+      ```
+  NON_CONSTANT_LIST_ELEMENT:
+    problemMessage: The values in a const list literal must be constants.
+    correctionMessage: "Try removing the keyword 'const' from the list literal."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      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][]).
+
+      #### Examples
+
+      The following code produces this diagnostic because `x` isn't a constant,
+      even though it appears in an implicitly constant list literal:
+
+      ```dart
+      var x = 2;
+      var y = const <int>[0, 1, [!x!]];
+      ```
+
+      #### Common fixes
+
+      If the list needs to be a constant list, then convert the element to be a
+      constant. In the example above, you might add the `const` keyword to the
+      declaration of `x`:
+
+      ```dart
+      const x = 2;
+      var y = const <int>[0, 1, x];
+      ```
+
+      If the expression can't be made a constant, then the list can't be a
+      constant either, so you must change the code so that the list isn't a
+      constant. In the example above this means removing the `const` keyword
+      before the list literal:
+
+      ```dart
+      var x = 2;
+      var y = <int>[0, 1, x];
+      ```
+  NON_CONSTANT_MAP_ELEMENT:
+    problemMessage: The elements in a const map literal must be constant.
+    correctionMessage: "Try removing the keyword 'const' from the map literal."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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};
+      ```
+  NON_CONSTANT_MAP_KEY:
+    problemMessage: The keys in a const map literal must be constant.
+    correctionMessage: "Try removing the keyword 'const' from the map literal."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a key in a constant map literal
+      isn't a constant value.
+
+      #### Examples
+
+      The following code produces this diagnostic beause `a` isn't a constant:
+
+      ```dart
+      var a = 'a';
+      var m = const {[!a!]: 0};
+      ```
+
+      #### Common fixes
+
+      If the map needs to be a constant map, then make the key a constant:
+
+      ```dart
+      const a = 'a';
+      var m = const {a: 0};
+      ```
+
+      If the map doesn't need to be a constant map, then remove the `const`
+      keyword:
+
+      ```dart
+      var a = 'a';
+      var m = {a: 0};
+      ```
+  NON_CONSTANT_MAP_VALUE:
+    problemMessage: The values in a const map literal must be constant.
+    correctionMessage: "Try removing the keyword 'const' from the map literal."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a value in a constant map
+      literal isn't a constant value.
+
+      #### Examples
+
+      The following code produces this diagnostic because `a` isn't a constant:
+
+      ```dart
+      var a = 'a';
+      var m = const {0: [!a!]};
+      ```
+
+      #### Common fixes
+
+      If the map needs to be a constant map, then make the key a constant:
+
+      ```dart
+      const a = 'a';
+      var m = const {0: a};
+      ```
+
+      If the map doesn't need to be a constant map, then remove the `const`
+      keyword:
+
+      ```dart
+      var a = 'a';
+      var m = {0: a};
+      ```
+  NON_CONSTANT_SET_ELEMENT:
+    problemMessage: The values in a const set literal must be constants.
+    correctionMessage: "Try removing the keyword 'const' from the set literal."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constant set literal contains
+      an element that isn't a compile-time constant.
+
+      #### Examples
+
+      The following code produces this diagnostic because `i` isn't a constant:
+
+      ```dart
+      var i = 0;
+
+      var s = const {[!i!]};
+      ```
+
+      #### Common fixes
+
+      If the element can be changed to be a constant, then change it:
+
+      ```dart
+      const i = 0;
+
+      var s = const {i};
+      ```
+
+      If the element can't be a constant, then remove the keyword `const`:
+
+      ```dart
+      var i = 0;
+
+      var s = {i};
+      ```
+  NON_CONST_MAP_AS_EXPRESSION_STATEMENT:
+    problemMessage: "A non-constant map or set literal without type arguments can't be used as an expression statement."
+    comment: |-
+      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.
+  NON_GENERATIVE_CONSTRUCTOR:
+    problemMessage: "The generative constructor '{0}' is expected, but a factory was found."
+    correctionMessage: Try calling a different constructor of the superclass, or making the called constructor not be a factory constructor.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the non-generative constructor
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the initializer list of a
+      constructor invokes a constructor from the superclass, and the invoked
+      constructor is a factory constructor. Only a generative constructor can be
+      invoked in the initializer list.
+
+      #### Example
+
+      The following code produces this diagnostic because the invocation of the
+      constructor `super.one()` is invoking a factory constructor:
+
+      ```dart
+      class A {
+        factory A.one() = B;
+        A.two();
+      }
+
+      class B extends A {
+        B() : [!super.one()!];
+      }
+      ```
+
+      #### Common fixes
+
+      Change the super invocation to invoke a generative constructor:
+
+      ```dart
+      class A {
+        factory A.one() = B;
+        A.two();
+      }
+
+      class B extends A {
+        B() : super.two();
+      }
+      ```
+
+      If the generative constructor is the unnamed constructor, and if there are
+      no arguments being passed to it, then you can remove the super invocation.
+  NON_GENERATIVE_IMPLICIT_CONSTRUCTOR:
+    problemMessage: "The unnamed constructor of superclass '{0}' (called by the default constructor of '{1}') must be a generative constructor, but factory found."
+    correctionMessage: "Try adding an explicit constructor that has a different superinitializer or changing the superclass constructor '{2}' to not be a factory constructor."
+    comment: |-
+      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
+  NON_SYNC_FACTORY:
+    problemMessage: "Factory bodies can't use 'async', 'async*', or 'sync*'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the body of a factory
+      constructor is marked with `async`, `async*`, or `sync*`. All constructors,
+      including factory constructors, are required to return an instance of the
+      class in which they're declared, not a `Future`, `Stream`, or `Iterator`.
+
+      #### Example
+
+      The following code produces this diagnostic because the body of the factory
+      constructor is marked with `async`:
+
+      ```dart
+      class C {
+        factory C() [!async!] {
+          return C._();
+        }
+        C._();
+      }
+      ```
+
+      #### Common fixes
+
+      If the member must be declared as a factory constructor, then remove the
+      keyword appearing before the body:
+
+      ```dart
+      class C {
+        factory C() {
+          return C._();
+        }
+        C._();
+      }
+      ```
+
+      If the member must return something other than an instance of the enclosing
+      class, then make the member a static method:
+
+      ```dart
+      class C {
+        static Future<C> m() async {
+          return C._();
+        }
+        C._();
+      }
+      ```
+  NON_TYPE_AS_TYPE_ARGUMENT:
+    problemMessage: "The name '{0}' isn't a type so it can't be used as a type argument."
+    correctionMessage: "Try correcting the name to an existing type, or defining a type named '{0}'."
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name appearing where a type is expected
+    documentation: |-
+      #### 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 = [];
+      ```
+  NON_TYPE_IN_CATCH_CLAUSE:
+    problemMessage: "The name '{0}' isn't a type and can't be used in an on-catch clause."
+    correctionMessage: Try correcting the name to match an existing class.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the non-type element
+    documentation: |-
+      #### 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
+      %language=2.9
+      void f() {
+        try {
+          // ...
+        } on [!f!] {
+          // ...
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Change the name to the type of object that should be caught:
+
+      ```dart
+      %language=2.9
+      void f() {
+        try {
+          // ...
+        } on FormatException {
+          // ...
+        }
+      }
+      ```
+  NON_VOID_RETURN_FOR_OPERATOR:
+    problemMessage: "The return type of the operator []= must be 'void'."
+    correctionMessage: "Try changing the return type to 'void'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a declaration of the operator
+      `[]=` has a return type other than `void`.
+
+      #### Example
+
+      The following code produces this diagnostic because the declaration of the
+      operator `[]=` has a return type of `int`:
+
+      ```dart
+      class C {
+        [!int!] operator []=(int index, int value) => 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Change the return type to `void`:
+
+      ```dart
+      class C {
+        void operator []=(int index, int value) => 0;
+      }
+      ```
+  NON_VOID_RETURN_FOR_SETTER:
+    problemMessage: "The return type of the setter must be 'void' or absent."
+    correctionMessage: Try removing the return type, or define a method rather than a setter.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a setter is defined with a
+      return type other than `void`.
+
+      #### Example
+
+      The following code produces this diagnostic because the setter `p` has a
+      return type of `int`:
+
+      ```dart
+      class C {
+        [!int!] set p(int i) => 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Change the return type to `void` or omit the return type:
+
+      ```dart
+      class C {
+        set p(int i) => 0;
+      }
+      ```
+  NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE:
+    problemMessage: "The non-nullable local variable '{0}' must be assigned before it can be used."
+    correctionMessage: "Try giving it an initializer expression, or ensure that it's assigned on every execution path."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the variable that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a local variable is referenced
+      and has all these characteristics:
+      - 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
+        the reference based on the specification of [definite assignment][].
+
+      #### Example
+
+      The following code produces this diagnostic because `x` can't have a value
+      of `null`, but is referenced before a value was assigned to it:
+
+      ```dart
+      String f() {
+        int x;
+        return [!x!].toString();
+      }
+      ```
+
+      The following code produces this diagnostic because the assignment to `x`
+      might not be executed, so it might have a value of `null`:
+
+      ```dart
+      int g(bool b) {
+        int x;
+        if (b) {
+          x = 1;
+        }
+        return [!x!] * 2;
+      }
+      ```
+
+      The following code produces this diagnostic because the analyzer can't
+      prove, based on definite assignment analysis, that `x` won't be referenced
+      without having a value assigned to it:
+
+      ```dart
+      int h(bool b) {
+        int x;
+        if (b) {
+          x = 1;
+        }
+        if (b) {
+          return [!x!] * 2;
+        }
+        return 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If `null` is a valid value, then make the variable nullable:
+
+      ```dart
+      String f() {
+        int? x;
+        return x!.toString();
+      }
+      ```
+
+      If `null` isn’t a valid value, and there's a reasonable default value, then
+      add an initializer:
+
+      ```dart
+      int g(bool b) {
+        int x = 2;
+        if (b) {
+          x = 1;
+        }
+        return x * 2;
+      }
+      ```
+
+      Otherwise, ensure that a value was assigned on every possible code path
+      before the value is accessed:
+
+      ```dart
+      int g(bool b) {
+        int x;
+        if (b) {
+          x = 1;
+        } else {
+          x = 2;
+        }
+        return x * 2;
+      }
+      ```
+
+      You can also mark the variable as `late`, which removes the diagnostic, but
+      if the variable isn't assigned a value before it's accessed, then it
+      results in an exception being thrown at runtime. This approach should only
+      be used if you're sure that the variable will always be assigned, even
+      though the analyzer can't prove it based on definite assignment analysis.
+
+      ```dart
+      int h(bool b) {
+        late int x;
+        if (b) {
+          x = 1;
+        }
+        if (b) {
+          return x * 2;
+        }
+        return 0;
+      }
+      ```
+  NOT_A_TYPE:
+    problemMessage: "{0} isn't a type."
+    correctionMessage: Try correcting the name to match an existing type.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name that is not a type
+    documentation: |-
+      #### 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.
+  NOT_BINARY_OPERATOR:
+    problemMessage: "'{0}' isn't a binary operator."
+    comment: |-
+      Parameters:
+      0: the name of the operator that is not a binary operator.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an operator that can only be
+      used as a unary operator is used as a binary operator.
+
+      #### Example
+
+      The following code produces this diagnostic because the operator `~` can
+      only be used as a unary operator:
+
+      ```dart
+      var a = 5 [!~!] 3;
+      ```
+
+      #### Common fixes
+
+      Replace the operator with the correct binary operator:
+
+      ```dart
+      var a = 5 - 3;
+      ```
+  NOT_ENOUGH_POSITIONAL_ARGUMENTS:
+    problemMessage: "{0} positional argument(s) expected, but {1} found."
+    correctionMessage: Try adding the missing arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the expected number of required arguments
+      1: the actual number of positional arguments given
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function invocation
+      has fewer positional arguments than the number of required positional
+      parameters.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` declares two
+      required parameters, but only one argument is provided:
+
+      ```dart
+      void f(int a, int b) {}
+      void g() {
+        f[!(0)!];
+      }
+      ```
+
+      #### Common fixes
+
+      Add arguments corresponding to the remaining parameters:
+
+      ```dart
+      void f(int a, int b) {}
+      void g() {
+        f(0, 1);
+      }
+      ```
+  NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD:
+    problemMessage: "Non-nullable instance field '{0}' must be initialized."
+    correctionMessage: "Try adding an initializer expression, or a generative constructor that initializes it, or mark it 'late'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field that is not initialized
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a field is declared and has all
+      these characteristics:
+      - Has a type that's [potentially non-nullable][]
+      - Doesn't have an initializer
+      - Isn't marked as `late`
+
+      #### Example
+
+      The following code produces this diagnostic because `x` is implicitly
+      initialized to `null` when it isn't allowed to be `null`:
+
+      ```dart
+      class C {
+        int [!x!];
+      }
+      ```
+
+      Similarly, the following code produces this diagnostic because `x` is
+      implicitly initialized to `null`, when it isn't allowed to be `null`, by
+      one of the constructors, even though it's initialized by other
+      constructors:
+
+      ```dart
+      class C {
+        int x;
+
+        C(this.x);
+
+        [!C!].n();
+      }
+      ```
+
+      #### Common fixes
+
+      If there's a reasonable default value for the field that’s the same for all
+      instances, then add an initializer expression:
+
+      ```dart
+      class C {
+        int x = 0;
+      }
+      ```
+
+      If the value of the field should be provided when an instance is created,
+      then add a constructor that sets the value of the field or update an
+      existing constructor:
+
+      ```dart
+      class C {
+        int x;
+
+        C(this.x);
+      }
+      ```
+
+      You can also mark the field as `late`, which removes the diagnostic, but if
+      the field isn't assigned a value before it's accessed, then it results in
+      an exception being thrown at runtime. This approach should only be used if
+      you're sure that the field will always be assigned before it's referenced.
+
+      ```dart
+      class C {
+        late int x;
+      }
+      ```
+  NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR:
+    sharedName: NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD
+    problemMessage: "Non-nullable instance field '{0}' must be initialized."
+    correctionMessage: "Try adding an initializer expression, or add a field initializer in this constructor, or mark it 'late'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the field that is not initialized
+  NOT_INITIALIZED_NON_NULLABLE_VARIABLE:
+    problemMessage: "The non-nullable variable '{0}' must be initialized."
+    correctionMessage: Try adding an initializer expression.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the variable that is invalid
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a static field or top-level
+      variable has a type that's non-nullable and doesn't have an initializer.
+      Fields and variables that don't have an initializer are normally
+      initialized to `null`, but the type of the field or variable doesn't allow
+      it to be set to `null`, so an explicit initializer must be provided.
+
+      #### Example
+
+      The following code produces this diagnostic because the field `f` can't be
+      initialized to `null`:
+
+      ```dart
+      class C {
+        static int [!f!];
+      }
+      ```
+
+      Similarly, the following code produces this diagnostic because the
+      top-level variable `v` can't be initialized to `null`:
+
+      ```dart
+      int [!v!];
+      ```
+
+      #### Common fixes
+
+      If the field or variable can't be initialized to `null`, then add an
+      initializer that sets it to a non-null value:
+
+      ```dart
+      class C {
+        static int f = 0;
+      }
+      ```
+
+      If the field or variable should be initialized to `null`, then change the
+      type to be nullable:
+
+      ```dart
+      int? v;
+      ```
+
+      If the field or variable can't be initialized in the declaration but will
+      always be initialized before it's referenced, then mark it as being `late`:
+
+      ```dart
+      class C {
+        static late int f;
+      }
+      ```
+  NOT_INSTANTIATED_BOUND:
+    problemMessage: Type parameter bound types must be instantiated.
+    correctionMessage: Try adding type arguments to the type parameter bound.
+    comment: No parameters.
+  NOT_ITERABLE_SPREAD:
+    problemMessage: "Spread elements in list or set literals must implement 'Iterable'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the static type of the
+      expression of a spread element that appears in either a list literal or a
+      set literal doesn't implement the type `Iterable`.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      var m = <String, int>{'a': 0, 'b': 1};
+      var s = <String>{...[!m!]};
+      ```
+
+      #### Common fixes
+
+      The most common fix is to replace the expression with one that produces an
+      iterable object:
+
+      ```dart
+      var m = <String, int>{'a': 0, 'b': 1};
+      var s = <String>{...m.keys};
+      ```
+  NOT_MAP_SPREAD:
+    problemMessage: "Spread elements in map literals must implement 'Map'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the static type of the
+      expression of a spread element that appears in a map literal doesn't
+      implement the type `Map`.
+
+      #### Examples
+
+      The following code produces this diagnostic because `l` isn't a `Map`:
+
+      ```dart
+      var l =  <String>['a', 'b'];
+      var m = <int, String>{...[!l!]};
+      ```
+
+      #### Common fixes
+
+      The most common fix is to replace the expression with one that produces a
+      map:
+
+      ```dart
+      var l =  <String>['a', 'b'];
+      var m = <int, String>{...l.asMap()};
+      ```
+  NOT_NULL_AWARE_NULL_SPREAD:
+    problemMessage: "The Null typed expression can't be used with a non-null-aware spread."
+    comment: No parameters.
+  NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS:
+    problemMessage: Annotation creation must have arguments.
+    correctionMessage: Try adding an empty argument list.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an annotation consists of a
+      single identifier, but that identifier is the name of a class rather than a
+      variable. To create an instance of the class, the identifier must be
+      followed by an argument list.
+
+      #### Examples
+
+      The following code produces this diagnostic because `C` is a class, and a
+      class can't be used as an annotation without invoking a `const` constructor
+      from the class:
+
+      ```dart
+      class C {
+        const C();
+      }
+
+      [!@C!]
+      var x;
+      ```
+
+      #### Common fixes
+
+      Add the missing argument list:
+
+      ```dart
+      class C {
+        const C();
+      }
+
+      @C()
+      var x;
+      ```
+  NO_COMBINED_SUPER_SIGNATURE:
+    problemMessage: "Can't infer missing types in '{0}' from overridden methods: {1}."
+    correctionMessage: "Try providing explicit types for this method's parameters and return type."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class where override error was detected
+      1: the list of candidate signatures which cannot be combined
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there is a method declaration
+      for which one or more types needs to be inferred, and those types can't be
+      inferred because none of the overridden methods has a function type that is
+      a supertype of all the other overridden methods, as specified by
+      [override inference][].
+
+      #### Example
+
+      The following code produces this diagnostic because the method `m` declared
+      in the class `C` is missing both the return type and the type of the
+      parameter `a`, and neither of the missing types can be inferred for it:
+
+      ```dart
+      abstract class A {
+        A m(String a);
+      }
+
+      abstract class B {
+        B m(int a);
+      }
+
+      abstract class C implements A, B {
+        [!m!](a);
+      }
+      ```
+
+      In this example, override inference can't be performed because the
+      overridden methods are incompatible in these ways:
+      - Neither parameter type (`String` and `int`) is a supertype of the other.
+      - Neither return type is a subtype of the other.
+
+      #### Common fixes
+
+      If possible, add types to the method in the subclass that are consistent
+      with the types from all the overridden methods:
+
+      ```dart
+      abstract class A {
+        A m(String a);
+      }
+
+      abstract class B {
+        B m(int a);
+      }
+
+      abstract class C implements A, B {
+        C m(Object a);
+      }
+      ```
+  NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT:
+    sharedName: NO_DEFAULT_SUPER_CONSTRUCTOR
+    problemMessage: "The superclass '{0}' doesn't have a zero argument constructor."
+    correctionMessage: "Try declaring a zero argument constructor in '{0}', or explicitly invoking a different constructor in '{0}'."
+    comment: |-
+      Parameters:
+      0: the name of the superclass that does not define an implicitly invoked
+         constructor
+  NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT:
+    sharedName: NO_DEFAULT_SUPER_CONSTRUCTOR
+    problemMessage: "The superclass '{0}' doesn't have a zero argument constructor."
+    correctionMessage: "Try declaring a zero argument constructor in '{0}', or declaring a constructor in {1} that explicitly invokes a constructor in '{0}'."
+    comment: |-
+      Parameters:
+      0: the name of the superclass that does not define an implicitly invoked
+         constructor
+      1: the name of the subclass that does not contain any explicit constructors
+  NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS:
+    problemMessage: "The class '{0}' cannot extend '{1}' because '{1}' only has factory constructors (no generative constructors), and '{0}' has at least one generative constructor."
+    correctionMessage: "Try implementing the class instead, adding a generative (not factory) constructor to the superclass {0}, or a factory constructor to the subclass."
+    comment: |-
+      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.
+
+      Parameters:
+      0: the name of the subclass
+      1: the name of the superclass
+  NULLABLE_TYPE_IN_EXTENDS_CLAUSE:
+    problemMessage: "A class can't extend a nullable type."
+    correctionMessage: Try removing the question mark.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class declaration uses an
+      `extends` clause to specify a superclass, and the superclass is followed by
+      a `?`.
+
+      It isn't valid to specify a nullable superclass because doing so would have
+      no meaning; it wouldn't change either the interface or implementation being
+      inherited by the class containing the `extends` clause.
+
+      Note, however, that it _is_ valid to use a nullable type as a type argument
+      to the superclass, such as `class A extends B<C?> {}`.
+
+      #### Example
+
+      The following code produces this diagnostic because `A?` is a nullable
+      type, and nullable types can't be used in an `extends` clause:
+
+      ```dart
+      class A {}
+      class B extends [!A?!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the question mark from the type:
+
+      ```dart
+      class A {}
+      class B extends A {}
+      ```
+  NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE:
+    problemMessage: "A class or mixin can't implement a nullable type."
+    correctionMessage: Try removing the question mark.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class or mixin declaration has
+      an `implements` clause, and an interface is followed by a `?`.
+
+      It isn't valid to specify a nullable interface because doing so would have
+      no meaning; it wouldn't change the interface being inherited by the class
+      containing the `implements` clause.
+
+      Note, however, that it _is_ valid to use a nullable type as a type argument
+      to the interface, such as `class A implements B<C?> {}`.
+
+
+      #### Example
+
+      The following code produces this diagnostic because `A?` is a nullable
+      type, and nullable types can't be used in an `implements` clause:
+
+      ```dart
+      class A {}
+      class B implements [!A?!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the question mark from the type:
+
+      ```dart
+      class A {}
+      class B implements A {}
+      ```
+  NULLABLE_TYPE_IN_ON_CLAUSE:
+    problemMessage: "A mixin can't have a nullable type as a superclass constraint."
+    correctionMessage: Try removing the question mark.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a mixin declaration uses an `on`
+      clause to specify a superclass constraint, and the class that's specified
+      is followed by a `?`.
+
+      It isn't valid to specify a nullable superclass constraint because doing so
+      would have no meaning; it wouldn't change the interface being depended on
+      by the mixin containing the `on` clause.
+
+      Note, however, that it _is_ valid to use a nullable type as a type argument
+      to the superclass constraint, such as `mixin A on B<C?> {}`.
+
+
+      #### Example
+
+      The following code produces this diagnostic because `A?` is a nullable type
+      and nullable types can't be used in an `on` clause:
+
+      ```dart
+      class C {}
+      mixin M on [!C?!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the question mark from the type:
+
+      ```dart
+      class C {}
+      mixin M on C {}
+      ```
+  NULLABLE_TYPE_IN_WITH_CLAUSE:
+    problemMessage: "A class or mixin can't mix in a nullable type."
+    correctionMessage: Try removing the question mark.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class or mixin declaration has
+      a `with` clause, and a mixin is followed by a `?`.
+
+      It isn't valid to specify a nullable mixin because doing so would have no
+      meaning; it wouldn't change either the interface or implementation being
+      inherited by the class containing the `with` clause.
+
+      Note, however, that it _is_ valid to use a nullable type as a type argument
+      to the mixin, such as `class A with B<C?> {}`.
+
+      #### Example
+
+      The following code produces this diagnostic because `A?` is a nullable
+      type, and nullable types can't be used in a `with` clause:
+
+      ```dart
+      mixin M {}
+      class C with [!M?!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the question mark from the type:
+
+      ```dart
+      mixin M {}
+      class C with M {}
+      ```
+  OBJECT_CANNOT_EXTEND_ANOTHER_CLASS:
+    problemMessage: "The class 'Object' can't extend any other class."
+    comment: |-
+      7.9 Superclasses: It is a compile-time error to specify an extends clause
+      for class Object.
+  ON_REPEATED:
+    problemMessage: "The type '{0}' can be included in the superclass constraints only once."
+    correctionMessage: Try removing all except one occurrence of the type name.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the interface that is implemented more than once
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the same type is listed in the
+      superclass constraints of a mixin multiple times.
+
+      #### Example
+
+      The following code produces this diagnostic because `A` is included twice
+      in the superclass constraints for `M`:
+
+      ```dart
+      mixin M on A, [!A!] {
+      }
+
+      class A {}
+      class B {}
+      ```
+
+      #### Common fixes
+
+      If a different type should be included in the superclass constraints, then
+      replace one of the occurrences with the other type:
+
+      ```dart
+      mixin M on A, B {
+      }
+
+      class A {}
+      class B {}
+      ```
+
+      If no other type was intended, then remove the repeated type name:
+
+      ```dart
+      mixin M on A {
+      }
+
+      class A {}
+      class B {}
+      ```
+  OPTIONAL_PARAMETER_IN_OPERATOR:
+    problemMessage: "Optional parameters aren't allowed when defining an operator."
+    correctionMessage: Try removing the optional parameters.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when one or more of the parameters in
+      an operator declaration are optional.
+
+      #### Example
+
+      The following code produces this diagnostic because the parameter `other`
+      is an optional parameter:
+
+      ```dart
+      class C {
+        C operator +([[!C? other!]]) => this;
+      }
+      ```
+
+      #### Common fixes
+
+      Make all of the parameters be required parameters:
+
+      ```dart
+      class C {
+        C operator +(C other) => this;
+      }
+      ```
+  PART_OF_DIFFERENT_LIBRARY:
+    problemMessage: "Expected this library to be part of '{0}', not '{1}'."
+    correctionMessage: "Try including a different part, or changing the name of the library in the part's part-of directive."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of expected library name
+      1: the non-matching actual library name from the "part of" declaration
+    documentation: |-
+      #### 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.
+  PART_OF_NON_PART:
+    problemMessage: "The included part '{0}' must have a part-of directive."
+    correctionMessage: "Try adding a part-of directive to '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the uri pointing to a non-library declaration
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a part directive is found and
+      the referenced file doesn't have a part-of directive.
+
+      #### Examples
+
+      Given a file (`a.dart`) containing:
+
+      ```dart
+      %uri="lib/a.dart"
+      class A {}
+      ```
+
+      The following code produces this diagnostic because `a.dart` doesn't
+      contain a part-of directive:
+
+      ```dart
+      part [!'a.dart'!];
+      ```
+
+      #### Common fixes
+
+      If the referenced file is intended to be a part of another library, then
+      add a part-of directive to the file:
+
+      ```dart
+      part of 'test.dart';
+
+      class A {}
+      ```
+
+      If the referenced file is intended to be a library, then replace the part
+      directive with an import directive:
+
+      ```dart
+      import 'a.dart';
+      ```
+  PART_OF_UNNAMED_LIBRARY:
+    problemMessage: "The library is unnamed. A URI is expected, not a library name '{0}', in the part-of directive."
+    correctionMessage: Try changing the part-of directive to a URI, or try including a different part.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the URI of the expected library
+      1: the non-matching actual library name from the "part of" declaration
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library that doesn't have a
+      `library` directive (and hence has no name) contains a `part` directive and
+      the `part of` directive in the part file uses a name to specify the library
+      that it's a part of.
+
+      #### Example
+
+      Given a part file named `part_file.dart` containing the following code:
+
+      ```dart
+      %uri="lib/part_file.dart"
+      part of lib;
+      ```
+
+      The following code produces this diagnostic because the library including
+      the part file doesn't have a name even though the part file uses a name to
+      specify which library it's a part of:
+
+      ```dart
+      part [!'part_file.dart'!];
+      ```
+
+      #### Common fixes
+
+      Change the `part of` directive in the part file to specify its library by
+      URI:
+
+      ```dart
+      part of 'test.dart';
+      ```
+  PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER:
+    problemMessage: "The name '{0}' is already used as an import prefix and can't be used to name a top-level element."
+    correctionMessage: Try renaming either the top-level element or the prefix.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the prefix
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name is used as both an import
+      prefix and the name of a top-level declaration in the same library.
+
+      #### Example
+
+      The following code produces this diagnostic because `f` is used as both an
+      import prefix and the name of a function:
+
+      ```dart
+      import 'dart:math' as f;
+
+      int [!f!]() => f.min(0, 1);
+      ```
+
+      #### Common fixes
+
+      If you want to use the name for the import prefix, then rename the
+      top-level declaration:
+
+      ```dart
+      import 'dart:math' as f;
+
+      int g() => f.min(0, 1);
+      ```
+
+      If you want to use the name for the top-level declaration, then rename the
+      import prefix:
+
+      ```dart
+      import 'dart:math' as math;
+
+      int f() => math.min(0, 1);
+      ```
+  PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT:
+    problemMessage: "The name '{0}' refers to an import prefix, so it must be followed by '.'."
+    correctionMessage: Try correcting the name to refer to something other than a prefix, or renaming the prefix.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the prefix
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import prefix is used by
+      itself, without accessing any of the names declared in the libraries
+      associated with the prefix. Prefixes aren't variables, and therefore can't
+      be used as a value.
+
+      #### Example
+
+      The following code produces this diagnostic because the prefix `math` is
+      being used as if it were a variable:
+
+      ```dart
+      import 'dart:math' as math;
+
+      void f() {
+        print([!math!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the code is incomplete, then reference something in one of the libraries
+      associated with the prefix:
+
+      ```dart
+      import 'dart:math' as math;
+
+      void f() {
+        print(math.pi);
+      }
+      ```
+
+      If the name is wrong, then correct the name.
+  PREFIX_SHADOWED_BY_LOCAL_DECLARATION:
+    problemMessage: "The prefix '{0}' can't be used here because it is shadowed by a local declaration."
+    correctionMessage: Try renaming either the prefix or the local declaration.
+    comment: |-
+      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.
+  PRIVATE_COLLISION_IN_MIXIN_APPLICATION:
+    problemMessage: "The private name '{0}', defined by '{1}', conflicts with the same name defined by '{2}'."
+    correctionMessage: "Try removing '{1}' from the 'with' clause."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the private name that collides
+      1: the name of the first mixin
+      2: the name of the second mixin
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when two mixins that define the same
+      private member are used together in a single class in a library other than
+      the one that defines the mixins.
+
+      #### Example
+
+      Given a file named `a.dart` containing the following code:
+
+      ```dart
+      %uri="lib/a.dart"
+      class A {
+        void _foo() {}
+      }
+
+      class B {
+        void _foo() {}
+      }
+      ```
+
+      The following code produces this diagnostic because the classes `A` and `B`
+      both define the method `_foo`:
+
+      ```dart
+      import 'a.dart';
+
+      class C extends Object with A, [!B!] {}
+      ```
+
+      #### Common fixes
+
+      If you don't need both of the mixins, then remove one of them from the
+      `with` clause:
+
+      ```dart
+      import 'a.dart';
+
+      class C extends Object with A, [!B!] {}
+      ```
+
+      If you need both of the mixins, then rename the conflicting member in one
+      of the two mixins.
+  PRIVATE_OPTIONAL_PARAMETER:
+    problemMessage: "Named parameters can't start with an underscore."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the name of a named parameter
+      starts with an underscore.
+
+      #### Example
+
+      The following code produces this diagnostic because the named parameter
+      `_x` starts with an underscore:
+
+      ```dart
+      class C {
+        void m({int [!_x!] = 0}) {}
+      }
+      ```
+
+      #### Common fixes
+
+      Rename the parameter so that it doesn't start with an underscore:
+
+      ```dart
+      class C {
+        void m({int x = 0}) {}
+      }
+      ```
+  PRIVATE_SETTER:
+    problemMessage: "The setter '{0}' is private and can't be accessed outside of the library that declares it."
+    correctionMessage: Try making it public.
+  READ_POTENTIALLY_UNASSIGNED_FINAL:
+    problemMessage: "The final variable '{0}' can't be read because it is potentially unassigned at this point."
+    correctionMessage: Ensure that it is assigned on necessary execution paths.
+  RECURSIVE_COMPILE_TIME_CONSTANT:
+    problemMessage: The compile-time constant expression depends on itself.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value of a compile-time
+      constant is defined in terms of itself, either directly or indirectly,
+      creating an infinite loop.
+
+      #### Example
+
+      The following code produces this diagnostic twice because both of the
+      constants are defined in terms of the other:
+
+      ```dart
+      const [!secondsPerHour!] = minutesPerHour * 60;
+      const [!minutesPerHour!] = secondsPerHour / 60;
+      ```
+
+      #### Common fixes
+
+      Break the cycle by finding an alternative way of defining at least one of
+      the constants:
+
+      ```dart
+      const secondsPerHour = minutesPerHour * 60;
+      const minutesPerHour = 60;
+      ```
+  RECURSIVE_CONSTRUCTOR_REDIRECT:
+    problemMessage: "Constructors can't redirect to themselves either directly or indirectly."
+    correctionMessage: Try changing one of the constructors in the loop to not redirect.
+    hasPublishedDocs: true
+    comment: |-
+      No parameters.
+
+      TODO(scheglov) review this later, there are no explicit "it is a
+      compile-time error" in specification. But it was added to the co19 and
+      there is same error for factories.
+
+      https://code.google.com/p/dart/issues/detail?id=954
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor redirects to
+      itself, either directly or indirectly, creating an infinite loop.
+
+      #### Example
+
+      The following code produces this diagnostic because the generative
+      constructors `C.a` and `C.b` each redirect to the other:
+
+      ```dart
+      class C {
+        C.a() : [!this.b()!];
+        C.b() : [!this.a()!];
+      }
+      ```
+
+      The following code produces this diagnostic because the factory
+      constructors `A` and `B` each redirect to the other:
+
+      ```dart
+      abstract class A {
+        factory A() = [!B!];
+      }
+      class B implements A {
+        factory B() = [!A!];
+        B.named();
+      }
+      ```
+
+      #### Common fixes
+
+      In the case of generative constructors, break the cycle by finding defining
+      at least one of the constructors to not redirect to another constructor:
+
+      ```dart
+      class C {
+        C.a() : this.b();
+        C.b();
+      }
+      ```
+
+      In the case of factory constructors, break the cycle by defining at least
+      one of the factory constructors to do one of the following:
+
+      - Redirect to a generative constructor:
+
+      ```dart
+      abstract class A {
+        factory A() = B;
+      }
+      class B implements A {
+        factory B() = B.named;
+        B.named();
+      }
+      ```
+
+      - Not redirect to another constructor:
+
+      ```dart
+      abstract class A {
+        factory A() = B;
+      }
+      class B implements A {
+        factory B() {
+          return B.named();
+        }
+
+        B.named();
+      }
+      ```
+
+      - Not be a factory constructor:
+
+      ```dart
+      abstract class A {
+        factory A() = B;
+      }
+      class B implements A {
+        B();
+        B.named();
+      }
+      ```
+  RECURSIVE_FACTORY_REDIRECT:
+    sharedName: RECURSIVE_CONSTRUCTOR_REDIRECT
+    problemMessage: "Constructors can't redirect to themselves either directly or indirectly."
+    correctionMessage: Try changing one of the constructors in the loop to not redirect.
+    hasPublishedDocs: true
+    comment: No parameters.
+  RECURSIVE_INTERFACE_INHERITANCE:
+    problemMessage: "'{0}' can't be a superinterface of itself: {1}."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class that implements itself recursively
+      1: a string representation of the implements loop
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's a circularity in the
+      type hierarchy. This happens when a type, either directly or indirectly,
+      is declared to be a subtype of itself.
+
+      #### Example
+
+      The following code produces this diagnostic because the class `A` is
+      declared to be a subtype of `B`, and `B` is a subtype of `A`:
+
+      ```dart
+      class [!A!] extends B {}
+      class B implements A {}
+      ```
+
+      #### Common fixes
+
+      Change the type hierarchy so that there's no circularity.
+  RECURSIVE_INTERFACE_INHERITANCE_EXTENDS:
+    sharedName: RECURSIVE_INTERFACE_INHERITANCE
+    problemMessage: "'{0}' can't extend itself."
+    hasPublishedDocs: true
+    comment: |-
+      7.10 Superinterfaces: It is a compile-time error if the interface of a
+      class <i>C</i> is a superinterface of itself.
+
+      8.1 Superinterfaces: It is a compile-time error if an interface is a
+      superinterface of itself.
+
+      7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+      superclass of itself.
+
+      Parameters:
+      0: the name of the class that implements itself recursively
+  RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS:
+    sharedName: RECURSIVE_INTERFACE_INHERITANCE
+    problemMessage: "'{0}' can't implement itself."
+    hasPublishedDocs: true
+    comment: |-
+      7.10 Superinterfaces: It is a compile-time error if the interface of a
+      class <i>C</i> is a superinterface of itself.
+
+      8.1 Superinterfaces: It is a compile-time error if an interface is a
+      superinterface of itself.
+
+      7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+      superclass of itself.
+
+      Parameters:
+      0: the name of the class that implements itself recursively
+  RECURSIVE_INTERFACE_INHERITANCE_ON:
+    sharedName: RECURSIVE_INTERFACE_INHERITANCE
+    problemMessage: "'{0}' can't use itself as a superclass constraint."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the mixin that constraints itself recursively
+  RECURSIVE_INTERFACE_INHERITANCE_WITH:
+    sharedName: RECURSIVE_INTERFACE_INHERITANCE
+    problemMessage: "'{0}' can't use itself as a mixin."
+    hasPublishedDocs: true
+    comment: |-
+      7.10 Superinterfaces: It is a compile-time error if the interface of a
+      class <i>C</i> is a superinterface of itself.
+
+      8.1 Superinterfaces: It is a compile-time error if an interface is a
+      superinterface of itself.
+
+      7.9 Superclasses: It is a compile-time error if a class <i>C</i> is a
+      superclass of itself.
+
+      Parameters:
+      0: the name of the class that implements itself recursively
+  REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR:
+    problemMessage: "The constructor '{0}' couldn't be found in '{1}'."
+    correctionMessage: "Try redirecting to a different constructor, or defining the constructor named '{0}'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generative constructor
+      redirects to a constructor that isn't defined.
+
+      #### Example
+
+      The following code produces this diagnostic because the constructor `C.a`
+      redirects to the constructor `C.b`, but `C.b` isn't defined:
+
+      ```dart
+      class C {
+        C.a() : [!this.b()!];
+      }
+      ```
+
+      #### Common fixes
+
+      If the missing constructor must be called, then define it:
+
+      ```dart
+      class C {
+        C.a() : this.b();
+        C.b();
+      }
+      ```
+
+      If the missing constructor doesn't need to be called, then remove the
+      redirect:
+
+      ```dart
+      class C {
+        C.a();
+      }
+      ```
+  REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR:
+    problemMessage: "Generative constructors can't redirect to a factory constructor."
+    correctionMessage: Try redirecting to a different constructor.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generative constructor
+      redirects to a factory constructor.
+
+      #### Example
+
+      The following code produces this diagnostic because the generative
+      constructor `C.a` redirects to the factory constructor `C.b`:
+
+      ```dart
+      class C {
+        C.a() : [!this.b()!];
+        factory C.b() => C.a();
+      }
+      ```
+
+      #### Common fixes
+
+      If the generative constructor doesn't need to redirect to another
+      constructor, then remove the redirect.
+
+      ```dart
+      class C {
+        C.a();
+        factory C.b() => C.a();
+      }
+      ```
+
+      If the generative constructor must redirect to another constructor, then
+      make the other constructor be a generative (non-factory) constructor:
+
+      ```dart
+      class C {
+        C.a() : this.b();
+        C.b();
+      }
+      ```
+  REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR:
+    problemMessage: "The redirecting constructor '{0}' can't redirect to a constructor of the abstract class '{1}'."
+    correctionMessage: Try redirecting to a constructor of a different class.
+    comment: |-
+      A factory constructor can't redirect to a non-generative constructor of an
+      abstract class.
+  REDIRECT_TO_INVALID_FUNCTION_TYPE:
+    problemMessage: "The redirected constructor '{0}' has incompatible parameters with '{1}'."
+    correctionMessage: Try redirecting to a different constructor.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the redirected constructor
+      1: the name of the redirecting constructor
+    documentation: |-
+      #### 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);
+      }
+      ```
+  REDIRECT_TO_INVALID_RETURN_TYPE:
+    problemMessage: "The return type '{0}' of the redirected constructor isn't a subtype of '{1}'."
+    correctionMessage: Try redirecting to a different constructor.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the redirected constructor's return type
+      1: the name of the redirecting constructor's return type
+    documentation: |-
+      #### 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;
+      }
+      ```
+  REDIRECT_TO_MISSING_CONSTRUCTOR:
+    problemMessage: "The constructor '{0}' couldn't be found in '{1}'."
+    correctionMessage: "Try redirecting to a different constructor, or define the constructor named '{0}'."
+    comment: |-
+      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.
+  REDIRECT_TO_NON_CLASS:
+    problemMessage: "The name '{0}' isn't a type and can't be used in a redirected constructor."
+    correctionMessage: Try redirecting to a different constructor.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the non-type referenced in the redirect
+    documentation: |-
+      #### Description
+
+      One way to implement a factory constructor is to redirect to another
+      constructor by referencing the name of the constructor. The analyzer
+      produces this diagnostic when the redirect is to something other than a
+      constructor.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` is a function:
+
+      ```dart
+      C f() => throw 0;
+
+      class C {
+        factory C() = [!f!];
+      }
+      ```
+
+      #### Common fixes
+
+      If the constructor isn't defined, then either define it or replace it with
+      a constructor that is defined.
+
+      If the constructor is defined but the class that defines it isn't visible,
+      then you probably need to add an import.
+
+      If you're trying to return the value returned by a function, then rewrite
+      the constructor to return the value from the constructor's body:
+
+      ```dart
+      C f() => throw 0;
+
+      class C {
+        factory C() => f();
+      }
+      ```
+  REDIRECT_TO_NON_CONST_CONSTRUCTOR:
+    problemMessage: "A constant redirecting constructor can't redirect to a non-constant constructor."
+    correctionMessage: Try redirecting to a different constructor.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor marked as `const`
+      redirects to a constructor that isn't marked as `const`.
+
+      #### Example
+
+      The following code produces this diagnostic because the constructor `C.a`
+      is marked as `const` but redirects to the constructor `C.b`, which isn't:
+
+      ```dart
+      class C {
+        const C.a() : this.[!b!]();
+        C.b();
+      }
+      ```
+
+      #### Common fixes
+
+      If the non-constant constructor can be marked as `const`, then mark it as
+      `const`:
+
+      ```dart
+      class C {
+        const C.a() : this.b();
+        const C.b();
+      }
+      ```
+
+      If the non-constant constructor can't be marked as `const`, then either
+      remove the redirect or remove `const` from the redirecting constructor:
+
+      ```dart
+      class C {
+        C.a() : this.b();
+        C.b();
+      }
+      ```
+  REDIRECT_TO_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    problemMessage: "A redirecting constructor can't redirect to a type alias that expands to a type parameter."
+    correctionMessage: Try replacing it with a class.
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a redirecting factory
+      constructor redirects to a type alias, and the type alias expands to one of
+      the type parameters of the type alias. This isn’t allowed because the value
+      of the type parameter is a type rather than a class.
+
+      #### Example
+
+      The following code produces this diagnostic because the redirect to `B<A>`
+      is to a type alias whose value is `T`, even though it looks like the value
+      should be `A`:
+
+      ```dart
+      class A implements C {}
+
+      typedef B<T> = T;
+
+      abstract class C {
+        factory C() = [!B!]<A>;
+      }
+      ```
+
+      #### Common fixes
+
+      Use either a class name or a type alias that is defined to be a class
+      rather than a type alias defined to be a type parameter:
+
+      ```dart
+      class A implements C {}
+
+      abstract class C {
+        factory C() = A;
+      }
+      ```
+  REFERENCED_BEFORE_DECLARATION:
+    problemMessage: "Local variable '{0}' can't be referenced before it is declared."
+    correctionMessage: "Try moving the declaration to before the first use, or renaming the local variable so that it doesn't hide a name from an enclosing scope."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a variable is referenced before
+      it’s declared. In Dart, variables are visible everywhere in the block in
+      which they are declared, but can only be referenced after they are
+      declared.
+
+      The analyzer also produces a context message that indicates where the
+      declaration is located.
+
+      #### Examples
+
+      The following code produces this diagnostic because `i` is used before it
+      is declared:
+
+      ```dart
+      %language=2.9
+      void f() {
+        print([!i!]);
+        int i = 5;
+      }
+      ```
+
+      #### Common fixes
+
+      If you intended to reference the local variable, move the declaration
+      before the first reference:
+
+      ```dart
+      %language=2.9
+      void f() {
+        int i = 5;
+        print(i);
+      }
+      ```
+
+      If you intended to reference a name from an outer scope, such as a
+      parameter, instance field or top-level variable, then rename the local
+      declaration so that it doesn't hide the outer variable.
+
+      ```dart
+      %language=2.9
+      void f(int i) {
+        print(i);
+        int x = 5;
+        print(x);
+      }
+      ```
+  RETHROW_OUTSIDE_CATCH:
+    problemMessage: A rethrow must be inside of a catch clause.
+    correctionMessage: "Try moving the expression into a catch clause, or using a 'throw' expression."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `rethrow` statement is outside
+      a `catch` clause. The `rethrow` statement is used to throw a caught
+      exception again, but there's no caught exception outside of a `catch`
+      clause.
+
+      #### Example
+
+      The following code produces this diagnostic because the`rethrow` statement
+      is outside of a `catch` clause:
+
+      ```dart
+      void f() {
+        [!rethrow!];
+      }
+      ```
+
+      #### Common fixes
+
+      If you're trying to rethrow an exception, then wrap the `rethrow` statement
+      in a `catch` clause:
+
+      ```dart
+      void f() {
+        try {
+          // ...
+        } catch (exception) {
+          rethrow;
+        }
+      }
+      ```
+
+      If you're trying to throw a new exception, then replace the `rethrow`
+      statement with a `throw` expression:
+
+      ```dart
+      void f() {
+        throw UnsupportedError('Not yet implemented');
+      }
+      ```
+  RETURN_IN_GENERATIVE_CONSTRUCTOR:
+    problemMessage: "Constructors can't return values."
+    correctionMessage: Try removing the return statement or using a factory constructor.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generative constructor
+      contains a `return` statement that specifies a value to be returned.
+      Generative constructors always return the object that was created, and
+      therefore can't return a different object.
+
+      #### Example
+
+      The following code produces this diagnostic because the `return` statement
+      has an expression:
+
+      ```dart
+      class C {
+        C() {
+          return [!this!];
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the constructor should create a new instance, then remove either the
+      `return` statement or the expression:
+
+      ```dart
+      class C {
+        C();
+      }
+      ```
+
+      If the constructor shouldn't create a new instance, then convert it to be a
+      factory constructor:
+
+      ```dart
+      class C {
+        factory C() {
+          return _instance;
+        }
+
+        static C _instance = C._();
+
+        C._();
+      }
+      ```
+  RETURN_IN_GENERATOR:
+    problemMessage: "Can't return a value from a generator function that uses the 'async*' or 'sync*' modifier."
+    correctionMessage: "Try replacing 'return' with 'yield', using a block function body, or changing the method body modifier."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generator function (one whose
+      body is marked with either `async*` or `sync*`) uses either a `return`
+      statement to return a value or implicitly returns a value because of using
+      `=>`. In any of these cases, they should use `yield` instead of `return`.
+
+      #### Example
+
+      The following code produces this diagnostic because the method `f` is a
+      generator and is using `return` to return a value:
+
+      ```dart
+      Iterable<int> f() sync* {
+        [!return 3!];
+      }
+      ```
+
+      The following code produces this diagnostic because the function `f` is a
+      generator and is implicitly returning a value:
+
+      ```dart
+      Stream<int> f() async* [!=>!] 3;
+      ```
+
+      #### Common fixes
+
+      If the function is using `=>` for the body of the function, then convert it
+      to a block function body, and use `yield` to return a value:
+
+      ```dart
+      Stream<int> f() async* {
+        yield 3;
+      }
+      ```
+
+      If the method is intended to be a generator, then use `yield` to return a
+      value:
+
+      ```dart
+      Iterable<int> f() sync* {
+        yield 3;
+      }
+      ```
+
+      If the method isn't intended to be a generator, then remove the modifier
+      from the body (or use `async` if you're returning a future):
+
+      ```dart
+      int f() {
+        return 3;
+      }
+      ```
+  RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR:
+    sharedName: RETURN_OF_INVALID_TYPE
+    problemMessage: "A value of type '{0}' can't be returned from the constructor '{2}' because it has a return type of '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      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
+  RETURN_OF_INVALID_TYPE_FROM_FUNCTION:
+    sharedName: RETURN_OF_INVALID_TYPE
+    problemMessage: "A value of type '{0}' can't be returned from the function '{2}' because it has a return type of '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      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
+    documentation: |-
+      #### 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;
+      ```
+  RETURN_OF_INVALID_TYPE_FROM_METHOD:
+    sharedName: RETURN_OF_INVALID_TYPE
+    problemMessage: "A value of type '{0}' can't be returned from the method '{2}' because it has a return type of '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      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
+  RETURN_OF_INVALID_TYPE_FROM_CLOSURE:
+    problemMessage: "The return type '{0}' isn't a '{1}', as required by the closure's context."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the return type as declared in the return statement
+      1: the expected return type as defined by the method
+    documentation: |-
+      #### 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();
+      ```
+  RETURN_WITHOUT_VALUE:
+    problemMessage: "The return value is missing after 'return'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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;
+      }
+      ```
+  SET_ELEMENT_TYPE_NOT_ASSIGNABLE:
+    problemMessage: "The element type '{0}' can't be assigned to the set type '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the actual type of the set element
+      1: the expected type of the set element
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an element in a set literal has
+      a type that isn't assignable to the element type of the set.
+
+      #### Example
+
+      The following code produces this diagnostic because the type of the string
+      literal `'0'` is `String`, which isn't assignable to `int`, the element
+      type of the set:
+
+      ```dart
+      var s = <int>{[!'0'!]};
+      ```
+
+      #### Common fixes
+
+      If the element type of the set literal is wrong, then change the element
+      type of the set:
+
+      ```dart
+      var s = <String>{'0'};
+      ```
+
+      If the type of the element is wrong, then change the element:
+
+      ```dart
+      var s = <int>{'0'.length};
+      ```
+  SHARED_DEFERRED_PREFIX:
+    problemMessage: "The prefix of a deferred import can't be used in other import directives."
+    correctionMessage: Try renaming one of the prefixes.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a prefix in a deferred import is
+      also used as a prefix in other imports (whether deferred or not). The
+      prefix in a deferred import can't be shared with other imports because the
+      prefix is used to load the imported library.
+
+      #### Example
+
+      The following code produces this diagnostic because the prefix `x` is used
+      as the prefix for a deferred import and is also used for one other import:
+
+      ```dart
+      import 'dart:math' [!deferred!] as x;
+      import 'dart:convert' as x;
+
+      var y = x.json.encode(x.min(0, 1));
+      ```
+
+      #### Common fixes
+
+      If you can use a different name for the deferred import, then do so:
+
+      ```dart
+      import 'dart:math' deferred as math;
+      import 'dart:convert' as x;
+
+      var y = x.json.encode(math.min(0, 1));
+      ```
+
+      If you can use a different name for the other imports, then do so:
+
+      ```dart
+      import 'dart:math' deferred as x;
+      import 'dart:convert' as convert;
+
+      var y = convert.json.encode(x.min(0, 1));
+      ```
+  SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY:
+    problemMessage: "Constant values from a deferred library can't be spread into a const literal."
+    correctionMessage: Try making the deferred import non-deferred.
+  STATIC_ACCESS_TO_INSTANCE_MEMBER:
+    problemMessage: "Instance member '{0}' can't be accessed using static access."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the instance member
+    documentation: |-
+      #### 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
+      %language=2.9
+      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
+      %language=2.9
+      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
+      %language=2.9
+      class C {
+        static int a;
+
+        int b;
+      }
+
+      int f(C c) => c.b;
+      ```
+  IMPLEMENTS_DEFERRED_CLASS:
+    sharedName: SUBTYPE_OF_DEFERRED_CLASS
+    problemMessage: "Classes and mixins can't implement deferred classes."
+    correctionMessage: Try specifying a different interface, removing the class from the list, or changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: No parameters.
+  MIXIN_DEFERRED_CLASS:
+    sharedName: SUBTYPE_OF_DEFERRED_CLASS
+    problemMessage: "Classes can't mixin deferred classes."
+    correctionMessage: Try changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: No parameters.
+  EXTENDS_DEFERRED_CLASS:
+    sharedName: SUBTYPE_OF_DEFERRED_CLASS
+    problemMessage: "Classes can't extend deferred classes."
+    correctionMessage: Try specifying a different superclass, or removing the extends clause.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type (class or mixin) is a
+      subtype of a class from a library being imported using a deferred import.
+      The supertypes of a type must be compiled at the same time as the type, and
+      classes from deferred libraries aren't compiled until the library is
+      loaded.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines the class `A`:
+
+      ```dart
+      %uri="lib/a.dart"
+      class A {}
+      ```
+
+      The following code produces this diagnostic because the superclass of `B`
+      is declared in a deferred library:
+
+      ```dart
+      import 'a.dart' deferred as a;
+
+      class B extends [!a.A!] {}
+      ```
+
+      #### Common fixes
+
+      If you need to create a subtype of a type from the deferred library, then
+      remove the `deferred` keyword:
+
+      ```dart
+      import 'a.dart' as a;
+
+      class B extends a.A {}
+      ```
+  EXTENDS_DISALLOWED_CLASS:
+    sharedName: SUBTYPE_OF_DISALLOWED_TYPE
+    problemMessage: "Classes can't extend '{0}'."
+    correctionMessage: Try specifying a different superclass, or removing the extends clause.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the disallowed type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when one of the restricted classes is
+      used in either an `extends`, `implements`, `with`, or `on` clause. The
+      classes `bool`, `double`, `FutureOr`, `int`, `Null`, `num`, and `String`
+      are all restricted in this way, to allow for more efficient
+      implementations.
+
+      #### Example
+
+      The following code produces this diagnostic because `String` is used in an
+      `extends` clause:
+
+      ```dart
+      class A extends [!String!] {}
+      ```
+
+      The following code produces this diagnostic because `String` is used in an
+      `implements` clause:
+
+      ```dart
+      class B implements [!String!] {}
+      ```
+
+      The following code produces this diagnostic because `String` is used in a
+      `with` clause:
+
+      ```dart
+      class C with [!String!] {}
+      ```
+
+      The following code produces this diagnostic because `String` is used in an
+      `on` clause:
+
+      ```dart
+      mixin M on [!String!] {}
+      ```
+
+      #### Common fixes
+
+      If a different type should be specified, then replace the type:
+
+      ```dart
+      class A extends Object {}
+      ```
+
+      If there isn't a different type that would be appropriate, then remove the
+      type, and possibly the whole clause:
+
+      ```dart
+      class B {}
+      ```
+  MIXIN_OF_DISALLOWED_CLASS:
+    sharedName: SUBTYPE_OF_DISALLOWED_TYPE
+    problemMessage: "Classes can't mixin '{0}'."
+    correctionMessage: Try specifying a different class or mixin, or remove the class or mixin from the list.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the disallowed type
+  MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS:
+    sharedName: SUBTYPE_OF_DISALLOWED_TYPE
+    problemMessage: "''{0}' can't be used as a superclass constraint."
+    correctionMessage: "Try specifying a different super-class constraint, or remove the 'on' clause."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the disallowed type
+  IMPLEMENTS_DISALLOWED_CLASS:
+    sharedName: SUBTYPE_OF_DISALLOWED_TYPE
+    problemMessage: "Classes and mixins can't implement '{0}'."
+    correctionMessage: Try specifying a different interface, or remove the class from the list.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the disallowed type
+  EXTENDS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    sharedName: SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER
+    problemMessage: "A type alias that expands to a type parameter can't be used as a superclass."
+    correctionMessage: Try specifying a different superclass, or removing the extends clause.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type alias that expands to a
+      type parameter is used in an `extends`, `implements`, `with`, or `on`
+      clause.
+
+      #### Example
+
+      The following code produces this diagnostic because the type alias `T`,
+      which expands to the type parameter `S`, is used in the `extends` clause of
+      the class `C`:
+
+      ```dart
+      typedef T<S> = S;
+
+      class C extends [!T!]<Object> {}
+      ```
+
+      #### Common fixes
+
+      Use the value of the type argument directly:
+
+      ```dart
+      typedef T<S> = S;
+
+      class C extends Object {}
+      ```
+  MIXIN_ON_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    sharedName: SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER
+    problemMessage: "A type alias that expands to a type parameter can't be used as a superclass constraint."
+    hasPublishedDocs: true
+    comment: No parameters.
+  MIXIN_OF_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    sharedName: SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER
+    problemMessage: "A type alias that expands to a type parameter can't be mixed in."
+    hasPublishedDocs: true
+    comment: No parameters.
+  IMPLEMENTS_TYPE_ALIAS_EXPANDS_TO_TYPE_PARAMETER:
+    sharedName: SUPERTYPE_EXPANDS_TO_TYPE_PARAMETER
+    problemMessage: "A type alias that expands to a type parameter can't be implemented."
+    correctionMessage: Try specifying a class or mixin, or removing the list.
+    hasPublishedDocs: true
+    comment: No parameters.
+  SUPER_INITIALIZER_IN_OBJECT:
+    problemMessage: "The class 'Object' can't invoke a constructor from a superclass."
+    comment: |-
+      7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
+      is a compile-time error if a generative constructor of class Object
+      includes a superinitializer.
+  SUPER_IN_EXTENSION:
+    problemMessage: "The 'super' keyword can't be used in an extension because an extension doesn't have a superclass."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a member declared inside an
+      extension uses the `super` keyword . Extensions aren't classes and don't
+      have superclasses, so the `super` keyword serves no purpose.
+
+      #### Examples
+
+      The following code produces this diagnostic because `super` can't be used
+      in an extension:
+
+      ```dart
+      extension E on Object {
+        String get displayString => [!super!].toString();
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the `super` keyword :
+
+      ```dart
+      extension E on Object {
+        String get displayString => toString();
+      }
+      ```
+  SUPER_IN_INVALID_CONTEXT:
+    problemMessage: "Invalid context for 'super' invocation."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the keyword `super` is used
+      outside of a instance method.
+
+      #### Examples
+
+      The following code produces this diagnostic because `super` is used in a
+      top-level function:
+
+      ```dart
+      void f() {
+        [!super!].f();
+      }
+      ```
+
+      #### Common fixes
+
+      Rewrite the code to not use `super`.
+  SUPER_IN_REDIRECTING_CONSTRUCTOR:
+    problemMessage: "The redirecting constructor can't have a 'super' initializer."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor that redirects to
+      another constructor also attempts to invoke a constructor from the
+      superclass. The superclass constructor will be invoked when the constructor
+      that the redirecting constructor is redirected to is invoked.
+
+      #### Example
+
+      The following code produces this diagnostic because the constructor `C.a`
+      both redirects to `C.b` and invokes a constructor from the superclass:
+
+      ```dart
+      class C {
+        C.a() : this.b(), [!super()!];
+        C.b();
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the invocation of the `super` constructor:
+
+      ```dart
+      class C {
+        C.a() : this.b();
+        C.b();
+      }
+      ```
+  SWITCH_CASE_COMPLETES_NORMALLY:
+    problemMessage: "The 'case' should not complete normally."
+    correctionMessage: "Try adding 'break', or 'return', etc."
+    comment: |-
+      It is an error if any case of a switch statement except the last case (the
+      default case if present) may complete normally. The previous syntactic
+      restriction requiring the last statement of each case to be one of an
+      enumerated list of statements (break, continue, return, throw, or rethrow)
+      is removed.
+  SWITCH_EXPRESSION_NOT_ASSIGNABLE:
+    problemMessage: "Type '{0}' of the switch expression isn't assignable to the type '{1}' of case expressions."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the static type of the switch expression
+      1: the static type of the case expressions
+    documentation: |-
+      #### 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
+      %language=2.9
+      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
+      %language=2.9
+      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
+      %language=2.9
+      void f(String s) {
+        switch (s) {
+          case '0':
+            break;
+        }
+      }
+      ```
+  TEAROFF_OF_GENERATIVE_CONSTRUCTOR_OF_ABSTRACT_CLASS:
+    problemMessage: "A generative constructor of an abstract class can't be torn off."
+    correctionMessage: Try tearing off a constructor of a concrete class, or a non-generative constructor.
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a generative constructor from an
+      abstract class is being torn off. This isn't allowed because it isn't valid
+      to create an instance of an abstract class, which means that there isn't
+      any valid use for the torn off constructor.
+
+      #### Example
+
+      The following code produces this diagnostic because the constructor `C.new`
+      is being torn off and the class `C` is an abstract class:
+
+      ```dart
+      abstract class C {
+        C();
+      }
+
+      void f() {
+        [!C.new!];
+      }
+      ```
+
+      #### Common fixes
+
+      Tear off the constructor of a concrete class.
+  THROW_OF_INVALID_TYPE:
+    problemMessage: "The type '{0}' of the thrown expression must be assignable to 'Object'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type that can't be thrown
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type of the expression in a
+      throw expression isn't assignable to `Object`. It isn't valid to throw
+      `null`, so it isn't valid to use an expression that might evaluate to
+      `null`.
+
+      #### Example
+
+      The following code produces this diagnostic because `s` might be `null`:
+
+      ```dart
+      void f(String? s) {
+        throw [!s!];
+      }
+      ```
+
+      #### Common fixes
+
+      Add an explicit null check to the expression:
+
+      ```dart
+      void f(String? s) {
+        throw s!;
+      }
+      ```
+  TOP_LEVEL_CYCLE:
+    problemMessage: "The type of '{0}' can't be inferred because it depends on itself through the cycle: {1}."
+    correctionMessage: Try adding an explicit type to one or more of the variables in the cycle in order to break the cycle.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the element whose type could not be inferred.
+      1: The [TopLevelInferenceError]'s arguments that led to the cycle.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a top-level variable has no type
+      annotation and the variable's initializer refers to the variable, either
+      directly or indirectly.
+
+      #### Example
+
+      The following code produces this diagnostic because the variables `x` and
+      `y` are defined in terms of each other, and neither has an explicit type,
+      so the type of the other can't be inferred:
+
+      ```dart
+      var x = y;
+      var y = [!x!];
+      ```
+
+      #### Common fixes
+
+      If the two variables don't need to refer to each other, then break the
+      cycle:
+
+      ```dart
+      var x = 0;
+      var y = x;
+      ```
+
+      If the two variables need to refer to each other, then give at least one of
+      them an explicit type:
+
+      ```dart
+      int x = y;
+      var y = x;
+      ```
+
+      Note, however, that while this code doesn't produce any diagnostics, it
+      will produce a stack overflow at runtime unless at least one of the
+      variables is assigned a value that doesn't depend on the other variables
+      before any of the variables in the cycle are referenced.
+  TYPE_ALIAS_CANNOT_REFERENCE_ITSELF:
+    problemMessage: "Typedefs can't reference themselves directly or recursively via another typedef."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a typedef refers to itself,
+      either directly or indirectly.
+
+      #### Example
+
+      The following code produces this diagnostic because `F` depends on itself
+      indirectly through `G`:
+
+      ```dart
+      typedef [!F!] = void Function(G);
+      typedef G = void Function(F);
+      ```
+
+      #### Common fixes
+
+      Change one or more of the typedefs in the cycle so that none of them refer
+      to themselves:
+
+      ```dart
+      typedef F = void Function(G);
+      typedef G = void Function(int);
+      ```
+  TYPE_ANNOTATION_DEFERRED_CLASS:
+    problemMessage: "The deferred type '{0}' can't be used in a declaration, cast, or type test."
+    correctionMessage: Try using a different type, or changing the import to not be deferred.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type that is deferred and being used in a type
+         annotation
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type annotation is in a
+      variable declaration, or the type used in a cast (`as`) or type test (`is`)
+      is a type declared in a library that is imported using a deferred import.
+      These types are required to be available at compile time, but aren't.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      The following code produces this diagnostic because the type of the
+      parameter `f` is imported from a deferred library:
+
+      ```dart
+      import 'dart:io' deferred as io;
+
+      void f([!io.File!] f) {}
+      ```
+
+      #### Common fixes
+
+      If you need to reference the imported type, then remove the `deferred`
+      keyword:
+
+      ```dart
+      import 'dart:io' as io;
+
+      void f(io.File f) {}
+      ```
+
+      If the import is required to be deferred and there's another type that is
+      appropriate, then use that type in place of the type from the deferred
+      library.
+  TYPE_ARGUMENT_NOT_MATCHING_BOUNDS:
+    problemMessage: "'{0}' doesn't conform to the bound '{2}' of the type parameter '{1}'."
+    correctionMessage: "Try using a type that is or is a subclass of '{2}'."
+    hasPublishedDocs: true
+    comment: |-
+      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 type parameter
+      2: the substituted bound of the type parameter
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type argument isn't the same
+      as or a subclass of the bounds of the corresponding type parameter.
+
+      #### Examples
+
+      The following code produces this diagnostic because `String` isn't a
+      subclass of `num`:
+
+      ```dart
+      class A<E extends num> {}
+
+      var a = A<[!String!]>();
+      ```
+
+      #### Common fixes
+
+      Change the type argument to be a subclass of the bounds:
+
+      ```dart
+      class A<E extends num> {}
+
+      var a = A<int>();
+      ```
+  TYPE_PARAMETER_REFERENCED_BY_STATIC:
+    problemMessage: "Static members can't reference type parameters of the class."
+    correctionMessage: Try removing the reference to the type parameter, or making the member an instance member.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a static member references a
+      type parameter that is declared for the class. Type parameters only have
+      meaning for instances of the class.
+
+      #### Example
+
+      The following code produces this diagnostic because the static method
+      `hasType` has a reference to the type parameter `T`:
+
+      ```dart
+      class C<T> {
+        static bool hasType(Object o) => o is [!T!];
+      }
+      ```
+
+      #### Common fixes
+
+      If the member can be an instance member, then remove the keyword `static`:
+
+      ```dart
+      class C<T> {
+        bool hasType(Object o) => o is T;
+      }
+      ```
+
+      If the member must be a static member, then make the member be generic:
+
+      ```dart
+      class C<T> {
+        static bool hasType<S>(Object o) => o is S;
+      }
+      ```
+
+      Note, however, that there isn’t a relationship between `T` and `S`, so this
+      second option changes the semantics from what was likely to be intended.
+  TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND:
+    problemMessage: "'{0}' can't be a supertype of its upper bound."
+    correctionMessage: "Try using a type that is the same as or a subclass of '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type parameter
+      1: the name of the bounding type
+
+      See [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the bound of a type parameter
+      (the type following the `extends` keyword) is either directly or indirectly
+      the type parameter itself. Stating that the type parameter must be the same
+      as itself or a subtype of itself or a subtype of itself isn't helpful
+      because it will always be the same as itself.
+
+      #### Example
+
+      The following code produces this diagnostic because the bound of `T` is
+      `T`:
+
+      ```dart
+      class C<[!T!] extends T> {}
+      ```
+
+      The following code produces this diagnostic because the bound of `T1` is
+      `T2`, and the bound of `T2` is `T1`, effectively making the bound of `T1`
+      be `T1`:
+
+      ```dart
+      class C<[!T1!] extends T2, T2 extends T1> {}
+      ```
+
+      #### Common fixes
+
+      If the type parameter needs to be a subclass of some type, then replace the
+      bound with the required type:
+
+      ```dart
+      class C<T extends num> {}
+      ```
+
+      If the type parameter can be any type, then remove the `extends` clause:
+
+      ```dart
+      class C<T> {}
+      ```
+  TYPE_TEST_WITH_NON_TYPE:
+    problemMessage: "The name '{0}' isn't a type and can't be used in an 'is' expression."
+    correctionMessage: Try correcting the name to match an existing type.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the right-hand side of an `is`
+      or `is!` test isn't a type.
+
+      #### Example
+
+      The following code produces this diagnostic because the right-hand side is
+      a parameter, not a type:
+
+      ```dart
+      typedef B = int Function(int);
+
+      void f(Object a, B b) {
+        if (a is [!b!]) {
+          return;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If you intended to use a type test, then replace the right-hand side with a
+      type:
+
+      ```dart
+      typedef B = int Function(int);
+
+      void f(Object a, B b) {
+        if (a is B) {
+          return;
+        }
+      }
+      ```
+
+      If you intended to use a different kind of test, then change the test:
+
+      ```dart
+      typedef B = int Function(int);
+
+      void f(Object a, B b) {
+        if (a == b) {
+          return;
+        }
+      }
+      ```
+  TYPE_TEST_WITH_UNDEFINED_NAME:
+    problemMessage: "The name '{0}' isn't defined, so it can't be used in an 'is' expression."
+    correctionMessage: "Try changing the name to the name of an existing type, or creating a type with the name '{0}'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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) {
+          // ...
+        }
+      }
+      ```
+  UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "A nullable expression can't be used in a spread."
+    correctionMessage: "Try checking that the value isn't 'null' before using it in a spread, or use a null-aware spread."
+    hasPublishedDocs: true
+  UNCHECKED_INVOCATION_OF_NULLABLE_VALUE:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "The function can't be unconditionally invoked because it can be 'null'."
+    correctionMessage: "Try adding a null check ('!')."
+    hasPublishedDocs: true
+  UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "The method '{0}' can't be unconditionally invoked because the receiver can be 'null'."
+    correctionMessage: "Try making the call conditional (using '?.') or adding a null check to the target ('!')."
+    hasPublishedDocs: true
+  UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "The operator '{0}' can't be unconditionally invoked because the receiver can be 'null'."
+    correctionMessage: "Try adding a null check to the target ('!')."
+    hasPublishedDocs: true
+  UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "A nullable expression can't be used in a yield-each statement."
+    correctionMessage: "Try checking that the value isn't 'null' before using it in a yield-each statement."
+    hasPublishedDocs: true
+  UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "A nullable expression can't be used as a condition."
+    correctionMessage: "Try checking that the value isn't 'null' before using it as a condition."
+    hasPublishedDocs: true
+    documentation: |-
+      #### 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
+      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
+      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
+      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
+      void f(String? s) {
+        if (s!.length > 3) {
+          // ...
+        }
+      }
+      ```
+  UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "A nullable expression can't be used as an iterator in a for-in loop."
+    correctionMessage: "Try checking that the value isn't 'null' before using it as an iterator."
+    hasPublishedDocs: true
+  UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE:
+    sharedName: UNCHECKED_USE_OF_NULLABLE_VALUE
+    problemMessage: "The property '{0}' can't be unconditionally accessed because the receiver can be 'null'."
+    correctionMessage: "Try making the access conditional (using '?.') or adding a null check to the target ('!')."
+    hasPublishedDocs: true
+  UNDEFINED_ANNOTATION:
+    problemMessage: "Undefined name '{0}' used as an annotation."
+    correctionMessage: Try defining the name or importing it from another library.
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name that isn't defined is
+      used as an annotation.
+
+      #### Examples
+
+      The following code produces this diagnostic because the name `undefined`
+      isn't defined:
+
+      ```dart
+      [!@undefined!]
+      void f() {}
+      ```
+
+      #### Common fixes
+
+      If the name is correct, but it isn’t declared yet, then declare the name as
+      a constant value:
+
+      ```dart
+      const undefined = 'undefined';
+
+      @undefined
+      void f() {}
+      ```
+
+      If the name is wrong, replace the name with the name of a valid constant:
+
+      ```dart
+      @deprecated
+      void f() {}
+      ```
+
+      Otherwise, remove the annotation.
+  UNDEFINED_CLASS:
+    problemMessage: "Undefined class '{0}'."
+    correctionMessage: "Try changing the name to the name of an existing class, or creating a class with the name '{0}'."
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the undefined class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it encounters an identifier that
+      appears to be the name of a class 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 `Piont` isn't defined:
+
+      ```dart
+      class Point {}
+
+      void f([!Piont!] p) {}
+      ```
+
+      #### Common fixes
+
+      If the identifier isn't defined, then either define it or replace it with
+      the name of a class that is defined. The example above can be corrected by
+      fixing the spelling of the class:
+
+      ```dart
+      class Point {}
+
+      void f(Point p) {}
+      ```
+
+      If the class is defined but isn't visible, then you probably need to add an
+      import.
+  UNDEFINED_CLASS_BOOLEAN:
+    sharedName: UNDEFINED_CLASS
+    problemMessage: "Undefined class '{0}'."
+    correctionMessage: "Try using the type 'bool'."
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Same as [CompileTimeErrorCode.UNDEFINED_CLASS], but to catch using
+      "boolean" instead of "bool" in order to improve the correction message.
+
+      Parameters:
+      0: the name of the undefined class
+  UNDEFINED_CONSTRUCTOR_IN_INITIALIZER:
+    problemMessage: "The class '{0}' doesn't have a constructor named '{1}'."
+    correctionMessage: "Try defining a constructor named '{1}' in '{0}', or invoking a different constructor."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the superclass that does not define the invoked constructor
+      1: the name of the constructor being invoked
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a superclass constructor is
+      invoked in the initializer list of a constructor, but the superclass
+      doesn't define the constructor being invoked.
+
+      #### Examples
+
+      The following code produces this diagnostic because `A` doesn't have an
+      unnamed constructor:
+
+      ```dart
+      class A {
+        A.n();
+      }
+      class B extends A {
+        B() : [!super()!];
+      }
+      ```
+
+      The following code produces this diagnostic because `A` doesn't have a
+      constructor named `m`:
+
+      ```dart
+      class A {
+        A.n();
+      }
+      class B extends A {
+        B() : [!super.m()!];
+      }
+      ```
+
+      #### Common fixes
+
+      If the superclass defines a constructor that should be invoked, then change
+      the constructor being invoked:
+
+      ```dart
+      class A {
+        A.n();
+      }
+      class B extends A {
+        B() : super.n();
+      }
+      ```
+
+      If the superclass doesn't define an appropriate constructor, then define
+      the constructor being invoked:
+
+      ```dart
+      class A {
+        A.m();
+        A.n();
+      }
+      class B extends A {
+        B() : super.m();
+      }
+      ```
+  UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT:
+    sharedName: UNDEFINED_CONSTRUCTOR_IN_INITIALIZER
+    problemMessage: "The class '{0}' doesn't have an unnamed constructor."
+    correctionMessage: "Try defining an unnamed constructor in '{0}', or invoking a different constructor."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the superclass that does not define the invoked constructor
+  UNDEFINED_ENUM_CONSTANT:
+    problemMessage: "There's no constant named '{0}' in '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing constant, or defining a constant named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the enumeration constant that is not defined
+      1: the name of the enumeration used to access the constant
+    documentation: |-
+      #### 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;
+      ```
+  UNDEFINED_EXTENSION_GETTER:
+    problemMessage: "The getter '{0}' isn't defined for the extension '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing getter, or defining a getter named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the getter that is undefined
+      1: the name of the extension that was explicitly specified
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is used to
+      invoke a getter, but the getter isn't defined by the specified extension.
+      The analyzer also produces this diagnostic when a static getter is
+      referenced but isn't defined by the specified extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare an instance getter named `b`:
+
+      ```dart
+      extension E on String {
+        String get a => 'a';
+      }
+
+      extension F on String {
+        String get b => 'b';
+      }
+
+      void f() {
+        E('c').[!b!];
+      }
+      ```
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare a static getter named `a`:
+
+      ```dart
+      extension E on String {}
+
+      var x = E.[!a!];
+      ```
+
+      #### Common fixes
+
+      If the name of the getter is incorrect, then change it to the name of an
+      existing getter:
+
+      ```dart
+      extension E on String {
+        String get a => 'a';
+      }
+
+      extension F on String {
+        String get b => 'b';
+      }
+
+      void f() {
+        E('c').a;
+      }
+      ```
+
+      If the name of the getter is correct but the name of the extension is
+      wrong, then change the name of the extension to the correct name:
+
+      ```dart
+      extension E on String {
+        String get a => 'a';
+      }
+
+      extension F on String {
+        String get b => 'b';
+      }
+
+      void f() {
+        F('c').b;
+      }
+      ```
+
+      If the name of the getter and extension are both correct, but the getter
+      isn't defined, then define the getter:
+
+      ```dart
+      extension E on String {
+        String get a => 'a';
+        String get b => 'z';
+      }
+
+      extension F on String {
+        String get b => 'b';
+      }
+
+      void f() {
+        E('c').b;
+      }
+      ```
+  UNDEFINED_EXTENSION_METHOD:
+    problemMessage: "The method '{0}' isn't defined for the extension '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing method, or defining a method named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method that is undefined
+      1: the name of the extension that was explicitly specified
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is used to
+      invoke a method, but the method isn't defined by the specified extension.
+      The analyzer also produces this diagnostic when a static method is
+      referenced but isn't defined by the specified extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare an instance method named `b`:
+
+      ```dart
+      extension E on String {
+        String a() => 'a';
+      }
+
+      extension F on String {
+        String b() => 'b';
+      }
+
+      void f() {
+        E('c').[!b!]();
+      }
+      ```
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare a static method named `a`:
+
+      ```dart
+      extension E on String {}
+
+      var x = E.[!a!]();
+      ```
+
+      #### Common fixes
+
+      If the name of the method is incorrect, then change it to the name of an
+      existing method:
+
+      ```dart
+      extension E on String {
+        String a() => 'a';
+      }
+
+      extension F on String {
+        String b() => 'b';
+      }
+
+      void f() {
+        E('c').a();
+      }
+      ```
+
+      If the name of the method is correct, but the name of the extension is
+      wrong, then change the name of the extension to the correct name:
+
+      ```dart
+      extension E on String {
+        String a() => 'a';
+      }
+
+      extension F on String {
+        String b() => 'b';
+      }
+
+      void f() {
+        F('c').b();
+      }
+      ```
+
+      If the name of the method and extension are both correct, but the method
+      isn't defined, then define the method:
+
+      ```dart
+      extension E on String {
+        String a() => 'a';
+        String b() => 'z';
+      }
+
+      extension F on String {
+        String b() => 'b';
+      }
+
+      void f() {
+        E('c').b();
+      }
+      ```
+  UNDEFINED_EXTENSION_OPERATOR:
+    problemMessage: "The operator '{0}' isn't defined for the extension '{1}'."
+    correctionMessage: "Try defining the operator '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the operator that is undefined
+      1: the name of the extension that was explicitly specified
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an operator is invoked on a
+      specific extension when that extension doesn't implement the operator.
+
+      #### Example
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't define the operator `*`:
+
+      ```dart
+      var x = E('') [!*!] 4;
+
+      extension E on String {}
+      ```
+
+      #### Common fixes
+
+      If the extension is expected to implement the operator, then add an
+      implementation of the operator to the extension:
+
+      ```dart
+      var x = E('') * 4;
+
+      extension E on String {
+        int operator *(int multiplier) => length * multiplier;
+      }
+      ```
+
+      If the operator is defined by a different extension, then change the name
+      of the extension to the name of the one that defines the operator.
+
+      If the operator is defined on the argument of the extension override, then
+      remove the extension override:
+
+      ```dart
+      var x = '' * 4;
+
+      extension E on String {}
+      ```
+  UNDEFINED_EXTENSION_SETTER:
+    problemMessage: "The setter '{0}' isn't defined for the extension '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing setter, or defining a setter named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the setter that is undefined
+      1: the name of the extension that was explicitly specified
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension override is used to
+      invoke a setter, but the setter isn't defined by the specified extension.
+      The analyzer also produces this diagnostic when a static setter is
+      referenced but isn't defined by the specified extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare an instance setter named `b`:
+
+      ```dart
+      extension E on String {
+        set a(String v) {}
+      }
+
+      extension F on String {
+        set b(String v) {}
+      }
+
+      void f() {
+        E('c').[!b!] = 'd';
+      }
+      ```
+
+      The following code produces this diagnostic because the extension `E`
+      doesn't declare a static setter named `a`:
+
+      ```dart
+      extension E on String {}
+
+      void f() {
+        E.[!a!] = 3;
+      }
+      ```
+
+      #### Common fixes
+
+      If the name of the setter is incorrect, then change it to the name of an
+      existing setter:
+
+      ```dart
+      extension E on String {
+        set a(String v) {}
+      }
+
+      extension F on String {
+        set b(String v) {}
+      }
+
+      void f() {
+        E('c').a = 'd';
+      }
+      ```
+
+      If the name of the setter is correct, but the name of the extension is
+      wrong, then change the name of the extension to the correct name:
+
+      ```dart
+      extension E on String {
+        set a(String v) {}
+      }
+
+      extension F on String {
+        set b(String v) {}
+      }
+
+      void f() {
+        F('c').b = 'd';
+      }
+      ```
+
+      If the name of the setter and extension are both correct, but the setter
+      isn't defined, then define the setter:
+
+      ```dart
+      extension E on String {
+        set a(String v) {}
+        set b(String v) {}
+      }
+
+      extension F on String {
+        set b(String v) {}
+      }
+
+      void f() {
+        E('c').b = 'd';
+      }
+      ```
+  UNDEFINED_FUNCTION:
+    problemMessage: "The function '{0}' isn't defined."
+    correctionMessage: "Try importing the library that defines '{0}', correcting the name to the name of an existing function, or defining a function named '{0}'."
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method that is undefined
+    documentation: |-
+      #### 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.
+  UNDEFINED_GETTER:
+    problemMessage: "The getter '{0}' isn't defined for the type '{1}'."
+    correctionMessage: "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
+    comment: |-
+      Parameters:
+      0: the name of the getter
+      1: the name of the enclosing type where the getter is being looked for
+    documentation: |-
+      #### 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;
+      ```
+  UNDEFINED_GETTER_ON_FUNCTION_TYPE:
+    sharedName: UNDEFINED_GETTER
+    problemMessage: "The getter '{0}' isn't defined for the '{1}' function type."
+    correctionMessage: "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension getter on 'Type'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the getter
+      1: the name of the function type alias
+  UNDEFINED_IDENTIFIER:
+    problemMessage: "Undefined name '{0}'."
+    correctionMessage: Try correcting the name to one that is defined, or defining the name.
+    isUnresolvedIdentifier: true
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the identifier
+    documentation: |-
+      #### 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.
+  UNDEFINED_IDENTIFIER_AWAIT:
+    problemMessage: "Undefined name 'await' in function body not marked with 'async'."
+    correctionMessage: "Try correcting the name to one that is defined, defining the name, or adding 'async' to the enclosing function body."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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; }
+      ```
+  UNDEFINED_METHOD:
+    problemMessage: "The method '{0}' isn't defined for the type '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing method, or defining a method named '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method that is undefined
+      1: the resolved type name that the method lookup is happening on
+    documentation: |-
+      #### 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();
+      ```
+  UNDEFINED_METHOD_ON_FUNCTION_TYPE:
+    sharedName: UNDEFINED_METHOD
+    problemMessage: "The method '{0}' isn't defined for the '{1}' function type."
+    correctionMessage: "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension method on 'Type'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method
+      1: the name of the function type alias
+  UNDEFINED_NAMED_PARAMETER:
+    problemMessage: "The named parameter '{0}' isn't defined."
+    correctionMessage: "Try correcting the name to an existing named parameter's name, or defining a named parameter with the name '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the requested named parameter
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function invocation
+      has a named argument, but the method or function being invoked doesn't
+      define a parameter with the same name.
+
+      #### Examples
+
+      The following code produces this diagnostic because `m` doesn't declare a
+      named parameter named `a`:
+
+      ```dart
+      %language=2.9
+      class C {
+        m({int b}) {}
+      }
+
+      void f(C c) {
+        c.m([!a!]: 1);
+      }
+      ```
+
+      #### Common fixes
+
+      If the argument name is mistyped, then replace it with the correct name.
+      The example above can be fixed by changing `a` to `b`:
+
+      ```dart
+      %language=2.9
+      class C {
+        m({int b}) {}
+      }
+
+      void f(C c) {
+        c.m(b: 1);
+      }
+      ```
+
+      If a subclass adds a parameter with the name in question, then cast the
+      receiver to the subclass:
+
+      ```dart
+      %language=2.9
+      class C {
+        m({int b}) {}
+      }
+
+      class D extends C {
+        m({int a, int b}) {}
+      }
+
+      void f(C c) {
+        (c as D).m(a: 1);
+      }
+      ```
+
+      If the parameter should be added to the function, then add it:
+
+      ```dart
+      %language=2.9
+      class C {
+        m({int a, int b}) {}
+      }
+
+      void f(C c) {
+        c.m(a: 1);
+      }
+      ```
+  UNDEFINED_OPERATOR:
+    problemMessage: "The operator '{0}' isn't defined for the type '{1}'."
+    correctionMessage: "Try defining the operator '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the operator
+      1: the name of the enclosing type where the operator is being looked for
+    documentation: |-
+      #### 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;
+      ```
+  UNDEFINED_PREFIXED_NAME:
+    problemMessage: "The name '{0}' is being referenced through the prefix '{1}', but it isn't defined in any of the libraries imported using that prefix."
+    correctionMessage: "Try correcting the prefix or importing the library that defines '{0}'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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.
+  UNDEFINED_SETTER:
+    problemMessage: "The setter '{0}' isn't defined for the type '{1}'."
+    correctionMessage: "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
+    comment: |-
+      Parameters:
+      0: the name of the setter
+      1: the name of the enclosing type where the setter is being looked for
+    documentation: |-
+      #### 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;
+        }
+      }
+      ```
+  UNDEFINED_SETTER_ON_FUNCTION_TYPE:
+    sharedName: UNDEFINED_SETTER
+    problemMessage: "The setter '{0}' isn't defined for the '{1}' function type."
+    correctionMessage: "Try wrapping the function type alias in parentheses in order to access '{0}' as an extension getter on 'Type'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the setter
+      1: the name of the function type alias
+  UNDEFINED_SUPER_GETTER:
+    sharedName: UNDEFINED_SUPER_MEMBER
+    problemMessage: "The getter '{0}' isn't defined in a superclass of '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing getter, or defining a getter or field named '{0}' in a superclass."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the getter
+      1: the name of the enclosing type where the getter is being looked for
+  UNDEFINED_SUPER_METHOD:
+    sharedName: UNDEFINED_SUPER_MEMBER
+    problemMessage: "The method '{0}' isn't defined in a superclass of '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing method, or defining a method named '{0}' in a superclass."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method that is undefined
+      1: the resolved type name that the method lookup is happening on
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an inherited member (method,
+      getter, setter, or operator) is referenced using `super`, but there’s no
+      member with that name in the superclass chain.
+
+      #### Examples
+
+      The following code produces this diagnostic because `Object` doesn't define
+      a method named `n`:
+
+      ```dart
+      class C {
+        void m() {
+          super.[!n!]();
+        }
+      }
+      ```
+
+      The following code produces this diagnostic because `Object` doesn't define
+      a getter named `g`:
+
+      ```dart
+      class C {
+        void m() {
+          super.[!g!];
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the inherited member you intend to invoke has a different name, then
+      make the name of the invoked member match the inherited member.
+
+      If the member you intend to invoke is defined in the same class, then
+      remove the `super.`.
+
+      If the member isn’t defined, then either add the member to one of the
+      superclasses or remove the invocation.
+  UNDEFINED_SUPER_OPERATOR:
+    sharedName: UNDEFINED_SUPER_MEMBER
+    problemMessage: "The operator '{0}' isn't defined in a superclass of '{1}'."
+    correctionMessage: "Try defining the operator '{0}' in a superclass."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the operator
+      1: the name of the enclosing type where the operator is being looked for
+  UNDEFINED_SUPER_SETTER:
+    sharedName: UNDEFINED_SUPER_MEMBER
+    problemMessage: "The setter '{0}' isn't defined in a superclass of '{1}'."
+    correctionMessage: "Try correcting the name to the name of an existing setter, or defining a setter or field named '{0}' in a superclass."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the setter
+      1: the name of the enclosing type where the setter is being looked for
+  UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER:
+    problemMessage: Static members from supertypes must be qualified by the name of the defining type.
+    correctionMessage: "Try adding '{0}.' before the name."
+    hasPublishedDocs: true
+    comment: |-
+      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
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when code in one class references a
+      static member in a superclass without prefixing the member's name with the
+      name of the superclass. Static members can only be referenced without a
+      prefix in the class in which they're declared.
+
+      #### Example
+
+      The following code produces this diagnostic because the static field `x` is
+      referenced in the getter `g` without prefixing it with the name of the
+      defining class:
+
+      ```dart
+      class A {
+        static int x = 3;
+      }
+
+      class B extends A {
+        int get g => [!x!];
+      }
+      ```
+
+      #### Common fixes
+
+      Prefix the name of the static member with the name of the declaring class:
+
+      ```dart
+      class A {
+        static int x = 3;
+      }
+
+      class B extends A {
+        int get g => A.x;
+      }
+      ```
+  UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE:
+    problemMessage: Static members from the extended type or one of its superclasses must be qualified by the name of the defining type.
+    correctionMessage: "Try adding '{0}.' before the name."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the defining type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an undefined name is found, and
+      the name is the same as a static member of the extended type or one of its
+      superclasses.
+
+      #### Examples
+
+      The following code produces this diagnostic because `m` is a static member
+      of the extended type `C`:
+
+      ```dart
+      class C {
+        static void m() {}
+      }
+
+      extension E on C {
+        void f() {
+          [!m!]();
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If you're trying to reference a static member that's declared outside the
+      extension, then add the name of the class or extension before the reference
+      to the member:
+
+      ```dart
+      class C {
+        static void m() {}
+      }
+
+      extension E on C {
+        void f() {
+          C.m();
+        }
+      }
+      ```
+
+      If you're referencing a member that isn't declared yet, add a declaration:
+
+      ```dart
+      class C {
+        static void m() {}
+      }
+
+      extension E on C {
+        void f() {
+          m();
+        }
+
+        void m() {}
+      }
+      ```
+  URI_DOES_NOT_EXIST:
+    problemMessage: "Target of URI doesn't exist: '{0}'."
+    correctionMessage: Try creating the file referenced by the URI, or Try using a URI for a file that does exist.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the URI pointing to a non-existent file
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import, export, or part
+      directive is found where the URI refers to a file that doesn't exist.
+
+      #### Examples
+
+      If the file `lib.dart` doesn't exist, the following code produces this
+      diagnostic:
+
+      ```dart
+      import [!'lib.dart'!];
+      ```
+
+      #### Common fixes
+
+      If the URI was mistyped or invalid, then correct the URI.
+
+      If the URI is correct, then create the file.
+  URI_HAS_NOT_BEEN_GENERATED:
+    problemMessage: "Target of URI hasn't been generated: '{0}'."
+    correctionMessage: Try running the generator that will generate the file referenced by the URI.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the URI pointing to a non-existent file
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import, export, or part
+      directive is found where the URI refers to a file that doesn't exist and
+      the name of the file ends with a pattern that's commonly produced by code
+      generators, such as one of the following:
+      - `.g.dart`
+      - `.pb.dart`
+      - `.pbenum.dart`
+      - `.pbserver.dart`
+      - `.pbjson.dart`
+      - `.template.dart`
+
+      #### Examples
+
+      If the file `lib.g.dart` doesn't exist, the following code produces this
+      diagnostic:
+
+      ```dart
+      import [!'lib.g.dart'!];
+      ```
+
+      #### Common fixes
+
+      If the file is a generated file, then run the generator that generates the
+      file.
+
+      If the file isn't a generated file, then check the spelling of the URI or
+      create the file.
+  URI_WITH_INTERPOLATION:
+    problemMessage: "URIs can't use string interpolation."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the string literal in an
+      `import`, `export`, or `part` directive contains an interpolation. The
+      resolution of the URIs in directives must happen before the declarations
+      are compiled, so expressions can’t be  evaluated  while determining the
+      values of the URIs.
+
+      #### Example
+
+      The following code produces this diagnostic because the string in the
+      `import` directive contains an interpolation:
+
+      ```dart
+      import [!'dart:$m'!];
+
+      const m = 'math';
+      ```
+
+      #### Common fixes
+
+      Remove the interpolation from the URI:
+
+      ```dart
+      import 'dart:math';
+
+      var zero = min(0, 0);
+      ```
+  USE_OF_VOID_RESULT:
+    problemMessage: "This expression has a type of 'void' so its value can't be used."
+    correctionMessage: "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
+    comment: No parameters.
+    documentation: |-
+      #### 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.
+  VARIABLE_TYPE_MISMATCH:
+    problemMessage: "A value of type '{0}' can't be assigned to a const variable of type '{1}'."
+    correctionMessage: "Try using a subtype, or removing the 'const' keyword"
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the object being assigned.
+      1: the type of the variable being assigned to
+    documentation: |-
+      #### 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
+      %language=2.9
+      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
+      %language=2.9
+      const Object x = 0;
+      const String y = '$x';
+      ```
+
+      If the assigned value is correct, then change the declaration to have the
+      correct type:
+
+      ```dart
+      %language=2.9
+      const Object x = 0;
+      const int y = x;
+      ```
+  WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE:
+    problemMessage: "'{0}' is an '{1}' type parameter and can't be used in an '{2}' position in '{3}'."
+    correctionMessage: "Try using 'in' type parameters in 'in' positions and 'out' type parameters in 'out' positions in the superinterface."
+    comment: |-
+      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
+  WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR:
+    problemMessage: "Operator '{0}' should declare exactly {1} parameters, but {2} found."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the declared operator
+      1: the number of parameters expected
+      2: the number of parameters found in the operator declaration
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a declaration of an operator has
+      the wrong number of parameters.
+
+      #### Examples
+
+      The following code produces this diagnostic because the operator `+` must
+      have a single parameter corresponding to the right operand:
+
+      ```dart
+      class C {
+        int operator [!+!](a, b) => 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Add or remove parameters to match the required number:
+
+      ```dart
+      class C {
+        int operator +(a) => 0;
+      }
+      ```
+      TODO(brianwilkerson) It would be good to add a link to the spec or some
+       other documentation that lists the number of parameters for each operator,
+       but I don't know what to link to.
+  WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS:
+    sharedName: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
+    problemMessage: "Operator '-' should declare 0 or 1 parameter, but {0} found."
+    hasPublishedDocs: true
+    comment: |-
+      7.1.1 Operators: It is a compile time error if the arity of the
+      user-declared operator - is not 0 or 1.
+
+      Parameters:
+      0: the number of parameters found in the operator declaration
+  WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER:
+    problemMessage: Setters must declare exactly one required positional parameter.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a setter is found that doesn't
+      declare exactly one required positional parameter.
+
+      #### Examples
+
+      The following code produces this diagnostic because the setter `s` declares
+      two required parameters:
+
+      ```dart
+      %language=2.9
+      class C {
+        set [!s!](int x, int y) {}
+      }
+      ```
+
+      The following code produces this diagnostic because the setter `s` declares
+      one optional parameter:
+
+      ```dart
+      %language=2.9
+      class C {
+        set [!s!]([int x]) {}
+      }
+      ```
+
+      #### Common fixes
+
+      Change the declaration so that there's exactly one required positional
+      parameter:
+
+      ```dart
+      %language=2.9
+      class C {
+        set s(int x) {}
+      }
+      ```
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS:
+    problemMessage: "The type '{0}' is declared with {1} type parameters, but {2} type arguments were given."
+    correctionMessage: Try adjusting the number of type arguments to match the number of type parameters.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the type being referenced (<i>G</i>)
+      1: the number of type parameters that were declared
+      2: the number of type arguments provided
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a type that has type parameters
+      is used and type arguments are provided, but the number of type arguments
+      isn't the same as the number of type parameters.
+
+      The analyzer also produces this diagnostic when a constructor is invoked
+      and the number of type arguments doesn't match the number of type
+      parameters declared for the class.
+
+      #### Examples
+
+      The following code produces this diagnostic because `C` has one type
+      parameter but two type arguments are provided when it is used as a type
+      annotation:
+
+      ```dart
+      class C<E> {}
+
+      void f([!C<int, int>!] x) {}
+      ```
+
+      The following code produces this diagnostic because `C` declares one type
+      parameter, but two type arguments are provided when creating an instance:
+
+      ```dart
+      class C<E> {}
+
+      var c = [!C<int, int>!]();
+      ```
+
+      #### Common fixes
+
+      Add or remove type arguments, as necessary, to match the number of type
+      parameters defined for the type:
+
+      ```dart
+      class C<E> {}
+
+      void f(C<int> x) {}
+      ```
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR:
+    problemMessage: "The constructor '{0}.{1}' doesn't have type parameters."
+    correctionMessage: Try moving type arguments to after the type name.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class being instantiated
+      1: the name of the constructor being invoked
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when type arguments are provided
+      after the name of a named constructor. Constructors can't declare type
+      parameters, so invocations can only provide the type arguments associated
+      with the class, and those type arguments are required to follow the name of
+      the class rather than the name of the constructor.
+
+      #### Example
+
+      The following code produces this diagnostic because the type parameters
+      (`<String>`) follow the name of the constructor rather than the name of the
+      class:
+
+      ```dart
+      class C<T> {
+        C.named();
+      }
+      C f() => C.named[!<String>!]();
+      ```
+
+      #### Common fixes
+
+      If the type arguments are for the class' type parameters, then move the
+      type arguments to follow the class name:
+
+      ```dart
+      class C<T> {
+        C.named();
+      }
+      C f() => C<String>.named();
+      ```
+
+      If the type arguments aren't for the class' type parameters, then remove
+      them:
+
+      ```dart
+      class C<T> {
+        C.named();
+      }
+      C f() => C.named();
+      ```
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION:
+    problemMessage: "The extension '{0}' is declared with {1} type parameters, but {2} type arguments were given."
+    correctionMessage: Try adjusting the number of type arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the extension being referenced
+      1: the number of type parameters that were declared
+      2: the number of type arguments provided
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension that has type
+      parameters is used and type arguments are provided, but the number of type
+      arguments isn't the same as the number of type parameters.
+
+      #### Example
+
+      The following code produces this diagnostic because the extension `E` is
+      declared to have a single type parameter (`T`), but the extension override
+      has two type arguments:
+
+      ```dart
+      extension E<T> on List<T> {
+        int get len => length;
+      }
+
+      void f(List<int> p) {
+        E[!<int, String>!](p).len;
+      }
+      ```
+
+      #### Common fixes
+
+      Change the type arguments so that there are the same number of type
+      arguments as there are type parameters:
+
+      ```dart
+      extension E<T> on List<T> {
+        int get len => length;
+      }
+
+      void f(List<int> p) {
+        E<int>(p).len;
+      }
+      ```
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION:
+    sharedName: WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION
+    problemMessage: "This function is declared with {0} type parameters, but {1} type arguments were given."
+    correctionMessage: Try adjusting the number of type arguments to match the number of type parameters.
+    comment: |-
+      Parameters:
+      0: the number of type parameters that were declared
+      1: the number of type arguments provided
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION:
+    problemMessage: "The function '{0}' is declared with {1} type parameters, but {2} type arguments were given."
+    correctionMessage: Try adjusting the number of type arguments to match the number of type parameters.
+    comment: |-
+      Parameters:
+      0: the name of the function being referenced
+      1: the number of type parameters that were declared
+      2: the number of type arguments provided
+  WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD:
+    problemMessage: "The method '{0}' is declared with {1} type parameters, but {2} type arguments are given."
+    correctionMessage: Try adjusting the number of type arguments.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the method being referenced (<i>G</i>)
+      1: the number of type parameters that were declared
+      2: the number of type arguments provided
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function is invoked
+      with a different number of type arguments than the number of type
+      parameters specified in its declaration. There must either be no type
+      arguments or the number of arguments must match the number of parameters.
+
+      #### Example
+
+      The following code produces this diagnostic because the invocation of the
+      method `m` has two type arguments, but the declaration of `m` only has one
+      type parameter:
+
+      ```dart
+      class C {
+        int m<A>(A a) => 0;
+      }
+
+      int f(C c) => c.m[!<int, int>!](2);
+      ```
+
+      #### Common fixes
+
+      If the type arguments are necessary, then make them match the number of
+      type parameters by either adding or removing type arguments:
+
+      ```dart
+      class C {
+        int m<A>(A a) => 0;
+      }
+
+      int f(C c) => c.m<int>(2);
+      ```
+
+      If the type arguments aren't necessary, then remove them:
+
+      ```dart
+      class C {
+        int m<A>(A a) => 0;
+      }
+
+      int f(C c) => c.m(2);
+      ```
+  WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE:
+    problemMessage: "'{0}' can't be used contravariantly or invariantly in '{1}'."
+    correctionMessage: Try not using class type parameters in types of formal parameters of function types, nor in explicitly contravariant or invariant superinterfaces.
+    comment: |-
+      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`.
+  WRONG_TYPE_PARAMETER_VARIANCE_POSITION:
+    problemMessage: "The '{0}' type parameter '{1}' can't be used in an '{2}' position."
+    correctionMessage: "Try removing the type parameter or change the explicit variance modifier declaration for the type parameter to another one of 'in', 'out', or 'inout'."
+    comment: |-
+      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
+  YIELD_EACH_IN_NON_GENERATOR:
+    sharedName: YIELD_IN_NON_GENERATOR
+    problemMessage: "Yield-each statements must be in a generator function (one marked with either 'async*' or 'sync*')."
+    correctionMessage: "Try adding 'async*' or 'sync*' to the enclosing function."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `yield` or `yield*` statement
+      appears in a function whose body isn't marked with one of the `async*` or
+      `sync*` modifiers.
+
+      #### Example
+
+      The following code produces this diagnostic because `yield` is being used
+      in a function whose body doesn't have a modifier:
+
+      ```dart
+      Iterable<int> get digits {
+        yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+      }
+      ```
+
+      The following code produces this diagnostic because `yield*` is being used
+      in a function whose body has the `async` modifier rather than the `async*`
+      modifier:
+
+      ```dart
+      Stream<int> get digits async {
+        yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+      }
+      ```
+
+      #### Common fixes
+
+      Add a modifier, or change the existing modifier to be either `async*` or
+      `sync*`:
+
+      ```dart
+      Iterable<int> get digits sync* {
+        yield* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+      }
+      ```
+  YIELD_IN_NON_GENERATOR:
+    problemMessage: "Yield statements must be in a generator function (one marked with either 'async*' or 'sync*')."
+    correctionMessage: "Try adding 'async*' or 'sync*' to the enclosing function."
+    hasPublishedDocs: true
+    comment: |-
+      ?? Yield: It is a compile-time error if a yield statement appears in a
+      function that is not a generator function.
+
+      No parameters.
+  YIELD_OF_INVALID_TYPE:
+    problemMessage: "The type '{0}' implied by the 'yield' expression must be assignable to '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the type of the expression after `yield`
+      1: the return type of the function containing the `yield`
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type of object produced by a
+      `yield` expression doesn't match the type of objects that are to be
+      returned from the `Iterable` or `Stream` types that are returned from a
+      generator (a function or method marked with either `sync*` or `async*`).
+
+      #### Example
+
+      The following code produces this diagnostic because the getter `zero` is
+      declared to return an `Iterable` that returns integers, but the `yield` is
+      returning a string from the iterable:
+
+      ```dart
+      Iterable<int> get zero sync* {
+        yield [!'0'!];
+      }
+      ```
+
+      #### Common fixes
+
+      If the return type of the function is correct, then fix the expression
+      following the keyword `yield` to return the correct type:
+
+      ```dart
+      Iterable<int> get zero sync* {
+        yield 0;
+      }
+      ```
+
+      If the expression following the `yield` is correct, then change the return
+      type of the function to allow it:
+
+      ```dart
+      Iterable<String> get zero sync* {
+        yield '0';
+      }
+      ```
+FfiCode:
+  ANNOTATION_ON_POINTER_FIELD:
+    problemMessage: "Fields in a struct class whose type is 'Pointer' should not have any annotations."
+    correctionMessage: Try removing the annotation.
+    comment: No parameters.
+  ARGUMENT_MUST_BE_A_CONSTANT:
+    problemMessage: "Argument '{0}' must be a constant."
+    correctionMessage: Try replacing the value with a literal or const.
+    comment: |-
+      Parameters:
+      0: the name of the argument
+  CREATION_OF_STRUCT_OR_UNION:
+    problemMessage: "Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor."
+    correctionMessage: "Try allocating it via allocation, or load from a 'Pointer'."
+    comment: No parameters.
+  EMPTY_STRUCT:
+    problemMessage: "Struct '{0}' is empty. Empty structs are undefined behavior."
+    correctionMessage: "Try adding a field to '{0}' or use a different Struct."
+    comment: |-
+      Parameters:
+      0: the name of the struct class
+  EXTRA_ANNOTATION_ON_STRUCT_FIELD:
+    problemMessage: Fields in a struct class must have exactly one annotation indicating the native type.
+    correctionMessage: Try removing the extra annotation.
+    comment: No parameters.
+  EXTRA_SIZE_ANNOTATION_CARRAY:
+    problemMessage: "'Array's must have exactly one 'Array' annotation."
+    correctionMessage: Try removing the extra annotation.
+    comment: No parameters.
+  FFI_NATIVE_ONLY_STATIC:
+    problemMessage: FfiNative annotations can only be used on static functions.
+    correctionMessage: Change the method to static.
+    comment: No parameters.
+  FIELD_INITIALIZER_IN_STRUCT:
+    problemMessage: "Constructors in subclasses of 'Struct' and 'Union' can't have field initializers."
+    correctionMessage: Try removing the field initializer and marking the field as external.
+    comment: No parameters.
+  FIELD_IN_STRUCT_WITH_INITIALIZER:
+    problemMessage: "Fields in subclasses of 'Struct' and 'Union' can't have initializers."
+    correctionMessage: Try removing the initializer and marking the field as external.
+    comment: No parameters.
+  FIELD_MUST_BE_EXTERNAL_IN_STRUCT:
+    problemMessage: "Fields of 'Struct' and 'Union' subclasses must be marked external."
+    correctionMessage: "Try adding the 'external' modifier."
+    comment: No parameters.
+  GENERIC_STRUCT_SUBCLASS:
+    problemMessage: "The class '{0}' can't extend 'Struct' or 'Union' because it is generic."
+    correctionMessage: "Try removing the type parameters from '{0}'."
+    comment: |-
+      Parameters:
+      0: the name of the struct class
+  INVALID_EXCEPTION_VALUE:
+    problemMessage: "The method 'Pointer.fromFunction' must not have an exceptional return value (the second argument) when the return type of the function is either 'void', 'Handle' or 'Pointer'."
+    correctionMessage: Try removing the exceptional return value.
+    comment: No parameters.
+  INVALID_FIELD_TYPE_IN_STRUCT:
+    problemMessage: "Fields in struct classes can't have the type '{0}'. They can only be declared as 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'."
+    correctionMessage: "Try using 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'."
+    comment: |-
+      Parameters:
+      0: the type of the field
+  LEAF_CALL_MUST_NOT_RETURN_HANDLE:
+    problemMessage: FFI leaf call must not return a Handle.
+    correctionMessage: Try changing the return type to primitive or struct.
+    comment: No parameters.
+  LEAF_CALL_MUST_NOT_TAKE_HANDLE:
+    problemMessage: FFI leaf call must not take arguments of type Handle.
+    correctionMessage: Try changing the argument type to primitive or struct.
+    comment: No parameters.
+  MISMATCHED_ANNOTATION_ON_STRUCT_FIELD:
+    problemMessage: The annotation does not match the declared type of the field.
+    correctionMessage: Try using a different annotation or changing the declared type to match.
+    comment: No parameters.
+  MISSING_ANNOTATION_ON_STRUCT_FIELD:
+    problemMessage: "Fields in a struct class must either have the type 'Pointer' or an annotation indicating the native type."
+    correctionMessage: Try adding an annotation.
+    comment: No parameters.
+  MISSING_EXCEPTION_VALUE:
+    problemMessage: "The method 'Pointer.fromFunction' must have an exceptional return value (the second argument) when the return type of the function is neither 'void', 'Handle' or 'Pointer'."
+    correctionMessage: Try adding an exceptional return value.
+    comment: No parameters.
+  MISSING_FIELD_TYPE_IN_STRUCT:
+    problemMessage: "Fields in struct classes must have an explicitly declared type of 'int', 'double' or 'Pointer'."
+    correctionMessage: "Try using 'int', 'double' or 'Pointer'."
+    comment: |-
+      Parameters:
+      0: the type of the field
+  MISSING_SIZE_ANNOTATION_CARRAY:
+    problemMessage: "'Array's must have exactly one 'Array' annotation."
+    correctionMessage: "Try adding a 'Array' annotation."
+    comment: No parameters.
+  MUST_BE_A_NATIVE_FUNCTION_TYPE:
+    problemMessage: "The type '{0}' given to '{1}' must be a valid 'dart:ffi' native function type."
+    correctionMessage: "Try changing the type to only use members for 'dart:ffi'."
+    comment: |-
+      Parameters:
+      0: the type that should be a valid dart:ffi native type.
+      1: the name of the function whose invocation depends on this relationship
+  MUST_BE_A_SUBTYPE:
+    problemMessage: "The type '{0}' must be a subtype of '{1}' for '{2}'."
+    correctionMessage: Try changing one or both of the type arguments.
+    comment: |-
+      Parameters:
+      0: the type that should be a subtype
+      1: the supertype that the subtype is compared to
+      2: the name of the function whose invocation depends on this relationship
+  NON_CONSTANT_TYPE_ARGUMENT:
+    problemMessage: "The type arguments to '{0}' must be compile time constants but type parameters are not constants."
+    correctionMessage: Try changing the type argument to be a constant type.
+    comment: |-
+      Parameters:
+      0: the name of the function, method, or constructor having type arguments
+  NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER:
+    problemMessage: "The type argument for the pointer '{0}' must be a 'NativeFunction' in order to use 'asFunction'."
+    correctionMessage: "Try changing the type argument to be a 'NativeFunction'."
+    comment: |-
+      Parameters:
+      0: the type that should be a valid dart:ffi native type.
+  NON_POSITIVE_ARRAY_DIMENSION:
+    problemMessage: Array dimensions must be positive numbers.
+    correctionMessage: Try changing the input to a positive number.
+    comment: No parameters.
+  NON_SIZED_TYPE_ARGUMENT:
+    problemMessage: "Type arguments to '{0}' can't have the type '{1}'. They can only be declared as native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'."
+    correctionMessage: "Try using a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'."
+    comment: |-
+      Parameters:
+      0: the type of the field
+  PACKED_ANNOTATION:
+    problemMessage: "Structs must have at most one 'Packed' annotation."
+    correctionMessage: "Try removing extra 'Packed' annotations."
+    comment: No parameters.
+  PACKED_ANNOTATION_ALIGNMENT:
+    problemMessage: Only packing to 1, 2, 4, 8, and 16 bytes is supported.
+    correctionMessage: "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16."
+    comment: No parameters.
+  PACKED_NESTING_NON_PACKED:
+    problemMessage: "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' is not supported."
+    correctionMessage: Try packing the nested struct or packing the nested struct more tightly.
+    comment: |-
+      Parameters:
+      0: the name of the outer struct
+      1: the name of the struct being nested
+  SIZE_ANNOTATION_DIMENSIONS:
+    problemMessage: "'Array's must have an 'Array' annotation that matches the dimensions."
+    correctionMessage: "Try adjusting the arguments in the 'Array' annotation."
+    comment: No parameters.
+  SUBTYPE_OF_FFI_CLASS_IN_EXTENDS:
+    sharedName: SUBTYPE_OF_FFI_CLASS
+    problemMessage: "The class '{0}' can't extend '{1}'."
+    correctionMessage: "Try extending 'Struct' or 'Union'."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+  SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS:
+    sharedName: SUBTYPE_OF_FFI_CLASS
+    problemMessage: "The class '{0}' can't implement '{1}'."
+    correctionMessage: "Try extending 'Struct' or 'Union'."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+  SUBTYPE_OF_FFI_CLASS_IN_WITH:
+    sharedName: SUBTYPE_OF_FFI_CLASS
+    problemMessage: "The class '{0}' can't mix in '{1}'."
+    correctionMessage: "Try extending 'Struct' or 'Union'."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+  SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS:
+    sharedName: SUBTYPE_OF_STRUCT_CLASS
+    problemMessage: "The class '{0}' can't extend '{1}' because '{1}' is a subtype of 'Struct' or 'Union'."
+    correctionMessage: "Try extending 'Struct' or 'Union' directly."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+  SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS:
+    sharedName: SUBTYPE_OF_STRUCT_CLASS
+    problemMessage: "The class '{0}' can't implement '{1}' because '{1}' is a subtype of 'Struct' or 'Union'."
+    correctionMessage: "Try extending 'Struct' or 'Union' directly."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+  SUBTYPE_OF_STRUCT_CLASS_IN_WITH:
+    sharedName: SUBTYPE_OF_STRUCT_CLASS
+    problemMessage: "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of 'Struct' or 'Union'."
+    correctionMessage: "Try extending 'Struct' or 'Union' directly."
+    comment: |-
+      Parameters:
+      0: the name of the subclass
+      1: the name of the class being extended, implemented, or mixed in
+HintCode:
+  ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER:
+    problemMessage: "The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the actual argument type
+      1: the name of the expected function return type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an invocation of
+      `Future.catchError` has an argument that is a function whose parameters
+      aren't compatible with the arguments that will be passed to the function
+      when it's invoked. The static type of the first argument to `catchError`
+      is just `Function`, even though the function that is passed in is expected
+      to have either a single parameter of type `Object` or two parameters of
+      type `Object` and `StackTrace`.
+
+      #### Example
+
+      The following code produces this diagnostic because the closure being
+      passed to `catchError` doesn't take any parameters, but the function is
+      required to take at least one parameter:
+
+      ```dart
+      void f(Future<int> f) {
+        f.catchError([!() => 0!]);
+      }
+      ```
+
+      The following code produces this diagnostic because the closure being
+      passed to `catchError` takes three parameters, but it can't have more than
+      two required parameters:
+
+      ```dart
+      void f(Future<int> f) {
+        f.catchError([!(one, two, three) => 0!]);
+      }
+      ```
+
+      The following code produces this diagnostic because even though the closure
+      being passed to `catchError` takes one parameter, the closure doesn't have
+      a type that is compatible with `Object`:
+
+      ```dart
+      void f(Future<int> f) {
+        f.catchError([!(String error) => 0!]);
+      }
+      ```
+
+      #### Common fixes
+
+      Change the function being passed to `catchError` so that it has either one
+      or two required parameters, and the parameters have the required types:
+
+      ```dart
+      void f(Future<int> f) {
+        f.catchError((Object error) => 0);
+      }
+      ```
+  ASSIGNMENT_OF_DO_NOT_STORE:
+    problemMessage: "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable."
+    correctionMessage: Try removing the assignment.
+    comment: Users should not assign values marked `@doNotStore`.
+  CAN_BE_NULL_AFTER_NULL_AWARE:
+    problemMessage: "The receiver uses '?.', so its value can be null."
+    correctionMessage: "Replace the '.' with a '?.' in the invocation."
+    comment: |-
+      When the target expression uses '?.' operator, it can be `null`, so all the
+      subsequent invocations should also use '?.' operator.
+  DEAD_CODE:
+    problemMessage: Dead code.
+    correctionMessage: Try removing the code, or fixing the code before it so that it can be reached.
+    hasPublishedDocs: true
+    comment: |-
+      Dead code is code that is never reached, this can happen for instance if a
+      statement follows a return statement.
+
+      No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when code is found that won't be
+      executed because execution will never reach the code.
+
+      #### Examples
+
+      The following code produces this diagnostic because the invocation of
+      `print` occurs after the function has returned:
+
+      ```dart
+      void f() {
+        return;
+        [!print('here');!]
+      }
+      ```
+
+      #### Common fixes
+
+      If the code isn't needed, then remove it:
+
+      ```dart
+      void f() {
+        return;
+      }
+      ```
+
+      If the code needs to be executed, then either move the code to a place
+      where it will be executed:
+
+      ```dart
+      void f() {
+        print('here');
+        return;
+      }
+      ```
+
+      Or, rewrite the code before it, so that it can be reached:
+
+      ```dart
+      void f({bool skipPrinting = true}) {
+        if (skipPrinting) {
+          return;
+        }
+        print('here');
+      }
+      ```
+  DEAD_CODE_CATCH_FOLLOWING_CATCH:
+    problemMessage: "Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached."
+    correctionMessage: Try reordering the catch clauses so that they can be reached, or removing the unreachable catch clauses.
+    hasPublishedDocs: true
+    comment: |-
+      Dead code is code that is never reached. This case covers cases where the
+      user has catch clauses after `catch (e)` or `on Object catch (e)`.
+
+      No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `catch` clause is found that
+      can't be executed because it’s after a `catch` clause of the form
+      `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
+      the thrown object is selected, and both of those forms will match any
+      object, so no `catch` clauses that follow them will be selected.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      void f() {
+        try {
+        } catch (e) {
+        } [!on String {
+        }!]
+      }
+      ```
+
+      #### Common fixes
+
+      If the clause should be selectable, then move the clause before the general
+      clause:
+
+      ```dart
+      void f() {
+        try {
+        } on String {
+        } catch (e) {
+        }
+      }
+      ```
+
+      If the clause doesn't need to be selectable, then remove it:
+
+      ```dart
+      void f() {
+        try {
+        } catch (e) {
+        }
+      }
+      ```
+  DEAD_CODE_ON_CATCH_SUBTYPE:
+    problemMessage: "Dead code: This on-catch block won’t be executed because '{0}' is a subtype of '{1}' and hence will have been caught already."
+    correctionMessage: Try reordering the catch clauses so that this block can be reached, or removing the unreachable catch clause.
+    hasPublishedDocs: true
+    comment: |-
+      Dead code is code that is never reached. This case covers cases where the
+      user has an on-catch clause such as `on A catch (e)`, where a supertype of
+      `A` was already caught.
+
+      Parameters:
+      0: name of the subtype
+      1: name of the supertype
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `catch` clause is found that
+      can't be executed because it is after a `catch` clause that catches either
+      the same type or a supertype of the clause's type. The first `catch` clause
+      that matches the thrown object is selected, and the earlier clause always
+      matches anything matchable by the highlighted clause, so the highlighted
+      clause will never be selected.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      void f() {
+        try {
+        } on num {
+        } [!on int {
+        }!]
+      }
+      ```
+
+      #### Common fixes
+
+      If the clause should be selectable, then move the clause before the general
+      clause:
+
+      ```dart
+      void f() {
+        try {
+        } on int {
+        } on num {
+        }
+      }
+      ```
+
+      If the clause doesn't need to be selectable, then remove it:
+
+      ```dart
+      void f() {
+        try {
+        } on num {
+        }
+      }
+      ```
+  DEPRECATED_FUNCTION_CLASS_DECLARATION:
+    problemMessage: "Declaring a class named 'Function' is deprecated."
+    correctionMessage: Try renaming the class.
+    comment: Users should not create a class named `Function` anymore.
+  DEPRECATED_MEMBER_USE:
+    problemMessage: "'{0}' is deprecated and shouldn't be used."
+    correctionMessage: Try replacing the use of the deprecated member with the replacement.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a deprecated library or class
+      member is used in a different package.
+
+      #### Examples
+
+      If the method `m` in the class `C` is annotated with `@deprecated`, then
+      the following code produces this diagnostic:
+
+      ```dart
+      void f(C c) {
+        c.[!m!]();
+      }
+      ```
+
+      #### Common fixes
+
+      The documentation for declarations that are annotated with `@deprecated`
+      should indicate what code to use in place of the deprecated code.
+  DEPRECATED_MEMBER_USE_WITH_MESSAGE:
+    sharedName: DEPRECATED_MEMBER_USE
+    problemMessage: "'{0}' is deprecated and shouldn't be used. {1}."
+    correctionMessage: Try replacing the use of the deprecated member with the replacement.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+      1: message details
+  DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE:
+    problemMessage: "'{0}' is deprecated and shouldn't be used."
+    correctionMessage: Try replacing the use of the deprecated member with the replacement.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a deprecated library member or
+      class member is used in the same package in which it's declared.
+
+      #### Examples
+
+      The following code produces this diagnostic because `x` is deprecated:
+
+      ```dart
+      @deprecated
+      var x = 0;
+      var y = [!x!];
+      ```
+
+      #### Common fixes
+
+      The fix depends on what's been deprecated and what the replacement is. The
+      documentation for deprecated declarations should indicate what code to use
+      in place of the deprecated code.
+  DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE:
+    sharedName: DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE
+    problemMessage: "'{0}' is deprecated and shouldn't be used. {1}."
+    correctionMessage: Try replacing the use of the deprecated member with the replacement.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the member
+      1: message details
+  DEPRECATED_MIXIN_FUNCTION:
+    sharedName: DEPRECATED_SUBTYPE_OF_FUNCTION
+    problemMessage: "Mixing in 'Function' is deprecated."
+    correctionMessage: "Try removing 'Function' from the 'with' clause."
+    hasPublishedDocs: true
+    comment: No parameters.
+  DEPRECATED_IMPLEMENTS_FUNCTION:
+    sharedName: DEPRECATED_SUBTYPE_OF_FUNCTION
+    problemMessage: "Implementing 'Function' has no effect."
+    correctionMessage: "Try removing 'Function' from the 'implements' clause."
+    hasPublishedDocs: true
+    comment: No parameters.
+  DEPRECATED_EXTENDS_FUNCTION:
+    sharedName: DEPRECATED_SUBTYPE_OF_FUNCTION
+    problemMessage: "Extending 'Function' is deprecated."
+    correctionMessage: "Try removing 'Function' from the 'extends' clause."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the class `Function` is used in
+      either the `extends`, `implements`, or `with` clause of a class or mixin.
+      Using the class `Function` in this way has no semantic value, so it's
+      effectively dead code.
+
+      #### Example
+
+      The following code produces this diagnostic because `Function` is used as
+      the superclass of `F`:
+
+      ```dart
+      class F extends [!Function!] {}
+      ```
+
+      #### Common fixes
+
+      Remove the class `Function` from whichever clause it's in, and remove the
+      whole clause if `Function` is the only type in the clause:
+
+      ```dart
+      class F {}
+      ```
+  DIVISION_OPTIMIZATION:
+    problemMessage: The operator x ~/ y is more efficient than (x / y).toInt().
+    correctionMessage: "Try re-writing the expression to use the '~/' operator."
+    comment: Hint to use the ~/ operator.
+  DUPLICATE_HIDDEN_NAME:
+    problemMessage: Duplicate hidden name.
+    correctionMessage: Try removing the repeated name from the list of hidden members.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name occurs multiple times in
+      a `hide` clause. Repeating the name is unnecessary.
+
+      #### Example
+
+      The following code produces this diagnostic because the name `min` is
+      hidden more than once:
+
+      ```dart
+      import 'dart:math' hide min, [!min!];
+
+      var x = pi;
+      ```
+
+      #### Common fixes
+
+      If the name was mistyped in one or more places, then correct the mistyped
+      names:
+
+      ```dart
+      import 'dart:math' hide max, min;
+
+      var x = pi;
+      ```
+
+      If the name wasn't mistyped, then remove the unnecessary name from the
+      list:
+
+      ```dart
+      import 'dart:math' hide min;
+
+      var x = pi;
+      ```
+  DUPLICATE_IGNORE:
+    problemMessage: "The diagnostic '{0}' doesn't need to be ignored here because it's already being ignored."
+    correctionMessage: Try removing the name from the list, or removing the whole comment if this is the only name in the list.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the diagnostic being ignored
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a diagnostic name appears in an
+      `ignore` comment, but the diagnostic is already being ignored, either
+      because it's already included in the same `ignore` comment or because it
+      appears in an `ignore-in-file` comment.
+
+      #### Example
+
+      The following code produces this diagnostic because the diagnostic named
+      `unused_local_variable` is already being ignored for the whole file so it
+      doesn't need to be ignored on a specific line:
+
+      ```dart
+      // ignore_for_file: unused_local_variable
+      void f() {
+        // ignore: [!unused_local_variable!]
+        var x = 0;
+      }
+      ```
+
+      The following code produces this diagnostic because the diagnostic named
+      `unused_local_variable` is being ignored twice on the same line:
+
+      ```dart
+      void f() {
+        // ignore: unused_local_variable, [!unused_local_variable!]
+        var x = 0;
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the ignore comment, or remove the unnecessary diagnostic name if the
+      ignore comment is ignoring more than one diagnostic:
+
+      ```dart
+      // ignore_for_file: unused_local_variable
+      void f() {
+        var x = 0;
+      }
+      ```
+  DUPLICATE_IMPORT:
+    problemMessage: Duplicate import.
+    correctionMessage: Try removing all but one import of the library.
+    hasPublishedDocs: true
+    comment: |-
+      Duplicate imports.
+
+      No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import directive is found
+      that is the same as an import before it in the file. The second import
+      doesn’t add value and should be removed.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      import 'package:meta/meta.dart';
+      import [!'package:meta/meta.dart'!];
+
+      @sealed class C {}
+      ```
+
+      #### Common fixes
+
+      Remove the unnecessary import:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @sealed class C {}
+      ```
+  DUPLICATE_SHOWN_NAME:
+    problemMessage: Duplicate shown name.
+    correctionMessage: Try removing the repeated name from the list of shown members.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a name occurs multiple times in
+      a `show` clause. Repeating the name is unnecessary.
+
+      #### Example
+
+      The following code produces this diagnostic because the name `min` is shown
+      more than once:
+
+      ```dart
+      import 'dart:math' show min, [!min!];
+
+      var x = min(2, min(0, 1));
+      ```
+
+      #### Common fixes
+
+      If the name was mistyped in one or more places, then correct the mistyped
+      names:
+
+      ```dart
+      import 'dart:math' show max, min;
+
+      var x = max(2, min(0, 1));
+      ```
+
+      If the name wasn't mistyped, then remove the unnecessary name from the
+      list:
+
+      ```dart
+      import 'dart:math' show min;
+
+      var x = min(2, min(0, 1));
+      ```
+  EQUAL_ELEMENTS_IN_SET:
+    problemMessage: "Two elements in a set literal shouldn't be equal."
+    correctionMessage: Change or remove the duplicate element.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an element in a non-constant set
+      is the same as a previous element in the same set. If two elements are the
+      same, then the second value is ignored, which makes having both elements
+      pointless and likely signals a bug.
+
+      #### Example
+
+      The following code produces this diagnostic because the element `1` appears
+      twice:
+
+      ```dart
+      const a = 1;
+      const b = 1;
+      var s = <int>{a, [!b!]};
+      ```
+
+      #### Common fixes
+
+      If both elements should be included in the set, then change one of the
+      elements:
+
+      ```dart
+      const a = 1;
+      const b = 2;
+      var s = <int>{a, b};
+      ```
+
+      If only one of the elements is needed, then remove the one that isn't
+      needed:
+
+      ```dart
+      const a = 1;
+      var s = <int>{a};
+      ```
+
+      Note that literal sets preserve the order of their elements, so the choice
+      of which element to remove might affect the order in which elements are
+      returned by an iterator.
+  EQUAL_KEYS_IN_MAP:
+    problemMessage: "Two keys in a map literal shouldn't be equal."
+    correctionMessage: Change or remove the duplicate key.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a key in a non-constant map is
+      the same as a previous key in the same map. If two keys are the same, then
+      the second value overwrites the first value, which makes having both pairs
+      pointless and likely signals a bug.
+
+      #### Example
+
+      The following code produces this diagnostic because the keys `a` and `b`
+      have the same value:
+
+      ```dart
+      const a = 1;
+      const b = 1;
+      var m = <int, String>{a: 'a', [!b!]: 'b'};
+      ```
+
+      #### Common fixes
+
+      If both entries should be included in the map, then change one of the keys:
+
+      ```dart
+      const a = 1;
+      const b = 2;
+      var m = <int, String>{a: 'a', b: 'b'};
+      ```
+
+      If only one of the entries is needed, then remove the one that isn't
+      needed:
+
+      ```dart
+      const a = 1;
+      var m = <int, String>{a: 'a'};
+      ```
+
+      Note that literal maps preserve the order of their entries, so the choice
+      of which entry to remove might affect the order in which the keys and
+      values are returned by an iterator.
+  FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE:
+    problemMessage: "A file in the 'lib' directory shouldn't import a file outside the 'lib' directory."
+    correctionMessage: "Try removing the import, or moving the imported file inside the 'lib' directory."
+    comment: |-
+      It is a bad practice for a source file in a package "lib" directory
+      hierarchy to traverse outside that directory hierarchy. For example, a
+      source file in the "lib" directory should not contain a directive such as
+      `import '../web/some.dart'` which references a file outside the lib
+      directory.
+  FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE:
+    problemMessage: "A file outside the 'lib' directory shouldn't reference a file inside the 'lib' directory using a relative path."
+    correctionMessage: "Try using a package: URI instead."
+    comment: |-
+      It is a bad practice for a source file ouside a package "lib" directory
+      hierarchy to traverse into that directory hierarchy. For example, a source
+      file in the "web" directory should not contain a directive such as
+      `import '../lib/some.dart'` which references a file inside the lib
+      directory.
+  IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION:
+    problemMessage: "The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this library."
+    correctionMessage: Try changing the import to not be deferred, or rename the function in the imported library.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library that declares a
+      function named `loadLibrary` is imported using a deferred import. A
+      deferred import introduces an implicit function named `loadLibrary`. This
+      function is used to load the contents of the deferred library, and the
+      implicit function hides the explicit declaration in the deferred library.
+
+      For more information, see the language tour's coverage of
+      [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+      #### Example
+
+      Given a file (`a.dart`) that defines a function named `loadLibrary`:
+
+      ```dart
+      %uri="lib/a.dart"
+      void loadLibrary(Library library) {}
+
+      class Library {}
+      ```
+
+      The following code produces this diagnostic because the implicit
+      declaration of `a.loadLibrary` is hiding the explicit declaration of
+      `loadLibrary` in `a.dart`:
+
+      ```dart
+      [!import 'a.dart' deferred as a;!]
+
+      void f() {
+        a.Library();
+      }
+      ```
+
+      #### Common fixes
+
+      If the imported library isn't required to be deferred, then remove the
+      keyword `deferred`:
+
+      ```dart
+      import 'a.dart' as a;
+
+      void f() {
+        a.Library();
+      }
+      ```
+
+      If the imported library is required to be deferred and you need to
+      reference the imported function, then rename the function in the imported
+      library:
+
+      ```dart
+      void populateLibrary(Library library) {}
+
+      class Library {}
+      ```
+
+      If the imported library is required to be deferred and you don't need to
+      reference the imported function, then add a `hide` clause:
+
+      ```dart
+      import 'a.dart' deferred as a hide loadLibrary;
+
+      void f() {
+        a.Library();
+      }
+      ```
+
+      If type arguments shouldn't be required for the class, then mark the class
+      with the `@optionalTypeArgs` annotation (from `package:meta`):
+  IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE:
+    problemMessage: "The library '{0}' is legacy, and should not be imported into a null safe library."
+    correctionMessage: Try migrating the imported library.
+    comment: "https://github.com/dart-lang/sdk/issues/44063"
+  INFERENCE_FAILURE_ON_COLLECTION_LITERAL:
+    problemMessage: "The type argument(s) of '{0}' can't be inferred."
+    correctionMessage: "Use explicit type argument(s) for '{0}'."
+    comment: |-
+      When "strict-inference" is enabled, collection literal types must be
+      inferred via the context type, or have type arguments.
+  INFERENCE_FAILURE_ON_FUNCTION_INVOCATION:
+    problemMessage: "The type argument(s) of the function '{0}' can't be inferred."
+    correctionMessage: "Use explicit type argument(s) for '{0}'."
+    comment: |-
+      When "strict-inference" is enabled, types in function invocations must be
+      inferred via the context type, or have type arguments.
+  INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE:
+    problemMessage: "The return type of '{0}' cannot be inferred."
+    correctionMessage: "Declare the return type of '{0}'."
+    comment: |-
+      When "strict-inference" is enabled, recursive local functions, top-level
+      functions, methods, and function-typed function parameters must all
+      specify a return type. See the strict-inference resource:
+
+      https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md
+  INFERENCE_FAILURE_ON_GENERIC_INVOCATION:
+    problemMessage: "The type argument(s) of the generic function type '{0}' can't be inferred."
+    correctionMessage: "Use explicit type argument(s) for '{0}'."
+    comment: |-
+      When "strict-inference" is enabled, types in function invocations must be
+      inferred via the context type, or have type arguments.
+  INFERENCE_FAILURE_ON_INSTANCE_CREATION:
+    problemMessage: "The type argument(s) of the constructor '{0}' can't be inferred."
+    correctionMessage: "Use explicit type argument(s) for '{0}'."
+    comment: |-
+      When "strict-inference" is enabled, types in instance creation
+      (constructor calls) must be inferred via the context type, or have type
+      arguments.
+  INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE:
+    problemMessage: "The type of {0} can't be inferred without either a type or initializer."
+    correctionMessage: Try specifying the type of the variable.
+    comment: |-
+      When "strict-inference" in enabled, uninitialized variables must be
+      declared with a specific type.
+  INFERENCE_FAILURE_ON_UNTYPED_PARAMETER:
+    problemMessage: "The type of {0} can't be inferred; a type must be explicitly provided."
+    correctionMessage: Try specifying the type of the parameter.
+    comment: |-
+      When "strict-inference" in enabled, function parameters must be
+      declared with a specific type, or inherit a type.
+  INVALID_ANNOTATION_TARGET:
+    problemMessage: "The annotation '{0}' can only be used on {1}"
+    comment: |-
+      Parameters:
+      0: the name of the annotation
+      1: the list of valid targets
+  INVALID_EXPORT_OF_INTERNAL_ELEMENT:
+    problemMessage: "The member '{0}' can't be exported as a part of a package's public API."
+    correctionMessage: "Try using a hide clause to hide '{0}'."
+    comment: |-
+      This hint is generated anywhere where an element annotated with `@internal`
+      is exported as a part of a package's public API.
+
+      Parameters:
+      0: the name of the element
+  INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY:
+    problemMessage: "The member '{0}' can't be exported as a part of a package's public API, but is indirectly exported as part of the signature of '{1}'."
+    correctionMessage: "Try using a hide clause to hide '{0}'."
+    comment: |-
+      This hint is generated anywhere where an element annotated with `@internal`
+      is exported indirectly as a part of a package's public API.
+
+      Parameters:
+      0: the name of the element
+  INVALID_FACTORY_ANNOTATION:
+    problemMessage: Only methods can be annotated as factories.
+    comment: |-
+      This hint is generated anywhere a @factory annotation is associated with
+      anything other than a method.
+  INVALID_FACTORY_METHOD_DECL:
+    problemMessage: "Factory method '{0}' must have a return type."
+    comment: |-
+      This hint is generated anywhere a @factory annotation is associated with
+      a method that does not declare a return type.
+  INVALID_FACTORY_METHOD_IMPL:
+    problemMessage: "Factory method '{0}' doesn't return a newly allocated object."
+    comment: |-
+      This hint is generated anywhere a @factory annotation is associated with
+      a non-abstract method that can return anything other than a newly allocated
+      object.
+
+      Parameters:
+      0: the name of the method
+  INVALID_IMMUTABLE_ANNOTATION:
+    problemMessage: Only classes can be annotated as being immutable.
+    comment: |-
+      This hint is generated anywhere an @immutable annotation is associated with
+      anything other than a class.
+  INVALID_INTERNAL_ANNOTATION:
+    problemMessage: "Only public elements in a package's private API can be annotated as being internal."
+    comment: |-
+      This hint is generated anywhere a @internal annotation is associated with
+      an element found in a package's public API.
+  INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The language version override can't specify a version greater than the latest known language version: {0}.{1}"
+    correctionMessage: Try removing the language version override.
+  INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override number must begin with '@dart'"
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: The language version override must be before any declaration or directive.
+    correctionMessage: Try moving the language version override to the top of the file.
+  INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override comment must be specified with the word 'dart' in all lower case"
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override comment must be specified with a version number, like '2.0', after the '=' character."
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override number can't be prefixed with a letter"
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override comment can't be followed by any non-whitespace characters"
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: The Dart language version override comment must be specified with exactly two slashes.
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS:
+    sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
+    problemMessage: "The Dart language version override comment must be specified with an '=' character"
+    correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
+    comment: |-
+      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
+  INVALID_LITERAL_ANNOTATION:
+    problemMessage: Only const constructors can have the `@literal` annotation.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the `@literal` annotation is
+      applied to anything other than a const constructor.
+
+      #### Examples
+
+      The following code produces this diagnostic because the constructor isn't
+      a `const` constructor:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        [!@literal!]
+        C();
+      }
+      ```
+
+      The following code produces this diagnostic because `x` isn't a
+      constructor:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      [!@literal!]
+      var x;
+      ```
+
+      #### Common fixes
+
+      If the annotation is on a constructor and the constructor should always be
+      invoked with `const`, when possible, then mark the constructor with the
+      `const` keyword:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @literal
+        const C();
+      }
+      ```
+
+      If the constructor can't be marked as `const`, then remove the annotation.
+
+      If the annotation is on anything other than a constructor, then remove the
+      annotation:
+
+      ```dart
+      var x;
+      ```
+  INVALID_NON_VIRTUAL_ANNOTATION:
+    problemMessage: "The member '{0}' can't be '@nonVirtual' because it isn't a concrete instance member."
+    correctionMessage: Try removing @nonVirtual.
+    comment: |-
+      This hint is generated anywhere where `@nonVirtual` annotates something
+      other than a non-abstract instance member in a class or mixin.
+
+      Parameters:
+      0: the name of the member
+  INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER:
+    problemMessage: "The member '{0}' is declared non-virtual in '{1}' and can't be overridden in subclasses."
+    comment: |-
+      This hint is generated anywhere where an instance member annotated with
+      `@nonVirtual` is overridden in a subclass.
+
+      Parameters:
+      0: the name of the member
+      1: the name of the defining class
+  INVALID_REQUIRED_NAMED_PARAM:
+    problemMessage: "The type parameter '{0}' is annotated with @required but only named parameters without a default value can be annotated with it."
+    correctionMessage: Remove @required.
+    comment: |-
+      This hint is generated anywhere where `@required` annotates a named
+      parameter with a default value.
+
+      Parameters:
+      0: the name of the member
+  INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM:
+    problemMessage: "Incorrect use of the annotation @required on the optional positional parameter '{0}'. Optional positional parameters cannot be required."
+    correctionMessage: Remove @required.
+    comment: |-
+      This hint is generated anywhere where `@required` annotates an optional
+      positional parameter.
+
+      Parameters:
+      0: the name of the member
+  INVALID_REQUIRED_POSITIONAL_PARAM:
+    problemMessage: "Redundant use of the annotation @required on the required positional parameter '{0}'."
+    correctionMessage: Remove @required.
+    comment: |-
+      This hint is generated anywhere where `@required` annotates a non optional
+      positional parameter.
+
+      Parameters:
+      0: the name of the member
+  RETURN_TYPE_INVALID_FOR_CATCH_ERROR:
+    sharedName: INVALID_RETURN_TYPE_FOR_CATCH_ERROR
+    problemMessage: "The return type '{0}' isn't assignable to '{1}', as required by 'Future.catchError'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the return type of the function
+      1: the expected return type as defined by the type of the Future
+  RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR:
+    sharedName: INVALID_RETURN_TYPE_FOR_CATCH_ERROR
+    problemMessage: "A value of type '{0}' can't be returned by the 'onError' handler because it must be assignable to '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the return type as declared in the return statement
+      1: the expected return type as defined by the type of the Future
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an invocation of
+      `Future.catchError` has an argument whose return type isn't compatible with
+      the type returned by the instance of `Future`. At runtime, the method
+      `catchError` attempts to return the value from the callback as the result
+      of the future, which results in another exception being thrown.
+
+      #### Example
+
+      The following code produces this diagnostic because `future` is declared to
+      return an `int` while `callback` is declared to return a `String`, and
+      `String` isn't a subtype of `int`:
+
+      ```dart
+      void f(Future<int> future, String Function(dynamic, StackTrace) callback) {
+        future.catchError([!callback!]);
+      }
+      ```
+
+      The following code produces this diagnostic because the closure being
+      passed to `catchError` returns an `int` while `future` is declared to
+      return a `String`:
+
+      ```dart
+      void f(Future<String> future) {
+        future.catchError((error, stackTrace) => [!3!]);
+      }
+      ```
+
+      #### Common fixes
+
+      If the instance of `Future` is declared correctly, then change the callback
+      to match:
+
+      ```dart
+      void f(Future<int> future, int Function(dynamic, StackTrace) callback) {
+        future.catchError(callback);
+      }
+      ```
+
+      If the declaration of the instance of `Future` is wrong, then change it to
+      match the callback:
+
+      ```dart
+      void f(Future<String> future, String Function(dynamic, StackTrace) callback) {
+        future.catchError(callback);
+      }
+      ```
+  INVALID_SEALED_ANNOTATION:
+    problemMessage: "The member '{0}' is annotated with '@sealed' but only classes can be annotated with it."
+    correctionMessage: Remove @sealed.
+    comment: |-
+      This hint is generated anywhere where `@sealed` annotates something other
+      than a class.
+
+      Parameters:
+      0: the name of the member
+  INVALID_USE_OF_INTERNAL_MEMBER:
+    problemMessage: "The member '{0}' can only be used within its package."
+    comment: |-
+      This hint is generated anywhere where a member annotated with `@internal`
+      is used outside of the package in which it is declared.
+
+      Parameters:
+      0: the name of the member
+  INVALID_USE_OF_PROTECTED_MEMBER:
+    problemMessage: "The member '{0}' can only be used within instance members of subclasses of '{1}'."
+    comment: |-
+      This hint is generated anywhere where a member annotated with `@protected`
+      is used outside of an instance member of a subclass.
+
+      Parameters:
+      0: the name of the member
+      1: the name of the defining class
+  INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER:
+    problemMessage: "The member '{0}' can only be used for overriding."
+    comment: |-
+      Parameters:
+      0: the name of the member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an instance member that is
+      annotated with `visibleForOverriding` is referenced outside the library in
+      which it's declared for any reason other than to override it.
+
+      #### Example
+
+      Given a file named `a.dart` containing the following declaration:
+
+      ```dart
+      %uri="lib/a.dart"
+      import 'package:meta/meta.dart';
+
+      class A {
+        @visibleForOverriding
+        void a() {}
+      }
+      ```
+
+      The following code produces this diagnostic because the method `m` is being
+      invoked even though the only reason it's public is to allow it to be
+      overridden:
+
+      ```dart
+      import 'a.dart';
+
+      class B extends A {
+        void b() {
+          [!a!]();
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the invalid use of the member.
+  INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER:
+    problemMessage: "The member '{0}' can only be used within '{1}' or a template library."
+    comment: |-
+      This hint is generated anywhere where a member annotated with
+      `@visibleForTemplate` is used outside of a "template" Dart file.
+
+      Parameters:
+      0: the name of the member
+      1: the name of the defining class
+  INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER:
+    problemMessage: "The member '{0}' can only be used within '{1}' or a test."
+    comment: |-
+      This hint is generated anywhere where a member annotated with
+      `@visibleForTesting` is used outside the defining library, or a test.
+
+      Parameters:
+      0: the name of the member
+      1: the name of the defining class
+  INVALID_VISIBILITY_ANNOTATION:
+    problemMessage: "The member '{0}' is annotated with '{1}', but this annotation is only meaningful on declarations of public members."
+    hasPublishedDocs: true
+    comment: |-
+      This hint is generated anywhere where a private declaration is annotated
+      with `@visibleForTemplate` or `@visibleForTesting`.
+
+      Parameters:
+      0: the name of the member
+      1: the name of the annotation
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when either the `@visibleForTemplate`
+      or `@visibleForTesting` annotation is applied to a non-public declaration.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      [!@visibleForTesting!]
+      void _someFunction() {}
+
+      void f() => _someFunction();
+      ```
+
+      #### Common fixes
+
+      If the declaration doesn't need to be used by test code, then remove the
+      annotation:
+
+      ```dart
+      void _someFunction() {}
+
+      void f() => _someFunction();
+      ```
+
+      If it does, then make it public:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @visibleForTesting
+      void someFunction() {}
+
+      void f() => someFunction();
+      ```
+  INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION:
+    problemMessage: "The declaration '{0}' is annotated with 'visibleForOverriding'. Because '{0}' isn't an interface member that could be overridden, the annotation is meaningless."
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when anything other than a public
+      instance member of a class is annotated with `visibleForOverriding`.
+      Because only public instance members can be overridden outside the defining
+      library, there's no value to annotating any other declarations.
+
+      #### Example
+
+      The following code produces this diagnostic because the annotation is on a
+      class, and classes can't be overridden:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      [!@visibleForOverriding!]
+      class C {}
+      ```
+
+      #### Common fixes
+
+      Remove the annotation:
+
+      ```dart
+      class C {}
+      ```
+  MISSING_JS_LIB_ANNOTATION:
+    problemMessage: The @JS() annotation can only be used if it is also declared on the library directive.
+    correctionMessage: Try adding the annotation to the library directive.
+    comment: |-
+      Generate a hint for an element that is annotated with `@JS(...)` whose
+      library declaration is not similarly annotated.
+  MISSING_REQUIRED_PARAM:
+    problemMessage: "The parameter '{0}' is required."
+    hasPublishedDocs: true
+    comment: |-
+      Generate a hint for a constructor, function or method invocation where a
+      required parameter is missing.
+
+      Parameters:
+      0: the name of the parameter
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method or function with a
+      named parameter that is annotated as being required is invoked without
+      providing a value for the parameter.
+
+      #### Examples
+
+      The following code produces this diagnostic because the named parameter `x`
+      is required:
+
+      ```dart
+      %language=2.9
+      import 'package:meta/meta.dart';
+
+      void f({@required int x}) {}
+
+      void g() {
+        [!f!]();
+      }
+      ```
+
+      #### Common fixes
+
+      Provide the required value:
+
+      ```dart
+      %language=2.9
+      import 'package:meta/meta.dart';
+
+      void f({@required int x}) {}
+
+      void g() {
+        f(x: 2);
+      }
+      ```
+  MISSING_REQUIRED_PARAM_WITH_DETAILS:
+    sharedName: MISSING_REQUIRED_PARAM
+    problemMessage: "The parameter '{0}' is required. {1}."
+    hasPublishedDocs: true
+    comment: |-
+      Generate a hint for a constructor, function or method invocation where a
+      required parameter is missing.
+
+      Parameters:
+      0: the name of the parameter
+      1: message details
+  MISSING_RETURN:
+    problemMessage: "This function has a return type of '{0}', but doesn't end with a return statement."
+    correctionMessage: "Try adding a return statement, or changing the return type to 'void'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the declared return type
+    documentation: |-
+      #### Description
+
+      Any function or method that doesn't end with either an explicit return or a
+      throw implicitly returns `null`. This is rarely the desired behavior. The
+      analyzer produces this diagnostic when it finds an implicit return.
+
+      #### Examples
+
+      The following code produces this diagnostic because `f` doesn't end with a
+      return:
+
+      ```dart
+      %language=2.9
+      int [!f!](int x) {
+        if (x < 0) {
+          return 0;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Add a `return` statement that makes the return value explicit, even if
+      `null` is the appropriate value.
+  MIXIN_ON_SEALED_CLASS:
+    problemMessage: "The class '{0}' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '{0}' as a superclass."
+    correctionMessage: Try composing with this class, or refer to its documentation for more information.
+    hasPublishedDocs: true
+    comment: |-
+      This hint is generated anywhere where a `@sealed` class is used as a
+      a superclass constraint of a mixin.
+
+      Parameters:
+      0: the name of the sealed class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the superclass constraint of a
+      mixin is a class from a different package that was marked as `@sealed`.
+      Classes that are sealed can't be extended, implemented, mixed in, or used
+      as a superclass constraint.
+
+      #### Examples
+
+      If the package `p` defines a sealed class:
+
+      ```dart
+      %uri="package:p/p.dart"
+      import 'package:meta/meta.dart';
+
+      @sealed
+      class C {}
+      ```
+
+      Then, the following code, when in a package other than `p`, produces this
+      diagnostic:
+
+      ```dart
+      import 'package:p/p.dart';
+
+      [!mixin M on C {}!]
+      ```
+
+      #### Common fixes
+
+      If the classes that use the mixin don't need to be subclasses of the sealed
+      class, then consider adding a field and delegating to the wrapped instance
+      of the sealed class.
+  MUST_BE_IMMUTABLE:
+    problemMessage: "This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: {0}"
+    hasPublishedDocs: true
+    comment: |-
+      Generate a hint for classes that inherit from classes annotated with
+      `@immutable` but that are not immutable.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an immutable class defines one
+      or more instance fields that aren't final. A class is immutable if it's
+      marked as being immutable using the annotation `@immutable` or if it's a
+      subclass of an immutable class.
+
+      #### Examples
+
+      The following code produces this diagnostic because the field `x` isn't
+      final:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @immutable
+      class [!C!] {
+        int x;
+
+        C(this.x);
+      }
+      ```
+
+      #### Common fixes
+
+      If instances of the class should be immutable, then add the keyword `final`
+      to all non-final field declarations:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @immutable
+      class C {
+        final int x;
+
+        C(this.x);
+      }
+      ```
+
+      If the instances of the class should be mutable, then remove the
+      annotation, or choose a different superclass if the annotation is
+      inherited:
+
+      ```dart
+      class C {
+        int x;
+
+        C(this.x);
+      }
+      ```
+  MUST_CALL_SUPER:
+    problemMessage: "This method overrides a method annotated as '@mustCallSuper' in '{0}', but doesn't invoke the overridden method."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the class declaring the overridden method
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a method that overrides a method
+      that is annotated as `@mustCallSuper` doesn't invoke the overridden method
+      as required.
+
+      #### Examples
+
+      The following code produces this diagnostic because the method `m` in `B`
+      doesn't invoke the overridden method `m` in `A`:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class A {
+        @mustCallSuper
+        m() {}
+      }
+
+      class B extends A {
+        @override
+        [!m!]() {}
+      }
+      ```
+
+      #### Common fixes
+
+      Add an invocation of the overridden method in the overriding method:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class A {
+        @mustCallSuper
+        m() {}
+      }
+
+      class B extends A {
+        @override
+        m() {
+          super.m();
+        }
+      }
+      ```
+  NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW:
+    sharedName: NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR
+    problemMessage: "This instance creation must be 'const', because the {0} constructor is marked as '@literal'."
+    correctionMessage: "Try replacing the 'new' keyword with 'const'."
+    hasPublishedDocs: true
+    comment: |-
+      Generate a hint for non-const instance creation (with the `new` keyword)
+      using a constructor annotated with `@literal`.
+
+      Parameters:
+      0: the name of the class defining the annotated constructor
+  NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR:
+    problemMessage: "This instance creation must be 'const', because the {0} constructor is marked as '@literal'."
+    correctionMessage: "Try adding a 'const' keyword."
+    hasPublishedDocs: true
+    comment: |-
+      Generate a hint for non-const instance creation using a constructor
+      annotated with `@literal`.
+
+      Parameters:
+      0: the name of the class defining the annotated constructor
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor that has the
+      `@literal` annotation is invoked without using the `const` keyword, but all
+      of the arguments to the constructor are constants. The annotation indicates
+      that the constructor should be used to create a constant value whenever
+      possible.
+
+      #### Examples
+
+      The following code produces this diagnostic:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @literal
+        const C();
+      }
+
+      C f() => [!C()!];
+      ```
+
+      #### Common fixes
+
+      Add the keyword `const` before the constructor invocation:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @literal
+        const C();
+      }
+
+      void f() => const C();
+      ```
+  NULLABLE_TYPE_IN_CATCH_CLAUSE:
+    problemMessage: "A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expression."
+    correctionMessage: Try using a non-nullable type.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the type following `on` in a
+      `catch` clause is a nullable type. It isn't valid to specify a nullable
+      type because it isn't possible to catch `null` (because it's a runtime
+      error to throw `null`).
+
+      #### Example
+
+      The following code produces this diagnostic because the exception type is
+      specified to allow `null` when `null` can't be thrown:
+
+      ```dart
+      void f() {
+        try {
+          // ...
+        } on [!FormatException?!] {
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the question mark from the type:
+
+      ```dart
+      void f() {
+        try {
+          // ...
+        } on FormatException {
+        }
+      }
+      ```
+  NULL_ARGUMENT_TO_NON_NULL_TYPE:
+    problemMessage: "'{0}' shouldn't be called with a null argument for the non-nullable type argument '{1}'."
+    correctionMessage: Try adding a non-null argument.
+    comment: |-
+      Parameters:
+      0: the name of the method being invoked
+      1: the type argument associated with the method
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when `null` is passed to either the
+      constructor `Future.value` or the method `Completer.complete` when the type
+      argument used to create the instance was non-nullable. Even though the type
+      system can't express this restriction, passing in a `null` results in a
+      runtime exception.
+
+      #### Example
+
+      The following code produces this diagnostic because `null` is being passed
+      to the constructor `Future.value` even though the type argument is the
+      non-nullable type `String`:
+
+      ```dart
+      Future<String> f() {
+        return Future.value([!null!]);
+      }
+      ```
+
+      #### Common fixes
+
+      Pass in a non-null value:
+
+      ```dart
+      Future<String> f() {
+        return Future.value('');
+      }
+      ```
+  NULL_AWARE_BEFORE_OPERATOR:
+    problemMessage: "The left operand uses '?.', so its value can be null."
+    comment: |-
+      When the left operand of a binary expression uses '?.' operator, it can be
+      `null`.
+  NULL_AWARE_IN_CONDITION:
+    problemMessage: "The value of the '?.' operator can be 'null', which isn't appropriate in a condition."
+    correctionMessage: "Try replacing the '?.' with a '.', testing the left-hand side for null if necessary."
+    comment: |-
+      A condition in a control flow statement could evaluate to `null` because it
+      uses the null-aware '?.' operator.
+  NULL_AWARE_IN_LOGICAL_OPERATOR:
+    problemMessage: "The value of the '?.' operator can be 'null', which isn't appropriate as an operand of a logical operator."
+    comment: |-
+      A condition in operands of a logical operator could evaluate to `null`
+      because it uses the null-aware '?.' operator.
+  NULL_CHECK_ALWAYS_FAILS:
+    problemMessage: "This null-check will always throw an exception because the expression will always evaluate to 'null'."
+    comment: |-
+      This hint indicates that a null literal is null-checked with `!`, but null
+      is never not null.
+  OVERRIDE_ON_NON_OVERRIDING_FIELD:
+    sharedName: OVERRIDE_ON_NON_OVERRIDING_MEMBER
+    problemMessage: "The field doesn't override an inherited getter or setter."
+    correctionMessage: Try updating this class to match the superclass, or removing the override annotation.
+    hasPublishedDocs: true
+    comment: |-
+      A field with the override annotation does not override a getter or setter.
+
+      No parameters.
+  OVERRIDE_ON_NON_OVERRIDING_GETTER:
+    sharedName: OVERRIDE_ON_NON_OVERRIDING_MEMBER
+    problemMessage: "The getter doesn't override an inherited getter."
+    correctionMessage: Try updating this class to match the superclass, or removing the override annotation.
+    hasPublishedDocs: true
+    comment: |-
+      A getter with the override annotation does not override an existing getter.
+
+      No parameters.
+  OVERRIDE_ON_NON_OVERRIDING_METHOD:
+    sharedName: OVERRIDE_ON_NON_OVERRIDING_MEMBER
+    problemMessage: "The method doesn't override an inherited method."
+    correctionMessage: Try updating this class to match the superclass, or removing the override annotation.
+    hasPublishedDocs: true
+    comment: |-
+      A method with the override annotation does not override an existing method.
+
+      No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a class member is annotated with
+      the `@override` annotation, but the member isn’t declared in any of the
+      supertypes of the class.
+
+      #### Examples
+
+      The following code produces this diagnostic because `m` isn't declared in
+      any of the supertypes of `C`:
+
+      ```dart
+      class C {
+        @override
+        String [!m!]() => '';
+      }
+      ```
+
+      #### Common fixes
+
+      If the member is intended to override a member with a different name, then
+      update the member to have the same name:
+
+      ```dart
+      class C {
+        @override
+        String toString() => '';
+      }
+      ```
+
+      If the member is intended to override a member that was removed from the
+      superclass, then consider removing the member from the subclass.
+
+      If the member can't be removed, then remove the annotation.
+  OVERRIDE_ON_NON_OVERRIDING_SETTER:
+    sharedName: OVERRIDE_ON_NON_OVERRIDING_MEMBER
+    problemMessage: "The setter doesn't override an inherited setter."
+    correctionMessage: Try updating this class to match the superclass, or removing the override annotation.
+    hasPublishedDocs: true
+    comment: |-
+      A setter with the override annotation does not override an existing setter.
+
+      No parameters.
+  PACKAGE_IMPORT_CONTAINS_DOT_DOT:
+    problemMessage: "A package import shouldn't contain '..'."
+    comment: |-
+      It is a bad practice for a package import to reference anything outside the
+      given package, or more generally, it is bad practice for a package import
+      to contain a "..". For example, a source file should not contain a
+      directive such as `import 'package:foo/../some.dart'`.
+  RECEIVER_OF_TYPE_NEVER:
+    problemMessage: "The receiver is of type 'Never', and will never complete with a value."
+    correctionMessage: Try checking for throw expressions or type errors in the receiver
+    comment: |-
+      It is not an error to call or tear-off a method, setter, or getter, or to
+      read or write a field, on a receiver of static type `Never`.
+      Implementations that provide feedback about dead or unreachable code are
+      encouraged to indicate that any arguments to the invocation are
+      unreachable.
+
+      It is not an error to apply an expression of type `Never` in the function
+      position of a function call. Implementations that provide feedback about
+      dead or unreachable code are encouraged to indicate that any arguments to
+      the call are unreachable.
+
+      Parameters: none
+  RETURN_OF_DO_NOT_STORE:
+    problemMessage: "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless '{1}' is also annotated."
+    correctionMessage: "Annotate '{1}' with 'doNotStore'."
+    comment: |-
+      Users should not return values marked `@doNotStore` from functions,
+      methods or getters not marked `@doNotStore`.
+  SDK_VERSION_ASYNC_EXPORTED_FROM_CORE:
+    problemMessage: "The class '{0}' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions."
+    correctionMessage: "Try either importing 'dart:async' or updating the SDK constraints."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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
+      earlier versions, these classes weren't defined in `dart:core`, so the
+      import was necessary.
+
+      #### Examples
+
+      Here's an example of a pubspec that defines an SDK constraint with a lower
+      bound of less than 2.1.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+        sdk: '>=2.0.0 <2.4.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces this
+      diagnostic:
+
+      ```dart
+      void f([!Future!] f) {}
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the classes to be referenced:
+
+      ```yaml
+      environment:
+        sdk: '>=2.1.0 <2.4.0'
+      ```
+
+      If you need to support older versions of the SDK, then import the
+      `dart:async` library.
+
+      ```dart
+      import 'dart:async';
+
+      void f(Future f) {}
+      ```
+  SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT:
+    problemMessage: "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."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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;
+      ```
+  SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT:
+    problemMessage: "The use of the operator '{0}' for 'bool' operands in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      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.
+
+      #### 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 bool a = true;
+      const bool b = false;
+      const bool c = a [!&!] b;
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the operators 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 these operators, or change the code so that the expression
+      isn't in a [constant context][]:
+
+      ```dart
+      const bool a = true;
+      const bool b = false;
+      bool c = a & b;
+      ```
+  SDK_VERSION_CONSTRUCTOR_TEAROFFS:
+    problemMessage: "Tearing off a constructor requires the 'constructor-tearoffs' language feature."
+    correctionMessage: "Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'."
+    comment: |-
+      No parameters.
+
+      There is also a [ParserError.EXPERIMENT_NOT_ENABLED] code which catches
+      some cases of constructor tearoff features (like `List<int>.filled;`).
+      Other constructor tearoff cases are not realized until resolution
+      (like `List.filled;`).
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor tear-off is found
+      in code that has an SDK constraint whose lower bound is less than 2.15.
+      Constructor tear-offs weren't supported in earlier versions, so this code
+      won't be able to run against earlier versions of the SDK.
+
+      #### Example
+
+      Here's an example of a pubspec that defines an SDK constraint with a lower
+      bound of less than 2.15:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+        sdk: '>=2.9.0 <2.15.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces this
+      diagnostic:
+
+      ```dart
+      %language=2.14
+      var setConstructor = [!Set.identity!];
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the operator to be used:
+
+      ```yaml
+      environment:
+        sdk: '>=2.15.0 <2.16.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not use constructor tear-offs:
+
+      ```dart
+      %language=2.14
+      var setConstructor = () => Set.identity();
+      ```
+  SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT:
+    problemMessage: "Using the operator '==' for non-primitive types wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the operator `==` is used on a
+      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
+
+      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
+      %language=2.9
+      class C {}
+      const C a = null;
+      const C b = null;
+      const bool same = a [!==!] b;
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the operator 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 the `==` operator, or change the code so that the
+      expression isn't in a [constant context][]:
+
+      ```dart
+      %language=2.9
+      class C {}
+      const C a = null;
+      const C b = null;
+      bool same = a == b;
+      ```
+  SDK_VERSION_EXTENSION_METHODS:
+    problemMessage: "Extension methods weren't supported until version 2.6.0, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an extension declaration or an
+      extension override is found in code that has an SDK constraint whose lower
+      bound is less than 2.6.0. Using extensions 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.6.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+       sdk: '>=2.4.0 <2.7.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces
+      this diagnostic:
+
+      ```dart
+      [!extension!] E on String {
+        void sayHello() {
+          print('Hello $this');
+        }
+      }
+      ```
+
+      #### 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.6.0 <2.7.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not make use of extensions. The most common way to do this is to rewrite
+      the members of the extension as top-level functions (or methods) that take
+      the value that would have been bound to `this` as a parameter:
+
+      ```dart
+      void sayHello(String s) {
+        print('Hello $s');
+      }
+      ```
+  SDK_VERSION_GT_GT_GT_OPERATOR:
+    problemMessage: "The operator '>>>' wasn't supported until version 2.14.0, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the operator `>>>` is used in
+      code that has an SDK constraint whose lower bound is less than 2.14.0. This
+      operator 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.14.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+       sdk: '>=2.0.0 <2.15.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces this
+      diagnostic:
+
+      ```dart
+      int x = 3 [!>>>!] 4;
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the operator to be used:
+
+      ```yaml
+      environment:
+        sdk: '>=2.14.0 <2.15.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not use the `>>>` operator:
+
+      ```dart
+      int x = logicalShiftRight(3, 4);
+
+      int logicalShiftRight(int leftOperand, int rightOperand) {
+        int divisor = 1 << rightOperand;
+        if (divisor == 0) {
+          return 0;
+        }
+        return leftOperand ~/ divisor;
+      }
+      ```
+  SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT:
+    problemMessage: "The use of an is expression in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an `is` 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 `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
+
+      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 Object x = 4;
+      const y = [!x is int!] ? 0 : 1;
+      ```
+
+      #### 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 the `is` operator, or, if that isn't possible, change the
+      code so that the `is` expression isn't in a
+      [constant context][]:
+
+      ```dart
+      const Object x = 4;
+      var y = x is int ? 0 : 1;
+      ```
+  SDK_VERSION_NEVER:
+    problemMessage: "The type 'Never' wasn't supported until version 2.12.0, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a reference to the class `Never`
+      is found in code that has an SDK constraint whose lower bound is less than
+      2.12.0. This class wasn't defined 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.12.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+        sdk: '>=2.5.0 <2.6.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces this
+      diagnostic:
+
+      ```dart
+      %language=2.9
+      [!Never!] n;
+      ```
+
+      #### Common fixes
+
+      If you don't need to support older versions of the SDK, then you can
+      increase the SDK constraint to allow the type to be used:
+
+      ```yaml
+      environment:
+        sdk: '>=2.12.0 <2.13.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not reference this class:
+
+      ```dart
+      dynamic x;
+      ```
+  SDK_VERSION_SET_LITERAL:
+    problemMessage: "Set literals weren't supported until version 2.2, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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>();
+      ```
+  SDK_VERSION_UI_AS_CODE:
+    problemMessage: "The for, if, and spread elements weren't supported until version 2.3.0, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### 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
+      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.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+        sdk: '>=2.2.0 <2.4.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces
+      this diagnostic:
+
+      ```dart
+      var digits = [[!for (int i = 0; i < 10; i++) i!]];
+      ```
+
+      #### 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.3.0 <2.4.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not make use of those elements:
+
+      ```dart
+      var digits = _initializeDigits();
+
+      List<int> _initializeDigits() {
+        var digits = <int>[];
+        for (int i = 0; i < 10; i++) {
+          digits.add(i);
+        }
+        return digits;
+      }
+      ```
+  SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT:
+    problemMessage: "The if and spread elements weren't supported in constant expressions until version 2.5.0, but this code is required to be able to run on earlier versions."
+    correctionMessage: Try updating the SDK constraints.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an if or spread element inside
+      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
+
+      Here's an example of a pubspec that defines an SDK constraint with a lower
+      bound of less than 2.5.0:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      environment:
+        sdk: '>=2.4.0 <2.6.0'
+      ```
+
+      In the package that has that pubspec, code like the following produces
+      this diagnostic:
+
+      ```dart
+      const a = [1, 2];
+      const b = [[!...a!]];
+      ```
+
+      #### 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.5.0 <2.6.0'
+      ```
+
+      If you need to support older versions of the SDK, then rewrite the code to
+      not make use of those elements:
+
+      ```dart
+      const a = [1, 2];
+      const b = [1, 2];
+      ```
+
+      If that isn't possible, change the code so that the element isn't in a
+      [constant context][]:
+
+      ```dart
+      const a = [1, 2];
+      var b = [...a];
+      ```
+  STRICT_RAW_TYPE:
+    problemMessage: "The generic type '{0}' should have explicit type arguments but doesn't."
+    correctionMessage: "Use explicit type arguments for '{0}'."
+    comment: |-
+      When "strict-raw-types" is enabled, "raw types" must have type arguments.
+
+      A "raw type" is a type name that does not use inference to fill in missing
+      type arguments; instead, each type argument is instantiated to its bound.
+  SUBTYPE_OF_SEALED_CLASS:
+    problemMessage: "The class '{0}' shouldn't be extended, mixed in, or implemented because it's sealed."
+    correctionMessage: "Try composing instead of inheriting, or refer to the documentation of '{0}' for more information."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the sealed class
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a sealed class (one that either
+      has the `@sealed` annotation or inherits or mixes in a sealed class) is
+      referenced in either the `extends`, `implements`, or `with` clause of a
+      class or mixin declaration if the declaration isn't in the same package as
+      the sealed class.
+
+      #### Example
+
+      Given a library in a package other than the package being analyzed that
+      contains the following:
+
+      ```dart
+      %uri="package:a/a.dart"
+      import 'package:meta/meta.dart';
+
+      class A {}
+
+      @sealed
+      class B {}
+      ```
+
+      The following code produces this diagnostic because `C`, which isn't in the
+      same package as `B`, is extending the sealed class `B`:
+
+      ```dart
+      import 'package:a/a.dart';
+
+      [!class C extends B {}!]
+      ```
+
+      #### Common fixes
+
+      If the class doesn't need to be a subtype of the sealed class, then change
+      the declaration so that it isn't:
+
+      ```dart
+      import 'package:a/a.dart';
+
+      class B extends A {}
+      ```
+
+      If the class needs to be a subtype of the sealed class, then either change
+      the sealed class so that it's no longer sealed or move the subclass into
+      the same package as the sealed class.
+  TYPE_CHECK_IS_NOT_NULL:
+    sharedName: TYPE_CHECK_WITH_NULL
+    problemMessage: "Tests for non-null should be done with '!= null'."
+    correctionMessage: "Try replacing the 'is! Null' check with '!= null'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's a type check (using the
+      `as` operator) where the type is `Null`. There's only one value whose type
+      is `Null`, so the code is both more readable and more performant when it
+      tests for `null` explicitly.
+
+      #### Example
+
+      The following code produces this diagnostic because the code is testing to
+      see whether the value of `s` is `null` by using a type check:
+
+      ```dart
+      void f(String? s) {
+        if ([!s is Null!]) {
+          return;
+        }
+        print(s);
+      }
+      ```
+
+      The following code produces this diagnostic because the code is testing to
+      see whether the value of `s` is something other than `null` by using a type
+      check:
+
+      ```dart
+      void f(String? s) {
+        if ([!s is! Null!]) {
+          print(s);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Replace the type check with the equivalent comparison with `null`:
+
+      ```dart
+      void f(String? s) {
+        if (s == null) {
+          return;
+        }
+        print(s);
+      }
+      ```
+  TYPE_CHECK_IS_NULL:
+    sharedName: TYPE_CHECK_WITH_NULL
+    problemMessage: "Tests for null should be done with '== null'."
+    correctionMessage: "Try replacing the 'is Null' check with '== null'."
+    hasPublishedDocs: true
+    comment: No parameters.
+  UNDEFINED_HIDDEN_NAME:
+    problemMessage: "The library '{0}' doesn't export a member with the hidden name '{1}'."
+    correctionMessage: Try removing the name from the list of hidden members.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the library being imported
+      1: the name in the hide clause that isn't defined in the library
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a hide combinator includes a
+      name that isn't defined by the library being imported.
+
+      #### Examples
+
+      The following code produces this diagnostic because `dart:math` doesn't
+      define the name `String`:
+
+      ```dart
+      import 'dart:math' hide [!String!], max;
+
+      var x = min(0, 1);
+      ```
+
+      #### Common fixes
+
+      If a different name should be hidden, then correct the name. Otherwise,
+      remove the name from the list:
+
+      ```dart
+      import 'dart:math' hide max;
+
+      var x = min(0, 1);
+      ```
+  UNDEFINED_REFERENCED_PARAMETER:
+    problemMessage: "The parameter '{0}' is not defined by '{1}'."
+    comment: |-
+      Parameters:
+      0: the name of the undefined parameter
+      1: the name of the targeted member
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an annotation of the form
+      `@UnusedResult.unless(parameterDefined: parameterName)` specifies a
+      parameter name that isn't defined by the annotated function.
+
+      #### Example
+
+      The following code produces this diagnostic because the function `f`
+      doesn't have a parameter named `b`:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @UseResult.unless(parameterDefined: [!'b'!])
+      int f([int? a]) => a ?? 0;
+      ```
+
+      #### Common fixes
+
+      Change the argument named `parameterDefined` to match the name of one of
+      the parameters to the function:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      @UseResult.unless(parameterDefined: 'a')
+      int f([int? a]) => a ?? 0;
+      ```
+  UNDEFINED_SHOWN_NAME:
+    problemMessage: "The library '{0}' doesn't export a member with the shown name '{1}'."
+    correctionMessage: Try removing the name from the list of shown members.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the library being imported
+      1: the name in the show clause that isn't defined in the library
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a show combinator includes a
+      name that isn't defined by the library being imported.
+
+      #### Examples
+
+      The following code produces this diagnostic because `dart:math` doesn't
+      define the name `String`:
+
+      ```dart
+      import 'dart:math' show min, [!String!];
+
+      var x = min(0, 1);
+      ```
+
+      #### Common fixes
+
+      If a different name should be shown, then correct the name. Otherwise,
+      remove the name from the list:
+
+      ```dart
+      import 'dart:math' show min;
+
+      var x = min(0, 1);
+      ```
+  UNIGNORABLE_IGNORE:
+    problemMessage: "The diagnostic '{0}' can't be ignored."
+    correctionMessage: Try removing the name from the list, or removing the whole comment if this is the only name in the list.
+    comment: |-
+      Parameters:
+      0: the name of the non-diagnostic being ignored
+  UNNECESSARY_CAST:
+    problemMessage: Unnecessary cast.
+    correctionMessage: Try removing the cast.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value being cast is already
+      known to be of the type that it's being cast to.
+
+      #### Examples
+
+      The following code produces this diagnostic because `n` is already known to
+      be an `int` as a result of the `is` test:
+
+      ```dart
+      void f(num n) {
+        if (n is int) {
+          ([!n as int!]).isEven;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the unnecessary cast:
+
+      ```dart
+      void f(num n) {
+        if (n is int) {
+          n.isEven;
+        }
+      }
+      ```
+  UNNECESSARY_IGNORE:
+    problemMessage: "The diagnostic '{0}' isn't produced at this location so it doesn't need to be ignored."
+    correctionMessage: Try removing the name from the list, or removing the whole comment if this is the only name in the list.
+    comment: |-
+      Parameters:
+      0: the name of the diagnostic being ignored
+  UNNECESSARY_IMPORT:
+    problemMessage: "The import of '{0}' is unnecessary because all of the used elements are also provided by the import of '{1}'."
+    correctionMessage: Try removing the import directive.
+    comment: |-
+      Parameters:
+      0: the uri that is not necessary
+      1: the uri that makes it unnecessary
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import isn't needed because
+      all of the names that are imported and referenced within the importing
+      library are also visible through another import.
+
+      #### Example
+
+      Given a file named `a.dart` that contains the following:
+
+      ```dart
+      %uri="lib/a.dart"
+      class A {}
+      ```
+
+      And, given a file named `b.dart` that contains the following:
+
+      ```dart
+      %uri="lib/b.dart"
+      export 'a.dart';
+
+      class B {}
+      ```
+
+      The following code produces this diagnostic because the class `A`, which is
+      imported from `a.dart`, is also imported from `b.dart`. Removing the import
+      of `a.dart` leaves the semantics unchanged:
+
+      ```dart
+      import [!'a.dart'!];
+      import 'b.dart';
+
+      void f(A a, B b) {}
+      ```
+
+      #### Common fixes
+
+      If the import isn't needed, then remove it.
+
+      If some of the names imported by this import are intended to be used but
+      aren't yet, and if those names aren't imported by other imports, then add
+      the missing references to those names.
+  UNNECESSARY_NO_SUCH_METHOD:
+    problemMessage: "Unnecessary 'noSuchMethod' declaration."
+    correctionMessage: "Try removing the declaration of 'noSuchMethod'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's a declaration of
+      `noSuchMethod`, the only thing the declaration does is invoke the
+      overridden declaration, and the overridden declaration isn't the
+      declaration in `Object`.
+
+      Overriding the implementation of `Object`'s `noSuchMethod` (no matter what
+      the implementation does) signals to the analyzer that it shouldn't flag any
+      inherited abstract methods that aren't implemented in that class. This
+      works even if the overriding implementation is inherited from a superclass,
+      so there's no value to declare it again in a subclass.
+
+      #### Example
+
+      The following code produces this diagnostic because the declaration of
+      `noSuchMethod` in `A` makes the declaration of `noSuchMethod` in `B`
+      unnecessary:
+
+      ```dart
+      class A {
+        @override
+        dynamic noSuchMethod(x) => super.noSuchMethod(x);
+      }
+      class B extends A {
+        @override
+        dynamic [!noSuchMethod!](y) {
+          return super.noSuchMethod(y);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the unnecessary declaration:
+
+      ```dart
+      class A {
+        @override
+        dynamic noSuchMethod(x) => super.noSuchMethod(x);
+      }
+      class B extends A {}
+      ```
+  UNNECESSARY_NULL_COMPARISON_FALSE:
+    sharedName: UNNECESSARY_NULL_COMPARISON
+    problemMessage: "The operand can't be null, so the condition is always false."
+    correctionMessage: Try removing the condition, an enclosing condition, or the whole conditional statement.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when it finds an equality comparison
+      (either `==` or `!=`) with one operand of `null` and the other operand
+      can't be `null`. Such comparisons are always either `true` or `false`, so
+      they serve no purpose.
+
+      #### Example
+
+      The following code produces this diagnostic because `x` can never be
+      `null`, so the comparison always evaluates to `true`:
+
+      ```dart
+      void f(int x) {
+        if (x [!!= null!]) {
+          print(x);
+        }
+      }
+      ```
+
+      The following code produces this diagnostic because `x` can never be
+      `null`, so the comparison always evaluates to `false`:
+
+      ```dart
+      void f(int x) {
+        if (x [!== null!]) {
+          throw ArgumentError("x can't be null");
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the other operand should be able to be `null`, then change the type of
+      the operand:
+
+      ```dart
+      void f(int? x) {
+        if (x != null) {
+          print(x);
+        }
+      }
+      ```
+
+      If the other operand really can't be `null`, then remove the condition:
+
+      ```dart
+      void f(int x) {
+        print(x);
+      }
+      ```
+  UNNECESSARY_NULL_COMPARISON_TRUE:
+    sharedName: UNNECESSARY_NULL_COMPARISON
+    problemMessage: "The operand can't be null, so the condition is always true."
+    correctionMessage: Remove the condition.
+    hasPublishedDocs: true
+    comment: No parameters.
+  UNNECESSARY_QUESTION_MARK:
+    problemMessage: "The '?' is unnecessary because '{0}' is nullable without it."
+    comment: |-
+      Parameters:
+      0: the name of the type
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when either the type `dynamic` or the
+      type `Null` is followed by a question mark. Both of these types are
+      inherently nullable so the question mark doesn't change the semantics.
+
+      #### Example
+
+      The following code produces this diagnostic because the question mark
+      following `dynamic` isn't necessary:
+
+      ```dart
+      dynamic[!?!] x;
+      ```
+
+      #### Common fixes
+
+      Remove the unneeded question mark:
+
+      ```dart
+      dynamic x;
+      ```
+  UNNECESSARY_TYPE_CHECK_FALSE:
+    sharedName: UNNECESSARY_TYPE_CHECK
+    problemMessage: "Unnecessary type check; the result is always 'false'."
+    correctionMessage: Try correcting the type check, or removing the type check.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value of a type check (using
+      either `is` or `is!`) is known at compile time.
+
+      #### Example
+
+      The following code produces this diagnostic because the test `a is Object?`
+      is always `true`:
+
+      ```dart
+      bool f<T>(T a) => [!a is Object?!];
+      ```
+
+      #### Common fixes
+
+      If the type check doesn't check what you intended to check, then change the
+      test:
+
+      ```dart
+      bool f<T>(T a) => a is Object;
+      ```
+
+      If the type check does check what you intended to check, then replace the
+      type check with its known value or completely remove it:
+
+      ```dart
+      bool f<T>(T a) => true;
+      ```
+  UNNECESSARY_TYPE_CHECK_TRUE:
+    sharedName: UNNECESSARY_TYPE_CHECK
+    problemMessage: "Unnecessary type check; the result is always 'true'."
+    correctionMessage: Try correcting the type check, or removing the type check.
+    hasPublishedDocs: true
+    comment: No parameters.
+  UNUSED_CATCH_CLAUSE:
+    problemMessage: "The exception variable '{0}' isn't used, so the 'catch' clause can be removed."
+    correctionMessage: Try removing the catch clause.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the exception variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `catch` clause is found, and
+      neither the exception parameter nor the optional stack trace parameter are
+      used in the `catch` block.
+
+      #### Examples
+
+      The following code produces this diagnostic because `e` isn't referenced:
+
+      ```dart
+      void f() {
+        try {
+          int.parse(';');
+        } on FormatException catch ([!e!]) {
+          // ignored
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the unused `catch` clause:
+
+      ```dart
+      void f() {
+        try {
+          int.parse(';');
+        } on FormatException {
+          // ignored
+        }
+      }
+      ```
+  UNUSED_CATCH_STACK:
+    problemMessage: "The stack trace variable '{0}' isn't used and can be removed."
+    correctionMessage: Try removing the stack trace variable, or using it.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the stack trace variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the stack trace parameter in a
+      `catch` clause isn't referenced within the body of the `catch` block.
+
+      #### Examples
+
+      The following code produces this diagnostic because `stackTrace` isn't
+      referenced:
+
+      ```dart
+      void f() {
+        try {
+          // ...
+        } catch (exception, [!stackTrace!]) {
+          // ...
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If you need to reference the stack trace parameter, then add a reference to
+      it. Otherwise, remove it:
+
+      ```dart
+      void f() {
+        try {
+          // ...
+        } catch (exception) {
+          // ...
+        }
+      }
+      ```
+  UNUSED_ELEMENT:
+    problemMessage: "The declaration '{0}' isn't referenced."
+    correctionMessage: "Try removing the declaration of '{0}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name that is declared but not referenced
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a private declaration isn't
+      referenced in the library that contains the declaration. The following
+      kinds of declarations are analyzed:
+      - Private top-level declarations, such as classes, enums, mixins, typedefs,
+        top-level variables, and top-level functions
+      - Private static and instance methods
+      - Optional parameters of private functions for which a value is never
+        passed, even when the parameter doesn't have a private name
+
+      #### Examples
+
+      Assuming that no code in the library references `_C`, the following code
+      produces this diagnostic:
+
+      ```dart
+      class [!_C!] {}
+      ```
+
+      Assuming that no code in the library passes a value for `y` in any
+      invocation of `_m`, the following code produces this diagnostic:
+
+      ```dart
+      %language=2.9
+      class C {
+        void _m(int x, [int [!y!]]) {}
+
+        void n() => _m(0);
+      }
+      ```
+
+      #### Common fixes
+
+      If the declaration isn't needed, then remove it:
+
+      ```dart
+      class C {
+        void _m(int x) {}
+
+        void n() => _m(0);
+      }
+      ```
+
+      If the declaration is intended to be used, then add the code to use it.
+  UNUSED_ELEMENT_PARAMETER:
+    sharedName: UNUSED_ELEMENT
+    problemMessage: "A value for optional parameter '{0}' isn't ever given."
+    correctionMessage: Try removing the unused parameter.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the parameter that is declared but not used
+  UNUSED_FIELD:
+    problemMessage: "The value of the field '{0}' isn't used."
+    correctionMessage: Try removing the field, or using it.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the unused field
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a private field is declared but
+      never read, even if it's written in one or more places.
+
+      #### Examples
+
+      The following code produces this diagnostic because the field
+      `_originalValue` isn't read anywhere in the library:
+
+      ```dart
+      class C {
+        final String [!_originalValue!];
+        final String _currentValue;
+
+        C(this._originalValue) : _currentValue = _originalValue;
+
+        String get value => _currentValue;
+      }
+      ```
+
+      It might appear that the field `_originalValue` is being read in the
+      initializer (`_currentValue = _originalValue`), but that is actually a
+      reference to the parameter of the same name, not a reference to the field.
+
+      #### Common fixes
+
+      If the field isn't needed, then remove it.
+
+      If the field was intended to be used, then add the missing code.
+  UNUSED_IMPORT:
+    problemMessage: "Unused import: '{0}'."
+    correctionMessage: Try removing the import directive.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the content of the unused import's uri
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an import isn't needed because
+      none of the names that are imported are referenced within the importing
+      library.
+
+      #### Examples
+
+      The following code produces this diagnostic because nothing defined in
+      `dart:async` is referenced in the library:
+
+      ```dart
+      import [!'dart:async'!];
+
+      void main() {}
+      ```
+
+      #### Common fixes
+
+      If the import isn't needed, then remove it.
+
+      If some of the imported names are intended to be used, then add the missing
+      code.
+  UNUSED_LABEL:
+    problemMessage: "The label '{0}' isn't used."
+    correctionMessage: "Try removing the label, or using it in either a 'break' or 'continue' statement."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the label that isn't used
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a label that isn't used is
+      found.
+
+      #### Examples
+
+      The following code produces this diagnostic because the label `loop` isn't
+      referenced anywhere in the method:
+
+      ```dart
+      void f(int limit) {
+        [!loop:!] for (int i = 0; i < limit; i++) {
+          print(i);
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the label isn't needed, then remove it:
+
+      ```dart
+      void f(int limit) {
+        for (int i = 0; i < limit; i++) {
+          print(i);
+        }
+      }
+      ```
+
+      If the label is needed, then use it:
+
+      ```dart
+      void f(int limit) {
+        loop: for (int i = 0; i < limit; i++) {
+          print(i);
+          break loop;
+        }
+      }
+      ```
+      TODO(brianwilkerson) Highlight the identifier without the colon.
+  UNUSED_LOCAL_VARIABLE:
+    problemMessage: "The value of the local variable '{0}' isn't used."
+    correctionMessage: Try removing the variable or using it.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the unused variable
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a local variable is declared but
+      never read, even if it's written in one or more places.
+
+      #### Examples
+
+      The following code produces this diagnostic because the value of `count` is
+      never read:
+
+      ```dart
+      void main() {
+        int [!count!] = 0;
+      }
+      ```
+
+      #### Common fixes
+
+      If the variable isn't needed, then remove it.
+
+      If the variable was intended to be used, then add the missing code.
+  UNUSED_RESULT:
+    problemMessage: "The value of '{0}' should be used."
+    correctionMessage: Try using the result by invoking a member, passing it to a function, or returning it from this function.
+    comment: |-
+      Parameters:
+      0: the name of the annotated method, property or function
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a function annotated with
+      `useResult` is invoked, and the value returned by that function isn't used.
+      The value is considered to be used if a member of the value is invoked, if
+      the value is passed to another function, or if the value is assigned to a
+      variable or field.
+
+      #### Example
+
+      The following code produces this diagnostic because the invocation of
+      `c.a()` isn't used, even though the method `a` is annotated with
+      `useResult`:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @useResult
+        int a() => 0;
+
+        int b() => 0;
+      }
+
+      void f(C c) {
+        c.[!a!]();
+      }
+      ```
+
+      #### Common fixes
+
+      If you intended to invoke the annotated function, then use the value that
+      was returned:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @useResult
+        int a() => 0;
+
+        int b() => 0;
+      }
+
+      void f(C c) {
+        print(c.a());
+      }
+      ```
+
+      If you intended to invoke a different function, then correct the name of
+      the function being invoked:
+
+      ```dart
+      import 'package:meta/meta.dart';
+
+      class C {
+        @useResult
+        int a() => 0;
+
+        int b() => 0;
+      }
+
+      void f(C c) {
+        c.b();
+      }
+      ```
+  UNUSED_RESULT_WITH_MESSAGE:
+    sharedName: UNUSED_RESULT
+    problemMessage: "'{0}' should be used. {1}."
+    correctionMessage: Try using the result by invoking a member, passing it to a function, or returning it from this function.
+    comment: |-
+      The result of invoking a method, property, or function annotated with
+      `@useResult` must be used (assigned, passed to a function as an argument,
+      or returned by a function).
+
+      Parameters:
+      0: the name of the annotated method, property or function
+      1: message details
+  UNUSED_SHOWN_NAME:
+    problemMessage: "The name {0} is shown, but isn’t used."
+    correctionMessage: Try removing the name from the list of shown members.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name that is shown but not used
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a show combinator includes a
+      name that isn't used within the library. Because it isn't referenced, the
+      name can be removed.
+
+      #### Examples
+
+      The following code produces this diagnostic because the function `max`
+      isn't used:
+
+      ```dart
+      import 'dart:math' show min, [!max!];
+
+      var x = min(0, 1);
+      ```
+
+      #### Common fixes
+
+      Either use the name or remove it:
+
+      ```dart
+      import 'dart:math' show min;
+
+      var x = min(0, 1);
+      ```
+  USE_OF_NATIVE_EXTENSION:
+    problemMessage: Dart native extensions are deprecated and aren’t available in Dart 2.15.
+    correctionMessage: "Try using dart:ffi for C interop."
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a library is imported using the
+      `dart-ext` scheme.
+
+      #### Example
+
+      The following code produces this diagnostic because the native library `x`
+      is being imported using a scheme of `dart-ext`:
+
+      ```dart
+      [!import 'dart-ext:x';!]
+      int f() native 'string';
+      ```
+
+      #### Common fixes
+
+      Rewrite the code to use `dart:ffi` as a way of invoking the contents of the
+      native library.
+LanguageCode:
+  IMPLICIT_DYNAMIC_FIELD:
+    problemMessage: "Missing field type for '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_FUNCTION:
+    problemMessage: "Missing type arguments for generic function '{0}<{1}>'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_INVOKE:
+    problemMessage: "Missing type arguments for calling generic function type '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_LIST_LITERAL:
+    problemMessage: Missing type argument for list literal.
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_MAP_LITERAL:
+    problemMessage: Missing type arguments for map literal.
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_METHOD:
+    problemMessage: "Missing type arguments for generic method '{0}<{1}>'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_PARAMETER:
+    problemMessage: "Missing parameter type for '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_RETURN:
+    problemMessage: "Missing return type for '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_TYPE:
+    problemMessage: "Missing type arguments for generic type '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+  IMPLICIT_DYNAMIC_VARIABLE:
+    problemMessage: "Missing variable type for '{0}'."
+    correctionMessage: Try adding an explicit type, or remove implicit-dynamic from your analysis options file.
+ManifestWarningCode:
+  CAMERA_PERMISSIONS_INCOMPATIBLE:
+    problemMessage: Camera permissions make app incompatible for Chrome OS, consider adding optional features "android.hardware.camera" and "android.hardware.camera.autofocus".
+    correctionMessage: "Try adding `<uses-feature android:name=\"android.hardware.camera\"  android:required=\"false\">` `<uses-feature android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`."
+    comment: |-
+      A code indicating that the camera permissions is not supported on Chrome
+      OS.
+  NON_RESIZABLE_ACTIVITY:
+    problemMessage: The `<activity>` element should be allowed to be resized to allow users to take advantage of the multi-window environment on Chrome OS
+    correctionMessage: Consider declaring the corresponding activity element with `resizableActivity="true"` attribute.
+    comment: A code indicating that the activity is set to be non resizable.
+  NO_TOUCHSCREEN_FEATURE:
+    problemMessage: "The default \"android.hardware.touchscreen\" needs to be optional for Chrome OS. "
+    correctionMessage: "Consider adding <uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" /> to the manifest."
+    comment: |-
+      A code indicating that the touchscreen feature is not specified in the
+      manifest.
+  PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE:
+    problemMessage: "Permission makes app incompatible for Chrome OS, consider adding optional {0} feature tag, "
+    correctionMessage: " Try adding `<uses-feature android:name=\"{0}\"  android:required=\"false\">`."
+    comment: |-
+      A code indicating that a specified permission is not supported on Chrome
+      OS.
+  SETTING_ORIENTATION_ON_ACTIVITY:
+    problemMessage: The `<activity>` element should not be locked to any orientation so that users can take advantage of the multi-window environments and larger screens on Chrome OS
+    correctionMessage: Consider declaring the corresponding activity element with `screenOrientation="unspecified"` or `"fullSensor"` attribute.
+    comment: A code indicating that the activity is locked to an orientation.
+  UNSUPPORTED_CHROME_OS_FEATURE:
+    problemMessage: "The feature {0} is not supported on Chrome OS, consider making it optional."
+    correctionMessage: "Try changing to `android:required=\"false\"` for this feature."
+    comment: A code indicating that a specified feature is not supported on Chrome OS.
+  UNSUPPORTED_CHROME_OS_HARDWARE:
+    problemMessage: "The feature {0} is not supported on Chrome OS, consider making it optional."
+    correctionMessage: "Try adding `android:required=\"false\"` for this feature."
+    comment: |-
+      A code indicating that a specified hardware feature is not supported on
+      Chrome OS.
+ParserErrorCode:
+  ABSTRACT_CLASS_MEMBER:
+    copyFromCfe: true
+  ABSTRACT_ENUM:
+    problemMessage: "Enums can't be declared to be 'abstract'."
+    correctionMessage: "Try removing the keyword 'abstract'."
+  ABSTRACT_EXTERNAL_FIELD:
+    copyFromCfe: true
+  ABSTRACT_LATE_FIELD:
+    copyFromCfe: true
+  ABSTRACT_STATIC_FIELD:
+    copyFromCfe: true
+  ABSTRACT_STATIC_METHOD:
+    problemMessage: "Static methods can't be declared to be 'abstract'."
+    correctionMessage: "Try removing the keyword 'abstract'."
+  ABSTRACT_TOP_LEVEL_FUNCTION:
+    problemMessage: "Top-level functions can't be declared to be 'abstract'."
+    correctionMessage: "Try removing the keyword 'abstract'."
+  ABSTRACT_TOP_LEVEL_VARIABLE:
+    problemMessage: "Top-level variables can't be declared to be 'abstract'."
+    correctionMessage: "Try removing the keyword 'abstract'."
+  ABSTRACT_TYPEDEF:
+    problemMessage: "Typedefs can't be declared to be 'abstract'."
+    correctionMessage: "Try removing the keyword 'abstract'."
+  ANNOTATION_ON_TYPE_ARGUMENT:
+    copyFromCfe: true
+  ANNOTATION_WITH_TYPE_ARGUMENTS:
+    copyFromCfe: true
+  ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED:
+    copyFromCfe: true
+  ASYNC_KEYWORD_USED_AS_IDENTIFIER:
+    problemMessage: "The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function."
+    comment: |-
+      16.32 Identifier Reference: It is a compile-time error if any of the
+      identifiers async, await, or yield is used as an identifier in a function
+      body marked with either async, async, or sync.
+  BINARY_OPERATOR_WRITTEN_OUT:
+    copyFromCfe: true
+  BREAK_OUTSIDE_OF_LOOP:
+    copyFromCfe: true
+  CATCH_SYNTAX:
+    copyFromCfe: true
+  CATCH_SYNTAX_EXTRA_PARAMETERS:
+    copyFromCfe: true
+  CLASS_IN_CLASS:
+    copyFromCfe: true
+  COLON_IN_PLACE_OF_IN:
+    copyFromCfe: true
+  CONFLICTING_MODIFIERS:
+    copyFromCfe: true
+  CONSTRUCTOR_WITH_RETURN_TYPE:
+    copyFromCfe: true
+  CONSTRUCTOR_WITH_TYPE_ARGUMENTS:
+    copyFromCfe: true
+  CONST_AND_FINAL:
+    copyFromCfe: true
+  CONST_CLASS:
+    copyFromCfe: true
+  CONST_CONSTRUCTOR_WITH_BODY:
+    problemMessage: "Const constructors can't have a body."
+    correctionMessage: "Try removing either the 'const' keyword or the body."
+  CONST_ENUM:
+    problemMessage: "Enums can't be declared to be 'const'."
+    correctionMessage: "Try removing the 'const' keyword."
+  CONST_FACTORY:
+    copyFromCfe: true
+  CONST_METHOD:
+    copyFromCfe: true
+  CONST_TYPEDEF:
+    problemMessage: "Type aliases can't be declared to be 'const'."
+    correctionMessage: "Try removing the 'const' keyword."
+  CONTINUE_OUTSIDE_OF_LOOP:
+    copyFromCfe: true
+  CONTINUE_WITHOUT_LABEL_IN_CASE:
+    copyFromCfe: true
+  COVARIANT_AND_STATIC:
+    copyFromCfe: true
+  COVARIANT_CONSTRUCTOR:
+    problemMessage: "A constructor can't be declared to be 'covariant'."
+    correctionMessage: "Try removing the keyword 'covariant'."
+  COVARIANT_MEMBER:
+    copyFromCfe: true
+  COVARIANT_TOP_LEVEL_DECLARATION:
+    problemMessage: "Top-level declarations can't be declared to be covariant."
+    correctionMessage: "Try removing the keyword 'covariant'."
+  DEFAULT_VALUE_IN_FUNCTION_TYPE:
+    problemMessage: "Parameters in a function type can't have default values."
+    correctionMessage: Try removing the default value.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a function type associated with
+      a parameter includes optional parameters that have a default value. This
+      isn't allowed because the default values of parameters aren't part of the
+      function's type, and therefore including them doesn't provide any value.
+
+      #### Example
+
+      The following code produces this diagnostic because the parameter `p` has a
+      default value even though it's part of the type of the parameter `g`:
+
+      ```dart
+      void f(void Function([int p [!=!] 0]) g) {
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the default value from the function-type's parameter:
+
+      ```dart
+      void f(void Function([int p]) g) {
+      }
+      ```
+  DEFERRED_AFTER_PREFIX:
+    copyFromCfe: true
+  DIRECTIVE_AFTER_DECLARATION:
+    copyFromCfe: true
+  DUPLICATED_MODIFIER:
+    copyFromCfe: true
+    comment: |-
+      Parameters:
+      0: the modifier that was duplicated
+  DUPLICATE_DEFERRED:
+    copyFromCfe: true
+  DUPLICATE_LABEL_IN_SWITCH_STATEMENT:
+    copyFromCfe: true
+    comment: |-
+      Parameters:
+      0: the label that was duplicated
+  DUPLICATE_PREFIX:
+    copyFromCfe: true
+  EMPTY_ENUM_BODY:
+    problemMessage: An enum must declare at least one constant name.
+    correctionMessage: Try declaring a constant.
+  ENUM_IN_CLASS:
+    copyFromCfe: true
+  EQUALITY_CANNOT_BE_EQUALITY_OPERAND:
+    copyFromCfe: true
+  EXPECTED_BODY:
+    copyFromCfe: true
+  EXPECTED_CASE_OR_DEFAULT:
+    problemMessage: "Expected 'case' or 'default'."
+    correctionMessage: Try placing this code inside a case clause.
+  EXPECTED_CLASS_MEMBER:
+    problemMessage: Expected a class member.
+    correctionMessage: Try placing this code inside a class member.
+  EXPECTED_ELSE_OR_COMMA:
+    copyFromCfe: true
+  EXPECTED_EXECUTABLE:
+    problemMessage: Expected a method, getter, setter or operator declaration.
+    correctionMessage: This appears to be incomplete code. Try removing it or completing it.
+  EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD:
+    copyFromCfe: true
+  EXPECTED_INSTEAD:
+    copyFromCfe: true
+  EXPECTED_LIST_OR_MAP_LITERAL:
+    problemMessage: Expected a list or map literal.
+    correctionMessage: Try inserting a list or map literal, or remove the type arguments.
+  EXPECTED_STRING_LITERAL:
+    problemMessage: Expected a string literal.
+  EXPECTED_TOKEN:
+    problemMessage: "Expected to find '{0}'."
+    comment: |-
+      Parameters:
+      0: the token that was expected but not found
+  EXPECTED_TYPE_NAME:
+    problemMessage: Expected a type name.
+  EXPERIMENT_NOT_ENABLED:
+    copyFromCfe: true
+  EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE:
+    copyFromCfe: true
+  EXTENSION_DECLARES_ABSTRACT_MEMBER:
+    copyFromCfe: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an abstract declaration is
+      declared in an extension. Extensions can declare only concrete members.
+
+      #### Examples
+
+      The following code produces this diagnostic because the method `a` doesn't
+      have a body:
+
+      ```dart
+      extension E on String {
+        int [!a!]();
+      }
+      ```
+
+      #### Common fixes
+
+      Either provide an implementation for the member or remove it.
+  EXTENSION_DECLARES_CONSTRUCTOR:
+    copyFromCfe: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a constructor declaration is
+      found in an extension. It isn't valid to define a constructor because
+      extensions aren't classes, and it isn't possible to create an instance of
+      an extension.
+
+      #### Examples
+
+      The following code produces this diagnostic because there is a constructor
+      declaration in `E`:
+
+      ```dart
+      extension E on String {
+        [!E!]() : super();
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the constructor or replace it with a static method.
+  EXTENSION_DECLARES_INSTANCE_FIELD:
+    copyFromCfe: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an instance field declaration is
+      found in an extension. It isn't valid to define an instance field because
+      extensions can only add behavior, not state.
+
+      #### Examples
+
+      The following code produces this diagnostic because `s` is an instance
+      field:
+
+      ```dart
+      %language=2.9
+      extension E on String {
+        String [!s!];
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the field, make it a static field, or convert it to be a getter,
+      setter, or method.
+  EXTERNAL_CLASS:
+    copyFromCfe: true
+  EXTERNAL_CONSTRUCTOR_WITH_BODY:
+    copyFromCfe: true
+  EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER:
+    copyFromCfe: true
+  EXTERNAL_ENUM:
+    copyFromCfe: true
+  EXTERNAL_FACTORY_REDIRECTION:
+    copyFromCfe: true
+  EXTERNAL_FACTORY_WITH_BODY:
+    copyFromCfe: true
+  EXTERNAL_FIELD:
+    copyFromCfe: true
+  EXTERNAL_GETTER_WITH_BODY:
+    problemMessage: "External getters can't have a body."
+    correctionMessage: "Try removing the body of the getter, or removing the keyword 'external'."
+  EXTERNAL_LATE_FIELD:
+    copyFromCfe: true
+  EXTERNAL_METHOD_WITH_BODY:
+    copyFromCfe: true
+  EXTERNAL_OPERATOR_WITH_BODY:
+    problemMessage: "External operators can't have a body."
+    correctionMessage: "Try removing the body of the operator, or removing the keyword 'external'."
+  EXTERNAL_SETTER_WITH_BODY:
+    problemMessage: "External setters can't have a body."
+    correctionMessage: "Try removing the body of the setter, or removing the keyword 'external'."
+  EXTERNAL_TYPEDEF:
+    copyFromCfe: true
+  EXTRANEOUS_MODIFIER:
+    copyFromCfe: true
+  FACTORY_TOP_LEVEL_DECLARATION:
+    copyFromCfe: true
+  FACTORY_WITHOUT_BODY:
+    problemMessage: "A non-redirecting 'factory' constructor must have a body."
+    correctionMessage: Try adding a body to the constructor.
+  FACTORY_WITH_INITIALIZERS:
+    problemMessage: "A 'factory' constructor can't have initializers."
+    correctionMessage: "Try removing the 'factory' keyword to make this a generative constructor, or removing the initializers."
+  FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS:
+    copyFromCfe: true
+  FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR:
+    copyFromCfe: true
+  FINAL_AND_COVARIANT:
+    copyFromCfe: true
+  FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER:
+    copyFromCfe: true
+  FINAL_AND_VAR:
+    copyFromCfe: true
+  FINAL_CLASS:
+    problemMessage: "Classes can't be declared to be 'final'."
+    correctionMessage: "Try removing the keyword 'final'."
+  FINAL_CONSTRUCTOR:
+    problemMessage: "A constructor can't be declared to be 'final'."
+    correctionMessage: "Try removing the keyword 'final'."
+  FINAL_ENUM:
+    problemMessage: "Enums can't be declared to be 'final'."
+    correctionMessage: "Try removing the keyword 'final'."
+  FINAL_METHOD:
+    problemMessage: "Getters, setters and methods can't be declared to be 'final'."
+    correctionMessage: "Try removing the keyword 'final'."
+  FINAL_TYPEDEF:
+    problemMessage: "Typedefs can't be declared to be 'final'."
+    correctionMessage: "Try removing the keyword 'final'."
+  FUNCTION_TYPED_PARAMETER_VAR:
+    problemMessage: "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type."
+    correctionMessage: Try replacing the keyword with a return type.
+  GETTER_CONSTRUCTOR:
+    copyFromCfe: true
+  GETTER_IN_FUNCTION:
+    problemMessage: "Getters can't be defined within methods or functions."
+    correctionMessage: Try moving the getter outside the method or function, or converting the getter to a function.
+  GETTER_WITH_PARAMETERS:
+    problemMessage: Getters must be declared without a parameter list.
+    correctionMessage: "Try removing the parameter list, or removing the keyword 'get' to define a method rather than a getter."
+  ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE:
+    copyFromCfe: true
+  IMPLEMENTS_BEFORE_EXTENDS:
+    copyFromCfe: true
+  IMPLEMENTS_BEFORE_ON:
+    copyFromCfe: true
+  IMPLEMENTS_BEFORE_WITH:
+    copyFromCfe: true
+  IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE:
+    copyFromCfe: true
+  INITIALIZED_VARIABLE_IN_FOR_EACH:
+    copyFromCfe: true
+  INVALID_AWAIT_IN_FOR:
+    copyFromCfe: true
+  INVALID_CODE_POINT:
+    problemMessage: "The escape sequence '{0}' isn't a valid code point."
+    comment: |-
+      Parameters:
+      0: the invalid escape sequence
+  INVALID_COMMENT_REFERENCE:
+    problemMessage: "Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else."
+  INVALID_CONSTRUCTOR_NAME:
+    copyFromCfe: true
+  INVALID_GENERIC_FUNCTION_TYPE:
+    problemMessage: Invalid generic function type.
+    correctionMessage: "Try using a generic function type (returnType 'Function(' parameters ')')."
+  INVALID_HEX_ESCAPE:
+    copyFromCfe: true
+  INVALID_INITIALIZER:
+    copyFromCfe: true
+  INVALID_LITERAL_IN_CONFIGURATION:
+    problemMessage: "The literal in a configuration can't contain interpolation."
+    correctionMessage: Try removing the interpolation expressions.
+  INVALID_OPERATOR:
+    copyFromCfe: true
+    comment: |-
+      Parameters:
+      0: the operator that is invalid
+  INVALID_OPERATOR_FOR_SUPER:
+    problemMessage: "The operator '{0}' can't be used with 'super'."
+    comment: |-
+      Parameters:
+      0: the operator being applied to 'super'
+
+      Only generated by the old parser.
+      Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
+  INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER:
+    copyFromCfe: true
+  INVALID_STAR_AFTER_ASYNC:
+    problemMessage: "The modifier 'async*' isn't allowed for an expression function body."
+    correctionMessage: Try converting the body to a block.
+  INVALID_SUPER_IN_INITIALIZER:
+    copyFromCfe: true
+  INVALID_SYNC:
+    problemMessage: "The modifier 'sync' isn't allowed for an expression function body."
+    correctionMessage: Try converting the body to a block.
+  INVALID_THIS_IN_INITIALIZER:
+    copyFromCfe: true
+  INVALID_UNICODE_ESCAPE:
+    copyFromCfe: true
+  INVALID_USE_OF_COVARIANT_IN_EXTENSION:
+    copyFromCfe: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a member declared inside an
+      extension uses the keyword `covariant` in the declaration of a parameter.
+      Extensions aren't classes and don't have subclasses, so the keyword serves
+      no purpose.
+
+      #### Examples
+
+      The following code produces this diagnostic because `i` is marked as being
+      covariant:
+
+      ```dart
+      extension E on String {
+        void a([!covariant!] int i) {}
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the `covariant` keyword:
+
+      ```dart
+      extension E on String {
+        void a(int i) {}
+      }
+      ```
+  LIBRARY_DIRECTIVE_NOT_FIRST:
+    copyFromCfe: true
+  LITERAL_WITH_CLASS:
+    copyFromCfe: true
+  LITERAL_WITH_CLASS_AND_NEW:
+    copyFromCfe: true
+  LITERAL_WITH_NEW:
+    copyFromCfe: true
+  LOCAL_FUNCTION_DECLARATION_MODIFIER:
+    problemMessage: "Local function declarations can't specify any modifiers."
+    correctionMessage: Try removing the modifier.
+  MEMBER_WITH_CLASS_NAME:
+    copyFromCfe: true
+  MISSING_ASSIGNABLE_SELECTOR:
+    copyFromCfe: true
+  MISSING_ASSIGNMENT_IN_INITIALIZER:
+    copyFromCfe: true
+  MISSING_CATCH_OR_FINALLY:
+    copyFromCfe: true
+  MISSING_CLOSING_PARENTHESIS:
+    problemMessage: The closing parenthesis is missing.
+    correctionMessage: Try adding the closing parenthesis.
+  MISSING_CONST_FINAL_VAR_OR_TYPE:
+    copyFromCfe: true
+  MISSING_ENUM_BODY:
+    problemMessage: An enum definition must have a body with at least one constant name.
+    correctionMessage: Try adding a body and defining at least one constant.
+  MISSING_EXPRESSION_IN_INITIALIZER:
+    problemMessage: Expected an expression after the assignment operator.
+    correctionMessage: Try adding the value to be assigned, or remove the assignment operator.
+  MISSING_EXPRESSION_IN_THROW:
+    copyFromCfe: true
+  MISSING_FUNCTION_BODY:
+    problemMessage: A function body must be provided.
+    correctionMessage: Try adding a function body.
+  MISSING_FUNCTION_KEYWORD:
+    problemMessage: "Function types must have the keyword 'Function' before the parameter list."
+    correctionMessage: "Try adding the keyword 'Function'."
+  MISSING_FUNCTION_PARAMETERS:
+    problemMessage: Functions must have an explicit list of parameters.
+    correctionMessage: Try adding a parameter list.
+  MISSING_GET:
+    problemMessage: "Getters must have the keyword 'get' before the getter name."
+    correctionMessage: "Try adding the keyword 'get'."
+  MISSING_IDENTIFIER:
+    problemMessage: Expected an identifier.
+  MISSING_INITIALIZER:
+    copyFromCfe: true
+  MISSING_KEYWORD_OPERATOR:
+    copyFromCfe: true
+  MISSING_METHOD_PARAMETERS:
+    problemMessage: Methods must have an explicit list of parameters.
+    correctionMessage: Try adding a parameter list.
+  MISSING_NAME_FOR_NAMED_PARAMETER:
+    problemMessage: Named parameters in a function type must have a name
+    correctionMessage: Try providing a name for the parameter or removing the curly braces.
+  MISSING_NAME_IN_LIBRARY_DIRECTIVE:
+    problemMessage: Library directives must include a library name.
+    correctionMessage: "Try adding a library name after the keyword 'library', or remove the library directive if the library doesn't have any parts."
+  MISSING_NAME_IN_PART_OF_DIRECTIVE:
+    problemMessage: Part-of directives must include a library name.
+    correctionMessage: "Try adding a library name after the 'of'."
+  MISSING_PREFIX_IN_DEFERRED_IMPORT:
+    copyFromCfe: true
+  MISSING_STAR_AFTER_SYNC:
+    problemMessage: "The modifier 'sync' must be followed by a star ('*')."
+    correctionMessage: Try removing the modifier, or add a star.
+  MISSING_STATEMENT:
+    copyFromCfe: true
+  MISSING_TERMINATOR_FOR_PARAMETER_GROUP:
+    problemMessage: "There is no '{0}' to close the parameter group."
+    correctionMessage: "Try inserting a '{0}' at the end of the group."
+    comment: |-
+      Parameters:
+      0: the terminator that is missing
+  MISSING_TYPEDEF_PARAMETERS:
+    problemMessage: Typedefs must have an explicit list of parameters.
+    correctionMessage: Try adding a parameter list.
+  MISSING_VARIABLE_IN_FOR_EACH:
+    problemMessage: "A loop variable must be declared in a for-each loop before the 'in', but none was found."
+    correctionMessage: Try declaring a loop variable.
+  MIXED_PARAMETER_GROUPS:
+    problemMessage: "Can't have both positional and named parameters in a single parameter list."
+    correctionMessage: Try choosing a single style of optional parameters.
+  MIXIN_DECLARES_CONSTRUCTOR:
+    copyFromCfe: true
+  MODIFIER_OUT_OF_ORDER:
+    copyFromCfe: true
+  MULTIPLE_EXTENDS_CLAUSES:
+    copyFromCfe: true
+  MULTIPLE_IMPLEMENTS_CLAUSES:
+    problemMessage: Each class or mixin definition can have at most one implements clause.
+    correctionMessage: Try combining all of the implements clauses into a single clause.
+  MULTIPLE_LIBRARY_DIRECTIVES:
+    copyFromCfe: true
+  MULTIPLE_NAMED_PARAMETER_GROUPS:
+    problemMessage: "Can't have multiple groups of named parameters in a single parameter list."
+    correctionMessage: Try combining all of the groups into a single group.
+  MULTIPLE_ON_CLAUSES:
+    copyFromCfe: true
+  MULTIPLE_PART_OF_DIRECTIVES:
+    copyFromCfe: true
+  MULTIPLE_POSITIONAL_PARAMETER_GROUPS:
+    problemMessage: "Can't have multiple groups of positional parameters in a single parameter list."
+    correctionMessage: Try combining all of the groups into a single group.
+  MULTIPLE_VARIABLES_IN_FOR_EACH:
+    problemMessage: "A single loop variable must be declared in a for-each loop before the 'in', but {0} were found."
+    correctionMessage: Try moving all but one of the declarations inside the loop body.
+    comment: |-
+      Parameters:
+      0: the number of variables being declared
+  MULTIPLE_VARIANCE_MODIFIERS:
+    copyFromCfe: true
+  MULTIPLE_WITH_CLAUSES:
+    copyFromCfe: true
+  NAMED_FUNCTION_EXPRESSION:
+    problemMessage: "Function expressions can't be named."
+    correctionMessage: Try removing the name, or moving the function expression to a function declaration statement.
+  NAMED_FUNCTION_TYPE:
+    problemMessage: "Function types can't be named."
+    correctionMessage: "Try replacing the name with the keyword 'Function'."
+  NAMED_PARAMETER_OUTSIDE_GROUP:
+    problemMessage: "Named parameters must be enclosed in curly braces ('{' and '}')."
+    correctionMessage: Try surrounding the named parameters in curly braces.
+  NATIVE_CLAUSE_IN_NON_SDK_CODE:
+    problemMessage: Native clause can only be used in the SDK and code that is loaded through native extensions.
+    correctionMessage: Try removing the native clause.
+  NATIVE_CLAUSE_SHOULD_BE_ANNOTATION:
+    copyFromCfe: true
+  NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE:
+    problemMessage: Native functions can only be declared in the SDK and code that is loaded through native extensions.
+    correctionMessage: "Try removing the word 'native'."
+  NON_CONSTRUCTOR_FACTORY:
+    problemMessage: Only a constructor can be declared to be a factory.
+    correctionMessage: "Try removing the keyword 'factory'."
+  NON_IDENTIFIER_LIBRARY_NAME:
+    problemMessage: The name of a library must be an identifier.
+    correctionMessage: Try using an identifier as the name of the library.
+  NON_PART_OF_DIRECTIVE_IN_PART:
+    problemMessage: The part-of directive must be the only directive in a part.
+    correctionMessage: Try removing the other directives, or moving them to the library for which this is a part.
+  NON_STRING_LITERAL_AS_URI:
+    problemMessage: The URI must be a string literal.
+    correctionMessage: Try enclosing the URI in either single or double quotes.
+  NON_USER_DEFINABLE_OPERATOR:
+    problemMessage: "The operator '{0}' isn't user definable."
+    comment: |-
+      Parameters:
+      0: the operator that the user is trying to define
+  NORMAL_BEFORE_OPTIONAL_PARAMETERS:
+    problemMessage: Normal parameters must occur before optional parameters.
+    correctionMessage: Try moving all of the normal parameters before the optional parameters.
+  NULL_AWARE_CASCADE_OUT_OF_ORDER:
+    copyFromCfe: true
+  POSITIONAL_AFTER_NAMED_ARGUMENT:
+    problemMessage: Positional arguments must occur before named arguments.
+    correctionMessage: Try moving all of the positional arguments before the named arguments.
+  POSITIONAL_PARAMETER_OUTSIDE_GROUP:
+    problemMessage: "Positional parameters must be enclosed in square brackets ('[' and ']')."
+    correctionMessage: Try surrounding the positional parameters in square brackets.
+  PREFIX_AFTER_COMBINATOR:
+    copyFromCfe: true
+  REDIRECTING_CONSTRUCTOR_WITH_BODY:
+    copyFromCfe: true
+  REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR:
+    copyFromCfe: true
+  SETTER_CONSTRUCTOR:
+    copyFromCfe: true
+  SETTER_IN_FUNCTION:
+    problemMessage: "Setters can't be defined within methods or functions."
+    correctionMessage: Try moving the setter outside the method or function.
+  STACK_OVERFLOW:
+    copyFromCfe: true
+  STATIC_CONSTRUCTOR:
+    copyFromCfe: true
+  STATIC_GETTER_WITHOUT_BODY:
+    problemMessage: "A 'static' getter must have a body."
+    correctionMessage: "Try adding a body to the getter, or removing the keyword 'static'."
+  STATIC_OPERATOR:
+    copyFromCfe: true
+  STATIC_SETTER_WITHOUT_BODY:
+    problemMessage: "A 'static' setter must have a body."
+    correctionMessage: "Try adding a body to the setter, or removing the keyword 'static'."
+  STATIC_TOP_LEVEL_DECLARATION:
+    problemMessage: "Top-level declarations can't be declared to be static."
+    correctionMessage: "Try removing the keyword 'static'."
+  SWITCH_HAS_CASE_AFTER_DEFAULT_CASE:
+    copyFromCfe: true
+  SWITCH_HAS_MULTIPLE_DEFAULT_CASES:
+    copyFromCfe: true
+  TOP_LEVEL_OPERATOR:
+    copyFromCfe: true
+  TYPEDEF_IN_CLASS:
+    copyFromCfe: true
+  TYPE_ARGUMENTS_ON_TYPE_VARIABLE:
+    copyFromCfe: true
+  TYPE_BEFORE_FACTORY:
+    copyFromCfe: true
+  TYPE_PARAMETER_ON_CONSTRUCTOR:
+    copyFromCfe: true
+  TYPE_PARAMETER_ON_OPERATOR:
+    problemMessage: "Types parameters aren't allowed when defining an operator."
+    correctionMessage: Try removing the type parameters.
+    comment: |-
+      7.1.1 Operators: Type parameters are not syntactically supported on an
+      operator.
+  UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP:
+    problemMessage: "There is no '{0}' to open a parameter group."
+    correctionMessage: "Try inserting the '{0}' at the appropriate location."
+    comment: |-
+      Parameters:
+      0: the starting character that was missing
+  UNEXPECTED_TOKEN:
+    problemMessage: "Unexpected text '{0}'."
+    correctionMessage: Try removing the text.
+    comment: |-
+      Parameters:
+      0: the unexpected text that was found
+  VAR_AND_TYPE:
+    copyFromCfe: true
+  VAR_AS_TYPE_NAME:
+    copyFromCfe: true
+  VAR_CLASS:
+    problemMessage: "Classes can't be declared to be 'var'."
+    correctionMessage: "Try removing the keyword 'var'."
+  VAR_ENUM:
+    problemMessage: "Enums can't be declared to be 'var'."
+    correctionMessage: "Try removing the keyword 'var'."
+  VAR_RETURN_TYPE:
+    copyFromCfe: true
+  VAR_TYPEDEF:
+    problemMessage: "Typedefs can't be declared to be 'var'."
+    correctionMessage: "Try removing the keyword 'var', or replacing it with the name of the return type."
+  VOID_WITH_TYPE_ARGUMENTS:
+    copyFromCfe: true
+  WITH_BEFORE_EXTENDS:
+    copyFromCfe: true
+  WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER:
+    problemMessage: "The default value of a positional parameter should be preceded by '='."
+    correctionMessage: "Try replacing the ':' with '='."
+  WRONG_TERMINATOR_FOR_PARAMETER_GROUP:
+    problemMessage: "Expected '{0}' to close parameter group."
+    correctionMessage: "Try replacing '{0}' with '{1}'."
+    comment: |-
+      Parameters:
+      0: the terminator that was expected
+      1: the terminator that was found
+PubspecWarningCode:
+  ASSET_DIRECTORY_DOES_NOT_EXIST:
+    problemMessage: "The asset directory '{0}' doesn't exist."
+    correctionMessage: Try creating the directory or fixing the path to the directory.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the path to the asset directory as given in the file.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an asset list contains a value
+      referencing a directory that doesn't exist.
+
+      #### Example
+
+      Assuming that the directory `assets` doesn't exist, the following code
+      produces this diagnostic because it's listed as a directory containing
+      assets:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets:
+          - assets/
+      ```
+
+      #### Common fixes
+
+      If the path is correct, then create a directory at that path.
+
+      If the path isn't correct, then change the path to match the path of the
+      directory containing the assets.
+  ASSET_DOES_NOT_EXIST:
+    problemMessage: "The asset file '{0}' doesn't exist."
+    correctionMessage: Try creating the file or fixing the path to the file.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the path to the asset as given in the file.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an asset list contains a value
+      referencing a file that doesn't exist.
+
+      #### Example
+
+      Assuming that the file `doesNotExist.gif` doesn't exist, the following code
+      produces this diagnostic because it's listed as an asset:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets:
+          - doesNotExist.gif
+      ```
+
+      #### Common fixes
+
+      If the path is correct, then create a file at that path.
+
+      If the path isn't correct, then change the path to match the path of the
+      file containing the asset.
+  ASSET_FIELD_NOT_LIST:
+    problemMessage: "The value of the 'asset' field is expected to be a list of relative file paths."
+    correctionMessage: Try converting the value to be a list of relative file paths.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value of the `asset` key
+      isn't a list.
+
+      #### Example
+
+      The following code produces this diagnostic because the value of the assets
+      key is a string when a list is expected:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets: assets/
+      ```
+
+      #### Common fixes
+
+      Change the value of the asset list so that it's a list:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets:
+          - assets/
+      ```
+  ASSET_NOT_STRING:
+    problemMessage: Assets are required to be file paths (strings).
+    correctionMessage: Try converting the value to be a string.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when an asset list contains a value
+      that isn't a string.
+
+      #### Example
+
+      The following code produces this diagnostic because the asset list contains
+      a map:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets:
+          - image.gif: true
+      ```
+
+      #### Common fixes
+
+      Change the asset list so that it only contains valid POSIX-style file
+      paths:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        assets:
+          - image.gif
+      ```
+  DEPENDENCIES_FIELD_NOT_MAP:
+    problemMessage: "The value of the '{0}' field is expected to be a map."
+    correctionMessage: Try converting the value to be a map.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value of either the
+      `dependencies` or `dev_dependencies` key isn't a map.
+
+      #### Example
+
+      The following code produces this diagnostic because the value of the
+      top-level `dependencies` key is a list:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        - meta
+      ```
+
+      #### Common fixes
+
+      Use a map as the value of the `dependencies` key:
+
+      ```yaml
+      %uri='pubspec.yaml'
+      name: example
+      dependencies:
+        meta: ^1.0.2
+      ```
+  DEPRECATED_FIELD:
+    problemMessage: "The '{0}' field is no longer used and can be removed."
+    correctionMessage: Try removing the field.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a key is used in a
+      `pubspec.yaml` file that was deprecated. Unused keys take up space and
+      might imply semantics that are no longer valid.
+
+      #### Example
+
+      The following code produces this diagnostic because the `author` key is no
+      longer being used:
+
+      ```dart
+      %uri="pubspec.yaml"
+      name: example
+      author: 'Dash'
+      ```
+
+      #### Common fixes
+
+      Remove the deprecated key:
+
+      ```dart
+      %uri="pubspec.yaml"
+      name: example
+      ```
+  FLUTTER_FIELD_NOT_MAP:
+    problemMessage: "The value of the 'flutter' field is expected to be a map."
+    correctionMessage: Try converting the value to be a map.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the value of the `flutter` key
+      isn't a map.
+
+      #### Example
+
+      The following code produces this diagnostic because the value of the
+      top-level `flutter` key is a string:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter: true
+      ```
+
+      #### Common fixes
+
+      If you need to specify Flutter-specific options, then change the value to
+      be a map:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      flutter:
+        uses-material-design: true
+      ```
+
+      If you don't need to specify Flutter-specific options, then remove the
+      `flutter` key:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      ```
+  INVALID_DEPENDENCY:
+    problemMessage: "Publishable packages can't have '{0}' dependencies."
+    correctionMessage: "Try adding a 'publish_to: none' entry to mark the package as not for publishing or remove the {0} dependency."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the kind of dependency.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a package under either
+      `dependencies` or `dev_dependencies` is not a pub, `git`, or `path` based
+      dependency.
+
+      See [Package dependencies](https://dart.dev/tools/pub/dependencies) for
+      more information about the kind of dependencies that are supported.
+
+      #### Example
+
+      The following code produces this diagnostic because the dependency on the
+      package `transmogrify` is not a pub, `git`, or `path` based dependency:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        transmogrify:
+          hosted:
+            name: transmogrify
+            url: http://your-package-server.com
+          version: ^1.4.0
+      ```
+
+      #### Common fixes
+
+      If you want to publish your package to `pub.dev`, then change the
+      dependencies to ones that are supported by `pub`.
+
+      If you don't want to publish your package to `pub.dev`, then add a
+      `publish_to: none` entry to mark the package as one that isn't intended to
+      be published:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      publish_to: none
+      dependencies:
+        transmogrify:
+          hosted:
+            name: transmogrify
+            url: http://your-package-server.com
+          version: ^1.4.0
+      ```
+  MISSING_NAME:
+    problemMessage: "The 'name' field is required but missing."
+    correctionMessage: "Try adding a field named 'name'."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's no top-level `name` key.
+      The `name` key provides the name of the package, which is required.
+
+      #### Example
+
+      The following code produces this diagnostic because the package doesn't
+      have a name:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      dependencies:
+        meta: ^1.0.2
+      ```
+
+      #### Common fixes
+
+      Add the top-level key `name` with a value that's the name of the package:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        meta: ^1.0.2
+      ```
+  NAME_NOT_STRING:
+    problemMessage: "The value of the 'name' field is required to be a string."
+    correctionMessage: Try converting the value to be a string.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the top-level `name` key has a
+      value that isn't a string.
+
+      #### Example
+
+      The following code produces this diagnostic because the value following the
+      `name` key is a list:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name:
+        - example
+      ```
+
+      #### Common fixes
+
+      Replace the value with a string:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      ```
+  PATH_DOES_NOT_EXIST:
+    problemMessage: "The path '{0}' doesn't exist."
+    correctionMessage: Try creating the referenced path or using a path that exists.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the path to the dependency as given in the file.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a dependency has a `path` key
+      referencing a directory that doesn't exist.
+
+      #### Example
+
+      Assuming that the directory `doesNotExist` doesn't exist, the following
+      code produces this diagnostic because it's listed as the path of a package:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        local_package:
+          path: doesNotExist
+      ```
+
+      #### Common fixes
+
+      If the path is correct, then create a directory at that path.
+
+      If the path isn't correct, then change the path to match the path to the
+      root of the package.
+  PATH_NOT_POSIX:
+    problemMessage: "The path '{0}' isn't a POSIX-style path."
+    correctionMessage: Try converting the value to a POSIX-style path.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the path as given in the file.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a dependency has a `path` key
+      whose value is a string, but isn't a POSIX-style path.
+
+      #### Example
+
+      The following code produces this diagnostic because the path following the
+      `path` key is a Windows path:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        local_package:
+          path: E:\local_package
+      ```
+
+      #### Common fixes
+
+      Convert the path to a POSIX path.
+  PATH_PUBSPEC_DOES_NOT_EXIST:
+    problemMessage: "The directory '{0}' doesn't contain a pubspec."
+    correctionMessage: Try creating a pubspec in the referenced directory or using a path that has a pubspec.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the path to the dependency as given in the file.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a dependency has a `path` key
+      that references a directory that doesn't contain a `pubspec.yaml` file.
+
+      #### Example
+
+      Assuming that the directory `local_package` doesn't contain a file named
+      `pubspec.yaml`, the following code produces this diagnostic because it's
+      listed as the path of a package:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: example
+      dependencies:
+        local_package:
+          path: local_package
+      ```
+
+      #### Common fixes
+
+      If the path is intended to be the root of a package, then add a
+      `pubspec.yaml` file in the directory:
+
+      ```yaml
+      %uri="pubspec.yaml"
+      name: local_package
+      ```
+
+      If the path is wrong, then replace it with a the correct path.
+  UNNECESSARY_DEV_DEPENDENCY:
+    problemMessage: "The dev dependency on {0} is unnecessary because there is also a normal dependency on that package."
+    correctionMessage: Try removing the dev dependency.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the package in the dev_dependency list.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when there's an entry under
+      `dev_dependencies` for a package that is also listed under `dependencies`.
+      The packages under `dependencies` are available to all of the code in the
+      package, so there's no need to also list them under `dev_dependencies`.
+
+      #### Example
+
+      The following code produces this diagnostic because the package `meta` is
+      listed under both `dependencies` and `dev_dependencies`:
+
+      ```yaml
+      %uri='pubspec.yaml'
+      name: example
+      dependencies:
+        meta: ^1.0.2
+      dev_dependencies:
+        meta: ^1.0.2
+      ```
+
+      #### Common fixes
+
+      Remove the entry under `dev_dependencies` (and the `dev_dependencies` key
+      if that's the only package listed there):
+
+      ```yaml
+      %uri='pubspec.yaml'
+      name: example
+      dependencies:
+        meta: ^1.0.2
+      ```
+StaticWarningCode:
+  DEAD_NULL_AWARE_EXPRESSION:
+    problemMessage: "The left operand can't be null, so the right operand is never executed."
+    correctionMessage: Try removing the operator and the right operand.
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic in two cases.
+
+      The first is when the left operand of an `??` operator can't be `null`.
+      The right operand is only evaluated if the left operand has the value
+      `null`, and because the left operand can't be `null`, the right operand is
+      never evaluated.
+
+      The second is when the left-hand side of an assignment using the `??=`
+      operator can't be `null`. The right-hand side is only evaluated if the
+      left-hand side has the value `null`, and because the left-hand side can't
+      be `null`, the right-hand side is never evaluated.
+
+      #### Example
+
+      The following code produces this diagnostic because `x` can't be `null`:
+
+      ```dart
+      int f(int x) {
+        return x ?? [!0!];
+      }
+      ```
+
+      The following code produces this diagnostic because `f` can't be `null`:
+
+      ```dart
+      class C {
+        int f = -1;
+
+        void m(int x) {
+          f ??= [!x!];
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If the diagnostic is reported for an `??` operator, then remove the `??`
+      operator and the right operand:
+
+      ```dart
+      int f(int x) {
+        return x;
+      }
+      ```
+
+      If the diagnostic is reported for an assignment, and the assignment isn't
+      needed, then remove the assignment:
+
+      ```dart
+      class C {
+        int f = -1;
+
+        void m(int x) {
+        }
+      }
+      ```
+
+      If the assignment is needed, but should be based on a different condition,
+      then rewrite the code to use `=` and the different condition:
+
+      ```dart
+      class C {
+        int f = -1;
+
+        void m(int x) {
+          if (f < 0) {
+            f = x;
+          }
+        }
+      }
+      ```
+  INVALID_NULL_AWARE_OPERATOR:
+    problemMessage: "The receiver can't be null, so the null-aware operator '{0}' is unnecessary."
+    correctionMessage: "Try replacing the operator '{0}' with '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the null-aware operator that is invalid
+      1: the non-null-aware operator that can replace the invalid operator
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a null-aware operator (`?.`,
+      `?..`, `?[`, `?..[`, or `...?`) is used on a receiver that's known to be
+      non-nullable.
+
+      #### Example
+
+      The following code produces this diagnostic because `s` can't be `null`:
+
+      ```dart
+      int? getLength(String s) {
+        return s[!?.!]length;
+      }
+      ```
+
+      The following code produces this diagnostic because `a` can't be `null`:
+
+      ```dart
+      var a = [];
+      var b = [[!...?!]a];
+      ```
+
+      The following code produces this diagnostic because `s?.length` can't
+      return `null`:
+
+      ```dart
+      void f(String? s) {
+        s?.length[!?.!]isEven;
+      }
+      ```
+
+      The reason `s?.length` can't return `null` is because the null-aware
+      operator following `s` short-circuits the evaluation of both `length` and
+      `isEven` if `s` is `null`. In other words, if `s` is `null`, then neither
+      `length` nor `isEven` will be invoked, and if `s` is non-`null`, then
+      `length` can't return a `null` value. Either way, `isEven` can't be invoked
+      on a `null` value, so the null-aware operator is not necessary. See
+      [Understanding null safety](/null-safety/understanding-null-safety#smarter-null-aware-methods)
+      for more details.
+
+      The following code produces this diagnostic because `s` can't be `null`.
+
+      ```dart
+      void f(Object? o) {
+        var s = o as String;
+        s[!?.!]length;
+      }
+      ```
+
+      The reason `s` can't be null, despite the fact that `o` can be `null`, is
+      because of the cast to `String`, which is a non-nullable type. If `o` ever
+      has the value `null`, the cast will fail and the invocation of `length`
+      will not happen.
+
+      #### Common fixes
+
+      Replace the null-aware operator with a non-null-aware equivalent; for
+      example, change `?.` to  `.`:
+
+      ```dart
+      int getLength(String s) {
+        return s.length;
+      }
+      ```
+
+      (Note that the return type was also changed to be non-nullable, which might
+      not be appropriate in some cases.)
+  INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT:
+    sharedName: INVALID_NULL_AWARE_OPERATOR
+    problemMessage: "The receiver can't be null because of short-circuiting, so the null-aware operator '{0}' can't be used."
+    correctionMessage: "Try replacing the operator '{0}' with '{1}'."
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the null-aware operator that is invalid
+      1: the non-null-aware operator that can replace the invalid operator
+  INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED:
+    problemMessage: "Parameters can't override default values, this method overrides '{0}.{1}' where '{2}' has a different value."
+    correctionMessage: Try using the same default value in both methods.
+    comment: |-
+      7.1 Instance Methods: It is a static warning if an instance method
+      <i>m1</i> overrides an instance member <i>m2</i>, the signature of
+      <i>m2</i> explicitly specifies a default value for a formal parameter
+      <i>p</i> and the signature of <i>m1</i> specifies a different default value
+      for <i>p</i>.
+  INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL:
+    problemMessage: "Parameters can't override default values, this method overrides '{0}.{1}' where this positional parameter has a different value."
+    correctionMessage: Try using the same default value in both methods.
+    comment: |-
+      7.1 Instance Methods: It is a static warning if an instance method
+      <i>m1</i> overrides an instance member <i>m2</i>, the signature of
+      <i>m2</i> explicitly specifies a default value for a formal parameter
+      <i>p</i> and the signature of <i>m1</i> specifies a different default value
+      for <i>p</i>.
+  MISSING_ENUM_CONSTANT_IN_SWITCH:
+    problemMessage: "Missing case clause for '{0}'."
+    correctionMessage: Try adding a case clause for the missing constant, or adding a default clause.
+    hasPublishedDocs: true
+    comment: |-
+      Parameters:
+      0: the name of the constant that is missing
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when a `switch` statement for an enum
+      doesn't include an option for one of the values in the enumeration.
+
+      Note that `null` is always a possible value for an enum and therefore also
+      must be handled.
+
+      #### Examples
+
+      The following code produces this diagnostic because the enum constant `e2`
+      isn't handled:
+
+      ```dart
+      enum E { e1, e2 }
+
+      void f(E e) {
+        [!switch (e)!] {
+          case E.e1:
+            break;
+        }
+      }
+      ```
+
+      #### Common fixes
+
+      If there's special handling for the missing values, then add a `case`
+      clause for each of the missing values:
+
+      ```dart
+      enum E { e1, e2 }
+
+      void f(E e) {
+        switch (e) {
+          case E.e1:
+            break;
+          case E.e2:
+            break;
+        }
+      }
+      ```
+
+      If the missing values should be handled the same way, then add a `default`
+      clause:
+
+      ```dart
+      enum E { e1, e2 }
+
+      void f(E e) {
+        switch (e) {
+          case E.e1:
+            break;
+          default:
+            break;
+        }
+      }
+      ```
+      TODO(brianwilkerson) This documentation will need to be updated when NNBD
+       ships.
+  UNNECESSARY_NON_NULL_ASSERTION:
+    problemMessage: "The '!' will have no effect because the receiver can't be null."
+    correctionMessage: "Try removing the '!' operator."
+    hasPublishedDocs: true
+    comment: No parameters.
+    documentation: |-
+      #### Description
+
+      The analyzer produces this diagnostic when the operand of the `!` operator
+      can't be `null`.
+
+      #### Example
+
+      The following code produces this diagnostic because `x` can't be `null`:
+
+      ```dart
+      int f(int x) {
+        return x[!!!];
+      }
+      ```
+
+      #### Common fixes
+
+      Remove the null check operator (`!`):
+
+      ```dart
+      int f(int x) {
+        return x;
+      }
+      ```
+
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 5f6cc0f..8497bb1 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,13 +1,13 @@
 name: analyzer
-version: 2.2.0
+version: 2.4.0
 description: This package provides a library that performs static analysis of Dart code.
-homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
+homepage: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
 
 environment:
-  sdk: '>=2.12.0 <3.0.0'
+  sdk: '>=2.14.0 <3.0.0'
 
 dependencies:
-  _fe_analyzer_shared: ^25.0.0
+  _fe_analyzer_shared: ^27.0.0
   cli_util: ^0.3.0
   collection: ^1.15.0
   convert: ^3.0.0
@@ -20,7 +20,6 @@
   source_span: ^1.8.0
   watcher: ^1.0.0
   yaml: ^3.0.0
-  pedantic: ^1.10.0
 dev_dependencies:
   analyzer_utilities:
     path: ../analyzer_utilities
diff --git a/pkg/analyzer/test/dart/analysis/utilities_test.dart b/pkg/analyzer/test/dart/analysis/utilities_test.dart
index 2ac1bac..36bdc90 100644
--- a/pkg/analyzer/test/dart/analysis/utilities_test.dart
+++ b/pkg/analyzer/test/dart/analysis/utilities_test.dart
@@ -22,15 +22,14 @@
 
 @reflectiveTest
 class UtilitiesTest with ResourceProviderMixin {
-  FeatureSet get defaultFeatureSet =>
-      FeatureSet.forTesting(sdkVersion: '2.2.2');
-
   test_parseFile_default_resource_provider() {
     String content = '''
 void main() => print('Hello, world!');
     ''';
-    ParseStringResult result = _withTemporaryFile(content,
-        (path) => parseFile(path: path, featureSet: defaultFeatureSet));
+    ParseStringResult result = _withTemporaryFile(
+        content,
+        (path) => parseFile(
+            path: path, featureSet: FeatureSet.latestLanguageVersion()));
     expect(result.content, content);
     expect(result.errors, isEmpty);
     expect(result.lineInfo, isNotNull);
@@ -46,7 +45,7 @@
         content,
         (resourceProvider, path) => parseFile(
             path: path,
-            featureSet: defaultFeatureSet,
+            featureSet: FeatureSet.latestLanguageVersion(),
             resourceProvider: resourceProvider,
             throwIfDiagnostics: false));
     expect(result.content, content);
@@ -66,7 +65,7 @@
       expectedPath = path;
       return parseFile(
           path: path,
-          featureSet: defaultFeatureSet,
+          featureSet: FeatureSet.latestLanguageVersion(),
           resourceProvider: resourceProvider,
           throwIfDiagnostics: false);
     });
@@ -83,12 +82,12 @@
             content,
             (resourceProvider, path) => parseFile(
                 path: path,
-                featureSet: defaultFeatureSet,
+                featureSet: FeatureSet.latestLanguageVersion(),
                 resourceProvider: resourceProvider)),
         throwsA(const TypeMatcher<ArgumentError>()));
   }
 
-  test_parseFile_featureSet_nnbd_off() {
+  test_parseFile_featureSet_language_2_9() {
     String content = '''
 int? f() => 1;
 ''';
@@ -110,19 +109,17 @@
     expect(result.unit.toString(), equals('int? f() => 1;'));
   }
 
-  test_parseFile_featureSet_nnbd_on() {
+  test_parseFile_featureSet_language_latest() {
     String content = '''
 int? f() => 1;
 ''';
-    var featureSet =
-        FeatureSet.forTesting(additionalFeatures: [Feature.non_nullable]);
     ParseStringResult result = _withMemoryFile(
         content,
         (resourceProvider, path) => parseFile(
             path: path,
             resourceProvider: resourceProvider,
             throwIfDiagnostics: false,
-            featureSet: featureSet));
+            featureSet: FeatureSet.latestLanguageVersion()));
     expect(result.content, content);
     expect(result.errors, isEmpty);
     expect(result.lineInfo, isNotNull);
@@ -137,7 +134,7 @@
         content,
         (resourceProvider, path) => parseFile(
             path: path,
-            featureSet: defaultFeatureSet,
+            featureSet: FeatureSet.latestLanguageVersion(),
             resourceProvider: resourceProvider));
     expect(result.content, content);
     expect(result.errors, isEmpty);
@@ -200,10 +197,11 @@
     String content = '''
 int? f() => 1;
 ''';
-    var featureSet =
-        FeatureSet.forTesting(additionalFeatures: [Feature.non_nullable]);
     ParseStringResult result = parseString(
-        content: content, throwIfDiagnostics: false, featureSet: featureSet);
+      content: content,
+      throwIfDiagnostics: false,
+      featureSet: FeatureSet.latestLanguageVersion(),
+    );
     expect(result.content, content);
     expect(result.errors, isEmpty);
     expect(result.lineInfo, isNotNull);
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index e7da3d0..4718ea0 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -2,22 +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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/utilities.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
-import 'package:analyzer/src/string_source.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/parser_test_base.dart' show ParserTestCase;
-import '../../generated/test_support.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -943,29 +938,10 @@
 E f() => g;
 ''';
 
-  final featureSet = FeatureSet.forTesting(sdkVersion: '2.2.2');
-
   CompilationUnit? _unit;
 
   CompilationUnit get unit {
-    if (_unit == null) {
-      GatheringErrorListener listener =
-          GatheringErrorListener(checkRanges: true);
-      var source =
-          StringSource(contents, 'PreviousTokenTest_findPrevious.dart');
-      var scanner = Scanner.fasta(source, listener)
-        ..configureFeatures(
-          featureSetForOverriding: featureSet,
-          featureSet: featureSet,
-        );
-      Token tokens = scanner.tokenize();
-      _unit = Parser(
-        source,
-        listener,
-        featureSet: featureSet,
-      ).parseCompilationUnit(tokens);
-    }
-    return _unit!;
+    return _unit ??= parseString(content: contents).unit;
   }
 
   Token findToken(String lexeme) {
@@ -1005,15 +981,10 @@
     var body = method.body as BlockFunctionBody;
     Statement statement = body.block.statements[0];
 
-    GatheringErrorListener listener = GatheringErrorListener(checkRanges: true);
-    var source = StringSource('missing', 'PreviousTokenTest_missing.dart');
-    var scanner = Scanner.fasta(source, listener)
-      ..configureFeatures(
-        featureSetForOverriding: featureSet,
-        featureSet: featureSet,
-      );
-    Token missing = scanner.tokenize();
-
+    var missing = parseString(
+      content: 'missing',
+      throwIfDiagnostics: false,
+    ).unit.beginToken;
     expect(statement.findPrevious(missing), null);
   }
 
diff --git a/pkg/analyzer/test/embedder_tests.dart b/pkg/analyzer/test/embedder_tests.dart
index 8ad116d..3a84d69 100644
--- a/pkg/analyzer/test/embedder_tests.dart
+++ b/pkg/analyzer/test/embedder_tests.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:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 
diff --git a/pkg/analyzer/test/error/error_test.dart b/pkg/analyzer/test/error/error_test.dart
index b0a7875..0cce128 100644
--- a/pkg/analyzer/test/error/error_test.dart
+++ b/pkg/analyzer/test/error/error_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 'dart:core';
 import 'dart:io';
 
 import 'package:analyzer/dart/analysis/features.dart';
@@ -38,7 +37,7 @@
       if (declaration is ClassDeclaration) {
         var extendsClause = declaration.extendsClause;
         if (extendsClause != null &&
-            extendsClause.superclass.name.name == 'ErrorCode') {
+            extendsClause.superclass2.name.name == 'ErrorCode') {
           String className = declaration.name.name;
           for (ClassMember member in declaration.members) {
             if (member is FieldDeclaration && member.isStatic) {
diff --git a/pkg/analyzer/test/file_system/file_system_test_support.dart b/pkg/analyzer/test/file_system/file_system_test_support.dart
index 4004239..6b5d0e2 100644
--- a/pkg/analyzer/test/file_system/file_system_test_support.dart
+++ b/pkg/analyzer/test/file_system/file_system_test_support.dart
@@ -12,6 +12,8 @@
 final isFileSystemException = TypeMatcher<FileSystemException>();
 final isFolder = TypeMatcher<Folder>();
 
+final throwsFileSystemException = throwsA(isFileSystemException);
+
 abstract class FileSystemTestSupport {
   /// The content used for the file at the [defaultFilePath] if it is created
   /// and no other content is provided.
@@ -108,9 +110,11 @@
   test_delete_existing() {
     File file = getFile(exists: true);
     expect(file.exists, isTrue);
+    expect(file.parent2.getChildren(), contains(file));
 
     file.delete();
     expect(file.exists, isFalse);
+    expect(file.parent2.getChildren(), isNot(contains(file)));
   }
 
   test_delete_notExisting();
@@ -919,6 +923,7 @@
     expect(folder.exists, isFalse);
   }
 
+  @Deprecated('Not used by clients')
   test_getModificationTimes_existing() async {
     Source source = getFile(exists: true).createSource();
 
@@ -926,6 +931,7 @@
     expect(times, [source.modificationStamp]);
   }
 
+  @Deprecated('Not used by clients')
   test_getModificationTimes_notExisting() async {
     Source source = getFile(exists: false).createSource();
 
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
index 34dc801..94b56ef 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -241,7 +241,10 @@
     File file = getFile(exists: false);
     expect(file.exists, isFalse);
 
-    expect(() => file.delete(), throwsA(const TypeMatcher<ArgumentError>()));
+    expect(
+      () => file.delete(),
+      throwsFileSystemException,
+    );
   }
 
   @override
@@ -304,14 +307,20 @@
   test_deleteFile_folder() {
     Folder folder = getFolder(exists: true);
 
-    expect(() => provider.deleteFile(defaultFolderPath), throwsArgumentError);
+    expect(
+      () => provider.deleteFile(defaultFolderPath),
+      throwsFileSystemException,
+    );
     expect(folder.exists, isTrue);
   }
 
   test_deleteFile_notExisting() {
     File file = getFile(exists: false);
 
-    expect(() => provider.deleteFile(defaultFilePath), throwsArgumentError);
+    expect(
+      () => provider.deleteFile(defaultFilePath),
+      throwsFileSystemException,
+    );
     expect(file.exists, isFalse);
   }
 
@@ -325,16 +334,20 @@
   test_modifyFile_existing_folder() {
     getFolder(exists: true);
 
-    expect(() => provider.modifyFile(defaultFolderPath, 'contents'),
-        throwsArgumentError);
+    expect(
+      () => provider.modifyFile(defaultFolderPath, 'contents'),
+      throwsFileSystemException,
+    );
     expect(provider.getResource(defaultFolderPath), isFolder);
   }
 
   test_modifyFile_notExisting() {
     getFile(exists: false);
 
-    expect(() => provider.modifyFile(defaultFilePath, 'contents'),
-        throwsArgumentError);
+    expect(
+      () => provider.modifyFile(defaultFilePath, 'contents'),
+      throwsFileSystemException,
+    );
     Resource file = provider.getResource(defaultFilePath);
     expect(file, isFile);
     expect(file.exists, isFalse);
@@ -357,7 +370,10 @@
   test_newFolder_existing_file() {
     getFile(exists: true);
 
-    expect(() => provider.newFolder(defaultFilePath), throwsArgumentError);
+    expect(
+      () => provider.newFolder(defaultFilePath),
+      throwsFileSystemException,
+    );
   }
 
   test_newFolder_existing_folder() {
diff --git a/pkg/analyzer/test/file_system/overlay_file_system_test.dart b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
index dc0035f..78d9cbf 100644
--- a/pkg/analyzer/test/file_system/overlay_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
@@ -272,25 +272,21 @@
   test_renameSync_notExisting_withoutOverlay() {
     String oldPath = '/foo/bar/file.txt';
     String newPath = baseProvider.convertPath('/foo/bar/new-file.txt');
-    File oldFile = _file(exists: true, path: oldPath);
-    File newFile = oldFile.renameSync(newPath);
-    expect(oldFile.path, baseProvider.convertPath(oldPath));
-    expect(oldFile.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'a');
+    File oldFile = _file(exists: false, path: oldPath);
+    expect(
+      () => oldFile.renameSync(newPath),
+      throwsFileSystemException,
+    );
   }
 
   test_renameSync_notExisting_withOverlay() {
     String oldPath = '/foo/bar/file.txt';
     String newPath = baseProvider.convertPath('/foo/bar/new-file.txt');
     File oldFile = _file(exists: false, path: oldPath, withOverlay: true);
-    File newFile = oldFile.renameSync(newPath);
-    expect(oldFile.path, baseProvider.convertPath(oldPath));
-    expect(oldFile.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'bbb');
+    expect(
+      () => oldFile.renameSync(newPath),
+      throwsFileSystemException,
+    );
   }
 
   @failingTest
@@ -480,7 +476,7 @@
   test_delete_notExisting() {
     Folder folder = _folder(exists: false);
     expect(folder.exists, isFalse);
-    expect(() => folder.delete(), throwsA(TypeMatcher<ArgumentError>()));
+    expect(() => folder.delete(), throwsFileSystemException);
   }
 
   void test_exists_links_existing() {
@@ -810,12 +806,14 @@
     expect(folder.exists, isTrue);
   }
 
+  @Deprecated('Not used by clients')
   test_getModificationTimes_withoutOverlay() async {
     Source source = _file(exists: true).createSource();
     List<int> times = await provider.getModificationTimes([source]);
     expect(times, [source.modificationStamp]);
   }
 
+  @Deprecated('Not used by clients')
   test_getModificationTimes_withOverlay() async {
     Source source = _file(exists: true, withOverlay: true).createSource();
     List<int> times = await provider.getModificationTimes([source]);
diff --git a/pkg/analyzer/test/generated/class_member_parser_test.dart b/pkg/analyzer/test/generated/class_member_parser_test.dart
index 25467ad..28b8faf 100644
--- a/pkg/analyzer/test/generated/class_member_parser_test.dart
+++ b/pkg/analyzer/test/generated/class_member_parser_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/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
@@ -22,9 +21,6 @@
 @reflectiveTest
 class ClassMemberParserTest extends FastaParserTestCase
     implements AbstractParserViaProxyTestCase {
-  final tripleShift = FeatureSet.forTesting(
-      sdkVersion: '2.0.0', additionalFeatures: [Feature.triple_shift]);
-
   void test_parse_member_called_late() {
     var unit = parseCompilationUnit(
         'class C { void late() { new C().late(); } }',
@@ -166,15 +162,15 @@
     expect(list.isFinal, isFalse);
     expect(list.isLate, isFalse);
     expect(list.lateKeyword, isNull);
-    var type = list.type as TypeName;
+    var type = list.type as NamedType;
     expect(type.name.name, 'List');
     List typeArguments = type.typeArguments!.arguments;
     expect(typeArguments, hasLength(1));
-    var type2 = typeArguments[0] as TypeName;
+    var type2 = typeArguments[0] as NamedType;
     expect(type2.name.name, 'List');
     NodeList typeArguments2 = type2.typeArguments!.arguments;
     expect(typeArguments2, hasLength(1));
-    var type3 = typeArguments2[0] as TypeName;
+    var type3 = typeArguments2[0] as NamedType;
     expect(type3.name.name, 'N');
     NodeList<VariableDeclaration> variables = list.variables;
     expect(variables, hasLength(1));
@@ -512,7 +508,7 @@
     expect(parameters, isNotNull);
     expect(parameters.parameters, hasLength(1));
     var parameter = parameters.parameters[0] as SimpleFormalParameter;
-    var parameterType = parameter.type as TypeName;
+    var parameterType = parameter.type as NamedType;
     expect(parameterType.name.name, 'T');
 
     expect(method.body, isNotNull);
@@ -548,14 +544,14 @@
     expect(method.externalKeyword, isNull);
     expect(method.modifierKeyword, isNull);
     expect(method.propertyKeyword, isNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
     expect(method.name, isNotNull);
     expect(method.operatorKeyword, isNull);
     expect(method.typeParameters, isNotNull);
     TypeParameter tp = method.typeParameters!.typeParameters[0];
     expect(tp.name.name, 'T');
     expect(tp.extendsKeyword, isNotNull);
-    expect((tp.bound as TypeName).name.name, 'num');
+    expect((tp.bound as NamedType).name.name, 'num');
     expect(method.parameters, isNotNull);
     expect(method.body, isNotNull);
   }
@@ -573,14 +569,14 @@
     expect(method.propertyKeyword, isNull);
 
     {
-      var returnType = method.returnType as TypeName;
+      var returnType = method.returnType as NamedType;
       expect(returnType, isNotNull);
       expect(returnType.name.name, 'Map');
 
       List<TypeAnnotation> typeArguments = returnType.typeArguments!.arguments;
       expect(typeArguments, hasLength(2));
-      expect((typeArguments[0] as TypeName).name.name, 'int');
-      expect((typeArguments[1] as TypeName).name.name, 'T');
+      expect((typeArguments[0] as NamedType).name.name, 'int');
+      expect((typeArguments[1] as NamedType).name.name, 'T');
     }
 
     expect(method.name, isNotNull);
@@ -602,7 +598,7 @@
     expect(method.modifierKeyword, isNotNull);
     expect(method.propertyKeyword, isNull);
     expect(method.returnType, isNotNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
     expect(method.name, isNotNull);
     expect(method.operatorKeyword, isNull);
     expect(method.typeParameters, isNotNull);
@@ -1032,8 +1028,8 @@
 
   void test_parseClassMember_operator_gtgtgt() {
     var unit = parseCompilationUnit(
-        'class C { bool operator >>>(other) => false; }',
-        featureSet: tripleShift);
+      'class C { bool operator >>>(other) => false; }',
+    );
     var declaration = unit.declarations[0] as ClassDeclaration;
     var method = declaration.members[0] as MethodDeclaration;
 
@@ -1051,8 +1047,8 @@
 
   void test_parseClassMember_operator_gtgtgteq() {
     var unit = parseCompilationUnit(
-        'class C { foo(int value) { x >>>= value; } }',
-        featureSet: tripleShift);
+      'class C { foo(int value) { x >>>= value; } }',
+    );
     var declaration = unit.declarations[0] as ClassDeclaration;
     var method = declaration.members[0] as MethodDeclaration;
     var blockFunctionBody = method.body as BlockFunctionBody;
@@ -1141,7 +1137,7 @@
     expect(constructor.separator!.type, TokenType.EQ);
     expect(constructor.initializers, isEmpty);
     expect(constructor.redirectedConstructor, isNotNull);
-    expect(constructor.redirectedConstructor!.type.name.name, 'prefix.B');
+    expect(constructor.redirectedConstructor!.type2.name.name, 'prefix.B');
     expect(constructor.redirectedConstructor!.period!.type, TokenType.PERIOD);
     expect(constructor.redirectedConstructor!.name!.name, 'foo');
     expect(constructor.body, isEmptyFunctionBody);
@@ -1191,7 +1187,7 @@
     expect(constructor.separator!.type, TokenType.EQ);
     expect(constructor.initializers, isEmpty);
     expect(constructor.redirectedConstructor, isNotNull);
-    expect(constructor.redirectedConstructor!.type.name.name, 'B');
+    expect(constructor.redirectedConstructor!.type2.name.name, 'B');
     expect(constructor.redirectedConstructor!.period, isNull);
     expect(constructor.redirectedConstructor!.name, isNull);
     expect(constructor.body, isEmptyFunctionBody);
@@ -1784,7 +1780,7 @@
     expect(method.operatorKeyword, isNull);
     expect(method.parameters, isNull);
     expect(method.propertyKeyword, isNotNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
   }
 
   void test_parseGetter_static() {
@@ -1801,7 +1797,7 @@
     expect(method.typeParameters, isNull);
     expect(method.parameters, isNull);
     expect(method.propertyKeyword, isNotNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
   }
 
   void test_parseInitializedIdentifierList_type() {
@@ -1813,7 +1809,7 @@
     VariableDeclarationList fields = declaration.fields;
     expect(fields, isNotNull);
     expect(fields.keyword, isNull);
-    expect((fields.type as TypeName).name.name, 'T');
+    expect((fields.type as NamedType).name.name, 'T');
     expect(fields.variables, hasLength(3));
     expect(declaration.staticKeyword!.lexeme, 'static');
     expect(declaration.semicolon, isNotNull);
@@ -1848,7 +1844,7 @@
     expect(method.typeParameters, isNull);
     expect(method.parameters, isNotNull);
     expect(method.propertyKeyword, isNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
   }
 
   void test_parseSetter_nonStatic() {
@@ -1865,7 +1861,7 @@
     expect(method.typeParameters, isNull);
     expect(method.parameters, isNotNull);
     expect(method.propertyKeyword, isNotNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
   }
 
   void test_parseSetter_static() {
@@ -1882,7 +1878,7 @@
     expect(method.typeParameters, isNull);
     expect(method.parameters, isNotNull);
     expect(method.propertyKeyword, isNotNull);
-    expect((method.returnType as TypeName).name.name, 'T');
+    expect((method.returnType as NamedType).name.name, 'T');
   }
 
   void test_simpleFormalParameter_withDocComment() {
diff --git a/pkg/analyzer/test/generated/collection_literal_parser_test.dart b/pkg/analyzer/test/generated/collection_literal_parser_test.dart
index b5b211a..7e39201 100644
--- a/pkg/analyzer/test/generated/collection_literal_parser_test.dart
+++ b/pkg/analyzer/test/generated/collection_literal_parser_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/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:test/test.dart';
@@ -24,17 +23,13 @@
       List<ExpectedError>? errors,
       int? expectedEndOffset,
       bool inAsync = false}) {
-    return parseExpression(source,
-        codes: codes,
-        errors: errors,
-        expectedEndOffset: expectedEndOffset,
-        inAsync: inAsync,
-        featureSet: FeatureSet.forTesting(
-            sdkVersion: '2.0.0',
-            additionalFeatures: [
-              Feature.spread_collections,
-              Feature.control_flow_collections
-            ]));
+    return parseExpression(
+      source,
+      codes: codes,
+      errors: errors,
+      expectedEndOffset: expectedEndOffset,
+      inAsync: inAsync,
+    );
   }
 
   void test_listLiteral_for() {
diff --git a/pkg/analyzer/test/generated/complex_parser_test.dart b/pkg/analyzer/test/generated/complex_parser_test.dart
index 59752a5..bfc6f04 100644
--- a/pkg/analyzer/test/generated/complex_parser_test.dart
+++ b/pkg/analyzer/test/generated/complex_parser_test.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -246,7 +245,7 @@
         parseStatement('x as bool? ? (x + y) : z;') as ExpressionStatement;
     var expression = statement.expression as ConditionalExpression;
     var asExpression = expression.condition as AsExpression;
-    var type = asExpression.type as TypeName;
+    var type = asExpression.type as NamedType;
     expect(type.question!.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -261,7 +260,7 @@
     var expression = statement.expression as ConditionalExpression;
     var condition = expression.condition as ParenthesizedExpression;
     var asExpression = condition.expression as AsExpression;
-    var type = asExpression.type as TypeName;
+    var type = asExpression.type as NamedType;
     expect(type.question!.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -287,7 +286,7 @@
         parseStatement('x is String? ? (x + y) : z;') as ExpressionStatement;
     var expression = statement.expression as ConditionalExpression;
     var isExpression = expression.condition as IsExpression;
-    var type = isExpression.type as TypeName;
+    var type = isExpression.type as NamedType;
     expect(type.question!.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
@@ -302,7 +301,7 @@
     var expression = statement.expression as ConditionalExpression;
     var condition = expression.condition as ParenthesizedExpression;
     var isExpression = condition.expression as IsExpression;
-    var type = isExpression.type as TypeName;
+    var type = isExpression.type as NamedType;
     expect(type.question!.lexeme, '?');
     Expression thenExpression = expression.thenExpression;
     expect(thenExpression, isParenthesizedExpression);
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index 4920947..8bbf1fa 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -20,6 +20,18 @@
 
 @reflectiveTest
 class ConstantEvaluatorTest extends PubPackageResolutionTest {
+  void assertTypeArguments(DartObject value, List<String>? typeArgumentNames) {
+    var typeArguments = (value as DartObjectImpl).typeArguments;
+    if (typeArguments == null) {
+      expect(typeArguments, typeArgumentNames);
+      return;
+    }
+    expect(
+      typeArguments.map((arg) => arg.getDisplayString(withNullability: true)),
+      equals(typeArgumentNames),
+    );
+  }
+
   test_bitAnd_int_int() async {
     await _assertValueInt(74 & 42, "74 & 42");
   }
@@ -269,10 +281,6 @@
     expect(value, null);
   }
 
-  test_leftShift_int_int() async {
-    await _assertValueInt(64, "16 << 2");
-  }
-
   test_lessThan_int_int() async {
     await _assertValueBool(true, "2 < 3");
   }
@@ -294,6 +302,16 @@
     expect(result.isValid, isTrue);
   }
 
+  test_literal_list_explicitType() async {
+    var result = await _getExpressionValue("const <String>['a', 'b', 'c']");
+    expect(result.isValid, isTrue);
+  }
+
+  test_literal_list_explicitType_functionType() async {
+    var result = await _getExpressionValue("const <void Function()>[]");
+    expect(result.isValid, isTrue);
+  }
+
   test_literal_list_forElement() async {
     var result = await _getExpressionValue('''
 const [for (var i = 0; i < 4; i++) i]
@@ -446,18 +464,6 @@
     expect(value, null);
   }
 
-  test_remainder_double_double() async {
-    await _assertValueDouble(3.2 % 2.3, "3.2 % 2.3");
-  }
-
-  test_remainder_int_int() async {
-    await _assertValueInt(2, "8 % 3");
-  }
-
-  test_rightShift() async {
-    await _assertValueInt(16, "64 >> 2");
-  }
-
   @failingTest
   test_simpleIdentifier_invalid() async {
     var result = await _getExpressionValue("?");
@@ -482,26 +488,6 @@
     await _assertValueInt(6, "'Dvorak'.length");
   }
 
-  test_times_double_double() async {
-    await _assertValueDouble(2.3 * 3.2, "2.3 * 3.2");
-  }
-
-  test_times_int_int() async {
-    await _assertValueInt(6, "2 * 3");
-  }
-
-  test_tripleShift() async {
-    await _assertValueInt(16, "64 >>> 2");
-  }
-
-  test_truncatingDivide_double_double() async {
-    await _assertValueInt(1, "3.2 ~/ 2.3");
-  }
-
-  test_truncatingDivide_int_int() async {
-    await _assertValueInt(3, "10 ~/ 3");
-  }
-
   Future<void> _assertValueBool(bool expectedValue, String contents) async {
     var result = await _getExpressionValue(contents);
     DartObject value = result.value!;
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 1d3df59..074ada9 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -716,15 +716,14 @@
     Source source = FileSource(getFile("/test.dart"));
     CompilationUnitElementImpl unit = CompilationUnitElementImpl();
     unit.librarySource = unit.source = source;
-    _definingLibrary =
-        ElementFactory.library(context, "test", isNonNullableByDefault: false);
+    _definingLibrary = ElementFactory.library(context, "test");
     _definingLibrary.definingCompilationUnit = unit;
 
     _definingLibrary.typeProvider = context.typeProviderLegacy;
     _definingLibrary.typeSystem = context.typeSystemLegacy;
     var inheritance = InheritanceManager3();
 
-    var featureSet = FeatureSet.forTesting();
+    var featureSet = FeatureSet.latestLanguageVersion();
     _visitor = ResolverVisitor(
         inheritance, _definingLibrary, source, _typeProvider, _listener,
         featureSet: featureSet,
diff --git a/pkg/analyzer/test/generated/elements_types_mixin.dart b/pkg/analyzer/test/generated/elements_types_mixin.dart
index 5b8ad2f..8c01ffe 100644
--- a/pkg/analyzer/test/generated/elements_types_mixin.dart
+++ b/pkg/analyzer/test/generated/elements_types_mixin.dart
@@ -7,7 +7,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/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -374,12 +373,7 @@
       uriStr,
       -1,
       0,
-      FeatureSet.fromEnableFlags2(
-        sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
-        flags: typeSystem.isNonNullableByDefault
-            ? [EnableString.non_nullable]
-            : [],
-      ),
+      FeatureSet.latestLanguageVersion(),
     );
     library.typeSystem = typeSystem;
     library.typeProvider = typeSystem.typeProvider;
@@ -587,6 +581,16 @@
     return element;
   }
 
+  DartType typeAliasTypeNone(
+    TypeAliasElement element, {
+    List<DartType> typeArguments = const [],
+  }) {
+    return element.instantiate(
+      typeArguments: typeArguments,
+      nullabilitySuffix: NullabilitySuffix.none,
+    );
+  }
+
   TypeParameterElementImpl typeParameter(String name,
       {DartType? bound, Variance? variance}) {
     var element = TypeParameterElementImpl.synthetic(name);
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
index b7a1e9c..01bcf82 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_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.
 
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
+import 'package:linter/src/rules/avoid_types_as_parameter_names.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../src/dart/resolution/context_collection_resolution.dart';
@@ -15,13 +17,26 @@
 
 @reflectiveTest
 class ErrorSuppressionTest extends PubPackageResolutionTest {
+  static final ErrorCode _lintCode = AvoidTypesAsParameterNames().lintCode;
+
   String get ignoredCode => 'unused_element';
 
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        experiments: experiments,
+        lints: ['avoid_types_as_parameter_names'],
+      ),
+    );
+  }
+
   test_error_code_mismatch() async {
     await assertErrorsInCode('''
 // ignore: $ignoredCode
 int x = '';
-int _y = 0; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+int _y = 0; //INVALID_ASSIGNMENT
 ''', [
       error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 34, 2),
       error(HintCode.UNUSED_ELEMENT, 42, 2),
@@ -225,6 +240,62 @@
     ]);
   }
 
+  test_type_ignore_badType() async {
+    await assertErrorsInCode('''
+// ignore: type=wrong
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''', [
+      error(_lintCode, 34, 3),
+    ]);
+  }
+
+  test_type_ignore_match() async {
+    await assertNoErrorsInCode('''
+// ignore: type=lint
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''');
+  }
+
+  test_type_ignore_mismatch() async {
+    await assertErrorsInCode('''
+// ignore: type=lint
+int _x = 1;
+''', [
+      error(HintCode.UNUSED_ELEMENT, 25, 2),
+    ]);
+  }
+
+  test_type_ignoreForFile_match() async {
+    await assertNoErrorsInCode('''
+// ignore_for_file: type=lint
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''');
+  }
+
+  test_type_ignoreForFile_match_upperCase() async {
+    await assertNoErrorsInCode('''
+// ignore_for_file: TYPE=LINT
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''');
+  }
+
+  test_type_ignoreForFile_match_withWhitespace() async {
+    await assertNoErrorsInCode('''
+// ignore_for_file: type = lint
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''');
+  }
+
+  test_type_ignoreForFile_mismatch() async {
+    await assertErrorsInCode('''
+// ignore_for_file: type=lint
+int a = 0;
+int _x = 1;
+''', [
+      error(HintCode.UNUSED_ELEMENT, 45, 2),
+    ]);
+  }
+
   test_undefined_function_within_flutter_can_be_ignored() async {
     await assertErrorsInFile(
       '$workspaceRootPath/flutterlib/flutter.dart',
diff --git a/pkg/analyzer/test/generated/expression_parser_test.dart b/pkg/analyzer/test/generated/expression_parser_test.dart
index 14eaa8d..356ecc9 100644
--- a/pkg/analyzer/test/generated/expression_parser_test.dart
+++ b/pkg/analyzer/test/generated/expression_parser_test.dart
@@ -10,7 +10,6 @@
 import 'package:analyzer/src/dart/ast/ast.dart'
     show InstanceCreationExpressionImpl;
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:pub_semver/src/version.dart';
 import 'package:test/test.dart';
@@ -672,7 +671,7 @@
     expect(instanceCreation.keyword, isNotNull);
     ConstructorName name = instanceCreation.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
     expect(instanceCreation.argumentList, isNotNull);
@@ -1045,7 +1044,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type.name.name, 'A.B');
     expect(type.typeArguments, isNull);
     expect(name.period, isNull);
@@ -1062,7 +1061,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments, isNull);
     expect(name.period, isNotNull);
@@ -1080,7 +1079,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments!.arguments, hasLength(1));
     expect(name.period, isNotNull);
@@ -1097,7 +1096,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments!.arguments, hasLength(1));
     expect(name.period, isNull);
@@ -1114,7 +1113,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments, isNull);
     expect(name.period, isNull);
@@ -1131,7 +1130,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments, isNull);
     expect(name.period, isNull);
@@ -1148,7 +1147,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments!.arguments, hasLength(1));
     expect(name.period, isNotNull);
@@ -1159,14 +1158,13 @@
 
   void test_parseInstanceCreationExpression_type_named_typeArguments_34403() {
     var expression = parseExpression('new a.b.c<C>()', errors: [
-      expectedError(
-          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 8, 1)
+      expectedError(ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS, 8, 1)
     ]) as InstanceCreationExpressionImpl;
     expect(expression, isNotNull);
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments, isNull);
     expect(name.period, isNotNull);
@@ -1184,7 +1182,7 @@
     expect(expression.keyword!.keyword, Keyword.NEW);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    TypeName type = name.type;
+    NamedType type = name.type2;
     expect(type, isNotNull);
     expect(type.typeArguments!.arguments, hasLength(1));
     expect(name.period, isNull);
@@ -1429,7 +1427,7 @@
     expect(expression.keyword, isNotNull);
     ConstructorName name = expression.constructorName;
     expect(name, isNotNull);
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
     expect(expression.argumentList, isNotNull);
@@ -1778,8 +1776,8 @@
     var identifier = asExpression.expression as SimpleIdentifier;
     expect(identifier.name, 'x');
     expect(asExpression.asOperator, isNotNull);
-    var typeName = asExpression.type as TypeName;
-    expect(typeName.name.name, 'Y');
+    var namedType = asExpression.type as NamedType;
+    expect(namedType.name.name, 'Y');
   }
 
   void test_parseRelationalExpression_as_functionType_noReturnType() {
@@ -1810,7 +1808,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, isTypeName);
+    expect(asExpression.type, isNamedType);
   }
 
   void test_parseRelationalExpression_as_simple() {
@@ -1820,7 +1818,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, isTypeName);
+    expect(asExpression.type, isNamedType);
   }
 
   void test_parseRelationalExpression_as_simple_function() {
@@ -1830,7 +1828,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, isTypeName);
+    expect(asExpression.type, isNamedType);
   }
 
   void test_parseRelationalExpression_is() {
@@ -1852,8 +1850,8 @@
     var identifier = isExpression.expression as SimpleIdentifier;
     expect(identifier.name, 'x');
     expect(isExpression.isOperator, isNotNull);
-    var typeName = isExpression.type as TypeName;
-    expect(typeName.name.name, 'Y');
+    var namedType = isExpression.type as NamedType;
+    expect(namedType.name.name, 'Y');
   }
 
   void test_parseRelationalExpression_isNot() {
diff --git a/pkg/analyzer/test/generated/extension_methods_parser_test.dart b/pkg/analyzer/test/generated/extension_methods_parser_test.dart
index aca31bc..a7409c6 100644
--- a/pkg/analyzer/test/generated/extension_methods_parser_test.dart
+++ b/pkg/analyzer/test/generated/extension_methods_parser_test.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:pub_semver/src/version.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analyzer/test/generated/formal_parameter_parser_test.dart b/pkg/analyzer/test/generated/formal_parameter_parser_test.dart
index 41de193..0b5d7b9 100644
--- a/pkg/analyzer/test/generated/formal_parameter_parser_test.dart
+++ b/pkg/analyzer/test/generated/formal_parameter_parser_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -904,16 +903,16 @@
     expect(parameters[0], isSimpleFormalParameter);
     var required = parameters[0] as SimpleFormalParameter;
     expect(required.identifier, isNull);
-    expect(required.type, isTypeName);
-    expect((required.type as TypeName).name.name, 'A');
+    expect(required.type, isNamedType);
+    expect((required.type as NamedType).name.name, 'A');
 
     expect(parameters[1], isDefaultFormalParameter);
     var named = parameters[1] as DefaultFormalParameter;
     expect(named.identifier, isNotNull);
     expect(named.parameter, isSimpleFormalParameter);
     var simple = named.parameter as SimpleFormalParameter;
-    expect(simple.type, isTypeName);
-    expect((simple.type as TypeName).name.name, 'B');
+    expect(simple.type, isNamedType);
+    expect((simple.type as NamedType).name.name, 'B');
   }
 
   void test_parseFormalParameterList_normal_positional() {
@@ -1017,7 +1016,7 @@
     var parameter = list.parameters[0] as SimpleFormalParameter;
     expect(parameter.toSource(), 'io.File ');
     expect(parameter.identifier!.token.isSynthetic, isTrue);
-    var type = parameter.type as TypeName;
+    var type = parameter.type as NamedType;
     var typeName = type.name as PrefixedIdentifier;
     expect(typeName.prefix.token.isSynthetic, isFalse);
     expect(typeName.identifier.token.isSynthetic, isFalse);
@@ -1038,7 +1037,7 @@
     var parameter = list.parameters[0] as SimpleFormalParameter;
     expect(parameter.toSource(), 'io. ');
     expect(parameter.identifier!.token.isSynthetic, isTrue);
-    var type = parameter.type as TypeName;
+    var type = parameter.type as NamedType;
     var typeName = type.name as PrefixedIdentifier;
     expect(typeName.prefix.token.isSynthetic, isFalse);
     expect(typeName.identifier.token.isSynthetic, isTrue);
diff --git a/pkg/analyzer/test/generated/function_reference_parser_test.dart b/pkg/analyzer/test/generated/function_reference_parser_test.dart
index 89ffcb5..2c0c918 100644
--- a/pkg/analyzer/test/generated/function_reference_parser_test.dart
+++ b/pkg/analyzer/test/generated/function_reference_parser_test.dart
@@ -24,8 +24,8 @@
     expect((functionReference.function as SimpleIdentifier).name, 'f');
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void expect_two_args(MethodInvocation methodInvocation) {
@@ -101,8 +101,8 @@
     expect(methodInvocation.methodName.name, 'f');
     var typeArgs = methodInvocation.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
     expect(methodInvocation.argumentList.arguments, isEmpty);
   }
 
@@ -113,12 +113,12 @@
         parseExpression('f<a, b>.toString()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var type = constructorName.type;
+    var type = constructorName.type2;
     expect((type.name as SimpleIdentifier).name, 'f');
     var typeArgs = type.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
     expect(constructorName.name!.name, 'toString');
     expect(instanceCreationExpression.argumentList.arguments, isEmpty);
   }
@@ -358,8 +358,8 @@
     expect(functionReference.function, TypeMatcher<IndexExpression>());
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_functionReference_after_indexExpression_bang() {
@@ -371,8 +371,8 @@
     expect(functionReference.function, TypeMatcher<PostfixExpression>());
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_functionReference_after_indexExpression_functionCall() {
@@ -385,8 +385,8 @@
         TypeMatcher<FunctionExpressionInvocation>());
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_functionReference_after_indexExpression_nullAware() {
@@ -398,8 +398,8 @@
     expect(functionReference.function, TypeMatcher<IndexExpression>());
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_methodTearoff() {
@@ -412,8 +412,8 @@
     expect(function.propertyName.name, 'm');
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_methodTearoff_cascaded() {
@@ -427,8 +427,8 @@
     expect(function.propertyName.name, 'm');
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_prefixedIdentifier() {
@@ -440,8 +440,8 @@
     expect(function.identifier.name, 'f');
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 
   void test_three_identifiers() {
@@ -454,7 +454,7 @@
     expect(function.propertyName.name, 'm');
     var typeArgs = functionReference.typeArguments!.arguments;
     expect(typeArgs, hasLength(2));
-    expect(((typeArgs[0] as TypeName).name as SimpleIdentifier).name, 'a');
-    expect(((typeArgs[1] as TypeName).name as SimpleIdentifier).name, 'b');
+    expect(((typeArgs[0] as NamedType).name as SimpleIdentifier).name, 'a');
+    expect(((typeArgs[1] as NamedType).name as SimpleIdentifier).name, 'b');
   }
 }
diff --git a/pkg/analyzer/test/generated/generic_metadata_parser_test.dart b/pkg/analyzer/test/generated/generic_metadata_parser_test.dart
index 05e1c6d..9e967e9 100644
--- a/pkg/analyzer/test/generated/generic_metadata_parser_test.dart
+++ b/pkg/analyzer/test/generated/generic_metadata_parser_test.dart
@@ -5,6 +5,7 @@
 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:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -26,9 +27,14 @@
       {List<ExpectedError>? errors, required ExpectedError? disabledError}) {
     var combinedErrors =
         disabledError == null ? errors : [disabledError, ...?errors];
-    return parseCompilationUnit(content,
-        errors: combinedErrors,
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.12'));
+    return parseCompilationUnit(
+      content,
+      errors: combinedErrors,
+      featureSet: FeatureSet.fromEnableFlags2(
+        sdkLanguageVersion: Version.parse('2.12.0'),
+        flags: [],
+      ),
+    );
   }
 }
 
@@ -39,11 +45,7 @@
   CompilationUnit _parseCompilationUnit(String content,
           {List<ExpectedError>? errors,
           required ExpectedError? disabledError}) =>
-      parseCompilationUnit(content,
-          errors: errors,
-          featureSet: FeatureSet.forTesting(
-              sdkVersion: '2.12',
-              additionalFeatures: [Feature.generic_metadata]));
+      parseCompilationUnit(content, errors: errors);
 }
 
 mixin GenericMetadataParserTest on FastaParserTestCase {
@@ -57,7 +59,7 @@
     var className = annotation.name as PrefixedIdentifier;
     expect(className.prefix.name, 'p');
     expect(className.identifier.name, 'A');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'B');
     expect(annotation.constructorName, isNull);
@@ -73,7 +75,7 @@
     var className = annotation.name as PrefixedIdentifier;
     expect(className.prefix.name, 'p');
     expect(className.identifier.name, 'A');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'B');
     expect(annotation.constructorName!.name, 'ctor');
@@ -88,7 +90,7 @@
     var annotation = classDeclaration.metadata.single;
     var className = annotation.name as SimpleIdentifier;
     expect(className.name, 'A');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'B');
     expect(annotation.constructorName, isNull);
@@ -103,7 +105,7 @@
     var annotation = classDeclaration.metadata.single;
     var className = annotation.name as SimpleIdentifier;
     expect(className.name, 'A');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'B');
     expect(annotation.constructorName!.name, 'ctor');
@@ -125,7 +127,7 @@
     var name = annotation.name as PrefixedIdentifier;
     expect(name.prefix.name, 'p');
     expect(name.identifier.name, 'x');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'A');
     expect(annotation.constructorName, isNull);
@@ -146,7 +148,7 @@
     var annotation = classDeclaration.metadata.single;
     var name = annotation.name as SimpleIdentifier;
     expect(name.name, 'x');
-    var typeArgument = annotation.typeArguments!.arguments.single as TypeName;
+    var typeArgument = annotation.typeArguments!.arguments.single as NamedType;
     var typeArgumentName = typeArgument.name as SimpleIdentifier;
     expect(typeArgumentName.name, 'A');
     expect(annotation.constructorName, isNull);
diff --git a/pkg/analyzer/test/generated/new_as_identifier_parser_test.dart b/pkg/analyzer/test/generated/new_as_identifier_parser_test.dart
index 9ce08a4..3f6571e 100644
--- a/pkg/analyzer/test/generated/new_as_identifier_parser_test.dart
+++ b/pkg/analyzer/test/generated/new_as_identifier_parser_test.dart
@@ -51,10 +51,10 @@
     // type.  Resolution will change the type to `D` and the name to `new` if
     // appropriate.
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'C');
     expect(typeName.identifier.name, 'new');
-    expect(constructorName.type.typeArguments, isNull);
+    expect(constructorName.type2.typeArguments, isNull);
     expect(constructorName.name, isNull);
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -64,9 +64,9 @@
         parseExpression('const C<int>.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as SimpleIdentifier;
+    var typeName = constructorName.type2.name as SimpleIdentifier;
     expect(typeName.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -76,10 +76,10 @@
         parseExpression('const prefix.C.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'C');
-    expect(constructorName.type.typeArguments, isNull);
+    expect(constructorName.type2.typeArguments, isNull);
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -89,10 +89,10 @@
         'const prefix.C<int>.new()',
         featureSet: constructorTearoffs) as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -105,10 +105,10 @@
     // type.  Resolution will change the type to `D` and the name to `new` if
     // appropriate.
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'C');
     expect(typeName.identifier.name, 'new');
-    expect(constructorName.type.typeArguments, isNull);
+    expect(constructorName.type2.typeArguments, isNull);
     expect(constructorName.name, isNull);
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -118,9 +118,9 @@
         parseExpression('new C<int>.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as SimpleIdentifier;
+    var typeName = constructorName.type2.name as SimpleIdentifier;
     expect(typeName.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -130,10 +130,10 @@
         parseExpression('new prefix.C.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'C');
-    expect(constructorName.type.typeArguments, isNull);
+    expect(constructorName.type2.typeArguments, isNull);
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -142,10 +142,10 @@
     var instanceCreationExpression = parseExpression('new prefix.C<int>.new()',
         featureSet: constructorTearoffs) as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -166,9 +166,9 @@
         parseExpression('C<int>.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as SimpleIdentifier;
+    var typeName = constructorName.type2.name as SimpleIdentifier;
     expect(typeName.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -190,10 +190,10 @@
         parseExpression('prefix.C<int>.new()', featureSet: constructorTearoffs)
             as InstanceCreationExpression;
     var constructorName = instanceCreationExpression.constructorName;
-    var typeName = constructorName.type.name as PrefixedIdentifier;
+    var typeName = constructorName.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'C');
-    expect(constructorName.type.typeArguments!.arguments, hasLength(1));
+    expect(constructorName.type2.typeArguments!.arguments, hasLength(1));
     expect(constructorName.name!.name, 'new');
     expect(instanceCreationExpression.argumentList, isNotNull);
   }
@@ -349,10 +349,10 @@
     // type.  Resolution will change the type to `D` and the name to `new` if
     // appropriate.
     var redirectedConstructor = constructorDeclaration.redirectedConstructor!;
-    var typeName = redirectedConstructor.type.name as PrefixedIdentifier;
+    var typeName = redirectedConstructor.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'D');
     expect(typeName.identifier.name, 'new');
-    expect(redirectedConstructor.type.typeArguments, isNull);
+    expect(redirectedConstructor.type2.typeArguments, isNull);
     expect(redirectedConstructor.name, isNull);
   }
 
@@ -367,9 +367,9 @@
         classDeclaration.members.single as ConstructorDeclaration;
     expect(constructorDeclaration.initializers, isEmpty);
     var redirectedConstructor = constructorDeclaration.redirectedConstructor!;
-    var typeName = redirectedConstructor.type.name as SimpleIdentifier;
+    var typeName = redirectedConstructor.type2.name as SimpleIdentifier;
     expect(typeName.name, 'D');
-    expect(redirectedConstructor.type.typeArguments!.arguments, hasLength(1));
+    expect(redirectedConstructor.type2.typeArguments!.arguments, hasLength(1));
     expect(redirectedConstructor.name!.name, 'new');
   }
 
@@ -384,10 +384,10 @@
         classDeclaration.members.single as ConstructorDeclaration;
     expect(constructorDeclaration.initializers, isEmpty);
     var redirectedConstructor = constructorDeclaration.redirectedConstructor!;
-    var typeName = redirectedConstructor.type.name as PrefixedIdentifier;
+    var typeName = redirectedConstructor.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'D');
-    expect(redirectedConstructor.type.typeArguments, isNull);
+    expect(redirectedConstructor.type2.typeArguments, isNull);
     expect(redirectedConstructor.name!.name, 'new');
   }
 
@@ -402,10 +402,10 @@
         classDeclaration.members.single as ConstructorDeclaration;
     expect(constructorDeclaration.initializers, isEmpty);
     var redirectedConstructor = constructorDeclaration.redirectedConstructor!;
-    var typeName = redirectedConstructor.type.name as PrefixedIdentifier;
+    var typeName = redirectedConstructor.type2.name as PrefixedIdentifier;
     expect(typeName.prefix.name, 'prefix');
     expect(typeName.identifier.name, 'D');
-    expect(redirectedConstructor.type.typeArguments!.arguments, hasLength(1));
+    expect(redirectedConstructor.type2.typeArguments!.arguments, hasLength(1));
     expect(redirectedConstructor.name!.name, 'new');
   }
 
diff --git a/pkg/analyzer/test/generated/nnbd_parser_test.dart b/pkg/analyzer/test/generated/nnbd_parser_test.dart
index 113fa2b..53a1772 100644
--- a/pkg/analyzer/test/generated/nnbd_parser_test.dart
+++ b/pkg/analyzer/test/generated/nnbd_parser_test.dart
@@ -95,7 +95,7 @@
     expect(functionExpression.operator.lexeme, '!');
 
     expect(expression.typeArguments!.arguments.length, 1);
-    var typeArgument = expression.typeArguments!.arguments.single as TypeName;
+    var typeArgument = expression.typeArguments!.arguments.single as NamedType;
     expect(typeArgument.name.name, "int");
 
     expect(expression.argumentList.arguments.length, 1);
@@ -395,7 +395,7 @@
     var parameter =
         constructor.parameters.parameters.single as SimpleFormalParameter;
     expect(parameter.identifier!.name, 'o');
-    var type = parameter.type as TypeName;
+    var type = parameter.type as NamedType;
     expect(type.question!.lexeme, '?');
     expect(type.name.name, 'Object');
 
@@ -409,7 +409,7 @@
       var expression = initializer.expression as AsExpression;
       var identifier = expression.expression as SimpleIdentifier;
       expect(identifier.name, 'o');
-      var expressionType = expression.type as TypeName;
+      var expressionType = expression.type as NamedType;
       expect(expressionType.question!.lexeme, '?');
       expect(expressionType.name.name, 'String');
     }
@@ -441,7 +441,7 @@
     var parameter =
         constructor.parameters.parameters.single as SimpleFormalParameter;
     expect(parameter.identifier!.name, 'o');
-    var type = parameter.type as TypeName;
+    var type = parameter.type as NamedType;
     expect(type.question!.lexeme, '?');
     expect(type.name.name, 'Object');
 
@@ -456,7 +456,7 @@
       var condition = expression.condition as IsExpression;
       var identifier = condition.expression as SimpleIdentifier;
       expect(identifier.name, 'o');
-      var expressionType = condition.type as TypeName;
+      var expressionType = condition.type as NamedType;
       expect(expressionType.question!.lexeme, '?');
       expect(expressionType.name.name, 'String');
       var thenExpression = expression.thenExpression as PrefixedIdentifier;
@@ -494,7 +494,7 @@
     var parameter =
         constructor.parameters.parameters.single as SimpleFormalParameter;
     expect(parameter.identifier!.name, 'o');
-    var type = parameter.type as TypeName;
+    var type = parameter.type as NamedType;
     expect(type.question!.lexeme, '?');
     expect(type.name.name, 'Object');
 
@@ -509,7 +509,7 @@
       var condition = expression.condition as IsExpression;
       var identifier = condition.expression as SimpleIdentifier;
       expect(identifier.name, 'o');
-      var expressionType = condition.type as TypeName;
+      var expressionType = condition.type as NamedType;
       expect(expressionType.question, isNull);
       expect(expressionType.name.name, 'String');
       var thenExpression = expression.thenExpression as PrefixedIdentifier;
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 48ea92e..5d366e2 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -750,9 +750,9 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token token) {
-    super.endExtensionDeclaration(
-        extensionKeyword, typeKeyword, onKeyword, token);
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token token) {
+    super.endExtensionDeclaration(extensionKeyword, typeKeyword, onKeyword,
+        showKeyword, hideKeyword, token);
     end('ExtensionDeclaration');
   }
 
diff --git a/pkg/analyzer/test/generated/parser_test_base.dart b/pkg/analyzer/test/generated/parser_test_base.dart
index 956e4ae..aed3955 100644
--- a/pkg/analyzer/test/generated/parser_test_base.dart
+++ b/pkg/analyzer/test/generated/parser_test_base.dart
@@ -14,6 +14,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart' show CompilationUnitImpl;
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
@@ -220,8 +221,10 @@
     implements AbstractParserTestCase {
   static final List<ErrorCode> NO_ERROR_COMPARISON = <ErrorCode>[];
 
-  final constructorTearoffs = FeatureSet.forTesting(
-      sdkVersion: '2.14.0', additionalFeatures: [Feature.constructor_tearoffs]);
+  final constructorTearoffs = FeatureSet.fromEnableFlags2(
+    sdkLanguageVersion: ExperimentStatus.currentVersion,
+    flags: [EnableString.constructor_tearoffs],
+  );
 
   final controlFlow = FeatureSet.latestLanguageVersion();
 
@@ -289,7 +292,7 @@
   @override
   void createParser(String content,
       {int? expectedEndOffset, FeatureSet? featureSet}) {
-    featureSet ??= FeatureSet.forTesting();
+    featureSet ??= FeatureSet.latestLanguageVersion();
     var result = scanString(content,
         configuration: featureSet.isEnabled(Feature.non_nullable)
             ? ScannerConfiguration.nonNullable
@@ -407,8 +410,8 @@
 
   CompilationUnitImpl parseCompilationUnit2(
       String content, GatheringErrorListener listener,
-      {LanguageVersionToken? languageVersion, FeatureSet? featureSet}) {
-    featureSet ??= FeatureSet.forTesting();
+      {FeatureSet? featureSet}) {
+    featureSet ??= FeatureSet.latestLanguageVersion();
     var source = StringSource(content, 'parser_test_StringSource.dart');
 
     // Adjust the feature set based on language version comment.
@@ -941,7 +944,7 @@
   }
 
   @override
-  TypeName parseTypeName(bool inExpression) {
+  NamedType parseTypeName(bool inExpression) {
     return _run('unspecified', () => super.parseTypeName(inExpression));
   }
 
@@ -1166,7 +1169,7 @@
     analyzer.Parser parser = analyzer.Parser(
       source,
       listener,
-      featureSet: FeatureSet.forTesting(),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
     parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
     CompilationUnit unit = parser.parseCompilationUnit(result.tokens);
@@ -1193,7 +1196,7 @@
     analyzer.Parser parser = analyzer.Parser(
       source,
       listener,
-      featureSet: FeatureSet.forTesting(),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
     parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
     var unit = parser.parseCompilationUnit(result.tokens);
@@ -1471,7 +1474,7 @@
     analyzer.Parser parser = analyzer.Parser(
       source,
       listener,
-      featureSet: FeatureSet.forTesting(),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
     parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
     Statement statement = parser.parseStatement(result.tokens);
diff --git a/pkg/analyzer/test/generated/recovery_parser_test.dart b/pkg/analyzer/test/generated/recovery_parser_test.dart
index 523a736..1ae179e 100644
--- a/pkg/analyzer/test/generated/recovery_parser_test.dart
+++ b/pkg/analyzer/test/generated/recovery_parser_test.dart
@@ -968,7 +968,7 @@
     VariableDeclaration field = fields[0];
     expect(field.name.name, 'f');
 // validate the type
-    var typeArguments = (fieldList.type as TypeName).typeArguments!;
+    var typeArguments = (fieldList.type as NamedType).typeArguments!;
     expect(typeArguments.arguments, hasLength(1));
 // synthetic '>'
     Token token = typeArguments.endToken;
@@ -1086,7 +1086,7 @@
     expect(expression.notOperator, isNotNull);
     TypeAnnotation type = expression.type;
     expect(type, isNotNull);
-    expect(type is TypeName && type.name.isSynthetic, isTrue);
+    expect(type is NamedType && type.name.isSynthetic, isTrue);
     var thenStatement = ifStatement.thenStatement as ExpressionStatement;
     expect(thenStatement.semicolon!.isSynthetic, isTrue);
     var simpleId = thenStatement.expression as SimpleIdentifier;
@@ -1468,7 +1468,7 @@
     var expression =
         parseExpression("x is", codes: [ParserErrorCode.EXPECTED_TYPE_NAME])
             as IsExpression;
-    expect(expression.type, isTypeName);
+    expect(expression.type, isNamedType);
     expect(expression.type.isSynthetic, isTrue);
   }
 
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 6cf3730..e53b5e8 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -199,6 +199,19 @@
   void visitLibraryIdentifier(LibraryIdentifier node) {}
 
   @override
+  void visitNamedType(NamedType node) {
+    // Note: do not visit children from this node, the child SimpleIdentifier in
+    // TypeName (i.e. "String") does not have a static type defined.
+    // TODO(brianwilkerson) Not visiting the children means that we won't catch
+    // type arguments that were not resolved.
+    if (node.type == null) {
+      _unresolvedTypes.add(node);
+    } else {
+      _resolvedTypeCount++;
+    }
+  }
+
+  @override
   void visitPrefixedIdentifier(PrefixedIdentifier node) {
     // In cases where we have a prefixed identifier where the prefix is dynamic,
     // we don't want to assert that the node will have a type.
@@ -243,19 +256,6 @@
     super.visitTypeAnnotation(node);
   }
 
-  @override
-  void visitTypeName(TypeName node) {
-    // Note: do not visit children from this node, the child SimpleIdentifier in
-    // TypeName (i.e. "String") does not have a static type defined.
-    // TODO(brianwilkerson) Not visiting the children means that we won't catch
-    // type arguments that were not resolved.
-    if (node.type == null) {
-      _unresolvedTypes.add(node);
-    } else {
-      _resolvedTypeCount++;
-    }
-  }
-
   String _getFileName(AstNode? node) {
     // TODO (jwren) there are two copies of this method, one here and one in
     // ResolutionVerifier, they should be resolved into a single method
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index ed20e1a..08cf6ac 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -82,7 +82,7 @@
 
 @reflectiveTest
 class LineInfoTest {
-  final featureSet = FeatureSet.forTesting(sdkVersion: '2.2.2');
+  final featureSet = FeatureSet.latestLanguageVersion();
 
   void test_lineInfo_multilineComment() {
     String source = "/*\r\n *\r\n */";
@@ -208,8 +208,8 @@
     expect(defaultFeatureSet.isEnabled(Feature.extension_methods), isTrue);
 
     scanner.configureFeatures(
-      featureSetForOverriding: FeatureSet.forTesting(),
-      featureSet: FeatureSet.forTesting(),
+      featureSetForOverriding: FeatureSet.latestLanguageVersion(),
+      featureSet: FeatureSet.latestLanguageVersion(),
     );
     scanner.tokenize();
 
@@ -221,7 +221,7 @@
     var scanner = _createScanner(r'''
 // @dart = 99999999999999999999999999999999.0
 ''');
-    var featureSet = FeatureSet.forTesting();
+    var featureSet = FeatureSet.latestLanguageVersion();
     scanner.configureFeatures(
       featureSetForOverriding: featureSet,
       featureSet: featureSet,
@@ -234,7 +234,7 @@
     var scanner = _createScanner(r'''
 // @dart = 2.99999999999999999999999999999999
 ''');
-    var featureSet = FeatureSet.forTesting();
+    var featureSet = FeatureSet.latestLanguageVersion();
     scanner.configureFeatures(
       featureSetForOverriding: featureSet,
       featureSet: featureSet,
diff --git a/pkg/analyzer/test/generated/simple_parser_test.dart b/pkg/analyzer/test/generated/simple_parser_test.dart
index 3a52b79..f96e112 100644
--- a/pkg/analyzer/test/generated/simple_parser_test.dart
+++ b/pkg/analyzer/test/generated/simple_parser_test.dart
@@ -1171,7 +1171,7 @@
     ConstructorName name = parseConstructorName('A.n');
     expectNotNullIfNoErrors(name);
     assertNoErrors();
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
   }
@@ -1180,7 +1180,7 @@
     ConstructorName name = parseConstructorName('p.A.n');
     expectNotNullIfNoErrors(name);
     assertNoErrors();
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNotNull);
     expect(name.name, isNotNull);
   }
@@ -1189,7 +1189,7 @@
     ConstructorName name = parseConstructorName('A');
     expectNotNullIfNoErrors(name);
     assertNoErrors();
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
   }
@@ -1198,7 +1198,7 @@
     ConstructorName name = parseConstructorName('p.A');
     expectNotNullIfNoErrors(name);
     assertNoErrors();
-    expect(name.type, isNotNull);
+    expect(name.type2, isNotNull);
     expect(name.period, isNull);
     expect(name.name, isNull);
   }
@@ -1246,8 +1246,8 @@
     expectNotNullIfNoErrors(clause);
     assertNoErrors();
     expect(clause.extendsKeyword, isNotNull);
-    expect(clause.superclass, isNotNull);
-    expect(clause.superclass, isTypeName);
+    expect(clause.superclass2, isNotNull);
+    expect(clause.superclass2, isNamedType);
   }
 
   void test_parseFunctionBody_block() {
@@ -1381,7 +1381,7 @@
     ImplementsClause clause = parseImplementsClause('implements A, B, C');
     expectNotNullIfNoErrors(clause);
     assertNoErrors();
-    expect(clause.interfaces, hasLength(3));
+    expect(clause.interfaces2, hasLength(3));
     expect(clause.implementsKeyword, isNotNull);
   }
 
@@ -1389,7 +1389,7 @@
     ImplementsClause clause = parseImplementsClause('implements A');
     expectNotNullIfNoErrors(clause);
     assertNoErrors();
-    expect(clause.interfaces, hasLength(1));
+    expect(clause.interfaces2, hasLength(1));
     expect(clause.implementsKeyword, isNotNull);
   }
 
@@ -1432,7 +1432,7 @@
     var creation = body.expression as InstanceCreationExpressionImpl;
     expect(creation.keyword, isNull);
     ConstructorName constructorName = creation.constructorName;
-    expect(constructorName.type.toSource(), 'C<E>');
+    expect(constructorName.type2.toSource(), 'C<E>');
     expect(constructorName.period, isNotNull);
     expect(constructorName.name, isNotNull);
     expect(creation.argumentList, isNotNull);
@@ -1467,7 +1467,7 @@
     var creation = body.expression as InstanceCreationExpression;
     expect(creation.keyword, isNull);
     ConstructorName constructorName = creation.constructorName;
-    expect(constructorName.type.toSource(), 'p.C<E>');
+    expect(constructorName.type2.toSource(), 'p.C<E>');
     expect(constructorName.period, isNotNull);
     expect(constructorName.name, isNotNull);
     expect(creation.argumentList, isNotNull);
@@ -1604,14 +1604,14 @@
     expect(parameters[0], isSimpleFormalParameter);
     var parameter = parameters[0] as SimpleFormalParameter;
     expect(parameter.identifier, isNull);
-    expect(parameter.type, isTypeName);
-    expect((parameter.type as TypeName).name.name, 'int');
+    expect(parameter.type, isNamedType);
+    expect((parameter.type as NamedType).name.name, 'int');
 
     expect(parameters[1], isSimpleFormalParameter);
     parameter = parameters[1] as SimpleFormalParameter;
     expect(parameter.identifier, isNull);
-    expect(parameter.type, isTypeName);
-    expect((parameter.type as TypeName).name.name, 'int');
+    expect(parameter.type, isNamedType);
+    expect((parameter.type as NamedType).name.name, 'int');
   }
 
   void test_parseTypeAnnotation_function_noReturnType_typeParameters() {
@@ -1647,7 +1647,7 @@
 
   void test_parseTypeAnnotation_function_returnType_classFunction() {
     createParser('Function');
-    var functionType = parser.parseTypeAnnotation(false) as TypeName;
+    var functionType = parser.parseTypeAnnotation(false) as NamedType;
     expectNotNullIfNoErrors(functionType);
     assertNoErrors();
   }
@@ -1690,15 +1690,15 @@
     var parameter = parameters[0] as SimpleFormalParameter;
     expect(parameter.identifier, isNotNull);
     expect(parameter.identifier!.name, 's');
-    expect(parameter.type, isTypeName);
-    expect((parameter.type as TypeName).name.name, 'String');
+    expect(parameter.type, isNamedType);
+    expect((parameter.type as NamedType).name.name, 'String');
 
     expect(parameters[1], isSimpleFormalParameter);
     parameter = parameters[1] as SimpleFormalParameter;
     expect(parameter.identifier, isNotNull);
     expect(parameter.identifier!.name, 'i');
-    expect(parameter.type, isTypeName);
-    expect((parameter.type as TypeName).name.name, 'int');
+    expect(parameter.type, isNamedType);
+    expect((parameter.type as NamedType).name.name, 'int');
   }
 
   void test_parseTypeAnnotation_function_returnType_simple() {
@@ -1750,8 +1750,8 @@
 
   void test_parseTypeAnnotation_named() {
     createParser('A<B>');
-    var typeName = parser.parseTypeAnnotation(false) as TypeName;
-    expectNotNullIfNoErrors(typeName);
+    var namedType = parser.parseTypeAnnotation(false) as NamedType;
+    expectNotNullIfNoErrors(namedType);
     assertNoErrors();
   }
 
@@ -1782,7 +1782,7 @@
     assertNoErrors();
     expect(argumentList.leftBracket, isNotNull);
     expect(argumentList.arguments, hasLength(1));
-    var argument = argumentList.arguments[0] as TypeName;
+    var argument = argumentList.arguments[0] as NamedType;
     expect(argument, isNotNull);
     var innerList = argument.typeArguments!;
     expect(innerList, isNotNull);
@@ -1799,7 +1799,7 @@
     expect(argumentList.rightBracket, isNotNull);
     expect(argumentList.arguments, hasLength(1));
 
-    var argument = argumentList.arguments[0] as TypeName;
+    var argument = argumentList.arguments[0] as NamedType;
     expect(argument, isNotNull);
 
     var innerList = argument.typeArguments!;
@@ -1819,7 +1819,7 @@
     expect(argumentList.rightBracket, isNotNull);
     expect(argumentList.arguments, hasLength(1));
 
-    var argument = argumentList.arguments[0] as TypeName;
+    var argument = argumentList.arguments[0] as NamedType;
     expect(argument, isNotNull);
 
     var innerList = argument.typeArguments!;
@@ -1828,7 +1828,7 @@
     expect(innerList.arguments, hasLength(1));
     expect(innerList.rightBracket, isNotNull);
 
-    var innerArgument = innerList.arguments[0] as TypeName;
+    var innerArgument = innerList.arguments[0] as NamedType;
     expect(innerArgument, isNotNull);
 
     var innerInnerList = innerArgument.typeArguments!;
@@ -1851,20 +1851,20 @@
 
   void test_parseTypeName_parameterized() {
     createParser('List<int>');
-    TypeName typeName = parser.parseTypeName(false);
-    expectNotNullIfNoErrors(typeName);
+    NamedType namedType = parser.parseTypeName(false);
+    expectNotNullIfNoErrors(namedType);
     assertNoErrors();
-    expect(typeName.name, isNotNull);
-    expect(typeName.typeArguments, isNotNull);
+    expect(namedType.name, isNotNull);
+    expect(namedType.typeArguments, isNotNull);
   }
 
   void test_parseTypeName_simple() {
     createParser('int');
-    TypeName typeName = parser.parseTypeName(false);
-    expectNotNullIfNoErrors(typeName);
+    NamedType namedType = parser.parseTypeName(false);
+    expectNotNullIfNoErrors(namedType);
     assertNoErrors();
-    expect(typeName.name, isNotNull);
-    expect(typeName.typeArguments, isNull);
+    expect(namedType.name, isNotNull);
+    expect(namedType.typeArguments, isNull);
   }
 
   void test_parseTypeParameter_bounded_functionType_noReturn() {
@@ -1892,7 +1892,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, isTypeName);
+    expect(parameter.bound, isNamedType);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -1902,7 +1902,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, isTypeName);
+    expect(parameter.bound, isNamedType);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -1947,13 +1947,13 @@
     expect(parameterList.typeParameters, hasLength(1));
     TypeParameter typeParameter = parameterList.typeParameters[0];
     expect(typeParameter.name.name, 'A');
-    var bound = typeParameter.bound as TypeName;
+    var bound = typeParameter.bound as NamedType;
     expect(bound.name.name, 'B');
     var typeArguments = bound.typeArguments!;
     expect(typeArguments.arguments, hasLength(1));
     expect(typeArguments.rightBracket, isNotNull);
     expect(typeArguments.rightBracket.precedingComments!.lexeme, '/* foo */');
-    var argument = typeArguments.arguments[0] as TypeName;
+    var argument = typeArguments.arguments[0] as NamedType;
     expect(argument.name.name, 'E');
   }
 
@@ -2077,7 +2077,7 @@
     expectNotNullIfNoErrors(clause);
     assertNoErrors();
     expect(clause.withKeyword, isNotNull);
-    expect(clause.mixinTypes, hasLength(3));
+    expect(clause.mixinTypes2, hasLength(3));
   }
 
   void test_parseWithClause_single() {
@@ -2085,7 +2085,7 @@
     expectNotNullIfNoErrors(clause);
     assertNoErrors();
     expect(clause.withKeyword, isNotNull);
-    expect(clause.mixinTypes, hasLength(1));
+    expect(clause.mixinTypes2, hasLength(1));
   }
 
   void test_typeAlias_37733() {
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index 196e8b2..98e3f04 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/source/source_resource.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
diff --git a/pkg/analyzer/test/generated/statement_parser_test.dart b/pkg/analyzer/test/generated/statement_parser_test.dart
index 02d0f4b..5e90e69 100644
--- a/pkg/analyzer/test/generated/statement_parser_test.dart
+++ b/pkg/analyzer/test/generated/statement_parser_test.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer/dart/ast/token.dart' as analyzer;
 import 'package:analyzer/dart/ast/token.dart' show TokenType;
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/error/codes.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -28,7 +27,7 @@
     var funct1 = statement.expression as FunctionExpressionInvocation;
     List<TypeAnnotation> typeArgs = funct1.typeArguments!.arguments;
     expect(typeArgs, hasLength(1));
-    var typeName = typeArgs[0] as TypeName;
+    var typeName = typeArgs[0] as NamedType;
     expect(typeName.name.name, 'int');
     expect(funct1.argumentList.arguments, hasLength(0));
 
@@ -995,8 +994,7 @@
 
   void test_parseNonLabeledStatement_const_object_named_typeParameters_34403() {
     var statement = parseStatement('const A<B>.c<C>();') as ExpressionStatement;
-    assertErrorsWithCodes(
-        [CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR]);
+    assertErrorsWithCodes([ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS]);
     expect(statement.expression, isNotNull);
   }
 
@@ -1185,10 +1183,10 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    var typeName = variableList.type as TypeName;
+    var typeName = variableList.type as NamedType;
     expect(typeName.name.name, 'C');
     expect(typeName.typeArguments!.arguments, hasLength(1));
-    var typeArgument = typeName.typeArguments!.arguments[0] as TypeName;
+    var typeArgument = typeName.typeArguments!.arguments[0] as NamedType;
     expect(typeArgument.name.name, 'T');
   }
 
@@ -1200,10 +1198,10 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    var typeName = variableList.type as TypeName;
+    var typeName = variableList.type as NamedType;
     expect(typeName.name.name, 'C');
     expect(typeName.typeArguments!.arguments, hasLength(1));
-    var typeArgument = typeName.typeArguments!.arguments[0] as TypeName;
+    var typeArgument = typeName.typeArguments!.arguments[0] as NamedType;
     expect(typeArgument.name.name, 'T');
   }
 
@@ -1215,7 +1213,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    var typeName = variableList.type as TypeName;
+    var typeName = variableList.type as NamedType;
     expect(typeName.name.name, 'C');
     expect(typeName.typeArguments!.arguments, hasLength(1));
     expect(typeName.typeArguments!.arguments[0], isGenericFunctionType);
@@ -1225,7 +1223,7 @@
     var declaration = parseStatement('C<> c;') as VariableDeclarationStatement;
     assertErrorsWithCodes([ParserErrorCode.EXPECTED_TYPE_NAME]);
     VariableDeclarationList variables = declaration.variables;
-    var type = variables.type as TypeName;
+    var type = variables.type as NamedType;
     var argumentList = type.typeArguments!;
     expect(argumentList.leftBracket, isNotNull);
     expect(argumentList.arguments, hasLength(1));
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 0e2c9d5..affcebc 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -503,7 +503,7 @@
         CompilationUnitElementImpl();
     definingCompilationUnit.librarySource =
         definingCompilationUnit.source = source;
-    var featureSet = FeatureSet.forTesting();
+    var featureSet = FeatureSet.latestLanguageVersion();
 
     _definingLibrary = LibraryElementImpl(
         context, _AnalysisSessionMock(), 'name', -1, 0, featureSet);
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index e724509..11b6ce1 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -372,7 +372,7 @@
     var exp = stmt.expression as InstanceCreationExpression;
     ClassElement elementB = AstFinder.getClass(unit, "B").declaredElement!;
     ClassElement elementA = AstFinder.getClass(unit, "A").declaredElement!;
-    expect(exp.constructorName.type.typeOrThrow.element, elementB);
+    expect(exp.constructorName.type2.typeOrThrow.element, elementB);
     _isInstantiationOf(_hasElement(elementB))([
       _isType(elementA.typeParameters[0]
           .instantiate(nullabilitySuffix: NullabilitySuffix.star))
@@ -2372,7 +2372,7 @@
     var bConstructor = b.members[0] as ConstructorDeclaration;
     var redirected = bConstructor.redirectedConstructor as ConstructorName;
 
-    var typeName = redirected.type;
+    var typeName = redirected.type2;
     assertType(typeName.type, 'A<T2, U2>');
     assertType(typeName.type, 'A<T2, U2>');
 
@@ -2408,7 +2408,7 @@
     var bConstructor = b.members[0] as ConstructorDeclaration;
     var redirected = bConstructor.redirectedConstructor as ConstructorName;
 
-    var typeName = redirected.type;
+    var typeName = redirected.type2;
     assertType(typeName.type, 'A<T2, U2>');
     assertType(typeName.type, 'A<T2, U2>');
 
diff --git a/pkg/analyzer/test/generated/test_analysis_context.dart b/pkg/analyzer/test/generated/test_analysis_context.dart
index 473c34a..840d225 100644
--- a/pkg/analyzer/test/generated/test_analysis_context.dart
+++ b/pkg/analyzer/test/generated/test_analysis_context.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.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';
@@ -18,7 +17,7 @@
   final SourceFactory sourceFactory = _MockSourceFactory();
 
   final _MockAnalysisSession _analysisSession = _MockAnalysisSession();
-  late AnalysisOptionsImpl _analysisOptions;
+  final AnalysisOptionsImpl _analysisOptions = AnalysisOptionsImpl();
 
   late TypeProviderImpl _typeProviderLegacy;
   late TypeProviderImpl _typeProviderNonNullableByDefault;
@@ -26,10 +25,7 @@
   late TypeSystemImpl _typeSystemLegacy;
   late TypeSystemImpl _typeSystemNonNullableByDefault;
 
-  TestAnalysisContext({FeatureSet? featureSet}) {
-    _analysisOptions = AnalysisOptionsImpl()
-      ..contextFeatures = featureSet ?? FeatureSet.forTesting();
-
+  TestAnalysisContext() {
     var sdkElements = MockSdkElements(this, _analysisSession);
 
     _typeProviderLegacy = TypeProviderImpl(
diff --git a/pkg/analyzer/test/generated/top_level_parser_test.dart b/pkg/analyzer/test/generated/top_level_parser_test.dart
index acf54ac..bde8059 100644
--- a/pkg/analyzer/test/generated/top_level_parser_test.dart
+++ b/pkg/analyzer/test/generated/top_level_parser_test.dart
@@ -92,16 +92,16 @@
     // Ensure type parsed as "Future<List<[empty name]>>".
     expect(declaration.variables.type, isNotNull);
     expect(declaration.variables.type!.question, isNull);
-    expect(declaration.variables.type, TypeMatcher<TypeName>());
-    var type = declaration.variables.type as TypeName;
+    expect(declaration.variables.type, TypeMatcher<NamedType>());
+    var type = declaration.variables.type as NamedType;
     expect(type.name.name, "Future");
     expect(type.typeArguments!.arguments.length, 1);
-    expect(type.typeArguments!.arguments.single, TypeMatcher<TypeName>());
-    var subType = type.typeArguments!.arguments.single as TypeName;
+    expect(type.typeArguments!.arguments.single, TypeMatcher<NamedType>());
+    var subType = type.typeArguments!.arguments.single as NamedType;
     expect(subType.name.name, "List");
     expect(subType.typeArguments!.arguments.length, 1);
-    expect(subType.typeArguments!.arguments.single, TypeMatcher<TypeName>());
-    var subSubType = subType.typeArguments!.arguments.single as TypeName;
+    expect(subType.typeArguments!.arguments.single, TypeMatcher<NamedType>());
+    var subSubType = subType.typeArguments!.arguments.single as NamedType;
     expect(subSubType.name.name, "");
     expect(subSubType.typeArguments, isNull);
   }
@@ -398,7 +398,7 @@
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.implementsClause, isNotNull);
     expect(typeAlias.implementsClause!.implementsKeyword, isNotNull);
-    expect(typeAlias.implementsClause!.interfaces.length, 1);
+    expect(typeAlias.implementsClause!.interfaces2.length, 1);
     expect(typeAlias.semicolon, isNotNull);
   }
 
@@ -414,7 +414,7 @@
     expect(typeAlias.typeParameters, isNull);
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.withClause.withKeyword, isNotNull);
-    expect(typeAlias.withClause.mixinTypes.length, 1);
+    expect(typeAlias.withClause.mixinTypes2.length, 1);
     expect(typeAlias.implementsClause, isNull);
     expect(typeAlias.semicolon, isNotNull);
   }
@@ -573,7 +573,7 @@
     expect(unit.declarations, hasLength(1));
   }
 
-  void test_parseCompilationUnit_pseudo_asTypeName() {
+  void test_parseCompilationUnit_pseudo_asNamedType() {
     for (Keyword keyword in Keyword.values) {
       if (keyword.isPseudo) {
         String lexeme = keyword.lexeme;
@@ -935,7 +935,7 @@
     expect(typeAlias.typeParameters, isNull);
     expect(typeAlias.equals, isNotNull);
     expect(typeAlias.abstractKeyword, isNotNull);
-    expect(typeAlias.superclass.name.name, "S");
+    expect(typeAlias.superclass2.name.name, "S");
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.implementsClause, isNull);
     expect(typeAlias.semicolon, isNotNull);
@@ -953,7 +953,7 @@
     expect(typeAlias.typeParameters!.typeParameters, hasLength(1));
     expect(typeAlias.equals, isNotNull);
     expect(typeAlias.abstractKeyword, isNull);
-    expect(typeAlias.superclass.name.name, "S");
+    expect(typeAlias.superclass2.name.name, "S");
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.implementsClause, isNotNull);
     expect(typeAlias.semicolon, isNotNull);
@@ -971,7 +971,7 @@
     expect(typeAlias.typeParameters, isNull);
     expect(typeAlias.equals, isNotNull);
     expect(typeAlias.abstractKeyword, isNull);
-    expect(typeAlias.superclass.name.name, "S");
+    expect(typeAlias.superclass2.name.name, "S");
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.implementsClause, isNotNull);
     expect(typeAlias.semicolon, isNotNull);
@@ -989,7 +989,7 @@
     expect(typeAlias.typeParameters, isNull);
     expect(typeAlias.equals, isNotNull);
     expect(typeAlias.abstractKeyword, isNull);
-    expect(typeAlias.superclass.name.name, "S");
+    expect(typeAlias.superclass2.name.name, "S");
     expect(typeAlias.withClause, isNotNull);
     expect(typeAlias.implementsClause, isNull);
     expect(typeAlias.semicolon, isNotNull);
@@ -1467,7 +1467,7 @@
     expect(declaration, isNotNull);
     assertNoErrors();
     expectCommentText(declaration.documentationComment, '/// Doc');
-    expect((declaration.returnType as TypeName).name.name, 'T');
+    expect((declaration.returnType as NamedType).name.name, 'T');
     expect(declaration.name, isNotNull);
     FunctionExpression expression = declaration.functionExpression;
     expect(expression, isNotNull);
@@ -1483,7 +1483,7 @@
     expect(declaration, isNotNull);
     assertNoErrors();
     expectCommentText(declaration.documentationComment, '/// Doc');
-    expect((declaration.returnType as TypeName).name.name, 'T');
+    expect((declaration.returnType as NamedType).name.name, 'T');
     expect(declaration.name, isNotNull);
     FunctionExpression expression = declaration.functionExpression;
     expect(expression, isNotNull);
@@ -1499,7 +1499,7 @@
     expect(declaration, isNotNull);
     assertNoErrors();
     expectCommentText(declaration.documentationComment, '/// Doc');
-    expect((declaration.returnType as TypeName).name.name, 'T');
+    expect((declaration.returnType as NamedType).name.name, 'T');
     expect(declaration.name, isNotNull);
     FunctionExpression expression = declaration.functionExpression;
     expect(expression, isNotNull);
@@ -1516,7 +1516,7 @@
     expect(declaration, isNotNull);
     assertNoErrors();
     expect(declaration.documentationComment, isNull);
-    expect((declaration.returnType as TypeName).name.name, 'T');
+    expect((declaration.returnType as NamedType).name.name, 'T');
     expect(declaration.name, isNotNull);
     FunctionExpression expression = declaration.functionExpression;
     expect(expression, isNotNull);
@@ -1577,7 +1577,7 @@
     expect(declaration, isNotNull);
     assertNoErrors();
     expectCommentText(declaration.documentationComment, '/// Doc');
-    expect((declaration.returnType as TypeName).name.name, 'T');
+    expect((declaration.returnType as NamedType).name.name, 'T');
     expect(declaration.name, isNotNull);
     FunctionExpression expression = declaration.functionExpression;
     expect(expression, isNotNull);
@@ -1949,7 +1949,7 @@
     expect(declaration.onClause, isNull);
     var implementsClause = declaration.implementsClause!;
     expect(implementsClause.implementsKeyword, isNotNull);
-    NodeList<TypeName> interfaces = implementsClause.interfaces;
+    NodeList<NamedType> interfaces = implementsClause.interfaces2;
     expect(interfaces, hasLength(1));
     expect(interfaces[0].name.name, 'B');
     expect(interfaces[0].typeArguments, isNull);
@@ -1971,7 +1971,7 @@
     expect(declaration.onClause, isNull);
     var implementsClause = declaration.implementsClause!;
     expect(implementsClause.implementsKeyword, isNotNull);
-    NodeList<TypeName> interfaces = implementsClause.interfaces;
+    NodeList<NamedType> interfaces = implementsClause.interfaces2;
     expect(interfaces, hasLength(2));
     expect(interfaces[0].name.name, 'B');
     expect(interfaces[0].typeArguments!.arguments, hasLength(1));
@@ -2013,7 +2013,7 @@
     expect(declaration.documentationComment, isNull);
     var onClause = declaration.onClause!;
     expect(onClause.onKeyword, isNotNull);
-    NodeList<TypeName> constraints = onClause.superclassConstraints;
+    NodeList<NamedType> constraints = onClause.superclassConstraints2;
     expect(constraints, hasLength(1));
     expect(constraints[0].name.name, 'B');
     expect(constraints[0].typeArguments, isNull);
@@ -2035,7 +2035,7 @@
     expect(declaration.documentationComment, isNull);
     var onClause = declaration.onClause!;
     expect(onClause.onKeyword, isNotNull);
-    NodeList<TypeName> constraints = onClause.superclassConstraints;
+    NodeList<NamedType> constraints = onClause.superclassConstraints2;
     expect(constraints, hasLength(2));
     expect(constraints[0].name.name, 'B');
     expect(constraints[0].typeArguments, isNull);
@@ -2059,13 +2059,13 @@
     expect(declaration.documentationComment, isNull);
     var onClause = declaration.onClause!;
     expect(onClause.onKeyword, isNotNull);
-    NodeList<TypeName> constraints = onClause.superclassConstraints;
+    NodeList<NamedType> constraints = onClause.superclassConstraints2;
     expect(constraints, hasLength(1));
     expect(constraints[0].name.name, 'B');
     expect(constraints[0].typeArguments, isNull);
     var implementsClause = declaration.implementsClause!;
     expect(implementsClause.implementsKeyword, isNotNull);
-    NodeList<TypeName> interfaces = implementsClause.interfaces;
+    NodeList<NamedType> interfaces = implementsClause.interfaces2;
     expect(interfaces, hasLength(1));
     expect(interfaces[0].name.name, 'C');
     expect(interfaces[0].typeArguments, isNull);
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 492236c..a0f6b1e 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_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/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';
@@ -19,12 +18,12 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(AssignabilityTest);
+    defineReflectiveTests(AssignabilityWithoutNullSafetyTest);
     defineReflectiveTests(TryPromoteToTest);
   });
 }
 
-abstract class AbstractTypeSystemNullSafetyTest with ElementsTypesMixin {
+abstract class AbstractTypeSystemTest with ElementsTypesMixin {
   late TestAnalysisContext analysisContext;
 
   @override
@@ -35,16 +34,8 @@
 
   late TypeSystemImpl typeSystem;
 
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
   void setUp() {
-    analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
+    analysisContext = TestAnalysisContext();
     typeProvider = analysisContext.typeProviderNonNullableByDefault;
     typeSystem = analysisContext.typeSystemNonNullableByDefault;
 
@@ -57,7 +48,7 @@
   }
 }
 
-abstract class AbstractTypeSystemTest with ElementsTypesMixin {
+abstract class AbstractTypeSystemWithoutNullSafetyTest with ElementsTypesMixin {
   late TestAnalysisContext analysisContext;
 
   @override
@@ -68,14 +59,8 @@
 
   late TypeSystemImpl typeSystem;
 
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting();
-  }
-
   void setUp() {
-    analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
+    analysisContext = TestAnalysisContext();
     typeProvider = analysisContext.typeProviderLegacy;
     typeSystem = analysisContext.typeSystemLegacy;
 
@@ -89,7 +74,8 @@
 }
 
 @reflectiveTest
-class AssignabilityTest extends AbstractTypeSystemTest {
+class AssignabilityWithoutNullSafetyTest
+    extends AbstractTypeSystemWithoutNullSafetyTest {
   void test_isAssignableTo_bottom_isBottom() {
     var A = class_(name: 'A');
     List<DartType> interassignable = <DartType>[
@@ -438,13 +424,6 @@
 
 @reflectiveTest
 class TryPromoteToTest extends AbstractTypeSystemTest {
-  @override
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
   void notPromotes(DartType from, DartType to) {
     var result = typeSystem.tryPromoteToType(to, from);
     expect(result, isNull);
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index b6d2157..0cbba91c 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -264,9 +264,9 @@
 }
 
 class Getter_NodeReplacerTest_test_classTypeAlias
-    implements NodeReplacerTest_Getter<ClassTypeAlias, TypeName> {
+    implements NodeReplacerTest_Getter<ClassTypeAlias, NamedType> {
   @override
-  TypeName get(ClassTypeAlias node) => node.superclass;
+  NamedType get(ClassTypeAlias node) => node.superclass2;
 }
 
 class Getter_NodeReplacerTest_test_classTypeAlias_2
@@ -372,9 +372,9 @@
 }
 
 class Getter_NodeReplacerTest_test_constructorName
-    implements NodeReplacerTest_Getter<ConstructorName, TypeName> {
+    implements NodeReplacerTest_Getter<ConstructorName, NamedType> {
   @override
-  TypeName get(ConstructorName node) => node.type;
+  NamedType get(ConstructorName node) => node.type2;
 }
 
 class Getter_NodeReplacerTest_test_constructorName_2
@@ -452,9 +452,9 @@
 }
 
 class Getter_NodeReplacerTest_test_extendsClause
-    implements NodeReplacerTest_Getter<ExtendsClause, TypeName> {
+    implements NodeReplacerTest_Getter<ExtendsClause, NamedType> {
   @override
-  TypeName get(ExtendsClause node) => node.superclass;
+  NamedType get(ExtendsClause node) => node.superclass2;
 }
 
 class Getter_NodeReplacerTest_test_fieldDeclaration
@@ -947,15 +947,15 @@
 }
 
 class Getter_NodeReplacerTest_test_typeName
-    implements NodeReplacerTest_Getter<TypeName, TypeArgumentList> {
+    implements NodeReplacerTest_Getter<NamedType, TypeArgumentList> {
   @override
-  TypeArgumentList? get(TypeName node) => node.typeArguments;
+  TypeArgumentList? get(NamedType node) => node.typeArguments;
 }
 
 class Getter_NodeReplacerTest_test_typeName_2
-    implements NodeReplacerTest_Getter<TypeName, Identifier> {
+    implements NodeReplacerTest_Getter<NamedType, Identifier> {
   @override
-  Identifier get(TypeName node) => node.name;
+  Identifier get(NamedType node) => node.name;
 }
 
 class Getter_NodeReplacerTest_test_typeParameter
@@ -1221,11 +1221,11 @@
 }
 
 class ListGetter_NodeReplacerTest_test_implementsClause
-    extends NodeReplacerTest_ListGetter<ImplementsClause, TypeName> {
+    extends NodeReplacerTest_ListGetter<ImplementsClause, NamedType> {
   ListGetter_NodeReplacerTest_test_implementsClause(int arg0) : super(arg0);
 
   @override
-  NodeList<TypeName> getList(ImplementsClause node) => node.interfaces;
+  NodeList<NamedType> getList(ImplementsClause node) => node.interfaces2;
 }
 
 class ListGetter_NodeReplacerTest_test_labeledStatement
@@ -1323,11 +1323,11 @@
 }
 
 class ListGetter_NodeReplacerTest_test_withClause
-    extends NodeReplacerTest_ListGetter<WithClause, TypeName> {
+    extends NodeReplacerTest_ListGetter<WithClause, NamedType> {
   ListGetter_NodeReplacerTest_test_withClause(int arg0) : super(arg0);
 
   @override
-  NodeList<TypeName> getList(WithClause node) => node.mixinTypes;
+  NodeList<NamedType> getList(WithClause node) => node.mixinTypes2;
 }
 
 class ListGetter_NodeReplacerTest_testAnnotatedNode
@@ -2189,7 +2189,7 @@
   }
 
   void test_typeName() {
-    TypeName node = AstTestFactory.typeName4(
+    NamedType node = AstTestFactory.typeName4(
         "T", [AstTestFactory.typeName4("E"), AstTestFactory.typeName4("F")]);
     _assertReplace(node, Getter_NodeReplacerTest_test_typeName_2());
     _assertReplace(node, Getter_NodeReplacerTest_test_typeName());
diff --git a/pkg/analyzer/test/generated/variance_parser_test.dart b/pkg/analyzer/test/generated/variance_parser_test.dart
index 1208056..37c8af3 100644
--- a/pkg/analyzer/test/generated/variance_parser_test.dart
+++ b/pkg/analyzer/test/generated/variance_parser_test.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:test/test.dart';
@@ -21,19 +22,24 @@
 
 @reflectiveTest
 class VarianceParserTest extends FastaParserTestCase {
+  final FeatureSet _disabledFeatureSet = FeatureSet.latestLanguageVersion();
+
+  final FeatureSet _enabledFeatureSet = FeatureSet.fromEnableFlags2(
+    sdkLanguageVersion: ExperimentStatus.currentVersion,
+    flags: [EnableString.variance],
+  );
+
   @override
   CompilationUnitImpl parseCompilationUnit(String content,
       {List<ErrorCode>? codes,
       List<ExpectedError>? errors,
       FeatureSet? featureSet}) {
-    return super.parseCompilationUnit(content,
-        codes: codes,
-        errors: errors,
-        featureSet: featureSet ??
-            FeatureSet.forTesting(
-              sdkVersion: '2.5.0',
-              additionalFeatures: [Feature.variance],
-            ));
+    return super.parseCompilationUnit(
+      content,
+      codes: codes,
+      errors: errors,
+      featureSet: featureSet ?? _enabledFeatureSet,
+    );
   }
 
   void test_class_disabled_multiple() {
@@ -43,7 +49,7 @@
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 14, 5),
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 23, 3)
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_class_disabled_single() {
@@ -51,7 +57,7 @@
         errors: [
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 8, 3),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_class_enabled_multiple() {
@@ -124,7 +130,7 @@
               ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD, 7, 2),
           expectedError(ParserErrorCode.EXPECTED_TOKEN, 10, 3),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_function_enabled() {
@@ -139,7 +145,7 @@
         errors: [
           expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 6),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_list_enabled() {
@@ -154,7 +160,7 @@
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 8, 5),
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 17, 3),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_mixin_disabled_single() {
@@ -162,7 +168,7 @@
         errors: [
           expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 8, 5),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_mixin_enabled_single() {
@@ -181,7 +187,7 @@
         errors: [
           expectedError(ParserErrorCode.EXPECTED_TOKEN, 16, 1),
         ],
-        featureSet: FeatureSet.forTesting(sdkVersion: '2.5.0'));
+        featureSet: _disabledFeatureSet);
   }
 
   void test_typedef_enabled() {
diff --git a/pkg/analyzer/test/id_tests/assigned_variables_test.dart b/pkg/analyzer/test/id_tests/assigned_variables_test.dart
index ef788ba..9459ee1 100644
--- a/pkg/analyzer/test/id_tests/assigned_variables_test.dart
+++ b/pkg/analyzer/test/id_tests/assigned_variables_test.dart
@@ -24,7 +24,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _AssignedVariablesDataComputer(), [analyzerNnbdConfig]));
+          const _AssignedVariablesDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _AssignedVariablesDataComputer extends DataComputer<_Data> {
diff --git a/pkg/analyzer/test/id_tests/constant_test.dart b/pkg/analyzer/test/id_tests/constant_test.dart
index 58b19d2..10a1825 100644
--- a/pkg/analyzer/test/id_tests/constant_test.dart
+++ b/pkg/analyzer/test/id_tests/constant_test.dart
@@ -24,8 +24,8 @@
       args: args,
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
-      runTest: runTestFor(
-          const ConstantsDataComputer(), [analyzerConstantUpdate2018Config]));
+      runTest:
+          runTestFor(const ConstantsDataComputer(), [analyzerDefaultConfig]));
 }
 
 class ConstantsDataComputer extends DataComputer<String> {
diff --git a/pkg/analyzer/test/id_tests/definite_assignment_test.dart b/pkg/analyzer/test/id_tests/definite_assignment_test.dart
index dd3fe0b..7d920ab 100644
--- a/pkg/analyzer/test/id_tests/definite_assignment_test.dart
+++ b/pkg/analyzer/test/id_tests/definite_assignment_test.dart
@@ -25,7 +25,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _DefiniteAssignmentDataComputer(), [analyzerNnbdConfig]));
+          const _DefiniteAssignmentDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _DefiniteAssignmentDataComputer extends DataComputer<String> {
diff --git a/pkg/analyzer/test/id_tests/definite_unassignment_test.dart b/pkg/analyzer/test/id_tests/definite_unassignment_test.dart
index 7e4d258..f17d8e2 100644
--- a/pkg/analyzer/test/id_tests/definite_unassignment_test.dart
+++ b/pkg/analyzer/test/id_tests/definite_unassignment_test.dart
@@ -25,7 +25,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _DefiniteAssignmentDataComputer(), [analyzerNnbdConfig]));
+          const _DefiniteAssignmentDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _DefiniteAssignmentDataComputer extends DataComputer<String> {
diff --git a/pkg/analyzer/test/id_tests/inferred_type_arguments_test.dart b/pkg/analyzer/test/id_tests/inferred_type_arguments_test.dart
index 224d689..7401b6c 100644
--- a/pkg/analyzer/test/id_tests/inferred_type_arguments_test.dart
+++ b/pkg/analyzer/test/id_tests/inferred_type_arguments_test.dart
@@ -22,7 +22,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _InferredTypeArgumentsDataComputer(), [analyzerNnbdConfig]));
+          const _InferredTypeArgumentsDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _InferredTypeArgumentsDataComputer extends DataComputer<List<DartType>> {
@@ -55,9 +55,9 @@
     TypeArgumentList? typeArguments;
     List<DartType> typeArgumentTypes;
     if (node is InstanceCreationExpression) {
-      typeArguments = node.constructorName.type.typeArguments;
+      typeArguments = node.constructorName.type2.typeArguments;
       typeArgumentTypes =
-          (node.constructorName.type.type as InterfaceType).typeArguments;
+          (node.constructorName.type2.type as InterfaceType).typeArguments;
     } else if (node is InvocationExpression) {
       typeArguments = node.typeArguments;
       typeArgumentTypes = node.typeArgumentTypes!;
diff --git a/pkg/analyzer/test/id_tests/inferred_variable_types_test.dart b/pkg/analyzer/test/id_tests/inferred_variable_types_test.dart
index 7f312ca..94b3771 100644
--- a/pkg/analyzer/test/id_tests/inferred_variable_types_test.dart
+++ b/pkg/analyzer/test/id_tests/inferred_variable_types_test.dart
@@ -22,7 +22,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _InferredVariableTypesDataComputer(), [analyzerNnbdConfig]));
+          const _InferredVariableTypesDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _InferredVariableTypesDataComputer extends DataComputer<DartType> {
diff --git a/pkg/analyzer/test/id_tests/inheritance_test.dart b/pkg/analyzer/test/id_tests/inheritance_test.dart
index 299ff7c..08756c3 100644
--- a/pkg/analyzer/test/id_tests/inheritance_test.dart
+++ b/pkg/analyzer/test/id_tests/inheritance_test.dart
@@ -24,7 +24,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest:
-          runTestFor(const _InheritanceDataComputer(), [analyzerNnbdConfig]),
+          runTestFor(const _InheritanceDataComputer(), [analyzerDefaultConfig]),
       skipMap: {
         analyzerMarker: [
           // These are CFE-centric tests for an opt-in/opt-out sdk.
diff --git a/pkg/analyzer/test/id_tests/nullability_test.dart b/pkg/analyzer/test/id_tests/nullability_test.dart
index c74f028..0abde94 100644
--- a/pkg/analyzer/test/id_tests/nullability_test.dart
+++ b/pkg/analyzer/test/id_tests/nullability_test.dart
@@ -26,8 +26,8 @@
       args: args,
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
-      runTest:
-          runTestFor(const _NullabilityDataComputer(), [analyzerNnbdConfig]));
+      runTest: runTestFor(
+          const _NullabilityDataComputer(), [analyzerDefaultConfig]));
 }
 
 class FlowTestBase {
@@ -35,11 +35,8 @@
 
   /// Resolve the given [code] and track nullability in the unit.
   Future<void> trackCode(String code) async {
-    TestResult<String> testResult = await checkTests(
-        code,
-        const _NullabilityDataComputer(),
-        FeatureSet.forTesting(
-            sdkVersion: '2.2.2', additionalFeatures: [Feature.non_nullable]));
+    TestResult<String> testResult = await checkTests(code,
+        const _NullabilityDataComputer(), FeatureSet.latestLanguageVersion());
     if (testResult.hasFailures) {
       fail('Failure(s)');
     }
diff --git a/pkg/analyzer/test/id_tests/reachability_test.dart b/pkg/analyzer/test/id_tests/reachability_test.dart
index 7b4c957..d5b03f8 100644
--- a/pkg/analyzer/test/id_tests/reachability_test.dart
+++ b/pkg/analyzer/test/id_tests/reachability_test.dart
@@ -22,8 +22,8 @@
       args: args,
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
-      runTest:
-          runTestFor(const _ReachabilityDataComputer(), [analyzerNnbdConfig]));
+      runTest: runTestFor(
+          const _ReachabilityDataComputer(), [analyzerDefaultConfig]));
 }
 
 class FlowTestBase {
@@ -31,11 +31,8 @@
 
   /// Resolve the given [code] and track nullability in the unit.
   Future<void> trackCode(String code) async {
-    TestResult<Set<_ReachabilityAssertion>> testResult = await checkTests(
-        code,
-        const _ReachabilityDataComputer(),
-        FeatureSet.forTesting(
-            sdkVersion: '2.2.2', additionalFeatures: [Feature.non_nullable]));
+    TestResult<Set<_ReachabilityAssertion>> testResult = await checkTests(code,
+        const _ReachabilityDataComputer(), FeatureSet.latestLanguageVersion());
     if (testResult.hasFailures) {
       fail('Failure(s)');
     }
diff --git a/pkg/analyzer/test/id_tests/type_promotion_test.dart b/pkg/analyzer/test/id_tests/type_promotion_test.dart
index a5e0435..0f7f189 100644
--- a/pkg/analyzer/test/id_tests/type_promotion_test.dart
+++ b/pkg/analyzer/test/id_tests/type_promotion_test.dart
@@ -22,8 +22,8 @@
       args: args,
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
-      runTest:
-          runTestFor(const _TypePromotionDataComputer(), [analyzerNnbdConfig]));
+      runTest: runTestFor(
+          const _TypePromotionDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _TypePromotionDataComputer extends DataComputer<DartType> {
diff --git a/pkg/analyzer/test/id_tests/why_not_promoted_test.dart b/pkg/analyzer/test/id_tests/why_not_promoted_test.dart
index 6cef947..2f8e046 100644
--- a/pkg/analyzer/test/id_tests/why_not_promoted_test.dart
+++ b/pkg/analyzer/test/id_tests/why_not_promoted_test.dart
@@ -22,7 +22,7 @@
       createUriForFileName: createUriForFileName,
       onFailure: onFailure,
       runTest: runTestFor(
-          const _WhyNotPromotedDataComputer(), [analyzerNnbdConfig]));
+          const _WhyNotPromotedDataComputer(), [analyzerDefaultConfig]));
 }
 
 class _WhyNotPromotedDataComputer extends DataComputer<String?> {
diff --git a/pkg/analyzer/test/resource_utils.dart b/pkg/analyzer/test/resource_utils.dart
index d51194e..680004d 100644
--- a/pkg/analyzer/test/resource_utils.dart
+++ b/pkg/analyzer/test/resource_utils.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:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analyzer/test/source/analysis_options_provider_test.dart b/pkg/analyzer/test/source/analysis_options_provider_test.dart
index 787f65c..8cb98e3 100644
--- a/pkg/analyzer/test/source/analysis_options_provider_test.dart
+++ b/pkg/analyzer/test/source/analysis_options_provider_test.dart
@@ -2,19 +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 'dart:core';
-
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer/src/util/file_paths.dart' as file_paths;
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:yaml/yaml.dart';
 
-import '../resource_utils.dart';
 import '../src/util/yaml_test.dart';
 
 main() {
@@ -99,31 +96,17 @@
 }
 
 @reflectiveTest
-class AnalysisOptionsProviderTest {
-  late final TestPathTranslator pathTranslator;
-  late final ResourceProvider resourceProvider;
-
-  late final AnalysisOptionsProvider provider;
-
+class AnalysisOptionsProviderTest with ResourceProviderMixin {
   String get analysisOptionsYaml => file_paths.analysisOptionsYaml;
 
-  void setUp() {
-    var rawProvider = MemoryResourceProvider();
-    resourceProvider = TestResourceProvider(rawProvider);
-    pathTranslator = TestPathTranslator(rawProvider);
-    provider = AnalysisOptionsProvider(SourceFactory([
-      ResourceUriResolver(rawProvider),
-    ]));
-  }
-
   void test_getOptions_crawlUp_hasInFolder() {
-    pathTranslator.newFolder('/foo/bar');
-    pathTranslator.newFile('/foo/$analysisOptionsYaml', r'''
+    newFolder('/foo/bar');
+    newFile('/foo/$analysisOptionsYaml', content: r'''
 analyzer:
   ignore:
     - foo
 ''');
-    pathTranslator.newFile('/foo/bar/$analysisOptionsYaml', r'''
+    newFile('/foo/bar/$analysisOptionsYaml', content: r'''
 analyzer:
   ignore:
     - bar
@@ -138,13 +121,13 @@
   }
 
   void test_getOptions_crawlUp_hasInParent() {
-    pathTranslator.newFolder('/foo/bar/baz');
-    pathTranslator.newFile('/foo/$analysisOptionsYaml', r'''
+    newFolder('/foo/bar/baz');
+    newFile('/foo/$analysisOptionsYaml', content: r'''
 analyzer:
   ignore:
     - foo
 ''');
-    pathTranslator.newFile('/foo/bar/$analysisOptionsYaml', r'''
+    newFile('/foo/bar/$analysisOptionsYaml', content: r'''
 analyzer:
   ignore:
     - bar
@@ -159,26 +142,26 @@
   }
 
   void test_getOptions_doesNotExist() {
-    pathTranslator.newFolder('/notFile');
+    newFolder('/notFile');
     YamlMap options = _getOptions('/notFile');
     expect(options, isEmpty);
   }
 
   void test_getOptions_empty() {
-    pathTranslator.newFile('/$analysisOptionsYaml', r'''#empty''');
+    newFile('/$analysisOptionsYaml', content: r'''#empty''');
     YamlMap options = _getOptions('/');
     expect(options, isNotNull);
     expect(options, isEmpty);
   }
 
   void test_getOptions_include() {
-    pathTranslator.newFile('/foo.include', r'''
+    newFile('/foo.include', content: r'''
 analyzer:
   ignore:
     - ignoreme.dart
     - 'sdk_ext/**'
 ''');
-    pathTranslator.newFile('/$analysisOptionsYaml', r'''
+    newFile('/$analysisOptionsYaml', content: r'''
 include: foo.include
 ''');
     YamlMap options = _getOptions('/');
@@ -196,12 +179,12 @@
   }
 
   void test_getOptions_include_emptyLints() {
-    pathTranslator.newFile('/foo.include', r'''
+    newFile('/foo.include', content: r'''
 linter:
   rules:
     - prefer_single_quotes
 ''');
-    pathTranslator.newFile('/$analysisOptionsYaml', r'''
+    newFile('/$analysisOptionsYaml', content: r'''
 include: foo.include
 linter:
   rules:
@@ -221,7 +204,7 @@
   }
 
   void test_getOptions_include_missing() {
-    pathTranslator.newFile('/$analysisOptionsYaml', r'''
+    newFile('/$analysisOptionsYaml', content: r'''
 include: /foo.include
 ''');
     YamlMap options = _getOptions('/');
@@ -229,13 +212,13 @@
   }
 
   void test_getOptions_invalid() {
-    pathTranslator.newFile('/$analysisOptionsYaml', r''':''');
+    newFile('/$analysisOptionsYaml', content: r''':''');
     YamlMap options = _getOptions('/');
     expect(options, hasLength(1));
   }
 
   void test_getOptions_simple() {
-    pathTranslator.newFile('/$analysisOptionsYaml', r'''
+    newFile('/$analysisOptionsYaml', content: r'''
 analyzer:
   ignore:
     - ignoreme.dart
@@ -256,7 +239,10 @@
   }
 
   YamlMap _getOptions(String posixPath) {
-    var resource = pathTranslator.getResource(posixPath) as Folder;
-    return provider.getOptions(resource);
+    var folder = getFolder(posixPath);
+    var provider = AnalysisOptionsProvider(SourceFactory([
+      ResourceUriResolver(resourceProvider),
+    ]));
+    return provider.getOptions(folder);
   }
 }
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index d9a581f..c9ec408 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -37,9 +37,7 @@
   ]);
 
   AnalysisError use_of_void_result = AnalysisError(
-      TestSource(), 0, 1, CompileTimeErrorCode.USE_OF_VOID_RESULT, [
-    ['x']
-  ]);
+      TestSource(), 0, 1, CompileTimeErrorCode.USE_OF_VOID_RESULT, []);
 
   // We in-line a lint code here in order to avoid adding a dependency on the
   // linter package.
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index 1bb79b1..536922f 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -8,7 +8,6 @@
 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/experiments.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/status.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
@@ -40,8 +39,6 @@
   late final String testFile;
   late final String testCode;
 
-  List<String> enabledExperiments = [];
-
   void addTestFile(String content, {bool priority = false}) {
     testCode = content;
     newFile(testFile, content: content);
@@ -98,10 +95,7 @@
 
   AnalysisOptionsImpl createAnalysisOptions() => AnalysisOptionsImpl()
     ..useFastaParser = true
-    ..contextFeatures = FeatureSet.fromEnableFlags2(
-      sdkLanguageVersion: ExperimentStatus.testingSdkLanguageVersion,
-      flags: enabledExperiments,
-    );
+    ..contextFeatures = FeatureSet.latestLanguageVersion();
 
   int findOffset(String search) {
     int offset = testCode.indexOf(search);
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
index 230b7cd..58450c4 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
@@ -18,9 +18,11 @@
 
 @reflectiveTest
 class AnalysisDriverCachingTest extends PubPackageResolutionTest {
+  String get testFilePathPlatform => convertPath(testFilePath);
+
   List<Set<String>> get _linkedCycles {
     var driver = driverFor(testFilePath);
-    return driver.test.libraryContext.linkedCycles;
+    return driver.test.libraryContextTestView.linkedCycles;
   }
 
   test_change_factoryConstructor_addEqNothing() async {
@@ -30,7 +32,7 @@
 }
 ''');
 
-    driverFor(testFilePath).changeFile(testFilePath);
+    driverFor(testFilePathPlatform).changeFile(testFilePathPlatform);
     await resolveTestCode(r'''
 class A {
   factory A() =;
@@ -46,7 +48,7 @@
 }
 ''');
 
-    driverFor(testFilePath).changeFile(testFilePath);
+    driverFor(testFilePathPlatform).changeFile(testFilePathPlatform);
     await resolveTestCode(r'''
 class A {
   factory A() =
@@ -62,7 +64,7 @@
 }
 ''');
 
-    driverFor(testFilePath).changeFile(testFilePath);
+    driverFor(testFilePathPlatform).changeFile(testFilePathPlatform);
     await resolveTestCode(r'''
 class A {
   const
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 9da6792..65e9392 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -670,7 +670,7 @@
 
     var constructorName = constC.constructorName;
     expect(constructorName.staticElement, constructorC);
-    expect(constructorName.type.type, interfaceTypeNone(elementC));
+    expect(constructorName.type2.type, interfaceTypeNone(elementC));
   }
 
   test_annotation_unprefixed_topLevelVariable() async {
@@ -743,7 +743,7 @@
       expect(target.staticElement, vElement);
       expect(target.staticType, typeProvider.numType);
 
-      var intName = asExpression.type as TypeName;
+      var intName = asExpression.type as NamedType;
       expect(intName.name.staticElement, typeProvider.intType.element);
       expect(intName.name.staticType, isNull);
     }
@@ -1309,10 +1309,10 @@
       var constructorName = constructor.redirectedConstructor!;
       expect(constructorName.staticElement, same(aUnnamed));
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.type, interfaceTypeNone(aElement));
+      NamedType namedType = constructorName.type2;
+      expect(namedType.type, interfaceTypeNone(aElement));
 
-      var identifier = typeName.name as SimpleIdentifier;
+      var identifier = namedType.name as SimpleIdentifier;
       expect(identifier.staticElement, same(aElement));
       expect(identifier.staticType, isNull);
 
@@ -1329,10 +1329,10 @@
       var constructorName = constructor.redirectedConstructor!;
       expect(constructorName.staticElement, same(aNamed));
 
-      var typeName = constructorName.type;
-      expect(typeName.type, interfaceTypeNone(aElement));
+      var namedType = constructorName.type2;
+      expect(namedType.type, interfaceTypeNone(aElement));
 
-      var identifier = typeName.name as SimpleIdentifier;
+      var identifier = namedType.name as SimpleIdentifier;
       expect(identifier.staticElement, same(aElement));
       expect(identifier.staticType, isNull);
 
@@ -1378,10 +1378,10 @@
       var constructorName = constructor.redirectedConstructor!;
       expect(constructorName.staticElement, same(actualMember));
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.type, auType);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.type, auType);
 
-      var identifier = typeName.name as SimpleIdentifier;
+      var identifier = namedType.name as SimpleIdentifier;
       expect(identifier.staticElement, same(aElement));
       expect(identifier.staticType, isNull);
 
@@ -1400,10 +1400,10 @@
       var constructorName = constructor.redirectedConstructor!;
       expect(constructorName.staticElement, same(actualMember));
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.type, auType);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.type, auType);
 
-      var identifier = typeName.name as SimpleIdentifier;
+      var identifier = namedType.name as SimpleIdentifier;
       expect(identifier.staticElement, same(aElement));
       expect(identifier.staticType, isNull);
 
@@ -1723,9 +1723,9 @@
 
     var statement = statements[0] as VariableDeclarationStatement;
 
-    var typeName = statement.variables.type as TypeName;
-    expect(typeName.type, isDynamicType);
-    expect(typeName.typeArguments!.arguments[0].type, typeProvider.intType);
+    var namedType = statement.variables.type as NamedType;
+    expect(namedType.type, isDynamicType);
+    expect(namedType.typeArguments!.arguments[0].type, typeProvider.intType);
 
     VariableDeclaration vNode = statement.variables.variables[0];
     expect(vNode.name.staticType, isNull);
@@ -2077,10 +2077,10 @@
       expect(constructorName.name, isNull);
       expect(constructorName.staticElement, defaultConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      Identifier typeIdentifier = typeName.name;
+      Identifier typeIdentifier = namedType.name;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2095,10 +2095,10 @@
       expect(constructorName.staticElement, namedConstructor);
       expect(constructorName.name!.staticType, isNull);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2130,10 +2130,10 @@
     expect(constructorName.name, isNull);
     expect(constructorName.staticElement, constructorElement);
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.typeArguments, isNull);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.typeArguments, isNull);
 
-    Identifier typeIdentifier = typeName.name;
+    Identifier typeIdentifier = namedType.name;
     expect(typeIdentifier.staticElement, xElement);
     expect(typeIdentifier.staticType, isNull);
 
@@ -2171,10 +2171,10 @@
       expect(constructorName.name, isNull);
       expect(constructorName.staticElement, defaultConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      Identifier typeIdentifier = typeName.name;
+      Identifier typeIdentifier = namedType.name;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
 
@@ -2193,10 +2193,10 @@
       expect(constructorName.name!.staticElement, namedConstructor);
       expect(constructorName.name!.staticType, isNull);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
 
@@ -2245,10 +2245,10 @@
       expect(constructorName.name, isNull);
       expect(constructorName.staticElement, defaultConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as PrefixedIdentifier;
+      var typeIdentifier = namedType.name as PrefixedIdentifier;
       expect(typeIdentifier.staticElement, same(cElement));
       expect(typeIdentifier.staticType, isNull);
 
@@ -2275,10 +2275,10 @@
       expect(constructorName.name!.staticType, isNull);
       expect(constructorName.staticElement, namedConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as PrefixedIdentifier;
+      var typeIdentifier = namedType.name as PrefixedIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
 
@@ -2305,12 +2305,12 @@
       expect(constructorName.name!.staticType, isNull);
       expect(constructorName.staticElement, namedConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments!.arguments, hasLength(1));
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments!.arguments, hasLength(1));
       _assertTypeNameSimple(
-          typeName.typeArguments!.arguments[0], typeProvider.boolType);
+          namedType.typeArguments!.arguments[0], typeProvider.boolType);
 
-      var typeIdentifier = typeName.name as PrefixedIdentifier;
+      var typeIdentifier = namedType.name as PrefixedIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
 
@@ -2360,10 +2360,10 @@
       expect(constructorName.name, isNull);
       expect(constructorName.staticElement, defaultConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, same(cElement));
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2382,12 +2382,12 @@
       expect(constructorName.name, isNull);
       expect(constructorName.staticElement, defaultConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments!.arguments, hasLength(1));
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments!.arguments, hasLength(1));
       _assertTypeNameSimple(
-          typeName.typeArguments!.arguments[0], typeProvider.boolType);
+          namedType.typeArguments!.arguments[0], typeProvider.boolType);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, same(cElement));
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2407,10 +2407,10 @@
       expect(constructorName.name!.staticType, isNull);
       expect(constructorName.staticElement, namedConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments, isNull);
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments, isNull);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2430,12 +2430,12 @@
       expect(constructorName.name!.staticType, isNull);
       expect(constructorName.staticElement, namedConstructor);
 
-      TypeName typeName = constructorName.type;
-      expect(typeName.typeArguments!.arguments, hasLength(1));
+      NamedType namedType = constructorName.type2;
+      expect(namedType.typeArguments!.arguments, hasLength(1));
       _assertTypeNameSimple(
-          typeName.typeArguments!.arguments[0], typeProvider.boolType);
+          namedType.typeArguments!.arguments[0], typeProvider.boolType);
 
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, cElement);
       expect(typeIdentifier.staticType, isNull);
     }
@@ -2462,12 +2462,12 @@
       assertMember(creation, defaultConstructor, {'K': 'int', 'V': 'double'});
       assertType(creation, 'C<int, double>');
 
-      var typeName = creation.constructorName.type;
-      assertTypeName(typeName, cElement, 'C<int, double>');
+      var namedType = creation.constructorName.type2;
+      assertNamedType(namedType, cElement, 'C<int, double>');
 
-      var typeArguments = typeName.typeArguments!.arguments;
-      assertTypeName(typeArguments[0] as TypeName, intElement, 'int');
-      assertTypeName(typeArguments[1] as TypeName, doubleElement, 'double');
+      var typeArguments = namedType.typeArguments!.arguments;
+      assertNamedType(typeArguments[0] as NamedType, intElement, 'int');
+      assertNamedType(typeArguments[1] as NamedType, doubleElement, 'double');
 
       expect(creation.constructorName.name, isNull);
 
@@ -2481,12 +2481,12 @@
       assertMember(creation, namedConstructor, {'K': 'num', 'V': 'String'});
       assertType(creation, 'C<num, String>');
 
-      var typeName = creation.constructorName.type;
-      assertTypeName(typeName, cElement, 'C<num, String>');
+      var namedType = creation.constructorName.type2;
+      assertNamedType(namedType, cElement, 'C<num, String>');
 
-      var typeArguments = typeName.typeArguments!.arguments;
-      assertTypeName(typeArguments[0] as TypeName, numElement, 'num');
-      assertTypeName(typeArguments[1] as TypeName, stringElement, 'String');
+      var typeArguments = namedType.typeArguments!.arguments;
+      assertNamedType(typeArguments[0] as NamedType, numElement, 'num');
+      assertNamedType(typeArguments[1] as NamedType, stringElement, 'String');
 
       var constructorName = creation.constructorName.name;
       assertMember(
@@ -2587,7 +2587,7 @@
     assertElement(aRef, findElement.topGet('a'));
     assertType(aRef, 'num');
 
-    assertTypeName(findNode.typeName('int;'), intElement, 'int');
+    assertNamedType(findNode.namedType('int;'), intElement, 'int');
   }
 
   test_invalid_const_constructor_initializer_field_multiple() async {
@@ -2907,13 +2907,13 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    assertTypeName(
-      findNode.typeName('a.Future'),
+    assertNamedType(
+      findNode.namedType('a.Future'),
       futureElement,
       'Future<int>',
       expectedPrefix: findElement.import('dart:async').prefix,
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_invalid_fieldInitializer_field() async {
@@ -3077,7 +3077,7 @@
       ConstructorName constructorName = creation.constructorName;
       expect(constructorName.name, isNull);
 
-      TypeName type = constructorName.type;
+      NamedType type = constructorName.type2;
       expect(type.typeArguments, isNull);
       assertElement(type.name, c);
       assertTypeNull(type.name);
@@ -3094,7 +3094,7 @@
       ConstructorName constructorName = creation.constructorName;
       expect(constructorName.name!.name, 'named');
 
-      TypeName type = constructorName.type;
+      NamedType type = constructorName.type2;
       expect(type.typeArguments, isNull);
       assertElement(type.name, c);
       assertType(type.name, 'C<bool>');
@@ -3111,7 +3111,7 @@
       ConstructorName constructorName = creation.constructorName;
       expect(constructorName.name!.name, 'named2');
 
-      TypeName type = constructorName.type;
+      NamedType type = constructorName.type2;
       assertTypeArguments(type.typeArguments!, [doubleType]);
       assertElement(type.name, c);
       assertType(type.name, 'C<double>');
@@ -3640,8 +3640,8 @@
     assertElement(tRef, tElement);
     assertTypeDynamic(tRef);
 
-    var typeName = prefixedName.parent as TypeName;
-    expect(typeName.type, isDynamicType);
+    var namedType = prefixedName.parent as NamedType;
+    expect(namedType.type, isDynamicType);
   }
 
   @failingTest
@@ -3708,8 +3708,8 @@
     assertElement(tRef, tElement);
     assertTypeDynamic(tRef);
 
-    var typeName = prefixedName.parent as TypeName;
-    expect(typeName.type, isDynamicType);
+    var namedType = prefixedName.parent as NamedType;
+    expect(namedType.type, isDynamicType);
   }
 
   @failingTest
@@ -3793,7 +3793,7 @@
     expect(target.staticElement, findElement.parameter('a'));
     expect(target.staticType, dynamicType);
 
-    var numName = isExpression.type as TypeName;
+    var numName = isExpression.type as NamedType;
     expect(numName.name.staticElement, typeProvider.numType.element);
     expect(numName.name.staticType, isNull);
   }
@@ -3813,7 +3813,7 @@
     expect(target.staticElement, findElement.parameter('a'));
     expect(target.staticType, dynamicType);
 
-    var numName = isExpression.type as TypeName;
+    var numName = isExpression.type as NamedType;
     expect(numName.name.staticElement, typeProvider.numType.element);
     expect(numName.name.staticType, isNull);
   }
@@ -3921,7 +3921,7 @@
     expect(fNode.name.staticElement, same(fElement));
     expect(fNode.name.staticType, isNull);
 
-    var fReturnTypeNode = fNode.returnType as TypeName;
+    var fReturnTypeNode = fNode.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(doubleType.element));
     expect(fReturnTypeNode.type, doubleType);
 
@@ -4016,7 +4016,7 @@
     expect(fNode.name.staticElement, same(fElement));
     expect(fNode.name.staticType, fElement.type);
 
-    var fReturnTypeNode = fNode.returnType as TypeName;
+    var fReturnTypeNode = fNode.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(tElement));
     expect(fReturnTypeNode.type, typeParameterTypeStar(tElement));
 
@@ -4148,7 +4148,7 @@
     expect(fNode.name.staticElement, same(fElement));
     expect(fNode.name.staticType, isNull);
 
-    var fReturnTypeNode = fNode.returnType as TypeName;
+    var fReturnTypeNode = fNode.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(doubleType.element));
     expect(fReturnTypeNode.type, doubleType);
 
@@ -4240,7 +4240,7 @@
     expect(fNode.name.staticElement, same(fElement));
     expect(fNode.name.staticType, isNull);
 
-    var fReturnTypeNode = fNode.returnType as TypeName;
+    var fReturnTypeNode = fNode.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(doubleType.element));
     expect(fReturnTypeNode.type, doubleType);
 
@@ -4451,7 +4451,7 @@
     var gParameterType =
         ((gType.parameters.parameters[0] as DefaultFormalParameter).parameter
                 as SimpleFormalParameter)
-            .type as TypeName;
+            .type as NamedType;
     var tReference = gParameterType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4482,7 +4482,7 @@
     expect(gTypeParameterType.element, same(tElement));
     var gParameterType =
         (gType.parameters.parameters[0] as SimpleFormalParameter).type
-            as TypeName;
+            as NamedType;
     var tReference = gParameterType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4514,7 +4514,7 @@
     var gParameterType =
         ((gType.parameters.parameters[0] as DefaultFormalParameter).parameter
                 as SimpleFormalParameter)
-            .type as TypeName;
+            .type as NamedType;
     var tReference = gParameterType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4542,7 +4542,7 @@
     var gTypeType = gType.type as FunctionType;
     var gTypeReturnType = gTypeType.returnType as TypeParameterType;
     expect(gTypeReturnType.element, same(tElement));
-    var gReturnType = gType.returnType as TypeName;
+    var gReturnType = gType.returnType as NamedType;
     var tReference = gReturnType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4566,11 +4566,11 @@
     var body = fDeclaration.functionDeclaration.functionExpression.body
         as BlockFunctionBody;
     var yDeclaration = body.block.statements[0] as VariableDeclarationStatement;
-    var yType = yDeclaration.variables.type as TypeName;
+    var yType = yDeclaration.variables.type as NamedType;
     var yTypeType = yType.type as InterfaceType;
     var yTypeTypeArgument = yTypeType.typeArguments[0] as TypeParameterType;
     expect(yTypeTypeArgument.element, same(tElement));
-    var yElementType = yType.typeArguments!.arguments[0] as TypeName;
+    var yElementType = yType.typeArguments!.arguments[0] as NamedType;
     var tReference = yElementType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4594,7 +4594,7 @@
     var body = fDeclaration.functionDeclaration.functionExpression.body
         as BlockFunctionBody;
     var yDeclaration = body.block.statements[0] as VariableDeclarationStatement;
-    var yType = yDeclaration.variables.type as TypeName;
+    var yType = yDeclaration.variables.type as NamedType;
     var tReference = yType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4614,14 +4614,14 @@
 
     var tElement = findNode.typeParameter('T>(T x)').declaredElement!;
 
-    var gType = findNode.typeName('Consumer<T>');
+    var gType = findNode.namedType('Consumer<T>');
     var gTypeType = gType.type as FunctionType;
 
     var gTypeParameterType =
         gTypeType.namedParameterTypes['u'] as TypeParameterType;
     expect(gTypeParameterType.element, same(tElement));
 
-    var gArgumentType = gType.typeArguments!.arguments[0] as TypeName;
+    var gArgumentType = gType.typeArguments!.arguments[0] as NamedType;
     var tReference = gArgumentType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4641,14 +4641,14 @@
 
     var tElement = findNode.typeParameter('T>(T x)').declaredElement!;
 
-    var gType = findNode.typeName('Consumer<T>');
+    var gType = findNode.namedType('Consumer<T>');
     var gTypeType = gType.type as FunctionType;
 
     var gTypeParameterType =
         gTypeType.normalParameterTypes[0] as TypeParameterType;
     expect(gTypeParameterType.element, same(tElement));
 
-    var gArgumentType = gType.typeArguments!.arguments[0] as TypeName;
+    var gArgumentType = gType.typeArguments!.arguments[0] as NamedType;
     var tReference = gArgumentType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4668,14 +4668,14 @@
 
     var tElement = findNode.typeParameter('T>(T x)').declaredElement!;
 
-    var gType = findNode.typeName('Consumer<T>');
+    var gType = findNode.namedType('Consumer<T>');
     var gTypeType = gType.type as FunctionType;
 
     var gTypeParameterType =
         gTypeType.optionalParameterTypes[0] as TypeParameterType;
     expect(gTypeParameterType.element, same(tElement));
 
-    var gArgumentType = gType.typeArguments!.arguments[0] as TypeName;
+    var gArgumentType = gType.typeArguments!.arguments[0] as NamedType;
     var tReference = gArgumentType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4695,13 +4695,13 @@
 
     var tElement = findNode.typeParameter('T>(T x)').declaredElement!;
 
-    var gType = findNode.typeName('Producer<T>');
+    var gType = findNode.namedType('Producer<T>');
     var gTypeType = gType.type as FunctionType;
 
     var gTypeReturnType = gTypeType.returnType as TypeParameterType;
     expect(gTypeReturnType.element, same(tElement));
 
-    var gArgumentType = gType.typeArguments!.arguments[0] as TypeName;
+    var gArgumentType = gType.typeArguments!.arguments[0] as NamedType;
     var tReference = gArgumentType.name;
     assertElement(tReference, tElement);
     assertTypeNull(tReference);
@@ -4906,7 +4906,7 @@
     LocalVariableElement vElement = vNode.declaredElement!;
     expect(vElement.type, typeProvider.numType);
 
-    var vTypeName = vNode.type as TypeName;
+    var vTypeName = vNode.type as NamedType;
     expect(vTypeName.type, typeProvider.numType);
 
     var vTypeIdentifier = vTypeName.name as SimpleIdentifier;
@@ -5083,7 +5083,7 @@
     expect(methodDeclaration.name.staticElement, same(methodElement));
     expect(methodDeclaration.name.staticType, isNull);
 
-    var fReturnTypeNode = methodDeclaration.returnType as TypeName;
+    var fReturnTypeNode = methodDeclaration.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(doubleType.element));
     expect(fReturnTypeNode.type, doubleType);
     //
@@ -5558,14 +5558,14 @@
       List<TypeAnnotation> typeArguments = invocation.typeArguments!.arguments;
       expect(typeArguments, hasLength(2));
       {
-        var typeArgument = typeArguments[0] as TypeName;
+        var typeArgument = typeArguments[0] as NamedType;
         InterfaceType boolType = typeProvider.boolType;
         expect(typeArgument.type, boolType);
         expect(typeArgument.name.staticElement, boolType.element);
         expect(typeArgument.name.staticType, boolType);
       }
       {
-        var typeArgument = typeArguments[1] as TypeName;
+        var typeArgument = typeArguments[1] as NamedType;
         InterfaceType stringType = typeProvider.stringType;
         expect(typeArgument.type, stringType);
         expect(typeArgument.name.staticElement, stringType.element);
@@ -5622,7 +5622,7 @@
       assertElement(creation, c.unnamedConstructor);
       assertType(creation, 'C');
 
-      assertTypeName(creation.constructorName.type, c, 'C');
+      assertNamedType(creation.constructorName.type2, c, 'C');
     }
 
     {
@@ -5631,7 +5631,7 @@
       assertElement(creation, namedConstructor);
       assertType(creation, 'C');
 
-      assertTypeName(creation.constructorName.type, c, 'C');
+      assertNamedType(creation.constructorName.type2, c, 'C');
       assertElement(creation.constructorName.name, namedConstructor);
     }
   }
@@ -5658,7 +5658,7 @@
       assertElement(creation, c.unnamedConstructor);
       assertType(creation, 'C');
 
-      assertTypeName(creation.constructorName.type, c, 'C',
+      assertNamedType(creation.constructorName.type2, c, 'C',
           expectedPrefix: import.prefix);
     }
 
@@ -5668,7 +5668,7 @@
       assertElement(creation, namedConstructor);
       assertType(creation, 'C');
 
-      assertTypeName(creation.constructorName.type, c, 'C',
+      assertNamedType(creation.constructorName.type2, c, 'C',
           expectedPrefix: import.prefix);
       assertElement(creation.constructorName.name, namedConstructor);
     }
@@ -5692,8 +5692,8 @@
       assertMember(creation, c.unnamedConstructor!, {'T': 'int'});
       assertType(creation, 'C<int>');
 
-      assertTypeName(creation.constructorName.type, c, 'C<int>');
-      assertTypeName(findNode.typeName('int>'), intElement, 'int');
+      assertNamedType(creation.constructorName.type2, c, 'C<int>');
+      assertNamedType(findNode.namedType('int>'), intElement, 'int');
     }
 
     {
@@ -5702,8 +5702,8 @@
       assertMember(creation, namedConstructor, {'T': 'String'});
       assertType(creation, 'C<String>');
 
-      assertTypeName(creation.constructorName.type, c, 'C<String>');
-      assertTypeName(findNode.typeName('String>'), stringElement, 'String');
+      assertNamedType(creation.constructorName.type2, c, 'C<String>');
+      assertNamedType(findNode.namedType('String>'), stringElement, 'String');
 
       assertMember(
           creation.constructorName.name, namedConstructor, {'T': 'String'});
@@ -5717,11 +5717,11 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var mapRef = findNode.typeName('Map<');
-    assertTypeName(mapRef, mapElement, 'Map<dynamic, dynamic>');
+    var mapRef = findNode.namedType('Map<');
+    assertNamedType(mapRef, mapElement, 'Map<dynamic, dynamic>');
 
-    var intRef = findNode.typeName('int>');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int>');
+    assertNamedType(intRef, intElement, 'int');
   }
 
   test_outline_invalid_mixin_arguments_tooMany() async {
@@ -5731,14 +5731,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var listRef = findNode.typeName('List<');
-    assertTypeName(listRef, listElement, 'List<dynamic>');
+    var listRef = findNode.namedType('List<');
+    assertNamedType(listRef, listElement, 'List<dynamic>');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_mixin_typeParameter() async {
@@ -5748,14 +5748,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var tRef = findNode.typeName('T<');
-    assertTypeName(tRef, findElement.typeParameter('T'), 'T');
+    var tRef = findNode.namedType('T<');
+    assertNamedType(tRef, findElement.typeParameter('T'), 'T');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_supertype_arguments_tooFew() async {
@@ -5765,11 +5765,11 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var mapRef = findNode.typeName('Map<');
-    assertTypeName(mapRef, mapElement, 'Map<dynamic, dynamic>');
+    var mapRef = findNode.namedType('Map<');
+    assertNamedType(mapRef, mapElement, 'Map<dynamic, dynamic>');
 
-    var intRef = findNode.typeName('int>');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int>');
+    assertNamedType(intRef, intElement, 'int');
   }
 
   test_outline_invalid_supertype_arguments_tooMany() async {
@@ -5779,14 +5779,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var listRef = findNode.typeName('List<');
-    assertTypeName(listRef, listElement, 'List<dynamic>');
+    var listRef = findNode.namedType('List<');
+    assertNamedType(listRef, listElement, 'List<dynamic>');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_supertype_hasArguments() async {
@@ -5796,14 +5796,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var xRef = findNode.typeName('X<');
-    assertTypeName(xRef, null, 'dynamic');
+    var xRef = findNode.namedType('X<');
+    assertNamedType(xRef, null, 'dynamic');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_supertype_noArguments() async {
@@ -5813,8 +5813,8 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var xRef = findNode.typeName('X {}');
-    assertTypeName(xRef, null, 'dynamic');
+    var xRef = findNode.namedType('X {}');
+    assertNamedType(xRef, null, 'dynamic');
   }
 
   test_outline_invalid_supertype_typeParameter() async {
@@ -5824,14 +5824,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var tRef = findNode.typeName('T<');
-    assertTypeName(tRef, findElement.typeParameter('T'), 'T');
+    var tRef = findNode.namedType('T<');
+    assertNamedType(tRef, findElement.typeParameter('T'), 'T');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_type_arguments_tooFew() async {
@@ -5841,11 +5841,11 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var mapRef = findNode.typeName('Map<');
-    assertTypeName(mapRef, mapElement, 'Map<dynamic, dynamic>');
+    var mapRef = findNode.namedType('Map<');
+    assertNamedType(mapRef, mapElement, 'Map<dynamic, dynamic>');
 
-    var intRef = findNode.typeName('int>');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int>');
+    assertNamedType(intRef, intElement, 'int');
   }
 
   test_outline_invalid_type_arguments_tooMany() async {
@@ -5855,14 +5855,14 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var listRef = findNode.typeName('List<');
-    assertTypeName(listRef, listElement, 'List<dynamic>');
+    var listRef = findNode.namedType('List<');
+    assertNamedType(listRef, listElement, 'List<dynamic>');
 
-    var intRef = findNode.typeName('int,');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int,');
+    assertNamedType(intRef, intElement, 'int');
 
-    var doubleRef = findNode.typeName('double>');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double>');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_invalid_type_typeParameter() async {
@@ -5872,11 +5872,11 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var tRef = findNode.typeName('T<');
-    assertTypeName(tRef, findElement.typeParameter('T'), 'T');
+    var tRef = findNode.namedType('T<');
+    assertNamedType(tRef, findElement.typeParameter('T'), 'T');
 
-    var intRef = findNode.typeName('int>');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int>');
+    assertNamedType(intRef, intElement, 'int');
   }
 
   test_outline_type_genericFunction() async {
@@ -5886,14 +5886,14 @@
     await resolveTestFile();
     expect(result.errors, isEmpty);
 
-    var intRef = findNode.typeName('int Function');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int Function');
+    assertNamedType(intRef, intElement, 'int');
 
     var functionRef = findNode.genericFunctionType('Function(double)');
     assertType(functionRef, 'int Function(double)');
 
-    var doubleRef = findNode.typeName('double) g');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double) g');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_type_topLevelVar_named() async {
@@ -5904,14 +5904,14 @@
     await resolveTestFile();
     expect(result.errors, isEmpty);
 
-    var intRef = findNode.typeName('int a');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int a');
+    assertNamedType(intRef, intElement, 'int');
 
-    var listRef = findNode.typeName('List<double> b');
-    assertTypeName(listRef, listElement, 'List<double>');
+    var listRef = findNode.namedType('List<double> b');
+    assertNamedType(listRef, listElement, 'List<double>');
 
-    var doubleRef = findNode.typeName('double> b');
-    assertTypeName(doubleRef, doubleElement, 'double');
+    var doubleRef = findNode.namedType('double> b');
+    assertNamedType(doubleRef, doubleElement, 'double');
   }
 
   test_outline_type_topLevelVar_named_prefixed() async {
@@ -5922,11 +5922,11 @@
     await resolveTestFile();
     ImportElement myImport = result.libraryElement.imports[0];
 
-    var intRef = findNode.typeName('int> a');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int> a');
+    assertNamedType(intRef, intElement, 'int');
 
-    var futureRef = findNode.typeName('my.Future<int> a');
-    assertTypeName(futureRef, futureElement, 'Future<int>',
+    var futureRef = findNode.namedType('my.Future<int> a');
+    assertNamedType(futureRef, futureElement, 'Future<int>',
         expectedPrefix: myImport.prefix);
   }
 
@@ -6910,11 +6910,11 @@
     addTestFile(content);
     await resolveTestFile();
 
-    var aRef = findNode.typeName('A<int>');
-    assertTypeName(aRef, findElement.class_('A'), 'A<int>');
+    var aRef = findNode.namedType('A<int>');
+    assertNamedType(aRef, findElement.class_('A'), 'A<int>');
 
-    var intRef = findNode.typeName('int>');
-    assertTypeName(intRef, intElement, 'int');
+    var intRef = findNode.namedType('int>');
+    assertNamedType(intRef, intElement, 'int');
   }
 
   test_top_class_full() async {
@@ -6949,7 +6949,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName superClass = dNode.extendsClause!.superclass;
+      NamedType superClass = dNode.extendsClause!.superclass2;
       expect(superClass.type, expectedType);
 
       var identifier = superClass.name as SimpleIdentifier;
@@ -6963,7 +6963,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName mixinType = dNode.withClause!.mixinTypes[0];
+      NamedType mixinType = dNode.withClause!.mixinTypes2[0];
       expect(mixinType.type, expectedType);
 
       var identifier = mixinType.name as SimpleIdentifier;
@@ -6977,7 +6977,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName implementedType = dNode.implementsClause!.interfaces[0];
+      NamedType implementedType = dNode.implementsClause!.interfaces2[0];
       expect(implementedType.type, expectedType);
 
       var identifier = implementedType.name as SimpleIdentifier;
@@ -7018,7 +7018,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName superClass = dNode.superclass;
+      NamedType superClass = dNode.superclass2;
       expect(superClass.type, expectedType);
 
       var identifier = superClass.name as SimpleIdentifier;
@@ -7032,7 +7032,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName mixinType = dNode.withClause.mixinTypes[0];
+      NamedType mixinType = dNode.withClause.mixinTypes2[0];
       expect(mixinType.type, expectedType);
 
       var identifier = mixinType.name as SimpleIdentifier;
@@ -7046,7 +7046,7 @@
         nullabilitySuffix: NullabilitySuffix.none,
       );
 
-      TypeName interfaceType = dNode.implementsClause!.interfaces[0];
+      NamedType interfaceType = dNode.implementsClause!.interfaces2[0];
       expect(interfaceType.type, expectedType);
 
       var identifier = interfaceType.name as SimpleIdentifier;
@@ -7140,7 +7140,7 @@
       assertType(node.declaredElement!.type, 'int Function(double)');
 
       // method return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, intType);
       expect(returnTypeName.staticElement, intElement);
@@ -7156,7 +7156,7 @@
         expect(pNode.declaredElement, isNotNull);
         expect(pNode.declaredElement!.type, doubleType);
 
-        var pType = pNode.type as TypeName;
+        var pType = pNode.type as NamedType;
         expect(pType.name.staticElement, doubleElement);
         expect(pType.name.staticType, isNull);
 
@@ -7172,7 +7172,7 @@
       assertType(node.declaredElement!.type, 'int Function()');
 
       // getter return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, intType);
       expect(returnTypeName.staticElement, intElement);
@@ -7190,7 +7190,7 @@
       assertType(node.declaredElement!.type, 'void Function(double)');
 
       // setter return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, VoidTypeImpl.instance);
       expect(returnTypeName.staticElement, isNull);
@@ -7206,7 +7206,7 @@
         expect(pNode.declaredElement, isNotNull);
         expect(pNode.declaredElement!.type, doubleType);
 
-        var pType = pNode.type as TypeName;
+        var pType = pNode.type as NamedType;
         expect(pType.name.staticElement, doubleElement);
         expect(pType.name.staticType, isNull);
 
@@ -7235,7 +7235,7 @@
       assertType(node.declaredElement!.type, 'int Function(double)');
 
       // function return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, intType);
       expect(returnTypeName.staticElement, intElement);
@@ -7252,7 +7252,7 @@
         expect(pNode.declaredElement, isNotNull);
         expect(pNode.declaredElement!.type, doubleType);
 
-        var pType = pNode.type as TypeName;
+        var pType = pNode.type as NamedType;
         expect(pType.name.staticElement, doubleElement);
         expect(pType.name.staticType, isNull);
 
@@ -7268,7 +7268,7 @@
       assertType(node.declaredElement!.type, 'int Function()');
 
       // getter return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, intType);
       expect(returnTypeName.staticElement, intElement);
@@ -7286,7 +7286,7 @@
       assertType(node.declaredElement!.type, 'void Function(double)');
 
       // setter return type
-      var returnType = node.returnType as TypeName;
+      var returnType = node.returnType as NamedType;
       var returnTypeName = returnType.name as SimpleIdentifier;
       expect(returnType.type, VoidTypeImpl.instance);
       expect(returnTypeName.staticElement, isNull);
@@ -7303,7 +7303,7 @@
         expect(pNode.declaredElement, isNotNull);
         expect(pNode.declaredElement!.type, doubleType);
 
-        var pType = pNode.type as TypeName;
+        var pType = pNode.type as NamedType;
         expect(pType.name.staticElement, doubleElement);
         expect(pType.name.staticType, isNull);
 
@@ -7348,8 +7348,8 @@
       FieldElement bElement = cElement.getField('b')!;
       var bDeclaration = cNode.members[1] as FieldDeclaration;
 
-      var typeName = bDeclaration.fields.type as TypeName;
-      var typeIdentifier = typeName.name as SimpleIdentifier;
+      var namedType = bDeclaration.fields.type as NamedType;
+      var typeIdentifier = namedType.name as SimpleIdentifier;
       expect(typeIdentifier.staticElement, same(tElement));
       expect(typeIdentifier.staticType, isNull);
 
@@ -7438,8 +7438,8 @@
       expect(bElement, same(unitElement.topLevelVariables[1]));
       expect(bElement.type, typeProvider.doubleType);
 
-      var typeName = bDeclaration.variables.type as TypeName;
-      _assertTypeNameSimple(typeName, typeProvider.doubleType);
+      var namedType = bDeclaration.variables.type as NamedType;
+      _assertTypeNameSimple(namedType, typeProvider.doubleType);
 
       expect(bNode.name.staticElement, same(bElement));
       expect(bNode.name.staticType, isNull);
@@ -7511,7 +7511,7 @@
     expect(fDeclaration.name.staticElement, same(fElement));
     expect(fDeclaration.name.staticType, isNull);
 
-    var fReturnTypeNode = fDeclaration.returnType as TypeName;
+    var fReturnTypeNode = fDeclaration.returnType as NamedType;
     expect(fReturnTypeNode.name.staticElement, same(doubleType.element));
     expect(fReturnTypeNode.type, doubleType);
     //
@@ -7579,7 +7579,7 @@
     expect(aliasElement, same(findElement.typeAlias('F')));
     expect(function.returnType, typeProvider.intType);
 
-    _assertTypeNameSimple(alias.returnType as TypeName, typeProvider.intType);
+    _assertTypeNameSimple(alias.returnType as NamedType, typeProvider.intType);
 
     _assertSimpleParameter(
         alias.parameters.parameters[0] as SimpleFormalParameter,
@@ -7620,7 +7620,7 @@
       TypeParameter tNode = cNode.typeParameters!.typeParameters[0];
       expect(tNode.declaredElement, same(cElement.typeParameters[0]));
 
-      var bound = tNode.bound as TypeName;
+      var bound = tNode.bound as NamedType;
       expect(bound.type, interfaceTypeNone(aElement));
 
       var boundIdentifier = bound.name as SimpleIdentifier;
@@ -7638,14 +7638,14 @@
       TypeParameter uNode = cNode.typeParameters!.typeParameters[1];
       expect(uNode.declaredElement, same(cElement.typeParameters[1]));
 
-      var bound = uNode.bound as TypeName;
+      var bound = uNode.bound as NamedType;
       expect(bound.type, listOfA);
 
       var listIdentifier = bound.name as SimpleIdentifier;
       expect(listIdentifier.staticElement, same(listElement));
       expect(listIdentifier.staticType, isNull);
 
-      var aTypeName = bound.typeArguments!.arguments[0] as TypeName;
+      var aTypeName = bound.typeArguments!.arguments[0] as NamedType;
       expect(aTypeName.type, interfaceTypeNone(aElement));
 
       var aIdentifier = aTypeName.name as SimpleIdentifier;
@@ -7718,7 +7718,7 @@
       var statement = statements[1] as TryStatement;
       CatchClause catchClause = statement.catchClauses[0];
       _assertTypeNameSimple(
-          catchClause.exceptionType as TypeName, typeProvider.intType);
+          catchClause.exceptionType as NamedType, typeProvider.intType);
 
       var exceptionNode = catchClause.exceptionParameter as SimpleIdentifier;
       var exceptionElement =
@@ -7774,7 +7774,7 @@
       var statement = statements[4] as TryStatement;
       CatchClause catchClause = statement.catchClauses[0];
       _assertTypeNameSimple(
-          catchClause.exceptionType as TypeName, typeProvider.intType);
+          catchClause.exceptionType as NamedType, typeProvider.intType);
       expect(catchClause.exceptionParameter, isNull);
       expect(catchClause.stackTraceParameter, isNull);
     }
@@ -7790,11 +7790,11 @@
     var statements = _getMainStatements(result);
     var variableDeclarationStatement =
         statements[0] as VariableDeclarationStatement;
-    var type = variableDeclarationStatement.variables.type as TypeName;
+    var type = variableDeclarationStatement.variables.type as NamedType;
     expect(type.type, isDynamicType);
-    var typeName = type.name;
-    assertTypeNull(typeName);
-    expect(typeName.staticElement, same(typeProvider.dynamicType.element));
+    var namedType = type.name;
+    assertTypeNull(namedType);
+    expect(namedType.staticElement, same(typeProvider.dynamicType.element));
   }
 
   test_type_functionTypeAlias() async {
@@ -7812,14 +7812,14 @@
 
     FieldDeclaration fDeclaration = findNode.fieldDeclaration('F<int> f');
 
-    var typeName = fDeclaration.fields.type as TypeName;
-    assertType(typeName, 'int Function(bool)');
+    var namedType = fDeclaration.fields.type as NamedType;
+    assertType(namedType, 'int Function(bool)');
 
-    var typeIdentifier = typeName.name as SimpleIdentifier;
+    var typeIdentifier = namedType.name as SimpleIdentifier;
     expect(typeIdentifier.staticElement, same(aliasElement));
     expect(typeIdentifier.staticType, isNull);
 
-    List<TypeAnnotation> typeArguments = typeName.typeArguments!.arguments;
+    List<TypeAnnotation> typeArguments = namedType.typeArguments!.arguments;
     expect(typeArguments, hasLength(1));
     _assertTypeNameSimple(typeArguments[0], typeProvider.intType);
   }
@@ -7834,11 +7834,11 @@
     var statements = _getMainStatements(result);
     var variableDeclarationStatement =
         statements[0] as VariableDeclarationStatement;
-    var type = variableDeclarationStatement.variables.type as TypeName;
+    var type = variableDeclarationStatement.variables.type as NamedType;
     expect(type.type, isVoidType);
-    var typeName = type.name;
-    expect(typeName.staticType, isNull);
-    expect(typeName.staticElement, isNull);
+    var namedType = type.name;
+    expect(namedType.staticType, isNull);
+    expect(namedType.staticElement, isNull);
   }
 
   test_typeAnnotation_prefixed() async {
@@ -7863,9 +7863,9 @@
 
     {
       var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
-      var typeName = declaration.variables.type as TypeName;
+      var namedType = declaration.variables.type as NamedType;
 
-      var typeIdentifier = typeName.name as PrefixedIdentifier;
+      var typeIdentifier = namedType.name as PrefixedIdentifier;
       expect(typeIdentifier.staticElement, aClass);
 
       expect(typeIdentifier.prefix.name, 'b');
@@ -7876,9 +7876,9 @@
 
     {
       var declaration = unit.declarations[1] as TopLevelVariableDeclaration;
-      var typeName = declaration.variables.type as TypeName;
+      var namedType = declaration.variables.type as NamedType;
 
-      var typeIdentifier = typeName.name as PrefixedIdentifier;
+      var typeIdentifier = namedType.name as PrefixedIdentifier;
       expect(typeIdentifier.staticElement, aClass);
 
       expect(typeIdentifier.prefix.name, 'c');
@@ -7951,14 +7951,14 @@
     ConstructorName constructorName = creation.constructorName;
     expect(constructorName.name, isNull);
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.type, isDynamicType);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.type, isDynamicType);
 
-    var typeIdentifier = typeName.name as SimpleIdentifier;
+    var typeIdentifier = namedType.name as SimpleIdentifier;
     expect(typeIdentifier.staticElement, isNull);
     expect(typeIdentifier.staticType, isNull);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -7983,10 +7983,10 @@
     ConstructorName constructorName = creation.constructorName;
     expect(constructorName.name, isNull);
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.type, isDynamicType);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.type, isDynamicType);
 
-    var typePrefixed = typeName.name as PrefixedIdentifier;
+    var typePrefixed = namedType.name as PrefixedIdentifier;
     expect(typePrefixed.staticElement, isNull);
     expect(typePrefixed.staticType, isDynamicType);
 
@@ -7998,7 +7998,7 @@
     expect(typeIdentifier.staticElement, isNull);
     expect(typeIdentifier.staticType, isDynamicType);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -8027,10 +8027,10 @@
     ConstructorName constructorName = creation.constructorName;
     expect(constructorName.name, isNull);
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.type, isDynamicType);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.type, isDynamicType);
 
-    var typePrefixed = typeName.name as PrefixedIdentifier;
+    var typePrefixed = namedType.name as PrefixedIdentifier;
     expect(typePrefixed.staticElement, isNull);
     expect(typePrefixed.staticType, isDynamicType);
 
@@ -8042,7 +8042,7 @@
     expect(typeIdentifier.staticElement, isNull);
     expect(typeIdentifier.staticType, isDynamicType);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -8065,10 +8065,10 @@
 
     ConstructorName constructorName = creation.constructorName;
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.type, isDynamicType);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.type, isDynamicType);
 
-    var typePrefixed = typeName.name as PrefixedIdentifier;
+    var typePrefixed = namedType.name as PrefixedIdentifier;
     assertElementNull(typePrefixed);
     assertTypeNull(typePrefixed);
 
@@ -8083,7 +8083,7 @@
     assertElementNull(constructorName.name);
     assertTypeNull(constructorName.name!);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -8111,10 +8111,10 @@
 
     ConstructorName constructorName = creation.constructorName;
 
-    TypeName typeName = constructorName.type;
-    expect(typeName.type, isDynamicType);
+    NamedType namedType = constructorName.type2;
+    expect(namedType.type, isDynamicType);
 
-    var typePrefixed = typeName.name as PrefixedIdentifier;
+    var typePrefixed = namedType.name as PrefixedIdentifier;
     assertElementNull(typePrefixed);
     assertTypeNull(typePrefixed);
 
@@ -8129,7 +8129,7 @@
     assertElementNull(constructorName.name);
     assertTypeNull(constructorName.name!);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -8158,10 +8158,10 @@
 
     ConstructorName constructorName = creation.constructorName;
 
-    TypeName typeName = constructorName.type;
-    assertType(typeName, 'Random');
+    NamedType namedType = constructorName.type2;
+    assertType(namedType, 'Random');
 
-    var typePrefixed = typeName.name as PrefixedIdentifier;
+    var typePrefixed = namedType.name as PrefixedIdentifier;
     assertElement(typePrefixed, randomElement);
     assertTypeNull(typePrefixed);
 
@@ -8176,7 +8176,7 @@
     assertElementNull(constructorName.name);
     assertTypeNull(constructorName.name!);
 
-    assertTypeArguments(typeName.typeArguments!, [intType, doubleType]);
+    assertTypeArguments(namedType.typeArguments!, [intType, doubleType]);
     _assertInvocationArguments(creation.argumentList,
         [checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
   }
@@ -8627,10 +8627,10 @@
     var constructorElement = classElement.unnamedConstructor;
     expect(constructorName.staticElement, constructorElement);
 
-    var typeName = constructorName.type;
-    expect(typeName.typeArguments, isNull);
+    var namedType = constructorName.type2;
+    expect(namedType.typeArguments, isNull);
 
-    var typeIdentifier = typeName.name as SimpleIdentifier;
+    var typeIdentifier = namedType.name as SimpleIdentifier;
     assertElement(typeIdentifier, classElement);
     assertTypeNull(typeIdentifier);
 
@@ -8681,18 +8681,18 @@
     expect(node.declaredElement, same(element));
     expect(node.identifier!.staticElement, same(element));
 
-    var typeName = node.type as TypeName?;
-    if (typeName != null) {
-      expect(typeName.type, type);
-      expect(typeName.name.staticElement, same(type!.element));
+    var namedType = node.type as NamedType?;
+    if (namedType != null) {
+      expect(namedType.type, type);
+      expect(namedType.name.staticElement, same(type!.element));
     }
   }
 
-  void _assertTypeNameSimple(TypeAnnotation typeName, DartType type) {
-    typeName as TypeName;
-    expect(typeName.type, type);
+  void _assertTypeNameSimple(TypeAnnotation namedType, DartType type) {
+    namedType as NamedType;
+    expect(namedType.type, type);
 
-    var identifier = typeName.name as SimpleIdentifier;
+    var identifier = namedType.name as SimpleIdentifier;
     expect(identifier.staticElement, same(type.element));
     expect(identifier.staticType, isNull);
   }
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 29a974a..ab00fb1 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -727,6 +727,128 @@
     expect(driver.fsState.knownFilePaths, isNot(contains(b)));
   }
 
+  test_changeFile_potentiallyAffected_imported() async {
+    newFile('/test/lib/a.dart', content: '');
+    var b = newFile('/test/lib/b.dart', content: '''
+import 'a.dart';
+''');
+    newFile('/test/lib/c.dart', content: '''
+import 'b.dart';
+''');
+    newFile('/test/lib/d.dart', content: '''
+import 'c.dart';
+''');
+    newFile('/test/lib/e.dart', content: '');
+
+    Future<LibraryElementImpl> getLibrary(String shortName) async {
+      var uriStr = 'package:test/$shortName';
+      var result = await driver.getLibraryByUriValid(uriStr);
+      return result.element as LibraryElementImpl;
+    }
+
+    var a_element = await getLibrary('a.dart');
+    var b_element = await getLibrary('b.dart');
+    var c_element = await getLibrary('c.dart');
+    var d_element = await getLibrary('d.dart');
+    var e_element = await getLibrary('e.dart');
+
+    // We have all libraries loaded after analysis.
+    driver.assertLoadedLibraryUriSet(
+      included: [
+        'package:test/a.dart',
+        'package:test/b.dart',
+        'package:test/c.dart',
+        'package:test/d.dart',
+        'package:test/e.dart',
+      ],
+    );
+
+    // All libraries are valid.
+    expect(a_element.isValid, true);
+    expect(b_element.isValid, true);
+    expect(c_element.isValid, true);
+    expect(d_element.isValid, true);
+    expect(e_element.isValid, true);
+
+    // Change `b.dart`, also removes `c.dart` and `d.dart` that import it.
+    // But `a.dart` and `d.dart` is not affected.
+    driver.changeFile(b.path);
+    driver.assertLoadedLibraryUriSet(
+      excluded: [
+        'package:test/b.dart',
+        'package:test/c.dart',
+        'package:test/d.dart',
+      ],
+      included: [
+        'package:test/a.dart',
+        'package:test/e.dart',
+      ],
+    );
+
+    // Only `a.dart` and `e.dart` are still valid.
+    expect(a_element.isValid, true);
+    expect(b_element.isValid, false);
+    expect(c_element.isValid, false);
+    expect(d_element.isValid, false);
+    expect(e_element.isValid, true);
+  }
+
+  test_changeFile_potentiallyAffected_part() async {
+    var a = newFile('/test/lib/a.dart', content: '''
+part of 'b.dart';
+''');
+    newFile('/test/lib/b.dart', content: '''
+part 'a.dart';
+''');
+    newFile('/test/lib/c.dart', content: '''
+import 'b.dart';
+''');
+    newFile('/test/lib/d.dart', content: '');
+
+    Future<LibraryElementImpl> getLibrary(String shortName) async {
+      var uriStr = 'package:test/$shortName';
+      var result = await driver.getLibraryByUriValid(uriStr);
+      return result.element as LibraryElementImpl;
+    }
+
+    var b_element = await getLibrary('b.dart');
+    var c_element = await getLibrary('c.dart');
+    var d_element = await getLibrary('d.dart');
+
+    // We have all libraries loaded after analysis.
+    driver.assertLoadedLibraryUriSet(
+      included: [
+        'package:test/b.dart',
+        'package:test/c.dart',
+        'package:test/d.dart',
+      ],
+    );
+
+    // All libraries are valid.
+    expect(b_element.isValid, true);
+    expect(c_element.isValid, true);
+    expect(d_element.isValid, true);
+
+    // Change `a.dart`, remove `b.dart` that part it.
+    // Removes `c.dart` that imports `b.dart`.
+    // But `d.dart` is not affected.
+    driver.changeFile(a.path);
+    driver.assertLoadedLibraryUriSet(
+      excluded: [
+        'package:test/b.dart',
+        'package:test/c.dart',
+      ],
+      included: [
+        'package:test/d.dart',
+      ],
+    );
+
+    // Only `d.dart` is still valid.
+    expect(b_element.isValid, false);
+    expect(c_element.isValid, false);
+    expect(d_element.isValid, true);
+  }
+
   test_changeFile_selfConsistent() async {
     var a = convertPath('/test/lib/a.dart');
     var b = convertPath('/test/lib/b.dart');
@@ -987,7 +1109,7 @@
   }
 
   test_currentSession() async {
-    var a = convertPath('/a.dart');
+    var a = convertPath('/test/lib/a.dart');
 
     newFile(a, content: 'var V = 1;');
     await driver.getResultValid(a);
@@ -1002,8 +1124,9 @@
     var session2 = driver.currentSession;
     expect(session2, isNotNull);
 
-    // We get a new session.
-    expect(session2, isNot(session1));
+    // We don't discard the session anymore.
+    // So, the session is always the same.
+    expect(session2, same(session1));
   }
 
   test_discoverAvailableFiles_packages() async {
@@ -3349,7 +3472,32 @@
     return getFileSync2(path) as FileResult;
   }
 
+  Set<String> get loadedLibraryUriSet {
+    var elementFactory = this.test.libraryContext!.elementFactory;
+    var libraryReferences = elementFactory.rootReference.children;
+    return libraryReferences.map((e) => e.name).toSet();
+  }
+
+  void assertLoadedLibraryUriSet({
+    Iterable<String>? included,
+    Iterable<String>? excluded,
+  }) {
+    var uriSet = loadedLibraryUriSet;
+    if (included != null) {
+      expect(uriSet, containsAll(included));
+    }
+    if (excluded != null) {
+      for (var excludedUri in excluded) {
+        expect(uriSet, isNot(contains(excludedUri)));
+      }
+    }
+  }
+
   Future<ResolvedUnitResult> getResultValid(String path) async {
     return await getResult2(path) as ResolvedUnitResult;
   }
+
+  Future<LibraryElementResult> getLibraryByUriValid(String uriStr) async {
+    return await getLibraryByUri2(uriStr) as LibraryElementResult;
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
index 573bc1b..f808c64 100644
--- a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
@@ -18,10 +18,10 @@
 class ExperimentsTest {
   var knownFeatures = <String, ExperimentalFeature>{};
 
-  void assertLatestSdkLanguageVersion(ExperimentStatus status) {
+  void assertCurrentSdkLanguageVersion(ExperimentStatus status) {
     expect(
       getSdkLanguageVersion(status),
-      ExperimentStatus.latestSdkLanguageVersion,
+      ExperimentStatus.currentVersion,
     );
   }
 
@@ -126,10 +126,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['no-a', 'a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -145,10 +145,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a', 'no-a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -163,10 +163,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['no-a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -181,10 +181,10 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['no-a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -208,10 +208,10 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: [],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false, true]);
   }
 
@@ -226,10 +226,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -244,10 +244,10 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -263,10 +263,10 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['no-a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -282,10 +282,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -301,10 +301,10 @@
       releaseVersion: null,
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['no-a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -320,20 +320,20 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
   test_fromStrings2_flags_unrecognized() {
     // Unrecognized flags are ignored.
     var status = fromStrings2(
-      sdkLanguageVersion: ExperimentStatus.latestSdkLanguageVersion,
+      sdkLanguageVersion: ExperimentStatus.currentVersion,
       flags: ['a'],
     );
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), <Object>[]);
   }
 
@@ -485,7 +485,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['no-a', 'a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -501,7 +501,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['a', 'no-a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -525,7 +525,7 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings([]);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false, true]);
   }
 
@@ -540,7 +540,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['no-a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -555,7 +555,7 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings(['no-a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -570,7 +570,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -585,7 +585,7 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings(['a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -601,7 +601,7 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings(['no-a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
@@ -617,7 +617,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -633,7 +633,7 @@
       releaseVersion: null,
     );
     var status = fromStrings(['no-a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [false]);
   }
 
@@ -649,14 +649,14 @@
       releaseVersion: Version.parse('1.0.0'),
     );
     var status = fromStrings(['a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), [true]);
   }
 
   test_fromStrings_unrecognized_flag() {
     // Unrecognized flags are ignored.
     var status = fromStrings(['a']);
-    assertLatestSdkLanguageVersion(status);
+    assertCurrentSdkLanguageVersion(status);
     expect(getFlags(status), <Object>[]);
   }
 
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 0a48c66..86df8d9 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
@@ -10,7 +10,6 @@
 import 'package:analyzer/src/dart/analysis/experiments_impl.dart';
 import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 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';
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 d307683..29fcbe1 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -498,6 +498,7 @@
     // It's a cycle.
     _assertLibraryCycle(fa, [fa, fb], []);
     _assertLibraryCycle(fb, [fa, fb], []);
+    expect(fa.libraryCycle, same(fb.libraryCycle));
 
     // Update a.dart so that it does not import b.dart anymore.
     newFile(pa);
@@ -520,6 +521,36 @@
     _assertLibraryCycle(fa, [fa], []);
   }
 
+  test_libraryCycle_part() {
+    var a_path = convertPath('/aaa/lib/a.dart');
+    var b_path = convertPath('/aaa/lib/b.dart');
+
+    newFile(a_path, content: r'''
+part 'b.dart';
+''');
+    newFile(b_path, content: r'''
+part of 'a.dart';
+''');
+
+    var a_file = fileSystemState.getFileForPath(a_path);
+    var b_file = fileSystemState.getFileForPath(b_path);
+    _assertFilesWithoutLibraryCycle([a_file, b_file]);
+
+    // Compute the library cycle for 'a.dart', the library.
+    var a_libraryCycle = a_file.libraryCycle;
+    _assertFilesWithoutLibraryCycle([b_file]);
+
+    // The part 'b.dart' has its own library cycle.
+    // If the user chooses to import a part, it is a compile-time error.
+    // We could handle this in different ways:
+    // 1. Completely ignore an import of a file with a `part of` directive.
+    // 2. Treat such file as a library anyway.
+    // By giving a part its own library cycle we support (2).
+    var b_libraryCycle = b_file.libraryCycle;
+    expect(b_libraryCycle, isNot(same(a_libraryCycle)));
+    _assertFilesWithoutLibraryCycle([]);
+  }
+
   test_referencedNames() {
     String path = convertPath('/aaa/lib/a.dart');
     newFile(path, content: r'''
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index b6d1f58..cecd83d 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -678,11 +678,11 @@
     var constA = findElement.unnamedConstructor('A');
     var constA_named = findElement.constructor('named', of: 'A');
     assertThat(constA)
-      ..isReferencedAt('(); // B1', true, length: 0)
-      ..isReferencedAt('(); // C1', true, length: 0);
+      ..isInvokedAt('(); // B1', true, length: 0)
+      ..isInvokedAt('(); // C1', true, length: 0);
     assertThat(constA_named)
-      ..isReferencedAt('.named(); // B2', true, length: 6)
-      ..isReferencedAt('.named(); // C2', true, length: 6);
+      ..isInvokedAt('.named(); // B2', true, length: 6)
+      ..isInvokedAt('.named(); // C2', true, length: 6);
   }
 
   test_isReferencedBy_ConstructorElement_classTypeAlias_cycle() async {
@@ -718,11 +718,11 @@
     assertThat(element)
       ..hasRelationCount(6)
       ..isReferencedAt('.foo] 1', true, length: 4)
-      ..isReferencedAt('.foo(); // 2', true, length: 4)
-      ..isReferencedAt('.foo(); // 3', true, length: 4)
+      ..isInvokedAt('.foo(); // 2', true, length: 4)
+      ..isInvokedAt('.foo(); // 3', true, length: 4)
       ..isReferencedAt('.foo; // 4', true, length: 4)
-      ..isReferencedAt('.foo(); // 5', true, length: 4)
-      ..isReferencedAt('.foo; // 6', true, length: 4);
+      ..isInvokedAt('.foo(); // 5', true, length: 4)
+      ..isReferencedByConstructorTearOffAt('.foo; // 6', length: 4);
   }
 
   test_isReferencedBy_ConstructorElement_namedOnlyWithDot() async {
@@ -752,8 +752,8 @@
 ''');
     var constA = findElement.unnamedConstructor('A');
     var constA_bar = findElement.constructor('bar');
-    assertThat(constA).isReferencedAt('(); // 2', true, length: 0);
-    assertThat(constA_bar).isReferencedAt('.bar(); // 1', true, length: 4);
+    assertThat(constA).isInvokedAt('(); // 2', true, length: 0);
+    assertThat(constA_bar).isInvokedAt('.bar(); // 1', true, length: 4);
   }
 
   test_isReferencedBy_ConstructorElement_unnamed_declared() async {
@@ -761,24 +761,26 @@
 /// [new A] 1
 class A {
   A() {}
+  A.other() : this(); // 2
 }
 class B extends A {
-  B() : super(); // 2
-  factory B.bar() = A; // 3
+  B() : super(); // 3
+  factory B.other() = A; // 4
 }
 void f() {
-  A(); // 4
-  A.new; // 5
+  A(); // 5
+  A.new; // 6
 }
 ''');
     var element = findElement.unnamedConstructor('A');
     assertThat(element)
-      ..hasRelationCount(5)
+      ..hasRelationCount(6)
       ..isReferencedAt('] 1', true, length: 0)
-      ..isReferencedAt('(); // 2', true, length: 0)
-      ..isReferencedAt('; // 3', true, length: 0)
-      ..isReferencedAt('(); // 4', true, length: 0)
-      ..isReferencedAt('.new; // 5', true, length: 4);
+      ..isInvokedAt('(); // 2', true, length: 0)
+      ..isInvokedAt('(); // 3', true, length: 0)
+      ..isReferencedAt('; // 4', true, length: 0)
+      ..isInvokedAt('(); // 5', true, length: 0)
+      ..isReferencedByConstructorTearOffAt('.new; // 6', length: 4);
   }
 
   test_isReferencedBy_ConstructorElement_unnamed_declared_new() async {
@@ -786,24 +788,26 @@
 /// [new A] 1
 class A {
   A.new() {}
+  A.other() : this(); // 2
 }
 class B extends A {
-  B() : super(); // 2
-  factory B.bar() = A; // 3
+  B() : super(); // 3
+  factory B.bar() = A; // 4
 }
 void f() {
-  A(); // 4
-  A.new; // 5
+  A(); // 5
+  A.new; // 6
 }
 ''');
     var element = findElement.unnamedConstructor('A');
     assertThat(element)
-      ..hasRelationCount(5)
+      ..hasRelationCount(6)
       ..isReferencedAt('] 1', true, length: 0)
-      ..isReferencedAt('(); // 2', true, length: 0)
-      ..isReferencedAt('; // 3', true, length: 0)
-      ..isReferencedAt('(); // 4', true, length: 0)
-      ..isReferencedAt('.new; // 5', true, length: 4);
+      ..isInvokedAt('(); // 2', true, length: 0)
+      ..isInvokedAt('(); // 3', true, length: 0)
+      ..isReferencedAt('; // 4', true, length: 0)
+      ..isInvokedAt('(); // 5', true, length: 0)
+      ..isReferencedByConstructorTearOffAt('.new; // 6', length: 4);
   }
 
   test_isReferencedBy_ConstructorElement_unnamed_synthetic() async {
@@ -823,10 +827,10 @@
     assertThat(element)
       ..hasRelationCount(5)
       ..isReferencedAt('] 1', true, length: 0)
-      ..isReferencedAt('(); // 2', true, length: 0)
+      ..isInvokedAt('(); // 2', true, length: 0)
       ..isReferencedAt('; // 3', true, length: 0)
-      ..isReferencedAt('(); // 4', true, length: 0)
-      ..isReferencedAt('.new; // 5', true, length: 4);
+      ..isInvokedAt('(); // 4', true, length: 0)
+      ..isReferencedByConstructorTearOffAt('.new; // 5', length: 4);
   }
 
   test_isReferencedBy_DynamicElement() async {
@@ -1615,6 +1619,16 @@
         test._expectedLocation(search, isQualified, length: length));
   }
 
+  void isReferencedByConstructorTearOffAt(String search,
+      {required int length}) {
+    test._assertHasRelation(
+      element,
+      relations,
+      IndexRelationKind.IS_REFERENCED_BY_CONSTRUCTOR_TEAR_OFF,
+      test._expectedLocation(search, true, length: length),
+    );
+  }
+
   void isWrittenAt(String search, bool isQualified, {int? length}) {
     test._assertHasRelation(element, relations, IndexRelationKind.IS_WRITTEN_BY,
         test._expectedLocation(search, isQualified, length: length));
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 774cbf2..9512ac4 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -344,21 +344,41 @@
 
   test_searchReferences_ConstructorElement_named() async {
     await resolveTestCode('''
+/// [new A.named] 1
 class A {
   A.named() {}
+  A.other() : this.named(); // 2
 }
 
-void main() {
-  A.named();
-  A.named;
+class B extends A {
+  B() : super.named(); // 3
+  factory B.other() = A.named; // 4
+}
+
+void f() {
+  A.named(); // 5
+  A.named; // 6
 }
 ''');
     var element = findElement.constructor('named');
-    var main = findElement.function('main');
+    var f = findElement.function('f');
     var expected = [
-      _expectIdQ(main, SearchResultKind.REFERENCE, '.named();',
+      _expectIdQ(
+          findElement.class_('A'), SearchResultKind.REFERENCE, '.named] 1',
           length: '.named'.length),
-      _expectIdQ(main, SearchResultKind.REFERENCE, '.named;',
+      _expectIdQ(findElement.constructor('other', of: 'A'),
+          SearchResultKind.INVOCATION, '.named(); // 2',
+          length: '.named'.length),
+      _expectIdQ(findElement.unnamedConstructor('B'),
+          SearchResultKind.INVOCATION, '.named(); // 3',
+          length: '.named'.length),
+      _expectIdQ(findElement.constructor('other', of: 'B'),
+          SearchResultKind.REFERENCE, '.named; // 4',
+          length: '.named'.length),
+      _expectIdQ(f, SearchResultKind.INVOCATION, '.named(); // 5',
+          length: '.named'.length),
+      _expectIdQ(
+          f, SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF, '.named; // 6',
           length: '.named'.length),
     ];
     await _verifyReferences(element, expected);
@@ -381,29 +401,49 @@
     var element = findElement.constructor('named');
     var f = findElement.topFunction('f');
     await _verifyReferences(element, [
-      _expectIdQ(f, SearchResultKind.REFERENCE, '.named(); // ref',
+      _expectIdQ(f, SearchResultKind.INVOCATION, '.named(); // ref',
           length: '.named'.length),
-      _expectIdQ(f, SearchResultKind.REFERENCE, '.named;',
+      _expectIdQ(
+          f, SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF, '.named;',
           length: '.named'.length),
     ]);
   }
 
-  test_searchReferences_ConstructorElement_unnamed() async {
+  test_searchReferences_ConstructorElement_unnamed_declared() async {
     await resolveTestCode('''
+/// [new A] 1
 class A {
   A() {}
+  A.other() : this(); // 2
 }
 
-void main() {
-  A();
-  A.new;
+class B extends A {
+  B() : super(); // 3
+  factory B.other() = A; // 4
+}
+
+void f() {
+  A(); // 5
+  A.new; // 6
 }
 ''');
     var element = findElement.unnamedConstructor('A');
-    var main = findElement.function('main');
+    var f = findElement.function('f');
     var expected = [
-      _expectIdQ(main, SearchResultKind.REFERENCE, '();', length: 0),
-      _expectIdQ(main, SearchResultKind.REFERENCE, '.new;',
+      _expectIdQ(findElement.class_('A'), SearchResultKind.REFERENCE, '] 1',
+          length: 0),
+      _expectIdQ(findElement.constructor('other', of: 'A'),
+          SearchResultKind.INVOCATION, '(); // 2',
+          length: 0),
+      _expectIdQ(findElement.unnamedConstructor('B'),
+          SearchResultKind.INVOCATION, '(); // 3',
+          length: 0),
+      _expectIdQ(findElement.constructor('other', of: 'B'),
+          SearchResultKind.REFERENCE, '; // 4',
+          length: 0),
+      _expectIdQ(f, SearchResultKind.INVOCATION, '(); // 5', length: 0),
+      _expectIdQ(
+          f, SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF, '.new; // 6',
           length: '.new'.length),
     ];
     await _verifyReferences(element, expected);
@@ -432,7 +472,7 @@
     CompilationUnit otherUnit = otherUnitResult.unit;
     Element main = otherUnit.declaredElement!.functions[0];
     var expected = [
-      ExpectedResult(main, SearchResultKind.REFERENCE,
+      ExpectedResult(main, SearchResultKind.INVOCATION,
           otherCode.indexOf('(); // in other'), 0,
           isResolved: true, isQualified: true)
     ];
@@ -441,18 +481,33 @@
 
   test_searchReferences_ConstructorElement_unnamed_synthetic() async {
     await resolveTestCode('''
+/// [new A] 1
 class A {}
 
-void main() {
-  A();
-  A.new;
+class B extends A {
+  B() : super(); // 2
+  factory B.other() = A; // 3
+}
+
+void f() {
+  A(); // 4
+  A.new; // 5
 }
 ''');
     var element = findElement.unnamedConstructor('A');
-    var main = findElement.function('main');
+    var f = findElement.function('f');
     var expected = [
-      _expectIdQ(main, SearchResultKind.REFERENCE, '();', length: 0),
-      _expectIdQ(main, SearchResultKind.REFERENCE, '.new;',
+      _expectIdQ(findElement.class_('A'), SearchResultKind.REFERENCE, '] 1',
+          length: 0),
+      _expectIdQ(findElement.unnamedConstructor('B'),
+          SearchResultKind.INVOCATION, '(); // 2',
+          length: 0),
+      _expectIdQ(findElement.constructor('other', of: 'B'),
+          SearchResultKind.REFERENCE, '; // 3',
+          length: 0),
+      _expectIdQ(f, SearchResultKind.INVOCATION, '(); // 4', length: 0),
+      _expectIdQ(
+          f, SearchResultKind.REFERENCE_BY_CONSTRUCTOR_TEAR_OFF, '.new; // 5',
           length: '.new'.length),
     ];
     await _verifyReferences(element, expected);
diff --git a/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart b/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart
index 5d2201c..7bd38c2 100644
--- a/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/unlinked_api_signature_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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/analysis/unlinked_api_signature.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -13,7 +11,6 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UnitApiSignatureTest);
-    defineReflectiveTests(UnitApiSignatureWithNullSafetyTest);
   });
 }
 
@@ -344,6 +341,30 @@
 ''');
   }
 
+  test_class_field_late_add() {
+    assertNotSameSignature(r'''
+class C {
+  int a;
+}
+''', r'''
+class C {
+  late int a;
+}
+''');
+  }
+
+  test_class_field_late_remove() {
+    assertNotSameSignature(r'''
+class C {
+  late int a;
+}
+''', r'''
+class C {
+  int a;
+}
+''');
+  }
+
   test_class_field_static_add() {
     assertNotSameSignature(r'''
 class C {
@@ -1224,6 +1245,22 @@
 ''');
   }
 
+  test_topLevelVariable_late_add() {
+    assertNotSameSignature(r'''
+int a;
+''', r'''
+late int a;
+''');
+  }
+
+  test_topLevelVariable_late_remove() {
+    assertNotSameSignature(r'''
+late int a;
+''', r'''
+int a;
+''');
+  }
+
   test_topLevelVariable_withoutType() {
     assertNotSameSignature(r'''
 var a = 1;
@@ -1288,51 +1325,3 @@
 ''');
   }
 }
-
-@reflectiveTest
-class UnitApiSignatureWithNullSafetyTest extends UnitApiSignatureTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  test_class_field_late_add() {
-    assertNotSameSignature(r'''
-class C {
-  int a;
-}
-''', r'''
-class C {
-  late int a;
-}
-''');
-  }
-
-  test_class_field_late_remove() {
-    assertNotSameSignature(r'''
-class C {
-  late int a;
-}
-''', r'''
-class C {
-  int a;
-}
-''');
-  }
-
-  test_topLevelVariable_late_add() {
-    assertNotSameSignature(r'''
-int a;
-''', r'''
-late int a;
-''');
-  }
-
-  test_topLevelVariable_late_remove() {
-    assertNotSameSignature(r'''
-late int a;
-''', r'''
-int a;
-''');
-  }
-}
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 88e81b9..b14053b 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
@@ -895,6 +895,201 @@
             isExtensionTypeDeclaration: false));
   }
 
+  void test_visitExtensionDeclarationHideClause_empty() {
+    _assertSource(
+        'extension type E on C hide B {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            hideClause:
+                AstTestFactory.hideClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationHideClause_multipleMember() {
+    _assertSource(
+        'extension type E on C hide B {var a; var b;}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            members: [
+              AstTestFactory.fieldDeclaration2(false, Keyword.VAR,
+                  [AstTestFactory.variableDeclaration('a')]),
+              AstTestFactory.fieldDeclaration2(
+                  false, Keyword.VAR, [AstTestFactory.variableDeclaration('b')])
+            ],
+            hideClause:
+                AstTestFactory.hideClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationHideClause_parameters() {
+    _assertSource(
+        'extension type E<T> on C hide B {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            typeParameters: AstTestFactory.typeParameterList(['T']),
+            extendedType: AstTestFactory.typeName4('C'),
+            hideClause:
+                AstTestFactory.hideClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationHideClause_singleMember() {
+    _assertSource(
+        'extension type E on C hide B {var a;}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            members: [
+              AstTestFactory.fieldDeclaration2(
+                  false, Keyword.VAR, [AstTestFactory.variableDeclaration('a')])
+            ],
+            hideClause:
+                AstTestFactory.hideClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_ambiguousElement() {
+    _assertSource(
+        'extension type E on C show foo {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause(
+                [AstTestFactory.showHideElement("foo")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_empty() {
+    _assertSource(
+        'extension type E on C show B {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause:
+                AstTestFactory.showClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_getterElement() {
+    _assertSource(
+        'extension type E on C show get foo {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause(
+                [AstTestFactory.showHideElementGetter("foo")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_multipleMember() {
+    _assertSource(
+        'extension type E on C show B {var a; var b;}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            members: [
+              AstTestFactory.fieldDeclaration2(false, Keyword.VAR,
+                  [AstTestFactory.variableDeclaration('a')]),
+              AstTestFactory.fieldDeclaration2(
+                  false, Keyword.VAR, [AstTestFactory.variableDeclaration('b')])
+            ],
+            showClause:
+                AstTestFactory.showClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_operatorElement() {
+    _assertSource(
+        'extension type E on C show operator * {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause(
+                [AstTestFactory.showHideElementOperator("*")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_parameters() {
+    _assertSource(
+        'extension type E<T> on C show B {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            typeParameters: AstTestFactory.typeParameterList(['T']),
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause:
+                AstTestFactory.showClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_qualifiedTypeElement() {
+    _assertSource(
+        'extension type E on C show prefix.B {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause([
+              AstTestFactory.typeName3(
+                  AstTestFactory.identifier5('prefix', 'B'))
+            ]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_setterElement() {
+    _assertSource(
+        'extension type E on C show set foo {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause(
+                [AstTestFactory.showHideElementSetter("foo")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_singleMember() {
+    _assertSource(
+        'extension type E on C show B {var a;}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            members: [
+              AstTestFactory.fieldDeclaration2(
+                  false, Keyword.VAR, [AstTestFactory.variableDeclaration('a')])
+            ],
+            showClause:
+                AstTestFactory.showClause([AstTestFactory.typeName4("B")]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowClause_typeWithArgumentsElement() {
+    _assertSource(
+        'extension type E on C show B<int, String> {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause: AstTestFactory.showClause([
+              AstTestFactory.typeName3(AstTestFactory.identifier3('B'), [
+                AstTestFactory.typeName4('int'),
+                AstTestFactory.typeName4('String')
+              ])
+            ]),
+            isExtensionTypeDeclaration: true));
+  }
+
+  void test_visitExtensionDeclarationShowHideClause_empty() {
+    _assertSource(
+        'extension type E on C show B hide foo {}',
+        AstTestFactory.extensionDeclaration(
+            name: 'E',
+            extendedType: AstTestFactory.typeName4('C'),
+            showClause:
+                AstTestFactory.showClause([AstTestFactory.typeName4("B")]),
+            hideClause: AstTestFactory.hideClause(
+                [AstTestFactory.showHideElement("foo")]),
+            isExtensionTypeDeclaration: true));
+  }
+
   void test_visitExtensionOverride_prefixedName_noTypeArgs() {
     _assertSource(
         'p.E(o)',
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 9d96e0e..81e36e0 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -25,7 +25,7 @@
     CompilationUnit unit = parseCompilationUnit(code);
     var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
     VariableDeclarationList variableList = declaration.variables;
-    Identifier typeName = (variableList.type as TypeName).name;
+    Identifier typeName = (variableList.type as NamedType).name;
     SimpleIdentifier varName = variableList.variables[0].name;
     expect(NodeLocator2(0).searchWithin(unit), same(unit));
     expect(NodeLocator2(1).searchWithin(unit), same(typeName));
@@ -46,7 +46,7 @@
     CompilationUnit unit = parseCompilationUnit(code);
     var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
     VariableDeclarationList variableList = declaration.variables;
-    Identifier typeName = (variableList.type as TypeName).name;
+    Identifier typeName = (variableList.type as NamedType).name;
     SimpleIdentifier varName = variableList.variables[0].name;
     expect(NodeLocator2(-1, 2).searchWithin(unit), isNull);
     expect(NodeLocator2(0, 2).searchWithin(unit), same(unit));
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 1db519f..9044238 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -24,6 +25,298 @@
 @reflectiveTest
 class ConstantVisitorTest extends ConstantVisitorTestSupport
     with ConstantVisitorTestCases {
+  test_identical_constructorReference_explicitTypeArgs_differentClasses() async {
+    await resolveTestCode('''
+class C<T> {}
+class D<T> {}
+const a = identical(C<int>.new, D<int>.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_constructorReference_explicitTypeArgs_differentConstructors() async {
+    await resolveTestCode('''
+class C<T> {
+  C();
+  C.named();
+}
+const a = identical(C<int>.new, C<int>.named);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_constructorReference_explicitTypeArgs_differentTypeArgs() async {
+    await resolveTestCode('''
+class C<T> {}
+const a = identical(C<int>.new, C<String>.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_constructorReference_explicitTypeArgs_sameElement() async {
+    await resolveTestCode('''
+class C<T> {}
+const a = identical(C<int>.new, C<int>.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_constructorReference_notInstantiated_differentClasses() async {
+    await resolveTestCode('''
+class C<T> {}
+class D<T> {}
+const a = identical(C.new, D.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_constructorReference_notInstantiated_differentConstructors() async {
+    await resolveTestCode('''
+class C<T> {
+  C();
+  C.named();
+}
+const a = identical(C.new, C.named);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_constructorReference_notInstantiated_sameElement() async {
+    await resolveTestCode('''
+class C<T> {}
+const a = identical(C.new, C.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_constructorReference_onlyOneHasTypeArgs() async {
+    await resolveTestCode('''
+class C<T> {}
+const a = identical(C<int>.new, C.new);
+''');
+    expect(
+      _evaluateConstant('a'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_functionReference_explicitTypeArgs_differentElements() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+void bar<T>(T a) {}
+const g = identical(foo<int>, bar<int>);
+''');
+    expect(
+      _evaluateConstant('g'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_functionReference_explicitTypeArgs_differentTypeArgs() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = identical(foo<int>, foo<String>);
+''');
+    expect(
+      _evaluateConstant('g'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_functionReference_explicitTypeArgs_onlyOneHasTypeArgs() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = identical(foo<int>, foo);
+''');
+    expect(
+      _evaluateConstant('g'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_functionReference_explicitTypeArgs_sameElement() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = identical(foo<int>, foo<int>);
+''');
+    expect(
+      _evaluateConstant('g'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_functionReference_implicitTypeArgs_differentTypes() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const void Function(int) f = foo;
+const void Function(String) g = foo;
+const c = identical(f, g);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_functionReference_implicitTypeArgs_sameTypes() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const void Function(int) f = foo;
+const void Function(int) g = foo;
+const c = identical(f, g);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_functionReference_uninstantiated_sameElement() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = identical(foo, foo);
+''');
+    expect(
+      _evaluateConstant('g'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_differentTypeArgs() async {
+    await resolveTestCode('''
+class C<T> {}
+const c = identical(C<int>, C<String>);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_differentTypes() async {
+    await resolveTestCode('''
+class C<T> {}
+class D<T> {}
+const c = identical(C<int>, D<int>);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_sameType() async {
+    await resolveTestCode('''
+class C<T> {}
+const c = identical(C<int>, C<int>);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_simpleTypeAlias() async {
+    await resolveTestCode('''
+class C<T> {}
+typedef TC = C<int>;
+const c = identical(C<int>, TC);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_typeAlias() async {
+    await resolveTestCode('''
+class C<T> {}
+typedef TC<T> = C<T>;
+const c = identical(C<int>, TC<int>);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_typeAlias_differentTypeArgs() async {
+    await resolveTestCode('''
+class C<T> {}
+typedef TC<T> = C<T>;
+const c = identical(C<int>, TC<String>);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_typeAlias_implicitTypeArgs() async {
+    await resolveTestCode('''
+class C<T> {}
+typedef TC<T> = C<T>;
+const c = identical(C<dynamic>, TC);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_explicitTypeArgs_typeAlias_implicitTypeArgs_bound() async {
+    await resolveTestCode('''
+class C<T extends num> {}
+typedef TC<T extends num> = C<T>;
+const c = identical(C<num>, TC);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
+  test_identical_typeLiteral_simple_differentTypes() async {
+    await resolveTestCode('''
+const c = identical(int, String);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(false),
+    );
+  }
+
+  test_identical_typeLiteral_simple_sameType() async {
+    await resolveTestCode('''
+const c = identical(int, int);
+''');
+    expect(
+      _evaluateConstant('c'),
+      _boolValue(true),
+    );
+  }
+
   test_visitAsExpression_potentialConstType() async {
     await assertNoErrorsInCode('''
 const num three = 3;
@@ -127,6 +420,155 @@
     expect(result.toIntValue(), 0xFF);
   }
 
+  test_visitConditionalExpression_instantiatedFunctionType_variable() async {
+    await resolveTestCode('''
+void f<T>(T p, {T? q}) {}
+
+const void Function<T>(T p) g = f;
+
+const bool b = false;
+const void Function(int p) h = b ? g : g;
+''');
+    var result = _evaluateConstant('h');
+    assertType(result.type, 'void Function(int, {int? q})');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitFunctionReference_explicitTypeArgs_complexExpression() async {
+    await resolveTestCode('''
+const b = true;
+void foo<T>(T a) {}
+void bar<T>(T a) {}
+const g = (b ? foo : bar)<int>;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('foo'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitFunctionReference_explicitTypeArgs_complexExpression_differentTypes() async {
+    await resolveTestCode('''
+const b = true;
+void foo<T>(String a, T b) {}
+void bar<T>(T a, String b) {}
+const g = (b ? foo : bar)<int>;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(String, int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('foo'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitFunctionReference_explicitTypeArgs_functionName_constantType() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+const g = f<int>;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitFunctionReference_explicitTypeArgs_functionName_notMatchingBound() async {
+    await resolveTestCode('''
+void f<T extends num>(T a) {}
+const g = f<String>;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(String)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['String']);
+  }
+
+  test_visitFunctionReference_functionName_explicitTypeArgs_notType() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = foo<true>;
+''');
+    var result = _evaluateConstantOrNull('g', errorCodes: [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
+      CompileTimeErrorCode.INVALID_CONSTANT,
+    ]);
+    expect(result, isNull);
+  }
+
+  test_visitFunctionReference_functionName_explicitTypeArgs_tooFew() async {
+    await resolveTestCode('''
+void foo<T, U>(T a, U b) {}
+const g = foo<int>;
+''');
+    var result = _evaluateConstantOrNull('g');
+    // The wrong number of arguments is reported elsewhere. Here, the result is
+    // simply `null`.
+    expect(result, isNull);
+  }
+
+  test_visitFunctionReference_functionName_explicitTypeArgs_tooMany() async {
+    await resolveTestCode('''
+void foo<T>(T a) {}
+const g = foo<int, String>;
+''');
+    var result = _evaluateConstantOrNull('g');
+    // The wrong number of arguments is reported elsewhere. Here, the result is
+    // simply `null`.
+    expect(result, isNull);
+  }
+
+  test_visitFunctionReference_functionName_explicitTypeArgs_typeParameter() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+
+class C<U> {
+  void m() {
+    static const g = f<U>;
+  }
+}
+''');
+    var result = _evaluateConstantLocal('g')!;
+    assertType(result.type, 'void Function(U)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['U']);
+  }
+
+  test_visitFunctionReference_uninstantiated_complexExpression() async {
+    await resolveTestCode('''
+const b = true;
+void foo<T>(T a) {}
+void bar<T>(T a) {}
+const g = b ? foo : bar;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function<T>(T)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('foo'));
+    _assertTypeArguments(result, null);
+  }
+
+  test_visitFunctionReference_uninstantiated_functionName() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+const g = f;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function<T>(T)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
+  test_visitPrefixedIdentifier_genericFunction_instantiated() async {
+    await resolveTestCode('''
+import '' as self;
+void f<T>(T a) {}
+const void Function(int) g = self.f;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
   test_visitSimpleIdentifier_className() async {
     await resolveTestCode('''
 const a = C;
@@ -136,6 +578,76 @@
     expect(result.type, typeProvider.typeType);
     assertType(result.toTypeValue(), 'C*');
   }
+
+  test_visitSimpleIdentifier_genericFunction_instantiated() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+const void Function(int) g = f;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
+  test_visitSimpleIdentifier_genericVariable_instantiated() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+const g = f;
+const void Function(int) h = g;
+''');
+    var result = _evaluateConstant('h');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitSimpleIdentifier_instantiatedFunctionType_field() async {
+    await resolveTestCode('''
+void f<T>(T a, {T? b}) {}
+
+class C {
+  static const void Function<T>(T a) g = f;
+  static const void Function(int a) h = g;
+}
+''');
+    var result = _evaluateConstantLocal('h')!;
+    assertType(result.type, 'void Function(int, {int? b})');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['int']);
+  }
+
+  test_visitSimpleIdentifier_instantiatedFunctionType_parameter() async {
+    await resolveTestCode('''
+void f<T>(T a, {T? b}) {}
+
+class C {
+  const C(void Function<T>(T a) g) : h = g;
+  final void Function(int a) h;
+}
+
+const c = C(f);
+''');
+    var result = _evaluateConstant('c');
+    var field = result.fields!['h']!;
+    assertType(field.type, 'void Function(int, {int? b})');
+    assertElement(field.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(field, ['int']);
+  }
+
+  test_visitSimpleIdentifier_instantiatedFunctionType_variable() async {
+    await resolveTestCode('''
+void f<T>(T a, {T? b}) {}
+
+const void Function<T>(T a) g = f;
+
+const void Function(int a) h = g;
+''');
+    var result = _evaluateConstant('h');
+    assertType(result.type, 'void Function(int, {int? b})');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, ['int']);
+  }
 }
 
 @reflectiveTest
@@ -920,6 +1432,35 @@
     expect(result.toDoubleValue(), 3.0);
   }
 
+  test_visitIsExpression_is_functionType_badTypes() async {
+    await resolveTestCode('''
+void foo(int a) {}
+const c = foo is void Function(String);
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_is_functionType_correctTypes() async {
+    await resolveTestCode('''
+void foo(int a) {}
+const c = foo is void Function(int);
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_is_functionType_nonFunction() async {
+    await resolveTestCode('''
+const c = false is void Function();
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
   test_visitIsExpression_is_instanceOfSameClass() async {
     await resolveTestCode('''
 const a = const A();
@@ -1097,6 +1638,31 @@
     expect(result.toBoolValue(), true);
   }
 
+  test_visitPrefixedIdentifier_function() async {
+    await resolveTestCode('''
+import '' as self;
+void f(int a) {}
+const g = self.f;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
+  test_visitPrefixedIdentifier_genericVariable_uninstantiated() async {
+    await resolveTestCode('''
+import '' as self;
+void f<T>(T a) {}
+const g = f;
+const h = self.g;
+''');
+    var result = _evaluateConstant('h');
+    assertType(result.type, 'void Function<T>(T)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
   test_visitPropertyAccess_fromExtension() async {
     await resolveTestCode('''
 extension ExtObject on Object {
@@ -1125,6 +1691,29 @@
     expect(result.toTypeValue(), typeProvider.dynamicType);
   }
 
+  test_visitSimpleIdentifier_function() async {
+    await resolveTestCode('''
+void f(int a) {}
+const g = f;
+''');
+    var result = _evaluateConstant('g');
+    assertType(result.type, 'void Function(int)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
+  test_visitSimpleIdentifier_genericVariable_uninstantiated() async {
+    await resolveTestCode('''
+void f<T>(T a) {}
+const g = f;
+const h = g;
+''');
+    var result = _evaluateConstant('h');
+    assertType(result.type, 'void Function<T>(T)');
+    assertElement(result.toFunctionValue(), findElement.topFunction('f'));
+    _assertTypeArguments(result, null);
+  }
+
   test_visitSimpleIdentifier_inEnvironment() async {
     await resolveTestCode(r'''
 const a = b;
@@ -1195,6 +1784,18 @@
 }
 
 class ConstantVisitorTestSupport extends PubPackageResolutionTest {
+  void _assertTypeArguments(DartObject value, List<String>? typeArgumentNames) {
+    var typeArguments = (value as DartObjectImpl).typeArguments;
+    if (typeArguments == null) {
+      expect(typeArguments, typeArgumentNames);
+      return;
+    }
+    expect(
+      typeArguments.map((arg) => arg.getDisplayString(withNullability: true)),
+      equals(typeArgumentNames),
+    );
+  }
+
   DartObjectImpl _evaluateConstant(
     String name, {
     List<ErrorCode>? errorCodes,
@@ -1209,6 +1810,21 @@
     )!;
   }
 
+  DartObjectImpl? _evaluateConstantLocal(
+    String name, {
+    List<ErrorCode>? errorCodes,
+    Map<String, String> declaredVariables = const {},
+    Map<String, DartObjectImpl>? lexicalEnvironment,
+  }) {
+    var expression = findNode.variableDeclaration(name).initializer!;
+    return _evaluateExpression(
+      expression,
+      errorCodes: errorCodes,
+      declaredVariables: declaredVariables,
+      lexicalEnvironment: lexicalEnvironment,
+    );
+  }
+
   DartObjectImpl? _evaluateConstantOrNull(
     String name, {
     List<ErrorCode>? errorCodes,
@@ -1216,7 +1832,20 @@
     Map<String, DartObjectImpl>? lexicalEnvironment,
   }) {
     var expression = findNode.topVariableDeclarationByName(name).initializer!;
+    return _evaluateExpression(
+      expression,
+      errorCodes: errorCodes,
+      declaredVariables: declaredVariables,
+      lexicalEnvironment: lexicalEnvironment,
+    );
+  }
 
+  DartObjectImpl? _evaluateExpression(
+    Expression expression, {
+    List<ErrorCode>? errorCodes,
+    Map<String, String> declaredVariables = const {},
+    Map<String, DartObjectImpl>? lexicalEnvironment,
+  }) {
     var unit = this.result.unit;
     var source = unit.declaredElement!.source;
     var errorListener = GatheringErrorListener();
@@ -1226,7 +1855,7 @@
       isNonNullableByDefault: false,
     );
 
-    DartObjectImpl? result = expression.accept(
+    var result = expression.accept(
       ConstantVisitor(
         ConstantEvaluationEngine(
           declaredVariables: DeclaredVariables.fromMap(declaredVariables),
diff --git a/pkg/analyzer/test/src/dart/constant/has_type_parameter_reference_test.dart b/pkg/analyzer/test/src/dart/constant/has_type_parameter_reference_test.dart
index bc0be60..8d2e5cd 100644
--- a/pkg/analyzer/test/src/dart/constant/has_type_parameter_reference_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/has_type_parameter_reference_test.dart
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class HasTypeParameterReferenceTest extends AbstractTypeSystemNullSafetyTest {
+class HasTypeParameterReferenceTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _checkFalse(dynamicNone);
   }
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 e3aaab4..0d881c1 100644
--- a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
@@ -13,7 +13,6 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(IsConstantTypeExpressionTest);
     defineReflectiveTests(PotentiallyConstantTest);
-    defineReflectiveTests(PotentiallyConstantWithoutNullSafetyTest);
   });
 }
 
@@ -216,6 +215,18 @@
 ''', () => _xInitializer());
   }
 
+  test_asExpression_typeParameter_29() async {
+    await _assertNotConst(r'''
+// @dart = 2.9
+const a = 0;
+class A<T> {
+  m() {
+    var x = a as T;
+  }
+}
+''', () => _xInitializer(), () => [findNode.namedType('T;')]);
+  }
+
   test_asExpression_typeParameter_nested() async {
     await _assertConst(r'''
 const a = 0;
@@ -518,6 +529,18 @@
 ''', () => _xInitializer());
   }
 
+  test_isExpression_typeParameter_29() async {
+    await _assertNotConst(r'''
+// @dart = 2.9
+const a = 0;
+class A<T> {
+  m() {
+    var x = a is T;
+  }
+}
+''', () => _xInitializer(), () => [findNode.namedType('T;')]);
+  }
+
   test_isExpression_typeParameter_nested() async {
     await _assertConst(r'''
 const a = 0;
@@ -563,7 +586,7 @@
     var x = const <T>[0, 1, 2];
   }
 }
-''', () => _xInitializer(), () => [findNode.typeName('T>[0')]);
+''', () => _xInitializer(), () => [findNode.namedType('T>[0')]);
   }
 
   test_literal_bool() async {
@@ -646,7 +669,7 @@
   }
 }
 ''', () => _xInitializer(),
-        () => [findNode.typeName('T,'), findNode.typeName('T>{')]);
+        () => [findNode.namedType('T,'), findNode.namedType('T>{')]);
   }
 
   test_methodInvocation_identical() async {
@@ -978,7 +1001,7 @@
     var x = const <T>{0, 1, 2};
   }
 }
-''', () => _xInitializer(), () => [findNode.typeName('T>{0')]);
+''', () => _xInitializer(), () => [findNode.namedType('T>{0')]);
   }
 
   test_simpleIdentifier_class() async {
@@ -1097,6 +1120,25 @@
 ''', () => _xInitializer());
   }
 
+  test_simpleIdentifier_typeParameter_class() async {
+    await _assertConst(r'''
+class A<T> {
+  final Object f;
+  A() : f = T;
+}
+''', () => findNode.simple('T;'));
+  }
+
+  test_simpleIdentifier_typeParameter_class_214() async {
+    await _assertNotConst(r'''
+// @dart = 2.14
+class A<T> {
+  final Object f;
+  A() : f = T;
+}
+''', () => findNode.simple('T;'), () => [findNode.simple('T;')]);
+  }
+
   test_spreadElement() async {
     await _assertConst(r'''
 const a = [0, 1, 2];
@@ -1140,7 +1182,7 @@
     var node = getNode();
     var notConstList = getNotPotentiallyConstants(
       node,
-      isNonNullableByDefault: typeSystem.isNonNullableByDefault,
+      featureSet: featureSet,
     );
     expect(notConstList, isEmpty);
   }
@@ -1151,50 +1193,7 @@
     var node = getNode();
     var notConstList = getNotPotentiallyConstants(
       node,
-      isNonNullableByDefault: typeSystem.isNonNullableByDefault,
-    );
-
-    var expectedNotConst = getNotConstList();
-    expect(notConstList, unorderedEquals(expectedNotConst));
-  }
-
-  Expression _xInitializer() {
-    return findNode.variableDeclaration('x = ').initializer!;
-  }
-}
-
-@reflectiveTest
-class PotentiallyConstantWithoutNullSafetyTest extends PubPackageResolutionTest
-    with WithoutNullSafetyMixin {
-  test_asExpression_typeParameter() async {
-    await _assertNotConst(r'''
-const a = 0;
-class A<T> {
-  m() {
-    var x = a as T;
-  }
-}
-''', () => _xInitializer(), () => [findNode.typeName('T;')]);
-  }
-
-  test_isExpression_typeParameter() async {
-    await _assertNotConst(r'''
-const a = 0;
-class A<T> {
-  m() {
-    var x = a is T;
-  }
-}
-''', () => _xInitializer(), () => [findNode.typeName('T;')]);
-  }
-
-  _assertNotConst(String code, AstNode Function() getNode,
-      List<AstNode> Function() getNotConstList) async {
-    await resolveTestCode(code);
-    var node = getNode();
-    var notConstList = getNotPotentiallyConstants(
-      node,
-      isNonNullableByDefault: typeSystem.isNonNullableByDefault,
+      featureSet: featureSet,
     );
 
     var expectedNotConst = getNotConstList();
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
index 92b5d6e..906c7e0 100644
--- a/pkg/analyzer/test/src/dart/constant/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -12,7 +12,6 @@
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
diff --git a/pkg/analyzer/test/src/dart/constant/value_test.dart b/pkg/analyzer/test/src/dart/constant/value_test.dart
index aad7d69..232d0f1 100644
--- a/pkg/analyzer/test/src/dart/constant/value_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/value_test.dart
@@ -1361,6 +1361,22 @@
     _assertLazyOr(_boolValue(true), _boolValue(true), _boolValue(true));
   }
 
+  void test_logicalShiftRight_knownInt_knownInt() {
+    _assertLogicalShiftRight(_intValue(16), _intValue(64), _intValue(2));
+  }
+
+  void test_logicalShiftRight_knownInt_unknownInt() {
+    _assertLogicalShiftRight(_intValue(null), _intValue(64), _intValue(null));
+  }
+
+  void test_logicalShiftRight_unknownInt_knownInt() {
+    _assertLogicalShiftRight(_intValue(null), _intValue(null), _intValue(2));
+  }
+
+  void test_logicalShiftRight_unknownInt_unknownInt() {
+    _assertLogicalShiftRight(_intValue(null), _intValue(null), _intValue(null));
+  }
+
   void test_minus_knownDouble_knownDouble() {
     _assertMinus(_doubleValue(1.0), _doubleValue(4.0), _doubleValue(3.0));
   }
@@ -1728,6 +1744,20 @@
     _assertTimes(_intValue(null), _intValue(null), _intValue(3));
   }
 
+  /// Assert that the result of executing [fn] is the [expected] value, or, if
+  /// [expected] is `null`, that the operation throws an exception .
+  void _assert(DartObjectImpl? expected, DartObjectImpl? Function() fn) {
+    if (expected == null) {
+      expect(() {
+        fn();
+      }, throwsEvaluationException);
+    } else {
+      var result = fn();
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
   /// Assert that the result of adding the [left] and [right] operands is the
   /// [expected] value, or that the operation throws an exception if the
   /// expected value is `null`.
@@ -1993,6 +2023,14 @@
     }
   }
 
+  /// Assert that the result of bit-shifting the [left] operand by the [right]
+  /// operand number of bits is the [expected] value, or that the operation
+  /// throws an exception if the expected value is `null`.
+  void _assertLogicalShiftRight(
+      DartObjectImpl? expected, DartObjectImpl left, DartObjectImpl right) {
+    _assert(expected, () => left.logicalShiftRight(_typeSystem, right));
+  }
+
   /// Assert that the result of subtracting the [left] and [right] operands is
   /// the [expected] value, or that the operation throws an exception if the
   /// expected value is `null`.
@@ -2059,15 +2097,7 @@
   /// exception if the expected value is `null`.
   void _assertRemainder(
       DartObjectImpl? expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.remainder(_typeSystem, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.remainder(_typeSystem, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
+    _assert(expected, () => left.remainder(_typeSystem, right));
   }
 
   /// Assert that the result of multiplying the [left] and [right] operands is
@@ -2075,15 +2105,7 @@
   /// expected value is `null`.
   void _assertShiftLeft(
       DartObjectImpl? expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.shiftLeft(_typeSystem, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.shiftLeft(_typeSystem, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
+    _assert(expected, () => left.shiftLeft(_typeSystem, right));
   }
 
   /// Assert that the result of multiplying the [left] and [right] operands is
@@ -2091,15 +2113,7 @@
   /// expected value is `null`.
   void _assertShiftRight(
       DartObjectImpl? expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.shiftRight(_typeSystem, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.shiftRight(_typeSystem, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
+    _assert(expected, () => left.shiftRight(_typeSystem, right));
   }
 
   /// Assert that the length of the [operand] is the [expected] value, or that
@@ -2121,15 +2135,7 @@
   /// expected value is `null`.
   void _assertTimes(
       DartObjectImpl? expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.times(_typeSystem, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.times(_typeSystem, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
+    _assert(expected, () => left.times(_typeSystem, right));
   }
 
   DartObjectImpl _boolValue(bool? value) {
diff --git a/pkg/analyzer/test/src/dart/element/class_hierarchy_test.dart b/pkg/analyzer/test/src/dart/element/class_hierarchy_test.dart
index 2dd1c49..a6ab0bc 100644
--- a/pkg/analyzer/test/src/dart/element/class_hierarchy_test.dart
+++ b/pkg/analyzer/test/src/dart/element/class_hierarchy_test.dart
@@ -15,38 +15,13 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ClassHierarchyLegacyTest);
-    defineReflectiveTests(ClassHierarchyNullSafetyTest);
+    defineReflectiveTests(ClassHierarchyTest);
+    defineReflectiveTests(ClassHierarchyWithoutNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ClassHierarchyLegacyTest extends AbstractTypeSystemTest
-    with _AbstractClassHierarchyMixin {
-  @override
-  void setUp() {
-    super.setUp();
-    _createSharedElements();
-  }
-
-  test_invalid() {
-    _checkA(
-      typeArguments: [intNone, doubleNone],
-      interfaces: ['A<int*>'],
-      errors: ['A<int*> vs. A<double*>'],
-    );
-  }
-
-  test_valid() {
-    _checkA(
-      typeArguments: [intNone, intQuestion],
-      interfaces: ['A<int*>'],
-    );
-  }
-}
-
-@reflectiveTest
-class ClassHierarchyNullSafetyTest extends AbstractTypeSystemNullSafetyTest
+class ClassHierarchyTest extends AbstractTypeSystemTest
     with _AbstractClassHierarchyMixin {
   @override
   void setUp() {
@@ -84,6 +59,32 @@
   }
 }
 
+@reflectiveTest
+class ClassHierarchyWithoutNullSafetyTest
+    extends AbstractTypeSystemWithoutNullSafetyTest
+    with _AbstractClassHierarchyMixin {
+  @override
+  void setUp() {
+    super.setUp();
+    _createSharedElements();
+  }
+
+  test_invalid() {
+    _checkA(
+      typeArguments: [intNone, doubleNone],
+      interfaces: ['A<int*>'],
+      errors: ['A<int*> vs. A<double*>'],
+    );
+  }
+
+  test_valid() {
+    _checkA(
+      typeArguments: [intNone, intQuestion],
+      interfaces: ['A<int*>'],
+    );
+  }
+}
+
 mixin _AbstractClassHierarchyMixin on ElementsTypesMixin {
   late ClassElementImpl A;
 
diff --git a/pkg/analyzer/test/src/dart/element/display_string_test.dart b/pkg/analyzer/test/src/dart/element/display_string_test.dart
index e5f4644..838d3c2 100644
--- a/pkg/analyzer/test/src/dart/element/display_string_test.dart
+++ b/pkg/analyzer/test/src/dart/element/display_string_test.dart
@@ -2,14 +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/element/type_provider.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
-import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,30 +14,7 @@
 }
 
 @reflectiveTest
-class ElementDisplayStringTest with ElementsTypesMixin {
-  late final TestAnalysisContext _analysisContext;
-
-  @override
-  late final LibraryElementImpl testLibrary;
-
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  void setUp() {
-    _analysisContext = TestAnalysisContext();
-    typeProvider = _analysisContext.typeProviderLegacy;
-    typeSystem = _analysisContext.typeSystemLegacy;
-
-    testLibrary = library_(
-      uriStr: 'package:test/test.dart',
-      analysisContext: _analysisContext,
-      analysisSession: _analysisContext.analysisSession,
-      typeSystem: typeSystem,
-    );
-  }
-
+class ElementDisplayStringTest extends AbstractTypeSystemTest {
   void test_longMethod() {
     final methodA = method(
       'longMethodName',
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index ad6cf9b..0ac00a2 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -9,18 +9,16 @@
 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/type.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
 import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 import '../resolution/context_collection_resolution.dart';
 
 main() {
@@ -41,33 +39,8 @@
   });
 }
 
-class AbstractTypeTest with ElementsTypesMixin {
-  late final TestAnalysisContext _analysisContext;
-
-  @override
-  late final LibraryElementImpl testLibrary;
-
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  void setUp() {
-    _analysisContext = TestAnalysisContext();
-    typeProvider = _analysisContext.typeProviderLegacy;
-    typeSystem = _analysisContext.typeSystemLegacy;
-
-    testLibrary = library_(
-      uriStr: 'package:test/test.dart',
-      analysisContext: _analysisContext,
-      analysisSession: _analysisContext.analysisSession,
-      typeSystem: typeSystem,
-    );
-  }
-}
-
 @reflectiveTest
-class ClassElementImplTest extends AbstractTypeTest {
+class ClassElementImplTest extends AbstractTypeSystemTest {
   void test_getField() {
     var classA = class_(name: 'A');
     String fieldName = "f";
@@ -488,7 +461,7 @@
   }
 
   LibraryElementImpl _newLibrary() =>
-      ElementFactory.library(_analysisContext, 'lib');
+      ElementFactory.library(analysisContext, 'lib');
 }
 
 @reflectiveTest
@@ -539,10 +512,9 @@
 }
 
 @reflectiveTest
-class ElementImplTest extends AbstractTypeTest {
+class ElementImplTest extends AbstractTypeSystemTest {
   void test_equals() {
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     ClassElementImpl classElement = ElementFactory.classElement2("C");
     (library.definingCompilationUnit as CompilationUnitElementImpl).classes =
         <ClassElement>[classElement];
@@ -567,18 +539,17 @@
 
   void test_isAccessibleIn_private_differentLibrary() {
     LibraryElementImpl library1 =
-        ElementFactory.library(_analysisContext, "lib1");
+        ElementFactory.library(analysisContext, "lib1");
     ClassElement classElement = ElementFactory.classElement2("_C");
     (library1.definingCompilationUnit as CompilationUnitElementImpl).classes =
         <ClassElement>[classElement];
     LibraryElementImpl library2 =
-        ElementFactory.library(_analysisContext, "lib2");
+        ElementFactory.library(analysisContext, "lib2");
     expect(classElement.isAccessibleIn(library2), isFalse);
   }
 
   void test_isAccessibleIn_private_sameLibrary() {
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     ClassElement classElement = ElementFactory.classElement2("_C");
     (library.definingCompilationUnit as CompilationUnitElementImpl).classes =
         <ClassElement>[classElement];
@@ -587,18 +558,17 @@
 
   void test_isAccessibleIn_public_differentLibrary() {
     LibraryElementImpl library1 =
-        ElementFactory.library(_analysisContext, "lib1");
+        ElementFactory.library(analysisContext, "lib1");
     ClassElement classElement = ElementFactory.classElement2("C");
     (library1.definingCompilationUnit as CompilationUnitElementImpl).classes =
         <ClassElement>[classElement];
     LibraryElementImpl library2 =
-        ElementFactory.library(_analysisContext, "lib2");
+        ElementFactory.library(analysisContext, "lib2");
     expect(classElement.isAccessibleIn(library2), isTrue);
   }
 
   void test_isAccessibleIn_public_sameLibrary() {
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     ClassElement classElement = ElementFactory.classElement2("C");
     (library.definingCompilationUnit as CompilationUnitElementImpl).classes =
         <ClassElement>[classElement];
@@ -729,7 +699,7 @@
 }
 
 @reflectiveTest
-class FunctionTypeImplTest extends AbstractTypeTest {
+class FunctionTypeImplTest extends AbstractTypeSystemTest {
   void assertType(DartType type, String expected) {
     var typeStr = type.getDisplayString(withNullability: false);
     expect(typeStr, expected);
@@ -866,7 +836,7 @@
 }
 
 @reflectiveTest
-class InterfaceTypeImplTest extends AbstractTypeTest {
+class InterfaceTypeImplTest extends AbstractTypeSystemTest {
   void test_allSupertypes() {
     void check(InterfaceType type, List<String> expected) {
       var actual = type.allSupertypes.map((e) {
@@ -1310,8 +1280,7 @@
         ElementFactory.getterElement(getterName, false, intNone);
     classA.accessors = <PropertyAccessorElement>[getterG];
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpGetter(getterName, library), same(getterG));
@@ -1331,8 +1300,7 @@
     ClassElementImpl classB =
         ElementFactory.classElement("B", interfaceTypeStar(classA));
     InterfaceType typeB = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1366,8 +1334,7 @@
       interfaceTypeStar(classM1),
       interfaceTypeStar(classM2)
     ];
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     var unit = library.definingCompilationUnit as CompilationUnitElementImpl;
     unit.classes = <ClassElement>[classB, classM1, classM2, classC];
     expect(
@@ -1384,8 +1351,7 @@
     InterfaceType typeA = interfaceTypeStar(classA);
     var classB = ElementFactory.classElement("B", typeA);
     classA.supertype = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1401,8 +1367,7 @@
     //
     var classA = class_(name: 'A');
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpGetter("g", library), isNull);
@@ -1419,8 +1384,7 @@
         ElementFactory.methodElement(methodName, intNone);
     classA.methods = <MethodElement>[methodM];
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpMethod(methodName, library), same(methodM));
@@ -1440,8 +1404,7 @@
     ClassElementImpl classB =
         ElementFactory.classElement("B", interfaceTypeStar(classA));
     InterfaceType typeB = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1474,8 +1437,7 @@
       interfaceTypeStar(classM1),
       interfaceTypeStar(classM2)
     ];
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     var unit = library.definingCompilationUnit as CompilationUnitElementImpl;
     unit.classes = <ClassElement>[classB, classM1, classM2, classC];
     expect(
@@ -1505,8 +1467,7 @@
         typeParameterTypeStar(F),
       ]),
     );
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[A];
     //
@@ -1533,8 +1494,7 @@
     InterfaceType typeA = interfaceTypeStar(classA);
     var classB = ElementFactory.classElement("B", typeA);
     classA.supertype = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1550,8 +1510,7 @@
     //
     var classA = class_(name: 'A');
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpMethod("m", library), isNull);
@@ -1568,8 +1527,7 @@
         ElementFactory.setterElement(setterName, false, intNone);
     classA.accessors = <PropertyAccessorElement>[setterS];
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpSetter(setterName, library), same(setterS));
@@ -1589,8 +1547,7 @@
     ClassElementImpl classB =
         ElementFactory.classElement("B", interfaceTypeStar(classA));
     InterfaceType typeB = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1624,8 +1581,7 @@
       interfaceTypeStar(classM1),
       interfaceTypeStar(classM2)
     ];
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     var unit = library.definingCompilationUnit as CompilationUnitElementImpl;
     unit.classes = <ClassElement>[classB, classM1, classM2, classC];
     expect(
@@ -1642,8 +1598,7 @@
     InterfaceType typeA = interfaceTypeStar(classA);
     var classB = ElementFactory.classElement("B", typeA);
     classA.supertype = interfaceTypeStar(classB);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[
       classA,
@@ -1659,8 +1614,7 @@
     //
     var classA = class_(name: 'A');
     InterfaceType typeA = interfaceTypeStar(classA);
-    LibraryElementImpl library =
-        ElementFactory.library(_analysisContext, "lib");
+    LibraryElementImpl library = ElementFactory.library(analysisContext, "lib");
     CompilationUnitElement unit = library.definingCompilationUnit;
     (unit as CompilationUnitElementImpl).classes = <ClassElement>[classA];
     expect(typeA.lookUpSetter("s", library), isNull);
@@ -1779,7 +1733,7 @@
 }
 
 @reflectiveTest
-class TypeParameterTypeImplTest extends AbstractTypeTest {
+class TypeParameterTypeImplTest extends AbstractTypeSystemTest {
   void test_asInstanceOf_hasBound_element() {
     var T = typeParameter('T', bound: listNone(intNone));
     _assert_asInstanceOf(
@@ -2016,7 +1970,7 @@
 }
 
 @reflectiveTest
-class VoidTypeImplTest extends AbstractTypeTest {
+class VoidTypeImplTest extends AbstractTypeSystemTest {
   /// Reference {code VoidTypeImpl.getInstance()}.
   final DartType _voidType = VoidTypeImpl.instance;
 
diff --git a/pkg/analyzer/test/src/dart/element/factor_type_test.dart b/pkg/analyzer/test/src/dart/element/factor_type_test.dart
index 240c5bf..a67d57e 100644
--- a/pkg/analyzer/test/src/dart/element/factor_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/factor_type_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:_fe_analyzer_shared/src/flow_analysis/factory_type_test_helper.dart';
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -27,12 +26,6 @@
 
   late final TypeSystemImpl typeSystem;
 
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
   @override
   DartType get voidType => typeProvider.voidType;
 
@@ -48,9 +41,7 @@
   }
 
   void setUp() {
-    var analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
+    var analysisContext = TestAnalysisContext();
     typeProvider = analysisContext.typeProviderNonNullableByDefault;
     typeSystem = analysisContext.typeSystemNonNullableByDefault;
   }
diff --git a/pkg/analyzer/test/src/dart/element/flatten_type_test.dart b/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
index 105e799..fa4fbd57 100644
--- a/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
@@ -2,16 +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/element/type.dart';
-import 'package:analyzer/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:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
-import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,26 +16,7 @@
 }
 
 @reflectiveTest
-class FlattenTypeTest with ElementsTypesMixin {
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
-  void setUp() {
-    var analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
-    typeProvider = analysisContext.typeProviderNonNullableByDefault;
-    typeSystem = analysisContext.typeSystemNonNullableByDefault;
-  }
-
+class FlattenTypeTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _check(dynamicNone, 'dynamic');
   }
@@ -53,6 +30,11 @@
     _check(futureOrNone(intNone), 'int');
     _check(futureOrNone(intQuestion), 'int?');
     _check(futureOrNone(intStar), 'int*');
+
+    var A = class_(name: 'A', interfaces: [
+      futureNone(intNone),
+    ]);
+    _check(interfaceTypeNone(A), 'int');
   }
 
   test_interfaceType_question() {
@@ -83,6 +65,23 @@
     _check(futureOrStar(intStar), 'int*');
   }
 
+  test_typeParameterType_none() {
+    _check(
+      typeParameterTypeNone(
+        typeParameter('T', bound: futureNone(intNone)),
+      ),
+      'int',
+    );
+
+    _check(
+      typeParameterTypeNone(
+        typeParameter('T'),
+        promotedBound: futureNone(intNone),
+      ),
+      'int',
+    );
+  }
+
   test_unknownInferredType() {
     var type = UnknownInferredType.instance;
     expect(typeSystem.flatten(type), same(type));
diff --git a/pkg/analyzer/test/src/dart/element/function_type_test.dart b/pkg/analyzer/test/src/dart/element/function_type_test.dart
index 79cf038..a685819 100644
--- a/pkg/analyzer/test/src/dart/element/function_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/function_type_test.dart
@@ -5,13 +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_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 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(() {
@@ -24,10 +22,7 @@
 VoidTypeImpl get voidType => VoidTypeImpl.instance;
 
 @reflectiveTest
-class FunctionTypeTest with ElementsTypesMixin {
-  @override
-  final TypeProvider typeProvider = TestTypeProvider();
-
+class FunctionTypeTest extends AbstractTypeSystemTest {
   InterfaceType get intType => typeProvider.intType;
 
   ClassElement get listElement => typeProvider.listElement;
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
index c70b702..a777618 100644
--- a/pkg/analyzer/test/src/dart/element/future_or_base_test.dart
+++ b/pkg/analyzer/test/src/dart/element/future_or_base_test.dart
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class FutureOrBaseTest extends AbstractTypeSystemNullSafetyTest {
+class FutureOrBaseTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _check(dynamicNone, 'dynamic');
   }
diff --git a/pkg/analyzer/test/src/dart/element/future_value_type_test.dart b/pkg/analyzer/test/src/dart/element/future_value_type_test.dart
index 6c789e7..fc9fe60 100644
--- a/pkg/analyzer/test/src/dart/element/future_value_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/future_value_type_test.dart
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class FutureValueTypeTest extends AbstractTypeSystemNullSafetyTest {
+class FutureValueTypeTest extends AbstractTypeSystemTest {
   /// futureValueType(`dynamic`) = `dynamic`.
   test_dynamic() {
     _check(dynamicNone, 'dynamic');
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 7933c6f..853eb50 100644
--- a/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart
+++ b/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart
@@ -24,7 +24,7 @@
 }
 
 @reflectiveTest
-class GenericFunctionInferenceTest extends AbstractTypeSystemNullSafetyTest {
+class GenericFunctionInferenceTest extends AbstractTypeSystemTest {
   void test_boundedByAnotherTypeParameter() {
     // <TFrom, TTo extends Iterable<TFrom>>(TFrom) -> TTo
     var tFrom = typeParameter('TFrom');
diff --git a/pkg/analyzer/test/src/dart/element/least_greatest_closure_test.dart b/pkg/analyzer/test/src/dart/element/least_greatest_closure_test.dart
index 8c1a570..1e0d20f 100644
--- a/pkg/analyzer/test/src/dart/element/least_greatest_closure_test.dart
+++ b/pkg/analyzer/test/src/dart/element/least_greatest_closure_test.dart
@@ -11,137 +11,13 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(GreatestClosureLegacyTest);
-    defineReflectiveTests(GreatestClosureNullSafetyTest);
+    defineReflectiveTests(GreatestClosureTest);
+    defineReflectiveTests(GreatestClosureWithoutNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class GreatestClosureLegacyTest extends AbstractTypeSystemTest {
-  late final TypeParameterElement T;
-  late final TypeParameterType T_none;
-  late final TypeParameterType T_question;
-  late final TypeParameterType T_star;
-
-  @override
-  void setUp() {
-    super.setUp();
-
-    T = typeParameter('T');
-    T_none = typeParameterTypeNone(T);
-    T_question = typeParameterTypeQuestion(T);
-    T_star = typeParameterTypeStar(T);
-  }
-
-  test_contravariant() {
-    _check(
-      functionTypeStar(returnType: voidNone, parameters: [
-        requiredParameter(type: T_star),
-      ]),
-      greatest: 'void Function(Null*)*',
-      least: 'void Function(dynamic)*',
-    );
-
-    _check(
-      functionTypeStar(
-        returnType: functionTypeStar(
-          returnType: voidNone,
-          parameters: [
-            requiredParameter(type: T_star),
-          ],
-        ),
-      ),
-      greatest: 'void Function(Null*)* Function()*',
-      least: 'void Function(dynamic)* Function()*',
-    );
-  }
-
-  test_covariant() {
-    _check(T_star, greatest: 'dynamic', least: 'Null*');
-
-    _check(
-      listStar(T_star),
-      greatest: 'List<dynamic>*',
-      least: 'List<Null*>*',
-    );
-
-    _check(
-      functionTypeStar(returnType: voidNone, parameters: [
-        requiredParameter(
-          type: functionTypeStar(returnType: intStar, parameters: [
-            requiredParameter(type: T_star),
-          ]),
-        ),
-      ]),
-      greatest: 'void Function(int* Function(dynamic)*)*',
-      least: 'void Function(int* Function(Null*)*)*',
-    );
-  }
-
-  test_function() {
-    // void Function<U extends T>()
-    _check(
-      functionTypeStar(
-        typeFormals: [
-          typeParameter('U', bound: T_star),
-        ],
-        returnType: voidNone,
-      ),
-      greatest: 'Function*',
-      least: 'Null*',
-    );
-  }
-
-  test_unrelated() {
-    _check1(intStar, 'int*');
-    _check1(listStar(intStar), 'List<int*>*');
-
-    _check1(objectStar, 'Object*');
-    _check1(neverStar, 'Never*');
-    _check1(nullStar, 'Null*');
-
-    _check1(dynamicNone, 'dynamic');
-
-    _check1(
-      functionTypeStar(returnType: stringStar, parameters: [
-        requiredParameter(type: intStar),
-      ]),
-      'String* Function(int*)*',
-    );
-
-    _check1(
-      typeParameterTypeStar(
-        typeParameter('U'),
-      ),
-      'U*',
-    );
-  }
-
-  void _check(
-    DartType type, {
-    required String greatest,
-    required String least,
-  }) {
-    var greatestResult = typeSystem.greatestClosure(type, [T]);
-    expect(
-      greatestResult.getDisplayString(withNullability: true),
-      greatest,
-    );
-
-    var leastResult = typeSystem.leastClosure(type, [T]);
-    expect(
-      leastResult.getDisplayString(withNullability: true),
-      least,
-    );
-  }
-
-  void _check1(DartType type, String expected) {
-    _check(type, greatest: expected, least: expected);
-  }
-}
-
-@reflectiveTest
-class GreatestClosureNullSafetyTest extends AbstractTypeSystemNullSafetyTest {
+class GreatestClosureTest extends AbstractTypeSystemTest {
   late final TypeParameterElement T;
   late final TypeParameterType T_none;
   late final TypeParameterType T_question;
@@ -272,3 +148,128 @@
     _check(type, greatest: expected, least: expected);
   }
 }
+
+@reflectiveTest
+class GreatestClosureWithoutNullSafetyTest
+    extends AbstractTypeSystemWithoutNullSafetyTest {
+  late final TypeParameterElement T;
+  late final TypeParameterType T_none;
+  late final TypeParameterType T_question;
+  late final TypeParameterType T_star;
+
+  @override
+  void setUp() {
+    super.setUp();
+
+    T = typeParameter('T');
+    T_none = typeParameterTypeNone(T);
+    T_question = typeParameterTypeQuestion(T);
+    T_star = typeParameterTypeStar(T);
+  }
+
+  test_contravariant() {
+    _check(
+      functionTypeStar(returnType: voidNone, parameters: [
+        requiredParameter(type: T_star),
+      ]),
+      greatest: 'void Function(Null*)*',
+      least: 'void Function(dynamic)*',
+    );
+
+    _check(
+      functionTypeStar(
+        returnType: functionTypeStar(
+          returnType: voidNone,
+          parameters: [
+            requiredParameter(type: T_star),
+          ],
+        ),
+      ),
+      greatest: 'void Function(Null*)* Function()*',
+      least: 'void Function(dynamic)* Function()*',
+    );
+  }
+
+  test_covariant() {
+    _check(T_star, greatest: 'dynamic', least: 'Null*');
+
+    _check(
+      listStar(T_star),
+      greatest: 'List<dynamic>*',
+      least: 'List<Null*>*',
+    );
+
+    _check(
+      functionTypeStar(returnType: voidNone, parameters: [
+        requiredParameter(
+          type: functionTypeStar(returnType: intStar, parameters: [
+            requiredParameter(type: T_star),
+          ]),
+        ),
+      ]),
+      greatest: 'void Function(int* Function(dynamic)*)*',
+      least: 'void Function(int* Function(Null*)*)*',
+    );
+  }
+
+  test_function() {
+    // void Function<U extends T>()
+    _check(
+      functionTypeStar(
+        typeFormals: [
+          typeParameter('U', bound: T_star),
+        ],
+        returnType: voidNone,
+      ),
+      greatest: 'Function*',
+      least: 'Null*',
+    );
+  }
+
+  test_unrelated() {
+    _check1(intStar, 'int*');
+    _check1(listStar(intStar), 'List<int*>*');
+
+    _check1(objectStar, 'Object*');
+    _check1(neverStar, 'Never*');
+    _check1(nullStar, 'Null*');
+
+    _check1(dynamicNone, 'dynamic');
+
+    _check1(
+      functionTypeStar(returnType: stringStar, parameters: [
+        requiredParameter(type: intStar),
+      ]),
+      'String* Function(int*)*',
+    );
+
+    _check1(
+      typeParameterTypeStar(
+        typeParameter('U'),
+      ),
+      'U*',
+    );
+  }
+
+  void _check(
+    DartType type, {
+    required String greatest,
+    required String least,
+  }) {
+    var greatestResult = typeSystem.greatestClosure(type, [T]);
+    expect(
+      greatestResult.getDisplayString(withNullability: true),
+      greatest,
+    );
+
+    var leastResult = typeSystem.leastClosure(type, [T]);
+    expect(
+      leastResult.getDisplayString(withNullability: true),
+      least,
+    );
+  }
+
+  void _check1(DartType type, String expected) {
+    _check(type, greatest: expected, least: expected);
+  }
+}
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 f99b5a0..bb73cc4c 100644
--- a/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
@@ -2,19 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-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/dart/element/type_visitor.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
-import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -23,26 +19,7 @@
 }
 
 @reflectiveTest
-class NormalizeTypeTest with ElementsTypesMixin {
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
-  void setUp() {
-    var analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
-    typeProvider = analysisContext.typeProviderNonNullableByDefault;
-    typeSystem = analysisContext.typeSystemNonNullableByDefault;
-  }
-
+class NormalizeTypeTest extends AbstractTypeSystemTest {
   test_functionType_parameter() {
     _check(
       functionTypeNone(
diff --git a/pkg/analyzer/test/src/dart/element/nullability_eliminator_test.dart b/pkg/analyzer/test/src/dart/element/nullability_eliminator_test.dart
index ff5c8f9..4471b73 100644
--- a/pkg/analyzer/test/src/dart/element/nullability_eliminator_test.dart
+++ b/pkg/analyzer/test/src/dart/element/nullability_eliminator_test.dart
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class NullabilityEliminatorTest extends AbstractTypeSystemNullSafetyTest {
+class NullabilityEliminatorTest extends AbstractTypeSystemTest {
   test_dynamicType() {
     _verifySame(typeProvider.dynamicType);
   }
diff --git a/pkg/analyzer/test/src/dart/element/nullable_test.dart b/pkg/analyzer/test/src/dart/element/nullable_test.dart
index 1bfb595..92f4950 100644
--- a/pkg/analyzer/test/src/dart/element/nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/element/nullable_test.dart
@@ -23,7 +23,7 @@
 }
 
 @reflectiveTest
-class IsNonNullableTest extends AbstractTypeSystemNullSafetyTest {
+class IsNonNullableTest extends AbstractTypeSystemTest {
   void isNonNullable(DartType type) {
     expect(typeSystem.isNonNullable(type), isTrue);
   }
@@ -188,7 +188,7 @@
 }
 
 @reflectiveTest
-class IsNullableTest extends AbstractTypeSystemNullSafetyTest {
+class IsNullableTest extends AbstractTypeSystemTest {
   void isNotNullable(DartType type) {
     expect(typeSystem.isNullable(type), isFalse);
   }
@@ -353,7 +353,7 @@
 }
 
 @reflectiveTest
-class IsPotentiallyNonNullableTest extends AbstractTypeSystemNullSafetyTest {
+class IsPotentiallyNonNullableTest extends AbstractTypeSystemTest {
   void isNotPotentiallyNonNullable(DartType type) {
     expect(typeSystem.isPotentiallyNonNullable(type), isFalse);
   }
@@ -400,7 +400,7 @@
 }
 
 @reflectiveTest
-class IsPotentiallyNullableTest extends AbstractTypeSystemNullSafetyTest {
+class IsPotentiallyNullableTest extends AbstractTypeSystemTest {
   void isNotPotentiallyNullable(DartType type) {
     expect(typeSystem.isPotentiallyNullable(type), isFalse);
   }
@@ -447,7 +447,7 @@
 }
 
 @reflectiveTest
-class IsStrictlyNonNullableTest extends AbstractTypeSystemNullSafetyTest {
+class IsStrictlyNonNullableTest extends AbstractTypeSystemTest {
   void isNotStrictlyNonNullable(DartType type) {
     expect(typeSystem.isStrictlyNonNullable(type), isFalse);
   }
@@ -594,7 +594,7 @@
 }
 
 @reflectiveTest
-class PromoteToNonNullTest extends AbstractTypeSystemNullSafetyTest {
+class PromoteToNonNullTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _check(dynamicType, dynamicType);
   }
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
index 54a3fd6..af99f15 100644
--- a/pkg/analyzer/test/src/dart/element/replace_top_bottom_test.dart
+++ b/pkg/analyzer/test/src/dart/element/replace_top_bottom_test.dart
@@ -12,72 +12,13 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ReplaceTopBottomLegacyTest);
-    defineReflectiveTests(ReplaceTopBottomNullSafetyTest);
+    defineReflectiveTests(ReplaceTopBottomTest);
+    defineReflectiveTests(ReplaceTopBottomWithoutNullSafetyTest);
   });
 }
 
 @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(listStar(objectStar), 'List<Null*>*');
-    _check(listStar(dynamicNone), 'List<Null*>*');
-    _check(listStar(voidNone), 'List<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(intStar, 'int*');
-    _check(listStar(intStar), 'List<int*>*');
-  }
-
-  void _check(DartType type, String expectedStr, {String? typeStr}) {
-    if (typeStr != null) {
-      expect(_typeString(type), typeStr);
-    }
-
-    var result = typeSystem.replaceTopAndBottom(type);
-    var resultStr = _typeString(result);
-    expect(resultStr, expectedStr);
-  }
-
-  String _typeString(DartType type) {
-    return type.getDisplayString(withNullability: true);
-  }
-}
-
-@reflectiveTest
-class ReplaceTopBottomNullSafetyTest extends AbstractTypeSystemNullSafetyTest {
+class ReplaceTopBottomTest extends AbstractTypeSystemTest {
   test_contravariant_bottom() {
     // Not contravariant.
     _check(neverNone, 'Never');
@@ -173,3 +114,63 @@
     return type.getDisplayString(withNullability: true);
   }
 }
+
+@reflectiveTest
+class ReplaceTopBottomWithoutNullSafetyTest
+    extends AbstractTypeSystemWithoutNullSafetyTest {
+  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(listStar(objectStar), 'List<Null*>*');
+    _check(listStar(dynamicNone), 'List<Null*>*');
+    _check(listStar(voidNone), 'List<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(intStar, 'int*');
+    _check(listStar(intStar), 'List<int*>*');
+  }
+
+  void _check(DartType type, String expectedStr, {String? typeStr}) {
+    if (typeStr != null) {
+      expect(_typeString(type), typeStr);
+    }
+
+    var result = typeSystem.replaceTopAndBottom(type);
+    var resultStr = _typeString(result);
+    expect(resultStr, expectedStr);
+  }
+
+  String _typeString(DartType type) {
+    return type.getDisplayString(withNullability: true);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart b/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
index f7aee23..be647f5 100644
--- a/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
+++ b/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
@@ -2,16 +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/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/dart/element/type_provider.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
-import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,26 +16,7 @@
 }
 
 @reflectiveTest
-class RuntimeTypeEqualityTypeTest with ElementsTypesMixin {
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
-  void setUp() {
-    var analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
-    typeProvider = analysisContext.typeProviderNonNullableByDefault;
-    typeSystem = analysisContext.typeSystemNonNullableByDefault;
-  }
-
+class RuntimeTypeEqualityTypeTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _equal(dynamicNone, dynamicNone);
     _notEqual(dynamicNone, voidNone);
diff --git a/pkg/analyzer/test/src/dart/element/subtype_test.dart b/pkg/analyzer/test/src/dart/element/subtype_test.dart
index 4063e9f..481f288 100644
--- a/pkg/analyzer/test/src/dart/element/subtype_test.dart
+++ b/pkg/analyzer/test/src/dart/element/subtype_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/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';
@@ -16,256 +15,11 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SubtypeTest);
-    defineReflectiveTests(NonNullableSubtypingCompoundTest);
     defineReflectiveTests(SubtypingCompoundTest);
   });
 }
 
 @reflectiveTest
-class NonNullableSubtypingCompoundTest extends _SubtypingCompoundTestBase {
-  @override
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
-  test_dynamic() {
-    var equivalents = <DartType>[
-      voidNone,
-      objectQuestion,
-      objectStar,
-    ];
-
-    var subtypes = <DartType>[
-      neverNone,
-      nullNone,
-      objectNone,
-    ];
-
-    _checkGroups(
-      dynamicNone,
-      equivalents: equivalents,
-      subtypes: subtypes,
-    );
-  }
-
-  test_futureOr_topTypes() {
-    var futureOrObject = futureOrNone(objectNone);
-    var futureOrObjectStar = futureOrNone(objectStar);
-    var futureOrObjectQuestion = futureOrNone(objectQuestion);
-
-    var futureOrStarObject = futureOrStar(objectNone);
-    var futureOrStarObjectStar = futureOrStar(objectStar);
-    var futureOrStarObjectQuestion = futureOrStar(objectQuestion);
-
-    var futureOrQuestionObject = futureOrQuestion(objectNone);
-    var futureOrQuestionObjectStar = futureOrQuestion(objectStar);
-    var futureOrQuestionObjectQuestion = futureOrQuestion(objectQuestion);
-
-    //FutureOr<Object> <: FutureOr*<Object?>
-    _checkGroups(
-      futureOrObject,
-      equivalents: [
-        objectStar,
-        futureOrObjectStar,
-        futureOrStarObject,
-        futureOrStarObjectStar,
-        objectNone,
-      ],
-      subtypes: [],
-      supertypes: [
-        objectQuestion,
-        futureOrQuestionObject,
-        futureOrObjectQuestion,
-        futureOrQuestionObject,
-        futureOrQuestionObjectStar,
-        futureOrStarObjectQuestion,
-        futureOrQuestionObjectQuestion,
-      ],
-    );
-  }
-
-  test_intNone() {
-    var equivalents = <DartType>[
-      intNone,
-      intStar,
-    ];
-
-    var subtypes = <DartType>[
-      neverNone,
-    ];
-
-    var supertypes = <DartType>[
-      intQuestion,
-      objectNone,
-      objectQuestion,
-    ];
-
-    var unrelated = <DartType>[
-      doubleNone,
-      nullNone,
-      nullStar,
-      nullQuestion,
-      neverQuestion,
-    ];
-
-    _checkGroups(
-      intNone,
-      equivalents: equivalents,
-      supertypes: supertypes,
-      unrelated: unrelated,
-      subtypes: subtypes,
-    );
-  }
-
-  test_intQuestion() {
-    var equivalents = <DartType>[
-      intQuestion,
-      intStar,
-    ];
-
-    var subtypes = <DartType>[
-      intNone,
-      nullNone,
-      nullQuestion,
-      nullStar,
-      neverNone,
-      neverQuestion,
-      neverStar,
-    ];
-
-    var supertypes = <DartType>[
-      numQuestion,
-      numStar,
-      objectQuestion,
-      objectStar,
-    ];
-
-    var unrelated = <DartType>[
-      doubleNone,
-      numNone,
-      objectNone,
-    ];
-
-    _checkGroups(
-      intQuestion,
-      equivalents: equivalents,
-      supertypes: supertypes,
-      unrelated: unrelated,
-      subtypes: subtypes,
-    );
-  }
-
-  test_intStar() {
-    var equivalents = <DartType>[
-      intNone,
-      intQuestion,
-      intStar,
-    ];
-
-    var subtypes = <DartType>[
-      nullNone,
-      nullStar,
-      nullQuestion,
-      neverNone,
-      neverStar,
-      neverQuestion,
-    ];
-
-    var supertypes = <DartType>[
-      numNone,
-      numQuestion,
-      numStar,
-      objectNone,
-      objectQuestion,
-    ];
-
-    var unrelated = <DartType>[
-      doubleStar,
-    ];
-
-    _checkGroups(
-      intStar,
-      equivalents: equivalents,
-      supertypes: supertypes,
-      unrelated: unrelated,
-      subtypes: subtypes,
-    );
-  }
-
-  test_null() {
-    var equivalents = <DartType>[
-      nullNone,
-      nullQuestion,
-      nullStar,
-      neverQuestion,
-    ];
-
-    var supertypes = <DartType>[
-      intQuestion,
-      intStar,
-      objectQuestion,
-      objectStar,
-      dynamicNone,
-      voidNone,
-    ];
-
-    var subtypes = <DartType>[
-      neverNone,
-    ];
-
-    var unrelated = <DartType>[
-      doubleNone,
-      intNone,
-      numNone,
-      objectNone,
-    ];
-
-    for (final formOfNull in equivalents) {
-      _checkGroups(
-        formOfNull,
-        equivalents: equivalents,
-        supertypes: supertypes,
-        unrelated: unrelated,
-        subtypes: subtypes,
-      );
-    }
-  }
-
-  test_object() {
-    var equivalents = <DartType>[
-      objectStar,
-    ];
-
-    var supertypes = <DartType>[
-      objectQuestion,
-      dynamicType,
-      voidNone,
-    ];
-
-    var subtypes = <DartType>[
-      neverNone,
-    ];
-
-    var unrelated = <DartType>[
-      doubleQuestion,
-      numQuestion,
-      intQuestion,
-      nullNone,
-    ];
-
-    _checkGroups(
-      objectNone,
-      equivalents: equivalents,
-      supertypes: supertypes,
-      unrelated: unrelated,
-      subtypes: subtypes,
-    );
-  }
-}
-
-@reflectiveTest
 class SubtypeTest extends _SubtypingTestBase {
   final Map<String, DartType> _types = {};
 
@@ -5822,7 +5576,7 @@
 }
 
 @reflectiveTest
-class SubtypingCompoundTest extends _SubtypingCompoundTestBase {
+class SubtypingCompoundTest extends _SubtypingTestBase {
   test_bottom_isBottom() {
     var equivalents = <DartType>[neverStar];
 
@@ -5855,6 +5609,26 @@
     );
   }
 
+  test_dynamic() {
+    var equivalents = <DartType>[
+      voidNone,
+      objectQuestion,
+      objectStar,
+    ];
+
+    var subtypes = <DartType>[
+      neverNone,
+      nullNone,
+      objectNone,
+    ];
+
+    _checkGroups(
+      dynamicNone,
+      equivalents: equivalents,
+      subtypes: subtypes,
+    );
+  }
+
   test_dynamic_isTop() {
     var equivalents = <DartType>[
       dynamicNone,
@@ -5878,6 +5652,42 @@
     );
   }
 
+  test_futureOr_topTypes() {
+    var futureOrObject = futureOrNone(objectNone);
+    var futureOrObjectStar = futureOrNone(objectStar);
+    var futureOrObjectQuestion = futureOrNone(objectQuestion);
+
+    var futureOrStarObject = futureOrStar(objectNone);
+    var futureOrStarObjectStar = futureOrStar(objectStar);
+    var futureOrStarObjectQuestion = futureOrStar(objectQuestion);
+
+    var futureOrQuestionObject = futureOrQuestion(objectNone);
+    var futureOrQuestionObjectStar = futureOrQuestion(objectStar);
+    var futureOrQuestionObjectQuestion = futureOrQuestion(objectQuestion);
+
+    //FutureOr<Object> <: FutureOr*<Object?>
+    _checkGroups(
+      futureOrObject,
+      equivalents: [
+        objectStar,
+        futureOrObjectStar,
+        futureOrStarObject,
+        futureOrStarObjectStar,
+        objectNone,
+      ],
+      subtypes: [],
+      supertypes: [
+        objectQuestion,
+        futureOrQuestionObject,
+        futureOrObjectQuestion,
+        futureOrQuestionObject,
+        futureOrQuestionObjectStar,
+        futureOrStarObjectQuestion,
+        futureOrQuestionObjectQuestion,
+      ],
+    );
+  }
+
   test_int() {
     var equivalents = <DartType>[intStar];
     var supertypes = <DartType>[numStar];
@@ -5890,6 +5700,153 @@
     );
   }
 
+  test_intNone() {
+    var equivalents = <DartType>[
+      intNone,
+      intStar,
+    ];
+
+    var subtypes = <DartType>[
+      neverNone,
+    ];
+
+    var supertypes = <DartType>[
+      intQuestion,
+      objectNone,
+      objectQuestion,
+    ];
+
+    var unrelated = <DartType>[
+      doubleNone,
+      nullNone,
+      nullStar,
+      nullQuestion,
+      neverQuestion,
+    ];
+
+    _checkGroups(
+      intNone,
+      equivalents: equivalents,
+      supertypes: supertypes,
+      unrelated: unrelated,
+      subtypes: subtypes,
+    );
+  }
+
+  test_intQuestion() {
+    var equivalents = <DartType>[
+      intQuestion,
+      intStar,
+    ];
+
+    var subtypes = <DartType>[
+      intNone,
+      nullNone,
+      nullQuestion,
+      nullStar,
+      neverNone,
+      neverQuestion,
+      neverStar,
+    ];
+
+    var supertypes = <DartType>[
+      numQuestion,
+      numStar,
+      objectQuestion,
+      objectStar,
+    ];
+
+    var unrelated = <DartType>[
+      doubleNone,
+      numNone,
+      objectNone,
+    ];
+
+    _checkGroups(
+      intQuestion,
+      equivalents: equivalents,
+      supertypes: supertypes,
+      unrelated: unrelated,
+      subtypes: subtypes,
+    );
+  }
+
+  test_intStar() {
+    var equivalents = <DartType>[
+      intNone,
+      intQuestion,
+      intStar,
+    ];
+
+    var subtypes = <DartType>[
+      nullNone,
+      nullStar,
+      nullQuestion,
+      neverNone,
+      neverStar,
+      neverQuestion,
+    ];
+
+    var supertypes = <DartType>[
+      numNone,
+      numQuestion,
+      numStar,
+      objectNone,
+      objectQuestion,
+    ];
+
+    var unrelated = <DartType>[
+      doubleStar,
+    ];
+
+    _checkGroups(
+      intStar,
+      equivalents: equivalents,
+      supertypes: supertypes,
+      unrelated: unrelated,
+      subtypes: subtypes,
+    );
+  }
+
+  test_null() {
+    var equivalents = <DartType>[
+      nullNone,
+      nullQuestion,
+      nullStar,
+      neverQuestion,
+    ];
+
+    var supertypes = <DartType>[
+      intQuestion,
+      intStar,
+      objectQuestion,
+      objectStar,
+      dynamicNone,
+      voidNone,
+    ];
+
+    var subtypes = <DartType>[
+      neverNone,
+    ];
+
+    var unrelated = <DartType>[
+      doubleNone,
+      intNone,
+      numNone,
+      objectNone,
+    ];
+
+    for (final formOfNull in equivalents) {
+      _checkGroups(
+        formOfNull,
+        equivalents: equivalents,
+        supertypes: supertypes,
+        unrelated: unrelated,
+        subtypes: subtypes,
+      );
+    }
+  }
+
   test_num() {
     var equivalents = <DartType>[numStar];
     var supertypes = <DartType>[objectStar];
@@ -5904,6 +5861,37 @@
     );
   }
 
+  test_object() {
+    var equivalents = <DartType>[
+      objectStar,
+    ];
+
+    var supertypes = <DartType>[
+      objectQuestion,
+      dynamicType,
+      voidNone,
+    ];
+
+    var subtypes = <DartType>[
+      neverNone,
+    ];
+
+    var unrelated = <DartType>[
+      doubleQuestion,
+      numQuestion,
+      intQuestion,
+      nullNone,
+    ];
+
+    _checkGroups(
+      objectNone,
+      equivalents: equivalents,
+      supertypes: supertypes,
+      unrelated: unrelated,
+      subtypes: subtypes,
+    );
+  }
+
   test_void_isTop() {
     var equivalents = <DartType>[
       dynamicNone,
@@ -5926,9 +5914,7 @@
       subtypes: subtypes,
     );
   }
-}
 
-class _SubtypingCompoundTestBase extends _SubtypingTestBase {
   void _checkEquivalent(DartType type1, DartType type2) {
     _checkIsSubtypeOf(type1, type2);
     _checkIsSubtypeOf(type2, type1);
@@ -5990,7 +5976,7 @@
   }
 }
 
-class _SubtypingTestBase extends AbstractTypeSystemNullSafetyTest {}
+class _SubtypingTestBase extends AbstractTypeSystemTest {}
 
 class _TypeParameterCollector extends TypeVisitor<void> {
   final Set<String> typeParameters = {};
diff --git a/pkg/analyzer/test/src/dart/element/top_merge_test.dart b/pkg/analyzer/test/src/dart/element/top_merge_test.dart
index 44ec079..f726cc9 100644
--- a/pkg/analyzer/test/src/dart/element/top_merge_test.dart
+++ b/pkg/analyzer/test/src/dart/element/top_merge_test.dart
@@ -2,15 +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/type.dart';
-import 'package:analyzer/dart/element/type_provider.dart';
-import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
-import '../../../generated/test_analysis_context.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +15,7 @@
 }
 
 @reflectiveTest
-class TopMergeTest extends _Base {
+class TopMergeTest extends AbstractTypeSystemTest {
   test_differentStructure() {
     _checkThrows(
       intNone,
@@ -341,22 +337,3 @@
     }, throwsA(anything));
   }
 }
-
-abstract class _Base with ElementsTypesMixin {
-  @override
-  late final TypeProvider typeProvider;
-
-  late final TypeSystemImpl typeSystem;
-
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting();
-  }
-
-  void setUp() {
-    var analysisContext = TestAnalysisContext(
-      featureSet: testFeatureSet,
-    );
-    typeProvider = analysisContext.typeProviderLegacy;
-    typeSystem = analysisContext.typeSystemLegacy;
-  }
-}
diff --git a/pkg/analyzer/test/src/dart/element/type_algebra_test.dart b/pkg/analyzer/test/src/dart/element/type_algebra_test.dart
index 15bf4c5..0469fb8 100644
--- a/pkg/analyzer/test/src/dart/element/type_algebra_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_algebra_test.dart
@@ -117,6 +117,61 @@
     _assertIdenticalType(typeProvider.dynamicType, {T: intNone});
   }
 
+  test_function_fromAlias_hasRef() async {
+    // typedef Alias<T> = void Function();
+    var T = typeParameter('T');
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [T],
+      aliasedType: functionTypeNone(
+        returnType: voidNone,
+      ),
+    );
+
+    var U = typeParameter('U');
+    var type = typeAliasTypeNone(Alias, typeArguments: [
+      typeParameterTypeNone(U),
+    ]);
+    assertType(type, 'void Function() via Alias<U>');
+    _assertSubstitution(type, {U: intNone}, 'void Function() via Alias<int>');
+  }
+
+  test_function_fromAlias_noRef() async {
+    // typedef Alias<T> = void Function();
+    var T = typeParameter('T');
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [T],
+      aliasedType: functionTypeNone(
+        returnType: voidNone,
+      ),
+    );
+
+    var type = typeAliasTypeNone(Alias, typeArguments: [doubleNone]);
+    assertType(type, 'void Function() via Alias<double>');
+
+    var U = typeParameter('U');
+    _assertIdenticalType(type, {U: intNone});
+  }
+
+  test_function_fromAlias_noTypeParameters() async {
+    // typedef Alias<T> = void Function();
+    var T = typeParameter('T');
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [T],
+      aliasedType: functionTypeNone(
+        returnType: voidNone,
+      ),
+    );
+
+    var type = typeAliasTypeNone(Alias, typeArguments: [intNone]);
+    assertType(type, 'void Function() via Alias<int>');
+
+    var U = typeParameter('U');
+    _assertIdenticalType(type, {U: intNone});
+  }
+
   test_function_noSubstitutions() async {
     var type = functionTypeNone(
       parameters: [
@@ -265,6 +320,63 @@
     _assertIdenticalType(type, {U: doubleNone});
   }
 
+  test_interface_noTypeParameters_fromAlias_hasRef() async {
+    // class A {}
+    var A = class_(name: 'A');
+
+    // typedef Alias<T> = A;
+    var T = typeParameter('T');
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [T],
+      aliasedType: interfaceTypeNone(A),
+    );
+
+    var U = typeParameter('U');
+    var type = typeAliasTypeNone(Alias, typeArguments: [
+      typeParameterTypeNone(U),
+    ]);
+    assertType(type, 'A via Alias<U>');
+    _assertSubstitution(type, {U: intNone}, 'A via Alias<int>');
+  }
+
+  test_interface_noTypeParameters_fromAlias_noRef() async {
+    // class A {}
+    var A = class_(name: 'A');
+
+    // typedef Alias<T> = A;
+    var T = typeParameter('T');
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [T],
+      aliasedType: interfaceTypeNone(A),
+    );
+
+    var type = typeAliasTypeNone(Alias, typeArguments: [doubleNone]);
+    assertType(type, 'A via Alias<double>');
+
+    var U = typeParameter('U');
+    _assertIdenticalType(type, {U: intNone});
+  }
+
+  test_interface_noTypeParameters_fromAlias_noTypeParameters() async {
+    // class A {}
+    var A = class_(name: 'A');
+
+    // typedef Alias = A;
+    var Alias = typeAlias(
+      name: 'Alias',
+      typeParameters: [],
+      aliasedType: interfaceTypeNone(A),
+    );
+
+    var type = typeAliasTypeNone(Alias);
+    assertType(type, 'A via Alias');
+
+    var T = typeParameter('T');
+    _assertIdenticalType(type, {T: intNone});
+  }
+
   test_typeParameter_nullability() async {
     var tElement = typeParameter('T');
 
@@ -368,11 +480,9 @@
   }
 }
 
-class _Base extends AbstractTypeSystemNullSafetyTest {
+class _Base extends AbstractTypeSystemTest {
   void assertType(DartType type, String expected) {
-    var typeStr = type.getDisplayString(
-      withNullability: true,
-    );
+    var typeStr = _typeStr(type);
     expect(typeStr, expected);
   }
 
@@ -383,5 +493,21 @@
   ) {
     var result = substitute(type, substitution);
     assertType(result, expected);
+    expect(result, isNot(same(type)));
+  }
+
+  static String _typeStr(DartType type) {
+    var result = type.getDisplayString(withNullability: true);
+
+    var alias = type.alias;
+    if (alias != null) {
+      result += ' via ${alias.element.name}';
+      var typeArgumentStrList = alias.typeArguments.map(_typeStr).toList();
+      if (typeArgumentStrList.isNotEmpty) {
+        result += '<${typeArgumentStrList.join(', ')}>';
+      }
+    }
+
+    return result;
   }
 }
diff --git a/pkg/analyzer/test/src/dart/element/type_bounded_test.dart b/pkg/analyzer/test/src/dart/element/type_bounded_test.dart
index e851ca6..bf625dc 100644
--- a/pkg/analyzer/test/src/dart/element/type_bounded_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_bounded_test.dart
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class DynamicBoundedTest extends AbstractTypeSystemNullSafetyTest {
+class DynamicBoundedTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _assertDynamicBounded(dynamicNone);
   }
@@ -97,7 +97,7 @@
 }
 
 @reflectiveTest
-class FunctionBoundedTest extends AbstractTypeSystemNullSafetyTest {
+class FunctionBoundedTest extends AbstractTypeSystemTest {
   test_dynamic() {
     _assertNotFunctionBounded(dynamicNone);
   }
diff --git a/pkg/analyzer/test/src/dart/element/type_constraint_gatherer_test.dart b/pkg/analyzer/test/src/dart/element/type_constraint_gatherer_test.dart
index bed7bd4..8695591 100644
--- a/pkg/analyzer/test/src/dart/element/type_constraint_gatherer_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_constraint_gatherer_test.dart
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class TypeConstraintGathererTest extends AbstractTypeSystemNullSafetyTest {
+class TypeConstraintGathererTest extends AbstractTypeSystemTest {
   late final TypeParameterElement T;
   late final TypeParameterType T_none;
   late final TypeParameterType T_question;
diff --git a/pkg/analyzer/test/src/dart/element/type_parameter_element_test.dart b/pkg/analyzer/test/src/dart/element/type_parameter_element_test.dart
index 69ceb64..bf8d4c0 100644
--- a/pkg/analyzer/test/src/dart/element/type_parameter_element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_parameter_element_test.dart
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class TypeParameterElementTest extends AbstractTypeSystemNullSafetyTest {
+class TypeParameterElementTest extends AbstractTypeSystemTest {
   test_equal_elementElement_sameLocation() {
     var T1 = typeParameter('T');
     var T2 = typeParameter('T');
@@ -45,7 +45,7 @@
 }
 
 @reflectiveTest
-class TypeParameterTypeTest extends AbstractTypeSystemNullSafetyTest {
+class TypeParameterTypeTest extends AbstractTypeSystemTest {
   test_equal_equalElements() {
     var T1 = typeParameter('T');
     var T2 = typeParameter('T');
diff --git a/pkg/analyzer/test/src/dart/element/type_references_any_test.dart b/pkg/analyzer/test/src/dart/element/type_references_any_test.dart
index 6a45016..69ba48f 100644
--- a/pkg/analyzer/test/src/dart/element/type_references_any_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_references_any_test.dart
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class TypeReferencesAnyTest extends AbstractTypeSystemNullSafetyTest {
+class TypeReferencesAnyTest extends AbstractTypeSystemTest {
   late TypeParameterElement T;
   late TypeParameterType T_none;
 
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 e17064f..67de862 100644
--- a/pkg/analyzer/test/src/dart/element/type_visitor_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_visitor_test.dart
@@ -8,7 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'element_test.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class RecursiveTypeVisitorTest extends AbstractTypeTest {
+class RecursiveTypeVisitorTest extends AbstractTypeSystemTest {
   late final _MockRecursiveVisitor visitor;
 
   @override
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 c68511d..5f956f5 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
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/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';
@@ -32,13 +31,6 @@
   static final Map<String, StackTrace> _isMoreBottomChecked = {};
   static final Map<String, StackTrace> _isMoreTopChecked = {};
 
-  @override
-  FeatureSet get testFeatureSet {
-    return FeatureSet.forTesting(
-      additionalFeatures: [Feature.non_nullable],
-    );
-  }
-
   void isBottom(DartType type) {
     expect(typeSystem.isBottom(type), isTrue, reason: _typeString(type));
   }
@@ -3347,7 +3339,7 @@
 }
 
 @reflectiveTest
-class _BoundsTestBase extends AbstractTypeSystemNullSafetyTest {
+class _BoundsTestBase extends AbstractTypeSystemTest {
   void _assertBottom(DartType type) {
     if (!typeSystem.isBottom(type)) {
       fail('isBottom must be true: ' + _typeString(type));
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 1c5c4b3..f5e1dd3 100644
--- a/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart
@@ -14,6 +14,14 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AstRewriteMethodInvocationTest);
+    defineReflectiveTests(AstRewritePrefixedIdentifierTest);
+
+    // TODO(srawlins): Add AstRewriteInstanceCreationExpressionTest test, likely
+    // moving many test cases from ConstructorReferenceResolutionTest,
+    // FunctionReferenceResolutionTest, and TypeLiteralResolutionTest.
+    // TODO(srawlins): Add AstRewritePropertyAccessTest test, likely
+    // moving many test cases from ConstructorReferenceResolutionTest,
+    // FunctionReferenceResolutionTest, and TypeLiteralResolutionTest.
   });
 }
 
@@ -197,7 +205,7 @@
       expectedSubstitution: {'T': 'int'},
     );
     _assertTypeArgumentList(
-      creation.constructorName.type.typeArguments,
+      creation.constructorName.type2.typeArguments,
       ['int'],
     );
     expect((creation as InstanceCreationExpressionImpl).typeArguments, isNull);
@@ -463,7 +471,7 @@
     assertTypeNull(override);
     assertTypeNull(override.extensionName);
 
-    assertElementTypeStrings(
+    assertElementTypes(
       override.typeArgumentTypes,
       expectedTypeArguments,
     );
@@ -484,3 +492,43 @@
     expect(argumentStrings, expectedArguments);
   }
 }
+
+@reflectiveTest
+class AstRewritePrefixedIdentifierTest extends PubPackageResolutionTest {
+  test_constructorReference_inAssignment_onLeftSide() async {
+    await assertErrorsInCode('''
+class C {}
+
+void f() {
+  C.new = 1;
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 27, 3),
+    ]);
+
+    var identifier = findNode.prefixed('C.new');
+    // The left side of the assignment is resolved by
+    // [PropertyElementResolver._resolveTargetClassElement], which looks for
+    // getters and setters on `C`, and does not recover with other elements
+    // (methods, constructors). This prefixed identifier can have a real
+    // `staticElement` if we add such recovery.
+    assertElement(identifier, null);
+  }
+
+  test_constructorReference_inAssignment_onRightSide() async {
+    await assertNoErrorsInCode('''
+class C {}
+
+Function? f;
+void g() {
+  f = C.new;
+}
+''');
+
+    var identifier = findNode.constructorReference('C.new');
+    assertElement(identifier, findElement.unnamedConstructor('C'));
+  }
+
+  // TODO(srawlins): Complete tests of all cases of rewriting (or not) a
+  // prefixed identifier.
+}
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 5be34e4..47869ef 100644
--- a/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart
@@ -273,7 +273,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_minus_int_double() async {
@@ -320,7 +320,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_mod_int_double() async {
@@ -421,7 +421,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'double' : 'num']);
+        [typeStringByNullability(nullable: 'double', legacy: 'num')]);
   }
 
   test_plus_int_context_int() async {
@@ -434,7 +434,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_plus_int_context_int_target_rewritten() async {
@@ -447,7 +447,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_plus_int_context_int_via_extension_explicit() async {
@@ -774,7 +774,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_star_int_double() async {
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 9a5e9bf..dde73ec 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
 import 'context_collection_resolution.dart';
 
 main() {
@@ -15,8 +14,7 @@
 }
 
 @reflectiveTest
-class ClassAliasDriverResolutionTest extends PubPackageResolutionTest
-    with ElementsTypesMixin {
+class ClassAliasDriverResolutionTest extends PubPackageResolutionTest {
   test_defaultConstructor() async {
     await assertNoErrorsInCode(r'''
 class A {}
@@ -37,13 +35,13 @@
 
     var x = findElement.class_('X');
 
-    assertTypeName(findNode.typeName('A with'), findElement.class_('A'), 'A');
-    assertTypeName(findNode.typeName('B impl'), findElement.class_('B'), 'B');
-    assertTypeName(findNode.typeName('C;'), findElement.class_('C'), 'C');
+    assertNamedType(findNode.namedType('A with'), findElement.class_('A'), 'A');
+    assertNamedType(findNode.namedType('B impl'), findElement.class_('B'), 'B');
+    assertNamedType(findNode.namedType('C;'), findElement.class_('C'), 'C');
 
     assertType(x.supertype, 'A');
-    assertElementTypeStrings(x.mixins, ['B']);
-    assertElementTypeStrings(x.interfaces, ['C']);
+    assertElementTypes(x.mixins, ['B']);
+    assertElementTypes(x.interfaces, ['C']);
   }
 
   test_element_typeFunction_extends() async {
@@ -61,16 +59,8 @@
 class B {}
 class X = Object with A implements A, Function, B;
 ''');
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
     var x = findElement.class_('X');
-    assertElementTypes(
-      x.interfaces,
-      [
-        interfaceTypeNone(a),
-        interfaceTypeNone(b),
-      ],
-    );
+    assertElementTypes(x.interfaces, ['A', 'B']);
   }
 
   test_element_typeFunction_with() async {
@@ -79,16 +69,8 @@
 class B {}
 class X = Object with A, Function, B;
 ''');
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
     var x = findElement.class_('X');
-    assertElementTypes(
-      x.mixins,
-      [
-        interfaceTypeNone(a),
-        interfaceTypeNone(b),
-      ],
-    );
+    assertElementTypes(x.mixins, ['A', 'B']);
   }
 
   test_implicitConstructors_const() async {
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index 0dd6db7..fd7aa57 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -7,7 +7,6 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
 import 'context_collection_resolution.dart';
 
 main() {
@@ -17,8 +16,7 @@
 }
 
 @reflectiveTest
-class ClassDriverResolutionTest extends PubPackageResolutionTest
-    with ElementsTypesMixin {
+class ClassDriverResolutionTest extends PubPackageResolutionTest {
   test_element_allSupertypes() async {
     await assertNoErrorsInCode(r'''
 class A {}
@@ -34,37 +32,25 @@
 class X5 extends A with B, C implements D, E {}
 ''');
 
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
-    var d = findElement.class_('D');
-    var e = findElement.class_('E');
-
-    var typeA = interfaceTypeNone(a);
-    var typeB = interfaceTypeNone(b);
-    var typeC = interfaceTypeNone(c);
-    var typeD = interfaceTypeNone(d);
-    var typeE = interfaceTypeNone(e);
-
     assertElementTypes(
       findElement.class_('X1').allSupertypes,
-      [typeA, objectType],
+      ['Object', 'A'],
     );
     assertElementTypes(
       findElement.class_('X2').allSupertypes,
-      [objectType, typeB],
+      ['Object', 'B'],
     );
     assertElementTypes(
       findElement.class_('X3').allSupertypes,
-      [typeA, objectType, typeB],
+      ['Object', 'A', 'B'],
     );
     assertElementTypes(
       findElement.class_('X4').allSupertypes,
-      [typeA, typeB, objectType, typeC],
+      ['Object', 'A', 'B', 'C'],
     );
     assertElementTypes(
       findElement.class_('X5').allSupertypes,
-      [typeA, typeB, typeC, objectType, typeD, typeE],
+      ['Object', 'A', 'B', 'C', 'D', 'E'],
     );
   }
 
@@ -79,33 +65,17 @@
 class X3 extends C<double> {}
 ''');
 
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
     assertElementTypes(
       findElement.class_('X1').allSupertypes,
-      [
-        interfaceTypeNone(a, typeArguments: [stringType]),
-        objectType
-      ],
+      ['Object', 'A<String>'],
     );
     assertElementTypes(
       findElement.class_('X2').allSupertypes,
-      [
-        interfaceTypeNone(b, typeArguments: [
-          stringType,
-          interfaceTypeNone(listElement, typeArguments: [intType])
-        ]),
-        objectType
-      ],
+      ['Object', 'B<String, List<int>>'],
     );
     assertElementTypes(
       findElement.class_('X3').allSupertypes,
-      [
-        interfaceTypeNone(c, typeArguments: [doubleType]),
-        interfaceTypeNone(b, typeArguments: [intType, doubleType]),
-        objectType
-      ],
+      ['Object', 'B<int, double>', 'C<double>'],
     );
   }
 
@@ -122,12 +92,9 @@
       error(CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, 48, 1),
     ]);
 
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
     assertElementTypes(
       findElement.class_('X').allSupertypes,
-      [interfaceTypeNone(a), interfaceTypeNone(b), interfaceTypeNone(c)],
+      ['A', 'B', 'C'],
     );
   }
 
@@ -149,15 +116,10 @@
 ''', [
       error(HintCode.DEPRECATED_MIXIN_FUNCTION, 53, 8),
     ]);
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
+
     assertElementTypes(
-      c.mixins,
-      [
-        interfaceTypeNone(a),
-        interfaceTypeNone(b),
-      ],
+      findElement.class_('C').mixins,
+      ['A', 'B'],
     );
   }
 
@@ -417,8 +379,8 @@
     var a = findElement.class_('A');
     assertType(a.supertype, 'Object');
 
-    var eRef = findNode.typeName('E {}');
-    assertTypeName(eRef, findElement.enum_('E'), 'E');
+    var eRef = findNode.namedType('E {}');
+    assertNamedType(eRef, findElement.enum_('E'), 'E');
   }
 
   test_error_extendsNonClass_mixin() async {
@@ -432,8 +394,8 @@
     var a = findElement.class_('A');
     assertType(a.supertype, 'Object');
 
-    var mRef = findNode.typeName('M {} // ref');
-    assertTypeName(mRef, findElement.mixin('M'), 'M');
+    var mRef = findNode.namedType('M {} // ref');
+    assertNamedType(mRef, findElement.mixin('M'), 'M');
   }
 
   test_error_extendsNonClass_variable() async {
diff --git a/pkg/analyzer/test/src/dart/resolution/constructor_reference_test.dart b/pkg/analyzer/test/src/dart/resolution/constructor_reference_test.dart
index 3262f0b..21f09c6 100644
--- a/pkg/analyzer/test/src/dart/resolution/constructor_reference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constructor_reference_test.dart
@@ -696,6 +696,108 @@
     );
   }
 
+  test_prefixedAlias_nonGeneric_named() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+class A {
+  A.foo();
+}
+typedef TA = A;
+''');
+    await assertNoErrorsInCode('''
+import 'a.dart' as a;
+bar() {
+  a.TA.foo;
+}
+''');
+
+    var classElement =
+        findElement.importFind('package:test/a.dart').class_('A');
+    assertConstructorReference(
+      findNode.constructorReference('a.TA.foo;'),
+      classElement.getNamedConstructor('foo'),
+      classElement,
+      'A Function()',
+      expectedPrefix: findElement.import('package:test/a.dart').prefix,
+      expectedTypeNameElement:
+          findElement.importFind('package:test/a.dart').typeAlias('TA'),
+    );
+  }
+
+  test_prefixedAlias_nonGeneric_unnamed() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+class A {
+  A();
+}
+typedef TA = A;
+''');
+    await assertNoErrorsInCode('''
+import 'a.dart' as a;
+bar() {
+  a.TA.new;
+}
+''');
+
+    var classElement =
+        findElement.importFind('package:test/a.dart').class_('A');
+    assertConstructorReference(
+      findNode.constructorReference('a.TA.new;'),
+      classElement.unnamedConstructor,
+      classElement,
+      'A Function()',
+      expectedPrefix: findElement.import('package:test/a.dart').prefix,
+      expectedTypeNameElement:
+          findElement.importFind('package:test/a.dart').typeAlias('TA'),
+    );
+  }
+
+  test_prefixedClass_nonGeneric_named() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+class A {
+  A.foo();
+}
+''');
+    await assertNoErrorsInCode('''
+import 'a.dart' as a;
+bar() {
+  a.A.foo;
+}
+''');
+
+    var classElement =
+        findElement.importFind('package:test/a.dart').class_('A');
+    assertConstructorReference(
+      findNode.constructorReference('a.A.foo;'),
+      classElement.getNamedConstructor('foo'),
+      classElement,
+      'A Function()',
+      expectedPrefix: findElement.import('package:test/a.dart').prefix,
+    );
+  }
+
+  test_prefixedClass_nonGeneric_unnamed() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+class A {
+  A();
+}
+''');
+    await assertNoErrorsInCode('''
+import 'a.dart' as a;
+bar() {
+  a.A.new;
+}
+''');
+
+    var classElement =
+        findElement.importFind('package:test/a.dart').class_('A');
+    assertConstructorReference(
+      findNode.constructorReference('a.A.new;'),
+      classElement.unnamedConstructor,
+      classElement,
+      'A Function()',
+      expectedPrefix: findElement.import('package:test/a.dart').prefix,
+    );
+  }
+
   test_typeAlias_generic_const() async {
     await assertNoErrorsInCode('''
 class A<T> {
diff --git a/pkg/analyzer/test/src/dart/resolution/function_reference_test.dart b/pkg/analyzer/test/src/dart/resolution/function_reference_test.dart
index f695287..fea1532 100644
--- a/pkg/analyzer/test/src/dart/resolution/function_reference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/function_reference_test.dart
@@ -60,25 +60,52 @@
         findElement.constructor('foo'), 'dynamic');
   }
 
+  test_dynamicTyped() async {
+    await assertErrorsInCode('''
+dynamic i = 1;
+
+void bar() {
+  i<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 31, 1),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('i<int>;'),
+        findElement.topGet('i'), 'dynamic');
+  }
+
+  test_dynamicTyped_targetOfMethodCall() async {
+    await assertErrorsInCode('''
+dynamic i = 1;
+
+void bar() {
+  i<int>.foo();
+}
+''', [
+      error(
+          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 31, 1),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('i<int>.foo();'),
+        findElement.topGet('i'), 'dynamic');
+  }
+
   test_explicitReceiver_dynamicTyped() async {
     await assertErrorsInCode('''
-dynamic f(dynamic x) => x;
+dynamic f() => 1;
 
-class C {
-  T instanceMethod<T>(T t) => t;
-}
-
-main() {
-  C c = new C();
-  f(c).instanceMethod<int>;
+foo() {
+  f().instanceMethod<int>;
 }
 ''', [
       error(CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
-          102, 24),
+          29, 23),
     ]);
 
     assertFunctionReference(
-        findNode.functionReference('f(c).instanceMethod<int>;'),
+        findNode.functionReference('f().instanceMethod<int>;'),
         null,
         'dynamic');
   }
@@ -102,6 +129,10 @@
   a.b.foo<int>;
 }
 ''', [
+      // TODO(srawlins): Get the information to [FunctionReferenceResolve] that
+      //  [PropertyElementResolver] encountered an error, to avoid double reporting.
+      error(CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
+          10, 12),
       error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 10, 1),
     ]);
 
@@ -109,6 +140,50 @@
         findNode.functionReference('foo<int>;'), null, 'dynamic');
   }
 
+  test_extension() async {
+    await assertErrorsInCode('''
+extension E<T> on String {}
+
+void foo() {
+  E<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 44, 1),
+    ]);
+
+    var reference = findNode.functionReference('E<int>;');
+    assertFunctionReference(
+      reference,
+      findElement.extension_('E'),
+      'dynamic',
+    );
+  }
+
+  test_extension_prefixed() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+extension E<T> on String {}
+''');
+    await assertErrorsInCode('''
+import 'a.dart' as a;
+
+void foo() {
+  a.E<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 38, 3),
+    ]);
+
+    assertImportPrefix(findNode.simple('a.E'), findElement.prefix('a'));
+    var reference = findNode.functionReference('E<int>;');
+    assertFunctionReference(
+      reference,
+      findElement.importFind('package:test/a.dart').extension_('E'),
+      'dynamic',
+    );
+  }
+
   test_extensionGetter_extensionOverride() async {
     await assertErrorsInCode('''
 class A {}
@@ -263,8 +338,173 @@
         reference, findElement.method('foo'), 'void Function(int)');
   }
 
-  test_instanceGetter_explicitReceiver() async {
+  test_function_call() async {
+    await assertNoErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  foo.call<int>;
+}
+''');
+
+    assertFunctionReference(findNode.functionReference('foo.call<int>;'), null,
+        'void Function(int)');
+  }
+
+  test_function_call_tooFewTypeArgs() async {
     await assertErrorsInCode('''
+void foo<T, U>(T a, U b) {}
+
+void bar() {
+  foo.call<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION, 52, 5),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('foo.call<int>;'), null,
+        'void Function(dynamic, dynamic)');
+  }
+
+  test_function_call_tooManyTypeArgs() async {
+    await assertErrorsInCode('''
+void foo(String a) {}
+
+void bar() {
+  foo.call<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION, 46, 5),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('foo.call<int>;'), null,
+        'void Function(String)');
+  }
+
+  test_function_call_typeArgNotMatchingBound() async {
+    await assertNoErrorsInCode('''
+void foo<T extends num>(T a) {}
+
+void bar() {
+  foo.call<String>;
+}
+''');
+
+    assertFunctionReference(findNode.functionReference('foo.call<String>;'),
+        null, 'void Function(String)');
+  }
+
+  test_function_extensionOnFunction() async {
+    // TODO(srawlins): Test extension on function type, like
+    // `extension on void Function<T>(T)`.
+    await assertNoErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  foo.m<int>;
+}
+
+extension on Function {
+  void m<T>(T t) {}
+}
+''');
+
+    assertFunctionReference(findNode.functionReference('foo.m<int>;'),
+        findElement.method('m'), 'void Function(int)');
+  }
+
+  test_function_extensionOnFunction_static() async {
+    await assertErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  foo.m<int>;
+}
+
+extension on Function {
+  static void m<T>(T t) {}
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 40, 1),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('foo.m<int>;'),
+        findElement.method('m'), 'void Function(int)');
+  }
+
+  test_implicitCallTearoff() async {
+    await assertNoErrorsInCode('''
+class C {
+  T call<T>(T t) => t;
+}
+
+foo() {
+  C()<int>;
+}
+''');
+
+    // TODO(srawlins): An arbitrary expression with a static type which is
+    // callable does not necessarily have an element. However, if we implement
+    // some "implicit call tearoff" node, it would have an element referring to
+    // the `call` method.
+    var functionReference = findNode.functionReference('C()<int>;');
+    assertType(functionReference, 'int Function(int)');
+  }
+
+  test_implicitCallTearoff_tooFewTypeArguments() async {
+    await assertErrorsInCode('''
+class C {
+  void call<T, U>(T t, U u) {}
+}
+
+foo() {
+  C()<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode
+              .WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION,
+          57,
+          5),
+    ]);
+
+    // TODO(srawlins): An arbitrary expression with a static type which is
+    // callable does not necessarily have an element. However, if we implement
+    // some "implicit call tearoff" node, it would have an element referring to
+    // the `call` method.
+    var functionReference = findNode.functionReference('C()<int>;');
+    assertType(functionReference, 'void Function(dynamic, dynamic)');
+  }
+
+  test_implicitCallTearoff_tooManyTypeArguments() async {
+    await assertErrorsInCode('''
+class C {
+  int call(int t) => t;
+}
+
+foo() {
+  C()<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode
+              .WRONG_NUMBER_OF_TYPE_ARGUMENTS_ANONYMOUS_FUNCTION,
+          50,
+          5),
+    ]);
+
+    // TODO(srawlins): An arbitrary expression with a static type which is
+    // callable does not necessarily have an element. However, if we implement
+    // some "implicit call tearoff" node, it would have an element referring to
+    // the `call` method.
+    var functionReference = findNode.functionReference('C()<int>;');
+    assertType(functionReference, 'int Function(int)');
+  }
+
+  test_instanceGetter_explicitReceiver() async {
+    await assertNoErrorsInCode('''
 class A {
   late void Function<T>(T) foo;
 }
@@ -272,10 +512,7 @@
 bar(A a) {
   a.foo<int>;
 }
-''', [
-      error(
-          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 58, 5),
-    ]);
+''');
 
     assertFunctionReference(findNode.functionReference('foo<int>;'),
         findElement.getter('foo'), 'void Function(int)');
@@ -313,6 +550,42 @@
         reference, findElement.method('foo'), 'void Function(int)');
   }
 
+  test_instanceMethod_call() async {
+    await assertNoErrorsInCode('''
+class C {
+  void foo<T>(T a) {}
+
+  void bar() {
+    foo.call<int>;
+  }
+}
+''');
+
+    var reference = findNode.functionReference('foo.call<int>;');
+    // TODO(srawlins): PropertyElementResolver does not return an element for
+    // `.call`. If we want `findElement.method('foo')` here, we must change the
+    // policy over there.
+    assertFunctionReference(reference, null, 'void Function(int)');
+  }
+
+  test_instanceMethod_explicitReceiver_call() async {
+    await assertNoErrorsInCode('''
+class C {
+  void foo<T>(T a) {}
+}
+
+void bar(C c) {
+  c.foo.call<int>;
+}
+''');
+
+    var reference = findNode.functionReference('foo.call<int>;');
+    // TODO(srawlins): PropertyElementResolver does not return an element for
+    // `.call`. If we want `findElement.method('foo')` here, we must change the
+    // policy over there.
+    assertFunctionReference(reference, null, 'void Function(int)');
+  }
+
   test_instanceMethod_explicitReceiver_field() async {
     await assertNoErrorsInCode('''
 class A {
@@ -348,6 +621,22 @@
         findElement.method('foo'), 'void Function(int)');
   }
 
+  test_instanceMethod_explicitReceiver_receiverIsNotIdentifier_call() async {
+    await assertNoErrorsInCode('''
+extension on List<Object?> {
+  void foo<T>(T a) {}
+}
+
+var a = [].foo.call<int>;
+''');
+
+    var reference = findNode.functionReference('foo.call<int>;');
+    // TODO(srawlins): PropertyElementResolver does not return an element for
+    // `.call`. If we want `findElement.method('foo')` here, we must change the
+    // policy over there.
+    assertFunctionReference(reference, null, 'void Function(int)');
+  }
+
   test_instanceMethod_explicitReceiver_super() async {
     await assertNoErrorsInCode('''
 class A {
@@ -618,6 +907,43 @@
         reference, findElement.parameter('foo'), 'void Function(int)');
   }
 
+  test_localVariable_call() async {
+    await assertNoErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  var fn = foo;
+  fn.call<int>;
+}
+''');
+
+    var reference = findNode.functionReference('fn.call<int>;');
+    // TODO(srawlins): PropertyElementResolver does not return an element for
+    // `.call`. If we want `findElement.method('foo')` here, we must change the
+    // policy over there.
+    assertFunctionReference(reference, null, 'void Function(int)');
+  }
+
+  test_localVariable_call_tooManyTypeArgs() async {
+    await assertErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  void Function(int) fn = foo;
+  fn.call<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_FUNCTION, 74, 5),
+    ]);
+
+    var reference = findNode.functionReference('fn.call<int>;');
+    // TODO(srawlins): PropertyElementResolver does not return an element for
+    // `.call`. If we want `findElement.method('fn')` here, we must change the
+    // policy over there.
+    assertFunctionReference(reference, null, 'void Function(int)');
+  }
+
   test_localVariable_typeVariable_boundToFunction() async {
     await assertErrorsInCode('''
 void bar<T extends Function>(T foo) {
@@ -658,6 +984,22 @@
     assertFunctionReference(reference, findElement.parameter('foo'), 'dynamic');
   }
 
+  test_neverTyped() async {
+    await assertErrorsInCode('''
+external Never get i;
+
+void bar() {
+  i<int>;
+}
+''', [
+      error(
+          CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION, 38, 1),
+    ]);
+
+    assertFunctionReference(findNode.functionReference('i<int>;'),
+        findElement.topGet('i'), 'dynamic');
+  }
+
   test_nonGenericFunction() async {
     await assertErrorsInCode('''
 class A {
@@ -953,6 +1295,21 @@
         findNode.functionReference('foo<int>;'), null, 'dynamic');
   }
 
+  test_topLevelFunction_targetOfCall() async {
+    await assertNoErrorsInCode('''
+void foo<T>(T a) {}
+
+void bar() {
+  foo<int>.call;
+}
+''');
+
+    assertFunctionReference(findNode.functionReference('foo<int>.call;'),
+        findElement.topFunction('foo'), 'void Function(int)');
+    assertSimpleIdentifier(findNode.simple('call;'),
+        element: null, type: 'void Function(int)');
+  }
+
   test_topLevelFunction_targetOfFunctionCall() async {
     await assertNoErrorsInCode('''
 void foo<T>(T arg) {}
@@ -978,6 +1335,8 @@
   prefix.a.foo<int>;
 }
 ''', [
+      error(CompileTimeErrorCode.GENERIC_METHOD_TYPE_INSTANTIATION_ON_DYNAMIC,
+          38, 17),
       error(CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME, 45, 1),
     ]);
 
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 20e87bf..c02261d 100644
--- a/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart
@@ -189,7 +189,7 @@
         numPlusElement,
         isLegacy: isLegacyLibrary,
       ),
-      type: typeToStringWithNullability ? 'double' : 'num',
+      type: typeStringByNullability(nullable: 'double', legacy: 'num'),
     );
     assertParameterElement(
       assignment.rightHandSide,
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 4d27277..2f6fbd0 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
@@ -64,7 +64,7 @@
       expectedConstructorMember: true,
       expectedSubstitution: {'T': 'int'},
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_class_generic_unnamed_inferTypeArguments() async {
@@ -107,7 +107,7 @@
       expectedConstructorMember: true,
       expectedSubstitution: {'T': 'int'},
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_class_notGeneric() async {
@@ -201,8 +201,7 @@
   new p.Foo.bar<int>();
 }
 ''', [
-      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 44,
-          3),
+      error(ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS, 44, 3),
     ]);
 
     // TODO(brianwilkerson) Test this more carefully after we can re-write the
diff --git a/pkg/analyzer/test/src/dart/resolution/macro_test.dart b/pkg/analyzer/test/src/dart/resolution/macro_test.dart
deleted file mode 100644
index c4607c4..0000000
--- a/pkg/analyzer/test/src/dart/resolution/macro_test.dart
+++ /dev/null
@@ -1,217 +0,0 @@
-// 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.
-
-import 'package:analyzer/dart/analysis/utilities.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../../generated/elements_types_mixin.dart';
-import 'context_collection_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(MacroResolutionTest);
-  });
-}
-
-@reflectiveTest
-class MacroResolutionTest extends PubPackageResolutionTest
-    with ElementsTypesMixin {
-  @override
-  void setUp() {
-    super.setUp();
-
-    newFile('$testPackageLibPath/macro_annotations.dart', content: r'''
-library analyzer.macro.annotations;
-const autoConstructor = 0;
-const observable = 0;
-''');
-  }
-
-  test_autoConstructor() async {
-    var code = r'''
-import 'macro_annotations.dart';
-
-@autoConstructor
-class A {
-  final int a;
-}
-
-void f() {
-  A(a: 0);
-}
-''';
-
-    // No diagnostics, specifically:
-    // 1. The constructor `A()` is declared.
-    // 2. The final field `a` is not marked, because the macro-generated
-    //    constructor does initialize it.
-    await assertNoErrorsInCode(code);
-
-    _assertResolvedUnitWithParsed(code);
-  }
-
-  test_errors_parse_shiftToWritten() async {
-    await assertErrorsInCode(r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-}
-
-int a = 0
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 85, 1),
-    ]);
-  }
-
-  test_errors_resolution_removeInGenerated() async {
-    // The generated `set foo(int x) { _foo = x; }` has an error, it attempts
-    // to assign to a final field `_foo`. But this error does not exist in
-    // the written code, so it is not present.
-    await assertNoErrorsInCode(r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  final int _foo = 0;
-}
-''');
-  }
-
-  test_errors_resolution_shiftToWritten() async {
-    await assertErrorsInCode(r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-}
-
-notInt a = 0;
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 77, 6),
-    ]);
-  }
-
-  test_executionError_autoConstructor() async {
-    await assertErrorsInCode(r'''
-import 'macro_annotations.dart';
-
-@autoConstructor
-class A {
-  final int a;
-  A(this.a);
-}
-''', [
-      error(CompileTimeErrorCode.MACRO_EXECUTION_ERROR, 34, 16),
-    ]);
-  }
-
-  test_executionError_observable_implicitlyTyped() async {
-    await assertErrorsInCode(r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  var _a = 0;
-}
-''', [
-      error(CompileTimeErrorCode.MACRO_EXECUTION_ERROR, 46, 11),
-      error(HintCode.UNUSED_FIELD, 64, 2),
-    ]);
-  }
-
-  test_observable() async {
-    var code = r'''
-import 'macro_annotations.dart';
-
-class A {
-  @observable
-  int _foo = 0;
-}
-
-void f(A a) {
-  a.foo;
-  a.foo = 2;
-}
-''';
-
-    // No diagnostics, such as unused `_foo`.
-    // We generate a getter/setter pair, so it is used.
-    await assertNoErrorsInCode(code);
-
-    _assertResolvedUnitWithParsed(code);
-  }
-
-  void _assertResolvedUnitWithParsed(String code) {
-    // The resolved content is the original code.
-    expect(result.content, code);
-
-    var resolvedUnit = result.unit;
-    var parsedUnit = parseString(content: code).unit;
-
-    // The token stream was patched to keep only tokens that existed in the
-    // original code.
-    _assertEqualTokens(resolvedUnit, parsedUnit);
-
-    // The AST was patched to keep only nodes that existed in the
-    // original code.
-    var resolvedTokenString = _nodeTokenString(resolvedUnit);
-    var parsedTokenString = _nodeTokenString(parsedUnit);
-    expect(resolvedTokenString, parsedTokenString);
-  }
-
-  static void _assertEqualTokens(AstNode first, AstNode second) {
-    var firstToken = first.beginToken;
-    var secondToken = second.beginToken;
-    while (true) {
-      if (firstToken == first.endToken && secondToken == second.endToken) {
-        break;
-      }
-      expect(firstToken.lexeme, secondToken.lexeme);
-      expect(firstToken.offset, secondToken.offset);
-      firstToken = firstToken.next!;
-      secondToken = secondToken.next!;
-    }
-  }
-
-  /// Return the string dump of all tokens in [node] and its children.
-  static String _nodeTokenString(AstNode node) {
-    var tokens = <Token>[];
-    node.accept(
-      _RecursiveTokenCollector(tokens),
-    );
-
-    // `AstNode.childEntities` does not return tokens in any specific order.
-    // So, we sort them to make the sequence look reasonable.
-    tokens.sort((a, b) => a.offset - b.offset);
-
-    var buffer = StringBuffer();
-    for (var token in tokens) {
-      buffer.writeln('${token.lexeme} @${token.offset}');
-    }
-    return buffer.toString();
-  }
-}
-
-class _RecursiveTokenCollector extends GeneralizingAstVisitor<void> {
-  final List<Token> _tokens;
-
-  _RecursiveTokenCollector(this._tokens);
-
-  @override
-  void visitNode(AstNode node) {
-    _tokens.addAll(
-      node.childEntities.whereType<Token>(),
-    );
-    super.visitNode(node);
-  }
-}
diff --git a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
index 95765b9..4dca4cb 100644
--- a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
@@ -27,6 +27,27 @@
     return findElement.importFind('package:test/a.dart');
   }
 
+  test_at_genericFunctionType_formalParameter() async {
+    await assertNoErrorsInCode(r'''
+const a = 42;
+List<void Function(@a int b)> f() => [];
+''');
+
+    var annotation = findNode.annotation('@a');
+    _assertResolvedNodeText(annotation, r'''
+Annotation
+  atSign: @
+  element: self::@getter::a
+  name: SimpleIdentifier
+    staticElement: self::@getter::a
+    staticType: null
+    token: a
+''');
+    _assertAnnotationValueText(annotation, '''
+int 42
+''');
+  }
+
   test_location_partDirective() async {
     newFile('$testPackageLibPath/a.dart', content: r'''
 part of 'test.dart';
@@ -1179,7 +1200,7 @@
 void f(C c) {}
 ''');
 
-    var classC = findNode.typeName('C c').name.staticElement!;
+    var classC = findNode.namedType('C c').name.staticElement!;
     var annotation = classC.metadata.single;
     _assertElementAnnotationValueText(annotation, r'''
 B
@@ -1209,7 +1230,7 @@
 void f(B b) {}
 ''');
 
-    var classB = findNode.typeName('B b').name.staticElement!;
+    var classB = findNode.namedType('B b').name.staticElement!;
     var annotation = classB.metadata.single;
     _assertElementAnnotationValueText(annotation, r'''
 A
@@ -1238,7 +1259,7 @@
 void f(B b) {}
 ''');
 
-    var classB = findNode.typeName('B b').name.staticElement!;
+    var classB = findNode.namedType('B b').name.staticElement!;
     var annotation = classB.metadata.single;
     _assertElementAnnotationValueText(annotation, r'''
 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 4fe187f..17bac73 100644
--- a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -33,9 +33,9 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f(),'),
-        [typeToStringWithNullability ? 'double' : 'num']);
+        [typeStringByNullability(nullable: 'double', legacy: 'num')]);
     assertTypeArgumentTypes(findNode.methodInvocation('f())'),
-        [typeToStringWithNullability ? 'double' : 'num']);
+        [typeStringByNullability(nullable: 'double', legacy: 'num')]);
   }
 
   test_clamp_double_context_int() async {
@@ -79,7 +79,8 @@
         elementMatcher(numElement.getMethod('clamp'),
             isLegacy: isLegacyLibrary),
         'num Function(num, num)',
-        expectedType: typeToStringWithNullability ? 'double' : 'num');
+        expectedType:
+            typeStringByNullability(nullable: 'double', legacy: 'num'));
   }
 
   test_clamp_double_double_int() async {
@@ -154,9 +155,9 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f(),'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
     assertTypeArgumentTypes(findNode.methodInvocation('f())'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_clamp_int_context_none() async {
@@ -288,7 +289,7 @@
         elementMatcher(numElement.getMethod('clamp'),
             isLegacy: isLegacyLibrary),
         'num Function(num, num)',
-        expectedType: typeToStringWithNullability ? 'int' : 'num');
+        expectedType: typeStringByNullability(nullable: 'int', legacy: 'num'));
   }
 
   test_clamp_int_int_int_from_cascade() async {
@@ -307,7 +308,7 @@
         elementMatcher(numElement.getMethod('clamp'),
             isLegacy: isLegacyLibrary),
         'num Function(num, num)',
-        expectedType: typeToStringWithNullability ? 'int' : 'num');
+        expectedType: typeStringByNullability(nullable: 'int', legacy: 'num'));
   }
 
   test_clamp_int_int_int_via_extension_explicit() async {
@@ -377,7 +378,8 @@
 
     assertMethodInvocation(
         findNode.methodInvocation('clamp'), isNull, 'dynamic',
-        expectedType: typeToStringWithNullability ? 'Never' : 'dynamic');
+        expectedType:
+            typeStringByNullability(nullable: 'Never', legacy: 'dynamic'));
   }
 
   test_clamp_other_context_int() async {
@@ -943,7 +945,7 @@
       'foo<int>();',
       expectedTypeArguments: ['int'],
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_error_undefinedMethod_hasTarget_class_typeParameter() async {
@@ -1296,7 +1298,7 @@
       findElement.topFunction('foo'),
       'void Function()',
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_error_wrongNumberOfTypeArgumentsMethod_21() async {
@@ -1315,7 +1317,7 @@
       'Map<dynamic, dynamic> Function()',
       expectedTypeArguments: ['dynamic', 'dynamic'],
     );
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 
   test_hasReceiver_class_staticGetter() async {
@@ -1561,6 +1563,39 @@
     assertType(foo.propertyName, 'double Function(int)');
   }
 
+  /// It is important to use this expression as an initializer of a top-level
+  /// variable, because of the way top-level inference works, at the time of
+  /// writing this. We resolve initializers twice - first for dependencies,
+  /// then for resolution. This has its issues (for example we miss some
+  /// dependencies), but the important thing is that we rewrite `foo(0)` from
+  /// being a [MethodInvocation] to [FunctionExpressionInvocation]. So, during
+  /// the second pass we see [SimpleIdentifier] `foo` as a `function`. And
+  /// we should be aware that it is not a stand-alone identifier, but a
+  /// cascade section.
+  test_hasReceiver_instance_getter_cascade() async {
+    await resolveTestCode(r'''
+class C {
+  double Function(int) get foo => 0;
+}
+
+var v = C()..foo(0) = 0;
+''');
+
+    var invocation = findNode.functionExpressionInvocation('foo(0)');
+    assertFunctionExpressionInvocation(
+      invocation,
+      element: null,
+      typeArgumentTypes: [],
+      invokeType: 'double Function(int)',
+      type: 'double',
+    );
+    assertSimpleIdentifier(
+      invocation.function,
+      element: findElement.getter('foo'),
+      type: 'double Function(int)',
+    );
+  }
+
   test_hasReceiver_instance_getter_switchStatementExpression() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -2184,7 +2219,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_remainder_int_context_int_target_rewritten() async {
@@ -2197,7 +2232,7 @@
 ''');
 
     assertTypeArgumentTypes(findNode.methodInvocation('f()'),
-        [typeToStringWithNullability ? 'int' : 'num']);
+        [typeStringByNullability(nullable: 'int', legacy: 'num')]);
   }
 
   test_remainder_int_context_int_via_extension_explicit() async {
@@ -2240,7 +2275,8 @@
         elementMatcher(numElement.getMethod('remainder'),
             isLegacy: isLegacyLibrary),
         'num Function(num)',
-        expectedType: typeToStringWithNullability ? 'double' : 'num');
+        expectedType:
+            typeStringByNullability(nullable: 'double', legacy: 'num'));
   }
 
   test_remainder_int_int() async {
@@ -2255,7 +2291,7 @@
         elementMatcher(numElement.getMethod('remainder'),
             isLegacy: isLegacyLibrary),
         'num Function(num)',
-        expectedType: typeToStringWithNullability ? 'int' : 'num');
+        expectedType: typeStringByNullability(nullable: 'int', legacy: 'num'));
   }
 
   test_remainder_int_int_target_rewritten() async {
@@ -2270,7 +2306,7 @@
         elementMatcher(numElement.getMethod('remainder'),
             isLegacy: isLegacyLibrary),
         'num Function(num)',
-        expectedType: typeToStringWithNullability ? 'int' : 'num');
+        expectedType: typeStringByNullability(nullable: 'int', legacy: 'num'));
   }
 
   test_remainder_other_context_int_via_extension_explicit() async {
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index ee9aabd..93fa507 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_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/element/nullability_suffix.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
 import 'context_collection_resolution.dart';
 
 main() {
@@ -18,8 +16,7 @@
 }
 
 @reflectiveTest
-class MixinDriverResolutionTest extends PubPackageResolutionTest
-    with ElementsTypesMixin {
+class MixinDriverResolutionTest extends PubPackageResolutionTest {
   test_accessor_getter() async {
     await assertNoErrorsInCode(r'''
 mixin M {
@@ -94,10 +91,10 @@
     var mElement = findElement.mixin('M');
 
     var aElement = findElement.class_('A');
-    assertElementTypes(aElement.mixins, [interfaceTypeNone(mElement)]);
+    assertElementTypes(aElement.mixins, ['M']);
 
-    var mRef = findNode.typeName('M {} // A');
-    assertTypeName(mRef, mElement, 'M');
+    var mRef = findNode.namedType('M {} // A');
+    assertNamedType(mRef, mElement, 'M');
   }
 
   test_classTypeAlias_with() async {
@@ -109,10 +106,10 @@
     var mElement = findElement.mixin('M');
 
     var aElement = findElement.class_('A');
-    assertElementTypes(aElement.mixins, [interfaceTypeNone(mElement)]);
+    assertElementTypes(aElement.mixins, ['M']);
 
-    var mRef = findNode.typeName('M;');
-    assertTypeName(mRef, mElement, 'M');
+    var mRef = findNode.namedType('M;');
+    assertNamedType(mRef, mElement, 'M');
   }
 
   test_commentReference() async {
@@ -144,10 +141,13 @@
     expect(element.isEnum, isFalse);
     expect(element.isMixin, isTrue);
     expect(element.isMixinApplication, isFalse);
-    expect(interfaceTypeStar(element).isDartCoreObject, isFalse);
+    expect(element.thisType.isDartCoreObject, isFalse);
     expect(element.isDartCoreObject, isFalse);
 
-    assertElementTypes(element.superclassConstraints, [objectType]);
+    assertElementTypes(
+      element.superclassConstraints,
+      ['Object'],
+    );
     assertElementTypes(element.interfaces, []);
   }
 
@@ -161,21 +161,13 @@
 mixin M2 on A implements B, C {}
 ''');
 
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
-    var c = findElement.class_('C');
     assertElementTypes(
       findElement.mixin('M1').allSupertypes,
-      [interfaceTypeNone(a), interfaceTypeNone(b), objectType],
+      ['Object', 'A', 'B'],
     );
     assertElementTypes(
       findElement.mixin('M2').allSupertypes,
-      [
-        interfaceTypeNone(a),
-        objectType,
-        interfaceTypeNone(b),
-        interfaceTypeNone(c)
-      ],
+      ['Object', 'A', 'B', 'C'],
     );
   }
 
@@ -188,22 +180,13 @@
 mixin M2 on B<String> {}
 ''');
 
-    var a = findElement.class_('A');
-    var b = findElement.class_('B');
     assertElementTypes(
       findElement.mixin('M1').allSupertypes,
-      [
-        interfaceTypeNone(a, typeArguments: [intType, doubleType]),
-        objectType
-      ],
+      ['Object', 'A<int, double>'],
     );
     assertElementTypes(
       findElement.mixin('M2').allSupertypes,
-      [
-        interfaceTypeNone(b, typeArguments: [stringType]),
-        interfaceTypeNone(a, typeArguments: [intType, stringType]),
-        objectType
-      ],
+      ['Object', 'A<int, String>', 'B<String>'],
     );
   }
 
@@ -323,10 +306,10 @@
     var randomElement = mathImport.importedLibrary!.getType('Random')!;
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.interfaces, [interfaceTypeNone(randomElement)]);
+    assertElementTypes(element.interfaces, ['Random']);
 
-    var typeRef = findNode.typeName('Random {}');
-    assertTypeName(typeRef, randomElement, 'Random',
+    var typeRef = findNode.namedType('Random {}');
+    assertNamedType(typeRef, randomElement, 'Random',
         expectedPrefix: mathImport.prefix);
   }
 
@@ -338,10 +321,10 @@
     ]);
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.interfaces, [intType]);
+    assertElementTypes(element.interfaces, ['int']);
 
-    var typeRef = findNode.typeName('int {}');
-    assertTypeName(typeRef, intElement, 'int');
+    var typeRef = findNode.namedType('int {}');
+    assertNamedType(typeRef, intElement, 'int');
   }
 
   test_error_implementsClause_nonClass_void() async {
@@ -355,8 +338,8 @@
     var element = findElement.mixin('M');
     assertElementTypes(element.interfaces, []);
 
-    var typeRef = findNode.typeName('void {}');
-    assertTypeName(typeRef, null, 'void');
+    var typeRef = findNode.namedType('void {}');
+    assertNamedType(typeRef, null, 'void');
   }
 
   test_error_memberWithClassName_getter() async {
@@ -831,7 +814,7 @@
 
     var creation = findNode.instanceCreation('M.named();');
     var m = findElement.mixin('M');
-    assertElement(creation.constructorName.type.name, m);
+    assertElement(creation.constructorName.type2.name, m);
   }
 
   test_error_onClause_deferredClass() async {
@@ -846,12 +829,10 @@
     var randomElement = mathImport.importedLibrary!.getType('Random')!;
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [
-      interfaceTypeNone(randomElement),
-    ]);
+    assertElementTypes(element.superclassConstraints, ['Random']);
 
-    var typeRef = findNode.typeName('Random {}');
-    assertTypeName(typeRef, randomElement, 'Random',
+    var typeRef = findNode.namedType('Random {}');
+    assertNamedType(typeRef, randomElement, 'Random',
         expectedPrefix: mathImport.prefix);
   }
 
@@ -864,10 +845,10 @@
     ]);
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [intType]);
+    assertElementTypes(element.superclassConstraints, ['int']);
 
-    var typeRef = findNode.typeName('int {}');
-    assertTypeName(typeRef, intElement, 'int');
+    var typeRef = findNode.namedType('int {}');
+    assertNamedType(typeRef, intElement, 'int');
   }
 
   test_error_onClause_nonInterface_dynamic() async {
@@ -879,10 +860,10 @@
     ]);
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [objectType]);
+    assertElementTypes(element.superclassConstraints, ['Object']);
 
-    var typeRef = findNode.typeName('dynamic {}');
-    assertTypeName(typeRef, dynamicElement, 'dynamic');
+    var typeRef = findNode.namedType('dynamic {}');
+    assertNamedType(typeRef, dynamicElement, 'dynamic');
   }
 
   test_error_onClause_nonInterface_enum() async {
@@ -895,10 +876,10 @@
     ]);
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [objectType]);
+    assertElementTypes(element.superclassConstraints, ['Object']);
 
-    var typeRef = findNode.typeName('E {}');
-    assertTypeName(typeRef, findElement.enum_('E'), 'E');
+    var typeRef = findNode.namedType('E {}');
+    assertNamedType(typeRef, findElement.enum_('E'), 'E');
   }
 
   test_error_onClause_nonInterface_void() async {
@@ -911,10 +892,10 @@
     ]);
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [objectType]);
+    assertElementTypes(element.superclassConstraints, ['Object']);
 
-    var typeRef = findNode.typeName('void {}');
-    assertTypeName(typeRef, null, 'void');
+    var typeRef = findNode.namedType('void {}');
+    assertNamedType(typeRef, null, 'void');
   }
 
   test_error_onClause_OK_mixin() async {
@@ -923,11 +904,8 @@
 mixin B on A {} // ref
 ''');
 
-    var a = findElement.mixin('A');
     var b = findElement.mixin('B');
-    assertElementTypes(b.superclassConstraints, [
-      interfaceTypeNone(a),
-    ]);
+    assertElementTypes(b.superclassConstraints, ['A']);
   }
 
   test_error_undefinedSuperMethod() async {
@@ -978,7 +956,7 @@
     var fNode = findNode.variableDeclaration('f;');
     assertElement(fNode.name, fElement);
 
-    assertTypeName(findNode.typeName('T f'), tElement, 'T');
+    assertNamedType(findNode.namedType('T f'), tElement, 'T');
 
     var accessors = element.accessors;
     expect(accessors, hasLength(2));
@@ -995,22 +973,13 @@
 ''');
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.interfaces, [
-      findElement.class_('A').instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: NullabilitySuffix.none,
-      ),
-      findElement.class_('B').instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: NullabilitySuffix.none,
-      ),
-    ]);
+    assertElementTypes(element.interfaces, ['A', 'B']);
 
-    var aRef = findNode.typeName('A, ');
-    assertTypeName(aRef, findElement.class_('A'), 'A');
+    var aRef = findNode.namedType('A, ');
+    assertNamedType(aRef, findElement.class_('A'), 'A');
 
-    var bRef = findNode.typeName('B {} // M');
-    assertTypeName(bRef, findElement.class_('B'), 'B');
+    var bRef = findNode.namedType('B {} // M');
+    assertNamedType(bRef, findElement.class_('B'), 'B');
   }
 
   test_invalid_unresolved_before_mixin() async {
@@ -1092,22 +1061,13 @@
 ''');
 
     var element = findElement.mixin('M');
-    assertElementTypes(element.superclassConstraints, [
-      findElement.class_('A').instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: NullabilitySuffix.none,
-      ),
-      findElement.class_('B').instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: NullabilitySuffix.none,
-      ),
-    ]);
+    assertElementTypes(element.superclassConstraints, ['A', 'B']);
 
-    var aRef = findNode.typeName('A, ');
-    assertTypeName(aRef, findElement.class_('A'), 'A');
+    var aRef = findNode.namedType('A, ');
+    assertNamedType(aRef, findElement.class_('A'), 'A');
 
-    var bRef = findNode.typeName('B {} // M');
-    assertTypeName(bRef, findElement.class_('B'), 'B');
+    var bRef = findNode.namedType('B {} // M');
+    assertNamedType(bRef, findElement.class_('B'), 'B');
   }
 
   test_recursiveInterfaceInheritance_implements() async {
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
index 1168802..8340942 100644
--- 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
@@ -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.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:pub_semver/pub_semver.dart';
+import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'context_collection_resolution.dart';
@@ -28,7 +31,7 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int*');
+    assertType(findNode.namedType('int v'), 'int*');
   }
 
   test_buildFile_nonNullable() async {
@@ -44,7 +47,7 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int');
+    assertType(findNode.namedType('int v'), 'int');
 
     // Non-nullable in test/.
     await resolveFileCode(
@@ -52,7 +55,7 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int');
+    assertType(findNode.namedType('int v'), 'int');
 
     // Non-nullable in bin/.
     await resolveFileCode(
@@ -60,7 +63,53 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int');
+    assertType(findNode.namedType('int v'), 'int');
+  }
+
+  test_buildFile_nonNullable_languageVersion_current() async {
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(
+  null_safety = True,
+)
+''');
+
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    _assertLanguageVersion(
+      package: ExperimentStatus.currentVersion,
+      override: null,
+    );
+  }
+
+  test_buildFile_nonNullable_languageVersion_fromWorkspace() async {
+    newFile('$workspaceRootPath/dart/build_defs/bzl/language.bzl', content: r'''
+_version = "2.9"
+_version_null_safety = "2.14"
+_version_for_analyzer = _version_null_safety
+
+language = struct(
+    version = _version,
+    version_null_safety = _version_null_safety,
+    version_for_analyzer = _version_for_analyzer,
+)
+''');
+
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(
+  null_safety = True,
+)
+''');
+
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    _assertLanguageVersion(
+      package: Version.parse('2.14.0'),
+      override: null,
+    );
   }
 
   test_buildFile_nonNullable_oneLine_noComma() async {
@@ -73,7 +122,7 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int');
+    assertType(findNode.namedType('int v'), 'int');
   }
 
   test_buildFile_nonNullable_withComments() async {
@@ -89,7 +138,7 @@
       'int v = 0;',
     );
     assertNoErrorsInResult();
-    assertType(findNode.typeName('int v'), 'int');
+    assertType(findNode.namedType('int v'), 'int');
   }
 
   test_noBuildFile_legacy() async {
@@ -97,6 +146,15 @@
 int v = 0;
 ''');
 
-    assertType(findNode.typeName('int v'), 'int*');
+    assertType(findNode.namedType('int v'), 'int*');
+  }
+
+  void _assertLanguageVersion({
+    required Version package,
+    required Version? override,
+  }) async {
+    var element = result.libraryElement;
+    expect(element.languageVersion.package, package);
+    expect(element.languageVersion.override, override);
   }
 }
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 dde5670..5b7cc34 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -28,9 +28,9 @@
 class X3 with A {} // 3
 ''');
 
-    assertType(findNode.typeName('A {} // 1'), 'A');
-    assertType(findNode.typeName('A {} // 2'), 'A');
-    assertType(findNode.typeName('A {} // 3'), 'A');
+    assertType(findNode.namedType('A {} // 1'), 'A');
+    assertType(findNode.namedType('A {} // 2'), 'A');
+    assertType(findNode.namedType('A {} // 3'), 'A');
   }
 
   test_classTypeAlias_hierarchy() async {
@@ -42,9 +42,9 @@
 class X = A with B implements C;
 ''');
 
-    assertType(findNode.typeName('A with'), 'A');
-    assertType(findNode.typeName('B implements'), 'B');
-    assertType(findNode.typeName('C;'), 'C');
+    assertType(findNode.namedType('A with'), 'A');
+    assertType(findNode.namedType('B implements'), 'B');
+    assertType(findNode.namedType('C;'), 'C');
   }
 
   test_field_functionTypeAlias() async {
@@ -100,8 +100,8 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 29, 1),
     ]);
 
-    assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int');
+    assertType(findNode.namedType('int? a'), 'int?');
+    assertType(findNode.namedType('int b'), 'int');
   }
 
   test_local_interfaceType_generic() async {
@@ -119,10 +119,10 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 85, 1),
     ]);
 
-    assertType(findNode.typeName('List<int?>? a'), 'List<int?>?');
-    assertType(findNode.typeName('List<int>? b'), 'List<int>?');
-    assertType(findNode.typeName('List<int?> c'), 'List<int?>');
-    assertType(findNode.typeName('List<int> d'), 'List<int>');
+    assertType(findNode.namedType('List<int?>? a'), 'List<int?>?');
+    assertType(findNode.namedType('List<int>? b'), 'List<int>?');
+    assertType(findNode.namedType('List<int?> c'), 'List<int?>');
+    assertType(findNode.namedType('List<int> d'), 'List<int>');
   }
 
   test_local_methodNullAwareCall_interfaceType() async {
@@ -172,8 +172,8 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 33, 1),
     ]);
 
-    assertType(findNode.typeName('T x'), 'T');
-    assertType(findNode.typeName('T? y'), 'T?');
+    assertType(findNode.namedType('T x'), 'T');
+    assertType(findNode.namedType('T? y'), 'T?');
   }
 
   test_local_variable_genericFunctionType() async {
@@ -200,8 +200,8 @@
       error(HintCode.UNUSED_ELEMENT, 11, 1),
     ]);
 
-    assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int');
+    assertType(findNode.namedType('int? a'), 'int?');
+    assertType(findNode.namedType('int b'), 'int');
   }
 
   test_localFunction_returnType_interfaceType() async {
@@ -215,8 +215,8 @@
       error(HintCode.UNUSED_ELEMENT, 32, 1),
     ]);
 
-    assertType(findNode.typeName('int? f'), 'int?');
-    assertType(findNode.typeName('int g'), 'int');
+    assertType(findNode.namedType('int? f'), 'int?');
+    assertType(findNode.namedType('int g'), 'int');
   }
 
   test_member_potentiallyNullable_called() async {
@@ -239,8 +239,8 @@
 mixin X2 implements A {} // 2
 ''');
 
-    assertType(findNode.typeName('A {} // 1'), 'A');
-    assertType(findNode.typeName('A {} // 2'), 'A');
+    assertType(findNode.namedType('A {} // 1'), 'A');
+    assertType(findNode.namedType('A {} // 2'), 'A');
   }
 
   test_parameter_functionTyped() async {
@@ -315,8 +315,8 @@
 }
 ''');
 
-    assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int');
+    assertType(findNode.namedType('int? a'), 'int?');
+    assertType(findNode.namedType('int b'), 'int');
   }
 
   test_parameter_interfaceType_generic() async {
@@ -325,10 +325,10 @@
 }
 ''');
 
-    assertType(findNode.typeName('List<int?>? a'), 'List<int?>?');
-    assertType(findNode.typeName('List<int>? b'), 'List<int>?');
-    assertType(findNode.typeName('List<int?> c'), 'List<int?>');
-    assertType(findNode.typeName('List<int> d'), 'List<int>');
+    assertType(findNode.namedType('List<int?>? a'), 'List<int?>?');
+    assertType(findNode.namedType('List<int>? b'), 'List<int>?');
+    assertType(findNode.namedType('List<int?> c'), 'List<int?>');
+    assertType(findNode.namedType('List<int> d'), 'List<int>');
   }
 
   test_parameter_methodNullAwareCall_interfaceType() async {
@@ -369,8 +369,8 @@
 }
 ''');
 
-    assertType(findNode.typeName('T a'), 'T');
-    assertType(findNode.typeName('T? b'), 'T?');
+    assertType(findNode.namedType('T a'), 'T');
+    assertType(findNode.namedType('T? b'), 'T?');
   }
 
   test_typedef_classic() async {
@@ -384,7 +384,7 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 50, 1),
     ]);
 
-    assertType(findNode.typeName('F? a'), 'int? Function(bool, String?)?');
+    assertType(findNode.namedType('F? a'), 'int? Function(bool, String?)?');
   }
 
   test_typedef_function() async {
@@ -399,7 +399,7 @@
     ]);
 
     assertType(
-      findNode.typeName('F<String>'),
+      findNode.namedType('F<String>'),
       'int? Function(bool, String, String?)?',
     );
   }
@@ -411,8 +411,8 @@
 void f(F<int> a, F<double>? b) {}
 ''');
 
-    assertType(findNode.typeName('F<int>'), 'int Function(int)?');
-    assertType(findNode.typeName('F<double>?'), 'int Function(double)?');
+    assertType(findNode.namedType('F<int>'), 'int Function(int)?');
+    assertType(findNode.namedType('F<double>?'), 'int Function(double)?');
   }
 
   test_typedef_function_nullable_local() async {
@@ -428,8 +428,8 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 68, 1),
     ]);
 
-    assertType(findNode.typeName('F<int>'), 'int Function(int)?');
-    assertType(findNode.typeName('F<double>?'), 'int Function(double)?');
+    assertType(findNode.namedType('F<int>'), 'int Function(int)?');
+    assertType(findNode.namedType('F<double>?'), 'int Function(double)?');
   }
 }
 
@@ -448,9 +448,9 @@
 class X3 with A {} // 3
 ''');
 
-    assertType(findNode.typeName('A {} // 1'), 'A*');
-    assertType(findNode.typeName('A {} // 2'), 'A*');
-    assertType(findNode.typeName('A {} // 3'), 'A*');
+    assertType(findNode.namedType('A {} // 1'), 'A*');
+    assertType(findNode.namedType('A {} // 2'), 'A*');
+    assertType(findNode.namedType('A {} // 3'), 'A*');
   }
 
   test_classTypeAlias_hierarchy() async {
@@ -462,9 +462,9 @@
 class X = A with B implements C;
 ''');
 
-    assertType(findNode.typeName('A with'), 'A*');
-    assertType(findNode.typeName('B implements'), 'B*');
-    assertType(findNode.typeName('C;'), 'C*');
+    assertType(findNode.namedType('A with'), 'A*');
+    assertType(findNode.namedType('B implements'), 'B*');
+    assertType(findNode.namedType('C;'), 'C*');
   }
 
   test_local_variable_interfaceType_notMigrated() async {
@@ -479,8 +479,8 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 29, 1),
     ]);
 
-    assertType(findNode.typeName('int? a'), 'int*');
-    assertType(findNode.typeName('int b'), 'int*');
+    assertType(findNode.namedType('int? a'), 'int*');
+    assertType(findNode.namedType('int b'), 'int*');
   }
 
   test_mixin_hierarchy() async {
@@ -491,7 +491,7 @@
 mixin X2 implements A {} // 2
 ''');
 
-    assertType(findNode.typeName('A {} // 1'), 'A*');
-    assertType(findNode.typeName('A {} // 2'), 'A*');
+    assertType(findNode.namedType('A {} // 1'), 'A*');
+    assertType(findNode.namedType('A {} // 2'), 'A*');
   }
 }
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 daa949c..93e9187 100644
--- a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
@@ -132,7 +132,7 @@
 
     var constructorName = creation.constructorName;
 
-    var typeName = constructorName.type;
+    var typeName = constructorName.type2;
     assertType(typeName, 'C<int>');
 
     var pC = typeName.name as PrefixedIdentifier;
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index 9a340186..10c4f13 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -43,9 +44,7 @@
 
   Element get dynamicElement => typeProvider.dynamicType.element!;
 
-  bool get enableUnusedElement => false;
-
-  bool get enableUnusedLocalVariable => false;
+  FeatureSet get featureSet => result.libraryElement.featureSet;
 
   ClassElement get futureElement => typeProvider.futureElement;
 
@@ -181,9 +180,9 @@
     assertElement(node, expectedConstructorElement);
     assertType(node, expectedType);
 
-    var typeName = node.constructorName.type;
+    var namedType = node.constructorName.type2;
     expectedTypeNameElement ??= expectedClassElement;
-    assertTypeName(typeName, expectedTypeNameElement, null,
+    assertNamedType(namedType, expectedTypeNameElement, null,
         expectedPrefix: expectedPrefix);
   }
 
@@ -265,21 +264,18 @@
     expect(str, expected);
   }
 
-  void assertElementTypes(List<DartType> types, List<DartType> expected,
+  void assertElementTypes(List<DartType>? types, List<String> expected,
       {bool ordered = false}) {
-    if (ordered) {
-      expect(types, expected);
-    } else {
-      expect(types, unorderedEquals(expected));
-    }
-  }
-
-  void assertElementTypeStrings(List<DartType>? types, List<String> expected) {
     if (types == null) {
       fail('Expected types, actually null.');
     }
 
-    expect(types.map(typeString).toList(), expected);
+    var typeStrList = types.map(typeString).toList();
+    if (ordered) {
+      expect(typeStrList, expected);
+    } else {
+      expect(typeStrList, unorderedEquals(expected));
+    }
   }
 
   void assertEnclosingElement(Element element, Element expectedEnclosing) {
@@ -346,7 +342,7 @@
   }) {
     assertElement(node, element);
     assertType(node.extendedType, extendedType);
-    assertElementTypeStrings(node.typeArgumentTypes, typeArgumentTypes);
+    assertElementTypes(node.typeArgumentTypes, typeArgumentTypes);
   }
 
   void assertFunctionExpressionInvocation(
@@ -464,9 +460,9 @@
 
     assertType(creation, expectedType);
 
-    var typeName = creation.constructorName.type;
+    var namedType = creation.constructorName.type2;
     expectedTypeNameElement ??= expectedClassElement;
-    assertTypeName(typeName, expectedTypeNameElement, expectedType,
+    assertNamedType(namedType, expectedTypeNameElement, expectedType,
         expectedPrefix: expectedPrefix);
   }
 
@@ -575,6 +571,29 @@
     assertTypeNull(ref);
   }
 
+  void assertNamedType(
+      NamedType node, Element? expectedElement, String? expectedType,
+      {Element? expectedPrefix}) {
+    assertType(node, expectedType);
+
+    if (expectedPrefix == null) {
+      var name = node.name as SimpleIdentifier;
+      assertElement(name, expectedElement);
+      // TODO(scheglov) Should this be null?
+//      assertType(name, expectedType);
+    } else {
+      var name = node.name as PrefixedIdentifier;
+      assertImportPrefix(name.prefix, expectedPrefix);
+      assertElement(name.identifier, expectedElement);
+
+      // TODO(scheglov) This should be null, but it is not.
+      // ResolverVisitor sets the tpe for `Bar` in `new foo.Bar()`. This is
+      // probably wrong. It is fine for the TypeName `foo.Bar` to have a type,
+      // and for `foo.Bar()` to have a type. But not a name of a type? No.
+//      expect(name.identifier.staticType, isNull);
+    }
+  }
+
   void assertNamespaceDirectiveSelected(
     NamespaceDirective directive, {
     required String expectedRelativeUri,
@@ -743,7 +762,7 @@
       actual = typeOrNode.staticType;
     } else if (typeOrNode is GenericFunctionType) {
       actual = typeOrNode.type;
-    } else if (typeOrNode is TypeName) {
+    } else if (typeOrNode is NamedType) {
       actual = typeOrNode.type;
     } else {
       fail('Unsupported node: (${typeOrNode.runtimeType}) $typeOrNode');
@@ -766,7 +785,7 @@
     required List<String> typeArguments,
   }) {
     assertElement2(type.alias?.element, declaration: element);
-    assertElementTypeStrings(type.alias?.typeArguments, typeArguments);
+    assertElementTypes(type.alias?.typeArguments, typeArguments);
   }
 
   /// Assert that the given [identifier] is a reference to a type alias, in the
@@ -808,33 +827,10 @@
       TypeLiteral node, Element? expectedElement, String expectedType,
       {Element? expectedPrefix}) {
     assertType(node, 'Type');
-    assertTypeName(node.typeName, expectedElement, expectedType,
+    assertNamedType(node.type, expectedElement, expectedType,
         expectedPrefix: expectedPrefix);
   }
 
-  void assertTypeName(
-      TypeName node, Element? expectedElement, String? expectedType,
-      {Element? expectedPrefix}) {
-    assertType(node, expectedType);
-
-    if (expectedPrefix == null) {
-      var name = node.name as SimpleIdentifier;
-      assertElement(name, expectedElement);
-      // TODO(scheglov) Should this be null?
-//      assertType(name, expectedType);
-    } else {
-      var name = node.name as PrefixedIdentifier;
-      assertImportPrefix(name.prefix, expectedPrefix);
-      assertElement(name.identifier, expectedElement);
-
-      // TODO(scheglov) This should be null, but it is not.
-      // ResolverVisitor sets the tpe for `Bar` in `new foo.Bar()`. This is
-      // probably wrong. It is fine for the TypeName `foo.Bar` to have a type,
-      // and for `foo.Bar()` to have a type. But not a name of a type? No.
-//      expect(name.identifier.staticType, isNull);
-    }
-  }
-
   void assertTypeNull(Expression node) {
     expect(node.staticType, isNull);
   }
@@ -916,7 +912,7 @@
       return node.staticElement;
     } else if (node is PropertyAccess) {
       return node.propertyName.staticElement;
-    } else if (node is TypeName) {
+    } else if (node is NamedType) {
       return node.name.staticElement;
     } else {
       fail('Unsupported node: (${node.runtimeType}) $node');
diff --git a/pkg/analyzer/test/src/dart/resolution/test_all.dart b/pkg/analyzer/test/src/dart/resolution/test_all.dart
index 70b37ab..0c72655 100644
--- a/pkg/analyzer/test/src/dart/resolution/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolution/test_all.dart
@@ -44,7 +44,6 @@
 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 'macro_test.dart' as macro;
 import 'metadata_test.dart' as metadata;
 import 'method_declaration_test.dart' as method_declaration;
 import 'method_invocation_test.dart' as method_invocation;
@@ -106,7 +105,6 @@
     library_element.main();
     local_function.main();
     local_variable.main();
-    macro.main();
     metadata.main();
     method_declaration.main();
     method_invocation.main();
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 5ba77c9..8711811 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
@@ -371,7 +371,7 @@
 ''');
     var override = findNode.extensionOverride('E<num>(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['num']);
+    assertElementTypes(override.typeArgumentTypes, ['num']);
     assertType(override.extendedType, 'A<num>');
 
     var propertyAccess = findNode.propertyAccess('.foo');
@@ -397,7 +397,7 @@
 ''');
     var override = findNode.extensionOverride('E<num>(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['num']);
+    assertElementTypes(override.typeArgumentTypes, ['num']);
     assertType(override.extendedType, 'A<num>');
 
     // TODO(scheglov) We need to instantiate "foo" fully.
@@ -450,7 +450,7 @@
 ''');
     var override = findNode.extensionOverride('E<num>(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['num']);
+    assertElementTypes(override.typeArgumentTypes, ['num']);
     assertType(override.extendedType, 'A<num>');
 
     assertAssignment(
@@ -489,7 +489,7 @@
       error(CompileTimeErrorCode.COULD_NOT_INFER, 69, 1),
     ]);
     var override = findNode.extensionOverride('E(s)');
-    assertElementTypeStrings(override.typeArgumentTypes, ['String']);
+    assertElementTypes(override.typeArgumentTypes, ['String']);
     assertType(override.extendedType, 'String');
   }
 
@@ -507,7 +507,7 @@
 ''');
     var override = findNode.extensionOverride('E(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['int']);
+    assertElementTypes(override.typeArgumentTypes, ['int']);
     assertType(override.extendedType, 'A<int>');
 
     var propertyAccess = findNode.propertyAccess('.foo');
@@ -533,7 +533,7 @@
 ''');
     var override = findNode.extensionOverride('E(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['int']);
+    assertElementTypes(override.typeArgumentTypes, ['int']);
     assertType(override.extendedType, 'A<int>');
 
     // TODO(scheglov) We need to instantiate "foo" fully.
@@ -565,7 +565,7 @@
 ''');
     var override = findNode.extensionOverride('E(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['int']);
+    assertElementTypes(override.typeArgumentTypes, ['int']);
     assertType(override.extendedType, 'A<int>');
 
     var propertyAccess = findNode.propertyAccess('foo;');
@@ -591,7 +591,7 @@
 ''');
     var override = findNode.extensionOverride('E(a)');
     assertElement(override, findElement.extension_('E'));
-    assertElementTypeStrings(override.typeArgumentTypes, ['int']);
+    assertElementTypes(override.typeArgumentTypes, ['int']);
     assertType(override.extendedType, 'A<int>');
 
     assertAssignment(
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 894f8a9..2d38f07 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
@@ -82,7 +82,7 @@
   var v = {...?a, if (b) throw 0: throw 0};
 }
 ''', [
-      error(HintCode.DEAD_CODE, 99, 9),
+      error(HintCode.DEAD_CODE, 99, 7),
     ]);
     assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
   }
@@ -107,7 +107,7 @@
   var v = {...?a, if (b) throw 0: throw 0};
 }
 ''', [
-      error(HintCode.DEAD_CODE, 112, 9),
+      error(HintCode.DEAD_CODE, 112, 7),
     ]);
     assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
   }
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 27c24a5..85fe012 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
@@ -145,7 +145,7 @@
     assertElement(id, element);
     assertType(id, type);
     if (typeArguments != null) {
-      assertElementTypeStrings(id.tearOffTypeArgumentTypes, typeArguments);
+      assertElementTypes(id.tearOffTypeArgumentTypes, typeArguments);
     } else {
       expect(id.tearOffTypeArgumentTypes, isNull);
     }
diff --git a/pkg/analyzer/test/src/dart/resolution/type_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_literal_test.dart
index 5391331..8172670 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_literal_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_literal_test.dart
@@ -70,6 +70,18 @@
     assertTypeLiteral(typeLiteral, findElement.class_('C'), 'C<dynamic>');
   }
 
+  test_class_typeArgumentDoesNotMatchBound() async {
+    await assertErrorsInCode('''
+class C<T extends num> {}
+var t = C<String>;
+''', [
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 36, 6),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('C<String>;');
+    assertTypeLiteral(typeLiteral, findElement.class_('C'), 'C<String>');
+  }
+
   test_classAlias() async {
     await assertNoErrorsInCode('''
 class C<T> {}
@@ -124,6 +136,19 @@
     );
   }
 
+  test_classAlias_typeArgumentDoesNotMatchBound() async {
+    await assertErrorsInCode('''
+class C<T> {}
+typedef CA<T extends num> = C<T>;
+var t = CA<String>;
+''', [
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 59, 6),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('CA<String>;');
+    assertTypeLiteral(typeLiteral, findElement.typeAlias('CA'), 'C<String>');
+  }
+
   test_functionAlias() async {
     await assertNoErrorsInCode('''
 typedef Fn<T> = void Function(T);
@@ -135,6 +160,231 @@
         typeLiteral, findElement.typeAlias('Fn'), 'void Function(int)');
   }
 
+  test_functionAlias_importPrefix() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+typedef Fn<T> = void Function(T);
+''');
+    await assertNoErrorsInCode('''
+import 'a.dart' as a;
+var t = a.Fn<int>;
+''');
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>;');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.importFind('package:test/a.dart').typeAlias('Fn'),
+      'void Function(int)',
+      expectedPrefix: findElement.prefix('a'),
+    );
+  }
+
+  test_functionAlias_targetOfMethodCall() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_targetOfMethodCall_importPrefix() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+typedef Fn<T> = void Function(T);
+''');
+    await assertErrorsInCode('''
+import 'a.dart' as a;
+
+void bar() {
+  a.Fn<int>.foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD_ON_FUNCTION_TYPE, 48, 3),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.importFind('package:test/a.dart').typeAlias('Fn'),
+      'void Function(int)',
+      expectedPrefix: findElement.prefix('a'),
+    );
+  }
+
+  test_functionAlias_targetOfMethodCall_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''');
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_targetOfPropertyAccess_getter() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo;
+}
+
+extension E on Type {
+  int get foo => 1;
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_GETTER_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_targetOfPropertyAccess_getter_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo;
+}
+
+extension E on Type {
+  int get foo => 1;
+}
+''');
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_targetOfPropertyAccess_setter() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo = 7;
+}
+
+extension E on Type {
+  set foo(int value) {}
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_SETTER_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_targetOfPropertyAccess_setter_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo = 7;
+}
+
+extension E on Type {
+  set foo(int value) {}
+}
+''');
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(int)',
+    );
+  }
+
+  test_functionAlias_tooFewTypeArgs() async {
+    await assertErrorsInCode('''
+typedef Fn<T, U> = void Function(T, U);
+var t = Fn<int>;
+''', [
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 50, 5),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int>;');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(dynamic, dynamic)',
+    );
+  }
+
+  test_functionAlias_tooManyTypeArgs() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+var t = Fn<int, String>;
+''', [
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 44, 13),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<int, String>;');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(dynamic)',
+    );
+  }
+
+  test_functionAlias_typeArgumentDoesNotMatchBound() async {
+    await assertErrorsInCode('''
+typedef Fn<T extends num> = void Function(T);
+var t = Fn<String>;
+''', [
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 57, 6),
+    ]);
+
+    var typeLiteral = findNode.typeLiteral('Fn<String>;');
+    assertTypeLiteral(
+      typeLiteral,
+      findElement.typeAlias('Fn'),
+      'void Function(String)',
+    );
+  }
+
   test_mixin() async {
     await assertNoErrorsInCode('''
 mixin M<T> {}
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 711acd8..99398a5 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
@@ -35,8 +35,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A*',
     );
@@ -54,8 +54,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A<num*>*',
     );
@@ -73,8 +73,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A<dynamic>*',
     );
@@ -92,8 +92,8 @@
 f(A<int> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A<int> a'),
+    assertNamedType(
+      findNode.namedType('A<int> a'),
       import_a.class_('A'),
       'A<int*>*',
     );
@@ -113,8 +113,8 @@
 
     var element = import_a.typeAlias('F');
 
-    var typeName = findNode.typeName('F a');
-    assertTypeName(typeName, element, 'int* Function(bool*)*');
+    var typeName = findNode.namedType('F a');
+    assertNamedType(typeName, element, 'int* Function(bool*)*');
 
     assertTypeAlias(
       typeName.typeOrThrow,
@@ -137,8 +137,8 @@
 
     var element = import_a.typeAlias('F');
 
-    var typeName = findNode.typeName('F a');
-    assertTypeName(typeName, element, 'dynamic Function(bool*)*');
+    var typeName = findNode.namedType('F a');
+    assertNamedType(typeName, element, 'dynamic Function(bool*)*');
 
     assertTypeAlias(
       typeName.typeOrThrow,
@@ -161,8 +161,8 @@
 
     var element = import_a.typeAlias('F');
 
-    var typeName = findNode.typeName('F a');
-    assertTypeName(typeName, element, 'num* Function(bool*)*');
+    var typeName = findNode.namedType('F a');
+    assertNamedType(typeName, element, 'num* Function(bool*)*');
 
     assertTypeAlias(
       typeName.typeOrThrow,
@@ -185,8 +185,8 @@
 
     var element = import_a.typeAlias('F');
 
-    var typeName = findNode.typeName('F<int> a');
-    assertTypeName(typeName, element, 'int* Function(bool*)*');
+    var typeName = findNode.namedType('F<int> a');
+    assertNamedType(typeName, element, 'int* Function(bool*)*');
 
     assertTypeAlias(
       typeName.typeOrThrow,
@@ -209,8 +209,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A',
     );
@@ -230,8 +230,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A<num*>',
     );
@@ -251,8 +251,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       import_a.class_('A'),
       'A<dynamic>',
     );
@@ -272,8 +272,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A<int> a'),
+    assertNamedType(
+      findNode.namedType('A<int> a'),
       import_a.class_('A'),
       'A<int>',
     );
@@ -293,8 +293,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       import_a.typeAlias('F'),
       'int* Function()',
     );
@@ -314,8 +314,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       import_a.typeAlias('F'),
       'num* Function()',
     );
@@ -335,8 +335,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       import_a.typeAlias('F'),
       'dynamic Function()',
     );
@@ -356,8 +356,8 @@
       error(HintCode.IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE, 7, 8),
     ]);
 
-    assertTypeName(
-      findNode.typeName('F<int> a'),
+    assertNamedType(
+      findNode.namedType('F<int> a'),
       import_a.typeAlias('F'),
       'int* Function()',
     );
@@ -374,8 +374,8 @@
 }
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<int>()'),
+    assertNamedType(
+      findNode.namedType('X<int>()'),
       findElement.typeAlias('X'),
       'A<int>',
     );
@@ -392,8 +392,8 @@
 }
 ''');
 
-    assertTypeName(
-      findNode.typeName('X()'),
+    assertNamedType(
+      findNode.namedType('X()'),
       findElement.typeAlias('X'),
       'A<int>',
     );
@@ -410,8 +410,8 @@
 }
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<int>()'),
+    assertNamedType(
+      findNode.namedType('X<int>()'),
       findElement.typeAlias('X'),
       'A<int>',
     );
@@ -423,14 +423,14 @@
 void f(X<String> a, X<String?> b) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<String>'),
+    assertNamedType(
+      findNode.namedType('X<String>'),
       findElement.typeAlias('X'),
       'Map<int, String>',
     );
 
-    assertTypeName(
-      findNode.typeName('X<String?>'),
+    assertNamedType(
+      findNode.namedType('X<String?>'),
       findElement.typeAlias('X'),
       'Map<int, String?>',
     );
@@ -446,8 +446,8 @@
 void f(X<String> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<String>'),
+    assertNamedType(
+      findNode.namedType('X<String>'),
       findElement.importFind('package:test/a.dart').typeAlias('X'),
       'Map<int*, String*>*',
     );
@@ -459,14 +459,14 @@
 void f(X<int> a, X<int?> b) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<int>'),
+    assertNamedType(
+      findNode.namedType('X<int>'),
       findElement.typeAlias('X'),
       'List<int?>',
     );
 
-    assertTypeName(
-      findNode.typeName('X<int?>'),
+    assertNamedType(
+      findNode.namedType('X<int?>'),
       findElement.typeAlias('X'),
       'List<int?>',
     );
@@ -482,8 +482,8 @@
 void f(X<int> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<int>'),
+    assertNamedType(
+      findNode.namedType('X<int>'),
       findElement.importFind('package:test/a.dart').typeAlias('X'),
       'List<int*>*',
     );
@@ -495,14 +495,14 @@
 void f(X a, X? b) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X a'),
+    assertNamedType(
+      findNode.namedType('X a'),
       findElement.typeAlias('X'),
       'Never',
     );
 
-    assertTypeName(
-      findNode.typeName('X? b'),
+    assertNamedType(
+      findNode.namedType('X? b'),
       findElement.typeAlias('X'),
       'Never?',
     );
@@ -518,8 +518,8 @@
 void f(X a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X a'),
+    assertNamedType(
+      findNode.namedType('X a'),
       findElement.importFind('package:test/a.dart').typeAlias('X'),
       'Null*',
     );
@@ -531,14 +531,14 @@
 void f(X a, X? b) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X a'),
+    assertNamedType(
+      findNode.namedType('X a'),
       findElement.typeAlias('X'),
       'Never?',
     );
 
-    assertTypeName(
-      findNode.typeName('X? b'),
+    assertNamedType(
+      findNode.namedType('X? b'),
       findElement.typeAlias('X'),
       'Never?',
     );
@@ -550,8 +550,8 @@
 void f(X<int> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<int>'),
+    assertNamedType(
+      findNode.namedType('X<int>'),
       findElement.typeAlias('X'),
       'int?',
     );
@@ -563,8 +563,8 @@
 X<String> f() => {};
 ''');
 
-    assertTypeName(
-      findNode.typeName('X<String>'),
+    assertNamedType(
+      findNode.namedType('X<String>'),
       findElement.typeAlias('X'),
       'Map<int, String>',
     );
@@ -576,8 +576,8 @@
 Nothing f() {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('Nothing f()'),
+    assertNamedType(
+      findNode.namedType('Nothing f()'),
       findElement.typeAlias('Nothing'),
       'void',
     );
@@ -592,8 +592,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       findElement.class_('A'),
       typeStr('A', 'A*'),
     );
@@ -606,8 +606,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       findElement.class_('A'),
       typeStr('A<num>', 'A<num*>*'),
     );
@@ -620,8 +620,8 @@
 f(A a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A a'),
+    assertNamedType(
+      findNode.namedType('A a'),
       findElement.class_('A'),
       typeStr('A<dynamic>', 'A<dynamic>*'),
     );
@@ -634,8 +634,8 @@
 f(A<int> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('A<int> a'),
+    assertNamedType(
+      findNode.namedType('A<int> a'),
       findElement.class_('A'),
       typeStr('A<int>', 'A<int*>*'),
     );
@@ -648,8 +648,8 @@
 dynamic a;
 ''');
 
-    assertTypeName(
-      findNode.typeName('dynamic a;'),
+    assertNamedType(
+      findNode.namedType('dynamic a;'),
       dynamicElement,
       'dynamic',
     );
@@ -662,8 +662,8 @@
 mycore.dynamic a;
 ''');
 
-    assertTypeName(
-      findNode.typeName('mycore.dynamic a;'),
+    assertNamedType(
+      findNode.namedType('mycore.dynamic a;'),
       dynamicElement,
       'dynamic',
       expectedPrefix: findElement.import('dart:core').prefix,
@@ -679,8 +679,8 @@
       error(CompileTimeErrorCode.UNDEFINED_CLASS, 31, 7),
     ]);
 
-    assertTypeName(
-      findNode.typeName('dynamic a;'),
+    assertNamedType(
+      findNode.namedType('dynamic a;'),
       null,
       'dynamic',
     );
@@ -691,8 +691,8 @@
 dynamic a;
 ''');
 
-    assertTypeName(
-      findNode.typeName('dynamic a;'),
+    assertNamedType(
+      findNode.namedType('dynamic a;'),
       dynamicElement,
       'dynamic',
     );
@@ -705,8 +705,8 @@
 f(F a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       findElement.typeAlias('F'),
       typeStr('int Function()', 'int* Function()*'),
     );
@@ -719,8 +719,8 @@
 f(F a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       findElement.typeAlias('F'),
       typeStr('num Function()', 'num* Function()*'),
     );
@@ -733,8 +733,8 @@
 f(F a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('F a'),
+    assertNamedType(
+      findNode.namedType('F a'),
       findElement.typeAlias('F'),
       typeStr('dynamic Function()', 'dynamic Function()*'),
     );
@@ -747,8 +747,8 @@
 f(F<int> a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('F<int> a'),
+    assertNamedType(
+      findNode.namedType('F<int> a'),
       findElement.typeAlias('F'),
       typeStr('int Function()', 'int* Function()*'),
     );
@@ -765,8 +765,8 @@
       error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 49, 1),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A();'),
+    assertNamedType(
+      findNode.namedType('A();'),
       null,
       'dynamic',
       expectedPrefix: findElement.prefix('math'),
@@ -782,8 +782,8 @@
 }
 ''');
 
-    assertTypeName(
-      findNode.typeName('A();'),
+    assertNamedType(
+      findNode.namedType('A();'),
       findElement.class_('A'),
       typeStr('A', 'A*'),
     );
@@ -798,8 +798,8 @@
       error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 15, 1),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A();'),
+    assertNamedType(
+      findNode.namedType('A();'),
       null,
       'dynamic',
     );
@@ -814,8 +814,8 @@
       error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 17, 10),
     ]);
 
-    assertTypeName(
-      findNode.typeName('int.double'),
+    assertNamedType(
+      findNode.namedType('int.double'),
       null,
       'dynamic',
       expectedPrefix: intElement,
@@ -831,8 +831,8 @@
       error(CompileTimeErrorCode.NOT_A_TYPE, 18, 10),
     ]);
 
-    assertTypeName(
-      findNode.typeName('int.double'),
+    assertNamedType(
+      findNode.namedType('int.double'),
       null,
       'dynamic',
       expectedPrefix: intElement,
@@ -844,8 +844,8 @@
 f(Never a) {}
 ''');
 
-    assertTypeName(
-      findNode.typeName('Never a'),
+    assertNamedType(
+      findNode.namedType('Never a'),
       neverElement,
       typeStr('Never', 'Null*'),
     );
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 690050e..c2fe3b1 100644
--- a/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
+++ b/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
@@ -2,10 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/resolver/exit_detector.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -145,11 +143,6 @@
 /// See [ExitDetectorResolvedStatementTest] for tests that require the AST to be resolved.
 @reflectiveTest
 class ExitDetectorParsedStatementTest extends ParseBase {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.13', additionalFeatures: [Feature.constructor_tearoffs]);
-
   test_asExpression() async {
     _assertFalse('a as Object;');
   }
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 bca27b9..f238eba 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
@@ -83,6 +83,70 @@
 ''');
   }
 
+  test_expressionFromConstructorTearoff_withoutTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C.new;
+var x = g('Hello');
+''');
+  }
+
+  test_expressionFromConstructorTearoff_withTypeArgs_assignable() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+var x = g(0);
+''');
+  }
+
+  test_expressionFromConstructorTearoff_withTypeArgs_notAssignable() async {
+    await assertErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+var x = g('Hello');
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 56, 7),
+    ]);
+  }
+
+  test_expressionFromFunctionTearoff_withoutTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f;
+var x = g('Hello');
+''');
+  }
+
+  test_expressionFromFunctionTearoff_withTypeArgs_assignable() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+var x = g(0);
+''');
+  }
+
+  test_expressionFromFunctionTearoff_withTypeArgs_notAssignable() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+var x = g('Hello');
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 45, 7),
+    ]);
+  }
+
   test_invocation_functionTypes_optional() async {
     await assertErrorsInCode('''
 void acceptFunOptBool(void funNumOptBool([bool b])) {}
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 a69898c..e223720 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
@@ -367,4 +367,15 @@
 }
 ''');
   }
+
+  test_setter() async {
+    // Even though this code has an illegal return type for a setter, do not
+    // use the invalid return type to report BODY_MIGHT_COMPLETE_NORMALLY for
+    // setters.
+    await assertErrorsInCode(r'''
+bool set s(int value) {}
+''', [
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 0, 4),
+    ]);
+  }
 }
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
index ea1ef186..1014910 100644
--- a/pkg/analyzer/test/src/diagnostics/const_with_type_parameters_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_with_type_parameters_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -9,33 +10,307 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithTypeParametersConstructorTearoffTest);
+    defineReflectiveTests(ConstWithTypeParametersFunctionTearoffTest);
     defineReflectiveTests(ConstWithTypeParametersTest);
   });
 }
 
 @reflectiveTest
-class ConstWithTypeParametersTest extends PubPackageResolutionTest {
-  test_direct() async {
-    await assertErrorsInCode(r'''
-class A<T> {
-  static const V = const A<T>();
-  const A();
+class ConstWithTypeParametersConstructorTearoffTest
+    extends PubPackageResolutionTest {
+  test_asExpression_functionType() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+void g() {
+  const [f as void Function<T>(T, [int])];
 }
 ''', [
-      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 40, 1),
-      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 40, 1),
+      // This error is reported because the cast fails if the type on the right
+      // has type parameters.
+      // TODO(srawlins): Deduplicate these two errors.
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 38, 31),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 60, 1),
+    ]);
+  }
+
+  test_defaultValue() async {
+    await assertErrorsInCode('''
+class A<T> {
+  void m([var fn = A<T>.new]) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+          34, 1),
+    ]);
+  }
+
+  test_defaultValue_fieldFormalParameter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  A<T> Function() fn;
+  A([this.fn = A<T>.new]);
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+          52, 1),
+    ]);
+  }
+
+  test_defaultValue_noTypeVariableInferredFromParameter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  void m([A<T> Function() fn = A.new]) {}
+}
+''', [
+      // `A<dynamic> Function()` cannot be assigned to `A<T> Function()`, but
+      // there should not be any other error reported here.
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 44, 5),
+    ]);
+  }
+
+  test_direct() async {
+    await assertErrorsInCode('''
+class A<T> {
+  void m() {
+    const c = A<T>.new;
+  }
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 36, 1),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+          42, 1),
+    ]);
+  }
+
+  test_fieldValue_constClass() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  final x = A<T>.new;
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+          40, 1),
     ]);
   }
 
   test_indirect() async {
-    await assertErrorsInCode(r'''
+    await assertErrorsInCode('''
 class A<T> {
-  static const V = const A<List<T>>();
-  const A();
+  void m() {
+    const c = A<List<T>>.new;
+  }
 }
 ''', [
-      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 45, 1),
-      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 45, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 36, 1),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF,
+          47, 1),
     ]);
   }
+
+  test_isExpression_functionType() async {
+    await assertErrorsInCode('''
+class A<T> {
+  void m() {
+    const [false is void Function(T)];
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 60, 1),
+    ]);
+  }
+
+  test_nonConst() async {
+    await assertNoErrorsInCode('''
+class A<T> {
+  void m() {
+    A<T>.new;
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ConstWithTypeParametersFunctionTearoffTest
+    extends PubPackageResolutionTest {
+  test_defaultValue() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  void m([void Function(U) fn = f<U>]) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF,
+          65, 1),
+    ]);
+  }
+
+  test_direct() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  void m() {
+    const c = f<U>;
+  }
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 54, 1),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF,
+          60, 1),
+    ]);
+  }
+
+  test_fieldValue_constClass() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  const A();
+  final x = f<U>;
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF,
+          58, 1),
+    ]);
+  }
+
+  test_fieldValue_extension() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {}
+extension<U> on A<U> {
+  final x = f<U>;
+}
+''', [
+      // An instance field is illegal, but we should not also report an
+      // additional error for the type variable.
+      error(ParserErrorCode.EXTENSION_DECLARES_INSTANCE_FIELD, 63, 1),
+    ]);
+  }
+
+  test_fieldValue_nonConstClass() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  final x = f<U>;
+}
+''');
+  }
+
+  test_indirect() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  void m() {
+    const c = f<List<U>>;
+  }
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 54, 1),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF,
+          65, 1),
+    ]);
+  }
+
+  test_nonConst() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+class A<U> {
+  void m() {
+    f<U>;
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ConstWithTypeParametersTest extends PubPackageResolutionTest {
+  test_direct() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<T>();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 51, 1),
+    ]);
+  }
+
+  test_indirect() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<List<T>>();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 56, 1),
+    ]);
+  }
+
+  test_indirect_functionType_returnType() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<T Function()>();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 51, 1),
+    ]);
+  }
+
+  test_indirect_functionType_simpleParameter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<void Function(T)>();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 65, 1),
+    ]);
+  }
+
+  test_indirect_functionType_typeParameter() async {
+    await assertNoErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<void Function<U>()>();
+  }
+}
+''');
+  }
+
+  test_indirect_functionType_typeParameter_typeParameterBound() async {
+    await assertErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    const A<void Function<U extends T>()>();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 75, 1),
+    ]);
+  }
+
+  test_nonConstContext() async {
+    await assertNoErrorsInCode('''
+class A<T> {
+  const A();
+  void m() {
+    A<T>();
+  }
+}
+''');
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/dead_code_test.dart b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
index 92f1995..e2ba5bb 100644
--- a/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
@@ -338,6 +338,29 @@
     ]);
   }
 
+  test_deadBlock_ifElement() async {
+    await assertErrorsInCode(r'''
+f() {
+  [
+    if (false) 2,
+  ];
+}''', [
+      error(HintCode.DEAD_CODE, 25, 1),
+    ]);
+  }
+
+  test_deadBlock_ifElement_else() async {
+    await assertErrorsInCode(r'''
+f() {
+  [
+    if (true) 2
+    else 3,
+  ];
+}''', [
+      error(HintCode.DEAD_CODE, 35, 1),
+    ]);
+  }
+
   test_deadBlock_while() async {
     await assertErrorsInCode(r'''
 f() {
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 19c3909..46af94a 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
@@ -58,4 +58,18 @@
       error(ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE, 13, 1),
     ]);
   }
+
+  test_typeArgument_ofInstanceCreation() async {
+    await assertErrorsInCode('''
+class A<T> {}
+
+void f() {
+  A<void Function([int x = 42])>();
+}
+''', [
+      error(ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE, 51, 1),
+    ]);
+    // The expression is resolved, even if it is invalid.
+    assertType(findNode.integerLiteral('42'), 'int');
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_ignore_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_ignore_test.dart
index 66d84e5..98eace4 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_ignore_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_ignore_test.dart
@@ -15,7 +15,18 @@
 
 @reflectiveTest
 class DuplicateIgnoreTest extends PubPackageResolutionTest {
-  test_file() async {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        experiments: experiments,
+        lints: ['avoid_types_as_parameter_names'],
+      ),
+    );
+  }
+
+  test_name_file() async {
     await assertErrorsInCode(r'''
 // ignore_for_file: unused_local_variable, unused_local_variable
 void f() {
@@ -26,7 +37,7 @@
     ]);
   }
 
-  test_line() async {
+  test_name_line() async {
     await assertErrorsInCode(r'''
 void f() {
   // ignore: unused_local_variable, unused_local_variable
@@ -37,7 +48,7 @@
     ]);
   }
 
-  test_lineAndFile() async {
+  test_name_lineAndFile() async {
     await assertErrorsInCode(r'''
 // ignore_for_file: unused_local_variable
 void f() {
@@ -48,4 +59,34 @@
       error(HintCode.DUPLICATE_IGNORE, 66, 21),
     ]);
   }
+
+  test_type_file() async {
+    await assertErrorsInCode(r'''
+// ignore_for_file: type=lint, TYPE=LINT
+void f(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''', [
+      error(HintCode.DUPLICATE_IGNORE, 31, 10),
+    ]);
+  }
+
+  test_type_line() async {
+    await assertErrorsInCode(r'''
+void f() {}
+// ignore: type=lint, TYPE=LINT
+void g(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''', [
+      error(HintCode.DUPLICATE_IGNORE, 34, 10),
+    ]);
+  }
+
+  test_type_lineAndFile() async {
+    await assertErrorsInCode(r'''
+// ignore_for_file: type=lint
+void f() {}
+// ignore: type=lint
+void g(arg1(int)) {} // AVOID_TYPES_AS_PARAMETER_NAMES
+''', [
+      error(HintCode.DUPLICATE_IGNORE, 53, 10),
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/ffi_array_multi_non_positive_input_test.dart b/pkg/analyzer/test/src/diagnostics/ffi_array_multi_non_positive_input_test.dart
deleted file mode 100644
index 18fe9b0..0000000
--- a/pkg/analyzer/test/src/diagnostics/ffi_array_multi_non_positive_input_test.dart
+++ /dev/null
@@ -1,75 +0,0 @@
-// 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.
-
-import 'package:analyzer/src/dart/error/ffi_code.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/context_collection_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(FfiArrayMultiNonPositiveInput);
-  });
-}
-
-@reflectiveTest
-class FfiArrayMultiNonPositiveInput extends PubPackageResolutionTest {
-  test_multi() async {
-    await assertErrorsInCode('''
-import "dart:ffi";
-
-class MyStruct extends Struct {
-  @Array.multi([1, 2, 3, -4, 5, 6])
-  external Array<Array<Array<Array<Array<Array<Uint8>>>>>> a0;
-}
-
-void main() {}
-''', [
-      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 54, 33),
-    ]);
-  }
-
-  test_negative() async {
-    await assertErrorsInCode('''
-import "dart:ffi";
-
-class MyStruct extends Struct {
-  @Array.multi([-1])
-  external Array<Uint8> a0;
-}
-
-void main() {}
-''', [
-      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 54, 18),
-    ]);
-  }
-
-  test_non_error() async {
-    await assertNoErrorsInCode('''
-import "dart:ffi";
-
-class MyStruct extends Struct {
-  @Array.multi([1])
-  external Array<Uint8> a0;
-}
-
-void main() {}
-''');
-  }
-
-  test_zero() async {
-    await assertErrorsInCode('''
-import "dart:ffi";
-
-class MyStruct extends Struct {
-  @Array.multi([0])
-  external Array<Uint8> a0;
-}
-
-void main() {}
-''', [
-      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 54, 17),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/implements_repeated_test.dart b/pkg/analyzer/test/src/diagnostics/implements_repeated_test.dart
index 01da5dc..1cf6c42 100644
--- a/pkg/analyzer/test/src/diagnostics/implements_repeated_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implements_repeated_test.dart
@@ -24,8 +24,8 @@
     ]);
 
     var A = findElement.class_('A');
-    assertTypeName(findNode.typeName('A, A {} // ref'), A, 'A');
-    assertTypeName(findNode.typeName('A {} // ref'), A, 'A');
+    assertNamedType(findNode.namedType('A, A {} // ref'), A, 'A');
+    assertNamedType(findNode.namedType('A {} // ref'), A, 'A');
   }
 
   test_class_implements_2times_viaTypeAlias() async {
@@ -37,14 +37,14 @@
       error(CompileTimeErrorCode.IMPLEMENTS_REPEATED, 48, 1),
     ]);
 
-    assertTypeName(
-      findNode.typeName('A, B {} // ref'),
+    assertNamedType(
+      findNode.namedType('A, B {} // ref'),
       findElement.class_('A'),
       'A',
     );
 
-    assertTypeName(
-      findNode.typeName('B {} // ref'),
+    assertNamedType(
+      findNode.namedType('B {} // ref'),
       findElement.typeAlias('B'),
       'A',
     );
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
index a464554..63aacca 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
@@ -18,6 +18,64 @@
 @reflectiveTest
 class InvalidAssignmentTest extends PubPackageResolutionTest
     with InvalidAssignmentTestCases {
+  test_constructorTearoff_inferredTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+''');
+  }
+
+  test_constructorTearoff_withExplicitTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+C Function(int) g = C<int>.new;
+''');
+  }
+
+  test_constructorTearoff_withExplicitTypeArgs_invalid() async {
+    await assertErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+C Function(String) g = C<int>.new;
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 49, 10),
+    ]);
+  }
+
+  test_functionTearoff_inferredTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+''');
+  }
+
+  test_functionTearoff_withExplicitTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+void Function(int) g = f<int>;
+''');
+  }
+
+  test_functionTearoff_withExplicitTypeArgs_invalid() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+
+void Function(String) g = f<int>;
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 45, 6),
+    ]);
+  }
+
   test_ifNullAssignment() async {
     await assertErrorsInCode('''
 void f(int i) {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_implementation_override_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_implementation_override_test.dart
index a9578f5..d8c60f6 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_implementation_override_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_implementation_override_test.dart
@@ -19,6 +19,15 @@
     with InvalidImplementationOverrideTestCases {}
 
 mixin InvalidImplementationOverrideTestCases on PubPackageResolutionTest {
+  test_class_generic_method_generic_hasCovariantParameter() async {
+    await assertNoErrorsInCode('''
+class A<T> {
+  void foo<U>(covariant Object a, U b) {}
+}
+class B extends A<int> {}
+''');
+  }
+
   test_getter_abstractOverridesConcrete() async {
     await assertErrorsInCode('''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_inference_no_possible_substitution_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_inference_no_possible_substitution_test.dart
index 4624ee0..6dc76c1 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_inference_no_possible_substitution_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_inference_no_possible_substitution_test.dart
@@ -32,7 +32,7 @@
 class X extends A<int> with M {}
 ''');
 
-    assertType(findNode.typeName('M {}'), 'M<int>');
+    assertType(findNode.namedType('M {}'), 'M<int>');
   }
 }
 
@@ -55,7 +55,7 @@
 class D extends A<int> with B<int>, C {}
 ''');
 
-    assertType(findNode.typeName('B<int>'), 'B<int*>*');
-    assertType(findNode.typeName('C {}'), 'C<int*>*');
+    assertType(findNode.namedType('B<int>'), 'B<int*>*');
+    assertType(findNode.namedType('C {}'), 'C<int*>*');
   }
 }
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 35beee6..88f45a7 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
@@ -85,7 +85,7 @@
   const {1: null, if (isTrue) null: null else null: null};
 }
 ''', [
-      error(HintCode.DEAD_CODE, 83, 12),
+      error(HintCode.DEAD_CODE, 83, 10),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/non_positive_array_dimension_test.dart b/pkg/analyzer/test/src/diagnostics/non_positive_array_dimension_test.dart
new file mode 100644
index 0000000..a7b26bb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_positive_array_dimension_test.dart
@@ -0,0 +1,104 @@
+// 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.
+
+import 'package:analyzer/src/dart/error/ffi_code.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonPositiveArrayDimensionTest);
+  });
+}
+
+@reflectiveTest
+class NonPositiveArrayDimensionTest extends PubPackageResolutionTest {
+  test_multi_negative() async {
+    await assertErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array.multi([-1])
+  external Array<Uint8> a0;
+}
+''', [
+      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 68, 2),
+    ]);
+  }
+
+  test_multi_oneOfMany() async {
+    await assertErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array.multi([1, 2, 3, -4, 5, 6])
+  external Array<Array<Array<Array<Array<Array<Uint8>>>>>> a0;
+}
+''', [
+      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 77, 2),
+    ]);
+  }
+
+  test_multi_positive() async {
+    await assertNoErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array.multi([1])
+  external Array<Uint8> a0;
+}
+''');
+  }
+
+  test_multi_zero() async {
+    await assertErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array.multi([0])
+  external Array<Uint8> a0;
+}
+''', [
+      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 68, 1),
+    ]);
+  }
+
+  test_single_negative() async {
+    await assertErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array(-12)
+  external Array<Uint8> a0;
+}
+''', [
+      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 61, 3),
+    ]);
+  }
+
+  test_single_positive() async {
+    await assertNoErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array(1)
+  external Array<Uint8> a0;
+}
+''');
+  }
+
+  test_single_zero() async {
+    await assertErrorsInCode('''
+import "dart:ffi";
+
+class MyStruct extends Struct {
+  @Array(0)
+  external Array<Uint8> a0;
+}
+''', [
+      error(FfiCode.NON_POSITIVE_ARRAY_DIMENSION, 61, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_sized_type_argument_test.dart b/pkg/analyzer/test/src/diagnostics/non_sized_type_argument_test.dart
index c06084a..ca3c9b5 100644
--- a/pkg/analyzer/test/src/diagnostics/non_sized_type_argument_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_sized_type_argument_test.dart
@@ -24,7 +24,7 @@
   external Array<Void> a0;
 }
 ''', [
-      error(FfiCode.NON_SIZED_TYPE_ARGUMENT, 68, 11),
+      error(FfiCode.NON_SIZED_TYPE_ARGUMENT, 74, 4),
     ]);
   }
 
@@ -37,7 +37,7 @@
   external Array<Void> a0;
 }
 ''', [
-      error(FfiCode.NON_SIZED_TYPE_ARGUMENT, 67, 11),
+      error(FfiCode.NON_SIZED_TYPE_ARGUMENT, 73, 4),
     ]);
   }
 
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 c2adf0a..c89c75d9 100644
--- a/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart
@@ -44,7 +44,7 @@
 extension E on int {}
 E a;
 ''', [error(CompileTimeErrorCode.NOT_A_TYPE, 22, 1)]);
-    var typeName = findNode.typeName('E a;');
+    var typeName = findNode.namedType('E a;');
     assertTypeDynamic(typeName.type);
     assertTypeNull(typeName.name);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/packed_annotation_alignment_test.dart b/pkg/analyzer/test/src/diagnostics/packed_annotation_alignment_test.dart
index b5e9223..0441075 100644
--- a/pkg/analyzer/test/src/diagnostics/packed_annotation_alignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/packed_annotation_alignment_test.dart
@@ -24,7 +24,7 @@
   external Pointer<Uint8> notEmpty;
 }
 ''', [
-      error(FfiCode.PACKED_ANNOTATION_ALIGNMENT, 20, 10),
+      error(FfiCode.PACKED_ANNOTATION_ALIGNMENT, 28, 1),
     ]);
   }
 
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 ec6150f..be38a3d 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
@@ -22,28 +22,21 @@
       '${ExperimentStatus.currentVersion.minor}';
 
   test_const_equals() async {
-    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
-    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
-    await verifyVersion('2.5.0', '''
+    await verifyVersion('2.15.0', '''
 const a = 42 >>> 3;
-''', expectedErrors: [
-      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 13, 3),
-    ]);
+''');
   }
 
   test_const_lessThan() async {
-    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
-    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
-    await verifyVersion('2.2.0', '''
+    await verifyVersion('2.13.0', '''
 const a = 42 >>> 3;
 ''', expectedErrors: [
       error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 13, 3),
-      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 13, 3),
     ]);
   }
 
   test_declaration_equals() async {
-    await verifyVersion('2.5.0', '''
+    await verifyVersion('2.15.0', '''
 class A {
   A operator >>>(A a) => this;
 }
@@ -51,7 +44,7 @@
   }
 
   test_declaration_lessThan() async {
-    await verifyVersion('2.2.0', '''
+    await verifyVersion('2.13.0', '''
 class A {
   A operator >>>(A a) => this;
 }
@@ -61,23 +54,16 @@
   }
 
   test_nonConst_equals() async {
-    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
-    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
-    await verifyVersion('2.5.0', '''
+    await verifyVersion('2.15.0', '''
 var a = 42 >>> 3;
-''', expectedErrors: [
-      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 11, 3),
-    ]);
+''');
   }
 
   test_nonConst_lessThan() async {
-    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
-    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
-    await verifyVersion('2.2.0', '''
+    await verifyVersion('2.13.0', '''
 var a = 42 >>> 3;
 ''', expectedErrors: [
       error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 11, 3),
-      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 11, 3),
     ]);
   }
 }
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 67ab6d0..321b5e8 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
@@ -23,6 +23,60 @@
     ]);
   }
 
+  test_class_field_instance() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+class B extends A {
+  var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 63, 5),
+    ]);
+  }
+
+  test_class_field_instance_late() async {
+    await assertNoErrorsInCode('''
+class A {
+  int foo() => 0;
+}
+
+class B extends A {
+  late var f = super.foo();
+}
+''');
+  }
+
+  test_class_field_static() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+class B extends A {
+  static var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 70, 5),
+    ]);
+  }
+
+  test_class_field_static_late() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+class B extends A {
+  static late var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 75, 5),
+    ]);
+  }
+
   test_constructorFieldInitializer() async {
     await assertErrorsInCode(r'''
 class A {
@@ -37,6 +91,34 @@
     ]);
   }
 
+  test_extension_field_static() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+extension E on int {
+  static var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 71, 5),
+    ]);
+  }
+
+  test_extension_field_static_late() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+extension E on int {
+  static late var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 76, 5),
+    ]);
+  }
+
   test_factoryConstructor() async {
     await assertErrorsInCode(r'''
 class A {
@@ -67,6 +149,60 @@
     ]);
   }
 
+  test_mixin_field_instance() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+mixin M on A {
+  var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 58, 5),
+    ]);
+  }
+
+  test_mixin_field_instance_late() async {
+    await assertNoErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+mixin M on A {
+  late var f = super.foo;
+}
+''');
+  }
+
+  test_mixin_field_static() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+mixin M on A {
+  static var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 65, 5),
+    ]);
+  }
+
+  test_mixin_field_static_late() async {
+    await assertErrorsInCode('''
+class A {
+  int get foo => 0;
+}
+
+mixin M on A {
+  static late var f = super.foo;
+}
+''', [
+      error(CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, 70, 5),
+    ]);
+  }
+
   test_staticMethod() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 81c9971..33a5243 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -191,8 +191,6 @@
     as extra_annotation_on_struct_field;
 import 'extra_positional_arguments_test.dart' as extra_positional_arguments;
 import 'extra_size_annotation_carray_test.dart' as extra_size_annotation_carray;
-import 'ffi_array_multi_non_positive_input_test.dart'
-    as ffi_array_multi_non_positive_input_test;
 import 'ffi_leaf_call_must_not_use_handle_test.dart'
     as ffi_leaf_call_must_not_use_handle;
 import 'ffi_native_test.dart' as ffi_native_test;
@@ -488,6 +486,7 @@
 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_positive_array_dimension_test.dart' as non_positive_array_dimension;
 import 'non_sized_type_argument_test.dart' as non_sized_type_argument;
 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;
@@ -850,7 +849,6 @@
     extra_annotation_on_struct_field.main();
     extra_positional_arguments.main();
     extra_size_annotation_carray.main();
-    ffi_array_multi_non_positive_input_test.main();
     ffi_leaf_call_must_not_use_handle.main();
     ffi_native_test.main();
     field_in_struct_with_initializer.main();
@@ -1040,6 +1038,7 @@
     non_generative_implicit_constructor.main();
     non_native_function_type_argument_to_pointer.main();
     non_null_opt_out.main();
+    non_positive_array_dimension.main();
     non_sized_type_argument.main();
     non_type_as_type_argument.main();
     non_type_in_catch_clause.main();
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
index cb85d4f..ae2410c 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
@@ -388,6 +388,36 @@
 @reflectiveTest
 class UndefinedGetterWithNullSafetyTest extends PubPackageResolutionTest
     with UndefinedGetterTestCases {
+  test_functionAlias_typeInstantiated_getter() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo;
+}
+
+extension E on Type {
+  int get foo => 1;
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_GETTER_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+  }
+
+  test_functionAlias_typeInstantiated_getter_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo;
+}
+
+extension E on Type {
+  int get foo => 1;
+}
+''');
+  }
+
   test_get_from_abstract_field_final_valid() async {
     await assertNoErrorsInCode('''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
index 34c7247..483d1dc 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
@@ -62,6 +62,50 @@
     ]);
   }
 
+  test_functionAlias_notInstantiated() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn.foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''');
+  }
+
+  test_functionAlias_typeInstantiated() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_METHOD_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+  }
+
+  test_functionAlias_typeInstantiated_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo();
+}
+
+extension E on Type {
+  void foo() {}
+}
+''');
+  }
+
   test_functionExpression_callMethod_defined() async {
     await assertNoErrorsInCode(r'''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
index d1674c6..d97a894 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
@@ -143,6 +143,36 @@
 @reflectiveTest
 class UndefinedSetterWithNullSafetyTest extends PubPackageResolutionTest
     with UndefinedSetterTestCases {
+  test_functionAlias_typeInstantiated() async {
+    await assertErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  Fn<int>.foo = 7;
+}
+
+extension E on Type {
+  set foo(int value) {}
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_SETTER_ON_FUNCTION_TYPE, 58, 3),
+    ]);
+  }
+
+  test_functionAlias_typeInstantiated_parenthesized() async {
+    await assertNoErrorsInCode('''
+typedef Fn<T> = void Function(T);
+
+void bar() {
+  (Fn<int>).foo = 7;
+}
+
+extension E on Type {
+  set foo(int value) {}
+}
+''');
+  }
+
   test_new_cascade() async {
     await assertErrorsInCode('''
 class C {}
diff --git a/pkg/analyzer/test/src/diagnostics/unignorable_ignore_test.dart b/pkg/analyzer/test/src/diagnostics/unignorable_ignore_test.dart
index 07802b1..151e21f 100644
--- a/pkg/analyzer/test/src/diagnostics/unignorable_ignore_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unignorable_ignore_test.dart
@@ -84,7 +84,7 @@
   void registerNodeProcessors(
       NodeLintRegistry registry, LinterContext context) {
     final visitor = _AvoidIntVisitor(this);
-    registry.addTypeName(this, visitor);
+    registry.addNamedType(this, visitor);
   }
 }
 
@@ -94,7 +94,7 @@
   _AvoidIntVisitor(this.rule);
 
   @override
-  void visitTypeName(TypeName node) {
+  void visitNamedType(NamedType node) {
     if (node.name.name == 'int') {
       rule.reportLint(node.name);
     }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_import_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_import_test.dart
index a5c76d1..b6071fc 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_import_test.dart
@@ -9,8 +9,7 @@
 
 main() {
   defineReflectiveSuite(() {
-    // TODO(srawlins): Re-enable this check once Flutter engine path is clear.
-    // defineReflectiveTests(UnnecessaryImportTest);
+    defineReflectiveTests(UnnecessaryImportTest);
   });
 }
 
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 fef92e8..e132fd9 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_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.
 
-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/context_collection_resolution.dart';
@@ -19,16 +19,87 @@
 @reflectiveTest
 class UnnecessaryTypeCheckFalseTest extends PubPackageResolutionTest
     with UnnecessaryTypeCheckFalseTestCases {
-  @override
-  test_type_not_object() async {
+  test_typeNonNullable_isNot_same() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  a is! int;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 18, 9),
+    ]);
+  }
+
+  test_typeNonNullable_isNot_subtype() async {
     await assertNoErrorsInCode(r'''
-void f<T>(T a) {
-  a is! Object;
+void f(num a) {
+  a is! int;
 }
 ''');
   }
 
-  test_type_not_objectQuestion() async {
+  test_typeNonNullable_isNot_supertype() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  a is! num;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 18, 9),
+    ]);
+  }
+
+  test_typeNullable_isNot_same() async {
+    await assertErrorsInCode(r'''
+void f(int? a) {
+  a is! int?;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 19, 10),
+    ]);
+  }
+
+  test_typeNullable_isNot_same_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(int? a) {
+  a is! int;
+}
+''');
+  }
+
+  test_typeNullable_isNot_subtype() async {
+    await assertNoErrorsInCode(r'''
+void f(num? a) {
+  a is! int?;
+}
+''');
+  }
+
+  test_typeNullable_isNot_subtype_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(num? a) {
+  a is! int;
+}
+''');
+  }
+
+  test_typeNullable_isNot_supertype() async {
+    await assertErrorsInCode(r'''
+void f(int? a) {
+  a is! num?;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 19, 10),
+    ]);
+  }
+
+  test_typeNullable_isNot_supertype_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(int? a) {
+  a is! num;
+}
+''');
+  }
+
+  test_typeParameter_isNot_objectQuestion() async {
     await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is! Object?;
@@ -40,7 +111,7 @@
 }
 
 mixin UnnecessaryTypeCheckFalseTestCases on PubPackageResolutionTest {
-  test_null_not_Null() async {
+  test_null_isNot_Null() async {
     await assertErrorsInCode(r'''
 var b = null is! Null;
 ''', [
@@ -48,7 +119,7 @@
     ]);
   }
 
-  test_type_not_dynamic() async {
+  test_typeParameter_isNot_dynamic() async {
     await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is! dynamic;
@@ -58,35 +129,110 @@
     ]);
   }
 
-  test_type_not_object() async {
+  test_typeParameter_isNot_object() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [],
+      legacy: [
+        error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 19, 12),
+      ],
+    );
     await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is! Object;
 }
-''', [
-      error(HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 19, 12),
-    ]);
+''', expectedErrors);
   }
 }
 
 @reflectiveTest
 class UnnecessaryTypeCheckFalseWithoutNullSafetyTest
     extends PubPackageResolutionTest
-    with UnnecessaryTypeCheckFalseTestCases, WithoutNullSafetyMixin {}
+    with WithoutNullSafetyMixin, UnnecessaryTypeCheckFalseTestCases {}
 
 @reflectiveTest
 class UnnecessaryTypeCheckTrueTest extends PubPackageResolutionTest
     with UnnecessaryTypeCheckTrueTestCases {
-  @override
-  test_type_is_object() async {
+  test_typeNonNullable_is_same() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  a is int;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 18, 8),
+    ]);
+  }
+
+  test_typeNonNullable_is_subtype() async {
     await assertNoErrorsInCode(r'''
-void f<T>(T a) {
-  a is Object;
+void f(num a) {
+  a is int;
 }
 ''');
   }
 
-  test_type_is_objectQuestion() async {
+  test_typeNonNullable_is_supertype() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  a is num;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 18, 8),
+    ]);
+  }
+
+  test_typeNullable_is_same() async {
+    await assertErrorsInCode(r'''
+void f(int? a) {
+  a is int?;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 19, 9),
+    ]);
+  }
+
+  test_typeNullable_is_same_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(int? a) {
+  a is int;
+}
+''');
+  }
+
+  test_typeNullable_is_subtype() async {
+    await assertNoErrorsInCode(r'''
+void f(num? a) {
+  a is int?;
+}
+''');
+  }
+
+  test_typeNullable_is_subtype_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(num? a) {
+  a is int;
+}
+''');
+  }
+
+  test_typeNullable_is_supertype() async {
+    await assertErrorsInCode(r'''
+void f(int? a) {
+  a is num?;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 19, 9),
+    ]);
+  }
+
+  test_typeNullable_is_supertype_nonNullable() async {
+    await assertNoErrorsInCode(r'''
+void f(int? a) {
+  a is num;
+}
+''');
+  }
+
+  test_typeParameter_is_objectQuestion() async {
     await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is Object?;
@@ -108,6 +254,26 @@
 
   test_type_is_dynamic() async {
     await assertErrorsInCode(r'''
+void f(int a) {
+  a is dynamic;
+}
+''', [
+      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 18, 12),
+    ]);
+  }
+
+  test_type_is_unresolved() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  a is Unresolved;
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME, 23, 10),
+    ]);
+  }
+
+  test_typeParameter_is_dynamic() async {
+    await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is dynamic;
 }
@@ -116,18 +282,22 @@
     ]);
   }
 
-  test_type_is_object() async {
+  test_typeParameter_is_object() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [],
+      legacy: [
+        error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 19, 11),
+      ],
+    );
     await assertErrorsInCode(r'''
 void f<T>(T a) {
   a is Object;
 }
-''', [
-      error(HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 19, 11),
-    ]);
+''', expectedErrors);
   }
 }
 
 @reflectiveTest
 class UnnecessaryTypeCheckTrueWithoutNullSafetyTest
     extends PubPackageResolutionTest
-    with UnnecessaryTypeCheckTrueTestCases, WithoutNullSafetyMixin {}
+    with WithoutNullSafetyMixin, UnnecessaryTypeCheckTrueTestCases {}
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 c64c00e..2346c9b 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
@@ -15,9 +15,6 @@
 
 @reflectiveTest
 class UnusedCatchClauseTest extends PubPackageResolutionTest {
-  @override
-  bool get enableUnusedLocalVariable => true;
-
   test_on_unusedException() async {
     await assertErrorsInCode(r'''
 main() {
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 4a71c72..f1f0d57 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
@@ -15,9 +15,6 @@
 
 @reflectiveTest
 class UnusedCatchStackTest extends PubPackageResolutionTest {
-  @override
-  bool get enableUnusedLocalVariable => true;
-
   test_on_unusedStack() async {
     await assertErrorsInCode(r'''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
index 6bd9c21..b2827a4 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
@@ -17,9 +17,6 @@
 @reflectiveTest
 class UnusedElementTest extends PubPackageResolutionTest
     with WithoutNullSafetyMixin {
-  @override
-  bool get enableUnusedElement => true;
-
   test_class_isUsed_extends() async {
     await assertNoErrorsInCode(r'''
 class _A {}
@@ -816,6 +813,18 @@
 ''');
   }
 
+  test_method_isUsed_privateExtension_methodCall() async {
+    await assertNoErrorsInCode(r'''
+extension _E on int {
+  void call() {}
+}
+
+void f() {
+  0();
+}
+''');
+  }
+
   test_method_isUsed_privateExtension_operator_assignment() async {
     await assertNoErrorsInCode(r'''
 extension _A on String {
@@ -881,6 +890,18 @@
 ''');
   }
 
+  test_method_isUsed_unnamedExtension_methodCall() async {
+    await assertNoErrorsInCode(r'''
+extension on int {
+  void call() {}
+}
+
+void f() {
+  0();
+}
+''');
+  }
+
   test_method_isUsed_unnamedExtension_operator() async {
     await assertNoErrorsInCode(r'''
 extension on String {
@@ -948,6 +969,16 @@
     ]);
   }
 
+  test_method_notUsed_privateExtension_methodCall() async {
+    await assertErrorsInCode(r'''
+extension _E on int {
+  void call() {}
+}
+''', [
+      error(HintCode.UNUSED_ELEMENT, 29, 4),
+    ]);
+  }
+
   /// 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 {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
index f50c2b8..5896e6a 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
@@ -15,9 +15,6 @@
 
 @reflectiveTest
 class UnusedFieldTest extends PubPackageResolutionTest {
-  @override
-  bool get enableUnusedElement => true;
-
   test_isUsed_argument() async {
     await assertNoErrorsInCode(r'''
 class A {
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 d9b08b4..a32e601 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
@@ -15,9 +15,6 @@
 
 @reflectiveTest
 class UnusedLocalVariableTest extends PubPackageResolutionTest {
-  @override
-  bool get enableUnusedLocalVariable => true;
-
   test_inFor_underscore_ignored() async {
     await assertNoErrorsInCode(r'''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_result_test.dart b/pkg/analyzer/test/src/diagnostics/unused_result_test.dart
index 02a7888..250479b 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_result_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_result_test.dart
@@ -568,6 +568,21 @@
 ''');
   }
 
+  test_method_result_unassigned_parameterNotDefinedAndCascaded() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+class A {
+  @UseResult.unless(parameterDefined: 'value')
+  int foo([int? value]) => value ?? 0;
+}
+
+void main() {
+  A().foo()..toString();
+}
+''');
+  }
+
   test_topLevelFunction_result_assigned() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
@@ -667,21 +682,6 @@
     ]);
   }
 
-  test_topLevelFunction_result_unassigned_cascade() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-
-@useResult
-int foo() => 0;
-
-void main() {
-  foo()..toString();
-}
-''', [
-      error(HintCode.UNUSED_RESULT, 78, 3),
-    ]);
-  }
-
   test_topLevelFunction_result_unassigned_parameterDefined() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
@@ -725,6 +725,19 @@
     ]);
   }
 
+  test_topLevelFunction_result_used_in_cascade() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+@useResult
+int foo() => 0;
+
+void main() {
+  foo()..toString();
+}
+''');
+  }
+
   test_topLevelVariable_assigned() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
@@ -752,6 +765,19 @@
 ''');
   }
 
+  test_topLevelVariable_result_unusedInDoc() async {
+    // https://github.com/dart-lang/sdk/issues/47181
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+@useResult
+int get f => 1;
+
+/// I love [f].
+int g = 1;
+''');
+  }
+
   test_topLevelVariable_returned() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
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 7615279..aa5a2d8 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
@@ -27,6 +27,6 @@
 ''', [
       error(ParserErrorCode.VOID_WITH_TYPE_ARGUMENTS, 4, 1),
     ]);
-    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+    assertNamedType(findNode.namedType('int>'), intElement, 'int');
   }
 }
diff --git a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
index 9b95376..887e3d9 100644
--- a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
@@ -4,6 +4,7 @@
 
 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/error/syntactic_errors.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -308,9 +309,9 @@
 ''', [ParserErrorCode.MULTIPLE_VARIANCE_MODIFIERS], '''
 class A<in X> {}
 ''',
-        featureSet: FeatureSet.forTesting(
-          sdkVersion: '2.5.0',
-          additionalFeatures: [Feature.variance],
+        featureSet: FeatureSet.fromEnableFlags2(
+          sdkLanguageVersion: ExperimentStatus.currentVersion,
+          flags: [EnableString.variance],
         ));
   }
 }
diff --git a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
index c743709..1cd18d7 100644
--- a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_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/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -250,9 +249,7 @@
 f(x) => l?[x
 ''', [ScannerErrorCode.EXPECTED_TOKEN, ParserErrorCode.EXPECTED_TOKEN], '''
 f(x) => l?[x];
-''',
-        featureSet: FeatureSet.forTesting(
-            sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]));
+''');
   }
 
   void test_listLiteral_inner_last() {
diff --git a/pkg/analyzer/test/src/lint/project_test.dart b/pkg/analyzer/test/src/lint/project_test.dart
index 00e6361..0c0c8dc 100644
--- a/pkg/analyzer/test/src/lint/project_test.dart
+++ b/pkg/analyzer/test/src/lint/project_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/lint/project.dart';
 import 'package:test/test.dart';
 
@@ -18,7 +18,7 @@
       // TODO(brianwilkerson) These tests fail on the bots because the cwd is
       // not the same there as when we run tests locally.
       group('cwd', () async {
-        var project = await DartProject.create(_AnalysisDriverMock(), []);
+        var project = await DartProject.create(_AnalysisSessionMock(), []);
         test('name', () {
           expect(project.name, 'analyzer');
         });
@@ -61,7 +61,7 @@
   });
 }
 
-class _AnalysisDriverMock implements AnalysisDriver {
+class _AnalysisSessionMock implements AnalysisSession {
   @override
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index a4ad397..fb0093f 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -395,14 +395,17 @@
       expect(e.nameOffset, -1);
       expect(e.nonSynthetic, same(e.enclosingElement));
     } else {
-      expect(e.nameOffset, isNonNegative);
+      expect(e.nameOffset, isPositive);
     }
   }
 
   void _writeDocumentation(Element element) {
     var documentation = element.documentationComment;
     if (documentation != null) {
-      _writelnMultiLineWithIndent('documentationComment: $documentation');
+      var str = documentation;
+      str = str.replaceAll('\n', r'\n');
+      str = str.replaceAll('\r', r'\r');
+      _writelnWithIndent('documentationComment: $str');
     }
   }
 
@@ -518,12 +521,6 @@
     buffer.writeln();
   }
 
-  void _writelnMultiLineWithIndent(String str) {
-    str = str.replaceAll('\n', r'\n');
-    str = str.replaceAll('\r', r'\r');
-    _writelnWithIndent(str);
-  }
-
   void _writelnWithIndent(String line) {
     buffer.write(indent);
     buffer.writeln(line);
@@ -648,8 +645,6 @@
   }
 
   void _writePropertyAccessorElement(PropertyAccessorElement e) {
-    e as PropertyAccessorElementImpl;
-
     PropertyInducingElement variable = e.variable;
     expect(variable, isNotNull);
 
@@ -796,13 +791,12 @@
       }
 
       var aliasedElement = e.aliasedElement;
-      if (aliasedElement is GenericFunctionTypeElement) {
-        final aliasedElement_ = aliasedElement as GenericFunctionTypeElement;
+      if (aliasedElement is GenericFunctionTypeElementImpl) {
         _writelnWithIndent('aliasedElement: GenericFunctionTypeElement');
         _withIndent(() {
-          _writeTypeParameterElements(aliasedElement_.typeParameters);
-          _writeParameterElements(aliasedElement_.parameters);
-          _writeType(aliasedElement_.returnType, name: 'returnType');
+          _writeTypeParameterElements(aliasedElement.typeParameters);
+          _writeParameterElements(aliasedElement.parameters);
+          _writeType(aliasedElement.returnType, name: 'returnType');
         });
       }
     });
@@ -859,7 +853,6 @@
   }
 
   void _writeUnitElement(CompilationUnitElement e) {
-    e as CompilationUnitElementImpl;
     _writeElements('classes', e.classes, _writeClassElement);
     _writeElements('enums', e.enums, _writeClassElement);
     _writeElements('extensions', e.extensions, _writeExtensionElement);
@@ -876,12 +869,6 @@
       _writePropertyAccessorElement,
     );
     _writeElements('functions', e.functions, _writeFunctionElement);
-
-    var macroGeneratedContent = e.macroGeneratedContent;
-    if (macroGeneratedContent != null) {
-      _writelnWithIndent('macroGeneratedContent');
-      buffer.write(macroGeneratedContent);
-    }
   }
 
   void _writeUri(Source? source) {
diff --git a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
index 9b9051e..2160b96 100644
--- a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
+++ b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
@@ -361,7 +361,7 @@
       properties.addNode('name', node.name);
       properties.addToken('period', node.period);
       properties.addElement('staticElement', node.staticElement);
-      properties.addNode('type', node.type);
+      properties.addNode('type', node.type2);
       _writeProperties(properties);
     });
   }
@@ -522,7 +522,7 @@
     _writeln('ExtendsClause');
     _withIndent(() {
       var properties = _Properties();
-      properties.addNode('superclass', node.superclass);
+      properties.addNode('superclass', node.superclass2);
       _addAstNode(properties, node);
       _writeProperties(properties);
     });
@@ -814,7 +814,7 @@
     _withIndent(() {
       var properties = _Properties();
       properties.addToken('implementsKeyword', node.implementsKeyword);
-      properties.addNodeList('interfaces', node.interfaces);
+      properties.addNodeList('interfaces', node.interfaces2);
       _addAstNode(properties, node);
       _writeProperties(properties);
     });
@@ -1034,6 +1034,18 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    _writeNextCodeLine(node);
+    // TODO(scheglov) Change to NamedType.
+    _writeln('TypeName');
+    _withIndent(() {
+      _writeNode('name', node.name);
+      _writeType('type', node.type);
+      _writeNode('typeArguments', node.typeArguments);
+    });
+  }
+
+  @override
   void visitNullLiteral(NullLiteral node) {
     _writeNextCodeLine(node);
     _writeln('NullLiteral');
@@ -1053,7 +1065,7 @@
       var properties = _Properties();
       properties.addToken('onKeyword', node.onKeyword);
       properties.addNodeList(
-          'superclassConstraints', node.superclassConstraints);
+          'superclassConstraints', node.superclassConstraints2);
       _addAstNode(properties, node);
       _writeProperties(properties);
     });
@@ -1421,24 +1433,14 @@
     _writeln('TypeLiteral');
     _withIndent(() {
       var properties = _Properties();
-      properties.addNode('typeName', node.typeName);
+      // TODO(scheglov) Change to 'type'.
+      properties.addNode('typeName', node.type);
       _addExpression(properties, node);
       _writeProperties(properties);
     });
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    _writeNextCodeLine(node);
-    _writeln('TypeName');
-    _withIndent(() {
-      _writeNode('name', node.name);
-      _writeType('type', node.type);
-      _writeNode('typeArguments', node.typeArguments);
-    });
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     _writeNextCodeLine(node);
     _writeln('TypeParameter');
@@ -1531,7 +1533,7 @@
     _withIndent(() {
       var properties = _Properties();
       properties.addToken('withKeyword', node.withKeyword);
-      properties.addNodeList('mixinTypes', node.mixinTypes);
+      properties.addNodeList('mixinTypes', node.mixinTypes2);
       _addAstNode(properties, node);
       _writeProperties(properties);
     });
@@ -1809,6 +1811,7 @@
     return '{$entriesStr}';
   }
 
+  /// TODO(scheglov) Make [type] non-nullable?
   String? _typeStr(DartType? type) {
     return type?.getDisplayString(withNullability: _withNullability);
   }
@@ -1989,7 +1992,8 @@
       _writelnWithIndent(name);
       _withIndent(() {
         for (var type in types) {
-          _writelnWithIndent('$type');
+          var typeStr = _typeStr(type);
+          _writelnWithIndent('$typeStr');
         }
       });
     }
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index d85eb96..bc041e1 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -59,9 +59,11 @@
     var inputLibraries = <LinkInputLibrary>[];
     for (var sdkLibrary in sdk.sdkLibraries) {
       var source = sourceFactory.resolveUri(null, sdkLibrary.shortName)!;
+      var text = getFile(source.fullName).readAsStringSync();
+      var unit = parseText(text, featureSet);
 
       var inputUnits = <LinkInputUnit>[];
-      _addLibraryUnits(source, inputUnits, featureSet);
+      _addLibraryUnits(source, unit, inputUnits, featureSet);
       inputLibraries.add(
         LinkInputLibrary(
           source: source,
@@ -97,17 +99,11 @@
     var inputLibraries = <LinkInputLibrary>[];
     _addNonDartLibraries({}, inputLibraries, source);
 
-    var unitsInformativeData = <Uri, InformativeUnitData>{};
+    var unitsInformativeBytes = <Uri, Uint8List>{};
     for (var inputLibrary in inputLibraries) {
       for (var inputUnit in inputLibrary.units) {
-        var content = inputUnit.sourceContent;
-        if (content != null) {
-          var informativeBytes = writeUnitInformative(inputUnit.unit);
-          unitsInformativeData[inputUnit.uri] = InformativeUnitData(
-            content: content,
-            bytes: informativeBytes,
-          );
-        }
+        var informativeBytes = writeUnitInformative(inputUnit.unit);
+        unitsInformativeBytes[inputUnit.uri] = informativeBytes;
       }
     }
 
@@ -127,7 +123,7 @@
     elementFactory.addBundle(
       BundleReader(
         elementFactory: elementFactory,
-        unitsInformativeData: {},
+        unitsInformativeBytes: {},
         resolutionBytes: sdkBundle.resolutionBytes,
       ),
     );
@@ -141,7 +137,7 @@
       elementFactory.addBundle(
         BundleReader(
           elementFactory: elementFactory,
-          unitsInformativeData: unitsInformativeData,
+          unitsInformativeBytes: unitsInformativeBytes,
           resolutionBytes: linkResult.resolutionBytes,
         ),
       );
@@ -156,16 +152,14 @@
 
   void _addLibraryUnits(
     Source definingSource,
+    CompilationUnit definingUnit,
     List<LinkInputUnit> units,
     FeatureSet featureSet,
   ) {
-    var definingContent = _readSafely(definingSource.fullName);
-    var definingUnit = parseText(definingContent, featureSet);
     units.add(
       LinkInputUnit(
         partDirectiveIndex: null,
         source: definingSource,
-        sourceContent: definingContent,
         isSynthetic: false,
         unit: definingUnit,
       ),
@@ -190,7 +184,6 @@
               partDirectiveIndex: partDirectiveIndex,
               partUriStr: relativeUriStr,
               source: partSource,
-              sourceContent: text,
               isSynthetic: false,
               unit: unit,
             ),
@@ -215,7 +208,7 @@
     var unit = parseText(text, featureSet);
 
     var units = <LinkInputUnit>[];
-    _addLibraryUnits(source, units, featureSet);
+    _addLibraryUnits(source, unit, units, featureSet);
     libraries.add(
       LinkInputLibrary(
         source: source,
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 5bd8d77..6040c16 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -2004,6 +2004,29 @@
 ''');
   }
 
+  test_class_field_static_final_hasConstConstructor() async {
+    var library = await checkLibrary('''
+class C {
+  static final f = 0;
+  const C();
+}
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    classes
+      class C @6
+        fields
+          static final f @25
+            type: int
+        constructors
+          const @40
+        accessors
+          synthetic static get f @-1
+            returnType: int
+''');
+  }
+
   test_class_field_static_late() async {
     var library = await checkLibrary('class C { static late int i; }');
     checkElementText(library, r'''
@@ -2135,6 +2158,85 @@
 ''');
   }
 
+  test_class_fields_late_inference_usingSuper_methodInvocation() async {
+    var library = await checkLibrary('''
+class A {
+  int foo() => 0;
+}
+
+class B extends A {
+  late var f = super.foo();
+}
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    classes
+      class A @6
+        constructors
+          synthetic @-1
+        methods
+          foo @16
+            returnType: int
+      class B @37
+        supertype: A
+        fields
+          late f @62
+            type: int
+        constructors
+          synthetic @-1
+        accessors
+          synthetic get f @-1
+            returnType: int
+          synthetic set f @-1
+            parameters
+              requiredPositional _f @-1
+                type: int
+            returnType: void
+''');
+  }
+
+  test_class_fields_late_inference_usingSuper_propertyAccess() async {
+    var library = await checkLibrary('''
+class A {
+  int get foo => 0;
+}
+
+class B extends A {
+  late var f = super.foo;
+}
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    classes
+      class A @6
+        fields
+          synthetic foo @-1
+            type: int
+        constructors
+          synthetic @-1
+        accessors
+          get foo @20
+            returnType: int
+      class B @39
+        supertype: A
+        fields
+          late f @64
+            type: int
+        constructors
+          synthetic @-1
+        accessors
+          synthetic get f @-1
+            returnType: int
+          synthetic set f @-1
+            parameters
+              requiredPositional _f @-1
+                type: int
+            returnType: void
+''');
+  }
+
   test_class_getter_abstract() async {
     var library = await checkLibrary('abstract class C { int get x; }');
     checkElementText(library, r'''
@@ -10906,6 +11008,91 @@
 ''');
   }
 
+  test_const_topLevel_methodInvocation_questionPeriod() async {
+    var library = await checkLibrary(r'''
+const int? a = 0;
+const b = a?.toString();
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    topLevelVariables
+      static const a @11
+        type: int?
+        constantInitializer
+          IntegerLiteral
+            literal: 0 @15
+            staticType: int
+      static const b @24
+        type: String?
+        constantInitializer
+          MethodInvocation
+            argumentList: ArgumentList
+              leftParenthesis: ( @39
+              rightParenthesis: ) @40
+            methodName: SimpleIdentifier
+              staticElement: dart:core::@class::int::@method::toString
+              staticType: String Function()
+              token: toString @31
+            operator: ?. @29
+            staticInvokeType: String Function()
+            staticType: String?
+            target: SimpleIdentifier
+              staticElement: self::@getter::a
+              staticType: int?
+              token: a @28
+    accessors
+      synthetic static get a @-1
+        returnType: int?
+      synthetic static get b @-1
+        returnType: String?
+''');
+  }
+
+  test_const_topLevel_methodInvocation_questionPeriodPeriod() async {
+    var library = await checkLibrary(r'''
+const int? a = 0;
+const b = a?..toString();
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    topLevelVariables
+      static const a @11
+        type: int?
+        constantInitializer
+          IntegerLiteral
+            literal: 0 @15
+            staticType: int
+      static const b @24
+        type: int?
+        constantInitializer
+          CascadeExpression
+            cascadeSections
+              MethodInvocation
+                argumentList: ArgumentList
+                  leftParenthesis: ( @40
+                  rightParenthesis: ) @41
+                methodName: SimpleIdentifier
+                  staticElement: dart:core::@class::int::@method::toString
+                  staticType: String Function()
+                  token: toString @32
+                operator: ?.. @29
+                staticInvokeType: String Function()
+                staticType: String
+            staticType: int?
+            target: SimpleIdentifier
+              staticElement: self::@getter::a
+              staticType: int?
+              token: a @28
+    accessors
+      synthetic static get a @-1
+        returnType: int?
+      synthetic static get b @-1
+        returnType: int?
+''');
+  }
+
   test_const_topLevel_nullSafe_nullAware_propertyAccess() async {
     var library = await checkLibrary(r'''
 const String? a = '';
@@ -21356,478 +21543,6 @@
 ''');
   }
 
-  test_macro_autoConstructor() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const autoConstructor = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-@autoConstructor
-class A {
-  final int a;
-  final int? b;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @56
-        metadata
-          Annotation
-            atSign: @ @33
-            element: macro_annotations.dart::@getter::autoConstructor
-            name: SimpleIdentifier
-              staticElement: macro_annotations.dart::@getter::autoConstructor
-              staticType: null
-              token: autoConstructor @34
-        fields
-          final a @72
-            type: int
-          final b @88
-            type: int?
-        constructors
-          @94
-            parameters
-              requiredName final this.a @111
-                type: int
-              optionalNamed final this.b @119
-                type: int?
-        accessors
-          synthetic get a @-1
-            returnType: int
-          synthetic get b @-1
-            returnType: int?
-    macroGeneratedContent
-import 'macro_annotations.dart';
-@autoConstructor
-class A {
-  final int a;
-  final int? b;
-
-  A({required this.a, this.b});
-}
-''');
-  }
-
-  test_macro_dataClass() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const dataClass = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-@dataClass
-class A {
-  final int a;
-  final int b;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @50
-        metadata
-          Annotation
-            atSign: @ @33
-            element: macro_annotations.dart::@getter::dataClass
-            name: SimpleIdentifier
-              staticElement: macro_annotations.dart::@getter::dataClass
-              staticType: null
-              token: dataClass @34
-        fields
-          final a @66
-            type: int
-          final b @81
-            type: int
-          synthetic hashCode @-1
-            type: int
-        constructors
-          @87
-            parameters
-              requiredName final this.a @104
-                type: int
-              requiredName final this.b @121
-                type: int
-        accessors
-          synthetic get a @-1
-            returnType: int
-          synthetic get b @-1
-            returnType: int
-          get hashCode @149
-            metadata
-              Annotation
-                atSign: @ @129
-                element: dart:core::@getter::override
-                name: SimpleIdentifier
-                  staticElement: dart:core::@getter::override
-                  staticType: null
-                  token: override @130
-            returnType: int
-        methods
-          toString @208
-            metadata
-              Annotation
-                atSign: @ @189
-                element: dart:core::@getter::override
-                name: SimpleIdentifier
-                  staticElement: dart:core::@getter::override
-                  staticType: null
-                  token: override @190
-            returnType: String
-    macroGeneratedContent
-import 'macro_annotations.dart';
-@dataClass
-class A {
-  final int a;
-  final int b;
-
-  A({required this.a, required this.b});
-
-  @override
-  int get hashCode => a.hashCode ^ b.hashCode;
-
-  @override
-  String toString() => 'A(a: $a, b: $b)';
-}
-''');
-  }
-
-  test_macro_hashCode() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @49
-        metadata
-          Annotation
-            atSign: @ @33
-            element: macro_annotations.dart::@getter::hashCode
-            name: SimpleIdentifier
-              staticElement: macro_annotations.dart::@getter::hashCode
-              staticType: null
-              token: hashCode @34
-        fields
-          final a @65
-            type: int
-          final b @80
-            type: int
-          synthetic hashCode @-1
-            type: int
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get a @-1
-            returnType: int
-          synthetic get b @-1
-            returnType: int
-          get hashCode @106
-            metadata
-              Annotation
-                atSign: @ @0
-                element: dart:core::@getter::override
-                name: SimpleIdentifier
-                  staticElement: dart:core::@getter::override
-                  staticType: null
-                  token: override @1
-            returnType: int
-    macroGeneratedContent
-import 'macro_annotations.dart';
-@hashCode
-class A {
-  final int a;
-  final int b;
-
-  @override
-  int get hashCode => a.hashCode ^ b.hashCode;
-}
-''');
-  }
-
-  test_macro_hashCode_withSuper() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const hashCode = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-
-class A {
-  final int a;
-}
-
-@hashCode
-class B extends A {
-  final int b;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @40
-        fields
-          final a @56
-            type: int
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get a @-1
-            returnType: int
-      class B @78
-        metadata
-          Annotation
-            atSign: @ @62
-            element: macro_annotations.dart::@getter::hashCode
-            name: SimpleIdentifier
-              staticElement: macro_annotations.dart::@getter::hashCode
-              staticType: null
-              token: hashCode @63
-        supertype: A
-        fields
-          final b @104
-            type: int
-          synthetic hashCode @-1
-            type: int
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get b @-1
-            returnType: int
-          get hashCode @130
-            metadata
-              Annotation
-                atSign: @ @110
-                element: dart:core::@getter::override
-                name: SimpleIdentifier
-                  staticElement: dart:core::@getter::override
-                  staticType: null
-                  token: override @111
-            returnType: int
-    macroGeneratedContent
-import 'macro_annotations.dart';
-
-class A {
-  final int a;
-}
-
-@hashCode
-class B extends A {
-  final int b;
-
-  @override
-  int get hashCode => b.hashCode ^ a.hashCode;
-}
-''');
-  }
-
-  test_macro_observable() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const observable = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-class A {
-  @observable
-  int _f = 0;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @39
-        fields
-          _f @63
-            metadata
-              Annotation
-                atSign: @ @45
-                element: macro_annotations.dart::@getter::observable
-                name: SimpleIdentifier
-                  staticElement: macro_annotations.dart::@getter::observable
-                  staticType: null
-                  token: observable @46
-            type: int
-          synthetic f @-1
-            type: int
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get _f @-1
-            returnType: int
-          synthetic set _f @-1
-            parameters
-              requiredPositional __f @-1
-                type: int
-            returnType: void
-          get f @82
-            returnType: int
-          set f @98
-            parameters
-              requiredPositional val @104
-                type: int
-            returnType: void
-    macroGeneratedContent
-import 'macro_annotations.dart';
-class A {
-  @observable
-  int _f = 0;
-
-  int get f => _f;
-
-  set f(int val) {
-    print('Setting f to ${val}');
-    _f = val;
-  }
-}
-''');
-  }
-
-  test_macro_observable_generic() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const observable = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-class A<T> {
-  @observable
-  T _f;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @39
-        typeParameters
-          covariant T @41
-            defaultType: dynamic
-        fields
-          _f @64
-            metadata
-              Annotation
-                atSign: @ @48
-                element: macro_annotations.dart::@getter::observable
-                name: SimpleIdentifier
-                  staticElement: macro_annotations.dart::@getter::observable
-                  staticType: null
-                  token: observable @49
-            type: T
-          synthetic f @-1
-            type: T
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get _f @-1
-            returnType: T
-          synthetic set _f @-1
-            parameters
-              requiredPositional __f @-1
-                type: T
-            returnType: void
-          get f @77
-            returnType: T
-          set f @93
-            parameters
-              requiredPositional val @97
-                type: T
-            returnType: void
-    macroGeneratedContent
-import 'macro_annotations.dart';
-class A<T> {
-  @observable
-  T _f;
-
-  T get f => _f;
-
-  set f(T val) {
-    print('Setting f to ${val}');
-    _f = val;
-  }
-}
-''');
-  }
-
-  test_macro_toString() async {
-    addLibrarySource('/macro_annotations.dart', r'''
-library analyzer.macro.annotations;
-const toString = 0;
-''');
-    var library = await checkLibrary(r'''
-import 'macro_annotations.dart';
-@toString
-class A {
-  final int a;
-  final int b;
-}
-''');
-    checkElementText(library, r'''
-library
-  imports
-    macro_annotations.dart
-  definingUnit
-    classes
-      class A @49
-        metadata
-          Annotation
-            atSign: @ @33
-            element: macro_annotations.dart::@getter::toString
-            name: SimpleIdentifier
-              staticElement: macro_annotations.dart::@getter::toString
-              staticType: null
-              token: toString @34
-        fields
-          final a @65
-            type: int
-          final b @80
-            type: int
-        constructors
-          synthetic @-1
-        accessors
-          synthetic get a @-1
-            returnType: int
-          synthetic get b @-1
-            returnType: int
-        methods
-          toString @105
-            metadata
-              Annotation
-                atSign: @ @86
-                element: dart:core::@getter::override
-                name: SimpleIdentifier
-                  staticElement: dart:core::@getter::override
-                  staticType: null
-                  token: override @87
-            returnType: String
-    macroGeneratedContent
-import 'macro_annotations.dart';
-@toString
-class A {
-  final int a;
-  final int b;
-
-  @override
-  String toString() => 'A(a: $a, b: $b)';
-}
-''');
-  }
-
   test_main_class() async {
     var library = await checkLibrary('class main {}');
     checkElementText(library, r'''
@@ -33649,7 +33364,7 @@
     expect(variable, isNotNull);
     expect(variable.isFinal, isFalse);
     expect(variable.getter, same(getter));
-    expect('${variable.type}', 'int');
+    _assertTypeStr(variable.type, 'int');
     expect(variable, same(_elementOfDefiningUnit(library, ['@variable', 'x'])));
   }
 
diff --git a/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
index 9fd3a24..f6afa71 100644
--- a/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
+++ b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/summary2/ast_text_printer.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -13,7 +11,6 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AstTextPrinterTest);
-    defineReflectiveTests(AstTextPrinterWithNullSafetyTest);
   });
 }
 
@@ -79,6 +76,12 @@
 ''');
   }
 
+  test_genericFunctionType_question() async {
+    assertParseCodeAndPrintAst(this, '''
+void Function()? a;
+''');
+  }
+
   test_ifElement_then() async {
     assertParseCodeAndPrintAst(this, r'''
 var _ = [1, if (true) 2, 3];
@@ -121,20 +124,6 @@
 var _ = [1, ...?[2, 3], 4];
 ''');
   }
-}
-
-@reflectiveTest
-class AstTextPrinterWithNullSafetyTest extends ParseBase {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.10.0', additionalFeatures: [Feature.non_nullable]);
-
-  test_genericFunctionType_question() async {
-    assertParseCodeAndPrintAst(this, '''
-void Function()? a;
-''');
-  }
 
   test_typeName_question() async {
     assertParseCodeAndPrintAst(this, '''
diff --git a/pkg/analyzer/test/src/workspace/bazel_test.dart b/pkg/analyzer/test/src/workspace/bazel_test.dart
index 3e22df8..88e983e 100644
--- a/pkg/analyzer/test/src/workspace/bazel_test.dart
+++ b/pkg/analyzer/test/src/workspace/bazel_test.dart
@@ -658,6 +658,26 @@
     expect(package?.workspace, equals(workspace));
   }
 
+  void test_findPackageFor_generatedFileInBlazeOutAndBin() {
+    _addResources([
+      '/ws/blaze-out/host/bin/some/code/code.packages',
+      '/ws/blaze-out/host/bin/some/code/code.dart',
+      '/ws/blaze-bin/some/code/code.dart',
+    ]);
+    workspace = BazelWorkspace.find(
+      resourceProvider,
+      convertPath('/ws/some/code/testing'),
+    )!;
+
+    // Make sure that we can find the package of the generated file.
+    var file = workspace.findFile(convertPath('/ws/some/code/code.dart'));
+    package = workspace.findPackageFor(file!.path);
+
+    expect(package, isNotNull);
+    expect(package?.root, convertPath('/ws/some/code'));
+    expect(package?.workspace, equals(workspace));
+  }
+
   void test_findPackageFor_inBlazeOut_notPackage() {
     var path =
         convertPath('/ws/blaze-out/k8-opt/bin/news/lib/news_base.pb.dart');
@@ -858,8 +878,8 @@
         resourceProvider, convertPath('/workspace/my/module'))!;
     expect(workspace.root, convertPath('/workspace'));
     expect(workspace.readonly, isNull);
-    expect(workspace.binPaths.single,
-        convertPath('/workspace/blaze-out/host/bin'));
+    expect(
+        workspace.binPaths.first, convertPath('/workspace/blaze-out/host/bin'));
     expect(workspace.genfiles, convertPath('/workspace/blaze-genfiles'));
     expect(
         workspace
@@ -893,11 +913,12 @@
         resourceProvider, convertPath('/workspace/my/module'))!;
     expect(workspace.root, convertPath('/workspace'));
     expect(workspace.readonly, isNull);
-    expect(workspace.binPaths, hasLength(2));
+    expect(workspace.binPaths, hasLength(3));
     expect(workspace.binPaths,
         contains(convertPath('/workspace/blaze-out/host/bin')));
     expect(workspace.binPaths,
         contains(convertPath('/workspace/blaze-out/k8-fastbuild/bin')));
+    expect(workspace.binPaths, contains(convertPath('/workspace/blaze-bin')));
     expect(workspace.genfiles, convertPath('/workspace/blaze-genfiles'));
   }
 
diff --git a/pkg/analyzer/test/util/ast_type_matchers.dart b/pkg/analyzer/test/util/ast_type_matchers.dart
index 71a811d..84567e1 100644
--- a/pkg/analyzer/test/util/ast_type_matchers.dart
+++ b/pkg/analyzer/test/util/ast_type_matchers.dart
@@ -275,8 +275,6 @@
 
 const isTypedLiteral = TypeMatcher<TypedLiteral>();
 
-const isTypeName = TypeMatcher<TypeName>();
-
 const isTypeParameter = TypeMatcher<TypeParameter>();
 
 const isTypeParameterList = TypeMatcher<TypeParameterList>();
diff --git a/pkg/analyzer/test/util/id_testing_helper.dart b/pkg/analyzer/test/util/id_testing_helper.dart
index f192694..aeb8011 100644
--- a/pkg/analyzer/test/util/id_testing_helper.dart
+++ b/pkg/analyzer/test/util/id_testing_helper.dart
@@ -26,18 +26,10 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 
-/// Test configuration used for testing the analyzer with constant evaluation.
-final TestConfig analyzerConstantUpdate2018Config = TestConfig(
-    analyzerMarker, 'analyzer with constant-update-2018',
-    featureSet: FeatureSet.forTesting(
-        sdkVersion: '2.2.2',
-        additionalFeatures: [Feature.constant_update_2018]));
-
-/// Test configuration used for testing the analyzer with NNBD.
-final TestConfig analyzerNnbdConfig = TestConfig(
-    analyzerMarker, 'analyzer with NNBD',
-    featureSet: FeatureSet.forTesting(
-        sdkVersion: '2.2.2', additionalFeatures: [Feature.non_nullable]));
+/// Test configuration used for testing the analyzer without experiments.
+final TestConfig analyzerDefaultConfig = TestConfig(
+    analyzerMarker, 'analyzer without experiments',
+    featureSet: FeatureSet.latestLanguageVersion());
 
 /// A fake absolute directory used as the root of a memory-file system in ID
 /// tests.
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index a6571b2..9c1892b 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -2644,8 +2644,12 @@
 
 ### const_with_type_parameters
 
+_A constant constructor tearoff can't use a type parameter as a type argument._
+
 _A constant creation can't use a type parameter as a type argument._
 
+_A constant function tearoff can't use a type parameter as a type argument._
+
 #### Description
 
 The analyzer produces this diagnostic when a type parameter is used as a
@@ -3092,6 +3096,40 @@
 }
 {% endprettify %}
 
+### default_value_on_required_parameter
+
+_Required named parameters can't have a default value._
+
+#### Description
+
+The analyzer produces this diagnostic when a named parameter has both the
+`required` modifier and a default value. If the parameter is required, then
+a value for the parameter is always provided at the call sites, so the
+default value can never be used.
+
+#### Examples
+
+The following code generates this diagnostic:
+
+{% prettify dart tag=pre+code %}
+void log({required String [!message!] = 'no message'}) {}
+{% endprettify %}
+
+#### Common fixes
+
+If the parameter is really required, then remove the default value:
+
+{% prettify dart tag=pre+code %}
+void log({required String message}) {}
+{% endprettify %}
+
+If the parameter isn't always required, then remove the `required`
+modifier:
+
+{% prettify dart tag=pre+code %}
+void log({String message = 'no message'}) {}
+{% endprettify %}
+
 ### deferred_import_of_extension
 
 _Imports of deferred libraries must hide all extensions._
@@ -5281,6 +5319,50 @@
 }
 {% endprettify %}
 
+### generic_method_type_instantiation_on_dynamic
+
+_A method tear-off on a receiver whose type is 'dynamic' can't have type
+arguments._
+
+#### Description
+
+The analyzer produces this diagnostic when an instance method is being torn
+off from a receiver whose type is `dynamic`, and the tear-off includes type
+arguments. Because the analyzer can't know how many type parameters the
+method has, or whether it has any type parameters, there's no way it can
+validate that the type arguments are correct. As a result, the type
+arguments aren't allowed.
+
+#### Example
+
+The following code produces this diagnostic because the type of `p` is
+`dynamic` and the tear-off of `m` has type arguments:
+
+{% prettify dart tag=pre+code %}
+void f(dynamic list) {
+  [!list.fold!]<int>;
+}
+{% endprettify %}
+
+#### Common fixes
+
+If you can use a more specific type than `dynamic`, then change the type of
+the receiver:
+
+{% prettify dart tag=pre+code %}
+void f(List<Object> list) {
+  list.fold<int>;
+}
+{% endprettify %}
+
+If you can't use a more specific type, then remove the type arguments:
+
+{% prettify dart tag=pre+code %}
+void f(dynamic list) {
+  list.cast;
+}
+{% endprettify %}
+
 ### getter_not_subtype_setter_types
 
 _The return type of getter '{0}' is '{1}' which isn't a subtype of the type
@@ -6110,6 +6192,48 @@
 
 If you intend to use an instance of a class, then use the name of that class in place of the name of the enum.
 
+### instantiate_type_alias_expands_to_type_parameter
+
+_Type aliases that expand to a type parameter can't be instantiated._
+
+#### Description
+
+The analyzer produces this diagnostic when a constructor invocation is
+found where the type being instantiated is a type alias for one of the type
+parameters of the type alias. This isn’t allowed because the value of the
+type parameter is a type rather than a class.
+
+#### Example
+
+The following code produces this diagnostic because it creates an instance
+of `A`, even though `A` is a type alias that is defined to be equivalent to
+a type parameter:
+
+{% prettify dart tag=pre+code %}
+typedef A<T> = T;
+
+void f() {
+  const [!A!]<int>();
+}
+{% endprettify %}
+
+#### Common fixes
+
+Use either a class name or a type alias defined to be a class, rather than
+a type alias defined to be a type parameter:
+
+{% prettify dart tag=pre+code %}
+typedef A<T> = C<T>;
+
+void f() {
+  const A<int>();
+}
+
+class C<T> {
+  const C();
+}
+{% endprettify %}
+
 ### integer_literal_imprecise_as_double
 
 _The integer literal is being used as a double, but can't be represented as a
@@ -6247,6 +6371,57 @@
 }
 {% endprettify %}
 
+### invalid_annotation_constant_value_from_deferred_library
+
+_Constant values from a deferred library can't be used in annotations._
+
+#### Description
+
+The analyzer produces this diagnostic when a constant defined in a library
+that is imported as a deferred library is referenced in the argument list
+of an annotation. Annotations are evaluated at compile time, and values
+from deferred libraries aren't available at compile time.
+
+For more information, see the language tour's coverage of
+[deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+
+#### Example
+
+The following code produces this diagnostic because the constant `pi` is
+being referenced in the argument list of an annotation, even though the
+library that defines it is being imported as a deferred library:
+
+{% prettify dart tag=pre+code %}
+import 'dart:math' deferred as math;
+
+class C {
+  const C(double d);
+}
+
+@C([!math.pi!])
+void f () {}
+{% endprettify %}
+
+#### Common fixes
+
+If you need to reference the imported constant, then remove the `deferred`
+keyword:
+
+{% prettify dart tag=pre+code %}
+import 'dart:math' as math;
+
+class C {
+  const C(double d);
+}
+
+@C(math.pi)
+void f () {}
+{% endprettify %}
+
+If the import is required to be deferred and there's another constant that
+is appropriate, then use that constant in place of the constant from the
+deferred library.
+
 ### invalid_annotation_from_deferred_library
 
 _Constant values from a deferred library can't be used as annotations._
@@ -6711,7 +6886,7 @@
 
 ### invalid_modifier_on_setter
 
-_The modifier '{0}' can't be applied to the body of a setter._
+_Setters can't use 'async', 'async*', or 'sync*'._
 
 #### Description
 
@@ -6759,7 +6934,7 @@
 #### Description
 
 The analyzer produces this diagnostic when a null-aware operator (`?.`,
-`?..`, `?[`, `?..[`, or `...?`) is used on a target that's known to be
+`?..`, `?[`, `?..[`, or `...?`) is used on a receiver that's known to be
 non-nullable.
 
 #### Example
@@ -7098,7 +7273,7 @@
 
 ### invalid_use_of_covariant_in_extension
 
-_Can't have modifier '#lexeme' in an extension._
+_Can't have modifier '{0}' in an extension._
 
 #### Description
 
@@ -7159,6 +7334,47 @@
 }
 {% endprettify %}
 
+### invalid_use_of_visible_for_overriding_member
+
+_The member '{0}' can only be used for overriding._
+
+#### Description
+
+The analyzer produces this diagnostic when an instance member that is
+annotated with `visibleForOverriding` is referenced outside the library in
+which it's declared for any reason other than to override it.
+
+#### Example
+
+Given a file named `a.dart` containing the following declaration:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+class A {
+  @visibleForOverriding
+  void a() {}
+}
+{% endprettify %}
+
+The following code produces this diagnostic because the method `m` is being
+invoked even though the only reason it's public is to allow it to be
+overridden:
+
+{% prettify dart tag=pre+code %}
+import 'a.dart';
+
+class B extends A {
+  void b() {
+    [!a!]();
+  }
+}
+{% endprettify %}
+
+#### Common fixes
+
+Remove the invalid use of the member.
+
 ### invalid_visibility_annotation
 
 _The member '{0}' is annotated with '{1}', but this annotation is only
@@ -7204,6 +7420,38 @@
 void f() => someFunction();
 {% endprettify %}
 
+### invalid_visible_for_overriding_annotation
+
+_The declaration '{0}' is annotated with 'visibleForOverriding'. Because '{0}'
+isn't an interface member that could be overridden, the annotation is meaningless._
+
+#### Description
+
+The analyzer produces this diagnostic when anything other than a public
+instance member of a class is annotated with `visibleForOverriding`.
+Because only public instance members can be overridden outside the defining
+library, there's no value to annotating any other declarations.
+
+#### Example
+
+The following code produces this diagnostic because the annotation is on a
+class, and classes can't be overridden:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+[!@visibleForOverriding!]
+class C {}
+{% endprettify %}
+
+#### Common fixes
+
+Remove the annotation:
+
+{% prettify dart tag=pre+code %}
+class C {}
+{% endprettify %}
+
 ### invocation_of_extension_without_call
 
 _The extension '{0}' doesn't define a 'call' method so the override can't be
@@ -8187,6 +8435,7 @@
 #### Example
 
 The following code produces this diagnostic because the mixin `M` requires
+that the class to which it's applied be a subclass of `A`, but `Object`
 isn't a subclass of `A`:
 
 {% prettify dart tag=pre+code %}
@@ -9824,6 +10073,32 @@
 
 Replace the name with the name of a type.
 
+### not_binary_operator
+
+_'{0}' isn't a binary operator._
+
+#### Description
+
+The analyzer produces this diagnostic when an operator that can only be
+used as a unary operator is used as a binary operator.
+
+#### Example
+
+The following code produces this diagnostic because the operator `~` can
+only be used as a unary operator:
+
+{% prettify dart tag=pre+code %}
+var a = 5 [!~!] 3;
+{% endprettify %}
+
+#### Common fixes
+
+Replace the operator with the correct binary operator:
+
+{% prettify dart tag=pre+code %}
+var a = 5 - 3;
+{% endprettify %}
+
 ### not_enough_positional_arguments
 
 _{0} positional argument(s) expected, but {1} found._
@@ -10322,6 +10597,41 @@
 class C with M {}
 {% endprettify %}
 
+### null_argument_to_non_null_type
+
+_'{0}' shouldn't be called with a null argument for the non-nullable type
+argument '{1}'._
+
+#### Description
+
+The analyzer produces this diagnostic when `null` is passed to either the
+constructor `Future.value` or the method `Completer.complete` when the type
+argument used to create the instance was non-nullable. Even though the type
+system can't express this restriction, passing in a `null` results in a
+runtime exception.
+
+#### Example
+
+The following code produces this diagnostic because `null` is being passed
+to the constructor `Future.value` even though the type argument is the
+non-nullable type `String`:
+
+{% prettify dart tag=pre+code %}
+Future<String> f() {
+  return Future.value([!null!]);
+}
+{% endprettify %}
+
+#### Common fixes
+
+Pass in a non-null value:
+
+{% prettify dart tag=pre+code %}
+Future<String> f() {
+  return Future.value('');
+}
+{% endprettify %}
+
 ### on_repeated
 
 _The type '{0}' can be included in the superclass constraints only once._
@@ -11245,6 +11555,47 @@
 }
 {% endprettify %}
 
+### redirect_to_type_alias_expands_to_type_parameter
+
+_A redirecting constructor can't redirect to a type alias that expands to a type
+parameter._
+
+#### Description
+
+The analyzer produces this diagnostic when a redirecting factory
+constructor redirects to a type alias, and the type alias expands to one of
+the type parameters of the type alias. This isn’t allowed because the value
+of the type parameter is a type rather than a class.
+
+#### Example
+
+The following code produces this diagnostic because the redirect to `B<A>`
+is to a type alias whose value is `T`, even though it looks like the value
+should be `A`:
+
+{% prettify dart tag=pre+code %}
+class A implements C {}
+
+typedef B<T> = T;
+
+abstract class C {
+  factory C() = [!B!]<A>;
+}
+{% endprettify %}
+
+#### Common fixes
+
+Use either a class name or a type alias that is defined to be a class
+rather than a type alias defined to be a type parameter:
+
+{% prettify dart tag=pre+code %}
+class A implements C {}
+
+abstract class C {
+  factory C() = A;
+}
+{% endprettify %}
+
 ### referenced_before_declaration
 
 _Local variable '{0}' can't be referenced before it is declared._
@@ -11399,9 +11750,9 @@
 #### Description
 
 The analyzer produces this diagnostic when a generator function (one whose
-body is marked with either `async*` or `sync*`) uses a `return` statement
-to return a value. In both cases, they should use `yield` instead of
-`return`.
+body is marked with either `async*` or `sync*`) uses either a `return`
+statement to return a value or implicitly returns a value because of using
+`=>`. In any of these cases, they should use `yield` instead of `return`.
 
 #### Example
 
@@ -11414,8 +11765,24 @@
 }
 {% endprettify %}
 
+The following code produces this diagnostic because the function `f` is a
+generator and is implicitly returning a value:
+
+{% prettify dart tag=pre+code %}
+Stream<int> f() async* [!=>!] 3;
+{% endprettify %}
+
 #### Common fixes
 
+If the function is using `=>` for the body of the function, then convert it
+to a block function body, and use `yield` to return a value:
+
+{% prettify dart tag=pre+code %}
+Stream<int> f() async* {
+  yield 3;
+}
+{% endprettify %}
+
 If the method is intended to be a generator, then use `yield` to return a
 value:
 
@@ -11685,6 +12052,52 @@
 bool c = a & b;
 {% endprettify %}
 
+### sdk_version_constructor_tearoffs
+
+_Tearing off a constructor requires the 'constructor-tearoffs' language
+feature._
+
+#### Description
+
+The analyzer produces this diagnostic when a constructor tear-off is found
+in code that has an SDK constraint whose lower bound is less than 2.15.
+Constructor tear-offs weren't supported in earlier versions, so this code
+won't be able to run against earlier versions of the SDK.
+
+#### Example
+
+Here's an example of a pubspec that defines an SDK constraint with a lower
+bound of less than 2.15:
+
+```yaml
+environment:
+  sdk: '>=2.9.0 <2.15.0'
+```
+
+In the package that has that pubspec, code like the following produces this
+diagnostic:
+
+{% prettify dart tag=pre+code %}
+var setConstructor = [!Set.identity!];
+{% endprettify %}
+
+#### Common fixes
+
+If you don't need to support older versions of the SDK, then you can
+increase the SDK constraint to allow the operator to be used:
+
+```yaml
+environment:
+  sdk: '>=2.15.0 <2.16.0'
+```
+
+If you need to support older versions of the SDK, then rewrite the code to
+not use constructor tear-offs:
+
+{% prettify dart tag=pre+code %}
+var setConstructor = () => Set.identity();
+{% endprettify %}
+
 ### sdk_version_eq_eq_operator_in_const_context
 
 _Using the operator '==' for non-primitive types wasn't supported until version
@@ -11794,6 +12207,60 @@
 }
 {% endprettify %}
 
+### sdk_version_gt_gt_gt_operator
+
+_The operator '>>>' wasn't supported until version 2.14.0, but this code is
+required to be able to run on earlier versions._
+
+#### Description
+
+The analyzer produces this diagnostic when the operator `>>>` is used in
+code that has an SDK constraint whose lower bound is less than 2.14.0. This
+operator 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.14.0:
+
+```yaml
+environment:
+ sdk: '>=2.0.0 <2.15.0'
+```
+
+In the package that has that pubspec, code like the following produces this
+diagnostic:
+
+{% prettify dart tag=pre+code %}
+int x = 3 [!>>>!] 4;
+{% endprettify %}
+
+#### Common fixes
+
+If you don't need to support older versions of the SDK, then you can
+increase the SDK constraint to allow the operator to be used:
+
+```yaml
+environment:
+  sdk: '>=2.14.0 <2.15.0'
+```
+
+If you need to support older versions of the SDK, then rewrite the code to
+not use the `>>>` operator:
+
+{% prettify dart tag=pre+code %}
+int x = logicalShiftRight(3, 4);
+
+int logicalShiftRight(int leftOperand, int rightOperand) {
+  int divisor = 1 << rightOperand;
+  if (divisor == 0) {
+    return 0;
+  }
+  return leftOperand ~/ divisor;
+}
+{% endprettify %}
+
 ### sdk_version_is_expression_in_const_context
 
 _The use of an is expression in a constant context wasn't supported until
@@ -12520,6 +12987,36 @@
 }
 {% endprettify %}
 
+### tearoff_of_generative_constructor_of_abstract_class
+
+_A generative constructor of an abstract class can't be torn off._
+
+#### Description
+
+The analyzer produces this diagnostic when a generative constructor from an
+abstract class is being torn off. This isn't allowed because it isn't valid
+to create an instance of an abstract class, which means that there isn't
+any valid use for the torn off constructor.
+
+#### Example
+
+The following code produces this diagnostic because the constructor `C.new`
+is being torn off and the class `C` is an abstract class:
+
+{% prettify dart tag=pre+code %}
+abstract class C {
+  C();
+}
+
+void f() {
+  [!C.new!];
+}
+{% endprettify %}
+
+#### Common fixes
+
+Tear off the constructor of a concrete class.
+
 ### throw_of_invalid_type
 
 _The type '{0}' of the thrown expression must be assignable to 'Object'._
@@ -13545,6 +14042,8 @@
 
 ### undefined_getter
 
+_The getter '{0}' isn't defined for the '{1}' function type._
+
 _The getter '{0}' isn't defined for the type '{1}'._
 
 #### Description
@@ -13666,6 +14165,8 @@
 
 ### undefined_method
 
+_The method '{0}' isn't defined for the '{1}' function type._
+
 _The method '{0}' isn't defined for the type '{1}'._
 
 #### Description
@@ -13826,8 +14327,44 @@
 If the name is wrong, then change it to one of the names that's declared in
 the imported libraries.
 
+### undefined_referenced_parameter
+
+_The parameter '{0}' is not defined by '{1}'._
+
+#### Description
+
+The analyzer produces this diagnostic when an annotation of the form
+`@UnusedResult.unless(parameterDefined: parameterName)` specifies a
+parameter name that isn't defined by the annotated function.
+
+#### Example
+
+The following code produces this diagnostic because the function `f`
+doesn't have a parameter named `b`:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+@UseResult.unless(parameterDefined: [!'b'!])
+int f([int? a]) => a ?? 0;
+{% endprettify %}
+
+#### Common fixes
+
+Change the argument named `parameterDefined` to match the name of one of
+the parameters to the function:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+@UseResult.unless(parameterDefined: 'a')
+int f([int? a]) => a ?? 0;
+{% endprettify %}
+
 ### undefined_setter
 
+_The setter '{0}' isn't defined for the '{1}' function type._
+
 _The setter '{0}' isn't defined for the type '{1}'._
 
 #### Description
@@ -14017,6 +14554,52 @@
   meta: ^1.0.2
 ```
 
+### unnecessary_import
+
+_The import of '{0}' is unnecessary because all of the used elements are also
+provided by the import of '{1}'._
+
+#### Description
+
+The analyzer produces this diagnostic when an import isn't needed because
+all of the names that are imported and referenced within the importing
+library are also visible through another import.
+
+#### Example
+
+Given a file named `a.dart` that contains the following:
+
+{% prettify dart tag=pre+code %}
+class A {}
+{% endprettify %}
+
+And, given a file named `b.dart` that contains the following:
+
+{% prettify dart tag=pre+code %}
+export 'a.dart';
+
+class B {}
+{% endprettify %}
+
+The following code produces this diagnostic because the class `A`, which is
+imported from `a.dart`, is also imported from `b.dart`. Removing the import
+of `a.dart` leaves the semantics unchanged:
+
+{% prettify dart tag=pre+code %}
+import [!'a.dart'!];
+import 'b.dart';
+
+void f(A a, B b) {}
+{% endprettify %}
+
+#### Common fixes
+
+If the import isn't needed, then remove it.
+
+If some of the names imported by this import are intended to be used but
+aren't yet, and if those names aren't imported by other imports, then add
+the missing references to those names.
+
 ### unnecessary_non_null_assertion
 
 _The '!' will have no effect because the receiver can't be null._
@@ -14152,6 +14735,33 @@
 }
 {% endprettify %}
 
+### unnecessary_question_mark
+
+_The '?' is unnecessary because '{0}' is nullable without it._
+
+#### Description
+
+The analyzer produces this diagnostic when either the type `dynamic` or the
+type `Null` is followed by a question mark. Both of these types are
+inherently nullable so the question mark doesn't change the semantics.
+
+#### Example
+
+The following code produces this diagnostic because the question mark
+following `dynamic` isn't necessary:
+
+{% prettify dart tag=pre+code %}
+dynamic[!?!] x;
+{% endprettify %}
+
+#### Common fixes
+
+Remove the unneeded question mark:
+
+{% prettify dart tag=pre+code %}
+dynamic x;
+{% endprettify %}
+
 ### unnecessary_type_check
 
 _Unnecessary type check; the result is always 'false'._
@@ -14431,15 +15041,24 @@
 
 #### Examples
 
-The following code produces this diagnostic because `_x` isn't referenced
-anywhere in the library:
+The following code produces this diagnostic because the field
+`_originalValue` isn't read anywhere in the library:
 
 {% prettify dart tag=pre+code %}
-class Point {
-  int [!_x!];
+class C {
+  final String [!_originalValue!];
+  final String _currentValue;
+
+  C(this._originalValue) : _currentValue = _originalValue;
+
+  String get value => _currentValue;
 }
 {% endprettify %}
 
+It might appear that the field `_originalValue` is being read in the
+initializer (`_currentValue = _originalValue`), but that is actually a
+reference to the parameter of the same name, not a reference to the field.
+
 #### Common fixes
 
 If the field isn't needed, then remove it.
@@ -14545,6 +15164,79 @@
 
 If the variable was intended to be used, then add the missing code.
 
+### unused_result
+
+_'{0}' should be used. {1}._
+
+_The value of '{0}' should be used._
+
+#### Description
+
+The analyzer produces this diagnostic when a function annotated with
+`useResult` is invoked, and the value returned by that function isn't used.
+The value is considered to be used if a member of the value is invoked, if
+the value is passed to another function, or if the value is assigned to a
+variable or field.
+
+#### Example
+
+The following code produces this diagnostic because the invocation of
+`c.a()` isn't used, even though the method `a` is annotated with
+`useResult`:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+class C {
+  @useResult
+  int a() => 0;
+
+  int b() => 0;
+}
+
+void f(C c) {
+  c.[!a!]();
+}
+{% endprettify %}
+
+#### Common fixes
+
+If you intended to invoke the annotated function, then use the value that
+was returned:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+class C {
+  @useResult
+  int a() => 0;
+
+  int b() => 0;
+}
+
+void f(C c) {
+  print(c.a());
+}
+{% endprettify %}
+
+If you intended to invoke a different function, then correct the name of
+the function being invoked:
+
+{% prettify dart tag=pre+code %}
+import 'package:meta/meta.dart';
+
+class C {
+  @useResult
+  int a() => 0;
+
+  int b() => 0;
+}
+
+void f(C c) {
+  c.b();
+}
+{% endprettify %}
+
 ### unused_shown_name
 
 _The name {0} is shown, but isn’t used._
@@ -14667,6 +15359,30 @@
 var zero = min(0, 0);
 {% endprettify %}
 
+### use_of_native_extension
+
+_Dart native extensions are deprecated and aren’t available in Dart 2.15._
+
+#### Description
+
+The analyzer produces this diagnostic when a library is imported using the
+`dart-ext` scheme.
+
+#### Example
+
+The following code produces this diagnostic because the native library `x`
+is being imported using a scheme of `dart-ext`:
+
+{% prettify dart tag=pre+code %}
+[!import 'dart-ext:x';!]
+int f() native 'string';
+{% endprettify %}
+
+#### Common fixes
+
+Rewrite the code to use `dart:ffi` as a way of invoking the contents of the
+native library.
+
 ### use_of_void_result
 
 _This expression has a type of 'void' so its value can't be used._
diff --git a/pkg/analyzer/tool/diagnostics/generate.dart b/pkg/analyzer/tool/diagnostics/generate.dart
index e431fb0..30b25bc 100644
--- a/pkg/analyzer/tool/diagnostics/generate.dart
+++ b/pkg/analyzer/tool/diagnostics/generate.dart
@@ -30,10 +30,17 @@
   String packageRoot = pathContext.normalize(package_root.packageRoot);
   String analyzerPath = pathContext.join(packageRoot, 'analyzer');
   return CodePath.from([
-    [analyzerPath, 'lib', 'src', 'dart', 'error', 'hint_codes.dart'],
-    [analyzerPath, 'lib', 'src', 'dart', 'error', 'syntactic_errors.dart'],
-    [analyzerPath, 'lib', 'src', 'error', 'codes.dart'],
-    [analyzerPath, 'lib', 'src', 'pubspec', 'pubspec_warning_code.dart'],
+    [analyzerPath, 'lib', 'src', 'dart', 'error', 'hint_codes.g.dart'],
+    [
+      analyzerPath,
+      'lib',
+      'src',
+      'dart',
+      'error',
+      'syntactic_errors.analyzer.g.dart'
+    ],
+    [analyzerPath, 'lib', 'src', 'error', 'codes.g.dart'],
+    [analyzerPath, 'lib', 'src', 'pubspec', 'pubspec_warning_code.g.dart'],
   ], [
     null,
     [analyzerPath, 'lib', 'src', 'dart', 'error', 'syntactic_errors.g.dart'],
diff --git a/pkg/analyzer/tool/macro/generate.dart b/pkg/analyzer/tool/macro/generate.dart
deleted file mode 100644
index 2cc9a41..0000000
--- a/pkg/analyzer/tool/macro/generate.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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.
-
-import 'dart:io' as io;
-
-import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
-import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/util/file_paths.dart' as file_paths;
-
-void main(List<String> arguments) async {
-  if (arguments.length != 1) {
-    _printUsage();
-    io.exit(1);
-  }
-
-  var resourceProvider = PhysicalResourceProvider.INSTANCE;
-  var pathContext = resourceProvider.pathContext;
-
-  // The directory must exist.
-  var packagePath = arguments[0];
-  var packageFolder = resourceProvider.getFolder(packagePath);
-  if (!packageFolder.exists) {
-    print('Error: $packagePath does not exist.');
-    io.exit(1);
-  }
-
-  // The directory must be a Pub package.
-  var pubspecYamlFile = packageFolder.getChildAssumingFile(
-    file_paths.pubspecYaml,
-  );
-  if (!pubspecYamlFile.exists) {
-    print('Error: ${pubspecYamlFile.path} does not exist.');
-    io.exit(1);
-  }
-
-  var collection = AnalysisContextCollection(
-    includedPaths: [packagePath],
-  );
-  for (var analysisContext in collection.contexts) {
-    var analyzedPaths = analysisContext.contextRoot.analyzedFiles();
-    for (var path in analyzedPaths) {
-      if (file_paths.isDart(pathContext, path)) {
-        var session = analysisContext.currentSession;
-        var unitElementResult = await session.getUnitElement(path);
-        if (unitElementResult is UnitElementResult) {
-          var unitElement =
-              unitElementResult.element as CompilationUnitElementImpl;
-          // If has macro-generated content, write it.
-          var macroGeneratedContent = unitElement.macroGeneratedContent;
-          if (macroGeneratedContent != null) {
-            var relativePath = pathContext.relative(path, from: packagePath);
-            var combinedPath = pathContext.join(
-                packagePath, '.dart_tool', 'analyzer', 'macro', relativePath);
-            resourceProvider.getFile(combinedPath)
-              ..parent2.create()
-              ..writeAsStringSync(macroGeneratedContent);
-          }
-        }
-      }
-    }
-  }
-}
-
-void _printUsage() {
-  print('''
-Usage: dart generate.dart path-to-pub-package
-Write combined code of files that have macro-generated declarations.
-''');
-}
diff --git a/pkg/analyzer/tool/messages/error_code_info.dart b/pkg/analyzer/tool/messages/error_code_info.dart
new file mode 100644
index 0000000..bc63b2b
--- /dev/null
+++ b/pkg/analyzer/tool/messages/error_code_info.dart
@@ -0,0 +1,316 @@
+// 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.
+
+import 'dart:convert';
+
+/// Decodes a YAML object (obtained from `pkg/analyzer/messages.yaml`) into a
+/// two-level map of [ErrorCodeInfo], indexed first by class name and then by
+/// error name.
+Map<String, Map<String, ErrorCodeInfo>> decodeAnalyzerMessagesYaml(
+    Map<Object?, Object?> yaml) {
+  var result = <String, Map<String, ErrorCodeInfo>>{};
+  for (var classEntry in yaml.entries) {
+    var className = classEntry.key as String;
+    for (var errorEntry
+        in (classEntry.value as Map<Object?, Object?>).entries) {
+      (result[className] ??= {})[errorEntry.key as String] =
+          ErrorCodeInfo.fromYaml(errorEntry.value as Map<Object?, Object?>);
+    }
+  }
+  return result;
+}
+
+/// Decodes a YAML object (obtained from `pkg/front_end/messages.yaml`) into a
+/// map from error name to [ErrorCodeInfo].
+Map<String, ErrorCodeInfo> decodeCfeMessagesYaml(Map<Object?, Object?> yaml) {
+  var result = <String, ErrorCodeInfo>{};
+  for (var entry in yaml.entries) {
+    result[entry.key as String] =
+        ErrorCodeInfo.fromYaml(entry.value as Map<Object?, Object?>);
+  }
+  return result;
+}
+
+/// Data tables mapping between CFE errors and their corresponding automatically
+/// generated analyzer errors.
+class CfeToAnalyzerErrorCodeTables {
+  /// List of CFE errors for which analyzer errors should be automatically
+  /// generated, organized by their `index` property.
+  final List<ErrorCodeInfo?> indexToInfo = [];
+
+  /// Map whose values are the CFE errors for which analyzer errors should be
+  /// automatically generated, and whose keys are the corresponding analyzer
+  /// error name.  (Names are simple identifiers; they are not prefixed by the
+  /// class name `ParserErrorCode`)
+  final Map<String, ErrorCodeInfo> analyzerCodeToInfo = {};
+
+  /// Map whose values are the CFE errors for which analyzer errors should be
+  /// automatically generated, and whose keys are the front end error name.
+  final Map<String, ErrorCodeInfo> frontEndCodeToInfo = {};
+
+  /// Map whose keys are the CFE errors for which analyzer errors should be
+  /// automatically generated, and whose values are the corresponding analyzer
+  /// error name.  (Names are simple identifiers; they are not prefixed by the
+  /// class name `ParserErrorCode`)
+  final Map<ErrorCodeInfo, String> infoToAnalyzerCode = {};
+
+  /// Map whose keys are the CFE errors for which analyzer errors should be
+  /// automatically generated, and whose values are the front end error name.
+  final Map<ErrorCodeInfo, String> infoToFrontEndCode = {};
+
+  CfeToAnalyzerErrorCodeTables(Map<String, ErrorCodeInfo> messages) {
+    for (var entry in messages.entries) {
+      var errorCodeInfo = entry.value;
+      var index = errorCodeInfo.index;
+      if (index == null || errorCodeInfo.analyzerCode.length != 1) {
+        continue;
+      }
+      var frontEndCode = entry.key;
+      if (index < 1) {
+        throw '''
+$frontEndCode specifies index $index but indices must be 1 or greater.
+For more information run:
+pkg/front_end/tool/fasta generate-messages
+''';
+      }
+      if (indexToInfo.length <= index) {
+        indexToInfo.length = index + 1;
+      }
+      var previousEntryForIndex = indexToInfo[index];
+      if (previousEntryForIndex != null) {
+        throw 'Index $index used by both '
+            '${infoToFrontEndCode[previousEntryForIndex]} and $frontEndCode';
+      }
+      indexToInfo[index] = errorCodeInfo;
+      frontEndCodeToInfo[frontEndCode] = errorCodeInfo;
+      infoToFrontEndCode[errorCodeInfo] = frontEndCode;
+      var analyzerCodeLong = errorCodeInfo.analyzerCode.single;
+      var expectedPrefix = 'ParserErrorCode.';
+      if (!analyzerCodeLong.startsWith(expectedPrefix)) {
+        throw 'Expected all analyzer error codes to be prefixed with '
+            '${json.encode(expectedPrefix)}.  Found '
+            '${json.encode(analyzerCodeLong)}.';
+      }
+      var analyzerCode = analyzerCodeLong.substring(expectedPrefix.length);
+      infoToAnalyzerCode[errorCodeInfo] = analyzerCode;
+      var previousEntryForAnalyzerCode = analyzerCodeToInfo[analyzerCode];
+      if (previousEntryForAnalyzerCode != null) {
+        throw 'Analyzer code $analyzerCode used by both '
+            '${infoToFrontEndCode[previousEntryForAnalyzerCode]} and '
+            '$frontEndCode';
+      }
+      analyzerCodeToInfo[analyzerCode] = errorCodeInfo;
+    }
+    for (int i = 1; i < indexToInfo.length; i++) {
+      if (indexToInfo[i] == null) {
+        throw 'Indices are not consecutive; no error code has index $i.';
+      }
+    }
+  }
+}
+
+/// In-memory representation of error code information obtained from either a
+/// `messages.yaml` file.  Supports both the analyzer and front_end message file
+/// formats.
+class ErrorCodeInfo {
+  /// Pattern used by the front end to identify placeholders in error message
+  /// strings.  TODO(paulberry): share this regexp (and the code for interpreting
+  /// it) between the CFE and analyzer.
+  static final RegExp _placeholderPattern =
+      RegExp("#\([-a-zA-Z0-9_]+\)(?:%\([0-9]*\)\.\([0-9]+\))?");
+
+  /// For error code information obtained from the CFE, the set of analyzer
+  /// error codes that corresponds to this error code, if any.
+  final List<String> analyzerCode;
+
+  /// If present, a documentation comment that should be associated with the
+  /// error in code generated output.
+  final String? comment;
+
+  /// `true` if this error should be copied from an error in the CFE.  The
+  /// purpose of this field is so that the documentation for the error can exist
+  /// in the analyzer's messages.yaml file but the error text can come from the
+  /// CFE's messages.yaml file.  TODO(paulberry): add support for documentation
+  /// to the CFE's messages.yaml file so that this isn't necessary.
+  final bool copyFromCfe;
+
+  /// If the error code has an associated correctionMessage, the template for
+  /// it.
+  final String? correctionMessage;
+
+  /// If present, user-facing documentation for the error.
+  final String? documentation;
+
+  /// `true` if diagnostics with this code have documentation for them that has
+  /// been published.
+  final bool hasPublishedDocs;
+
+  /// For error code information obtained from the CFE, the index of the error
+  /// in the analyzer's `fastaAnalyzerErrorCodes` table.
+  final int? index;
+
+  /// Indicates whether this error is caused by an unresolved identifier.
+  final bool isUnresolvedIdentifier;
+
+  /// The problemMessage for the error code, or `null` if [copyFromCfe] is
+  /// `true`.
+  final String? problemMessage;
+
+  /// If present, indicates that this error code has a special name for
+  /// presentation to the user, that is potentially shared with other error
+  /// codes.
+  final String? sharedName;
+
+  ErrorCodeInfo(
+      {this.analyzerCode = const [],
+      this.comment,
+      this.copyFromCfe = false,
+      this.documentation,
+      this.hasPublishedDocs = false,
+      this.index,
+      this.isUnresolvedIdentifier = false,
+      this.sharedName,
+      this.problemMessage,
+      this.correctionMessage}) {
+    if (copyFromCfe) {
+      if (problemMessage != null) {
+        throw "Error codes marked `copyFromCfe: true` can't have a "
+            "problemMessage.";
+      }
+    } else {
+      if (problemMessage == null) {
+        throw 'Error codes must have a problemMessage unless they are marked '
+            '`copyFromCfe: true`.';
+      }
+    }
+  }
+
+  /// Decodes an [ErrorCodeInfo] object from its YAML representation.
+  ErrorCodeInfo.fromYaml(Map<Object?, Object?> yaml)
+      : this(
+            analyzerCode: _decodeAnalyzerCode(yaml['analyzerCode']),
+            comment: yaml['comment'] as String?,
+            copyFromCfe: yaml['copyFromCfe'] as bool? ?? false,
+            correctionMessage: yaml['correctionMessage'] as String?,
+            documentation: yaml['documentation'] as String?,
+            hasPublishedDocs: yaml['hasPublishedDocs'] as bool? ?? false,
+            index: yaml['index'] as int?,
+            isUnresolvedIdentifier:
+                yaml['isUnresolvedIdentifier'] as bool? ?? false,
+            problemMessage: yaml['problemMessage'] as String?,
+            sharedName: yaml['sharedName'] as String?);
+
+  /// Generates a dart declaration for this error code, suitable for inclusion
+  /// in the error class [className].  [errorCode] is the name of the error code
+  /// to be generated.
+  String toAnalyzerCode(String className, String errorCode) {
+    var out = StringBuffer();
+    out.writeln('$className(');
+    out.writeln("'${sharedName ?? errorCode}',");
+    final placeholderToIndexMap = _computePlaceholderToIndexMap();
+    out.writeln(
+        json.encode(_convertTemplate(placeholderToIndexMap, problemMessage!)) +
+            ',');
+    final correctionMessage = this.correctionMessage;
+    if (correctionMessage is String) {
+      out.write('correction: ');
+      out.writeln(json.encode(
+              _convertTemplate(placeholderToIndexMap, correctionMessage)) +
+          ',');
+    }
+    if (hasPublishedDocs) {
+      out.writeln('hasPublishedDocs:true,');
+    }
+    if (isUnresolvedIdentifier) {
+      out.writeln('isUnresolvedIdentifier:true,');
+    }
+    if (sharedName != null) {
+      out.writeln("uniqueName: '$errorCode',");
+    }
+    out.write(');');
+    return out.toString();
+  }
+
+  /// Generates dart comments for this error code.
+  String toAnalyzerComments({String indent = ''}) {
+    var out = StringBuffer();
+    var comment = this.comment;
+    if (comment != null) {
+      out.writeln('$indent/**');
+      for (var line in comment.split('\n')) {
+        out.writeln('$indent *${line.isEmpty ? '' : ' '}$line');
+      }
+      out.writeln('$indent */');
+    }
+    var documentation = this.documentation;
+    if (documentation != null) {
+      for (var line in documentation.split('\n')) {
+        out.writeln('$indent//${line.isEmpty ? '' : ' '}$line');
+      }
+    }
+    return out.toString();
+  }
+
+  /// Encodes this object into a YAML representation.
+  Map<Object?, Object?> toYaml() => {
+        if (copyFromCfe) 'copyFromCfe': true,
+        if (sharedName != null) 'sharedName': sharedName,
+        if (analyzerCode.isNotEmpty)
+          'analyzerCode': _encodeAnalyzerCode(analyzerCode),
+        if (problemMessage != null) 'problemMessage': problemMessage,
+        if (correctionMessage != null) 'correctionMessage': correctionMessage,
+        if (isUnresolvedIdentifier) 'isUnresolvedIdentifier': true,
+        if (hasPublishedDocs) 'hasPublishedDocs': true,
+        if (comment != null) 'comment': comment,
+        if (documentation != null) 'documentation': documentation,
+      };
+
+  /// Given a messages.yaml entry, come up with a mapping from placeholder
+  /// patterns in its message strings to their corresponding indices.
+  Map<String, int> _computePlaceholderToIndexMap() {
+    var mapping = <String, int>{};
+    for (var value in [problemMessage, correctionMessage]) {
+      if (value is! String) continue;
+      for (Match match in _placeholderPattern.allMatches(value)) {
+        // CFE supports a bunch of formatting options that we don't; make sure
+        // none of those are used.
+        if (match.group(0) != '#${match.group(1)}') {
+          throw 'Template string ${json.encode(value)} contains unsupported '
+              'placeholder pattern ${json.encode(match.group(0))}';
+        }
+
+        mapping[match.group(0)!] ??= mapping.length;
+      }
+    }
+    return mapping;
+  }
+
+  /// Convert a CFE template string (which uses placeholders like `#string`) to
+  /// an analyzer template string (which uses placeholders like `{0}`).
+  static String _convertTemplate(
+      Map<String, int> placeholderToIndexMap, String entry) {
+    return entry.replaceAllMapped(_placeholderPattern,
+        (match) => '{${placeholderToIndexMap[match.group(0)!]}}');
+  }
+
+  static List<String> _decodeAnalyzerCode(Object? value) {
+    if (value == null) {
+      return const [];
+    } else if (value is String) {
+      return [value];
+    } else if (value is List) {
+      return [for (var s in value) s as String];
+    } else {
+      throw 'Unrecognized analyzer code: $value';
+    }
+  }
+
+  static Object _encodeAnalyzerCode(List<String> analyzerCode) {
+    if (analyzerCode.length == 1) {
+      return analyzerCode.single;
+    } else {
+      return analyzerCode;
+    }
+  }
+}
diff --git a/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart b/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart
new file mode 100644
index 0000000..4834120
--- /dev/null
+++ b/pkg/analyzer/tool/messages/extract_errors_to_yaml.dart
@@ -0,0 +1,275 @@
+// 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.
+
+// This script extracts data from the analyzer classes derived from `ErrorCode`
+// (as well as the comments next to their declarations) and produces a
+// `messages.yaml` file capturing the same information.  In the future, we will
+// generate the `ErrorCode` derived classes from this `messages.yaml` file.
+//
+// TODO(paulberry): once code generation is in place, remove this script.
+
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/utilities.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/error/todo_codes.dart';
+import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer_utilities/package_root.dart' as pkg_root;
+import 'package:path/path.dart';
+import 'package:yaml/yaml.dart';
+
+import 'error_code_info.dart';
+
+main() {
+  var errorDeclarations = _findErrorDeclarations();
+  var generatedAnalyzerCodes = _computeGeneratedAnalyzerCodes();
+  var errorCodesByClass = _findErrorCodesByClass();
+  _generateYaml(errorCodesByClass, errorDeclarations, generatedAnalyzerCodes);
+}
+
+/// The path to the `analyzer` package.
+final String _analyzerPkgPath =
+    normalize(join(pkg_root.packageRoot, 'analyzer'));
+
+/// The path to the `analyzer` package.
+final String _frontEndPkgPath =
+    normalize(join(pkg_root.packageRoot, 'front_end'));
+
+/// Computes the set of `ParserErrorCode`s that are generated based on
+/// `pkg/front_end/messages.yaml`.
+Set<String> _computeGeneratedAnalyzerCodes() {
+  Map<dynamic, dynamic> messagesYaml = loadYaml(
+      File(join(_frontEndPkgPath, 'messages.yaml')).readAsStringSync());
+  var messages = decodeCfeMessagesYaml(messagesYaml);
+  var tables = CfeToAnalyzerErrorCodeTables(messages);
+  return tables.infoToAnalyzerCode.values.toSet();
+}
+
+/// Encodes [yaml] into a string parseable as YAML.
+///
+/// YAML is complex and we are just trying to do a good enough job for a one
+/// shot generation of a `messages.yaml` file, so instead of trying to
+/// exhaustively implement the YAML standard, we have a heuristic
+/// implementation, and then we double check that we can parse the result and
+/// get back the original data structures.
+String _encodeYaml(Map<Object?, Object?> yaml) {
+  var out = StringBuffer();
+  void visit(Map<Object?, Object?> yaml, String prefix) {
+    for (var entry in yaml.entries) {
+      var keyPart = '$prefix${entry.key}:';
+      var value = entry.value;
+      if (value is Map<Object?, Object?>) {
+        out.writeln(keyPart);
+        visit(value, '$prefix  ');
+      } else if (value is String) {
+        if (value.contains('\n')) {
+          if (value.trim() != value) {
+            throw 'TODO(paulberry): handle a string with leading or trailing '
+                'whitespace';
+          }
+          out.writeln('$keyPart |-');
+          var indented = value.replaceAll(RegExp('\n(?!\n)'), '\n$prefix  ');
+          out.writeln('$prefix  $indented');
+        } else if (value.contains('{') ||
+            value.contains(':') ||
+            value.contains("'") ||
+            value.trim() != value) {
+          out.writeln('$keyPart ${json.encode(value)}');
+        } else {
+          out.writeln('$keyPart $value');
+        }
+      } else if (value is bool) {
+        out.writeln('$keyPart $value');
+      } else {
+        throw 'TODO(paulberry): encode ${value.runtimeType}';
+      }
+    }
+  }
+
+  visit(yaml, '');
+  var result = out.toString();
+
+  // Double check that the result parses correctly.
+  try {
+    var parsedYaml = loadYaml(result);
+    if (json.encode(yaml) != json.encode(parsedYaml)) {
+      throw 'YAML did match after parsing';
+    }
+  } on Object {
+    print('=== Error in yaml file ===');
+    print(result);
+    print('===');
+    rethrow;
+  }
+  return result;
+}
+
+/// Extract comments from the parsed AST of a field declaration, so that we can
+/// include them in the YAML output.
+_CommentInfo _extractCommentInfo(FieldDeclaration fieldDeclaration) {
+  var firstToken = fieldDeclaration.metadata.beginToken ??
+      fieldDeclaration.firstTokenAfterCommentAndMetadata;
+  var commentToken = firstToken.precedingComments;
+  StringBuffer? documentationComment;
+  StringBuffer? otherComment;
+  while (commentToken != null) {
+    var lexeme = commentToken.lexeme;
+    if (lexeme.startsWith('///')) {
+      (documentationComment ??= StringBuffer())
+          .writeln(lexeme.replaceFirst(RegExp('/// ?'), '').trimRight());
+    } else if (lexeme.startsWith('/**')) {
+      (documentationComment ??= StringBuffer()).writeln(lexeme
+          .substring(0, lexeme.length - 2)
+          .replaceFirst(RegExp('/\\*\\*\n?'), '')
+          .replaceAll(RegExp(' *\\* ?'), '')
+          .trimRight());
+    } else if (lexeme.startsWith('//')) {
+      (otherComment ??= StringBuffer())
+          .writeln(lexeme.replaceFirst(RegExp('// ?'), '').trimRight());
+    } else if (lexeme.startsWith('/*')) {
+      (otherComment ??= StringBuffer()).writeln(lexeme
+          .substring(0, lexeme.length - 2)
+          .replaceFirst(RegExp('/\\*(\n| )?'), '')
+          .replaceAll(RegExp(' *(\\*|//) ?'), '')
+          .trimRight());
+    } else {
+      throw 'Unexpected comment type: ${json.encode(lexeme)}';
+    }
+    commentToken = commentToken.next as CommentToken?;
+  }
+  return _CommentInfo(
+      documentationComment: documentationComment?.toString().trim(),
+      otherComment: otherComment?.toString().trim());
+}
+
+/// Computes a map from class name to a list of all the error codes defined by
+/// that class.  Uses the analyzer's global variable `errorCodeValues` to find
+/// all the error codes.
+Map<String, List<ErrorCode>> _findErrorCodesByClass() {
+  var errorCodesByClass = <String, List<ErrorCode>>{};
+  for (var errorCode in errorCodeValues) {
+    if (errorCode is ScannerErrorCode) {
+      continue; // Will deal with later
+    }
+    if (errorCode is TodoCode) {
+      continue; // It's not worth converting these to YAML.
+    }
+    var className = errorCode.runtimeType.toString();
+    (errorCodesByClass[className] ??= []).add(errorCode);
+  }
+  return errorCodesByClass;
+}
+
+/// Finds all the variable declaration ASTs in the analyzer that might represent
+/// error codes.  The result is a two-tiered map, indexed first by class name
+/// and then by error code name.
+Map<String, Map<String, VariableDeclaration>> _findErrorDeclarations() {
+  var filePaths = [
+    join(_analyzerPkgPath, 'lib', 'src', 'analysis_options', 'error',
+        'option_codes.dart'),
+    join(_analyzerPkgPath, 'lib', 'src', 'dart', 'error', 'ffi_code.dart'),
+    join(_analyzerPkgPath, 'lib', 'src', 'dart', 'error', 'hint_codes.dart'),
+    join(_analyzerPkgPath, 'lib', 'src', 'dart', 'error',
+        'syntactic_errors.dart'),
+    join(_analyzerPkgPath, 'lib', 'src', 'error', 'codes.dart'),
+    join(_analyzerPkgPath, 'lib', 'src', 'manifest',
+        'manifest_warning_code.dart'),
+    join(
+        _analyzerPkgPath, 'lib', 'src', 'pubspec', 'pubspec_warning_code.dart'),
+  ];
+  var result = <String, Map<String, VariableDeclaration>>{};
+  for (var filePath in filePaths) {
+    var unit = parseFile(
+            path: filePath, featureSet: FeatureSet.latestLanguageVersion())
+        .unit;
+    for (var declaration in unit.declarations) {
+      if (declaration is! ClassDeclaration) continue;
+      var className = declaration.name.name;
+      for (var member in declaration.members) {
+        if (member is! FieldDeclaration) continue;
+        for (var variable in member.fields.variables) {
+          (result[className] ??= {})[variable.name.name] = variable;
+        }
+      }
+    }
+  }
+  return result;
+}
+
+/// Combines the information in [errorCodesByClass] (obtained from
+/// [_findErrorCodesByClass]) and [errorDeclarations] (obtained from
+/// [_findErrorDeclarations]) into a YAML representation of the errors, and
+/// prints the resulting YAML.
+void _generateYaml(
+    Map<String, List<ErrorCode>> errorCodesByClass,
+    Map<String, Map<String, VariableDeclaration>> errorDeclarations,
+    Set<String> generatedAnalyzerCodes) {
+  var yaml = <String, Map<String, Object?>>{};
+  for (var entry in errorCodesByClass.entries) {
+    var yamlCodes = <String, Object?>{};
+    var className = entry.key;
+    yaml[className] = yamlCodes;
+    entry.value.sort((a, b) => a.name.compareTo(b.name));
+    for (var code in entry.value) {
+      var name = code.name;
+      var uniqueName = code.uniqueName;
+      if (!uniqueName.startsWith('$className.')) {
+        throw 'Unexpected unique name ${json.encode(uniqueName)}';
+      }
+      var uniqueNameSuffix = uniqueName.substring(className.length + 1);
+      if (uniqueNameSuffix.contains('.')) {
+        throw 'Unexpected unique name ${json.encode(uniqueName)}';
+      }
+      var classDeclaration = errorDeclarations[className];
+      if (classDeclaration == null) {
+        throw 'Could not find class declaration for $className';
+      }
+      var declaration = classDeclaration[uniqueNameSuffix];
+      if (declaration == null) {
+        throw 'Could not find declaration for $className.$uniqueNameSuffix';
+      }
+      var variableDeclarationList =
+          declaration.parent as VariableDeclarationList;
+      var fieldDeclaration = variableDeclarationList.parent as FieldDeclaration;
+      var commentInfo = _extractCommentInfo(fieldDeclaration);
+      var documentationComment = commentInfo.documentationComment;
+      var otherComment = commentInfo.otherComment;
+      ErrorCodeInfo errorCodeInfo;
+      if (className == 'ParserErrorCode' &&
+          generatedAnalyzerCodes.contains(name)) {
+        if (uniqueNameSuffix != name) {
+          throw "Auto-generated parser error codes can't be aliased";
+        }
+        errorCodeInfo = ErrorCodeInfo(
+            copyFromCfe: true,
+            comment: documentationComment,
+            documentation: otherComment);
+      } else {
+        errorCodeInfo = ErrorCodeInfo(
+            sharedName: uniqueNameSuffix == name ? null : name,
+            problemMessage: code.message,
+            correctionMessage: code.correction,
+            isUnresolvedIdentifier: code.isUnresolvedIdentifier,
+            hasPublishedDocs: code.hasPublishedDocs,
+            comment: documentationComment,
+            documentation: otherComment);
+      }
+      yamlCodes[uniqueNameSuffix] = errorCodeInfo.toYaml();
+    }
+  }
+  String encodedYaml = _encodeYaml(yaml);
+  print(encodedYaml);
+}
+
+class _CommentInfo {
+  final String? documentationComment;
+
+  final String? otherComment;
+
+  _CommentInfo({this.documentationComment, this.otherComment});
+}
diff --git a/pkg/analyzer/tool/messages/generate.dart b/pkg/analyzer/tool/messages/generate.dart
index 17946b6..15c7f35 100644
--- a/pkg/analyzer/tool/messages/generate.dart
+++ b/pkg/analyzer/tool/messages/generate.dart
@@ -1,4 +1,7 @@
-// @dart = 2.9
+// 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.
+
 /// This file contains code to generate scanner and parser message
 /// based on the information in pkg/front_end/messages.yaml.
 ///
@@ -11,87 +14,268 @@
 ///
 /// It is expected that 'pkg/front_end/tool/fasta generate-messages'
 /// has already been successfully run.
+import 'dart:convert';
 import 'dart:io';
 
 import 'package:_fe_analyzer_shared/src/scanner/scanner.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer_utilities/package_root.dart' as pkg_root;
 import 'package:analyzer_utilities/tools.dart';
 import 'package:path/path.dart';
 import 'package:yaml/yaml.dart' show loadYaml;
 
+import 'error_code_info.dart';
+
 main() async {
-  String analyzerPkgPath = normalize(join(pkg_root.packageRoot, 'analyzer'));
-  String frontEndPkgPath = normalize(join(pkg_root.packageRoot, 'front_end'));
-  String frontEndSharedPkgPath =
-      normalize(join(pkg_root.packageRoot, '_fe_analyzer_shared'));
+  await GeneratedContent.generateAll(analyzerPkgPath, allTargets);
 
-  Map<dynamic, dynamic> messagesYaml =
-      loadYaml(File(join(frontEndPkgPath, 'messages.yaml')).readAsStringSync());
-  String errorConverterSource = File(join(analyzerPkgPath,
-          joinAll(posix.split('lib/src/fasta/error_converter.dart'))))
-      .readAsStringSync();
-  String syntacticErrorsSource = File(join(analyzerPkgPath,
-          joinAll(posix.split('lib/src/dart/error/syntactic_errors.dart'))))
-      .readAsStringSync();
-  String parserSource = File(join(frontEndSharedPkgPath,
-          joinAll(posix.split('lib/src/parser/parser.dart'))))
-      .readAsStringSync();
-
-  final codeGenerator = _SyntacticErrorGenerator(
-      messagesYaml, errorConverterSource, syntacticErrorsSource, parserSource);
-
-  await GeneratedContent.generateAll(analyzerPkgPath, <GeneratedContent>[
-    GeneratedFile('lib/src/dart/error/syntactic_errors.g.dart',
-        (String pkgPath) async {
-      codeGenerator.generateFormatCode();
-      return codeGenerator.out.toString();
-    }),
-  ]);
-
-  codeGenerator
+  _SyntacticErrorGenerator()
+    ..generateFormatCode()
     ..checkForManualChanges()
     ..printSummary();
 }
 
-const invalidAnalyzerCode = """
-Error: Expected the text in the 'analyzerCode:' field to contain
-       the name of the class containing the error
-       and the name of the error separated by a `.`
-       (e.g. ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND).
-""";
+/// Information about all the classes derived from `ErrorCode` that should be
+/// generated.
+const List<_ErrorClassInfo> _errorClasses = [
+  _ErrorClassInfo(
+      filePath: 'lib/src/analysis_options/error/option_codes.g.dart',
+      name: 'AnalysisOptionsErrorCode',
+      type: 'COMPILE_TIME_ERROR',
+      severity: 'ERROR'),
+  _ErrorClassInfo(
+      filePath: 'lib/src/analysis_options/error/option_codes.g.dart',
+      name: 'AnalysisOptionsHintCode',
+      type: 'HINT',
+      severity: 'INFO'),
+  _ErrorClassInfo(
+      filePath: 'lib/src/analysis_options/error/option_codes.g.dart',
+      name: 'AnalysisOptionsWarningCode',
+      type: 'STATIC_WARNING',
+      severity: 'WARNING'),
+  _ErrorClassInfo(
+      filePath: 'lib/src/error/codes.g.dart',
+      name: 'CompileTimeErrorCode',
+      superclass: 'AnalyzerErrorCode',
+      type: 'COMPILE_TIME_ERROR',
+      extraImports: ['package:analyzer/src/error/analyzer_error_code.dart']),
+  _ErrorClassInfo(
+      filePath: 'lib/src/error/codes.g.dart',
+      name: 'LanguageCode',
+      type: 'COMPILE_TIME_ERROR'),
+  _ErrorClassInfo(
+      filePath: 'lib/src/error/codes.g.dart',
+      name: 'StaticWarningCode',
+      superclass: 'AnalyzerErrorCode',
+      type: 'STATIC_WARNING',
+      severity: 'WARNING',
+      extraImports: ['package:analyzer/src/error/analyzer_error_code.dart']),
+  _ErrorClassInfo(
+      filePath: 'lib/src/dart/error/ffi_code.g.dart',
+      name: 'FfiCode',
+      superclass: 'AnalyzerErrorCode',
+      type: 'COMPILE_TIME_ERROR',
+      extraImports: ['package:analyzer/src/error/analyzer_error_code.dart']),
+  _ErrorClassInfo(
+      filePath: 'lib/src/dart/error/hint_codes.g.dart',
+      name: 'HintCode',
+      superclass: 'AnalyzerErrorCode',
+      type: 'HINT',
+      extraImports: ['package:analyzer/src/error/analyzer_error_code.dart']),
+  _ErrorClassInfo(
+      // TODO(paulberry): merge with `syntactic_errors.g.dart`.
+      filePath: 'lib/src/dart/error/syntactic_errors.analyzer.g.dart',
+      name: 'ParserErrorCode',
+      type: 'SYNTACTIC_ERROR',
+      severity: 'ERROR',
+      includeCfeMessages: true),
+  _ErrorClassInfo(
+      filePath: 'lib/src/manifest/manifest_warning_code.g.dart',
+      name: 'ManifestWarningCode',
+      type: 'STATIC_WARNING',
+      severity: 'WARNING'),
+  _ErrorClassInfo(
+      filePath: 'lib/src/pubspec/pubspec_warning_code.g.dart',
+      name: 'PubspecWarningCode',
+      type: 'STATIC_WARNING',
+      severity: 'WARNING'),
+];
 
-const shouldRunFastaGenerateMessagesFirst = """
-Error: After modifying messages.yaml, run this first:
-       pkg/front_end/tool/fasta generate-messages
-""";
+/// A list of all targets generated by this code generator.
+final List<GeneratedContent> allTargets = <GeneratedContent>[
+  GeneratedFile('lib/src/dart/error/syntactic_errors.g.dart',
+      (String pkgPath) async {
+    final codeGenerator = _SyntacticErrorGenerator();
 
-/// Return an entry containing 2 strings,
-/// the name of the class containing the error and the name of the error,
-/// or throw an exception if 'analyzerCode:' field is invalid.
-List<String> nameForEntry(Map entry) {
-  final analyzerCode = entry['analyzerCode'];
-  if (analyzerCode is String) {
-    if (!analyzerCode.startsWith('ParserErrorCode.')) {
-      throw invalidAnalyzerCode;
-    }
-    List<String> name = analyzerCode.split('.');
-    if (name.length != 2 || name[1].isEmpty) {
-      throw invalidAnalyzerCode;
-    }
-    return name;
+    codeGenerator.generateFormatCode();
+    return codeGenerator.out.toString();
+  }),
+  ..._analyzerGeneratedFiles(),
+];
+
+/// The path to the `analyzer` package.
+final String analyzerPkgPath =
+    normalize(join(pkg_root.packageRoot, 'analyzer'));
+
+/// The path to the `front_end` package.
+final String frontEndPkgPath =
+    normalize(join(pkg_root.packageRoot, 'front_end'));
+
+/// Decoded messages from the anlayzer's `messages.yaml` file.
+final Map<String, Map<String, ErrorCodeInfo>> _analyzerMessages =
+    _loadAnalyzerMessages();
+
+/// Generates a list of [GeneratedContent] objects describing all the analyzer
+/// files that need to be generated.
+List<GeneratedContent> _analyzerGeneratedFiles() {
+  var classesByFile = <String, List<_ErrorClassInfo>>{};
+  for (var errorClassInfo in _errorClasses) {
+    (classesByFile[errorClassInfo.filePath] ??= []).add(errorClassInfo);
   }
-  throw invalidAnalyzerCode;
+  return [
+    for (var entry in classesByFile.entries)
+      GeneratedFile(entry.key, (String pkgPath) async {
+        final codeGenerator = _AnalyzerErrorGenerator(entry.value);
+        codeGenerator.generate();
+        return codeGenerator.out.toString();
+      })
+  ];
+}
+
+/// Loads analyzer messages from the analyzer's `messages.yaml` file.
+Map<String, Map<String, ErrorCodeInfo>> _loadAnalyzerMessages() {
+  Map<dynamic, dynamic> messagesYaml =
+      loadYaml(File(join(analyzerPkgPath, 'messages.yaml')).readAsStringSync());
+  return decodeAnalyzerMessagesYaml(messagesYaml);
+}
+
+/// Code generator for analyzer error classes.
+class _AnalyzerErrorGenerator {
+  final List<_ErrorClassInfo> errorClasses;
+  final out = StringBuffer('''
+// 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.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+''');
+
+  _AnalyzerErrorGenerator(this.errorClasses);
+
+  void generate() {
+    var imports = {'package:analyzer/error/error.dart'};
+    var parts = <String>{};
+    for (var errorClass in errorClasses) {
+      imports.addAll(errorClass.extraImports);
+      if (errorClass.includeCfeMessages) {
+        parts.add('syntactic_errors.g.dart');
+      }
+    }
+    out.writeln();
+    for (var importPath in imports.toList()..sort()) {
+      out.writeln("import ${json.encode(importPath)};");
+    }
+    if (parts.isNotEmpty) {
+      out.writeln();
+      for (var partPath in parts.toList()..sort()) {
+        out.writeln("part ${json.encode(partPath)};");
+      }
+    }
+    out.writeln();
+    out.writeln("// It is hard to visually separate each code's _doc comment_ "
+        "from its published");
+    out.writeln('// _documentation comment_ when each is written as an '
+        'end-of-line comment.');
+    out.writeln('// ignore_for_file: slash_for_doc_comments');
+    for (var errorClass in errorClasses.toList()
+      ..sort((a, b) => a.name.compareTo(b.name))) {
+      out.writeln();
+      out.write('class ${errorClass.name} extends ${errorClass.superclass} {');
+      for (var entry in _analyzerMessages[errorClass.name]!.entries.toList()
+        ..sort((a, b) => a.key.compareTo(b.key))) {
+        var errorName = entry.key;
+        var errorCodeInfo = entry.value;
+        out.writeln();
+        out.write(errorCodeInfo.toAnalyzerComments(indent: '  '));
+        out.writeln('  static const ${errorClass.name} $errorName =');
+        if (errorCodeInfo.copyFromCfe) {
+          out.writeln('  _$errorName;');
+        } else {
+          out.writeln(errorCodeInfo.toAnalyzerCode(errorClass.name, errorName));
+        }
+      }
+      out.writeln();
+      out.writeln('/// Initialize a newly created error code to have the given '
+          '[name].');
+      out.writeln('const ${errorClass.name}(String name, String message, {');
+      out.writeln('String? correction,');
+      out.writeln('bool hasPublishedDocs = false,');
+      out.writeln('bool isUnresolvedIdentifier = false,');
+      out.writeln('String? uniqueName,');
+      out.writeln('}) : super(');
+      out.writeln('correction: correction,');
+      out.writeln('hasPublishedDocs: hasPublishedDocs,');
+      out.writeln('isUnresolvedIdentifier: isUnresolvedIdentifier,');
+      out.writeln('message: message,');
+      out.writeln('name: name,');
+      out.writeln("uniqueName: '${errorClass.name}.\${uniqueName ?? name}',");
+      out.writeln(');');
+      out.writeln();
+      out.writeln('@override');
+      out.writeln('ErrorSeverity get errorSeverity => '
+          '${errorClass.severityCode};');
+      out.writeln();
+      out.writeln('@override');
+      out.writeln('ErrorType get type => ${errorClass.typeCode};');
+      out.writeln('}');
+    }
+  }
+}
+
+class _ErrorClassInfo {
+  final List<String> extraImports;
+
+  final String filePath;
+
+  final bool includeCfeMessages;
+
+  final String name;
+
+  final String? severity;
+
+  final String superclass;
+
+  final String type;
+
+  const _ErrorClassInfo(
+      {this.extraImports = const [],
+      required this.filePath,
+      this.includeCfeMessages = false,
+      required this.name,
+      this.severity,
+      this.superclass = 'ErrorCode',
+      required this.type});
+
+  String get severityCode {
+    var severity = this.severity;
+    if (severity == null) {
+      return '$typeCode.severity';
+    } else {
+      return 'ErrorSeverity.$severity';
+    }
+  }
+
+  String get typeCode => 'ErrorType.$type';
 }
 
 class _SyntacticErrorGenerator {
-  final Map messagesYaml;
+  final Map<String, ErrorCodeInfo> cfeMessages;
+  final CfeToAnalyzerErrorCodeTables tables;
+  final Map<String, Map<String, ErrorCodeInfo>> analyzerMessages;
   final String errorConverterSource;
-  final String syntacticErrorsSource;
   final String parserSource;
-  final translatedEntries = <Map>[];
-  final translatedFastaErrorCodes = <String>{};
   final out = StringBuffer('''
 //
 // THIS FILE IS GENERATED. DO NOT EDIT.
@@ -99,20 +283,42 @@
 // Instead modify 'pkg/front_end/messages.yaml' and run
 // 'dart pkg/analyzer/tool/messages/generate.dart' to update.
 
-part of 'syntactic_errors.dart';
+part of 'syntactic_errors.analyzer.g.dart';
 
 ''');
 
-  _SyntacticErrorGenerator(this.messagesYaml, this.errorConverterSource,
-      this.syntacticErrorsSource, this.parserSource);
+  factory _SyntacticErrorGenerator() {
+    String frontEndPkgPath = normalize(join(pkg_root.packageRoot, 'front_end'));
+    String frontEndSharedPkgPath =
+        normalize(join(pkg_root.packageRoot, '_fe_analyzer_shared'));
+
+    Map<dynamic, dynamic> cfeMessagesYaml = loadYaml(
+        File(join(frontEndPkgPath, 'messages.yaml')).readAsStringSync());
+    Map<dynamic, dynamic> analyzerMessagesYaml = loadYaml(
+        File(join(analyzerPkgPath, 'messages.yaml')).readAsStringSync());
+    String errorConverterSource = File(join(analyzerPkgPath,
+            joinAll(posix.split('lib/src/fasta/error_converter.dart'))))
+        .readAsStringSync();
+    String parserSource = File(join(frontEndSharedPkgPath,
+            joinAll(posix.split('lib/src/parser/parser.dart'))))
+        .readAsStringSync();
+
+    return _SyntacticErrorGenerator._(
+        decodeCfeMessagesYaml(cfeMessagesYaml),
+        decodeAnalyzerMessagesYaml(analyzerMessagesYaml),
+        errorConverterSource,
+        parserSource);
+  }
+
+  _SyntacticErrorGenerator._(this.cfeMessages, this.analyzerMessages,
+      this.errorConverterSource, this.parserSource)
+      : tables = CfeToAnalyzerErrorCodeTables(cfeMessages);
 
   void checkForManualChanges() {
     // Check for ParserErrorCodes that could be removed from
     // error_converter.dart now that those ParserErrorCodes are auto generated.
     int converterCount = 0;
-    for (Map entry in translatedEntries) {
-      final name = nameForEntry(entry);
-      final errorCode = name[1];
+    for (var errorCode in tables.infoToAnalyzerCode.values) {
       if (errorConverterSource.contains('"$errorCode"')) {
         if (converterCount == 0) {
           print('');
@@ -127,99 +333,35 @@
       print('  $converterCount total');
     }
 
-    // Check that the public ParserErrorCodes have been updated
-    // to reference the generated codes.
-    int publicCount = 0;
-    for (Map entry in translatedEntries) {
-      final name = nameForEntry(entry);
-      final errorCode = name[1];
-      if (!syntacticErrorsSource.contains(' _$errorCode')) {
-        if (publicCount == 0) {
-          print('');
-          print('The following ParserErrorCodes should be updated'
-              ' in syntactic_errors.dart');
-          print('to reference the associated generated error code:');
-        }
-        print('  static const ParserErrorCode $errorCode = _$errorCode;');
-        ++publicCount;
-      }
-    }
-
     // Fail if there are manual changes to be made, but do so
     // in a fire and forget manner so that the files are still generated.
-    if (converterCount > 0 || publicCount > 0) {
+    if (converterCount > 0) {
       print('');
       throw 'Error: missing manual code changes';
     }
   }
 
   void generateErrorCodes() {
-    final sortedErrorCodes = <String>[];
-    final entryMap = <String, Map>{};
-    for (var entry in translatedEntries) {
-      final name = nameForEntry(entry);
-      final errorCode = name[1];
-      sortedErrorCodes.add(errorCode);
-      if (entryMap[errorCode] == null) {
-        entryMap[errorCode] = entry;
-      } else {
-        throw 'Error: Duplicate error code $errorCode';
-      }
-    }
-    sortedErrorCodes.sort();
-    for (var errorCode in sortedErrorCodes) {
-      final entry = entryMap[errorCode];
-      final className = nameForEntry(entry)[0];
+    final entryMap = tables.analyzerCodeToInfo;
+    for (var errorCode in entryMap.keys.toList()..sort()) {
+      final entry = entryMap[errorCode]!;
+      final className = 'ParserErrorCode';
       out.writeln();
       out.writeln('const $className _$errorCode =');
-      out.writeln('$className(');
-      out.writeln("'$errorCode',");
-      out.writeln('r"${entry['template']}"');
-      final tip = entry['tip'];
-      if (tip is String) {
-        out.writeln(',correction: "$tip"');
-      }
-      final hasPublishedDocs = entry['hasPublishedDocs'];
-      if (hasPublishedDocs is bool && hasPublishedDocs) {
-        out.writeln(',hasPublishedDocs:true');
-      }
-      out.writeln(');');
+      out.writeln(entry.toAnalyzerCode(className, errorCode));
     }
   }
 
   void generateFastaAnalyzerErrorCodeList() {
-    final sorted = List<Map>.filled(translatedEntries.length, null);
-    for (var entry in translatedEntries) {
-      var index = entry['index'];
-      if (index is int && index >= 1 && index <= sorted.length) {
-        if (sorted[index - 1] == null) {
-          sorted[index - 1] = entry;
-          continue;
-        }
-      }
-      throw shouldRunFastaGenerateMessagesFirst;
-    }
-    out.writeln('final fastaAnalyzerErrorCodes = <ErrorCode?>[null,');
-    for (var entry in sorted) {
-      List<String> name = nameForEntry(entry);
-      out.writeln('_${name[1]},');
+    out.writeln('final fastaAnalyzerErrorCodes = <ErrorCode?>[');
+    for (var entry in tables.indexToInfo) {
+      var name = tables.infoToAnalyzerCode[entry];
+      out.writeln('${name == null ? 'null' : '_$name'},');
     }
     out.writeln('];');
   }
 
   void generateFormatCode() {
-    messagesYaml.forEach((name, entry) {
-      if (entry is Map) {
-        if (entry['index'] is int) {
-          if (entry['analyzerCode'] is String) {
-            translatedFastaErrorCodes.add(name);
-            translatedEntries.add(entry);
-          } else {
-            throw invalidAnalyzerCode;
-          }
-        }
-      }
-    });
     generateFastaAnalyzerErrorCodeList();
     generateErrorCodes();
   }
@@ -227,46 +369,44 @@
   void printSummary() {
     // Build a map of error message to ParserErrorCode
     final messageToName = <String, String>{};
-    for (ErrorCode errorCode in errorCodeValues) {
-      if (errorCode is ParserErrorCode) {
-        String message = errorCode.message.replaceAll(RegExp(r'\{\d+\}'), '');
-        messageToName[message] = errorCode.name;
-      }
+    for (var entry in analyzerMessages['ParserErrorCode']!.entries) {
+      if (entry.value.copyFromCfe) continue;
+      String message =
+          entry.value.problemMessage!.replaceAll(RegExp(r'\{\d+\}'), '');
+      messageToName[message] = entry.key;
     }
 
-    String messageFromEntryTemplate(Map entry) {
-      String template = entry['template'];
-      String message = template.replaceAll(RegExp(r'#\w+'), '');
+    String messageFromEntryTemplate(ErrorCodeInfo entry) {
+      String problemMessage = entry.problemMessage!;
+      String message = problemMessage.replaceAll(RegExp(r'#\w+'), '');
       return message;
     }
 
     // Remove entries that have already been translated
-    for (Map entry in translatedEntries) {
+    for (ErrorCodeInfo entry in tables.infoToAnalyzerCode.keys) {
       messageToName.remove(messageFromEntryTemplate(entry));
     }
 
     // Print the # of autogenerated ParserErrorCodes.
-    print('${translatedEntries.length} of ${messageToName.length}'
-        ' ParserErrorCodes generated.');
+    print('${tables.infoToAnalyzerCode.length} of '
+        '${messageToName.length} ParserErrorCodes generated.');
 
     // List the ParserErrorCodes that could easily be auto generated
     // but have not been already.
     final analyzerToFasta = <String, List<String>>{};
-    messagesYaml.forEach((fastaName, entry) {
-      if (entry is Map) {
-        final analyzerName = messageToName[messageFromEntryTemplate(entry)];
-        if (analyzerName != null) {
-          analyzerToFasta
-              .putIfAbsent(analyzerName, () => <String>[])
-              .add(fastaName);
-        }
+    cfeMessages.forEach((fastaName, entry) {
+      final analyzerName = messageToName[messageFromEntryTemplate(entry)];
+      if (analyzerName != null) {
+        analyzerToFasta
+            .putIfAbsent(analyzerName, () => <String>[])
+            .add(fastaName);
       }
     });
     if (analyzerToFasta.isNotEmpty) {
       print('');
       print('The following ParserErrorCodes could be auto generated:');
       for (String analyzerName in analyzerToFasta.keys.toList()..sort()) {
-        List<String> fastaNames = analyzerToFasta[analyzerName];
+        List<String> fastaNames = analyzerToFasta[analyzerName]!;
         if (fastaNames.length == 1) {
           print('  $analyzerName = ${fastaNames.first}');
         } else {
@@ -283,7 +423,7 @@
     Token token = scanString(parserSource).tokens;
     while (!token.isEof) {
       if (token.isIdentifier) {
-        String fastaErrorCode;
+        String? fastaErrorCode;
         String lexeme = token.lexeme;
         if (lexeme.length > 7) {
           if (lexeme.startsWith('message')) {
@@ -295,11 +435,11 @@
           }
         }
         if (fastaErrorCode != null &&
-            !translatedFastaErrorCodes.contains(fastaErrorCode)) {
+            tables.frontEndCodeToInfo[fastaErrorCode] == null) {
           untranslatedFastaErrorCodes.add(fastaErrorCode);
         }
       }
-      token = token.next;
+      token = token.next!;
     }
     if (untranslatedFastaErrorCodes.isNotEmpty) {
       print('');
@@ -307,16 +447,17 @@
       final sorted = untranslatedFastaErrorCodes.toList()..sort();
       for (String fastaErrorCode in sorted) {
         String analyzerCode = '';
-        String template = '';
-        var entry = messagesYaml[fastaErrorCode];
-        if (entry is Map) {
-          if (entry['index'] is! int && entry['analyzerCode'] is String) {
-            analyzerCode = entry['analyzerCode'];
-            template = entry['template'];
+        String problemMessage = '';
+        var entry = cfeMessages[fastaErrorCode];
+        if (entry != null) {
+          // TODO(paulberry): handle multiple analyzer codes
+          if (entry.index == null && entry.analyzerCode.length == 1) {
+            analyzerCode = entry.analyzerCode.single;
+            problemMessage = entry.problemMessage!;
           }
         }
         print('  ${fastaErrorCode.padRight(30)} --> $analyzerCode'
-            '\n      $template');
+            '\n      $problemMessage');
       }
     }
   }
diff --git a/pkg/analyzer/tool/messages/generate_test.dart b/pkg/analyzer/tool/messages/generate_test.dart
new file mode 100644
index 0000000..462df57
--- /dev/null
+++ b/pkg/analyzer/tool/messages/generate_test.dart
@@ -0,0 +1,16 @@
+// 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.
+
+// This test verifies that all files generated by `generate.dart` are up to
+// date.
+
+import 'package:analyzer_utilities/tools.dart';
+import 'package:path/path.dart';
+
+import 'generate.dart';
+
+main() async {
+  await GeneratedContent.checkAll(analyzerPkgPath,
+      join(analyzerPkgPath, 'tool', 'messages', 'generate.dart'), allTargets);
+}
diff --git a/pkg/analyzer_plugin/CHANGELOG.md b/pkg/analyzer_plugin/CHANGELOG.md
index 3ee89a3..04ab329 100644
--- a/pkg/analyzer_plugin/CHANGELOG.md
+++ b/pkg/analyzer_plugin/CHANGELOG.md
@@ -1,6 +1,9 @@
-## 0.7.0
+## 0.8.0
+- Require SDK `2.14` to use `Object.hash()`.
+- Require `yaml 3.1.0` to use `recover`.
 
-- Support verison `2.x` of the `analyzer` package
+## 0.7.0
+- Support version `2.x` of the `analyzer` package
 
 ## 0.6.0
 - Bug fixes to the protocol.
diff --git a/pkg/analyzer_plugin/README.md b/pkg/analyzer_plugin/README.md
index 0644f0b..55fa2fa 100644
--- a/pkg/analyzer_plugin/README.md
+++ b/pkg/analyzer_plugin/README.md
@@ -28,7 +28,7 @@
 See the [LICENSE] file.
 
 [issues]: https://github.com/dart-lang/sdk/issues
-[LICENSE]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/LICENSE
+[LICENSE]: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/LICENSE
 [list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
-[pluginapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_plugin/doc/api.html
-[tutorial]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_plugin/doc/tutorial/tutorial.md
+[pluginapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analyzer_plugin/doc/api.html
+[tutorial]: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer_plugin/doc/tutorial/tutorial.md
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index 96c8505..cba223d 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -1385,7 +1385,7 @@
       An enumeration of the kinds of highlighting that can be applied to files.
     </p>
     
-  <dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt class="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMMENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE</dt><dd>
+  <dl><dt class="value">ANNOTATION</dt><dt class="value">BUILT_IN</dt><dt class="value">CLASS</dt><dt class="value">COMMENT_BLOCK</dt><dt class="value">COMMENT_DOCUMENTATION</dt><dt class="value">COMMENT_END_OF_LINE</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_TEAR_OFF</dt><dt class="value">DIRECTIVE</dt><dt class="value">DYNAMIC_TYPE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
       </dd><dt class="value">DYNAMIC_LOCAL_VARIABLE_DECLARATION</dt><dt class="value">DYNAMIC_LOCAL_VARIABLE_REFERENCE</dt><dt class="value">DYNAMIC_PARAMETER_DECLARATION</dt><dt class="value">DYNAMIC_PARAMETER_REFERENCE</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dd>
@@ -1403,7 +1403,7 @@
       </dd><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER_DECLARATION</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
-      </dd><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT_PREFIX</dt><dt class="value">INSTANCE_FIELD_DECLARATION</dt><dt class="value">INSTANCE_FIELD_REFERENCE</dt><dt class="value">INSTANCE_GETTER_DECLARATION</dt><dt class="value">INSTANCE_GETTER_REFERENCE</dt><dt class="value">INSTANCE_METHOD_DECLARATION</dt><dt class="value">INSTANCE_METHOD_REFERENCE</dt><dt class="value">INSTANCE_SETTER_DECLARATION</dt><dt class="value">INSTANCE_SETTER_REFERENCE</dt><dt class="value">INVALID_STRING_ESCAPE</dt><dt class="value">KEYWORD</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY_NAME</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUBLE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt><dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class="value">LOCAL_FUNCTION_DECLARATION</dt><dt class="value">LOCAL_FUNCTION_REFERENCE</dt><dt class="value">LOCAL_VARIABLE</dt><dd>
+      </dd><dt class="value">IDENTIFIER_DEFAULT</dt><dt class="value">IMPORT_PREFIX</dt><dt class="value">INSTANCE_FIELD_DECLARATION</dt><dt class="value">INSTANCE_FIELD_REFERENCE</dt><dt class="value">INSTANCE_GETTER_DECLARATION</dt><dt class="value">INSTANCE_GETTER_REFERENCE</dt><dt class="value">INSTANCE_METHOD_DECLARATION</dt><dt class="value">INSTANCE_METHOD_REFERENCE</dt><dt class="value">INSTANCE_METHOD_TEAR_OFF</dt><dt class="value">INSTANCE_SETTER_DECLARATION</dt><dt class="value">INSTANCE_SETTER_REFERENCE</dt><dt class="value">INVALID_STRING_ESCAPE</dt><dt class="value">KEYWORD</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY_NAME</dt><dt class="value">LITERAL_BOOLEAN</dt><dt class="value">LITERAL_DOUBLE</dt><dt class="value">LITERAL_INTEGER</dt><dt class="value">LITERAL_LIST</dt><dt class="value">LITERAL_MAP</dt><dt class="value">LITERAL_STRING</dt><dt class="value">LOCAL_FUNCTION_DECLARATION</dt><dt class="value">LOCAL_FUNCTION_REFERENCE</dt><dt class="value">LOCAL_FUNCTION_TEAR_OFF</dt><dt class="value">LOCAL_VARIABLE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
       </dd><dt class="value">LOCAL_VARIABLE_DECLARATION</dt><dt class="value">LOCAL_VARIABLE_REFERENCE</dt><dt class="value">METHOD</dt><dd>
@@ -1427,7 +1427,7 @@
       </dd><dt class="value">TOP_LEVEL_VARIABLE</dt><dd>
         
         <p>Deprecated - no longer sent.</p>
-      </dd><dt class="value">PARAMETER_DECLARATION</dt><dt class="value">PARAMETER_REFERENCE</dt><dt class="value">STATIC_FIELD_DECLARATION</dt><dt class="value">STATIC_GETTER_DECLARATION</dt><dt class="value">STATIC_GETTER_REFERENCE</dt><dt class="value">STATIC_METHOD_DECLARATION</dt><dt class="value">STATIC_METHOD_REFERENCE</dt><dt class="value">STATIC_SETTER_DECLARATION</dt><dt class="value">STATIC_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_DECLARATION</dt><dt class="value">TOP_LEVEL_FUNCTION_REFERENCE</dt><dt class="value">TOP_LEVEL_GETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_GETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_SETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_VARIABLE_DECLARATION</dt><dt class="value">TYPE_ALIAS</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNRESOLVED_INSTANCE_MEMBER_REFERENCE</dt><dt class="value">VALID_STRING_ESCAPE</dt></dl></dd><dt class="typeDefinition"><a name="type_KytheEntry">KytheEntry: object</a></dt><dd>
+      </dd><dt class="value">PARAMETER_DECLARATION</dt><dt class="value">PARAMETER_REFERENCE</dt><dt class="value">STATIC_FIELD_DECLARATION</dt><dt class="value">STATIC_GETTER_DECLARATION</dt><dt class="value">STATIC_GETTER_REFERENCE</dt><dt class="value">STATIC_METHOD_DECLARATION</dt><dt class="value">STATIC_METHOD_REFERENCE</dt><dt class="value">STATIC_METHOD_TEAR_OFF</dt><dt class="value">STATIC_SETTER_DECLARATION</dt><dt class="value">STATIC_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_DECLARATION</dt><dt class="value">TOP_LEVEL_FUNCTION_REFERENCE</dt><dt class="value">TOP_LEVEL_FUNCTION_TEAR_OFF</dt><dt class="value">TOP_LEVEL_GETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_GETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_SETTER_DECLARATION</dt><dt class="value">TOP_LEVEL_SETTER_REFERENCE</dt><dt class="value">TOP_LEVEL_VARIABLE_DECLARATION</dt><dt class="value">TYPE_ALIAS</dt><dt class="value">TYPE_NAME_DYNAMIC</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNRESOLVED_INSTANCE_MEMBER_REFERENCE</dt><dt class="value">VALID_STRING_ESCAPE</dt></dl></dd><dt class="typeDefinition"><a name="type_KytheEntry">KytheEntry: object</a></dt><dd>
     <p>
       This object matches the format and documentation of the Entry object
       documented in the
diff --git a/pkg/analyzer_plugin/doc/tutorial/introduction.md b/pkg/analyzer_plugin/doc/tutorial/introduction.md
index 033031a..dc55139 100644
--- a/pkg/analyzer_plugin/doc/tutorial/introduction.md
+++ b/pkg/analyzer_plugin/doc/tutorial/introduction.md
@@ -215,4 +215,4 @@
 [completion]: completion.md
 [fixes]: fixes.md
 [navigation]: navigation.md
-[pluginapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_plugin/doc/api.html
+[pluginapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/main/pkg/analyzer_plugin/doc/api.html
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index e437a89..8348e13 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -8,7 +8,6 @@
 
 import 'dart:convert' hide JsonDecoder;
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart';
 
@@ -66,12 +65,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 704418402);
-    hash = JenkinsSmiHash.combine(hash, content.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        704418402,
+        content,
+      );
 }
 
 /// AnalysisError
@@ -252,19 +249,17 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, correction.hashCode);
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, url.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextMessages.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        severity,
+        type,
+        location,
+        message,
+        correction,
+        code,
+        url,
+        contextMessages,
+        hasFix,
+      );
 }
 
 /// AnalysisErrorSeverity
@@ -477,12 +472,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 873118866);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        873118866,
+        edits,
+      );
 }
 
 /// CompletionSuggestion
@@ -918,33 +911,31 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
-    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
-    hash = JenkinsSmiHash.combine(hash, displayText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isPotential.hashCode);
-    hash = JenkinsSmiHash.combine(hash, docSummary.hashCode);
-    hash = JenkinsSmiHash.combine(hash, docComplete.hashCode);
-    hash = JenkinsSmiHash.combine(hash, declaringType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterTypes.hashCode);
-    hash = JenkinsSmiHash.combine(hash, requiredParameterCount.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameterType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hashAll([
+        kind,
+        relevance,
+        completion,
+        displayText,
+        replacementOffset,
+        replacementLength,
+        selectionOffset,
+        selectionLength,
+        isDeprecated,
+        isPotential,
+        docSummary,
+        docComplete,
+        declaringType,
+        defaultArgumentListString,
+        defaultArgumentListTextRanges,
+        element,
+        returnType,
+        parameterNames,
+        parameterTypes,
+        requiredParameterCount,
+        hasNamedParameters,
+        parameterName,
+        parameterType,
+      ]);
 }
 
 /// CompletionSuggestionKind
@@ -1139,12 +1130,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        message,
+        location,
+      );
 }
 
 /// Element
@@ -1347,18 +1336,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    hash = JenkinsSmiHash.combine(hash, flags.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, typeParameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, aliasedType.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        name,
+        location,
+        flags,
+        parameters,
+        returnType,
+        typeParameters,
+        aliasedType,
+      );
 }
 
 /// ElementKind
@@ -1753,13 +1740,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        offset,
+        length,
+      );
 }
 
 /// HighlightRegion
@@ -1835,13 +1820,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        type,
+        offset,
+        length,
+      );
 }
 
 /// HighlightRegionType
@@ -1854,6 +1837,7 @@
 ///   COMMENT_DOCUMENTATION
 ///   COMMENT_END_OF_LINE
 ///   CONSTRUCTOR
+///   CONSTRUCTOR_TEAR_OFF
 ///   DIRECTIVE
 ///   DYNAMIC_TYPE
 ///   DYNAMIC_LOCAL_VARIABLE_DECLARATION
@@ -1876,6 +1860,7 @@
 ///   INSTANCE_GETTER_REFERENCE
 ///   INSTANCE_METHOD_DECLARATION
 ///   INSTANCE_METHOD_REFERENCE
+///   INSTANCE_METHOD_TEAR_OFF
 ///   INSTANCE_SETTER_DECLARATION
 ///   INSTANCE_SETTER_REFERENCE
 ///   INVALID_STRING_ESCAPE
@@ -1890,6 +1875,7 @@
 ///   LITERAL_STRING
 ///   LOCAL_FUNCTION_DECLARATION
 ///   LOCAL_FUNCTION_REFERENCE
+///   LOCAL_FUNCTION_TEAR_OFF
 ///   LOCAL_VARIABLE
 ///   LOCAL_VARIABLE_DECLARATION
 ///   LOCAL_VARIABLE_REFERENCE
@@ -1907,10 +1893,12 @@
 ///   STATIC_GETTER_REFERENCE
 ///   STATIC_METHOD_DECLARATION
 ///   STATIC_METHOD_REFERENCE
+///   STATIC_METHOD_TEAR_OFF
 ///   STATIC_SETTER_DECLARATION
 ///   STATIC_SETTER_REFERENCE
 ///   TOP_LEVEL_FUNCTION_DECLARATION
 ///   TOP_LEVEL_FUNCTION_REFERENCE
+///   TOP_LEVEL_FUNCTION_TEAR_OFF
 ///   TOP_LEVEL_GETTER_DECLARATION
 ///   TOP_LEVEL_GETTER_REFERENCE
 ///   TOP_LEVEL_SETTER_DECLARATION
@@ -1944,6 +1932,9 @@
   static const HighlightRegionType CONSTRUCTOR =
       HighlightRegionType._('CONSTRUCTOR');
 
+  static const HighlightRegionType CONSTRUCTOR_TEAR_OFF =
+      HighlightRegionType._('CONSTRUCTOR_TEAR_OFF');
+
   static const HighlightRegionType DIRECTIVE =
       HighlightRegionType._('DIRECTIVE');
 
@@ -2013,6 +2004,9 @@
   static const HighlightRegionType INSTANCE_METHOD_REFERENCE =
       HighlightRegionType._('INSTANCE_METHOD_REFERENCE');
 
+  static const HighlightRegionType INSTANCE_METHOD_TEAR_OFF =
+      HighlightRegionType._('INSTANCE_METHOD_TEAR_OFF');
+
   static const HighlightRegionType INSTANCE_SETTER_DECLARATION =
       HighlightRegionType._('INSTANCE_SETTER_DECLARATION');
 
@@ -2053,6 +2047,9 @@
   static const HighlightRegionType LOCAL_FUNCTION_REFERENCE =
       HighlightRegionType._('LOCAL_FUNCTION_REFERENCE');
 
+  static const HighlightRegionType LOCAL_FUNCTION_TEAR_OFF =
+      HighlightRegionType._('LOCAL_FUNCTION_TEAR_OFF');
+
   /// Deprecated - no longer sent.
   static const HighlightRegionType LOCAL_VARIABLE =
       HighlightRegionType._('LOCAL_VARIABLE');
@@ -2111,6 +2108,9 @@
   static const HighlightRegionType STATIC_METHOD_REFERENCE =
       HighlightRegionType._('STATIC_METHOD_REFERENCE');
 
+  static const HighlightRegionType STATIC_METHOD_TEAR_OFF =
+      HighlightRegionType._('STATIC_METHOD_TEAR_OFF');
+
   static const HighlightRegionType STATIC_SETTER_DECLARATION =
       HighlightRegionType._('STATIC_SETTER_DECLARATION');
 
@@ -2123,6 +2123,9 @@
   static const HighlightRegionType TOP_LEVEL_FUNCTION_REFERENCE =
       HighlightRegionType._('TOP_LEVEL_FUNCTION_REFERENCE');
 
+  static const HighlightRegionType TOP_LEVEL_FUNCTION_TEAR_OFF =
+      HighlightRegionType._('TOP_LEVEL_FUNCTION_TEAR_OFF');
+
   static const HighlightRegionType TOP_LEVEL_GETTER_DECLARATION =
       HighlightRegionType._('TOP_LEVEL_GETTER_DECLARATION');
 
@@ -2162,6 +2165,7 @@
     COMMENT_DOCUMENTATION,
     COMMENT_END_OF_LINE,
     CONSTRUCTOR,
+    CONSTRUCTOR_TEAR_OFF,
     DIRECTIVE,
     DYNAMIC_TYPE,
     DYNAMIC_LOCAL_VARIABLE_DECLARATION,
@@ -2184,6 +2188,7 @@
     INSTANCE_GETTER_REFERENCE,
     INSTANCE_METHOD_DECLARATION,
     INSTANCE_METHOD_REFERENCE,
+    INSTANCE_METHOD_TEAR_OFF,
     INSTANCE_SETTER_DECLARATION,
     INSTANCE_SETTER_REFERENCE,
     INVALID_STRING_ESCAPE,
@@ -2198,6 +2203,7 @@
     LITERAL_STRING,
     LOCAL_FUNCTION_DECLARATION,
     LOCAL_FUNCTION_REFERENCE,
+    LOCAL_FUNCTION_TEAR_OFF,
     LOCAL_VARIABLE,
     LOCAL_VARIABLE_DECLARATION,
     LOCAL_VARIABLE_REFERENCE,
@@ -2215,10 +2221,12 @@
     STATIC_GETTER_REFERENCE,
     STATIC_METHOD_DECLARATION,
     STATIC_METHOD_REFERENCE,
+    STATIC_METHOD_TEAR_OFF,
     STATIC_SETTER_DECLARATION,
     STATIC_SETTER_REFERENCE,
     TOP_LEVEL_FUNCTION_DECLARATION,
     TOP_LEVEL_FUNCTION_REFERENCE,
+    TOP_LEVEL_FUNCTION_TEAR_OFF,
     TOP_LEVEL_GETTER_DECLARATION,
     TOP_LEVEL_GETTER_REFERENCE,
     TOP_LEVEL_SETTER_DECLARATION,
@@ -2252,6 +2260,8 @@
         return COMMENT_END_OF_LINE;
       case 'CONSTRUCTOR':
         return CONSTRUCTOR;
+      case 'CONSTRUCTOR_TEAR_OFF':
+        return CONSTRUCTOR_TEAR_OFF;
       case 'DIRECTIVE':
         return DIRECTIVE;
       case 'DYNAMIC_TYPE':
@@ -2296,6 +2306,8 @@
         return INSTANCE_METHOD_DECLARATION;
       case 'INSTANCE_METHOD_REFERENCE':
         return INSTANCE_METHOD_REFERENCE;
+      case 'INSTANCE_METHOD_TEAR_OFF':
+        return INSTANCE_METHOD_TEAR_OFF;
       case 'INSTANCE_SETTER_DECLARATION':
         return INSTANCE_SETTER_DECLARATION;
       case 'INSTANCE_SETTER_REFERENCE':
@@ -2324,6 +2336,8 @@
         return LOCAL_FUNCTION_DECLARATION;
       case 'LOCAL_FUNCTION_REFERENCE':
         return LOCAL_FUNCTION_REFERENCE;
+      case 'LOCAL_FUNCTION_TEAR_OFF':
+        return LOCAL_FUNCTION_TEAR_OFF;
       case 'LOCAL_VARIABLE':
         return LOCAL_VARIABLE;
       case 'LOCAL_VARIABLE_DECLARATION':
@@ -2358,6 +2372,8 @@
         return STATIC_METHOD_DECLARATION;
       case 'STATIC_METHOD_REFERENCE':
         return STATIC_METHOD_REFERENCE;
+      case 'STATIC_METHOD_TEAR_OFF':
+        return STATIC_METHOD_TEAR_OFF;
       case 'STATIC_SETTER_DECLARATION':
         return STATIC_SETTER_DECLARATION;
       case 'STATIC_SETTER_REFERENCE':
@@ -2366,6 +2382,8 @@
         return TOP_LEVEL_FUNCTION_DECLARATION;
       case 'TOP_LEVEL_FUNCTION_REFERENCE':
         return TOP_LEVEL_FUNCTION_REFERENCE;
+      case 'TOP_LEVEL_FUNCTION_TEAR_OFF':
+        return TOP_LEVEL_FUNCTION_TEAR_OFF;
       case 'TOP_LEVEL_GETTER_DECLARATION':
         return TOP_LEVEL_GETTER_DECLARATION;
       case 'TOP_LEVEL_GETTER_REFERENCE':
@@ -2510,15 +2528,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, source.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, target.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fact.hashCode);
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        source,
+        kind,
+        target,
+        fact,
+        value,
+      );
 }
 
 /// KytheVName
@@ -2624,15 +2640,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, signature.hashCode);
-    hash = JenkinsSmiHash.combine(hash, corpus.hashCode);
-    hash = JenkinsSmiHash.combine(hash, root.hashCode);
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    hash = JenkinsSmiHash.combine(hash, language.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        signature,
+        corpus,
+        root,
+        path,
+        language,
+      );
 }
 
 /// LinkedEditGroup
@@ -2735,13 +2749,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, positions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        positions,
+        length,
+        suggestions,
+      );
 }
 
 /// LinkedEditSuggestion
@@ -2804,12 +2816,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, value.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        value,
+        kind,
+      );
 }
 
 /// LinkedEditSuggestionKind
@@ -3008,17 +3018,15 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, endColumn.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+        startLine,
+        startColumn,
+        endLine,
+        endColumn,
+      );
 }
 
 /// NavigationRegion
@@ -3096,13 +3104,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        targets,
+      );
 }
 
 /// NavigationTarget
@@ -3252,18 +3258,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileIndex.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
-    hash = JenkinsSmiHash.combine(hash, startColumn.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        fileIndex,
+        offset,
+        length,
+        startLine,
+        startColumn,
+        codeOffset,
+        codeLength,
+      );
 }
 
 /// Occurrences
@@ -3340,13 +3344,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        offsets,
+        length,
+      );
 }
 
 /// Outline
@@ -3474,16 +3476,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, element.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, children.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        element,
+        offset,
+        length,
+        codeOffset,
+        codeLength,
+        children,
+      );
 }
 
 /// ParameterInfo
@@ -3574,14 +3574,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, defaultValue.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        name,
+        type,
+        defaultValue,
+      );
 }
 
 /// ParameterKind
@@ -3713,12 +3711,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// RefactoringKind
@@ -3928,15 +3924,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        id,
+        kind,
+        type,
+        name,
+        parameters,
+      );
 }
 
 /// RefactoringMethodParameterKind
@@ -4076,13 +4070,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, location.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        severity,
+        message,
+        location,
+      );
 }
 
 /// RefactoringProblemSeverity
@@ -4213,11 +4205,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, 114870849);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 114870849.hashCode;
 }
 
 /// SourceChange
@@ -4362,15 +4350,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkedEditGroups.hashCode);
-    hash = JenkinsSmiHash.combine(hash, selection.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        message,
+        edits,
+        linkedEditGroups,
+        selection,
+        id,
+      );
 }
 
 /// SourceEdit
@@ -4477,14 +4463,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacement.hashCode);
-    hash = JenkinsSmiHash.combine(hash, id.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        replacement,
+        id,
+      );
 }
 
 /// SourceFileEdit
@@ -4575,11 +4559,9 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fileStamp.hashCode);
-    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        fileStamp,
+        edits,
+      );
 }
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
index 937d5c2..e8ee6b4 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
@@ -8,7 +8,6 @@
 
 import 'dart:convert' hide JsonDecoder;
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -81,12 +80,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, error.hashCode);
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        error,
+        fixes,
+      );
 }
 
 /// analysis.errors params
@@ -164,12 +161,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, errors.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        errors,
+      );
 }
 
 /// analysis.folding params
@@ -247,12 +242,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.getNavigation params
@@ -340,13 +333,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// analysis.getNavigation result
@@ -449,13 +440,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        files,
+        targets,
+        regions,
+      );
 }
 
 /// analysis.handleWatchEvents params
@@ -523,11 +512,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, events.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => events.hashCode;
 }
 
 /// analysis.handleWatchEvents result
@@ -551,9 +536,7 @@
   }
 
   @override
-  int get hashCode {
-    return 779767607;
-  }
+  int get hashCode => 779767607;
 }
 
 /// analysis.highlights params
@@ -631,12 +614,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+      );
 }
 
 /// analysis.navigation params
@@ -747,14 +728,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, regions.hashCode);
-    hash = JenkinsSmiHash.combine(hash, targets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        regions,
+        targets,
+        files,
+      );
 }
 
 /// analysis.occurrences params
@@ -833,12 +812,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        occurrences,
+      );
 }
 
 /// analysis.outline params
@@ -914,12 +891,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, outline.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        outline,
+      );
 }
 
 /// AnalysisService
@@ -1056,11 +1031,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, roots.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => roots.hashCode;
 }
 
 /// analysis.setContextRoots result
@@ -1084,9 +1055,7 @@
   }
 
   @override
-  int get hashCode {
-    return 969645618;
-  }
+  int get hashCode => 969645618;
 }
 
 /// analysis.setPriorityFiles params
@@ -1149,11 +1118,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.setPriorityFiles result
@@ -1177,9 +1142,7 @@
   }
 
   @override
-  int get hashCode {
-    return 330050055;
-  }
+  int get hashCode => 330050055;
 }
 
 /// analysis.setSubscriptions params
@@ -1252,11 +1215,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, subscriptions.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => subscriptions.hashCode;
 }
 
 /// analysis.setSubscriptions result
@@ -1280,9 +1239,7 @@
   }
 
   @override
-  int get hashCode {
-    return 218088493;
-  }
+  int get hashCode => 218088493;
 }
 
 /// analysis.updateContent params
@@ -1356,11 +1313,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => files.hashCode;
 }
 
 /// analysis.updateContent result
@@ -1384,9 +1337,7 @@
   }
 
   @override
-  int get hashCode {
-    return 468798730;
-  }
+  int get hashCode => 468798730;
 }
 
 /// completion.getSuggestions params
@@ -1459,12 +1410,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// completion.getSuggestions result
@@ -1572,13 +1521,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, replacementOffset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, replacementLength.hashCode);
-    hash = JenkinsSmiHash.combine(hash, results.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        replacementOffset,
+        replacementLength,
+        results,
+      );
 }
 
 /// ContextRoot
@@ -1659,13 +1606,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, root.hashCode);
-    hash = JenkinsSmiHash.combine(hash, exclude.hashCode);
-    hash = JenkinsSmiHash.combine(hash, optionsFile.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        root,
+        exclude,
+        optionsFile,
+      );
 }
 
 /// convertGetterToMethod feedback
@@ -1682,9 +1627,7 @@
   }
 
   @override
-  int get hashCode {
-    return 616032599;
-  }
+  int get hashCode => 616032599;
 }
 
 /// convertGetterToMethod options
@@ -1701,9 +1644,7 @@
   }
 
   @override
-  int get hashCode {
-    return 488848400;
-  }
+  int get hashCode => 488848400;
 }
 
 /// convertMethodToGetter feedback
@@ -1720,9 +1661,7 @@
   }
 
   @override
-  int get hashCode {
-    return 165291526;
-  }
+  int get hashCode => 165291526;
 }
 
 /// convertMethodToGetter options
@@ -1739,9 +1678,7 @@
   }
 
   @override
-  int get hashCode {
-    return 27952290;
-  }
+  int get hashCode => 27952290;
 }
 
 /// edit.getAssists params
@@ -1826,13 +1763,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAssists result
@@ -1901,11 +1836,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, assists.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => assists.hashCode;
 }
 
 /// edit.getAvailableRefactorings params
@@ -1991,13 +1922,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+        length,
+      );
 }
 
 /// edit.getAvailableRefactorings result
@@ -2072,11 +2001,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kinds.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => kinds.hashCode;
 }
 
 /// edit.getFixes params
@@ -2148,12 +2073,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        file,
+        offset,
+      );
 }
 
 /// edit.getFixes result
@@ -2222,11 +2145,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => fixes.hashCode;
 }
 
 /// edit.getRefactoring params
@@ -2361,16 +2280,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, validateOnly.hashCode);
-    hash = JenkinsSmiHash.combine(hash, options.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        kind,
+        file,
+        offset,
+        length,
+        validateOnly,
+        options,
+      );
 }
 
 /// edit.getRefactoring result
@@ -2542,16 +2459,14 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, initialProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, optionsProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, finalProblems.hashCode);
-    hash = JenkinsSmiHash.combine(hash, feedback.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    hash = JenkinsSmiHash.combine(hash, potentialEdits.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        initialProblems,
+        optionsProblems,
+        finalProblems,
+        feedback,
+        change,
+        potentialEdits,
+      );
 }
 
 /// extractLocalVariable feedback
@@ -2673,15 +2588,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        coveringExpressionOffsets,
+        coveringExpressionLengths,
+        names,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractLocalVariable options
@@ -2754,12 +2667,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        extractAll,
+      );
 }
 
 /// extractMethod feedback
@@ -2919,18 +2830,16 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, names.hashCode);
-    hash = JenkinsSmiHash.combine(hash, canCreateGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, offsets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lengths.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        returnType,
+        names,
+        canCreateGetter,
+        parameters,
+        offsets,
+        lengths,
+      );
 }
 
 /// extractMethod options
@@ -3063,15 +2972,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, returnType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, createGetter.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
-    hash = JenkinsSmiHash.combine(hash, extractAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        returnType,
+        createGetter,
+        name,
+        parameters,
+        extractAll,
+      );
 }
 
 /// inlineLocalVariable feedback
@@ -3135,12 +3042,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        name,
+        occurrences,
+      );
 }
 
 /// inlineLocalVariable options
@@ -3157,9 +3062,7 @@
   }
 
   @override
-  int get hashCode {
-    return 540364977;
-  }
+  int get hashCode => 540364977;
 }
 
 /// inlineMethod feedback
@@ -3241,13 +3144,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, className.hashCode);
-    hash = JenkinsSmiHash.combine(hash, methodName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, isDeclaration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        className,
+        methodName,
+        isDeclaration,
+      );
 }
 
 /// inlineMethod options
@@ -3319,12 +3220,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode);
-    hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        deleteSource,
+        inlineAll,
+      );
 }
 
 /// kythe.getKytheEntries params
@@ -3387,11 +3286,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, file.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => file.hashCode;
 }
 
 /// kythe.getKytheEntries result
@@ -3477,12 +3372,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, entries.hashCode);
-    hash = JenkinsSmiHash.combine(hash, files.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        entries,
+        files,
+      );
 }
 
 /// moveFile feedback
@@ -3498,9 +3391,7 @@
   }
 
   @override
-  int get hashCode {
-    return 438975893;
-  }
+  int get hashCode => 438975893;
 }
 
 /// moveFile options
@@ -3558,11 +3449,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newFile.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newFile.hashCode;
 }
 
 /// plugin.error params
@@ -3653,13 +3540,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isFatal.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isFatal,
+        message,
+        stackTrace,
+      );
 }
 
 /// plugin.shutdown params
@@ -3683,9 +3568,7 @@
   }
 
   @override
-  int get hashCode {
-    return 478064585;
-  }
+  int get hashCode => 478064585;
 }
 
 /// plugin.shutdown result
@@ -3709,9 +3592,7 @@
   }
 
   @override
-  int get hashCode {
-    return 9389109;
-  }
+  int get hashCode => 9389109;
 }
 
 /// plugin.versionCheck params
@@ -3802,13 +3683,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, byteStorePath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, sdkPath.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        byteStorePath,
+        sdkPath,
+        version,
+      );
 }
 
 /// plugin.versionCheck result
@@ -3939,15 +3818,13 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, isCompatible.hashCode);
-    hash = JenkinsSmiHash.combine(hash, name.hashCode);
-    hash = JenkinsSmiHash.combine(hash, version.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contactInfo.hashCode);
-    hash = JenkinsSmiHash.combine(hash, interestingFiles.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        isCompatible,
+        name,
+        version,
+        contactInfo,
+        interestingFiles,
+      );
 }
 
 /// PrioritizedSourceChange
@@ -4012,12 +3889,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, priority.hashCode);
-    hash = JenkinsSmiHash.combine(hash, change.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        priority,
+        change,
+      );
 }
 
 /// RefactoringFeedback
@@ -4053,10 +3928,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// RefactoringOptions
@@ -4091,10 +3963,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => 0;
 }
 
 /// rename feedback
@@ -4184,14 +4053,12 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
-    hash = JenkinsSmiHash.combine(hash, length.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementKindName.hashCode);
-    hash = JenkinsSmiHash.combine(hash, oldName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        offset,
+        length,
+        elementKindName,
+        oldName,
+      );
 }
 
 /// rename options
@@ -4249,11 +4116,7 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => newName.hashCode;
 }
 
 /// RequestError
@@ -4333,13 +4196,11 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, code.hashCode);
-    hash = JenkinsSmiHash.combine(hash, message.hashCode);
-    hash = JenkinsSmiHash.combine(hash, stackTrace.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        code,
+        message,
+        stackTrace,
+      );
 }
 
 /// RequestErrorCode
@@ -4483,12 +4344,10 @@
   }
 
   @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, type.hashCode);
-    hash = JenkinsSmiHash.combine(hash, path.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(
+        type,
+        path,
+      );
 }
 
 /// WatchEventType
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 f7e9777..a9597f7 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
@@ -10,7 +10,6 @@
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_general.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/src/utilities/change_builder/change_builder_yaml.dart';
@@ -71,23 +70,14 @@
     // In addition, we should consider implementing our own hash function for
     // file edits because the `hashCode` defined for them might not be
     // sufficient to detect all changes to the list of edits.
-    var hash = 0;
-    for (var builder in _genericFileEditBuilders.values) {
-      if (builder.hasEdits) {
-        hash = JenkinsSmiHash.combine(hash, builder.fileEdit.hashCode);
-      }
-    }
-    for (var builder in _dartFileEditBuilders.values) {
-      if (builder.hasEdits) {
-        hash = JenkinsSmiHash.combine(hash, builder.fileEdit.hashCode);
-      }
-    }
-    for (var builder in _yamlFileEditBuilders.values) {
-      if (builder.hasEdits) {
-        hash = JenkinsSmiHash.combine(hash, builder.fileEdit.hashCode);
-      }
-    }
-    return JenkinsSmiHash.finish(hash);
+    return Object.hashAll([
+      for (var builder in _genericFileEditBuilders.values)
+        if (builder.hasEdits) builder.fileEdit,
+      for (var builder in _dartFileEditBuilders.values)
+        if (builder.hasEdits) builder.fileEdit,
+      for (var builder in _yamlFileEditBuilders.values)
+        if (builder.hasEdits) builder.fileEdit,
+    ]);
   }
 
   @override
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 0738926..9b0c895 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
@@ -516,12 +516,14 @@
       ExecutableElement? methodBeingCopied,
       String? nameGroupName,
       DartType? type,
-      String? typeGroupName}) {
+      String? typeGroupName,
+      bool isRequiredType = false}) {
     bool writeType() {
       if (typeGroupName != null) {
         late bool hasType;
         addLinkedEdit(typeGroupName, (DartLinkedEditBuilder builder) {
-          hasType = _writeType(type, methodBeingCopied: methodBeingCopied);
+          hasType = _writeType(type,
+              methodBeingCopied: methodBeingCopied, required: isRequiredType);
           builder.addSuperTypesAsSuggestions(type);
         });
         return hasType;
@@ -596,7 +598,7 @@
 
   @override
   void writeParameters(Iterable<ParameterElement> parameters,
-      {ExecutableElement? methodBeingCopied}) {
+      {ExecutableElement? methodBeingCopied, bool requiredTypes = false}) {
     var parameterNames = <String>{};
     for (var i = 0; i < parameters.length; i++) {
       var name = parameters.elementAt(i).name;
@@ -639,7 +641,8 @@
           methodBeingCopied: methodBeingCopied,
           nameGroupName: parameter.isNamed ? null : '${groupPrefix}PARAM$i',
           type: parameter.type,
-          typeGroupName: '${groupPrefix}TYPE$i');
+          typeGroupName: '${groupPrefix}TYPE$i',
+          isRequiredType: requiredTypes);
       // default value
       var defaultCode = parameter.defaultValueCode;
       if (defaultCode != null) {
@@ -950,7 +953,7 @@
       name = expression.methodName.name;
     } else if (expression is InstanceCreationExpression) {
       var constructorName = expression.constructorName;
-      var typeName = constructorName.type;
+      var typeName = constructorName.type2;
       var typeNameIdentifier = typeName.name;
       // new ClassName()
       if (typeNameIdentifier is SimpleIdentifier) {
@@ -1233,7 +1236,11 @@
       write('Function');
       writeTypeParameters(type.typeFormals,
           methodBeingCopied: methodBeingCopied);
-      writeParameters(type.parameters, methodBeingCopied: methodBeingCopied);
+      writeParameters(type.parameters,
+          methodBeingCopied: methodBeingCopied, requiredTypes: true);
+      if (type.nullabilitySuffix == NullabilitySuffix.question) {
+        write('?');
+      }
       return true;
     }
 
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index d855849..95d5833 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -254,7 +254,7 @@
       if (name != null) {
         constructor = name.staticElement;
       } else {
-        var classElem = parent.constructorName.type.name.staticElement;
+        var classElem = parent.constructorName.type2.name.staticElement;
         if (classElem is ClassElement) {
           constructor = classElem.unnamedConstructor;
         }
@@ -452,7 +452,7 @@
 
   @override
   void visitClassTypeAlias(ClassTypeAlias node) {
-    if (identical(entity, node.superclass)) {
+    if (identical(entity, node.superclass2)) {
       optype.completionLocation = 'ClassTypeAlias_superclass';
       optype.includeTypeNameSuggestions = true;
     }
@@ -646,7 +646,7 @@
 
   @override
   void visitExtendsClause(ExtendsClause node) {
-    if (identical(entity, node.superclass)) {
+    if (identical(entity, node.superclass2)) {
       optype.completionLocation = 'ExtendsClause_superclass';
       optype.includeTypeNameSuggestions = true;
       optype.typeNameSuggestionsFilter = _nonMixinClasses;
@@ -1073,6 +1073,16 @@
   }
 
   @override
+  void visitNamedType(NamedType node) {
+    // The entity won't be the first child entity (node.name), since
+    // CompletionTarget would have chosen an edge higher in the parse tree. So
+    // it must be node.typeArguments, meaning that the cursor is between the
+    // type name and the "<" that starts the type arguments. In this case,
+    // we have no completions to offer.
+    assert(identical(entity, node.typeArguments));
+  }
+
+  @override
   void visitNode(AstNode node) {
     // no suggestion by default
   }
@@ -1120,7 +1130,7 @@
         return;
       }
       optype.isPrefixed = true;
-      if (node.parent is TypeName && node.parent?.parent is ConstructorName) {
+      if (node.parent is NamedType && node.parent?.parent is ConstructorName) {
         optype.includeConstructorSuggestions = true;
       } else if (node.parent is Annotation) {
         optype.includeConstructorSuggestions = true;
@@ -1353,16 +1363,6 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
-    // The entity won't be the first child entity (node.name), since
-    // CompletionTarget would have chosen an edge higher in the parse tree. So
-    // it must be node.typeArguments, meaning that the cursor is between the
-    // type name and the "<" that starts the type arguments. In this case,
-    // we have no completions to offer.
-    assert(identical(entity, node.typeArguments));
-  }
-
-  @override
   void visitTypeParameter(TypeParameter node) {
     if (entity == node.bound) {
       optype.completionLocation = 'TypeParameter_bound';
@@ -1408,7 +1408,7 @@
 
   @override
   void visitWithClause(WithClause node) {
-    if (node.mixinTypes.contains(entity)) {
+    if (node.mixinTypes2.contains(entity)) {
       optype.completionLocation = 'WithClause_mixinType';
     }
     optype.includeTypeNameSuggestions = true;
diff --git a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
index 8181406..c622af3 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
@@ -12,10 +12,11 @@
 /// declarations in those nodes. Consumers typically call [visit] which catches
 /// the exception thrown by [finished].
 abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor {
-  static final TypeName STACKTRACE_TYPE = astFactory.typeName(
-      astFactory
-          .simpleIdentifier(StringToken(TokenType.IDENTIFIER, 'StackTrace', 0)),
-      null);
+  static final NamedType STACKTRACE_TYPE = astFactory.namedType(
+    name: astFactory.simpleIdentifier(
+      StringToken(TokenType.IDENTIFIER, 'StackTrace', 0),
+    ),
+  );
 
   final int offset;
 
diff --git a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
index 10640fc..575cd5b 100644
--- a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
+++ b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
@@ -17,13 +17,6 @@
 ///
 /// Clients may not extend, implement or mix-in this class.
 class AnalyzerConverter {
-  /// Optional provider for [analyzer.Element] location, used for example to
-  /// override the location of macro-generated elements.
-  final ElementLocationProvider? _locationProvider;
-
-  AnalyzerConverter({ElementLocationProvider? locationProvider})
-      : _locationProvider = locationProvider;
-
   /// Convert the analysis [error] from the 'analyzer' package to an analysis
   /// error defined by the plugin API. If a [lineInfo] is provided then the
   /// error's location will have a start line and start column. If a [severity]
@@ -206,12 +199,6 @@
     if (element == null || element.source == null) {
       return null;
     }
-
-    var result = _locationProvider?.forElement(element);
-    if (result != null) {
-      return result;
-    }
-
     offset ??= element.nameOffset;
     length ??= element.nameLength;
     if (element is analyzer.CompilationUnitElement ||
@@ -425,9 +412,3 @@
         endLine: endLine, endColumn: endColumn);
   }
 }
-
-abstract class ElementLocationProvider {
-  /// Return the location of [element] that this provider wants to override,
-  /// or `null` if the default location should be used.
-  plugin.Location? forElement(analyzer.Element element);
-}
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 0707033..6bd6c78 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
@@ -201,13 +201,16 @@
   ///
   /// If [isRequiredNamed] is `true` then either the keyword `required` or the
   /// annotation `@required` will be included in the parameter declaration.
+  ///
+  /// If [isRequiredType] is `true` then the type is always written.
   void writeParameter(String name,
       {bool isCovariant,
       bool isRequiredNamed,
       ExecutableElement? methodBeingCopied,
       String? nameGroupName,
       DartType? type,
-      String? typeGroupName});
+      String? typeGroupName,
+      bool isRequiredType});
 
   /// Write the code for a parameter that would match the given [argument]. The
   /// name of the parameter will be generated based on the type of the argument,
@@ -223,8 +226,10 @@
   /// If a [methodBeingCopied] is provided, then type parameters defined by that
   /// method are assumed to be part of what is being written and hence valid
   /// types.
+  ///
+  /// If [requiredTypes] is `true`, then the types are always written.
   void writeParameters(Iterable<ParameterElement> parameters,
-      {ExecutableElement? methodBeingCopied});
+      {ExecutableElement? methodBeingCopied, bool requiredTypes});
 
   /// Write the code for a list of parameters that would match the given list of
   /// [arguments]. The surrounding parentheses are *not* written.
diff --git a/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart b/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
index ec74ce8..8d5106f 100644
--- a/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/navigation/navigation_dart.dart
@@ -16,15 +16,12 @@
 import 'package:analyzer_plugin/utilities/navigation/navigation.dart';
 
 NavigationCollector computeDartNavigation(
-  ResourceProvider resourceProvider,
-  NavigationCollector collector,
-  CompilationUnit unit,
-  int? offset,
-  int? length, {
-  AnalyzerConverter? analyzerConverter,
-}) {
-  var dartCollector = _DartNavigationCollector(
-      collector, offset, length, analyzerConverter ?? AnalyzerConverter());
+    ResourceProvider resourceProvider,
+    NavigationCollector collector,
+    CompilationUnit unit,
+    int? offset,
+    int? length) {
+  var dartCollector = _DartNavigationCollector(collector, offset, length);
   var visitor = _DartNavigationComputerVisitor(resourceProvider, dartCollector);
   if (offset == null || length == null) {
     unit.accept(visitor);
@@ -69,14 +66,9 @@
   final NavigationCollector collector;
   final int? requestedOffset;
   final int? requestedLength;
-  final AnalyzerConverter _analyzerConverter;
 
   _DartNavigationCollector(
-    this.collector,
-    this.requestedOffset,
-    this.requestedLength,
-    this._analyzerConverter,
-  );
+      this.collector, this.requestedOffset, this.requestedLength);
 
   void _addRegion(int offset, int length, Element? element) {
     element = element?.nonSynthetic;
@@ -93,14 +85,15 @@
     if (!_isWithinRequestedRange(offset, length)) {
       return;
     }
-    var kind = _analyzerConverter.convertElementKind(element.kind);
-    var location = _analyzerConverter.locationFromElement(element);
+    var converter = AnalyzerConverter();
+    var kind = converter.convertElementKind(element.kind);
+    var location = converter.locationFromElement(element);
     if (location == null) {
       return;
     }
 
     var codeLocation = collector.collectCodeLocations
-        ? _getCodeLocation(element, location)
+        ? _getCodeLocation(element, location, converter)
         : null;
 
     collector.addRegion(offset, length, kind, location,
@@ -129,8 +122,8 @@
   }
 
   /// Get the location of the code (excluding leading doc comments) for this element.
-  protocol.Location? _getCodeLocation(
-      Element element, protocol.Location location) {
+  protocol.Location? _getCodeLocation(Element element,
+      protocol.Location location, AnalyzerConverter converter) {
     var codeElement = element;
     // For synthetic getters created for fields, we need to access the associated
     // variable to get the codeOffset/codeLength.
@@ -169,7 +162,7 @@
       codeOffset = offsetAfterDocs;
     }
 
-    return _analyzerConverter.locationFromElement(element,
+    return converter.locationFromElement(element,
         offset: codeOffset, length: codeLength);
   }
 
@@ -315,7 +308,7 @@
       return;
     }
     // add regions
-    var typeName = node.type;
+    var typeName = node.type2;
     // [prefix].ClassName
     {
       var name = typeName.name;
diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml
index 7b0003e..41b859d 100644
--- a/pkg/analyzer_plugin/pubspec.yaml
+++ b/pkg/analyzer_plugin/pubspec.yaml
@@ -1,17 +1,17 @@
 name: analyzer_plugin
 description: A framework and support code for building plugins for the analysis server.
-version: 0.7.0
+version: 0.8.0
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_plugin
 
 environment:
-  sdk: '>=2.12.0 <3.0.0'
+  sdk: '>=2.14.0 <3.0.0'
 
 dependencies:
-  analyzer: ^2.0.0
+  analyzer: ^2.4.0
   collection: ^1.15.0
   dart_style: ^2.0.0
   pub_semver: ^2.0.0
-  yaml: ^3.0.0
+  yaml: ^3.1.0
 
 dev_dependencies:
   analyzer_utilities:
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index 4ed7683..bb1ed53 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -368,6 +368,7 @@
 ///   COMMENT_DOCUMENTATION
 ///   COMMENT_END_OF_LINE
 ///   CONSTRUCTOR
+///   CONSTRUCTOR_TEAR_OFF
 ///   DIRECTIVE
 ///   DYNAMIC_TYPE
 ///   DYNAMIC_LOCAL_VARIABLE_DECLARATION
@@ -390,6 +391,7 @@
 ///   INSTANCE_GETTER_REFERENCE
 ///   INSTANCE_METHOD_DECLARATION
 ///   INSTANCE_METHOD_REFERENCE
+///   INSTANCE_METHOD_TEAR_OFF
 ///   INSTANCE_SETTER_DECLARATION
 ///   INSTANCE_SETTER_REFERENCE
 ///   INVALID_STRING_ESCAPE
@@ -404,6 +406,7 @@
 ///   LITERAL_STRING
 ///   LOCAL_FUNCTION_DECLARATION
 ///   LOCAL_FUNCTION_REFERENCE
+///   LOCAL_FUNCTION_TEAR_OFF
 ///   LOCAL_VARIABLE
 ///   LOCAL_VARIABLE_DECLARATION
 ///   LOCAL_VARIABLE_REFERENCE
@@ -421,10 +424,12 @@
 ///   STATIC_GETTER_REFERENCE
 ///   STATIC_METHOD_DECLARATION
 ///   STATIC_METHOD_REFERENCE
+///   STATIC_METHOD_TEAR_OFF
 ///   STATIC_SETTER_DECLARATION
 ///   STATIC_SETTER_REFERENCE
 ///   TOP_LEVEL_FUNCTION_DECLARATION
 ///   TOP_LEVEL_FUNCTION_REFERENCE
+///   TOP_LEVEL_FUNCTION_TEAR_OFF
 ///   TOP_LEVEL_GETTER_DECLARATION
 ///   TOP_LEVEL_GETTER_REFERENCE
 ///   TOP_LEVEL_SETTER_DECLARATION
@@ -444,6 +449,7 @@
   'COMMENT_DOCUMENTATION',
   'COMMENT_END_OF_LINE',
   'CONSTRUCTOR',
+  'CONSTRUCTOR_TEAR_OFF',
   'DIRECTIVE',
   'DYNAMIC_TYPE',
   'DYNAMIC_LOCAL_VARIABLE_DECLARATION',
@@ -466,6 +472,7 @@
   'INSTANCE_GETTER_REFERENCE',
   'INSTANCE_METHOD_DECLARATION',
   'INSTANCE_METHOD_REFERENCE',
+  'INSTANCE_METHOD_TEAR_OFF',
   'INSTANCE_SETTER_DECLARATION',
   'INSTANCE_SETTER_REFERENCE',
   'INVALID_STRING_ESCAPE',
@@ -480,6 +487,7 @@
   'LITERAL_STRING',
   'LOCAL_FUNCTION_DECLARATION',
   'LOCAL_FUNCTION_REFERENCE',
+  'LOCAL_FUNCTION_TEAR_OFF',
   'LOCAL_VARIABLE',
   'LOCAL_VARIABLE_DECLARATION',
   'LOCAL_VARIABLE_REFERENCE',
@@ -497,10 +505,12 @@
   'STATIC_GETTER_REFERENCE',
   'STATIC_METHOD_DECLARATION',
   'STATIC_METHOD_REFERENCE',
+  'STATIC_METHOD_TEAR_OFF',
   'STATIC_SETTER_DECLARATION',
   'STATIC_SETTER_REFERENCE',
   'TOP_LEVEL_FUNCTION_DECLARATION',
   'TOP_LEVEL_FUNCTION_REFERENCE',
+  'TOP_LEVEL_FUNCTION_TEAR_OFF',
   'TOP_LEVEL_GETTER_DECLARATION',
   'TOP_LEVEL_GETTER_REFERENCE',
   'TOP_LEVEL_SETTER_DECLARATION',
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 fd398ed..047e7a1 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
@@ -22,8 +22,8 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(DartEditBuilderImpl_PreNullSafetyTest);
     defineReflectiveTests(DartEditBuilderImpl_WithNullSafetyTest);
+    defineReflectiveTests(DartEditBuilderImpl_WithoutNullSafetyTest);
     defineReflectiveTests(DartFileEditBuilderImplTest);
     defineReflectiveTests(DartLinkedEditBuilderImplTest);
     defineReflectiveTests(ImportLibraryTest);
@@ -32,7 +32,38 @@
 }
 
 @reflectiveTest
-class DartEditBuilderImpl_PreNullSafetyTest extends DartEditBuilderImplTest {
+class DartEditBuilderImpl_WithNullSafetyTest extends DartEditBuilderImplTest {
+  Future<void> test_writeParameter_required_keyword() async {
+    var path = convertPath('$testPackageRootPath/lib/test.dart');
+    var content = 'class A {}';
+    addSource(path, content);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', isRequiredNamed: true);
+      });
+    });
+    var edit = getEdit(builder);
+    expect(edit.replacement, equalsIgnoringWhitespace('required a'));
+  }
+
+  Future<void> test_writeType_function_nullable() async {
+    await _assertWriteType('int Function(double a, String b)?');
+  }
+
+  Future<void> test_writeType_Never_none() async {
+    await _assertWriteType('Never');
+  }
+
+  Future<void> test_writeType_Never_question() async {
+    await _assertWriteType('Never?');
+  }
+}
+
+@reflectiveTest
+class DartEditBuilderImpl_WithoutNullSafetyTest extends DartEditBuilderImplTest
+    with WithoutNullSafetyMixin {
   Future<void> test_writeParameter_covariantAndRequired() async {
     var path = convertPath('$testPackageRootPath/lib/test.dart');
     var content = 'class A {}';
@@ -90,33 +121,6 @@
   }
 }
 
-@reflectiveTest
-class DartEditBuilderImpl_WithNullSafetyTest extends DartEditBuilderImplTest
-    with WithNullSafetyMixin {
-  Future<void> test_writeParameter_required_keyword() async {
-    var path = convertPath('$testPackageRootPath/lib/test.dart');
-    var content = 'class A {}';
-    addSource(path, content);
-
-    var builder = newBuilder();
-    await builder.addDartFileEdit(path, (builder) {
-      builder.addInsertion(content.length - 1, (builder) {
-        builder.writeParameter('a', isRequiredNamed: true);
-      });
-    });
-    var edit = getEdit(builder);
-    expect(edit.replacement, equalsIgnoringWhitespace('required a'));
-  }
-
-  Future<void> test_writeType_Never_none() async {
-    await _assertWriteType('Never');
-  }
-
-  Future<void> test_writeType_Never_question() async {
-    await _assertWriteType('Never?');
-  }
-}
-
 class DartEditBuilderImplTest extends AbstractContextTest
     with DartChangeBuilderMixin {
   @override
@@ -1102,6 +1106,25 @@
     expect(edit.replacement, equalsIgnoringWhitespace('(int i, String s)'));
   }
 
+  Future<void> test_writeParameters_requiredTypes() async {
+    var path = convertPath('/home/test/lib/test.dart');
+    var content = 'void f(e) {}';
+    addSource(path, content);
+    var unit = (await resolveFile(path)).unit;
+    var f = unit.declarations[0] as FunctionDeclaration;
+    var parameters = f.functionExpression.parameters;
+    var elements = parameters?.parameters.map((p) => p.declaredElement!);
+
+    var builder = newBuilder();
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameters(elements!, requiredTypes: true);
+      });
+    });
+    var edit = getEdit(builder);
+    expect(edit.replacement, equals('(dynamic e)'));
+  }
+
   Future<void> test_writeParametersMatchingArguments_named() async {
     var path = convertPath('/home/test/lib/test.dart');
     var content = '''
diff --git a/pkg/analyzer_plugin/test/support/abstract_context.dart b/pkg/analyzer_plugin/test/support/abstract_context.dart
index 6d58ad9..33577e7 100644
--- a/pkg/analyzer_plugin/test/support/abstract_context.dart
+++ b/pkg/analyzer_plugin/test/support/abstract_context.dart
@@ -11,7 +11,6 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
 import 'package:analyzer/src/test_utilities/mock_packages.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
@@ -51,7 +50,7 @@
   String get testPackageAnalysisOptionsPath =>
       convertPath('$testPackageRootPath/analysis_options.yaml');
 
-  String? get testPackageLanguageVersion => '2.9';
+  String? get testPackageLanguageVersion => null;
 
   /// The file system-specific `pubspec.yaml` path.
   String get testPackagePubspecPath =>
@@ -162,25 +161,9 @@
   }
 }
 
-mixin WithNonFunctionTypeAliasesMixin on AbstractContextTest {
+mixin WithoutNullSafetyMixin on AbstractContextTest {
   @override
-  String? get testPackageLanguageVersion => null;
-
-  @override
-  void setUp() {
-    super.setUp();
-
-    createAnalysisOptionsFile(
-      experiments: [
-        EnableString.nonfunction_type_aliases,
-      ],
-    );
-  }
-}
-
-mixin WithNullSafetyMixin on AbstractContextTest {
-  @override
-  String? get testPackageLanguageVersion => null;
+  String? get testPackageLanguageVersion => '2.9';
 }
 
 /// Wraps the given [_ElementVisitorFunction] into an instance of
diff --git a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
index 75d5a34..6b5ada3 100644
--- a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
@@ -19,41 +19,12 @@
 import '../support/abstract_single_unit.dart';
 
 void main() {
-  defineReflectiveTests(AnalyzerConverterNullableTest);
   defineReflectiveTests(AnalyzerConverterTest);
+  defineReflectiveTests(AnalyzerConverterWithoutNullSafetyTest);
 }
 
 @reflectiveTest
-class AnalyzerConverterNullableTest extends _AnalyzerConverterTest {
-  Future<void> test_convertElement_method() async {
-    await resolveTestCode('''
-class A {
-  static List<String> myMethod(int a, {String b, int c}) {
-    return [];
-  }
-}''');
-    var engineElement = findElement.method('myMethod');
-    // create notification Element
-    var element = converter.convertElement(engineElement);
-    expect(element.kind, plugin.ElementKind.METHOD);
-    expect(element.name, 'myMethod');
-    {
-      var location = element.location!;
-      expect(location.file, testFile);
-      expect(location.offset, 32);
-      expect(location.length, 'myGetter'.length);
-      expect(location.startLine, 2);
-      expect(location.startColumn, 23);
-    }
-    expect(element.parameters, '(int a, {String b, int c})');
-    expect(element.returnType, 'List<String>');
-    expect(element.flags, plugin.Element.FLAG_STATIC);
-  }
-}
-
-@reflectiveTest
-class AnalyzerConverterTest extends _AnalyzerConverterTest
-    with WithNonFunctionTypeAliasesMixin {
+class AnalyzerConverterTest extends _AnalyzerConverterTest {
   /// Assert that the given [pluginError] matches the given [analyzerError].
   void assertError(
       plugin.AnalysisError pluginError, analyzer.AnalysisError analyzerError,
@@ -664,6 +635,35 @@
   }
 }
 
+@reflectiveTest
+class AnalyzerConverterWithoutNullSafetyTest extends _AnalyzerConverterTest
+    with WithoutNullSafetyMixin {
+  Future<void> test_convertElement_method() async {
+    await resolveTestCode('''
+class A {
+  static List<String> myMethod(int a, {String b, int c}) {
+    return [];
+  }
+}''');
+    var engineElement = findElement.method('myMethod');
+    // create notification Element
+    var element = converter.convertElement(engineElement);
+    expect(element.kind, plugin.ElementKind.METHOD);
+    expect(element.name, 'myMethod');
+    {
+      var location = element.location!;
+      expect(location.file, testFile);
+      expect(location.offset, 32);
+      expect(location.length, 'myGetter'.length);
+      expect(location.startLine, 2);
+      expect(location.startColumn, 23);
+    }
+    expect(element.parameters, '(int a, {String b, int c})');
+    expect(element.returnType, 'List<String>');
+    expect(element.flags, plugin.Element.FLAG_STATIC);
+  }
+}
+
 class _AnalyzerConverterTest extends AbstractSingleUnitTest {
   AnalyzerConverter converter = AnalyzerConverter();
   late analyzer.Source source;
diff --git a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
index 3813dd0..78b64cb 100644
--- a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
@@ -34,7 +34,7 @@
 void f() {
   g(0, 1, c: 2);
 }
-void g(int a, int b, {int c}) {}
+void g(int a, int b, {int? c}) {}
 ''');
     _assertArgumentRange(0, 2, SourceRange(15, 10), SourceRange(15, 10));
   }
@@ -44,7 +44,7 @@
 void f() {
   g(0, 1, c: 2, );
 }
-void g(int a, int b, {int c}) {}
+void g(int a, int b, {int? c}) {}
 ''');
     _assertArgumentRange(0, 2, SourceRange(15, 12), SourceRange(15, 10));
   }
@@ -54,7 +54,7 @@
 void f() {
   g(a: 0, b: 1, c: 2);
 }
-void g({int a, int b, int c}) {}
+void g({int? a, int? b, int? c}) {}
 ''');
     _assertArgumentRange(0, 2, SourceRange(15, 16), SourceRange(15, 16));
   }
@@ -64,7 +64,7 @@
 void f() {
   g(a: 0, b: 1, c: 2, );
 }
-void g({int a, int b, int c}) {}
+void g({int? a, int? b, int? c}) {}
 ''');
     _assertArgumentRange(0, 2, SourceRange(15, 18), SourceRange(15, 16));
   }
@@ -154,7 +154,7 @@
 void f() {
   g(a: 0);
 }
-void g({int a}) {}
+void g({int? a}) {}
 ''');
     _assertArgumentRange(0, 0, SourceRange(15, 4), SourceRange(15, 4));
   }
@@ -220,7 +220,7 @@
 void f() {
   g(a: 1, b: 2);
 }
-void g({int a, int b}) {}
+void g({int? a, int? b}) {}
 ''');
     var list = _argumentList;
     expect(range.nodeInList(list, list[0]), SourceRange(15, 6));
@@ -242,7 +242,7 @@
 void f() {
   g(a: 1, b: 2);
 }
-void g({int a, int b}) {}
+void g({int? a, int? b}) {}
 ''');
     var list = _argumentList;
     expect(range.nodeInList(list, list[1]), SourceRange(19, 6));
@@ -264,7 +264,7 @@
 void f() {
   g(a: 1, b: 2, c: 3);
 }
-void g({int a, int b, int c}) {}
+void g({int? a, int? b, int? c}) {}
 ''');
     var list = _argumentList;
     expect(range.nodeInList(list, list[1]), SourceRange(19, 6));
@@ -286,7 +286,7 @@
 void f() {
   g(a: 1);
 }
-void g({int a}) {}
+void g({int? a}) {}
 ''');
     var list = _argumentList;
     expect(range.nodeInList(list, list[0]), SourceRange(15, 4));
@@ -297,7 +297,7 @@
 void f() {
   g(a: 1,);
 }
-void g({int a}) {}
+void g({int? a}) {}
 ''');
     var list = _argumentList;
     expect(range.nodeInList(list, list[0]), SourceRange(15, 5));
diff --git a/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart b/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart
index 85fb45a..c5f4cb9 100644
--- a/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart
@@ -368,7 +368,6 @@
   void emitImports() {
     writeln("import 'dart:convert' hide JsonDecoder;");
     writeln();
-    writeln("import 'package:analyzer/src/generated/utilities_general.dart';");
     writeln("import 'package:$packageName/protocol/protocol.dart';");
     writeln(
         "import 'package:$packageName/src/protocol/protocol_internal.dart';");
@@ -614,25 +613,40 @@
   /// Emit the hashCode getter for an object class.
   void emitObjectHashCode(TypeObject? type, String className) {
     writeln('@override');
-    writeln('int get hashCode {');
+    writeln('int get hashCode => ');
     indent(() {
       if (type == null) {
-        writeln('return ${className.hashCode};');
+        writeln(' ${className.hashCode}');
       } else {
-        writeln('var hash = 0;');
-        for (var field in type.fields) {
-          String valueToCombine;
+        final items = type.fields.map((field) {
           if (field.value != null) {
-            valueToCombine = field.value.hashCode.toString();
+            return field.value.hashCode.toString();
           } else {
-            valueToCombine = '${field.name}.hashCode';
+            return field.name;
           }
-          writeln('hash = JenkinsSmiHash.combine(hash, $valueToCombine);');
+        }).toList();
+
+        if (items.isEmpty) {
+          writeln('0');
+        } else if (items.length == 1) {
+          write(items.single);
+          write('.hashCode');
+        } else if (items.length <= 20) {
+          writeln('Object.hash(');
+          for (var field in items) {
+            writeln('$field,');
+          }
+          writeln(')');
+        } else {
+          writeln('Object.hashAll([');
+          for (var field in items) {
+            writeln('$field,');
+          }
+          writeln('])');
         }
-        writeln('return JenkinsSmiHash.finish(hash);');
       }
+      writeln(';');
     });
-    writeln('}');
   }
 
   /// If the class named [className] requires special constructors, emit them
diff --git a/pkg/analyzer_plugin/tool/spec/codegen_protocol_common.dart b/pkg/analyzer_plugin/tool/spec/codegen_protocol_common.dart
index a872b10..54062f6 100644
--- a/pkg/analyzer_plugin/tool/spec/codegen_protocol_common.dart
+++ b/pkg/analyzer_plugin/tool/spec/codegen_protocol_common.dart
@@ -45,14 +45,10 @@
     writeln();
     if (forClient) {
       writeln(
-          "import 'package:analysis_server_client/src/protocol/protocol_util.dart';");
-      writeln(
           "import 'package:analysis_server_client/src/protocol/protocol_base.dart';");
       writeln(
           "import 'package:analysis_server_client/src/protocol/protocol_internal.dart';");
     } else {
-      writeln(
-          "import 'package:analyzer/src/generated/utilities_general.dart';");
       writeln("import 'package:$packageName/protocol/protocol.dart';");
       writeln(
           "import 'package:$packageName/src/protocol/protocol_internal.dart';");
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index 412fcb7..bb13ac5 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -682,6 +682,7 @@
       <value><code>COMMENT_DOCUMENTATION</code></value>
       <value><code>COMMENT_END_OF_LINE</code></value>
       <value><code>CONSTRUCTOR</code></value>
+      <value><code>CONSTRUCTOR_TEAR_OFF</code></value>
       <value><code>DIRECTIVE</code></value>
       <value>
         <code>DYNAMIC_TYPE</code>
@@ -743,6 +744,9 @@
         <code>INSTANCE_METHOD_REFERENCE</code>
       </value>
       <value>
+        <code>INSTANCE_METHOD_TEAR_OFF</code>
+      </value>
+      <value>
         <code>INSTANCE_SETTER_DECLARATION</code>
       </value>
       <value>
@@ -769,6 +773,9 @@
         <code>LOCAL_FUNCTION_REFERENCE</code>
       </value>
       <value>
+        <code>LOCAL_FUNCTION_TEAR_OFF</code>
+      </value>
+      <value>
         <code>LOCAL_VARIABLE</code>
         <p>Deprecated - no longer sent.</p>
       </value>
@@ -826,6 +833,9 @@
         <code>STATIC_METHOD_REFERENCE</code>
       </value>
       <value>
+        <code>STATIC_METHOD_TEAR_OFF</code>
+      </value>
+      <value>
         <code>STATIC_SETTER_DECLARATION</code>
       </value>
       <value>
@@ -838,6 +848,9 @@
         <code>TOP_LEVEL_FUNCTION_REFERENCE</code>
       </value>
       <value>
+        <code>TOP_LEVEL_FUNCTION_TEAR_OFF</code>
+      </value>
+      <value>
         <code>TOP_LEVEL_GETTER_DECLARATION</code>
       </value>
       <value>
diff --git a/pkg/analyzer_utilities/lib/tools.dart b/pkg/analyzer_utilities/lib/tools.dart
index f28fc4e..abb3375 100644
--- a/pkg/analyzer_utilities/lib/tools.dart
+++ b/pkg/analyzer_utilities/lib/tools.dart
@@ -228,10 +228,14 @@
   }
 
   static String formatText(String text) {
-    var file = File(join(Directory.systemTemp.path, 'gen.dart'));
+    var tmpDir = Directory.systemTemp.createTempSync('format');
+    var file = File(join(tmpDir.path, 'gen.dart'));
     file.writeAsStringSync(text);
     formatFile(file);
-    return file.readAsStringSync();
+    var result = file.readAsStringSync();
+    file.deleteSync();
+    tmpDir.deleteSync();
+    return result;
   }
 
   static void _throwIfExitCode(ProcessResult result) {
diff --git a/pkg/compiler/README.md b/pkg/compiler/README.md
index 3f493c5..d7e7a1a 100644
--- a/pkg/compiler/README.md
+++ b/pkg/compiler/README.md
@@ -631,8 +631,6 @@
 
 `lib/src/diagnostics`
 `lib/src/diagnostics/invariant.dart`
-`lib/src/diagnostics/generated`
-`lib/src/diagnostics/generated/shared_messages.dart`
 `lib/src/diagnostics/messages.dart`
 `lib/src/diagnostics/source_span.dart`
 `lib/src/diagnostics/code_location.dart`
diff --git a/pkg/compiler/analysis_options.yaml b/pkg/compiler/analysis_options.yaml
index deba0e5..2ab9f2f 100644
--- a/pkg/compiler/analysis_options.yaml
+++ b/pkg/compiler/analysis_options.yaml
@@ -14,3 +14,6 @@
 linter:
   rules:
     - annotate_overrides
+    - prefer_final_fields
+    - prefer_if_null_operators
+    - prefer_null_aware_operators
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 951cccc..e5dbb72 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -37,15 +37,15 @@
       {MakeReporterFunction makeReporter})
       // NOTE: allocating measurer is done upfront to ensure the wallclock is
       // started before other computations.
-      : measurer = new Measurer(enableTaskMeasurements: options.verbose),
+      : measurer = Measurer(enableTaskMeasurements: options.verbose),
         super(
             options: options,
             outputProvider: outputProvider,
-            environment: new _Environment(options.environment),
+            environment: _Environment(options.environment),
             makeReporter: makeReporter) {
     tasks.addAll([
-      userHandlerTask = new GenericTask('Diagnostic handler', measurer),
-      userProviderTask = new GenericTask('Input provider', measurer),
+      userHandlerTask = GenericTask('Diagnostic handler', measurer),
+      userProviderTask = GenericTask('Input provider', measurer),
     ]);
   }
 
@@ -59,7 +59,7 @@
   }
 
   Future setupSdk() {
-    var future = new Future.value(null);
+    var future = Future.value(null);
     _Environment env = environment;
     if (env.supportedLibraries == null) {
       future = future.then((_) {
@@ -255,7 +255,7 @@
   @override
   Map<String, String> toMap() {
     if (_completeMap == null) {
-      _completeMap = new Map<String, String>.from(definitions);
+      _completeMap = Map<String, String>.from(definitions);
       for (String libraryName in supportedLibraries) {
         if (!libraryName.startsWith("_")) {
           String key = '${_dartLibraryEnvironmentPrefix}${libraryName}';
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 6f26060..af806f9 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -70,20 +70,20 @@
     ScopeInfoKind kind = source.readEnum(ScopeInfoKind.values);
     switch (kind) {
       case ScopeInfoKind.scopeInfo:
-        return new JsScopeInfo.readFromDataSource(source);
+        return JsScopeInfo.readFromDataSource(source);
       case ScopeInfoKind.capturedScope:
-        return new JsCapturedScope.readFromDataSource(source);
+        return JsCapturedScope.readFromDataSource(source);
       case ScopeInfoKind.capturedLoopScope:
-        return new JsCapturedLoopScope.readFromDataSource(source);
+        return JsCapturedLoopScope.readFromDataSource(source);
       case ScopeInfoKind.closureRepresentationInfo:
-        return new JsClosureClassInfo.readFromDataSource(source);
+        return JsClosureClassInfo.readFromDataSource(source);
     }
-    throw new UnsupportedError('Unexpected ScopeInfoKind $kind');
+    throw UnsupportedError('Unexpected ScopeInfoKind $kind');
   }
 
   /// Serializes this [ScopeInfo] to [sink].
   void writeToDataSink(DataSink sink) {
-    throw new UnsupportedError('${runtimeType}.writeToDataSink');
+    throw UnsupportedError('${runtimeType}.writeToDataSink');
   }
 
   /// Convenience reference pointer to the element representing `this`.
@@ -131,13 +131,13 @@
     switch (kind) {
       case ScopeInfoKind.scopeInfo:
       case ScopeInfoKind.closureRepresentationInfo:
-        throw new UnsupportedError('Unexpected CapturedScope kind $kind');
+        throw UnsupportedError('Unexpected CapturedScope kind $kind');
       case ScopeInfoKind.capturedScope:
-        return new JsCapturedScope.readFromDataSource(source);
+        return JsCapturedScope.readFromDataSource(source);
       case ScopeInfoKind.capturedLoopScope:
-        return new JsCapturedLoopScope.readFromDataSource(source);
+        return JsCapturedLoopScope.readFromDataSource(source);
     }
-    throw new UnsupportedError('Unexpected ScopeInfoKind $kind');
+    throw UnsupportedError('Unexpected ScopeInfoKind $kind');
   }
 
   /// If true, this closure accesses a variable that was defined in an outside
@@ -179,11 +179,11 @@
       case ScopeInfoKind.scopeInfo:
       case ScopeInfoKind.closureRepresentationInfo:
       case ScopeInfoKind.capturedScope:
-        throw new UnsupportedError('Unexpected CapturedLoopScope kind $kind');
+        throw UnsupportedError('Unexpected CapturedLoopScope kind $kind');
       case ScopeInfoKind.capturedLoopScope:
-        return new JsCapturedLoopScope.readFromDataSource(source);
+        return JsCapturedLoopScope.readFromDataSource(source);
     }
-    throw new UnsupportedError('Unexpected ScopeInfoKind $kind');
+    throw UnsupportedError('Unexpected ScopeInfoKind $kind');
   }
 
   /// True if this loop scope declares in the first part of the loop
@@ -247,12 +247,12 @@
       case ScopeInfoKind.scopeInfo:
       case ScopeInfoKind.capturedScope:
       case ScopeInfoKind.capturedLoopScope:
-        throw new UnsupportedError(
+        throw UnsupportedError(
             'Unexpected ClosureRepresentationInfo kind $kind');
       case ScopeInfoKind.closureRepresentationInfo:
-        return new JsClosureClassInfo.readFromDataSource(source);
+        return JsClosureClassInfo.readFromDataSource(source);
     }
-    throw new UnsupportedError('Unexpected ScopeInfoKind $kind');
+    throw UnsupportedError('Unexpected ScopeInfoKind $kind');
   }
 
   /// The original local function before any translation.
@@ -376,7 +376,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('type_variable_local(');
     sb.write(typeVariable);
     sb.write(')');
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 434091d..09293fc 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -54,11 +54,6 @@
 
   static const String experimentNewRti = '--experiment-new-rti';
 
-  /// Use the dart2js lowering of late instance variables rather than the CFE
-  /// lowering.
-  static const String experimentLateInstanceVariables =
-      '--experiment-late-instance-variables';
-
   static const String enableLanguageExperiments = '--enable-experiment';
 
   static const String fastStartup = '--fast-startup';
@@ -99,7 +94,6 @@
   static const String trustTypeAnnotations = '--trust-type-annotations';
   static const String trustJSInteropTypeAnnotations =
       '--experimental-trust-js-interop-type-annotations';
-  static const String useContentSecurityPolicy = '--csp';
   static const String useMultiSourceInfo = '--use-multi-source-info';
   static const String useNewSourceInfo = '--use-new-source-info';
   static const String useOldRti = '--use-old-rti';
@@ -119,6 +113,8 @@
   static const String readClosedWorld = '--read-closed-world';
   static const String readCodegen = '--read-codegen';
   static const String writeCodegen = '--write-codegen';
+  static const String readModularAnalysis = '--read-modular-analysis';
+  static const String writeModularAnalysis = '--write-modular-analysis';
   static const String codegenShard = '--codegen-shard';
   static const String codegenShards = '--codegen-shards';
   static const String cfeOnly = '--cfe-only';
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index 3a7a7f3..e8b8488 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -218,9 +218,8 @@
 
   @override
   Iterable<Pair<DartType, DartType>> get typeVariableBoundsSubtypeChecks {
-    return _typeVariableBoundsSubtypeChecks != null
-        ? _typeVariableBoundsSubtypeChecks
-        : const <Pair<DartType, DartType>>[];
+    return _typeVariableBoundsSubtypeChecks ??
+        const <Pair<DartType, DartType>>[];
   }
 
   void registerConstSymbol(String name) {
@@ -230,7 +229,7 @@
 
   @override
   Iterable<String> get constSymbols {
-    return _constSymbols != null ? _constSymbols : const <String>[];
+    return _constSymbols ?? const <String>[];
   }
 
   void registerSpecializedGetInterceptor(Set<ClassEntity> classes) {
@@ -240,9 +239,7 @@
 
   @override
   Iterable<Set<ClassEntity>> get specializedGetInterceptors {
-    return _specializedGetInterceptors != null
-        ? _specializedGetInterceptors
-        : const <Set<ClassEntity>>[];
+    return _specializedGetInterceptors ?? const <Set<ClassEntity>>[];
   }
 
   void registerUseInterceptor() {
@@ -253,7 +250,7 @@
   bool get usesInterceptor => _usesInterceptor;
 
   void registerAsyncMarker(AsyncMarker asyncMarker) {
-    _asyncMarkers ??= EnumSet<AsyncMarker>();
+    _asyncMarkers ??= EnumSet();
     _asyncMarkers.add(asyncMarker);
   }
 
diff --git a/pkg/compiler/lib/src/common/metrics.dart b/pkg/compiler/lib/src/common/metrics.dart
index 2afd042..458d546 100644
--- a/pkg/compiler/lib/src/common/metrics.dart
+++ b/pkg/compiler/lib/src/common/metrics.dart
@@ -29,8 +29,8 @@
   String get namespace => '';
 
   // TODO(sra): Make these late final fields.
-  List<Metric> _primary = [];
-  List<Metric> _secondary = [];
+  final List<Metric> _primary = [];
+  final List<Metric> _secondary = [];
 
   /// Setter method that is usually called in a subclass constructor to define
   /// the primary metrics.
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 6f2a3bd..84c3c2b 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -217,7 +217,7 @@
   InterfaceType getConstantListTypeFor(InterfaceType sourceType);
 
   InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
-      {bool onlyStringKeys: false});
+      {bool onlyStringKeys = false});
 
   InterfaceType getConstantSetTypeFor(InterfaceType sourceType);
 
@@ -531,6 +531,22 @@
   /// Most foreign helpers are located in the `dart:_foreign_helper` library.
   bool isForeignHelper(MemberEntity member);
 
+  /// Returns `true` if [member] is the `createJsSentinel` function defined in
+  /// dart:_foreign_helper.
+  bool isCreateJsSentinel(MemberEntity member);
+
+  /// Returns `true` if [member] is the `isJsSentinel` function defined in
+  /// dart:_foreign_helper.
+  bool isIsJsSentinel(MemberEntity member);
+
+  /// Returns `true` if [member] is the `_lateReadCheck` function defined in
+  /// dart:_internal.
+  bool isLateReadCheck(MemberEntity member);
+
+  /// Returns `true` if [member] is the `createSentinel` function defined in
+  /// dart:_internal.
+  bool isCreateSentinel(MemberEntity member);
+
   ClassEntity getDefaultSuperclass(
       ClassEntity cls, NativeBasicData nativeBasicData);
 
@@ -644,10 +660,6 @@
 
   bool isForeign(MemberEntity element);
 
-  /// Returns `true` if [member] is the `createSentinel` function defined in
-  /// dart:_internal.
-  bool isCreateSentinel(MemberEntity element);
-
   /// Returns `true` if the implementation of the 'operator ==' [function] is
   /// known to handle `null` as argument.
   bool operatorEqHandlesNullArgument(FunctionEntity function);
@@ -992,26 +1004,26 @@
   }
 
   ClassEntity _findClass(LibraryEntity library, String name,
-      {bool required: true}) {
+      {bool required = true}) {
     if (library == null) return null;
     return _env.lookupClass(library, name, required: required);
   }
 
   MemberEntity _findLibraryMember(LibraryEntity library, String name,
-      {bool setter: false, bool required: true}) {
+      {bool setter = false, bool required = true}) {
     if (library == null) return null;
     return _env.lookupLibraryMember(library, name,
         setter: setter, required: required);
   }
 
   MemberEntity _findClassMember(ClassEntity cls, String name,
-      {bool setter: false, bool required: true}) {
+      {bool setter = false, bool required = true}) {
     return _env.lookupLocalClassMember(cls, name,
         setter: setter, required: required);
   }
 
   ConstructorEntity _findConstructor(ClassEntity cls, String name,
-      {bool required: true}) {
+      {bool required = true}) {
     return _env.lookupConstructor(cls, name, required: required);
   }
 
@@ -1035,7 +1047,7 @@
 
   @override
   InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
-      {bool onlyStringKeys: false}) {
+      {bool onlyStringKeys = false}) {
     ClassEntity classElement =
         onlyStringKeys ? constantStringMapClass : generalConstantMapClass;
     if (dartTypes.treatAsRawType(sourceType)) {
@@ -2117,13 +2129,28 @@
         isCreateInvocationMirrorHelper(member);
   }
 
+  bool _isTopLevelFunctionNamed(String name, MemberEntity member) =>
+      member.name == name && member.isFunction && member.isTopLevel;
+
   @override
-  bool isCreateSentinel(MemberEntity member) {
-    return member.isTopLevel &&
-        member.isFunction &&
-        member.library == internalLibrary &&
-        member.name == 'createSentinel';
-  }
+  bool isCreateJsSentinel(MemberEntity member) =>
+      member.library == foreignLibrary &&
+      _isTopLevelFunctionNamed('createJsSentinel', member);
+
+  @override
+  bool isIsJsSentinel(MemberEntity member) =>
+      member.library == foreignLibrary &&
+      _isTopLevelFunctionNamed('isJsSentinel', member);
+
+  @override
+  bool isLateReadCheck(MemberEntity member) =>
+      member.library == lateHelperLibrary &&
+      _isTopLevelFunctionNamed('_lateReadCheck', member);
+
+  @override
+  bool isCreateSentinel(MemberEntity member) =>
+      member.library == internalLibrary &&
+      _isTopLevelFunctionNamed('createSentinel', member);
 
   @override
   bool operatorEqHandlesNullArgument(FunctionEntity function) {
@@ -2173,7 +2200,7 @@
 
   /// Lookup the library with the canonical [uri], fail if the library is
   /// missing and [required];
-  LibraryEntity lookupLibrary(Uri uri, {bool required: false});
+  LibraryEntity lookupLibrary(Uri uri, {bool required = false});
 
   /// Calls [f] for every class declared in [library].
   void forEachClass(LibraryEntity library, void f(ClassEntity cls));
@@ -2181,7 +2208,7 @@
   /// Lookup the class [name] in [library], fail if the class is missing and
   /// [required].
   ClassEntity lookupClass(LibraryEntity library, String name,
-      {bool required: false});
+      {bool required = false});
 
   /// Calls [f] for every top level member in [library].
   void forEachLibraryMember(LibraryEntity library, void f(MemberEntity member));
@@ -2189,18 +2216,18 @@
   /// Lookup the member [name] in [library], fail if the class is missing and
   /// [required].
   MemberEntity lookupLibraryMember(LibraryEntity library, String name,
-      {bool setter: false, bool required: false});
+      {bool setter = false, bool required = false});
 
   /// Lookup the member [name] in [cls], fail if the class is missing and
   /// [required].
   MemberEntity lookupLocalClassMember(ClassEntity cls, String name,
-      {bool setter: false, bool required: false});
+      {bool setter = false, bool required = false});
 
   /// Lookup the member [name] in [cls] and its superclasses.
   ///
   /// Return `null` if the member is not found in the class or any superclass.
   MemberEntity lookupClassMember(ClassEntity cls, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     var entity = lookupLocalClassMember(cls, name, setter: setter);
     if (entity != null) return entity;
 
@@ -2213,7 +2240,7 @@
   /// Lookup the constructor [name] in [cls], fail if the class is missing and
   /// [required].
   ConstructorEntity lookupConstructor(ClassEntity cls, String name,
-      {bool required: false});
+      {bool required = false});
 
   /// Calls [f] for each class member declared in [cls].
   void forEachLocalClassMember(ClassEntity cls, void f(MemberEntity member));
@@ -2247,7 +2274,7 @@
   /// the result of `getSuperClass(C, skipUnnamedMixinApplications: false)` is
   /// `S`.
   ClassEntity getSuperClass(ClassEntity cls,
-      {bool skipUnnamedMixinApplications: false});
+      {bool skipUnnamedMixinApplications = false});
 
   /// Calls [f] for each supertype of [cls].
   void forEachSupertype(ClassEntity cls, void f(InterfaceType supertype));
@@ -2353,7 +2380,7 @@
 
   /// Returns the metadata constants declared on [member].
   Iterable<ConstantValue> getMemberMetadata(MemberEntity member,
-      {bool includeParameterMetadata: false});
+      {bool includeParameterMetadata = false});
 }
 
 abstract class JElementEnvironment extends ElementEnvironment {
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 024488f..09b4aea 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -13,7 +13,7 @@
 import '../compiler_new.dart' as api;
 import 'backend_strategy.dart';
 import 'common/codegen.dart';
-import 'common/names.dart' show Selectors, Uris;
+import 'common/names.dart' show Selectors;
 import 'common/tasks.dart' show CompilerTask, GenericTask, Measurer;
 import 'common/work.dart' show WorkItem;
 import 'common.dart';
@@ -38,6 +38,7 @@
 import 'inferrer/types.dart'
     show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
 import 'io/source_information.dart' show SourceInformation;
+import 'ir/modular.dart';
 import 'js_backend/backend.dart' show CodegenInputs, JavaScriptImpactStrategy;
 import 'js_backend/inferred_data.dart';
 import 'js_model/js_strategy.dart';
@@ -48,6 +49,7 @@
 import 'null_compiler_output.dart' show NullCompilerOutput;
 import 'options.dart' show CompilerOptions;
 import 'serialization/task.dart';
+import 'serialization/serialization.dart';
 import 'serialization/strategies.dart';
 import 'ssa/nodes.dart' show HInstruction;
 import 'universe/selector.dart' show Selector;
@@ -57,7 +59,7 @@
     show ImpactStrategy, WorldImpact, WorldImpactBuilderImpl;
 import 'world.dart' show JClosedWorld, KClosedWorld;
 
-typedef CompilerDiagnosticReporter MakeReporterFunction(
+typedef MakeReporterFunction = CompilerDiagnosticReporter Function(
     Compiler compiler, CompilerOptions options);
 
 abstract class Compiler {
@@ -86,9 +88,10 @@
 
   api.CompilerOutput get outputProvider => _outputProvider;
 
-  List<CodeLocation> _userCodeLocations = <CodeLocation>[];
+  final List<CodeLocation> _userCodeLocations = <CodeLocation>[];
 
   JClosedWorld backendClosedWorldForTesting;
+  DataSourceIndices closedWorldIndicesForTesting;
 
   DiagnosticReporter get reporter => _reporter;
   Map<Entity, WorldImpact> get impactCache => _impactCache;
@@ -135,7 +138,7 @@
   Compiler(
       {CompilerOptions options,
       api.CompilerOutput outputProvider,
-      this.environment: const _EmptyEnvironment(),
+      this.environment = const _EmptyEnvironment(),
       MakeReporterFunction makeReporter})
       : this.options = options {
     options.deriveOptions();
@@ -152,38 +155,38 @@
     }
 
     CompilerTask kernelFrontEndTask;
-    selfTask = new GenericTask('self', measurer);
-    _outputProvider = new _CompilerOutput(this, outputProvider);
+    selfTask = GenericTask('self', measurer);
+    _outputProvider = _CompilerOutput(this, outputProvider);
     if (makeReporter != null) {
       _reporter = makeReporter(this, options);
     } else {
-      _reporter = new CompilerDiagnosticReporter(this);
+      _reporter = CompilerDiagnosticReporter(this);
     }
-    kernelFrontEndTask = new GenericTask('Front end', measurer);
-    frontendStrategy = new KernelFrontendStrategy(
+    kernelFrontEndTask = GenericTask('Front end', measurer);
+    frontendStrategy = KernelFrontendStrategy(
         kernelFrontEndTask, options, reporter, environment);
     backendStrategy = createBackendStrategy();
     _impactCache = <Entity, WorldImpact>{};
-    _impactCacheDeleter = new _MapImpactCacheDeleter(_impactCache);
+    _impactCacheDeleter = _MapImpactCacheDeleter(_impactCache);
 
     if (options.showInternalProgress) {
-      progress = new InteractiveProgress();
+      progress = InteractiveProgress();
     }
 
-    enqueuer = new EnqueueTask(this);
+    enqueuer = EnqueueTask(this);
 
     tasks = [
-      kernelLoader = new KernelLoaderTask(
+      kernelLoader = KernelLoaderTask(
           options, provider, _outputProvider, reporter, measurer),
       kernelFrontEndTask,
-      globalInference = new GlobalTypeInferenceTask(this),
+      globalInference = GlobalTypeInferenceTask(this),
       deferredLoadTask = frontendStrategy.createDeferredLoadTask(this),
       // [enqueuer] is created earlier because it contains the resolution world
       // objects needed by other tasks.
       enqueuer,
-      dumpInfoTask = new DumpInfoTask(this),
+      dumpInfoTask = DumpInfoTask(this),
       selfTask,
-      serializationTask = new SerializationTask(
+      serializationTask = SerializationTask(
           options, reporter, provider, outputProvider, measurer),
     ];
 
@@ -194,7 +197,7 @@
   ///
   /// Override this to mock the backend strategy for testing.
   BackendStrategy createBackendStrategy() {
-    return new JsBackendStrategy(this);
+    return JsBackendStrategy(this);
   }
 
   ResolutionWorldBuilder resolutionWorldBuilderForTesting;
@@ -222,7 +225,7 @@
   Future<bool> run(Uri uri) => selfTask.measureSubtask("run", () {
         measurer.startWallClock();
 
-        return new Future.sync(() => runInternal(uri))
+        return Future.sync(() => runInternal(uri))
             .catchError((error, StackTrace stackTrace) =>
                 _reporter.onError(uri, error, stackTrace))
             .whenComplete(() {
@@ -256,15 +259,18 @@
     if (onlyPerformGlobalTypeInference) {
       ir.Component component =
           await serializationTask.deserializeComponentAndUpdateOptions();
-      JsClosedWorld closedWorld =
+      var closedWorldAndIndices =
           await serializationTask.deserializeClosedWorld(
               environment, abstractValueStrategy, component);
+      if (retainDataForTesting) {
+        closedWorldIndicesForTesting = closedWorldAndIndices.indices;
+      }
       GlobalTypeInferenceResults globalTypeInferenceResults =
-          performGlobalTypeInference(closedWorld);
+          performGlobalTypeInference(closedWorldAndIndices.closedWorld);
       if (options.writeDataUri != null) {
         if (options.noClosedWorldInData) {
-          serializationTask
-              .serializeGlobalTypeInference(globalTypeInferenceResults);
+          serializationTask.serializeGlobalTypeInference(
+              globalTypeInferenceResults, closedWorldAndIndices.indices);
         } else {
           serializationTask
               .serializeGlobalTypeInferenceLegacy(globalTypeInferenceResults);
@@ -276,12 +282,15 @@
       GlobalTypeInferenceResults globalTypeInferenceResults;
       ir.Component component =
           await serializationTask.deserializeComponentAndUpdateOptions();
-      JsClosedWorld closedWorld =
+      var closedWorldAndIndices =
           await serializationTask.deserializeClosedWorld(
               environment, abstractValueStrategy, component);
       globalTypeInferenceResults =
           await serializationTask.deserializeGlobalTypeInferenceResults(
-              environment, abstractValueStrategy, component, closedWorld);
+              environment,
+              abstractValueStrategy,
+              component,
+              closedWorldAndIndices);
       await generateJavaScriptCode(globalTypeInferenceResults);
     } else if (options.readDataUri != null) {
       // TODO(joshualitt) delete and clean up after google3 roll
@@ -300,16 +309,17 @@
 
       frontendStrategy.registerLoadedLibraries(result);
 
-      // TODO(efortuna, sigmund): These validation steps should be done in the
-      // front end for the Kernel path since Kernel doesn't have the notion of
-      // imports (everything has already been resolved). (See
-      // https://github.com/dart-lang/sdk/issues/29368)
-      if (result.libraries.contains(Uris.dart_mirrors)) {
-        reporter.reportWarningMessage(NO_LOCATION_SPANNABLE,
-            MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE);
+      if (options.modularMode) {
+        await runModularAnalysis(result);
+      } else {
+        List<ModuleData> data;
+        if (options.modularAnalysisInputs != null) {
+          data =
+              await serializationTask.deserializeModuleData(result.component);
+        }
+        frontendStrategy.registerModuleData(data);
+        await compileFromKernel(result.rootLibraryUri, result.libraries);
       }
-
-      await compileFromKernel(result.rootLibraryUri, result.libraries);
     }
   }
 
@@ -329,7 +339,7 @@
       runCodegenEnqueuer(codegenResults);
     } else {
       reporter.log('Compiling methods');
-      CodegenResults codegenResults = new OnDemandCodegenResults(
+      CodegenResults codegenResults = OnDemandCodegenResults(
           globalTypeInferenceResults,
           codegenInputs,
           backendStrategy.functionCompiler);
@@ -373,7 +383,7 @@
         resolutionEnqueuer.worldBuilder.registerClass(cls);
       });
     }
-    WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl mainImpact = WorldImpactBuilderImpl();
     FunctionEntity mainFunction = frontendStrategy.computeMain(mainImpact);
 
     // In order to see if a library is deferred, we must compute the
@@ -382,8 +392,7 @@
     // this until after the resolution queue is processed.
     deferredLoadTask.beforeResolution(rootLibraryUri, libraries);
 
-    impactStrategy = new JavaScriptImpactStrategy(
-        impactCacheDeleter, dumpInfoTask,
+    impactStrategy = JavaScriptImpactStrategy(impactCacheDeleter, dumpInfoTask,
         supportDeferredLoad: deferredLoadTask.isProgramSplit,
         supportDumpInfo: options.dumpInfo);
 
@@ -411,14 +420,32 @@
     return closedWorld;
   }
 
+  void runModularAnalysis(KernelResult result) {
+    _userCodeLocations
+        .addAll(result.moduleLibraries.map((module) => CodeLocation(module)));
+    selfTask.measureSubtask('runModularAnalysis', () {
+      impactStrategy = JavaScriptImpactStrategy(
+          impactCacheDeleter, dumpInfoTask,
+          supportDeferredLoad: true, supportDumpInfo: true);
+      var included = result.moduleLibraries.toSet();
+      var elementMap = (frontendStrategy as KernelFrontendStrategy).elementMap;
+      var moduleData = computeModuleData(result.component, included, options,
+          reporter, environment, elementMap);
+      if (compilationFailed) return;
+      serializationTask.testModuleSerialization(moduleData, result.component);
+      serializationTask.serializeModuleData(
+          moduleData, result.component, included);
+    });
+  }
+
   GlobalTypeInferenceResults performGlobalTypeInference(
       JClosedWorld closedWorld) {
     FunctionEntity mainFunction = closedWorld.elementEnvironment.mainFunction;
     reporter.log('Performing global type inference');
     GlobalLocalsMap globalLocalsMap =
-        new GlobalLocalsMap(closedWorld.closureDataLookup.getEnclosingMember);
+        GlobalLocalsMap(closedWorld.closureDataLookup.getEnclosingMember);
     InferredDataBuilder inferredDataBuilder =
-        new InferredDataBuilderImpl(closedWorld.annotationsData);
+        InferredDataBuilderImpl(closedWorld.annotationsData);
     return globalInference.runGlobalTypeInference(
         mainFunction, closedWorld, globalLocalsMap, inferredDataBuilder);
   }
@@ -460,20 +487,30 @@
     List<int> irData = strategy.unpackAndSerializeComponent(results);
     List<int> closedWorldData =
         strategy.serializeClosedWorld(results.closedWorld);
+    var component = strategy.deserializeComponent(irData);
+    var closedWorldAndIndices = strategy.deserializeClosedWorld(
+        options,
+        reporter,
+        environment,
+        abstractValueStrategy,
+        component,
+        closedWorldData);
     List<int> globalTypeInferenceResultsData =
-        strategy.serializeGlobalTypeInferenceResults(results);
+        strategy.serializeGlobalTypeInferenceResults(
+            closedWorldAndIndices.indices, results);
     return strategy.deserializeGlobalTypeInferenceResults(
         options,
         reporter,
         environment,
         abstractValueStrategy,
-        strategy.deserializeComponent(irData),
-        closedWorldData,
+        component,
+        closedWorldAndIndices.closedWorld,
+        closedWorldAndIndices.indices,
         globalTypeInferenceResultsData);
   }
 
   void compileFromKernel(Uri rootLibraryUri, Iterable<Uri> libraries) {
-    _userCodeLocations.add(new CodeLocation(rootLibraryUri));
+    _userCodeLocations.add(CodeLocation(rootLibraryUri));
     selfTask.measureSubtask("compileFromKernel", () {
       JsClosedWorld closedWorld = selfTask.measureSubtask("computeClosedWorld",
           () => computeClosedWorld(rootLibraryUri, libraries));
@@ -495,8 +532,7 @@
       if (options.writeDataUri != null) {
         // TODO(joshualitt) delete after google3 roll.
         if (options.noClosedWorldInData) {
-          serializationTask
-              .serializeGlobalTypeInference(globalInferenceResults);
+          throw '"no-closed-world-in-data" requires serializing closed world.';
         } else {
           serializationTask
               .serializeGlobalTypeInferenceLegacy(globalInferenceResults);
@@ -590,7 +626,7 @@
 
   /// Messages for which compile-time errors are reported but compilation
   /// continues regardless.
-  static const List<MessageKind> BENIGN_ERRORS = const <MessageKind>[
+  static const List<MessageKind> BENIGN_ERRORS = <MessageKind>[
     MessageKind.INVALID_METADATA,
     MessageKind.INVALID_METADATA_GENERIC,
   ];
@@ -638,7 +674,7 @@
   ///
   /// If [assumeInUserCode] is `true`, [element] is assumed to be in user code
   /// if no entrypoints have been set.
-  bool inUserCode(Entity element, {bool assumeInUserCode: false}) {
+  bool inUserCode(Entity element, {bool assumeInUserCode = false}) {
     if (element == null) return assumeInUserCode;
     Uri libraryUri = _uriFromElement(element);
     if (libraryUri == null) return false;
@@ -659,7 +695,7 @@
       int slashPos = libraryUri.path.indexOf('/');
       if (slashPos != -1) {
         String packageName = libraryUri.path.substring(0, slashPos);
-        return new Uri(scheme: 'package', path: packageName);
+        return Uri(scheme: 'package', path: packageName);
       }
     }
     return libraryUri;
@@ -732,7 +768,7 @@
     SourceSpan span = spanFromSpannable(spannable);
     MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
     Message message = template.message(arguments, options);
-    return new DiagnosticMessage(span, spannable, message);
+    return DiagnosticMessage(span, spannable, message);
   }
 
   @override
@@ -781,8 +817,8 @@
               reportDiagnostic(message, infos, kind);
               return;
             }
-            SuppressionInfo info = suppressedWarnings.putIfAbsent(
-                uri, () => new SuppressionInfo());
+            SuppressionInfo info =
+                suppressedWarnings.putIfAbsent(uri, () => SuppressionInfo());
             if (kind == api.Diagnostic.WARNING) {
               info.warnings++;
             } else {
@@ -926,14 +962,14 @@
     } else if (node is HInstruction) {
       element = node.sourceElement;
     }
-    return element != null ? element : currentElement;
+    return element ?? currentElement;
   }
 
   @override
   void log(message) {
     Message msg = MessageTemplate.TEMPLATES[MessageKind.GENERIC]
         .message({'text': '$message'}, options);
-    reportDiagnostic(new DiagnosticMessage(null, null, msg),
+    reportDiagnostic(DiagnosticMessage(null, null, msg),
         const <DiagnosticMessage>[], api.Diagnostic.VERBOSE_INFO);
   }
 
@@ -954,7 +990,7 @@
         } else {
           reportDiagnostic(
               createMessage(
-                  new SourceSpan(uri, 0, 0), MessageKind.COMPILER_CRASHED),
+                  SourceSpan(uri, 0, 0), MessageKind.COMPILER_CRASHED),
               const <DiagnosticMessage>[],
               api.Diagnostic.CRASH);
         }
@@ -963,7 +999,7 @@
     } catch (doubleFault) {
       // Ignoring exceptions in exception handling.
     }
-    return new Future.error(error, stackTrace);
+    return Future.error(error, stackTrace);
   }
 
   @override
@@ -988,7 +1024,7 @@
           'hints': info.hints.toString(),
           'uri': uri.toString(),
         }, options);
-        reportDiagnostic(new DiagnosticMessage(null, null, message),
+        reportDiagnostic(DiagnosticMessage(null, null, message),
             const <DiagnosticMessage>[], api.Diagnostic.HINT);
       });
     }
@@ -1038,7 +1074,7 @@
 /// with 500ms intervals.
 class ProgressImpl implements Progress {
   final DiagnosticReporter _reporter;
-  final Stopwatch _stopwatch = new Stopwatch()..start();
+  final Stopwatch _stopwatch = Stopwatch()..start();
 
   ProgressImpl(this._reporter);
 
@@ -1060,8 +1096,8 @@
 /// with 500ms intervals using escape sequences to keep the progress data on a
 /// single line.
 class InteractiveProgress implements Progress {
-  final Stopwatch _stopwatchPhase = new Stopwatch()..start();
-  final Stopwatch _stopwatchInterval = new Stopwatch()..start();
+  final Stopwatch _stopwatchPhase = Stopwatch()..start();
+  final Stopwatch _stopwatchInterval = Stopwatch()..start();
   @override
   void startPhase() {
     print('');
@@ -1074,7 +1110,7 @@
     if (_stopwatchInterval.elapsedMilliseconds > 500) {
       var time = _stopwatchPhase.elapsedMilliseconds / 1000;
       var rate = count / _stopwatchPhase.elapsedMilliseconds;
-      var s = new StringBuffer('\x1b[1A\x1b[K') // go up and clear the line.
+      var s = StringBuffer('\x1b[1A\x1b[K') // go up and clear the line.
         ..write('\x1b[48;5;40m\x1b[30m==>\x1b[0m $prefix')
         ..write(count)
         ..write('$suffix Elapsed time: ')
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 449c2b2..144d936 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -246,7 +246,7 @@
 
   // Caching IntConstantValues representing -2 through 10 so that we don't have
   // to create new ones every time those values are used.
-  static Map<BigInt, IntConstantValue> _cachedValues = {};
+  static final Map<BigInt, IntConstantValue> _cachedValues = {};
 
   @override
   double get doubleValue => intValue.toDouble();
@@ -912,7 +912,7 @@
   }
 
   @override
-  DartType getType(CommonElements types) => types.dynamicType;
+  DartType getType(CommonElements types) => types.dartTypes.neverType();
 
   @override
   ConstantValueKind get kind => ConstantValueKind.LATE_SENTINEL;
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 5b95d9e..139ebfe 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -32,7 +32,7 @@
 /// The data passed to the [HandleOption] callback is either a single
 /// string argument, or the arguments iterator for multiple arguments
 /// handlers.
-typedef void HandleOption(Null data);
+typedef HandleOption = void Function(Null data);
 
 class OptionHandler {
   final String pattern;
@@ -43,17 +43,17 @@
     (_handle as dynamic)(argument);
   }
 
-  OptionHandler(this.pattern, this._handle, {this.multipleArguments: false});
+  OptionHandler(this.pattern, this._handle, {this.multipleArguments = false});
 }
 
 /// Extract the parameter of an option.
 ///
 /// For example, in ['--out=fisk.js'] and ['-ohest.js'], the parameters
 /// are ['fisk.js'] and ['hest.js'], respectively.
-String extractParameter(String argument, {bool isOptionalArgument: false}) {
+String extractParameter(String argument, {bool isOptionalArgument = false}) {
   // m[0] is the entire match (which will be equal to argument). m[1]
   // is something like "-o" or "--out=", and m[2] is the parameter.
-  Match m = new RegExp('^(-[a-zA-Z]|--.+=)(.*)').firstMatch(argument);
+  Match m = RegExp('^(-[a-zA-Z]|--.+=)(.*)').firstMatch(argument);
   if (m == null) {
     if (isOptionalArgument) return null;
     helpAndFail('Unknown option "$argument".');
@@ -61,7 +61,7 @@
   return m[2];
 }
 
-String extractPath(String argument, {bool isDirectory: true}) {
+String extractPath(String argument, {bool isDirectory = true}) {
   String path = fe.nativeToUriPath(extractParameter(argument));
   return !path.endsWith("/") && isDirectory ? "$path/" : path;
 }
@@ -72,7 +72,7 @@
   for (OptionHandler handler in handlers) {
     patterns.add(handler.pattern);
   }
-  var pattern = new RegExp('^(${patterns.join(")\$|^(")})\$');
+  var pattern = RegExp('^(${patterns.join(")\$|^(")})\$');
 
   Iterator<String> arguments = argv.iterator;
   OUTER:
@@ -99,12 +99,13 @@
 
 Future<api.CompilationResult> compile(List<String> argv,
     {fe.InitializedCompilerState kernelInitializedCompilerState}) {
-  Stopwatch wallclock = new Stopwatch()..start();
+  Stopwatch wallclock = Stopwatch()..start();
   stackTraceFilePrefix = '${Uri.base}';
   Uri librariesSpecificationUri = Uri.base.resolve('lib/libraries.json');
   bool outputSpecified = false;
   Uri out;
   Uri sourceMapOut;
+  Uri writeModularAnalysisUri;
   Uri readDataUri;
   Uri writeDataUri;
   Uri readClosedWorldUri;
@@ -132,7 +133,7 @@
   bool enableColors;
   int optimizationLevel = null;
   Uri platformBinaries;
-  Map<String, String> environment = new Map<String, String>();
+  Map<String, String> environment = Map<String, String>();
   ReadStrategy readStrategy = ReadStrategy.fromDart;
   WriteStrategy writeStrategy = WriteStrategy.toJs;
   FeatureOptions features = FeatureOptions();
@@ -274,6 +275,41 @@
         Uri.base.resolve(extractPath(argument, isDirectory: true));
   }
 
+  void setUriList(String flag, String argument) {
+    String list = extractParameter(argument);
+    String uriList = list.splitMapJoin(',',
+        onMatch: (_) => ',', onNonMatch: (p) => '${fe.nativeToUri(p)}');
+    options.add('${flag}=${uriList}');
+  }
+
+  void setModularAnalysisInputs(String argument) {
+    setUriList(Flags.readModularAnalysis, argument);
+  }
+
+  void setWriteModularAnalysis(String argument) {
+    if (writeStrategy == WriteStrategy.toClosedWorld) {
+      fail("Cannot use ${Flags.writeModularAnalysis} "
+          "and write serialized closed world simultaneously.");
+    }
+    if (writeStrategy == WriteStrategy.toData) {
+      fail("Cannot use ${Flags.writeModularAnalysis} "
+          "and write serialized global data simultaneously.");
+    }
+    if (writeStrategy == WriteStrategy.toCodegen) {
+      fail("Cannot use ${Flags.writeModularAnalysis} "
+          "and write serialized codegen simultaneously.");
+    }
+    if (writeStrategy == WriteStrategy.toKernel) {
+      fail("Cannot use ${Flags.writeModularAnalysis} "
+          "and run the CFE simultaneously.");
+    }
+    if (argument != Flags.writeModularAnalysis) {
+      writeModularAnalysisUri =
+          fe.nativeToUri(extractPath(argument, isDirectory: false));
+    }
+    writeStrategy = WriteStrategy.toModularAnalysis;
+  }
+
   void setReadData(String argument) {
     if (argument != Flags.readData) {
       readDataUri = fe.nativeToUri(extractPath(argument, isDirectory: false));
@@ -308,13 +344,14 @@
   }
 
   void setDillDependencies(String argument) {
-    String dependencies = extractParameter(argument);
-    String uriDependencies = dependencies.splitMapJoin(',',
-        onMatch: (_) => ',', onNonMatch: (p) => '${fe.nativeToUri(p)}');
-    options.add('${Flags.dillDependencies}=${uriDependencies}');
+    setUriList(Flags.dillDependencies, argument);
   }
 
   void setCfeOnly(String argument) {
+    if (writeStrategy == WriteStrategy.toModularAnalysis) {
+      fail("Cannot use ${Flags.cfeOnly} "
+          "and write serialized modular analysis simultaneously.");
+    }
     if (writeStrategy == WriteStrategy.toClosedWorld) {
       fail("Cannot use ${Flags.cfeOnly} "
           "and write serialized closed world simultaneously.");
@@ -464,148 +501,150 @@
 
   List<String> arguments = <String>[];
   List<OptionHandler> handlers = <OptionHandler>[
-    new OptionHandler('-[chvm?]+', handleShortOptions),
-    new OptionHandler('--throw-on-error(?:=[0-9]+)?', handleThrowOnError),
-    new OptionHandler(Flags.suppressWarnings, (String argument) {
+    OptionHandler('-[chvm?]+', handleShortOptions),
+    OptionHandler('--throw-on-error(?:=[0-9]+)?', handleThrowOnError),
+    OptionHandler(Flags.suppressWarnings, (String argument) {
       showWarnings = false;
       passThrough(argument);
     }),
-    new OptionHandler(Flags.fatalWarnings, passThrough),
-    new OptionHandler(Flags.suppressHints, (String argument) {
+    OptionHandler(Flags.fatalWarnings, passThrough),
+    OptionHandler(Flags.suppressHints, (String argument) {
       showHints = false;
       passThrough(argument);
     }),
     // TODO(sigmund): remove entirely after Dart 1.20
-    new OptionHandler(
+    OptionHandler(
         '--output-type=dart|--output-type=dart-multi|--output-type=js',
         setOutputType),
-    new OptionHandler('--use-kernel', ignoreOption),
-    new OptionHandler(Flags.platformBinaries, setPlatformBinaries),
-    new OptionHandler(Flags.noFrequencyBasedMinification, passThrough),
-    new OptionHandler(Flags.verbose, setVerbose),
-    new OptionHandler(Flags.progress, passThrough),
-    new OptionHandler(Flags.reportMetrics, passThrough),
-    new OptionHandler(Flags.reportAllMetrics, passThrough),
-    new OptionHandler(Flags.version, (_) => wantVersion = true),
-    new OptionHandler('--library-root=.+', ignoreOption),
-    new OptionHandler('--libraries-spec=.+', setLibrarySpecificationUri),
-    new OptionHandler('${Flags.dillDependencies}=.+', setDillDependencies),
-    new OptionHandler('${Flags.readData}|${Flags.readData}=.+', setReadData),
-    new OptionHandler('${Flags.writeData}|${Flags.writeData}=.+', setWriteData),
-    new OptionHandler(Flags.noClosedWorldInData, passThrough),
-    new OptionHandler('${Flags.readClosedWorld}|${Flags.readClosedWorld}=.+',
+    OptionHandler('--use-kernel', ignoreOption),
+    OptionHandler(Flags.platformBinaries, setPlatformBinaries),
+    OptionHandler(Flags.noFrequencyBasedMinification, passThrough),
+    OptionHandler(Flags.verbose, setVerbose),
+    OptionHandler(Flags.progress, passThrough),
+    OptionHandler(Flags.reportMetrics, passThrough),
+    OptionHandler(Flags.reportAllMetrics, passThrough),
+    OptionHandler(Flags.version, (_) => wantVersion = true),
+    OptionHandler('--library-root=.+', ignoreOption),
+    OptionHandler('--libraries-spec=.+', setLibrarySpecificationUri),
+    OptionHandler('${Flags.dillDependencies}=.+', setDillDependencies),
+    OptionHandler('${Flags.readModularAnalysis}=.+', setModularAnalysisInputs),
+    OptionHandler(
+        '${Flags.writeModularAnalysis}|${Flags.writeModularAnalysis}=.+',
+        setWriteModularAnalysis),
+    OptionHandler('${Flags.readData}|${Flags.readData}=.+', setReadData),
+    OptionHandler('${Flags.writeData}|${Flags.writeData}=.+', setWriteData),
+    OptionHandler(Flags.noClosedWorldInData, passThrough),
+    OptionHandler('${Flags.readClosedWorld}|${Flags.readClosedWorld}=.+',
         setReadClosedWorld),
-    new OptionHandler('${Flags.writeClosedWorld}|${Flags.writeClosedWorld}=.+',
+    OptionHandler('${Flags.writeClosedWorld}|${Flags.writeClosedWorld}=.+',
         setWriteClosedWorld),
-    new OptionHandler(
+    OptionHandler(
         '${Flags.readCodegen}|${Flags.readCodegen}=.+', setReadCodegen),
-    new OptionHandler(
+    OptionHandler(
         '${Flags.writeCodegen}|${Flags.writeCodegen}=.+', setWriteCodegen),
-    new OptionHandler('${Flags.codegenShard}=.+', setCodegenShard),
-    new OptionHandler('${Flags.codegenShards}=.+', setCodegenShards),
-    new OptionHandler(Flags.cfeOnly, setCfeOnly),
-    new OptionHandler(Flags.debugGlobalInference, passThrough),
-    new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
-    new OptionHandler('-O.*', setOptimizationLevel),
-    new OptionHandler(Flags.allowMockCompilation, ignoreOption),
-    new OptionHandler(Flags.fastStartup, ignoreOption),
-    new OptionHandler(Flags.genericMethodSyntax, ignoreOption),
-    new OptionHandler(Flags.initializingFormalAccess, ignoreOption),
-    new OptionHandler(Flags.minify, passThrough),
-    new OptionHandler(Flags.noMinify, passThrough),
-    new OptionHandler(Flags.omitLateNames, passThrough),
-    new OptionHandler(Flags.noOmitLateNames, passThrough),
-    new OptionHandler(Flags.preserveUris, ignoreOption),
-    new OptionHandler(Flags.printLegacyStars, passThrough),
-    new OptionHandler('--force-strip=.*', setStrip),
-    new OptionHandler(Flags.disableDiagnosticColors, (_) {
+    OptionHandler('${Flags.codegenShard}=.+', setCodegenShard),
+    OptionHandler('${Flags.codegenShards}=.+', setCodegenShards),
+    OptionHandler(Flags.cfeOnly, setCfeOnly),
+    OptionHandler(Flags.debugGlobalInference, passThrough),
+    OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
+    OptionHandler('-O.*', setOptimizationLevel),
+    OptionHandler(Flags.allowMockCompilation, ignoreOption),
+    OptionHandler(Flags.fastStartup, ignoreOption),
+    OptionHandler(Flags.genericMethodSyntax, ignoreOption),
+    OptionHandler(Flags.initializingFormalAccess, ignoreOption),
+    OptionHandler(Flags.minify, passThrough),
+    OptionHandler(Flags.noMinify, passThrough),
+    OptionHandler(Flags.omitLateNames, passThrough),
+    OptionHandler(Flags.noOmitLateNames, passThrough),
+    OptionHandler(Flags.preserveUris, ignoreOption),
+    OptionHandler(Flags.printLegacyStars, passThrough),
+    OptionHandler('--force-strip=.*', setStrip),
+    OptionHandler(Flags.disableDiagnosticColors, (_) {
       enableColors = false;
     }),
-    new OptionHandler(Flags.enableDiagnosticColors, (_) {
+    OptionHandler(Flags.enableDiagnosticColors, (_) {
       enableColors = true;
     }),
-    new OptionHandler('--enable[_-]checked[_-]mode|--checked',
+    OptionHandler('--enable[_-]checked[_-]mode|--checked',
         (_) => setCheckedMode(Flags.enableCheckedMode)),
-    new OptionHandler(Flags.enableAsserts, passThrough),
-    new OptionHandler(Flags.enableNullAssertions, passThrough),
-    new OptionHandler(Flags.nativeNullAssertions, passThrough),
-    new OptionHandler(Flags.noNativeNullAssertions, passThrough),
-    new OptionHandler(Flags.trustTypeAnnotations, setTrustTypeAnnotations),
-    new OptionHandler(Flags.trustPrimitives, passThrough),
-    new OptionHandler(Flags.trustJSInteropTypeAnnotations, ignoreOption),
-    new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
-    new OptionHandler('--packages=.+', setPackageConfig),
-    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),
-    new OptionHandler(Flags.serverMode, passThrough),
-    new OptionHandler(Flags.disableInlining, passThrough),
-    new OptionHandler(Flags.disableProgramSplit, passThrough),
-    new OptionHandler(Flags.stopAfterProgramSplit, 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.writeProgramSplit}=.+', passThrough),
-    new OptionHandler('${Flags.readProgramSplit}=.+', passThrough),
-    new OptionHandler('${Flags.dumpInfo}|${Flags.dumpInfo}=.+', setDumpInfo),
-    new OptionHandler('--disallow-unsafe-eval', ignoreOption),
-    new OptionHandler(Option.showPackageWarnings, passThrough),
-    new OptionHandler(Option.enableLanguageExperiments, passThrough),
-    new OptionHandler(Flags.useContentSecurityPolicy, passThrough),
-    new OptionHandler('--enable-experimental-mirrors', ignoreOption),
-    new OptionHandler(Flags.enableAssertMessage, passThrough),
-    new OptionHandler('--strong', ignoreOption),
-    new OptionHandler(Flags.previewDart2, ignoreOption),
-    new OptionHandler(Flags.omitImplicitChecks, passThrough),
-    new OptionHandler(Flags.omitAsCasts, passThrough),
-    new OptionHandler(Flags.laxRuntimeTypeToString, passThrough),
-    new OptionHandler(Flags.benchmarkingProduction, passThrough),
-    new OptionHandler(Flags.benchmarkingExperiment, passThrough),
-    new OptionHandler(Flags.soundNullSafety, setNullSafetyMode),
-    new OptionHandler(Flags.noSoundNullSafety, setNullSafetyMode),
+    OptionHandler(Flags.enableAsserts, passThrough),
+    OptionHandler(Flags.enableNullAssertions, passThrough),
+    OptionHandler(Flags.nativeNullAssertions, passThrough),
+    OptionHandler(Flags.noNativeNullAssertions, passThrough),
+    OptionHandler(Flags.trustTypeAnnotations, setTrustTypeAnnotations),
+    OptionHandler(Flags.trustPrimitives, passThrough),
+    OptionHandler(Flags.trustJSInteropTypeAnnotations, ignoreOption),
+    OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
+    OptionHandler('--packages=.+', setPackageConfig),
+    OptionHandler(Flags.noSourceMaps, passThrough),
+    OptionHandler(Option.resolutionInput, ignoreOption),
+    OptionHandler(Option.bazelPaths, setBazelPaths),
+    OptionHandler(Option.multiRoots, setMultiRoots),
+    OptionHandler(Option.multiRootScheme, setMultiRootScheme),
+    OptionHandler(Flags.resolveOnly, ignoreOption),
+    OptionHandler(Flags.disableNativeLiveTypeAnalysis, passThrough),
+    OptionHandler('--categories=.*', setCategories),
+    OptionHandler(Flags.serverMode, passThrough),
+    OptionHandler(Flags.disableInlining, passThrough),
+    OptionHandler(Flags.disableProgramSplit, passThrough),
+    OptionHandler(Flags.stopAfterProgramSplit, passThrough),
+    OptionHandler(Flags.disableTypeInference, passThrough),
+    OptionHandler(Flags.useTrivialAbstractValueDomain, passThrough),
+    OptionHandler(Flags.experimentalWrapped, passThrough),
+    OptionHandler(Flags.experimentalPowersets, passThrough),
+    OptionHandler(Flags.disableRtiOptimization, passThrough),
+    OptionHandler(Flags.terse, passThrough),
+    OptionHandler('--deferred-map=.+', passThrough),
+    OptionHandler('${Flags.writeProgramSplit}=.+', passThrough),
+    OptionHandler('${Flags.readProgramSplit}=.+', passThrough),
+    OptionHandler('${Flags.dumpInfo}|${Flags.dumpInfo}=.+', setDumpInfo),
+    OptionHandler('--disallow-unsafe-eval', ignoreOption),
+    OptionHandler(Option.showPackageWarnings, passThrough),
+    OptionHandler(Option.enableLanguageExperiments, passThrough),
+    OptionHandler('--enable-experimental-mirrors', ignoreOption),
+    OptionHandler(Flags.enableAssertMessage, passThrough),
+    OptionHandler('--strong', ignoreOption),
+    OptionHandler(Flags.previewDart2, ignoreOption),
+    OptionHandler(Flags.omitImplicitChecks, passThrough),
+    OptionHandler(Flags.omitAsCasts, passThrough),
+    OptionHandler(Flags.laxRuntimeTypeToString, passThrough),
+    OptionHandler(Flags.benchmarkingProduction, passThrough),
+    OptionHandler(Flags.benchmarkingExperiment, passThrough),
+    OptionHandler(Flags.soundNullSafety, setNullSafetyMode),
+    OptionHandler(Flags.noSoundNullSafety, setNullSafetyMode),
 
     // TODO(floitsch): remove conditional directives flag.
     // We don't provide the info-message yet, since we haven't publicly
     // launched the feature yet.
-    new OptionHandler(Flags.conditionalDirectives, ignoreOption),
-    new OptionHandler('--enable-async', ignoreOption),
-    new OptionHandler('--enable-null-aware-operators', ignoreOption),
-    new OptionHandler('--enable-enum', ignoreOption),
-    new OptionHandler(Flags.allowNativeExtensions, setAllowNativeExtensions),
-    new OptionHandler(Flags.generateCodeWithCompileTimeErrors, ignoreOption),
-    new OptionHandler(Flags.useMultiSourceInfo, passThrough),
-    new OptionHandler(Flags.useNewSourceInfo, passThrough),
-    new OptionHandler(Flags.useOldRti, passThrough),
-    new OptionHandler(Flags.useSimpleLoadIds, passThrough),
-    new OptionHandler(Flags.testMode, passThrough),
-    new OptionHandler('${Flags.dumpSsa}=.+', passThrough),
-    new OptionHandler('${Flags.cfeInvocationModes}=.+', passThrough),
-    new OptionHandler('${Flags.verbosity}=.+', passThrough),
+    OptionHandler(Flags.conditionalDirectives, ignoreOption),
+    OptionHandler('--enable-async', ignoreOption),
+    OptionHandler('--enable-null-aware-operators', ignoreOption),
+    OptionHandler('--enable-enum', ignoreOption),
+    OptionHandler(Flags.allowNativeExtensions, setAllowNativeExtensions),
+    OptionHandler(Flags.generateCodeWithCompileTimeErrors, ignoreOption),
+    OptionHandler(Flags.useMultiSourceInfo, passThrough),
+    OptionHandler(Flags.useNewSourceInfo, passThrough),
+    OptionHandler(Flags.useOldRti, passThrough),
+    OptionHandler(Flags.useSimpleLoadIds, passThrough),
+    OptionHandler(Flags.testMode, passThrough),
+    OptionHandler('${Flags.dumpSsa}=.+', passThrough),
+    OptionHandler('${Flags.cfeInvocationModes}=.+', passThrough),
+    OptionHandler('${Flags.verbosity}=.+', passThrough),
 
     // Experimental features.
     // We don't provide documentation for these yet.
     // TODO(29574): provide documentation when this feature is supported.
     // TODO(29574): provide a warning/hint/error, when profile-based data is
     // used without `--fast-startup`.
-    new OptionHandler(Flags.experimentalTrackAllocations, passThrough),
+    OptionHandler(Flags.experimentalTrackAllocations, passThrough),
 
-    new OptionHandler(Flags.experimentLocalNames, ignoreOption),
-    new OptionHandler(Flags.experimentStartupFunctions, passThrough),
-    new OptionHandler(Flags.experimentToBoolean, passThrough),
-    new OptionHandler(Flags.experimentUnreachableMethodsThrow, passThrough),
-    new OptionHandler(Flags.experimentCallInstrumentation, passThrough),
-    new OptionHandler(Flags.experimentNewRti, ignoreOption),
-    new OptionHandler(Flags.experimentLateInstanceVariables, passThrough),
-    new OptionHandler('${Flags.mergeFragmentsThreshold}=.+', passThrough),
+    OptionHandler(Flags.experimentLocalNames, ignoreOption),
+    OptionHandler(Flags.experimentStartupFunctions, passThrough),
+    OptionHandler(Flags.experimentToBoolean, passThrough),
+    OptionHandler(Flags.experimentUnreachableMethodsThrow, passThrough),
+    OptionHandler(Flags.experimentCallInstrumentation, passThrough),
+    OptionHandler(Flags.experimentNewRti, ignoreOption),
+    OptionHandler('${Flags.mergeFragmentsThreshold}=.+', passThrough),
 
     // Wire up feature flags.
     OptionHandler(Flags.canary, passThrough),
@@ -620,12 +659,12 @@
       OptionHandler('--no-${feature.flag}', passThrough),
 
     // The following three options must come last.
-    new OptionHandler('-D.+=.*|--define=.+=.*|--define', addInEnvironment,
+    OptionHandler('-D.+=.*|--define=.+=.*|--define', addInEnvironment,
         multipleArguments: true),
-    new OptionHandler('-.*', (String argument) {
+    OptionHandler('-.*', (String argument) {
       helpAndFail("Unknown option '$argument'.");
     }),
-    new OptionHandler('.*', (String argument) {
+    OptionHandler('.*', (String argument) {
       arguments.add(fe.nativeToUriPath(argument));
     })
   ];
@@ -640,14 +679,14 @@
           'The options --bazel-root and --multi-root cannot be supplied '
           'together, please choose one or the other.');
     }
-    inputProvider = new BazelInputProvider(bazelPaths);
+    inputProvider = BazelInputProvider(bazelPaths);
   } else if (multiRoots != null) {
-    inputProvider = new MultiRootInputProvider(multiRootScheme, multiRoots);
+    inputProvider = MultiRootInputProvider(multiRootScheme, multiRoots);
   } else {
-    inputProvider = new CompilerSourceFileProvider();
+    inputProvider = CompilerSourceFileProvider();
   }
 
-  diagnosticHandler = new FormattingDiagnosticHandler(inputProvider);
+  diagnosticHandler = FormattingDiagnosticHandler(inputProvider);
   if (verbose != null) {
     diagnosticHandler.verbose = verbose;
   }
@@ -719,6 +758,11 @@
             "and read serialized codegen simultaneously.");
       }
       break;
+    case WriteStrategy.toModularAnalysis:
+      writeModularAnalysisUri ??= Uri.base.resolve('$out.mdata');
+      options.add('${Flags.writeModularAnalysis}=${writeModularAnalysisUri}');
+      out ??= Uri.base.resolve('out.dill');
+      break;
     case WriteStrategy.toClosedWorld:
       out ??= Uri.base.resolve('out.dill');
       writeClosedWorldUri ??= Uri.base.resolve('$out.world');
@@ -834,7 +878,7 @@
   }
 
   RandomAccessFileOutputProvider outputProvider =
-      new RandomAccessFileOutputProvider(out, sourceMapOut,
+      RandomAccessFileOutputProvider(out, sourceMapOut,
           onInfo: diagnosticHandler.info, onFailure: fail);
 
   api.CompilationResult compilationDone(api.CompilationResult result) {
@@ -930,6 +974,15 @@
         String output = fe.relativizeUri(Uri.base, out, Platform.isWindows);
         summary += 'compiled to dill: ${output}.';
         break;
+      case WriteStrategy.toModularAnalysis:
+        processName = 'Serialized';
+        outputName = 'bytes data';
+        outputSize = outputProvider.totalDataWritten;
+        String output = fe.relativizeUri(Uri.base, out, Platform.isWindows);
+        String dataOutput = fe.relativizeUri(
+            Uri.base, writeModularAnalysisUri, Platform.isWindows);
+        summary += 'serialized to dill and data: ${output} and ${dataOutput}.';
+        break;
       case WriteStrategy.toClosedWorld:
         processName = 'Serialized';
         outputName = 'bytes data';
@@ -1323,8 +1376,8 @@
   return File(path).readAsLinesSync().where((line) => line.isNotEmpty);
 }
 
-typedef void ExitFunc(int exitCode);
-typedef Future<api.CompilationResult> CompileFunc(
+typedef ExitFunc = void Function(int exitCode);
+typedef CompileFunc = Future<api.CompilationResult> Function(
     CompilerOptions compilerOptions,
     api.CompilerInput compilerInput,
     api.CompilerDiagnostics compilerDiagnostics,
@@ -1357,7 +1410,7 @@
     } finally {
       exitFunc(253); // 253 is recognized as a crash by our test scripts.
     }
-    return new Future.error(exception, trace);
+    return Future.error(exception, trace);
   }
 
   try {
@@ -1373,7 +1426,7 @@
   const _ExitSignal();
 }
 
-const _EXIT_SIGNAL = const _ExitSignal();
+const _EXIT_SIGNAL = _ExitSignal();
 
 void batchMain(List<String> batchArguments) {
   int exitCode;
@@ -1386,11 +1439,11 @@
     throw _EXIT_SIGNAL;
   };
 
-  var stream = stdin.transform(utf8.decoder).transform(new LineSplitter());
+  var stream = stdin.transform(utf8.decoder).transform(LineSplitter());
   var subscription;
   fe.InitializedCompilerState kernelInitializedCompilerState;
   subscription = stream.listen((line) {
-    new Future.sync(() {
+    Future.sync(() {
       subscription.pause();
       exitCode = 0;
       if (line == null) exit(0);
@@ -1453,4 +1506,11 @@
   fromCodegenAndData,
   fromCodegenAndClosedWorldAndData,
 }
-enum WriteStrategy { toKernel, toClosedWorld, toData, toCodegen, toJs }
+enum WriteStrategy {
+  toKernel,
+  toModularAnalysis,
+  toClosedWorld,
+  toData,
+  toCodegen,
+  toJs
+}
diff --git a/pkg/compiler/lib/src/deferred_load/algorithm_state.dart b/pkg/compiler/lib/src/deferred_load/algorithm_state.dart
index ad11986..4aca919 100644
--- a/pkg/compiler/lib/src/deferred_load/algorithm_state.dart
+++ b/pkg/compiler/lib/src/deferred_load/algorithm_state.dart
@@ -22,7 +22,7 @@
   final KClosedWorld closedWorld;
   final EntityDataRegistry registry;
   final Map<EntityData, ImportSet> entityToSet = {};
-  final Map<EntityData, EntityDataInfo> entityDataToInfo = {};
+  final Map<EntityData, Set<EntityData>> directDependencies = {};
   final ImportSetLattice importSets;
   final WorkQueue queue;
 
@@ -80,41 +80,35 @@
     }
   }
 
-  /// Returns the [EntityDataInfo] associated with a given [EntityData].
-  /// Note: In the event of a cache miss, i.e. the first time we ever see a new
-  /// [EntityData], we will add all reachable deferred roots to the queue for
-  /// processing.
-  EntityDataInfo getInfo(EntityData data) {
-    // Check for cached [EntityDataInfo], otherwise create a new one and
-    // collect dependencies.
-    var info = entityDataToInfo[data];
-    if (info == null) {
-      var infoBuilder =
-          EntityDataInfoBuilder(closedWorld, elementMap, compiler, registry);
-      var visitor = EntityDataInfoVisitor(infoBuilder);
-      data.accept(visitor);
-      info = infoBuilder.info;
-      entityDataToInfo[data] = info;
+  /// Processes an [EntityData], if we haven't seen it before we enqueue all
+  /// deferred roots and recursively populate caches.
+  void processEntity(EntityData entityData) {
+    if (directDependencies.containsKey(entityData)) return;
+    var infoBuilder =
+        EntityDataInfoBuilder(closedWorld, elementMap, compiler, registry);
+    var visitor = EntityDataInfoVisitor(infoBuilder);
+    entityData.accept(visitor);
+    var info = infoBuilder.info;
+    directDependencies[entityData] = info.directDependencies;
 
-      // This is the first time we have seen this [EntityData] before so process
-      // all deferred roots.
-      info.deferredRoots.forEach((entity, imports) {
-        for (ImportEntity deferredImport in imports) {
-          queue.addEntityData(entity, importSets.initialSetOf(deferredImport));
-        }
-      });
-    }
-    return info;
+    // This is the first time we have seen this [EntityData] before so process
+    // all deferred roots and direct dependencies.
+    info.deferredRoots.forEach((entity, imports) {
+      processEntity(entity);
+      for (ImportEntity deferredImport in imports) {
+        queue.addEntityData(entity, importSets.initialSetOf(deferredImport));
+      }
+    });
+    info.directDependencies.forEach(processEntity);
   }
 
   /// Updates the dependencies of a given [EntityData] from [oldSet] to
   /// [newSet].
   void updateDependencies(
       EntityData entityData, ImportSet oldSet, ImportSet newSet) {
-    var info = getInfo(entityData);
-
-    // Process all direct dependencies.
-    for (var entity in info.directDependencies) {
+    assert(directDependencies.containsKey(entityData));
+    var directDependenciesList = directDependencies[entityData];
+    for (var entity in directDependenciesList) {
       update(entity, oldSet, newSet);
     }
   }
diff --git a/pkg/compiler/lib/src/deferred_load/deferred_load.dart b/pkg/compiler/lib/src/deferred_load/deferred_load.dart
index d741a38..a48f290 100644
--- a/pkg/compiler/lib/src/deferred_load/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load/deferred_load.dart
@@ -343,7 +343,7 @@
 
   final Compiler compiler;
 
-  KernelToElementMap _elementMap;
+  final KernelToElementMap _elementMap;
 
   @override
   final _DeferredLoadTaskMetrics metrics = _DeferredLoadTaskMetrics();
diff --git a/pkg/compiler/lib/src/deferred_load/import_set.dart b/pkg/compiler/lib/src/deferred_load/import_set.dart
index 9bf3816..6b467cf 100644
--- a/pkg/compiler/lib/src/deferred_load/import_set.dart
+++ b/pkg/compiler/lib/src/deferred_load/import_set.dart
@@ -56,10 +56,10 @@
 
   /// Index of deferred imports that defines the canonical order used by the
   /// operations below.
-  Map<ImportEntity, _DeferredImport> _importIndex = {};
+  final Map<ImportEntity, _DeferredImport> _importIndex = {};
 
   /// The canonical instance representing the empty import set.
-  ImportSet _emptySet = ImportSet.empty();
+  final ImportSet _emptySet = ImportSet.empty();
 
   /// The [ImportSet] representing the main output unit.
   ImportSet _mainSet;
diff --git a/pkg/compiler/lib/src/deferred_load/work_queue.dart b/pkg/compiler/lib/src/deferred_load/work_queue.dart
index 90bf329..9c9c554 100644
--- a/pkg/compiler/lib/src/deferred_load/work_queue.dart
+++ b/pkg/compiler/lib/src/deferred_load/work_queue.dart
@@ -64,6 +64,7 @@
     var item = nextItem();
     var entityData = item.entityData;
     pendingWorkItems.remove(entityData);
+    state.processEntity(entityData);
     ImportSet oldSet = state.entityToSet[entityData];
     ImportSet newSet = _importSets.union(oldSet, item.importsToAdd);
     state.update(entityData, oldSet, newSet);
diff --git a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
deleted file mode 100644
index 467a5bf..0000000
--- a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
+++ /dev/null
@@ -1,217 +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.
-/*
-DON'T EDIT. GENERATED. DON'T EDIT.
-This file has been generated by 'publish.dart' in the dart_messages package.
-
-Messages are maintained in `lib/shared_messages.dart` of that same package.
-After any change to that file, run `bin/publish.dart` to generate a new version
-of the json, dart2js and analyzer representations.
-*/
-import '../messages.dart' show MessageKind, MessageTemplate;
-
-const Map<MessageKind, MessageTemplate> TEMPLATES =
-    const <MessageKind, MessageTemplate>{
-  MessageKind.CONST_CONSTRUCTOR_WITH_BODY: const MessageTemplate(
-      MessageKind.CONST_CONSTRUCTOR_WITH_BODY,
-      "Const constructor can't have a body.",
-      howToFix: "Try removing the 'const' keyword or the body.",
-      examples: const [
-        r"""
-         class C {
-           const C() {}
-         }
-
-         main() => new C();""",
-      ]), // Generated. Don't edit.
-  MessageKind.CONST_FACTORY: const MessageTemplate(MessageKind.CONST_FACTORY,
-      "Only redirecting factory constructors can be declared to be 'const'.",
-      howToFix:
-          "Try removing the 'const' keyword or replacing the body with '=' followed by a valid target.",
-      examples: const [
-        r"""
-         class C {
-           const factory C() {}
-         }
-
-         main() => new C();""",
-      ]), // Generated. Don't edit.
-  MessageKind.EXTRANEOUS_MODIFIER: const MessageTemplate(
-      MessageKind.EXTRANEOUS_MODIFIER,
-      "Can't have modifier '#{modifier}' here.",
-      howToFix: "Try removing '#{modifier}'.",
-      examples: const [
-        "var String foo; main(){}",
-        "var final foo; main(){}",
-        "var var foo; main(){}",
-        "var const foo; main(){}",
-        "var abstract foo; main(){}",
-        "var static foo; main(){}",
-        "var external foo; main(){}",
-        "final var foo; main(){}",
-        "var var foo; main(){}",
-        "const var foo; main(){}",
-        "abstract var foo; main(){}",
-        "static var foo; main(){}",
-        "external var foo; main(){}",
-      ]), // Generated. Don't edit.
-  MessageKind.EXTRANEOUS_MODIFIER_REPLACE: const MessageTemplate(
-      MessageKind.EXTRANEOUS_MODIFIER_REPLACE,
-      "Can't have modifier '#{modifier}' here.",
-      howToFix:
-          "Try replacing modifier '#{modifier}' with 'var', 'final', or a type.",
-      examples: const [
-        "set foo; main(){}",
-        "abstract foo; main(){}",
-        "static foo; main(){}",
-        "external foo; main(){}",
-      ]), // Generated. Don't edit.
-  MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE: const MessageTemplate(
-      MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE,
-      "Constructors can't have a return type.",
-      howToFix: "Try removing the return type.",
-      examples: const [
-        "class A { int A() {} } main() { new A(); }",
-      ]), // Generated. Don't edit.
-  MessageKind.MISSING_EXPRESSION_IN_THROW: const MessageTemplate(
-      MessageKind.MISSING_EXPRESSION_IN_THROW,
-      "Missing expression after 'throw'.",
-      howToFix: "Did you mean 'rethrow'?"), // Generated. Don't edit.
-  MessageKind.RETHROW_OUTSIDE_CATCH: const MessageTemplate(
-      MessageKind.RETHROW_OUTSIDE_CATCH,
-      "Rethrow must be inside of catch clause.",
-      howToFix:
-          "Try moving the expression into a catch clause, or using a 'throw' expression.",
-      examples: const [
-        "main() { rethrow; }",
-      ]), // Generated. Don't edit.
-  MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR: const MessageTemplate(
-      MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR,
-      "Constructors can't return values.",
-      howToFix:
-          "Try removing the return statement or using a factory constructor.",
-      examples: const [
-        r"""
-        class C {
-          C() {
-            return 1;
-          }
-        }
-
-        main() => new C();""",
-      ]), // Generated. Don't edit.
-  MessageKind.RETURN_IN_GENERATOR: const MessageTemplate(
-      MessageKind.RETURN_IN_GENERATOR,
-      "Can't return a value from a generator function (using the '#{modifier}' modifier).",
-      howToFix:
-          "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier.",
-      examples: const [
-        r"""
-        foo() async* { return 0; }
-        main() => foo();
-        """,
-        r"""
-        foo() sync* { return 0; }
-        main() => foo();
-        """,
-      ]), // Generated. Don't edit.
-  MessageKind.NOT_ASSIGNABLE: const MessageTemplate(MessageKind.NOT_ASSIGNABLE,
-      "'#{fromType}' is not assignable to '#{toType}'."), // Generated. Don't edit.
-  MessageKind.FORIN_NOT_ASSIGNABLE: const MessageTemplate(
-      MessageKind.FORIN_NOT_ASSIGNABLE,
-      "The element type '#{currentType}' of '#{expressionType}' is not assignable to '#{elementType}'.",
-      examples: const [
-        r"""
-        main() {
-          List<int> list = <int>[1, 2];
-          for (String x in list) x;
-        }
-        """,
-      ]), // Generated. Don't edit.
-  MessageKind.CANNOT_RESOLVE: const MessageTemplate(MessageKind.CANNOT_RESOLVE,
-      "Can't resolve '#{name}'."), // Generated. Don't edit.
-  MessageKind.UNDEFINED_METHOD: const MessageTemplate(
-      MessageKind.UNDEFINED_METHOD,
-      "The method '#{memberName}' is not defined for the class '#{className}'.",
-      examples: const [
-        r"""
-        class A {
-          foo() { bar(); }
-        }
-        main() { new A().foo(); }
-        """,
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_GETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_GETTER,
-      "The getter '#{memberName}' is not defined for the class '#{className}'.",
-      examples: const [
-        "class A {} main() { new A().x; }",
-        "class A {} main() { A.x; }",
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_INSTANCE_GETTER_BUT_SETTER,
-      "The setter '#{memberName}' in class '#{className}' can not be used as a getter.",
-      examples: const [
-        "class A { set x(y) {} } main() { new A().x; }",
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_OPERATOR: const MessageTemplate(
-      MessageKind.UNDEFINED_OPERATOR,
-      "The operator '#{memberName}' is not defined for the class '#{className}'.",
-      examples: const [
-        "class A {} main() { new A() + 3; }",
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_SETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_SETTER,
-      "The setter '#{memberName}' is not defined for the class '#{className}'.",
-      examples: const [
-        "class A {} main() { new A().x = 499; }",
-      ]), // Generated. Don't edit.
-  MessageKind.NO_SUCH_SUPER_MEMBER: const MessageTemplate(
-      MessageKind.NO_SUCH_SUPER_MEMBER,
-      "Can't resolve '#{memberName}' in a superclass of '#{className}'."), // Generated. Don't edit.
-  MessageKind.UNDEFINED_SUPER_SETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_SUPER_SETTER,
-      "The setter '#{memberName}' is not defined in a superclass of '#{className}'.",
-      examples: const [
-        r"""
-        class A {}
-        class B extends A {
-          foo() { super.x = 499; }
-        }
-        main() { new B().foo(); }
-        """,
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_STATIC_GETTER_BUT_SETTER,
-      "Cannot resolve getter '#{name}'.",
-      examples: const [
-        "set foo(x) {}  main() { foo; }",
-      ]), // Generated. Don't edit.
-  MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER: const MessageTemplate(
-      MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
-      "Cannot resolve setter '#{name}'.",
-      examples: const [
-        r"""
-        main() {
-          final x = 1;
-          x = 2;
-        }""",
-        r"""
-        main() {
-          const x = 1;
-          x = 2;
-        }
-        """,
-        r"""
-        final x = 1;
-        main() { x = 3; }
-        """,
-        r"""
-        const x = 1;
-        main() { x = 3; }
-        """,
-        "get foo => null  main() { foo = 5; }",
-        "const foo = 0  main() { foo = 5; }",
-      ]), // Generated. Don't edit.
-};
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index ffffde6..4e3f803 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -14,7 +14,6 @@
 /// location of the existing element.
 library dart2js.messages;
 
-import 'generated/shared_messages.dart' as shared_messages;
 import '../commandline_options.dart';
 import '../options.dart';
 import 'invariant.dart' show failedAt;
@@ -24,82 +23,23 @@
 
 /// Keys for the [MessageTemplate]s.
 enum MessageKind {
-  ABSTRACT_GETTER,
-  CANNOT_RESOLVE,
   COMPILER_CRASHED,
   COMPLEX_RETURNING_NSM,
   COMPLEX_THROWING_NSM,
-  CONST_CONSTRUCTOR_WITH_BODY,
-  CONST_FACTORY,
-  CONSTRUCTOR_WITH_RETURN_TYPE,
-  CYCLIC_COMPILE_TIME_CONSTANTS,
   DIRECTLY_THROWING_NSM,
-  EQUAL_MAP_ENTRY_KEY,
-  EQUAL_SET_ENTRY,
-  EXTRANEOUS_MODIFIER,
-  EXTRANEOUS_MODIFIER_REPLACE,
-  FORIN_NOT_ASSIGNABLE,
   GENERIC,
   HIDDEN_HINTS,
   HIDDEN_WARNINGS,
   HIDDEN_WARNINGS_HINTS,
-  IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED,
-  INVALID_ASSERT_VALUE,
-  INVALID_ASSERT_VALUE_MESSAGE,
-  INVALID_BOOL_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-  INVALID_CONSTANT_CAST,
-  INVALID_CONSTANT_ADD_TYPES,
-  INVALID_CONSTANT_BINARY_INT_TYPE,
-  INVALID_CONSTANT_BINARY_NUM_TYPE,
-  INVALID_CONSTANT_BINARY_PRIMITIVE_TYPE,
-  INVALID_CONSTANT_COMPLEMENT_TYPE,
-  INVALID_CONSTANT_CONDITIONAL_TYPE,
-  INVALID_CONSTANT_CONSTRUCTOR,
-  INVALID_CONSTANT_DIV,
-  INVALID_CONSTANT_INDEX,
-  INVALID_CONSTANT_INTERPOLATION_TYPE,
-  INVALID_CONSTANT_NEGATE_TYPE,
-  INVALID_CONSTANT_NOT_TYPE,
-  INVALID_CONSTANT_STRING_ADD_TYPE,
-  INVALID_CONSTANT_NUM_ADD_TYPE,
-  INVALID_CONSTANT_STRING_LENGTH_TYPE,
-  INVALID_CONSTANT_SHIFT,
-  INVALID_FROM_ENVIRONMENT_NAME_TYPE,
-  INVALID_INT_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-  INVALID_LOGICAL_AND_OPERAND_TYPE,
-  INVALID_LOGICAL_OR_OPERAND_TYPE,
   INVALID_METADATA,
   INVALID_METADATA_GENERIC,
-  INVALID_PACKAGE_CONFIG,
-  INVALID_PACKAGE_URI,
-  INVALID_STRING_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-  JS_INTEROP_FIELD_NOT_SUPPORTED,
-  JS_INTEROP_NON_EXTERNAL_MEMBER,
-  JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
   JS_PLACEHOLDER_CAPTURE,
-  LIBRARY_NOT_FOUND,
-  MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE,
-  MISSING_EXPRESSION_IN_THROW,
   NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
-  NO_SUCH_SUPER_MEMBER,
   NON_NATIVE_EXTERNAL,
-  NOT_A_COMPILE_TIME_CONSTANT,
-  NOT_ASSIGNABLE,
   PLEASE_REPORT_THE_CRASH,
   PREAMBLE,
-  RETHROW_OUTSIDE_CATCH,
-  RETURN_IN_GENERATIVE_CONSTRUCTOR,
-  RETURN_IN_GENERATOR,
   RUNTIME_TYPE_TO_STRING,
   STRING_EXPECTED,
-  UNDEFINED_GETTER,
-  UNDEFINED_INSTANCE_GETTER_BUT_SETTER,
-  UNDEFINED_METHOD,
-  UNDEFINED_OPERATOR,
-  UNDEFINED_SETTER,
-  UNDEFINED_STATIC_GETTER_BUT_SETTER,
-  UNDEFINED_STATIC_SETTER_BUT_GETTER,
-  UNDEFINED_SUPER_SETTER,
   WRONG_ARGUMENT_FOR_JS,
   WRONG_ARGUMENT_FOR_JS_FIRST,
   WRONG_ARGUMENT_FOR_JS_SECOND,
@@ -143,174 +83,65 @@
   ///
   /// The map is complete mapping from [MessageKind] to their corresponding
   /// [MessageTemplate].
-  // The key type is a union of MessageKind and SharedMessageKind.
-  static final Map<dynamic, MessageTemplate> TEMPLATES = <dynamic,
-      MessageTemplate>{}
-    ..addAll(shared_messages.TEMPLATES)
-    ..addAll(const <MessageKind, MessageTemplate>{
-      /// Do not use this. It is here for legacy and debugging. It violates item
-      /// 4 of the guide lines for error messages in the beginning of the file.
-      MessageKind.GENERIC: MessageTemplate(MessageKind.GENERIC, '#{text}'),
+  static const Map<MessageKind, MessageTemplate> TEMPLATES = {
+    /// Do not use this. It is here for legacy and debugging. It violates item
+    /// 4 of the guide lines for error messages in the beginning of the file.
+    MessageKind.GENERIC: MessageTemplate(MessageKind.GENERIC, '#{text}'),
 
-      MessageKind.CANNOT_RESOLVE: MessageTemplate(
-          MessageKind.CANNOT_RESOLVE, "Cannot resolve '#{name}'."),
+    MessageKind.STRING_EXPECTED: MessageTemplate(MessageKind.STRING_EXPECTED,
+        "Expected a 'String', but got an instance of '#{type}'."),
 
-      MessageKind.NOT_A_COMPILE_TIME_CONSTANT: MessageTemplate(
-          MessageKind.NOT_A_COMPILE_TIME_CONSTANT,
-          "Not a compile-time constant."),
+    MessageKind.JS_PLACEHOLDER_CAPTURE: MessageTemplate(
+        MessageKind.JS_PLACEHOLDER_CAPTURE,
+        "JS code must not use '#' placeholders inside functions.",
+        howToFix: "Use an immediately called JavaScript function to capture the"
+            " the placeholder values as JavaScript function parameters."),
 
-      MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS: MessageTemplate(
-          MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS,
-          "Cycle in the compile-time constant computation."),
+    MessageKind.WRONG_ARGUMENT_FOR_JS: MessageTemplate(
+        MessageKind.WRONG_ARGUMENT_FOR_JS,
+        "JS expression must take two or more arguments."),
 
-      MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER: MessageTemplate(
-          MessageKind.UNDEFINED_STATIC_SETTER_BUT_GETTER,
-          "Cannot resolve setter."),
+    MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST: MessageTemplate(
+        MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST,
+        "JS expression must take two or more arguments."),
 
-      MessageKind.STRING_EXPECTED: MessageTemplate(MessageKind.STRING_EXPECTED,
-          "Expected a 'String', but got an instance of '#{type}'."),
+    MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND: MessageTemplate(
+        MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND,
+        "JS second argument must be a string literal."),
 
-      MessageKind.JS_INTEROP_NON_EXTERNAL_MEMBER: MessageTemplate(
-          MessageKind.JS_INTEROP_NON_EXTERNAL_MEMBER,
-          "Js-interop members must be 'external'."),
+    MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT: MessageTemplate(
+        MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
+        "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
 
-      MessageKind.IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED: MessageTemplate(
-          MessageKind.IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED,
-          "Fields in js-interop classes are not supported.",
-          howToFix: "Try replacing the field with an "
-              "external getter and/or setter."),
-      MessageKind.JS_INTEROP_FIELD_NOT_SUPPORTED: MessageTemplate(
-          MessageKind.JS_INTEROP_FIELD_NOT_SUPPORTED,
-          "Field can't be marked as js-interop.",
-          howToFix: "Try replacing the field with an "
-              "external getter and/or setter."),
+    MessageKind.INVALID_METADATA: MessageTemplate(
+        MessageKind.INVALID_METADATA,
+        "A metadata annotation must be either a reference to a compile-time "
+        "constant variable or a call to a constant constructor.",
+        howToFix:
+            "Try using a different constant value or referencing it through a "
+            "constant variable.",
+        examples: ['@Object main() {}', '@print main() {}']),
 
-      MessageKind.LIBRARY_NOT_FOUND: MessageTemplate(
-          MessageKind.LIBRARY_NOT_FOUND, "Library not found '#{resolvedUri}'."),
-
-      MessageKind.INVALID_PACKAGE_CONFIG: MessageTemplate(
-          MessageKind.INVALID_PACKAGE_CONFIG,
-          """Package config file '#{uri}' is invalid.
-#{exception}""",
-          howToFix: DONT_KNOW_HOW_TO_FIX),
-
-      MessageKind.INVALID_PACKAGE_URI: MessageTemplate(
-          MessageKind.INVALID_PACKAGE_URI,
-          "'#{uri}' is not a valid package URI (#{exception}).",
-          howToFix: DONT_KNOW_HOW_TO_FIX,
-          examples: [
-            """
-// can't have a 'top level' package URI
-import 'package:foo.dart';
-
-main() {}
-""",
-            """
-// can't have 2 slashes
-import 'package://foo/foo.dart';
-
-main() {}
-""",
-            """
-// package name must be valid
-import 'package:not\valid/foo.dart';
-
-main() {}
-"""
-          ]),
-
-      MessageKind.JS_PLACEHOLDER_CAPTURE: MessageTemplate(
-          MessageKind.JS_PLACEHOLDER_CAPTURE,
-          "JS code must not use '#' placeholders inside functions.",
-          howToFix:
-              "Use an immediately called JavaScript function to capture the"
-              " the placeholder values as JavaScript function parameters."),
-
-      MessageKind.WRONG_ARGUMENT_FOR_JS: MessageTemplate(
-          MessageKind.WRONG_ARGUMENT_FOR_JS,
-          "JS expression must take two or more arguments."),
-
-      MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST: MessageTemplate(
-          MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST,
-          "JS expression must take two or more arguments."),
-
-      MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND: MessageTemplate(
-          MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND,
-          "JS second argument must be a string literal."),
-
-      MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT: MessageTemplate(
-          MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
-          "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
-
-      MessageKind.ABSTRACT_GETTER: MessageTemplate(
-          MessageKind.ABSTRACT_GETTER,
-          "The getter '#{name}' has no implementation in "
-          "class '#{class}'.",
-          howToFix: "Try adding a body to '#{name}' or declaring "
-              "'#{class}' to be 'abstract'.",
-          examples: [
-            """
-class Class {
-  get getter;
-}
-main() => new Class();
-"""
-          ]),
-
-      MessageKind.INVALID_METADATA: MessageTemplate(
-          MessageKind.INVALID_METADATA,
-          "A metadata annotation must be either a reference to a compile-time "
-          "constant variable or a call to a constant constructor.",
-          howToFix:
-              "Try using a different constant value or referencing it through a "
-              "constant variable.",
-          examples: ['@Object main() {}', '@print main() {}']),
-
-      MessageKind.INVALID_METADATA_GENERIC: MessageTemplate(
-          MessageKind.INVALID_METADATA_GENERIC,
-          "A metadata annotation using a constant constructor cannot use type "
-          "arguments.",
-          howToFix:
-              "Try removing the type arguments or referencing the constant "
-              "through a constant variable.",
-          examples: [
-            '''
+    MessageKind.INVALID_METADATA_GENERIC: MessageTemplate(
+        MessageKind.INVALID_METADATA_GENERIC,
+        "A metadata annotation using a constant constructor cannot use type "
+        "arguments.",
+        howToFix: "Try removing the type arguments or referencing the constant "
+            "through a constant variable.",
+        examples: [
+          '''
 class C<T> {
   const C();
 }
 @C<int>() main() {}
 '''
-          ]),
+        ]),
 
-      MessageKind.EQUAL_MAP_ENTRY_KEY: MessageTemplate(
-          MessageKind.EQUAL_MAP_ENTRY_KEY,
-          "An entry with the same key already exists in the map.",
-          howToFix:
-              "Try removing the previous entry or changing the key in one "
-              "of the entries.",
-          examples: [
-            """
-main() {
-  var m = const {'foo': 1, 'foo': 2};
-}"""
-          ]),
+    MessageKind.COMPILER_CRASHED: MessageTemplate(MessageKind.COMPILER_CRASHED,
+        "The compiler crashed when compiling this element."),
 
-      MessageKind.EQUAL_SET_ENTRY: MessageTemplate(
-          MessageKind.EQUAL_SET_ENTRY, "An entry appears twice in the set.",
-          howToFix: "Try removing one of the entries.",
-          examples: [
-            """
-main() {
-  var m = const {'foo', 'bar', 'foo'};
-}"""
-          ]),
-
-      MessageKind.COMPILER_CRASHED: MessageTemplate(
-          MessageKind.COMPILER_CRASHED,
-          "The compiler crashed when compiling this element."),
-
-      MessageKind.PLEASE_REPORT_THE_CRASH:
-          MessageTemplate(MessageKind.PLEASE_REPORT_THE_CRASH, '''
+    MessageKind.PLEASE_REPORT_THE_CRASH:
+        MessageTemplate(MessageKind.PLEASE_REPORT_THE_CRASH, '''
 The compiler is broken.
 
 When compiling the above element, the compiler crashed. It is not
@@ -330,221 +161,77 @@
   below as well as the source location above).
 '''),
 
-      MessageKind.HIDDEN_WARNINGS_HINTS: MessageTemplate(
-          MessageKind.HIDDEN_WARNINGS_HINTS,
-          "#{warnings} warning(s) and #{hints} hint(s) suppressed in #{uri}."),
+    MessageKind.HIDDEN_WARNINGS_HINTS: MessageTemplate(
+        MessageKind.HIDDEN_WARNINGS_HINTS,
+        "#{warnings} warning(s) and #{hints} hint(s) suppressed in #{uri}."),
 
-      MessageKind.HIDDEN_WARNINGS: MessageTemplate(MessageKind.HIDDEN_WARNINGS,
-          "#{warnings} warning(s) suppressed in #{uri}."),
+    MessageKind.HIDDEN_WARNINGS: MessageTemplate(MessageKind.HIDDEN_WARNINGS,
+        "#{warnings} warning(s) suppressed in #{uri}."),
 
-      MessageKind.HIDDEN_HINTS: MessageTemplate(
-          MessageKind.HIDDEN_HINTS, "#{hints} hint(s) suppressed in #{uri}."),
+    MessageKind.HIDDEN_HINTS: MessageTemplate(
+        MessageKind.HIDDEN_HINTS, "#{hints} hint(s) suppressed in #{uri}."),
 
-      MessageKind.PREAMBLE: MessageTemplate(
-          MessageKind.PREAMBLE,
-          "When run on the command-line, the compiled output might"
-          " require a preamble file located in:\n"
-          "  <sdk>/lib/_internal/js_runtime/lib/preambles."),
+    MessageKind.PREAMBLE: MessageTemplate(
+        MessageKind.PREAMBLE,
+        "When run on the command-line, the compiled output might"
+        " require a preamble file located in:\n"
+        "  <sdk>/lib/_internal/js_runtime/lib/preambles."),
 
-      MessageKind.INVALID_CONSTANT_CONDITIONAL_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_CONDITIONAL_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid constant condition. "
-          "Must be a value of type 'bool'."),
+    MessageKind.DIRECTLY_THROWING_NSM: MessageTemplate(
+        MessageKind.DIRECTLY_THROWING_NSM,
+        "This 'noSuchMethod' implementation is guaranteed to throw an "
+        "exception. The generated code will be smaller if it is "
+        "rewritten.",
+        howToFix: "Rewrite to "
+            "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
 
-      MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE,
-          "`#{constant}` of type '#{type}' is not valid in constant string "
-          "interpolation. Must be a value of type 'bool', 'int', 'double', "
-          "or 'String'."),
+    MessageKind.COMPLEX_THROWING_NSM: MessageTemplate(
+        MessageKind.COMPLEX_THROWING_NSM,
+        "This 'noSuchMethod' implementation is guaranteed to throw an "
+        "exception. The generated code will be smaller and the compiler "
+        "will be able to perform more optimizations if it is rewritten.",
+        howToFix: "Rewrite to "
+            "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
 
-      MessageKind.INVALID_CONSTANT_BINARY_PRIMITIVE_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_BINARY_PRIMITIVE_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant binary #{operator} expression. Must be a value of type "
-          "'bool', 'int', 'double', 'String', or 'Null'."),
+    MessageKind.COMPLEX_RETURNING_NSM: MessageTemplate(
+        MessageKind.COMPLEX_RETURNING_NSM,
+        "Overriding 'noSuchMethod' causes the compiler to generate "
+        "more code and prevents the compiler from doing some optimizations.",
+        howToFix: "Consider removing this 'noSuchMethod' implementation."),
 
-      MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant binary + expression on 'String'. Must be a value of type "
-          "'String'."),
+    MessageKind.RUNTIME_TYPE_TO_STRING: MessageTemplate(
+        MessageKind.RUNTIME_TYPE_TO_STRING,
+        "Using '.runtimeType.toString()' causes the compiler to generate "
+        "more code because it needs to preserve type arguments on "
+        "generic classes, even if they are not necessary elsewhere.",
+        howToFix: "If used only for debugging, consider using option "
+            "${Flags.laxRuntimeTypeToString} to reduce the code size "
+            "impact."),
 
-      MessageKind.INVALID_CONSTANT_STRING_LENGTH_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_STRING_LENGTH_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand for a "
-          ".length expression. Must be a value of type 'String'."),
+    MessageKind.NON_NATIVE_EXTERNAL: MessageTemplate(
+        MessageKind.NON_NATIVE_EXTERNAL,
+        "Non-native external members must be js-interop.",
+        howToFix: "Try removing the 'external' keyword, making it 'native', or "
+            "annotating the function as a js-interop function."),
 
-      MessageKind.INVALID_CONSTANT_SHIFT: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_SHIFT,
-          "Shift amount must be non-negative in "
-          "`#{left} #{operator} #{right}`."),
+    MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS: MessageTemplate(
+        MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
+        "Native non-instance members are only allowed in native classes."),
 
-      MessageKind.INVALID_CONSTANT_DIV: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_DIV,
-          "Divisor must be non-zero in `#{left} #{operator} #{right}`."),
-
-      MessageKind.INVALID_CONSTANT_NUM_ADD_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_NUM_ADD_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant binary + expression on 'num'. Must be a value of type "
-          "'int' or 'double'."),
-
-      MessageKind.INVALID_CONSTANT_CAST: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_CAST,
-          "`#{constant}` of type '#{type}' is not a subtype of #{castType}."),
-
-      MessageKind.INVALID_CONSTANT_ADD_TYPES: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_ADD_TYPES,
-          "`#{leftConstant}` of type '#{leftType}' and "
-          "`#{rightConstant}` of type '#{rightType}' are not valid operands "
-          "of a constant binary + expression. Must both be either of "
-          "type 'String', or of types 'int' or 'double'."),
-
-      MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant binary #{operator} expression. Must be a value of type "
-          "'int' or 'double'."),
-
-      MessageKind.INVALID_CONSTANT_BINARY_INT_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_BINARY_INT_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant binary #{operator} expression. Must be a value of type "
-          "'int'."),
-
-      MessageKind.INVALID_CONSTANT_NOT_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_NOT_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant unary #{operator} expression. Must be a value of type "
-          "'bool'."),
-
-      MessageKind.INVALID_CONSTANT_NEGATE_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_NEGATE_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant unary #{operator} expression. Must be a value of type "
-          "'int' or 'double'."),
-
-      MessageKind.INVALID_CONSTANT_COMPLEMENT_TYPE: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_COMPLEMENT_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid operand of a "
-          "constant unary #{operator} expression. Must be a value of type "
-          "'int'."),
-
-      MessageKind.INVALID_CONSTANT_INDEX: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_INDEX,
-          "Index expressions are not allowed in constant expressions."),
-
-      MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE: MessageTemplate(
-          MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid environment name "
-          "constant. Must be a value of type 'String'."),
-
-      MessageKind.INVALID_BOOL_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE:
-          MessageTemplate(
-              MessageKind.INVALID_BOOL_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-              "`#{constant}` of type '#{type}' is not a valid "
-              "`bool.fromEnvironment` default value constant. "
-              "Must be a value of type 'bool' or `null`."),
-
-      MessageKind.INVALID_INT_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE:
-          MessageTemplate(
-              MessageKind.INVALID_INT_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-              "`#{constant}` of type '#{type}' is not a valid "
-              "`int.fromEnvironment` default value constant. "
-              "Must be a value of type 'int' or `null`."),
-
-      MessageKind.INVALID_STRING_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE:
-          MessageTemplate(
-              MessageKind.INVALID_STRING_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE,
-              "`#{constant}` of type '#{type}' is not a valid "
-              "`String.fromEnvironment` default value constant. "
-              "Must be a value of type 'String' or `null`."),
-
-      MessageKind.INVALID_LOGICAL_AND_OPERAND_TYPE: MessageTemplate(
-          MessageKind.INVALID_LOGICAL_AND_OPERAND_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid logical and operand. "
-          "Must be a value of type 'bool'."),
-
-      MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE: MessageTemplate(
-          MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid logical or operand. "
-          "Must be a value of type 'bool'."),
-
-      MessageKind.INVALID_CONSTANT_CONSTRUCTOR: MessageTemplate(
-          MessageKind.INVALID_CONSTANT_CONSTRUCTOR,
-          "Constructor '#{constructorName}' is not a valid constant "
-          "constructor."),
-
-      MessageKind.INVALID_ASSERT_VALUE: MessageTemplate(
-          MessageKind.INVALID_ASSERT_VALUE, "Assertion '#{assertion}' failed."),
-
-      MessageKind.INVALID_ASSERT_VALUE_MESSAGE: MessageTemplate(
-          MessageKind.INVALID_ASSERT_VALUE_MESSAGE,
-          "Assertion failed: #{message}"),
-
-      MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE:
-          MessageTemplate(MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE, """
-dart2js no longer supports the dart:mirrors library.
-
-APIs from this library will throw a runtime error at this time, but they will
-become a compile-time error in the future."""),
-
-      MessageKind.DIRECTLY_THROWING_NSM: MessageTemplate(
-          MessageKind.DIRECTLY_THROWING_NSM,
-          "This 'noSuchMethod' implementation is guaranteed to throw an "
-          "exception. The generated code will be smaller if it is "
-          "rewritten.",
-          howToFix: "Rewrite to "
-              "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
-
-      MessageKind.COMPLEX_THROWING_NSM: MessageTemplate(
-          MessageKind.COMPLEX_THROWING_NSM,
-          "This 'noSuchMethod' implementation is guaranteed to throw an "
-          "exception. The generated code will be smaller and the compiler "
-          "will be able to perform more optimizations if it is rewritten.",
-          howToFix: "Rewrite to "
-              "'noSuchMethod(Invocation i) => super.noSuchMethod(i);'."),
-
-      MessageKind.COMPLEX_RETURNING_NSM: MessageTemplate(
-          MessageKind.COMPLEX_RETURNING_NSM,
-          "Overriding 'noSuchMethod' causes the compiler to generate "
-          "more code and prevents the compiler from doing some optimizations.",
-          howToFix: "Consider removing this 'noSuchMethod' implementation."),
-
-      MessageKind.RUNTIME_TYPE_TO_STRING: MessageTemplate(
-          MessageKind.RUNTIME_TYPE_TO_STRING,
-          "Using '.runtimeType.toString()' causes the compiler to generate "
-          "more code because it needs to preserve type arguments on "
-          "generic classes, even if they are not necessary elsewhere.",
-          howToFix: "If used only for debugging, consider using option "
-              "${Flags.laxRuntimeTypeToString} to reduce the code size "
-              "impact."),
-
-      MessageKind.NON_NATIVE_EXTERNAL: MessageTemplate(
-          MessageKind.NON_NATIVE_EXTERNAL,
-          "Non-native external members must be js-interop.",
-          howToFix:
-              "Try removing the 'external' keyword, making it 'native', or "
-              "annotating the function as a js-interop function."),
-
-      MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS: MessageTemplate(
-          MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
-          "Native non-instance members are only allowed in native classes."),
-
-      // TODO(32557): Remove these when issue 32557 is fixed.
-      MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS: MessageTemplate(
-          MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
-          "'case' expression type '#{type}' overrides 'operator =='."),
-      MessageKind.SWITCH_CASE_FORBIDDEN: MessageTemplate(
-          MessageKind.SWITCH_CASE_FORBIDDEN,
-          "'case' expression may not be of type '#{type}'."),
-      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL: MessageTemplate(
-          MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
-          "'case' expressions do not all have type '#{type}'."),
-      MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE: MessageTemplate(
-          MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
-          "'case' expression of type '#{type}'."),
-    }); // End of TEMPLATES.
+    // TODO(32557): Remove these when issue 32557 is fixed.
+    MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS: MessageTemplate(
+        MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+        "'case' expression type '#{type}' overrides 'operator =='."),
+    MessageKind.SWITCH_CASE_FORBIDDEN: MessageTemplate(
+        MessageKind.SWITCH_CASE_FORBIDDEN,
+        "'case' expression may not be of type '#{type}'."),
+    MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL: MessageTemplate(
+        MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
+        "'case' expressions do not all have type '#{type}'."),
+    MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE: MessageTemplate(
+        MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
+        "'case' expression of type '#{type}'."),
+  }; // End of TEMPLATES.
 
   @override
   String toString() => template;
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 5b78296..7bd4114 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -41,7 +41,7 @@
   JElementEnvironment get environment => closedWorld.elementEnvironment;
   CodegenWorldBuilder get codegenWorldBuilder => compiler.codegenWorldBuilder;
 
-  final AllInfo result = new AllInfo();
+  final AllInfo result = AllInfo();
   final Map<Entity, Info> _entityToInfo = <Entity, Info>{};
   final Map<ConstantValue, Info> _constantToInfo = <ConstantValue, Info>{};
   final Map<OutputUnit, OutputUnitInfo> _outputToInfo = {};
@@ -53,7 +53,7 @@
     dumpInfoTask._constantToNode.forEach((constant, node) {
       // TODO(sigmund): add dependencies on other constants
       var span = dumpInfoTask._nodeData[node];
-      var info = new ConstantInfo(
+      var info = ConstantInfo(
           size: span.end - span.start,
           code: [span],
           outputUnit: _unitInfoForConstant(constant));
@@ -79,7 +79,7 @@
       libname = '<unnamed>';
     }
     int size = dumpInfoTask.sizeOf(lib);
-    LibraryInfo info = new LibraryInfo(libname, lib.canonicalUri, null, size);
+    LibraryInfo info = LibraryInfo(libname, lib.canonicalUri, null, size);
     _entityToInfo[lib] = info;
 
     environment.forEachLibraryMember(lib, (MemberEntity member) {
@@ -133,7 +133,7 @@
     // TODO(het): Why doesn't `size` account for the code size already?
     if (code != null) size += code.length;
 
-    FieldInfo info = new FieldInfo(
+    FieldInfo info = FieldInfo(
         name: field.name,
         type: '${environment.getFieldType(field)}',
         inferredType: '$inferredType',
@@ -161,7 +161,7 @@
 
   ClassInfo visitClass(ClassEntity clazz) {
     // Omit class if it is not needed.
-    ClassInfo classInfo = new ClassInfo(
+    ClassInfo classInfo = ClassInfo(
         name: clazz.name,
         isAbstract: clazz.isAbstract,
         outputUnit: _unitInfoForClass(clazz));
@@ -188,7 +188,7 @@
           }
         }
       } else {
-        throw new StateError('Class member not a function or field');
+        throw StateError('Class member not a function or field');
       }
     });
     environment.forEachConstructor(clazz, (constructor) {
@@ -215,7 +215,7 @@
   }
 
   ClosureInfo visitClosureClass(ClassEntity element) {
-    ClosureInfo closureInfo = new ClosureInfo(
+    ClosureInfo closureInfo = ClosureInfo(
         name: element.name,
         outputUnit: _unitInfoForClass(element),
         size: dumpInfoTask.sizeOf(element));
@@ -257,7 +257,7 @@
 
     assert(kind != null);
 
-    FunctionModifiers modifiers = new FunctionModifiers(
+    FunctionModifiers modifiers = FunctionModifiers(
       isStatic: function.isStatic,
       isConst: function.isConst,
       isFactory: function.isConstructor
@@ -278,7 +278,7 @@
     closedWorld.elementEnvironment.forEachParameter(function, (type, name, _) {
       // Synthesized parameters have no name. This can happen on parameters of
       // setters derived from lowering late fields.
-      parameters.add(new ParameterInfo(name ?? '#t${parameterIndex}',
+      parameters.add(ParameterInfo(name ?? '#t${parameterIndex}',
           inferredParameterTypes[parameterIndex++], '$type'));
     });
 
@@ -292,7 +292,7 @@
     int inlinedCount = dumpInfoTask.inlineCount[function];
     if (inlinedCount == null) inlinedCount = 0;
 
-    FunctionInfo info = new FunctionInfo(
+    FunctionInfo info = FunctionInfo(
         name: name,
         functionKind: kind,
         modifiers: modifiers,
@@ -351,7 +351,7 @@
       var filename = outputUnit.isMainOutput
           ? compiler.options.outputUri.pathSegments.last
           : deferredPartFileName(compiler.options, outputUnit.name);
-      OutputUnitInfo info = new OutputUnitInfo(filename, outputUnit.name,
+      OutputUnitInfo info = OutputUnitInfo(filename, outputUnit.name,
           backendStrategy.emitterTask.emitter.generatedSize(outputUnit));
       info.imports
           .addAll(closedWorld.outputUnitData.getImportNames(outputUnit));
@@ -398,7 +398,7 @@
 }
 
 class DumpInfoTask extends CompilerTask implements InfoReporter {
-  static const ImpactUseCase IMPACT_USE = const ImpactUseCase('Dump info');
+  static const ImpactUseCase IMPACT_USE = ImpactUseCase('Dump info');
   final Compiler compiler;
   final bool useBinaryFormat;
 
@@ -467,15 +467,15 @@
     compiler.impactStrategy.visitImpact(
         entity,
         impact,
-        new WorldImpactVisitorImpl(visitDynamicUse: (member, dynamicUse) {
+        WorldImpactVisitorImpl(visitDynamicUse: (member, dynamicUse) {
           AbstractValue mask = dynamicUse.receiverConstraint;
           selections.addAll(closedWorld
               // TODO(het): Handle `call` on `Closure` through
               // `world.includesClosureCall`.
               .locateMembers(dynamicUse.selector, mask)
-              .map((MemberEntity e) => new Selection(e, mask)));
+              .map((MemberEntity e) => Selection(e, mask)));
         }, visitStaticUse: (member, staticUse) {
-          selections.add(new Selection(staticUse.element, null));
+          selections.add(Selection(staticUse.element, null));
         }),
         IMPACT_USE);
     return selections;
@@ -487,7 +487,7 @@
       {LibraryEntity library}) {
     if (compiler.options.dumpInfo) {
       _entityToNodes.putIfAbsent(entity, () => <jsAst.Node>[]).add(code);
-      _nodeData[code] ??= useBinaryFormat ? new CodeSpan() : new _CodeData();
+      _nodeData[code] ??= useBinaryFormat ? CodeSpan() : _CodeData();
     }
   }
 
@@ -496,13 +496,13 @@
       assert(_constantToNode[constant] == null ||
           _constantToNode[constant] == code);
       _constantToNode[constant] = code;
-      _nodeData[code] ??= useBinaryFormat ? new CodeSpan() : new _CodeData();
+      _nodeData[code] ??= useBinaryFormat ? CodeSpan() : _CodeData();
     }
   }
 
   bool get shouldEmitText => !useBinaryFormat;
   // TODO(sigmund): delete the stack once we stop emitting the source text.
-  List<_CodeData> _stack = [];
+  final List<_CodeData> _stack = [];
   void enterNode(jsAst.Node node, int start) {
     var data = _nodeData[node];
     data?.start = start;
@@ -556,7 +556,7 @@
   void dumpInfo(JClosedWorld closedWorld,
       GlobalTypeInferenceResults globalInferenceResults) {
     measure(() {
-      infoCollector = new ElementInfoCollector(
+      infoCollector = ElementInfoCollector(
           compiler, this, closedWorld, globalInferenceResults)
         ..run();
 
@@ -570,11 +570,11 @@
   }
 
   void dumpInfoJson(AllInfo data) {
-    StringBuffer jsonBuffer = new StringBuffer();
+    StringBuffer jsonBuffer = StringBuffer();
     JsonEncoder encoder = const JsonEncoder.withIndent('  ');
     ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
-        new StringConversionSink.fromStringSink(jsonBuffer));
-    sink.add(new AllInfoJsonCodec(isBackwardCompatible: true).encode(data));
+        StringConversionSink.fromStringSink(jsonBuffer));
+    sink.add(AllInfoJsonCodec(isBackwardCompatible: true).encode(data));
     compiler.outputProvider.createOutputSink(
         compiler.options.outputUri.pathSegments.last,
         'info.json',
@@ -590,7 +590,7 @@
 
   void dumpInfoBinary(AllInfo data) {
     var name = compiler.options.outputUri.pathSegments.last + ".info.data";
-    Sink<List<int>> sink = new BinaryOutputSinkAdapter(compiler.outputProvider
+    Sink<List<int>> sink = BinaryOutputSinkAdapter(compiler.outputProvider
         .createBinarySink(compiler.options.outputUri.resolve(name)));
     dump_info.encode(data, sink);
     compiler.reporter
@@ -601,7 +601,7 @@
   }
 
   AllInfo buildDumpInfoData(JClosedWorld closedWorld) {
-    Stopwatch stopwatch = new Stopwatch();
+    Stopwatch stopwatch = Stopwatch();
     stopwatch.start();
 
     AllInfo result = infoCollector.result;
@@ -617,8 +617,8 @@
         // Don't register dart2js builtin functions that are not recorded.
         Info useInfo = infoCollector._entityToInfo[selection.selectedEntity];
         if (useInfo == null) continue;
-        info.uses.add(new DependencyInfo(
-            useInfo, selection.receiverConstraint?.toString()));
+        info.uses.add(
+            DependencyInfo(useInfo, selection.receiverConstraint?.toString()));
       }
     }
 
@@ -632,8 +632,8 @@
       for (Selection selection in uses) {
         Info useInfo = infoCollector._entityToInfo[selection.selectedEntity];
         if (useInfo == null) continue;
-        info.uses.add(new DependencyInfo(
-            useInfo, selection.receiverConstraint?.toString()));
+        info.uses.add(
+            DependencyInfo(useInfo, selection.receiverConstraint?.toString()));
       }
     }
 
@@ -647,7 +647,7 @@
       for (Entity inlined in inlineMap[entity]) {
         Info inlinedInfo = infoCollector._entityToInfo[inlined];
         if (inlinedInfo == null) continue;
-        outerInfo.uses.add(new DependencyInfo(inlinedInfo, 'inlined'));
+        outerInfo.uses.add(DependencyInfo(inlinedInfo, 'inlined'));
       }
     }
 
@@ -658,17 +658,16 @@
     result.deferredFiles = fragmentMerger.computeDeferredMap(fragmentsToLoad);
     stopwatch.stop();
 
-    result.program = new ProgramInfo(
+    result.program = ProgramInfo(
         entrypoint: infoCollector
             ._entityToInfo[closedWorld.elementEnvironment.mainFunction],
         size: _programSize,
         dart2jsVersion:
             compiler.options.hasBuildId ? compiler.options.buildId : null,
-        compilationMoment: new DateTime.now(),
+        compilationMoment: DateTime.now(),
         compilationDuration: compiler.measurer.elapsedWallClock,
-        toJsonDuration:
-            new Duration(milliseconds: stopwatch.elapsedMilliseconds),
-        dumpInfoDuration: new Duration(milliseconds: this.timing),
+        toJsonDuration: Duration(milliseconds: stopwatch.elapsedMilliseconds),
+        dumpInfoDuration: Duration(milliseconds: this.timing),
         noSuchMethodEnabled: closedWorld.backendUsage.isNoSuchMethodUsed,
         isRuntimeTypeUsed: closedWorld.backendUsage.isRuntimeTypeUsed,
         isIsolateInUse: false,
@@ -683,7 +682,7 @@
 /// Helper class to store what dump-info will show for a piece of code.
 // TODO(sigmund): delete once we no longer emit text by default.
 class _CodeData extends CodeSpan {
-  StringBuffer _text = new StringBuffer();
+  final StringBuffer _text = StringBuffer();
   @override
   String get text => '$_text';
   int get length => end - start;
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index b0f12cf..a9f5514 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -166,21 +166,19 @@
 /// Enum for the synchronous/asynchronous function body modifiers.
 class AsyncMarker {
   /// The default function body marker.
-  static const AsyncMarker SYNC = const AsyncMarker._(AsyncModifier.Sync);
+  static const AsyncMarker SYNC = AsyncMarker._(AsyncModifier.Sync);
 
   /// The `sync*` function body marker.
   static const AsyncMarker SYNC_STAR =
-      const AsyncMarker._(AsyncModifier.SyncStar, isYielding: true);
+      AsyncMarker._(AsyncModifier.SyncStar, isYielding: true);
 
   /// The `async` function body marker.
   static const AsyncMarker ASYNC =
-      const AsyncMarker._(AsyncModifier.Async, isAsync: true);
+      AsyncMarker._(AsyncModifier.Async, isAsync: true);
 
   /// The `async*` function body marker.
-  static const AsyncMarker ASYNC_STAR = const AsyncMarker._(
-      AsyncModifier.AsyncStar,
-      isAsync: true,
-      isYielding: true);
+  static const AsyncMarker ASYNC_STAR =
+      AsyncMarker._(AsyncModifier.AsyncStar, isAsync: true, isYielding: true);
 
   /// Is `true` if this marker defines the function body to have an
   /// asynchronous result, that is, either a [Future] or a [Stream].
@@ -193,7 +191,7 @@
   final AsyncModifier asyncParserState;
 
   const AsyncMarker._(this.asyncParserState,
-      {this.isAsync: false, this.isYielding: false});
+      {this.isAsync = false, this.isYielding = false});
 
   @override
   String toString() {
@@ -203,7 +201,7 @@
   /// Canonical list of marker values.
   ///
   /// Added to make [AsyncMarker] enum-like.
-  static const List<AsyncMarker> values = const <AsyncMarker>[
+  static const List<AsyncMarker> values = <AsyncMarker>[
     SYNC,
     SYNC_STAR,
     ASYNC,
diff --git a/pkg/compiler/lib/src/elements/indexed.dart b/pkg/compiler/lib/src/elements/indexed.dart
index 781d600..4552656 100644
--- a/pkg/compiler/lib/src/elements/indexed.dart
+++ b/pkg/compiler/lib/src/elements/indexed.dart
@@ -54,7 +54,7 @@
   bool _closed = false;
 
   int _size = 0;
-  List<E> _list = <E>[];
+  final List<E> _list = <E>[];
 
   /// Returns the [index]th entity in the map.
   E getEntity(int index) => _list[index];
@@ -113,13 +113,13 @@
 /// corresponding data object of type [D].
 abstract class EntityDataMapBase<E extends _Indexed, D>
     extends EntityMapBase<E> {
-  List<D> _data = <D>[];
+  final List<D> _data = <D>[];
 
   /// Returns the data object stored for the [index]th entity.
   D getData(E entity) {
     int index = entity._index;
     if (index < _list.length && index >= _data.length) {
-      throw new StateError(
+      throw StateError(
           'Data is in the process of being created for ${_list[index]}.');
     }
     return _data[index];
@@ -169,7 +169,7 @@
   /// Calls [f] for each non-null entity with its corresponding data object.
   void forEach<E0 extends E, D0 extends D>(void f(E0 entity, D0 data)) {
     if (_list.length != _data.length) {
-      throw new StateError('Data is in the process of being created.');
+      throw StateError('Data is in the process of being created.');
     }
     for (int index = 0; index < _list.length; index++) {
       E entity = _list[index];
@@ -184,13 +184,13 @@
 /// corresponding data object of type [D] and an environment of type [V].
 abstract class EntityDataEnvMapBase<E extends _Indexed, D, V>
     extends EntityDataMapBase<E, D> {
-  List<V> _env = <V>[];
+  final List<V> _env = <V>[];
 
   /// Returns the environment object stored for the [index]th entity.
   V getEnv(E entity) {
     int index = entity._index;
     if (index < _list.length && index >= _env.length) {
-      throw new StateError(
+      throw StateError(
           'Env is in the process of being created for ${_list[index]}.');
     }
     return _env[index];
@@ -244,10 +244,10 @@
   void forEach<E0 extends E, D0 extends D, V0 extends V>(
       void f(E0 entity, D0 data, V0 env)) {
     if (_list.length != _data.length) {
-      throw new StateError('Data is in the process of being created.');
+      throw StateError('Data is in the process of being created.');
     }
     if (_list.length != _env.length) {
-      throw new StateError('Env is in the process of being created.');
+      throw StateError('Env is in the process of being created.');
     }
     for (int index = 0; index < _list.length; index++) {
       E entity = _list[index];
diff --git a/pkg/compiler/lib/src/elements/jumps.dart b/pkg/compiler/lib/src/elements/jumps.dart
index 53bf887..16fc90f 100644
--- a/pkg/compiler/lib/src/elements/jumps.dart
+++ b/pkg/compiler/lib/src/elements/jumps.dart
@@ -34,5 +34,5 @@
   bool get isSwitchCase;
 
   LabelDefinition addLabel(String labelName,
-      {bool isBreakTarget: false, bool isContinueTarget: false});
+      {bool isBreakTarget = false, bool isContinueTarget = false});
 }
diff --git a/pkg/compiler/lib/src/elements/names.dart b/pkg/compiler/lib/src/elements/names.dart
index 0a004de..c3ff551 100644
--- a/pkg/compiler/lib/src/elements/names.dart
+++ b/pkg/compiler/lib/src/elements/names.dart
@@ -15,11 +15,11 @@
   /// Create a [Name] for an identifier [text]. If [text] begins with '_' a
   /// private name with respect to [library] is created. If [isSetter] is `true`
   /// the created name represents the setter name 'text='.
-  factory Name(String text, LibraryEntity library, {bool isSetter: false}) {
+  factory Name(String text, LibraryEntity library, {bool isSetter = false}) {
     if (isPrivateName(text)) {
-      return new PrivateName(text, library, isSetter: isSetter);
+      return PrivateName(text, library, isSetter: isSetter);
     }
-    return new PublicName(text, isSetter: isSetter);
+    return PublicName(text, isSetter: isSetter);
   }
 
   /// The text of the name without prefixed library name or suffixed '=' if
@@ -66,13 +66,13 @@
   @override
   final bool isSetter;
 
-  const PublicName(this.text, {this.isSetter: false});
+  const PublicName(this.text, {this.isSetter = false});
 
   @override
-  Name get getter => isSetter ? new PublicName(text) : this;
+  Name get getter => isSetter ? PublicName(text) : this;
 
   @override
-  Name get setter => isSetter ? this : new PublicName(text, isSetter: true);
+  Name get setter => isSetter ? this : PublicName(text, isSetter: true);
 
   @override
   bool isAccessibleFrom(LibraryEntity element) => true;
@@ -106,15 +106,15 @@
   @override
   final LibraryEntity library;
 
-  PrivateName(String text, this.library, {bool isSetter: false})
+  PrivateName(String text, this.library, {bool isSetter = false})
       : super(text, isSetter: isSetter);
 
   @override
-  Name get getter => isSetter ? new PrivateName(text, library) : this;
+  Name get getter => isSetter ? PrivateName(text, library) : this;
 
   @override
   Name get setter {
-    return isSetter ? this : new PrivateName(text, library, isSetter: true);
+    return isSetter ? this : PrivateName(text, library, isSetter: true);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/elements/operators.dart b/pkg/compiler/lib/src/elements/operators.dart
index 182511b..56a3797 100644
--- a/pkg/compiler/lib/src/elements/operators.dart
+++ b/pkg/compiler/lib/src/elements/operators.dart
@@ -23,23 +23,23 @@
 
   bool get isUserDefinable => selectorName != null;
 
-  Selector get selector => new Selector(SelectorKind.OPERATOR,
-      new PublicName(selectorName), CallStructure.NO_ARGS);
+  Selector get selector => Selector(
+      SelectorKind.OPERATOR, PublicName(selectorName), CallStructure.NO_ARGS);
 
   @override
   String toString() => name;
 
   /// The unary ! operator.
   static const UnaryOperator NOT =
-      const UnaryOperator(UnaryOperatorKind.NOT, '!', null);
+      UnaryOperator(UnaryOperatorKind.NOT, '!', null);
 
   /// The unary - operator.
   static const UnaryOperator NEGATE =
-      const UnaryOperator(UnaryOperatorKind.NEGATE, '-', 'unary-');
+      UnaryOperator(UnaryOperatorKind.NEGATE, '-', 'unary-');
 
   /// The unary ~ operator.
   static const UnaryOperator COMPLEMENT =
-      const UnaryOperator(UnaryOperatorKind.COMPLEMENT, '~', '~');
+      UnaryOperator(UnaryOperatorKind.COMPLEMENT, '~', '~');
 
   static UnaryOperator parse(String value) {
     switch (value) {
@@ -109,90 +109,87 @@
 
   /// The == operator.
   static const BinaryOperator EQ =
-      const BinaryOperator._(BinaryOperatorKind.EQ, '==');
+      BinaryOperator._(BinaryOperatorKind.EQ, '==');
 
   /// The != operator.
-  static const BinaryOperator NOT_EQ = const _NotEqualsOperator();
+  static const BinaryOperator NOT_EQ = _NotEqualsOperator();
 
   /// The [] operator.
   static const BinaryOperator INDEX =
-      const BinaryOperator._(BinaryOperatorKind.INDEX, '[]');
+      BinaryOperator._(BinaryOperatorKind.INDEX, '[]');
 
   /// The binary + operator.
   static const BinaryOperator ADD =
-      const BinaryOperator._(BinaryOperatorKind.ADD, '+');
+      BinaryOperator._(BinaryOperatorKind.ADD, '+');
 
   /// The binary - operator.
   static const BinaryOperator SUB =
-      const BinaryOperator._(BinaryOperatorKind.SUB, '-');
+      BinaryOperator._(BinaryOperatorKind.SUB, '-');
 
   /// The binary * operator.
   static const BinaryOperator MUL =
-      const BinaryOperator._(BinaryOperatorKind.MUL, '*');
+      BinaryOperator._(BinaryOperatorKind.MUL, '*');
 
   /// The binary / operator.
   static const BinaryOperator DIV =
-      const BinaryOperator._(BinaryOperatorKind.DIV, '/');
+      BinaryOperator._(BinaryOperatorKind.DIV, '/');
 
   /// The binary ~/ operator.
   static const BinaryOperator IDIV =
-      const BinaryOperator._(BinaryOperatorKind.IDIV, '~/');
+      BinaryOperator._(BinaryOperatorKind.IDIV, '~/');
 
   /// The binary % operator.
   static const BinaryOperator MOD =
-      const BinaryOperator._(BinaryOperatorKind.MOD, '%');
+      BinaryOperator._(BinaryOperatorKind.MOD, '%');
 
   /// The binary << operator.
   static const BinaryOperator SHL =
-      const BinaryOperator._(BinaryOperatorKind.SHL, '<<');
+      BinaryOperator._(BinaryOperatorKind.SHL, '<<');
 
   /// The binary >> operator.
   static const BinaryOperator SHR =
-      const BinaryOperator._(BinaryOperatorKind.SHR, '>>');
+      BinaryOperator._(BinaryOperatorKind.SHR, '>>');
 
   /// The binary >>> operator.
   static const BinaryOperator SHRU =
-      const BinaryOperator._(BinaryOperatorKind.SHRU, '>>>');
+      BinaryOperator._(BinaryOperatorKind.SHRU, '>>>');
 
   /// The binary >= operator.
   static const BinaryOperator GTEQ =
-      const BinaryOperator._(BinaryOperatorKind.GTEQ, '>=');
+      BinaryOperator._(BinaryOperatorKind.GTEQ, '>=');
 
   /// The binary > operator.
-  static const BinaryOperator GT =
-      const BinaryOperator._(BinaryOperatorKind.GT, '>');
+  static const BinaryOperator GT = BinaryOperator._(BinaryOperatorKind.GT, '>');
 
   /// The binary <= operator.
   static const BinaryOperator LTEQ =
-      const BinaryOperator._(BinaryOperatorKind.LTEQ, '<=');
+      BinaryOperator._(BinaryOperatorKind.LTEQ, '<=');
 
   /// The binary < operator.
-  static const BinaryOperator LT =
-      const BinaryOperator._(BinaryOperatorKind.LT, '<');
+  static const BinaryOperator LT = BinaryOperator._(BinaryOperatorKind.LT, '<');
 
   /// The binary & operator.
   static const BinaryOperator AND =
-      const BinaryOperator._(BinaryOperatorKind.AND, '&');
+      BinaryOperator._(BinaryOperatorKind.AND, '&');
 
   /// The binary | operator.
-  static const BinaryOperator OR =
-      const BinaryOperator._(BinaryOperatorKind.OR, '|');
+  static const BinaryOperator OR = BinaryOperator._(BinaryOperatorKind.OR, '|');
 
   /// The binary ^ operator.
   static const BinaryOperator XOR =
-      const BinaryOperator._(BinaryOperatorKind.XOR, '^');
+      BinaryOperator._(BinaryOperatorKind.XOR, '^');
 
   /// The logical && operator.
   static const BinaryOperator LOGICAL_AND =
-      const _LogicalOperator(BinaryOperatorKind.LOGICAL_AND, '&&');
+      _LogicalOperator(BinaryOperatorKind.LOGICAL_AND, '&&');
 
   /// The binary | operator.
   static const BinaryOperator LOGICAL_OR =
-      const _LogicalOperator(BinaryOperatorKind.LOGICAL_OR, '||');
+      _LogicalOperator(BinaryOperatorKind.LOGICAL_OR, '||');
 
   /// The if-null ?? operator.
   static const BinaryOperator IF_NULL =
-      const _IfNullOperator(BinaryOperatorKind.IF_NULL, '??');
+      _IfNullOperator(BinaryOperatorKind.IF_NULL, '??');
 
   static BinaryOperator parse(String value) {
     switch (value) {
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index 7b34a8a..357a571 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -129,12 +129,12 @@
 ///
 /// This is used to compute the equivalence relation on types coinductively.
 class _Assumptions {
-  Map<FunctionTypeVariable, Set<FunctionTypeVariable>> _assumptionMap =
+  final Map<FunctionTypeVariable, Set<FunctionTypeVariable>> _assumptionMap =
       <FunctionTypeVariable, Set<FunctionTypeVariable>>{};
 
   void _addAssumption(FunctionTypeVariable a, FunctionTypeVariable b) {
     _assumptionMap
-        .putIfAbsent(a, () => new Set<FunctionTypeVariable>.identity())
+        .putIfAbsent(a, () => Set<FunctionTypeVariable>.identity())
         .add(b);
   }
 
@@ -185,7 +185,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('_Assumptions(');
     String comma = '';
     _assumptionMap
@@ -480,6 +480,9 @@
   }
 
   @override
+  int get hashCode => index * 113; // ignore bound which can have cycles.
+
+  @override
   bool _equals(DartType other, _Assumptions assumptions) {
     if (identical(this, other)) return true;
     if (other is! FunctionTypeVariable) return false;
@@ -1051,7 +1054,7 @@
   DartTypes get dartTypes;
 
   // The input type is a DAG and we must preserve the sharing.
-  Map<DartType, DartType> _map = Map.identity();
+  final Map<DartType, DartType> _map = Map.identity();
 
   DartType _mapped(DartType oldType, DartType newType) {
     assert(_map[oldType] == null);
@@ -1704,7 +1707,7 @@
 
   DartType nullableType(DartType baseType) {
     bool _isNullable(DartType t) =>
-        // Note that we can assume NNBD is enabled here.
+        // Note that we can assume null safety is enabled here.
         t.isNull ||
         t is NullableType ||
         t is LegacyType && _isNullable(t.baseType) ||
@@ -1882,13 +1885,14 @@
   /// If [assumeInstantiations], generic function types are assumed to be
   /// potentially instantiated.
   bool isPotentialSubtype(DartType s, DartType t,
-          {bool assumeInstantiations: true}) =>
+          {bool assumeInstantiations = true}) =>
       _subtypeHelper(s, t,
           allowPotentialSubtypes: true,
           assumeInstantiations: assumeInstantiations);
 
   bool _subtypeHelper(DartType s, DartType t,
-      {bool allowPotentialSubtypes: false, bool assumeInstantiations: false}) {
+      {bool allowPotentialSubtypes = false,
+      bool assumeInstantiations = false}) {
     assert(allowPotentialSubtypes || !assumeInstantiations);
 
     // TODO(fishythefish): Add constraint solving for potential subtypes.
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index c3c07e6..1de1c68 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -54,7 +54,7 @@
     _resolutionEnqueuerCreated = true;
     ResolutionEnqueuer enqueuer = compiler.frontendStrategy
         .createResolutionEnqueuer(this, compiler)
-          ..onEmptyForTesting = compiler.onResolutionQueueEmptyForTesting;
+      ..onEmptyForTesting = compiler.onResolutionQueueEmptyForTesting;
     if (retainDataForTesting) {
       resolutionEnqueuerForTesting = enqueuer;
     }
@@ -121,7 +121,7 @@
 abstract class EnqueuerListener {
   /// Called to instruct to the backend that [type] has been instantiated.
   void registerInstantiatedType(InterfaceType type,
-      {bool isGlobal: false, bool nativeUsage: false});
+      {bool isGlobal = false, bool nativeUsage = false});
 
   /// Called to notify to the backend that a class is being instantiated. Any
   /// backend specific [WorldImpact] of this is returned.
@@ -224,8 +224,7 @@
 
 /// [Enqueuer] which is specific to resolution.
 class ResolutionEnqueuer extends EnqueuerImpl {
-  static const ImpactUseCase IMPACT_USE =
-      const ImpactUseCase('ResolutionEnqueuer');
+  static const ImpactUseCase IMPACT_USE = ImpactUseCase('ResolutionEnqueuer');
 
   @override
   final CompilerTask task;
@@ -233,7 +232,7 @@
   @override
   final EnqueuerListener listener;
 
-  final Set<ClassEntity> _recentClasses = new Setlet<ClassEntity>();
+  final Set<ClassEntity> _recentClasses = Setlet<ClassEntity>();
   bool _recentConstants = false;
   final ResolutionEnqueuerWorldBuilder _worldBuilder;
   WorkItemBuilder _workItemBuilder;
@@ -245,7 +244,7 @@
 
   WorldImpactVisitor _impactVisitor;
 
-  final Queue<WorkItem> _queue = new Queue<WorkItem>();
+  final Queue<WorkItem> _queue = Queue<WorkItem>();
 
   // If not `null` this is called when the queue has been emptied. It allows for
   // applying additional impacts before re-emptying the queue.
@@ -254,7 +253,7 @@
   ResolutionEnqueuer(this.task, this._reporter, this.listener,
       this._worldBuilder, this._workItemBuilder, this._annotationsData,
       [this.name = 'resolution enqueuer']) {
-    _impactVisitor = new EnqueuerImplImpactVisitor(this);
+    _impactVisitor = EnqueuerImplImpactVisitor(this);
   }
 
   @override
@@ -282,8 +281,8 @@
 
   void _registerInstantiatedType(InterfaceType type,
       {ConstructorEntity constructor,
-      bool nativeUsage: false,
-      bool globalDependency: false}) {
+      bool nativeUsage = false,
+      bool globalDependency = false}) {
     task.measureSubtask('resolution.typeUse', () {
       _worldBuilder.registerTypeInstantiation(type, _applyClassUse,
           constructor: constructor);
diff --git a/pkg/compiler/lib/src/frontend_strategy.dart b/pkg/compiler/lib/src/frontend_strategy.dart
index 5fb4571..423a69b 100644
--- a/pkg/compiler/lib/src/frontend_strategy.dart
+++ b/pkg/compiler/lib/src/frontend_strategy.dart
@@ -11,6 +11,7 @@
 import 'deferred_load/deferred_load.dart' show DeferredLoadTask;
 import 'elements/entities.dart';
 import 'enqueue.dart';
+import 'ir/modular.dart';
 import 'js_backend/native_data.dart';
 import 'js_backend/no_such_method_registry.dart';
 import 'kernel/loader.dart';
@@ -22,6 +23,8 @@
   /// Registers a set of loaded libraries with this strategy.
   void registerLoadedLibraries(KernelResult result);
 
+  void registerModuleData(List<ModuleData> data);
+
   /// Returns the [ElementEnvironment] for the element model used in this
   /// strategy.
   ElementEnvironment get elementEnvironment;
diff --git a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
index 93a30d0..582d331 100644
--- a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
+++ b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
@@ -30,15 +30,15 @@
 
   /// A value of `Abstract.True` is used when the property is known _always_ to
   /// be true.
-  static const AbstractBool True = const AbstractBool._(true);
+  static const AbstractBool True = AbstractBool._(true);
 
   /// A value of `Abstract.False` is used when the property is known _never_ to
   /// be true.
-  static const AbstractBool False = const AbstractBool._(false);
+  static const AbstractBool False = AbstractBool._(false);
 
   /// A value of `Abstract.Maybe` is used when the property might or might not
   /// be true.
-  static const AbstractBool Maybe = const AbstractBool._(null);
+  static const AbstractBool Maybe = AbstractBool._(null);
 
   static AbstractBool trueOrMaybe(bool value) => value ? True : Maybe;
 
@@ -104,7 +104,11 @@
 
 /// A system that implements an abstraction over runtime values.
 abstract class AbstractValueDomain {
-  /// The [AbstractValue] that represents an unknown runtime value.
+  /// The [AbstractValue] that represents an unknown runtime value. This
+  /// includes values internal to the implementation, such as late sentinels.
+  AbstractValue get internalTopType;
+
+  /// The [AbstractValue] that represents an unknown runtime Dart value.
   AbstractValue get dynamicType;
 
   /// The [AbstractValue] that represents a non-null subtype of `Type` at
@@ -153,6 +157,9 @@
   /// The [AbstractValue] that represents the `null` at runtime.
   AbstractValue get nullType;
 
+  /// The [AbstractValue] that represents a late sentinel value at runtime.
+  AbstractValue get lateSentinelType;
+
   /// The [AbstractValue] that represents a non-null growable JavaScript array
   /// at runtime.
   AbstractValue get growableListType;
@@ -273,6 +280,14 @@
   /// Returns the version of the abstract [value] that includes `null`.
   AbstractValue includeNull(covariant AbstractValue value);
 
+  /// Returns the version of the abstract [value] that excludes the late
+  /// sentinel.
+  AbstractValue excludeLateSentinel(covariant AbstractValue value);
+
+  /// Returns the version of the abstract [value] that includes the late
+  /// sentinel.
+  AbstractValue includeLateSentinel(covariant AbstractValue value);
+
   /// Returns an [AbstractBool] that describes whether [value] contains
   /// instances of [cls] at runtime.
   AbstractBool containsType(covariant AbstractValue value, ClassEntity cls);
@@ -299,10 +314,6 @@
   /// exact class at runtime.
   AbstractBool isExact(covariant AbstractValue value);
 
-  /// Returns an [AbstractBool] that describes whether [value] is an exact class
-  /// or `null` at runtime.
-  AbstractBool isExactOrNull(covariant AbstractValue value);
-
   /// Returns the [ClassEntity] if this [value] is a non-null instance of an
   /// exact class at runtime, and `null` otherwise.
   ClassEntity getExactClass(covariant AbstractValue value);
@@ -311,6 +322,10 @@
   /// runtime.
   AbstractBool isNull(covariant AbstractValue value);
 
+  /// Returns an [AbstractBool] that describes whether [value] is a sentinel for
+  /// an uninitialized late variable at runtime.
+  AbstractBool isLateSentinel(covariant AbstractValue value);
+
   /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
   /// bool, number, string, array or `null` at runtime.
   AbstractBool isPrimitive(covariant AbstractValue value);
@@ -324,10 +339,6 @@
   AbstractBool isPrimitiveBoolean(covariant AbstractValue value);
 
   /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
-  /// array at runtime.
-  AbstractBool isPrimitiveArray(covariant AbstractValue value);
-
-  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
   /// string, array, native HTML list or `null` at runtime.
   AbstractBool isIndexablePrimitive(covariant AbstractValue value);
 
diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
index fe3d41c..12f0069 100644
--- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
+++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
@@ -105,7 +105,7 @@
   final Map<JumpTarget, List<LocalState>> _continuesFor =
       <JumpTarget, List<LocalState>>{};
   TypeInformation _returnType;
-  final Set<Local> _capturedVariables = new Set<Local>();
+  final Set<Local> _capturedVariables = Set<Local>();
   final Map<Local, FieldEntity> _capturedAndBoxed;
 
   final StaticTypeProvider _staticTypeProvider;
@@ -131,15 +131,15 @@
         this._sideEffectsBuilder = _analyzedMember is FunctionEntity
             ? _inferrer.inferredDataBuilder
                 .getSideEffectsBuilder(_analyzedMember)
-            : new SideEffectsBuilder.free(_analyzedMember),
+            : SideEffectsBuilder.free(_analyzedMember),
         this._inGenerativeConstructor = _analyzedNode is ir.Constructor,
         this._capturedAndBoxed = capturedAndBoxed != null
-            ? new Map<Local, FieldEntity>.from(capturedAndBoxed)
+            ? Map<Local, FieldEntity>.from(capturedAndBoxed)
             : <Local, FieldEntity>{} {
     if (_state != null) return;
 
-    _state = new LocalState.initial(
-        inGenerativeConstructor: _inGenerativeConstructor);
+    _state =
+        LocalState.initial(inGenerativeConstructor: _inGenerativeConstructor);
   }
 
   JsToElementMap get _elementMap => _closedWorld.elementMap;
@@ -253,7 +253,7 @@
     }
   }
 
-  TypeInformation visit(ir.Node node, {bool conditionContext: false}) {
+  TypeInformation visit(ir.Node node, {bool conditionContext = false}) {
     var oldAccumulateIsChecks = _accumulateIsChecks;
     _accumulateIsChecks = conditionContext;
     var result = node?.accept(this);
@@ -339,7 +339,7 @@
   visitSuperInitializer(ir.SuperInitializer node) {
     ConstructorEntity constructor = _elementMap.getConstructor(node.target);
     ArgumentsTypes arguments = analyzeArguments(node.arguments);
-    Selector selector = new Selector(SelectorKind.CALL, constructor.memberName,
+    Selector selector = Selector(SelectorKind.CALL, constructor.memberName,
         _elementMap.getCallStructure(node.arguments));
     handleConstructorInvoke(
         node, node.arguments, selector, constructor, arguments);
@@ -355,7 +355,7 @@
   visitRedirectingInitializer(ir.RedirectingInitializer node) {
     ConstructorEntity constructor = _elementMap.getConstructor(node.target);
     ArgumentsTypes arguments = analyzeArguments(node.arguments);
-    Selector selector = new Selector(SelectorKind.CALL, constructor.memberName,
+    Selector selector = Selector(SelectorKind.CALL, constructor.memberName,
         _elementMap.getCallStructure(node.arguments));
     handleConstructorInvoke(
         node, node.arguments, selector, constructor, arguments);
@@ -452,13 +452,13 @@
 
   @override
   TypeInformation defaultExpression(ir.Expression node) {
-    throw new UnimplementedError(
+    throw UnimplementedError(
         'Unhandled expression: ${node} (${node.runtimeType})');
   }
 
   @override
   defaultStatement(ir.Statement node) {
-    throw new UnimplementedError(
+    throw UnimplementedError(
         'Unhandled statement: ${node} (${node.runtimeType})');
   }
 
@@ -503,7 +503,7 @@
     handleCondition(node.condition);
     LocalState afterConditionWhenTrue = _stateAfterWhenTrue;
     LocalState afterConditionWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(afterConditionWhenFalse);
+    _state = LocalState.childPath(afterConditionWhenFalse);
     visit(node.message);
     LocalState stateAfterMessage = _state;
     stateAfterMessage.seenReturnOrThrow = true;
@@ -529,9 +529,9 @@
     // Do a deep-copy of the locals, because the code following the
     // break will change them.
     if (_localsMap.generateContinueForBreak(node)) {
-      _continuesFor[target].add(new LocalState.deepCopyOf(_state));
+      _continuesFor[target].add(LocalState.deepCopyOf(_state));
     } else {
-      _breaksFor[target].add(new LocalState.deepCopyOf(_state));
+      _breaksFor[target].add(LocalState.deepCopyOf(_state));
     }
     return null;
   }
@@ -579,7 +579,7 @@
         changed = false;
         for (ir.SwitchCase switchCase in node.cases) {
           LocalState stateBeforeCase = _state;
-          _state = new LocalState.childPath(stateBeforeCase);
+          _state = LocalState.childPath(stateBeforeCase);
           visit(switchCase);
           LocalState stateAfterCase = _state;
           changed =
@@ -599,7 +599,7 @@
         if (switchCase.isDefault) {
           hasDefaultCase = true;
         }
-        _state = new LocalState.childPath(stateBeforeCase);
+        _state = LocalState.childPath(stateBeforeCase);
         visit(switchCase);
         statesToMerge.add(_state);
       }
@@ -623,7 +623,7 @@
     _state.seenBreakOrContinue = true;
     // Do a deep-copy of the locals, because the code following the
     // break will change them.
-    _continuesFor[target].add(new LocalState.deepCopyOf(_state));
+    _continuesFor[target].add(LocalState.deepCopyOf(_state));
     return null;
   }
 
@@ -687,7 +687,7 @@
   @override
   TypeInformation visitMapLiteral(ir.MapLiteral node) {
     return createMapTypeInformation(
-        node, node.entries.map((e) => new Pair(visit(e.key), visit(e.value))),
+        node, node.entries.map((e) => Pair(visit(e.key), visit(e.value))),
         isConst: node.isConst);
   }
 
@@ -859,7 +859,7 @@
       named[argument.name] = visit(value);
     }
 
-    return new ArgumentsTypes(positional, named);
+    return ArgumentsTypes(positional, named);
   }
 
   AbstractValue _typeOfReceiver(ir.TreeNode node, ir.TreeNode receiver) {
@@ -1103,7 +1103,7 @@
       TypeInformation receiverType,
       TypeInformation rhsType,
       ir.VariableDeclaration variable) {
-    ArgumentsTypes arguments = new ArgumentsTypes([rhsType], null);
+    ArgumentsTypes arguments = ArgumentsTypes([rhsType], null);
     return _handleDynamic(CallType.access, node, selector, mask, receiverType,
         arguments, variable);
   }
@@ -1154,7 +1154,7 @@
 
       /// Synthesize a call to the [StreamIterator] constructor.
       iteratorType = handleStaticInvoke(
-          node, null, constructor, new ArgumentsTypes([expressionType], null));
+          node, null, constructor, ArgumentsTypes([expressionType], null));
     } else {
       TypeInformation expressionType = visit(node.iterable);
       Selector iteratorSelector = Selectors.iterator;
@@ -1163,18 +1163,18 @@
       moveNextMask = _memberData.typeOfIteratorMoveNext(node);
 
       iteratorType = handleDynamicInvoke(CallType.forIn, node, iteratorSelector,
-          iteratorMask, expressionType, new ArgumentsTypes.empty(), null);
+          iteratorMask, expressionType, ArgumentsTypes.empty(), null);
     }
 
     handleDynamicInvoke(CallType.forIn, node, Selectors.moveNext, moveNextMask,
-        iteratorType, new ArgumentsTypes.empty(), null);
+        iteratorType, ArgumentsTypes.empty(), null);
     TypeInformation currentType = handleDynamicInvoke(
         CallType.forIn,
         node,
         Selectors.current,
         currentMask,
         iteratorType,
-        new ArgumentsTypes.empty(),
+        ArgumentsTypes.empty(),
         null);
 
     Local variable = _localsMap.getLocalVariable(node.variable);
@@ -1226,7 +1226,7 @@
       // Setup (and clear in case of multiple iterations of the loop)
       // the lists of breaks and continues seen in the loop.
       _setupBreaksAndContinues(target);
-      _state = new LocalState.childPath(stateBefore);
+      _state = LocalState.childPath(stateBefore);
       logic();
       changed = stateBefore.mergeAll(_inferrer, _getLoopBackEdges(target));
     } while (changed);
@@ -1509,6 +1509,10 @@
       return _inferrer.typeOfNativeBehavior(nativeBehavior);
     } else if (name == Identifiers.JS_STRING_CONCAT) {
       return _types.stringType;
+    } else if (_closedWorld.commonElements.isCreateJsSentinel(function)) {
+      return _types.lateSentinelType;
+    } else if (_closedWorld.commonElements.isIsJsSentinel(function)) {
+      return _types.boolType;
     } else {
       _sideEffectsBuilder.setAllSideEffects();
       return _types.dynamicType;
@@ -1522,29 +1526,18 @@
     Selector selector = _elementMap.getSelector(node);
     if (_closedWorld.commonElements.isForeign(member)) {
       return handleForeignInvoke(node, member, arguments, selector);
-    } else if (!_options.useLegacySubtyping &&
-        _closedWorld.commonElements.isCreateSentinel(member)) {
-      // TODO(fishythefish): Support this for --no-sound-null-safety too.
-      // `T createSentinel<T>()` ostensibly returns a `T` based on its static
-      // type. However, we need to handle this specially for a couple of
-      // reasons:
-      // 1. We do not currently handle type arguments during type inference and
-      //    in the abstract value domain. Without additional tracing, this means
-      //    that we lose all call-site sensitivity and `createSentinel` is seen
-      //    as returning `Object?`, which widens the inferred types of late
-      //    fields, resulting in poor codegen.
-      // 2. The sentinel isn't a real Dart value and doesn't really inhabit any
-      //    Dart type. Nevertheless, we must view it as inhabiting every Dart
-      //    type for the signature of `createSentinel` to make sense, making it
-      //    a bottom value (similar to an expression of type `Never`).  This
-      //    matches the expectation that reading an uninitialized late field
-      //    (that is, one initialized with the sentinel value) throws.
-      // Note that this currently breaks if `--experiment-unreachable-throw` is
-      // used. We'll be able to do something more precise here when more of the
-      // lowering is deferred to SSA and the abstract value domain can better
-      // track sentinel values.
+    } else if (_closedWorld.commonElements.isLateReadCheck(member)) {
+      // `_lateReadCheck` is essentially a narrowing to exclude the sentinel
+      // value. In order to avoid poor inference resulting from a large
+      // fan-in/fan-out, we perform the narrowing directly instead of creating a
+      // [TypeInformation] for this member.
       handleStaticInvoke(node, selector, member, arguments);
-      return _types.nonNullEmptyType;
+      return _types.narrowType(arguments.positional[0],
+          _elementMap.getDartType(node.arguments.types.single),
+          excludeLateSentinel: true);
+    } else if (_closedWorld.commonElements.isCreateSentinel(member)) {
+      handleStaticInvoke(node, selector, member, arguments);
+      return _types.lateSentinelType;
     } else if (member.isConstructor) {
       return handleConstructorInvoke(
           node, node.arguments, selector, member, arguments);
@@ -1583,7 +1576,7 @@
       ir.Node node, ir.Member target) {
     MemberEntity member = _elementMap.getMember(target);
     return handleStaticInvoke(
-        node, new Selector.getter(member.memberName), member, null);
+        node, Selector.getter(member.memberName), member, null);
   }
 
   @override
@@ -1593,8 +1586,8 @@
       _state.markThisAsExposed();
     }
     MemberEntity member = _elementMap.getMember(node.target);
-    handleStaticInvoke(node, new Selector.setter(member.memberName), member,
-        new ArgumentsTypes([rhsType], null));
+    handleStaticInvoke(node, Selector.setter(member.memberName), member,
+        ArgumentsTypes([rhsType], null));
     return rhsType;
   }
 
@@ -1713,8 +1706,8 @@
     if (operand is ir.VariableGet) {
       Local local = _localsMap.getLocalVariable(operand.variable);
       DartType localType = _elementMap.getDartType(node.type);
-      LocalState stateAfterCheckWhenTrue = new LocalState.childPath(_state);
-      LocalState stateAfterCheckWhenFalse = new LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenTrue = LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenFalse = LocalState.childPath(_state);
 
       // Narrow variable to tested type on true branch.
       TypeInformation currentTypeInformation = stateAfterCheckWhenTrue
@@ -1731,8 +1724,8 @@
     if (receiver is ir.VariableGet) {
       Local local = _localsMap.getLocalVariable(receiver.variable);
       DartType localType = _localsMap.getLocalType(_elementMap, local);
-      LocalState stateAfterCheckWhenNull = new LocalState.childPath(_state);
-      LocalState stateAfterCheckWhenNotNull = new LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenNull = LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenNotNull = LocalState.childPath(_state);
 
       // Narrow tested variable to 'Null' on true branch.
       stateAfterCheckWhenNull.updateLocal(_inferrer, _capturedAndBoxed, local,
@@ -1760,10 +1753,10 @@
     handleCondition(node.condition);
     LocalState stateAfterConditionWhenTrue = _stateAfterWhenTrue;
     LocalState stateAfterConditionWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(stateAfterConditionWhenTrue);
+    _state = LocalState.childPath(stateAfterConditionWhenTrue);
     visit(node.then);
     LocalState stateAfterThen = _state;
-    _state = new LocalState.childPath(stateAfterConditionWhenFalse);
+    _state = LocalState.childPath(stateAfterConditionWhenFalse);
     visit(node.otherwise);
     LocalState stateAfterElse = _state;
     _state =
@@ -1794,16 +1787,16 @@
   TypeInformation visitLogicalExpression(ir.LogicalExpression node) {
     if (node.operatorEnum == ir.LogicalExpressionOperator.AND) {
       LocalState stateBefore = _state;
-      _state = new LocalState.childPath(stateBefore);
+      _state = LocalState.childPath(stateBefore);
       TypeInformation leftInfo = handleCondition(node.left);
       LocalState stateAfterLeftWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterLeftWhenFalse = _stateAfterWhenFalse;
-      _state = new LocalState.childPath(stateAfterLeftWhenTrue);
+      _state = LocalState.childPath(stateAfterLeftWhenTrue);
       TypeInformation rightInfo = handleCondition(node.right);
       LocalState stateAfterRightWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterRightWhenFalse = _stateAfterWhenFalse;
       LocalState stateAfterWhenTrue = stateAfterRightWhenTrue;
-      LocalState stateAfterWhenFalse = new LocalState.childPath(stateBefore)
+      LocalState stateAfterWhenFalse = LocalState.childPath(stateBefore)
           .mergeDiamondFlow(
               _inferrer, stateAfterLeftWhenFalse, stateAfterRightWhenFalse);
       LocalState after = stateBefore.mergeDiamondFlow(
@@ -1819,15 +1812,15 @@
       return _types.boolType;
     } else if (node.operatorEnum == ir.LogicalExpressionOperator.OR) {
       LocalState stateBefore = _state;
-      _state = new LocalState.childPath(stateBefore);
+      _state = LocalState.childPath(stateBefore);
       TypeInformation leftInfo = handleCondition(node.left);
       LocalState stateAfterLeftWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterLeftWhenFalse = _stateAfterWhenFalse;
-      _state = new LocalState.childPath(stateAfterLeftWhenFalse);
+      _state = LocalState.childPath(stateAfterLeftWhenFalse);
       TypeInformation rightInfo = handleCondition(node.right);
       LocalState stateAfterRightWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterRightWhenFalse = _stateAfterWhenFalse;
-      LocalState stateAfterWhenTrue = new LocalState.childPath(stateBefore)
+      LocalState stateAfterWhenTrue = LocalState.childPath(stateBefore)
           .mergeDiamondFlow(
               _inferrer, stateAfterLeftWhenTrue, stateAfterRightWhenTrue);
       LocalState stateAfterWhenFalse = stateAfterRightWhenFalse;
@@ -1854,10 +1847,10 @@
     handleCondition(node.condition);
     LocalState stateAfterWhenTrue = _stateAfterWhenTrue;
     LocalState stateAfterWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(stateAfterWhenTrue);
+    _state = LocalState.childPath(stateAfterWhenTrue);
     TypeInformation firstType = visit(node.then);
     LocalState stateAfterThen = _state;
-    _state = new LocalState.childPath(stateAfterWhenFalse);
+    _state = LocalState.childPath(stateAfterWhenFalse);
     TypeInformation secondType = visit(node.otherwise);
     LocalState stateAfterElse = _state;
     _state =
@@ -1910,8 +1903,8 @@
     // We don't put the closure in the work queue of the
     // inferrer, because it will share information with its enclosing
     // method, like for example the types of local variables.
-    LocalState closureState = new LocalState.closure(_state);
-    KernelTypeGraphBuilder visitor = new KernelTypeGraphBuilder(
+    LocalState closureState = LocalState.closure(_state);
+    KernelTypeGraphBuilder visitor = KernelTypeGraphBuilder(
         _options,
         _closedWorld,
         _inferrer,
@@ -1941,7 +1934,7 @@
   visitWhileStatement(ir.WhileStatement node) {
     return handleLoop(node, _localsMap.getJumpTargetForWhile(node), () {
       handleCondition(node.condition);
-      _state = new LocalState.childPath(_stateAfterWhenTrue);
+      _state = LocalState.childPath(_stateAfterWhenTrue);
       visit(node.body);
     });
   }
@@ -1966,7 +1959,7 @@
     }
     return handleLoop(node, _localsMap.getJumpTargetForFor(node), () {
       handleCondition(node.condition);
-      _state = new LocalState.childPath(_stateAfterWhenTrue);
+      _state = LocalState.childPath(_stateAfterWhenTrue);
       visit(node.body);
       for (ir.Expression update in node.updates) {
         visit(update);
@@ -1977,14 +1970,14 @@
   @override
   visitTryCatch(ir.TryCatch node) {
     LocalState stateBefore = _state;
-    _state = new LocalState.tryBlock(stateBefore, node);
+    _state = LocalState.tryBlock(stateBefore, node);
     _state.markInitializationAsIndefinite();
     visit(node.body);
     LocalState stateAfterBody = _state;
     _state = stateBefore.mergeFlow(_inferrer, stateAfterBody);
     for (ir.Catch catchBlock in node.catches) {
       LocalState stateBeforeCatch = _state;
-      _state = new LocalState.childPath(stateBeforeCatch);
+      _state = LocalState.childPath(stateBeforeCatch);
       visit(catchBlock);
       LocalState stateAfterCatch = _state;
       _state = stateBeforeCatch.mergeFlow(_inferrer, stateAfterCatch);
@@ -1995,7 +1988,7 @@
   @override
   visitTryFinally(ir.TryFinally node) {
     LocalState stateBefore = _state;
-    _state = new LocalState.tryBlock(stateBefore, node);
+    _state = LocalState.tryBlock(stateBefore, node);
     _state.markInitializationAsIndefinite();
     visit(node.body);
     LocalState stateAfterBody = _state;
@@ -2065,7 +2058,7 @@
     _state.markThisAsExposed();
 
     ir.Member target = getEffectiveSuperTarget(node.interfaceTarget);
-    Selector selector = new Selector.getter(_elementMap.getName(node.name));
+    Selector selector = Selector.getter(_elementMap.getName(node.name));
     if (target == null) {
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
@@ -2101,8 +2094,8 @@
 
     TypeInformation rhsType = visit(node.value);
     ir.Member target = getEffectiveSuperTarget(node.interfaceTarget);
-    Selector selector = new Selector.setter(_elementMap.getName(node.name));
-    ArgumentsTypes arguments = new ArgumentsTypes([rhsType], null);
+    Selector selector = Selector.setter(_elementMap.getName(node.name));
+    ArgumentsTypes arguments = ArgumentsTypes([rhsType], null);
     if (target == null) {
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
@@ -2183,7 +2176,7 @@
 
   @override
   TypeInformation visitConstantExpression(ir.ConstantExpression node) {
-    return new TypeInformationConstantVisitor(this, node)
+    return TypeInformationConstantVisitor(this, node)
         .visitConstant(node.constant);
   }
 }
@@ -2197,7 +2190,7 @@
 
   @override
   TypeInformation defaultConstant(ir.Constant node) {
-    throw new UnsupportedError("Unexpected constant: "
+    throw UnsupportedError("Unexpected constant: "
         "${node} (${node.runtimeType})");
   }
 
@@ -2234,24 +2227,23 @@
   @override
   TypeInformation visitMapConstant(ir.MapConstant node) {
     return builder.createMapTypeInformation(
-        new ConstantReference(expression, node),
+        ConstantReference(expression, node),
         node.entries
-            .map((e) => new Pair(visitConstant(e.key), visitConstant(e.value))),
+            .map((e) => Pair(visitConstant(e.key), visitConstant(e.value))),
         isConst: true);
   }
 
   @override
   TypeInformation visitListConstant(ir.ListConstant node) {
     return builder.createListTypeInformation(
-        new ConstantReference(expression, node),
+        ConstantReference(expression, node),
         node.entries.map((e) => visitConstant(e)),
         isConst: true);
   }
 
   @override
   TypeInformation visitSetConstant(ir.SetConstant node) {
-    return builder.createSetTypeInformation(
-        new ConstantReference(expression, node),
+    return builder.createSetTypeInformation(ConstantReference(expression, node),
         node.entries.map((e) => visitConstant(e)),
         isConst: true);
   }
@@ -2306,34 +2298,31 @@
   LocalsHandler _tryBlock;
 
   LocalState.initial({bool inGenerativeConstructor})
-      : this.internal(
-            new LocalsHandler(),
-            inGenerativeConstructor ? new FieldInitializationScope() : null,
-            null,
-            seenReturnOrThrow: false,
-            seenBreakOrContinue: false);
+      : this.internal(LocalsHandler(),
+            inGenerativeConstructor ? FieldInitializationScope() : null, null,
+            seenReturnOrThrow: false, seenBreakOrContinue: false);
 
   LocalState.childPath(LocalState other)
-      : this.internal(new LocalsHandler.from(other._locals),
-            new FieldInitializationScope.from(other._fields), other._tryBlock,
+      : this.internal(LocalsHandler.from(other._locals),
+            FieldInitializationScope.from(other._fields), other._tryBlock,
             seenReturnOrThrow: false, seenBreakOrContinue: false);
 
   LocalState.closure(LocalState other)
-      : this.internal(new LocalsHandler.from(other._locals),
-            new FieldInitializationScope.from(other._fields), null,
+      : this.internal(LocalsHandler.from(other._locals),
+            FieldInitializationScope.from(other._fields), null,
             seenReturnOrThrow: false, seenBreakOrContinue: false);
 
   factory LocalState.tryBlock(LocalState other, ir.TreeNode node) {
-    LocalsHandler locals = new LocalsHandler.tryBlock(other._locals, node);
+    LocalsHandler locals = LocalsHandler.tryBlock(other._locals, node);
     FieldInitializationScope fieldScope =
-        new FieldInitializationScope.from(other._fields);
+        FieldInitializationScope.from(other._fields);
     LocalsHandler tryBlock = locals;
-    return new LocalState.internal(locals, fieldScope, tryBlock,
+    return LocalState.internal(locals, fieldScope, tryBlock,
         seenReturnOrThrow: false, seenBreakOrContinue: false);
   }
 
   LocalState.deepCopyOf(LocalState other)
-      : _locals = new LocalsHandler.deepCopyOf(other._locals),
+      : _locals = LocalsHandler.deepCopyOf(other._locals),
         _tryBlock = other._tryBlock,
         _fields = other._fields;
 
@@ -2381,11 +2370,11 @@
       TypeInformation type,
       ir.Node node,
       DartType staticType,
-      {isCast: true,
-      excludeNull: false}) {
+      {isCast = true,
+      excludeNull = false}) {
     assert(type != null);
-    type = inferrer.types
-        .narrowType(type, staticType, isCast: isCast, excludeNull: excludeNull);
+    type = inferrer.types.narrowType(type, staticType,
+        isCast: isCast, excludeNull: excludeNull, excludeLateSentinel: true);
 
     FieldEntity field = capturedAndBoxed[local];
     if (field != null) {
@@ -2403,7 +2392,7 @@
       return this;
     }
     LocalsHandler locals = _locals.mergeFlow(inferrer, other._locals);
-    return new LocalState.internal(locals, _fields, _tryBlock,
+    return LocalState.internal(locals, _fields, _tryBlock,
         seenReturnOrThrow: seenReturnOrThrow,
         seenBreakOrContinue: seenBreakOrContinue);
   }
@@ -2429,13 +2418,13 @@
 
     FieldInitializationScope fieldScope = _fields?.mergeDiamondFlow(
         inferrer, thenBranch._fields, elseBranch._fields);
-    return new LocalState.internal(locals, fieldScope, _tryBlock,
+    return LocalState.internal(locals, fieldScope, _tryBlock,
         seenReturnOrThrow: seenReturnOrThrow,
         seenBreakOrContinue: seenBreakOrContinue);
   }
 
   LocalState mergeAfterBreaks(InferrerEngine inferrer, List<LocalState> states,
-      {bool keepOwnLocals: true}) {
+      {bool keepOwnLocals = true}) {
     bool allBranchesAbort = true;
     for (LocalState state in states) {
       allBranchesAbort = allBranchesAbort && state.seenReturnOrThrow;
@@ -2450,7 +2439,7 @@
             .map((LocalState state) => state._locals),
         keepOwnLocals: keepOwnLocals);
     seenReturnOrThrow = allBranchesAbort && !keepOwnLocals;
-    return new LocalState.internal(locals, _fields, _tryBlock,
+    return LocalState.internal(locals, _fields, _tryBlock,
         seenReturnOrThrow: seenReturnOrThrow,
         seenBreakOrContinue: seenBreakOrContinue);
   }
@@ -2473,7 +2462,7 @@
   }
 
   String toStructuredText(String indent) {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     _toStructuredText(sb, indent);
     return sb.toString();
   }
@@ -2487,7 +2476,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('LocalState(');
     sb.write('locals=$_locals');
     if (_fields != null) {
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index defc8a7..aff7306 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -47,16 +47,15 @@
 class InferrerEngine {
   /// A set of selector names that [List] implements, that we know return their
   /// element type.
-  final Set<Selector> returnsListElementTypeSet =
-      new Set<Selector>.from(<Selector>[
-    new Selector.getter(const PublicName('first')),
-    new Selector.getter(const PublicName('last')),
-    new Selector.getter(const PublicName('single')),
-    new Selector.call(const PublicName('singleWhere'), CallStructure.ONE_ARG),
-    new Selector.call(const PublicName('elementAt'), CallStructure.ONE_ARG),
-    new Selector.index(),
-    new Selector.call(const PublicName('removeAt'), CallStructure.ONE_ARG),
-    new Selector.call(const PublicName('removeLast'), CallStructure.NO_ARGS)
+  final Set<Selector> returnsListElementTypeSet = Set<Selector>.from(<Selector>[
+    Selector.getter(const PublicName('first')),
+    Selector.getter(const PublicName('last')),
+    Selector.getter(const PublicName('single')),
+    Selector.call(const PublicName('singleWhere'), CallStructure.ONE_ARG),
+    Selector.call(const PublicName('elementAt'), CallStructure.ONE_ARG),
+    Selector.index(),
+    Selector.call(const PublicName('removeAt'), CallStructure.ONE_ARG),
+    Selector.call(const PublicName('removeLast'), CallStructure.NO_ARGS)
   ]);
 
   /// The [JClosedWorld] on which inference reasoning is based.
@@ -91,12 +90,12 @@
   final CompilerOutput _compilerOutput;
 
   final Set<ConstructorEntity> _generativeConstructorsExposingThis =
-      new Set<ConstructorEntity>();
+      Set<ConstructorEntity>();
 
   /// Data computed internally within elements, like the type-mask of a send a
   /// list allocation, or a for-in loop.
   final Map<MemberEntity, GlobalTypeInferenceElementData> _memberData =
-      new Map<MemberEntity, GlobalTypeInferenceElementData>();
+      Map<MemberEntity, GlobalTypeInferenceElementData>();
 
   ElementEnvironment get _elementEnvironment => closedWorld.elementEnvironment;
 
@@ -117,8 +116,8 @@
       this.mainElement,
       this.globalLocalsMap,
       this.inferredDataBuilder)
-      : this.types = new TypeSystem(closedWorld,
-            new KernelTypeSystemStrategy(closedWorld, globalLocalsMap));
+      : this.types = TypeSystem(closedWorld,
+            KernelTypeSystemStrategy(closedWorld, globalLocalsMap));
 
   /// Applies [f] to all elements in the universe that match [selector] and
   /// [mask]. If [f] returns false, aborts the iteration.
@@ -132,7 +131,7 @@
 
   // TODO(johnniwinther): Make this private again.
   GlobalTypeInferenceElementData dataOfMember(MemberEntity element) =>
-      _memberData[element] ??= new KernelGlobalTypeInferenceElementData();
+      _memberData[element] ??= KernelGlobalTypeInferenceElementData();
 
   /// Update [sideEffects] with the side effects of [callee] being
   /// called with [selector].
@@ -254,7 +253,7 @@
     if (info.analyzed) return;
     info.analyzed = true;
 
-    ListTracerVisitor tracer = new ListTracerVisitor(info, this);
+    ListTracerVisitor tracer = ListTracerVisitor(info, this);
     bool succeeded = tracer.run();
     if (!succeeded) return;
 
@@ -274,7 +273,7 @@
     if (info.analyzed) return;
     info.analyzed = true;
 
-    SetTracerVisitor tracer = new SetTracerVisitor(info, this);
+    SetTracerVisitor tracer = SetTracerVisitor(info, this);
     bool succeeded = tracer.run();
     if (!succeeded) return;
 
@@ -290,7 +289,7 @@
   void analyzeMapAndEnqueue(MapTypeInformation info) {
     if (info.analyzed) return;
     info.analyzed = true;
-    MapTracerVisitor tracer = new MapTracerVisitor(info, this);
+    MapTracerVisitor tracer = MapTracerVisitor(info, this);
 
     bool succeeded = tracer.run();
     if (!succeeded) return;
@@ -319,7 +318,7 @@
   void _runOverAllElements() {
     metrics.analyze.measure(_analyzeAllElements);
     TypeGraphDump dump =
-        debug.PRINT_GRAPH ? new TypeGraphDump(_compilerOutput, this) : null;
+        debug.PRINT_GRAPH ? TypeGraphDump(_compilerOutput, this) : null;
 
     dump?.beforeAnalysis();
     _buildWorkQueue();
@@ -341,7 +340,7 @@
       analyzeMapAndEnqueue(info);
     });
 
-    Set<FunctionEntity> bailedOutOn = new Set<FunctionEntity>();
+    Set<FunctionEntity> bailedOutOn = Set<FunctionEntity>();
 
     // Trace closures to potentially infer argument types.
     types.allocatedClosures.forEach((dynamic info) {
@@ -384,7 +383,7 @@
 
       if (info is ClosureTypeInformation) {
         Iterable<FunctionEntity> elements = [info.closure];
-        trace(elements, new ClosureTracerVisitor(elements, info, this));
+        trace(elements, ClosureTracerVisitor(elements, info, this));
       } else if (info is CallSiteTypeInformation) {
         if (info is StaticCallSiteTypeInformation &&
             info.selector != null &&
@@ -398,18 +397,18 @@
           FunctionEntity callMethod = _lookupCallMethod(cls);
           assert(callMethod != null, failedAt(cls));
           Iterable<FunctionEntity> elements = [callMethod];
-          trace(elements, new ClosureTracerVisitor(elements, info, this));
+          trace(elements, ClosureTracerVisitor(elements, info, this));
         } else {
           // We only are interested in functions here, as other targets
           // of this closure call are not a root to trace but an intermediate
           // for some other function.
-          Iterable<FunctionEntity> elements = new List<FunctionEntity>.from(
+          Iterable<FunctionEntity> elements = List<FunctionEntity>.from(
               info.callees.where((e) => e.isFunction));
-          trace(elements, new ClosureTracerVisitor(elements, info, this));
+          trace(elements, ClosureTracerVisitor(elements, info, this));
         }
       } else if (info is MemberTypeInformation) {
         trace(<FunctionEntity>[info.member],
-            new StaticTearOffClosureTracerVisitor(info.member, info, this));
+            StaticTearOffClosureTracerVisitor(info.member, info, this));
       } else if (info is ParameterTypeInformation) {
         failedAt(
             NO_LOCATION_SPANNABLE, 'Unexpected closure allocation info $info');
@@ -421,7 +420,7 @@
     // Reset all nodes that use lists/maps that have been inferred, as well
     // as nodes that use elements fetched from these lists/maps. The
     // workset for a new run of the analysis will be these nodes.
-    Set<TypeInformation> seenTypes = new Set<TypeInformation>();
+    Set<TypeInformation> seenTypes = Set<TypeInformation>();
     while (!_workQueue.isEmpty) {
       TypeInformation info = _workQueue.remove();
       if (seenTypes.contains(info)) continue;
@@ -595,7 +594,7 @@
                 // of the type graph and do not drop any flow edges.
                 AbstractValue refinedType =
                     abstractValueDomain.computeAbstractValueForConstant(value);
-                type = new NarrowTypeInformation(
+                type = NarrowTypeInformation(
                     abstractValueDomain, type, refinedType);
                 types.allocatedTypes.add(type);
               }
@@ -630,7 +629,7 @@
   /// Visits [body] to compute the [TypeInformation] node for [member].
   TypeInformation _computeMemberTypeInformation(
       MemberEntity member, ir.Node body) {
-    KernelTypeGraphBuilder visitor = new KernelTypeGraphBuilder(
+    KernelTypeGraphBuilder visitor = KernelTypeGraphBuilder(
         _options,
         closedWorld,
         this,
@@ -753,7 +752,7 @@
   /// added to the work queue.
   void updateParameterInputs(TypeInformation caller, MemberEntity callee,
       ArgumentsTypes arguments, Selector selector,
-      {bool remove, bool addToQueue: true}) {
+      {bool remove, bool addToQueue = true}) {
     if (callee.name == Identifiers.noSuchMethod_) return;
     if (callee.isField) {
       if (selector.isSetter) {
@@ -855,7 +854,7 @@
   /// should be present and a default type for each parameter should exist.
   TypeInformation getDefaultTypeOfParameter(Local parameter) {
     return _defaultTypeOfParameter.putIfAbsent(parameter, () {
-      return new PlaceholderTypeInformation(
+      return PlaceholderTypeInformation(
           abstractValueDomain, types.currentMember);
     });
   }
@@ -927,7 +926,7 @@
       ArgumentsTypes arguments,
       SideEffectsBuilder sideEffectsBuilder,
       bool inLoop) {
-    CallSiteTypeInformation info = new StaticCallSiteTypeInformation(
+    CallSiteTypeInformation info = StaticCallSiteTypeInformation(
         abstractValueDomain,
         types.currentMember,
         node,
@@ -988,7 +987,7 @@
       _updateSideEffects(sideEffectsBuilder, selector, callee);
     });
 
-    CallSiteTypeInformation info = new DynamicCallSiteTypeInformation(
+    CallSiteTypeInformation info = DynamicCallSiteTypeInformation(
         abstractValueDomain,
         types.currentMember,
         callType,
@@ -1008,8 +1007,8 @@
   /// Registers a call to await with an expression of type [argumentType] as
   /// argument.
   TypeInformation registerAwait(ir.Node node, TypeInformation argument) {
-    AwaitTypeInformation info = new AwaitTypeInformation(
-        abstractValueDomain, types.currentMember, node);
+    AwaitTypeInformation info =
+        AwaitTypeInformation(abstractValueDomain, types.currentMember, node);
     info.addInput(argument);
     types.allocatedTypes.add(info);
     return info;
@@ -1018,8 +1017,8 @@
   /// Registers a call to yield with an expression of type [argumentType] as
   /// argument.
   TypeInformation registerYield(ir.Node node, TypeInformation argument) {
-    YieldTypeInformation info = new YieldTypeInformation(
-        abstractValueDomain, types.currentMember, node);
+    YieldTypeInformation info =
+        YieldTypeInformation(abstractValueDomain, types.currentMember, node);
     info.addInput(argument);
     types.allocatedTypes.add(info);
     return info;
@@ -1040,7 +1039,7 @@
       SideEffectsBuilder sideEffectsBuilder,
       {bool inLoop}) {
     sideEffectsBuilder.setAllSideEffectsAndDependsOnSomething();
-    CallSiteTypeInformation info = new ClosureCallSiteTypeInformation(
+    CallSiteTypeInformation info = ClosureCallSiteTypeInformation(
         abstractValueDomain,
         types.currentMember,
         node,
@@ -1110,9 +1109,7 @@
     } else if (selector.isGetter) {
       if (element.isFunction) {
         // [functionType] is null if the inferrer did not run.
-        return types.functionType == null
-            ? types.dynamicType
-            : types.functionType;
+        return types.functionType ?? types.dynamicType;
       } else if (element.isField) {
         return typeOfMember(element);
       } else if (element.isGetter) {
@@ -1131,7 +1128,7 @@
 
   /// Indirect calls share the same dynamic call site information node. This
   /// cache holds that shared dynamic call node for a given selector.
-  Map<Selector, DynamicCallSiteTypeInformation> _sharedCalls = {};
+  final Map<Selector, DynamicCallSiteTypeInformation> _sharedCalls = {};
 
   /// For a given selector, return a shared dynamic call site that will be used
   /// to combine the results of multiple dynamic calls in the program via
@@ -1149,21 +1146,21 @@
     if (info != null) return info;
 
     TypeInformation receiverType =
-        new IndirectParameterTypeInformation(abstractValueDomain, 'receiver');
+        IndirectParameterTypeInformation(abstractValueDomain, 'receiver');
     List<TypeInformation> positional = [];
     for (int i = 0; i < structure.positionalArgumentCount; i++) {
       positional
-          .add(new IndirectParameterTypeInformation(abstractValueDomain, '$i'));
+          .add(IndirectParameterTypeInformation(abstractValueDomain, '$i'));
     }
     Map<String, TypeInformation> named = {};
     if (structure.namedArgumentCount > 0) {
       for (var name in structure.namedArguments) {
         named[name] =
-            new IndirectParameterTypeInformation(abstractValueDomain, name);
+            IndirectParameterTypeInformation(abstractValueDomain, name);
       }
     }
 
-    info = _sharedCalls[selector] = new DynamicCallSiteTypeInformation(
+    info = _sharedCalls[selector] = DynamicCallSiteTypeInformation(
         abstractValueDomain,
         null,
         CallType.indirectAccess,
@@ -1295,18 +1292,13 @@
     MemberTypeInformation memberTypeInformation =
         types.getInferredTypeOfMember(member);
     if (isClosure) {
-      return new ParameterTypeInformation.localFunction(
+      return ParameterTypeInformation.localFunction(
           abstractValueDomain, memberTypeInformation, parameter, type, member);
     } else if (member.isInstanceMember) {
-      return new ParameterTypeInformation.instanceMember(
-          abstractValueDomain,
-          memberTypeInformation,
-          parameter,
-          type,
-          member,
-          new ParameterInputs());
+      return ParameterTypeInformation.instanceMember(abstractValueDomain,
+          memberTypeInformation, parameter, type, member, ParameterInputs());
     } else {
-      return new ParameterTypeInformation.static(
+      return ParameterTypeInformation.static(
           abstractValueDomain, memberTypeInformation, parameter, type, member);
     }
   }
@@ -1317,26 +1309,26 @@
     if (member.isField) {
       FieldEntity field = member;
       DartType type = _elementEnvironment.getFieldType(field);
-      return new FieldTypeInformation(abstractValueDomain, field, type);
+      return FieldTypeInformation(abstractValueDomain, field, type);
     } else if (member.isGetter) {
       FunctionEntity getter = member;
       DartType type = _elementEnvironment.getFunctionType(getter);
-      return new GetterTypeInformation(abstractValueDomain, getter, type);
+      return GetterTypeInformation(abstractValueDomain, getter, type);
     } else if (member.isSetter) {
       FunctionEntity setter = member;
-      return new SetterTypeInformation(abstractValueDomain, setter);
+      return SetterTypeInformation(abstractValueDomain, setter);
     } else if (member.isFunction) {
       FunctionEntity method = member;
       DartType type = _elementEnvironment.getFunctionType(method);
-      return new MethodTypeInformation(abstractValueDomain, method, type);
+      return MethodTypeInformation(abstractValueDomain, method, type);
     } else {
       ConstructorEntity constructor = member;
       if (constructor.isFactoryConstructor) {
         DartType type = _elementEnvironment.getFunctionType(constructor);
-        return new FactoryConstructorTypeInformation(
+        return FactoryConstructorTypeInformation(
             abstractValueDomain, constructor, type);
       } else {
-        return new GenerativeConstructorTypeInformation(
+        return GenerativeConstructorTypeInformation(
             abstractValueDomain, constructor);
       }
     }
@@ -1383,7 +1375,7 @@
               () => abstractValueDomain.readAbstractValueFromDataSource(source),
               emptyAsNull: true);
       source.end(tag);
-      return new KernelGlobalTypeInferenceElementData.internal(
+      return KernelGlobalTypeInferenceElementData.internal(
           sendMap, iteratorMap, currentMap, moveNextMap);
     });
   }
diff --git a/pkg/compiler/lib/src/inferrer/list_tracer.dart b/pkg/compiler/lib/src/inferrer/list_tracer.dart
index 17bb7ed..4918a33 100644
--- a/pkg/compiler/lib/src/inferrer/list_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/list_tracer.dart
@@ -15,7 +15,7 @@
 /// A set of selector names that [List] implements, that we know do not
 /// change the element type of the list, or let the list escape to code
 /// that might change the element type.
-Set<String> okListSelectorsSet = new Set<String>.from(const <String>[
+Set<String> okListSelectorsSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
@@ -75,7 +75,7 @@
   'checkGrowable',
 ]);
 
-Set<String> doNotChangeLengthSelectorsSet = new Set<String>.from(const <String>[
+Set<String> doNotChangeLengthSelectorsSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
@@ -131,7 +131,7 @@
 
 class ListTracerVisitor extends TracerVisitor {
   // The [Set] of found assignments to the list.
-  Set<TypeInformation> inputs = new Setlet<TypeInformation>();
+  Set<TypeInformation> inputs = Setlet<TypeInformation>();
   bool callsGrowableMethod = false;
 
   ListTracerVisitor(tracedType, inferrer) : super(tracedType, inferrer);
diff --git a/pkg/compiler/lib/src/inferrer/locals_handler.dart b/pkg/compiler/lib/src/inferrer/locals_handler.dart
index 49ee715..ed565ca 100644
--- a/pkg/compiler/lib/src/inferrer/locals_handler.dart
+++ b/pkg/compiler/lib/src/inferrer/locals_handler.dart
@@ -51,13 +51,13 @@
   VariableScope.deepCopyOf(VariableScope other)
       : variables = other.variables == null
             ? null
-            : new Map<Local, TypeInformation>.from(other.variables),
+            : Map<Local, TypeInformation>.from(other.variables),
         tryBlock = other.tryBlock,
         copyOf = other.copyOf ?? other,
         _level = other._level,
         parent = other.parent == null
             ? null
-            : new VariableScope.deepCopyOf(other.parent);
+            : VariableScope.deepCopyOf(other.parent);
 
   /// `true` if this scope is for a try block.
   bool get isTry => tryBlock != null;
@@ -94,7 +94,7 @@
   void operator []=(Local variable, TypeInformation mask) {
     assert(mask != null);
     if (variables == null) {
-      variables = new Map<Local, TypeInformation>();
+      variables = Map<Local, TypeInformation>();
     }
     variables[variable] = mask;
   }
@@ -103,7 +103,7 @@
   /// [scope]. [f] is called at most once for each variable.
   void forEachLocalUntilScope(
       VariableScope scope, void f(Local variable, TypeInformation type)) {
-    _forEachLocalUntilScope(scope, f, new Setlet<Local>(), this);
+    _forEachLocalUntilScope(scope, f, Setlet<Local>(), this);
   }
 
   void _forEachLocalUntilScope(
@@ -142,7 +142,7 @@
   }
 
   String toStructuredText(String indent) {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     _toStructuredText(sb, indent);
     return sb.toString();
   }
@@ -196,13 +196,13 @@
 
   factory FieldInitializationScope.from(FieldInitializationScope other) {
     if (other == null) return null;
-    return new FieldInitializationScope.internalFrom(other);
+    return FieldInitializationScope.internalFrom(other);
   }
 
   void updateField(FieldEntity field, TypeInformation type) {
     if (isThisExposed) return;
     if (isIndefinite) return;
-    fields ??= new Map<FieldEntity, TypeInformation>();
+    fields ??= Map<FieldEntity, TypeInformation>();
     fields[field] = type;
   }
 
@@ -259,7 +259,7 @@
   int get length => positional.length + named.length;
 
   @override
-  Iterator<TypeInformation> get iterator => new ArgumentsTypesIterator(this);
+  Iterator<TypeInformation> get iterator => ArgumentsTypesIterator(this);
 
   @override
   String toString() => "{ positional = $positional, named = $named }";
@@ -279,7 +279,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('ArgumentsTypes.hashCode');
+  int get hashCode => throw UnsupportedError('ArgumentsTypes.hashCode');
 
   bool hasNoArguments() => positional.isEmpty && named.isEmpty;
 
@@ -329,16 +329,16 @@
 class LocalsHandler {
   final VariableScope _locals;
 
-  LocalsHandler() : _locals = new VariableScope();
+  LocalsHandler() : _locals = VariableScope();
 
   LocalsHandler.from(LocalsHandler other)
-      : _locals = new VariableScope(parent: other._locals);
+      : _locals = VariableScope(parent: other._locals);
 
   LocalsHandler.tryBlock(LocalsHandler other, ir.TreeNode block)
-      : _locals = new VariableScope.tryBlock(block, parent: other._locals);
+      : _locals = VariableScope.tryBlock(block, parent: other._locals);
 
   LocalsHandler.deepCopyOf(LocalsHandler other)
-      : _locals = new VariableScope.deepCopyOf(other._locals);
+      : _locals = VariableScope.deepCopyOf(other._locals);
 
   TypeInformation use(InferrerEngine inferrer, Local local) {
     return _locals[local];
@@ -376,7 +376,7 @@
   /// replaced by the variables types in [other]. Otherwise the variable types
   /// from both are merged with a phi type.
   LocalsHandler mergeFlow(InferrerEngine inferrer, LocalsHandler other,
-      {bool inPlace: false}) {
+      {bool inPlace = false}) {
     VariableScope common = _locals.commonParent(other._locals);
     assert(
         common != null,
@@ -475,15 +475,15 @@
   /// labeled statement that do not break out.
   LocalsHandler mergeAfterBreaks(
       InferrerEngine inferrer, Iterable<LocalsHandler> handlers,
-      {bool keepOwnLocals: true}) {
+      {bool keepOwnLocals = true}) {
     ir.Node tryBlock = _locals.tryBlock;
     // Use a separate locals handler to perform the merge in, so that Phi
     // creation does not invalidate previous type knowledge while we might
     // still look it up.
     VariableScope merged = tryBlock != null
-        ? new VariableScope.tryBlock(tryBlock, parent: _locals)
-        : new VariableScope(parent: _locals);
-    Set<Local> seenLocals = new Setlet<Local>();
+        ? VariableScope.tryBlock(tryBlock, parent: _locals)
+        : VariableScope(parent: _locals);
+    Set<Local> seenLocals = Setlet<Local>();
     // Merge all other handlers.
     for (LocalsHandler handler in handlers) {
       VariableScope common = _locals.commonParent(handler._locals);
@@ -587,7 +587,7 @@
   }
 
   String toStructuredText(String indent) {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     _toStructuredText(sb, indent);
     return sb.toString();
   }
@@ -601,7 +601,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('LocalsHandler(');
     sb.write('locals=$_locals');
     sb.write(')');
diff --git a/pkg/compiler/lib/src/inferrer/map_tracer.dart b/pkg/compiler/lib/src/inferrer/map_tracer.dart
index 3f29c0c..70f36d1 100644
--- a/pkg/compiler/lib/src/inferrer/map_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/map_tracer.dart
@@ -10,7 +10,7 @@
 import 'node_tracer.dart';
 import 'type_graph_nodes.dart';
 
-Set<String> okMapSelectorsSet = new Set.from(const <String>[
+Set<String> okMapSelectorsSet = Set.from(const <String>[
   // From Object.
   "==",
   "hashCode",
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index 4d4a4bd..8500f56 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -14,7 +14,7 @@
 
 // A set of selectors we know do not escape the elements inside the
 // list.
-Set<String> doesNotEscapeListSet = new Set<String>.from(const <String>[
+Set<String> doesNotEscapeListSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
@@ -51,7 +51,7 @@
   'checkGrowable',
 ]);
 
-Set<String> doesNotEscapeSetSet = new Set<String>.from(const <String>[
+Set<String> doesNotEscapeSetSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
@@ -76,7 +76,7 @@
   'retainAll',
 ]);
 
-Set<String> doesNotEscapeMapSet = new Set<String>.from(const <String>[
+Set<String> doesNotEscapeMapSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
@@ -101,8 +101,8 @@
   final InferrerEngine inferrer;
 
   static const int MAX_ANALYSIS_COUNT =
-      const int.fromEnvironment('dart2js.tracing.limit', defaultValue: 32);
-  final Setlet<MemberEntity> analyzedElements = new Setlet<MemberEntity>();
+      int.fromEnvironment('dart2js.tracing.limit', defaultValue: 32);
+  final Setlet<MemberEntity> analyzedElements = Setlet<MemberEntity>();
 
   TracerVisitor(this.tracedType, this.inferrer);
 
@@ -125,7 +125,7 @@
   /// maps and we must check how it escapes from these maps.
   final List<MapTypeInformation> mapsToAnalyze = <MapTypeInformation>[];
 
-  final Setlet<TypeInformation> flowsInto = new Setlet<TypeInformation>();
+  final Setlet<TypeInformation> flowsInto = Setlet<TypeInformation>();
 
   // The current [TypeInformation] in the analysis.
   TypeInformation currentUser;
diff --git a/pkg/compiler/lib/src/inferrer/powersets/powerset_bits.dart b/pkg/compiler/lib/src/inferrer/powersets/powerset_bits.dart
index 22a900b..9557395 100644
--- a/pkg/compiler/lib/src/inferrer/powersets/powerset_bits.dart
+++ b/pkg/compiler/lib/src/inferrer/powersets/powerset_bits.dart
@@ -203,6 +203,8 @@
 
     // TODO(coam): We could be more precise if we implement a visitor to
     // ConstantValue
+    // TODO(fishythefish): Naively calling `getType` on
+    // [LateSentinelConstantValue] will produce Never.
     return createFromStaticType(value.getType(commonElements), nullable: false);
   }
 
@@ -281,8 +283,6 @@
 
   AbstractBool isIndexablePrimitive(int value) => isOther(value);
 
-  AbstractBool isPrimitiveArray(int value) => isOther(value);
-
   AbstractBool isPrimitiveBoolean(int value) {
     if (isDefinitelyTrue(value) || isDefinitelyFalse(value)) {
       return AbstractBool.True;
@@ -300,7 +300,8 @@
       ? AbstractBool.True
       : (isPotentiallyNull(value) ? AbstractBool.Maybe : AbstractBool.False);
 
-  AbstractBool isExactOrNull(int value) => AbstractBool.Maybe;
+  // TODO(fishythefish): Support tracking late sentinels in the powerset domain.
+  AbstractBool isLateSentinel(int value) => AbstractBool.Maybe;
 
   AbstractBool isExact(int value) => AbstractBool.Maybe;
 
@@ -333,6 +334,12 @@
     return value & ~nullValue;
   }
 
+  // TODO(fishythefish): Support tracking late sentinels in the powerset domain.
+  int includeLateSentinel(int value) => value;
+
+  // TODO(fishythefish): Support tracking late sentinels in the powerset domain.
+  int excludeLateSentinel(int value) => value;
+
   AbstractBool couldBeTypedArray(int value) => isOther(value);
 
   AbstractBool isTypedArray(int value) => AbstractBool.Maybe;
@@ -555,6 +562,8 @@
     return finish(dynamicType, false);
   }
 
+  int get internalTopType => powersetTop;
+
   int get dynamicType => powersetTop;
 
   int get asyncStarStreamType => powersetTop;
@@ -591,6 +600,9 @@
 
   int get nonNullType => powersetTop & ~nullValue;
 
+  // TODO(fishythefish): Support tracking late sentinels in the powerset domain.
+  int get lateSentinelType => powersetBottom;
+
   int _mapType;
   int get mapType =>
       _mapType ??= createNonNullSubtype(commonElements.mapLiteralClass);
diff --git a/pkg/compiler/lib/src/inferrer/powersets/powersets.dart b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
index fedb435..b4f6789 100644
--- a/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
+++ b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
@@ -45,7 +45,7 @@
 }
 
 AbstractValue unwrapOrNull(PowersetValue powerset) {
-  return powerset == null ? null : powerset._abstractValue;
+  return powerset?._abstractValue;
 }
 
 PowersetValue wrapOrNull(AbstractValue abstractValue, int powersetBits) {
@@ -63,10 +63,13 @@
   PowersetBitsDomain get powersetBitsDomain => _powersetBitsDomain;
 
   @override
-  AbstractValue get dynamicType {
-    AbstractValue abstractValue = _abstractValueDomain.dynamicType;
-    return PowersetValue(abstractValue, _powersetBitsDomain.powersetTop);
-  }
+  AbstractValue get internalTopType => PowersetValue(
+      _abstractValueDomain.internalTopType,
+      _powersetBitsDomain.internalTopType);
+
+  @override
+  AbstractValue get dynamicType => PowersetValue(
+      _abstractValueDomain.dynamicType, _powersetBitsDomain.dynamicType);
 
   //TODO(coam)
   @override
@@ -528,12 +531,6 @@
           _abstractValueDomain.isIndexablePrimitive(value._abstractValue));
 
   @override
-  AbstractBool isPrimitiveArray(covariant PowersetValue value) =>
-      AbstractBool.strengthen(
-          _powersetBitsDomain.isPrimitiveArray(value._powersetBits),
-          _abstractValueDomain.isPrimitiveArray(value._abstractValue));
-
-  @override
   AbstractBool isPrimitiveBoolean(covariant PowersetValue value) =>
       AbstractBool.strengthen(
           _powersetBitsDomain.isPrimitiveBoolean(value._powersetBits),
@@ -557,14 +554,14 @@
       _abstractValueDomain.isNull(value._abstractValue));
 
   @override
-  ClassEntity getExactClass(covariant PowersetValue value) =>
-      _abstractValueDomain.getExactClass(value._abstractValue);
+  AbstractBool isLateSentinel(covariant PowersetValue value) =>
+      AbstractBool.strengthen(
+          _powersetBitsDomain.isLateSentinel(value._powersetBits),
+          _abstractValueDomain.isLateSentinel(value._abstractValue));
 
   @override
-  AbstractBool isExactOrNull(covariant PowersetValue value) =>
-      AbstractBool.strengthen(
-          _powersetBitsDomain.isExactOrNull(value._powersetBits),
-          _abstractValueDomain.isExactOrNull(value._abstractValue));
+  ClassEntity getExactClass(covariant PowersetValue value) =>
+      _abstractValueDomain.getExactClass(value._abstractValue);
 
   @override
   AbstractBool isExact(covariant PowersetValue value) =>
@@ -619,6 +616,24 @@
   }
 
   @override
+  AbstractValue includeLateSentinel(covariant PowersetValue value) {
+    int powersetBits =
+        _powersetBitsDomain.includeLateSentinel(value._powersetBits);
+    AbstractValue abstractValue =
+        _abstractValueDomain.includeLateSentinel(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue excludeLateSentinel(covariant PowersetValue value) {
+    int powersetBits =
+        _powersetBitsDomain.excludeLateSentinel(value._powersetBits);
+    AbstractValue abstractValue =
+        _abstractValueDomain.excludeLateSentinel(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
   AbstractBool couldBeTypedArray(covariant PowersetValue value) =>
       AbstractBool.strengthen(
           _powersetBitsDomain.couldBeTypedArray(value._powersetBits),
@@ -747,6 +762,11 @@
       _abstractValueDomain.nonNullType, _powersetBitsDomain.nonNullType);
 
   @override
+  AbstractValue get lateSentinelType => PowersetValue(
+      _abstractValueDomain.lateSentinelType,
+      _powersetBitsDomain.lateSentinelType);
+
+  @override
   AbstractValue get mapType =>
       PowersetValue(_abstractValueDomain.mapType, _powersetBitsDomain.mapType);
 
diff --git a/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart b/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart
index d60a060..7e21d25 100644
--- a/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart
+++ b/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart
@@ -37,7 +37,7 @@
 }
 
 AbstractValue unwrapOrNull(WrappedAbstractValue wrapped) {
-  return wrapped == null ? null : wrapped._abstractValue;
+  return wrapped?._abstractValue;
 }
 
 WrappedAbstractValue wrapOrNull(AbstractValue abstractValue) {
@@ -49,6 +49,10 @@
   const WrappedAbstractValueDomain(this._abstractValueDomain);
 
   @override
+  AbstractValue get internalTopType =>
+      WrappedAbstractValue(_abstractValueDomain.internalTopType);
+
+  @override
   AbstractValue get dynamicType =>
       WrappedAbstractValue(_abstractValueDomain.dynamicType);
 
@@ -383,10 +387,6 @@
       _abstractValueDomain.isIndexablePrimitive(value._abstractValue);
 
   @override
-  AbstractBool isPrimitiveArray(covariant WrappedAbstractValue value) =>
-      _abstractValueDomain.isPrimitiveArray(value._abstractValue);
-
-  @override
   AbstractBool isPrimitiveBoolean(covariant WrappedAbstractValue value) =>
       _abstractValueDomain.isPrimitiveBoolean(value._abstractValue);
 
@@ -403,12 +403,12 @@
       _abstractValueDomain.isNull(value._abstractValue);
 
   @override
-  ClassEntity getExactClass(covariant WrappedAbstractValue value) =>
-      _abstractValueDomain.getExactClass(value._abstractValue);
+  AbstractBool isLateSentinel(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isLateSentinel(value._abstractValue);
 
   @override
-  AbstractBool isExactOrNull(covariant WrappedAbstractValue value) =>
-      _abstractValueDomain.isExactOrNull(value._abstractValue);
+  ClassEntity getExactClass(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getExactClass(value._abstractValue);
 
   @override
   AbstractBool isExact(covariant WrappedAbstractValue value) =>
@@ -449,6 +449,16 @@
           _abstractValueDomain.excludeNull(value._abstractValue));
 
   @override
+  AbstractValue includeLateSentinel(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.includeLateSentinel(value._abstractValue));
+
+  @override
+  AbstractValue excludeLateSentinel(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.excludeLateSentinel(value._abstractValue));
+
+  @override
   AbstractBool couldBeTypedArray(covariant WrappedAbstractValue value) =>
       _abstractValueDomain.couldBeTypedArray(value._abstractValue);
 
@@ -546,6 +556,10 @@
       WrappedAbstractValue(_abstractValueDomain.nonNullType);
 
   @override
+  AbstractValue get lateSentinelType =>
+      WrappedAbstractValue(_abstractValueDomain.lateSentinelType);
+
+  @override
   AbstractValue get mapType =>
       WrappedAbstractValue(_abstractValueDomain.mapType);
 
diff --git a/pkg/compiler/lib/src/inferrer/set_tracer.dart b/pkg/compiler/lib/src/inferrer/set_tracer.dart
index 8a98719..df495bf 100644
--- a/pkg/compiler/lib/src/inferrer/set_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/set_tracer.dart
@@ -13,7 +13,7 @@
 /// A set of selector names that [Set] implements and which we know do not
 /// change the element type of the set or let the set escape to code that might
 /// change the element type.
-Set<String> okSetSelectorSet = new Set<String>.from(const <String>[
+Set<String> okSetSelectorSet = Set<String>.from(const <String>[
   // From Object.
   '==',
   'hashCode',
diff --git a/pkg/compiler/lib/src/inferrer/trivial.dart b/pkg/compiler/lib/src/inferrer/trivial.dart
index 27e4f12b..6ba231b 100644
--- a/pkg/compiler/lib/src/inferrer/trivial.dart
+++ b/pkg/compiler/lib/src/inferrer/trivial.dart
@@ -25,6 +25,9 @@
   const TrivialAbstractValueDomain();
 
   @override
+  AbstractValue get internalTopType => const TrivialAbstractValue();
+
+  @override
   AbstractValue get dynamicType => const TrivialAbstractValue();
 
   @override
@@ -98,14 +101,13 @@
 
   @override
   AbstractValue getDictionaryValueForKey(AbstractValue value, String key) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "TrivialAbstractValueDomain.getDictionaryValueForKey");
   }
 
   @override
   bool containsDictionaryKey(AbstractValue value, String key) {
-    throw new UnsupportedError(
-        "TrivialAbstractValueDomain.containsDictionaryKey");
+    throw UnsupportedError("TrivialAbstractValueDomain.containsDictionaryKey");
   }
 
   @override
@@ -123,12 +125,12 @@
 
   @override
   AbstractValue getMapValueType(AbstractValue value) {
-    throw new UnsupportedError("TrivialAbstractValueDomain.getMapValueType");
+    throw UnsupportedError("TrivialAbstractValueDomain.getMapValueType");
   }
 
   @override
   AbstractValue getMapKeyType(AbstractValue value) {
-    throw new UnsupportedError("TrivialAbstractValueDomain.getMapKeyType");
+    throw UnsupportedError("TrivialAbstractValueDomain.getMapKeyType");
   }
 
   @override
@@ -145,7 +147,7 @@
 
   @override
   AbstractValue getSetElementType(AbstractValue value) {
-    throw new UnsupportedError("TrivialAbstractValueDomain.getSetElementType");
+    throw UnsupportedError("TrivialAbstractValueDomain.getSetElementType");
   }
 
   @override
@@ -164,7 +166,7 @@
 
   @override
   AbstractValue getContainerElementType(AbstractValue value) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "TrivialAbstractValueDomain.getContainerElementType");
   }
 
@@ -275,9 +277,6 @@
   AbstractBool isIndexablePrimitive(AbstractValue value) => AbstractBool.Maybe;
 
   @override
-  AbstractBool isPrimitiveArray(AbstractValue value) => AbstractBool.Maybe;
-
-  @override
   AbstractBool isPrimitiveBoolean(AbstractValue value) => AbstractBool.Maybe;
 
   @override
@@ -290,10 +289,10 @@
   AbstractBool isNull(AbstractValue value) => AbstractBool.Maybe;
 
   @override
-  ClassEntity getExactClass(AbstractValue value) => null;
+  AbstractBool isLateSentinel(AbstractValue value) => AbstractBool.Maybe;
 
   @override
-  AbstractBool isExactOrNull(AbstractValue value) => AbstractBool.Maybe;
+  ClassEntity getExactClass(AbstractValue value) => null;
 
   @override
   AbstractBool isExact(AbstractValue value) => AbstractBool.Maybe;
@@ -326,6 +325,14 @@
       const TrivialAbstractValue();
 
   @override
+  AbstractValue includeLateSentinel(AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue excludeLateSentinel(AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
   AbstractBool couldBeTypedArray(AbstractValue value) => AbstractBool.Maybe;
 
   @override
@@ -355,8 +362,7 @@
   AbstractValueWithPrecision createFromStaticType(DartType type,
       {ClassRelation classRelation = ClassRelation.subtype, bool nullable}) {
     assert(nullable != null);
-    return const AbstractValueWithPrecision(
-        const TrivialAbstractValue(), false);
+    return const AbstractValueWithPrecision(TrivialAbstractValue(), false);
   }
 
   @override
@@ -405,6 +411,9 @@
   AbstractValue get nonNullType => const TrivialAbstractValue();
 
   @override
+  AbstractValue get lateSentinelType => const TrivialAbstractValue();
+
+  @override
   AbstractValue get mapType => const TrivialAbstractValue();
 
   @override
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
index ac9c901..ff82843 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
@@ -36,7 +36,7 @@
       <TypeInformation, Set<TypeInformation>>{};
   final Map<TypeInformation, Set<TypeInformation>> assignmentsBeforeTracing =
       <TypeInformation, Set<TypeInformation>>{};
-  final Set<String> usedFilenames = new Set<String>();
+  final Set<String> usedFilenames = Set<String>();
 
   TypeGraphDump(this.compilerOutput, this.inferrer);
 
@@ -80,7 +80,7 @@
         String name = filenameFromElement(element);
         output = compilerOutput.createOutputSink(
             '$outputDir/$name', 'dot', OutputType.debug);
-        _GraphGenerator visitor = new _GraphGenerator(
+        _GraphGenerator visitor = _GraphGenerator(
             this, element, output, inferrer.abstractValueDomain.getCompactText);
         for (TypeInformation node in nodes[element]) {
           visitor.visit(node);
@@ -135,7 +135,7 @@
 /// Builds the Graphviz Dot file for one function body.
 class _GraphGenerator extends TypeInformationVisitor {
   final TypeGraphDump global;
-  final Set<TypeInformation> seen = new Set<TypeInformation>();
+  final Set<TypeInformation> seen = Set<TypeInformation>();
   final List<TypeInformation> worklist = <TypeInformation>[];
   final Map<TypeInformation, int> nodeId = <TypeInformation, int>{};
   final String Function(AbstractValue) formatType;
@@ -172,7 +172,9 @@
   }
 
   void append(String string) {
-    output..add(string)..add('\n');
+    output
+      ..add(string)
+      ..add('\n');
   }
 
   String shorten(String text) {
@@ -193,7 +195,7 @@
     return '$id';
   }
 
-  final RegExp escapeRegexp = new RegExp('["{}<>|]');
+  final RegExp escapeRegexp = RegExp('["{}<>|]');
 
   /// Escapes characters in [text] so it can be used as part of a label.
   String escapeLabel(String text) {
@@ -205,7 +207,7 @@
   /// If [dst] is a record type node, [port] may refer to one of the fields
   /// defined in that record (e.g. `obj`, `arg0`, `arg1`, etc)
   void addEdge(TypeInformation src, TypeInformation dst,
-      {String port, String color: 'black'}) {
+      {String port, String color = 'black'}) {
     if (isExternal(src) && isExternal(dst)) {
       return; // Do not add edges between external nodes.
     }
@@ -268,7 +270,7 @@
   /// [inputs] specify named inputs to the node. If omitted, edges will be
   /// based on [node.inputs].
   void addNode(TypeInformation node, String text,
-      {String color: defaultNodeColor, Map<String, TypeInformation> inputs}) {
+      {String color = defaultNodeColor, Map<String, TypeInformation> inputs}) {
     seen.add(node);
     String style = getStyleForNode(node, color);
     text = appendDetails(node, text);
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index f770d9b..97278f3 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -25,7 +25,7 @@
 /// [TypeInformation.inQueue] that a node is in the queue only once at
 /// a time.
 class WorkQueue {
-  final Queue<TypeInformation> queue = new Queue<TypeInformation>();
+  final Queue<TypeInformation> queue = Queue<TypeInformation>();
 
   void add(TypeInformation element) {
     if (element.doNotEnqueue) return;
@@ -125,12 +125,12 @@
 
       bool isCalledOnce = typeInformation.isCalledOnce();
 
-      memberResults[member] = new GlobalTypeInferenceMemberResultImpl(
+      memberResults[member] = GlobalTypeInferenceMemberResultImpl(
           data, returnType, type,
           throwsAlways: throwsAlways, isCalledOnce: isCalledOnce);
     }
 
-    Set<FieldEntity> freeVariables = new Set<FieldEntity>();
+    Set<FieldEntity> freeVariables = Set<FieldEntity>();
     inferrer.types.forEachMemberType(
         (MemberEntity member, MemberTypeInformation typeInformation) {
       createMemberResults(member, typeInformation);
@@ -169,7 +169,7 @@
       allocatedLists[node] = typeInformation.type;
     });
 
-    GlobalTypeInferenceResults results = new GlobalTypeInferenceResultsImpl(
+    GlobalTypeInferenceResults results = GlobalTypeInferenceResultsImpl(
         closedWorld,
         _globalLocalsMap,
         _inferredDataBuilder.close(closedWorld),
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index e4f2604..334c9cf 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -47,7 +47,7 @@
   final MemberTypeInformation context;
 
   /// The element this [TypeInformation] node belongs to.
-  MemberEntity get contextMember => context == null ? null : context.member;
+  MemberEntity get contextMember => context?.member;
 
   Iterable<TypeInformation> get inputs => _inputs;
 
@@ -85,11 +85,11 @@
 
   TypeInformation(this.type, this.context)
       : _inputs = <TypeInformation>[],
-        users = new Setlet<TypeInformation>();
+        users = Setlet<TypeInformation>();
 
   TypeInformation.noInputs(this.type, this.context)
       : _inputs = const <TypeInformation>[],
-        users = new Setlet<TypeInformation>();
+        users = Setlet<TypeInformation>();
 
   TypeInformation.untracked(this.type)
       : _inputs = const <TypeInformation>[],
@@ -97,7 +97,7 @@
         context = null;
 
   TypeInformation.withInputs(this.type, this.context, this._inputs)
-      : users = new Setlet<TypeInformation>();
+      : users = Setlet<TypeInformation>();
 
   void addUser(TypeInformation user) {
     assert(!user.isConcrete);
@@ -116,7 +116,7 @@
   // The below is not a compile time constant to make it differentiable
   // from other empty lists of [TypeInformation].
   static final STOP_TRACKING_INPUTS_MARKER =
-      new List<TypeInformation>.filled(0, null);
+      List<TypeInformation>.filled(0, null);
 
   bool areInputsTracked() {
     return inputs != STOP_TRACKING_INPUTS_MARKER;
@@ -158,7 +158,7 @@
     return inferrer.types.dynamicType.type;
   }
 
-  void giveUp(InferrerEngine inferrer, {bool clearInputs: true}) {
+  void giveUp(InferrerEngine inferrer, {bool clearInputs = true}) {
     abandonInferencing = true;
     // Do not remove [this] as a user of nodes in [inputs],
     // because our tracing analysis could be interested in tracing
@@ -223,8 +223,8 @@
   }
 
   String toStructuredText(String indent) {
-    StringBuffer sb = new StringBuffer();
-    _toStructuredText(sb, indent, new Set<TypeInformation>());
+    StringBuffer sb = StringBuffer();
+    _toStructuredText(sb, indent, Set<TypeInformation>());
     return sb.toString();
   }
 
@@ -251,12 +251,12 @@
 
   @override
   void accept(TypeInformationVisitor visitor) {
-    throw new UnsupportedError("Cannot visit placeholder");
+    throw UnsupportedError("Cannot visit placeholder");
   }
 
   @override
   AbstractValue computeType(InferrerEngine inferrer) {
-    throw new UnsupportedError("Cannot refine placeholder");
+    throw UnsupportedError("Cannot refine placeholder");
   }
 
   @override
@@ -269,7 +269,7 @@
 /// to a type where we know more about which instance method is being
 /// called.
 class ParameterInputs extends IterableBase<TypeInformation> {
-  final Map<TypeInformation, int> _inputs = new Map<TypeInformation, int>();
+  final Map<TypeInformation, int> _inputs = Map<TypeInformation, int>();
 
   void remove(TypeInformation info) {
     int existing = _inputs[info];
@@ -400,7 +400,7 @@
 
   void addCall(MemberEntity caller, Object node) {
     _callers ??= <MemberEntity, Setlet<Object>>{};
-    _callers.putIfAbsent(caller, () => new Setlet()).add(node);
+    _callers.putIfAbsent(caller, () => Setlet()).add(node);
   }
 
   void removeCall(MemberEntity caller, Object node) {
@@ -466,6 +466,18 @@
               inferrer.closedWorld.nativeData.getNativeMethodBehavior(function))
           .type;
     }
+
+    if (inferrer.commonElements.isIsJsSentinel(function)) {
+      giveUp(inferrer);
+      return inferrer.abstractValueDomain.boolType;
+    }
+
+    if (inferrer.commonElements.isCreateSentinel(function) ||
+        inferrer.commonElements.isCreateJsSentinel(function)) {
+      giveUp(inferrer);
+      return inferrer.abstractValueDomain.lateSentinelType;
+    }
+
     return null;
   }
 
@@ -613,6 +625,9 @@
   @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
+    if (inferrer.commonElements.isLateReadCheck(_method)) {
+      mask = inferrer.abstractValueDomain.excludeLateSentinel(mask);
+    }
     return _narrowType(inferrer.closedWorld, mask, _type.returnType);
   }
 
@@ -713,7 +728,7 @@
 
   ParameterTypeInformation.static(AbstractValueDomain abstractValueDomain,
       MemberTypeInformation context, this._parameter, this._type, this._method,
-      {bool isInitializingFormal: false})
+      {bool isInitializingFormal = false})
       : _isInstanceMemberParameter = false,
         _isClosureParameter = false,
         _isInitializingFormal = isInitializingFormal,
@@ -870,7 +885,7 @@
 
   @override
   String getInferredSignature(TypeSystem types) {
-    throw new UnsupportedError('ParameterTypeInformation.getInferredSignature');
+    throw UnsupportedError('ParameterTypeInformation.getInferredSignature');
   }
 }
 
@@ -911,7 +926,7 @@
     case CallType.forIn:
       return call is ir.ForInStatement;
   }
-  throw new StateError('Unexpected call type $callType.');
+  throw StateError('Unexpected call type $callType.');
 }
 
 /// A [CallSiteTypeInformation] is a call found in the AST, or a
@@ -1109,7 +1124,7 @@
   }
 
   @override
-  void giveUp(InferrerEngine inferrer, {bool clearInputs: true}) {
+  void giveUp(InferrerEngine inferrer, {bool clearInputs = true}) {
     if (!abandonInferencing) {
       inferrer.updateSelectorInMember(
           caller, CallType.access, _call, selector, mask);
@@ -1439,7 +1454,7 @@
   }
 
   @override
-  void giveUp(InferrerEngine inferrer, {bool clearInputs: true}) {
+  void giveUp(InferrerEngine inferrer, {bool clearInputs = true}) {
     if (!abandonInferencing) {
       inferrer.updateSelectorInMember(caller, _callType, _call, selector, mask);
       Iterable<MemberEntity> oldTargets = _concreteTargets;
@@ -1529,7 +1544,7 @@
 
   @override
   Iterable<MemberEntity> get callees {
-    throw new UnsupportedError("Cannot compute callees of a closure call.");
+    throw UnsupportedError("Cannot compute callees of a closure call.");
   }
 
   @override
@@ -1619,7 +1634,7 @@
   StringLiteralTypeInformation(
       AbstractValueDomain abstractValueDomain, this.value, AbstractValue mask)
       : super(abstractValueDomain.createPrimitiveValue(
-            mask, new StringConstantValue(value)));
+            mask, StringConstantValue(value)));
 
   String asString() => value;
   @override
@@ -1637,7 +1652,7 @@
   BoolLiteralTypeInformation(
       AbstractValueDomain abstractValueDomain, this.value, AbstractValue mask)
       : super(abstractValueDomain.createPrimitiveValue(
-            mask, value ? new TrueConstantValue() : new FalseConstantValue()));
+            mask, value ? TrueConstantValue() : FalseConstantValue()));
 
   @override
   String toString() => 'Type $type value ${value}';
@@ -1909,7 +1924,7 @@
     if (_allKeysAreStrings && key is StringLiteralTypeInformation) {
       String keyString = key.asString();
       typeInfoMap.putIfAbsent(keyString, () {
-        newInfo = new ValueInMapTypeInformation(
+        newInfo = ValueInMapTypeInformation(
             abstractValueDomain, context, null, nonNull);
         return newInfo;
       });
@@ -1931,7 +1946,7 @@
     if (_allKeysAreStrings && other.inDictionaryMode) {
       other.typeInfoMap.forEach((keyString, value) {
         typeInfoMap.putIfAbsent(keyString, () {
-          TypeInformation newInfo = new ValueInMapTypeInformation(
+          TypeInformation newInfo = ValueInMapTypeInformation(
               abstractValueDomain, context, null, false);
           newInfos.add(newInfo);
           return newInfo;
@@ -1966,7 +1981,7 @@
   AbstractValue toTypeMask(InferrerEngine inferrer) {
     AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     if (inDictionaryMode) {
-      Map<String, AbstractValue> mappings = new Map<String, AbstractValue>();
+      Map<String, AbstractValue> mappings = Map<String, AbstractValue>();
       for (var key in typeInfoMap.keys) {
         mappings[key] = typeInfoMap[key].type;
       }
@@ -2269,16 +2284,18 @@
 
 AbstractValue _narrowType(
     JClosedWorld closedWorld, AbstractValue type, DartType annotation,
-    {bool isNullable: true}) {
+    {bool isNullable = true}) {
   AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
 
   AbstractValue _intersectionWith(AbstractValue otherType) {
     if (isNullable) {
       otherType = abstractValueDomain.includeNull(otherType);
     }
-    return type == null
-        ? otherType
-        : abstractValueDomain.intersection(type, otherType);
+    if (type == null) return otherType;
+    AbstractValue newType = abstractValueDomain.intersection(type, otherType);
+    return abstractValueDomain.isLateSentinel(type).isPotentiallyTrue
+        ? abstractValueDomain.includeLateSentinel(newType)
+        : newType;
   }
 
   // TODO(joshualitt): FutureOrType, TypeVariableType, and FunctionTypeVariable
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index 85f2de5..d45f291 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -58,30 +58,30 @@
 
   /// [ParameterTypeInformation]s for parameters.
   final Map<Local, ParameterTypeInformation> parameterTypeInformations =
-      new Map<Local, ParameterTypeInformation>();
+      Map<Local, ParameterTypeInformation>();
 
   /// [MemberTypeInformation]s for members.
   final Map<MemberEntity, MemberTypeInformation> memberTypeInformations =
-      new Map<MemberEntity, MemberTypeInformation>();
+      Map<MemberEntity, MemberTypeInformation>();
 
   /// [ListTypeInformation] for allocated lists.
   final Map<ir.TreeNode, ListTypeInformation> allocatedLists =
-      new Map<ir.TreeNode, ListTypeInformation>();
+      Map<ir.TreeNode, ListTypeInformation>();
 
   /// [SetTypeInformation] for allocated Sets.
   final Map<ir.TreeNode, SetTypeInformation> allocatedSets =
-      new Map<ir.TreeNode, SetTypeInformation>();
+      Map<ir.TreeNode, SetTypeInformation>();
 
   /// [MapTypeInformation] for allocated Maps.
   final Map<ir.TreeNode, TypeInformation> allocatedMaps =
-      new Map<ir.TreeNode, TypeInformation>();
+      Map<ir.TreeNode, TypeInformation>();
 
   /// Closures found during the analysis.
-  final Set<TypeInformation> allocatedClosures = new Set<TypeInformation>();
+  final Set<TypeInformation> allocatedClosures = Set<TypeInformation>();
 
   /// Cache of [ConcreteTypeInformation].
   final Map<AbstractValue, TypeInformation> concreteTypes =
-      new Map<AbstractValue, TypeInformation>();
+      Map<AbstractValue, TypeInformation>();
 
   /// Cache of some primitive constant types.
   final Map<Object, TypeInformation> primitiveConstantTypes = {};
@@ -278,10 +278,14 @@
         getConcreteTypeFor(_abstractValueDomain.asyncStarStreamType);
   }
 
+  TypeInformation _lateSentinelType;
+  TypeInformation get lateSentinelType => _lateSentinelType ??=
+      getConcreteTypeFor(_abstractValueDomain.lateSentinelType);
+
   TypeInformation nonNullEmptyType;
 
   TypeInformation stringLiteralType(String value) {
-    return new StringLiteralTypeInformation(
+    return StringLiteralTypeInformation(
         _abstractValueDomain, value, _abstractValueDomain.stringType);
   }
 
@@ -337,8 +341,13 @@
   ///
   /// If [excludeNull] is true, the intersection excludes `null` even if the
   /// Dart type implies `null`.
+  ///
+  /// [narrowType] will not exclude the late sentinel value by default, only if
+  /// [excludeLateSentinel] is `true`.
   TypeInformation narrowType(TypeInformation type, DartType annotation,
-      {bool isCast: true, bool excludeNull: false}) {
+      {bool isCast = true,
+      bool excludeNull = false,
+      bool excludeLateSentinel = false}) {
     // Avoid refining an input with an exact type. It we are almost always
     // adding a narrowing to a subtype of the same class or a superclass.
     if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) return type;
@@ -351,6 +360,9 @@
     if (excludeNull) {
       abstractValue = _abstractValueDomain.excludeNull(abstractValue);
     }
+    if (!excludeLateSentinel) {
+      abstractValue = _abstractValueDomain.includeLateSentinel(abstractValue);
+    }
 
     if (_abstractValueDomain.containsAll(abstractValue).isPotentiallyTrue) {
       // Top, or non-nullable Top.
@@ -405,7 +417,7 @@
   ConcreteTypeInformation getConcreteTypeFor(AbstractValue mask) {
     assert(mask != null);
     return concreteTypes.putIfAbsent(mask, () {
-      return new ConcreteTypeInformation(mask);
+      return ConcreteTypeInformation(mask);
     });
   }
 
@@ -465,12 +477,12 @@
     AbstractValue mask = _abstractValueDomain.createContainerValue(
         type.type, node, enclosing, elementTypeMask, inferredLength);
     ElementInContainerTypeInformation element =
-        new ElementInContainerTypeInformation(
+        ElementInContainerTypeInformation(
             _abstractValueDomain, currentMember, elementType);
     element.inferred = isElementInferred;
 
     allocatedTypes.add(element);
-    return allocatedLists[node] = new ListTypeInformation(
+    return allocatedLists[node] = ListTypeInformation(
         _abstractValueDomain, currentMember, mask, element, length);
   }
 
@@ -478,8 +490,8 @@
   /// static or top-level method [element] used as a function constant or for
   /// the synthesized 'call' method [element] created for a local function.
   TypeInformation allocateClosure(FunctionEntity element) {
-    TypeInformation result = new ClosureTypeInformation(
-        _abstractValueDomain, currentMember, element);
+    TypeInformation result =
+        ClosureTypeInformation(_abstractValueDomain, currentMember, element);
     allocatedClosures.add(result);
     return result;
   }
@@ -494,13 +506,13 @@
         isConst ? elementType.type : dynamicType.type;
     AbstractValue mask = _abstractValueDomain.createSetValue(
         type.type, node, enclosing, elementTypeMask);
-    ElementInSetTypeInformation element = new ElementInSetTypeInformation(
+    ElementInSetTypeInformation element = ElementInSetTypeInformation(
         _abstractValueDomain, currentMember, elementType);
     element.inferred = isConst;
 
     allocatedTypes.add(element);
     return allocatedSets[node] =
-        new SetTypeInformation(currentMember, mask, element);
+        SetTypeInformation(currentMember, mask, element);
   }
 
   TypeInformation allocateMap(
@@ -538,15 +550,15 @@
     AbstractValue mask = _abstractValueDomain.createMapValue(
         type.type, node, element, keyTypeMask, valueTypeMask);
 
-    TypeInformation keyTypeInfo = new KeyInMapTypeInformation(
-        _abstractValueDomain, currentMember, keyType);
-    TypeInformation valueTypeInfo = new ValueInMapTypeInformation(
+    TypeInformation keyTypeInfo =
+        KeyInMapTypeInformation(_abstractValueDomain, currentMember, keyType);
+    TypeInformation valueTypeInfo = ValueInMapTypeInformation(
         _abstractValueDomain, currentMember, valueType);
     allocatedTypes.add(keyTypeInfo);
     allocatedTypes.add(valueTypeInfo);
 
     MapTypeInformation map =
-        new MapTypeInformation(currentMember, mask, keyTypeInfo, valueTypeInfo);
+        MapTypeInformation(currentMember, mask, keyTypeInfo, valueTypeInfo);
 
     for (int i = 0; i < keyTypes.length; ++i) {
       TypeInformation newType = map.addEntryInput(
@@ -572,7 +584,7 @@
   /// Returns a new type that unions [firstInput] and [secondInput].
   TypeInformation allocateDiamondPhi(
       TypeInformation firstInput, TypeInformation secondInput) {
-    PhiElementTypeInformation result = new PhiElementTypeInformation(
+    PhiElementTypeInformation result = PhiElementTypeInformation(
         _abstractValueDomain, currentMember, null, null,
         isTry: false);
     result.addInput(firstInput);
@@ -583,7 +595,7 @@
 
   PhiElementTypeInformation _addPhi(
       ir.Node node, Local variable, TypeInformation inputType, bool isTry) {
-    PhiElementTypeInformation result = new PhiElementTypeInformation(
+    PhiElementTypeInformation result = PhiElementTypeInformation(
         _abstractValueDomain, currentMember, node, variable,
         isTry: isTry);
     allocatedTypes.add(result);
@@ -643,25 +655,29 @@
   }
 
   AbstractValue joinTypeMasks(Iterable<AbstractValue> masks) {
-    var dynamicType = _abstractValueDomain.dynamicType;
+    var topType = _abstractValueDomain.internalTopType;
     // Optimization: we are iterating over masks twice, but because `masks` is a
     // mapped iterable, we save the intermediate results to avoid computing them
     // again.
     var list = [];
-    bool isDynamicIngoringNull = false;
+    bool isTopIgnoringFlags = false;
     bool mayBeNull = false;
+    bool mayBeLateSentinel = false;
     for (AbstractValue mask in masks) {
       // Don't do any work on computing unions if we know that after all that
       // work the result will be `dynamic`.
-      // TODO(sigmund): change to `mask == dynamicType` so we can continue to
-      // track the non-nullable bit.
+      // TODO(sigmund): change to `mask == internalTopType` so we can continue
+      // to track the non-nullable and late sentinel bits.
       if (_abstractValueDomain.containsAll(mask).isPotentiallyTrue) {
-        isDynamicIngoringNull = true;
+        isTopIgnoringFlags = true;
       }
       if (_abstractValueDomain.isNull(mask).isPotentiallyTrue) {
         mayBeNull = true;
       }
-      if (isDynamicIngoringNull && mayBeNull) return dynamicType;
+      if (_abstractValueDomain.isLateSentinel(mask).isPotentiallyTrue) {
+        mayBeLateSentinel = true;
+      }
+      if (isTopIgnoringFlags && mayBeNull && mayBeLateSentinel) return topType;
       list.add(mask);
     }
 
@@ -671,12 +687,15 @@
           newType == null ? mask : _abstractValueDomain.union(newType, mask);
       // Likewise - stop early if we already reach dynamic.
       if (_abstractValueDomain.containsAll(newType).isPotentiallyTrue) {
-        isDynamicIngoringNull = true;
+        isTopIgnoringFlags = true;
       }
       if (_abstractValueDomain.isNull(newType).isPotentiallyTrue) {
         mayBeNull = true;
       }
-      if (isDynamicIngoringNull && mayBeNull) return dynamicType;
+      if (_abstractValueDomain.isLateSentinel(newType).isPotentiallyTrue) {
+        mayBeLateSentinel = true;
+      }
+      if (isTopIgnoringFlags && mayBeNull && mayBeLateSentinel) return topType;
     }
 
     return newType ?? _abstractValueDomain.emptyType;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
index b562b3c..e46212b 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
@@ -26,7 +26,7 @@
     if (closedWorld.interceptorData.isInterceptedClass(constant.type.element)) {
       return _abstractValueDomain.nonNullType;
     }
-    return new TypeMask.nonNullExact(constant.type.element, closedWorld);
+    return TypeMask.nonNullExact(constant.type.element, closedWorld);
   }
 
   @override
@@ -57,7 +57,7 @@
   @override
   TypeMask visitLateSentinel(
           LateSentinelConstantValue constant, JClosedWorld closedWorld) =>
-      _abstractValueDomain.dynamicType;
+      _abstractValueDomain.lateSentinelType;
 
   @override
   TypeMask visitUnreachable(
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 188a951..ab14e11 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
@@ -27,20 +27,20 @@
   // The length of the container.
   final int length;
 
-  ContainerTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
-      this.elementType, this.length);
+  const ContainerTypeMask(this.forwardTo, this.allocationNode,
+      this.allocationElement, this.elementType, this.length);
 
   /// Deserializes a [ContainerTypeMask] object from [source].
   factory ContainerTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
+    TypeMask forwardTo = TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask elementType = new TypeMask.readFromDataSource(source, domain);
+    TypeMask elementType = TypeMask.readFromDataSource(source, domain);
     int length = source.readIntOrNull();
     source.end(tag);
-    return new ContainerTypeMask(
+    return ContainerTypeMask(
         forwardTo, allocationNode, allocationElement, elementType, length);
   }
 
@@ -58,19 +58,20 @@
   }
 
   @override
-  TypeMask nullable() {
-    return isNullable
-        ? this
-        : new ContainerTypeMask(forwardTo.nullable(), allocationNode,
-            allocationElement, elementType, length);
-  }
-
-  @override
-  TypeMask nonNullable() {
-    return isNullable
-        ? new ContainerTypeMask(forwardTo.nonNullable(), allocationNode,
-            allocationElement, elementType, length)
-        : this;
+  ContainerTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    return ContainerTypeMask(
+        forwardTo.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel),
+        allocationNode,
+        allocationElement,
+        elementType,
+        length);
   }
 
   @override
@@ -79,36 +80,17 @@
   bool get isExact => true;
 
   @override
-  bool equalsDisregardNull(other) {
-    if (other is! ContainerTypeMask) return false;
-    return super.equalsDisregardNull(other) &&
-        allocationNode == other.allocationNode &&
-        elementType == other.elementType &&
-        length == other.length;
-  }
-
-  @override
-  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, CommonMasks domain) {
-    if (this == other) {
-      return this;
-    } else if (equalsDisregardNull(other)) {
-      return other.isNullable ? other : this;
-    } else if (other.isEmptyOrNull) {
-      return other.isNullable ? this.nullable() : this;
-    } else if (other.isContainer &&
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+      {bool isNullable, bool hasLateSentinel}) {
+    assert(isNullable != null);
+    assert(hasLateSentinel != null);
+    if (other is ContainerTypeMask &&
         elementType != null &&
         other.elementType != null) {
       TypeMask newElementType = elementType.union(other.elementType, domain);
       int newLength = (length == other.length) ? length : null;
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
-      return new ContainerTypeMask(
+      return ContainerTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
           allocationElement == other.allocationElement
@@ -116,19 +98,22 @@
               : null,
           newElementType,
           newLength);
-    } else {
-      return forwardTo.union(other, domain);
     }
+    return null;
   }
 
   @override
-  bool operator ==(other) => super == other;
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! ContainerTypeMask) return false;
+    return super == other &&
+        elementType == other.elementType &&
+        length == other.length;
+  }
 
   @override
-  int get hashCode {
-    return computeHashCode(
-        allocationNode, isNullable, elementType, length, forwardTo);
-  }
+  int get hashCode => Hashing.objectHash(
+      length, Hashing.objectHash(elementType, super.hashCode));
 
   @override
   String toString() {
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 cc54437..00eece2 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
@@ -16,9 +16,9 @@
   static const String tag = 'dictionary-type-mask';
 
   // The underlying key/value map of this dictionary.
-  final Map<String, AbstractValue> _typeMap;
+  final Map<String, TypeMask> _typeMap;
 
-  DictionaryTypeMask(
+  const DictionaryTypeMask(
       TypeMask forwardTo,
       ir.Node allocationNode,
       MemberEntity allocationElement,
@@ -31,15 +31,15 @@
   factory DictionaryTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
+    TypeMask forwardTo = TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    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));
+    TypeMask keyType = TypeMask.readFromDataSource(source, domain);
+    TypeMask valueType = TypeMask.readFromDataSource(source, domain);
+    Map<String, TypeMask> typeMap =
+        source.readStringMap(() => TypeMask.readFromDataSource(source, domain));
     source.end(tag);
-    return new DictionaryTypeMask(forwardTo, allocationNode, allocationElement,
+    return DictionaryTypeMask(forwardTo, allocationNode, allocationElement,
         keyType, valueType, typeMap);
   }
 
@@ -53,27 +53,28 @@
     sink.writeMemberOrNull(allocationElement);
     keyType.writeToDataSink(sink);
     valueType.writeToDataSink(sink);
-    sink.writeStringMap(_typeMap, (AbstractValue value) {
-      TypeMask typeMask = value;
+    sink.writeStringMap(_typeMap, (TypeMask typeMask) {
       typeMask.writeToDataSink(sink);
     });
     sink.end(tag);
   }
 
   @override
-  TypeMask nullable() {
-    return isNullable
-        ? this
-        : new DictionaryTypeMask(forwardTo.nullable(), allocationNode,
-            allocationElement, keyType, valueType, _typeMap);
-  }
-
-  @override
-  TypeMask nonNullable() {
-    return isNullable
-        ? new DictionaryTypeMask(forwardTo.nonNullable(), allocationNode,
-            allocationElement, keyType, valueType, _typeMap)
-        : this;
+  DictionaryTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    return DictionaryTypeMask(
+        forwardTo.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel),
+        allocationNode,
+        allocationElement,
+        keyType,
+        valueType,
+        _typeMap);
   }
 
   @override
@@ -86,37 +87,16 @@
   TypeMask getValueForKey(String key) => _typeMap[key];
 
   @override
-  bool equalsDisregardNull(other) {
-    if (other is! DictionaryTypeMask) return false;
-    return allocationNode == other.allocationNode &&
-        keyType == other.keyType &&
-        valueType == other.valueType &&
-        _typeMap.keys.every((k) => other._typeMap.containsKey(k)) &&
-        other._typeMap.keys.every(
-            (k) => _typeMap.containsKey(k) && _typeMap[k] == other._typeMap[k]);
-  }
-
-  @override
-  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, CommonMasks domain) {
-    if (this == other) {
-      return this;
-    } else if (equalsDisregardNull(other)) {
-      return other.isNullable ? other : this;
-    } else if (other.isEmptyOrNull) {
-      return other.isNullable ? this.nullable() : this;
-    } else if (other.isDictionary) {
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+      {bool isNullable, bool hasLateSentinel}) {
+    assert(isNullable != null);
+    assert(hasLateSentinel != null);
+    if (other is DictionaryTypeMask) {
       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) {
+      Map<String, TypeMask> mappings = {};
+      _typeMap.forEach((k, v) {
         if (!other._typeMap.containsKey(k)) {
           mappings[k] = v.nullable();
         }
@@ -128,28 +108,32 @@
           mappings[k] = v.nullable();
         }
       });
-      return new DictionaryTypeMask(
+      return DictionaryTypeMask(
           newForwardTo, null, null, newKeyType, newValueType, mappings);
-    } else if (other.isMap &&
+    }
+    if (other is MapTypeMask &&
         (other.keyType != null) &&
         (other.valueType != null)) {
       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, domain);
+      return MapTypeMask(newForwardTo, null, null, newKeyType, newValueType);
     }
+    return null;
   }
 
   @override
-  bool operator ==(other) => super == other;
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! DictionaryTypeMask) return false;
+    return super == other &&
+        _typeMap.keys.every((k) => other._typeMap.containsKey(k)) &&
+        other._typeMap.keys.every(
+            (k) => _typeMap.containsKey(k) && _typeMap[k] == other._typeMap[k]);
+  }
 
   @override
-  int get hashCode {
-    return computeHashCode(allocationNode, isNullable, _typeMap, forwardTo);
-  }
+  int get hashCode => Hashing.objectHash(_typeMap, super.hashCode);
 
   @override
   String toString() {
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 451af33..321a8d7 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
@@ -4,74 +4,121 @@
 
 part of masks;
 
+enum _FlatTypeMaskKind { empty, exact, subclass, subtype }
+
 /// A flat type mask is a type mask that has been flattened to contain a
 /// base type.
-class FlatTypeMask implements TypeMask {
+class FlatTypeMask extends TypeMask {
   /// Tag used for identifying serialized [FlatTypeMask] objects in a
   /// debugging data stream.
   static const String tag = 'flat-type-mask';
 
-  static const int EMPTY = 0;
-  static const int EXACT = 1;
-  static const int SUBCLASS = 2;
-  static const int SUBTYPE = 3;
+  static const int _NULL_INDEX = 0;
+  static const int _LATE_SENTINEL_INDEX = 1;
+  static const int _USED_INDICES = 2;
+
+  static const int _NONE_MASK = 0;
+  static const int _NULL_MASK = 1 << _NULL_INDEX;
+  static const int _LATE_SENTINEL_MASK = 1 << _LATE_SENTINEL_INDEX;
+  static const int _ALL_MASK = (1 << _USED_INDICES) - 1;
 
   final ClassEntity base;
   final int flags;
 
-  factory FlatTypeMask.exact(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, EXACT, true, world);
-  factory FlatTypeMask.subclass(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, SUBCLASS, true, world);
-  factory FlatTypeMask.subtype(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, SUBTYPE, true, world);
-
-  const FlatTypeMask.nonNullEmpty()
-      : base = null,
-        flags = 0;
-  const FlatTypeMask.empty()
-      : base = null,
-        flags = 1;
-
-  factory FlatTypeMask.nonNullExact(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, EXACT, false, world);
-  factory FlatTypeMask.nonNullSubclass(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, SUBCLASS, false, world);
-  factory FlatTypeMask.nonNullSubtype(ClassEntity base, JClosedWorld world) =>
-      FlatTypeMask._canonicalize(base, SUBTYPE, false, world);
-
-  factory FlatTypeMask._canonicalize(
-      ClassEntity base, int kind, bool isNullable, JClosedWorld world) {
-    if (base == world.commonElements.nullClass) {
-      return FlatTypeMask.empty();
-    }
-    return FlatTypeMask._(base, (kind << 1) | (isNullable ? 1 : 0));
+  static int _computeFlags(_FlatTypeMaskKind kind,
+      {bool isNullable = false, bool hasLateSentinel = false}) {
+    int mask = _NONE_MASK;
+    if (isNullable) mask |= _NULL_MASK;
+    if (hasLateSentinel) mask |= _LATE_SENTINEL_MASK;
+    return _computeFlagsRaw(kind.index, mask);
   }
 
-  FlatTypeMask._(this.base, this.flags);
+  static int _computeFlagsRaw(int kind, int mask) =>
+      kind << _USED_INDICES | mask;
+
+  static _FlatTypeMaskKind _lookupKind(int flags) =>
+      _FlatTypeMaskKind.values[flags >> _USED_INDICES];
+
+  static bool _hasNullableFlag(int flags) => flags & _NULL_MASK != _NONE_MASK;
+
+  static bool _hasLateSentinelFlag(int flags) =>
+      flags & _LATE_SENTINEL_MASK != _NONE_MASK;
+
+  factory FlatTypeMask.exact(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.exact, world,
+          isNullable: true, hasLateSentinel: hasLateSentinel);
+  factory FlatTypeMask.subclass(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.subclass, world,
+          isNullable: true, hasLateSentinel: hasLateSentinel);
+  factory FlatTypeMask.subtype(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.subtype, world,
+          isNullable: true, hasLateSentinel: hasLateSentinel);
+
+  factory FlatTypeMask.nonNullEmpty({bool hasLateSentinel = false}) =>
+      hasLateSentinel
+          ? const FlatTypeMask._(null, _LATE_SENTINEL_MASK)
+          : const FlatTypeMask._(null, _NONE_MASK);
+
+  factory FlatTypeMask.empty({bool hasLateSentinel = false}) => hasLateSentinel
+      ? const FlatTypeMask._(null, _NULL_MASK | _LATE_SENTINEL_MASK)
+      : const FlatTypeMask._(null, _NULL_MASK);
+
+  factory FlatTypeMask.nonNullExact(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.exact, world,
+          hasLateSentinel: hasLateSentinel);
+  factory FlatTypeMask.nonNullSubclass(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.subclass, world,
+          hasLateSentinel: hasLateSentinel);
+  factory FlatTypeMask.nonNullSubtype(ClassEntity base, JClosedWorld world,
+          {bool hasLateSentinel = false}) =>
+      FlatTypeMask._canonicalize(base, _FlatTypeMaskKind.subtype, world,
+          hasLateSentinel: hasLateSentinel);
+
+  factory FlatTypeMask._canonicalize(
+      ClassEntity base, _FlatTypeMaskKind kind, JClosedWorld world,
+      {bool isNullable = false, bool hasLateSentinel = false}) {
+    if (base == world.commonElements.nullClass) {
+      return FlatTypeMask.empty(hasLateSentinel: hasLateSentinel);
+    }
+    return FlatTypeMask._(
+        base,
+        _computeFlags(kind,
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel));
+  }
+
+  const FlatTypeMask._(this.base, this.flags);
 
   /// 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, CommonMasks domain) {
+    bool isNullable = _hasNullableFlag(flags);
+    bool hasLateSentinel = _hasLateSentinelFlag(flags);
     if (base == domain.commonElements.nullClass) {
-      return FlatTypeMask.empty();
+      return FlatTypeMask.empty(hasLateSentinel: hasLateSentinel);
     }
-    if ((flags >> 1) == EMPTY || ((flags >> 1) == EXACT)) {
-      return new FlatTypeMask._(base, flags);
+    _FlatTypeMaskKind kind = _lookupKind(flags);
+    if (kind == _FlatTypeMaskKind.empty || kind == _FlatTypeMaskKind.exact) {
+      return FlatTypeMask._(base, flags);
     }
-    if ((flags >> 1) == SUBTYPE) {
+    if (kind == _FlatTypeMaskKind.subtype) {
       if (!domain._closedWorld.classHierarchy.hasAnyStrictSubtype(base) ||
           domain._closedWorld.classHierarchy.hasOnlySubclasses(base)) {
-        flags = (flags & 0x1) | (SUBCLASS << 1);
+        flags = _computeFlags(_FlatTypeMaskKind.subclass,
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
     }
-    if (((flags >> 1) == SUBCLASS) &&
+    if (kind == _FlatTypeMaskKind.subclass &&
         !domain._closedWorld.classHierarchy.hasAnyStrictSubclass(base)) {
-      flags = (flags & 0x1) | (EXACT << 1);
+      flags = _computeFlags(_FlatTypeMaskKind.exact,
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
     }
-    return domain.getCachedMask(
-        base, flags, () => new FlatTypeMask._(base, flags));
+    return domain.getCachedMask(base, flags, () => FlatTypeMask._(base, flags));
   }
 
   /// Deserializes a [FlatTypeMask] object from [source].
@@ -81,8 +128,7 @@
     ClassEntity base = source.readClassOrNull();
     int flags = source.readInt();
     source.end(tag);
-    return domain.getCachedMask(
-        base, flags, () => new FlatTypeMask._(base, flags));
+    return domain.getCachedMask(base, flags, () => FlatTypeMask._(base, flags));
   }
 
   /// Serializes this [FlatTypeMask] to [sink].
@@ -95,20 +141,34 @@
     sink.end(tag);
   }
 
+  _FlatTypeMaskKind get _kind => _lookupKind(flags);
+
+  int get _mask => flags & _ALL_MASK;
+
   ClassQuery get _classQuery => isExact
       ? ClassQuery.EXACT
       : (isSubclass ? ClassQuery.SUBCLASS : ClassQuery.SUBTYPE);
 
   @override
-  bool get isEmpty => isEmptyOrNull && !isNullable;
+  bool get isEmpty => isEmptyOrFlagged && _mask == _NONE_MASK;
   @override
-  bool get isNull => isEmptyOrNull && isNullable;
+  bool get isNull => isEmptyOrFlagged && _mask == _NULL_MASK;
   @override
-  bool get isEmptyOrNull => (flags >> 1) == EMPTY;
+  bool get isEmptyOrFlagged => _kind == _FlatTypeMaskKind.empty;
   @override
-  bool get isExact => (flags >> 1) == EXACT;
+  bool get isExact => _kind == _FlatTypeMaskKind.exact;
   @override
-  bool get isNullable => (flags & 1) != 0;
+  bool get isNullable => _hasNullableFlag(flags);
+  @override
+  bool get hasLateSentinel => _hasLateSentinelFlag(flags);
+  @override
+  AbstractBool get isLateSentinel {
+    if (!hasLateSentinel) return AbstractBool.False;
+    if (isEmptyOrFlagged && _mask == _LATE_SENTINEL_MASK) {
+      return AbstractBool.True;
+    }
+    return AbstractBool.Maybe;
+  }
 
   @override
   bool get isUnion => false;
@@ -128,22 +188,21 @@
   // TODO(kasperl): Get rid of these. They should not be a visible
   // part of the implementation because they make it hard to add
   // proper union types if we ever want to.
-  bool get isSubclass => (flags >> 1) == SUBCLASS;
-  bool get isSubtype => (flags >> 1) == SUBTYPE;
+  bool get isSubclass => _kind == _FlatTypeMaskKind.subclass;
+  bool get isSubtype => _kind == _FlatTypeMaskKind.subtype;
 
   @override
-  TypeMask nullable() {
-    return isNullable ? this : new FlatTypeMask._(base, flags | 1);
-  }
-
-  @override
-  TypeMask nonNullable() {
-    return isNullable ? new FlatTypeMask._(base, flags & ~1) : this;
+  FlatTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    int newFlags = _computeFlags(_kind,
+        isNullable: isNullable ?? this.isNullable,
+        hasLateSentinel: hasLateSentinel ?? this.hasLateSentinel);
+    if (newFlags == flags) return this;
+    return FlatTypeMask._(base, newFlags);
   }
 
   @override
   bool contains(ClassEntity other, JClosedWorld closedWorld) {
-    if (isEmptyOrNull) {
+    if (isEmptyOrFlagged) {
       return false;
     } else if (identical(base, other)) {
       return true;
@@ -184,11 +243,14 @@
 
   @override
   bool isInMask(TypeMask other, JClosedWorld closedWorld) {
-    if (isEmptyOrNull) return isNullable ? other.isNullable : true;
-    // The empty type contains no classes.
-    if (other.isEmptyOrNull) return false;
     // Quick check whether to handle null.
     if (isNullable && !other.isNullable) return false;
+    if (hasLateSentinel && !other.hasLateSentinel) {
+      return false;
+    }
+    // The empty type contains no classes.
+    if (isEmptyOrFlagged) return true;
+    if (other.isEmptyOrFlagged) return false;
     other = TypeMask.nonForwardingMask(other);
     // If other is union, delegate to UnionTypeMask.containsMask.
     if (other is! FlatTypeMask) return other.containsMask(this, closedWorld);
@@ -259,15 +321,16 @@
 
   @override
   bool satisfies(ClassEntity cls, JClosedWorld closedWorld) {
-    if (isEmptyOrNull) return false;
+    if (isEmptyOrFlagged) return false;
     if (closedWorld.classHierarchy.isSubtypeOf(base, cls)) return true;
     return false;
   }
 
   @override
   ClassEntity singleClass(JClosedWorld closedWorld) {
-    if (isEmptyOrNull) return null;
+    if (isEmptyOrFlagged) return null;
     if (isNullable) return null; // It is Null and some other class.
+    if (hasLateSentinel) return null;
     if (isExact) {
       return base;
     } else if (isSubclass) {
@@ -282,7 +345,7 @@
 
   @override
   bool containsAll(JClosedWorld closedWorld) {
-    if (isEmptyOrNull || isExact) return false;
+    if (isEmptyOrFlagged || isExact) return false;
     return identical(base, closedWorld.commonElements.objectClass);
   }
 
@@ -294,10 +357,14 @@
     assert(TypeMask.assertIsNormalized(other, 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;
+    bool isNullable = this.isNullable || flatOther.isNullable;
+    bool hasLateSentinel = this.hasLateSentinel || flatOther.hasLateSentinel;
+    if (isEmptyOrFlagged) {
+      return flatOther.withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
+    } else if (flatOther.isEmptyOrFlagged) {
+      return withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
     } else if (base == flatOther.base) {
       return unionSame(flatOther, domain);
     } else if (closedWorld.classHierarchy.isSubclassOf(flatOther.base, base)) {
@@ -309,9 +376,9 @@
     } else if (closedWorld.classHierarchy.isSubtypeOf(base, flatOther.base)) {
       return flatOther.unionStrictSubtype(this, domain);
     } else {
-      return new UnionTypeMask._internal(
-          <FlatTypeMask>[this.nonNullable(), flatOther.nonNullable()],
-          isNullable || other.isNullable);
+      return UnionTypeMask._internal(
+          <FlatTypeMask>[withoutFlags(), flatOther.withoutFlags()],
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
     }
   }
 
@@ -323,15 +390,14 @@
     // constraining kind (the highest) of the two. If either one of
     // the masks are nullable the result should be nullable too.
     // As both masks are normalized, the result will be, too.
-    int combined = (flags > other.flags)
-        ? flags | (other.flags & 1)
-        : other.flags | (flags & 1);
+    int combined =
+        (flags > other.flags) ? flags | other._mask : other.flags | _mask;
     if (flags == combined) {
       return this;
     } else if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(base, combined, domain);
+      return FlatTypeMask.normalized(base, combined, domain);
     }
   }
 
@@ -346,19 +412,19 @@
       // 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.
-      combined = (SUBCLASS << 1) | ((flags | other.flags) & 1);
+      combined = _computeFlagsRaw(
+          _FlatTypeMaskKind.subclass.index, _mask | other._mask);
     } else {
       // Both masks are at least subclass masks, so we pick the least
       // constraining kind (the highest) of the two. If either one of
       // the masks are nullable the result should be nullable too.
-      combined = (flags > other.flags)
-          ? flags | (other.flags & 1)
-          : other.flags | (flags & 1);
+      combined =
+          (flags > other.flags) ? flags | other._mask : other.flags | _mask;
     }
     // 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, domain)
+    return flags != combined
+        ? FlatTypeMask.normalized(base, combined, domain)
         : this;
   }
 
@@ -371,11 +437,12 @@
     // 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.
-    int combined = (SUBTYPE << 1) | ((flags | other.flags) & 1);
+    int combined =
+        _computeFlagsRaw(_FlatTypeMaskKind.subtype.index, _mask | other._mask);
     // We know there is at least one subtype, [other.base], so no need
     // to normalize.
-    return (flags != combined)
-        ? new FlatTypeMask.normalized(base, combined, domain)
+    return flags != combined
+        ? FlatTypeMask.normalized(base, combined, domain)
         : this;
   }
 
@@ -390,11 +457,14 @@
     ClassEntity otherBase = flatOther.base;
 
     bool includeNull = isNullable && flatOther.isNullable;
+    bool includeLateSentinel = hasLateSentinel && flatOther.hasLateSentinel;
 
-    if (isEmptyOrNull) {
-      return includeNull ? this : nonNullable();
-    } else if (flatOther.isEmptyOrNull) {
-      return includeNull ? other : other.nonNullable();
+    if (isEmptyOrFlagged) {
+      return withFlags(
+          isNullable: includeNull, hasLateSentinel: includeLateSentinel);
+    } else if (flatOther.isEmptyOrFlagged) {
+      return other.withFlags(
+          isNullable: includeNull, hasLateSentinel: includeLateSentinel);
     }
 
     SubclassResult result = domain._closedWorld.classHierarchy
@@ -402,43 +472,58 @@
 
     switch (result.kind) {
       case SubclassResultKind.EMPTY:
-        return includeNull ? domain.nullType : domain.emptyType;
+        return includeNull
+            ? TypeMask.empty(hasLateSentinel: includeLateSentinel)
+            : TypeMask.nonNullEmpty(hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.EXACT1:
         assert(isExact);
-        return includeNull ? this : nonNullable();
+        return withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.EXACT2:
         assert(other.isExact);
-        return includeNull ? other : other.nonNullable();
+        return other.withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.SUBCLASS1:
         assert(isSubclass);
-        return includeNull ? this : nonNullable();
+        return withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.SUBCLASS2:
         assert(flatOther.isSubclass);
-        return includeNull ? other : other.nonNullable();
+        return other.withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.SUBTYPE1:
         assert(isSubtype);
-        return includeNull ? this : nonNullable();
+        return withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.SUBTYPE2:
         assert(flatOther.isSubtype);
-        return includeNull ? other : other.nonNullable();
+        return other.withFlags(
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
       case SubclassResultKind.SET:
       default:
         if (result.classes.isEmpty) {
-          return includeNull ? domain.nullType : domain.emptyType;
+          return includeNull
+              ? TypeMask.empty(hasLateSentinel: includeLateSentinel)
+              : TypeMask.nonNullEmpty(hasLateSentinel: includeLateSentinel);
         } else if (result.classes.length == 1) {
           ClassEntity cls = result.classes.first;
           return includeNull
-              ? new TypeMask.subclass(cls, domain._closedWorld)
-              : new TypeMask.nonNullSubclass(cls, domain._closedWorld);
+              ? TypeMask.subclass(cls, domain._closedWorld,
+                  hasLateSentinel: includeLateSentinel)
+              : TypeMask.nonNullSubclass(cls, domain._closedWorld,
+                  hasLateSentinel: includeLateSentinel);
         }
 
         List<FlatTypeMask> masks = List.from(result.classes.map(
             (ClassEntity cls) =>
                 TypeMask.nonNullSubclass(cls, domain._closedWorld)));
         if (masks.length > UnionTypeMask.MAX_UNION_LENGTH) {
-          return UnionTypeMask.flatten(masks, includeNull, domain);
+          return UnionTypeMask.flatten(masks, domain,
+              includeNull: includeNull,
+              includeLateSentinel: includeLateSentinel);
         }
-        return new UnionTypeMask._internal(masks, includeNull);
+        return UnionTypeMask._internal(masks,
+            isNullable: includeNull, hasLateSentinel: includeLateSentinel);
     }
   }
 
@@ -448,7 +533,8 @@
     FlatTypeMask flatOther = other;
 
     if (isNullable && flatOther.isNullable) return false;
-    if (isEmptyOrNull || flatOther.isEmptyOrNull) return true;
+    if (hasLateSentinel && flatOther.hasLateSentinel) return false;
+    if (isEmptyOrFlagged || flatOther.isEmptyOrFlagged) return true;
     if (base == flatOther.base) return false;
     if (isExact && flatOther.isExact) return true;
 
@@ -495,14 +581,14 @@
     // are nullable, will the result be nullable too.
     // The result will be normalized, as the two inputs are normalized, too.
     int combined = (flags < other.flags)
-        ? flags & ((other.flags & 1) | ~1)
-        : other.flags & ((flags & 1) | ~1);
+        ? flags & (other._mask | ~_ALL_MASK)
+        : other.flags & (_mask | ~_ALL_MASK);
     if (flags == combined) {
       return this;
     } else if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(base, combined, domain);
+      return FlatTypeMask.normalized(base, combined, domain);
     }
   }
 
@@ -517,28 +603,29 @@
     // masks are nullable, will the result be nullable too.
     // The result is guaranteed to be normalized, as the other type
     // was normalized.
-    int combined = other.flags & ((flags & 1) | ~1);
+    int combined = other.flags & (_mask | ~_ALL_MASK);
     if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(other.base, combined, domain);
+      return FlatTypeMask.normalized(other.base, combined, domain);
     }
   }
 
   TypeMask intersectionEmpty(FlatTypeMask other) {
-    return isNullable && other.isNullable
-        ? new TypeMask.empty()
-        : new TypeMask.nonNullEmpty();
+    bool isNullable = this.isNullable && other.isNullable;
+    bool hasLateSentinel = this.hasLateSentinel && other.hasLateSentinel;
+    return isNullable
+        ? TypeMask.empty(hasLateSentinel: hasLateSentinel)
+        : TypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
   }
 
   @override
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     CommonElements commonElements = closedWorld.commonElements;
     assert(element.name == name.text);
-    if (isEmpty) return false;
-    if (isNull) {
-      return closedWorld.hasElementIn(
-          commonElements.jsNullClass, name, element);
+    if (isEmptyOrFlagged) {
+      return isNullable &&
+          closedWorld.hasElementIn(commonElements.jsNullClass, name, element);
     }
 
     ClassEntity other = element.enclosingClass;
@@ -572,7 +659,7 @@
       Selector selector, covariant JClosedWorld closedWorld) {
     // A call on an empty type mask is either dead code, or a call on
     // `null`.
-    if (isEmptyOrNull) return false;
+    if (isEmptyOrFlagged) return false;
     // A call on an exact mask for an abstract class is dead code.
     // TODO(johnniwinther): A type mask cannot be abstract. Remove the need
     // for this noise (currently used for super-calls in inference and mirror
@@ -584,7 +671,7 @@
 
   @override
   MemberEntity locateSingleMember(Selector selector, CommonMasks domain) {
-    if (isEmptyOrNull) return null;
+    if (isEmptyOrFlagged) return null;
     JClosedWorld closedWorld = domain._closedWorld;
     if (closedWorld.includesClosureCallInDomain(selector, this, domain))
       return null;
@@ -628,13 +715,16 @@
 
   @override
   String toString() {
-    if (isEmptyOrNull) return isNullable ? '[null]' : '[empty]';
-    StringBuffer buffer = new StringBuffer();
-    if (isNullable) buffer.write('null|');
-    if (isExact) buffer.write('exact=');
-    if (isSubclass) buffer.write('subclass=');
-    if (isSubtype) buffer.write('subtype=');
-    buffer.write(base.name);
-    return "[$buffer]";
+    StringBuffer buffer = StringBuffer('[');
+    buffer.writeAll([
+      if (isEmpty) 'empty',
+      if (isNullable) 'null',
+      if (hasLateSentinel) 'sentinel',
+      if (isExact) 'exact=${base.name}',
+      if (isSubclass) 'subclass=${base.name}',
+      if (isSubtype) 'subtype=${base.name}',
+    ], '|');
+    buffer.write(']');
+    return buffer.toString();
   }
 }
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 ec29cbe..213c62a 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
@@ -4,15 +4,15 @@
 
 part of masks;
 
-/// A type mask that wraps an other one, and delegate all its
+/// A type mask that wraps another one, and delegates all its
 /// implementation methods to it.
-abstract class ForwardingTypeMask implements TypeMask {
+abstract class ForwardingTypeMask extends TypeMask {
   TypeMask get forwardTo;
 
-  ForwardingTypeMask();
+  const ForwardingTypeMask();
 
   @override
-  bool get isEmptyOrNull => forwardTo.isEmptyOrNull;
+  bool get isEmptyOrFlagged => forwardTo.isEmptyOrFlagged;
   @override
   bool get isEmpty => forwardTo.isEmpty;
   @override
@@ -20,6 +20,10 @@
   @override
   bool get isNull => forwardTo.isNull;
   @override
+  bool get hasLateSentinel => forwardTo.hasLateSentinel;
+  @override
+  AbstractBool get isLateSentinel => forwardTo.isLateSentinel;
+  @override
   bool get isExact => forwardTo.isExact;
 
   @override
@@ -93,17 +97,29 @@
   }
 
   @override
-  TypeMask union(other, CommonMasks domain) {
+  TypeMask union(TypeMask other, CommonMasks domain) {
     if (this == other) {
       return this;
-    } else if (equalsDisregardNull(other)) {
-      return other.isNullable ? other : this;
-    } else if (other.isEmptyOrNull) {
-      return other.isNullable ? this.nullable() : this;
     }
-    return forwardTo.union(other, domain);
+    bool isNullable = this.isNullable || other.isNullable;
+    bool hasLateSentinel = this.hasLateSentinel || other.hasLateSentinel;
+    if (isEmptyOrFlagged) {
+      return other.withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
+    }
+    if (other.isEmptyOrFlagged) {
+      return withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
+    }
+    return _unionSpecialCases(other, domain,
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel) ??
+        forwardTo.union(other, domain);
   }
 
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+          {bool isNullable, bool hasLateSentinel}) =>
+      null;
+
   @override
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld) {
     return forwardTo.isDisjoint(other, closedWorld);
@@ -111,7 +127,11 @@
 
   @override
   TypeMask intersection(TypeMask other, CommonMasks domain) {
-    return forwardTo.intersection(other, domain);
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
+    if (forwardIntersection.isEmptyOrFlagged) return forwardIntersection;
+    return withFlags(
+        isNullable: forwardIntersection.isNullable,
+        hasLateSentinel: forwardIntersection.hasLateSentinel);
   }
 
   @override
@@ -130,28 +150,33 @@
     return forwardTo.locateSingleMember(selector, domain);
   }
 
-  bool equalsDisregardNull(other) {
-    if (other is! ForwardingTypeMask) return false;
-    if (forwardTo.isNullable) {
-      return forwardTo == other.forwardTo.nullable();
-    } else {
-      return forwardTo == other.forwardTo.nonNullable();
-    }
-  }
-
   @override
   bool operator ==(other) {
-    return equalsDisregardNull(other) && isNullable == other.isNullable;
+    if (identical(this, other)) return true;
+    if (other is! ForwardingTypeMask) return false;
+    return forwardTo == other.forwardTo;
   }
 
   @override
-  int get hashCode => throw "Subclass should implement hashCode getter";
+  int get hashCode => forwardTo.hashCode;
 }
 
 abstract class AllocationTypeMask extends ForwardingTypeMask {
+  const AllocationTypeMask();
+
   // The [ir.Node] where this type mask was created.
   ir.Node get allocationNode;
 
   // The [Entity] where this type mask was created.
   MemberEntity get allocationElement;
+
+  @override
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! AllocationTypeMask) return false;
+    return super == other && allocationNode == other.allocationNode;
+  }
+
+  @override
+  int get hashCode => Hashing.objectHash(allocationNode, super.hashCode);
 }
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 556be49..035fa9d 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
@@ -27,20 +27,20 @@
   // The key type of this map.
   final TypeMask keyType;
 
-  MapTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+  const MapTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
       this.keyType, this.valueType);
 
   /// Deserializes a [MapTypeMask] object from [source].
   factory MapTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
+    TypeMask forwardTo = TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask keyType = new TypeMask.readFromDataSource(source, domain);
-    TypeMask valueType = new TypeMask.readFromDataSource(source, domain);
+    TypeMask keyType = TypeMask.readFromDataSource(source, domain);
+    TypeMask valueType = TypeMask.readFromDataSource(source, domain);
     source.end(tag);
-    return new MapTypeMask(
+    return MapTypeMask(
         forwardTo, allocationNode, allocationElement, keyType, valueType);
   }
 
@@ -58,19 +58,20 @@
   }
 
   @override
-  TypeMask nullable() {
-    return isNullable
-        ? this
-        : new MapTypeMask(forwardTo.nullable(), allocationNode,
-            allocationElement, keyType, valueType);
-  }
-
-  @override
-  TypeMask nonNullable() {
-    return isNullable
-        ? new MapTypeMask(forwardTo.nonNullable(), allocationNode,
-            allocationElement, keyType, valueType)
-        : this;
+  MapTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    return MapTypeMask(
+        forwardTo.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel),
+        allocationNode,
+        allocationElement,
+        keyType,
+        valueType);
   }
 
   @override
@@ -81,30 +82,11 @@
   bool get isExact => true;
 
   @override
-  bool equalsDisregardNull(other) {
-    if (other is! MapTypeMask) return false;
-    return super.equalsDisregardNull(other) &&
-        allocationNode == other.allocationNode &&
-        keyType == other.keyType &&
-        valueType == other.valueType;
-  }
-
-  @override
-  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, CommonMasks domain) {
-    if (this == other) {
-      return this;
-    } else if (equalsDisregardNull(other)) {
-      return other.isNullable ? other : this;
-    } else if (other.isEmptyOrNull) {
-      return other.isNullable ? this.nullable() : this;
-    } else if (other.isMap &&
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+      {bool isNullable, bool hasLateSentinel}) {
+    assert(isNullable != null);
+    assert(hasLateSentinel != null);
+    if (other is MapTypeMask &&
         keyType != null &&
         other.keyType != null &&
         valueType != null &&
@@ -112,19 +94,19 @@
       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) {
+      return MapTypeMask(newForwardTo, null, null, newKeyType, newValueType);
+    }
+    if (other is DictionaryTypeMask) {
       // TODO(johnniwinther): Find another way to check this invariant that
       // doesn't need the compiler.
       assert(other.keyType ==
-          new TypeMask.nonNullExact(
+          TypeMask.nonNullExact(
               domain.commonElements.jsStringClass, domain._closedWorld));
       TypeMask newKeyType = keyType.union(other.keyType, domain);
       TypeMask newValueType =
-          other.typeMap.values.fold(keyType, (p, n) => p.union(n, domain));
+          other._typeMap.values.fold(keyType, (p, n) => p.union(n, domain));
       TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
-      MapTypeMask newMapTypeMask = new MapTypeMask(
+      MapTypeMask newMapTypeMask = MapTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
           allocationElement == other.allocationElement
@@ -133,19 +115,22 @@
           newKeyType,
           newValueType);
       return newMapTypeMask;
-    } else {
-      return forwardTo.union(other, domain);
     }
+    return null;
   }
 
   @override
-  bool operator ==(other) => super == other;
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! MapTypeMask) return false;
+    return super == other &&
+        keyType == other.keyType &&
+        valueType == other.valueType;
+  }
 
   @override
-  int get hashCode {
-    return computeHashCode(
-        allocationNode, isNullable, keyType, valueType, forwardTo);
-  }
+  int get hashCode => Hashing.objectHash(
+      valueType, Hashing.objectHash(keyType, super.hashCode));
 
   @override
   String toString() {
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
index 2ac07ca..999d317 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
@@ -45,6 +45,7 @@
   CommonElements get commonElements => _closedWorld.commonElements;
   DartTypes get dartTypes => _closedWorld.dartTypes;
 
+  TypeMask _internalTopType;
   TypeMask _dynamicType;
   TypeMask _nonNullType;
   TypeMask _nullType;
@@ -75,10 +76,10 @@
   TypeMask _unmodifiableArrayType;
   TypeMask _interceptorType;
 
-  /// Cache of [FlatTypeMask]s grouped by the 8 possible values of the
+  /// Cache of [FlatTypeMask]s grouped by the possible values of the
   /// `FlatTypeMask.flags` property.
-  final List<Map<ClassEntity, TypeMask>> _canonicalizedTypeMasks =
-      new List<Map<ClassEntity, TypeMask>>.filled(8, null);
+  final List<Map<ClassEntity, TypeMask>> _canonicalizedTypeMasks = List.filled(
+      _FlatTypeMaskKind.values.length << FlatTypeMask._USED_INDICES, null);
 
   /// Return the cached mask for [base] with the given flags, or
   /// calls [createMask] to create the mask and cache it.
@@ -89,126 +90,129 @@
   }
 
   @override
-  TypeMask get dynamicType => _dynamicType ??= new TypeMask.subclass(
-      _closedWorld.commonElements.objectClass, _closedWorld);
+  TypeMask get internalTopType => _internalTopType ??= TypeMask.subclass(
+      _closedWorld.commonElements.objectClass, _closedWorld,
+      hasLateSentinel: true);
 
   @override
-  TypeMask get nonNullType => _nonNullType ??= new TypeMask.nonNullSubclass(
+  TypeMask get dynamicType => _dynamicType ??=
+      TypeMask.subclass(_closedWorld.commonElements.objectClass, _closedWorld);
+
+  @override
+  TypeMask get nonNullType => _nonNullType ??= TypeMask.nonNullSubclass(
       _closedWorld.commonElements.objectClass, _closedWorld);
 
   @override
   TypeMask get intType => _intType ??=
-      new TypeMask.nonNullSubclass(commonElements.jsIntClass, _closedWorld);
+      TypeMask.nonNullSubclass(commonElements.jsIntClass, _closedWorld);
 
   @override
   TypeMask get uint32Type => _uint32Type ??=
-      new TypeMask.nonNullSubclass(commonElements.jsUInt32Class, _closedWorld);
+      TypeMask.nonNullSubclass(commonElements.jsUInt32Class, _closedWorld);
 
   @override
   TypeMask get uint31Type => _uint31Type ??=
-      new TypeMask.nonNullExact(commonElements.jsUInt31Class, _closedWorld);
+      TypeMask.nonNullExact(commonElements.jsUInt31Class, _closedWorld);
 
   @override
-  TypeMask get positiveIntType =>
-      _positiveIntType ??= new TypeMask.nonNullSubclass(
-          commonElements.jsPositiveIntClass, _closedWorld);
+  TypeMask get positiveIntType => _positiveIntType ??=
+      TypeMask.nonNullSubclass(commonElements.jsPositiveIntClass, _closedWorld);
 
   @override
   TypeMask get numNotIntType => _numNotIntType ??=
-      new TypeMask.nonNullExact(commonElements.jsNumNotIntClass, _closedWorld);
+      TypeMask.nonNullExact(commonElements.jsNumNotIntClass, _closedWorld);
 
   @override
   TypeMask get numType => _numType ??=
-      new TypeMask.nonNullSubclass(commonElements.jsNumberClass, _closedWorld);
+      TypeMask.nonNullSubclass(commonElements.jsNumberClass, _closedWorld);
 
   @override
   TypeMask get boolType => _boolType ??=
-      new TypeMask.nonNullExact(commonElements.jsBoolClass, _closedWorld);
+      TypeMask.nonNullExact(commonElements.jsBoolClass, _closedWorld);
 
   @override
   TypeMask get functionType => _functionType ??=
-      new TypeMask.nonNullSubtype(commonElements.functionClass, _closedWorld);
+      TypeMask.nonNullSubtype(commonElements.functionClass, _closedWorld);
 
   @override
   TypeMask get listType => _listType ??=
-      new TypeMask.nonNullSubtype(commonElements.jsArrayClass, _closedWorld);
+      TypeMask.nonNullSubtype(commonElements.jsArrayClass, _closedWorld);
 
   @override
-  TypeMask get constListType => _constListType ??= new TypeMask.nonNullExact(
+  TypeMask get constListType => _constListType ??= TypeMask.nonNullExact(
       commonElements.jsUnmodifiableArrayClass, _closedWorld);
 
   @override
   TypeMask get fixedListType => _fixedListType ??=
-      new TypeMask.nonNullExact(commonElements.jsFixedArrayClass, _closedWorld);
+      TypeMask.nonNullExact(commonElements.jsFixedArrayClass, _closedWorld);
 
   @override
-  TypeMask get growableListType =>
-      _growableListType ??= new TypeMask.nonNullExact(
-          commonElements.jsExtendableArrayClass, _closedWorld);
+  TypeMask get growableListType => _growableListType ??= TypeMask.nonNullExact(
+      commonElements.jsExtendableArrayClass, _closedWorld);
 
   @override
   TypeMask get setType => _setType ??=
-      new TypeMask.nonNullSubtype(commonElements.setLiteralClass, _closedWorld);
+      TypeMask.nonNullSubtype(commonElements.setLiteralClass, _closedWorld);
 
   @override
-  TypeMask get constSetType => _constSetType ??= new TypeMask.nonNullSubtype(
+  TypeMask get constSetType => _constSetType ??= TypeMask.nonNullSubtype(
       commonElements.constSetLiteralClass, _closedWorld);
 
   @override
   TypeMask get mapType => _mapType ??=
-      new TypeMask.nonNullSubtype(commonElements.mapLiteralClass, _closedWorld);
+      TypeMask.nonNullSubtype(commonElements.mapLiteralClass, _closedWorld);
 
   @override
-  TypeMask get constMapType => _constMapType ??= new TypeMask.nonNullSubtype(
+  TypeMask get constMapType => _constMapType ??= TypeMask.nonNullSubtype(
       commonElements.constMapLiteralClass, _closedWorld);
 
   @override
   TypeMask get stringType => _stringType ??=
-      new TypeMask.nonNullExact(commonElements.jsStringClass, _closedWorld);
+      TypeMask.nonNullExact(commonElements.jsStringClass, _closedWorld);
 
   @override
   TypeMask get typeType => _typeType ??=
-      new TypeMask.nonNullExact(commonElements.typeLiteralClass, _closedWorld);
+      TypeMask.nonNullExact(commonElements.typeLiteralClass, _closedWorld);
 
   @override
   TypeMask get syncStarIterableType => _syncStarIterableType ??=
-      new TypeMask.nonNullExact(commonElements.syncStarIterable, _closedWorld);
+      TypeMask.nonNullExact(commonElements.syncStarIterable, _closedWorld);
 
   @override
-  TypeMask get asyncFutureType =>
-      _asyncFutureType ??= new TypeMask.nonNullExact(
-          commonElements.futureImplementation, _closedWorld);
+  TypeMask get asyncFutureType => _asyncFutureType ??=
+      TypeMask.nonNullExact(commonElements.futureImplementation, _closedWorld);
 
   @override
   TypeMask get asyncStarStreamType => _asyncStarStreamType ??=
-      new TypeMask.nonNullExact(commonElements.controllerStream, _closedWorld);
+      TypeMask.nonNullExact(commonElements.controllerStream, _closedWorld);
 
   // TODO(johnniwinther): Assert that the null type has been resolved.
   @override
-  TypeMask get nullType => _nullType ??= const TypeMask.empty();
+  TypeMask get nullType => _nullType ??= TypeMask.empty();
 
   @override
-  TypeMask get emptyType => const TypeMask.nonNullEmpty();
+  TypeMask get lateSentinelType => TypeMask.nonNullEmpty(hasLateSentinel: true);
 
-  TypeMask get indexablePrimitiveType =>
-      _indexablePrimitiveType ??= new TypeMask.nonNullSubtype(
-          commonElements.jsIndexableClass, _closedWorld);
+  @override
+  TypeMask get emptyType => TypeMask.nonNullEmpty();
+
+  TypeMask get indexablePrimitiveType => _indexablePrimitiveType ??=
+      TypeMask.nonNullSubtype(commonElements.jsIndexableClass, _closedWorld);
 
   TypeMask get readableArrayType => _readableArrayType ??=
-      new TypeMask.nonNullSubclass(commonElements.jsArrayClass, _closedWorld);
+      TypeMask.nonNullSubclass(commonElements.jsArrayClass, _closedWorld);
 
   @override
   TypeMask get mutableArrayType =>
-      _mutableArrayType ??= new TypeMask.nonNullSubclass(
+      _mutableArrayType ??= TypeMask.nonNullSubclass(
           commonElements.jsMutableArrayClass, _closedWorld);
 
   TypeMask get unmodifiableArrayType =>
-      _unmodifiableArrayType ??= new TypeMask.nonNullExact(
+      _unmodifiableArrayType ??= TypeMask.nonNullExact(
           commonElements.jsUnmodifiableArrayClass, _closedWorld);
 
-  TypeMask get interceptorType =>
-      _interceptorType ??= new TypeMask.nonNullSubclass(
-          commonElements.jsInterceptorClass, _closedWorld);
+  TypeMask get interceptorType => _interceptorType ??=
+      TypeMask.nonNullSubclass(commonElements.jsInterceptorClass, _closedWorld);
 
   @override
   AbstractBool isTypedArray(TypeMask mask) {
@@ -232,37 +236,37 @@
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
     return AbstractBool.maybeOrFalse(typedDataClass != null &&
         _closedWorld.classHierarchy.isInstantiated(typedDataClass) &&
-        intersects(mask, new TypeMask.subtype(typedDataClass, _closedWorld)) &&
+        intersects(mask, TypeMask.subtype(typedDataClass, _closedWorld)) &&
         intersects(
             mask,
-            new TypeMask.subtype(
+            TypeMask.subtype(
                 _closedWorld.commonElements.jsIndexingBehaviorInterface,
                 _closedWorld)));
   }
 
   @override
   TypeMask createNonNullExact(ClassEntity cls) {
-    return new TypeMask.nonNullExact(cls, _closedWorld);
+    return TypeMask.nonNullExact(cls, _closedWorld);
   }
 
   @override
   TypeMask createNullableExact(ClassEntity cls) {
-    return new TypeMask.exact(cls, _closedWorld);
+    return TypeMask.exact(cls, _closedWorld);
   }
 
   @override
   TypeMask createNonNullSubclass(ClassEntity cls) {
-    return new TypeMask.nonNullSubclass(cls, _closedWorld);
+    return TypeMask.nonNullSubclass(cls, _closedWorld);
   }
 
   @override
   TypeMask createNonNullSubtype(ClassEntity cls) {
-    return new TypeMask.nonNullSubtype(cls, _closedWorld);
+    return TypeMask.nonNullSubtype(cls, _closedWorld);
   }
 
   @override
   TypeMask createNullableSubtype(ClassEntity cls) {
-    return new TypeMask.subtype(cls, _closedWorld);
+    return TypeMask.subtype(cls, _closedWorld);
   }
 
   @override
@@ -395,6 +399,14 @@
   TypeMask includeNull(TypeMask mask) => mask.nullable();
 
   @override
+  TypeMask excludeLateSentinel(TypeMask mask) =>
+      mask.withFlags(hasLateSentinel: false);
+
+  @override
+  TypeMask includeLateSentinel(TypeMask mask) =>
+      mask.withFlags(hasLateSentinel: true);
+
+  @override
   AbstractBool containsType(TypeMask typeMask, ClassEntity cls) {
     return AbstractBool.trueOrFalse(_containsType(typeMask, cls));
   }
@@ -443,12 +455,8 @@
       AbstractBool.trueOrMaybe(value.isEmpty);
 
   @override
-  AbstractBool isExact(TypeMask value) =>
-      AbstractBool.trueOrMaybe(value.isExact && !value.isNullable);
-
-  @override
-  AbstractBool isExactOrNull(TypeMask value) =>
-      AbstractBool.trueOrMaybe(value.isExact || _isNull(value));
+  AbstractBool isExact(TypeMask value) => AbstractBool.trueOrMaybe(
+      value.isExact && !value.isNullable && !value.hasLateSentinel);
 
   @override
   ClassEntity getExactClass(TypeMask mask) {
@@ -470,7 +478,7 @@
   @override
   AbstractValue createPrimitiveValue(
       covariant TypeMask originalValue, PrimitiveConstantValue value) {
-    return new ValueTypeMask(originalValue, value);
+    return ValueTypeMask(originalValue, value);
   }
 
   @override
@@ -484,7 +492,8 @@
     }
   }
 
-  bool _isNull(TypeMask value) => value.isNull;
+  @override
+  AbstractBool isLateSentinel(TypeMask value) => value.isLateSentinel;
 
   @override
   AbstractBool isPrimitive(TypeMask value) {
@@ -492,7 +501,7 @@
         _canBePrimitiveArray(value) ||
         _canBePrimitiveBoolean(value) ||
         _canBePrimitiveString(value) ||
-        _isNull(value));
+        value.isNull);
   }
 
   @override
@@ -518,10 +527,6 @@
     return _containsType(value, commonElements.jsBoolClass);
   }
 
-  @override
-  AbstractBool isPrimitiveArray(TypeMask value) =>
-      AbstractBool.maybeOrFalse(_canBePrimitiveArray(value));
-
   bool _canBePrimitiveArray(TypeMask value) {
     return _containsType(value, commonElements.jsArrayClass) ||
         _containsType(value, commonElements.jsFixedArrayClass) ||
@@ -580,25 +585,29 @@
 
   @override
   AbstractBool isInteger(TypeMask value) {
-    return AbstractBool.trueOrMaybe(
-        value.containsOnlyInt(_closedWorld) && !value.isNullable);
+    return AbstractBool.trueOrMaybe(value.containsOnlyInt(_closedWorld) &&
+        !value.isNullable &&
+        !value.hasLateSentinel);
   }
 
   @override
   AbstractBool isUInt32(TypeMask value) {
     return AbstractBool.trueOrMaybe(!value.isNullable &&
+        !value.hasLateSentinel &&
         _isInstanceOfOrNull(value, commonElements.jsUInt32Class));
   }
 
   @override
   AbstractBool isUInt31(TypeMask value) {
     return AbstractBool.trueOrMaybe(!value.isNullable &&
+        !value.hasLateSentinel &&
         _isInstanceOfOrNull(value, commonElements.jsUInt31Class));
   }
 
   @override
   AbstractBool isPositiveInteger(TypeMask value) {
     return AbstractBool.trueOrMaybe(!value.isNullable &&
+        !value.hasLateSentinel &&
         _isInstanceOfOrNull(value, commonElements.jsPositiveIntClass));
   }
 
@@ -615,8 +624,9 @@
 
   @override
   AbstractBool isNumber(TypeMask value) {
-    return AbstractBool.trueOrMaybe(
-        value.containsOnlyNum(_closedWorld) && !value.isNullable);
+    return AbstractBool.trueOrMaybe(value.containsOnlyNum(_closedWorld) &&
+        !value.isNullable &&
+        !value.hasLateSentinel);
   }
 
   @override
@@ -629,8 +639,9 @@
 
   @override
   AbstractBool isBoolean(TypeMask value) {
-    return AbstractBool.trueOrMaybe(
-        value.containsOnlyBool(_closedWorld) && !value.isNullable);
+    return AbstractBool.trueOrMaybe(value.containsOnlyBool(_closedWorld) &&
+        !value.isNullable &&
+        !value.hasLateSentinel);
   }
 
   @override
@@ -643,7 +654,7 @@
 
   @override
   AbstractBool isTruthy(TypeMask value) {
-    if (value is ValueTypeMask && !value.isNullable) {
+    if (value is ValueTypeMask && !value.isNullable && !value.hasLateSentinel) {
       PrimitiveConstantValue constant = value.value;
       if (constant is BoolConstantValue) {
         return constant.boolValue ? AbstractBool.True : AbstractBool.False;
@@ -655,8 +666,9 @@
 
   @override
   AbstractBool isString(TypeMask value) {
-    return AbstractBool.trueOrMaybe(
-        value.containsOnlyString(_closedWorld) && !value.isNullable);
+    return AbstractBool.trueOrMaybe(value.containsOnlyString(_closedWorld) &&
+        !value.isNullable &&
+        !value.hasLateSentinel);
   }
 
   @override
@@ -672,7 +684,7 @@
     return _isIndexablePrimitive(value) ||
         _isNumberOrNull(value) ||
         _isBooleanOrNull(value) ||
-        _isNull(value);
+        value.isNull;
   }
 
   @override
@@ -731,13 +743,13 @@
       MemberEntity allocationElement,
       AbstractValue elementType,
       int length) {
-    return new ContainerTypeMask(
+    return ContainerTypeMask(
         forwardTo, allocationNode, allocationElement, elementType, length);
   }
 
   @override
   AbstractValue unionOfMany(Iterable<AbstractValue> values) {
-    TypeMask result = const TypeMask.nonNullEmpty();
+    TypeMask result = TypeMask.nonNullEmpty();
     for (TypeMask value in values) {
       result = result.union(value, this);
     }
@@ -748,18 +760,18 @@
   AbstractValue computeReceiver(Iterable<MemberEntity> members) {
     assert(_closedWorld.classHierarchy
         .hasAnyStrictSubclass(_closedWorld.commonElements.objectClass));
-    return new TypeMask.unionOf(
+    return TypeMask.unionOf(
         members.expand((MemberEntity element) {
           ClassEntity cls = element.enclosingClass;
           return [cls]..addAll(_closedWorld.mixinUsesOf(cls));
         }).map((cls) {
           if (_closedWorld.commonElements.jsNullClass == cls) {
-            return const TypeMask.empty();
+            return TypeMask.empty();
           } else if (_closedWorld.classHierarchy.isInstantiated(cls)) {
-            return new TypeMask.nonNullSubclass(cls, _closedWorld);
+            return TypeMask.nonNullSubclass(cls, _closedWorld);
           } else {
             // TODO(johnniwinther): Avoid the need for this case.
-            return const TypeMask.empty();
+            return TypeMask.empty();
           }
         }),
         this);
@@ -880,7 +892,7 @@
   @override
   AbstractValue createMapValue(AbstractValue forwardTo, Object allocationNode,
       MemberEntity allocationElement, AbstractValue key, AbstractValue value) {
-    return new MapTypeMask(
+    return MapTypeMask(
         forwardTo, allocationNode, allocationElement, key, value);
   }
 
@@ -892,14 +904,14 @@
       AbstractValue key,
       AbstractValue value,
       Map<String, AbstractValue> mappings) {
-    return new DictionaryTypeMask(
-        forwardTo, allocationNode, allocationElement, key, value, mappings);
+    return DictionaryTypeMask(forwardTo, allocationNode, allocationElement, key,
+        value, Map.from(mappings));
   }
 
   @override
   AbstractValue createSetValue(AbstractValue forwardTo, Object allocationNode,
       MemberEntity allocationElement, AbstractValue elementType) {
-    return new SetTypeMask(
+    return SetTypeMask(
         forwardTo, allocationNode, allocationElement, elementType);
   }
 
@@ -963,8 +975,8 @@
 
   @override
   TypeMask readAbstractValueFromDataSource(DataSource source) {
-    return source.readCached<TypeMask>(
-        () => new TypeMask.readFromDataSource(source, this));
+    return source
+        .readCached<TypeMask>(() => TypeMask.readFromDataSource(source, this));
   }
 
   @override
@@ -985,14 +997,21 @@
     //     can be really long and mess up the layout.
     // Capitalize Null to emphasize that it's the null type mask and not
     // a null value we accidentally printed out.
-    if (type.isEmptyOrNull) return type.isNullable ? 'Null' : 'Empty';
+    if (type.isEmpty) return 'Empty';
+    if (type.isEmptyOrFlagged) {
+      return [
+        if (type.isNullable) 'Null',
+        if (type.hasLateSentinel) '\$',
+      ].join('');
+    }
     String nullFlag = type.isNullable ? '?' : '';
     String subFlag = type.isExact
         ? ''
         : type.isSubclass
             ? '+'
             : '*';
-    return '${type.base.name}$nullFlag$subFlag';
+    String sentinelFlag = type.hasLateSentinel ? '\$' : '';
+    return '${type.base.name}$nullFlag$subFlag$sentinelFlag';
   }
   if (type is UnionTypeMask) {
     return type.disjointMasks.map((m) => formatType(dartTypes, m)).join(' | ');
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 cfe96da..bfa9098 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
@@ -24,19 +24,19 @@
   // The element type of this set.
   final TypeMask elementType;
 
-  SetTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+  const SetTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
       this.elementType);
 
   /// Deserializes a [SetTypeMask] object from [source].
   factory SetTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
+    TypeMask forwardTo = TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask elementType = new TypeMask.readFromDataSource(source, domain);
+    TypeMask elementType = TypeMask.readFromDataSource(source, domain);
     source.end(tag);
-    return new SetTypeMask(
+    return SetTypeMask(
         forwardTo, allocationNode, allocationElement, elementType);
   }
 
@@ -53,16 +53,20 @@
   }
 
   @override
-  TypeMask nullable() => isNullable
-      ? this
-      : new SetTypeMask(
-          forwardTo.nullable(), allocationNode, allocationElement, elementType);
-
-  @override
-  TypeMask nonNullable() => isNullable
-      ? new SetTypeMask(forwardTo.nonNullable(), allocationNode,
-          allocationElement, elementType)
-      : this;
+  SetTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    return SetTypeMask(
+        forwardTo.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel),
+        allocationNode,
+        allocationElement,
+        elementType);
+  }
 
   @override
   bool get isSet => true;
@@ -71,45 +75,29 @@
   bool get isExact => true;
 
   @override
-  bool equalsDisregardNull(other) {
-    if (other is! SetTypeMask) return false;
-    return super.equalsDisregardNull(other) &&
-        allocationNode == other.allocationNode &&
-        elementType == other.elementType;
-  }
-
-  @override
-  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, CommonMasks domain) {
-    if (this == other) {
-      return this;
-    } else if (equalsDisregardNull(other)) {
-      return other.isNullable ? other : this;
-    } else if (other.isEmptyOrNull) {
-      return other.isNullable ? this.nullable() : this;
-    } else if (other.isSet &&
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+      {bool isNullable, bool hasLateSentinel}) {
+    assert(isNullable != null);
+    assert(hasLateSentinel != null);
+    if (other is SetTypeMask &&
         elementType != null &&
         other.elementType != null) {
       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, domain);
+      return SetTypeMask(newForwardTo, null, null, newElementType);
     }
+    return null;
   }
 
   @override
-  bool operator ==(other) => super == other;
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! SetTypeMask) return false;
+    return super == other && elementType == other.elementType;
+  }
 
   @override
-  int get hashCode =>
-      computeHashCode(allocationNode, isNullable, elementType, forwardTo);
+  int get hashCode => Hashing.objectHash(elementType, super.hashCode);
 
   @override
   String toString() => 'Set($forwardTo, element: $elementType)';
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
index 7fd62a8..4702bdf 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
@@ -25,7 +25,7 @@
   bool needsNoSuchMethodHandling(Selector selector, JClosedWorld world) {
     if (isAll) {
       TypeMask mask =
-          new TypeMask.subclass(world.commonElements.objectClass, world);
+          TypeMask.subclass(world.commonElements.objectClass, world);
       return mask.needsNoSuchMethodHandling(selector, world);
     }
     for (TypeMask mask in _masks) {
@@ -44,7 +44,7 @@
       _masks = null;
       return true;
     }
-    _masks ??= new Set<TypeMask>();
+    _masks ??= {};
     return _masks.add(mask);
   }
 
@@ -65,12 +65,12 @@
 
   @override
   AbstractValueDomain createDomain(JClosedWorld closedWorld) {
-    return new CommonMasks(closedWorld);
+    return CommonMasks(closedWorld);
   }
 
   @override
   SelectorConstraintsStrategy createSelectorStrategy() {
-    return new TypeMaskSelectorStrategy();
+    return TypeMaskSelectorStrategy();
   }
 }
 
@@ -80,8 +80,7 @@
   @override
   UniverseSelectorConstraints createSelectorConstraints(
       Selector selector, Object initialConstraint) {
-    return new IncreasingTypeMaskSet()
-      ..addReceiverConstraint(initialConstraint);
+    return IncreasingTypeMaskSet()..addReceiverConstraint(initialConstraint);
   }
 
   @override
@@ -109,31 +108,34 @@
 /// operations on it are not guaranteed to be precise and they may
 /// yield conservative answers that contain too many classes.
 abstract class TypeMask implements AbstractValue {
-  factory TypeMask(
-      ClassEntity base, int kind, bool isNullable, CommonMasks domain) {
-    return new FlatTypeMask.normalized(
-        base, (kind << 1) | (isNullable ? 1 : 0), domain);
-  }
+  const TypeMask();
 
-  const factory TypeMask.empty() = FlatTypeMask.empty;
+  factory TypeMask.empty({bool hasLateSentinel = false}) =>
+      FlatTypeMask.empty(hasLateSentinel: hasLateSentinel);
 
-  factory TypeMask.exact(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.exact(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     assert(
         closedWorld.classHierarchy.isInstantiated(base),
         failedAt(
             base ?? CURRENT_ELEMENT_SPANNABLE,
             "Cannot create exact type mask for uninstantiated "
             "class $base.\n${closedWorld.classHierarchy.dump(base)}"));
-    return new FlatTypeMask.exact(base, closedWorld);
+    return FlatTypeMask.exact(base, closedWorld,
+        hasLateSentinel: hasLateSentinel);
   }
 
-  factory TypeMask.exactOrEmpty(ClassEntity base, JClosedWorld closedWorld) {
-    if (closedWorld.classHierarchy.isInstantiated(base))
-      return new FlatTypeMask.exact(base, closedWorld);
-    return const TypeMask.empty();
+  factory TypeMask.exactOrEmpty(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
+    if (closedWorld.classHierarchy.isInstantiated(base)) {
+      return FlatTypeMask.exact(base, closedWorld,
+          hasLateSentinel: hasLateSentinel);
+    }
+    return TypeMask.empty(hasLateSentinel: hasLateSentinel);
   }
 
-  factory TypeMask.subclass(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.subclass(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     assert(
         closedWorld.classHierarchy.isInstantiated(base),
         failedAt(
@@ -142,50 +144,62 @@
             "class $base.\n${closedWorld.classHierarchy.dump(base)}"));
     ClassEntity topmost = closedWorld.getLubOfInstantiatedSubclasses(base);
     if (topmost == null) {
-      return new TypeMask.empty();
+      return TypeMask.empty(hasLateSentinel: hasLateSentinel);
     } else if (closedWorld.classHierarchy.hasAnyStrictSubclass(topmost)) {
-      return new FlatTypeMask.subclass(topmost, closedWorld);
+      return FlatTypeMask.subclass(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     } else {
-      return new TypeMask.exact(topmost, closedWorld);
+      return TypeMask.exact(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
   }
 
-  factory TypeMask.subtype(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.subtype(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     ClassEntity topmost = closedWorld.getLubOfInstantiatedSubtypes(base);
     if (topmost == null) {
-      return new TypeMask.empty();
+      return TypeMask.empty(hasLateSentinel: hasLateSentinel);
     }
     if (closedWorld.classHierarchy.hasOnlySubclasses(topmost)) {
-      return new TypeMask.subclass(topmost, closedWorld);
+      return TypeMask.subclass(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
     if (closedWorld.classHierarchy.hasAnyStrictSubtype(topmost)) {
-      return new FlatTypeMask.subtype(topmost, closedWorld);
+      return FlatTypeMask.subtype(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     } else {
-      return new TypeMask.exact(topmost, closedWorld);
+      return TypeMask.exact(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
   }
 
-  const factory TypeMask.nonNullEmpty() = FlatTypeMask.nonNullEmpty;
+  factory TypeMask.nonNullEmpty({bool hasLateSentinel = false}) =>
+      FlatTypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
 
-  factory TypeMask.nonNullExact(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.nonNullExact(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     assert(
         closedWorld.classHierarchy.isInstantiated(base),
         failedAt(
             base ?? CURRENT_ELEMENT_SPANNABLE,
             "Cannot create exact type mask for uninstantiated "
             "class $base.\n${closedWorld.classHierarchy.dump(base)}"));
-    return new FlatTypeMask.nonNullExact(base, closedWorld);
+    return FlatTypeMask.nonNullExact(base, closedWorld,
+        hasLateSentinel: hasLateSentinel);
   }
 
   factory TypeMask.nonNullExactOrEmpty(
-      ClassEntity base, JClosedWorld closedWorld) {
+      ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     if (closedWorld.classHierarchy.isInstantiated(base)) {
-      return new FlatTypeMask.nonNullExact(base, closedWorld);
+      return FlatTypeMask.nonNullExact(base, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
-    return const TypeMask.nonNullEmpty();
+    return TypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
   }
 
-  factory TypeMask.nonNullSubclass(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.nonNullSubclass(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     assert(
         closedWorld.classHierarchy.isInstantiated(base),
         failedAt(
@@ -194,26 +208,32 @@
             "class $base.\n${closedWorld.classHierarchy.dump(base)}"));
     ClassEntity topmost = closedWorld.getLubOfInstantiatedSubclasses(base);
     if (topmost == null) {
-      return new TypeMask.nonNullEmpty();
+      return TypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
     } else if (closedWorld.classHierarchy.hasAnyStrictSubclass(topmost)) {
-      return new FlatTypeMask.nonNullSubclass(topmost, closedWorld);
+      return FlatTypeMask.nonNullSubclass(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     } else {
-      return new TypeMask.nonNullExact(topmost, closedWorld);
+      return TypeMask.nonNullExact(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
   }
 
-  factory TypeMask.nonNullSubtype(ClassEntity base, JClosedWorld closedWorld) {
+  factory TypeMask.nonNullSubtype(ClassEntity base, JClosedWorld closedWorld,
+      {bool hasLateSentinel = false}) {
     ClassEntity topmost = closedWorld.getLubOfInstantiatedSubtypes(base);
     if (topmost == null) {
-      return new TypeMask.nonNullEmpty();
+      return TypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
     }
     if (closedWorld.classHierarchy.hasOnlySubclasses(topmost)) {
-      return new TypeMask.nonNullSubclass(topmost, closedWorld);
+      return TypeMask.nonNullSubclass(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
     if (closedWorld.classHierarchy.hasAnyStrictSubtype(topmost)) {
-      return new FlatTypeMask.nonNullSubtype(topmost, closedWorld);
+      return FlatTypeMask.nonNullSubtype(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     } else {
-      return new TypeMask.nonNullExact(topmost, closedWorld);
+      return TypeMask.nonNullExact(topmost, closedWorld,
+          hasLateSentinel: hasLateSentinel);
     }
   }
 
@@ -226,21 +246,21 @@
     TypeMaskKind kind = source.readEnum(TypeMaskKind.values);
     switch (kind) {
       case TypeMaskKind.flat:
-        return new FlatTypeMask.readFromDataSource(source, domain);
+        return FlatTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.union:
-        return new UnionTypeMask.readFromDataSource(source, domain);
+        return UnionTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.container:
-        return new ContainerTypeMask.readFromDataSource(source, domain);
+        return ContainerTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.set:
-        return new SetTypeMask.readFromDataSource(source, domain);
+        return SetTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.map:
-        return new MapTypeMask.readFromDataSource(source, domain);
+        return MapTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.dictionary:
-        return new DictionaryTypeMask.readFromDataSource(source, domain);
+        return DictionaryTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.value:
-        return new ValueTypeMask.readFromDataSource(source, domain);
+        return ValueTypeMask.readFromDataSource(source, domain);
     }
-    throw new UnsupportedError("Unexpected TypeMaskKind $kind.");
+    throw UnsupportedError("Unexpected TypeMaskKind $kind.");
   }
 
   /// Serializes this [TypeMask] to [sink].
@@ -271,7 +291,7 @@
       TypeMask mask, JClosedWorld closedWorld) {
     mask = nonForwardingMask(mask);
     if (mask is FlatTypeMask) {
-      if (mask.isEmptyOrNull) return null;
+      if (mask.isEmptyOrFlagged) return null;
       if (mask.base == closedWorld.commonElements.nullClass) {
         return 'The class ${mask.base} is not canonicalized.';
       }
@@ -308,10 +328,17 @@
   }
 
   /// Returns a nullable variant of [this] type mask.
-  TypeMask nullable();
+  TypeMask nullable() => withFlags(isNullable: true);
 
   /// Returns a non-nullable variant of [this] type mask.
-  TypeMask nonNullable();
+  TypeMask nonNullable() => withFlags(isNullable: false);
+
+  /// Returns a variant of [this] type mask whose value is neither `null` nor
+  /// the late sentinel.
+  TypeMask withoutFlags() =>
+      withFlags(isNullable: false, hasLateSentinel: false);
+
+  TypeMask withFlags({bool isNullable, bool hasLateSentinel});
 
   /// Whether nothing matches this mask, not even null.
   bool get isEmpty;
@@ -322,8 +349,15 @@
   /// Whether the only possible value in this mask is Null.
   bool get isNull;
 
-  /// Whether [isEmpty] or [isNull] is true.
-  bool get isEmptyOrNull;
+  /// Whether [this] is a sentinel for an uninitialized late variable.
+  AbstractBool get isLateSentinel;
+
+  /// Whether a late sentinel is a valid value of this mask.
+  bool get hasLateSentinel => isLateSentinel.isPotentiallyTrue;
+
+  /// Whether [this] mask is empty or only represents values tracked by flags
+  /// (i.e. `null` and the late sentinel).
+  bool get isEmptyOrFlagged;
 
   /// Whether this mask only includes instances of an exact class, and none of
   /// it's subclasses or subtypes.
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 dddd0ed..3a647ea 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
@@ -4,7 +4,7 @@
 
 part of masks;
 
-class UnionTypeMask implements TypeMask {
+class UnionTypeMask extends TypeMask {
   /// Tag used for identifying serialized [UnionTypeMask] objects in a
   /// debugging data stream.
   static const String tag = 'union-type-mask';
@@ -22,21 +22,32 @@
   @override
   final bool isNullable;
 
-  UnionTypeMask._internal(this.disjointMasks, this.isNullable) {
-    assert(disjointMasks.length > 1);
-    assert(disjointMasks.every((TypeMask mask) => !mask.isUnion));
-    assert(disjointMasks.every((TypeMask mask) => !mask.isNullable));
-  }
+  @override
+  final bool hasLateSentinel;
+
+  @override
+  AbstractBool get isLateSentinel => AbstractBool.maybeOrFalse(hasLateSentinel);
+
+  UnionTypeMask._internal(this.disjointMasks,
+      {this.isNullable, this.hasLateSentinel})
+      : assert(isNullable != null),
+        assert(hasLateSentinel != null),
+        assert(disjointMasks.length > 1),
+        assert(disjointMasks.every((TypeMask mask) => !mask.isUnion)),
+        assert(disjointMasks.every((TypeMask mask) => !mask.isNullable)),
+        assert(disjointMasks.every((TypeMask mask) => !mask.hasLateSentinel));
 
   /// Deserializes a [UnionTypeMask] object from [source].
   factory UnionTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
     List<FlatTypeMask> disjointMasks =
-        source.readList(() => new TypeMask.readFromDataSource(source, domain));
+        source.readList(() => TypeMask.readFromDataSource(source, domain));
     bool isNullable = source.readBool();
+    bool hasLateSentinel = source.readBool();
     source.end(tag);
-    return new UnionTypeMask._internal(disjointMasks, isNullable);
+    return UnionTypeMask._internal(disjointMasks,
+        isNullable: isNullable, hasLateSentinel: hasLateSentinel);
   }
 
   /// Serializes this [UnionTypeMask] to [sink].
@@ -47,6 +58,7 @@
     sink.writeList(
         disjointMasks, (FlatTypeMask mask) => mask.writeToDataSink(sink));
     sink.writeBool(isNullable);
+    sink.writeBool(hasLateSentinel);
     sink.end(tag);
   }
 
@@ -55,15 +67,21 @@
         (mask) => TypeMask.assertIsNormalized(mask, domain._closedWorld)));
     List<FlatTypeMask> disjoint = <FlatTypeMask>[];
     bool isNullable = masks.any((TypeMask mask) => mask.isNullable);
+    bool hasLateSentinel = masks.any((TypeMask mask) => mask.hasLateSentinel);
     unionOfHelper(masks, disjoint, domain);
     if (disjoint.isEmpty)
-      return isNullable ? TypeMask.empty() : TypeMask.nonNullEmpty();
+      return isNullable
+          ? TypeMask.empty(hasLateSentinel: hasLateSentinel)
+          : TypeMask.nonNullEmpty(hasLateSentinel: hasLateSentinel);
     if (disjoint.length > MAX_UNION_LENGTH) {
-      return flatten(disjoint, isNullable, domain);
+      return flatten(disjoint, domain,
+          includeNull: isNullable, includeLateSentinel: hasLateSentinel);
     }
     if (disjoint.length == 1)
-      return isNullable ? disjoint[0].nullable() : disjoint[0];
-    UnionTypeMask union = new UnionTypeMask._internal(disjoint, isNullable);
+      return disjoint.single
+          .withFlags(isNullable: isNullable, hasLateSentinel: hasLateSentinel);
+    UnionTypeMask union = UnionTypeMask._internal(disjoint,
+        isNullable: isNullable, hasLateSentinel: hasLateSentinel);
     assert(TypeMask.assertIsNormalized(union, domain._closedWorld));
     return union;
   }
@@ -73,7 +91,7 @@
     // 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();
+      mask = TypeMask.nonForwardingMask(mask).withoutFlags();
       if (mask.isUnion) {
         UnionTypeMask union = mask;
         unionOfHelper(union.disjointMasks, disjoint, domain);
@@ -121,8 +139,11 @@
     }
   }
 
-  static TypeMask flatten(
-      List<FlatTypeMask> masks, bool includeNull, CommonMasks domain) {
+  static TypeMask flatten(List<FlatTypeMask> masks, CommonMasks domain,
+      {bool includeNull, bool includeLateSentinel}) {
+    assert(includeNull != null);
+    assert(includeLateSentinel != null);
+
     // TODO(johnniwinther): Move this computation to [ClosedWorld] and use the
     // class set structures.
     if (masks.isEmpty) throw ArgumentError.value(masks, 'masks');
@@ -136,7 +157,7 @@
 
     // Compute the best candidate and its kind.
     ClassEntity bestElement;
-    int bestKind;
+    _FlatTypeMaskKind bestKind;
     int bestSize;
     for (ClassEntity candidate in candidates) {
       bool isInstantiatedStrictSubclass(cls) =>
@@ -145,13 +166,13 @@
           domain._closedWorld.classHierarchy.isSubclassOf(cls, candidate);
 
       int size;
-      int kind;
+      _FlatTypeMaskKind kind;
       if (useSubclass && masksBases.every(isInstantiatedStrictSubclass)) {
         // If both [this] and [other] are subclasses of the supertype,
         // then we prefer to construct a subclass type mask because it
         // will always be at least as small as the corresponding
         // subtype type mask.
-        kind = FlatTypeMask.SUBCLASS;
+        kind = _FlatTypeMaskKind.subclass;
         // 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.
@@ -160,7 +181,7 @@
         assert(size <=
             domain._closedWorld.classHierarchy.strictSubtypeCount(candidate));
       } else {
-        kind = FlatTypeMask.SUBTYPE;
+        kind = _FlatTypeMaskKind.subtype;
         size = domain._closedWorld.classHierarchy.strictSubtypeCount(candidate);
       }
       // Update the best candidate if the new one is better.
@@ -170,56 +191,67 @@
         bestKind = kind;
       }
     }
-    return new TypeMask(bestElement, bestKind, includeNull, domain);
+    int flags = FlatTypeMask._computeFlags(bestKind,
+        isNullable: includeNull, hasLateSentinel: includeLateSentinel);
+    return FlatTypeMask.normalized(bestElement, flags, domain);
   }
 
   @override
-  TypeMask union(dynamic other, CommonMasks domain) {
+  TypeMask union(TypeMask other, CommonMasks domain) {
     other = TypeMask.nonForwardingMask(other);
+    bool isNullable = this.isNullable || other.isNullable;
+    bool hasLateSentinel = this.hasLateSentinel || other.hasLateSentinel;
     if (other is UnionTypeMask) {
-      if (_containsNonNullableUnion(other)) {
-        return other.isNullable ? nullable() : this;
+      if (_containsDisjointMasks(other)) {
+        return withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
-      if (other._containsNonNullableUnion(this)) {
-        return isNullable ? other.nullable() : other;
+      if (other._containsDisjointMasks(this)) {
+        return other.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
     } else {
-      if (disjointMasks.contains(other.nonNullable())) {
-        return other.isNullable ? nullable() : this;
+      if (disjointMasks.contains(other.withoutFlags())) {
+        return withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
     }
 
-    List<FlatTypeMask> newList = new List<FlatTypeMask>.of(disjointMasks);
-    if (!other.isUnion) {
-      newList.add(other);
-    } else {
-      assert(other is UnionTypeMask);
+    List<FlatTypeMask> newList = List<FlatTypeMask>.of(disjointMasks);
+    if (other is UnionTypeMask) {
       newList.addAll(other.disjointMasks);
+    } else {
+      newList.add(other);
     }
-    TypeMask newMask = new TypeMask.unionOf(newList, domain);
-    return isNullable || other.isNullable ? newMask.nullable() : newMask;
+    TypeMask newMask = TypeMask.unionOf(newList, domain);
+    return newMask.withFlags(
+        isNullable: isNullable, hasLateSentinel: hasLateSentinel);
   }
 
   @override
-  TypeMask intersection(dynamic other, CommonMasks domain) {
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
     other = TypeMask.nonForwardingMask(other);
+    bool isNullable = this.isNullable && other.isNullable;
+    bool hasLateSentinel = this.hasLateSentinel && other.hasLateSentinel;
     if (other is UnionTypeMask) {
-      if (_containsNonNullableUnion(other)) {
-        return isNullable ? other : other.nonNullable();
+      if (_containsDisjointMasks(other)) {
+        return other.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
-      if (other._containsNonNullableUnion(this)) {
-        return other.isNullable ? this : nonNullable();
+      if (other._containsDisjointMasks(this)) {
+        return withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
     } else {
-      TypeMask otherNonNullable = other.nonNullable();
-      if (disjointMasks.contains(otherNonNullable)) {
-        return isNullable ? other : otherNonNullable;
+      if (disjointMasks.contains(other.withoutFlags())) {
+        return other.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       }
     }
 
     List<TypeMask> intersections = <TypeMask>[];
     for (TypeMask current in disjointMasks) {
-      if (other.isUnion) {
+      if (other is UnionTypeMask) {
         if (other.disjointMasks.contains(current)) {
           intersections.add(current);
         } else {
@@ -232,12 +264,14 @@
       }
     }
     TypeMask newMask = TypeMask.unionOf(intersections, domain);
-    return isNullable && other.isNullable ? newMask.nullable() : newMask;
+    return newMask.withFlags(
+        isNullable: isNullable, hasLateSentinel: hasLateSentinel);
   }
 
   @override
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld) {
     if (isNullable && other.isNullable) return false;
+    if (hasLateSentinel && other.hasLateSentinel) return false;
     for (var current in disjointMasks) {
       if (!current.isDisjoint(other, closedWorld)) return false;
     }
@@ -245,21 +279,20 @@
   }
 
   @override
-  TypeMask nullable() {
-    if (isNullable) return this;
-    List<FlatTypeMask> newList = new List<FlatTypeMask>.of(disjointMasks);
-    return new UnionTypeMask._internal(newList, true);
+  UnionTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    List<FlatTypeMask> newList = List<FlatTypeMask>.of(disjointMasks);
+    return UnionTypeMask._internal(newList,
+        isNullable: isNullable, hasLateSentinel: hasLateSentinel);
   }
 
   @override
-  TypeMask nonNullable() {
-    if (!isNullable) return this;
-    List<FlatTypeMask> newList = new List<FlatTypeMask>.of(disjointMasks);
-    return new UnionTypeMask._internal(newList, false);
-  }
-
-  @override
-  bool get isEmptyOrNull => false;
+  bool get isEmptyOrFlagged => false;
   @override
   bool get isEmpty => false;
   @override
@@ -292,7 +325,8 @@
     assert(!other.isUnion);
     // Likewise, nullness should be covered.
     assert(isNullable || !other.isNullable);
-    other = other.nonNullable();
+    assert(hasLateSentinel || !other.hasLateSentinel);
+    other = other.withoutFlags();
     // Ensure the cheap test fails.
     assert(!disjointMasks.any((mask) => mask.containsMask(other, closedWorld)));
     // If we cover object, we should never get here.
@@ -321,6 +355,7 @@
   bool isInMask(TypeMask other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (isNullable && !other.isNullable) return false;
+    if (hasLateSentinel && !other.hasLateSentinel) return false;
     if (other.isUnion) {
       UnionTypeMask union = other;
       return disjointMasks.every((FlatTypeMask disjointMask) {
@@ -341,8 +376,9 @@
   bool containsMask(TypeMask other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (other.isNullable && !isNullable) return false;
+    if (other.hasLateSentinel && !hasLateSentinel) return false;
     if (other.isUnion) return other.isInMask(this, closedWorld);
-    other = other.nonNullable();
+    other = other.withoutFlags();
     bool contained =
         disjointMasks.any((mask) => mask.containsMask(other, closedWorld));
     if (PERFORM_EXTRA_CONTAINS_CHECK &&
@@ -419,7 +455,8 @@
   MemberEntity locateSingleMember(Selector selector, CommonMasks domain) {
     MemberEntity candidate;
     for (FlatTypeMask mask in disjointMasks) {
-      if (isNullable) mask = mask.nullable();
+      mask = mask.withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
       MemberEntity current = mask.locateSingleMember(selector, domain);
       if (current == null) {
         return null;
@@ -436,6 +473,7 @@
   String toString() {
     String masksString = [
       if (isNullable) 'null',
+      if (hasLateSentinel) 'sentinel',
       ...disjointMasks.map((TypeMask mask) => mask.toString()).toList()..sort(),
     ].join(", ");
     return 'Union($masksString)';
@@ -447,21 +485,19 @@
 
     return other is UnionTypeMask &&
         other.isNullable == isNullable &&
+        other.hasLateSentinel == hasLateSentinel &&
         other.disjointMasks.length == disjointMasks.length &&
-        _containsNonNullableUnion(other);
+        _containsDisjointMasks(other);
   }
 
   @override
   int get hashCode {
-    int hashCode = isNullable ? 86 : 43;
     // The order of the masks in [disjointMasks] must not affect the
     // hashCode.
-    for (var mask in disjointMasks) {
-      hashCode = (hashCode ^ mask.hashCode) & 0x3fffffff;
-    }
-    return hashCode;
+    return Hashing.setHash(
+        disjointMasks, Hashing.objectsHash(isNullable, hasLateSentinel));
   }
 
-  bool _containsNonNullableUnion(UnionTypeMask other) =>
+  bool _containsDisjointMasks(UnionTypeMask other) =>
       other.disjointMasks.every((e) => disjointMasks.contains(e));
 }
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 38486ab..62b6747 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
@@ -13,16 +13,16 @@
   final TypeMask forwardTo;
   final PrimitiveConstantValue value;
 
-  ValueTypeMask(this.forwardTo, this.value);
+  const ValueTypeMask(this.forwardTo, this.value);
 
   /// Deserializes a [ValueTypeMask] object from [source].
   factory ValueTypeMask.readFromDataSource(
       DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
+    TypeMask forwardTo = TypeMask.readFromDataSource(source, domain);
     ConstantValue constant = source.readConstant();
     source.end(tag);
-    return new ValueTypeMask(forwardTo, constant);
+    return ValueTypeMask(forwardTo, constant);
   }
 
   /// Serializes this [ValueTypeMask] to [sink].
@@ -36,40 +36,45 @@
   }
 
   @override
-  TypeMask nullable() {
-    return isNullable ? this : new ValueTypeMask(forwardTo.nullable(), value);
-  }
-
-  @override
-  TypeMask nonNullable() {
-    return isNullable
-        ? new ValueTypeMask(forwardTo.nonNullable(), value)
-        : this;
+  ValueTypeMask withFlags({bool isNullable, bool hasLateSentinel}) {
+    isNullable ??= this.isNullable;
+    hasLateSentinel ??= this.hasLateSentinel;
+    if (isNullable == this.isNullable &&
+        hasLateSentinel == this.hasLateSentinel) {
+      return this;
+    }
+    return ValueTypeMask(
+        forwardTo.withFlags(
+            isNullable: isNullable, hasLateSentinel: hasLateSentinel),
+        value);
   }
 
   @override
   bool get isValue => true;
 
   @override
-  bool equalsDisregardNull(other) {
+  TypeMask _unionSpecialCases(TypeMask other, CommonMasks domain,
+      {bool isNullable, bool hasLateSentinel}) {
+    assert(isNullable != null);
+    assert(hasLateSentinel != null);
+    if (other is ValueTypeMask &&
+        forwardTo.withoutFlags() == other.forwardTo.withoutFlags() &&
+        value == other.value) {
+      return withFlags(
+          isNullable: isNullable, hasLateSentinel: hasLateSentinel);
+    }
+    return null;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
     if (other is! ValueTypeMask) return false;
-    return super.equalsDisregardNull(other) && value == other.value;
+    return super == other && value == other.value;
   }
 
   @override
-  TypeMask intersection(TypeMask other, CommonMasks domain) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
-    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
-    return forwardIntersection.isNullable ? nullable() : nonNullable();
-  }
-
-  @override
-  bool operator ==(other) => super == other;
-
-  @override
-  int get hashCode {
-    return computeHashCode(value, isNullable, forwardTo);
-  }
+  int get hashCode => Hashing.objectHash(value, super.hashCode);
 
   @override
   String toString() {
diff --git a/pkg/compiler/lib/src/inferrer/types.dart b/pkg/compiler/lib/src/inferrer/types.dart
index 2345d53..c72c1f5 100644
--- a/pkg/compiler/lib/src/inferrer/types.dart
+++ b/pkg/compiler/lib/src/inferrer/types.dart
@@ -117,10 +117,9 @@
       InferredData inferredData) {
     bool isTrivial = source.readBool();
     if (isTrivial) {
-      return new TrivialGlobalTypeInferenceResults(
-          closedWorld, globalLocalsMap);
+      return TrivialGlobalTypeInferenceResults(closedWorld, globalLocalsMap);
     }
-    return new GlobalTypeInferenceResultsImpl.readFromDataSource(
+    return GlobalTypeInferenceResultsImpl.readFromDataSource(
         source, elementMap, closedWorld, globalLocalsMap, inferredData);
   }
 
@@ -186,7 +185,7 @@
       GlobalTypeInferenceResults results;
       if (compiler.disableTypeInference) {
         results =
-            new TrivialGlobalTypeInferenceResults(closedWorld, globalLocalsMap);
+            TrivialGlobalTypeInferenceResults(closedWorld, globalLocalsMap);
         _metrics = Metrics.none();
       } else {
         typesInferrerInternal ??= compiler.backendStrategy.createTypesInferrer(
@@ -233,9 +232,9 @@
       this.checkedForGrowableLists,
       this.returnsListElementTypeSet,
       this._allocatedLists)
-      : _deadFieldResult = new DeadFieldGlobalTypeInferenceResult(
-            closedWorld.abstractValueDomain),
-        _deadMethodResult = new DeadMethodGlobalTypeInferenceResult(
+      : _deadFieldResult =
+            DeadFieldGlobalTypeInferenceResult(closedWorld.abstractValueDomain),
+        _deadMethodResult = DeadMethodGlobalTypeInferenceResult(
             closedWorld.abstractValueDomain),
         _trivialParameterResult = closedWorld.abstractValueDomain.dynamicType;
 
@@ -245,12 +244,12 @@
       JClosedWorld closedWorld,
       GlobalLocalsMap globalLocalsMap,
       InferredData inferredData) {
-    source.registerLocalLookup(new LocalLookupImpl(globalLocalsMap));
+    source.registerLocalLookup(LocalLookupImpl(globalLocalsMap));
 
     source.begin(tag);
     Map<MemberEntity, GlobalTypeInferenceMemberResult> memberResults =
         source.readMemberMap((MemberEntity member) =>
-            new GlobalTypeInferenceMemberResult.readFromDataSource(
+            GlobalTypeInferenceMemberResult.readFromDataSource(
                 source,
                 elementMap.getMemberContextNode(member),
                 closedWorld.abstractValueDomain));
@@ -259,12 +258,12 @@
             .readAbstractValueFromDataSource(source));
     Set<ir.TreeNode> checkedForGrowableLists = source.readTreeNodes().toSet();
     Set<Selector> returnsListElementTypeSet =
-        source.readList(() => new Selector.readFromDataSource(source)).toSet();
+        source.readList(() => Selector.readFromDataSource(source)).toSet();
     Map<ir.TreeNode, AbstractValue> allocatedLists = source.readTreeNodeMap(
         () => closedWorld.abstractValueDomain
             .readAbstractValueFromDataSource(source));
     source.end(tag);
-    return new GlobalTypeInferenceResultsImpl(
+    return GlobalTypeInferenceResultsImpl(
         closedWorld,
         globalLocalsMap,
         inferredData,
@@ -442,7 +441,7 @@
       AbstractValueDomain abstractValueDomain) {
     source.begin(tag);
     GlobalTypeInferenceElementData data = source.readValueOrNull(() {
-      return new GlobalTypeInferenceElementData.readFromDataSource(
+      return GlobalTypeInferenceElementData.readFromDataSource(
           source, context, abstractValueDomain);
     });
     AbstractValue returnType =
@@ -452,7 +451,7 @@
     bool throwsAlways = source.readBool();
     bool isCalledOnce = source.readBool();
     source.end(tag);
-    return new GlobalTypeInferenceMemberResultImpl(data, returnType, type,
+    return GlobalTypeInferenceMemberResultImpl(data, returnType, type,
         throwsAlways: throwsAlways, isCalledOnce: isCalledOnce);
   }
 
@@ -488,12 +487,12 @@
   final TrivialGlobalTypeInferenceMemberResult _trivialMemberResult;
   final AbstractValue _trivialParameterResult;
   @override
-  final InferredData inferredData = new TrivialInferredData();
+  final InferredData inferredData = TrivialInferredData();
   @override
   final GlobalLocalsMap globalLocalsMap;
 
   TrivialGlobalTypeInferenceResults(this.closedWorld, this.globalLocalsMap)
-      : _trivialMemberResult = new TrivialGlobalTypeInferenceMemberResult(
+      : _trivialMemberResult = TrivialGlobalTypeInferenceMemberResult(
             closedWorld.abstractValueDomain.dynamicType),
         _trivialParameterResult = closedWorld.abstractValueDomain.dynamicType;
 
@@ -560,7 +559,7 @@
   @override
   void writeToDataSink(DataSink sink, ir.Member context,
       AbstractValueDomain abstractValueDomain) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "TrivialGlobalTypeInferenceMemberResult.writeToDataSink");
   }
 }
@@ -601,7 +600,7 @@
   @override
   void writeToDataSink(DataSink sink, ir.Member context,
       AbstractValueDomain abstractValueDomain) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "DeadFieldGlobalTypeInferenceResult.writeToDataSink");
   }
 }
@@ -642,7 +641,7 @@
   @override
   void writeToDataSink(DataSink sink, ir.Member context,
       AbstractValueDomain abstractValueDomain) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "DeadFieldGlobalTypeInferenceResult.writeToDataSink");
   }
 }
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 3bcfbef..75aa83d 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -77,8 +77,7 @@
 
   @override
   SourceSpan get sourceSpan {
-    SourceLocation location =
-        startPosition != null ? startPosition : innerPosition;
+    SourceLocation location = startPosition ?? innerPosition;
     Uri uri = location.sourceUri;
     int offset = location.offset;
     return SourceSpan(uri, offset, offset);
@@ -206,7 +205,7 @@
 
 /// Registry for mapping [js.Node]s to their [CodePosition].
 class CodePositionRecorder implements CodePositionMap {
-  Map<js.Node, CodePosition> _codePositionMap =
+  final Map<js.Node, CodePosition> _codePositionMap =
       Map<js.Node, CodePosition>.identity();
 
   void registerPositions(
@@ -1339,12 +1338,12 @@
 }
 
 class Coverage {
-  Set<js.Node> _nodesWithInfo = {};
+  final Set<js.Node> _nodesWithInfo = {};
   int _nodesWithInfoCount = 0;
-  Set<js.Node> _nodesWithoutInfo = {};
+  final Set<js.Node> _nodesWithoutInfo = {};
   int _nodesWithoutInfoCount = 0;
-  Map<Type, int> _nodesWithoutInfoCountByType = {};
-  Set<js.Node> _nodesWithoutOffset = {};
+  final Map<Type, int> _nodesWithoutInfoCountByType = {};
+  final Set<js.Node> _nodesWithoutOffset = {};
   int _nodesWithoutOffsetCount = 0;
 
   void registerNodeWithInfo(js.Node node) {
diff --git a/pkg/compiler/lib/src/io/source_map_builder.dart b/pkg/compiler/lib/src/io/source_map_builder.dart
index ff0238a..750a95d 100644
--- a/pkg/compiler/lib/src/io/source_map_builder.dart
+++ b/pkg/compiler/lib/src/io/source_map_builder.dart
@@ -362,7 +362,7 @@
 
 /// Map from line/column pairs to lists of [T] elements.
 class LineColumnMap<T> {
-  Map<int, Map<int, List<T>>> _map = {};
+  final Map<int, Map<int, List<T>>> _map = {};
 
   /// Returns the list of elements associated with ([line],[column]).
   List<T> _getList(int line, int column) {
diff --git a/pkg/compiler/lib/src/ir/annotations.dart b/pkg/compiler/lib/src/ir/annotations.dart
index fa04392..c476048 100644
--- a/pkg/compiler/lib/src/ir/annotations.dart
+++ b/pkg/compiler/lib/src/ir/annotations.dart
@@ -8,18 +8,19 @@
 import 'modular.dart';
 
 class IrAnnotationData {
-  Map<ir.Class, String> _nativeClassNames = {};
-  Set<ir.Member> _nativeMembers = {};
-  Map<ir.Member, String> _nativeMemberNames = {};
-  Map<ir.Member, List<String>> _createsAnnotations = {};
-  Map<ir.Member, List<String>> _returnsAnnotations = {};
+  final Map<ir.Class, String> _nativeClassNames = {};
+  final Set<ir.Member> _nativeMembers = {};
+  final Map<ir.Member, String> _nativeMemberNames = {};
+  final Map<ir.Member, List<String>> _createsAnnotations = {};
+  final Map<ir.Member, List<String>> _returnsAnnotations = {};
 
-  Map<ir.Library, String> _jsInteropLibraryNames = {};
-  Map<ir.Class, String> _jsInteropClassNames = {};
-  Set<ir.Class> _anonymousJsInteropClasses = {};
-  Map<ir.Member, String> _jsInteropMemberNames = {};
+  final Map<ir.Library, String> _jsInteropLibraryNames = {};
+  final Map<ir.Class, String> _jsInteropClassNames = {};
+  final Set<ir.Class> _anonymousJsInteropClasses = {};
+  final Map<ir.Member, String> _jsInteropMemberNames = {};
 
-  Map<ir.Member, List<PragmaAnnotationData>> _memberPragmaAnnotations = {};
+  final Map<ir.Member, List<PragmaAnnotationData>> _memberPragmaAnnotations =
+      {};
 
   // Returns the text from the `@Native(<text>)` annotation of [node], if any.
   String getNativeClassName(ir.Class node) => _nativeClassNames[node];
@@ -123,10 +124,10 @@
 
 IrAnnotationData processAnnotations(ModularCore modularCore) {
   ir.Component component = modularCore.component;
-  IrAnnotationData data = new IrAnnotationData();
+  IrAnnotationData data = IrAnnotationData();
 
   void processMember(ir.Member member) {
-    ir.StaticTypeContext staticTypeContext = new ir.StaticTypeContext(
+    ir.StaticTypeContext staticTypeContext = ir.StaticTypeContext(
         member, modularCore.constantEvaluator.typeEnvironment);
     List<PragmaAnnotationData> pragmaAnnotations;
     List<String> createsAnnotations;
@@ -180,7 +181,7 @@
 
   for (ir.Library library in component.libraries) {
     ir.StaticTypeContext staticTypeContext =
-        new ir.StaticTypeContext.forAnnotations(
+        ir.StaticTypeContext.forAnnotations(
             library, modularCore.constantEvaluator.typeEnvironment);
     for (ir.Expression annotation in library.annotations) {
       if (annotation is ir.ConstantExpression) {
@@ -324,7 +325,7 @@
   // TODO(johnniwinther): Support options objects when necessary.
   final bool hasOptions;
 
-  const PragmaAnnotationData(this.suffix, {this.hasOptions: false});
+  const PragmaAnnotationData(this.suffix, {this.hasOptions = false});
 
   String get name => 'dart2js:$suffix';
 
@@ -360,7 +361,7 @@
     String prefix = 'dart2js:';
     if (!name.startsWith(prefix)) return null;
     String suffix = name.substring(prefix.length);
-    return new PragmaAnnotationData(suffix,
+    return PragmaAnnotationData(suffix,
         hasOptions: optionsValue is! ir.NullConstant);
   }
   return null;
diff --git a/pkg/compiler/lib/src/ir/closure.dart b/pkg/compiler/lib/src/ir/closure.dart
index 39ceeb5..8954f46 100644
--- a/pkg/compiler/lib/src/ir/closure.dart
+++ b/pkg/compiler/lib/src/ir/closure.dart
@@ -37,7 +37,7 @@
   /// this scope. The items in this set are either of type VariableDeclaration
   /// or TypeParameterTypeWithContext.
   Set<ir.Node /* VariableDeclaration | TypeParameterTypeWithContext */ >
-      freeVariables = new Set<ir.Node>();
+      freeVariables = Set<ir.Node>();
 
   /// A set of type parameters that are defined in another scope and are only
   /// used if runtime type information is checked. If runtime type information
@@ -57,11 +57,11 @@
   /// performing runtime type checks. It is stored
   /// separately from [thisUsedAsFreeVariable] because we don't know at this
   /// stage if we will be needing type checks for this scope.
-  Set<VariableUse> thisUsedAsFreeVariableIfNeedsRti = new Set<VariableUse>();
+  Set<VariableUse> thisUsedAsFreeVariableIfNeedsRti = Set<VariableUse>();
 
   KernelScopeInfo(this.hasThisLocal)
-      : localsUsedInTryOrSync = new Set<ir.VariableDeclaration>(),
-        boxedVariables = new Set<ir.VariableDeclaration>(),
+      : localsUsedInTryOrSync = Set<ir.VariableDeclaration>(),
+        boxedVariables = Set<ir.VariableDeclaration>(),
         capturedVariablesAccessor = null;
 
   KernelScopeInfo.from(this.hasThisLocal, KernelScopeInfo info)
@@ -81,7 +81,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('KernelScopeInfo(this=$hasThisLocal,');
     sb.write('freeVriables=$freeVariables,');
     sb.write('localsUsedInTryOrSync={${localsUsedInTryOrSync.join(', ')}}');
@@ -132,7 +132,7 @@
             scope.hasThisLocal);
 
   // Silly hack because we don't have const sets.
-  static final Set<ir.VariableDeclaration> _empty = new Set();
+  static final Set<ir.VariableDeclaration> _empty = Set();
 
   bool get requiresContextBox => boxedVariables.isNotEmpty;
 }
@@ -293,25 +293,25 @@
         this.invocation = null;
 
   static const VariableUse explicit =
-      const VariableUse._simple(VariableUseKind.explicit);
+      VariableUse._simple(VariableUseKind.explicit);
 
   static const VariableUse localType =
-      const VariableUse._simple(VariableUseKind.localType);
+      VariableUse._simple(VariableUseKind.localType);
 
   static const VariableUse implicitCast =
-      const VariableUse._simple(VariableUseKind.implicitCast);
+      VariableUse._simple(VariableUseKind.implicitCast);
 
   static const VariableUse listLiteral =
-      const VariableUse._simple(VariableUseKind.listLiteral);
+      VariableUse._simple(VariableUseKind.listLiteral);
 
   static const VariableUse setLiteral =
-      const VariableUse._simple(VariableUseKind.setLiteral);
+      VariableUse._simple(VariableUseKind.setLiteral);
 
   static const VariableUse mapLiteral =
-      const VariableUse._simple(VariableUseKind.mapLiteral);
+      VariableUse._simple(VariableUseKind.mapLiteral);
 
   static const VariableUse fieldType =
-      const VariableUse._simple(VariableUseKind.fieldType);
+      VariableUse._simple(VariableUseKind.fieldType);
 
   @override
   int get hashCode =>
@@ -386,7 +386,7 @@
       typeDeclaration = typeDeclaration.parent;
       context = typeDeclaration;
     }
-    return new TypeVariableTypeWithContext.internal(
+    return TypeVariableTypeWithContext.internal(
         type, context, kind, typeDeclaration);
   }
 
@@ -395,17 +395,17 @@
 
   @override
   R accept<R>(ir.Visitor<R> v) {
-    throw new UnsupportedError('TypeVariableTypeWithContext.accept');
+    throw UnsupportedError('TypeVariableTypeWithContext.accept');
   }
 
   @override
   R accept1<R, A>(ir.Visitor1<R, A> v, A arg) {
-    throw new UnsupportedError('TypeVariableTypeWithContext.accept1');
+    throw UnsupportedError('TypeVariableTypeWithContext.accept1');
   }
 
   @override
   visitChildren(ir.Visitor v) {
-    throw new UnsupportedError('TypeVariableTypeWithContext.visitChildren');
+    throw UnsupportedError('TypeVariableTypeWithContext.visitChildren');
   }
 
   @override
diff --git a/pkg/compiler/lib/src/ir/constants.dart b/pkg/compiler/lib/src/ir/constants.dart
index 50cc0a6..6994046 100644
--- a/pkg/compiler/lib/src/ir/constants.dart
+++ b/pkg/compiler/lib/src/ir/constants.dart
@@ -20,8 +20,8 @@
 
   Dart2jsConstantEvaluator(
       ir.TypeEnvironment typeEnvironment, ReportErrorFunction reportError,
-      {Map<String, String> environment: const {},
-      bool supportReevaluationForTesting: false,
+      {Map<String, String> environment = const {},
+      bool supportReevaluationForTesting = false,
       ir.EvaluationMode evaluationMode})
       : _supportReevaluationForTesting = supportReevaluationForTesting,
         assert(evaluationMode != null),
@@ -29,7 +29,7 @@
             const Dart2jsConstantsBackend(supportsUnevaluatedConstants: false),
             environment,
             typeEnvironment,
-            new ErrorReporter(reportError),
+            ErrorReporter(reportError),
             enableTripleShift: true,
             evaluationMode: evaluationMode);
 
@@ -49,8 +49,8 @@
   ir.Constant evaluate(
       ir.StaticTypeContext staticTypeContext, ir.Expression node,
       {ir.TreeNode contextNode,
-      bool requireConstant: true,
-      bool replaceImplicitConstant: true}) {
+      bool requireConstant = true,
+      bool replaceImplicitConstant = true}) {
     errorReporter.requiresConstant = requireConstant;
     if (node is ir.ConstantExpression) {
       ir.Constant constant = node.constant;
@@ -189,27 +189,27 @@
 
   @override
   void visitChildren(ir.Visitor v) {
-    throw new UnsupportedError("ConstantReference.visitChildren");
+    throw UnsupportedError("ConstantReference.visitChildren");
   }
 
   @override
   R accept<R>(ir.TreeVisitor<R> v) {
-    throw new UnsupportedError("ConstantReference.accept");
+    throw UnsupportedError("ConstantReference.accept");
   }
 
   @override
   R accept1<R, A>(ir.TreeVisitor1<R, A> v, A arg) {
-    throw new UnsupportedError("ConstantReference.accept");
+    throw UnsupportedError("ConstantReference.accept");
   }
 
   @override
   transformChildren(ir.Transformer v) {
-    throw new UnsupportedError("ConstantReference.transformChildren");
+    throw UnsupportedError("ConstantReference.transformChildren");
   }
 
   @override
   transformOrRemoveChildren(ir.RemovingTransformer v) {
-    throw new UnsupportedError("ConstantReference.transformOrRemoveChildren");
+    throw UnsupportedError("ConstantReference.transformOrRemoveChildren");
   }
 
   @override
diff --git a/pkg/compiler/lib/src/ir/impact.dart b/pkg/compiler/lib/src/ir/impact.dart
index 16fbc15..f3d8702 100644
--- a/pkg/compiler/lib/src/ir/impact.dart
+++ b/pkg/compiler/lib/src/ir/impact.dart
@@ -7,6 +7,7 @@
 import 'package:kernel/type_environment.dart' as ir;
 
 import '../common.dart';
+import '../serialization/serialization.dart';
 import 'constants.dart';
 import 'impact_data.dart';
 import 'runtime_type_analysis.dart';
@@ -510,7 +511,7 @@
       // instantiated as int and String.
       registerNew(
           node.target,
-          new ir.InterfaceType(node.target.enclosingClass,
+          ir.InterfaceType(node.target.enclosingClass,
               node.target.enclosingLibrary.nonNullable, typeArguments),
           positionArguments,
           namedArguments,
@@ -678,7 +679,7 @@
   @override
   void handleConstantExpression(ir.ConstantExpression node) {
     ir.LibraryDependency import = getDeferredImport(node);
-    new ConstantImpactVisitor(this, import, node, staticTypeContext)
+    ConstantImpactVisitor(this, import, node, staticTypeContext)
         .visitConstant(node.constant);
   }
 }
@@ -696,8 +697,8 @@
       StaticTypeCacheImpl staticTypeCache,
       ir.ClassHierarchy classHierarchy,
       VariableScopeModel variableScopeModel,
-      {this.useAsserts: false,
-      this.inferEffectivelyFinalVariableTypes: true})
+      {this.useAsserts = false,
+      this.inferEffectivelyFinalVariableTypes = true})
       : super(staticTypeContext, staticTypeCache, classHierarchy,
             variableScopeModel);
 
@@ -706,8 +707,8 @@
       typeMapsForTesting = {};
     }
     node.accept(this);
-    return new ImpactBuilderData(
-        impactData, typeMapsForTesting, getStaticTypeCache());
+    return ImpactBuilderData(
+        node, impactData, typeMapsForTesting, getStaticTypeCache());
   }
 }
 
@@ -716,12 +717,32 @@
     arguments.named.map((n) => n.name).toList();
 
 class ImpactBuilderData {
+  static const String tag = 'ImpactBuilderData';
+
+  final ir.Member node;
   final ImpactData impactData;
   final Map<ir.Expression, TypeMap> typeMapsForTesting;
   final StaticTypeCache cachedStaticTypes;
 
-  ImpactBuilderData(
-      this.impactData, this.typeMapsForTesting, this.cachedStaticTypes);
+  ImpactBuilderData(this.node, this.impactData, this.typeMapsForTesting,
+      this.cachedStaticTypes);
+
+  factory ImpactBuilderData.fromDataSource(DataSource source) {
+    source.begin(tag);
+    var node = source.readMemberNode();
+    var data = ImpactData.fromDataSource(source);
+    var cache = StaticTypeCache.readFromDataSource(source, node);
+    source.end(tag);
+    return ImpactBuilderData(node, data, const {}, cache);
+  }
+
+  void toDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeMemberNode(node);
+    impactData.toDataSink(sink);
+    cachedStaticTypes.writeToDataSink(sink, node);
+    sink.end(tag);
+  }
 }
 
 class ConstantImpactVisitor extends ir.VisitOnceConstantVisitor {
@@ -735,7 +756,7 @@
 
   @override
   void defaultConstant(ir.Constant node) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "Unexpected constant ${node} (${node.runtimeType}).");
   }
 
@@ -774,7 +795,7 @@
     node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
       ir.Field field = reference.asField;
       registry.registerFieldConstantInitialization(
-          field, new ConstantReference(expression, value));
+          field, ConstantReference(expression, value));
       visitConstant(value);
     });
   }
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index f259a4f..f73b96a8f 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.dart
@@ -13,18 +13,18 @@
 
 /// [ImpactRegistry] that stores registered impact in an [ImpactData] object.
 abstract class ImpactRegistryMixin implements ImpactRegistry {
-  final ImpactDataImpl _data = new ImpactDataImpl();
+  final ImpactDataImpl _data = ImpactDataImpl();
 
   ImpactData get impactData => _data;
 
   void _registerFeature(_Feature feature) {
-    _data._features ??= new EnumSet<_Feature>();
+    _data._features ??= EnumSet<_Feature>();
     _data._features.add(feature);
   }
 
   void _registerTypeUse(ir.DartType type, _TypeUseKind kind) {
     _data._typeUses ??= [];
-    _data._typeUses.add(new _TypeUse(type, kind));
+    _data._typeUses.add(_TypeUse(type, kind));
   }
 
   @override
@@ -35,11 +35,8 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._superInitializers ??= [];
-    _data._superInitializers.add(new _SuperInitializer(
-        source,
-        target,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+    _data._superInitializers.add(_SuperInitializer(source, target,
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -58,40 +55,36 @@
   void registerSuperInvocation(ir.Member target, int positionalArguments,
       List<String> namedArguments, List<ir.DartType> typeArguments) {
     _data._superInvocations ??= [];
-    _data._superInvocations.add(new _SuperInvocation(
-        target,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+    _data._superInvocations.add(_SuperInvocation(target,
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
   void registerInstanceSet(
       ir.DartType receiverType, ClassRelation relation, ir.Member target) {
     _data._instanceSets ??= [];
-    _data._instanceSets
-        .add(new _InstanceAccess(receiverType, relation, target));
+    _data._instanceSets.add(_InstanceAccess(receiverType, relation, target));
   }
 
   @override
   void registerDynamicSet(
       ir.DartType receiverType, ClassRelation relation, ir.Name name) {
     _data._dynamicSets ??= [];
-    _data._dynamicSets.add(new _DynamicAccess(receiverType, relation, name));
+    _data._dynamicSets.add(_DynamicAccess(receiverType, relation, name));
   }
 
   @override
   void registerInstanceGet(
       ir.DartType receiverType, ClassRelation relation, ir.Member target) {
     _data._instanceGets ??= [];
-    _data._instanceGets
-        .add(new _InstanceAccess(receiverType, relation, target));
+    _data._instanceGets.add(_InstanceAccess(receiverType, relation, target));
   }
 
   @override
   void registerDynamicGet(
       ir.DartType receiverType, ClassRelation relation, ir.Name name) {
     _data._dynamicGets ??= [];
-    _data._dynamicGets.add(new _DynamicAccess(receiverType, relation, name));
+    _data._dynamicGets.add(_DynamicAccess(receiverType, relation, name));
   }
 
   @override
@@ -101,10 +94,8 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._functionInvocations ??= [];
-    _data._functionInvocations.add(new _FunctionInvocation(
-        receiverType,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+    _data._functionInvocations.add(_FunctionInvocation(receiverType,
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -116,12 +107,11 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._instanceInvocations ??= [];
-    _data._instanceInvocations.add(new _InstanceInvocation(
+    _data._instanceInvocations.add(_InstanceInvocation(
         receiverType,
         relation,
         target,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -133,12 +123,11 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._dynamicInvocations ??= [];
-    _data._dynamicInvocations.add(new _DynamicInvocation(
+    _data._dynamicInvocations.add(_DynamicInvocation(
         receiverType,
         relation,
         name,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -148,10 +137,8 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._localFunctionInvocations ??= [];
-    _data._localFunctionInvocations.add(new _LocalFunctionInvocation(
-        localFunction,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+    _data._localFunctionInvocations.add(_LocalFunctionInvocation(localFunction,
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -162,9 +149,9 @@
       List<ir.DartType> typeArguments,
       ir.LibraryDependency import) {
     _data._staticInvocations ??= [];
-    _data._staticInvocations.add(new _StaticInvocation(
+    _data._staticInvocations.add(_StaticInvocation(
         target,
-        new _CallStructure(positionalArguments, namedArguments, typeArguments),
+        _CallStructure(positionalArguments, namedArguments, typeArguments),
         import));
   }
 
@@ -178,10 +165,10 @@
       ir.LibraryDependency import,
       {bool isConst}) {
     _data._constructorInvocations ??= [];
-    _data._constructorInvocations.add(new _ConstructorInvocation(
+    _data._constructorInvocations.add(_ConstructorInvocation(
         constructor,
         type,
-        new _CallStructure(positionalArguments, namedArguments, typeArguments),
+        _CallStructure(positionalArguments, namedArguments, typeArguments),
         import,
         isConst: isConst));
   }
@@ -191,7 +178,7 @@
       ir.LibraryDependency import) {
     _data._constInstantiations ??= [];
     _data._constInstantiations
-        .add(new _ConstInstantiation(cls, typeArguments, import));
+        .add(_ConstInstantiation(cls, typeArguments, import));
   }
 
   @override
@@ -211,10 +198,8 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     _data._redirectingInitializers ??= [];
-    _data._redirectingInitializers.add(new _RedirectingInitializer(
-        constructor,
-        new _CallStructure(
-            positionalArguments, namedArguments, typeArguments)));
+    _data._redirectingInitializers.add(_RedirectingInitializer(constructor,
+        _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
   @override
@@ -238,7 +223,7 @@
   @override
   void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import) {
     _data._typeLiterals ??= [];
-    _data._typeLiterals.add(new _TypeLiteral(type, import));
+    _data._typeLiterals.add(_TypeLiteral(type, import));
   }
 
   @override
@@ -260,7 +245,7 @@
   void registerAsyncForIn(ir.DartType iterableType, ir.DartType iteratorType,
       ClassRelation iteratorClassRelation) {
     _data._forInData ??= [];
-    _data._forInData.add(new _ForInData(
+    _data._forInData.add(_ForInData(
         iterableType, iteratorType, iteratorClassRelation,
         isAsync: true));
   }
@@ -269,7 +254,7 @@
   void registerSyncForIn(ir.DartType iterableType, ir.DartType iteratorType,
       ClassRelation iteratorClassRelation) {
     _data._forInData ??= [];
-    _data._forInData.add(new _ForInData(
+    _data._forInData.add(_ForInData(
         iterableType, iteratorType, iteratorClassRelation,
         isAsync: false));
   }
@@ -330,7 +315,7 @@
       ir.FunctionType expressionType, List<ir.DartType> typeArguments) {
     _data._genericInstantiations ??= [];
     _data._genericInstantiations
-        .add(new _GenericInstantiation(expressionType, typeArguments));
+        .add(_GenericInstantiation(expressionType, typeArguments));
   }
 
   @override
@@ -343,28 +328,28 @@
   @override
   void registerStaticSet(ir.Member member, ir.LibraryDependency import) {
     _data._staticSets ??= [];
-    _data._staticSets.add(new _StaticAccess(member, import));
+    _data._staticSets.add(_StaticAccess(member, import));
   }
 
   @override
   void registerStaticGet(ir.Member member, ir.LibraryDependency import) {
     _data._staticGets ??= [];
-    _data._staticGets.add(new _StaticAccess(member, import));
+    _data._staticGets.add(_StaticAccess(member, import));
   }
 
   @override
   void registerStaticTearOff(
       ir.Procedure procedure, ir.LibraryDependency import) {
     _data._staticTearOffs ??= [];
-    _data._staticTearOffs.add(new _StaticAccess(procedure, import));
+    _data._staticTearOffs.add(_StaticAccess(procedure, import));
   }
 
   @override
   void registerMapLiteral(ir.DartType keyType, ir.DartType valueType,
       {bool isConst, bool isEmpty}) {
     _data._mapLiterals ??= [];
-    _data._mapLiterals.add(new _MapLiteral(keyType, valueType,
-        isConst: isConst, isEmpty: isEmpty));
+    _data._mapLiterals.add(
+        _MapLiteral(keyType, valueType, isConst: isConst, isEmpty: isEmpty));
   }
 
   @override
@@ -372,7 +357,7 @@
       {bool isConst, bool isEmpty}) {
     _data._listLiterals ??= [];
     _data._listLiterals.add(
-        new _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
+        _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
   }
 
   @override
@@ -380,7 +365,7 @@
       {bool isConst, bool isEmpty}) {
     _data._setLiterals ??= [];
     _data._setLiterals.add(
-        new _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
+        _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
   }
 
   @override
@@ -425,7 +410,7 @@
       ir.DartType receiverType, ir.DartType argumentType) {
     _data._runtimeTypeUses ??= [];
     _data._runtimeTypeUses
-        .add(new _RuntimeTypeUse(node, kind, receiverType, argumentType));
+        .add(_RuntimeTypeUse(node, kind, receiverType, argumentType));
   }
 
   @override
@@ -529,90 +514,85 @@
   ImpactDataImpl.fromDataSource(DataSource source) {
     source.begin(tag);
     _superInitializers = source.readList(
-        () => new _SuperInitializer.fromDataSource(source),
+        () => _SuperInitializer.fromDataSource(source),
         emptyAsNull: true);
     _superSets =
         source.readList(() => source.readMemberNode(), emptyAsNull: true);
     _superGets =
         source.readList(() => source.readMemberNode(), emptyAsNull: true);
     _superInvocations = source.readList(
-        () => new _SuperInvocation.fromDataSource(source),
+        () => _SuperInvocation.fromDataSource(source),
         emptyAsNull: true);
     _instanceSets = source.readList(
-        () => new _InstanceAccess.fromDataSource(source),
+        () => _InstanceAccess.fromDataSource(source),
         emptyAsNull: true);
-    _dynamicSets = source.readList(
-        () => new _DynamicAccess.fromDataSource(source),
+    _dynamicSets = source.readList(() => _DynamicAccess.fromDataSource(source),
         emptyAsNull: true);
     _instanceGets = source.readList(
-        () => new _InstanceAccess.fromDataSource(source),
+        () => _InstanceAccess.fromDataSource(source),
         emptyAsNull: true);
-    _dynamicGets = source.readList(
-        () => new _DynamicAccess.fromDataSource(source),
+    _dynamicGets = source.readList(() => _DynamicAccess.fromDataSource(source),
         emptyAsNull: true);
     _functionInvocations = source.readList(
-        () => new _FunctionInvocation.fromDataSource(source),
+        () => _FunctionInvocation.fromDataSource(source),
         emptyAsNull: true);
     _instanceInvocations = source.readList(
-        () => new _InstanceInvocation.fromDataSource(source),
+        () => _InstanceInvocation.fromDataSource(source),
         emptyAsNull: true);
     _dynamicInvocations = source.readList(
-        () => new _DynamicInvocation.fromDataSource(source),
+        () => _DynamicInvocation.fromDataSource(source),
         emptyAsNull: true);
     _localFunctionInvocations = source.readList(
-        () => new _LocalFunctionInvocation.fromDataSource(source),
+        () => _LocalFunctionInvocation.fromDataSource(source),
         emptyAsNull: true);
     _staticInvocations = source.readList(
-        () => new _StaticInvocation.fromDataSource(source),
+        () => _StaticInvocation.fromDataSource(source),
         emptyAsNull: true);
     _constructorInvocations = source.readList(
-        () => new _ConstructorInvocation.fromDataSource(source),
+        () => _ConstructorInvocation.fromDataSource(source),
         emptyAsNull: true);
-    _features = new EnumSet<_Feature>.fromValue(source.readInt());
-    _typeUses = source.readList(() => new _TypeUse.fromDataSource(source),
+    _features = EnumSet<_Feature>.fromValue(source.readInt());
+    _typeUses = source.readList(() => _TypeUse.fromDataSource(source),
         emptyAsNull: true);
     _redirectingInitializers = source.readList(
-        () => new _RedirectingInitializer.fromDataSource(source),
+        () => _RedirectingInitializer.fromDataSource(source),
         emptyAsNull: true);
-    _fieldInitializers = source.readMemberNodes(emptyAsNull: true);
+    _fieldInitializers = source.readMemberNodes<ir.Field>(emptyAsNull: true);
     _fieldConstantInitializers =
         source.readMemberNodeMap(source.readTreeNodes, emptyAsNull: true);
-    _typeLiterals = source.readList(
-        () => new _TypeLiteral.fromDataSource(source),
+    _typeLiterals = source.readList(() => _TypeLiteral.fromDataSource(source),
         emptyAsNull: true);
     _localFunctions = source.readTreeNodes(emptyAsNull: true);
     _genericInstantiations = source.readList(
-        () => new _GenericInstantiation.fromDataSource(source),
+        () => _GenericInstantiation.fromDataSource(source),
         emptyAsNull: true);
-    _staticSets = source.readList(
-        () => new _StaticAccess.fromDataSource(source),
+    _staticSets = source.readList(() => _StaticAccess.fromDataSource(source),
         emptyAsNull: true);
-    _staticGets = source.readList(
-        () => new _StaticAccess.fromDataSource(source),
+    _staticGets = source.readList(() => _StaticAccess.fromDataSource(source),
         emptyAsNull: true);
     _staticTearOffs = source.readList(
-        () => new _StaticAccess.fromDataSource(source),
+        () => _StaticAccess.fromDataSource(source),
         emptyAsNull: true);
-    _mapLiterals = source.readList(() => new _MapLiteral.fromDataSource(source),
+    _mapLiterals = source.readList(() => _MapLiteral.fromDataSource(source),
         emptyAsNull: true);
     _listLiterals = source.readList(
-        () => new _ContainerLiteral.fromDataSource(source),
+        () => _ContainerLiteral.fromDataSource(source),
         emptyAsNull: true);
     _setLiterals = source.readList(
-        () => new _ContainerLiteral.fromDataSource(source),
+        () => _ContainerLiteral.fromDataSource(source),
         emptyAsNull: true);
-    _symbolLiterals = source.readStrings(emptyAsNull: true).toSet();
-    _stringLiterals = source.readStrings(emptyAsNull: true).toSet();
+    _symbolLiterals = source.readStrings(emptyAsNull: true)?.toSet();
+    _stringLiterals = source.readStrings(emptyAsNull: true)?.toSet();
     _boolLiterals =
-        source.readList(() => source.readBool(), emptyAsNull: true).toSet();
+        source.readList(() => source.readBool(), emptyAsNull: true)?.toSet();
     _doubleLiterals = source
         .readList(() => source.readDoubleValue(), emptyAsNull: true)
-        .toSet();
+        ?.toSet();
     _intLiterals = source
         .readList(() => source.readIntegerValue(), emptyAsNull: true)
-        .toSet();
+        ?.toSet();
     _runtimeTypeUses = source.readList(
-        () => new _RuntimeTypeUse.fromDataSource(source),
+        () => _RuntimeTypeUse.fromDataSource(source),
         emptyAsNull: true);
 
     // TODO(johnniwinther): Remove these when CFE provides constants.
@@ -1063,7 +1043,7 @@
 
   factory _CallStructure(int positionalArguments, List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    return new _CallStructure.internal(
+    return _CallStructure.internal(
         typeArguments, positionalArguments, namedArguments);
   }
 
@@ -1073,7 +1053,7 @@
     int positionalArguments = source.readInt();
     List<String> namedArguments = source.readStrings();
     source.end(tag);
-    return new _CallStructure.internal(
+    return _CallStructure.internal(
         typeArguments, positionalArguments, namedArguments);
   }
 
@@ -1099,9 +1079,9 @@
     source.begin(tag);
     ir.Constructor sourceConstructor = source.readMemberNode();
     ir.Constructor targetConstructor = source.readMemberNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _SuperInitializer(
+    return _SuperInitializer(
         sourceConstructor, targetConstructor, callStructure);
   }
 
@@ -1125,9 +1105,9 @@
   factory _SuperInvocation.fromDataSource(DataSource source) {
     source.begin(tag);
     ir.Member member = source.readMemberNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _SuperInvocation(member, callStructure);
+    return _SuperInvocation(member, callStructure);
   }
 
   void toDataSink(DataSink sink) {
@@ -1153,7 +1133,7 @@
     ClassRelation classRelation = source.readEnum(ClassRelation.values);
     ir.Member target = source.readMemberNode();
     source.end(tag);
-    return new _InstanceAccess(receiverType, classRelation, target);
+    return _InstanceAccess(receiverType, classRelation, target);
   }
 
   void toDataSink(DataSink sink) {
@@ -1180,7 +1160,7 @@
     ClassRelation classRelation = source.readEnum(ClassRelation.values);
     ir.Name name = source.readName();
     source.end(tag);
-    return new _DynamicAccess(receiverType, classRelation, name);
+    return _DynamicAccess(receiverType, classRelation, name);
   }
 
   void toDataSink(DataSink sink) {
@@ -1203,9 +1183,9 @@
   factory _FunctionInvocation.fromDataSource(DataSource source) {
     source.begin(tag);
     ir.DartType receiverType = source.readDartTypeNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _FunctionInvocation(receiverType, callStructure);
+    return _FunctionInvocation(receiverType, callStructure);
   }
 
   void toDataSink(DataSink sink) {
@@ -1232,9 +1212,9 @@
     ir.DartType receiverType = source.readDartTypeNode();
     ClassRelation classRelation = source.readEnum(ClassRelation.values);
     ir.Member target = source.readMemberNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _InstanceInvocation(
+    return _InstanceInvocation(
         receiverType, classRelation, target, callStructure);
   }
 
@@ -1264,10 +1244,9 @@
     ir.DartType receiverType = source.readDartTypeNode();
     ClassRelation classRelation = source.readEnum(ClassRelation.values);
     ir.Name name = source.readName();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _DynamicInvocation(
-        receiverType, classRelation, name, callStructure);
+    return _DynamicInvocation(receiverType, classRelation, name, callStructure);
   }
 
   void toDataSink(DataSink sink) {
@@ -1291,9 +1270,9 @@
   factory _LocalFunctionInvocation.fromDataSource(DataSource source) {
     source.begin(tag);
     ir.FunctionDeclaration localFunction = source.readTreeNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _LocalFunctionInvocation(localFunction, callStructure);
+    return _LocalFunctionInvocation(localFunction, callStructure);
   }
 
   void toDataSink(DataSink sink) {
@@ -1316,10 +1295,10 @@
   factory _StaticInvocation.fromDataSource(DataSource source) {
     source.begin(tag);
     ir.Procedure target = source.readMemberNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
-    return new _StaticInvocation(target, callStructure, import);
+    return _StaticInvocation(target, callStructure, import);
   }
 
   void toDataSink(DataSink sink) {
@@ -1348,11 +1327,11 @@
     source.begin(tag);
     ir.Member constructor = source.readMemberNode();
     ir.InterfaceType type = source.readDartTypeNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
     bool isConst = source.readBool();
     source.end(tag);
-    return new _ConstructorInvocation(constructor, type, callStructure, import,
+    return _ConstructorInvocation(constructor, type, callStructure, import,
         isConst: isConst);
   }
 
@@ -1401,7 +1380,7 @@
     ir.DartType type = source.readDartTypeNode();
     _TypeUseKind kind = source.readEnum(_TypeUseKind.values);
     source.end(tag);
-    return new _TypeUse(type, kind);
+    return _TypeUse(type, kind);
   }
 
   void toDataSink(DataSink sink) {
@@ -1434,9 +1413,9 @@
   factory _RedirectingInitializer.fromDataSource(DataSource source) {
     source.begin(tag);
     ir.Constructor constructor = source.readMemberNode();
-    _CallStructure callStructure = new _CallStructure.fromDataSource(source);
+    _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
-    return new _RedirectingInitializer(constructor, callStructure);
+    return _RedirectingInitializer(constructor, callStructure);
   }
 
   void toDataSink(DataSink sink) {
@@ -1460,7 +1439,7 @@
     ir.DartType type = source.readDartTypeNode();
     ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
-    return new _TypeLiteral(type, import);
+    return _TypeLiteral(type, import);
   }
 
   void toDataSink(DataSink sink) {
@@ -1484,7 +1463,7 @@
     ir.FunctionType expressionType = source.readDartTypeNode();
     List<ir.DartType> typeArguments = source.readDartTypeNodes();
     source.end(tag);
-    return new _GenericInstantiation(expressionType, typeArguments);
+    return _GenericInstantiation(expressionType, typeArguments);
   }
 
   void toDataSink(DataSink sink) {
@@ -1508,7 +1487,7 @@
     ir.Member target = source.readMemberNode();
     ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
-    return new _StaticAccess(target, import);
+    return _StaticAccess(target, import);
   }
 
   void toDataSink(DataSink sink) {
@@ -1563,8 +1542,8 @@
     ir.DartType elementType = source.readDartTypeNode();
     bool isConst = source.readBool();
     bool isEmpty = source.readBool();
-    return new _ContainerLiteral(elementType,
-        isConst: isConst, isEmpty: isEmpty);
+    source.end(tag);
+    return _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty);
   }
 
   void toDataSink(DataSink sink) {
@@ -1594,7 +1573,8 @@
     RuntimeTypeUseKind kind = source.readEnum(RuntimeTypeUseKind.values);
     ir.DartType receiverType = source.readDartTypeNode();
     ir.DartType argumentType = source.readDartTypeNode(allowNull: true);
-    return new _RuntimeTypeUse(node, kind, receiverType, argumentType);
+    source.end(tag);
+    return _RuntimeTypeUse(node, kind, receiverType, argumentType);
   }
 
   void toDataSink(DataSink sink) {
diff --git a/pkg/compiler/lib/src/ir/modular.dart b/pkg/compiler/lib/src/ir/modular.dart
index ed49fcb..a924f16 100644
--- a/pkg/compiler/lib/src/ir/modular.dart
+++ b/pkg/compiler/lib/src/ir/modular.dart
@@ -3,8 +3,21 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/class_hierarchy.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
 
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir
+    show LocatedMessage;
+
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/messages.dart';
+import '../diagnostics/source_span.dart';
+import '../kernel/element_map_impl.dart';
+import '../environment.dart';
+import '../ir/static_type.dart';
 import '../js_backend/annotations.dart';
+import '../options.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 import 'annotations.dart';
 import 'constants.dart';
@@ -32,3 +45,101 @@
   ModularMemberData getModularMemberData(
       ir.Member node, EnumSet<PragmaAnnotation> pragmaAnnotations);
 }
+
+/// Data computed for an entire compilation module.
+class ModuleData {
+  static const String tag = 'ModuleData';
+
+  // TODO(joshualitt) Support serializing ModularMemberData;
+  final Map<ir.Member, ImpactBuilderData> impactData;
+
+  ModuleData(this.impactData);
+
+  factory ModuleData.fromDataSource(DataSource source) {
+    source.begin(tag);
+    var impactData = source
+        .readMemberNodeMap(() => ImpactBuilderData.fromDataSource(source));
+    source.end(tag);
+    return ModuleData(impactData);
+  }
+
+  void toDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeMemberNodeMap<ImpactBuilderData>(
+        impactData, (e) => e.toDataSink(sink));
+    sink.end(tag);
+  }
+}
+
+/// Compute [ModularMemberData] from the IR.
+ModularMemberData computeModularMemberData(ir.Member node,
+    {CompilerOptions options,
+    ir.TypeEnvironment typeEnvironment,
+    ir.ClassHierarchy classHierarchy,
+    ScopeModel scopeModel,
+    EnumSet<PragmaAnnotation> annotations}) {
+  var staticTypeCache = StaticTypeCacheImpl();
+  var impactBuilderData = ImpactBuilder(
+          ir.StaticTypeContext(node, typeEnvironment, cache: staticTypeCache),
+          staticTypeCache,
+          classHierarchy,
+          scopeModel.variableScopeModel,
+          useAsserts: options.enableUserAssertions,
+          inferEffectivelyFinalVariableTypes:
+              !annotations.contains(PragmaAnnotation.disableFinal))
+      .computeImpact(node);
+  return ModularMemberData(scopeModel, impactBuilderData);
+}
+
+ModuleData computeModuleData(
+    ir.Component component,
+    Set<Uri> includedLibraries,
+    CompilerOptions options,
+    DiagnosticReporter reporter,
+    Environment environment,
+    KernelToElementMapImpl elementMap) {
+  var classHierarchy = elementMap.classHierarchy;
+  var typeEnvironment = elementMap.typeEnvironment;
+  var constantEvaluator = elementMap.constantEvaluator;
+  var result = <ir.Member, ImpactBuilderData>{};
+  void computeForMember(ir.Member member) {
+    var scopeModel = ScopeModel.from(member, constantEvaluator);
+    var annotations = processMemberAnnotations(
+        options, reporter, member, computePragmaAnnotationDataFromIr(member));
+    result[member] = computeModularMemberData(member,
+            options: options,
+            typeEnvironment: typeEnvironment,
+            classHierarchy: classHierarchy,
+            scopeModel: scopeModel,
+            annotations: annotations)
+        .impactBuilderData;
+  }
+
+  for (var library in component.libraries) {
+    if (!includedLibraries.contains(library.importUri)) continue;
+    library.members.forEach(computeForMember);
+    for (var cls in library.classes) {
+      cls.members.forEach(computeForMember);
+    }
+  }
+  return ModuleData(result);
+}
+
+void reportLocatedMessage(DiagnosticReporter reporter,
+    ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+  DiagnosticMessage diagnosticMessage =
+      _createDiagnosticMessage(reporter, message);
+  var infos = <DiagnosticMessage>[];
+  for (ir.LocatedMessage message in context) {
+    infos.add(_createDiagnosticMessage(reporter, message));
+  }
+  reporter.reportError(diagnosticMessage, infos);
+}
+
+DiagnosticMessage _createDiagnosticMessage(
+    DiagnosticReporter reporter, ir.LocatedMessage message) {
+  var sourceSpan = SourceSpan(
+      message.uri, message.charOffset, message.charOffset + message.length);
+  return reporter.createMessage(
+      sourceSpan, MessageKind.GENERIC, {'text': message.message});
+}
diff --git a/pkg/compiler/lib/src/ir/runtime_type_analysis.dart b/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
index 3286fc3..d46b622 100644
--- a/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
+++ b/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
@@ -64,7 +64,7 @@
       case RuntimeTypeUseKind.equals:
         return receiverType != null && argumentType != null;
     }
-    throw new UnsupportedError("Unexpected RuntimeTypeUseKind $kind.");
+    throw UnsupportedError("Unexpected RuntimeTypeUseKind $kind.");
   }
 
   @override
@@ -408,8 +408,8 @@
     receiverGet = node;
   }
 
-  RuntimeTypeUseData data = new RuntimeTypeUseData(
-      kind, receiverGet, receiver, argumentGet, argument);
+  RuntimeTypeUseData data =
+      RuntimeTypeUseData(kind, receiverGet, receiver, argumentGet, argument);
   cache[receiverGet] = data;
   if (argumentGet != null) {
     cache[argumentGet] = data;
diff --git a/pkg/compiler/lib/src/ir/scope.dart b/pkg/compiler/lib/src/ir/scope.dart
index 90bc23a..8bc0a90 100644
--- a/pkg/compiler/lib/src/ir/scope.dart
+++ b/pkg/compiler/lib/src/ir/scope.dart
@@ -22,7 +22,7 @@
   /// be marked as free variables.
   factory ScopeModel.from(
       ir.Member node, ir.ConstantEvaluator constantEvaluator) {
-    ScopeModelBuilder builder = new ScopeModelBuilder(constantEvaluator);
+    ScopeModelBuilder builder = ScopeModelBuilder(constantEvaluator);
     return builder.computeModel(node);
   }
 }
@@ -34,15 +34,15 @@
 }
 
 class VariableScopeModelImpl implements VariableScopeModel {
-  Map<ir.TreeNode, VariableScope> _scopeMap = {};
+  final Map<ir.TreeNode, VariableScope> _scopeMap = {};
   Set<ir.VariableDeclaration> _assignedVariables;
 
   VariableScope createScopeFor(ir.TreeNode node) {
-    return _scopeMap[node] ??= new VariableScopeImpl();
+    return _scopeMap[node] ??= VariableScopeImpl();
   }
 
   void registerAssignedVariable(ir.VariableDeclaration node) {
-    _assignedVariables ??= new Set<ir.VariableDeclaration>();
+    _assignedVariables ??= Set<ir.VariableDeclaration>();
     _assignedVariables.add(node);
   }
 
@@ -83,7 +83,7 @@
   }
 
   void registerAssignedVariable(ir.VariableDeclaration variable) {
-    _assignedVariables ??= new Set<ir.VariableDeclaration>();
+    _assignedVariables ??= Set<ir.VariableDeclaration>();
     _assignedVariables.add(variable);
   }
 
@@ -102,7 +102,7 @@
 
 abstract class VariableCollectorMixin {
   VariableScopeImpl currentVariableScope;
-  VariableScopeModelImpl variableScopeModel = new VariableScopeModelImpl();
+  VariableScopeModelImpl variableScopeModel = VariableScopeModelImpl();
 
   void visitInVariableScope(ir.TreeNode root, void f()) {
     VariableScopeImpl oldScope = currentVariableScope;
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart
index 6fe6cff..a95894c 100644
--- a/pkg/compiler/lib/src/ir/scope_visitor.dart
+++ b/pkg/compiler/lib/src/ir/scope_visitor.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:front_end/src/api_unstable/dart2js.dart' as ir;
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/core_types.dart' as ir;
 import 'package:kernel/type_environment.dart' as ir;
@@ -22,7 +23,7 @@
   ir.TypeEnvironment get _typeEnvironment => _constantEvaluator.typeEnvironment;
   ir.CoreTypes get _coreTypes => _typeEnvironment.coreTypes;
 
-  final ClosureScopeModel _model = new ClosureScopeModel();
+  final ClosureScopeModel _model = ClosureScopeModel();
 
   /// A map of each visited call node with the associated information about what
   /// variables are captured/used. Each ir.Node key corresponds to a scope that
@@ -55,13 +56,14 @@
   /// Keep track of the mutated local variables so that we don't need to box
   /// non-mutated variables. We know these are only VariableDeclarations because
   /// type variable types and `this` types can't be mutated!
-  Set<ir.VariableDeclaration> _mutatedVariables =
-      new Set<ir.VariableDeclaration>();
+  final Set<ir.VariableDeclaration> _mutatedVariables =
+      Set<ir.VariableDeclaration>();
 
   /// The set of variables that are accessed in some form, whether they are
   /// mutated or not.
-  Set<ir.Node /* ir.VariableDeclaration | TypeParameterTypeWithContext */ >
-      _capturedVariables = new Set<ir.Node>();
+  final Set<
+          ir.Node /* ir.VariableDeclaration | TypeParameterTypeWithContext */ >
+      _capturedVariables = Set<ir.Node>();
 
   /// If true, the visitor is currently traversing some nodes that are inside a
   /// try block.
@@ -88,10 +90,10 @@
   ScopeModel computeModel(ir.Member node) {
     if (node.isAbstract && !node.isExternal) {
       return const ScopeModel(
-          initializerComplexity: const EvaluationComplexity.lazy());
+          initializerComplexity: EvaluationComplexity.lazy());
     }
 
-    _staticTypeContext = new ir.StaticTypeContext(node, _typeEnvironment);
+    _staticTypeContext = ir.StaticTypeContext(node, _typeEnvironment);
     if (node is ir.Constructor) {
       _hasThisLocal = true;
     } else if (node is ir.Procedure && node.kind == ir.ProcedureKind.Factory) {
@@ -109,13 +111,17 @@
         initializerComplexity = node.accept(this);
       } else {
         initializerComplexity = const EvaluationComplexity.constant();
-        _model.scopeInfo = new KernelScopeInfo(_hasThisLocal);
+        _model.scopeInfo = KernelScopeInfo(_hasThisLocal);
       }
     } else {
       assert(node is ir.Procedure || node is ir.Constructor);
-      node.accept(this);
+      if (!(node is ir.Procedure && ir.isRedirectingFactory(node))) {
+        // Skip redirecting factories: they contain invalid expressions only
+        // used to suppport internal CFE modular compilation.
+        node.accept(this);
+      }
     }
-    return new ScopeModel(
+    return ScopeModel(
         closureScopeModel: _model,
         variableScopeModel: variableScopeModel,
         initializerComplexity: initializerComplexity);
@@ -154,7 +160,7 @@
     ir.Constant constant = _constantEvaluator.evaluate(_staticTypeContext, node,
         requireConstant: false, replaceImplicitConstant: false);
     if (constant != null) {
-      return new EvaluationComplexity.constant(constant);
+      return EvaluationComplexity.constant(constant);
     }
     return const EvaluationComplexity.lazy();
   }
@@ -175,7 +181,7 @@
   ir.Expression _handleExpression(ir.Expression node) {
     _lastExpressionComplexity = visitNode(node);
     if (_lastExpressionComplexity.isFreshConstant) {
-      return new ir.ConstantExpression(_lastExpressionComplexity.constant,
+      return ir.ConstantExpression(_lastExpressionComplexity.constant,
           node.getStaticType(_staticTypeContext))
         ..fileOffset = node.fileOffset
         ..parent = node.parent;
@@ -211,7 +217,7 @@
   /// this node if any variables are captured.
   void attachCapturedScopeVariables(ir.TreeNode node) {
     Set<ir.VariableDeclaration> capturedVariablesForScope =
-        new Set<ir.VariableDeclaration>();
+        Set<ir.VariableDeclaration>();
 
     for (ir.Node variable in _scopeVariables) {
       // No need to box non-assignable elements.
@@ -228,12 +234,12 @@
       KernelScopeInfo from = _model.scopeInfo;
 
       KernelCapturedScope capturedScope;
-      var nodeBox = new NodeBox(getBoxName(), _executableContext);
+      var nodeBox = NodeBox(getBoxName(), _executableContext);
       if (node is ir.ForStatement ||
           node is ir.ForInStatement ||
           node is ir.WhileStatement ||
           node is ir.DoStatement) {
-        capturedScope = new KernelCapturedLoopScope(
+        capturedScope = KernelCapturedLoopScope(
             capturedVariablesForScope,
             nodeBox,
             [],
@@ -244,7 +250,7 @@
             from.thisUsedAsFreeVariableIfNeedsRti,
             _hasThisLocal);
       } else {
-        capturedScope = new KernelCapturedScope(
+        capturedScope = KernelCapturedScope(
             capturedVariablesForScope,
             nodeBox,
             from.localsUsedInTryOrSync,
@@ -332,7 +338,7 @@
 
   void _handleVariableDeclaration(
       ir.VariableDeclaration node, VariableUse usage) {
-    if (!node.isFieldFormal) {
+    if (!node.isInitializingFormal) {
       _scopeVariables.add(node);
     }
 
@@ -370,7 +376,7 @@
         _currentScopeInfo.freeVariables.add(variable);
       } else {
         _currentScopeInfo.freeVariablesForRti
-            .putIfAbsent(variable, () => new Set<VariableUse>())
+            .putIfAbsent(variable, () => Set<VariableUse>())
             .add(usage);
       }
     }
@@ -390,13 +396,13 @@
   @override
   EvaluationComplexity visitTypeParameter(ir.TypeParameter typeParameter) {
     TypeVariableTypeWithContext typeVariable(ir.Library library) =>
-        new TypeVariableTypeWithContext(
+        TypeVariableTypeWithContext(
             ir.TypeParameterType.withDefaultNullabilityForLibrary(
                 typeParameter, library),
             // If this typeParameter is part of a typedef then its parent is
             // null because it has no context. Just pass in null for the
             // context in that case.
-            typeParameter.parent != null ? typeParameter.parent.parent : null);
+            typeParameter.parent?.parent);
 
     ir.TreeNode context = _executableContext;
     if (_isInsideClosure && context is ir.Procedure && context.isFactory) {
@@ -527,7 +533,7 @@
     });
     KernelCapturedScope scope = _scopesCapturedInClosureMap[node];
     if (scope != null) {
-      _scopesCapturedInClosureMap[node] = new KernelCapturedLoopScope(
+      _scopesCapturedInClosureMap[node] = KernelCapturedLoopScope(
           scope.boxedVariables,
           scope.capturedVariablesAccessor,
           boxedLoopVariables,
@@ -549,7 +555,7 @@
     }
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
-          new VariableUse.staticTypeArgument(node.interfaceTarget));
+          VariableUse.staticTypeArgument(node.interfaceTarget));
     }
     visitArguments(node.arguments);
     return const EvaluationComplexity.lazy();
@@ -583,7 +589,7 @@
     _isInsideClosure = _outermostNode != null;
     _executableContext = node;
 
-    _currentScopeInfo = new KernelScopeInfo(_hasThisLocal);
+    _currentScopeInfo = KernelScopeInfo(_hasThisLocal);
 
     if (_isInsideClosure) {
       _closuresToGenerate[node] = _currentScopeInfo;
@@ -820,8 +826,8 @@
   @override
   EvaluationComplexity visitFunctionNode(ir.FunctionNode node) {
     VariableUse parameterUsage = node.parent is ir.Member
-        ? new VariableUse.memberParameter(node.parent)
-        : new VariableUse.localParameter(node.parent);
+        ? VariableUse.memberParameter(node.parent)
+        : VariableUse.localParameter(node.parent);
     visitNodesInContext(node.typeParameters, parameterUsage);
     for (ir.VariableDeclaration declaration in node.positionalParameters) {
       _handleVariableDeclaration(declaration, parameterUsage);
@@ -832,8 +838,8 @@
     visitInContext(
         node.returnType,
         node.parent is ir.Member
-            ? new VariableUse.memberReturnType(node.parent)
-            : new VariableUse.localReturnType(node.parent));
+            ? VariableUse.memberReturnType(node.parent)
+            : VariableUse.localReturnType(node.parent));
     if (node.body != null) {
       visitNode(node.body);
     }
@@ -928,7 +934,7 @@
     if (target is ir.Field) {
       return target.isConst
           ? const EvaluationComplexity.constant()
-          : new EvaluationComplexity.eager(fields: <ir.Field>{target});
+          : EvaluationComplexity.eager(fields: <ir.Field>{target});
     } else if (target is ir.Procedure &&
         target.kind == ir.ProcedureKind.Method) {
       return _evaluateImplicitConstant(node);
@@ -952,9 +958,9 @@
     if (node.arguments.types.isNotEmpty) {
       VariableUse usage;
       if (node.target.kind == ir.ProcedureKind.Factory) {
-        usage = new VariableUse.constructorTypeArgument(node.target);
+        usage = VariableUse.constructorTypeArgument(node.target);
       } else {
-        usage = new VariableUse.staticTypeArgument(node.target);
+        usage = VariableUse.staticTypeArgument(node.target);
       }
 
       visitNodesInContext(node.arguments.types, usage);
@@ -995,8 +1001,8 @@
     }
 
     if (node.arguments.types.isNotEmpty) {
-      visitNodesInContext(node.arguments.types,
-          new VariableUse.constructorTypeArgument(target));
+      visitNodesInContext(
+          node.arguments.types, VariableUse.constructorTypeArgument(target));
     }
     visitArguments(node.arguments);
     return node.isConst
@@ -1036,7 +1042,7 @@
               receiver.variable.parent is ir.LocalFunction),
           "Unexpected local function invocation ${node} "
           "(${node.runtimeType}).");
-      VariableUse usage = new VariableUse.instanceTypeArgument(node);
+      VariableUse usage = VariableUse.instanceTypeArgument(node);
       visitNodesInContext(node.arguments.types, usage);
     }
     EvaluationComplexity complexity = visitArguments(node.arguments);
@@ -1063,7 +1069,7 @@
               receiver.variable.parent is ir.LocalFunction),
           "Unexpected local function invocation ${node} "
           "(${node.runtimeType}).");
-      VariableUse usage = new VariableUse.instanceTypeArgument(node);
+      VariableUse usage = VariableUse.instanceTypeArgument(node);
       visitNodesInContext(node.arguments.types, usage);
     }
     visitArguments(node.arguments);
@@ -1080,7 +1086,7 @@
               receiver.variable.parent is ir.LocalFunction),
           "Unexpected local function invocation ${node} "
           "(${node.runtimeType}).");
-      VariableUse usage = new VariableUse.instanceTypeArgument(node);
+      VariableUse usage = VariableUse.instanceTypeArgument(node);
       visitNodesInContext(node.arguments.types, usage);
     }
     visitArguments(node.arguments);
@@ -1097,7 +1103,7 @@
                   is ir.LocalFunction)),
           "Unexpected local function invocation ${node} "
           "(${node.runtimeType}).");
-      VariableUse usage = new VariableUse.instanceTypeArgument(node);
+      VariableUse usage = VariableUse.instanceTypeArgument(node);
       visitNodesInContext(node.arguments.types, usage);
     }
     visitArguments(node.arguments);
@@ -1110,7 +1116,7 @@
     _markVariableAsUsed(node.variable, VariableUse.explicit);
     if (node.arguments.types.isNotEmpty) {
       VariableUse usage =
-          new VariableUse.localTypeArgument(node.localFunction, node);
+          VariableUse.localTypeArgument(node.localFunction, node);
       visitNodesInContext(node.arguments.types, usage);
     }
     visitArguments(node.arguments);
@@ -1242,7 +1248,7 @@
   @override
   EvaluationComplexity visitInstantiation(ir.Instantiation node) {
     EvaluationComplexity typeArgumentsComplexity = visitNodesInContext(
-        node.typeArguments, new VariableUse.instantiationTypeArgument(node));
+        node.typeArguments, VariableUse.instantiationTypeArgument(node));
     node.expression = _handleExpression(node.expression);
     EvaluationComplexity expressionComplexity = _lastExpressionComplexity;
 
@@ -1349,7 +1355,7 @@
   EvaluationComplexity visitSuperInitializer(ir.SuperInitializer node) {
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
-          new VariableUse.constructorTypeArgument(node.target));
+          VariableUse.constructorTypeArgument(node.target));
     }
     visitArguments(node.arguments);
     return const EvaluationComplexity.lazy();
@@ -1360,7 +1366,7 @@
       ir.RedirectingInitializer node) {
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
-          new VariableUse.constructorTypeArgument(node.target));
+          VariableUse.constructorTypeArgument(node.target));
     }
     visitArguments(node.arguments);
     return const EvaluationComplexity.lazy();
@@ -1402,7 +1408,7 @@
     assert(usage != null);
     if (_outermostNode is ir.Member) {
       TypeVariableTypeWithContext typeVariable =
-          new TypeVariableTypeWithContext(type, _outermostNode);
+          TypeVariableTypeWithContext(type, _outermostNode);
       switch (typeVariable.kind) {
         case TypeVariableKind.cls:
           if (_isFieldOrConstructor(_outermostNode)) {
@@ -1491,7 +1497,7 @@
     if (isLazy || isEager) {
       return this;
     } else {
-      return new EvaluationComplexity.eager();
+      return EvaluationComplexity.eager();
     }
   }
 
@@ -1505,7 +1511,7 @@
 
   /// Returns a short textual representation used for testing.
   String get shortText {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     switch (level) {
       case ComplexityLevel.constant:
         sb.write('constant');
@@ -1523,7 +1529,7 @@
         sb.write('lazy');
         break;
       default:
-        throw new UnsupportedError("Unexpected complexity level $level");
+        throw UnsupportedError("Unexpected complexity level $level");
     }
     return sb.toString();
   }
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index 1baf922..6d7d02a 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -74,7 +74,7 @@
   Map<ir.Expression, TypeMap> typeMapsForTesting;
   // TODO(johnniwinther): Change the key to `InstanceGet` when the old method
   //  invocation encoding is no longer used.
-  Map<ir.Expression, RuntimeTypeUseData> _pendingRuntimeTypeUseData = {};
+  final Map<ir.Expression, RuntimeTypeUseData> _pendingRuntimeTypeUseData = {};
 
   final ir.ClassHierarchy hierarchy;
 
@@ -86,7 +86,7 @@
       : super(typeEnvironment);
 
   StaticTypeCache getStaticTypeCache() {
-    return new StaticTypeCache(_staticTypeCache._expressionTypes,
+    return StaticTypeCache(_staticTypeCache._expressionTypes,
         _staticTypeCache._forInIteratorTypes);
   }
 
@@ -124,8 +124,8 @@
   bool completes(ir.DartType type) => type != const DoesNotCompleteType();
 
   Set<ir.VariableDeclaration> _currentVariables;
-  Set<ir.VariableDeclaration> _invalidatedVariables =
-      new Set<ir.VariableDeclaration>();
+  final Set<ir.VariableDeclaration> _invalidatedVariables =
+      Set<ir.VariableDeclaration>();
 
   TypeMap _typeMapBase = const TypeMap();
   TypeMap _typeMapWhenTrue;
@@ -415,7 +415,7 @@
       // We need to insert an implicit cast to preserve the invariant that
       // a property set with a known interface target is also statically
       // checked.
-      return new ir.AsExpression(value, setterType)..isTypeError = true;
+      return ir.AsExpression(value, setterType)..isTypeError = true;
     }
     return null;
   }
@@ -613,11 +613,11 @@
     ir.Expression updateArgument(ir.Expression expression, ir.TreeNode parent,
         ir.DartType argumentType, ir.DartType checkedParameterType) {
       ir.VariableDeclaration variable =
-          new ir.VariableDeclaration.forValue(expression, type: argumentType);
+          ir.VariableDeclaration.forValue(expression, type: argumentType);
       // Visit the newly created variable declaration.
       handleVariableDeclaration(variable);
       letVariables.add(variable);
-      ir.VariableGet get = new ir.VariableGet(variable)..parent = parent;
+      ir.VariableGet get = ir.VariableGet(variable)..parent = parent;
       // Visit the newly created variable get.
       handleVariableGet(get, argumentType);
       _staticTypeCache._expressionTypes[get] = argumentType;
@@ -628,10 +628,9 @@
       // We need to insert an implicit cast to preserve the invariant that
       // a method invocation with a known interface target is also
       // statically checked.
-      ir.AsExpression implicitCast =
-          new ir.AsExpression(get, checkedParameterType)
-            ..isTypeError = true
-            ..parent = parent;
+      ir.AsExpression implicitCast = ir.AsExpression(get, checkedParameterType)
+        ..isTypeError = true
+        ..parent = parent;
       // Visit the newly created as expression; the original value has
       // already been visited.
       handleAsExpression(implicitCast, argumentType);
@@ -655,11 +654,11 @@
           argumentType, neededNamedChecks[argumentIndex]);
     }
 
-    ir.Expression dummy = new ir.NullLiteral();
+    ir.Expression dummy = ir.NullLiteral();
     node.replaceWith(dummy);
     ir.Expression body = node;
     for (ir.VariableDeclaration variable in letVariables.reversed) {
-      body = new ir.Let(variable, body);
+      body = ir.Let(variable, body);
     }
     dummy.replaceWith(body);
   }
@@ -738,7 +737,7 @@
       ir.DartType argumentType = argumentTypes.positional[0];
       ir.DartType resultType = typeEnvironment
           .getTypeOfSpecialCasedBinaryOperator(receiverType, argumentType);
-      return new ir.FunctionType(
+      return ir.FunctionType(
           <ir.DartType>[argumentType], resultType, currentLibrary.nonNullable);
     }
     return getterType;
@@ -777,8 +776,7 @@
     if (arguments.positional.isEmpty) {
       positional = const <ir.DartType>[];
     } else {
-      positional =
-          new List<ir.DartType>.filled(arguments.positional.length, null);
+      positional = List<ir.DartType>.filled(arguments.positional.length, null);
       int index = 0;
       for (ir.Expression argument in arguments.positional) {
         positional[index++] = visitNode(argument);
@@ -787,13 +785,13 @@
     if (arguments.named.isEmpty) {
       named = const <ir.DartType>[];
     } else {
-      named = new List<ir.DartType>.filled(arguments.named.length, null);
+      named = List<ir.DartType>.filled(arguments.named.length, null);
       int index = 0;
       for (ir.NamedExpression argument in arguments.named) {
         named[index++] = visitNode(argument);
       }
     }
-    return new ArgumentTypes(positional, named);
+    return ArgumentTypes(positional, named);
   }
 
   void handleDynamicInvocation(
@@ -1115,9 +1113,9 @@
   ir.DartType visitConstructorInvocation(ir.ConstructorInvocation node) {
     ArgumentTypes argumentTypes = _visitArguments(node.arguments);
     ir.DartType resultType = node.arguments.types.isEmpty
-        ? new ExactInterfaceType.from(typeEnvironment.coreTypes
+        ? ExactInterfaceType.from(typeEnvironment.coreTypes
             .nonNullableRawType(node.target.enclosingClass))
-        : new ExactInterfaceType(node.target.enclosingClass,
+        : ExactInterfaceType(node.target.enclosingClass,
             ir.Nullability.nonNullable, node.arguments.types);
     _staticTypeCache._expressionTypes[node] = resultType;
     handleConstructorInvocation(node, argumentTypes, resultType);
@@ -1566,7 +1564,7 @@
           currentLibrary,
           typeEnvironment.coreTypes);
       if (streamType != null) {
-        iteratorType = new ir.InterfaceType(
+        iteratorType = ir.InterfaceType(
             typeEnvironment.coreTypes.streamIteratorClass,
             ir.Nullability.nonNullable,
             streamType.typeArguments);
@@ -1574,7 +1572,7 @@
     } else {
       ir.InterfaceType iterableInterfaceType = getInterfaceTypeOf(iterableType);
       ir.Member member = hierarchy.getInterfaceMember(
-          iterableInterfaceType.classNode, new ir.Name(Identifiers.iterator));
+          iterableInterfaceType.classNode, ir.Name(Identifiers.iterator));
       if (member != null) {
         iteratorType = ir.Substitution.fromInterfaceType(
                 typeEnvironment.getTypeAsInstanceOf(
@@ -1729,7 +1727,7 @@
 
   @override
   Null visitProcedure(ir.Procedure node) {
-    thisType = new ThisInterfaceType.from(node.enclosingClass?.getThisType(
+    thisType = ThisInterfaceType.from(node.enclosingClass?.getThisType(
         typeEnvironment.coreTypes, node.enclosingLibrary.nonNullable));
     _currentVariables = {};
     currentLibrary = node.enclosingLibrary;
@@ -1746,7 +1744,7 @@
 
   @override
   Null visitConstructor(ir.Constructor node) {
-    thisType = new ThisInterfaceType.from(node.enclosingClass.getThisType(
+    thisType = ThisInterfaceType.from(node.enclosingClass.getThisType(
         typeEnvironment.coreTypes, node.enclosingLibrary.nonNullable));
     _currentVariables = {};
     currentLibrary = node.enclosingLibrary;
@@ -1764,7 +1762,7 @@
 
   @override
   Null visitField(ir.Field node) {
-    thisType = new ThisInterfaceType.from(node.enclosingClass?.getThisType(
+    thisType = ThisInterfaceType.from(node.enclosingClass?.getThisType(
         typeEnvironment.coreTypes, node.enclosingLibrary.nonNullable));
     _currentVariables = {};
     currentLibrary = node.enclosingLibrary;
@@ -1911,7 +1909,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('TypeHolder(');
     sb.write('declared=$declaredType');
     if (trueTypes != null) {
@@ -1950,7 +1948,7 @@
   /// be an instance of [type]. If [isTrue] is `false`, the local variable is
   /// known _not_ to be an instance of [type].
   TargetInfo promote(ir.DartType type, {bool isTrue}) {
-    Set<TypeHolder> newTypeHolders = new Set<TypeHolder>();
+    Set<TypeHolder> newTypeHolders = Set<TypeHolder>();
 
     bool addTypeHolder(TypeHolder typeHolder) {
       bool changed = false;
@@ -1958,7 +1956,7 @@
       Set<ir.DartType> addAsCopy(Set<ir.DartType> set, ir.DartType type) {
         Set<ir.DartType> result;
         if (set == null) {
-          result = new Set<ir.DartType>();
+          result = Set<ir.DartType>();
         } else if (set.contains(type)) {
           return set;
         } else {
@@ -1995,12 +1993,11 @@
     if (typesOfInterest.contains(type)) {
       newTypesOfInterest = typesOfInterest;
     } else {
-      newTypesOfInterest = new Set<ir.DartType>.from(typesOfInterest)
-        ..add(type);
+      newTypesOfInterest = Set<ir.DartType>.from(typesOfInterest)..add(type);
       changed = true;
     }
     return changed
-        ? new TargetInfo(declaredType, newTypeHolders, newTypesOfInterest)
+        ? TargetInfo(declaredType, newTypeHolders, newTypesOfInterest)
         : this;
   }
 
@@ -2012,8 +2009,8 @@
     if (other == null) return null;
     if (identical(this, other)) return this;
 
-    Set<TypeHolder> newTypeHolders = new Set<TypeHolder>();
-    Set<ir.DartType> newTypesOfInterest = new Set<ir.DartType>();
+    Set<TypeHolder> newTypeHolders = Set<TypeHolder>();
+    Set<ir.DartType> newTypesOfInterest = Set<ir.DartType>();
 
     /// Adds the [typeHolders] to [newTypeHolders] for types in
     /// [otherTypesOfInterest] while removing the information
@@ -2026,7 +2023,7 @@
       for (TypeHolder typeHolder in typeHolders) {
         Set<ir.DartType> newTrueTypes;
         if (typeHolder.trueTypes != null) {
-          newTrueTypes = new Set<ir.DartType>.from(typeHolder.trueTypes);
+          newTrueTypes = Set<ir.DartType>.from(typeHolder.trueTypes);
 
           /// Only types in [otherTypesOfInterest] has information from all
           /// paths.
@@ -2044,7 +2041,7 @@
         }
         Set<ir.DartType> newFalseTypes;
         if (typeHolder.falseTypes != null) {
-          newFalseTypes = new Set<ir.DartType>.from(typeHolder.falseTypes);
+          newFalseTypes = Set<ir.DartType>.from(typeHolder.falseTypes);
 
           /// Only types in [otherTypesOfInterest] has information from all
           /// paths.
@@ -2063,13 +2060,13 @@
         if (newTrueTypes != null || newFalseTypes != null) {
           // Only include type holders with information.
           newTypeHolders
-              .add(new TypeHolder(declaredType, newTrueTypes, newFalseTypes));
+              .add(TypeHolder(declaredType, newTrueTypes, newFalseTypes));
         }
       }
     }
 
-    Set<ir.DartType> thisTrueTypes = new Set<ir.DartType>();
-    Set<ir.DartType> thisFalseTypes = new Set<ir.DartType>();
+    Set<ir.DartType> thisTrueTypes = Set<ir.DartType>();
+    Set<ir.DartType> thisFalseTypes = Set<ir.DartType>();
     for (TypeHolder typeHolder in typeHolders) {
       if (typeHolder.trueTypes != null) {
         thisTrueTypes.addAll(typeHolder.trueTypes);
@@ -2079,8 +2076,8 @@
       }
     }
 
-    Set<ir.DartType> otherTrueTypes = new Set<ir.DartType>();
-    Set<ir.DartType> otherFalseTypes = new Set<ir.DartType>();
+    Set<ir.DartType> otherTrueTypes = Set<ir.DartType>();
+    Set<ir.DartType> otherFalseTypes = Set<ir.DartType>();
     for (TypeHolder typeHolder in other.typeHolders) {
       if (typeHolder.trueTypes != null) {
         otherTrueTypes.addAll(typeHolder.trueTypes);
@@ -2100,7 +2097,7 @@
       return null;
     }
 
-    return new TargetInfo(declaredType, newTypeHolders, newTypesOfInterest);
+    return TargetInfo(declaredType, newTypeHolders, newTypesOfInterest);
   }
 
   /// Computes a single type that soundly represents the promoted type of the
@@ -2151,7 +2148,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('TargetInfo(');
     sb.write('declaredType=$declaredType,');
     sb.write('typeHolders=$typeHolders,');
@@ -2180,7 +2177,7 @@
   TypeMap promote(ir.VariableDeclaration variable, ir.DartType type,
       {bool isTrue}) {
     Map<ir.VariableDeclaration, TargetInfo> newInfoMap =
-        new Map<ir.VariableDeclaration, TargetInfo>.from(_targetInfoMap);
+        Map<ir.VariableDeclaration, TargetInfo>.from(_targetInfoMap);
     TargetInfo targetInfo = newInfoMap[variable];
     bool changed = false;
     if (targetInfo != null) {
@@ -2190,16 +2187,15 @@
     } else {
       changed = true;
       Set<ir.DartType> trueTypes =
-          isTrue ? (new Set<ir.DartType>()..add(type)) : null;
+          isTrue ? (Set<ir.DartType>()..add(type)) : null;
       Set<ir.DartType> falseTypes =
-          isTrue ? null : (new Set<ir.DartType>()..add(type));
-      TypeHolder typeHolder =
-          new TypeHolder(variable.type, trueTypes, falseTypes);
-      targetInfo = new TargetInfo(
+          isTrue ? null : (Set<ir.DartType>()..add(type));
+      TypeHolder typeHolder = TypeHolder(variable.type, trueTypes, falseTypes);
+      targetInfo = TargetInfo(
           variable.type, <TypeHolder>[typeHolder], <ir.DartType>[type]);
     }
     newInfoMap[variable] = targetInfo;
-    return changed ? new TypeMap(newInfoMap) : this;
+    return changed ? TypeMap(newInfoMap) : this;
   }
 
   /// Returns the [TypeMap] that describes that the locals are either of [this]
@@ -2217,7 +2213,7 @@
         newInfoMap[variable] = result;
       }
     });
-    return changed ? new TypeMap(newInfoMap) : this;
+    return changed ? TypeMap(newInfoMap) : this;
   }
 
   /// Returns the [TypeMap] in which all type information for any of the
@@ -2232,7 +2228,7 @@
         changed = true;
       }
     });
-    return changed ? new TypeMap(newInfoMap) : this;
+    return changed ? TypeMap(newInfoMap) : this;
   }
 
   /// Returns the [TypeMap] where type information for `node.variable` is
@@ -2247,7 +2243,7 @@
         newInfoMap[variable] = info;
       } else if (type != null) {
         changed = true;
-        Set<ir.DartType> newTypesOfInterest = new Set<ir.DartType>();
+        Set<ir.DartType> newTypesOfInterest = Set<ir.DartType>();
         for (ir.DartType typeOfInterest in info.typesOfInterest) {
           if (typeEnvironment.isSubtypeOf(type, typeOfInterest,
               ir.SubtypeCheckMode.ignoringNullabilities)) {
@@ -2262,10 +2258,10 @@
           // declared type or null) and the canonical way to represent this is
           // to have _no_ target info.
           TypeHolder typeHolderIfNonNull =
-              new TypeHolder(info.declaredType, newTypesOfInterest, null);
-          TypeHolder typeHolderIfNull = new TypeHolder(info.declaredType, null,
-              new Set<ir.DartType>()..add(info.declaredType));
-          newInfoMap[variable] = new TargetInfo(
+              TypeHolder(info.declaredType, newTypesOfInterest, null);
+          TypeHolder typeHolderIfNull = TypeHolder(info.declaredType, null,
+              Set<ir.DartType>()..add(info.declaredType));
+          newInfoMap[variable] = TargetInfo(
               info.declaredType,
               <TypeHolder>[typeHolderIfNonNull, typeHolderIfNull],
               newTypesOfInterest);
@@ -2274,7 +2270,7 @@
         changed = true;
       }
     });
-    return changed ? new TypeMap(newInfoMap) : this;
+    return changed ? TypeMap(newInfoMap) : this;
   }
 
   /// Computes a single type that soundly represents the promoted type of
@@ -2289,7 +2285,7 @@
   }
 
   String getText(String Function(Iterable<ir.DartType>) typesToText) {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('{');
     String comma = '';
     _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
@@ -2303,7 +2299,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('TypeMap(');
     String comma = '';
     _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index 05a45ee1..2bd9146 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -23,8 +23,7 @@
       : super(classNode, nullability, typeArguments);
 
   factory ThisInterfaceType.from(ir.InterfaceType type) => type != null
-      ? new ThisInterfaceType(
-          type.classNode, type.nullability, type.typeArguments)
+      ? ThisInterfaceType(type.classNode, type.nullability, type.typeArguments)
       : null;
 
   @override
@@ -39,8 +38,7 @@
       : super(classNode, nullability, typeArguments);
 
   factory ExactInterfaceType.from(ir.InterfaceType type) => type != null
-      ? new ExactInterfaceType(
-          type.classNode, type.nullability, type.typeArguments)
+      ? ExactInterfaceType(type.classNode, type.nullability, type.typeArguments)
       : null;
 
   @override
diff --git a/pkg/compiler/lib/src/ir/static_type_cache.dart b/pkg/compiler/lib/src/ir/static_type_cache.dart
index dc20d4b..59f2d66 100644
--- a/pkg/compiler/lib/src/ir/static_type_cache.dart
+++ b/pkg/compiler/lib/src/ir/static_type_cache.dart
@@ -24,7 +24,7 @@
       Map<ir.ForInStatement, ir.DartType> forInIteratorTypes = source
           .readTreeNodeMapInContext(source.readDartTypeNode, emptyAsNull: true);
       source.end(tag);
-      return new StaticTypeCache(expressionTypes, forInIteratorTypes);
+      return StaticTypeCache(expressionTypes, forInIteratorTypes);
     });
   }
 
diff --git a/pkg/compiler/lib/src/ir/util.dart b/pkg/compiler/lib/src/ir/util.dart
index 5c5021f..27b00cb 100644
--- a/pkg/compiler/lib/src/ir/util.dart
+++ b/pkg/compiler/lib/src/ir/util.dart
@@ -42,7 +42,7 @@
     node = node.parent;
   }
   if (uri != null) {
-    return new SourceSpan(uri, offset, offset + 1);
+    return SourceSpan(uri, offset, offset + 1);
   }
   return null;
 }
@@ -60,7 +60,7 @@
       return AsyncMarker.SYNC_STAR;
     case ir.AsyncMarker.SyncYielding:
     default:
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Async marker ${node.asyncMarker} is not supported.");
   }
 }
@@ -76,7 +76,7 @@
     case ir.Variance.invariant:
       return Variance.invariant;
     default:
-      throw new UnsupportedError("Variance ${node.variance} is not supported.");
+      throw UnsupportedError("Variance ${node.variance} is not supported.");
   }
 }
 
@@ -125,7 +125,7 @@
         if (receiver is ir.VariableGet && receiver.variable == node.variable) {
           // We have
           //   let #t1 = e0 in #t1 == null ? null : e1
-          return new NullAwareExpression(node.variable, body.otherwise);
+          return NullAwareExpression(node.variable, body.otherwise);
         }
       }
     }
@@ -238,7 +238,7 @@
 
   @override
   bool defaultDartType(ir.DartType node) {
-    throw new UnsupportedError("FreeVariableVisitor.defaultTypeNode");
+    throw UnsupportedError("FreeVariableVisitor.defaultTypeNode");
   }
 }
 
diff --git a/pkg/compiler/lib/src/ir/visitors.dart b/pkg/compiler/lib/src/ir/visitors.dart
index cbcfda9..8e014ab 100644
--- a/pkg/compiler/lib/src/ir/visitors.dart
+++ b/pkg/compiler/lib/src/ir/visitors.dart
@@ -18,7 +18,7 @@
 
   @override
   String visitStringConcatenation(ir.StringConcatenation node) {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     for (ir.Expression expression in node.expressions) {
       String value = expression.accept(this);
       if (value == null) return null;
@@ -78,7 +78,7 @@
 
   List<DartType> visitTypes(List<ir.DartType> types) {
     topLevel = false;
-    return new List.generate(
+    return List.generate(
         types.length, (int index) => types[index].accept(this));
   }
 
@@ -196,13 +196,12 @@
 
   @override
   ConstantValue defaultConstant(ir.Constant node) {
-    throw new UnsupportedError(
-        "Unexpected constant $node (${node.runtimeType}).");
+    throw UnsupportedError("Unexpected constant $node (${node.runtimeType}).");
   }
 
   @override
   ConstantValue visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
-    throw new UnsupportedError("Unexpected unevaluated constant $node.");
+    throw UnsupportedError("Unexpected unevaluated constant $node.");
   }
 
   @override
@@ -216,7 +215,7 @@
     ir.Procedure member = node.target;
     FunctionEntity function = elementMap.getMethod(member);
     DartType type = elementMap.getFunctionType(member.function);
-    return new FunctionConstantValue(function, type);
+    return FunctionConstantValue(function, type);
   }
 
   @override
@@ -226,7 +225,7 @@
       typeArguments.add(elementMap.getDartType(type));
     }
     FunctionConstantValue function = visitConstant(node.tearOffConstant);
-    return new InstantiationConstantValue(typeArguments, function);
+    return InstantiationConstantValue(typeArguments, function);
   }
 
   @override
@@ -238,7 +237,7 @@
       FieldEntity field = elementMap.getField(reference.asField);
       fields[field] = visitConstant(value);
     });
-    return new ConstructedConstantValue(type, fields);
+    return ConstructedConstantValue(type, fields);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/annotations.dart b/pkg/compiler/lib/src/js_backend/annotations.dart
index 98ebf0c..7ae9894 100644
--- a/pkg/compiler/lib/src/js_backend/annotations.dart
+++ b/pkg/compiler/lib/src/js_backend/annotations.dart
@@ -23,9 +23,9 @@
   final bool internalOnly;
 
   const PragmaAnnotation(this._index, this.name,
-      {this.forFunctionsOnly: false,
-      this.forFieldsOnly: false,
-      this.internalOnly: false});
+      {this.forFunctionsOnly = false,
+      this.forFieldsOnly = false,
+      this.internalOnly = false});
 
   int get index {
     assert(_index == values.indexOf(this));
@@ -34,23 +34,22 @@
 
   /// Tells the optimizing compiler to not inline the annotated method.
   static const PragmaAnnotation noInline =
-      const PragmaAnnotation(0, 'noInline', forFunctionsOnly: true);
+      PragmaAnnotation(0, 'noInline', forFunctionsOnly: true);
 
   /// Tells the optimizing compiler to always inline the annotated method, if
   /// possible.
   static const PragmaAnnotation tryInline =
-      const PragmaAnnotation(1, 'tryInline', forFunctionsOnly: true);
+      PragmaAnnotation(1, 'tryInline', forFunctionsOnly: true);
 
-  static const PragmaAnnotation disableFinal = const PragmaAnnotation(
+  static const PragmaAnnotation disableFinal = PragmaAnnotation(
       2, 'disableFinal',
       forFunctionsOnly: true, internalOnly: true);
 
-  static const PragmaAnnotation noElision =
-      const PragmaAnnotation(3, 'noElision');
+  static const PragmaAnnotation noElision = PragmaAnnotation(3, 'noElision');
 
   /// Tells the optimizing compiler that the annotated method cannot throw.
   /// Requires @pragma('dart2js:noInline') to function correctly.
-  static const PragmaAnnotation noThrows = const PragmaAnnotation(4, 'noThrows',
+  static const PragmaAnnotation noThrows = PragmaAnnotation(4, 'noThrows',
       forFunctionsOnly: true, internalOnly: true);
 
   /// Tells the optimizing compiler that the annotated method has no
@@ -58,7 +57,7 @@
   /// dropped without changing the semantics of the program.
   ///
   /// Requires @pragma('dart2js:noInline') to function correctly.
-  static const PragmaAnnotation noSideEffects = const PragmaAnnotation(
+  static const PragmaAnnotation noSideEffects = PragmaAnnotation(
       5, 'noSideEffects',
       forFunctionsOnly: true, internalOnly: true);
 
@@ -66,45 +65,43 @@
   /// assumptions on parameters, effectively assuming that the runtime arguments
   /// could be any value. Note that the constraints due to static types still
   /// apply.
-  static const PragmaAnnotation assumeDynamic = const PragmaAnnotation(
+  static const PragmaAnnotation assumeDynamic = PragmaAnnotation(
       6, 'assumeDynamic',
       forFunctionsOnly: true, internalOnly: true);
 
-  static const PragmaAnnotation asTrust = const PragmaAnnotation(7, 'as:trust',
+  static const PragmaAnnotation asTrust = PragmaAnnotation(7, 'as:trust',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation asCheck = const PragmaAnnotation(8, 'as:check',
+  static const PragmaAnnotation asCheck = PragmaAnnotation(8, 'as:check',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation typesTrust = const PragmaAnnotation(
-      9, 'types:trust',
+  static const PragmaAnnotation typesTrust = PragmaAnnotation(9, 'types:trust',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation typesCheck = const PragmaAnnotation(
-      10, 'types:check',
+  static const PragmaAnnotation typesCheck = PragmaAnnotation(10, 'types:check',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation parameterTrust = const PragmaAnnotation(
+  static const PragmaAnnotation parameterTrust = PragmaAnnotation(
       11, 'parameter:trust',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation parameterCheck = const PragmaAnnotation(
+  static const PragmaAnnotation parameterCheck = PragmaAnnotation(
       12, 'parameter:check',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation downcastTrust = const PragmaAnnotation(
+  static const PragmaAnnotation downcastTrust = PragmaAnnotation(
       13, 'downcast:trust',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation downcastCheck = const PragmaAnnotation(
+  static const PragmaAnnotation downcastCheck = PragmaAnnotation(
       14, 'downcast:check',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation indexBoundsTrust = const PragmaAnnotation(
+  static const PragmaAnnotation indexBoundsTrust = PragmaAnnotation(
       15, 'index-bounds:trust',
       forFunctionsOnly: false, internalOnly: false);
 
-  static const PragmaAnnotation indexBoundsCheck = const PragmaAnnotation(
+  static const PragmaAnnotation indexBoundsCheck = PragmaAnnotation(
       16, 'index-bounds:check',
       forFunctionsOnly: false, internalOnly: false);
 
@@ -155,7 +152,7 @@
     DiagnosticReporter reporter,
     ir.Member member,
     List<PragmaAnnotationData> pragmaAnnotationData) {
-  EnumSet<PragmaAnnotation> annotations = new EnumSet<PragmaAnnotation>();
+  EnumSet<PragmaAnnotation> annotations = EnumSet<PragmaAnnotation>();
 
   Uri uri = member.enclosingLibrary.importUri;
   bool platformAnnotationsAllowed =
@@ -236,7 +233,7 @@
             'text': "@pragma('dart2js:${annotation.name}') must not be used "
                 "with @pragma('dart2js:${other.name}')."
           });
-          (reportedExclusions[annotation] ??= new EnumSet()).add(other);
+          (reportedExclusions[annotation] ??= EnumSet()).add(other);
         }
       }
     }
@@ -363,9 +360,9 @@
     source.begin(tag);
     Map<MemberEntity, EnumSet<PragmaAnnotation>> pragmaAnnotations =
         source.readMemberMap(
-            (MemberEntity member) => new EnumSet.fromValue(source.readInt()));
+            (MemberEntity member) => EnumSet.fromValue(source.readInt()));
     source.end(tag);
-    return new AnnotationsDataImpl(options, pragmaAnnotations);
+    return AnnotationsDataImpl(options, pragmaAnnotations);
   }
 
   @override
@@ -550,6 +547,6 @@
   }
 
   AnnotationsData close(CompilerOptions options) {
-    return new AnnotationsDataImpl(options, pragmaAnnotations);
+    return AnnotationsDataImpl(options, pragmaAnnotations);
   }
 }
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 8d15b8c..164d917 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -50,11 +50,10 @@
   static const int _canInlineInLoopMayInlineOutside = 3;
   static const int _canInline = 4;
 
-  final Map<FunctionEntity, int> _cachedDecisions =
-      new Map<FunctionEntity, int>();
+  final Map<FunctionEntity, int> _cachedDecisions = {};
 
-  final Set<FunctionEntity> _noInlineFunctions = new Set<FunctionEntity>();
-  final Set<FunctionEntity> _tryInlineFunctions = new Set<FunctionEntity>();
+  final Set<FunctionEntity> _noInlineFunctions = {};
+  final Set<FunctionEntity> _tryInlineFunctions = {};
 
   FunctionInlineCache(AnnotationsData annotationsData) {
     annotationsData.forEachNoInline((FunctionEntity function) {
@@ -185,7 +184,7 @@
     }
   }
 
-  void markAsNonInlinable(FunctionEntity element, {bool insideLoop: true}) {
+  void markAsNonInlinable(FunctionEntity element, {bool insideLoop = true}) {
     assert(checkFunction(element), failedAt(element));
     int oldDecision = _cachedDecisions[element];
 
@@ -312,7 +311,7 @@
 
 class CodegenInputsImpl implements CodegenInputs {
   @override
-  final CheckedModeHelpers checkedModeHelpers = new CheckedModeHelpers();
+  final CheckedModeHelpers checkedModeHelpers = CheckedModeHelpers();
 
   @override
   final RuntimeTypesSubstitutions rtiSubstitutions;
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 4dcff21..f82c523 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -33,21 +33,21 @@
   final EnumSet<BackendFeature> _features;
 
   const BackendImpact(
-      {this.staticUses: const <FunctionEntity>[],
-      this.globalUses: const <FunctionEntity>[],
-      this.dynamicUses: const <Selector>[],
-      this.instantiatedTypes: const <InterfaceType>[],
-      this.instantiatedClasses: const <ClassEntity>[],
-      this.globalClasses: const <ClassEntity>[],
-      this.otherImpacts: const <BackendImpact>[],
-      EnumSet<BackendFeature> features: const EnumSet<BackendFeature>.fixed(0)})
+      {this.staticUses = const [],
+      this.globalUses = const [],
+      this.dynamicUses = const [],
+      this.instantiatedTypes = const [],
+      this.instantiatedClasses = const [],
+      this.globalClasses = const [],
+      this.otherImpacts = const [],
+      EnumSet<BackendFeature> features = const EnumSet.fixed(0)})
       : this._features = features;
 
   Iterable<BackendFeature> get features =>
       _features.iterable(BackendFeature.values);
 
   WorldImpact createImpact(ElementEnvironment elementEnvironment) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     registerImpact(impactBuilder, elementEnvironment);
     return impactBuilder;
   }
@@ -57,30 +57,28 @@
       ElementEnvironment elementEnvironment) {
     for (FunctionEntity staticUse in staticUses) {
       assert(staticUse != null);
-      worldImpactBuilder
-          .registerStaticUse(new StaticUse.implicitInvoke(staticUse));
+      worldImpactBuilder.registerStaticUse(StaticUse.implicitInvoke(staticUse));
     }
     for (FunctionEntity staticUse in globalUses) {
       assert(staticUse != null);
-      worldImpactBuilder
-          .registerStaticUse(new StaticUse.implicitInvoke(staticUse));
+      worldImpactBuilder.registerStaticUse(StaticUse.implicitInvoke(staticUse));
     }
     for (Selector selector in dynamicUses) {
       assert(selector != null);
       worldImpactBuilder
-          .registerDynamicUse(new DynamicUse(selector, null, const []));
+          .registerDynamicUse(DynamicUse(selector, null, const []));
     }
     for (InterfaceType instantiatedType in instantiatedTypes) {
       worldImpactBuilder
-          .registerTypeUse(new TypeUse.instantiation(instantiatedType));
+          .registerTypeUse(TypeUse.instantiation(instantiatedType));
     }
     for (ClassEntity cls in instantiatedClasses) {
       worldImpactBuilder.registerTypeUse(
-          new TypeUse.instantiation(elementEnvironment.getRawType(cls)));
+          TypeUse.instantiation(elementEnvironment.getRawType(cls)));
     }
     for (ClassEntity cls in globalClasses) {
       worldImpactBuilder.registerTypeUse(
-          new TypeUse.instantiation(elementEnvironment.getRawType(cls)));
+          TypeUse.instantiation(elementEnvironment.getRawType(cls)));
     }
     for (BackendImpact otherImpact in otherImpacts) {
       otherImpact.registerImpact(worldImpactBuilder, elementEnvironment);
@@ -99,7 +97,7 @@
 
   BackendImpact get getRuntimeTypeArgument {
     return _getRuntimeTypeArgument ??=
-        new BackendImpact(globalUses: [], otherImpacts: [
+        BackendImpact(globalUses: [], otherImpacts: [
       newRtiImpact,
     ]);
   }
@@ -107,7 +105,7 @@
   BackendImpact _computeSignature;
 
   BackendImpact get computeSignature {
-    return _computeSignature ??= new BackendImpact(globalUses: [
+    return _computeSignature ??= BackendImpact(globalUses: [
       _commonElements.setArrayType,
     ], otherImpacts: [
       listValues
@@ -117,7 +115,7 @@
   BackendImpact _mainWithArguments;
 
   BackendImpact get mainWithArguments {
-    return _mainWithArguments ??= new BackendImpact(
+    return _mainWithArguments ??= BackendImpact(
       globalUses: [_commonElements.convertMainArgumentList],
       instantiatedClasses: [
         _commonElements.jsArrayClass,
@@ -128,7 +126,7 @@
 
   BackendImpact _asyncBody;
 
-  BackendImpact get asyncBody => _asyncBody ??= new BackendImpact(staticUses: [
+  BackendImpact get asyncBody => _asyncBody ??= BackendImpact(staticUses: [
         _commonElements.asyncHelperAwait,
         _commonElements.asyncHelperReturn,
         _commonElements.asyncHelperRethrow,
@@ -140,7 +138,7 @@
   BackendImpact _syncStarBody;
 
   BackendImpact get syncStarBody {
-    return _syncStarBody ??= new BackendImpact(staticUses: [
+    return _syncStarBody ??= BackendImpact(staticUses: [
       _commonElements.endOfIteration,
       _commonElements.yieldStar,
       _commonElements.syncStarUncaughtError,
@@ -150,7 +148,7 @@
   BackendImpact _asyncStarBody;
 
   BackendImpact get asyncStarBody {
-    return _asyncStarBody ??= new BackendImpact(staticUses: [
+    return _asyncStarBody ??= BackendImpact(staticUses: [
       _commonElements.asyncStarHelper,
       _commonElements.streamOfController,
       _commonElements.yieldSingle,
@@ -163,7 +161,7 @@
   BackendImpact _typeVariableBoundCheck;
 
   BackendImpact get typeVariableBoundCheck {
-    return _typeVariableBoundCheck ??= new BackendImpact(staticUses: [
+    return _typeVariableBoundCheck ??= BackendImpact(staticUses: [
       _commonElements.checkTypeBound,
     ]);
   }
@@ -172,13 +170,13 @@
 
   BackendImpact get fallThroughError {
     return _fallThroughError ??=
-        new BackendImpact(staticUses: [_commonElements.fallThroughError]);
+        BackendImpact(staticUses: [_commonElements.fallThroughError]);
   }
 
   BackendImpact _asCheck;
 
   BackendImpact get asCheck {
-    return _asCheck ??= new BackendImpact(staticUses: [], otherImpacts: [
+    return _asCheck ??= BackendImpact(staticUses: [], otherImpacts: [
       newRtiImpact,
     ]);
   }
@@ -186,7 +184,7 @@
   BackendImpact _throwNoSuchMethod;
 
   BackendImpact get throwNoSuchMethod {
-    return _throwNoSuchMethod ??= new BackendImpact(staticUses: [
+    return _throwNoSuchMethod ??= BackendImpact(staticUses: [
       _commonElements.throwNoSuchMethod,
     ], otherImpacts: [
       // Also register the types of the arguments passed to this method.
@@ -200,13 +198,13 @@
 
   BackendImpact get stringValues {
     return _stringValues ??=
-        new BackendImpact(instantiatedClasses: [_commonElements.jsStringClass]);
+        BackendImpact(instantiatedClasses: [_commonElements.jsStringClass]);
   }
 
   BackendImpact _numValues;
 
   BackendImpact get numValues {
-    return _numValues ??= new BackendImpact(instantiatedClasses: [
+    return _numValues ??= BackendImpact(instantiatedClasses: [
       _commonElements.jsIntClass,
       _commonElements.jsPositiveIntClass,
       _commonElements.jsUInt32Class,
@@ -224,20 +222,20 @@
 
   BackendImpact get boolValues {
     return _boolValues ??=
-        new BackendImpact(instantiatedClasses: [_commonElements.jsBoolClass]);
+        BackendImpact(instantiatedClasses: [_commonElements.jsBoolClass]);
   }
 
   BackendImpact _nullValue;
 
   BackendImpact get nullValue {
     return _nullValue ??=
-        new BackendImpact(instantiatedClasses: [_commonElements.jsNullClass]);
+        BackendImpact(instantiatedClasses: [_commonElements.jsNullClass]);
   }
 
   BackendImpact _listValues;
 
   BackendImpact get listValues {
-    return _listValues ??= new BackendImpact(globalClasses: [
+    return _listValues ??= BackendImpact(globalClasses: [
       _commonElements.jsArrayClass,
       _commonElements.jsMutableArrayClass,
       _commonElements.jsFixedArrayClass,
@@ -249,7 +247,7 @@
   BackendImpact _throwRuntimeError;
 
   BackendImpact get throwRuntimeError {
-    return _throwRuntimeError ??= new BackendImpact(otherImpacts: [
+    return _throwRuntimeError ??= BackendImpact(otherImpacts: [
       // Also register the types of the arguments passed to this method.
       stringValues
     ]);
@@ -258,7 +256,7 @@
   BackendImpact _throwUnsupportedError;
 
   BackendImpact get throwUnsupportedError {
-    return _throwUnsupportedError ??= new BackendImpact(staticUses: [
+    return _throwUnsupportedError ??= BackendImpact(staticUses: [
       _commonElements.throwUnsupportedError
     ], otherImpacts: [
       // Also register the types of the arguments passed to this method.
@@ -269,7 +267,7 @@
   BackendImpact _superNoSuchMethod;
 
   BackendImpact get superNoSuchMethod {
-    return _superNoSuchMethod ??= new BackendImpact(staticUses: [
+    return _superNoSuchMethod ??= BackendImpact(staticUses: [
       _commonElements.createInvocationMirror,
       _commonElements.objectNoSuchMethod
     ], otherImpacts: [
@@ -282,7 +280,7 @@
   BackendImpact _constantMapLiteral;
 
   BackendImpact get constantMapLiteral {
-    return _constantMapLiteral ??= new BackendImpact(instantiatedClasses: [
+    return _constantMapLiteral ??= BackendImpact(instantiatedClasses: [
       _commonElements.constantMapClass,
       _commonElements.constantStringMapClass,
       _commonElements.generalConstantMapClass,
@@ -292,7 +290,7 @@
   BackendImpact _constantSetLiteral;
 
   BackendImpact get constantSetLiteral =>
-      _constantSetLiteral ??= new BackendImpact(instantiatedClasses: [
+      _constantSetLiteral ??= BackendImpact(instantiatedClasses: [
         _commonElements.constSetLiteralClass,
       ], otherImpacts: [
         constantMapLiteral
@@ -301,7 +299,7 @@
   BackendImpact _constSymbol;
 
   BackendImpact get constSymbol {
-    return _constSymbol ??= new BackendImpact(
+    return _constSymbol ??= BackendImpact(
         instantiatedClasses: [_commonElements.symbolImplementationClass],
         staticUses: [_commonElements.symbolConstructorTarget]);
   }
@@ -328,27 +326,27 @@
 
   BackendImpact get assertWithoutMessage {
     return _assertWithoutMessage ??=
-        new BackendImpact(staticUses: [_commonElements.assertHelper]);
+        BackendImpact(staticUses: [_commonElements.assertHelper]);
   }
 
   BackendImpact _assertWithMessage;
 
   BackendImpact get assertWithMessage {
-    return _assertWithMessage ??= new BackendImpact(
+    return _assertWithMessage ??= BackendImpact(
         staticUses: [_commonElements.assertTest, _commonElements.assertThrow]);
   }
 
   BackendImpact _asyncForIn;
 
   BackendImpact get asyncForIn {
-    return _asyncForIn ??= new BackendImpact(
-        staticUses: [_commonElements.streamIteratorConstructor]);
+    return _asyncForIn ??=
+        BackendImpact(staticUses: [_commonElements.streamIteratorConstructor]);
   }
 
   BackendImpact _stringInterpolation;
 
   BackendImpact get stringInterpolation {
-    return _stringInterpolation ??= new BackendImpact(
+    return _stringInterpolation ??= BackendImpact(
         dynamicUses: [Selectors.toString_],
         staticUses: [_commonElements.stringInterpolationHelper],
         otherImpacts: [_needsString('Strings are created.')]);
@@ -373,7 +371,7 @@
   BackendImpact _catchStatement;
 
   BackendImpact get catchStatement {
-    return _catchStatement ??= new BackendImpact(staticUses: [
+    return _catchStatement ??= BackendImpact(staticUses: [
       _commonElements.exceptionUnwrapper
     ], instantiatedClasses: [
       _commonElements.jsPlainJavaScriptObjectClass,
@@ -384,7 +382,7 @@
   BackendImpact _throwExpression;
 
   BackendImpact get throwExpression {
-    return _throwExpression ??= new BackendImpact(
+    return _throwExpression ??= BackendImpact(
         // We don't know ahead of time whether we will need the throw in a
         // statement context or an expression context, so we register both
         // here, even though we may not need the throwExpression helper.
@@ -397,7 +395,7 @@
   BackendImpact _lazyField;
 
   BackendImpact get lazyField {
-    return _lazyField ??= new BackendImpact(staticUses: [
+    return _lazyField ??= BackendImpact(staticUses: [
       _commonElements.cyclicThrowHelper,
       _commonElements.throwLateFieldADI,
     ]);
@@ -406,7 +404,7 @@
   BackendImpact _typeLiteral;
 
   BackendImpact get typeLiteral {
-    return _typeLiteral ??= new BackendImpact(instantiatedClasses: [
+    return _typeLiteral ??= BackendImpact(instantiatedClasses: [
       _commonElements.typeLiteralClass
     ], staticUses: [
       _commonElements.createRuntimeType,
@@ -417,7 +415,7 @@
   BackendImpact _stackTraceInCatch;
 
   BackendImpact get stackTraceInCatch {
-    return _stackTraceInCatch ??= new BackendImpact(
+    return _stackTraceInCatch ??= BackendImpact(
         instantiatedClasses: [_commonElements.stackTraceHelperClass],
         staticUses: [_commonElements.traceFromException]);
   }
@@ -425,7 +423,7 @@
   BackendImpact _syncForIn;
 
   BackendImpact get syncForIn {
-    return _syncForIn ??= new BackendImpact(
+    return _syncForIn ??= BackendImpact(
         // The SSA builder recognizes certain for-in loops and can generate
         // calls to throwConcurrentModificationError.
         staticUses: [_commonElements.checkConcurrentModificationError]);
@@ -434,7 +432,7 @@
   BackendImpact _typeVariableExpression;
 
   BackendImpact get typeVariableExpression {
-    return _typeVariableExpression ??= new BackendImpact(staticUses: [
+    return _typeVariableExpression ??= BackendImpact(staticUses: [
       _commonElements.setArrayType,
       _commonElements.createRuntimeType
     ], otherImpacts: [
@@ -448,13 +446,13 @@
 
   BackendImpact get typeCheck {
     return _typeCheck ??=
-        new BackendImpact(otherImpacts: [boolValues, newRtiImpact]);
+        BackendImpact(otherImpacts: [boolValues, newRtiImpact]);
   }
 
   BackendImpact _genericTypeCheck;
 
   BackendImpact get genericTypeCheck {
-    return _genericTypeCheck ??= new BackendImpact(staticUses: [
+    return _genericTypeCheck ??= BackendImpact(staticUses: [
       // TODO(johnniwinther): Investigate why this is needed.
       _commonElements.setArrayType,
     ], otherImpacts: [
@@ -468,20 +466,20 @@
 
   BackendImpact get genericIsCheck {
     return _genericIsCheck ??=
-        new BackendImpact(otherImpacts: [intValues, newRtiImpact]);
+        BackendImpact(otherImpacts: [intValues, newRtiImpact]);
   }
 
   BackendImpact _typeVariableTypeCheck;
 
   BackendImpact get typeVariableTypeCheck {
     return _typeVariableTypeCheck ??=
-        new BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
+        BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
   }
 
   BackendImpact _functionTypeCheck;
 
   BackendImpact get functionTypeCheck {
-    return _functionTypeCheck ??= new BackendImpact(
+    return _functionTypeCheck ??= BackendImpact(
         staticUses: [/*helpers.functionTypeTestMetaHelper*/],
         otherImpacts: [newRtiImpact]);
   }
@@ -490,13 +488,13 @@
 
   BackendImpact get futureOrTypeCheck {
     return _futureOrTypeCheck ??=
-        new BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
+        BackendImpact(staticUses: [], otherImpacts: [newRtiImpact]);
   }
 
   BackendImpact _nativeTypeCheck;
 
   BackendImpact get nativeTypeCheck {
-    return _nativeTypeCheck ??= new BackendImpact(staticUses: [
+    return _nativeTypeCheck ??= BackendImpact(staticUses: [
       // We will need to add the "$is" and "$as" properties on the
       // JavaScript object prototype, so we make sure
       // [:defineProperty:] is compiled.
@@ -510,13 +508,13 @@
 
   BackendImpact get closure {
     return _closure ??=
-        new BackendImpact(instantiatedClasses: [_commonElements.functionClass]);
+        BackendImpact(instantiatedClasses: [_commonElements.functionClass]);
   }
 
   BackendImpact _interceptorUse;
 
   BackendImpact get interceptorUse {
-    return _interceptorUse ??= new BackendImpact(
+    return _interceptorUse ??= BackendImpact(
         staticUses: [
           _commonElements.getNativeInterceptorMethod
         ],
@@ -525,7 +523,7 @@
           _commonElements.jsPlainJavaScriptObjectClass,
           _commonElements.jsJavaScriptFunctionClass
         ],
-        features: new EnumSet<BackendFeature>.fromValues([
+        features: EnumSet<BackendFeature>.fromValues([
           BackendFeature.needToInitializeDispatchProperty,
           BackendFeature.needToInitializeIsolateAffinityTag
         ], fixed: true));
@@ -545,7 +543,7 @@
   BackendImpact _numClasses;
 
   BackendImpact get numClasses {
-    return _numClasses ??= new BackendImpact(
+    return _numClasses ??= BackendImpact(
         // The backend will try to optimize number operations and use the
         // `iae` helper directly.
         globalUses: [_commonElements.throwIllegalArgumentException]);
@@ -554,7 +552,7 @@
   BackendImpact _listOrStringClasses;
 
   BackendImpact get listOrStringClasses {
-    return _listOrStringClasses ??= new BackendImpact(
+    return _listOrStringClasses ??= BackendImpact(
         // The backend will try to optimize array and string access and use the
         // `ioore` and `iae` _commonElements directly.
         globalUses: [
@@ -566,7 +564,7 @@
   BackendImpact _functionClass;
 
   BackendImpact get functionClass {
-    return _functionClass ??= new BackendImpact(globalClasses: [
+    return _functionClass ??= BackendImpact(globalClasses: [
       _commonElements.closureClass,
       _commonElements.closureClass0Args,
       _commonElements.closureClass2Args,
@@ -576,7 +574,7 @@
   BackendImpact _mapClass;
 
   BackendImpact get mapClass {
-    return _mapClass ??= new BackendImpact(
+    return _mapClass ??= BackendImpact(
         // The backend will use a literal list to initialize the entries
         // of the map.
         globalClasses: [
@@ -587,7 +585,7 @@
 
   BackendImpact _setClass;
 
-  BackendImpact get setClass => _setClass ??= new BackendImpact(globalClasses: [
+  BackendImpact get setClass => _setClass ??= BackendImpact(globalClasses: [
         // The backend will use a literal list to initialize the entries
         // of the set.
         _commonElements.listClass,
@@ -598,13 +596,13 @@
 
   BackendImpact get boundClosureClass {
     return _boundClosureClass ??=
-        new BackendImpact(globalClasses: [_commonElements.boundClosureClass]);
+        BackendImpact(globalClasses: [_commonElements.boundClosureClass]);
   }
 
   BackendImpact _nativeOrExtendsClass;
 
   BackendImpact get nativeOrExtendsClass {
-    return _nativeOrExtendsClass ??= new BackendImpact(globalUses: [
+    return _nativeOrExtendsClass ??= BackendImpact(globalUses: [
       _commonElements.getNativeInterceptorMethod
     ], globalClasses: [
       _commonElements.jsInterceptorClass,
@@ -617,7 +615,7 @@
   BackendImpact _mapLiteralClass;
 
   BackendImpact get mapLiteralClass {
-    return _mapLiteralClass ??= new BackendImpact(globalUses: [
+    return _mapLiteralClass ??= BackendImpact(globalUses: [
       _commonElements.mapLiteralConstructor,
       _commonElements.mapLiteralConstructorEmpty,
       _commonElements.mapLiteralUntypedMaker,
@@ -628,7 +626,7 @@
   BackendImpact _setLiteralClass;
 
   BackendImpact get setLiteralClass =>
-      _setLiteralClass ??= new BackendImpact(globalUses: [
+      _setLiteralClass ??= BackendImpact(globalUses: [
         _commonElements.setLiteralConstructor,
         _commonElements.setLiteralConstructorEmpty,
         _commonElements.setLiteralUntypedMaker,
@@ -639,13 +637,13 @@
 
   BackendImpact get closureClass {
     return _closureClass ??=
-        new BackendImpact(globalUses: [_commonElements.closureFromTearOff]);
+        BackendImpact(globalUses: [_commonElements.closureFromTearOff]);
   }
 
   BackendImpact _listClasses;
 
   BackendImpact get listClasses {
-    return _listClasses ??= new BackendImpact(
+    return _listClasses ??= BackendImpact(
         // Literal lists can be translated into calls to these functions:
         globalUses: [
           _commonElements.jsArrayTypedConstructor,
@@ -656,7 +654,7 @@
   BackendImpact _jsIndexingBehavior;
 
   BackendImpact get jsIndexingBehavior {
-    return _jsIndexingBehavior ??= new BackendImpact(
+    return _jsIndexingBehavior ??= BackendImpact(
         // These two _commonElements are used by the emitter and the codegen.
         // Because we cannot enqueue elements at the time of emission,
         // we make sure they are always generated.
@@ -667,20 +665,20 @@
 
   BackendImpact get traceHelper {
     return _traceHelper ??=
-        new BackendImpact(globalUses: [_commonElements.traceHelper]);
+        BackendImpact(globalUses: [_commonElements.traceHelper]);
   }
 
   BackendImpact _assertUnreachable;
 
   BackendImpact get assertUnreachable {
-    return _assertUnreachable ??= new BackendImpact(
-        globalUses: [_commonElements.assertUnreachableMethod]);
+    return _assertUnreachable ??=
+        BackendImpact(globalUses: [_commonElements.assertUnreachableMethod]);
   }
 
   BackendImpact _runtimeTypeSupport;
 
   BackendImpact get runtimeTypeSupport {
-    return _runtimeTypeSupport ??= new BackendImpact(globalClasses: [
+    return _runtimeTypeSupport ??= BackendImpact(globalClasses: [
       _commonElements.listClass
     ], globalUses: [
       _commonElements.setArrayType,
@@ -694,7 +692,7 @@
 
   BackendImpact get deferredLoading {
     return _deferredLoading ??=
-        new BackendImpact(globalUses: [_commonElements.checkDeferredIsLoaded],
+        BackendImpact(globalUses: [_commonElements.checkDeferredIsLoaded],
             // Also register the types of the arguments passed to this method.
             globalClasses: [_commonElements.stringClass]);
   }
@@ -702,7 +700,7 @@
   BackendImpact _noSuchMethodSupport;
 
   BackendImpact get noSuchMethodSupport {
-    return _noSuchMethodSupport ??= new BackendImpact(globalUses: [
+    return _noSuchMethodSupport ??= BackendImpact(globalUses: [
       _commonElements.createInvocationMirror,
       _commonElements.createUnmangledInvocationMirror
     ], dynamicUses: [
@@ -715,7 +713,7 @@
   /// Backend impact for accessing a `loadLibrary` function on a deferred
   /// prefix.
   BackendImpact get loadLibrary {
-    return _loadLibrary ??= new BackendImpact(globalUses: [
+    return _loadLibrary ??= BackendImpact(globalUses: [
       // TODO(redemption): delete wrapper when we sunset the old frontend.
       _commonElements.loadLibraryWrapper,
       _commonElements.loadDeferredLibrary,
@@ -727,7 +725,7 @@
   /// Backend impact for performing member closurization.
   BackendImpact get memberClosure {
     return _memberClosure ??=
-        new BackendImpact(globalClasses: [_commonElements.boundClosureClass]);
+        BackendImpact(globalClasses: [_commonElements.boundClosureClass]);
   }
 
   BackendImpact _staticClosure;
@@ -736,14 +734,13 @@
   /// function.
   BackendImpact get staticClosure {
     return _staticClosure ??=
-        new BackendImpact(globalClasses: [_commonElements.closureClass]);
+        BackendImpact(globalClasses: [_commonElements.closureClass]);
   }
 
-  Map<int, BackendImpact> _genericInstantiation = <int, BackendImpact>{};
+  final Map<int, BackendImpact> _genericInstantiation = {};
 
   BackendImpact getGenericInstantiation(int typeArgumentCount) =>
-      _genericInstantiation[typeArgumentCount] ??=
-          new BackendImpact(staticUses: [
+      _genericInstantiation[typeArgumentCount] ??= BackendImpact(staticUses: [
         _commonElements.getInstantiateFunction(typeArgumentCount),
         _commonElements.instantiatedGenericFunctionTypeNewRti,
         _commonElements.closureFunctionType,
diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart
index 425e905..ef67a46 100644
--- a/pkg/compiler/lib/src/js_backend/backend_usage.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart
@@ -104,18 +104,18 @@
 }
 
 class BackendUsageBuilderImpl implements BackendUsageBuilder {
-  FrontendStrategy _frontendStrategy;
+  final FrontendStrategy _frontendStrategy;
   // TODO(johnniwinther): Remove the need for these.
   Setlet<FunctionEntity> _globalFunctionDependencies;
   Setlet<ClassEntity> _globalClassDependencies;
 
   /// List of methods that the backend may use.
-  final Set<FunctionEntity> _helperFunctionsUsed = new Set<FunctionEntity>();
+  final Set<FunctionEntity> _helperFunctionsUsed = {};
 
   /// List of classes that the backend may use.
-  final Set<ClassEntity> _helperClassesUsed = new Set<ClassEntity>();
+  final Set<ClassEntity> _helperClassesUsed = {};
 
-  final Set<RuntimeTypeUse> _runtimeTypeUses = new Set<RuntimeTypeUse>();
+  final Set<RuntimeTypeUse> _runtimeTypeUses = {};
 
   bool _needToInitializeIsolateAffinityTag = false;
   bool _needToInitializeDispatchProperty = false;
@@ -190,14 +190,14 @@
   }
 
   void _processBackendStaticUse(FunctionEntity element,
-      {bool isGlobal: false}) {
+      {bool isGlobal = false}) {
     registerBackendFunctionUse(element);
     if (isGlobal) {
       registerGlobalFunctionDependency(element);
     }
   }
 
-  void _processBackendInstantiation(ClassEntity cls, {bool isGlobal: false}) {
+  void _processBackendInstantiation(ClassEntity cls, {bool isGlobal = false}) {
     registerBackendClassUse(cls);
     if (isGlobal) {
       registerGlobalClassDependency(cls);
@@ -256,18 +256,14 @@
   @override
   void registerGlobalFunctionDependency(FunctionEntity element) {
     assert(element != null);
-    if (_globalFunctionDependencies == null) {
-      _globalFunctionDependencies = new Setlet<FunctionEntity>();
-    }
+    _globalFunctionDependencies ??= Setlet();
     _globalFunctionDependencies.add(element);
   }
 
   @override
   void registerGlobalClassDependency(ClassEntity element) {
     assert(element != null);
-    if (_globalClassDependencies == null) {
-      _globalClassDependencies = new Setlet<ClassEntity>();
-    }
+    _globalClassDependencies ??= Setlet();
     _globalClassDependencies.add(element);
   }
 
@@ -372,7 +368,7 @@
       RuntimeTypeUseKind kind = source.readEnum(RuntimeTypeUseKind.values);
       DartType receiverType = source.readDartType();
       DartType argumentType = source.readDartType(allowNull: true);
-      return new RuntimeTypeUse(kind, receiverType, argumentType);
+      return RuntimeTypeUse(kind, receiverType, argumentType);
     }).toSet();
     bool needToInitializeIsolateAffinityTag = source.readBool();
     bool needToInitializeDispatchProperty = source.readBool();
@@ -434,11 +430,11 @@
 
   @override
   Iterable<FunctionEntity> get globalFunctionDependencies =>
-      _globalFunctionDependencies ?? const <FunctionEntity>[];
+      _globalFunctionDependencies ?? const [];
 
   @override
   Iterable<ClassEntity> get globalClassDependencies =>
-      _globalClassDependencies ?? const <ClassEntity>[];
+      _globalClassDependencies ?? const [];
 
   Iterable<FunctionEntity> get helperFunctionsUsed => _helperFunctionsUsed;
 
diff --git a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
index c0e2d78..85d2323 100644
--- a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
@@ -17,7 +17,7 @@
   StaticUse getStaticUse(CommonElements commonElements) {
     // TODO(johnniwinther): Refactor this to avoid looking up directly in the
     // js helper library but instead access commonElements.
-    return new StaticUse.staticInvoke(
+    return StaticUse.staticInvoke(
         commonElements.findHelperFunction(name), callStructure);
   }
 
@@ -28,7 +28,7 @@
   CheckedModeHelpers();
 
   /// All the checked mode helpers.
-  static const List<CheckedModeHelper> helpers = const <CheckedModeHelper>[
-    const CheckedModeHelper('boolConversionCheck'),
+  static const List<CheckedModeHelper> helpers = [
+    CheckedModeHelper('boolConversionCheck'),
   ];
 }
diff --git a/pkg/compiler/lib/src/js_backend/codegen_listener.dart b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
index f033b01..fe62f76 100644
--- a/pkg/compiler/lib/src/js_backend/codegen_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
@@ -51,7 +51,7 @@
 
   @override
   WorldImpact registerClosurizedMember(FunctionEntity element) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     impactBuilder
         .addImpact(_impacts.memberClosure.createImpact(_elementEnvironment));
     FunctionType type = _elementEnvironment.getFunctionType(element);
@@ -72,7 +72,7 @@
 
   @override
   void registerInstantiatedType(InterfaceType type,
-      {bool isGlobal: false, bool nativeUsage: false}) {
+      {bool isGlobal = false, bool nativeUsage = false}) {
     if (nativeUsage) {
       _nativeEnqueuer.onInstantiatedType(type);
     }
@@ -80,19 +80,19 @@
 
   /// Computes the [WorldImpact] of calling [mainMethod] as the entry point.
   WorldImpact _computeMainImpact(FunctionEntity mainMethod) {
-    WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl mainImpact = WorldImpactBuilderImpl();
     CallStructure callStructure = mainMethod.parameterStructure.callStructure;
     if (callStructure.argumentCount > 0) {
       _impacts.mainWithArguments
           .registerImpact(mainImpact, _elementEnvironment);
-      mainImpact.registerStaticUse(
-          new StaticUse.staticInvoke(mainMethod, callStructure));
+      mainImpact
+          .registerStaticUse(StaticUse.staticInvoke(mainMethod, callStructure));
     }
     if (mainMethod.isGetter) {
-      mainImpact.registerStaticUse(new StaticUse.staticGet(mainMethod));
+      mainImpact.registerStaticUse(StaticUse.staticGet(mainMethod));
     } else {
       mainImpact.registerStaticUse(
-          new StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
+          StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
     }
     return mainImpact;
   }
@@ -123,7 +123,7 @@
 
     // TODO(fishythefish): Avoid registering unnecessary impacts.
     if (!_isNewRtiUsed) {
-      WorldImpactBuilderImpl newRtiImpact = new WorldImpactBuilderImpl();
+      WorldImpactBuilderImpl newRtiImpact = WorldImpactBuilderImpl();
       newRtiImpact.registerStaticUse(StaticUse.staticInvoke(
           _commonElements.rtiAddRulesMethod, CallStructure.TWO_ARGS));
       newRtiImpact.registerStaticUse(StaticUse.staticInvoke(
@@ -166,7 +166,7 @@
     if (constant.isFunction) {
       FunctionConstantValue function = constant;
       impactBuilder
-          .registerStaticUse(new StaticUse.staticTearOff(function.element));
+          .registerStaticUse(StaticUse.staticTearOff(function.element));
     } else if (constant.isInterceptor) {
       // An interceptor constant references the class's prototype chain.
       InterceptorConstantValue interceptor = constant;
@@ -175,7 +175,7 @@
           _elementEnvironment.getThisType(cls), impactBuilder);
     } else if (constant.isType) {
       impactBuilder
-          .registerTypeUse(new TypeUse.instantiation(_commonElements.typeType));
+          .registerTypeUse(TypeUse.instantiation(_commonElements.typeType));
       // If the type is a web component, we need to ensure the constructors are
       // available to 'upgrade' the native object.
       TypeConstantValue type = constant;
@@ -185,7 +185,7 @@
       }
     } else if (constant is InstantiationConstantValue) {
       // TODO(johnniwinther): Register these using `BackendImpact`.
-      impactBuilder.registerTypeUse(new TypeUse.instantiation(
+      impactBuilder.registerTypeUse(TypeUse.instantiation(
           _elementEnvironment.getThisType(_commonElements
               .getInstantiationClass(constant.typeArguments.length))));
 
@@ -200,10 +200,10 @@
   void _computeImpactForInstantiatedConstantType(
       DartType type, WorldImpactBuilder impactBuilder) {
     if (type is InterfaceType) {
-      impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
+      impactBuilder.registerTypeUse(TypeUse.instantiation(type));
       if (_rtiNeed.classNeedsTypeArguments(type.element)) {
         FunctionEntity helper = _commonElements.setArrayType;
-        impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+        impactBuilder.registerStaticUse(StaticUse.staticInvoke(
             helper, helper.parameterStructure.callStructure));
       }
       if (type.element == _commonElements.typeLiteralClass) {
@@ -217,15 +217,15 @@
 
   @override
   WorldImpact registerUsedConstant(ConstantValue constant) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     _computeImpactForCompileTimeConstant(
-        constant, impactBuilder, new LinkedHashSet.identity());
+        constant, impactBuilder, LinkedHashSet.identity());
     return impactBuilder;
   }
 
   @override
   WorldImpact registerUsedElement(MemberEntity member) {
-    WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl worldImpact = WorldImpactBuilderImpl();
     _customElementsAnalysis.registerStaticUse(member);
 
     if (member.isFunction && member.isInstanceMember) {
@@ -241,14 +241,14 @@
   }
 
   WorldImpact _processClass(ClassEntity cls) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     if (cls == _commonElements.closureClass) {
       _impacts.closureClass.registerImpact(impactBuilder, _elementEnvironment);
     }
 
     void registerInstantiation(ClassEntity cls) {
       impactBuilder.registerTypeUse(
-          new TypeUse.instantiation(_elementEnvironment.getRawType(cls)));
+          TypeUse.instantiation(_elementEnvironment.getRawType(cls)));
     }
 
     if (cls == _commonElements.stringClass ||
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index b05bc22..d08b4a8 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -22,9 +22,11 @@
 import 'runtime_types_new.dart' show RecipeEncoder;
 import 'runtime_types_resolution.dart';
 
-typedef jsAst.Expression _ConstantReferenceGenerator(ConstantValue constant);
+typedef _ConstantReferenceGenerator = jsAst.Expression Function(
+    ConstantValue constant);
 
-typedef jsAst.Expression _ConstantListGenerator(jsAst.Expression array);
+typedef _ConstantListGenerator = jsAst.Expression Function(
+    jsAst.Expression array);
 
 /// Visitor that creates [jsAst.Expression]s for constants that are inlined
 /// and therefore can be created during modular code generation.
@@ -54,15 +56,15 @@
 
   @override
   jsAst.Expression visitNull(NullConstantValue constant, [_]) {
-    return new jsAst.LiteralNull();
+    return jsAst.LiteralNull();
   }
 
   @override
   jsAst.Expression visitNonConstant(NonConstantValue constant, [_]) {
-    return new jsAst.LiteralNull();
+    return jsAst.LiteralNull();
   }
 
-  static final _exponentialRE = new RegExp('^'
+  static final _exponentialRE = RegExp('^'
       '\([-+]?\)' // 1: sign
       '\([0-9]+\)' // 2: leading digit(s)
       '\(\.\([0-9]*\)\)?' // 4: fraction digits
@@ -101,14 +103,14 @@
     String representation = value.toString();
     String alternative = null;
     int cutoff = _options.enableMinification ? 10000 : 1e10.toInt();
-    if (value.abs() >= new BigInt.from(cutoff)) {
+    if (value.abs() >= BigInt.from(cutoff)) {
       alternative = _shortenExponentialRepresentation(
           value.toDouble().toStringAsExponential());
     }
     if (alternative != null && alternative.length < representation.length) {
       representation = alternative;
     }
-    return new jsAst.LiteralNumber(representation);
+    return jsAst.LiteralNumber(representation);
   }
 
   @override
@@ -122,7 +124,7 @@
       return js("-1/0");
     } else {
       String shortened = _shortenExponentialRepresentation("$value");
-      return new jsAst.LiteralNumber(shortened);
+      return jsAst.LiteralNumber(shortened);
     }
   }
 
@@ -156,7 +158,7 @@
   @override
   jsAst.Expression visitDummyInterceptor(DummyInterceptorConstantValue constant,
       [_]) {
-    return new jsAst.LiteralNumber('0');
+    return jsAst.LiteralNumber('0');
   }
 
   @override
@@ -215,7 +217,7 @@
   // Matches blank lines, comment lines and trailing comments that can't be part
   // of a string.
   static final RegExp COMMENT_RE =
-      new RegExp(r'''^ *(//.*)?\n|  *//[^''"\n]*$''', multiLine: true);
+      RegExp(r'''^ *(//.*)?\n|  *//[^''"\n]*$''', multiLine: true);
 
   final JCommonElements _commonElements;
   final JElementEnvironment _elementEnvironment;
@@ -247,7 +249,7 @@
     List<jsAst.Expression> elements = constant.entries
         .map(_constantReferenceGenerator)
         .toList(growable: false);
-    jsAst.ArrayInitializer array = new jsAst.ArrayInitializer(elements);
+    jsAst.ArrayInitializer array = jsAst.ArrayInitializer(elements);
     jsAst.Expression value = _makeConstantList(array);
     return maybeAddListTypeArgumentsNewRti(constant, constant.type, value);
   }
@@ -263,7 +265,7 @@
           classElement, "Compiler encoutered unexpected set class $className");
     }
 
-    List<jsAst.Expression> arguments = <jsAst.Expression>[
+    List<jsAst.Expression> arguments = [
       _constantReferenceGenerator(constant.entries),
     ];
 
@@ -272,14 +274,14 @@
     }
 
     jsAst.Expression constructor = _emitter.constructorAccess(classElement);
-    return new jsAst.New(constructor, arguments);
+    return jsAst.New(constructor, arguments);
   }
 
   @override
   jsAst.Expression visitMap(constant_system.JavaScriptMapConstant constant,
       [_]) {
     jsAst.Expression jsMap() {
-      List<jsAst.Property> properties = <jsAst.Property>[];
+      List<jsAst.Property> properties = [];
       for (int i = 0; i < constant.length; i++) {
         StringConstantValue key = constant.keys[i];
         if (key.stringValue ==
@@ -291,13 +293,13 @@
         jsAst.Literal keyExpression = js.string(key.stringValue);
         jsAst.Expression valueExpression =
             _constantReferenceGenerator(constant.values[i]);
-        properties.add(new jsAst.Property(keyExpression, valueExpression));
+        properties.add(jsAst.Property(keyExpression, valueExpression));
       }
-      return new jsAst.ObjectInitializer(properties);
+      return jsAst.ObjectInitializer(properties);
     }
 
     jsAst.Expression jsGeneralMap() {
-      List<jsAst.Expression> data = <jsAst.Expression>[];
+      List<jsAst.Expression> data = [];
       for (int i = 0; i < constant.keys.length; i++) {
         jsAst.Expression keyExpression =
             _constantReferenceGenerator(constant.keys[i]);
@@ -306,13 +308,13 @@
         data.add(keyExpression);
         data.add(valueExpression);
       }
-      return new jsAst.ArrayInitializer(data);
+      return jsAst.ArrayInitializer(data);
     }
 
     ClassEntity classElement = constant.type.element;
     String className = classElement.name;
 
-    List<jsAst.Expression> arguments = <jsAst.Expression>[];
+    List<jsAst.Expression> arguments = [];
 
     // The arguments of the JavaScript constructor for any given Dart class
     // are in the same order as the members of the class element.
@@ -322,7 +324,7 @@
       if (_fieldAnalysis.getFieldData(field).isElided) return;
       if (field.name == constant_system.JavaScriptMapConstant.LENGTH_NAME) {
         arguments
-            .add(new jsAst.LiteralNumber('${constant.keyList.entries.length}'));
+            .add(jsAst.LiteralNumber('${constant.keyList.entries.length}'));
       } else if (field.name ==
           constant_system.JavaScriptMapConstant.JS_OBJECT_NAME) {
         arguments.add(jsMap());
@@ -352,7 +354,7 @@
     }
 
     jsAst.Expression constructor = _emitter.constructorAccess(classElement);
-    jsAst.Expression value = new jsAst.New(constructor, arguments);
+    jsAst.Expression value = jsAst.New(constructor, arguments);
     return value;
   }
 
@@ -390,11 +392,11 @@
     if (element == _commonElements.jsConstClass) {
       StringConstantValue str = constant.fields.values.single;
       String value = str.stringValue;
-      return new jsAst.LiteralExpression(stripComments(value));
+      return jsAst.LiteralExpression(stripComments(value));
     }
     jsAst.Expression constructor =
         _emitter.constructorAccess(constant.type.element);
-    List<jsAst.Expression> fields = <jsAst.Expression>[];
+    List<jsAst.Expression> fields = [];
     _elementEnvironment.forEachInstanceField(element, (_, FieldEntity field) {
       FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(field);
       if (fieldData.isElided) return;
@@ -405,7 +407,7 @@
     if (_rtiNeed.classNeedsTypeArguments(constant.type.element)) {
       fields.add(_reifiedTypeNewRti(constant.type));
     }
-    return new jsAst.New(constructor, fields);
+    return jsAst.New(constructor, fields);
   }
 
   @override
@@ -413,13 +415,13 @@
       [_]) {
     ClassEntity cls =
         _commonElements.getInstantiationClass(constant.typeArguments.length);
-    List<jsAst.Expression> fields = <jsAst.Expression>[
+    List<jsAst.Expression> fields = [
       _constantReferenceGenerator(constant.function)
     ];
     fields.add(_reifiedTypeNewRti(
         _commonElements.dartTypes.interfaceType(cls, constant.typeArguments)));
     jsAst.Expression constructor = _emitter.constructorAccess(cls);
-    return new jsAst.New(constructor, fields);
+    return jsAst.New(constructor, fields);
   }
 
   String stripComments(String rawJavaScript) {
@@ -430,7 +432,7 @@
       ConstantValue constant, InterfaceType type, jsAst.Expression value) {
     assert(type.element == _commonElements.jsArrayClass);
     if (_rtiNeed.classNeedsTypeArguments(type.element)) {
-      return new jsAst.Call(getHelperProperty(_commonElements.setArrayType),
+      return jsAst.Call(getHelperProperty(_commonElements.setArrayType),
           [value, _reifiedTypeNewRti(type)]);
     }
     return value;
diff --git a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
index 3642a24..efbc78d 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -89,7 +89,7 @@
       CommonElements commonElements,
       NativeBasicData nativeData,
       BackendUsageBuilder backendUsageBuilder)
-      : join = new CustomElementsAnalysisJoin(
+      : join = CustomElementsAnalysisJoin(
             elementEnvironment, commonElements, nativeData,
             backendUsageBuilder: backendUsageBuilder),
         super(elementEnvironment, commonElements, nativeData) {
@@ -123,7 +123,7 @@
 
   CustomElementsCodegenAnalysis(CommonElements commonElements,
       ElementEnvironment elementEnvironment, NativeBasicData nativeData)
-      : join = new CustomElementsAnalysisJoin(
+      : join = CustomElementsAnalysisJoin(
             elementEnvironment, commonElements, nativeData),
         super(elementEnvironment, commonElements, nativeData) {
     // TODO(sra): Remove this work-around.  We should mark allClassesSelected in
@@ -154,14 +154,14 @@
 
   final bool forResolution;
 
-  final StagedWorldImpactBuilder impactBuilder = new StagedWorldImpactBuilder();
+  final StagedWorldImpactBuilder impactBuilder = StagedWorldImpactBuilder();
 
   // Classes that are candidates for needing constructors.  Classes are moved to
   // [activeClasses] when we know they need constructors.
-  final Set<ClassEntity> instantiatedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> instantiatedClasses = {};
 
   // Classes explicitly named.
-  final Set<ClassEntity> selectedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> selectedClasses = {};
 
   // True if we must conservatively include all extension classes.
   bool allClassesSelected = false;
@@ -170,7 +170,7 @@
   bool demanded = false;
 
   // ClassesOutput: classes requiring metadata.
-  final Set<ClassEntity> activeClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> activeClasses = {};
 
   CustomElementsAnalysisJoin(
       this._elementEnvironment, this._commonElements, this._nativeData,
@@ -180,7 +180,7 @@
 
   WorldImpact flush() {
     if (!demanded) return const WorldImpact();
-    var newActiveClasses = new Set<ClassEntity>();
+    var newActiveClasses = Set<ClassEntity>();
     for (ClassEntity cls in instantiatedClasses) {
       bool isNative = _nativeData.isNativeClass(cls);
       bool isExtension = !isNative && _nativeData.isNativeOrExtendsNative(cls);
@@ -193,8 +193,8 @@
         Iterable<ConstructorEntity> escapingConstructors =
             computeEscapingConstructors(cls);
         for (ConstructorEntity constructor in escapingConstructors) {
-          impactBuilder.registerStaticUse(new StaticUse.constructorInvoke(
-              constructor, CallStructure.NO_ARGS));
+          impactBuilder.registerStaticUse(
+              StaticUse.constructorInvoke(constructor, CallStructure.NO_ARGS));
         }
         if (forResolution) {
           escapingConstructors
@@ -203,8 +203,7 @@
         // Force the generation of the type constant that is the key to an entry
         // in the generated table.
         ConstantValue constant = _makeTypeConstant(cls);
-        impactBuilder
-            .registerConstantUse(new ConstantUse.customElements(constant));
+        impactBuilder.registerConstantUse(ConstantUse.customElements(constant));
       }
     }
     activeClasses.addAll(newActiveClasses);
@@ -218,7 +217,7 @@
   }
 
   List<ConstructorEntity> computeEscapingConstructors(ClassEntity cls) {
-    List<ConstructorEntity> result = <ConstructorEntity>[];
+    List<ConstructorEntity> result = [];
     // Only classes that extend native classes have constructors in the table.
     // We could refine this to classes that extend Element, but that would break
     // the tests and there is no sane reason to subclass other native classes.
diff --git a/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart b/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart
index 18e3b5a..3df93c3 100644
--- a/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart
+++ b/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart
@@ -380,7 +380,6 @@
   Holder mainConstantHolder;
 
   /// Maps of various object types to the holders they ended up in.
-  final Map<Library, Holder> libraryMap = {};
   final Map<ClassEntity, Holder> classEntityMap = {};
   final Map<ConstantValue, Holder> constantValueMap = {};
   final Map<MemberEntity, Holder> memberEntityMap = {};
@@ -403,11 +402,6 @@
     return map[data] ?? mainHolder;
   }
 
-  /// Returns the [Holder] for [library].
-  Holder globalObjectForLibrary(Library library) {
-    return _lookup(library, library.element, libraryMap);
-  }
-
   /// Returns true if [element] is stored in the static state holder
   /// ([staticStateHolder]).  We intend to store only mutable static state
   /// there, whereas constants are stored in 'C'. Functions, accessors,
@@ -663,7 +657,7 @@
       // Sort holders by reference count within this resource.
       var sortedHolders = holders.toList(growable: false);
       sortedHolders.sort((a, b) {
-        return a.refCount(resource).compareTo(b.refCount(resource));
+        return b.refCount(resource).compareTo(a.refCount(resource));
       });
 
       // Assign names based on frequency. This will be ignored unless
@@ -734,7 +728,6 @@
           constantValueMap[constant.value] = constantHolder;
         }
         for (var library in fragment.libraries) {
-          libraryMap[library] = holder;
           for (var cls in library.classes) {
             _addClass(holder, cls);
           }
@@ -890,7 +883,7 @@
   }
 
   final List<String> userGlobalObjects =
-      new List.from(Namer.reservedGlobalObjectNames)
+      List.from(Namer.reservedGlobalObjectNames)
         ..remove('C')
         ..remove('H')
         ..remove('J')
diff --git a/pkg/compiler/lib/src/js_backend/enqueuer.dart b/pkg/compiler/lib/src/js_backend/enqueuer.dart
index 51740c4..4b011ff 100644
--- a/pkg/compiler/lib/src/js_backend/enqueuer.dart
+++ b/pkg/compiler/lib/src/js_backend/enqueuer.dart
@@ -32,7 +32,7 @@
 /// [Enqueuer] which is specific to code generation.
 class CodegenEnqueuer extends EnqueuerImpl {
   final String name;
-  Set<ClassEntity> _recentClasses = new Setlet<ClassEntity>();
+  final Set<ClassEntity> _recentClasses = Setlet();
   bool _recentConstants = false;
   final CodegenWorldBuilderImpl _worldBuilder;
   final WorkItemBuilder _workItemBuilder;
@@ -47,22 +47,21 @@
 
   WorldImpactVisitor _impactVisitor;
 
-  final Queue<WorkItem> _queue = new Queue<WorkItem>();
+  final Queue<WorkItem> _queue = Queue<WorkItem>();
 
   /// All declaration elements that have been processed by codegen.
-  final Set<MemberEntity> _processedEntities = new Set<MemberEntity>();
+  final Set<MemberEntity> _processedEntities = {};
 
   // If not `null` this is called when the queue has been emptied. It allows for
   // applying additional impacts before re-emptying the queue.
   void Function() onEmptyForTesting;
 
-  static const ImpactUseCase IMPACT_USE =
-      const ImpactUseCase('CodegenEnqueuer');
+  static const ImpactUseCase IMPACT_USE = ImpactUseCase('CodegenEnqueuer');
 
   CodegenEnqueuer(this.task, this._worldBuilder, this._workItemBuilder,
       this.listener, this._annotationsData)
       : this.name = 'codegen enqueuer' {
-    _impactVisitor = new EnqueuerImplImpactVisitor(this);
+    _impactVisitor = EnqueuerImplImpactVisitor(this);
   }
 
   @override
@@ -106,7 +105,7 @@
   }
 
   void _registerInstantiatedType(InterfaceType type,
-      {bool nativeUsage: false}) {
+      {bool nativeUsage = false}) {
     task.measureSubtask('codegen.typeUse', () {
       _worldBuilder.registerTypeInstantiation(type, _applyClassUse);
       listener.registerInstantiatedType(type, nativeUsage: nativeUsage);
@@ -172,7 +171,7 @@
       switch (staticUse.kind) {
         case StaticUseKind.CONSTRUCTOR_INVOKE:
         case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
-          processTypeUse(member, new TypeUse.instantiation(staticUse.type));
+          processTypeUse(member, TypeUse.instantiation(staticUse.type));
           break;
         case StaticUseKind.INLINING:
           // TODO(johnniwinther): Should this be tracked with _MemberUsage ?
diff --git a/pkg/compiler/lib/src/js_backend/field_analysis.dart b/pkg/compiler/lib/src/js_backend/field_analysis.dart
index 8b56213..4ff7751 100644
--- a/pkg/compiler/lib/src/js_backend/field_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/field_analysis.dart
@@ -69,7 +69,7 @@
             requireConstant: false, implicitNull: true);
       }
       if (value != null && value.isConstant) {
-        fieldData[fieldElement] = new AllocatorData(value);
+        fieldData[fieldElement] = AllocatorData(value);
       }
     }
 
@@ -95,7 +95,7 @@
               staticTypeContext, value,
               requireConstant: false, implicitNull: true);
           if (constantValue != null && constantValue.isConstant) {
-            initializerValue = new Initializer.direct(constantValue);
+            initializerValue = Initializer.direct(constantValue);
           } else if (value is ir.VariableGet) {
             ir.VariableDeclaration parameter = value.variable;
             int position =
@@ -107,7 +107,7 @@
                     requireConstant: false, implicitNull: true);
                 if (constantValue != null && constantValue.isConstant) {
                   initializerValue =
-                      new Initializer.positional(position, constantValue);
+                      Initializer.positional(position, constantValue);
                 }
               }
             } else {
@@ -119,7 +119,7 @@
                     requireConstant: false, implicitNull: true);
                 if (constantValue != null && constantValue.isConstant) {
                   initializerValue =
-                      new Initializer.named(parameter.name, constantValue);
+                      Initializer.named(parameter.name, constantValue);
                 }
               }
             }
@@ -128,7 +128,7 @@
         }
       }
     }
-    _classData[class_] = new ClassData(constructors, fieldData);
+    _classData[class_] = ClassData(constructors, fieldData);
   }
 
   void registerStaticField(KField field, EvaluationComplexity complexity) {
@@ -149,7 +149,7 @@
     }
     // TODO(johnniwinther): Remove evaluation of constant when [complexity]
     // holds the constant literal from CFE.
-    _staticFieldData[field] = new StaticFieldData(value, complexity);
+    _staticFieldData[field] = StaticFieldData(value, complexity);
   }
 
   AllocatorData getAllocatorDataForTesting(KField field) {
@@ -232,7 +232,7 @@
       case InitializerKind.complex:
         return '?';
     }
-    throw new UnsupportedError('Unexpected kind $kind');
+    throw UnsupportedError('Unexpected kind $kind');
   }
 
   @override
@@ -255,9 +255,9 @@
       DataSource source, CompilerOptions options) {
     source.begin(tag);
     Map<FieldEntity, FieldAnalysisData> fieldData = source.readMemberMap(
-        (MemberEntity member) => new FieldAnalysisData.fromDataSource(source));
+        (MemberEntity member) => FieldAnalysisData.fromDataSource(source));
     source.end(tag);
-    return new JFieldAnalysis._(fieldData);
+    return JFieldAnalysis._(fieldData);
   }
 
   /// Serializes this [JFieldAnalysis] to [sink].
@@ -379,7 +379,7 @@
                 // because of deferred loading.
                 isInitializedInAllocator = true;
               }
-              fieldData[jField] = new FieldAnalysisData(
+              fieldData[jField] = FieldAnalysisData(
                   initialValue: value,
                   isEffectivelyFinal: isEffectivelyConstant,
                   isElided: isEffectivelyConstant,
@@ -526,7 +526,7 @@
           }
         }
 
-        data = fieldData[jField] = new FieldAnalysisData(
+        data = fieldData[jField] = FieldAnalysisData(
             initialValue: value,
             isEffectivelyFinal: isEffectivelyFinal,
             isElided: isElided,
@@ -562,7 +562,7 @@
 
     dependentFields.forEach(processField);
 
-    return new JFieldAnalysis._(fieldData);
+    return JFieldAnalysis._(fieldData);
   }
 
   // TODO(sra): Add way to let injected fields be initialized to a constant in
@@ -595,12 +595,12 @@
 
   const FieldAnalysisData(
       {this.initialValue,
-      this.isInitializedInAllocator: false,
-      this.isEffectivelyFinal: false,
-      this.isElided: false,
-      this.isEager: false,
-      this.eagerCreationIndex: null,
-      this.eagerFieldDependenciesForTesting: null});
+      this.isInitializedInAllocator = false,
+      this.isEffectivelyFinal = false,
+      this.isElided = false,
+      this.isEager = false,
+      this.eagerCreationIndex = null,
+      this.eagerFieldDependenciesForTesting = null});
 
   factory FieldAnalysisData.fromDataSource(DataSource source) {
     source.begin(tag);
@@ -614,7 +614,7 @@
     List<FieldEntity> eagerFieldDependencies =
         source.readMembers<FieldEntity>(emptyAsNull: true);
     source.end(tag);
-    return new FieldAnalysisData(
+    return FieldAnalysisData(
         initialValue: initialValue,
         isInitializedInAllocator: isInitializedInAllocator,
         isEffectivelyFinal: isEffectivelyFinal,
diff --git a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
index f31ef40..7f624d1 100644
--- a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
+++ b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
@@ -15,15 +15,15 @@
   // will return `null` and a normal field name has to be used.
   jsAst.Name _minifiedInstanceFieldPropertyName(FieldEntity element) {
     if (_nativeData.hasFixedBackendName(element)) {
-      return new StringBackedName(_nativeData.getFixedBackendName(element));
+      return StringBackedName(_nativeData.getFixedBackendName(element));
     }
 
     _FieldNamingScope names;
     if (element is JRecordField) {
-      names = new _FieldNamingScope.forBox(element.box, fieldRegistry);
+      names = _FieldNamingScope.forBox(element.box, fieldRegistry);
     } else {
       ClassEntity cls = element.enclosingClass;
-      names = new _FieldNamingScope.forClass(cls, _closedWorld, fieldRegistry);
+      names = _FieldNamingScope.forClass(cls, _closedWorld, fieldRegistry);
     }
 
     if (names.containsField(element)) {
@@ -69,7 +69,7 @@
       if (index < MinifyNamer._reservedNativeProperties.length &&
           MinifyNamer._reservedNativeProperties[index].length <= 2) {
         nameStore.add(
-            new StringBackedName(MinifyNamer._reservedNativeProperties[index]));
+            StringBackedName(MinifyNamer._reservedNativeProperties[index]));
       } else {
         nameStore.add(namer.getFreshName(namer.instanceScope, "field$index"));
       }
@@ -144,7 +144,7 @@
 
   factory _FieldNamingScope.forBox(Local box, _FieldNamingRegistry registry) {
     return registry.scopes
-        .putIfAbsent(box, () => new _BoxFieldNamingScope(box, registry));
+        .putIfAbsent(box, () => _BoxFieldNamingScope(box, registry));
   }
 
   _FieldNamingScope.rootScope(this.container, this.registry)
@@ -208,7 +208,7 @@
   @override
   jsAst.Name _nextName() {
     jsAst.Name proposed = super._nextName();
-    return new CompoundName([proposed, Namer._literalDollar]);
+    return CompoundName([proposed, Namer._literalDollar]);
   }
 }
 
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index cfa4155..9e962530 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -11,34 +11,34 @@
   _FieldNamingRegistry fieldRegistry;
   List<TokenName> tokens = [];
 
-  Map<NamingScope, TokenScope> _tokenScopes = {};
+  final Map<NamingScope, TokenScope> _tokenScopes = {};
 
   @override
   String get genericInstantiationPrefix => r'$I';
 
   FrequencyBasedNamer(JClosedWorld closedWorld, FixedNames fixedNames)
       : super(closedWorld, fixedNames) {
-    fieldRegistry = new _FieldNamingRegistry(this);
+    fieldRegistry = _FieldNamingRegistry(this);
   }
 
   TokenScope newScopeFor(NamingScope scope) {
     if (scope == instanceScope) {
-      Set<String> illegalNames = new Set<String>.from(jsReserved);
+      Set<String> illegalNames = Set<String>.from(jsReserved);
       for (String illegal in MinifyNamer._reservedNativeProperties) {
         illegalNames.add(illegal);
         if (MinifyNamer._hasBannedPrefix(illegal)) {
           illegalNames.add(illegal.substring(1));
         }
       }
-      return new TokenScope(illegalNames: illegalNames);
+      return TokenScope(illegalNames: illegalNames);
     } else {
-      return new TokenScope(illegalNames: jsReserved);
+      return TokenScope(illegalNames: jsReserved);
     }
   }
 
   @override
   jsAst.Name getFreshName(NamingScope scope, String proposedName,
-      {bool sanitizeForNatives: false, bool sanitizeForAnnotations: false}) {
+      {bool sanitizeForNatives = false, bool sanitizeForAnnotations = false}) {
     // Grab the scope for this token
     TokenScope tokenScope =
         _tokenScopes.putIfAbsent(scope, () => newScopeFor(scope));
@@ -48,7 +48,7 @@
         sanitizeForNatives: sanitizeForNatives,
         sanitizeForAnnotations: sanitizeForAnnotations);
 
-    TokenName name = new TokenName(tokenScope, proposed);
+    TokenName name = TokenName(tokenScope, proposed);
     tokens.add(name);
     return name;
   }
@@ -82,7 +82,7 @@
   List<int> _nextName;
   final Set<String> illegalNames;
 
-  TokenScope({this.illegalNames = const {}, this.initialChar: $a}) {
+  TokenScope({this.illegalNames = const {}, this.initialChar = $a}) {
     _nextName = [initialChar];
   }
 
@@ -125,7 +125,7 @@
   String getNextName() {
     String proposal;
     do {
-      proposal = new String.fromCharCodes(_nextName);
+      proposal = String.fromCharCodes(_nextName);
       _incrementName();
     } while (MinifyNamer._hasBannedPrefix(proposal) ||
         illegalNames.contains(proposal));
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index a51c0d0..6427bee 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -62,8 +62,7 @@
 
   @override
   WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) {
-    TransformedWorldImpact transformed =
-        new TransformedWorldImpact(worldImpact);
+    TransformedWorldImpact transformed = TransformedWorldImpact(worldImpact);
 
     void registerImpact(BackendImpact impact) {
       impact.registerImpact(transformed, _elementEnvironment);
@@ -95,8 +94,8 @@
           break;
         case Feature.FIELD_WITHOUT_INITIALIZER:
         case Feature.LOCAL_WITHOUT_INITIALIZER:
-          transformed.registerTypeUse(
-              new TypeUse.instantiation(_commonElements.nullType));
+          transformed
+              .registerTypeUse(TypeUse.instantiation(_commonElements.nullType));
           registerImpact(_impacts.nullLiteral);
           break;
         case Feature.LAZY_FIELD:
@@ -213,7 +212,7 @@
 
     if (hasTypeLiteral) {
       transformed
-          .registerTypeUse(new TypeUse.instantiation(_commonElements.typeType));
+          .registerTypeUse(TypeUse.instantiation(_commonElements.typeType));
       registerImpact(_impacts.typeLiteral);
     }
 
@@ -223,8 +222,7 @@
       if (mapLiteralUse.isConstant) {
         registerImpact(_impacts.constantMapLiteral);
       } else {
-        transformed
-            .registerTypeUse(new TypeUse.instantiation(mapLiteralUse.type));
+        transformed.registerTypeUse(TypeUse.instantiation(mapLiteralUse.type));
       }
     }
 
@@ -232,16 +230,14 @@
       if (setLiteralUse.isConstant) {
         registerImpact(_impacts.constantSetLiteral);
       } else {
-        transformed
-            .registerTypeUse(new TypeUse.instantiation(setLiteralUse.type));
+        transformed.registerTypeUse(TypeUse.instantiation(setLiteralUse.type));
       }
     }
 
     for (ListLiteralUse listLiteralUse in worldImpact.listLiterals) {
       // TODO(johnniwinther): Use the [isConstant] and [isEmpty] property when
       // factory constructors are registered directly.
-      transformed
-          .registerTypeUse(new TypeUse.instantiation(listLiteralUse.type));
+      transformed.registerTypeUse(TypeUse.instantiation(listLiteralUse.type));
     }
 
     for (RuntimeTypeUse runtimeTypeUse in worldImpact.runtimeTypeUses) {
@@ -398,7 +394,7 @@
   }
 
   WorldImpact transformCodegenImpact(CodegenImpact impact) {
-    TransformedWorldImpact transformed = new TransformedWorldImpact(impact);
+    TransformedWorldImpact transformed = TransformedWorldImpact(impact);
 
     for (TypeUse typeUse in impact.typeUses) {
       DartType type = typeUse.type;
diff --git a/pkg/compiler/lib/src/js_backend/inferred_data.dart b/pkg/compiler/lib/src/js_backend/inferred_data.dart
index b84035c..3dc454a 100644
--- a/pkg/compiler/lib/src/js_backend/inferred_data.dart
+++ b/pkg/compiler/lib/src/js_backend/inferred_data.dart
@@ -19,9 +19,9 @@
       DataSource source, JClosedWorld closedWorld) {
     bool isTrivial = source.readBool();
     if (isTrivial) {
-      return new TrivialInferredData();
+      return TrivialInferredData();
     } else {
-      return new InferredDataImpl.readFromDataSource(source, closedWorld);
+      return InferredDataImpl.readFromDataSource(source, closedWorld);
     }
   }
 
@@ -104,7 +104,7 @@
     source.begin(tag);
     Set<MemberEntity> functionsCalledInLoop = source.readMembers().toSet();
     Map<FunctionEntity, SideEffects> sideEffects = source.readMemberMap(
-        (MemberEntity member) => new SideEffects.readFromDataSource(source));
+        (MemberEntity member) => SideEffects.readFromDataSource(source));
     Set<FunctionEntity> sideEffectsFreeElements =
         source.readMembers<FunctionEntity>().toSet();
     Set<FunctionEntity> elementsThatCannotThrow =
@@ -112,7 +112,7 @@
     Set<FunctionEntity> functionsThatMightBePassedToApply =
         source.readMembers<FunctionEntity>().toSet();
     source.end(tag);
-    return new InferredDataImpl(
+    return InferredDataImpl(
         closedWorld,
         functionsCalledInLoop,
         sideEffects,
@@ -142,9 +142,9 @@
     // We're not tracking side effects of closures.
     if (selector.isClosureCall ||
         _closedWorld.includesClosureCall(selector, receiver)) {
-      return new SideEffects();
+      return SideEffects();
     }
-    SideEffects sideEffects = new SideEffects.empty();
+    SideEffects sideEffects = SideEffects.empty();
     for (MemberEntity e in _closedWorld.locateMembers(selector, receiver)) {
       if (e.isField) {
         if (selector.isGetter) {
@@ -175,7 +175,7 @@
     return _sideEffects.putIfAbsent(element, _makeSideEffects);
   }
 
-  static SideEffects _makeSideEffects() => new SideEffects();
+  static SideEffects _makeSideEffects() => SideEffects();
 
   @override
   bool isCalledInLoop(MemberEntity element) {
@@ -205,20 +205,15 @@
 }
 
 class InferredDataBuilderImpl implements InferredDataBuilder {
-  final Set<MemberEntity> _functionsCalledInLoop = new Set<MemberEntity>();
-  Map<MemberEntity, SideEffectsBuilder> _sideEffectsBuilders =
-      <MemberEntity, SideEffectsBuilder>{};
-  final Set<FunctionEntity> prematureSideEffectAccesses =
-      new Set<FunctionEntity>();
+  final Set<MemberEntity> _functionsCalledInLoop = {};
+  Map<MemberEntity, SideEffectsBuilder> _sideEffectsBuilders = {};
+  final Set<FunctionEntity> prematureSideEffectAccesses = {};
 
-  final Set<FunctionEntity> _sideEffectsFreeElements =
-      new Set<FunctionEntity>();
+  final Set<FunctionEntity> _sideEffectsFreeElements = {};
 
-  final Set<FunctionEntity> _elementsThatCannotThrow =
-      new Set<FunctionEntity>();
+  final Set<FunctionEntity> _elementsThatCannotThrow = {};
 
-  final Set<FunctionEntity> _functionsThatMightBePassedToApply =
-      new Set<FunctionEntity>();
+  final Set<FunctionEntity> _functionsThatMightBePassedToApply = {};
 
   InferredDataBuilderImpl(AnnotationsData annotationsData) {
     annotationsData.forEachNoThrows(registerCannotThrow);
@@ -227,14 +222,14 @@
 
   @override
   SideEffectsBuilder getSideEffectsBuilder(MemberEntity member) {
-    return _sideEffectsBuilders[member] ??= new SideEffectsBuilder(member);
+    return _sideEffectsBuilders[member] ??= SideEffectsBuilder(member);
   }
 
   @override
   void registerSideEffectsFree(FunctionEntity element) {
     _sideEffectsFreeElements.add(element);
     assert(!_sideEffectsBuilders.containsKey(element));
-    _sideEffectsBuilders[element] = new SideEffectsBuilder.free(element);
+    _sideEffectsBuilders[element] = SideEffectsBuilder.free(element);
   }
 
   /// Compute [SideEffects] for all registered [SideEffectBuilder]s.
@@ -242,8 +237,7 @@
   InferredData close(JClosedWorld closedWorld) {
     assert(_sideEffectsBuilders != null,
         "Inferred data has already been computed.");
-    Map<FunctionEntity, SideEffects> _sideEffects =
-        <FunctionEntity, SideEffects>{};
+    Map<FunctionEntity, SideEffects> _sideEffects = {};
     Iterable<SideEffectsBuilder> sideEffectsBuilders =
         _sideEffectsBuilders.values;
     emptyWorkList(sideEffectsBuilders);
@@ -252,7 +246,7 @@
     }
     _sideEffectsBuilders = null;
 
-    return new InferredDataImpl(
+    return InferredDataImpl(
         closedWorld,
         _functionsCalledInLoop,
         _sideEffects,
@@ -263,8 +257,8 @@
 
   static void emptyWorkList(Iterable<SideEffectsBuilder> sideEffectsBuilders) {
     // TODO(johnniwinther): Optimize this algorithm.
-    Queue<SideEffectsBuilder> queue = new Queue<SideEffectsBuilder>();
-    Set<SideEffectsBuilder> inQueue = new Set<SideEffectsBuilder>();
+    Queue<SideEffectsBuilder> queue = Queue();
+    Set<SideEffectsBuilder> inQueue = {};
 
     for (SideEffectsBuilder builder in sideEffectsBuilders) {
       queue.addLast(builder);
@@ -305,7 +299,7 @@
 }
 
 class TrivialInferredData implements InferredData {
-  final SideEffects _allSideEffects = new SideEffects();
+  final SideEffects _allSideEffects = SideEffects();
 
   @override
   void writeToDataSink(DataSink sink) {
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index e92b0ce..956a0f3 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -97,13 +97,11 @@
   ///
   /// These members must be invoked with a correct explicit receiver even when
   /// the receiver is not an intercepted class.
-  final Map<String, Set<MemberEntity>> _interceptedMixinElements =
-      new Map<String, Set<MemberEntity>>();
+  final Map<String, Set<MemberEntity>> _interceptedMixinElements = {};
 
-  final Map<String, Set<ClassEntity>> _interceptedClassesCache =
-      new Map<String, Set<ClassEntity>>();
+  final Map<String, Set<ClassEntity>> _interceptedClassesCache = {};
 
-  final Set<ClassEntity> _noClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> _noClasses = {};
 
   InterceptorDataImpl(
       this._nativeData,
@@ -126,12 +124,8 @@
     Set<ClassEntity> classesMixedIntoInterceptedClasses =
         source.readClasses().toSet();
     source.end(tag);
-    return new InterceptorDataImpl(
-        nativeData,
-        commonElements,
-        interceptedMembers,
-        interceptedClasses,
-        classesMixedIntoInterceptedClasses);
+    return InterceptorDataImpl(nativeData, commonElements, interceptedMembers,
+        interceptedClasses, classesMixedIntoInterceptedClasses);
   }
 
   @override
@@ -224,7 +218,7 @@
     return _interceptedClassesCache.putIfAbsent(name, () {
       // Populate the cache by running through all the elements and
       // determine if the given selector applies to them.
-      Set<ClassEntity> result = new Set<ClassEntity>();
+      Set<ClassEntity> result = {};
       for (MemberEntity element in intercepted) {
         ClassEntity classElement = element.enclosingClass;
         if (_isCompileTimeOnlyClass(classElement)) continue;
@@ -250,7 +244,7 @@
       closedWorld.classHierarchy.forEachStrictSubclassOf(use,
           (ClassEntity subclass) {
         if (_nativeData.isNativeOrExtendsNative(subclass)) {
-          if (result == null) result = new Set<ClassEntity>();
+          if (result == null) result = {};
           result.add(subclass);
         }
         return IterationStep.CONTINUE;
@@ -294,24 +288,22 @@
   /// The members of instantiated interceptor classes: maps a member name to the
   /// list of members that have that name. This map is used by the codegen to
   /// know whether a send must be intercepted or not.
-  final Map<String, Set<MemberEntity>> _interceptedElements =
-      <String, Set<MemberEntity>>{};
+  final Map<String, Set<MemberEntity>> _interceptedElements = {};
 
   /// Set of classes whose methods are intercepted.
-  final Set<ClassEntity> _interceptedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> _interceptedClasses = {};
 
   /// Set of classes used as mixins on intercepted (native and primitive)
   /// classes. Methods on these classes might also be mixed in to regular Dart
   /// (unintercepted) classes.
-  final Set<ClassEntity> _classesMixedIntoInterceptedClasses =
-      new Set<ClassEntity>();
+  final Set<ClassEntity> _classesMixedIntoInterceptedClasses = {};
 
   InterceptorDataBuilderImpl(
       this._nativeData, this._elementEnvironment, this._commonElements);
 
   @override
   InterceptorData close() {
-    return new InterceptorDataImpl(
+    return InterceptorDataImpl(
         _nativeData,
         _commonElements,
         _interceptedElements,
@@ -326,8 +318,7 @@
       if (member.name == Identifiers.call) return;
       // All methods on [Object] are shadowed by [Interceptor].
       if (cls == _commonElements.objectClass) return;
-      Set<MemberEntity> set =
-          _interceptedElements[member.name] ??= new Set<MemberEntity>();
+      Set<MemberEntity> set = _interceptedElements[member.name] ??= {};
       set.add(member);
     });
 
@@ -344,8 +335,7 @@
           (ClassEntity cls, MemberEntity member) {
         // All methods on [Object] are shadowed by [Interceptor].
         if (cls == _commonElements.objectClass) return;
-        Set<MemberEntity> set =
-            _interceptedElements[member.name] ??= new Set<MemberEntity>();
+        Set<MemberEntity> set = _interceptedElements[member.name] ??= {};
         set.add(member);
       });
     }
@@ -369,7 +359,8 @@
     return interceptors;
   }
 
-  Map<Selector, Map<String, OneShotInterceptor>> _oneShotInterceptors = {};
+  final Map<Selector, Map<String, OneShotInterceptor>> _oneShotInterceptors =
+      {};
 
   /// A set of specialized versions of the [getInterceptorMethod].
   ///
@@ -380,7 +371,7 @@
   Iterable<SpecializedGetInterceptor> get specializedGetInterceptors =>
       _specializedGetInterceptors.values;
 
-  Map<String, SpecializedGetInterceptor> _specializedGetInterceptors = {};
+  final Map<String, SpecializedGetInterceptor> _specializedGetInterceptors = {};
 
   jsAst.Name registerOneShotInterceptor(
       Selector selector, ModularNamer namer, JClosedWorld closedWorld) {
@@ -391,7 +382,7 @@
     Map<String, OneShotInterceptor> interceptors =
         _oneShotInterceptors[selector] ??= {};
     OneShotInterceptor interceptor =
-        interceptors[key] ??= new OneShotInterceptor(key, selector);
+        interceptors[key] ??= OneShotInterceptor(key, selector);
     interceptor.classes.addAll(classes);
     registerSpecializedGetInterceptor(classes, namer);
     return namer.nameForOneShotInterceptor(selector, classes);
@@ -406,7 +397,7 @@
     }
     String key = suffixForGetInterceptor(_commonElements, _nativeData, classes);
     SpecializedGetInterceptor interceptor =
-        _specializedGetInterceptors[key] ??= new SpecializedGetInterceptor(key);
+        _specializedGetInterceptors[key] ??= SpecializedGetInterceptor(key);
     interceptor.classes.addAll(classes);
   }
 }
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index 5137d62..175290c 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -17,7 +17,7 @@
 jsAst.Statement buildJsInteropBootstrap(
     CodegenWorld codegenWorld, NativeBasicData nativeBasicData, Namer namer) {
   if (!nativeBasicData.isJsInteropUsed) return null;
-  List<jsAst.Statement> statements = <jsAst.Statement>[];
+  List<jsAst.Statement> statements = [];
   codegenWorld.forEachInvokedName(
       (String name, Map<Selector, SelectorConstraints> selectors) {
     selectors.forEach((Selector selector, SelectorConstraints constraints) {
@@ -27,7 +27,7 @@
         int argumentCount = selector.argumentCount;
         String candidateParameterNames =
             'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
-        List<String> parameters = new List<String>.generate(
+        List<String> parameters = List<String>.generate(
             argumentCount, (i) => candidateParameterNames[i]);
 
         jsAst.Name name = namer.invocationName(selector);
@@ -37,7 +37,7 @@
       }
     });
   });
-  return new jsAst.Block(statements);
+  return jsAst.Block(statements);
 }
 
 FunctionType buildJsFunctionType(DartTypes dartTypes) {
@@ -47,7 +47,7 @@
   return dartTypes.functionType(
       dartTypes.dynamicType(),
       const <DartType>[],
-      new List<DartType>.filled(16, dartTypes.dynamicType()),
+      List<DartType>.filled(16, dartTypes.dynamicType()),
       const <String>[],
       const <String>{},
       const <DartType>[],
diff --git a/pkg/compiler/lib/src/js_backend/minify_namer.dart b/pkg/compiler/lib/src/js_backend/minify_namer.dart
index 236a687..94f28fc 100644
--- a/pkg/compiler/lib/src/js_backend/minify_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/minify_namer.dart
@@ -13,7 +13,7 @@
   MinifyNamer(JClosedWorld closedWorld, FixedNames fixedNames)
       : super(closedWorld, fixedNames) {
     reserveBackendNames();
-    fieldRegistry = new _FieldNamingRegistry(this);
+    fieldRegistry = _FieldNamingRegistry(this);
   }
 
   @override
@@ -32,7 +32,7 @@
   /// minified names will always avoid clashing with annotated names or natives.
   @override
   String _generateFreshStringForName(String proposedName, NamingScope scope,
-      {bool sanitizeForNatives: false, bool sanitizeForAnnotations: false}) {
+      {bool sanitizeForNatives = false, bool sanitizeForAnnotations = false}) {
     String freshName;
     String suggestion = scope.suggestName(proposedName);
     if (suggestion != null && scope.isUnused(suggestion)) {
@@ -48,7 +48,7 @@
   // variables) because they clash with names from the DOM. However, it is
   // OK to use them as fields, as we only access fields directly if we know
   // the receiver type.
-  static const List<String> _reservedNativeProperties = const <String>[
+  static const List<String> _reservedNativeProperties = [
     'a', 'b', 'c', 'd', 'e', 'f', 'r', 'x', 'y', 'z', 'Q',
     // 2-letter:
     'ch', 'cx', 'cy', 'db', 'dx', 'dy', 'fr', 'fx', 'fy', 'go', 'id', 'k1',
@@ -95,7 +95,7 @@
     // individually per program, but that would mean that the output of the
     // minifier was less stable from version to version of the program being
     // minified.
-    _populateSuggestedNames(instanceScope, const <String>[
+    _populateSuggestedNames(instanceScope, const [
       r'$add',
       r'add$1',
       r'$and',
@@ -136,7 +136,7 @@
       r'toString$0'
     ]);
 
-    _populateSuggestedNames(globalScope, const <String>[
+    _populateSuggestedNames(globalScope, const [
       r'Object',
       'wrapException',
       r'$eq',
@@ -184,7 +184,7 @@
       do {
         assert(c != $Z);
         c = (c == $z) ? $A : c + 1;
-        letter = new String.fromCharCodes([c]);
+        letter = String.fromCharCodes([c]);
       } while (_hasBannedPrefix(letter) || scope.isUsed(letter));
       assert(!scope.hasSuggestion(name));
       scope.addSuggestion(name, letter);
@@ -208,13 +208,13 @@
     for (int n = 1; n <= 3; n++) {
       int h = hash;
       while (h > 10) {
-        List<int> codes = <int>[_letterNumber(h)];
+        List<int> codes = [_letterNumber(h)];
         int h2 = h ~/ ALPHABET_CHARACTERS;
         for (int i = 1; i < n; i++) {
           codes.add(_alphaNumericNumber(h2));
           h2 ~/= ALPHANUMERIC_CHARACTERS;
         }
-        final candidate = new String.fromCharCodes(codes);
+        final candidate = String.fromCharCodes(codes);
         if (scope.isUnused(candidate) &&
             !jsReserved.contains(candidate) &&
             !_hasBannedPrefix(candidate) &&
@@ -251,14 +251,13 @@
 
   /// Remember bad hashes to avoid using a the same character with long numbers
   /// for frequent hashes. For example, `closure` is a very common name.
-  Map<int, int> _badNames = new Map<int, int>();
+  final Map<int, int> _badNames = {};
 
   /// If we can't find a hash based name in the three-letter space, then base
   /// the name on a letter and a counter.
   String _badName(int hash, NamingScope scope) {
     int count = _badNames.putIfAbsent(hash, () => 0);
-    String startLetter =
-        new String.fromCharCodes([_letterNumber(hash + count)]);
+    String startLetter = String.fromCharCodes([_letterNumber(hash + count)]);
     _badNames[hash] = count + 1;
     String name;
     int i = 0;
@@ -333,14 +332,14 @@
     return registry.putIfAbsent(cls, () {
       ClassEntity superclass = environment.getSuperClass(cls);
       if (superclass == null) {
-        return new _ConstructorBodyNamingScope.rootScope(cls, environment);
+        return _ConstructorBodyNamingScope.rootScope(cls, environment);
       } else if (environment.isMixinApplication(cls)) {
-        return new _ConstructorBodyNamingScope.forMixinApplication(cls,
-            new _ConstructorBodyNamingScope(superclass, registry, environment));
+        return _ConstructorBodyNamingScope.forMixinApplication(cls,
+            _ConstructorBodyNamingScope(superclass, registry, environment));
       } else {
-        return new _ConstructorBodyNamingScope.forClass(
+        return _ConstructorBodyNamingScope.forClass(
             cls,
-            new _ConstructorBodyNamingScope(superclass, registry, environment),
+            _ConstructorBodyNamingScope(superclass, registry, environment),
             environment);
       }
     });
@@ -361,12 +360,12 @@
 }
 
 abstract class _MinifyConstructorBodyNamer implements Namer {
-  Map<ClassEntity, _ConstructorBodyNamingScope> _constructorBodyScopes =
-      new Map<ClassEntity, _ConstructorBodyNamingScope>();
+  final Map<ClassEntity, _ConstructorBodyNamingScope> _constructorBodyScopes =
+      {};
 
   @override
   jsAst.Name constructorBodyName(ConstructorBodyEntity method) {
-    _ConstructorBodyNamingScope scope = new _ConstructorBodyNamingScope(
+    _ConstructorBodyNamingScope scope = _ConstructorBodyNamingScope(
         method.enclosingClass, _constructorBodyScopes, _elementEnvironment);
     String key = scope.constructorBodyKeyFor(method);
     return _disambiguateMemberByKey(
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 359d642..11d3b51 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -135,7 +135,7 @@
 /// For local variables, the [Namer] only provides *proposed names*. These names
 /// must be disambiguated elsewhere.
 class Namer extends ModularNamer {
-  static const List<String> javaScriptKeywords = const <String>[
+  static const List<String> javaScriptKeywords = [
     // ES5 7.6.1.1 Keywords.
     'break',
     'do',
@@ -238,7 +238,7 @@
     // Other words to avoid due to non-standard keyword-like behavior.
   ];
 
-  static const List<String> reservedPropertySymbols = const <String>[
+  static const List<String> reservedPropertySymbols = [
     "__proto__", "prototype", "constructor", "call",
     // "use strict" disallows the use of "arguments" and "eval" as
     // variable names or property names. See ECMA-262, Edition 5.1,
@@ -249,7 +249,7 @@
   /// A set of all capitalized global symbols.
   /// This set is so [DeferredHolderFinalizer] can use names like:
   /// [A-Z][_0-9a-zA-Z]* without collisions
-  static const Set<String> reservedCapitalizedGlobalSymbols = const {
+  static const Set<String> reservedCapitalizedGlobalSymbols = {
     // Section references are from Ecma-262
     // (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf)
 
@@ -304,7 +304,7 @@
 
   /// Symbols that we might be using in our JS snippets. Some of the symbols in
   /// these sections are in [reservedGlobalUpperCaseSymbols] above.
-  static const List<String> reservedGlobalSymbols = const <String>[
+  static const List<String> reservedGlobalSymbols = [
     // Section references are from Ecma-262
     // (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf)
 
@@ -394,7 +394,7 @@
 
   // TODO(joshualitt): Stop reserving these names after local naming is updated
   // to use frequencies.
-  static const List<String> reservedGlobalObjectNames = const <String>[
+  static const List<String> reservedGlobalObjectNames = [
     "A",
     "B",
     "C", // Global object for *C*onstants.
@@ -423,12 +423,12 @@
     "Z",
   ];
 
-  static const List<String> reservedGlobalHelperFunctions = const <String>[
+  static const List<String> reservedGlobalHelperFunctions = [
     "init",
   ];
 
   static final List<String> userGlobalObjects =
-      new List.from(reservedGlobalObjectNames)
+      List.from(reservedGlobalObjectNames)
         ..remove('C')
         ..remove('H')
         ..remove('J')
@@ -471,7 +471,7 @@
   /// The non-minifying namer's [callPrefix] with a dollar after it.
   static const String _callPrefixDollar = r'call$';
 
-  static final jsAst.Name _literalDollar = new StringBackedName(r'$');
+  static final jsAst.Name _literalDollar = StringBackedName(r'$');
 
   jsAst.Name _literalGetterPrefix;
   jsAst.Name _literalSetterPrefix;
@@ -480,10 +480,10 @@
 
   @override
   jsAst.Name get rtiFieldJsName =>
-      _rtiFieldJsName ??= new StringBackedName(fixedNames.rtiName);
+      _rtiFieldJsName ??= StringBackedName(fixedNames.rtiName);
 
-  static final RegExp IDENTIFIER = new RegExp(r'^[A-Za-z_$][A-Za-z0-9_$]*$');
-  static final RegExp NON_IDENTIFIER_CHAR = new RegExp(r'[^A-Za-z_0-9$]');
+  static final RegExp IDENTIFIER = RegExp(r'^[A-Za-z_$][A-Za-z0-9_$]*$');
+  static final RegExp NON_IDENTIFIER_CHAR = RegExp(r'[^A-Za-z_0-9$]');
 
   final JClosedWorld _closedWorld;
 
@@ -555,7 +555,7 @@
   }
 
   /// Used to disambiguate names for constants in [constantName].
-  final NamingScope _constantScope = new NamingScope();
+  final NamingScope _constantScope = NamingScope();
 
   /// Used to store scopes for instances of [PrivatelyNamedJsEntity]
   final Map<Entity, NamingScope> _privateNamingScopes = {};
@@ -580,8 +580,8 @@
   _TypeConstantRepresentationVisitor _typeConstantRepresenter;
 
   Namer(this._closedWorld, this.fixedNames) {
-    _literalGetterPrefix = new StringBackedName(fixedNames.getterPrefix);
-    _literalSetterPrefix = new StringBackedName(fixedNames.setterPrefix);
+    _literalGetterPrefix = StringBackedName(fixedNames.getterPrefix);
+    _literalSetterPrefix = StringBackedName(fixedNames.setterPrefix);
     _typeConstantRepresenter = _TypeConstantRepresentationVisitor(this);
   }
 
@@ -599,7 +599,7 @@
 
   NamingScope _getPrivateScopeFor(PrivatelyNamedJSEntity entity) {
     return _privateNamingScopes.putIfAbsent(
-        entity.rootOfScope, () => new NamingScope());
+        entity.rootOfScope, () => NamingScope());
   }
 
   /// Disambiguated name for [constant].
@@ -623,8 +623,8 @@
   String constantLongName(ConstantValue constant) {
     String longName = _constantLongNames[constant];
     if (longName == null) {
-      _constantHasher ??= new ConstantCanonicalHasher(this, _closedWorld);
-      longName = new ConstantNamingVisitor(this, _closedWorld, _constantHasher)
+      _constantHasher ??= ConstantCanonicalHasher(this, _closedWorld);
+      longName = ConstantNamingVisitor(this, _closedWorld, _constantHasher)
           .getName(constant);
       _constantLongNames[constant] = longName;
     }
@@ -707,7 +707,7 @@
     if (method is JGeneratorBody) {
       return generatorBodyInstanceMethodName(method);
     }
-    return invocationName(new Selector.fromElement(method));
+    return invocationName(Selector.fromElement(method));
   }
 
   /// Returns the annotated name for a variant of `call`.
@@ -719,8 +719,7 @@
   /// concatenation at runtime, by applyFunction in js_helper.dart.
   jsAst.Name deriveCallMethodName(List<String> suffix) {
     // TODO(asgerf): Avoid clashes when named parameters contain $ symbols.
-    return new StringBackedName(
-        '${fixedNames.callPrefix}\$${suffix.join(r'$')}');
+    return StringBackedName('${fixedNames.callPrefix}\$${suffix.join(r'$')}');
   }
 
   /// The suffix list for the pattern:
@@ -796,7 +795,7 @@
   jsAst.Name specialSelectorName(Selector selector) {
     assert(selector.kind == SelectorKind.SPECIAL);
     if (selector.memberName == Names.genericInstantiation) {
-      return new StringBackedName('${genericInstantiationPrefix}'
+      return StringBackedName('${genericInstantiationPrefix}'
           '${selector.callStructure.typeArgumentCount}');
     }
 
@@ -852,7 +851,7 @@
     ClassEntity enclosingClass = element.enclosingClass;
 
     if (_nativeData.hasFixedBackendName(element)) {
-      return new StringBackedName(_nativeData.getFixedBackendName(element));
+      return StringBackedName(_nativeData.getFixedBackendName(element));
     }
 
     // Some elements, like e.g. instances of BoxFieldElement are special.
@@ -887,7 +886,7 @@
     // No superclass uses the disambiguated name as a property name, so we can
     // use it for this field. This generates nicer field names since otherwise
     // the field name would have to be mangled.
-    return _disambiguateMember(new Name(element.name, element.library));
+    return _disambiguateMember(Name(element.name, element.library));
   }
 
   bool _isShadowingSuperField(FieldEntity element) {
@@ -933,7 +932,7 @@
     // We dynamically create setters from the field-name. The setter name must
     // therefore be derived from the instance field-name.
     return userSetters[disambiguatedName] ??=
-        new SetterName(_literalSetterPrefix, disambiguatedName);
+        SetterName(_literalSetterPrefix, disambiguatedName);
   }
 
   /// Annotated name for the setter of any member with [disambiguatedName].
@@ -941,7 +940,7 @@
     // We dynamically create getters from the field-name. The getter name must
     // therefore be derived from the instance field-name.
     return userGetters[disambiguatedName] ??=
-        new GetterName(_literalGetterPrefix, disambiguatedName);
+        GetterName(_literalGetterPrefix, disambiguatedName);
   }
 
   /// Annotated name for the getter of [element].
@@ -1090,7 +1089,7 @@
     String key = '$libraryPrefix@$originalName@$suffix';
     assert(!userInstanceMembers.containsKey(key));
     assert(!instanceScope.isUsed(disambiguatedName));
-    userInstanceMembers[key] = new StringBackedName(disambiguatedName);
+    userInstanceMembers[key] = StringBackedName(disambiguatedName);
     userInstanceMembersOriginalName[key] = originalName;
     instanceScope.registerUse(disambiguatedName);
   }
@@ -1139,7 +1138,7 @@
   }
 
   String _generateFreshStringForName(String proposedName, NamingScope scope,
-      {bool sanitizeForAnnotations: false, bool sanitizeForNatives: false}) {
+      {bool sanitizeForAnnotations = false, bool sanitizeForNatives = false}) {
     if (sanitizeForAnnotations) {
       proposedName = _sanitizeForAnnotations(proposedName);
     }
@@ -1176,11 +1175,11 @@
   /// Note that [MinifyNamer] overrides this method with one that produces
   /// minified names.
   jsAst.Name getFreshName(NamingScope scope, String proposedName,
-      {bool sanitizeForAnnotations: false, bool sanitizeForNatives: false}) {
+      {bool sanitizeForAnnotations = false, bool sanitizeForNatives = false}) {
     String candidate = _generateFreshStringForName(proposedName, scope,
         sanitizeForAnnotations: sanitizeForAnnotations,
         sanitizeForNatives: sanitizeForNatives);
-    return new StringBackedName(candidate);
+    return StringBackedName(candidate);
   }
 
   /// Returns a variant of [name] that cannot clash with the annotated version
@@ -1337,8 +1336,7 @@
     jsAst.Name root = invocationName(selector);
 
     String suffix = _getSuffixForInterceptedClasses(classes);
-    return new CompoundName(
-        [root, _literalDollar, new StringBackedName(suffix)]);
+    return CompoundName([root, _literalDollar, StringBackedName(suffix)]);
   }
 
   @override
@@ -1398,10 +1396,8 @@
   @override
   jsAst.Name operatorIs(ClassEntity element) {
     // TODO(erikcorry): Reduce from $isx to ix when we are minifying.
-    return new CompoundName([
-      new StringBackedName(fixedNames.operatorIsPrefix),
-      className(element)
-    ]);
+    return CompoundName(
+        [StringBackedName(fixedNames.operatorIsPrefix), className(element)]);
   }
 
   /// Returns a name that does not clash with reserved JS keywords.
@@ -1417,16 +1413,16 @@
   jsAst.Name asName(String name) {
     if (name.startsWith(fixedNames.getterPrefix) &&
         name.length > fixedNames.getterPrefix.length) {
-      return new GetterName(_literalGetterPrefix,
-          new StringBackedName(name.substring(fixedNames.getterPrefix.length)));
+      return GetterName(_literalGetterPrefix,
+          StringBackedName(name.substring(fixedNames.getterPrefix.length)));
     }
     if (name.startsWith(fixedNames.setterPrefix) &&
         name.length > fixedNames.setterPrefix.length) {
-      return new GetterName(_literalSetterPrefix,
-          new StringBackedName(name.substring(fixedNames.setterPrefix.length)));
+      return GetterName(_literalSetterPrefix,
+          StringBackedName(name.substring(fixedNames.setterPrefix.length)));
     }
 
-    return new StringBackedName(name);
+    return StringBackedName(name);
   }
 
   String operatorNameToIdentifier(String name) {
@@ -1531,7 +1527,7 @@
     // legal JavaScript identifier.
     if (type.typeArguments.isEmpty) return name;
     String arguments =
-        new List.filled(type.typeArguments.length, 'dynamic').join(', ');
+        List.filled(type.typeArguments.length, 'dynamic').join(', ');
     return '$name<$arguments>';
   }
 
@@ -1599,7 +1595,7 @@
 ///     EventKeyProvider_keyup  // const EventKeyProvider('keyup')
 ///
 class ConstantNamingVisitor implements ConstantValueVisitor {
-  static final RegExp IDENTIFIER = new RegExp(r'^[A-Za-z_$][A-Za-z0-9_$]*$');
+  static final RegExp IDENTIFIER = RegExp(r'^[A-Za-z_$][A-Za-z0-9_$]*$');
   static const MAX_FRAGMENTS = 5;
   static const MAX_EXTRA_LENGTH = 30;
   static const DEFAULT_TAG_LENGTH = 3;
@@ -1610,7 +1606,7 @@
 
   String root = null; // First word, usually a type name.
   bool failed = false; // Failed to generate something pretty.
-  List<String> fragments = <String>[];
+  List<String> fragments = [];
   int length = 0;
 
   ConstantNamingVisitor(this._namer, this._closedWorld, this._hasher);
@@ -1632,7 +1628,7 @@
 
   String hashWord(int hash, int length) {
     hash &= 0x1fffffff;
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     for (int i = 0; i < length; i++) {
       int digit = hash % 62;
       sb.write('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'[
@@ -2273,7 +2269,7 @@
   jsAst.Name _literalAsyncPrefix;
 
   ModularNamer() {
-    _literalAsyncPrefix = new StringBackedName(asyncPrefix);
+    _literalAsyncPrefix = StringBackedName(asyncPrefix);
   }
 
   /// Returns a safe variable name for use in async rewriting.
@@ -2289,7 +2285,7 @@
   /// Returns the name for the async body of the method with the [original]
   /// name.
   jsAst.Name deriveAsyncBodyName(jsAst.Name original) {
-    return new AsyncName(_literalAsyncPrefix, original);
+    return AsyncName(_literalAsyncPrefix, original);
   }
 
   /// Returns the label name for [label] used as a break target.
@@ -2439,14 +2435,14 @@
 
   @override
   jsAst.Name get rtiFieldJsName {
-    jsAst.Name name = new ModularName(ModularNameKind.rtiField);
+    jsAst.Name name = ModularName(ModularNameKind.rtiField);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name className(ClassEntity element) {
-    jsAst.Name name = new ModularName(ModularNameKind.className, data: element);
+    jsAst.Name name = ModularName(ModularNameKind.className, data: element);
     _registry.registerModularName(name);
     return name;
   }
@@ -2454,47 +2450,42 @@
   @override
   jsAst.Name aliasedSuperMemberPropertyName(MemberEntity member) {
     jsAst.Name name =
-        new ModularName(ModularNameKind.aliasedSuperMember, data: member);
+        ModularName(ModularNameKind.aliasedSuperMember, data: member);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name staticClosureName(FunctionEntity element) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.staticClosure, data: element);
+    jsAst.Name name = ModularName(ModularNameKind.staticClosure, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name methodPropertyName(FunctionEntity method) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.methodProperty, data: method);
+    jsAst.Name name = ModularName(ModularNameKind.methodProperty, data: method);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name instanceFieldPropertyName(FieldEntity element) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.instanceField, data: element);
+    jsAst.Name name = ModularName(ModularNameKind.instanceField, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name instanceMethodName(FunctionEntity method) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.instanceMethod, data: method);
+    jsAst.Name name = ModularName(ModularNameKind.instanceMethod, data: method);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name invocationName(Selector selector) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.invocation, data: selector);
+    jsAst.Name name = ModularName(ModularNameKind.invocation, data: selector);
     _registry.registerModularName(name);
     return name;
   }
@@ -2502,40 +2493,37 @@
   @override
   jsAst.Name lazyInitializerName(FieldEntity element) {
     jsAst.Name name =
-        new ModularName(ModularNameKind.lazyInitializer, data: element);
+        ModularName(ModularNameKind.lazyInitializer, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name operatorIs(ClassEntity element) {
-    jsAst.Name name =
-        new ModularName(ModularNameKind.operatorIs, data: element);
+    jsAst.Name name = ModularName(ModularNameKind.operatorIs, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name globalPropertyNameForClass(ClassEntity element) {
-    jsAst.Name name = new ModularName(
-        ModularNameKind.globalPropertyNameForClass,
-        data: element);
+    jsAst.Name name =
+        ModularName(ModularNameKind.globalPropertyNameForClass, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name globalPropertyNameForMember(MemberEntity element) {
-    jsAst.Name name = new ModularName(
-        ModularNameKind.globalPropertyNameForMember,
-        data: element);
+    jsAst.Name name =
+        ModularName(ModularNameKind.globalPropertyNameForMember, data: element);
     _registry.registerModularName(name);
     return name;
   }
 
   @override
   jsAst.Name globalNameForInterfaceTypeVariable(TypeVariableEntity element) {
-    jsAst.Name name = new ModularName(
+    jsAst.Name name = ModularName(
         ModularNameKind.globalNameForInterfaceTypeVariable,
         data: element);
     _registry.registerModularName(name);
@@ -2545,7 +2533,7 @@
   @override
   jsAst.Name nameForGetInterceptor(Set<ClassEntity> classes) {
     jsAst.Name name =
-        new ModularName(ModularNameKind.nameForGetInterceptor, set: classes);
+        ModularName(ModularNameKind.nameForGetInterceptor, set: classes);
     _registry.registerModularName(name);
     return name;
   }
@@ -2553,7 +2541,7 @@
   @override
   jsAst.Name nameForOneShotInterceptor(
       Selector selector, Set<ClassEntity> classes) {
-    jsAst.Name name = new ModularName(ModularNameKind.nameForOneShotInterceptor,
+    jsAst.Name name = ModularName(ModularNameKind.nameForOneShotInterceptor,
         data: selector, set: classes);
     _registry.registerModularName(name);
     return name;
@@ -2561,7 +2549,7 @@
 
   @override
   jsAst.Name asName(String text) {
-    jsAst.Name name = new ModularName(ModularNameKind.asName, data: text);
+    jsAst.Name name = ModularName(ModularNameKind.asName, data: text);
     _registry.registerModularName(name);
     return name;
   }
diff --git a/pkg/compiler/lib/src/js_backend/namer_names.dart b/pkg/compiler/lib/src/js_backend/namer_names.dart
index fe43140..b549098 100644
--- a/pkg/compiler/lib/src/js_backend/namer_names.dart
+++ b/pkg/compiler/lib/src/js_backend/namer_names.dart
@@ -152,7 +152,7 @@
 
   CompoundName(this._parts);
 
-  CompoundName.from(List<jsAst.Name> parts) : this(<_NamerName>[...parts]);
+  CompoundName.from(List<jsAst.Name> parts) : this([...parts]);
 
   @override
   bool get isFinalized => _parts.every((name) => name.isFinalized);
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 3519633..1ef691d 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -151,7 +151,7 @@
   /// class [element], other the js interop name is expected to be computed
   /// later.
   void markAsJsInteropClass(ClassEntity element,
-      {String name, bool isAnonymous: false});
+      {String name, bool isAnonymous = false});
 
   /// Marks [element] as an explicit part of js interop and sets the explicit js
   /// interop [name] for the member [element].
@@ -186,20 +186,19 @@
 
   /// Tag info for native JavaScript classes names. See
   /// [setNativeClassTagInfo].
-  Map<ClassEntity, NativeClassTag> nativeClassTagInfo =
-      <ClassEntity, NativeClassTag>{};
+  Map<ClassEntity, NativeClassTag> nativeClassTagInfo = {};
 
   /// The JavaScript libraries implemented via typed JavaScript interop.
-  Map<LibraryEntity, String> jsInteropLibraries = <LibraryEntity, String>{};
+  Map<LibraryEntity, String> jsInteropLibraries = {};
 
   /// The JavaScript classes implemented via typed JavaScript interop.
-  Map<ClassEntity, String> jsInteropClasses = <ClassEntity, String>{};
+  Map<ClassEntity, String> jsInteropClasses = {};
 
   /// JavaScript interop classes annotated with `@anonymous`
-  Set<ClassEntity> anonymousJsInteropClasses = new Set<ClassEntity>();
+  Set<ClassEntity> anonymousJsInteropClasses = {};
 
   /// The JavaScript members implemented via typed JavaScript interop.
-  Map<MemberEntity, String> jsInteropMembers = <MemberEntity, String>{};
+  Map<MemberEntity, String> jsInteropMembers = {};
 
   @override
   void setNativeClassTagInfo(ClassEntity cls, String tagText) {
@@ -222,7 +221,7 @@
             "Native tag info set inconsistently on $cls: "
             "Existing tag info '${nativeClassTagInfo[cls]}', "
             "new tag info '$tagText'."));
-    nativeClassTagInfo[cls] = new NativeClassTag(tagText);
+    nativeClassTagInfo[cls] = NativeClassTag(tagText);
   }
 
   @override
@@ -238,7 +237,7 @@
 
   @override
   void markAsJsInteropClass(ClassEntity element,
-      {String name, bool isAnonymous: false}) {
+      {String name, bool isAnonymous = false}) {
     assert(
         !_closed,
         failedAt(
@@ -265,7 +264,7 @@
   @override
   NativeBasicData close(ElementEnvironment environment) {
     _closed = true;
-    return new NativeBasicDataImpl(
+    return NativeBasicDataImpl(
         environment,
         false,
         nativeClassTagInfo,
@@ -324,7 +323,7 @@
     Map<MemberEntity, String> jsInteropMembers = {};
 
     data.forEachNativeClass((ir.Class node, String text) {
-      nativeClassTagInfo[map.getClass(node)] = new NativeClassTag(text);
+      nativeClassTagInfo[map.getClass(node)] = NativeClassTag(text);
     });
     data.forEachJsInteropLibrary((ir.Library node, String name) {
       jsInteropLibraries[env.lookupLibrary(node.importUri, required: true)] =
@@ -343,7 +342,7 @@
       jsInteropMembers[map.getMember(node)] = name;
     });
 
-    return new NativeBasicDataImpl(
+    return NativeBasicDataImpl(
         env,
         false,
         nativeClassTagInfo,
@@ -361,7 +360,7 @@
         source.readClassMap(() {
       List<String> names = source.readStrings();
       bool isNonLeaf = source.readBool();
-      return new NativeClassTag.internal(names, isNonLeaf);
+      return NativeClassTag.internal(names, isNonLeaf);
     });
     Map<LibraryEntity, String> jsInteropLibraries =
         source.readLibraryMap(source.readString);
@@ -371,7 +370,7 @@
     Map<MemberEntity, String> jsInteropMembers =
         source.readMemberMap((MemberEntity member) => source.readString());
     source.end(tag);
-    return new NativeBasicDataImpl(
+    return NativeBasicDataImpl(
         elementEnvironment,
         isAllowInteropUsed,
         nativeClassTagInfo,
@@ -477,19 +476,16 @@
   final NativeBasicDataImpl _nativeBasicData;
 
   /// The JavaScript names for native JavaScript elements implemented.
-  Map<MemberEntity, String> nativeMemberName = <MemberEntity, String>{};
+  Map<MemberEntity, String> nativeMemberName = {};
 
   /// Cache for [NativeBehavior]s for calling native methods.
-  Map<FunctionEntity, NativeBehavior> nativeMethodBehavior =
-      <FunctionEntity, NativeBehavior>{};
+  Map<FunctionEntity, NativeBehavior> nativeMethodBehavior = {};
 
   /// Cache for [NativeBehavior]s for reading from native fields.
-  Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior =
-      <FieldEntity, NativeBehavior>{};
+  Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior = {};
 
   /// Cache for [NativeBehavior]s for writing to native fields.
-  Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior =
-      <FieldEntity, NativeBehavior>{};
+  Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior = {};
 
   NativeDataBuilderImpl(this._nativeBasicData);
 
@@ -524,7 +520,7 @@
   }
 
   @override
-  NativeData close() => new NativeDataImpl(_nativeBasicData, nativeMemberName,
+  NativeData close() => NativeDataImpl(_nativeBasicData, nativeMemberName,
       nativeMethodBehavior, nativeFieldLoadBehavior, nativeFieldStoreBehavior);
 }
 
@@ -561,8 +557,7 @@
       this.nativeFieldStoreBehavior);
 
   factory NativeDataImpl.fromIr(KernelToElementMap map, IrAnnotationData data) {
-    NativeBasicDataImpl nativeBasicData =
-        new NativeBasicDataImpl.fromIr(map, data);
+    NativeBasicDataImpl nativeBasicData = NativeBasicDataImpl.fromIr(map, data);
     Map<MemberEntity, String> nativeMemberName = {};
     Map<FunctionEntity, NativeBehavior> nativeMethodBehavior = {};
     Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior = {};
@@ -594,7 +589,7 @@
           map.getNativeBehaviorForFieldStore(node);
     });
 
-    return new NativeDataImpl(
+    return NativeDataImpl(
         nativeBasicData,
         nativeMemberName,
         nativeMethodBehavior,
@@ -606,20 +601,20 @@
       DataSource source, ElementEnvironment elementEnvironment) {
     source.begin(tag);
     NativeBasicData nativeBasicData =
-        new NativeBasicData.readFromDataSource(source, elementEnvironment);
+        NativeBasicData.readFromDataSource(source, elementEnvironment);
     Map<MemberEntity, String> nativeMemberName =
         source.readMemberMap((MemberEntity member) => source.readString());
     Map<FunctionEntity, NativeBehavior> nativeMethodBehavior =
-        source.readMemberMap((MemberEntity member) =>
-            new NativeBehavior.readFromDataSource(source));
+        source.readMemberMap(
+            (MemberEntity member) => NativeBehavior.readFromDataSource(source));
     Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior =
-        source.readMemberMap((MemberEntity member) =>
-            new NativeBehavior.readFromDataSource(source));
+        source.readMemberMap(
+            (MemberEntity member) => NativeBehavior.readFromDataSource(source));
     Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior =
-        source.readMemberMap((MemberEntity member) =>
-            new NativeBehavior.readFromDataSource(source));
+        source.readMemberMap(
+            (MemberEntity member) => NativeBehavior.readFromDataSource(source));
     source.end(tag);
-    return new NativeDataImpl(
+    return NativeDataImpl(
         nativeBasicData,
         nativeMemberName,
         nativeMethodBehavior,
@@ -813,10 +808,12 @@
     if (element.isConstructor) {
       return _fixedBackendClassPath(element.enclosingClass);
     }
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write(_jsLibraryNameHelper(element.library));
     if (element.enclosingClass != null) {
-      sb..write('.')..write(_jsClassNameHelper(element.enclosingClass));
+      sb
+        ..write('.')
+        ..write(_jsClassNameHelper(element.enclosingClass));
     }
     return sb.toString();
   }
@@ -884,13 +881,13 @@
     List<String> tags = tagText.split(',');
     List<String> names = tags.where((s) => !s.startsWith('!')).toList();
     bool isNonLeaf = tags.contains('!nonleaf');
-    return new NativeClassTag.internal(names, isNonLeaf);
+    return NativeClassTag.internal(names, isNonLeaf);
   }
 
   NativeClassTag.internal(this.names, this.isNonLeaf);
 
   String get text {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write(names.join(','));
     if (isNonLeaf) {
       if (names.isNotEmpty) {
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 3589a76..1ef96e6 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -67,25 +67,25 @@
 
 class NoSuchMethodRegistryImpl implements NoSuchMethodRegistry {
   /// The implementations that fall into category A, described above.
-  final Set<FunctionEntity> defaultImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> defaultImpls = {};
 
   /// The implementations that fall into category B, described above.
-  final Set<FunctionEntity> throwingImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> throwingImpls = {};
 
   /// The implementations that fall into category C, described above.
   // TODO(johnniwinther): Remove this category when Dart 1 is no longer
   // supported.
-  final Set<FunctionEntity> notApplicableImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> notApplicableImpls = {};
 
   /// The implementations that fall into category D, described above.
-  final Set<FunctionEntity> otherImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> otherImpls = {};
 
   /// The implementations that have not yet been categorized.
-  final Set<FunctionEntity> _uncategorizedImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> _uncategorizedImpls = {};
 
   /// The implementations that a forwarding syntax as defined by
   /// [NoSuchMethodResolver.hasForwardSyntax].
-  final Set<FunctionEntity> forwardingSyntaxImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> forwardingSyntaxImpls = {};
 
   final CommonElements _commonElements;
   final NoSuchMethodResolver _resolver;
@@ -167,7 +167,7 @@
 
   @override
   NoSuchMethodData close() {
-    return new NoSuchMethodDataImpl(
+    return NoSuchMethodDataImpl(
         throwingImpls, otherImpls, forwardingSyntaxImpls);
   }
 }
@@ -210,10 +210,10 @@
   final Set<FunctionEntity> otherImpls;
 
   /// The implementations that fall into category D1
-  final Set<FunctionEntity> complexNoReturnImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> complexNoReturnImpls = {};
 
   /// The implementations that fall into category D2
-  final Set<FunctionEntity> complexReturningImpls = new Set<FunctionEntity>();
+  final Set<FunctionEntity> complexReturningImpls = {};
 
   final Set<FunctionEntity> forwardingSyntaxImpls;
 
@@ -233,7 +233,7 @@
     List<FunctionEntity> complexReturningImpls =
         source.readMembers<FunctionEntity>();
     source.end(tag);
-    return new NoSuchMethodDataImpl(
+    return NoSuchMethodDataImpl(
         throwingImpls, otherImpls, forwardingSyntaxImpls)
       ..complexNoReturnImpls.addAll(complexNoReturnImpls)
       ..complexReturningImpls.addAll(complexReturningImpls);
diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
index 0239d25..02fc83a 100644
--- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
@@ -71,13 +71,13 @@
   void _addInterceptors(ClassEntity cls, WorldImpactBuilder impactBuilder) {
     _interceptorData.addInterceptors(cls);
     impactBuilder.registerTypeUse(
-        new TypeUse.instantiation(_elementEnvironment.getRawType(cls)));
+        TypeUse.instantiation(_elementEnvironment.getRawType(cls)));
     _backendUsage.registerBackendClassUse(cls);
   }
 
   @override
   WorldImpact registerClosurizedMember(FunctionEntity element) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     _backendUsage.processBackendImpact(_impacts.memberClosure);
     impactBuilder
         .addImpact(_impacts.memberClosure.createImpact(_elementEnvironment));
@@ -101,7 +101,7 @@
 
   @override
   void registerInstantiatedType(InterfaceType type,
-      {bool isGlobal: false, bool nativeUsage: false}) {
+      {bool isGlobal = false, bool nativeUsage = false}) {
     if (isGlobal) {
       _backendUsage.registerGlobalClassDependency(type.element);
     }
@@ -112,20 +112,20 @@
 
   /// Computes the [WorldImpact] of calling [mainMethod] as the entry point.
   WorldImpact _computeMainImpact(FunctionEntity mainMethod) {
-    WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl mainImpact = WorldImpactBuilderImpl();
     CallStructure callStructure = mainMethod.parameterStructure.callStructure;
     if (callStructure.argumentCount > 0) {
       _impacts.mainWithArguments
           .registerImpact(mainImpact, _elementEnvironment);
       _backendUsage.processBackendImpact(_impacts.mainWithArguments);
-      mainImpact.registerStaticUse(
-          new StaticUse.staticInvoke(mainMethod, callStructure));
+      mainImpact
+          .registerStaticUse(StaticUse.staticInvoke(mainMethod, callStructure));
     }
     if (mainMethod.isGetter) {
-      mainImpact.registerStaticUse(new StaticUse.staticGet(mainMethod));
+      mainImpact.registerStaticUse(StaticUse.staticGet(mainMethod));
     } else {
       mainImpact.registerStaticUse(
-          new StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
+          StaticUse.staticInvoke(mainMethod, CallStructure.NO_ARGS));
     }
     return mainImpact;
   }
@@ -216,7 +216,7 @@
     if (constant.isFunction) {
       FunctionConstantValue function = constant;
       impactBuilder
-          .registerStaticUse(new StaticUse.staticTearOff(function.element));
+          .registerStaticUse(StaticUse.staticTearOff(function.element));
     } else if (constant.isInterceptor) {
       // An interceptor constant references the class's prototype chain.
       InterceptorConstantValue interceptor = constant;
@@ -224,24 +224,24 @@
       _computeImpactForInstantiatedConstantType(type, impactBuilder);
     } else if (constant.isType) {
       FunctionEntity helper = _commonElements.createRuntimeType;
-      impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+      impactBuilder.registerStaticUse(StaticUse.staticInvoke(
           helper, helper.parameterStructure.callStructure));
       _backendUsage.registerBackendFunctionUse(helper);
       impactBuilder
-          .registerTypeUse(new TypeUse.instantiation(_commonElements.typeType));
+          .registerTypeUse(TypeUse.instantiation(_commonElements.typeType));
     }
   }
 
   void _computeImpactForInstantiatedConstantType(
       DartType type, WorldImpactBuilder impactBuilder) {
     if (type is InterfaceType) {
-      impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
+      impactBuilder.registerTypeUse(TypeUse.instantiation(type));
       if (type.element == _commonElements.typeLiteralClass) {
         // If we use a type literal in a constant, the compile time
         // constant emitter will generate a call to the createRuntimeType
         // helper so we register a use of that.
         FunctionEntity helper = _commonElements.createRuntimeType;
-        impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+        impactBuilder.registerStaticUse(StaticUse.staticInvoke(
             helper, helper.parameterStructure.callStructure));
       }
     }
@@ -249,14 +249,14 @@
 
   @override
   WorldImpact registerUsedConstant(ConstantValue constant) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     _computeImpactForCompileTimeConstant(constant, impactBuilder);
     return impactBuilder;
   }
 
   @override
   WorldImpact registerUsedElement(MemberEntity member) {
-    WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl worldImpact = WorldImpactBuilderImpl();
     _customElementsAnalysis.registerStaticUse(member);
 
     if (member.isFunction) {
@@ -265,15 +265,16 @@
         FunctionType functionType =
             _elementEnvironment.getFunctionType(function);
 
-        var allParameterTypes = <DartType>[]
-          ..addAll(functionType.parameterTypes)
-          ..addAll(functionType.optionalParameterTypes)
-          ..addAll(functionType.namedParameterTypes);
+        var allParameterTypes = <DartType>[
+          ...functionType.parameterTypes,
+          ...functionType.optionalParameterTypes,
+          ...functionType.namedParameterTypes
+        ];
         for (var type in allParameterTypes) {
           if (type.withoutNullability is FunctionType) {
             var closureConverter = _commonElements.closureConverter;
-            worldImpact.registerStaticUse(
-                new StaticUse.implicitInvoke(closureConverter));
+            worldImpact
+                .registerStaticUse(StaticUse.implicitInvoke(closureConverter));
             _backendUsage.registerBackendFunctionUse(closureConverter);
             _backendUsage.registerGlobalFunctionDependency(closureConverter);
             break;
@@ -323,7 +324,7 @@
   }
 
   WorldImpact _processClass(ClassEntity cls) {
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     // TODO(johnniwinther): Extract an `implementationClassesOf(...)` function
     // for these into [CommonElements] or [BackendImpacts].
     // Register any helper that will be needed by the backend.
@@ -426,7 +427,7 @@
   /// Compute the [WorldImpact] for backend helper methods.
   WorldImpact computeHelpersImpact() {
     assert(_commonElements.interceptorsLibrary != null);
-    WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+    WorldImpactBuilderImpl impactBuilder = WorldImpactBuilderImpl();
     // TODO(ngeoffray): Not enqueuing those two classes currently make
     // the compiler potentially crash. However, any reasonable program
     // will instantiate those two classes.
@@ -454,12 +455,12 @@
   void _registerCheckedModeHelpers(WorldImpactBuilder impactBuilder) {
     // We register all the _commonElements in the resolution queue.
     // TODO(13155): Find a way to register fewer _commonElements.
-    List<FunctionEntity> staticUses = <FunctionEntity>[];
+    List<FunctionEntity> staticUses = [];
     for (CheckedModeHelper helper in CheckedModeHelpers.helpers) {
       staticUses.add(helper.getStaticUse(_commonElements).element);
     }
     _registerBackendImpact(
-        impactBuilder, new BackendImpact(globalUses: staticUses));
+        impactBuilder, BackendImpact(globalUses: staticUses));
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 90b7b7c..ffbad60 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -18,7 +18,8 @@
 import 'runtime_types_codegen.dart';
 import 'runtime_types_resolution.dart';
 
-typedef jsAst.Expression OnVariableCallback(TypeVariableType variable);
+typedef OnVariableCallback = jsAst.Expression Function(
+    TypeVariableType variable);
 
 /// Interface for the needed runtime type checks.
 abstract class RuntimeTypesChecks {
@@ -80,11 +81,11 @@
       CodegenWorld codegenWorld, CompilerOptions options) {
     rtiChecksBuilderClosed = true;
 
-    Map<ClassEntity, ClassUse> classUseMap = <ClassEntity, ClassUse>{};
+    Map<ClassEntity, ClassUse> classUseMap = {};
     for (ClassEntity cls in _closedWorld.classHierarchy
         .getClassSet(_closedWorld.commonElements.objectClass)
         .subtypes()) {
-      ClassUse classUse = new ClassUse()
+      ClassUse classUse = ClassUse()
         ..directInstance = true
         ..checkedInstance = true
         ..typeArgument = true
@@ -95,7 +96,7 @@
     }
     TypeChecks typeChecks = _substitutions._requiredChecks =
         _substitutions._computeChecks(classUseMap);
-    return new TrivialTypesChecks(typeChecks);
+    return TrivialTypesChecks(typeChecks);
   }
 
   Set<ClassEntity> computeCheckedClasses(
@@ -108,7 +109,7 @@
 
   Set<FunctionType> computeCheckedFunctions(
       CodegenWorldBuilder codegenWorldBuilder, Set<DartType> implicitIsChecks) {
-    return new Set<FunctionType>();
+    return {};
   }
 }
 
@@ -130,18 +131,18 @@
     // Run through the combination of instantiated and checked
     // arguments and record all combination where the element of a checked
     // argument is a superclass of the element of an instantiated type.
-    TypeCheckMapping result = new TypeCheckMapping();
-    Set<ClassEntity> handled = new Set<ClassEntity>();
+    TypeCheckMapping result = TypeCheckMapping();
+    Set<ClassEntity> handled = {};
 
     // Empty usage object for classes with no direct rti usage.
-    final ClassUse emptyUse = new ClassUse();
+    final ClassUse emptyUse = ClassUse();
 
     /// Compute the $isX and $asX functions need for [cls].
     ClassChecks computeChecks(ClassEntity cls) {
       if (!handled.add(cls)) return result[cls];
 
       ClassUse classUse = classUseMap[cls] ?? emptyUse;
-      ClassChecks checks = new ClassChecks(classUse.functionType);
+      ClassChecks checks = ClassChecks(classUse.functionType);
       result[cls] = checks;
 
       // Find the superclass from which [cls] inherits checks.
@@ -174,14 +175,14 @@
         // We need [cls] at runtime - even if [cls] is not instantiated. Either
         // as a type argument, for a type literal or for an is-test if [cls] is
         // native.
-        checks.add(new TypeCheck(cls, substitution, needsIs: isNativeClass));
+        checks.add(TypeCheck(cls, substitution, needsIs: isNativeClass));
       }
 
       // Compute the set of classes that [cls] inherited properties from.
       //
       // This set reflects the emitted class hierarchy and therefore uses
       // `getEffectiveMixinClass` to find the inherited mixins.
-      Set<ClassEntity> inheritedClasses = new Set<ClassEntity>();
+      Set<ClassEntity> inheritedClasses = {};
       ClassEntity other = cls;
       while (other != null) {
         inheritedClasses.add(other);
@@ -277,14 +278,14 @@
             if (extendsSuperClassTrivially) {
               // [cls] implements [checkedClass] the same way as [superClass]
               // so the inherited substitution function already works.
-              checks.add(new TypeCheck(checkedClass, null, needsIs: false));
+              checks.add(TypeCheck(checkedClass, null, needsIs: false));
             } else {
               // [cls] implements [checkedClass] differently from [superClass]
               // so the inherited substitution function needs to be replaced.
               if (implementsCheckedTrivially) {
                 // We need an explicit trivial substitution function for
                 // [checkedClass] that overrides the inherited function.
-                checks.add(new TypeCheck(checkedClass,
+                checks.add(TypeCheck(checkedClass,
                     isCheckedGeneric ? const Substitution.trivial() : null,
                     needsIs: false));
               } else {
@@ -292,8 +293,8 @@
                 // [checkedClass].
                 Substitution substitution =
                     computeSubstitution(cls, checkedClass);
-                checks.add(
-                    new TypeCheck(checkedClass, substitution, needsIs: false));
+                checks
+                    .add(TypeCheck(checkedClass, substitution, needsIs: false));
 
                 assert(substitution != null);
                 for (DartType argument in substitution.arguments) {
@@ -310,14 +311,14 @@
               // We don't add an explicit substitution function for
               // [checkedClass] because the substitution is trivial and doesn't
               // need to override an inherited function.
-              checks.add(new TypeCheck(checkedClass, null, needsIs: needsIs));
+              checks.add(TypeCheck(checkedClass, null, needsIs: needsIs));
             } else {
               // We need a non-trivial substitution function for
               // [checkedClass].
               Substitution substitution =
                   computeSubstitution(cls, checkedClass);
-              checks.add(
-                  new TypeCheck(checkedClass, substitution, needsIs: needsIs));
+              checks
+                  .add(TypeCheck(checkedClass, substitution, needsIs: needsIs));
 
               assert(substitution != null);
               for (DartType argument in substitution.arguments) {
@@ -353,8 +354,8 @@
 
   @override
   Set<ClassEntity> getClassesUsedInSubstitutions(TypeChecks checks) {
-    Set<ClassEntity> instantiated = new Set<ClassEntity>();
-    ArgumentCollector collector = new ArgumentCollector();
+    Set<ClassEntity> instantiated = {};
+    ArgumentCollector collector = ArgumentCollector();
     for (ClassEntity target in checks.classes) {
       ClassChecks classChecks = checks[target];
       for (TypeCheck check in classChecks.checks) {
@@ -430,7 +431,7 @@
   }
 
   Substitution computeSubstitution(ClassEntity cls, ClassEntity check,
-      {bool alwaysGenerateFunction: false}) {
+      {bool alwaysGenerateFunction = false}) {
     if (isTrivialSubstitution(cls, check)) return null;
 
     // Unnamed mixin application classes do not need substitutions, because they
@@ -443,11 +444,11 @@
       int typeArguments = target.typeArguments.length;
       // Generic JS-interop class need an explicit substitution to mark
       // the type arguments as `any` type.
-      return new Substitution.jsInterop(typeArguments);
+      return Substitution.jsInterop(typeArguments);
     } else if (typeVariables.isEmpty && !alwaysGenerateFunction) {
-      return new Substitution.list(target.typeArguments);
+      return Substitution.list(target.typeArguments);
     } else {
-      return new Substitution.function(target.typeArguments, typeVariables);
+      return Substitution.function(target.typeArguments, typeVariables);
     }
   }
 }
@@ -473,12 +474,11 @@
 
   @override
   Iterable<ClassEntity> get requiredClasses {
-    Set<ClassEntity> required = new Set<ClassEntity>();
-    required.addAll(_typeArguments);
-    required.addAll(_typeLiterals);
-    required
-        .addAll(_substitutions.getClassesUsedInSubstitutions(requiredChecks));
-    return required;
+    return {
+      ..._typeArguments,
+      ..._typeLiterals,
+      ..._substitutions.getClassesUsedInSubstitutions(requiredChecks)
+    };
   }
 }
 
@@ -489,9 +489,9 @@
   final JClosedWorld _closedWorld;
 
   // The set of type arguments tested against type variable bounds.
-  final Set<DartType> checkedTypeArguments = new Set<DartType>();
+  final Set<DartType> checkedTypeArguments = {};
   // The set of tested type variable bounds.
-  final Set<DartType> checkedBounds = new Set<DartType>();
+  final Set<DartType> checkedBounds = {};
 
   TypeChecks cachedRequiredChecks;
 
@@ -512,8 +512,7 @@
 
   Map<ClassEntity, ClassUse> classUseMapForTesting;
 
-  final Set<GenericInstantiation> _genericInstantiations =
-      new Set<GenericInstantiation>();
+  final Set<GenericInstantiation> _genericInstantiations = {};
 
   @override
   void registerTypeVariableBoundsSubtypeCheck(
@@ -530,23 +529,20 @@
   @override
   RuntimeTypesChecks computeRequiredChecks(
       CodegenWorld codegenWorld, CompilerOptions options) {
-    TypeVariableTests typeVariableTests = new TypeVariableTests(
-        _elementEnvironment,
-        _commonElements,
-        codegenWorld,
-        _genericInstantiations,
+    TypeVariableTests typeVariableTests = TypeVariableTests(_elementEnvironment,
+        _commonElements, codegenWorld, _genericInstantiations,
         forRtiNeeds: false);
     Set<DartType> explicitIsChecks = typeVariableTests.explicitIsChecks;
     Set<DartType> implicitIsChecks = typeVariableTests.implicitIsChecks;
 
-    Map<ClassEntity, ClassUse> classUseMap = <ClassEntity, ClassUse>{};
+    Map<ClassEntity, ClassUse> classUseMap = {};
     if (retainDataForTesting) {
       classUseMapForTesting = classUseMap;
     }
 
-    Set<FunctionType> checkedFunctionTypes = new Set<FunctionType>();
-    Set<ClassEntity> typeLiterals = new Set<ClassEntity>();
-    Set<ClassEntity> typeArguments = new Set<ClassEntity>();
+    Set<FunctionType> checkedFunctionTypes = {};
+    Set<ClassEntity> typeLiterals = {};
+    Set<ClassEntity> typeArguments = {};
 
     // The [liveTypeVisitor] is used to register class use in the type of
     // instantiated objects like `new T` and the function types of
@@ -562,8 +558,8 @@
     //
     // makes A and B live but C tested.
     TypeVisitor liveTypeVisitor =
-        new TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
-      ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
+        TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
+      ClassUse classUse = classUseMap.putIfAbsent(cls, () => ClassUse());
       switch (state) {
         case TypeVisitorState.covariantTypeArgument:
           classUse.typeArgument = true;
@@ -596,8 +592,8 @@
     //
     // makes A and B tested but C live.
     TypeVisitor testedTypeVisitor =
-        new TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
-      ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
+        TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
+      ClassUse classUse = classUseMap.putIfAbsent(cls, () => ClassUse());
       switch (state) {
         case TypeVisitorState.covariantTypeArgument:
           classUse.typeArgument = true;
@@ -617,7 +613,7 @@
     });
 
     codegenWorld.instantiatedClasses.forEach((ClassEntity cls) {
-      ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
+      ClassUse classUse = classUseMap.putIfAbsent(cls, () => ClassUse());
       classUse.instance = true;
     });
 
@@ -625,7 +621,7 @@
     codegenWorld.instantiatedTypes.forEach((InterfaceType type) {
       liveTypeVisitor.visitType(type, TypeVisitorState.direct);
       ClassUse classUse =
-          classUseMap.putIfAbsent(type.element, () => new ClassUse());
+          classUseMap.putIfAbsent(type.element, () => ClassUse());
       classUse.directInstance = true;
       FunctionType callType = _types.getCallType(type);
       if (callType != null) {
@@ -706,14 +702,14 @@
       ClassFunctionType functionType =
           _computeFunctionType(_elementEnvironment, cls);
       if (functionType != null) {
-        ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
+        ClassUse classUse = classUseMap.putIfAbsent(cls, () => ClassUse());
         classUse.functionType = functionType;
       }
     }
 
     // Collect classes that are 'live' either through instantiation or use in
     // type arguments.
-    List<ClassEntity> liveClasses = <ClassEntity>[];
+    List<ClassEntity> liveClasses = [];
     classUseMap.forEach((ClassEntity cls, ClassUse classUse) {
       if (classUse.isLive) {
         liveClasses.add(cls);
@@ -740,7 +736,7 @@
 
     cachedRequiredChecks = _computeChecks(classUseMap);
     rtiChecksBuilderClosed = true;
-    return new _RuntimeTypesChecks(
+    return _RuntimeTypesChecks(
         this, cachedRequiredChecks, typeArguments, typeLiterals);
   }
 }
@@ -770,18 +766,18 @@
   if (call != null && call.isFunction) {
     FunctionEntity callFunction = call;
     FunctionType callType = elementEnvironment.getFunctionType(callFunction);
-    return new ClassFunctionType(callFunction, callType, signatureFunction);
+    return ClassFunctionType(callFunction, callType, signatureFunction);
   }
   return null;
 }
 
 class TypeCheckMapping implements TypeChecks {
-  final Map<ClassEntity, ClassChecks> map = new Map<ClassEntity, ClassChecks>();
+  final Map<ClassEntity, ClassChecks> map = {};
 
   @override
   ClassChecks operator [](ClassEntity element) {
     ClassChecks result = map[element];
-    return result != null ? result : const ClassChecks.empty();
+    return result ?? const ClassChecks.empty();
   }
 
   void operator []=(ClassEntity element, ClassChecks checks) {
@@ -793,7 +789,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     for (ClassEntity holder in classes) {
       for (TypeCheck check in this[holder].checks) {
         sb.write('${holder.name} <: ${check.cls.name}, ');
@@ -804,7 +800,7 @@
 }
 
 class ArgumentCollector extends DartTypeVisitor<void, void> {
-  final Set<ClassEntity> classes = new Set<ClassEntity>();
+  final Set<ClassEntity> classes = {};
 
   void addClass(ClassEntity cls) {
     classes.add(cls);
@@ -877,8 +873,7 @@
 }
 
 class TypeVisitor extends DartTypeVisitor<void, TypeVisitorState> {
-  Set<FunctionTypeVariable> _visitedFunctionTypeVariables =
-      new Set<FunctionTypeVariable>();
+  final Set<FunctionTypeVariable> _visitedFunctionTypeVariables = {};
 
   final void Function(ClassEntity entity, {TypeVisitorState state}) onClass;
   final void Function(TypeVariableEntity entity, {TypeVisitorState state})
@@ -902,7 +897,7 @@
       case TypeVisitorState.typeLiteral:
         return TypeVisitorState.typeLiteral;
     }
-    throw new UnsupportedError("Unexpected TypeVisitorState $state");
+    throw UnsupportedError("Unexpected TypeVisitorState $state");
   }
 
   TypeVisitorState contravariantArgument(TypeVisitorState state) {
@@ -916,7 +911,7 @@
       case TypeVisitorState.typeLiteral:
         return TypeVisitorState.typeLiteral;
     }
-    throw new UnsupportedError("Unexpected TypeVisitorState $state");
+    throw UnsupportedError("Unexpected TypeVisitorState $state");
   }
 
   void visitTypes(List<DartType> types, TypeVisitorState state) {
@@ -1063,7 +1058,7 @@
 
   @override
   String toString() {
-    List<String> properties = <String>[];
+    List<String> properties = [];
     if (instance) {
       properties.add('instance');
     }
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types_codegen.dart b/pkg/compiler/lib/src/js_backend/runtime_types_codegen.dart
index 76e240e..f549a6a 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_codegen.dart
@@ -34,7 +34,7 @@
   final int hashCode = _nextHash = (_nextHash + 100003).toUnsigned(30);
   static int _nextHash = 0;
 
-  TypeCheck(this.cls, this.substitution, {this.needsIs: true});
+  TypeCheck(this.cls, this.substitution, {this.needsIs = true});
 
   @override
   String toString() =>
@@ -47,10 +47,10 @@
 
   final ClassFunctionType functionType;
 
-  ClassChecks(this.functionType) : _map = <ClassEntity, TypeCheck>{};
+  ClassChecks(this.functionType) : _map = {};
 
   const ClassChecks.empty()
-      : _map = const <ClassEntity, TypeCheck>{},
+      : _map = const {},
         functionType = null;
 
   void add(TypeCheck check) {
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types_new.dart b/pkg/compiler/lib/src/js_backend/runtime_types_new.dart
index 4c59ced..c2fea1a 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_new.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_new.dart
@@ -440,8 +440,8 @@
 }
 
 class _RulesetEntry {
-  Set<InterfaceType> _supertypes = {};
-  Map<TypeVariableType, DartType> _typeVariables = {};
+  final Set<InterfaceType> _supertypes = {};
+  final Map<TypeVariableType, DartType> _typeVariables = {};
 
   bool get isEmpty => _supertypes.isEmpty && _typeVariables.isEmpty;
   bool get isNotEmpty => _supertypes.isNotEmpty || _typeVariables.isNotEmpty;
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 258fe15..11e86e2 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
@@ -27,7 +27,7 @@
   int _testState = 0;
   int _literalState = 0;
 
-  Iterable<RtiNode> get dependencies => _dependencies ?? const <RtiNode>[];
+  Iterable<RtiNode> get dependencies => _dependencies ?? const [];
 
   bool get hasDirectTest => _testState & 1 != 0;
   bool get hasIndirectTest => _testState & 2 != 0;
@@ -48,7 +48,7 @@
       // [entity]!
       return false;
     }
-    _dependencies ??= new Set<RtiNode>();
+    _dependencies ??= {};
     return _dependencies.add(node);
   }
 
@@ -106,7 +106,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write(kind);
     sb.write(':');
     sb.write(entity);
@@ -138,7 +138,7 @@
   final bool isNoSuchMethod;
 
   MethodNode(this.function, this.parameterStructure,
-      {this.isCallTarget, this.instanceName, this.isNoSuchMethod: false});
+      {this.isCallTarget, this.instanceName, this.isNoSuchMethod = false});
 
   @override
   Entity get entity => function;
@@ -156,7 +156,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('MethodNode(');
     sb.write('function=$function');
     sb.write(',parameterStructure=$parameterStructure');
@@ -214,11 +214,11 @@
   final Set<DartType> explicitIsChecks;
 
   /// All implicit is-tests.
-  final Set<DartType> implicitIsChecks = new Set<DartType>();
+  final Set<DartType> implicitIsChecks = {};
 
   TypeVariableTests(this._elementEnvironment, this._commonElements, this._world,
       this._genericInstantiations,
-      {this.forRtiNeeds: true})
+      {this.forRtiNeeds = true})
       : explicitIsChecks = _world.isChecks.toSet() {
     _setupDependencies();
     _propagateTests();
@@ -316,7 +316,7 @@
     } else {
       dependencies = _methods[entity]?.dependencies;
     }
-    if (dependencies == null) return const <Entity>[];
+    if (dependencies == null) return const [];
     return dependencies.map((n) => n.entity).toSet();
   }
 
@@ -351,14 +351,14 @@
           isCallTarget = _world.closurizedStatics.contains(function);
           isNoSuchMethod = false;
         }
-        node = new MethodNode(function, function.parameterStructure,
+        node = MethodNode(function, function.parameterStructure,
             isCallTarget: isCallTarget,
             instanceName: instanceName,
             isNoSuchMethod: isNoSuchMethod);
       } else {
-        ParameterStructure parameterStructure = new ParameterStructure.fromType(
+        ParameterStructure parameterStructure = ParameterStructure.fromType(
             _elementEnvironment.getLocalFunctionType(function));
-        node = new MethodNode(function, parameterStructure, isCallTarget: true);
+        node = MethodNode(function, parameterStructure, isCallTarget: true);
       }
       return node;
     });
@@ -531,7 +531,7 @@
   }
 
   void _propagateTests() {
-    void processTypeVariableType(TypeVariableType type, {bool direct: true}) {
+    void processTypeVariableType(TypeVariableType type, {bool direct = true}) {
       TypeVariableEntity variable = type.element;
       if (variable.typeDeclaration is ClassEntity) {
         _getClassNode(variable.typeDeclaration).markTest(direct: direct);
@@ -540,7 +540,7 @@
       }
     }
 
-    void processType(DartType type, {bool direct: true}) {
+    void processType(DartType type, {bool direct = true}) {
       var typeWithoutNullability = type.withoutNullability;
       if (typeWithoutNullability is FutureOrType) {
         _getClassNode(_commonElements.futureClass).markIndirectTest();
@@ -567,8 +567,8 @@
     });
   }
 
-  String dump({bool verbose: false}) {
-    StringBuffer sb = new StringBuffer();
+  String dump({bool verbose = false}) {
+    StringBuffer sb = StringBuffer();
 
     void addNode(RtiNode node) {
       if (node.hasUse || node.dependencies.isNotEmpty || verbose) {
@@ -701,7 +701,7 @@
     });
 
     if (forRtiNeeds) {
-      _appliedSelectorMap = <Selector, Set<Entity>>{};
+      _appliedSelectorMap = {};
     }
 
     _world.forEachDynamicTypeArgument(
@@ -753,8 +753,7 @@
     if (isTrivial) {
       return TrivialRuntimeTypesNeed(elementEnvironment);
     }
-    return new RuntimeTypesNeedImpl.readFromDataSource(
-        source, elementEnvironment);
+    return RuntimeTypesNeedImpl.readFromDataSource(source, elementEnvironment);
   }
 
   /// Serializes this [RuntimeTypesNeed] to [sink].
@@ -895,11 +894,11 @@
     Set<FunctionEntity> methodsNeedingTypeArguments =
         source.readMembers<FunctionEntity>().toSet();
     Set<Selector> selectorsNeedingTypeArguments =
-        source.readList(() => new Selector.readFromDataSource(source)).toSet();
+        source.readList(() => Selector.readFromDataSource(source)).toSet();
     Set<int> instantiationsNeedingTypeArguments =
         source.readList(source.readInt).toSet();
     source.end(tag);
-    return new RuntimeTypesNeedImpl(
+    return RuntimeTypesNeedImpl(
         elementEnvironment,
         classesNeedingTypeArguments,
         methodsNeedingSignature,
@@ -1005,13 +1004,11 @@
 class RuntimeTypesNeedBuilderImpl implements RuntimeTypesNeedBuilder {
   final ElementEnvironment _elementEnvironment;
 
-  final Set<ClassEntity> classesUsingTypeVariableLiterals =
-      new Set<ClassEntity>();
+  final Set<ClassEntity> classesUsingTypeVariableLiterals = {};
 
-  final Set<FunctionEntity> methodsUsingTypeVariableLiterals =
-      new Set<FunctionEntity>();
+  final Set<FunctionEntity> methodsUsingTypeVariableLiterals = {};
 
-  final Set<Local> localFunctionsUsingTypeVariableLiterals = new Set<Local>();
+  final Set<Local> localFunctionsUsingTypeVariableLiterals = {};
 
   Map<Selector, Set<Entity>> selectorsNeedingTypeArgumentsForTesting;
 
@@ -1021,8 +1018,7 @@
       get instantiatedEntitiesNeedingTypeArgumentsForTesting =>
           _instantiatedEntitiesNeedingTypeArgumentsForTesting ?? const {};
 
-  final Set<GenericInstantiation> _genericInstantiations =
-      new Set<GenericInstantiation>();
+  final Set<GenericInstantiation> _genericInstantiations = {};
 
   TypeVariableTests typeVariableTestsForTesting;
 
@@ -1051,17 +1047,17 @@
   @override
   RuntimeTypesNeed computeRuntimeTypesNeed(
       KClosedWorld closedWorld, CompilerOptions options) {
-    TypeVariableTests typeVariableTests = new TypeVariableTests(
+    TypeVariableTests typeVariableTests = TypeVariableTests(
         closedWorld.elementEnvironment,
         closedWorld.commonElements,
         closedWorld,
         _genericInstantiations);
-    Set<ClassEntity> classesNeedingTypeArguments = new Set<ClassEntity>();
-    Set<FunctionEntity> methodsNeedingSignature = new Set<FunctionEntity>();
-    Set<FunctionEntity> methodsNeedingTypeArguments = new Set<FunctionEntity>();
-    Set<Local> localFunctionsNeedingSignature = new Set<Local>();
-    Set<Local> localFunctionsNeedingTypeArguments = new Set<Local>();
-    Set<Entity> processedEntities = new Set<Entity>();
+    Set<ClassEntity> classesNeedingTypeArguments = {};
+    Set<FunctionEntity> methodsNeedingSignature = {};
+    Set<FunctionEntity> methodsNeedingTypeArguments = {};
+    Set<Local> localFunctionsNeedingSignature = {};
+    Set<Local> localFunctionsNeedingTypeArguments = {};
+    Set<Entity> processedEntities = {};
 
     // Find the classes that need type arguments at runtime. Such
     // classes are:
@@ -1141,14 +1137,14 @@
             }
           });
           localFunctionsNeedingSignature.add(function);
-          localFunctionsToRemove ??= new Set<Local>();
+          localFunctionsToRemove ??= {};
           localFunctionsToRemove.add(function);
         }
       }
       for (FunctionEntity function in closurizedMembers) {
         if (checkFunctionType(_elementEnvironment.getFunctionType(function))) {
           methodsNeedingSignature.add(function);
-          closurizedMembersToRemove ??= new Set<FunctionEntity>();
+          closurizedMembersToRemove ??= {};
           closurizedMembersToRemove.add(function);
         }
       }
@@ -1249,7 +1245,7 @@
     /// Set to `true` if subclasses of `Function` need runtimeType.
     bool neededOnFunctions = false;
 
-    Set<ClassEntity> classesDirectlyNeedingRuntimeType = new Set<ClassEntity>();
+    Set<ClassEntity> classesDirectlyNeedingRuntimeType = {};
 
     Iterable<ClassEntity> impliedClasses(DartType type) {
       type = type.withoutNullability;
@@ -1277,7 +1273,7 @@
         return impliedClasses(
             _elementEnvironment.getTypeVariableBound(type.element));
       }
-      throw new UnsupportedError('Unexpected type $type');
+      throw UnsupportedError('Unexpected type $type');
     }
 
     void addClass(ClassEntity cls) {
@@ -1348,7 +1344,7 @@
           .subclassesOf(commonElements.objectClass)
           .toSet();
     } else {
-      allClassesNeedingRuntimeType = new Set<ClassEntity>();
+      allClassesNeedingRuntimeType = {};
       // TODO(johnniwinther): Support this operation directly in
       // [ClosedWorld] using the [ClassSet]s.
       for (ClassEntity cls in classesDirectlyNeedingRuntimeType) {
@@ -1381,7 +1377,7 @@
       }
     }
 
-    Set<Selector> selectorsNeedingTypeArguments = new Set<Selector>();
+    Set<Selector> selectorsNeedingTypeArguments = {};
     typeVariableTests
         .forEachAppliedSelector((Selector selector, Set<Entity> targets) {
       for (Entity target in targets) {
@@ -1390,10 +1386,9 @@
             localFunctionsNeedingTypeArguments.contains(target)) {
           selectorsNeedingTypeArguments.add(selector);
           if (retainDataForTesting) {
-            selectorsNeedingTypeArgumentsForTesting ??=
-                <Selector, Set<Entity>>{};
+            selectorsNeedingTypeArgumentsForTesting ??= {};
             selectorsNeedingTypeArgumentsForTesting
-                .putIfAbsent(selector, () => new Set<Entity>())
+                .putIfAbsent(selector, () => {})
                 .add(target);
           } else {
             return;
@@ -1401,7 +1396,7 @@
         }
       }
     });
-    Set<int> instantiationsNeedingTypeArguments = new Set<int>();
+    Set<int> instantiationsNeedingTypeArguments = {};
     typeVariableTests.forEachInstantiatedEntity(
         (Entity target, Set<GenericInstantiation> instantiations) {
       if (methodsNeedingTypeArguments.contains(target) ||
@@ -1445,7 +1440,7 @@
     print('instantiationsNeedingTypeArguments: '
         '$instantiationsNeedingTypeArguments');*/
 
-    return new RuntimeTypesNeedImpl(
+    return RuntimeTypesNeedImpl(
         _elementEnvironment,
         classesNeedingTypeArguments,
         methodsNeedingSignature,
diff --git a/pkg/compiler/lib/src/js_backend/specialized_checks.dart b/pkg/compiler/lib/src/js_backend/specialized_checks.dart
index 431ebe7..9a887aa 100644
--- a/pkg/compiler/lib/src/js_backend/specialized_checks.dart
+++ b/pkg/compiler/lib/src/js_backend/specialized_checks.dart
@@ -72,8 +72,8 @@
       }
 
       DartTypes dartTypes = closedWorld.dartTypes;
-      // Top types (here it could be Object in non-NNBD mode) should be constant
-      // folded outside the specializer. This test protects logic below.
+      // Top types should be constant folded outside the specializer. This test
+      // protects logic below.
       if (dartTypes.isTopType(dartType)) return null;
       ElementEnvironment elementEnvironment = closedWorld.elementEnvironment;
       if (!dartTypes.isSubtype(
diff --git a/pkg/compiler/lib/src/js_backend/string_reference.dart b/pkg/compiler/lib/src/js_backend/string_reference.dart
index 9fc5044..62c378b 100644
--- a/pkg/compiler/lib/src/js_backend/string_reference.dart
+++ b/pkg/compiler/lib/src/js_backend/string_reference.dart
@@ -216,7 +216,7 @@
 
   /// Maps the recipe (type expression) to the references with the same recipe.
   /// Much of the algorithm's state is stored in the _ReferenceSet objects.
-  Map<StringConstantValue, _ReferenceSet> _referencesByString = {};
+  final Map<StringConstantValue, _ReferenceSet> _referencesByString = {};
 
   StringReferenceFinalizerImpl(this._minify,
       {this.shortestSharedLength =
diff --git a/pkg/compiler/lib/src/js_backend/type_reference.dart b/pkg/compiler/lib/src/js_backend/type_reference.dart
index eca01c8..d488b24 100644
--- a/pkg/compiler/lib/src/js_backend/type_reference.dart
+++ b/pkg/compiler/lib/src/js_backend/type_reference.dart
@@ -236,7 +236,7 @@
 
   /// Maps the recipe (type expression) to the references with the same recipe.
   /// Much of the algorithm's state is stored in the _ReferenceSet objects.
-  Map<TypeRecipe, _ReferenceSet> _referencesByRecipe = {};
+  final Map<TypeRecipe, _ReferenceSet> _referencesByRecipe = {};
 
   TypeReferenceFinalizerImpl(
       this._emitter, this._commonElements, this._recipeEncoder, this._minify) {
diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
index 25cd71f..638d53d 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -73,13 +73,12 @@
       }
     }
 
-    Map<jsAst.Name, jsAst.Expression> generatedStubs =
-        <jsAst.Name, jsAst.Expression>{};
+    Map<jsAst.Name, jsAst.Expression> generatedStubs = {};
 
     // Two selectors may match but differ only in type.  To avoid generating
     // identical stubs for each we track untyped selectors which already have
     // stubs.
-    Set<Selector> generatedSelectors = new Set<Selector>();
+    Set<Selector> generatedSelectors = {};
     for (Selector selector in selectors.keys) {
       if (generatedSelectors.contains(selector)) continue;
       if (!selector.appliesUnnamed(member)) continue;
@@ -88,13 +87,13 @@
         generatedSelectors.add(selector);
 
         jsAst.Name invocationName = _namer.invocationName(selector);
-        Selector callSelector = new Selector.callClosureFrom(selector);
+        Selector callSelector = Selector.callClosureFrom(selector);
         jsAst.Name closureCallName = _namer.invocationName(callSelector);
 
-        List<jsAst.Parameter> parameters = <jsAst.Parameter>[];
-        List<jsAst.Expression> arguments = <jsAst.Expression>[];
+        List<jsAst.Parameter> parameters = [];
+        List<jsAst.Expression> arguments = [];
         if (isInterceptedMethod) {
-          parameters.add(new jsAst.Parameter(receiverArgumentName));
+          parameters.add(jsAst.Parameter(receiverArgumentName));
         }
 
         for (int i = 0; i < selector.argumentCount; i++) {
@@ -120,7 +119,7 @@
   }
 
   Map<jsAst.Name, Selector> computeSelectorsForNsmHandlers() {
-    Map<jsAst.Name, Selector> jsNames = <jsAst.Name, Selector>{};
+    Map<jsAst.Name, Selector> jsNames = {};
 
     // Do not generate no such method handlers if there is no class.
     if (_codegenWorld.directlyInstantiatedClasses.isEmpty) {
@@ -158,8 +157,8 @@
     // Values match JSInvocationMirror in js-helper library.
     int type = selector.invocationMirrorKind;
     List<String> parameterNames =
-        new List.generate(selector.argumentCount, (i) => '\$$i') +
-            new List.generate(selector.typeArgumentCount, (i) => '\$T${i + 1}');
+        List.generate(selector.argumentCount, (i) => '\$$i') +
+            List.generate(selector.typeArgumentCount, (i) => '\$T${i + 1}');
 
     List<jsAst.Expression> argNames = selector.callStructure
         .getOrderedNamedArguments()
@@ -186,9 +185,9 @@
           js.quoteName(enableMinification ? internalName : methodName),
       'internalName': js.quoteName(internalName),
       'type': js.number(type),
-      'arguments': new jsAst.ArrayInitializer(
+      'arguments': jsAst.ArrayInitializer(
           parameterNames.map<jsAst.Expression>(js).toList()),
-      'namedArguments': new jsAst.ArrayInitializer(argNames),
+      'namedArguments': jsAst.ArrayInitializer(argNames),
       'typeArgumentCount': js.number(selector.typeArgumentCount)
     });
 
@@ -199,7 +198,7 @@
     } else {
       function = js(r'function(#) { return # }', [parameterNames, expression]);
     }
-    return new StubMethod(name, function);
+    return StubMethod(name, function);
   }
 
   /// Generates a getter for the given [field].
@@ -292,7 +291,7 @@
   }
 
   jsAst.Statement instanceTearOffGetter;
-  if (options.useContentSecurityPolicy) {
+  if (options.features.useContentSecurityPolicy.isEnabled) {
     instanceTearOffGetter = js.statement(
       '''
       function instanceTearOffGetter(isIntercepted, parameters) {
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index 2337b35..0beb130 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -15,8 +15,7 @@
 import '../js_backend/backend.dart' show CodegenInputs;
 import '../js_backend/inferred_data.dart';
 import '../js_backend/namer.dart' show Namer;
-import '../js_backend/runtime_types.dart'
-    show RuntimeTypesChecks;
+import '../js_backend/runtime_types.dart' show RuntimeTypesChecks;
 import '../js_model/js_strategy.dart';
 import '../options.dart';
 import '../universe/codegen_world_builder.dart';
@@ -78,16 +77,17 @@
   void _finalizeRti(CodegenInputs codegen, CodegenWorld codegenWorld) {
     // Compute the required type checks to know which classes need a
     // 'is$' method.
-    _rtiChecks = _backendStrategy.rtiChecksBuilder.computeRequiredChecks(codegenWorld, options);
+    _rtiChecks = _backendStrategy.rtiChecksBuilder
+        .computeRequiredChecks(codegenWorld, options);
   }
 
   /// Creates the [Emitter] for this task.
   void createEmitter(
       Namer namer, CodegenInputs codegen, JClosedWorld closedWorld) {
     measure(() {
-      _nativeEmitter = new NativeEmitter(
+      _nativeEmitter = NativeEmitter(
           this, closedWorld, _backendStrategy.nativeCodegenEnqueuer);
-      _emitter = new startup_js_emitter.EmitterImpl(
+      _emitter = startup_js_emitter.EmitterImpl(
           _compiler.options,
           _compiler.reporter,
           _compiler.outputProvider,
@@ -99,7 +99,7 @@
           _backendStrategy.sourceInformationStrategy,
           this,
           _generateSourceMap);
-      metadataCollector = new MetadataCollector(
+      metadataCollector = MetadataCollector(
           _compiler.reporter, _emitter, codegen.rtiRecipeEncoder);
     });
   }
diff --git a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
index 9d4c41a..09a8b4f 100644
--- a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
+++ b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
@@ -22,7 +22,7 @@
   final Sorter _sorter;
   _DartTypeOrdering _dartTypeOrdering;
   _ConstantOrdering(this._sorter) {
-    _dartTypeOrdering = new _DartTypeOrdering(this);
+    _dartTypeOrdering = _DartTypeOrdering(this);
   }
 
   @override
@@ -233,8 +233,8 @@
 class _DartTypeOrdering extends DartTypeVisitor<int, DartType> {
   final _ConstantOrdering _constantOrdering;
   DartType _root;
-  List<FunctionTypeVariable> _leftFunctionTypeVariables = [];
-  List<FunctionTypeVariable> _rightFunctionTypeVariables = [];
+  final List<FunctionTypeVariable> _leftFunctionTypeVariables = [];
+  final List<FunctionTypeVariable> _rightFunctionTypeVariables = [];
   _DartTypeOrdering(this._constantOrdering);
 
   int compare(DartType a, DartType b) {
@@ -269,13 +269,13 @@
 
   @override
   int visitVoidType(covariant VoidType type, covariant VoidType other) {
-    throw new UnsupportedError('Unreachable');
+    throw UnsupportedError('Unreachable');
   }
 
   @override
   int visitTypeVariableType(
       covariant TypeVariableType type, covariant TypeVariableType other) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "Type variables are not expected in constants: '$type' in '$_root'");
   }
 
@@ -330,7 +330,7 @@
   @override
   int visitDynamicType(
       covariant DynamicType type, covariant DynamicType other) {
-    throw new UnsupportedError('Unreachable');
+    throw UnsupportedError('Unreachable');
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_emitter/headers.dart b/pkg/compiler/lib/src/js_emitter/headers.dart
index 9953606..90e4098 100644
--- a/pkg/compiler/lib/src/js_emitter/headers.dart
+++ b/pkg/compiler/lib/src/js_emitter/headers.dart
@@ -6,7 +6,7 @@
 
 import '../options.dart';
 
-String generatedBy(CompilerOptions options, {String flavor: ""}) {
+String generatedBy(CompilerOptions options, {String flavor = ""}) {
   String suffix = '';
   if (options.hasBuildId) {
     suffix = ' version: ${options.buildId}';
diff --git a/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart
index 8417cc4..627dbe5 100644
--- a/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart
@@ -69,13 +69,13 @@
     // }
     // ```
 
-    List<jsAst.Parameter> parameters = <jsAst.Parameter>[];
-    List<jsAst.Expression> arguments = <jsAst.Expression>[];
+    List<jsAst.Parameter> parameters = [];
+    List<jsAst.Expression> arguments = [];
 
     for (int i = 0; i < callSelector.argumentCount; i++) {
       String jsName = 'a$i';
       arguments.add(js('#', jsName));
-      parameters.add(new jsAst.Parameter(jsName));
+      parameters.add(jsAst.Parameter(jsName));
     }
 
     for (int i = 0; i < targetSelector.typeArgumentCount; i++) {
@@ -95,7 +95,7 @@
     // TODO(sra): .withSourceInformation(sourceInformation);
 
     jsAst.Name name = _namer.invocationName(callSelector);
-    return new ParameterStubMethod(name, null, function);
+    return ParameterStubMethod(name, null, function);
   }
 
   /// Generates a stub for a 'signature' selector. The stub calls the underlying
@@ -118,7 +118,7 @@
     // TODO(sra): Generate source information for stub that has no member.
     // TODO(sra): .withSourceInformation(sourceInformation);
 
-    return new ParameterStubMethod(operatorSignature, null, function);
+    return ParameterStubMethod(operatorSignature, null, function);
   }
 
   jsAst.Fun _generateSignatureNewRti(FieldEntity functionField) =>
@@ -156,8 +156,7 @@
         _codegenWorld.invocationsByName(call);
 
     Set<ParameterStructure> computeLiveParameterStructures() {
-      Set<ParameterStructure> parameterStructures =
-          new Set<ParameterStructure>();
+      Set<ParameterStructure> parameterStructures = {};
 
       void process(FunctionEntity function) {
         if (function.parameterStructure.typeParameters == typeArgumentCount) {
@@ -172,7 +171,7 @@
       return parameterStructures;
     }
 
-    List<StubMethod> stubs = <StubMethod>[];
+    List<StubMethod> stubs = [];
 
     // For every call-selector generate a stub to the corresponding selector
     // with filled-in type arguments.
@@ -188,7 +187,7 @@
         for (ParameterStructure parameterStructure in parameterStructures) {
           if (genericCallStructure.signatureApplies(parameterStructure)) {
             Selector genericSelector =
-                new Selector.call(selector.memberName, genericCallStructure);
+                Selector.call(selector.memberName, genericCallStructure);
             stubs.add(_generateStub(
                 instantiationClass, functionField, selector, genericSelector));
             break;
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index 13e4a5e..b96d0e8 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -133,7 +133,7 @@
       hasNative = anyNativeClasses;
     }
 
-    List<jsAst.Statement> statements = <jsAst.Statement>[];
+    List<jsAst.Statement> statements = [];
 
     if (hasNumber) {
       jsAst.Statement whenNumber;
@@ -206,7 +206,7 @@
       statements.add(js.statement('return receiver'));
     }
 
-    return js('''function(receiver) { #; }''', new jsAst.Block(statements));
+    return js('''function(receiver) { #; }''', jsAst.Block(statements));
   }
 
   jsAst.Call _generateIsJsIndexableCall(
@@ -218,13 +218,12 @@
     // We pass the dispatch property record to the isJsIndexable
     // helper rather than reading it inside the helper to increase the
     // chance of making the dispatch record access monomorphic.
-    jsAst.PropertyAccess record =
-        new jsAst.PropertyAccess(use2, dispatchProperty);
+    jsAst.PropertyAccess record = jsAst.PropertyAccess(use2, dispatchProperty);
 
-    List<jsAst.Expression> arguments = <jsAst.Expression>[use1, record];
+    List<jsAst.Expression> arguments = [use1, record];
     FunctionEntity helper = _commonElements.isJsIndexable;
     jsAst.Expression helperExpression = _emitter.staticFunctionAccess(helper);
-    return new jsAst.Call(helperExpression, arguments);
+    return jsAst.Call(helperExpression, arguments);
   }
 
   // Returns a statement that takes care of performance critical
@@ -383,7 +382,7 @@
     Set<ClassEntity> classes = interceptor.classes;
     jsAst.Name getInterceptorName = _namer.nameForGetInterceptor(classes);
 
-    List<String> parameterNames = <String>[];
+    List<String> parameterNames = [];
     parameterNames.add('receiver');
 
     if (selector.isSetter) {
@@ -402,7 +401,7 @@
 
     jsAst.Statement optimizedPath =
         _fastPathForOneShotInterceptor(selector, classes);
-    if (optimizedPath == null) optimizedPath = js.statement(';');
+    optimizedPath ??= js.statement(';');
 
     return js('function(#) { #; return #.#(receiver).#(#) }', [
       parameterNames,
@@ -419,7 +418,7 @@
     CustomElementsCodegenAnalysis analysis = _customElementsCodegenAnalysis;
     if (!analysis.needsTable) return null;
 
-    List<jsAst.Expression> elements = <jsAst.Expression>[];
+    List<jsAst.Expression> elements = [];
     Iterable<ConstantValue> constants =
         _codegenWorld.getConstantsForEmission(_emitter.compareConstants);
     for (ConstantValue constant in constants) {
@@ -449,15 +448,15 @@
         // We expect most of the time the map will be a singleton.
         var properties = <jsAst.Property>[];
         for (ConstructorEntity member in analysis.constructors(classElement)) {
-          properties.add(new jsAst.Property(
+          properties.add(jsAst.Property(
               js.string(member.name), _emitter.staticFunctionAccess(member)));
         }
 
-        var map = new jsAst.ObjectInitializer(properties);
+        var map = jsAst.ObjectInitializer(properties);
         elements.add(map);
       }
     }
 
-    return new jsAst.ArrayInitializer(elements);
+    return jsAst.ArrayInitializer(elements);
   }
 }
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index fafbbc7..c88217e 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
@@ -98,20 +98,21 @@
   final RecipeEncoder _rtiRecipeEncoder;
 
   /// A map used to canonicalize the entries of metadata.
-  Map<OutputUnit, Map<String, List<BoundMetadataEntry>>> _metadataMap = {};
+  final Map<OutputUnit, Map<String, List<BoundMetadataEntry>>> _metadataMap =
+      {};
 
   /// A map with a token for a lists of JS expressions, one token for each
   /// output unit. Once finalized, the entries represent types including
   /// function types and typedefs.
-  Map<OutputUnit, _MetadataList> _typesTokens = {};
+  final Map<OutputUnit, _MetadataList> _typesTokens = {};
 
   /// A map used to canonicalize the entries of types.
-  Map<OutputUnit, Map<DartType, List<BoundMetadataEntry>>> _typesMap = {};
+  final Map<OutputUnit, Map<DartType, List<BoundMetadataEntry>>> _typesMap = {};
 
   MetadataCollector(this.reporter, this._emitter, this._rtiRecipeEncoder);
 
   jsAst.Expression getTypesForOutputUnit(OutputUnit outputUnit) {
-    return _typesTokens.putIfAbsent(outputUnit, () => new _MetadataList());
+    return _typesTokens.putIfAbsent(outputUnit, () => _MetadataList());
   }
 
   void mergeOutputUnitMetadata(OutputUnit target, OutputUnit source) {
@@ -120,8 +121,7 @@
     // Merge _metadataMap
     var sourceMetadataMap = _metadataMap[source];
     if (sourceMetadataMap != null) {
-      var targetMetadataMap =
-          _metadataMap[target] ??= Map<String, List<BoundMetadataEntry>>();
+      var targetMetadataMap = _metadataMap[target] ??= {};
       _metadataMap.remove(source);
       sourceMetadataMap.forEach((str, entries) {
         var targetMetadataMapList = targetMetadataMap[str] ??= [];
@@ -132,8 +132,7 @@
     // Merge _typesMap
     var sourceTypesMap = _typesMap[source];
     if (sourceTypesMap != null) {
-      var targetTypesMap =
-          _typesMap[target] ??= Map<DartType, List<BoundMetadataEntry>>();
+      var targetTypesMap = _typesMap[target] ??= {};
       _typesMap.remove(source);
       sourceTypesMap.forEach((type, entries) {
         var targetTypesMapList = targetTypesMap[type] ??= [];
@@ -152,7 +151,7 @@
   }
 
   jsAst.Expression _addTypeInOutputUnit(DartType type, OutputUnit outputUnit) {
-    _typesMap[outputUnit] ??= Map<DartType, List<BoundMetadataEntry>>();
+    _typesMap[outputUnit] ??= {};
     BoundMetadataEntry metadataEntry;
 
     if (_typesMap[outputUnit].containsKey(type)) {
@@ -170,7 +169,7 @@
   @override
   void finalizeTokens() {
     void countTokensInTypes(Iterable<BoundMetadataEntry> entries) {
-      jsAst.TokenCounter counter = new jsAst.TokenCounter();
+      jsAst.TokenCounter counter = jsAst.TokenCounter();
       entries
           .where((BoundMetadataEntry e) => e._rc > 0)
           .map((BoundMetadataEntry e) => e.entry)
@@ -196,7 +195,7 @@
       List<jsAst.Node> values =
           entries.map((BoundMetadataEntry e) => e.entry).toList();
 
-      return new jsAst.ArrayInitializer(values);
+      return jsAst.ArrayInitializer(values);
     }
 
     _typesTokens.forEach((OutputUnit outputUnit, _MetadataList token) {
@@ -205,7 +204,7 @@
         typesMap.values.forEach(countTokensInTypes);
         token.setExpression(finalizeMap(typesMap));
       } else {
-        token.setExpression(new jsAst.ArrayInitializer([]));
+        token.setExpression(jsAst.ArrayInitializer([]));
       }
     });
   }
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 19617a0..706385f 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -187,8 +187,8 @@
   StaticField(this.element, this.name, this.getterName, this.code,
       {this.isFinal,
       this.isLazy,
-      this.isInitializedByConstant: false,
-      this.usesNonNullableInitialization: false});
+      this.isInitializedByConstant = false,
+      this.usesNonNullableInitialization = false});
 
   @override
   String toString() {
@@ -309,7 +309,7 @@
     _mixinClass = mixinClass;
   }
 
-  js.Name get superclassName => superclass == null ? null : superclass.name;
+  js.Name get superclassName => superclass?.name;
 
   @override
   String toString() => 'Class(name=${name.key},element=$element)';
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 9223c96..a3137e7 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -27,15 +27,13 @@
   bool hasNativeClasses = false;
 
   // Caches the native subtypes of a native class.
-  Map<ClassEntity, List<ClassEntity>> subtypes =
-      <ClassEntity, List<ClassEntity>>{};
+  Map<ClassEntity, List<ClassEntity>> subtypes = {};
 
   // Caches the direct native subtypes of a native class.
-  Map<ClassEntity, List<ClassEntity>> directSubtypes =
-      <ClassEntity, List<ClassEntity>>{};
+  Map<ClassEntity, List<ClassEntity>> directSubtypes = {};
 
   // Caches the methods that have a native body.
-  Set<FunctionEntity> nativeMethods = new Set<FunctionEntity>();
+  Set<FunctionEntity> nativeMethods = {};
 
   // 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
@@ -91,8 +89,8 @@
     // Compute a pre-order traversal of the subclass forest.  We actually want a
     // post-order traversal but it is easier to compute the pre-order and use it
     // in reverse.
-    List<Class> preOrder = <Class>[];
-    Set<Class> seen = new Set<Class>();
+    List<Class> preOrder = [];
+    Set<Class> seen = {};
 
     Class objectClass = null;
     Class jsInterceptorClass = null;
@@ -119,8 +117,8 @@
     // needed class.
     // We may still need to include type metadata for some unneeded classes.
 
-    Set<Class> neededClasses = new Set<Class>();
-    Set<Class> nonLeafClasses = new Set<Class>();
+    Set<Class> neededClasses = {};
+    Set<Class> nonLeafClasses = {};
 
     Map<Class, List<Class>> extensionPoints = computeExtensionPoints(preOrder);
 
@@ -177,8 +175,8 @@
 
     // Collect all the tags that map to each native class.
 
-    Map<Class, Set<String>> leafTags = new Map<Class, Set<String>>();
-    Map<Class, Set<String>> nonleafTags = new Map<Class, Set<String>>();
+    Map<Class, Set<String>> leafTags = {};
+    Map<Class, Set<String>> nonleafTags = {};
 
     for (Class cls in classes) {
       if (!cls.isNative) continue;
@@ -187,9 +185,7 @@
       List<String> nativeTags = _nativeData.getNativeTagsOfClass(cls.element);
 
       if (nonLeafClasses.contains(cls) || extensionPoints.containsKey(cls)) {
-        nonleafTags
-            .putIfAbsent(cls, () => new Set<String>())
-            .addAll(nativeTags);
+        nonleafTags.putIfAbsent(cls, () => {}).addAll(nativeTags);
       } else {
         Class sufficingInterceptor = cls;
         while (!neededClasses.contains(sufficingInterceptor)) {
@@ -198,9 +194,7 @@
         if (sufficingInterceptor == objectClass) {
           sufficingInterceptor = jsInterceptorClass;
         }
-        leafTags
-            .putIfAbsent(sufficingInterceptor, () => new Set<String>())
-            .addAll(nativeTags);
+        leafTags.putIfAbsent(sufficingInterceptor, () => {}).addAll(nativeTags);
       }
     }
 
@@ -252,13 +246,13 @@
       return nativeSuperclassOf(cls.superclass);
     }
 
-    Map<Class, List<Class>> map = new Map<Class, List<Class>>();
+    Map<Class, List<Class>> map = {};
 
     for (Class cls in classes) {
       if (cls.isNative) continue;
       Class nativeAncestor = nativeAncestorOf(cls);
       if (nativeAncestor != null) {
-        map.putIfAbsent(nativeAncestor, () => <Class>[]).add(cls);
+        map.putIfAbsent(nativeAncestor, () => []).add(cls);
       }
     }
     return map;
@@ -321,7 +315,7 @@
     // must be turned into a JS call to:
     //   foo(null, y).
 
-    List<jsAst.Statement> statements = <jsAst.Statement>[];
+    List<jsAst.Statement> statements = [];
     potentiallyConvertDartClosuresToJs(statements, member, stubParameters);
 
     String target;
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
index 819b321..022cd5a 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -28,7 +28,7 @@
 import 'native_emitter.dart';
 
 class ParameterStubGenerator {
-  static final Set<Selector> emptySelectorSet = new Set<Selector>();
+  static final Set<Selector> emptySelectorSet = {};
 
   final Emitter _emitter;
   final NativeEmitter _nativeEmitter;
@@ -112,13 +112,13 @@
     String receiverArgumentName = r'$receiver';
 
     // The parameters that this stub takes.
-    List<jsAst.Parameter> stubParameters = new List<jsAst.Parameter>.filled(
+    List<jsAst.Parameter> stubParameters = List<jsAst.Parameter>.filled(
         extraArgumentCount +
             selector.argumentCount +
             selector.typeArgumentCount,
         null);
     // The arguments that will be passed to the real method.
-    List<jsAst.Expression> targetArguments = new List<jsAst.Expression>.filled(
+    List<jsAst.Expression> targetArguments = List<jsAst.Expression>.filled(
         extraArgumentCount +
             parameterStructure.totalParameters +
             parameterStructure.typeParameters,
@@ -127,7 +127,7 @@
     int count = 0;
     if (isInterceptedMethod) {
       count++;
-      stubParameters[0] = new jsAst.Parameter(receiverArgumentName);
+      stubParameters[0] = jsAst.Parameter(receiverArgumentName);
       targetArguments[0] = js('#', receiverArgumentName);
     }
 
@@ -140,7 +140,7 @@
       String jsName = _namer.safeVariableName(name);
       assert(jsName != receiverArgumentName);
       if (count < optionalParameterStart) {
-        stubParameters[count] = new jsAst.Parameter(jsName);
+        stubParameters[count] = jsAst.Parameter(jsName);
         targetArguments[count] = js('#', jsName);
       } else {
         int index = names.indexOf(name);
@@ -150,11 +150,11 @@
           // one in the real method (which is in Dart source order).
           targetArguments[count] = js('#', jsName);
           stubParameters[optionalParameterStart + index] =
-              new jsAst.Parameter(jsName);
+              jsAst.Parameter(jsName);
         } else {
           if (value == null) {
             targetArguments[count] =
-                _emitter.constantReference(new NullConstantValue());
+                _emitter.constantReference(NullConstantValue());
           } else {
             if (!value.isNull) {
               // If the value is the null constant, we should not pass it
@@ -181,7 +181,7 @@
               TypeReference(TypeExpressionRecipe(defaultType));
         } else {
           String jsName = '\$${typeVariable.element.name}';
-          stubParameters[parameterIndex++] = new jsAst.Parameter(jsName);
+          stubParameters[parameterIndex++] = jsAst.Parameter(jsName);
           targetArguments[count++] = js('#', jsName);
         }
       }
@@ -229,7 +229,7 @@
     jsAst.Name name = member.isStatic ? null : _namer.invocationName(selector);
     jsAst.Name callName =
         (callSelector != null) ? _namer.invocationName(callSelector) : null;
-    return new ParameterStubMethod(name, callName, function, element: member);
+    return ParameterStubMethod(name, callName, function, element: member);
   }
 
   DartType _eraseTypeVariablesToAny(DartType type) {
@@ -301,10 +301,10 @@
     }
 
     assert(emptySelectorSet.isEmpty);
-    liveSelectors ??= const <Selector, SelectorConstraints>{};
-    callSelectors ??= const <Selector, SelectorConstraints>{};
+    liveSelectors ??= const {};
+    callSelectors ??= const {};
 
-    List<ParameterStubMethod> stubs = <ParameterStubMethod>[];
+    List<ParameterStubMethod> stubs = [];
 
     if (liveSelectors.isEmpty &&
         callSelectors.isEmpty &&
@@ -318,9 +318,9 @@
     //
     // For example, for the call-selector `call(x, y)` the renamed selector
     // for member `foo` would be `foo(x, y)`.
-    Set<Selector> renamedCallSelectors = new Set<Selector>();
+    Set<Selector> renamedCallSelectors = {};
 
-    Set<Selector> stubSelectors = new Set<Selector>();
+    Set<Selector> stubSelectors = {};
 
     // Start with closure-call selectors, since since they imply the generation
     // of the non-call version.
@@ -341,7 +341,7 @@
 
     for (Selector selector in callSelectors.keys) {
       Selector renamedSelector =
-          new Selector.call(member.memberName, selector.callStructure);
+          Selector.call(member.memberName, selector.callStructure);
       renamedCallSelectors.add(renamedSelector);
 
       if (!renamedSelector.appliesUnnamed(member)) {
@@ -364,7 +364,7 @@
       // This is basically the same logic as above, but with type arguments.
       if (selector.callStructure.typeArgumentCount == 0) {
         if (memberTypeParameters > 0) {
-          Selector renamedSelectorWithTypeArguments = new Selector.call(
+          Selector renamedSelectorWithTypeArguments = Selector.call(
               member.memberName,
               selector.callStructure
                   .withTypeArgumentCount(memberTypeParameters));
@@ -372,7 +372,7 @@
 
           if (stubSelectors.add(renamedSelectorWithTypeArguments)) {
             Selector closureSelector =
-                new Selector.callClosureFrom(renamedSelectorWithTypeArguments);
+                Selector.callClosureFrom(renamedSelectorWithTypeArguments);
             ParameterStubMethod stub = generateParameterStub(
                 member, renamedSelectorWithTypeArguments, closureSelector);
             if (stub != null) {
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
index a3ad826..af94f35 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
@@ -16,8 +16,8 @@
 /// [needsCheckedSetter] indicates that a checked getter is needed, and in this
 /// case, [needsSetter] is always false. [needsCheckedSetter] is only true when
 /// type assertions are enabled (checked mode).
-typedef void AcceptField(FieldEntity member, js.Name name, bool needsGetter,
-    bool needsSetter, bool needsCheckedSetter);
+typedef AcceptField = void Function(FieldEntity member, js.Name name,
+    bool needsGetter, bool needsSetter, bool needsCheckedSetter);
 
 class FieldVisitor {
   final JElementEnvironment _elementEnvironment;
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 d993bf2..c9130bd 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
@@ -130,7 +130,7 @@
       this._sorter,
       this._rtiNeededClasses,
       this._mainFunction)
-      : this.collector = new Collector(
+      : this.collector = Collector(
             _commonElements,
             _elementEnvironment,
             _outputUnitData,
@@ -143,11 +143,11 @@
             _rtiNeededClasses,
             _generatedCode,
             _sorter),
-        this._registry = new Registry(_outputUnitData.mainOutputUnit, _sorter);
+        this._registry = Registry(_outputUnitData.mainOutputUnit, _sorter);
 
   /// Mapping from [ClassEntity] to constructed [Class]. We need this to
   /// update the superclass in the [Class].
-  final Map<ClassEntity, Class> _classes = <ClassEntity, Class>{};
+  final Map<ClassEntity, Class> _classes = {};
 
   /// Mapping from [ClassEntity] to constructed [ClassTypeData] object. Used to build
   /// libraries.
@@ -155,20 +155,20 @@
 
   /// 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>{};
+  final Map<OutputUnit, Fragment> _outputs = {};
 
   /// Mapping from [ConstantValue] to constructed [Constant]. We need this to
   /// update field-initializers to point to the ConstantModel.
-  final Map<ConstantValue, Constant> _constants = <ConstantValue, Constant>{};
+  final Map<ConstantValue, Constant> _constants = {};
 
   Set<Class> _unneededNativeClasses;
 
   ClassEntity get _jsInteropInterceptor =>
       _commonElements.jsJavaScriptObjectClass;
-  List<StubMethod> _jsInteropIsChecks = [];
+  final List<StubMethod> _jsInteropIsChecks = [];
   final Set<TypeCheck> _jsInteropTypeChecks = {};
 
-  Program buildProgram({bool storeFunctionTypesInMetadata: false}) {
+  Program buildProgram({bool storeFunctionTypesInMetadata = false}) {
     collector.collect();
 
     this._storeFunctionTypesInMetadata = storeFunctionTypesInMetadata;
@@ -237,7 +237,7 @@
         _registry.deferredLibrariesMap.map(_buildDeferredFragment);
 
     List<Fragment> fragments =
-        new List<Fragment>.filled(_registry.librariesMapCount, null);
+        List<Fragment>.filled(_registry.librariesMapCount, null);
     fragments[0] = mainFragment;
     fragments.setAll(1, deferredFragments);
 
@@ -257,7 +257,7 @@
       finalizers.add(namingFinalizer as js.TokenFinalizer);
     }
 
-    return new Program(fragments, _buildTypeToInterceptorMap(),
+    return Program(fragments, _buildTypeToInterceptorMap(),
         _task.metadataCollector, finalizers,
         needsNativeSupport: needsNativeSupport,
         outputContainsConstantList: collector.outputContainsConstantList);
@@ -268,7 +268,7 @@
   }
 
   js.Expression _buildTypeToInterceptorMap() {
-    InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
+    InterceptorStubGenerator stubGenerator = InterceptorStubGenerator(
         _commonElements,
         _task.emitter,
         _nativeCodegenEnqueuer,
@@ -281,7 +281,7 @@
 
   MainFragment _buildMainFragment(LibrariesMap librariesMap) {
     // Construct the main output from the libraries and the registered holders.
-    MainFragment result = new MainFragment(
+    MainFragment result = MainFragment(
         librariesMap.outputUnit,
         "", // The empty string is the name for the main output file.
         _buildInvokeMain(),
@@ -299,7 +299,7 @@
   }
 
   DeferredFragment _buildDeferredFragment(LibrariesMap librariesMap) {
-    DeferredFragment result = new DeferredFragment(
+    DeferredFragment result = DeferredFragment(
         librariesMap.outputUnit,
         deferredPartFileName(_options, librariesMap.name, addExtension: false),
         librariesMap.name,
@@ -314,7 +314,7 @@
   List<Constant> _buildConstants(LibrariesMap librariesMap) {
     List<ConstantValue> constantValues =
         collector.outputConstantLists[librariesMap.outputUnit];
-    if (constantValues == null) return const <Constant>[];
+    if (constantValues == null) return const [];
     return constantValues
         .map((ConstantValue value) => _constants[value])
         .toList(growable: false);
@@ -323,7 +323,7 @@
   List<StaticField> _buildStaticNonFinalFields(LibrariesMap librariesMap) {
     List<FieldEntity> staticNonFinalFields =
         collector.outputStaticNonFinalFieldLists[librariesMap.outputUnit];
-    if (staticNonFinalFields == null) return const <StaticField>[];
+    if (staticNonFinalFields == null) return const [];
 
     return staticNonFinalFields.map(_buildStaticField).toList(growable: false);
   }
@@ -344,7 +344,7 @@
     // building a static field. (Note that the static-state holder was
     // already registered earlier, and that we just call the register to get
     // the holder-instance.
-    return new StaticField(element, name, null, code,
+    return StaticField(element, name, null, code,
         isFinal: false,
         isLazy: false,
         isInitializedByConstant: initialValue != null,
@@ -375,15 +375,14 @@
     // building a static field. (Note that the static-state holder was
     // already registered earlier, and that we just call the register to get
     // the holder-instance.
-    return new StaticField(element, name, getterName, code,
+    return StaticField(element, name, getterName, code,
         isFinal: !element.isAssignable,
         isLazy: true,
         usesNonNullableInitialization: element.library.isNonNullableByDefault);
   }
 
   List<Library> _buildLibraries(LibrariesMap librariesMap) {
-    List<Library> libraries =
-        new List<Library>.filled(librariesMap.length, null);
+    List<Library> libraries = List<Library>.filled(librariesMap.length, null);
     int count = 0;
     librariesMap.forEach((LibraryEntity library, List<ClassEntity> classes,
         List<MemberEntity> members, List<ClassEntity> classTypeElements) {
@@ -399,7 +398,7 @@
       // TODO(jacobr): register toString as used so that it is always accessible
       // from JavaScript.
       _classes[_commonElements.objectClass].callStubs.add(_buildStubMethod(
-          new StringBackedName("toString"),
+          StringBackedName("toString"),
           js.js('function() { return this.#(this) }', toStringInvocation)));
     }
 
@@ -491,7 +490,7 @@
                   var stubName = _namer.invocationName(selector);
                   if (!stubNames.add(stubName.key)) continue;
                   var parameters =
-                      new List<String>.generate(argumentCount, (i) => 'p$i');
+                      List<String>.generate(argumentCount, (i) => 'p$i');
 
                   // We intentionally generate the same stub method for direct
                   // calls and call-throughs of getters so that calling a
@@ -573,10 +572,10 @@
     List<Method> methods = [];
     List<StubMethod> callStubs = [];
 
-    ClassStubGenerator classStubGenerator = new ClassStubGenerator(
+    ClassStubGenerator classStubGenerator = ClassStubGenerator(
         _task.emitter, _commonElements, _namer, _codegenWorld, _closedWorld,
         enableMinification: _options.enableMinification);
-    RuntimeTypeGenerator runtimeTypeGenerator = new RuntimeTypeGenerator(
+    RuntimeTypeGenerator runtimeTypeGenerator = RuntimeTypeGenerator(
         _commonElements, _outputUnitData, _task, _namer, _rtiChecks);
 
     void visitInstanceMember(MemberEntity member) {
@@ -605,7 +604,7 @@
       }
     }
 
-    List<StubMethod> noSuchMethodStubs = <StubMethod>[];
+    List<StubMethod> noSuchMethodStubs = [];
 
     if (_backendUsage.isNoSuchMethodUsed &&
         cls == _commonElements.objectClass) {
@@ -636,7 +635,7 @@
     bool isMixinApplicationWithMembers = false;
     if (!onlyForConstructorOrRti) {
       if (_elementEnvironment.isMixinApplicationWithMembers(cls)) {
-        List<MemberEntity> members = <MemberEntity>[];
+        List<MemberEntity> members = [];
         void add(MemberEntity member) {
           if (member.enclosingClass == cls) {
             members.add(member);
@@ -651,7 +650,7 @@
           _sorter.sortMembers(members).forEach(visitMember);
         }
       } else if (!_elementEnvironment.isMixinApplication(cls)) {
-        List<MemberEntity> members = <MemberEntity>[];
+        List<MemberEntity> members = [];
         _elementEnvironment.forEachLocalClassMember(cls, members.add);
         _elementEnvironment.forEachInjectedClassMember(cls, members.add);
         _elementEnvironment.forEachConstructorBody(cls, members.add);
@@ -677,8 +676,8 @@
         cls, _generatedCode,
         storeFunctionTypeInMetadata: _storeFunctionTypesInMetadata);
 
-    List<StubMethod> checkedSetters = <StubMethod>[];
-    List<StubMethod> isChecks = <StubMethod>[];
+    List<StubMethod> checkedSetters = [];
+    List<StubMethod> isChecks = [];
     if (_nativeData.isJsInteropClass(cls)) {
       // TODO(johnniwinther): Instead of generating all stubs for each
       // js-interop class we should generate a stub for each implemented class.
@@ -794,7 +793,7 @@
     var /* Map | List */ optionalParameterDefaultValues;
     ParameterStructure parameterStructure = method.parameterStructure;
     if (parameterStructure.namedParameters.isNotEmpty) {
-      optionalParameterDefaultValues = new Map<String, ConstantValue>();
+      optionalParameterDefaultValues = Map<String, ConstantValue>();
       _elementEnvironment.forEachParameter(method,
           (DartType type, String name, ConstantValue defaultValue) {
         if (parameterStructure.namedParameters.contains(name)) {
@@ -874,8 +873,7 @@
 
     js.Name callName = null;
     if (canTearOff) {
-      Selector callSelector =
-          new Selector.fromElement(element).toCallSelector();
+      Selector callSelector = Selector.fromElement(element).toCallSelector();
       callName = _namer.invocationName(callSelector);
     }
 
@@ -900,7 +898,7 @@
       }
     }
 
-    return new InstanceMethod(element, name, code,
+    return InstanceMethod(element, name, code,
         _generateParameterStubs(element, canTearOff, canBeApplied), callName,
         needsTearOff: canTearOff,
         tearOffName: tearOffName,
@@ -950,7 +948,7 @@
 
   List<ParameterStubMethod> _generateParameterStubs(
       FunctionEntity element, bool canTearOff, bool canBeApplied) {
-    if (!_methodNeedsStubs(element)) return const <ParameterStubMethod>[];
+    if (!_methodNeedsStubs(element)) return const [];
 
     ParameterStubGenerator generator = ParameterStubGenerator(
         _task.emitter,
@@ -966,7 +964,7 @@
   }
 
   List<StubMethod> _generateInstantiationStubs(ClassEntity instantiationClass) {
-    InstantiationStubGenerator generator = new InstantiationStubGenerator(
+    InstantiationStubGenerator generator = InstantiationStubGenerator(
         _task, _namer, _closedWorld, _codegenWorld, _sourceInformationStrategy);
     return generator.generateStubs(instantiationClass, null);
   }
@@ -977,7 +975,7 @@
   /// attribution.
   Method _buildStubMethod(js.Name name, js.Expression code,
       {MemberEntity element}) {
-    return new StubMethod(name, code, element: element);
+    return StubMethod(name, code, element: element);
   }
 
   // The getInterceptor methods directly access the prototype of classes.
@@ -995,7 +993,7 @@
   }
 
   Iterable<StaticStubMethod> _generateGetInterceptorMethods() {
-    InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
+    InterceptorStubGenerator stubGenerator = InterceptorStubGenerator(
         _commonElements,
         _task.emitter,
         _nativeCodegenEnqueuer,
@@ -1021,14 +1019,13 @@
       SpecializedGetInterceptor interceptor = interceptorMap[name];
       js.Expression code =
           stubGenerator.generateGetInterceptorMethod(interceptor);
-      return new StaticStubMethod(
-          _commonElements.interceptorsLibrary, name, code);
+      return StaticStubMethod(_commonElements.interceptorsLibrary, name, code);
     });
   }
 
   List<Field> _buildFields(
-      {bool isHolderInterceptedClass: false, ClassEntity cls}) {
-    List<Field> fields = <Field>[];
+      {bool isHolderInterceptedClass = false, ClassEntity cls}) {
+    List<Field> fields = [];
 
     void visitField(FieldEntity field, js.Name name, bool needsGetter,
         bool needsSetter, bool needsCheckedSetter) {
@@ -1091,7 +1088,7 @@
   }
 
   Iterable<StaticStubMethod> _generateOneShotInterceptors() {
-    InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
+    InterceptorStubGenerator stubGenerator = InterceptorStubGenerator(
         _commonElements,
         _task.emitter,
         _nativeCodegenEnqueuer,
@@ -1118,8 +1115,7 @@
       OneShotInterceptor interceptor = interceptorMap[name];
       js.Expression code =
           stubGenerator.generateOneShotInterceptor(interceptor);
-      return new StaticStubMethod(
-          _commonElements.interceptorsLibrary, name, code);
+      return StaticStubMethod(_commonElements.interceptorsLibrary, name, code);
     });
   }
 
@@ -1139,8 +1135,7 @@
 
     js.Name callName = null;
     if (needsTearOff) {
-      Selector callSelector =
-          new Selector.fromElement(element).toCallSelector();
+      Selector callSelector = Selector.fromElement(element).toCallSelector();
       callName = _namer.invocationName(callSelector);
     }
     js.Expression functionType;
@@ -1163,7 +1158,7 @@
       }
     }
 
-    return new StaticDartMethod(element, name, code,
+    return StaticDartMethod(element, name, code,
         _generateParameterStubs(element, needsTearOff, canBeApplied), callName,
         needsTearOff: needsTearOff,
         tearOffName: tearOffName,
@@ -1182,7 +1177,7 @@
       _registry.registerConstant(outputUnit, constantValue);
       assert(!_constants.containsKey(constantValue));
       js.Name name = _namer.constantName(constantValue);
-      Constant constant = new Constant(name, constantValue);
+      Constant constant = Constant(name, constantValue);
       _constants[constantValue] = constant;
     }
   }
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 2e28a01..78e6cd2 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
@@ -20,8 +20,7 @@
 ///
 /// There exists exactly one instance per [OutputUnit].
 class LibrariesMap {
-  final Map<LibraryEntity, LibraryContents> _mapping =
-      <LibraryEntity, LibraryContents>{};
+  final Map<LibraryEntity, LibraryContents> _mapping = {};
 
   // It is very common to access the same library multiple times in a row, so
   // we cache the last access.
@@ -41,7 +40,7 @@
   LibraryContents _getMapping(LibraryEntity library) {
     if (_lastLibrary != library) {
       _lastLibrary = library;
-      _lastMapping = _mapping.putIfAbsent(library, () => new LibraryContents());
+      _lastMapping = _mapping.putIfAbsent(library, () => LibraryContents());
     }
     return _lastMapping;
   }
@@ -78,8 +77,7 @@
 class Registry {
   final OutputUnit _mainOutputUnit;
   final Sorter _sorter;
-  final Map<OutputUnit, LibrariesMap> _deferredLibrariesMap =
-      <OutputUnit, LibrariesMap>{};
+  final Map<OutputUnit, LibrariesMap> _deferredLibrariesMap = {};
 
   /// Cache for the last seen output unit.
   OutputUnit _lastOutputUnit;
@@ -111,12 +109,12 @@
   void registerOutputUnit(OutputUnit outputUnit) {
     if (outputUnit == _mainOutputUnit) {
       assert(mainLibrariesMap == null);
-      mainLibrariesMap = new LibrariesMap.main(_mainOutputUnit);
+      mainLibrariesMap = LibrariesMap.main(_mainOutputUnit);
     } else {
       assert(!_deferredLibrariesMap.containsKey(outputUnit));
       String name = outputUnit.name;
       _deferredLibrariesMap[outputUnit] =
-          new LibrariesMap.deferred(outputUnit, name);
+          LibrariesMap.deferred(outputUnit, name);
     }
   }
 
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 d8a9417..ca7d511 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -20,7 +20,8 @@
 import 'code_emitter_task.dart' show CodeEmitterTask;
 
 // Function signatures used in the generation of runtime type information.
-typedef void FunctionTypeSignatureEmitter(ClassFunctionType classFunctionType);
+typedef FunctionTypeSignatureEmitter = void Function(
+    ClassFunctionType classFunctionType);
 
 class TypeTest {
   final jsAst.Name name;
@@ -48,22 +49,22 @@
   /// The properties that must be installed on the prototype of the
   /// JS constructor of the [ClassEntity] for which the is checks were
   /// generated.
-  final Map<ClassEntity, TypeTests> _properties = <ClassEntity, TypeTests>{};
+  final Map<ClassEntity, TypeTests> _properties = {};
 
   void addIsTest(ClassEntity cls, jsAst.Name name, jsAst.Node expression) {
-    TypeTests typeTests = _properties.putIfAbsent(cls, () => new TypeTests());
-    typeTests.isTest = new TypeTest(name, expression);
+    TypeTests typeTests = _properties.putIfAbsent(cls, () => TypeTests());
+    typeTests.isTest = TypeTest(name, expression);
   }
 
   void addSubstitution(
       ClassEntity cls, jsAst.Name name, jsAst.Node expression) {
-    TypeTests typeTests = _properties.putIfAbsent(cls, () => new TypeTests());
-    typeTests.substitution = new TypeTest(name, expression);
+    TypeTests typeTests = _properties.putIfAbsent(cls, () => TypeTests());
+    typeTests.substitution = TypeTest(name, expression);
   }
 
   void addSignature(ClassEntity cls, jsAst.Name name, jsAst.Node expression) {
-    TypeTests typeTests = _properties.putIfAbsent(cls, () => new TypeTests());
-    typeTests.signature = new TypeTest(name, expression);
+    TypeTests typeTests = _properties.putIfAbsent(cls, () => TypeTests());
+    typeTests.signature = TypeTest(name, expression);
   }
 
   void forEachProperty(
@@ -91,8 +92,8 @@
 
   RuntimeTypeGenerator(CommonElements _commonElements, this._outputUnitData,
       this.emitterTask, this._namer, this._rtiChecks)
-      : _outputUnitVisitor = new _TypeContainedInOutputUnitVisitor(
-            _commonElements, _outputUnitData);
+      : _outputUnitVisitor =
+            _TypeContainedInOutputUnitVisitor(_commonElements, _outputUnitData);
 
   /// Generate "is tests" for [cls] itself, and the "is tests" for the
   /// classes it implements and type argument substitution functions for these
@@ -112,8 +113,8 @@
   /// type variables.
   TypeTestProperties generateIsTests(ClassEntity classElement,
       Map<MemberEntity, jsAst.Expression> generatedCode,
-      {bool storeFunctionTypeInMetadata: true}) {
-    TypeTestProperties result = new TypeTestProperties();
+      {bool storeFunctionTypeInMetadata = true}) {
+    TypeTestProperties result = TypeTestProperties();
 
     // TODO(johnniwinther): Include function signatures in [ClassChecks].
     void generateFunctionTypeSignature(ClassFunctionType classFunctionType) {
@@ -154,10 +155,8 @@
           if (isDeferred) {
             // The function type index must be offset by the number of types
             // already loaded.
-            encoding = new jsAst.Binary(
-                '+',
-                new jsAst.VariableUse(_namer.typesOffsetName),
-                functionTypeIndex);
+            encoding = jsAst.Binary('+',
+                jsAst.VariableUse(_namer.typesOffsetName), functionTypeIndex);
           } else {
             encoding = functionTypeIndex;
           }
@@ -188,7 +187,7 @@
       ClassEntity cls,
       FunctionTypeSignatureEmitter generateFunctionTypeSignature,
       void emitTypeCheck(TypeCheck check)) {
-    Setlet<ClassEntity> generated = new Setlet<ClassEntity>();
+    Setlet<ClassEntity> generated = Setlet();
 
     // Precomputed is checks.
     ClassChecks classChecks = _rtiChecks.requiredChecks[cls];
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index 841e2a1..1f60860 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -34,14 +34,14 @@
   js.PropertyAccess globalPropertyAccessForClass(ClassEntity element) {
     js.Name name = _namer.globalPropertyNameForClass(element);
     js.PropertyAccess pa =
-        new js.PropertyAccess(_namer.readGlobalObjectForClass(element), name);
+        js.PropertyAccess(_namer.readGlobalObjectForClass(element), name);
     return pa;
   }
 
   js.PropertyAccess globalPropertyAccessForMember(MemberEntity element) {
     js.Name name = _namer.globalPropertyNameForMember(element);
     js.PropertyAccess pa =
-        new js.PropertyAccess(_namer.readGlobalObjectForMember(element), name);
+        js.PropertyAccess(_namer.readGlobalObjectForMember(element), name);
     return pa;
   }
 
@@ -52,7 +52,7 @@
 
   @override
   js.Expression isolateLazyInitializerAccess(FieldEntity element) {
-    return new js.PropertyAccess(_namer.readGlobalObjectForMember(element),
+    return js.PropertyAccess(_namer.readGlobalObjectForMember(element),
         _namer.lazyInitializerName(element));
   }
 
@@ -84,8 +84,8 @@
 
   @override
   js.Expression staticClosureAccess(FunctionEntity element) {
-    return new js.Call(
-        new js.PropertyAccess(_namer.readGlobalObjectForMember(element),
+    return js.Call(
+        js.PropertyAccess(_namer.readGlobalObjectForMember(element),
             _namer.staticClosureName(element)),
         const []);
   }
@@ -103,7 +103,7 @@
 
   ModularEmitterImpl(
       ModularNamer namer, this._registry, CompilerOptions options)
-      : _constantEmitter = new ModularConstantEmitter(options, namer),
+      : _constantEmitter = ModularConstantEmitter(options, namer),
         super(namer);
 
   @override
@@ -116,16 +116,15 @@
     if (expression != null) {
       return expression;
     }
-    expression =
-        new ModularExpression(ModularExpressionKind.constant, constant);
+    expression = ModularExpression(ModularExpressionKind.constant, constant);
     _registry.registerModularExpression(expression);
     return expression;
   }
 
   @override
   js.Expression generateEmbeddedGlobalAccess(String global) {
-    js.Expression expression = new ModularExpression(
-        ModularExpressionKind.embeddedGlobalAccess, global);
+    js.Expression expression =
+        ModularExpression(ModularExpressionKind.embeddedGlobalAccess, global);
     _registry.registerModularExpression(expression);
     return expression;
   }
@@ -167,7 +166,7 @@
       this._task,
       bool shouldGenerateSourceMap)
       : super(namer) {
-    _emitter = new ModelEmitter(
+    _emitter = ModelEmitter(
         options,
         _reporter,
         outputProvider,
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 66717cc..3f0ddf0 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
@@ -52,8 +52,9 @@
     to[key] = from[key];
   }
 }
+
 // Copies the own properties from [from] to [to] if not already present in [to].
-function mixinProperties(from, to) {
+function mixinPropertiesHard(from, to) {
   var keys = Object.keys(from);
   for (var i = 0; i < keys.length; i++) {
     var key = keys[i];
@@ -62,6 +63,15 @@
     }
   }
 }
+// Copies the own properties from [from] to [to] (specialized version of
+// `mixinPropertiesHard` when it is known the properties are disjoint).
+function mixinPropertiesEasy(from, to) {
+  if (#legacyJavaScript) {
+    copyProperties(from, to);
+  } else {
+    Object.assign(to, from);
+  }
+}
 
 // Only use direct proto access to construct the prototype chain (instead of
 // copying properties) on platforms where we know it works well (Chrome / d8).
@@ -117,8 +127,12 @@
 }
 
 // Mixes in the properties of [mixin] into [cls].
-function mixin(cls, mixin) {
-  mixinProperties(mixin.prototype, cls.prototype);
+function mixinEasy(cls, mixin) {
+  mixinPropertiesEasy(mixin.prototype, cls.prototype);
+  cls.prototype.constructor = cls;
+}
+function mixinHard(cls, mixin) {
+  mixinPropertiesHard(mixin.prototype, cls.prototype);
   cls.prototype.constructor = cls;
 }
 
@@ -374,7 +388,8 @@
   return {
     inherit: inherit,
     inheritMany: inheritMany,
-    mixin: mixin,
+    mixin: mixinEasy,
+    mixinHard: mixinHard,
     installStaticTearOff: installStaticTearOff,
     installInstanceTearOff: installInstanceTearOff,
 
@@ -585,7 +600,7 @@
   final CodegenWorld _codegenWorld;
   RecipeEncoder _recipeEncoder;
   RulesetEncoder _rulesetEncoder;
-  DeferredHolderExpressionFinalizer _holderFinalizer;
+  final DeferredHolderExpressionFinalizer _holderFinalizer;
 
   ClassHierarchy get _classHierarchy => _closedWorld.classHierarchy;
   CommonElements get _commonElements => _closedWorld.commonElements;
@@ -719,7 +734,7 @@
       'throwLateFieldADI': _emitter
           .staticFunctionAccess(_closedWorld.commonElements.throwLateFieldADI),
       'operatorIsPrefix': js.string(_namer.fixedNames.operatorIsPrefix),
-      'tearOffCode': new js.Block(
+      'tearOffCode': js.Block(
           buildTearOffCode(_options, _emitter, _closedWorld.commonElements)),
       'embeddedTypes': generateEmbeddedGlobalAccess(TYPES),
       'embeddedInterceptorTags':
@@ -772,12 +787,14 @@
       'nativeSupport': emitNativeSupport(fragment),
       'jsInteropSupport': jsInteropAnalysis.buildJsInteropBootstrap(
               _codegenWorld, _closedWorld.nativeData, _namer) ??
-          new js.EmptyStatement(),
+          js.EmptyStatement(),
       'invokeMain': fragment.invokeMain,
 
       'call0selector': js.quoteName(call0Name),
       'call1selector': js.quoteName(call1Name),
-      'call2selector': js.quoteName(call2Name)
+      'call2selector': js.quoteName(call2Name),
+
+      'legacyJavaScript': _options.features.legacyJavaScript.isEnabled,
     });
     // We assume emitMainFragment will be the last piece of code we emit.
     finalizeCode(mainResourceName, mainCode, holderCode, finalizeHolders: true);
@@ -808,7 +825,7 @@
         holderCode);
     js.Expression code = js.js(_deferredBoilerplate, {
       // TODO(floitsch): don't just reference 'init'.
-      'embeddedGlobalsObject': new js.Parameter('init'),
+      'embeddedGlobalsObject': js.Parameter('init'),
       'staticState': DeferredHolderParameter(),
       'updateHolders': updateHolders,
       'prototypes': fragment.classPrototypes,
@@ -850,7 +867,7 @@
   /// Finalizing holders must be the last step of the emitter.
   void finalizeCode(String resourceName, js.Node code,
       Map<Entity, List<js.Property>> holderCode,
-      {bool finalizeHolders: false}) {
+      {bool finalizeHolders = false}) {
     StringReferenceFinalizer stringFinalizer =
         StringReferenceFinalizerImpl(_options.enableMinification);
     addCodeToFinalizer(stringFinalizer.addCode, code, holderCode);
@@ -904,7 +921,7 @@
       }
       for (Class cls in library.classes) {
         js.Expression constructor = emitConstructor(cls);
-        var property = new js.Property(js.quoteName(cls.name), constructor);
+        var property = js.Property(js.quoteName(cls.name), constructor);
         (holderCode[cls.element] ??= []).add(property);
         registerEntityAst(cls.element, property, library: library.element);
       }
@@ -961,7 +978,7 @@
       // Parameters are named t0, t1, etc, so '_' will not conflict. Forcing '_'
       // in minified mode works because no parameter or local also minifies to
       // '_' (the minifier doesn't know '_' is available).
-      js.Name underscore = new StringBackedName('_');
+      js.Name underscore = StringBackedName('_');
       statements.add(js.js.statement('var # = this;', underscore));
       thisRef = underscore;
     } else {
@@ -1000,7 +1017,7 @@
         previousConstant = constant;
       } else {
         flushAssignment();
-        js.Parameter parameter = new js.Parameter('t${parameters.length}');
+        js.Parameter parameter = js.Parameter('t${parameters.length}');
         parameters.add(parameter);
         statements.add(
             js.js.statement('#.# = #', [thisRef, field.name, parameter.name]));
@@ -1009,7 +1026,7 @@
     flushAssignment();
 
     if (cls.hasRtiField) {
-      js.Parameter parameter = new js.Parameter('t${parameters.length}');
+      js.Parameter parameter = js.Parameter('t${parameters.length}');
       parameters.add(parameter);
       statements.add(js.js.statement(
           '#.# = #', [thisRef, _namer.rtiFieldJsName, parameter.name]));
@@ -1044,7 +1061,7 @@
       return proto;
     }).toList(growable: false);
 
-    return new js.Block(assignments);
+    return js.Block(assignments);
   }
 
   /// Emits the prototype of the given class [cls].
@@ -1125,7 +1142,7 @@
           js.string(_namer.fixedNames.defaultValuesField), js.LiteralNull()));
     }
 
-    return new js.ObjectInitializer(properties);
+    return js.ObjectInitializer(properties);
   }
 
   /// Emits the given instance [method].
@@ -1201,7 +1218,7 @@
         collect(superclass);
       }
 
-      subclasses.putIfAbsent(superclass, () => <Class>[]).add(cls);
+      subclasses.putIfAbsent(superclass, () => []).add(cls);
 
       seen.add(cls);
     }
@@ -1211,7 +1228,9 @@
         collect(cls);
         if (cls.mixinClass != null) {
           js.Statement statement = js.js.statement('#(#, #)', [
-            locals.find('_mixin', 'hunkHelpers.mixin'),
+            _hasSimpleMixin(cls)
+                ? locals.find('_mixin', 'hunkHelpers.mixin')
+                : locals.find('_mixinHard', 'hunkHelpers.mixinHard'),
             classReference(cls),
             classReference(cls.mixinClass),
           ]);
@@ -1223,9 +1242,8 @@
 
     for (Class superclass in subclasses.keys) {
       List<Class> list = subclasses[superclass];
-      js.Expression superclassReference = (superclass == null)
-          ? new js.LiteralNull()
-          : classReference(superclass);
+      js.Expression superclassReference =
+          (superclass == null) ? js.LiteralNull() : classReference(superclass);
       if (list.length == 1) {
         Class cls = list.single;
         var statement = js.js.statement('#(#, #)', [
@@ -1265,6 +1283,30 @@
     return wrapPhase('inheritance', statements);
   }
 
+  /// Determines if the mixin methods can be applied to a mixin application
+  /// class by a simple copy, or whether the class defines properties that would
+  /// be clobbered by block-copying the mixin's properties, so a slower checking
+  /// copy is needed.
+  bool _hasSimpleMixin(Class cls) {
+    List<Method> allMethods(Class cls) {
+      return [
+        ...cls.methods,
+        ...cls.checkedSetters,
+        ...cls.isChecks,
+        ...cls.callStubs,
+        ...cls.noSuchMethodStubs,
+        ...cls.gettersSetters
+      ];
+    }
+
+    final clsMethods = allMethods(cls);
+    if (clsMethods.isEmpty) return true;
+    // TODO(sra): Compare methods with those of `cls.mixinClass` to see if the
+    // methods (and hence properties) will actually clash. If they are
+    // non-overlapping, a simple copy might still be possible.
+    return false;
+  }
+
   /// Emits the setup of method aliases.
   ///
   /// This step consists of simply copying JavaScript functions to their
@@ -1305,12 +1347,12 @@
     if (method.optionalParameterDefaultValues is List) {
       List<ConstantValue> defaultValues = method.optionalParameterDefaultValues;
       if (defaultValues.isEmpty) {
-        return new js.LiteralNull();
+        return js.LiteralNull();
       }
       Iterable<js.Expression> elements =
           defaultValues.map(generateConstantReference);
-      return js.js('function() { return #; }',
-          new js.ArrayInitializer(elements.toList()));
+      return js.js(
+          'function() { return #; }', js.ArrayInitializer(elements.toList()));
     } else {
       Map<String, ConstantValue> defaultValues =
           method.optionalParameterDefaultValues;
@@ -1323,10 +1365,10 @@
       for (String name in names) {
         ConstantValue value = defaultValues[name];
         properties.add(
-            new js.Property(js.string(name), generateConstantReference(value)));
+            js.Property(js.string(name), generateConstantReference(value)));
       }
       return js.js(
-          'function() { return #; }', new js.ObjectInitializer(properties));
+          'function() { return #; }', js.ObjectInitializer(properties));
     }
   }
 
@@ -1334,7 +1376,7 @@
   /// profiles.
   // TODO(sra): Should this be conditional?
   js.Statement wrapPhase(String name, List<js.Statement> statements) {
-    js.Block block = new js.Block(statements);
+    js.Block block = js.Block(statements);
     if (statements.isEmpty) return block;
     return js.js.statement('(function #(){#})();', [name, block]);
   }
@@ -1668,21 +1710,20 @@
       DeferredLoadingState deferredLoadingState) {
     List<js.Property> globals = [];
 
-    globals.add(new js.Property(
+    globals.add(js.Property(
         js.string(DEFERRED_INITIALIZED), js.js("Object.create(null)")));
 
     String deferredGlobal = ModelEmitter.deferredInitializersGlobal;
     js.Expression isHunkLoadedFunction =
         js.js("function(hash) { return !!$deferredGlobal[hash]; }");
-    globals
-        .add(new js.Property(js.string(IS_HUNK_LOADED), isHunkLoadedFunction));
+    globals.add(js.Property(js.string(IS_HUNK_LOADED), isHunkLoadedFunction));
 
     js.Expression isHunkInitializedFunction = js.js(
         "function(hash) { return !!#deferredInitialized[hash]; }", {
       'deferredInitialized': generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
     });
-    globals.add(new js.Property(
-        js.string(IS_HUNK_INITIALIZED), isHunkInitializedFunction));
+    globals.add(
+        js.Property(js.string(IS_HUNK_INITIALIZED), isHunkInitializedFunction));
 
     /// See [finalizeDeferredLoadingData] for the format of the deferred hunk.
     js.Expression initializeLoadedHunkFunction = js.js("""
@@ -1698,14 +1739,14 @@
       'deferredInitialized': generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
     });
 
-    globals.add(new js.Property(
+    globals.add(js.Property(
         js.string(INITIALIZE_LOADED_HUNK), initializeLoadedHunkFunction));
 
-    globals.add(new js.Property(js.string(DEFERRED_LIBRARY_PARTS),
+    globals.add(js.Property(js.string(DEFERRED_LIBRARY_PARTS),
         deferredLoadingState.deferredLibraryParts));
-    globals.add(new js.Property(
+    globals.add(js.Property(
         js.string(DEFERRED_PART_URIS), deferredLoadingState.deferredPartUris));
-    globals.add(new js.Property(js.string(DEFERRED_PART_HASHES),
+    globals.add(js.Property(js.string(DEFERRED_PART_HASHES),
         deferredLoadingState.deferredPartHashes));
 
     return globals;
@@ -1783,12 +1824,12 @@
     ];
     // TODO(floitsch): this should probably be on a per-fragment basis.
     nativeClassesNeedingUnmangledName.forEach((element) {
-      names.add(new js.Property(
+      names.add(js.Property(
           js.quoteName(_namer.className(element)), js.string(element.name)));
     });
 
-    return new js.Property(
-        js.string(MANGLED_GLOBAL_NAMES), new js.ObjectInitializer(names));
+    return js.Property(
+        js.string(MANGLED_GLOBAL_NAMES), js.ObjectInitializer(names));
   }
 
   /// Emits the [METADATA] embedded global.
@@ -1799,7 +1840,7 @@
     List<js.Property> metadataGlobals = [];
 
     js.Property createGlobal(js.Expression metadata, String global) {
-      return new js.Property(js.string(global), metadata);
+      return js.Property(js.string(global), metadata);
     }
 
     var mainUnit = program.mainFragment.outputUnit;
@@ -1837,8 +1878,8 @@
     // therefore unused in this emitter.
     // TODO(johnniwinther): Remove the need for adding an empty list of
     // mangled names.
-    globals.add(js.Property(
-        js.string(MANGLED_NAMES), js.ObjectInitializer(<js.Property>[])));
+    globals
+        .add(js.Property(js.string(MANGLED_NAMES), js.ObjectInitializer([])));
 
     globals.addAll(emitMetadata(program));
 
@@ -2045,13 +2086,13 @@
         if (cls.nativeLeafTags != null) {
           for (String tag in cls.nativeLeafTags) {
             interceptorsByTag[tag] = classReference(cls);
-            leafTags[tag] = new js.LiteralBool(true);
+            leafTags[tag] = js.LiteralBool(true);
           }
         }
         if (cls.nativeNonLeafTags != null) {
           for (String tag in cls.nativeNonLeafTags) {
             interceptorsByTag[tag] = classReference(cls);
-            leafTags[tag] = new js.LiteralBool(false);
+            leafTags[tag] = js.LiteralBool(false);
           }
           if (cls.nativeExtensions != null) {
             List<Class> subclasses = cls.nativeExtensions;
@@ -2110,9 +2151,9 @@
 }
 
 class DeferredLoadingState {
-  final deferredLibraryParts = new DeferredPrimaryExpression();
-  final deferredPartUris = new DeferredPrimaryExpression();
-  final deferredPartHashes = new DeferredPrimaryExpression();
+  final deferredLibraryParts = DeferredPrimaryExpression();
+  final deferredPartUris = DeferredPrimaryExpression();
+  final deferredPartHashes = DeferredPrimaryExpression();
 }
 
 class DeferredPrimaryExpression extends js.DeferredExpression {
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 9f05395..de9ddca 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -157,10 +157,10 @@
       this._sourceInformationStrategy,
       RecipeEncoder rtiRecipeEncoder,
       this._shouldGenerateSourceMap)
-      : _constantOrdering = new ConstantOrdering(_closedWorld.sorter),
+      : _constantOrdering = ConstantOrdering(_closedWorld.sorter),
         fragmentMerger = FragmentMerger(_options,
             _closedWorld.elementEnvironment, _closedWorld.outputUnitData) {
-    this.constantEmitter = new ConstantEmitter(
+    this.constantEmitter = ConstantEmitter(
         _options,
         _namer,
         _closedWorld.commonElements,
@@ -229,9 +229,9 @@
   int emitProgram(Program program, CodegenWorld codegenWorld) {
     MainFragment mainFragment = program.fragments.first;
     List<DeferredFragment> deferredFragments =
-        new List<DeferredFragment>.from(program.deferredFragments);
+        List<DeferredFragment>.from(program.deferredFragments);
 
-    FragmentEmitter fragmentEmitter = new FragmentEmitter(
+    FragmentEmitter fragmentEmitter = FragmentEmitter(
         _options,
         _dumpInfoTask,
         _namer,
@@ -305,12 +305,12 @@
         finalizedFragmentsToLoad);
 
     // Emit main Fragment.
-    var deferredLoadingState = new DeferredLoadingState();
+    var deferredLoadingState = DeferredLoadingState();
     js.Statement mainCode = fragmentEmitter.emitMainFragment(
         program, finalizedFragmentsToLoad, deferredLoadingState);
 
     // Count tokens and run finalizers.
-    js.TokenCounter counter = new js.TokenCounter();
+    js.TokenCounter counter = js.TokenCounter();
     for (var emittedFragments in deferredFragmentsCode.values) {
       for (var emittedFragment in emittedFragments) {
         counter.countTokens(emittedFragment.code);
@@ -362,7 +362,6 @@
     if (_options.laxRuntimeTypeToString) {
       flavor.write(', lax runtime type');
     }
-    if (_options.useContentSecurityPolicy) flavor.write(', CSP');
     var featureString = _options.features.flavorString();
     if (featureString.isNotEmpty) flavor.write(', $featureString');
     return js.Comment(generatedBy(_options, flavor: '$flavor'));
@@ -411,7 +410,7 @@
     if (_shouldGenerateSourceMap) {
       _task.measureSubtask('source-maps', () {
         locationCollector = LocationCollector();
-        codeOutputListeners = <CodeOutputListener>[locationCollector];
+        codeOutputListeners = [locationCollector];
       });
     }
 
@@ -481,7 +480,7 @@
     LocationCollector locationCollector;
     if (_shouldGenerateSourceMap) {
       _task.measureSubtask('source-maps', () {
-        locationCollector = new LocationCollector();
+        locationCollector = LocationCollector();
         outputListeners.add(locationCollector);
       });
     }
@@ -556,13 +555,13 @@
     //   deferredInitializer.current = <pretty-printed code>;
     //   deferredInitializer[<hash>] = deferredInitializer.current;
 
-    js.Program program = new js.Program([
+    js.Program program = js.Program([
       if (isFirst) buildGeneratedBy(),
       if (isFirst) buildDeferredInitializerGlobal(),
       js.js.statement('$deferredInitializersGlobal.current = #', code)
     ]);
 
-    Hasher hasher = new Hasher();
+    Hasher hasher = Hasher();
     CodeBuffer buffer = js.createCodeBuffer(
         program, _options, _sourceInformationStrategy,
         monitor: _dumpInfoTask, listeners: [hasher]);
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index 216f25e..f354388 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -55,19 +55,19 @@
     source.begin(tag);
     // TODO(johnniwinther): Support shared [ScopeInfo].
     Map<MemberEntity, ScopeInfo> scopeMap = source.readMemberMap(
-        (MemberEntity member) => new ScopeInfo.readFromDataSource(source));
-    Map<ir.TreeNode, CapturedScope> capturedScopesMap = source
-        .readTreeNodeMap(() => new CapturedScope.readFromDataSource(source));
+        (MemberEntity member) => ScopeInfo.readFromDataSource(source));
+    Map<ir.TreeNode, CapturedScope> capturedScopesMap =
+        source.readTreeNodeMap(() => CapturedScope.readFromDataSource(source));
     Map<MemberEntity, CapturedScope> capturedScopeForSignatureMap =
-        source.readMemberMap((MemberEntity member) =>
-            new CapturedScope.readFromDataSource(source));
+        source.readMemberMap(
+            (MemberEntity member) => CapturedScope.readFromDataSource(source));
     Map<ir.LocalFunction, ClosureRepresentationInfo>
         localClosureRepresentationMap = source.readTreeNodeMap(
-            () => new ClosureRepresentationInfo.readFromDataSource(source));
+            () => ClosureRepresentationInfo.readFromDataSource(source));
     Map<MemberEntity, MemberEntity> enclosingMembers =
         source.readMemberMap((member) => source.readMember());
     source.end(tag);
-    return new ClosureDataImpl(
+    return ClosureDataImpl(
         elementMap,
         scopeMap,
         capturedScopesMap,
@@ -174,16 +174,16 @@
   final AnnotationsData _annotationsData;
 
   /// Map of the scoping information that corresponds to a particular entity.
-  Map<MemberEntity, ScopeInfo> _scopeMap = {};
-  Map<ir.TreeNode, CapturedScope> _capturedScopesMap = {};
+  final Map<MemberEntity, ScopeInfo> _scopeMap = {};
+  final Map<ir.TreeNode, CapturedScope> _capturedScopesMap = {};
   // Indicates the type variables (if any) that are captured in a given
   // Signature function.
-  Map<MemberEntity, CapturedScope> _capturedScopeForSignatureMap = {};
+  final Map<MemberEntity, CapturedScope> _capturedScopeForSignatureMap = {};
 
-  Map<ir.LocalFunction, ClosureRepresentationInfo>
+  final Map<ir.LocalFunction, ClosureRepresentationInfo>
       _localClosureRepresentationMap = {};
 
-  Map<MemberEntity, MemberEntity> _enclosingMembers = {};
+  final Map<MemberEntity, MemberEntity> _enclosingMembers = {};
 
   ClosureDataBuilder(this._elementMap, this._annotationsData);
 
@@ -326,7 +326,7 @@
     closureModels.forEach((MemberEntity member, ClosureScopeModel model) {
       Map<ir.VariableDeclaration, JRecordField> allBoxedVariables =
           _elementMap.makeRecordContainer(model.scopeInfo, member);
-      _scopeMap[member] = new JsScopeInfo.from(
+      _scopeMap[member] = JsScopeInfo.from(
           allBoxedVariables, model.scopeInfo, member.enclosingClass);
 
       model.capturedScopesMap
@@ -336,10 +336,10 @@
         _updateScopeBasedOnRtiNeed(scope, rtiNeed, member);
 
         if (scope is KernelCapturedLoopScope) {
-          _capturedScopesMap[node] = new JsCapturedLoopScope.from(
+          _capturedScopesMap[node] = JsCapturedLoopScope.from(
               boxedVariables, scope, member.enclosingClass);
         } else {
-          _capturedScopesMap[node] = new JsCapturedScope.from(
+          _capturedScopesMap[node] = JsCapturedScope.from(
               boxedVariables, scope, member.enclosingClass);
         }
         allBoxedVariables.addAll(boxedVariables);
@@ -372,17 +372,17 @@
                 model.capturedScopesMap[functionNode];
             assert(capturedScope is! KernelCapturedLoopScope);
             KernelCapturedScope signatureCapturedScope =
-                new KernelCapturedScope.forSignature(capturedScope);
+                KernelCapturedScope.forSignature(capturedScope);
             _updateScopeBasedOnRtiNeed(signatureCapturedScope, rtiNeed, member);
             _capturedScopeForSignatureMap[closureClassInfo.signatureMethod] =
-                new JsCapturedScope.from(
+                JsCapturedScope.from(
                     {}, signatureCapturedScope, member.enclosingClass);
           }
         }
         callMethods.add(closureClassInfo.callMethod);
       }
     });
-    return new ClosureDataImpl(
+    return ClosureDataImpl(
         _elementMap,
         _scopeMap,
         _capturedScopesMap,
@@ -447,8 +447,7 @@
 
   JsScopeInfo.from(
       this._boxedVariables, KernelScopeInfo info, ClassEntity enclosingClass)
-      : this.thisLocal =
-            info.hasThisLocal ? new ThisLocal(enclosingClass) : null,
+      : this.thisLocal = info.hasThisLocal ? ThisLocal(enclosingClass) : null,
         this._localsUsedInTryOrSync = info.localsUsedInTryOrSync;
 
   void _ensureBoxedVariableCache(KernelToLocalsMap localsMap) {
@@ -489,7 +488,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('this=$thisLocal,');
     sb.write('localsUsedInTryOrSync={${_localsUsedInTryOrSync.join(', ')}}');
     return sb.toString();
@@ -560,7 +559,7 @@
             () => source.readMember());
     Local context = source.readLocalOrNull();
     source.end(tag);
-    return new JsCapturedScope.internal(
+    return JsCapturedScope.internal(
         localsUsedInTryOrSync, thisLocal, boxedVariables, context);
   }
 
@@ -614,7 +613,7 @@
     List<ir.VariableDeclaration> boxedLoopVariables =
         source.readTreeNodes<ir.VariableDeclaration>();
     source.end(tag);
-    return new JsCapturedLoopScope.internal(localsUsedInTryOrSync, thisLocal,
+    return JsCapturedLoopScope.internal(localsUsedInTryOrSync, thisLocal,
         boxedVariables, context, boxedLoopVariables);
   }
 
@@ -854,7 +853,7 @@
     JLibrary library = source.readLibrary();
     String name = source.readString();
     source.end(tag);
-    return new JClosureClass(library, name);
+    return JClosureClass(library, name);
   }
 
   @override
@@ -910,7 +909,7 @@
       : this.internal(
             containingClass.closureClassEntity.library,
             containingClass.closureClassEntity,
-            new Name(name, containingClass.closureClassEntity.library),
+            Name(name, containingClass.closureClassEntity.library),
             declaredName,
             isAssignable: isAssignable,
             isConst: isConst);
@@ -928,8 +927,8 @@
     bool isConst = source.readBool();
     bool isAssignable = source.readBool();
     source.end(tag);
-    return new JClosureField.internal(
-        cls.library, cls, new Name(name, cls.library), declaredName,
+    return JClosureField.internal(
+        cls.library, cls, Name(name, cls.library), declaredName,
         isAssignable: isAssignable, isConst: isConst);
   }
 
@@ -971,13 +970,12 @@
 
   factory RecordClassData.readFromDataSource(DataSource source) {
     source.begin(tag);
-    ClassDefinition definition = new ClassDefinition.readFromDataSource(source);
+    ClassDefinition definition = ClassDefinition.readFromDataSource(source);
     InterfaceType thisType = source.readDartType();
     InterfaceType supertype = source.readDartType();
-    OrderedTypeSet orderedTypeSet =
-        new OrderedTypeSet.readFromDataSource(source);
+    OrderedTypeSet orderedTypeSet = OrderedTypeSet.readFromDataSource(source);
     source.end(tag);
-    return new RecordClassData(definition, thisType, supertype, orderedTypeSet);
+    return RecordClassData(definition, thisType, supertype, orderedTypeSet);
   }
 
   @override
@@ -1036,7 +1034,7 @@
     JLibrary library = source.readLibrary();
     String name = source.readString();
     source.end(tag);
-    return new JRecord(library, name);
+    return JRecord(library, name);
   }
 
   @override
@@ -1067,7 +1065,7 @@
 
   JRecordField(String name, this.box, {bool isConst})
       : super(box.container.library, box.container,
-            new Name(name, box.container.library),
+            Name(name, box.container.library),
             isStatic: false, isAssignable: true, isConst: isConst);
 
   factory JRecordField.readFromDataSource(DataSource source) {
@@ -1076,8 +1074,7 @@
     JClass enclosingClass = source.readClass();
     bool isConst = source.readBool();
     source.end(tag);
-    return new JRecordField(name, new BoxLocal(enclosingClass),
-        isConst: isConst);
+    return JRecordField(name, BoxLocal(enclosingClass), isConst: isConst);
   }
 
   @override
@@ -1116,14 +1113,13 @@
 
   factory ClosureClassData.readFromDataSource(DataSource source) {
     source.begin(tag);
-    ClassDefinition definition = new ClassDefinition.readFromDataSource(source);
+    ClassDefinition definition = ClassDefinition.readFromDataSource(source);
     InterfaceType thisType = source.readDartType();
     InterfaceType supertype = source.readDartType();
-    OrderedTypeSet orderedTypeSet =
-        new OrderedTypeSet.readFromDataSource(source);
+    OrderedTypeSet orderedTypeSet = OrderedTypeSet.readFromDataSource(source);
     FunctionType callType = source.readDartType();
     source.end(tag);
-    return new ClosureClassData(definition, thisType, supertype, orderedTypeSet)
+    return ClosureClassData(definition, thisType, supertype, orderedTypeSet)
       ..callType = callType;
   }
 
@@ -1154,7 +1150,7 @@
     source.begin(tag);
     SourceSpan location = source.readSourceSpan();
     source.end(tag);
-    return new ClosureClassDefinition(location);
+    return ClosureClassDefinition(location);
   }
 
   @override
@@ -1170,7 +1166,7 @@
 
   @override
   ir.Node get node =>
-      throw new UnsupportedError('ClosureClassDefinition.node for $location');
+      throw UnsupportedError('ClosureClassDefinition.node for $location');
 
   @override
   String toString() => 'ClosureClassDefinition(kind:$kind,location:$location)';
@@ -1186,7 +1182,7 @@
   @override
   StaticTypeCache get staticTypes {
     // The cached types are stored in the data for enclosing member.
-    throw new UnsupportedError("ClosureMemberData.staticTypes");
+    throw UnsupportedError("ClosureMemberData.staticTypes");
   }
 
   @override
@@ -1221,14 +1217,14 @@
   factory ClosureFunctionData.readFromDataSource(DataSource source) {
     source.begin(tag);
     ClosureMemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+        MemberDefinition.readFromDataSource(source);
     InterfaceType memberThisType = source.readDartType(allowNull: true);
     FunctionType functionType = source.readDartType();
     ir.FunctionNode functionNode = source.readTreeNode();
     ClassTypeVariableAccess classTypeVariableAccess =
         source.readEnum(ClassTypeVariableAccess.values);
     source.end(tag);
-    return new ClosureFunctionData(definition, memberThisType, functionType,
+    return ClosureFunctionData(definition, memberThisType, functionType,
         functionNode, classTypeVariableAccess);
   }
 
@@ -1274,11 +1270,10 @@
 
   factory ClosureFieldData.readFromDataSource(DataSource source) {
     source.begin(tag);
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     InterfaceType memberThisType = source.readDartType(allowNull: true);
     source.end(tag);
-    return new ClosureFieldData(definition, memberThisType);
+    return ClosureFieldData(definition, memberThisType);
   }
 
   @override
@@ -1344,7 +1339,7 @@
     SourceSpan location = source.readSourceSpan();
     ir.TreeNode node = source.readTreeNode();
     source.end(tag);
-    return new ClosureMemberDefinition(location, kind, node);
+    return ClosureMemberDefinition(location, kind, node);
   }
 
   @override
@@ -1374,7 +1369,7 @@
     source.begin(tag);
     SourceSpan location = source.readSourceSpan();
     source.end(tag);
-    return new RecordContainerDefinition(location);
+    return RecordContainerDefinition(location);
   }
 
   @override
@@ -1389,8 +1384,8 @@
   ClassKind get kind => ClassKind.record;
 
   @override
-  ir.Node get node => throw new UnsupportedError(
-      'RecordContainerDefinition.node for $location');
+  ir.Node get node =>
+      throw UnsupportedError('RecordContainerDefinition.node for $location');
 
   @override
   String toString() =>
diff --git a/pkg/compiler/lib/src/js_model/element_map.dart b/pkg/compiler/lib/src/js_model/element_map.dart
index d63ee32..a7526f4 100644
--- a/pkg/compiler/lib/src/js_model/element_map.dart
+++ b/pkg/compiler/lib/src/js_model/element_map.dart
@@ -98,7 +98,7 @@
   //  constant expressions during resolution.
   ConstantValue getConstantValue(
       ir.Member memberContext, ir.Expression expression,
-      {bool requireConstant: true, bool implicitNull: false});
+      {bool requireConstant = true, bool implicitNull = false});
 
   /// Returns the [ConstantValue] for the sentinel used to indicate that a
   /// parameter is required.
@@ -342,17 +342,17 @@
     MemberKind kind = source.readEnum(MemberKind.values);
     switch (kind) {
       case MemberKind.regular:
-        return new RegularMemberDefinition.readFromDataSource(source);
+        return RegularMemberDefinition.readFromDataSource(source);
       case MemberKind.constructor:
       case MemberKind.constructorBody:
       case MemberKind.signature:
       case MemberKind.generatorBody:
-        return new SpecialMemberDefinition.readFromDataSource(source, kind);
+        return SpecialMemberDefinition.readFromDataSource(source, kind);
       case MemberKind.closureCall:
       case MemberKind.closureField:
-        return new ClosureMemberDefinition.readFromDataSource(source, kind);
+        return ClosureMemberDefinition.readFromDataSource(source, kind);
     }
-    throw new UnsupportedError("Unexpected MemberKind $kind");
+    throw UnsupportedError("Unexpected MemberKind $kind");
   }
 
   /// Serializes this [MemberDefinition] to [sink].
@@ -382,7 +382,7 @@
     source.begin(tag);
     ir.Member node = source.readMemberNode();
     source.end(tag);
-    return new RegularMemberDefinition(node);
+    return RegularMemberDefinition(node);
   }
 
   @override
@@ -422,7 +422,7 @@
     source.begin(tag);
     ir.TreeNode node = source.readTreeNode();
     source.end(tag);
-    return new SpecialMemberDefinition(node, kind);
+    return SpecialMemberDefinition(node, kind);
   }
 
   @override
@@ -458,13 +458,13 @@
     ClassKind kind = source.readEnum(ClassKind.values);
     switch (kind) {
       case ClassKind.regular:
-        return new RegularClassDefinition.readFromDataSource(source);
+        return RegularClassDefinition.readFromDataSource(source);
       case ClassKind.closure:
-        return new ClosureClassDefinition.readFromDataSource(source);
+        return ClosureClassDefinition.readFromDataSource(source);
       case ClassKind.record:
-        return new RecordContainerDefinition.readFromDataSource(source);
+        return RecordContainerDefinition.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unexpected ClassKind $kind");
+    throw UnsupportedError("Unexpected ClassKind $kind");
   }
 
   /// Serializes this [ClassDefinition] to [sink].
@@ -486,7 +486,7 @@
     source.begin(tag);
     ir.Class node = source.readClassNode();
     source.end(tag);
-    return new RegularClassDefinition(node);
+    return RegularClassDefinition(node);
   }
 
   @override
@@ -527,7 +527,7 @@
     ir.FunctionNode node,
     ParameterStructure parameterStructure,
     void f(ir.VariableDeclaration parameter, {bool isOptional, bool isElided}),
-    {bool useNativeOrdering: false}) {
+    {bool useNativeOrdering = false}) {
   for (int position = 0;
       position < node.positionalParameters.length;
       position++) {
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 22d4a61..e079b78 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -90,13 +90,13 @@
   JProgramEnv programEnv;
 
   final EntityDataEnvMap<IndexedLibrary, JLibraryData, JLibraryEnv> libraries =
-      new EntityDataEnvMap<IndexedLibrary, JLibraryData, JLibraryEnv>();
+      EntityDataEnvMap<IndexedLibrary, JLibraryData, JLibraryEnv>();
   final EntityDataEnvMap<IndexedClass, JClassData, JClassEnv> classes =
-      new EntityDataEnvMap<IndexedClass, JClassData, JClassEnv>();
+      EntityDataEnvMap<IndexedClass, JClassData, JClassEnv>();
   final EntityDataMap<IndexedMember, JMemberData> members =
-      new EntityDataMap<IndexedMember, JMemberData>();
+      EntityDataMap<IndexedMember, JMemberData>();
   final EntityDataMap<IndexedTypeVariable, JTypeVariableData> typeVariables =
-      new EntityDataMap<IndexedTypeVariable, JTypeVariableData>();
+      EntityDataMap<IndexedTypeVariable, JTypeVariableData>();
 
   final Map<ir.Library, IndexedLibrary> libraryMap = {};
   final Map<ir.Class, IndexedClass> classMap = {};
@@ -115,15 +115,15 @@
   final Map<ir.TreeNode, Local> localFunctionMap = {};
 
   /// Map from members to the call methods created for their nested closures.
-  Map<IndexedMember, List<IndexedFunction>> _nestedClosureMap = {};
+  final Map<IndexedMember, List<IndexedFunction>> _nestedClosureMap = {};
 
   /// NativeData is need for computation of the default super class and
   /// parameter ordering.
   NativeData nativeData;
 
-  Map<IndexedFunction, JGeneratorBody> _generatorBodies = {};
+  final Map<IndexedFunction, JGeneratorBody> _generatorBodies = {};
 
-  Map<IndexedClass, List<IndexedMember>> _injectedClassMembers = {};
+  final Map<IndexedClass, List<IndexedMember>> _injectedClassMembers = {};
 
   LateOutputUnitDataBuilder lateOutputUnitDataBuilder;
 
@@ -134,11 +134,11 @@
       Map<MemberEntity, MemberUsage> liveMemberUsage,
       AnnotationsData annotations)
       : this.options = _elementMap.options {
-    _elementEnvironment = new JsElementEnvironment(this);
-    _typeConverter = new DartTypeConverter(this);
-    _types = new KernelDartTypes(this, options);
-    _commonElements = new CommonElementsImpl(_types, _elementEnvironment);
-    _constantValuefier = new ConstantValuefier(this);
+    _elementEnvironment = JsElementEnvironment(this);
+    _typeConverter = DartTypeConverter(this);
+    _types = KernelDartTypes(this, options);
+    _commonElements = CommonElementsImpl(_types, _elementEnvironment);
+    _constantValuefier = ConstantValuefier(this);
 
     programEnv = _elementMap.env.convert();
     for (int libraryIndex = 0;
@@ -147,7 +147,7 @@
       IndexedLibrary oldLibrary = _elementMap.libraries.getEntity(libraryIndex);
       KLibraryEnv oldEnv = _elementMap.libraries.getEnv(oldLibrary);
       KLibraryData data = _elementMap.libraries.getData(oldLibrary);
-      IndexedLibrary newLibrary = new JLibrary(oldLibrary.name,
+      IndexedLibrary newLibrary = JLibrary(oldLibrary.name,
           oldLibrary.canonicalUri, oldLibrary.isNonNullableByDefault);
       JLibraryEnv newEnv = oldEnv.convert(_elementMap, liveMemberUsage);
       libraryMap[oldEnv.library] =
@@ -165,8 +165,8 @@
       KClassData data = _elementMap.classes.getData(oldClass);
       IndexedLibrary oldLibrary = oldClass.library;
       LibraryEntity newLibrary = libraries.getEntity(oldLibrary.libraryIndex);
-      IndexedClass newClass = new JClass(newLibrary, oldClass.name,
-          isAbstract: oldClass.isAbstract);
+      IndexedClass newClass =
+          JClass(newLibrary, oldClass.name, isAbstract: oldClass.isAbstract);
       JClassEnv newEnv = env.convert(_elementMap, liveMemberUsage);
       classMap[env.cls] = classes.register(newClass, data.convert(), newEnv);
       assert(newClass.classIndex == oldClass.classIndex);
@@ -189,11 +189,11 @@
       ClassEntity newClass =
           oldClass != null ? classes.getEntity(oldClass.classIndex) : null;
       IndexedMember newMember;
-      Name memberName = new Name(oldMember.memberName.text, newLibrary,
+      Name memberName = Name(oldMember.memberName.text, newLibrary,
           isSetter: oldMember.memberName.isSetter);
       if (oldMember.isField) {
         IndexedField field = oldMember;
-        newMember = new JField(newLibrary, newClass, memberName,
+        newMember = JField(newLibrary, newClass, memberName,
             isStatic: field.isStatic,
             isAssignable: field.isAssignable,
             isConst: field.isConst);
@@ -205,27 +205,27 @@
                 : memberUsage.invokedParameters;
         if (constructor.isFactoryConstructor) {
           // TODO(redemption): This should be a JFunction.
-          newMember = new JFactoryConstructor(
+          newMember = JFactoryConstructor(
               newClass, memberName, parameterStructure,
               isExternal: constructor.isExternal,
               isConst: constructor.isConst,
               isFromEnvironmentConstructor:
                   constructor.isFromEnvironmentConstructor);
         } else {
-          newMember = new JGenerativeConstructor(
+          newMember = JGenerativeConstructor(
               newClass, memberName, parameterStructure,
               isExternal: constructor.isExternal, isConst: constructor.isConst);
         }
       } else if (oldMember.isGetter) {
         IndexedFunction getter = oldMember;
-        newMember = new JGetter(
+        newMember = JGetter(
             newLibrary, newClass, memberName, getter.asyncMarker,
             isStatic: getter.isStatic,
             isExternal: getter.isExternal,
             isAbstract: getter.isAbstract);
       } else if (oldMember.isSetter) {
         IndexedFunction setter = oldMember;
-        newMember = new JSetter(newLibrary, newClass, memberName,
+        newMember = JSetter(newLibrary, newClass, memberName,
             isStatic: setter.isStatic,
             isExternal: setter.isExternal,
             isAbstract: setter.isAbstract);
@@ -235,7 +235,7 @@
             annotations.hasNoElision(function)
                 ? function.parameterStructure
                 : memberUsage.invokedParameters;
-        newMember = new JMethod(newLibrary, newClass, memberName,
+        newMember = JMethod(newLibrary, newClass, memberName,
             parameterStructure, function.asyncMarker,
             isStatic: function.isStatic,
             isExternal: function.isExternal,
@@ -294,14 +294,14 @@
 
   JsKernelToElementMap.readFromDataSource(this.options, this.reporter,
       this._environment, ir.Component component, DataSource source) {
-    _elementEnvironment = new JsElementEnvironment(this);
-    _typeConverter = new DartTypeConverter(this);
-    _types = new KernelDartTypes(this, options);
-    _commonElements = new CommonElementsImpl(_types, _elementEnvironment);
-    _constantValuefier = new ConstantValuefier(this);
+    _elementEnvironment = JsElementEnvironment(this);
+    _typeConverter = DartTypeConverter(this);
+    _types = KernelDartTypes(this, options);
+    _commonElements = CommonElementsImpl(_types, _elementEnvironment);
+    _constantValuefier = ConstantValuefier(this);
 
-    source.registerComponentLookup(new ComponentLookup(component));
-    _EntityLookup entityLookup = new _EntityLookup();
+    source.registerComponentLookup(ComponentLookup(component));
+    _EntityLookup entityLookup = _EntityLookup();
     source.registerEntityLookup(entityLookup);
 
     source.begin(tag);
@@ -309,7 +309,7 @@
     int libraryCount = source.readInt();
     for (int i = 0; i < libraryCount; i++) {
       int index = source.readInt();
-      JLibrary library = new JLibrary.readFromDataSource(source);
+      JLibrary library = JLibrary.readFromDataSource(source);
       entityLookup.registerLibrary(index, library);
     }
     source.end(libraryTag);
@@ -318,7 +318,7 @@
     int classCount = source.readInt();
     for (int i = 0; i < classCount; i++) {
       int index = source.readInt();
-      JClass cls = new JClass.readFromDataSource(source);
+      JClass cls = JClass.readFromDataSource(source);
       entityLookup.registerClass(index, cls);
     }
     source.end(classTag);
@@ -327,7 +327,7 @@
     int memberCount = source.readInt();
     for (int i = 0; i < memberCount; i++) {
       int index = source.readInt();
-      JMember member = new JMember.readFromDataSource(source);
+      JMember member = JMember.readFromDataSource(source);
       entityLookup.registerMember(index, member);
     }
     source.end(memberTag);
@@ -336,16 +336,16 @@
     int typeVariableCount = source.readInt();
     for (int i = 0; i < typeVariableCount; i++) {
       int index = source.readInt();
-      JTypeVariable typeVariable = new JTypeVariable.readFromDataSource(source);
+      JTypeVariable typeVariable = JTypeVariable.readFromDataSource(source);
       entityLookup.registerTypeVariable(index, typeVariable);
     }
     source.end(typeVariableTag);
 
-    programEnv = new JProgramEnv([component]);
+    programEnv = JProgramEnv([component]);
     source.begin(libraryDataTag);
     entityLookup.forEachLibrary((int index, JLibrary library) {
-      JLibraryEnv env = new JLibraryEnv.readFromDataSource(source);
-      JLibraryData data = new JLibraryData.readFromDataSource(source);
+      JLibraryEnv env = JLibraryEnv.readFromDataSource(source);
+      JLibraryData data = JLibraryData.readFromDataSource(source);
       libraryMap[env.library] =
           libraries.registerByIndex(index, library, data, env);
       programEnv.registerLibrary(env);
@@ -355,8 +355,8 @@
 
     source.begin(classDataTag);
     entityLookup.forEachClass((int index, JClass cls) {
-      JClassEnv env = new JClassEnv.readFromDataSource(source);
-      JClassData data = new JClassData.readFromDataSource(source);
+      JClassEnv env = JClassEnv.readFromDataSource(source);
+      JClassData data = JClassData.readFromDataSource(source);
       classMap[env.cls] = classes.registerByIndex(index, cls, data, env);
       if (cls is! JRecord && cls is! JClosureClass) {
         // Synthesized classes are not part of the library environment.
@@ -368,7 +368,7 @@
 
     source.begin(memberDataTag);
     entityLookup.forEachMember((int index, IndexedMember member) {
-      JMemberData data = new JMemberData.readFromDataSource(source);
+      JMemberData data = JMemberData.readFromDataSource(source);
       members.registerByIndex(index, member, data);
       switch (data.definition.kind) {
         case MemberKind.regular:
@@ -390,7 +390,7 @@
 
     source.begin(typeVariableDataTag);
     entityLookup.forEachTypeVariable((int index, JTypeVariable typeVariable) {
-      JTypeVariableData data = new JTypeVariableData.readFromDataSource(source);
+      JTypeVariableData data = JTypeVariableData.readFromDataSource(source);
       typeVariableMap[data.node] =
           typeVariables.registerByIndex(index, typeVariable, data);
       assert(index == typeVariable.typeVariableIndex);
@@ -564,7 +564,7 @@
   }
 
   MemberEntity lookupLibraryMember(IndexedLibrary library, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     assert(checkFamily(library));
     JLibraryEnv libraryEnv = libraries.getEnv(library);
     ir.Member member = libraryEnv.lookupMember(name, setter: setter);
@@ -601,7 +601,7 @@
   }
 
   MemberEntity lookupClassMember(IndexedClass cls, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     assert(checkFamily(cls));
     JClassEnv classEnv = classes.getEnv(cls);
     return classEnv.lookupMember(this, name, setter: setter);
@@ -657,14 +657,13 @@
       } else {
         data.thisType = types.interfaceType(
             cls,
-            new List<DartType>.generate(node.typeParameters.length,
-                (int index) {
+            List<DartType>.generate(node.typeParameters.length, (int index) {
               return types.typeVariableType(
                   getTypeVariableInternal(node.typeParameters[index]));
             }));
         data.rawType = types.interfaceType(
             cls,
-            new List<DartType>.filled(
+            List<DartType>.filled(
                 node.typeParameters.length, types.dynamicType()));
       }
     }
@@ -712,7 +711,7 @@
       ir.Class node = data.cls;
 
       if (node.supertype == null) {
-        data.orderedTypeSet = new OrderedTypeSet.singleton(data.thisType);
+        data.orderedTypeSet = OrderedTypeSet.singleton(data.thisType);
         data.isMixinApplication = false;
         data.interfaces = const <InterfaceType>[];
       } else {
@@ -721,7 +720,7 @@
         // This is necessary to support when a class implements the same
         // supertype in multiple non-conflicting ways, like implementing A<int*>
         // and A<int?> or B<Object?> and B<dynamic>.
-        Set<InterfaceType> canonicalSupertypes = <InterfaceType>{};
+        Set<InterfaceType> canonicalSupertypes = {};
 
         InterfaceType processSupertype(ir.Supertype supertypeNode) {
           supertypeNode = classHierarchy.getClassAsInstanceOf(
@@ -795,7 +794,7 @@
           interfaces.add(processSupertype(supertype));
         });
         OrderedTypeSetBuilder setBuilder =
-            new KernelOrderedTypeSetBuilder(this, cls);
+            KernelOrderedTypeSetBuilder(this, cls);
         data.orderedTypeSet =
             setBuilder.createOrderedTypeSet(canonicalSupertypes);
         data.interfaces = interfaces;
@@ -816,7 +815,7 @@
         return getMethodInternal(node);
       }
     }
-    throw new UnsupportedError("Unexpected member: $node");
+    throw UnsupportedError("Unexpected member: $node");
   }
 
   @override
@@ -882,7 +881,8 @@
 
     DartType getParameterType(ir.VariableDeclaration variable) {
       // isCovariant implies this FunctionNode is a class Procedure.
-      var isCovariant = variable.isCovariant || variable.isGenericCovariantImpl;
+      var isCovariant =
+          variable.isCovariantByDeclaration || variable.isCovariantByClass;
       var isFromNonNullableByDefaultLibrary = isCovariant &&
           (node.parent as ir.Procedure).enclosingLibrary.isNonNullableByDefault;
       return types.getTearOffParameterType(getDartType(variable.type),
@@ -898,7 +898,7 @@
     }
     var namedParameters = <String>[];
     var requiredNamedParameters = <String>{};
-    List<DartType> namedParameterTypes = <DartType>[];
+    List<DartType> namedParameterTypes = [];
     List<ir.VariableDeclaration> sortedNamedParameters =
         node.namedParameters.toList()..sort((a, b) => a.name.compareTo(b.name));
     for (ir.VariableDeclaration variable in sortedNamedParameters) {
@@ -912,10 +912,10 @@
     if (node.typeParameters.isNotEmpty) {
       List<DartType> typeParameters = <DartType>[];
       for (ir.TypeParameter typeParameter in node.typeParameters) {
-        typeParameters.add(getDartType(new ir.TypeParameterType(
-            typeParameter, ir.Nullability.nonNullable)));
+        typeParameters.add(getDartType(
+            ir.TypeParameterType(typeParameter, ir.Nullability.nonNullable)));
       }
-      typeVariables = new List<FunctionTypeVariable>.generate(
+      typeVariables = List<FunctionTypeVariable>.generate(
           node.typeParameters.length,
           (int index) => types.functionTypeVariable(index));
 
@@ -1160,11 +1160,11 @@
 
   ir.StaticTypeContext getStaticTypeContext(ir.Member node) {
     // TODO(johnniwinther): Cache the static type context.
-    return new ir.StaticTypeContext(node, typeEnvironment);
+    return ir.StaticTypeContext(node, typeEnvironment);
   }
 
   Dart2jsConstantEvaluator get constantEvaluator {
-    return _constantEvaluator ??= new Dart2jsConstantEvaluator(typeEnvironment,
+    return _constantEvaluator ??= Dart2jsConstantEvaluator(typeEnvironment,
         (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
       reportLocatedMessage(reporter, message, context);
     },
@@ -1213,7 +1213,7 @@
             // Closure field may use class nodes or type parameter nodes as
             // the definition node.
             staticTypeContext =
-                new ir.StaticTypeContext.forAnnotations(node, typeEnvironment);
+                ir.StaticTypeContext.forAnnotations(node, typeEnvironment);
           }
           node = node.parent;
         }
@@ -1221,22 +1221,20 @@
     }
     assert(cachedStaticTypes != null, "No static types cached for $member.");
     assert(staticTypeContext != null, "No static types context for $member.");
-    return new CachedStaticType(staticTypeContext, cachedStaticTypes,
-        new ThisInterfaceType.from(staticTypeContext.thisType));
+    return CachedStaticType(staticTypeContext, cachedStaticTypes,
+        ThisInterfaceType.from(staticTypeContext.thisType));
   }
 
   @override
   Name getName(ir.Name name) {
-    return new Name(
-        name.text, name.isPrivate ? getLibrary(name.library) : null);
+    return Name(name.text, name.isPrivate ? getLibrary(name.library) : null);
   }
 
   @override
   CallStructure getCallStructure(ir.Arguments arguments) {
     int argumentCount = arguments.positional.length + arguments.named.length;
     List<String> namedArguments = arguments.named.map((e) => e.name).toList();
-    return new CallStructure(
-        argumentCount, namedArguments, arguments.types.length);
+    return CallStructure(argumentCount, namedArguments, arguments.types.length);
   }
 
   @override
@@ -1291,25 +1289,25 @@
     }
 
     CallStructure callStructure = getCallStructure(invocation.arguments);
-    return new Selector(kind, name, callStructure);
+    return Selector(kind, name, callStructure);
   }
 
   Selector getGetterSelector(ir.Name irName) {
-    Name name = new Name(
-        irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
-    return new Selector.getter(name);
+    Name name =
+        Name(irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
+    return Selector.getter(name);
   }
 
   Selector getSetterSelector(ir.Name irName) {
-    Name name = new Name(
-        irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
-    return new Selector.setter(name);
+    Name name =
+        Name(irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
+    return Selector.setter(name);
   }
 
   /// Looks up [typeName] for use in the spec-string of a `JS` call.
   // TODO(johnniwinther): Use this in [native.NativeBehavior] instead of calling
   // the `ForeignResolver`.
-  TypeLookup typeLookup({bool resolveAsRaw: true}) {
+  TypeLookup typeLookup({bool resolveAsRaw = true}) {
     return resolveAsRaw
         ? (_cachedTypeLookupRaw ??= _typeLookup(resolveAsRaw: true))
         : (_cachedTypeLookupFull ??= _typeLookup(resolveAsRaw: false));
@@ -1318,7 +1316,7 @@
   TypeLookup _cachedTypeLookupRaw;
   TypeLookup _cachedTypeLookupFull;
 
-  TypeLookup _typeLookup({bool resolveAsRaw: true}) {
+  TypeLookup _typeLookup({bool resolveAsRaw = true}) {
     bool cachedMayLookupInMain;
 
     DartType lookup(String typeName, {bool required}) {
@@ -1377,7 +1375,7 @@
   }
 
   String _getStringArgument(ir.StaticInvocation node, int index) {
-    return node.arguments.positional[index].accept(new Stringifier());
+    return node.arguments.positional[index].accept(Stringifier());
   }
 
   // TODO(johnniwinther): Cache this for later use.
@@ -1387,20 +1385,20 @@
         node.arguments.named.isNotEmpty) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
 
     String codeString = _getStringArgument(node, 1);
     if (codeString == null) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
 
     return NativeBehavior.ofJsCall(
@@ -1418,18 +1416,18 @@
     if (node.arguments.positional.length < 1) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS builtin expression has no type.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length < 2) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS builtin is missing name.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "Unexpected first argument.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     return NativeBehavior.ofJsBuiltinCall(
         specString,
@@ -1446,24 +1444,24 @@
     if (node.arguments.positional.length < 1) {
       reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
           "JS embedded global expression has no type.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length < 2) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS embedded global is missing name.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length > 2 ||
         node.arguments.named.isNotEmpty) {
       reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
           "JS embedded global has more than 2 arguments.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "Unexpected first argument.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     return NativeBehavior.ofJsEmbeddedGlobalCall(
         specString,
@@ -1475,13 +1473,13 @@
 
   @override
   ConstantValue getConstantValue(ir.Member memberContext, ir.Expression node,
-      {bool requireConstant: true, bool implicitNull: false}) {
+      {bool requireConstant = true, bool implicitNull = false}) {
     if (node == null) {
       if (!implicitNull) {
         throw failedAt(
             CURRENT_ELEMENT_SPANNABLE, 'No expression for constant.');
       }
-      return new NullConstantValue();
+      return NullConstantValue();
     } else if (node is ir.ConstantExpression) {
       return _constantValuefier.visitConstant(node.constant);
     } else {
@@ -1494,7 +1492,7 @@
           requireConstant: requireConstant);
       if (constant == null) {
         if (requireConstant) {
-          throw new UnsupportedError(
+          throw UnsupportedError(
               'No constant for ${DebugPrinter.prettyPrint(node)}');
         }
       } else {
@@ -1510,8 +1508,7 @@
 
   @override
   ConstantValue getRequiredSentinelConstantValue() {
-    return new ConstructedConstantValue(
-        _commonElements.requiredSentinelType, <FieldEntity, ConstantValue>{});
+    return ConstructedConstantValue(_commonElements.requiredSentinelType, {});
   }
 
   @override
@@ -1541,17 +1538,17 @@
 
   TypeVariableEntity createTypeVariable(
       Entity typeDeclaration, String name, int index) {
-    return new JTypeVariable(typeDeclaration, name, index);
+    return JTypeVariable(typeDeclaration, name, index);
   }
 
   JConstructorBody createConstructorBody(
       ConstructorEntity constructor, ParameterStructure parameterStructure) {
-    return new JConstructorBody(constructor, parameterStructure);
+    return JConstructorBody(constructor, parameterStructure);
   }
 
   JGeneratorBody createGeneratorBody(
       FunctionEntity function, DartType elementType) {
-    return new JGeneratorBody(function, elementType);
+    return JGeneratorBody(function, elementType);
   }
 
   void forEachNestedClosure(
@@ -1670,11 +1667,10 @@
           createConstructorBody(constructor, parameterStructure);
       members.register<IndexedFunction, FunctionData>(
           constructorBody,
-          new ConstructorBodyDataImpl(
+          ConstructorBodyDataImpl(
               data.node,
               data.node.function,
-              new SpecialMemberDefinition(
-                  data.node, MemberKind.constructorBody),
+              SpecialMemberDefinition(data.node, MemberKind.constructorBody),
               data.staticTypes));
       IndexedClass cls = constructor.enclosingClass;
       JClassEnvImpl classEnv = classes.getEnv(cls);
@@ -1717,7 +1713,7 @@
       case MemberKind.generatorBody:
         return getParentMember(definition.node);
     }
-    throw new UnsupportedError('Unexpected member kind ${definition}');
+    throw UnsupportedError('Unexpected member kind ${definition}');
   }
 
   @override
@@ -1729,7 +1725,7 @@
   /// the parameter and the [defaultValue] if the parameter is optional.
   void forEachParameter(covariant IndexedFunction function,
       void f(DartType type, String name, ConstantValue defaultValue),
-      {bool isNative: false}) {
+      {bool isNative = false}) {
     FunctionData data = members.getData(function);
     data.forEachParameter(this, function.parameterStructure, f,
         isNative: isNative);
@@ -1752,11 +1748,11 @@
       BoxLocal boxLocal,
       Map<String, MemberEntity> memberMap) {
     JRecordField boxedField =
-        new JRecordField(variable.name, boxLocal, isConst: variable.isConst);
+        JRecordField(variable.name, boxLocal, isConst: variable.isConst);
     members.register(
         boxedField,
-        new ClosureFieldData(
-            new ClosureMemberDefinition(computeSourceSpanFromTreeNode(variable),
+        ClosureFieldData(
+            ClosureMemberDefinition(computeSourceSpanFromTreeNode(variable),
                 MemberKind.closureField, variable),
             memberThisType));
     memberMap[boxedField.name] = boxedField;
@@ -1774,18 +1770,18 @@
     if (info.boxedVariables.isNotEmpty) {
       NodeBox box = info.capturedVariablesAccessor;
 
-      Map<String, IndexedMember> memberMap = <String, IndexedMember>{};
-      JRecord container = new JRecord(member.library, box.name);
-      BoxLocal boxLocal = new BoxLocal(container);
+      Map<String, IndexedMember> memberMap = {};
+      JRecord container = JRecord(member.library, box.name);
+      BoxLocal boxLocal = BoxLocal(container);
       InterfaceType thisType =
           types.interfaceType(container, const <DartType>[]);
       InterfaceType supertype = commonElements.objectType;
-      JClassData containerData = new RecordClassData(
-          new RecordContainerDefinition(getMemberDefinition(member).location),
+      JClassData containerData = RecordClassData(
+          RecordContainerDefinition(getMemberDefinition(member).location),
           thisType,
           supertype,
           getOrderedTypeSet(supertype.element).extendClass(types, thisType));
-      classes.register(container, containerData, new RecordEnv(memberMap));
+      classes.register(container, containerData, RecordEnv(memberMap));
 
       InterfaceType memberThisType = member.enclosingClass != null
           ? elementEnvironment.getThisType(member.enclosingClass)
@@ -1812,7 +1808,7 @@
         requiredNamedParameters.add(p.name);
       }
     }
-    return new ParameterStructure(
+    return ParameterStructure(
         requiredPositionalParameters,
         positionalParameters,
         namedParameters,
@@ -1841,19 +1837,19 @@
     }
     String name = _computeClosureName(node);
     SourceSpan location = computeSourceSpanFromTreeNode(node);
-    Map<String, IndexedMember> memberMap = <String, IndexedMember>{};
+    Map<String, IndexedMember> memberMap = {};
 
-    JClass classEntity = new JClosureClass(enclosingLibrary, name);
+    JClass classEntity = JClosureClass(enclosingLibrary, name);
     // Create a classData and set up the interfaces and subclass
     // relationships that _ensureSupertypes and _ensureThisAndRawType are doing
     InterfaceType thisType =
         types.interfaceType(classEntity, const <DartType>[]);
-    ClosureClassData closureData = new ClosureClassData(
-        new ClosureClassDefinition(location),
+    ClosureClassData closureData = ClosureClassData(
+        ClosureClassDefinition(location),
         thisType,
         supertype,
         getOrderedTypeSet(supertype.element).extendClass(types, thisType));
-    classes.register(classEntity, closureData, new ClosureClassEnv(memberMap));
+    classes.register(classEntity, closureData, ClosureClassEnv(memberMap));
 
     Local closureEntity;
     ir.VariableDeclaration closureEntityNode;
@@ -1861,10 +1857,10 @@
       ir.FunctionDeclaration parent = node.parent;
       closureEntityNode = parent.variable;
     } else if (node.parent is ir.FunctionExpression) {
-      closureEntity = new AnonymousClosureLocal(classEntity);
+      closureEntity = AnonymousClosureLocal(classEntity);
     }
 
-    IndexedFunction callMethod = new JClosureCallMethod(classEntity,
+    IndexedFunction callMethod = JClosureCallMethod(classEntity,
         _getParameterStructureFromFunctionNode(node), getAsyncMarker(node));
     _nestedClosureMap
         .putIfAbsent(member, () => <IndexedFunction>[])
@@ -1876,11 +1872,11 @@
     for (ir.TypeParameter typeParameter in node.typeParameters) {
       typeVariableMap[typeParameter] = typeVariables.register(
           createTypeVariable(callMethod, typeParameter.name, index),
-          new JTypeVariableData(typeParameter));
+          JTypeVariableData(typeParameter));
       index++;
     }
 
-    JsClosureClassInfo closureClassInfo = new JsClosureClassInfo.fromScopeInfo(
+    JsClosureClassInfo closureClassInfo = JsClosureClassInfo.fromScopeInfo(
         classEntity,
         node,
         <ir.VariableDeclaration, JRecordField>{},
@@ -1888,7 +1884,7 @@
         member.enclosingClass,
         closureEntity,
         closureEntityNode,
-        info.hasThisLocal ? new ThisLocal(member.enclosingClass) : null);
+        info.hasThisLocal ? ThisLocal(member.enclosingClass) : null);
     _buildClosureClassFields(closureClassInfo, member, memberThisType, info,
         recordFieldsVisibleInScope, memberMap);
 
@@ -1901,8 +1897,8 @@
 
     members.register<IndexedFunction, FunctionData>(
         callMethod,
-        new ClosureFunctionData(
-            new ClosureMemberDefinition(
+        ClosureFunctionData(
+            ClosureMemberDefinition(
                 location, MemberKind.closureCall, node.parent),
             memberThisType,
             closureData.callType,
@@ -2001,7 +1997,7 @@
                 fieldNumber));
         fieldNumber++;
       } else {
-        throw new UnsupportedError("Unexpected field node type: $variable");
+        throw UnsupportedError("Unexpected field node type: $variable");
       }
     }
   }
@@ -2031,17 +2027,15 @@
       return false;
     }
 
-    FieldEntity closureField = new JClosureField(
+    FieldEntity closureField = JClosureField(
         '_box_$fieldNumber', closureClassInfo, recordField.box.name,
         isConst: true, isAssignable: false);
 
     members.register<IndexedField, JFieldData>(
         closureField,
-        new ClosureFieldData(
-            new ClosureMemberDefinition(
-                computeSourceSpanFromTreeNode(sourceNode),
-                MemberKind.closureField,
-                sourceNode),
+        ClosureFieldData(
+            ClosureMemberDefinition(computeSourceSpanFromTreeNode(sourceNode),
+                MemberKind.closureField, sourceNode),
             memberThisType));
     memberMap[closureField.name] = closureField;
     closureClassInfo.registerFieldForLocal(recordField.box, closureField);
@@ -2057,11 +2051,11 @@
       SourceSpan location,
       ClassTypeVariableAccess typeVariableAccess) {
     FunctionEntity signatureMethod =
-        new JSignatureMethod(closureClassInfo.closureClassEntity);
+        JSignatureMethod(closureClassInfo.closureClassEntity);
     members.register<IndexedFunction, FunctionData>(
         signatureMethod,
-        new SignatureFunctionData(
-            new SpecialMemberDefinition(
+        SignatureFunctionData(
+            SpecialMemberDefinition(
                 closureSourceNode.parent, MemberKind.signature),
             memberThisType,
             closureSourceNode.typeParameters,
@@ -2079,17 +2073,15 @@
       bool isConst,
       bool isAssignable,
       int fieldNumber) {
-    JField closureField = new JClosureField(
+    JField closureField = JClosureField(
         _getClosureVariableName(name, fieldNumber), closureClassInfo, name,
         isConst: isConst, isAssignable: isAssignable);
 
     members.register<IndexedField, JFieldData>(
         closureField,
-        new ClosureFieldData(
-            new ClosureMemberDefinition(
-                computeSourceSpanFromTreeNode(sourceNode),
-                MemberKind.closureField,
-                sourceNode),
+        ClosureFieldData(
+            ClosureMemberDefinition(computeSourceSpanFromTreeNode(sourceNode),
+                MemberKind.closureField, sourceNode),
             memberThisType));
     memberMap[closureField.name] = closureField;
     return closureField;
@@ -2166,8 +2158,8 @@
       generatorBody = createGeneratorBody(function, elementType);
       members.register<IndexedFunction, FunctionData>(
           generatorBody,
-          new GeneratorBodyFunctionData(functionData,
-              new SpecialMemberDefinition(node, MemberKind.generatorBody)));
+          GeneratorBodyFunctionData(functionData,
+              SpecialMemberDefinition(node, MemberKind.generatorBody)));
 
       if (function.enclosingClass != null) {
         // TODO(sra): Integrate this with ClassEnvImpl.addConstructorBody ?
@@ -2342,7 +2334,7 @@
 
   @override
   ConstructorEntity lookupConstructor(ClassEntity cls, String name,
-      {bool required: false}) {
+      {bool required = false}) {
     ConstructorEntity constructor = elementMap.lookupConstructor(cls, name);
     if (constructor == null && required) {
       throw failedAt(
@@ -2355,7 +2347,7 @@
 
   @override
   MemberEntity lookupLocalClassMember(ClassEntity cls, String name,
-      {bool setter: false, bool required: false}) {
+      {bool setter = false, bool required = false}) {
     MemberEntity member =
         elementMap.lookupClassMember(cls, name, setter: setter);
     if (member == null && required) {
@@ -2367,7 +2359,7 @@
 
   @override
   ClassEntity getSuperClass(ClassEntity cls,
-      {bool skipUnnamedMixinApplications: false}) {
+      {bool skipUnnamedMixinApplications = false}) {
     assert(elementMap.checkFamily(cls));
     ClassEntity superclass = elementMap.getSuperType(cls)?.element;
     if (skipUnnamedMixinApplications) {
@@ -2427,7 +2419,7 @@
 
   @override
   MemberEntity lookupLibraryMember(LibraryEntity library, String name,
-      {bool setter: false, bool required: false}) {
+      {bool setter = false, bool required = false}) {
     MemberEntity member =
         elementMap.lookupLibraryMember(library, name, setter: setter);
     if (member == null && required) {
@@ -2439,7 +2431,7 @@
 
   @override
   ClassEntity lookupClass(LibraryEntity library, String name,
-      {bool required: false}) {
+      {bool required = false}) {
     ClassEntity cls = elementMap.lookupClass(library, name);
     if (cls == null && required) {
       failedAt(CURRENT_ELEMENT_SPANNABLE,
@@ -2454,7 +2446,7 @@
   }
 
   @override
-  LibraryEntity lookupLibrary(Uri uri, {bool required: false}) {
+  LibraryEntity lookupLibrary(Uri uri, {bool required = false}) {
     LibraryEntity library = elementMap.lookupLibrary(uri);
     if (library == null && required) {
       failedAt(CURRENT_ELEMENT_SPANNABLE, "The library '$uri' was not found.");
@@ -2657,7 +2649,7 @@
         IndexedFunction function = source.readMember();
         return _elementMap.getGeneratorBody(function);
     }
-    throw new UnsupportedError("Unexpected late member kind: $kind.");
+    throw UnsupportedError("Unexpected late member kind: $kind.");
   }
 }
 
@@ -2689,7 +2681,7 @@
       sink.writeEnum(LateMemberKind.generatorBody);
       sink.writeMember(value.function);
     } else {
-      throw new UnsupportedError("Unexpected late member $value.");
+      throw UnsupportedError("Unexpected late member $value.");
     }
   }
 }
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index 38337b4..62b7315 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -36,7 +36,7 @@
     Uri canonicalUri = source.readUri();
     bool isNonNullableByDefault = source.readBool();
     source.end(tag);
-    return new JLibrary(name, canonicalUri, isNonNullableByDefault);
+    return JLibrary(name, canonicalUri, isNonNullableByDefault);
   }
 
   /// Serializes this [JLibrary] to [sink].
@@ -80,13 +80,13 @@
         String name = source.readString();
         bool isAbstract = source.readBool();
         source.end(tag);
-        return new JClass(library, name, isAbstract: isAbstract);
+        return JClass(library, name, isAbstract: isAbstract);
       case JClassKind.closure:
-        return new JClosureClass.readFromDataSource(source);
+        return JClosureClass.readFromDataSource(source);
       case JClassKind.record:
-        return new JRecord.readFromDataSource(source);
+        return JRecord.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unexpected ClassKind $kind");
+    throw UnsupportedError("Unexpected ClassKind $kind");
   }
 
   /// Serializes this [JClass] to [sink].
@@ -130,7 +130,8 @@
   final Name _name;
   final bool _isStatic;
 
-  JMember(this.library, this.enclosingClass, this._name, {bool isStatic: false})
+  JMember(this.library, this.enclosingClass, this._name,
+      {bool isStatic = false})
       : _isStatic = isStatic;
 
   /// Deserializes a [JMember] object from [source].
@@ -138,31 +139,31 @@
     JMemberKind kind = source.readEnum(JMemberKind.values);
     switch (kind) {
       case JMemberKind.generativeConstructor:
-        return new JGenerativeConstructor.readFromDataSource(source);
+        return JGenerativeConstructor.readFromDataSource(source);
       case JMemberKind.factoryConstructor:
-        return new JFactoryConstructor.readFromDataSource(source);
+        return JFactoryConstructor.readFromDataSource(source);
       case JMemberKind.constructorBody:
-        return new JConstructorBody.readFromDataSource(source);
+        return JConstructorBody.readFromDataSource(source);
       case JMemberKind.field:
-        return new JField.readFromDataSource(source);
+        return JField.readFromDataSource(source);
       case JMemberKind.getter:
-        return new JGetter.readFromDataSource(source);
+        return JGetter.readFromDataSource(source);
       case JMemberKind.setter:
-        return new JSetter.readFromDataSource(source);
+        return JSetter.readFromDataSource(source);
       case JMemberKind.method:
-        return new JMethod.readFromDataSource(source);
+        return JMethod.readFromDataSource(source);
       case JMemberKind.closureField:
-        return new JClosureField.readFromDataSource(source);
+        return JClosureField.readFromDataSource(source);
       case JMemberKind.closureCallMethod:
-        return new JClosureCallMethod.readFromDataSource(source);
+        return JClosureCallMethod.readFromDataSource(source);
       case JMemberKind.generatorBody:
-        return new JGeneratorBody.readFromDataSource(source);
+        return JGeneratorBody.readFromDataSource(source);
       case JMemberKind.signatureMethod:
-        return new JSignatureMethod.readFromDataSource(source);
+        return JSignatureMethod.readFromDataSource(source);
       case JMemberKind.recordField:
-        return new JRecordField.readFromDataSource(source);
+        return JRecordField.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unexpected JMemberKind $kind");
+    throw UnsupportedError("Unexpected JMemberKind $kind");
   }
 
   /// Serializes this [JMember] to [sink].
@@ -225,7 +226,7 @@
 
   JFunction(JLibrary library, JClass enclosingClass, Name name,
       this.parameterStructure, this.asyncMarker,
-      {bool isStatic: false, this.isExternal: false})
+      {bool isStatic = false, this.isExternal = false})
       : super(library, enclosingClass, name, isStatic: isStatic);
 }
 
@@ -276,12 +277,12 @@
     JClass enclosingClass = source.readClass();
     String name = source.readString();
     ParameterStructure parameterStructure =
-        new ParameterStructure.readFromDataSource(source);
+        ParameterStructure.readFromDataSource(source);
     bool isExternal = source.readBool();
     bool isConst = source.readBool();
     source.end(tag);
-    return new JGenerativeConstructor(enclosingClass,
-        new Name(name, enclosingClass.library), parameterStructure,
+    return JGenerativeConstructor(
+        enclosingClass, Name(name, enclosingClass.library), parameterStructure,
         isExternal: isExternal, isConst: isConst);
   }
 
@@ -323,13 +324,13 @@
     JClass enclosingClass = source.readClass();
     String name = source.readString();
     ParameterStructure parameterStructure =
-        new ParameterStructure.readFromDataSource(source);
+        ParameterStructure.readFromDataSource(source);
     bool isExternal = source.readBool();
     bool isConst = source.readBool();
     bool isFromEnvironmentConstructor = source.readBool();
     source.end(tag);
-    return new JFactoryConstructor(enclosingClass,
-        new Name(name, enclosingClass.library), parameterStructure,
+    return JFactoryConstructor(
+        enclosingClass, Name(name, enclosingClass.library), parameterStructure,
         isExternal: isExternal,
         isConst: isConst,
         isFromEnvironmentConstructor: isFromEnvironmentConstructor);
@@ -372,9 +373,9 @@
     source.begin(tag);
     JConstructor constructor = source.readMember();
     ParameterStructure parameterStructure =
-        new ParameterStructure.readFromDataSource(source);
+        ParameterStructure.readFromDataSource(source);
     source.end(tag);
-    return new JConstructorBody(constructor, parameterStructure);
+    return JConstructorBody(constructor, parameterStructure);
   }
 
   @override
@@ -420,13 +421,13 @@
     }
     String name = source.readString();
     ParameterStructure parameterStructure =
-        new ParameterStructure.readFromDataSource(source);
+        ParameterStructure.readFromDataSource(source);
     AsyncMarker asyncMarker = source.readEnum(AsyncMarker.values);
     bool isStatic = source.readBool();
     bool isExternal = source.readBool();
     bool isAbstract = source.readBool();
     source.end(tag);
-    return new JMethod(library, enclosingClass, new Name(name, library),
+    return JMethod(library, enclosingClass, Name(name, library),
         parameterStructure, asyncMarker,
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
@@ -479,7 +480,7 @@
     JFunction function = source.readMember();
     DartType elementType = source.readDartType();
     source.end(tag);
-    return new JGeneratorBody(function, elementType);
+    return JGeneratorBody(function, elementType);
   }
 
   @override
@@ -530,8 +531,7 @@
     bool isExternal = source.readBool();
     bool isAbstract = source.readBool();
     source.end(tag);
-    return new JGetter(
-        library, enclosingClass, new Name(name, library), asyncMarker,
+    return JGetter(library, enclosingClass, Name(name, library), asyncMarker,
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
 
@@ -594,8 +594,7 @@
     bool isExternal = source.readBool();
     bool isAbstract = source.readBool();
     source.end(tag);
-    return new JSetter(
-        library, enclosingClass, new Name(name, library, isSetter: true),
+    return JSetter(library, enclosingClass, Name(name, library, isSetter: true),
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
 
@@ -660,7 +659,7 @@
     bool isAssignable = source.readBool();
     bool isConst = source.readBool();
     source.end(tag);
-    return new JField(library, enclosingClass, new Name(name, library),
+    return JField(library, enclosingClass, Name(name, library),
         isStatic: isStatic, isAssignable: isAssignable, isConst: isConst);
   }
 
@@ -704,11 +703,10 @@
     source.begin(tag);
     JClass enclosingClass = source.readClass();
     ParameterStructure parameterStructure =
-        new ParameterStructure.readFromDataSource(source);
+        ParameterStructure.readFromDataSource(source);
     AsyncMarker asyncMarker = source.readEnum(AsyncMarker.values);
     source.end(tag);
-    return new JClosureCallMethod(
-        enclosingClass, parameterStructure, asyncMarker);
+    return JClosureCallMethod(enclosingClass, parameterStructure, asyncMarker);
   }
 
   @override
@@ -741,7 +739,7 @@
     source.begin(tag);
     JClass cls = source.readClass();
     source.end(tag);
-    return new JSignatureMethod(cls);
+    return JSignatureMethod(cls);
   }
 
   @override
@@ -795,7 +793,7 @@
     String name = source.readString();
     int index = source.readInt();
     source.end(tag);
-    return new JTypeVariable(typeDeclaration, name, index);
+    return JTypeVariable(typeDeclaration, name, index);
   }
 
   /// Serializes this [JTypeVariable] to [sink].
@@ -812,7 +810,7 @@
     } else if (typeDeclaration == null) {
       sink.writeEnum(JTypeVariableKind.local);
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unexpected type variable declarer $typeDeclaration.");
     }
     sink.writeString(name);
diff --git a/pkg/compiler/lib/src/js_model/env.dart b/pkg/compiler/lib/src/js_model/env.dart
index 2dd5c12..c0bcc93 100644
--- a/pkg/compiler/lib/src/js_model/env.dart
+++ b/pkg/compiler/lib/src/js_model/env.dart
@@ -13,7 +13,6 @@
 import '../ir/element_map.dart';
 import '../ir/static_type_cache.dart';
 import '../ir/util.dart';
-import '../js_model/element_map.dart';
 import '../ordered_typeset.dart';
 import '../serialization/serialization.dart';
 import '../ssa/type_builder.dart';
@@ -76,7 +75,7 @@
     Map<String, ir.Member> setterMap =
         source.readStringMap(source.readMemberNode);
     source.end(tag);
-    return new JLibraryEnv(library, memberMap, setterMap);
+    return JLibraryEnv(library, memberMap, setterMap);
   }
 
   /// Serializes this [JLibraryEnv] to [sink].
@@ -103,7 +102,7 @@
   }
 
   /// Return the [ir.Member] for the member [name] in [library].
-  ir.Member lookupMember(String name, {bool setter: false}) {
+  ir.Member lookupMember(String name, {bool setter = false}) {
     return setter ? _setterMap[name] : _memberMap[name];
   }
 
@@ -145,7 +144,7 @@
       }
     }
     source.end(tag);
-    return new JLibraryData(library, imports);
+    return JLibraryData(library, imports);
   }
 
   void writeToDataSink(DataSink sink) {
@@ -179,13 +178,13 @@
     JClassEnvKind kind = source.readEnum(JClassEnvKind.values);
     switch (kind) {
       case JClassEnvKind.node:
-        return new JClassEnvImpl.readFromDataSource(source);
+        return JClassEnvImpl.readFromDataSource(source);
       case JClassEnvKind.closure:
-        return new ClosureClassEnv.readFromDataSource(source);
+        return ClosureClassEnv.readFromDataSource(source);
       case JClassEnvKind.record:
-        return new RecordEnv.readFromDataSource(source);
+        return RecordEnv.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unsupported JClassEnvKind $kind");
+    throw UnsupportedError("Unsupported JClassEnvKind $kind");
   }
 
   /// Serializes this [JClassEnv] to [sink].
@@ -207,7 +206,7 @@
   /// is `true`, the setter or assignable field corresponding to [name] is
   /// returned.
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false});
+      {bool setter = false});
 
   /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
@@ -257,7 +256,7 @@
     List<ir.Member> members = source.readMemberNodes();
     bool isSuperMixinApplication = source.readBool();
     source.end(tag);
-    return new JClassEnvImpl(cls, constructorMap, memberMap, setterMap, members,
+    return JClassEnvImpl(cls, constructorMap, memberMap, setterMap, members,
         isSuperMixinApplication);
   }
 
@@ -279,7 +278,7 @@
 
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     ir.Member member = setter ? _setterMap[name] : _memberMap[name];
     return member != null ? elementMap.getMember(member) : null;
   }
@@ -330,7 +329,7 @@
     Map<String, IndexedMember> _memberMap =
         source.readStringMap(() => source.readMember());
     source.end(tag);
-    return new RecordEnv(_memberMap);
+    return RecordEnv(_memberMap);
   }
 
   @override
@@ -366,7 +365,7 @@
 
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     return _memberMap[name];
   }
 
@@ -392,7 +391,7 @@
     Map<String, IndexedMember> _memberMap =
         source.readStringMap(() => source.readMember());
     source.end(tag);
-    return new ClosureClassEnv(_memberMap);
+    return ClosureClassEnv(_memberMap);
   }
 
   @override
@@ -406,7 +405,7 @@
 
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     if (setter) {
       // All closure fields are final.
       return null;
@@ -424,13 +423,13 @@
     JClassDataKind kind = source.readEnum(JClassDataKind.values);
     switch (kind) {
       case JClassDataKind.node:
-        return new JClassDataImpl.readFromDataSource(source);
+        return JClassDataImpl.readFromDataSource(source);
       case JClassDataKind.closure:
-        return new ClosureClassData.readFromDataSource(source);
+        return ClosureClassData.readFromDataSource(source);
       case JClassDataKind.record:
-        return new RecordClassData.readFromDataSource(source);
+        return RecordClassData.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unexpected JClassDataKind $kind");
+    throw UnsupportedError("Unexpected JClassDataKind $kind");
   }
 
   /// Serializes this [JClassData] to [sink].
@@ -489,9 +488,9 @@
   factory JClassDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
     ir.Class cls = source.readClassNode();
-    ClassDefinition definition = new ClassDefinition.readFromDataSource(source);
+    ClassDefinition definition = ClassDefinition.readFromDataSource(source);
     source.end(tag);
-    return new JClassDataImpl(cls, definition);
+    return JClassDataImpl(cls, definition);
   }
 
   @override
@@ -543,23 +542,23 @@
     JMemberDataKind kind = source.readEnum(JMemberDataKind.values);
     switch (kind) {
       case JMemberDataKind.function:
-        return new FunctionDataImpl.readFromDataSource(source);
+        return FunctionDataImpl.readFromDataSource(source);
       case JMemberDataKind.field:
-        return new JFieldDataImpl.readFromDataSource(source);
+        return JFieldDataImpl.readFromDataSource(source);
       case JMemberDataKind.constructor:
-        return new JConstructorDataImpl.readFromDataSource(source);
+        return JConstructorDataImpl.readFromDataSource(source);
       case JMemberDataKind.constructorBody:
-        return new ConstructorBodyDataImpl.readFromDataSource(source);
+        return ConstructorBodyDataImpl.readFromDataSource(source);
       case JMemberDataKind.signature:
-        return new SignatureFunctionData.readFromDataSource(source);
+        return SignatureFunctionData.readFromDataSource(source);
       case JMemberDataKind.generatorBody:
-        return new GeneratorBodyFunctionData.readFromDataSource(source);
+        return GeneratorBodyFunctionData.readFromDataSource(source);
       case JMemberDataKind.closureFunction:
-        return new ClosureFunctionData.readFromDataSource(source);
+        return ClosureFunctionData.readFromDataSource(source);
       case JMemberDataKind.closureField:
-        return new ClosureFieldData.readFromDataSource(source);
+        return ClosureFieldData.readFromDataSource(source);
     }
-    throw new UnsupportedError("Unexpected JMemberDataKind $kind");
+    throw UnsupportedError("Unexpected JMemberDataKind $kind");
   }
 
   /// Serializes this [JMemberData] to [sink].
@@ -597,7 +596,7 @@
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
       void f(DartType type, String name, ConstantValue defaultValue),
-      {bool isNative: false});
+      {bool isNative = false});
 }
 
 abstract class FunctionDataTypeVariablesMixin implements FunctionData {
@@ -620,7 +619,7 @@
           _typeVariables = functionNode.typeParameters
               .map<TypeVariableType>((ir.TypeParameter typeParameter) {
             return elementMap
-                .getDartType(new ir.TypeParameterType(
+                .getDartType(ir.TypeParameterType(
                     typeParameter, ir.Nullability.nonNullable))
                 .withoutNullability;
           }).toList();
@@ -643,9 +642,9 @@
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
       void f(DartType type, String name, ConstantValue defaultValue),
-      {bool isNative: false}) {
+      {bool isNative = false}) {
     void handleParameter(ir.VariableDeclaration parameter,
-        {bool isOptional: true}) {
+        {bool isOptional = true}) {
       DartType type = elementMap.getDartType(parameter.type);
       String name = parameter.name;
       ConstantValue defaultValue;
@@ -699,15 +698,14 @@
     } else if (node is ir.Constructor) {
       functionNode = node.function;
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unexpected member node $node (${node.runtimeType}).");
     }
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     StaticTypeCache staticTypes =
-        new StaticTypeCache.readFromDataSource(source, node);
+        StaticTypeCache.readFromDataSource(source, node);
     source.end(tag);
-    return new FunctionDataImpl(node, functionNode, definition, staticTypes);
+    return FunctionDataImpl(node, functionNode, definition, staticTypes);
   }
 
   @override
@@ -752,14 +750,13 @@
 
   factory SignatureFunctionData.readFromDataSource(DataSource source) {
     source.begin(tag);
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     InterfaceType memberThisType = source.readDartType(allowNull: true);
     List<ir.TypeParameter> typeParameters = source.readTypeParameterNodes();
     ClassTypeVariableAccess classTypeVariableAccess =
         source.readEnum(ClassTypeVariableAccess.values);
     source.end(tag);
-    return new SignatureFunctionData(
+    return SignatureFunctionData(
         definition, memberThisType, typeParameters, classTypeVariableAccess);
   }
 
@@ -779,7 +776,7 @@
 
   @override
   FunctionType getFunctionType(covariant JsKernelToElementMap elementMap) {
-    throw new UnsupportedError("SignatureFunctionData.getFunctionType");
+    throw UnsupportedError("SignatureFunctionData.getFunctionType");
   }
 
   @override
@@ -787,8 +784,8 @@
     return typeParameters
         .map<TypeVariableType>((ir.TypeParameter typeParameter) {
       return elementMap
-          .getDartType(new ir.TypeParameterType(
-              typeParameter, ir.Nullability.nonNullable))
+          .getDartType(
+              ir.TypeParameterType(typeParameter, ir.Nullability.nonNullable))
           .withoutNullability;
     }).toList();
   }
@@ -798,8 +795,8 @@
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
       void f(DartType type, String name, ConstantValue defaultValue),
-      {bool isNative: false}) {
-    throw new UnimplementedError('SignatureData.forEachParameter');
+      {bool isNative = false}) {
+    throw UnimplementedError('SignatureData.forEachParameter');
   }
 
   @override
@@ -828,7 +825,7 @@
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
       void f(DartType type, String name, ConstantValue defaultValue),
-      {bool isNative: false}) {
+      {bool isNative = false}) {
     return baseData.forEachParameter(elementMap, parameterStructure, f,
         isNative: isNative);
   }
@@ -857,11 +854,10 @@
   factory GeneratorBodyFunctionData.readFromDataSource(DataSource source) {
     source.begin(tag);
     // TODO(johnniwinther): Share the original base data on deserialization.
-    FunctionData baseData = new JMemberData.readFromDataSource(source);
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    FunctionData baseData = JMemberData.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     source.end(tag);
-    return new GeneratorBodyFunctionData(baseData, definition);
+    return GeneratorBodyFunctionData(baseData, definition);
   }
 
   @override
@@ -900,16 +896,14 @@
     } else if (node is ir.Constructor) {
       functionNode = node.function;
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unexpected member node $node (${node.runtimeType}).");
     }
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     StaticTypeCache staticTypes =
-        new StaticTypeCache.readFromDataSource(source, node);
+        StaticTypeCache.readFromDataSource(source, node);
     source.end(tag);
-    return new JConstructorDataImpl(
-        node, functionNode, definition, staticTypes);
+    return JConstructorDataImpl(node, functionNode, definition, staticTypes);
   }
 
   @override
@@ -946,16 +940,14 @@
     } else if (node is ir.Constructor) {
       functionNode = node.function;
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unexpected member node $node (${node.runtimeType}).");
     }
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     StaticTypeCache staticTypes =
-        new StaticTypeCache.readFromDataSource(source, node);
+        StaticTypeCache.readFromDataSource(source, node);
     source.end(tag);
-    return new ConstructorBodyDataImpl(
-        node, functionNode, definition, staticTypes);
+    return ConstructorBodyDataImpl(node, functionNode, definition, staticTypes);
   }
 
   @override
@@ -993,12 +985,11 @@
   factory JFieldDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
     ir.Member node = source.readMemberNode();
-    MemberDefinition definition =
-        new MemberDefinition.readFromDataSource(source);
+    MemberDefinition definition = MemberDefinition.readFromDataSource(source);
     StaticTypeCache staticTypes =
-        new StaticTypeCache.readFromDataSource(source, node);
+        StaticTypeCache.readFromDataSource(source, node);
     source.end(tag);
-    return new JFieldDataImpl(node, definition, staticTypes);
+    return JFieldDataImpl(node, definition, staticTypes);
   }
 
   @override
@@ -1041,7 +1032,7 @@
     source.begin(tag);
     ir.TypeParameter node = source.readTypeParameterNode();
     source.end(tag);
-    return new JTypeVariableData(node);
+    return JTypeVariableData(node);
   }
 
   void writeToDataSink(DataSink sink) {
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 0e57dd9..c6f42f1 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -84,18 +84,17 @@
   SourceInformationStrategy sourceInformationStrategy;
 
   /// The generated code as a js AST for compiled methods.
-  final Map<MemberEntity, js.Expression> generatedCode =
-      <MemberEntity, js.Expression>{};
+  final Map<MemberEntity, js.Expression> generatedCode = {};
 
   JsBackendStrategy(this._compiler) {
     bool generateSourceMap = _compiler.options.generateSourceMap;
     if (!generateSourceMap) {
       sourceInformationStrategy = const JavaScriptSourceInformationStrategy();
     } else {
-      sourceInformationStrategy = new KernelSourceInformationStrategy(this);
+      sourceInformationStrategy = KernelSourceInformationStrategy(this);
     }
-    _emitterTask = new CodeEmitterTask(_compiler, generateSourceMap);
-    _functionCompiler = new SsaFunctionCompiler(
+    _emitterTask = CodeEmitterTask(_compiler, generateSourceMap);
+    _functionCompiler = SsaFunctionCompiler(
         _compiler.options,
         _compiler.reporter,
         this,
@@ -163,23 +162,20 @@
   JClosedWorld createJClosedWorld(
       KClosedWorld closedWorld, OutputUnitData outputUnitData) {
     KernelFrontendStrategy strategy = _compiler.frontendStrategy;
-    _elementMap = new JsKernelToElementMap(
+    _elementMap = JsKernelToElementMap(
         _compiler.reporter,
         _compiler.environment,
         strategy.elementMap,
         closedWorld.liveMemberUsage,
         closedWorld.annotationsData);
     ClosureDataBuilder closureDataBuilder =
-        new ClosureDataBuilder(_elementMap, closedWorld.annotationsData);
-    JsClosedWorldBuilder closedWorldBuilder = new JsClosedWorldBuilder(
-        _elementMap,
-        closureDataBuilder,
-        _compiler.options,
-        _compiler.abstractValueStrategy);
+        ClosureDataBuilder(_elementMap, closedWorld.annotationsData);
+    JsClosedWorldBuilder closedWorldBuilder = JsClosedWorldBuilder(_elementMap,
+        closureDataBuilder, _compiler.options, _compiler.abstractValueStrategy);
     JClosedWorld jClosedWorld = closedWorldBuilder.convertClosedWorld(
         closedWorld, strategy.closureModels, outputUnitData);
     _elementMap.lateOutputUnitDataBuilder =
-        new LateOutputUnitDataBuilder(jClosedWorld.outputUnitData);
+        LateOutputUnitDataBuilder(jClosedWorld.outputUnitData);
     return jClosedWorld;
   }
 
@@ -197,23 +193,23 @@
         : const FixedNames();
 
     Tracer tracer =
-        new Tracer(closedWorld, _compiler.options, _compiler.outputProvider);
+        Tracer(closedWorld, _compiler.options, _compiler.outputProvider);
 
     RuntimeTypesSubstitutions rtiSubstitutions;
     if (_compiler.options.disableRtiOptimization) {
-      rtiSubstitutions = new TrivialRuntimeTypesSubstitutions(closedWorld);
+      rtiSubstitutions = TrivialRuntimeTypesSubstitutions(closedWorld);
       _rtiChecksBuilder =
-          new TrivialRuntimeTypesChecksBuilder(closedWorld, rtiSubstitutions);
+          TrivialRuntimeTypesChecksBuilder(closedWorld, rtiSubstitutions);
     } else {
-      RuntimeTypesImpl runtimeTypesImpl = new RuntimeTypesImpl(closedWorld);
+      RuntimeTypesImpl runtimeTypesImpl = RuntimeTypesImpl(closedWorld);
       _rtiChecksBuilder = runtimeTypesImpl;
       rtiSubstitutions = runtimeTypesImpl;
     }
 
-    RecipeEncoder rtiRecipeEncoder = new RecipeEncoderImpl(closedWorld,
+    RecipeEncoder rtiRecipeEncoder = RecipeEncoderImpl(closedWorld,
         rtiSubstitutions, closedWorld.nativeData, closedWorld.commonElements);
 
-    CodegenInputs codegen = new CodegenInputsImpl(
+    CodegenInputs codegen = CodegenInputsImpl(
         rtiSubstitutions, rtiRecipeEncoder, tracer, fixedNames);
 
     functionCompiler.initialize(globalTypeInferenceResults, codegen);
@@ -229,7 +225,7 @@
       CodegenResults codegenResults) {
     assert(_elementMap != null,
         "JsBackendStrategy.elementMap has not been created yet.");
-    OneShotInterceptorData oneShotInterceptorData = new OneShotInterceptorData(
+    OneShotInterceptorData oneShotInterceptorData = OneShotInterceptorData(
         closedWorld.interceptorData,
         closedWorld.commonElements,
         closedWorld.nativeData);
@@ -237,26 +233,25 @@
         globalInferenceResults, codegen, oneShotInterceptorData);
     ElementEnvironment elementEnvironment = closedWorld.elementEnvironment;
     CommonElements commonElements = closedWorld.commonElements;
-    BackendImpacts impacts =
-        new BackendImpacts(commonElements, _compiler.options);
-    _customElementsCodegenAnalysis = new CustomElementsCodegenAnalysis(
+    BackendImpacts impacts = BackendImpacts(commonElements, _compiler.options);
+    _customElementsCodegenAnalysis = CustomElementsCodegenAnalysis(
         commonElements, elementEnvironment, closedWorld.nativeData);
-    return new CodegenEnqueuer(
+    return CodegenEnqueuer(
         task,
-        new CodegenWorldBuilderImpl(
+        CodegenWorldBuilderImpl(
             closedWorld,
             _compiler.abstractValueStrategy.createSelectorStrategy(),
             oneShotInterceptorData),
-        new KernelCodegenWorkItemBuilder(
+        KernelCodegenWorkItemBuilder(
             this,
             closedWorld,
             codegenResults,
-            new ClosedEntityLookup(_elementMap),
+            ClosedEntityLookup(_elementMap),
             // TODO(johnniwinther): Avoid the need for a [ComponentLookup]. This
             // is caused by some type masks holding a kernel node for using in
             // tracing.
-            new ComponentLookup(_elementMap.programEnv.mainComponent)),
-        new CodegenEnqueuerListener(
+            ComponentLookup(_elementMap.programEnv.mainComponent)),
+        CodegenEnqueuerListener(
             _compiler.options,
             elementEnvironment,
             commonElements,
@@ -277,10 +272,10 @@
     FixedNames fixedNames = codegen.fixedNames;
     _namer = _compiler.options.enableMinification
         ? _compiler.options.useFrequencyNamer
-            ? new FrequencyBasedNamer(closedWorld, fixedNames)
-            : new MinifyNamer(closedWorld, fixedNames)
-        : new Namer(closedWorld, fixedNames);
-    _nativeCodegenEnqueuer = new NativeCodegenEnqueuer(
+            ? FrequencyBasedNamer(closedWorld, fixedNames)
+            : MinifyNamer(closedWorld, fixedNames)
+        : Namer(closedWorld, fixedNames);
+    _nativeCodegenEnqueuer = NativeCodegenEnqueuer(
         _compiler.options,
         closedWorld.elementEnvironment,
         closedWorld.commonElements,
@@ -292,9 +287,9 @@
     // TODO(johnniwinther): Share the impact object created in
     // createCodegenEnqueuer.
     BackendImpacts impacts =
-        new BackendImpacts(closedWorld.commonElements, _compiler.options);
+        BackendImpacts(closedWorld.commonElements, _compiler.options);
 
-    _codegenImpactTransformer = new CodegenImpactTransformer(
+    _codegenImpactTransformer = CodegenImpactTransformer(
         closedWorld,
         closedWorld.elementEnvironment,
         impacts,
@@ -319,14 +314,14 @@
     if (_compiler.options.testMode) {
       bool useDataKinds = true;
       List<Object> data = [];
-      DataSink sink = new ObjectSink(data, useDataKinds: useDataKinds);
-      sink.registerCodegenWriter(new CodegenWriterImpl(closedWorld));
+      DataSink sink = ObjectSink(data, useDataKinds: useDataKinds);
+      sink.registerCodegenWriter(CodegenWriterImpl(closedWorld));
       result.writeToDataSink(sink);
-      DataSource source = new ObjectSource(data, useDataKinds: useDataKinds);
+      DataSource source = ObjectSource(data, useDataKinds: useDataKinds);
       List<ModularName> modularNames = [];
       List<ModularExpression> modularExpression = [];
       source.registerCodegenReader(
-          new CodegenReaderImpl(closedWorld, modularNames, modularExpression));
+          CodegenReaderImpl(closedWorld, modularNames, modularExpression));
       source.registerEntityLookup(entityLookup);
       source.registerComponentLookup(componentLookup);
       result = CodegenResult.readFromDataSource(
@@ -336,7 +331,7 @@
       generatedCode[member] = result.code;
     }
     if (retainDataForTesting) {
-      codegenImpactsForTesting ??= <MemberEntity, WorldImpact>{};
+      codegenImpactsForTesting ??= {};
       codegenImpactsForTesting[member] = result.impact;
     }
     WorldImpact worldImpact =
@@ -364,7 +359,7 @@
   @override
   SsaBuilder createSsaBuilder(
       CompilerTask task, SourceInformationStrategy sourceInformationStrategy) {
-    return new KernelSsaBuilder(
+    return KernelSsaBuilder(
         task,
         _compiler.options,
         _compiler.reporter,
@@ -384,23 +379,22 @@
       JClosedWorld closedWorld,
       GlobalLocalsMap globalLocalsMap,
       InferredDataBuilder inferredDataBuilder) {
-    return new TypeGraphInferrer(
+    return TypeGraphInferrer(
         _compiler, closedWorld, globalLocalsMap, inferredDataBuilder);
   }
 
   @override
   void prepareCodegenReader(DataSource source) {
-    source.registerEntityReader(new ClosedEntityReader(_elementMap));
-    source.registerEntityLookup(new ClosedEntityLookup(_elementMap));
+    source.registerEntityReader(ClosedEntityReader(_elementMap));
+    source.registerEntityLookup(ClosedEntityLookup(_elementMap));
     source.registerComponentLookup(
-        new ComponentLookup(_elementMap.programEnv.mainComponent));
+        ComponentLookup(_elementMap.programEnv.mainComponent));
   }
 
   @override
   EntityWriter forEachCodegenMember(void Function(MemberEntity member) f) {
     int earlyMemberIndexLimit = _elementMap.prepareForCodegenSerialization();
-    ClosedEntityWriter entityWriter =
-        new ClosedEntityWriter(earlyMemberIndexLimit);
+    ClosedEntityWriter entityWriter = ClosedEntityWriter(earlyMemberIndexLimit);
     for (int memberIndex = 0;
         memberIndex < _elementMap.members.length;
         memberIndex++) {
@@ -425,7 +419,7 @@
   @override
   WorkItem createWorkItem(MemberEntity entity) {
     if (entity.isAbstract) return null;
-    return new KernelCodegenWorkItem(_backendStrategy, _closedWorld,
+    return KernelCodegenWorkItem(_backendStrategy, _closedWorld,
         _codegenResults, _entityLookup, _componentLookup, entity);
   }
 }
@@ -478,12 +472,12 @@
       CodegenRegistry registry,
       ModularNamer namer,
       ModularEmitter emitter) {
-    _inlineCache ??= new FunctionInlineCache(closedWorld.annotationsData);
-    _inlineDataCache ??= new InlineDataCache(
+    _inlineCache ??= FunctionInlineCache(closedWorld.annotationsData);
+    _inlineDataCache ??= InlineDataCache(
         enableUserAssertions: _options.enableUserAssertions,
         omitImplicitCasts: _options.omitImplicitChecks);
     return _task.measure(() {
-      KernelSsaGraphBuilder builder = new KernelSsaGraphBuilder(
+      KernelSsaGraphBuilder builder = KernelSsaGraphBuilder(
           _options,
           _reporter,
           member,
@@ -574,7 +568,7 @@
   @override
   AbstractValue inferredIndexType(ir.ForInStatement node) {
     return AbstractValueFactory.inferredResultTypeForSelector(
-        new Selector.index(), typeOfIterator(node), _globalInferenceResults);
+        Selector.index(), typeOfIterator(node), _globalInferenceResults);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index e5956fd..d379248 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -24,7 +24,6 @@
 import '../js_backend/native_data.dart';
 import '../js_backend/no_such_method_registry.dart';
 import '../js_backend/runtime_types_resolution.dart';
-import '../js_model/locals.dart';
 import '../ordered_typeset.dart';
 import '../options.dart';
 import '../serialization/serialization.dart';
@@ -57,8 +56,7 @@
 
   final Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses;
 
-  final Map<ClassEntity, Map<ClassEntity, bool>> _subtypeCoveredByCache =
-      <ClassEntity, Map<ClassEntity, bool>>{};
+  final Map<ClassEntity, Map<ClassEntity, bool>> _subtypeCoveredByCache = {};
 
   // TODO(johnniwinther): Can this be derived from [ClassSet]s?
   final Set<ClassEntity> implementedClasses;
@@ -131,23 +129,22 @@
       DataSource source) {
     source.begin(tag);
 
-    JsKernelToElementMap elementMap =
-        new JsKernelToElementMap.readFromDataSource(
-            options, reporter, environment, component, source);
-    ClassHierarchy classHierarchy = new ClassHierarchy.readFromDataSource(
-        source, elementMap.commonElements);
-    NativeData nativeData = new NativeData.readFromDataSource(
-        source, elementMap.elementEnvironment);
+    JsKernelToElementMap elementMap = JsKernelToElementMap.readFromDataSource(
+        options, reporter, environment, component, source);
+    ClassHierarchy classHierarchy =
+        ClassHierarchy.readFromDataSource(source, elementMap.commonElements);
+    NativeData nativeData =
+        NativeData.readFromDataSource(source, elementMap.elementEnvironment);
     elementMap.nativeData = nativeData;
-    InterceptorData interceptorData = new InterceptorData.readFromDataSource(
+    InterceptorData interceptorData = InterceptorData.readFromDataSource(
         source, nativeData, elementMap.commonElements);
-    BackendUsage backendUsage = new BackendUsage.readFromDataSource(source);
-    RuntimeTypesNeed rtiNeed = new RuntimeTypesNeed.readFromDataSource(
+    BackendUsage backendUsage = BackendUsage.readFromDataSource(source);
+    RuntimeTypesNeed rtiNeed = RuntimeTypesNeed.readFromDataSource(
         source, elementMap.elementEnvironment);
     JFieldAnalysis allocatorAnalysis =
-        new JFieldAnalysis.readFromDataSource(source, options);
+        JFieldAnalysis.readFromDataSource(source, options);
     NoSuchMethodData noSuchMethodData =
-        new NoSuchMethodData.readFromDataSource(source);
+        NoSuchMethodData.readFromDataSource(source);
 
     Set<ClassEntity> implementedClasses = source.readClasses().toSet();
     Set<ClassEntity> liveNativeClasses = source.readClasses().toSet();
@@ -162,22 +159,21 @@
         source.readClassMap(() => source.readClasses().toSet());
 
     AnnotationsData annotationsData =
-        new AnnotationsData.readFromDataSource(options, source);
+        AnnotationsData.readFromDataSource(options, source);
 
     ClosureData closureData =
-        new ClosureData.readFromDataSource(elementMap, source);
+        ClosureData.readFromDataSource(elementMap, source);
 
-    OutputUnitData outputUnitData =
-        new OutputUnitData.readFromDataSource(source);
+    OutputUnitData outputUnitData = OutputUnitData.readFromDataSource(source);
     elementMap.lateOutputUnitDataBuilder =
-        new LateOutputUnitDataBuilder(outputUnitData);
+        LateOutputUnitDataBuilder(outputUnitData);
 
     Map<MemberEntity, MemberAccess> memberAccess = source.readMemberMap(
-        (MemberEntity member) => new MemberAccess.readFromDataSource(source));
+        (MemberEntity member) => MemberAccess.readFromDataSource(source));
 
     source.end(tag);
 
-    return new JsClosedWorld(
+    return JsClosedWorld(
         elementMap,
         nativeData,
         interceptorData,
@@ -280,8 +276,7 @@
 
   @override
   bool everySubtypeIsSubclassOfOrMixinUseOf(ClassEntity x, ClassEntity y) {
-    Map<ClassEntity, bool> secondMap =
-        _subtypeCoveredByCache[x] ??= <ClassEntity, bool>{};
+    Map<ClassEntity, bool> secondMap = _subtypeCoveredByCache[x] ??= {};
     return secondMap[y] ??= classHierarchy.subtypesOf(x).every(
         (ClassEntity cls) =>
             classHierarchy.isSubclassOf(cls, y) ||
@@ -389,7 +384,7 @@
   @override
   Iterable<ClassEntity> mixinUsesOf(ClassEntity cls) {
     if (_liveMixinUses == null) {
-      _liveMixinUses = new Map<ClassEntity, List<ClassEntity>>();
+      _liveMixinUses = Map<ClassEntity, List<ClassEntity>>();
       for (ClassEntity mixin in mixinUses.keys) {
         List<ClassEntity> uses = <ClassEntity>[];
 
@@ -411,7 +406,7 @@
       }
     }
     Iterable<ClassEntity> uses = _liveMixinUses[cls];
-    return uses != null ? uses : const <ClassEntity>[];
+    return uses ?? const <ClassEntity>[];
   }
 
   @override
@@ -438,7 +433,7 @@
     if (_allFunctions == null) {
       // [FunctionSet] is created lazily because it is not used when we switch
       // from a frontend to a backend model before inference.
-      _allFunctions = new FunctionSet(liveInstanceMembers);
+      _allFunctions = FunctionSet(liveInstanceMembers);
     }
   }
 
@@ -535,7 +530,7 @@
 
   @override
   Sorter get sorter {
-    return _sorter ??= new KernelSorter(elementMap);
+    return _sorter ??= KernelSorter(elementMap);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_model/js_world_builder.dart b/pkg/compiler/lib/src/js_model/js_world_builder.dart
index a5ad110..1292491 100644
--- a/pkg/compiler/lib/src/js_model/js_world_builder.dart
+++ b/pkg/compiler/lib/src/js_model/js_world_builder.dart
@@ -40,7 +40,7 @@
 class JsClosedWorldBuilder {
   final JsKernelToElementMap _elementMap;
   final Map<ClassEntity, ClassHierarchyNode> _classHierarchyNodes =
-      new ClassHierarchyNodesMap();
+      ClassHierarchyNodesMap();
   final Map<ClassEntity, ClassSet> _classSets = <ClassEntity, ClassSet>{};
   final ClosureDataBuilder _closureDataBuilder;
   final CompilerOptions _options;
@@ -57,14 +57,14 @@
       KClosedWorld closedWorld,
       Map<MemberEntity, ClosureScopeModel> closureModels,
       OutputUnitData kOutputUnitData) {
-    JsToFrontendMap map = new JsToFrontendMapImpl(_elementMap);
+    JsToFrontendMap map = JsToFrontendMapImpl(_elementMap);
 
     NativeData nativeData = _convertNativeData(map, closedWorld.nativeData);
     _elementMap.nativeData = nativeData;
     InterceptorData interceptorData =
         _convertInterceptorData(map, nativeData, closedWorld.interceptorData);
 
-    Set<ClassEntity> implementedClasses = new Set<ClassEntity>();
+    Set<ClassEntity> implementedClasses = Set<ClassEntity>();
 
     /// Converts [node] from the frontend world to the corresponding
     /// [ClassHierarchyNode] for the backend world.
@@ -78,7 +78,7 @@
         if (node.parentNode != null) {
           parentNode = convertClassHierarchyNode(node.parentNode);
         }
-        return new ClassHierarchyNode(parentNode, cls, node.hierarchyDepth);
+        return ClassHierarchyNode(parentNode, cls, node.hierarchyDepth);
       });
       newNode.isAbstractlyInstantiated = node.isAbstractlyInstantiated;
       newNode.isDirectlyInstantiated = node.isDirectlyInstantiated;
@@ -91,7 +91,7 @@
       ClassEntity cls = map.toBackendClass(classSet.cls);
       return _classSets.putIfAbsent(cls, () {
         ClassHierarchyNode newNode = convertClassHierarchyNode(classSet.node);
-        ClassSet newClassSet = new ClassSet(newNode);
+        ClassSet newClassSet = ClassSet(newNode);
         for (ClassHierarchyNode subtype in classSet.subtypeNodes) {
           ClassHierarchyNode newSubtype = convertClassHierarchyNode(subtype);
           newClassSet.addSubtype(newSubtype);
@@ -133,7 +133,7 @@
     List<FunctionEntity> callMethods = <FunctionEntity>[];
     ClosureData closureData;
     if (_options.disableRtiOptimization) {
-      rtiNeed = new TrivialRuntimeTypesNeed(_elementMap.elementEnvironment);
+      rtiNeed = TrivialRuntimeTypesNeed(_elementMap.elementEnvironment);
       closureData = _closureDataBuilder.createClosureEntities(
           this,
           map.toBackendMemberMap(closureModels, identity),
@@ -142,14 +142,14 @@
     } else {
       RuntimeTypesNeedImpl kernelRtiNeed = closedWorld.rtiNeed;
       Set<ir.LocalFunction> localFunctionsNodesNeedingSignature =
-          new Set<ir.LocalFunction>();
+          Set<ir.LocalFunction>();
       for (KLocalFunction localFunction
           in kernelRtiNeed.localFunctionsNeedingSignature) {
         ir.LocalFunction node = localFunction.node;
         localFunctionsNodesNeedingSignature.add(node);
       }
       Set<ir.LocalFunction> localFunctionsNodesNeedingTypeArguments =
-          new Set<ir.LocalFunction>();
+          Set<ir.LocalFunction>();
       for (KLocalFunction localFunction
           in kernelRtiNeed.localFunctionsNeedingTypeArguments) {
         ir.LocalFunction node = localFunction.node;
@@ -161,9 +161,7 @@
       closureData = _closureDataBuilder.createClosureEntities(
           this,
           map.toBackendMemberMap(closureModels, identity),
-          new JsClosureRtiNeed(
-              jRtiNeed,
-              localFunctionsNodesNeedingTypeArguments,
+          JsClosureRtiNeed(jRtiNeed, localFunctionsNodesNeedingTypeArguments,
               localFunctionsNodesNeedingSignature),
           callMethods);
 
@@ -190,7 +188,7 @@
         _convertBackendUsage(map, closedWorld.backendUsage);
 
     NoSuchMethodDataImpl oldNoSuchMethodData = closedWorld.noSuchMethodData;
-    NoSuchMethodData noSuchMethodData = new NoSuchMethodDataImpl(
+    NoSuchMethodData noSuchMethodData = NoSuchMethodDataImpl(
         map.toBackendFunctionSet(oldNoSuchMethodData.throwingImpls),
         map.toBackendFunctionSet(oldNoSuchMethodData.otherImpls),
         map.toBackendFunctionSet(oldNoSuchMethodData.forwardingSyntaxImpls));
@@ -199,7 +197,7 @@
         JFieldAnalysis.from(closedWorld, map, _options);
 
     AnnotationsDataImpl oldAnnotationsData = closedWorld.annotationsData;
-    AnnotationsData annotationsData = new AnnotationsDataImpl(_options,
+    AnnotationsData annotationsData = AnnotationsDataImpl(_options,
         map.toBackendMemberMap(oldAnnotationsData.pragmaAnnotations, identity));
 
     OutputUnitData outputUnitData =
@@ -208,9 +206,9 @@
     Map<MemberEntity, MemberAccess> memberAccess = map.toBackendMemberMap(
         closedWorld.liveMemberUsage,
         (MemberUsage usage) =>
-            new MemberAccess(usage.reads, usage.writes, usage.invokes));
+            MemberAccess(usage.reads, usage.writes, usage.invokes));
 
-    return new JsClosedWorld(
+    return JsClosedWorld(
         _elementMap,
         nativeData,
         interceptorData,
@@ -229,7 +227,7 @@
         extractTypeArgumentsInterfacesNewRti,
         mixinUses,
         typesImplementedBySubclasses,
-        new ClassHierarchyImpl(
+        ClassHierarchyImpl(
             _elementMap.commonElements, _classHierarchyNodes, _classSets),
         _abstractValueStrategy,
         annotationsData,
@@ -250,7 +248,7 @@
         map.toBackendClassSet(backendUsage.helperClassesUsed);
     Set<RuntimeTypeUse> runtimeTypeUses =
         backendUsage.runtimeTypeUses.map((RuntimeTypeUse runtimeTypeUse) {
-      return new RuntimeTypeUse(
+      return RuntimeTypeUse(
           runtimeTypeUse.kind,
           map.toBackendType(runtimeTypeUse.receiverType),
           map.toBackendType(runtimeTypeUse.argumentType));
@@ -290,7 +288,7 @@
         map.toBackendClassSet(nativeBasicData.anonymousJsInteropClasses);
     Map<MemberEntity, String> jsInteropMembers =
         map.toBackendMemberMap(nativeBasicData.jsInteropMembers, identity);
-    return new NativeBasicDataImpl(
+    return NativeBasicDataImpl(
         _elementEnvironment,
         nativeBasicData.isAllowInteropUsed,
         nativeClassTagInfo,
@@ -314,7 +312,7 @@
     }
 
     NativeBehavior convertNativeBehavior(NativeBehavior behavior) {
-      NativeBehavior newBehavior = new NativeBehavior();
+      NativeBehavior newBehavior = NativeBehavior();
 
       for (dynamic type in behavior.typesReturned) {
         newBehavior.typesReturned.add(convertNativeBehaviorType(type));
@@ -353,7 +351,7 @@
     Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior =
         map.toBackendMemberMap(
             nativeData.nativeFieldStoreBehavior, convertNativeBehavior);
-    return new NativeDataImpl(
+    return NativeDataImpl(
         nativeBasicData,
         nativeMemberName,
         nativeMethodBehavior,
@@ -369,7 +367,7 @@
         .forEach((String name, Set<MemberEntity> members) {
       interceptedMembers[name] = map.toBackendMemberSet(members);
     });
-    return new InterceptorDataImpl(
+    return InterceptorDataImpl(
         nativeData,
         _commonElements,
         interceptedMembers,
@@ -389,16 +387,16 @@
     Set<Selector> selectorsNeedingTypeArguments =
         rtiNeed.selectorsNeedingTypeArguments.map((Selector selector) {
       if (selector.memberName.isPrivate) {
-        return new Selector(
+        return Selector(
             selector.kind,
-            new PrivateName(selector.memberName.text,
+            PrivateName(selector.memberName.text,
                 map.toBackendLibrary(selector.memberName.library),
                 isSetter: selector.memberName.isSetter),
             selector.callStructure);
       }
       return selector;
     }).toSet();
-    return new RuntimeTypesNeedImpl(
+    return RuntimeTypesNeedImpl(
         _elementEnvironment,
         classesNeedingTypeArguments,
         methodsNeedingSignature,
@@ -433,10 +431,10 @@
     // Tell the hierarchy that this is the super class. then we can use
     // .getSupertypes(class)
     ClassHierarchyNode parentNode = _classHierarchyNodes[superclass];
-    ClassHierarchyNode node = new ClassHierarchyNode(parentNode,
+    ClassHierarchyNode node = ClassHierarchyNode(parentNode,
         closureClassInfo.closureClassEntity, parentNode.hierarchyDepth + 1);
     _classHierarchyNodes[closureClassInfo.closureClassEntity] = node;
-    _classSets[closureClassInfo.closureClassEntity] = new ClassSet(node);
+    _classSets[closureClassInfo.closureClassEntity] = ClassSet(node);
     node.isDirectlyInstantiated = true;
 
     return closureClassInfo;
@@ -512,7 +510,7 @@
       return result;
     }
 
-    return new OutputUnitData.from(
+    return OutputUnitData.from(
         data,
         map.toBackendLibrary,
         convertClassMap,
@@ -607,9 +605,10 @@
   /// returned instead.
   MemberEntity toBackendMember(MemberEntity member);
 
-  DartType toBackendType(DartType type, {bool allowFreeVariables: false});
+  DartType toBackendType(DartType type, {bool allowFreeVariables = false});
 
-  ConstantValue toBackendConstant(ConstantValue value, {bool allowNull: false});
+  ConstantValue toBackendConstant(ConstantValue value,
+      {bool allowNull = false});
 
   /// Register [closureData] with this map.
   ///
@@ -635,7 +634,7 @@
   }
 
   Set<FieldEntity> toBackendFieldSet(Iterable<FieldEntity> set) {
-    Set<FieldEntity> newSet = new Set<FieldEntity>();
+    Set<FieldEntity> newSet = Set<FieldEntity>();
     for (FieldEntity element in set) {
       FieldEntity backendField = toBackendMember(element);
       if (backendField != null) {
@@ -647,7 +646,7 @@
   }
 
   Set<FunctionEntity> toBackendFunctionSet(Iterable<FunctionEntity> set) {
-    Set<FunctionEntity> newSet = new Set<FunctionEntity>();
+    Set<FunctionEntity> newSet = Set<FunctionEntity>();
     for (FunctionEntity element in set) {
       FunctionEntity backendFunction = toBackendMember(element);
       if (backendFunction != null) {
@@ -678,7 +677,7 @@
 
 Map<K, V2> convertMap<K, V1, V2>(
     Map<K, V1> map, K convertKey(K key), V2 convertValue(V1 value)) {
-  Map<K, V2> newMap = <K, V2>{};
+  Map<K, V2> newMap = {};
   map.forEach((K key, V1 value) {
     K newKey = convertKey(key);
     V2 newValue = convertValue(value);
@@ -697,10 +696,10 @@
   JsToFrontendMapImpl(this._backend);
 
   @override
-  DartType toBackendType(DartType type, {bool allowFreeVariables: false}) =>
+  DartType toBackendType(DartType type, {bool allowFreeVariables = false}) =>
       type == null
           ? null
-          : new _TypeConverter(_backend.types,
+          : _TypeConverter(_backend.types,
                   allowFreeVariables: allowFreeVariables)
               .visit(type, toBackendEntity);
 
@@ -754,28 +753,28 @@
 
   @override
   ConstantValue toBackendConstant(ConstantValue constant,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (constant == null) {
       if (!allowNull) {
-        throw new UnsupportedError('Null not allowed as constant value.');
+        throw UnsupportedError('Null not allowed as constant value.');
       }
       return null;
     }
     return constant.accept(
-        new _ConstantConverter(_backend.types, toBackendEntity), null);
+        _ConstantConverter(_backend.types, toBackendEntity), null);
   }
 }
 
-typedef Entity _EntityConverter(Entity cls);
+typedef _EntityConverter = Entity Function(Entity cls);
 
 class _TypeConverter implements DartTypeVisitor<DartType, _EntityConverter> {
   final DartTypes _dartTypes;
   final bool allowFreeVariables;
 
-  Map<FunctionTypeVariable, FunctionTypeVariable> _functionTypeVariables =
-      <FunctionTypeVariable, FunctionTypeVariable>{};
+  final Map<FunctionTypeVariable, FunctionTypeVariable> _functionTypeVariables =
+      {};
 
-  _TypeConverter(this._dartTypes, {this.allowFreeVariables: false});
+  _TypeConverter(this._dartTypes, {this.allowFreeVariables = false});
 
   List<DartType> convertTypes(
           List<DartType> types, _EntityConverter converter) =>
@@ -885,7 +884,7 @@
   final _TypeConverter typeConverter;
 
   _ConstantConverter(this._dartTypes, this.toBackendEntity)
-      : typeConverter = new _TypeConverter(_dartTypes);
+      : typeConverter = _TypeConverter(_dartTypes);
 
   @override
   ConstantValue visitNull(NullConstantValue constant, _) => constant;
@@ -914,7 +913,7 @@
 
   @override
   ConstantValue visitFunction(FunctionConstantValue constant, _) {
-    return new FunctionConstantValue(toBackendEntity(constant.element),
+    return FunctionConstantValue(toBackendEntity(constant.element),
         typeConverter.visit(constant.type, toBackendEntity));
   }
 
@@ -925,7 +924,7 @@
     if (identical(entries, constant.entries) && type == constant.type) {
       return constant;
     }
-    return new ListConstantValue(type, entries);
+    return ListConstantValue(type, entries);
   }
 
   @override
@@ -936,7 +935,7 @@
     if (identical(entries, constant.entries) && type == constant.type) {
       return constant;
     }
-    return new constant_system.JavaScriptSetConstant(type, entries);
+    return constant_system.JavaScriptSetConstant(type, entries);
   }
 
   @override
@@ -950,7 +949,7 @@
         type == constant.type) {
       return constant;
     }
-    return new constant_system.JavaScriptMapConstant(
+    return constant_system.JavaScriptMapConstant(
         type, keys, values, constant.onlyStringKeys);
   }
 
@@ -963,7 +962,7 @@
       assert(backendField != null, "No backend field for $f.");
       fields[backendField] = v.accept(this, null);
     });
-    return new ConstructedConstantValue(type, fields);
+    return ConstructedConstantValue(type, fields);
   }
 
   @override
@@ -974,20 +973,20 @@
     if (type == constant.type && representedType == constant.representedType) {
       return constant;
     }
-    return new TypeConstantValue(representedType, type);
+    return TypeConstantValue(representedType, type);
   }
 
   @override
   ConstantValue visitInterceptor(InterceptorConstantValue constant, _) {
     // Interceptor constants are only created in the SSA graph builder.
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "Unexpected visitInterceptor ${constant.toStructuredText(_dartTypes)}");
   }
 
   @override
   ConstantValue visitDeferredGlobal(DeferredGlobalConstantValue constant, _) {
     // Deferred global constants are only created in the SSA graph builder.
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "Unexpected DeferredGlobalConstantValue ${constant.toStructuredText(_dartTypes)}");
   }
 
@@ -996,7 +995,7 @@
     ConstantValue function = constant.function.accept(this, null);
     List<DartType> typeArguments =
         typeConverter.convertTypes(constant.typeArguments, toBackendEntity);
-    return new InstantiationConstantValue(typeArguments, function);
+    return InstantiationConstantValue(typeArguments, function);
   }
 
   List<ConstantValue> _handleValues(List<ConstantValue> values) {
diff --git a/pkg/compiler/lib/src/js_model/locals.dart b/pkg/compiler/lib/src/js_model/locals.dart
index 103c5a8..6f88356 100644
--- a/pkg/compiler/lib/src/js_model/locals.dart
+++ b/pkg/compiler/lib/src/js_model/locals.dart
@@ -44,14 +44,14 @@
     int mapCount = source.readInt();
     for (int i = 0; i < mapCount; i++) {
       KernelToLocalsMap localsMap =
-          new KernelToLocalsMapImpl.readFromDataSource(source);
+          KernelToLocalsMapImpl.readFromDataSource(source);
       List<MemberEntity> members = source.readMembers();
       for (MemberEntity member in members) {
         _localsMaps[member] = localsMap;
       }
     }
     source.end(tag);
-    return new GlobalLocalsMap.internal(localMapKeyLookup, _localsMaps);
+    return GlobalLocalsMap.internal(localMapKeyLookup, _localsMaps);
   }
 
   /// Serializes this [GlobalLocalsMap] to [sink].
@@ -89,7 +89,7 @@
     // constructor steps.
     MemberEntity entity = key;
     if (entity is ConstructorBodyEntity) key = entity.constructor;
-    return _localsMaps.putIfAbsent(key, () => new KernelToLocalsMapImpl(key));
+    return _localsMaps.putIfAbsent(key, () => KernelToLocalsMapImpl(key));
   }
 }
 
@@ -303,7 +303,7 @@
 
   JJumpTarget _getJumpTarget(ir.TreeNode node) {
     return jumpTargetMap.putIfAbsent(node, () {
-      return new JJumpTarget(member, jumpIndex++,
+      return JJumpTarget(member, jumpIndex++,
           isSwitch: node is ir.SwitchStatement,
           isSwitchCase: node is ir.SwitchCase);
     });
@@ -469,10 +469,10 @@
   bool isContinueTarget;
 
   JJumpTarget(this.memberContext, this.nestingLevel,
-      {this.isSwitch: false,
-      this.isSwitchCase: false,
-      this.isBreakTarget: false,
-      this.isContinueTarget: false});
+      {this.isSwitch = false,
+      this.isSwitchCase = false,
+      this.isBreakTarget = false,
+      this.isContinueTarget = false});
 
   /// Deserializes a [JJumpTarget] object from [source].
   factory JJumpTarget.readFromDataSource(DataSource source) {
@@ -483,7 +483,7 @@
     bool isSwitchCase = source.readBool();
     bool isBreakTarget = source.readBool();
     bool isContinueTarget = source.readBool();
-    JJumpTarget target = new JJumpTarget(memberContext, nestingLevel,
+    JJumpTarget target = JJumpTarget(memberContext, nestingLevel,
         isSwitch: isSwitch,
         isSwitchCase: isSwitchCase,
         isBreakTarget: isBreakTarget,
@@ -524,9 +524,9 @@
 
   @override
   LabelDefinition addLabel(String labelName,
-      {bool isBreakTarget: false, bool isContinueTarget: false}) {
+      {bool isBreakTarget = false, bool isContinueTarget = false}) {
     _labels ??= <LabelDefinition>[];
-    LabelDefinition labelDefinition = new JLabelDefinition(this, labelName,
+    LabelDefinition labelDefinition = JLabelDefinition(this, labelName,
         isBreakTarget: isBreakTarget, isContinueTarget: isContinueTarget);
     _labels.add(labelDefinition);
     return labelDefinition;
@@ -539,7 +539,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('JJumpTarget(');
     sb.write('memberContext=');
     sb.write(memberContext);
@@ -569,13 +569,13 @@
   bool isContinueTarget;
 
   JLabelDefinition(this.target, this.labelName,
-      {this.isBreakTarget: false, this.isContinueTarget: false});
+      {this.isBreakTarget = false, this.isContinueTarget = false});
 
   @override
   String get name => labelName;
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('JLabelDefinition(');
     sb.write(',labelName=');
     sb.write(labelName);
@@ -596,7 +596,7 @@
   /// True if this local represents a local parameter.
   final bool isRegularParameter;
 
-  JLocal(this.name, this.memberContext, {this.isRegularParameter: false}) {
+  JLocal(this.name, this.memberContext, {this.isRegularParameter = false}) {
     assert(memberContext is! JGeneratorBody);
   }
 
@@ -604,7 +604,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('$_kind(');
     if (memberContext.enclosingClass != null) {
       sb.write(memberContext.enclosingClass.name);
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index 4510755..3b8b71b 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -62,19 +62,6 @@
   return allowedNativeTest(uri) || allowedDartLibrary();
 }
 
-int _foldLateLowerings(List<int> lowerings) =>
-    lowerings.fold(LateLowering.none, (a, b) => a | b);
-
-/// Late lowerings which the frontend performs for dart2js.
-const List<int> _allEnabledLateLowerings = [
-  LateLowering.uninitializedNonFinalInstanceField,
-  LateLowering.uninitializedFinalInstanceField,
-  LateLowering.initializedNonFinalInstanceField,
-  LateLowering.initializedFinalInstanceField,
-];
-
-final int _enabledLateLowerings = _foldLateLowerings(_allEnabledLateLowerings);
-
 /// A kernel [Target] to configure the Dart Front End for dart2js.
 class Dart2jsTarget extends Target {
   @override
@@ -90,10 +77,7 @@
   bool get enableNoSuchMethodForwarders => true;
 
   @override
-  int get enabledLateLowerings =>
-      (options != null && options!.experimentLateInstanceVariables)
-          ? LateLowering.none
-          : _enabledLateLowerings;
+  int get enabledLateLowerings => LateLowering.none;
 
   @override
   bool get supportsLateLoweringSentinel => true;
@@ -160,14 +144,14 @@
     var nativeClasses = JsInteropChecks.getNativeClasses(component);
     var jsUtilOptimizer = JsUtilOptimizer(coreTypes, hierarchy);
     for (var library in libraries) {
-      // TODO (rileyporter): Merge js_util optimizations with other lowerings
-      // in the single pass in `transformations/lowering.dart`.
-      jsUtilOptimizer.visitLibrary(library);
       JsInteropChecks(
               coreTypes,
               diagnosticReporter as DiagnosticReporter<Message, LocatedMessage>,
               nativeClasses)
           .visitLibrary(library);
+      // TODO (rileyporter): Merge js_util optimizations with other lowerings
+      // in the single pass in `transformations/lowering.dart`.
+      jsUtilOptimizer.visitLibrary(library);
     }
     lowering.transformLibraries(libraries, coreTypes, hierarchy, options);
     logger?.call("Lowering transformations performed");
@@ -193,24 +177,24 @@
     } else {
       kind = invocationMirrorMethodKind;
     }
-    return new ir.StaticInvocation(
+    return ir.StaticInvocation(
         coreTypes.index
             .getTopLevelProcedure('dart:core', '_createInvocationMirror'),
-        new ir.Arguments(<ir.Expression>[
-          new ir.StringLiteral(name)..fileOffset = offset,
-          new ir.ListLiteral(
-              arguments.types.map((t) => new ir.TypeLiteral(t)).toList()),
-          new ir.ListLiteral(arguments.positional)..fileOffset = offset,
-          new ir.MapLiteral(new List<ir.MapLiteralEntry>.from(
+        ir.Arguments(<ir.Expression>[
+          ir.StringLiteral(name)..fileOffset = offset,
+          ir.ListLiteral(
+              arguments.types.map((t) => ir.TypeLiteral(t)).toList()),
+          ir.ListLiteral(arguments.positional)..fileOffset = offset,
+          ir.MapLiteral(List<ir.MapLiteralEntry>.from(
               arguments.named.map((ir.NamedExpression arg) {
-            return new ir.MapLiteralEntry(
-                new ir.StringLiteral(arg.name)..fileOffset = arg.fileOffset,
+            return ir.MapLiteralEntry(
+                ir.StringLiteral(arg.name)..fileOffset = arg.fileOffset,
                 arg.value)
               ..fileOffset = arg.fileOffset;
           })), keyType: coreTypes.stringNonNullableRawType)
             ..isConst = (arguments.named.length == 0)
             ..fileOffset = arguments.fileOffset,
-          new ir.IntLiteral(kind)..fileOffset = offset,
+          ir.IntLiteral(kind)..fileOffset = offset,
         ]))
       ..fileOffset = offset;
   }
@@ -218,28 +202,28 @@
   @override
   ir.Expression instantiateNoSuchMethodError(CoreTypes coreTypes,
       ir.Expression receiver, String name, ir.Arguments arguments, int offset,
-      {bool isMethod: false,
-      bool isGetter: false,
-      bool isSetter: false,
-      bool isField: false,
-      bool isLocalVariable: false,
-      bool isDynamic: false,
-      bool isSuper: false,
-      bool isStatic: false,
-      bool isConstructor: false,
-      bool isTopLevel: false}) {
+      {bool isMethod = false,
+      bool isGetter = false,
+      bool isSetter = false,
+      bool isField = false,
+      bool isLocalVariable = false,
+      bool isDynamic = false,
+      bool isSuper = false,
+      bool isStatic = false,
+      bool isConstructor = false,
+      bool isTopLevel = false}) {
     // TODO(sigmund): implement;
-    return new ir.InvalidExpression(null);
+    return ir.InvalidExpression(null);
   }
 
   @override
-  ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
+  ConstantsBackend get constantsBackend =>
       const Dart2jsConstantsBackend(supportsUnevaluatedConstants: true);
 }
 
 // TODO(sigmund): this "extraRequiredLibraries" needs to be removed...
 // compile-platform should just specify which libraries to compile instead.
-const _requiredLibraries = const <String, List<String>>{
+const _requiredLibraries = <String, List<String>>{
   'dart2js': [
     'dart:_dart2js_runtime_metrics',
     'dart:_foreign_helper',
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index dd59226..e92452a 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -106,7 +106,7 @@
   /// Computes the [ConstantValue] for the constant [expression].
   ConstantValue getConstantValue(
       ir.StaticTypeContext staticTypeContext, ir.Expression expression,
-      {bool requireConstant: true, bool implicitNull: false});
+      {bool requireConstant = true, bool implicitNull = false});
 
   /// Return the [ImportEntity] corresponding to [node].
   ImportEntity getImport(ir.LibraryDependency node);
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 7bf5db7..1647344 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -77,16 +77,16 @@
   ConstantValuefier _constantValuefier;
 
   /// Library environment. Used for fast lookup.
-  KProgramEnv env = new KProgramEnv();
+  KProgramEnv env = KProgramEnv();
 
   final EntityDataEnvMap<IndexedLibrary, KLibraryData, KLibraryEnv> libraries =
-      new EntityDataEnvMap<IndexedLibrary, KLibraryData, KLibraryEnv>();
+      EntityDataEnvMap<IndexedLibrary, KLibraryData, KLibraryEnv>();
   final EntityDataEnvMap<IndexedClass, KClassData, KClassEnv> classes =
-      new EntityDataEnvMap<IndexedClass, KClassData, KClassEnv>();
+      EntityDataEnvMap<IndexedClass, KClassData, KClassEnv>();
   final EntityDataMap<IndexedMember, KMemberData> members =
-      new EntityDataMap<IndexedMember, KMemberData>();
+      EntityDataMap<IndexedMember, KMemberData>();
   final EntityDataMap<IndexedTypeVariable, KTypeVariableData> typeVariables =
-      new EntityDataMap<IndexedTypeVariable, KTypeVariableData>();
+      EntityDataMap<IndexedTypeVariable, KTypeVariableData>();
 
   /// Set to `true` before creating the J-World from the K-World to assert that
   /// no entities are created late.
@@ -109,17 +109,17 @@
   final Map<ir.TreeNode, Local> localFunctionMap = {};
 
   BehaviorBuilder _nativeBehaviorBuilder;
-  FrontendStrategy _frontendStrategy;
+  final FrontendStrategy _frontendStrategy;
 
   Map<KMember, Map<ir.Expression, TypeMap>> typeMapsForTesting;
 
   KernelToElementMapImpl(
       this.reporter, this._environment, this._frontendStrategy, this.options) {
-    _elementEnvironment = new KernelElementEnvironment(this);
-    _typeConverter = new DartTypeConverter(this);
-    _types = new KernelDartTypes(this, options);
-    _commonElements = new CommonElementsImpl(_types, _elementEnvironment);
-    _constantValuefier = new ConstantValuefier(this);
+    _elementEnvironment = KernelElementEnvironment(this);
+    _typeConverter = DartTypeConverter(this);
+    _types = KernelDartTypes(this, options);
+    _commonElements = CommonElementsImpl(_types, _elementEnvironment);
+    _constantValuefier = ConstantValuefier(this);
   }
 
   @override
@@ -183,7 +183,7 @@
   }
 
   MemberEntity lookupLibraryMember(IndexedLibrary library, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     assert(checkFamily(library));
     KLibraryEnv libraryEnv = libraries.getEnv(library);
     ir.Member member = libraryEnv.lookupMember(name, setter: setter);
@@ -238,7 +238,7 @@
   }
 
   MemberEntity lookupClassMember(IndexedClass cls, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     assert(checkFamily(cls));
     KClassEnv classEnv = classes.getEnv(cls);
     return classEnv.lookupMember(this, name, setter: setter);
@@ -293,14 +293,13 @@
       } else {
         data.thisType = types.interfaceType(
             cls,
-            new List<DartType>.generate(node.typeParameters.length,
-                (int index) {
+            List<DartType>.generate(node.typeParameters.length, (int index) {
               return types.typeVariableType(
                   getTypeVariableInternal(node.typeParameters[index]));
             }));
         data.rawType = types.interfaceType(
             cls,
-            new List<DartType>.filled(
+            List<DartType>.filled(
                 node.typeParameters.length, types.dynamicType()));
       }
     }
@@ -348,7 +347,7 @@
       ir.Class node = data.node;
 
       if (node.supertype == null) {
-        data.orderedTypeSet = new OrderedTypeSet.singleton(data.thisType);
+        data.orderedTypeSet = OrderedTypeSet.singleton(data.thisType);
         data.isMixinApplication = false;
         data.interfaces = const <InterfaceType>[];
       } else {
@@ -428,7 +427,7 @@
           interfaces.add(processSupertype(supertype));
         });
         OrderedTypeSetBuilder setBuilder =
-            new KernelOrderedTypeSetBuilder(this, cls);
+            KernelOrderedTypeSetBuilder(this, cls);
         data.orderedTypeSet =
             setBuilder.createOrderedTypeSet(canonicalSupertypes);
         data.interfaces = interfaces;
@@ -449,7 +448,7 @@
         return getMethodInternal(node);
       }
     }
-    throw new UnsupportedError("Unexpected member: $node");
+    throw UnsupportedError("Unexpected member: $node");
   }
 
   @override
@@ -518,7 +517,8 @@
 
     DartType getParameterType(ir.VariableDeclaration variable) {
       // isCovariant implies this FunctionNode is a class Procedure.
-      var isCovariant = variable.isCovariant || variable.isGenericCovariantImpl;
+      var isCovariant =
+          variable.isCovariantByDeclaration || variable.isCovariantByClass;
       var isFromNonNullableByDefaultLibrary = isCovariant &&
           (node.parent as ir.Procedure).enclosingLibrary.isNonNullableByDefault;
       return types.getTearOffParameterType(getDartType(variable.type),
@@ -548,10 +548,10 @@
     if (node.typeParameters.isNotEmpty) {
       List<DartType> typeParameters = <DartType>[];
       for (ir.TypeParameter typeParameter in node.typeParameters) {
-        typeParameters.add(getDartType(new ir.TypeParameterType(
-            typeParameter, ir.Nullability.nonNullable)));
+        typeParameters.add(getDartType(
+            ir.TypeParameterType(typeParameter, ir.Nullability.nonNullable)));
       }
-      typeVariables = new List<FunctionTypeVariable>.generate(
+      typeVariables = List<FunctionTypeVariable>.generate(
           node.typeParameters.length,
           (int index) => types.functionTypeVariable(index));
 
@@ -720,7 +720,7 @@
   void forEachInjectedClassMember(
       IndexedClass cls, void f(MemberEntity member)) {
     assert(checkFamily(cls));
-    throw new UnsupportedError(
+    throw UnsupportedError(
         'KernelToElementMapBase._forEachInjectedClassMember');
   }
 
@@ -808,11 +808,11 @@
   @override
   ir.StaticTypeContext getStaticTypeContext(MemberEntity member) {
     // TODO(johnniwinther): Cache the static type context.
-    return new ir.StaticTypeContext(getMemberNode(member), typeEnvironment);
+    return ir.StaticTypeContext(getMemberNode(member), typeEnvironment);
   }
 
   Dart2jsConstantEvaluator get constantEvaluator {
-    return _constantEvaluator ??= new Dart2jsConstantEvaluator(typeEnvironment,
+    return _constantEvaluator ??= Dart2jsConstantEvaluator(typeEnvironment,
         (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
       reportLocatedMessage(reporter, message, context);
     },
@@ -824,22 +824,20 @@
 
   @override
   Name getName(ir.Name name) {
-    return new Name(
-        name.text, name.isPrivate ? getLibrary(name.library) : null);
+    return Name(name.text, name.isPrivate ? getLibrary(name.library) : null);
   }
 
   @override
   CallStructure getCallStructure(ir.Arguments arguments) {
     int argumentCount = arguments.positional.length + arguments.named.length;
     List<String> namedArguments = arguments.named.map((e) => e.name).toList();
-    return new CallStructure(
-        argumentCount, namedArguments, arguments.types.length);
+    return CallStructure(argumentCount, namedArguments, arguments.types.length);
   }
 
   ParameterStructure getParameterStructure(ir.FunctionNode node,
       // TODO(johnniwinther): Remove this when type arguments are passed to
       // constructors like calling a generic method.
-      {bool includeTypeParameters: true}) {
+      {bool includeTypeParameters = true}) {
     // TODO(johnniwinther): Cache the computed function type.
     int requiredPositionalParameters = node.requiredParameterCount;
     int positionalParameters = node.positionalParameters.length;
@@ -877,29 +875,29 @@
       kind = SelectorKind.CALL;
     }
 
-    CallStructure callStructure = new CallStructure(
+    CallStructure callStructure = CallStructure(
         positionalArguments + namedArguments.length,
         namedArguments,
         typeArguments);
-    return new Selector(kind, name, callStructure);
+    return Selector(kind, name, callStructure);
   }
 
   Selector getGetterSelector(ir.Name irName) {
-    Name name = new Name(
-        irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
-    return new Selector.getter(name);
+    Name name =
+        Name(irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
+    return Selector.getter(name);
   }
 
   Selector getSetterSelector(ir.Name irName) {
-    Name name = new Name(
-        irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
-    return new Selector.setter(name);
+    Name name =
+        Name(irName.text, irName.isPrivate ? getLibrary(irName.library) : null);
+    return Selector.setter(name);
   }
 
   /// Looks up [typeName] for use in the spec-string of a `JS` call.
   // TODO(johnniwinther): Use this in [NativeBehavior] instead of calling
   // the `ForeignResolver`.
-  TypeLookup typeLookup({bool resolveAsRaw: true}) {
+  TypeLookup typeLookup({bool resolveAsRaw = true}) {
     return resolveAsRaw
         ? (_cachedTypeLookupRaw ??= _typeLookup(resolveAsRaw: true))
         : (_cachedTypeLookupFull ??= _typeLookup(resolveAsRaw: false));
@@ -908,7 +906,7 @@
   TypeLookup _cachedTypeLookupRaw;
   TypeLookup _cachedTypeLookupFull;
 
-  TypeLookup _typeLookup({bool resolveAsRaw: true}) {
+  TypeLookup _typeLookup({bool resolveAsRaw = true}) {
     bool cachedMayLookupInMain;
 
     DartType lookup(String typeName, {bool required}) {
@@ -967,7 +965,7 @@
   }
 
   String _getStringArgument(ir.StaticInvocation node, int index) {
-    return node.arguments.positional[index].accept(new Stringifier());
+    return node.arguments.positional[index].accept(Stringifier());
   }
 
   // TODO(johnniwinther): Cache this for later use.
@@ -977,20 +975,20 @@
         node.arguments.named.isNotEmpty) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
 
     String codeString = _getStringArgument(node, 1);
     if (codeString == null) {
       reporter.reportErrorMessage(
           CURRENT_ELEMENT_SPANNABLE, MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND);
-      return new NativeBehavior();
+      return NativeBehavior();
     }
 
     return NativeBehavior.ofJsCall(
@@ -1008,18 +1006,18 @@
     if (node.arguments.positional.length < 1) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS builtin expression has no type.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length < 2) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS builtin is missing name.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "Unexpected first argument.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     return NativeBehavior.ofJsBuiltinCall(
         specString,
@@ -1036,24 +1034,24 @@
     if (node.arguments.positional.length < 1) {
       reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
           "JS embedded global expression has no type.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length < 2) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "JS embedded global is missing name.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     if (node.arguments.positional.length > 2 ||
         node.arguments.named.isNotEmpty) {
       reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
           "JS embedded global has more than 2 arguments.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     String specString = _getStringArgument(node, 0);
     if (specString == null) {
       reporter.internalError(
           CURRENT_ELEMENT_SPANNABLE, "Unexpected first argument.");
-      return new NativeBehavior();
+      return NativeBehavior();
     }
     return NativeBehavior.ofJsEmbeddedGlobalCall(
         specString,
@@ -1089,21 +1087,21 @@
   @override
   ConstantValue getConstantValue(
       ir.StaticTypeContext staticTypeContext, ir.Expression node,
-      {bool requireConstant: true,
-      bool implicitNull: false,
-      bool checkCasts: true}) {
+      {bool requireConstant = true,
+      bool implicitNull = false,
+      bool checkCasts = true}) {
     if (node == null) {
       if (!implicitNull) {
         throw failedAt(
             CURRENT_ELEMENT_SPANNABLE, 'No expression for constant.');
       }
-      return new NullConstantValue();
+      return NullConstantValue();
     }
     ir.Constant constant = constantEvaluator.evaluate(staticTypeContext, node,
         requireConstant: requireConstant);
     if (constant == null) {
       if (requireConstant) {
-        throw new UnsupportedError(
+        throw UnsupportedError(
             'No constant for ${DebugPrinter.prettyPrint(node)}');
       }
     } else {
@@ -1184,7 +1182,7 @@
     }
     IndexedLibrary library =
         createLibrary(name, canonicalUri, node.isNonNullableByDefault);
-    return libraries.register(library, new KLibraryData(node),
+    return libraries.register(library, KLibraryData(node),
         libraryEnv ?? env.lookupLibrary(canonicalUri));
   }
 
@@ -1203,7 +1201,7 @@
     }
     IndexedClass cls =
         createClass(library, node.name, isAbstract: node.isAbstract);
-    return classes.register(cls, new KClassDataImpl(node), classEnv);
+    return classes.register(cls, KClassDataImpl(node), classEnv);
   }
 
   TypeVariableEntity getTypeVariableInternal(ir.TypeParameter node) {
@@ -1220,7 +1218,7 @@
       int index = cls.typeParameters.indexOf(node);
       return typeVariables.register(
           createTypeVariable(getClassInternal(cls), node.name, index),
-          new KTypeVariableData(node));
+          KTypeVariableData(node));
     }
     if (node.parent is ir.FunctionNode) {
       ir.FunctionNode func = node.parent;
@@ -1238,18 +1236,18 @@
           return typeVariables.register(
               createTypeVariable(
                   getMethodInternal(procedure), node.name, index),
-              new KTypeVariableData(node));
+              KTypeVariableData(node));
         }
       } else if (func.parent is ir.LocalFunction) {
         // Ensure that local function type variables have been created.
         getLocalFunction(func.parent);
         return typeVariableMap[node];
       } else {
-        throw new UnsupportedError('Unsupported function type parameter parent '
+        throw UnsupportedError('Unsupported function type parameter parent '
             'node ${func.parent}.');
       }
     }
-    throw new UnsupportedError('Unsupported type parameter type node $node.');
+    throw UnsupportedError('Unsupported type parameter type node $node.');
   }
 
   ConstructorEntity getConstructorInternal(ir.Member node) {
@@ -1291,7 +1289,7 @@
           NO_LOCATION_SPANNABLE, "Unexpected constructor node: ${node}.");
     }
     return members.register<IndexedConstructor, KConstructorData>(
-        constructor, new KConstructorDataImpl(node, functionNode));
+        constructor, KConstructorDataImpl(node, functionNode));
   }
 
   FunctionEntity getMethodInternal(ir.Procedure node) {
@@ -1322,7 +1320,7 @@
     AsyncMarker asyncMarker = getAsyncMarker(node.function);
     switch (node.kind) {
       case ir.ProcedureKind.Factory:
-        throw new UnsupportedError("Cannot create method from factory.");
+        throw UnsupportedError("Cannot create method from factory.");
       case ir.ProcedureKind.Getter:
         function = createGetter(library, enclosingClass, name, asyncMarker,
             isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
@@ -1340,7 +1338,7 @@
         break;
     }
     members.register<IndexedFunction, KFunctionData>(
-        function, new KFunctionDataImpl(node, node.function));
+        function, KFunctionDataImpl(node, node.function));
     // We need to register the function before creating the type variables.
     methodMap[node] = function;
     for (ir.TypeParameter typeParameter in node.function.typeParameters) {
@@ -1373,7 +1371,7 @@
         isAssignable: node.hasSetter,
         isConst: node.isConst);
     return members.register<IndexedField, KFieldData>(
-        field, new KFieldDataImpl(node));
+        field, KFieldDataImpl(node));
   }
 
   bool checkFamily(Entity entity) {
@@ -1394,7 +1392,7 @@
   }
 
   BehaviorBuilder get nativeBehaviorBuilder =>
-      _nativeBehaviorBuilder ??= new KernelBehaviorBuilder(elementEnvironment,
+      _nativeBehaviorBuilder ??= KernelBehaviorBuilder(elementEnvironment,
           commonElements, nativeBasicData, reporter, options);
 
   ResolutionImpact computeWorldImpact(KMember member,
@@ -1410,7 +1408,7 @@
       }
       ImpactData impactData = impactBuilderData.impactData;
       memberData.staticTypes = impactBuilderData.cachedStaticTypes;
-      KernelImpactConverter converter = new KernelImpactConverter(
+      KernelImpactConverter converter = KernelImpactConverter(
           this,
           member,
           reporter,
@@ -1418,17 +1416,16 @@
           _constantValuefier,
           // TODO(johnniwinther): Pull the static type context from the cached
           // static types.
-          new ir.StaticTypeContext(node, typeEnvironment));
+          ir.StaticTypeContext(node, typeEnvironment));
       return converter.convert(impactData);
     } else {
-      StaticTypeCacheImpl staticTypeCache = new StaticTypeCacheImpl();
-      KernelImpactBuilder builder = new KernelImpactBuilder(
+      StaticTypeCacheImpl staticTypeCache = StaticTypeCacheImpl();
+      KernelImpactBuilder builder = KernelImpactBuilder(
           this,
           member,
           reporter,
           options,
-          new ir.StaticTypeContext(node, typeEnvironment,
-              cache: staticTypeCache),
+          ir.StaticTypeContext(node, typeEnvironment, cache: staticTypeCache),
           staticTypeCache,
           variableScopeModel,
           annotations,
@@ -1492,12 +1489,12 @@
         function = node.function;
       }
       localFunction = localFunctionMap[node] =
-          new KLocalFunction(name, memberContext, executableContext, node);
+          KLocalFunction(name, memberContext, executableContext, node);
       int index = 0;
       List<KLocalTypeVariable> typeVariables = <KLocalTypeVariable>[];
       for (ir.TypeParameter typeParameter in function.typeParameters) {
         typeVariables.add(typeVariableMap[typeParameter] =
-            new KLocalTypeVariable(localFunction, typeParameter.name, index));
+            KLocalTypeVariable(localFunction, typeParameter.name, index));
         index++;
       }
       index = 0;
@@ -1600,23 +1597,23 @@
 
   IndexedLibrary createLibrary(
       String name, Uri canonicalUri, bool isNonNullableByDefault) {
-    return new KLibrary(name, canonicalUri, isNonNullableByDefault);
+    return KLibrary(name, canonicalUri, isNonNullableByDefault);
   }
 
   IndexedClass createClass(LibraryEntity library, String name,
       {bool isAbstract}) {
-    return new KClass(library, name, isAbstract: isAbstract);
+    return KClass(library, name, isAbstract: isAbstract);
   }
 
   TypeVariableEntity createTypeVariable(
       Entity typeDeclaration, String name, int index) {
-    return new KTypeVariable(typeDeclaration, name, index);
+    return KTypeVariable(typeDeclaration, name, index);
   }
 
   IndexedConstructor createGenerativeConstructor(ClassEntity enclosingClass,
       Name name, ParameterStructure parameterStructure,
       {bool isExternal, bool isConst}) {
-    return new KGenerativeConstructor(enclosingClass, name, parameterStructure,
+    return KGenerativeConstructor(enclosingClass, name, parameterStructure,
         isExternal: isExternal, isConst: isConst);
   }
 
@@ -1625,7 +1622,7 @@
   IndexedConstructor createFactoryConstructor(ClassEntity enclosingClass,
       Name name, ParameterStructure parameterStructure,
       {bool isExternal, bool isConst, bool isFromEnvironmentConstructor}) {
-    return new KFactoryConstructor(enclosingClass, name, parameterStructure,
+    return KFactoryConstructor(enclosingClass, name, parameterStructure,
         isExternal: isExternal,
         isConst: isConst,
         isFromEnvironmentConstructor: isFromEnvironmentConstructor);
@@ -1634,7 +1631,7 @@
   IndexedFunction createGetter(LibraryEntity library,
       ClassEntity enclosingClass, Name name, AsyncMarker asyncMarker,
       {bool isStatic, bool isExternal, bool isAbstract}) {
-    return new KGetter(library, enclosingClass, name, asyncMarker,
+    return KGetter(library, enclosingClass, name, asyncMarker,
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
 
@@ -1647,7 +1644,7 @@
       {bool isStatic,
       bool isExternal,
       bool isAbstract}) {
-    return new KMethod(
+    return KMethod(
         library, enclosingClass, name, parameterStructure, asyncMarker,
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
@@ -1655,14 +1652,14 @@
   IndexedFunction createSetter(
       LibraryEntity library, ClassEntity enclosingClass, Name name,
       {bool isStatic, bool isExternal, bool isAbstract}) {
-    return new KSetter(library, enclosingClass, name,
+    return KSetter(library, enclosingClass, name,
         isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
   }
 
   IndexedField createField(
       LibraryEntity library, ClassEntity enclosingClass, Name name,
       {bool isStatic, bool isAssignable, bool isConst}) {
-    return new KField(library, enclosingClass, name,
+    return KField(library, enclosingClass, name,
         isStatic: isStatic, isAssignable: isAssignable, isConst: isConst);
   }
 }
@@ -1763,7 +1760,7 @@
 
   @override
   ConstructorEntity lookupConstructor(ClassEntity cls, String name,
-      {bool required: false}) {
+      {bool required = false}) {
     ConstructorEntity constructor = elementMap.lookupConstructor(cls, name);
     if (constructor == null && required) {
       throw failedAt(
@@ -1776,7 +1773,7 @@
 
   @override
   MemberEntity lookupLocalClassMember(ClassEntity cls, String name,
-      {bool setter: false, bool required: false}) {
+      {bool setter = false, bool required = false}) {
     MemberEntity member =
         elementMap.lookupClassMember(cls, name, setter: setter);
     if (member == null && required) {
@@ -1788,7 +1785,7 @@
 
   @override
   ClassEntity getSuperClass(ClassEntity cls,
-      {bool skipUnnamedMixinApplications: false}) {
+      {bool skipUnnamedMixinApplications = false}) {
     assert(elementMap.checkFamily(cls));
     ClassEntity superclass = elementMap.getSuperType(cls)?.element;
     if (skipUnnamedMixinApplications) {
@@ -1835,7 +1832,7 @@
 
   @override
   MemberEntity lookupLibraryMember(LibraryEntity library, String name,
-      {bool setter: false, bool required: false}) {
+      {bool setter = false, bool required = false}) {
     MemberEntity member =
         elementMap.lookupLibraryMember(library, name, setter: setter);
     if (member == null && required) {
@@ -1847,7 +1844,7 @@
 
   @override
   ClassEntity lookupClass(LibraryEntity library, String name,
-      {bool required: false}) {
+      {bool required = false}) {
     ClassEntity cls = elementMap.lookupClass(library, name);
     if (cls == null && required) {
       failedAt(CURRENT_ELEMENT_SPANNABLE,
@@ -1862,7 +1859,7 @@
   }
 
   @override
-  LibraryEntity lookupLibrary(Uri uri, {bool required: false}) {
+  LibraryEntity lookupLibrary(Uri uri, {bool required = false}) {
     LibraryEntity library = elementMap.lookupLibrary(uri);
     if (library == null && required) {
       failedAt(CURRENT_ELEMENT_SPANNABLE, "The library '$uri' was not found.");
@@ -1900,7 +1897,7 @@
 
   @override
   Iterable<ConstantValue> getMemberMetadata(covariant IndexedMember member,
-      {bool includeParameterMetadata: false}) {
+      {bool includeParameterMetadata = false}) {
     // TODO(redemption): Support includeParameterMetadata.
     assert(elementMap.checkFamily(member));
     KMemberData memberData = elementMap.members.getData(member);
@@ -1942,7 +1939,7 @@
 }
 
 class KernelNativeMemberResolver implements NativeMemberResolver {
-  static final RegExp _identifier = new RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$');
+  static final RegExp _identifier = RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$');
 
   final KernelToElementMapImpl _elementMap;
   final NativeBasicData _nativeBasicData;
@@ -2168,7 +2165,7 @@
 
 DiagnosticMessage _createDiagnosticMessage(
     DiagnosticReporter reporter, ir.LocatedMessage message) {
-  SourceSpan sourceSpan = new SourceSpan(
+  SourceSpan sourceSpan = SourceSpan(
       message.uri, message.charOffset, message.charOffset + message.length);
   return reporter.createMessage(
       sourceSpan, MessageKind.GENERIC, {'text': message.message});
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index 8b0b096..55f7892 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -28,7 +28,7 @@
 
 /// Environment for fast lookup of component libraries.
 class KProgramEnv {
-  final Set<ir.Component> _components = new Set<ir.Component>();
+  final Set<ir.Component> _components = Set<ir.Component>();
 
   Map<Uri, KLibraryEnv> _libraryMap;
 
@@ -47,7 +47,7 @@
 
   void _addLibraries(ir.Component component) {
     for (ir.Library library in component.libraries) {
-      _libraryMap[library.importUri] = new KLibraryEnv(library);
+      _libraryMap[library.importUri] = KLibraryEnv(library);
     }
   }
 
@@ -79,7 +79,7 @@
   }
 
   /// Convert this [KProgramEnv] to the corresponding [JProgramEnv].
-  JProgramEnv convert() => new JProgramEnv(_components);
+  JProgramEnv convert() => JProgramEnv(_components);
 }
 
 /// Environment for fast lookup of library classes and members.
@@ -96,7 +96,7 @@
     if (_classMap == null) {
       _classMap = <String, KClassEnv>{};
       for (ir.Class cls in library.classes) {
-        _classMap[cls.name] = new KClassEnvImpl(cls);
+        _classMap[cls.name] = KClassEnvImpl(cls);
       }
     }
   }
@@ -141,7 +141,7 @@
   }
 
   /// Return the [ir.Member] for the member [name] in [library].
-  ir.Member lookupMember(String name, {bool setter: false}) {
+  ir.Member lookupMember(String name, {bool setter = false}) {
     _ensureMemberMaps();
     return setter ? _setterMap[name] : _memberMap[name];
   }
@@ -186,7 +186,7 @@
         }
       });
     }
-    return new JLibraryEnv(library, memberMap, setterMap);
+    return JLibraryEnv(library, memberMap, setterMap);
   }
 }
 
@@ -200,7 +200,7 @@
 
   Iterable<ConstantValue> getMetadata(KernelToElementMapImpl elementMap) {
     return _metadata ??= elementMap.getMetadata(
-        new ir.StaticTypeContext.forAnnotations(
+        ir.StaticTypeContext.forAnnotations(
             library, elementMap.typeEnvironment),
         library.annotations);
   }
@@ -214,7 +214,7 @@
         imports = <ir.LibraryDependency, ImportEntity>{};
         dependencies.forEach((ir.LibraryDependency node) {
           if (node.isExport) return;
-          imports[node] = new ImportEntity(
+          imports[node] = ImportEntity(
               node.isDeferred,
               node.name,
               node.targetLibrary.importUri,
@@ -228,7 +228,7 @@
   /// Convert this [KLibraryData] to the corresponding [JLibraryData].
   // TODO(johnniwinther): Why isn't [imports] ensured to be non-null here?
   JLibraryData convert() {
-    return new JLibraryData(library, imports);
+    return JLibraryData(library, imports);
   }
 }
 
@@ -253,7 +253,7 @@
   /// is `true`, the setter or assignable field corresponding to [name] is
   /// returned.
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false});
+      {bool setter = false});
 
   /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
@@ -355,7 +355,7 @@
     void addProcedure(ir.Procedure member,
         {bool includeStatic,
         bool includeNoSuchMethodForwarders,
-        bool isFromMixinApplication: false}) {
+        bool isFromMixinApplication = false}) {
       if (memberIsIgnorable(member, cls: cls)) return;
       if (!includeStatic && member.isStatic) return;
       if (member.isNoSuchMethodForwarder) {
@@ -437,7 +437,7 @@
 
   @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
-      {bool setter: false}) {
+      {bool setter = false}) {
     _ensureMaps(elementMap);
     ir.Member member = setter ? _setterMap[name] : _memberMap[name];
     return member != null ? elementMap.getMember(member) : null;
@@ -528,7 +528,7 @@
         }
       });
     }
-    return new JClassEnvImpl(cls, constructorMap, memberMap, setterMap, members,
+    return JClassEnvImpl(cls, constructorMap, memberMap, setterMap, members,
         _isMixinApplicationWithMembers ?? false);
   }
 }
@@ -595,7 +595,7 @@
   Iterable<ConstantValue> getMetadata(
       covariant KernelToElementMapImpl elementMap) {
     return _metadata ??= elementMap.getMetadata(
-        new ir.StaticTypeContext.forAnnotations(
+        ir.StaticTypeContext.forAnnotations(
             node.enclosingLibrary, elementMap.typeEnvironment),
         node.annotations);
   }
@@ -606,7 +606,7 @@
 
   @override
   JClassData convert() {
-    return new JClassDataImpl(node, new RegularClassDefinition(node));
+    return JClassDataImpl(node, RegularClassDefinition(node));
   }
 }
 
@@ -640,7 +640,7 @@
   Iterable<ConstantValue> getMetadata(
       covariant KernelToElementMapImpl elementMap) {
     return _metadata ??= elementMap.getMetadata(
-        new ir.StaticTypeContext(node, elementMap.typeEnvironment),
+        ir.StaticTypeContext(node, elementMap.typeEnvironment),
         node.annotations);
   }
 
@@ -684,7 +684,7 @@
           _typeVariables = functionNode.typeParameters
               .map<TypeVariableType>((ir.TypeParameter typeParameter) {
             return elementMap
-                .getDartType(new ir.TypeParameterType(
+                .getDartType(ir.TypeParameterType(
                     typeParameter, ir.Nullability.nonNullable))
                 .withoutNullability;
           }).toList();
@@ -713,7 +713,7 @@
   void forEachParameter(JsToElementMap elementMap,
       void f(DartType type, String name, ConstantValue defaultValue)) {
     void handleParameter(ir.VariableDeclaration parameter,
-        {bool isOptional: true}) {
+        {bool isOptional = true}) {
       DartType type = elementMap.getDartType(parameter.type);
       String name = parameter.name;
       ConstantValue defaultValue;
@@ -722,7 +722,7 @@
           defaultValue =
               elementMap.getConstantValue(node, parameter.initializer);
         } else {
-          defaultValue = new NullConstantValue();
+          defaultValue = NullConstantValue();
         }
       }
       f(type, name, defaultValue);
@@ -739,8 +739,8 @@
 
   @override
   FunctionData convert() {
-    return new FunctionDataImpl(
-        node, functionNode, new RegularMemberDefinition(node), staticTypes);
+    return FunctionDataImpl(
+        node, functionNode, RegularMemberDefinition(node), staticTypes);
   }
 
   @override
@@ -763,12 +763,11 @@
   JConstructorData convert() {
     MemberDefinition definition;
     if (node is ir.Constructor) {
-      definition = new SpecialMemberDefinition(node, MemberKind.constructor);
+      definition = SpecialMemberDefinition(node, MemberKind.constructor);
     } else {
-      definition = new RegularMemberDefinition(node);
+      definition = RegularMemberDefinition(node);
     }
-    return new JConstructorDataImpl(
-        node, functionNode, definition, staticTypes);
+    return JConstructorDataImpl(node, functionNode, definition, staticTypes);
   }
 
   @override
@@ -801,8 +800,7 @@
 
   @override
   JFieldData convert() {
-    return new JFieldDataImpl(
-        node, new RegularMemberDefinition(node), staticTypes);
+    return JFieldDataImpl(node, RegularMemberDefinition(node), staticTypes);
   }
 }
 
@@ -825,6 +823,6 @@
   }
 
   JTypeVariableData copy() {
-    return new JTypeVariableData(node);
+    return JTypeVariableData(node);
   }
 }
diff --git a/pkg/compiler/lib/src/kernel/front_end_adapter.dart b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
index 5076088..9a542a8 100644
--- a/pkg/compiler/lib/src/kernel/front_end_adapter.dart
+++ b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
@@ -24,9 +24,9 @@
   @override
   fe.FileSystemEntity entityForUri(Uri uri) {
     if (uri.scheme == 'data') {
-      return new fe.DataFileSystemEntity(Uri.base.resolveUri(uri));
+      return fe.DataFileSystemEntity(Uri.base.resolveUri(uri));
     } else {
-      return new _CompilerFileSystemEntity(uri, this);
+      return _CompilerFileSystemEntity(uri, this);
     }
   }
 }
@@ -45,9 +45,9 @@
       input = await fs.inputProvider
           .readFromUri(uri, inputKind: api.InputKind.UTF8);
     } catch (e) {
-      throw new fe.FileSystemException(uri, '$e');
+      throw fe.FileSystemException(uri, '$e');
     }
-    if (input == null) throw new fe.FileSystemException(uri, "File not found");
+    if (input == null) throw fe.FileSystemException(uri, "File not found");
     // TODO(sigmund): technically someone could provide dart2js with an input
     // that is not a SourceFile. Note that this assumption is also done in the
     // (non-kernel) ScriptLoader.
@@ -62,9 +62,9 @@
       input = await fs.inputProvider
           .readFromUri(uri, inputKind: api.InputKind.binary);
     } catch (e) {
-      throw new fe.FileSystemException(uri, '$e');
+      throw fe.FileSystemException(uri, '$e');
     }
-    if (input == null) throw new fe.FileSystemException(uri, "File not found");
+    if (input == null) throw fe.FileSystemException(uri, "File not found");
     return input.data;
   }
 
@@ -95,7 +95,7 @@
     int offset = fe.getMessageCharOffset(message);
     int length = fe.getMessageLength(message);
     if (uri != null && offset != -1) {
-      return new SourceSpan(uri, offset, offset + length);
+      return SourceSpan(uri, offset, offset + length);
     } else {
       return NO_LOCATION_SPANNABLE;
     }
@@ -126,6 +126,6 @@
       reporter.reportInfo(mainMessage, infos);
       break;
     default:
-      throw new UnimplementedError('unhandled severity ${message.severity}');
+      throw UnimplementedError('unhandled severity ${message.severity}');
   }
 }
diff --git a/pkg/compiler/lib/src/kernel/kelements.dart b/pkg/compiler/lib/src/kernel/kelements.dart
index 886ccbf..d709a75 100644
--- a/pkg/compiler/lib/src/kernel/kelements.dart
+++ b/pkg/compiler/lib/src/kernel/kelements.dart
@@ -52,7 +52,8 @@
   final Name _name;
   final bool _isStatic;
 
-  KMember(this.library, this.enclosingClass, this._name, {bool isStatic: false})
+  KMember(this.library, this.enclosingClass, this._name,
+      {bool isStatic = false})
       : _isStatic = isStatic;
 
   @override
@@ -112,7 +113,7 @@
 
   KFunction(KLibrary library, KClass enclosingClass, Name name,
       this.parameterStructure, this.asyncMarker,
-      {bool isStatic: false, this.isExternal: false})
+      {bool isStatic = false, this.isExternal = false})
       : super(library, enclosingClass, name, isStatic: isStatic);
 }
 
diff --git a/pkg/compiler/lib/src/kernel/kernel_impact.dart b/pkg/compiler/lib/src/kernel/kernel_impact.dart
index 508b578..f45ec96 100644
--- a/pkg/compiler/lib/src/kernel/kernel_impact.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_impact.dart
@@ -59,7 +59,7 @@
       VariableScopeModel variableScopeModel,
       this._annotations,
       this._constantValuefier)
-      : this.impactBuilder = new ResolutionWorldImpactBuilder(
+      : this.impactBuilder = ResolutionWorldImpactBuilder(
             elementMap.commonElements.dartTypes, currentMember),
         super(staticTypeContext, staticTypeCache, elementMap.classHierarchy,
             variableScopeModel);
@@ -98,7 +98,7 @@
 
   KernelImpactConverter(this.elementMap, this.currentMember, this.reporter,
       this._options, this._constantValuefier, this.staticTypeContext)
-      : this.impactBuilder = new ResolutionWorldImpactBuilder(
+      : this.impactBuilder = ResolutionWorldImpactBuilder(
             elementMap.commonElements.dartTypes, currentMember);
 
   @override
@@ -139,10 +139,10 @@
   Object _computeReceiverConstraint(
       ir.DartType receiverType, ClassRelation relation) {
     if (receiverType is ir.InterfaceType) {
-      return new StrongModeConstraint(commonElements, _nativeBasicData,
+      return StrongModeConstraint(commonElements, _nativeBasicData,
           elementMap.getClass(receiverType.classNode), relation);
     } else if (receiverType is ir.NullType) {
-      return new StrongModeConstraint(
+      return StrongModeConstraint(
           commonElements,
           _nativeBasicData,
           elementMap.getClass(typeEnvironment.coreTypes.deprecatedNullClass),
@@ -155,7 +155,7 @@
   void registerParameterCheck(ir.DartType irType) {
     DartType type = elementMap.getDartType(irType);
     if (type is! DynamicType) {
-      impactBuilder.registerTypeUse(new TypeUse.parameterCheck(type));
+      impactBuilder.registerTypeUse(TypeUse.parameterCheck(type));
     }
   }
 
@@ -214,7 +214,7 @@
   @override
   void registerSyncStar(ir.DartType elementType) {
     impactBuilder.registerFeature(Feature.SYNC_STAR);
-    impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+    impactBuilder.registerStaticUse(StaticUse.staticInvoke(
         commonElements.syncStarIterableFactory,
         const CallStructure.unnamed(1, 1),
         <DartType>[elementMap.getDartType(elementType)]));
@@ -223,7 +223,7 @@
   @override
   void registerAsync(ir.DartType elementType) {
     impactBuilder.registerFeature(Feature.ASYNC);
-    impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+    impactBuilder.registerStaticUse(StaticUse.staticInvoke(
         commonElements.asyncAwaitCompleterFactory,
         const CallStructure.unnamed(0, 1),
         <DartType>[elementMap.getDartType(elementType)]));
@@ -232,7 +232,7 @@
   @override
   void registerAsyncStar(ir.DartType elementType) {
     impactBuilder.registerFeature(Feature.ASYNC_STAR);
-    impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+    impactBuilder.registerStaticUse(StaticUse.staticInvoke(
         commonElements.asyncStarStreamControllerFactory,
         const CallStructure.unnamed(1, 1),
         <DartType>[elementMap.getDartType(elementType)]));
@@ -260,22 +260,22 @@
   @override
   void registerIntLiteral(int value) {
     impactBuilder.registerConstantLiteral(
-        new IntConstantValue(new BigInt.from(value).toUnsigned(64)));
+        IntConstantValue(BigInt.from(value).toUnsigned(64)));
   }
 
   @override
   void registerDoubleLiteral(double value) {
-    impactBuilder.registerConstantLiteral(new DoubleConstantValue(value));
+    impactBuilder.registerConstantLiteral(DoubleConstantValue(value));
   }
 
   @override
   void registerBoolLiteral(bool value) {
-    impactBuilder.registerConstantLiteral(new BoolConstantValue(value));
+    impactBuilder.registerConstantLiteral(BoolConstantValue(value));
   }
 
   @override
   void registerStringLiteral(String value) {
-    impactBuilder.registerConstantLiteral(new StringConstantValue(value));
+    impactBuilder.registerConstantLiteral(StringConstantValue(value));
   }
 
   @override
@@ -285,13 +285,13 @@
 
   @override
   void registerNullLiteral() {
-    impactBuilder.registerConstantLiteral(new NullConstantValue());
+    impactBuilder.registerConstantLiteral(NullConstantValue());
   }
 
   @override
   void registerListLiteral(ir.DartType elementType,
       {bool isConst, bool isEmpty}) {
-    impactBuilder.registerListLiteral(new ListLiteralUse(
+    impactBuilder.registerListLiteral(ListLiteralUse(
         commonElements.listType(elementMap.getDartType(elementType)),
         isConstant: isConst,
         isEmpty: isEmpty));
@@ -300,7 +300,7 @@
   @override
   void registerSetLiteral(ir.DartType elementType,
       {bool isConst, bool isEmpty}) {
-    impactBuilder.registerSetLiteral(new SetLiteralUse(
+    impactBuilder.registerSetLiteral(SetLiteralUse(
         commonElements.setType(elementMap.getDartType(elementType)),
         isConstant: isConst,
         isEmpty: isEmpty));
@@ -309,7 +309,7 @@
   @override
   void registerMapLiteral(ir.DartType keyType, ir.DartType valueType,
       {bool isConst, bool isEmpty}) {
-    impactBuilder.registerMapLiteral(new MapLiteralUse(
+    impactBuilder.registerMapLiteral(MapLiteralUse(
         commonElements.mapType(
             elementMap.getDartType(keyType), elementMap.getDartType(valueType)),
         isConstant: isConst,
@@ -326,15 +326,15 @@
       ir.LibraryDependency import,
       {bool isConst}) {
     ConstructorEntity constructor = elementMap.getConstructor(target);
-    CallStructure callStructure = new CallStructure(
+    CallStructure callStructure = CallStructure(
         positionalArguments + namedArguments.length,
         namedArguments,
         typeArguments.length);
     ImportEntity deferredImport = elementMap.getImport(import);
     impactBuilder.registerStaticUse(isConst
-        ? new StaticUse.constConstructorInvoke(constructor, callStructure,
+        ? StaticUse.constConstructorInvoke(constructor, callStructure,
             elementMap.getDartType(type).withoutNullability, deferredImport)
-        : new StaticUse.typedConstructorInvoke(constructor, callStructure,
+        : StaticUse.typedConstructorInvoke(constructor, callStructure,
             elementMap.getDartType(type).withoutNullability, deferredImport));
     if (type.typeArguments.any((ir.DartType type) => type is! ir.DynamicType)) {
       impactBuilder.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
@@ -355,7 +355,7 @@
     ImportEntity deferredImport = elementMap.getImport(import);
     InterfaceType type = elementMap.createInterfaceType(cls, typeArguments);
     impactBuilder
-        .registerTypeUse(new TypeUse.constInstantiation(type, deferredImport));
+        .registerTypeUse(TypeUse.constInstantiation(type, deferredImport));
   }
 
   @override
@@ -391,9 +391,9 @@
     // ssa-building.
     ConstructorEntity constructor =
         elementMap.getSuperConstructor(source, target);
-    impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
+    impactBuilder.registerStaticUse(StaticUse.superConstructorInvoke(
         constructor,
-        new CallStructure(positionalArguments + namedArguments.length,
+        CallStructure(positionalArguments + namedArguments.length,
             namedArguments, typeArguments.length)));
   }
 
@@ -405,7 +405,7 @@
       List<ir.DartType> typeArguments,
       ir.LibraryDependency import) {
     FunctionEntity target = elementMap.getMethod(procedure);
-    CallStructure callStructure = new CallStructure(
+    CallStructure callStructure = CallStructure(
         positionalArguments + namedArguments.length,
         namedArguments,
         typeArguments.length);
@@ -415,7 +415,7 @@
       return;
     } else {
       ImportEntity deferredImport = elementMap.getImport(import);
-      impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+      impactBuilder.registerStaticUse(StaticUse.staticInvoke(
           target, callStructure, dartTypeArguments, deferredImport));
     }
   }
@@ -439,7 +439,7 @@
         InterfaceType type =
             elementMap.getInterfaceTypeForJsInterceptorCall(node);
         if (type != null) {
-          impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
+          impactBuilder.registerTypeUse(TypeUse.instantiation(type));
         }
         break;
       case ForeignKind.NONE:
@@ -457,7 +457,7 @@
     //   2. There is an invocation of fn with some number of type arguments.
     //
     impactBuilder.registerStaticUse(
-        new StaticUse.staticInvoke(target, callStructure, typeArguments));
+        StaticUse.staticInvoke(target, callStructure, typeArguments));
 
     if (typeArguments.length != 1) return;
     DartType matchedType = dartTypes.eraseLegacy(typeArguments.first);
@@ -467,30 +467,30 @@
     ClassEntity cls = interfaceType.element;
     InterfaceType thisType = elementMap.elementEnvironment.getThisType(cls);
 
-    impactBuilder.registerTypeUse(new TypeUse.isCheck(thisType));
+    impactBuilder.registerTypeUse(TypeUse.isCheck(thisType));
 
-    Selector selector = new Selector.callClosure(
+    Selector selector = Selector.callClosure(
         0, const <String>[], thisType.typeArguments.length);
-    impactBuilder.registerDynamicUse(
-        new DynamicUse(selector, null, thisType.typeArguments));
+    impactBuilder
+        .registerDynamicUse(DynamicUse(selector, null, thisType.typeArguments));
   }
 
   @override
   void registerStaticTearOff(
       ir.Procedure procedure, ir.LibraryDependency import) {
-    impactBuilder.registerStaticUse(new StaticUse.staticTearOff(
+    impactBuilder.registerStaticUse(StaticUse.staticTearOff(
         elementMap.getMethod(procedure), elementMap.getImport(import)));
   }
 
   @override
   void registerStaticGet(ir.Member member, ir.LibraryDependency import) {
-    impactBuilder.registerStaticUse(new StaticUse.staticGet(
+    impactBuilder.registerStaticUse(StaticUse.staticGet(
         elementMap.getMember(member), elementMap.getImport(import)));
   }
 
   @override
   void registerStaticSet(ir.Member member, ir.LibraryDependency import) {
-    impactBuilder.registerStaticUse(new StaticUse.staticSet(
+    impactBuilder.registerStaticUse(StaticUse.staticSet(
         elementMap.getMember(member), elementMap.getImport(import)));
   }
 
@@ -500,15 +500,15 @@
     if (target != null) {
       FunctionEntity method = elementMap.getMember(target);
       List<DartType> dartTypeArguments = _getTypeArguments(typeArguments);
-      impactBuilder.registerStaticUse(new StaticUse.superInvoke(
+      impactBuilder.registerStaticUse(StaticUse.superInvoke(
           method,
-          new CallStructure(positionalArguments + namedArguments.length,
+          CallStructure(positionalArguments + namedArguments.length,
               namedArguments, typeArguments.length),
           dartTypeArguments));
     } else {
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
-      impactBuilder.registerStaticUse(new StaticUse.superInvoke(
+      impactBuilder.registerStaticUse(StaticUse.superInvoke(
           elementMap.getSuperNoSuchMethod(currentMember.enclosingClass),
           CallStructure.ONE_ARG));
       impactBuilder.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
@@ -520,14 +520,14 @@
     if (target != null) {
       MemberEntity member = elementMap.getMember(target);
       if (member.isFunction) {
-        impactBuilder.registerStaticUse(new StaticUse.superTearOff(member));
+        impactBuilder.registerStaticUse(StaticUse.superTearOff(member));
       } else {
-        impactBuilder.registerStaticUse(new StaticUse.superGet(member));
+        impactBuilder.registerStaticUse(StaticUse.superGet(member));
       }
     } else {
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
-      impactBuilder.registerStaticUse(new StaticUse.superInvoke(
+      impactBuilder.registerStaticUse(StaticUse.superInvoke(
           elementMap.getSuperNoSuchMethod(currentMember.enclosingClass),
           CallStructure.ONE_ARG));
       impactBuilder.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
@@ -539,14 +539,14 @@
     if (target != null) {
       MemberEntity member = elementMap.getMember(target);
       if (member.isField) {
-        impactBuilder.registerStaticUse(new StaticUse.superFieldSet(member));
+        impactBuilder.registerStaticUse(StaticUse.superFieldSet(member));
       } else {
-        impactBuilder.registerStaticUse(new StaticUse.superSetterSet(member));
+        impactBuilder.registerStaticUse(StaticUse.superSetterSet(member));
       }
     } else {
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
-      impactBuilder.registerStaticUse(new StaticUse.superInvoke(
+      impactBuilder.registerStaticUse(StaticUse.superInvoke(
           elementMap.getSuperNoSuchMethod(currentMember.enclosingClass),
           CallStructure.ONE_ARG));
       impactBuilder.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
@@ -559,14 +559,14 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    CallStructure callStructure = new CallStructure(
+    CallStructure callStructure = CallStructure(
         positionalArguments + namedArguments.length,
         namedArguments,
         typeArguments.length);
     List<DartType> dartTypeArguments = _getTypeArguments(typeArguments);
     // Invocation of a local function. No need for dynamic use, but
     // we need to track the type arguments.
-    impactBuilder.registerStaticUse(new StaticUse.closureCall(
+    impactBuilder.registerStaticUse(StaticUse.closureCall(
         elementMap.getLocalFunction(localFunction),
         callStructure,
         dartTypeArguments));
@@ -574,7 +574,7 @@
     // this when kernel adds an `isFunctionCall` flag to
     // [ir.MethodInvocation].
     impactBuilder.registerDynamicUse(
-        new DynamicUse(callStructure.callSelector, null, dartTypeArguments));
+        DynamicUse(callStructure.callSelector, null, dartTypeArguments));
   }
 
   @override
@@ -588,7 +588,7 @@
     Selector selector = elementMap.getInvocationSelector(
         name, positionalArguments, namedArguments, typeArguments.length);
     List<DartType> dartTypeArguments = _getTypeArguments(typeArguments);
-    impactBuilder.registerDynamicUse(new DynamicUse(selector,
+    impactBuilder.registerDynamicUse(DynamicUse(selector,
         _computeReceiverConstraint(receiverType, relation), dartTypeArguments));
   }
 
@@ -598,12 +598,12 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    CallStructure callStructure = new CallStructure(
+    CallStructure callStructure = CallStructure(
         positionalArguments + namedArguments.length,
         namedArguments,
         typeArguments.length);
     List<DartType> dartTypeArguments = _getTypeArguments(typeArguments);
-    impactBuilder.registerDynamicUse(new DynamicUse(
+    impactBuilder.registerDynamicUse(DynamicUse(
         callStructure.callSelector,
         _computeReceiverConstraint(receiverType, ClassRelation.subtype),
         dartTypeArguments));
@@ -618,7 +618,7 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     List<DartType> dartTypeArguments = _getTypeArguments(typeArguments);
-    impactBuilder.registerDynamicUse(new DynamicUse(
+    impactBuilder.registerDynamicUse(DynamicUse(
         elementMap.getInvocationSelector(target.name, positionalArguments,
             namedArguments, typeArguments.length),
         _computeReceiverConstraint(receiverType, relation),
@@ -628,8 +628,8 @@
   @override
   void registerDynamicGet(
       ir.DartType receiverType, ClassRelation relation, ir.Name name) {
-    impactBuilder.registerDynamicUse(new DynamicUse(
-        new Selector.getter(elementMap.getName(name)),
+    impactBuilder.registerDynamicUse(DynamicUse(
+        Selector.getter(elementMap.getName(name)),
         _computeReceiverConstraint(receiverType, relation),
         const <DartType>[]));
   }
@@ -637,8 +637,8 @@
   @override
   void registerInstanceGet(
       ir.DartType receiverType, ClassRelation relation, ir.Member target) {
-    impactBuilder.registerDynamicUse(new DynamicUse(
-        new Selector.getter(elementMap.getName(target.name)),
+    impactBuilder.registerDynamicUse(DynamicUse(
+        Selector.getter(elementMap.getName(target.name)),
         _computeReceiverConstraint(receiverType, relation),
         const <DartType>[]));
   }
@@ -646,8 +646,8 @@
   @override
   void registerDynamicSet(
       ir.DartType receiverType, ClassRelation relation, ir.Name name) {
-    impactBuilder.registerDynamicUse(new DynamicUse(
-        new Selector.setter(elementMap.getName(name)),
+    impactBuilder.registerDynamicUse(DynamicUse(
+        Selector.setter(elementMap.getName(name)),
         _computeReceiverConstraint(receiverType, relation),
         const <DartType>[]));
   }
@@ -655,8 +655,8 @@
   @override
   void registerInstanceSet(
       ir.DartType receiverType, ClassRelation relation, ir.Member target) {
-    impactBuilder.registerDynamicUse(new DynamicUse(
-        new Selector.setter(elementMap.getName(target.name)),
+    impactBuilder.registerDynamicUse(DynamicUse(
+        Selector.setter(elementMap.getName(target.name)),
         _computeReceiverConstraint(receiverType, relation),
         const <DartType>[]));
   }
@@ -684,7 +684,7 @@
       }
     }
     impactBuilder.registerRuntimeTypeUse(
-        new RuntimeTypeUse(kind, receiverDartType, argumentDartType));
+        RuntimeTypeUse(kind, receiverDartType, argumentDartType));
   }
 
   @override
@@ -697,7 +697,7 @@
   void registerGenericInstantiation(
       ir.FunctionType expressionType, List<ir.DartType> typeArguments) {
     // TODO(johnniwinther): Track which arities are used in instantiation.
-    impactBuilder.registerInstantiation(new GenericInstantiation(
+    impactBuilder.registerInstantiation(GenericInstantiation(
         elementMap.getDartType(expressionType).withoutNullability,
         typeArguments.map(elementMap.getDartType).toList()));
   }
@@ -711,7 +711,7 @@
   @override
   void registerLocalFunction(ir.TreeNode node) {
     Local function = elementMap.getLocalFunction(node);
-    impactBuilder.registerStaticUse(new StaticUse.closure(function));
+    impactBuilder.registerStaticUse(StaticUse.closure(function));
   }
 
   @override
@@ -722,19 +722,18 @@
   @override
   void registerIsCheck(ir.DartType type) {
     impactBuilder
-        .registerTypeUse(new TypeUse.isCheck(elementMap.getDartType(type)));
+        .registerTypeUse(TypeUse.isCheck(elementMap.getDartType(type)));
   }
 
   @override
   void registerImplicitCast(ir.DartType type) {
-    impactBuilder.registerTypeUse(
-        new TypeUse.implicitCast(elementMap.getDartType(type)));
+    impactBuilder
+        .registerTypeUse(TypeUse.implicitCast(elementMap.getDartType(type)));
   }
 
   @override
   void registerAsCast(ir.DartType type) {
-    impactBuilder
-        .registerTypeUse(new TypeUse.asCast(elementMap.getDartType(type)));
+    impactBuilder.registerTypeUse(TypeUse.asCast(elementMap.getDartType(type)));
   }
 
   @override
@@ -749,11 +748,11 @@
         _computeReceiverConstraint(iteratorType, iteratorClassRelation);
     impactBuilder.registerFeature(Feature.SYNC_FOR_IN);
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.iterator, receiverConstraint, const []));
+        DynamicUse(Selectors.iterator, receiverConstraint, const []));
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.current, receiverConstraint, const []));
+        DynamicUse(Selectors.current, receiverConstraint, const []));
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.moveNext, receiverConstraint, const []));
+        DynamicUse(Selectors.moveNext, receiverConstraint, const []));
   }
 
   @override
@@ -763,11 +762,11 @@
         _computeReceiverConstraint(iteratorType, iteratorClassRelation);
     impactBuilder.registerFeature(Feature.ASYNC_FOR_IN);
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.cancel, receiverConstraint, const []));
+        DynamicUse(Selectors.cancel, receiverConstraint, const []));
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.current, receiverConstraint, const []));
+        DynamicUse(Selectors.current, receiverConstraint, const []));
     impactBuilder.registerDynamicUse(
-        new DynamicUse(Selectors.moveNext, receiverConstraint, const []));
+        DynamicUse(Selectors.moveNext, receiverConstraint, const []));
   }
 
   @override
@@ -783,26 +782,26 @@
   @override
   void registerCatchType(ir.DartType type) {
     impactBuilder
-        .registerTypeUse(new TypeUse.catchType(elementMap.getDartType(type)));
+        .registerTypeUse(TypeUse.catchType(elementMap.getDartType(type)));
   }
 
   @override
   void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import) {
     ImportEntity deferredImport = elementMap.getImport(import);
     impactBuilder.registerTypeUse(
-        new TypeUse.typeLiteral(elementMap.getDartType(type), deferredImport));
+        TypeUse.typeLiteral(elementMap.getDartType(type), deferredImport));
   }
 
   @override
   void registerFieldInitialization(ir.Field node) {
     impactBuilder
-        .registerStaticUse(new StaticUse.fieldInit(elementMap.getField(node)));
+        .registerStaticUse(StaticUse.fieldInit(elementMap.getField(node)));
   }
 
   @override
   void registerFieldConstantInitialization(
       ir.Field node, ConstantReference constant) {
-    impactBuilder.registerStaticUse(new StaticUse.fieldConstantInit(
+    impactBuilder.registerStaticUse(StaticUse.fieldConstantInit(
         elementMap.getField(node),
         _constantValuefier.visitConstant(constant.constant)));
   }
@@ -814,15 +813,15 @@
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
     ConstructorEntity target = elementMap.getConstructor(constructor);
-    impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
+    impactBuilder.registerStaticUse(StaticUse.superConstructorInvoke(
         target,
-        new CallStructure(positionalArguments + namedArguments.length,
+        CallStructure(positionalArguments + namedArguments.length,
             namedArguments, typeArguments.length)));
   }
 
   @override
   void registerLoadLibrary() {
-    impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
+    impactBuilder.registerStaticUse(StaticUse.staticInvoke(
         commonElements.loadDeferredLibrary, CallStructure.ONE_ARG));
     impactBuilder.registerFeature(Feature.LOAD_LIBRARY);
   }
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 43b81f4..535a664 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -5,7 +5,6 @@
 library dart2js.kernel.frontend_strategy;
 
 import 'package:kernel/ast.dart' as ir;
-import 'package:kernel/type_environment.dart' as ir;
 
 import '../common.dart';
 import '../common/backend_api.dart';
@@ -25,7 +24,6 @@
 import '../ir/impact.dart';
 import '../ir/modular.dart';
 import '../ir/scope.dart' show ScopeModel;
-import '../ir/static_type.dart';
 import '../js_backend/annotations.dart';
 import '../js_backend/backend_impact.dart';
 import '../js_backend/backend_usage.dart';
@@ -56,8 +54,8 @@
   final NativeBasicDataBuilderImpl nativeBasicDataBuilder =
       NativeBasicDataBuilderImpl();
   NativeBasicData _nativeBasicData;
-  CompilerOptions _options;
-  CompilerTask _compilerTask;
+  final CompilerOptions _options;
+  final CompilerTask _compilerTask;
   KernelToElementMapImpl _elementMap;
   RuntimeTypesNeedBuilder _runtimeTypesNeedBuilder;
 
@@ -257,6 +255,16 @@
     }
   }
 
+  @override
+  void registerModuleData(List<ModuleData> data) {
+    if (data == null) {
+      _modularStrategy = KernelModularStrategy(_compilerTask, _elementMap);
+    } else {
+      _modularStrategy =
+          DeserializedModularStrategy(_compilerTask, _elementMap, data);
+    }
+  }
+
   IrAnnotationData get irAnnotationDataForTesting => _irAnnotationData;
 
   ModularStrategy get modularStrategyForTesting => _modularStrategy;
@@ -376,7 +384,7 @@
       EnumSet<PragmaAnnotation> annotations = processMemberAnnotations(
           _elementMap.options,
           _elementMap.reporter,
-          _elementMap.getMemberNode(element),
+          node,
           pragmaAnnotationData);
       _annotationsDataBuilder.registerPragmaAnnotations(element, annotations);
 
@@ -433,25 +441,48 @@
       ir.Member node, EnumSet<PragmaAnnotation> annotations) {
     ScopeModel scopeModel = _compilerTask.measureSubtask(
         'closures', () => ScopeModel.from(node, _elementMap.constantEvaluator));
-    ImpactBuilderData impactBuilderData;
     if (useImpactDataForTesting) {
-      // TODO(johnniwinther): Always create and use the [ImpactBuilderData].
-      // Currently it is a bit half-baked since we cannot compute data that
-      // depend on metadata, so these parts of the impact data need to be
-      // computed during conversion to [ResolutionImpact].
-      impactBuilderData = _compilerTask.measureSubtask('worldImpact', () {
-        StaticTypeCacheImpl staticTypeCache = StaticTypeCacheImpl();
-        ImpactBuilder builder = ImpactBuilder(
-            ir.StaticTypeContext(node, _elementMap.typeEnvironment,
-                cache: staticTypeCache),
-            staticTypeCache,
-            _elementMap.classHierarchy,
-            scopeModel.variableScopeModel,
-            useAsserts: _elementMap.options.enableUserAssertions,
-            inferEffectivelyFinalVariableTypes:
-                !annotations.contains(PragmaAnnotation.disableFinal));
-        return builder.computeImpact(node);
+      return _compilerTask.measureSubtask('worldImpact', () {
+        return computeModularMemberData(node,
+            options: _elementMap.options,
+            typeEnvironment: _elementMap.typeEnvironment,
+            classHierarchy: _elementMap.classHierarchy,
+            scopeModel: scopeModel,
+            annotations: annotations);
       });
+    } else {
+      ImpactBuilderData impactBuilderData;
+      return ModularMemberData(scopeModel, impactBuilderData);
+    }
+  }
+}
+
+class DeserializedModularStrategy extends ModularStrategy {
+  final CompilerTask _compilerTask;
+  final KernelToElementMapImpl _elementMap;
+  final Map<ir.Member, ImpactBuilderData> _cache = {};
+
+  DeserializedModularStrategy(
+      this._compilerTask, this._elementMap, List<ModuleData> data) {
+    for (var module in data) {
+      _cache.addAll(module.impactData);
+    }
+  }
+
+  @override
+  List<PragmaAnnotationData> getPragmaAnnotationData(ir.Member node) {
+    return computePragmaAnnotationDataFromIr(node);
+  }
+
+  @override
+  ModularMemberData getModularMemberData(
+      ir.Member node, EnumSet<PragmaAnnotation> annotations) {
+    // TODO(joshualitt): serialize scope model too.
+    var scopeModel = _compilerTask.measureSubtask(
+        'closures', () => ScopeModel.from(node, _elementMap.constantEvaluator));
+    var impactBuilderData = _cache[node];
+    if (impactBuilderData == null) {
+      throw 'missing modular analysis data for $node';
     }
     return ModularMemberData(scopeModel, impactBuilderData);
   }
diff --git a/pkg/compiler/lib/src/kernel/kernel_world.dart b/pkg/compiler/lib/src/kernel/kernel_world.dart
index f1d295a..3c7d99a 100644
--- a/pkg/compiler/lib/src/kernel/kernel_world.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_world.dart
@@ -145,7 +145,7 @@
         if (!elementMap.classes
             .getEnv(member.enclosingClass)
             .checkHasMember(elementMap.getMemberNode(member))) {
-          throw new SpannableAssertionFailure(
+          throw SpannableAssertionFailure(
               member,
               "Member $member is in the environment of its enclosing class"
               " ${member.enclosingClass}.");
diff --git a/pkg/compiler/lib/src/kernel/loader.dart b/pkg/compiler/lib/src/kernel/loader.dart
index f80936d..3278416 100644
--- a/pkg/compiler/lib/src/kernel/loader.dart
+++ b/pkg/compiler/lib/src/kernel/loader.dart
@@ -61,7 +61,8 @@
       String targetName =
           _options.compileForServer ? "dart2js_server" : "dart2js";
 
-      // We defer selecting the platform until we've resolved the NNBD mode.
+      // We defer selecting the platform until we've resolved the null safety
+      // mode.
       String getPlatformFilename() {
         String platform = targetName;
         if (!_options.useLegacySubtyping) {
@@ -72,7 +73,10 @@
       }
 
       ir.Component component;
-      var isDill = resolvedUri.path.endsWith('.dill');
+      List<Uri> moduleLibraries = const [];
+      var isDill = resolvedUri.path.endsWith('.dill') ||
+          resolvedUri.path.endsWith('.gdill') ||
+          resolvedUri.path.endsWith('.mdill');
 
       void inferNullSafetyMode(bool isSound) {
         if (_options.nullSafetyMode == NullSafetyMode.unspecified) {
@@ -86,14 +90,18 @@
       }
 
       if (isDill) {
-        component = new ir.Component();
+        component = ir.Component();
         Future<void> read(Uri uri) async {
           api.Input input = await _compilerInput.readFromUri(uri,
               inputKind: api.InputKind.binary);
-          new BinaryBuilder(input.data).readComponent(component);
+          BinaryBuilder(input.data).readComponent(component);
         }
 
         await read(resolvedUri);
+        if (_options.modularMode) {
+          moduleLibraries =
+              component.libraries.map((lib) => lib.importUri).toList();
+        }
 
         var isStrongDill =
             component.mode == ir.NonNullableByDefaultCompiledMode.Strong;
@@ -109,13 +117,19 @@
         inferNullSafetyMode(isStrongDill);
         validateNullSafetyMode();
 
+        // Modular compiles do not include the platform on the input dill
+        // either.
+        if (_options.platformBinaries != null) {
+          var platformUri =
+              _options.platformBinaries.resolve(getPlatformFilename());
+          // Modular analysis can be run on the sdk by providing directly the
+          // path to the platform.dill file. In that case, we do not load the
+          // platform file implicitly.
+          // TODO(joshualitt): Change how we detect this case so it is less
+          // brittle.
+          if (platformUri != resolvedUri) await read(platformUri);
+        }
         if (_options.dillDependencies != null) {
-          // Modular compiles do not include the platform on the input dill
-          // either.
-          if (_options.platformBinaries != null) {
-            await read(
-                _options.platformBinaries.resolve(getPlatformFilename()));
-          }
           for (Uri dependency in _options.dillDependencies) {
             await read(dependency);
           }
@@ -123,7 +137,7 @@
 
         // This is not expected to be null when creating a whole-program .dill
         // file, but needs to be checked for modular inputs.
-        if (component.mainMethod == null) {
+        if (component.mainMethod == null && !_options.modularMode) {
           // TODO(sigmund): move this so that we use the same error template
           // from the CFE.
           _reporter.reportError(_reporter.createMessage(NO_LOCATION_SPANNABLE,
@@ -187,9 +201,8 @@
           _reporter.log('Writing dill to ${_options.outputUri}');
           api.BinaryOutputSink dillOutput =
               _compilerOutput.createBinarySink(_options.outputUri);
-          BinaryOutputSinkAdapter irSink =
-              new BinaryOutputSinkAdapter(dillOutput);
-          BinaryPrinter printer = new BinaryPrinter(irSink);
+          BinaryOutputSinkAdapter irSink = BinaryOutputSinkAdapter(dillOutput);
+          BinaryPrinter printer = BinaryPrinter(irSink);
           printer.writeComponentFile(component);
           irSink.close();
         });
@@ -198,17 +211,17 @@
       if (forceSerialization) {
         // TODO(johnniwinther): Remove this when #34942 is fixed.
         List<int> data = serializeComponent(component);
-        component = new ir.Component();
-        new BinaryBuilder(data).readComponent(component);
+        component = ir.Component();
+        BinaryBuilder(data).readComponent(component);
       }
-      return _toResult(component);
+      return _toResult(component, moduleLibraries);
     });
   }
 
-  KernelResult _toResult(ir.Component component) {
+  KernelResult _toResult(ir.Component component, List<Uri> moduleLibraries) {
     Uri rootLibraryUri = null;
     Iterable<ir.Library> libraries = component.libraries;
-    if (component.mainMethod != null) {
+    if (!_options.modularMode && component.mainMethod != null) {
       var root = component.mainMethod.enclosingLibrary;
       rootLibraryUri = root.importUri;
 
@@ -216,7 +229,7 @@
       // entire SDK libraries, not all of them are used. We include anything
       // that is reachable from `main`. Note that all internal libraries that
       // the compiler relies on are reachable from `dart:core`.
-      var seen = new Set<Library>();
+      var seen = Set<Library>();
       search(ir.Library current) {
         if (!seen.add(current)) return;
         for (ir.LibraryDependency dep in current.dependencies) {
@@ -234,8 +247,8 @@
 
       libraries = libraries.where(seen.contains);
     }
-    return new KernelResult(component, rootLibraryUri,
-        libraries.map((lib) => lib.importUri).toList());
+    return KernelResult(component, rootLibraryUri,
+        libraries.map((lib) => lib.importUri).toList(), moduleLibraries);
   }
 }
 
@@ -244,6 +257,8 @@
   final ir.Component component;
 
   /// The [Uri] of the root library containing main.
+  /// Note: rootLibraryUri will be null for some modules, for example in the
+  /// case of dependent libraries processed modularly.
   final Uri rootLibraryUri;
 
   /// Returns the [Uri]s of all libraries that have been loaded that are
@@ -252,10 +267,18 @@
   /// Note that [component] may contain some libraries that are excluded here.
   final Iterable<Uri> libraries;
 
-  KernelResult(this.component, this.rootLibraryUri, this.libraries) {
-    assert(rootLibraryUri != null);
-  }
+  /// When running only dart2js modular analysis, returns the [Uri]s for
+  /// libraries loaded in the input module.
+  ///
+  /// This excludes other libraries reachable from them that were loaded as
+  /// dependencies. The result of [moduleLibraries] is always a subset of
+  /// [libraries].
+  final Iterable<Uri> moduleLibraries;
+
+  KernelResult(this.component, this.rootLibraryUri, this.libraries,
+      this.moduleLibraries);
 
   @override
-  String toString() => 'root=$rootLibraryUri,libraries=${libraries}';
+  String toString() =>
+      'root=$rootLibraryUri,libraries=$libraries,module=$moduleLibraries';
 }
diff --git a/pkg/compiler/lib/src/kernel/transformations/clone_mixin_methods_with_super.dart b/pkg/compiler/lib/src/kernel/transformations/clone_mixin_methods_with_super.dart
index dc7ded8..abefe2d 100644
--- a/pkg/compiler/lib/src/kernel/transformations/clone_mixin_methods_with_super.dart
+++ b/pkg/compiler/lib/src/kernel/transformations/clone_mixin_methods_with_super.dart
@@ -19,7 +19,7 @@
   /// libraries have already been transformed.
   static void transform(List<Library> libraries) {
     // Clone any mixed in methods that uses super.
-    var processedClasses = new Set<Class>();
+    var processedClasses = Set<Class>();
     for (var library in libraries) {
       for (var cls in library.classes) {
         if (processedClasses.add(cls)) {
@@ -61,7 +61,7 @@
         Procedure? existingGetter = existingNonSetters[field.name];
         Procedure? existingSetter = existingSetters[field.name];
         cls.addField(cloneVisitor.cloneField(
-            field, existingGetter?.reference, existingSetter?.reference));
+            field, null, existingGetter?.reference, existingSetter?.reference));
         if (existingGetter != null) {
           cls.procedures.remove(existingGetter);
         }
diff --git a/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart b/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
index 212aac6..18b56dc 100644
--- a/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
+++ b/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
@@ -24,7 +24,6 @@
   final CoreTypes _coreTypes;
 
   final bool _omitLateNames;
-  final bool _lowerInstanceVariables;
 
   final _Reader _readLocal;
   final _Reader _readField;
@@ -43,16 +42,10 @@
   // pair).
   final Map<Field, Field> _backingInstanceFields = {};
 
-  // TODO(fishythefish): Remove this when [FieldInitializer] maintains a correct
-  // [Reference] to its [Field].
-  final Map<Procedure, Field> _getterToField = {};
-
   Member? _contextMember;
 
   LateLowering(this._coreTypes, CompilerOptions? _options)
       : _omitLateNames = _options?.omitLateNames ?? false,
-        _lowerInstanceVariables =
-            _options?.experimentLateInstanceVariables ?? false,
         _readLocal = _Reader(_coreTypes.cellReadLocal),
         _readField = _Reader(_coreTypes.cellReadField),
         _readInitialized = _Reader(_coreTypes.initializedCellRead),
@@ -72,24 +65,17 @@
       field.isLate && field.isStatic && field.initializer == null;
 
   bool _shouldLowerInstanceField(Field field) =>
-      field.isLate && !field.isStatic && _lowerInstanceVariables;
+      field.isLate && !field.isStatic;
 
-  String _mangleFieldName(Field field) {
-    assert(_shouldLowerInstanceField(field));
-    Class cls = field.enclosingClass!;
-    return '_#${cls.name}#${field.name.text}';
+  Name _mangleFieldCellName(Field field) {
+    assert(_shouldLowerStaticField(field));
+    return Name('_#${field.name.text}', field.enclosingLibrary);
   }
 
-  void transformAdditionalExports(Library library) {
-    List<Reference> additionalExports = library.additionalExports;
-    Set<Reference> newExports = {};
-    additionalExports.removeWhere((Reference reference) {
-      Field? cell = _fieldCells[reference.node];
-      if (cell == null) return false;
-      newExports.add(cell.getterReference);
-      return true;
-    });
-    additionalExports.addAll(newExports);
+  Name _mangleFieldName(Field field) {
+    assert(_shouldLowerInstanceField(field));
+    Class cls = field.enclosingClass!;
+    return Name('_#${cls.name}#${field.name.text}', field.enclosingLibrary);
   }
 
   ConstructorInvocation _callCellConstructor(Expression name, int fileOffset) =>
@@ -157,6 +143,12 @@
           Arguments([value])..fileOffset = fileOffset)
         ..fileOffset = fileOffset;
 
+  void exitLibrary() {
+    assert(_variableCells.isEmpty);
+    _fieldCells.clear();
+    _backingInstanceFields.clear();
+  }
+
   void enterFunction() {
     _variableCells.add(null);
   }
@@ -201,6 +193,7 @@
         type: InterfaceType(_coreTypes.cellClass, nonNullable),
         isFinal: true)
       ..fileOffset = fileOffset;
+
     return _addToCurrentScope(variable, cell);
   }
 
@@ -285,17 +278,71 @@
     return _fieldCells.putIfAbsent(field, () {
       int fileOffset = field.fileOffset;
       Name name = field.name;
-      field.getterReference.canonicalName?.unbind();
-      field.setterReference?.canonicalName?.unbind();
-      return Field.immutable(name,
+      Uri fileUri = field.fileUri;
+      DartType type = field.type;
+      Field fieldCell = Field.immutable(_mangleFieldCellName(field),
           type: InterfaceType(_coreTypes.cellClass, nonNullable),
           initializer: _callCellConstructor(
               _nameLiteral(name.text, fileOffset), fileOffset),
           isFinal: true,
           isStatic: true,
-          fileUri: field.fileUri)
+          fileUri: fileUri)
         ..fileOffset = fileOffset
         ..isNonNullableByDefault = true;
+      StaticGet fieldCellAccess() =>
+          StaticGet(fieldCell)..fileOffset = fileOffset;
+
+      Procedure getter = Procedure(
+          name,
+          ProcedureKind.Getter,
+          FunctionNode(
+              ReturnStatement(
+                  _callReader(_readField, fieldCellAccess(), type, fileOffset))
+                ..fileOffset = fileOffset,
+              returnType: type)
+            ..fileOffset = fileOffset,
+          isStatic: true,
+          fileUri: fileUri,
+          reference: field.getterReference)
+        ..fileOffset = fileOffset
+        ..isNonNullableByDefault = true;
+
+      VariableDeclaration setterValue = VariableDeclaration('value', type: type)
+        ..fileOffset = fileOffset;
+      VariableGet setterValueRead() =>
+          VariableGet(setterValue)..fileOffset = fileOffset;
+
+      Procedure setter = Procedure(
+          name,
+          ProcedureKind.Setter,
+          FunctionNode(
+              ReturnStatement(_callSetter(
+                  field.isFinal
+                      ? _coreTypes.cellFinalFieldValueSetter
+                      : _coreTypes.cellValueSetter,
+                  fieldCellAccess(),
+                  setterValueRead(),
+                  fileOffset))
+                ..fileOffset = fileOffset,
+              positionalParameters: [setterValue],
+              returnType: VoidType())
+            ..fileOffset = fileOffset,
+          isStatic: true,
+          fileUri: fileUri,
+          reference: field.setterReference)
+        ..fileOffset = fileOffset
+        ..isNonNullableByDefault = true;
+
+      TreeNode parent = field.parent!;
+      if (parent is Class) {
+        parent.addProcedure(getter);
+        parent.addProcedure(setter);
+      } else if (parent is Library) {
+        parent.addProcedure(getter);
+        parent.addProcedure(setter);
+      }
+
+      return fieldCell;
     });
   }
 
@@ -312,17 +359,19 @@
     Uri fileUri = field.fileUri;
     Name name = field.name;
     String nameText = name.text;
+    Name mangledName = _mangleFieldName(field);
     DartType type = field.type;
     Expression? initializer = field.initializer;
     Class enclosingClass = field.enclosingClass!;
 
-    Name mangledName = Name(_mangleFieldName(field), field.enclosingLibrary);
+    field.fieldReference.canonicalName?.unbind();
     Field backingField = Field.mutable(mangledName,
         type: type,
         initializer: StaticInvocation(_coreTypes.createSentinelMethod,
             Arguments(const [], types: [type])..fileOffset = fileOffset)
           ..fileOffset = fileOffset,
-        fileUri: fileUri)
+        fileUri: fileUri,
+        fieldReference: field.fieldReference)
       ..fileOffset = fileOffset
       ..isNonNullableByDefault = true
       ..isInternalImplementation = true;
@@ -433,7 +482,6 @@
       ..fileOffset = fileOffset
       ..isNonNullableByDefault = true;
     enclosingClass.addProcedure(getter);
-    _getterToField[getter] = backingField;
 
     VariableDeclaration setterValue = VariableDeclaration('value', type: type)
       ..fileOffset = fileOffset;
@@ -500,57 +548,4 @@
 
     return field;
   }
-
-  TreeNode transformFieldInitializer(
-      FieldInitializer initializer, Member contextMember) {
-    _contextMember = contextMember;
-
-    // If the [Field] has been lowered, we can't use `node.field` to retrieve it
-    // because the `getterReference` of the original field now points to the new
-    // getter for the backing field.
-    // TODO(fishythefish): Clean this up when [FieldInitializer] maintains a
-    // correct [Reference] to its [Field].
-    NamedNode node = initializer.fieldReference.node!;
-    Field backingField;
-    if (node is Field) {
-      if (!_shouldLowerInstanceField(node)) return initializer;
-      backingField = _backingInstanceField(node);
-    } else {
-      backingField = _getterToField[node]!;
-    }
-    return FieldInitializer(backingField, initializer.value)
-      ..fileOffset = initializer.fileOffset;
-  }
-
-  StaticGet _fieldCellAccess(Field field, int fileOffset) =>
-      StaticGet(_fieldCell(field))..fileOffset = fileOffset;
-
-  TreeNode transformStaticGet(StaticGet node, Member contextMember) {
-    _contextMember = contextMember;
-
-    Member target = node.target;
-    if (target is Field && _shouldLowerStaticField(target)) {
-      int fileOffset = node.fileOffset;
-      StaticGet cell = _fieldCellAccess(target, fileOffset);
-      return _callReader(_readField, cell, target.type, fileOffset);
-    }
-
-    return node;
-  }
-
-  TreeNode transformStaticSet(StaticSet node, Member contextMember) {
-    _contextMember = contextMember;
-
-    Member target = node.target;
-    if (target is Field && _shouldLowerStaticField(target)) {
-      int fileOffset = node.fileOffset;
-      StaticGet cell = _fieldCellAccess(target, fileOffset);
-      Procedure setter = target.isFinal
-          ? _coreTypes.cellFinalFieldValueSetter
-          : _coreTypes.cellValueSetter;
-      return _callSetter(setter, cell, node.value, fileOffset);
-    }
-
-    return node;
-  }
 }
diff --git a/pkg/compiler/lib/src/kernel/transformations/lowering.dart b/pkg/compiler/lib/src/kernel/transformations/lowering.dart
index e04314b..234eac1 100644
--- a/pkg/compiler/lib/src/kernel/transformations/lowering.dart
+++ b/pkg/compiler/lib/src/kernel/transformations/lowering.dart
@@ -21,12 +21,6 @@
     ClassHierarchy hierarchy, CompilerOptions? options) {
   final transformer = _Lowering(coreTypes, hierarchy, options);
   libraries.forEach(transformer.visitLibrary);
-
-  // Do a second pass to remove/replace now-unused nodes.
-
-  // Since the transformer API doesn't visit `Library.additionalExports`, we
-  // have to manually replace references to transformed nodes.
-  libraries.forEach(transformer.transformAdditionalExports);
 }
 
 class _Lowering extends Transformer {
@@ -40,10 +34,6 @@
       : factorySpecializer = FactorySpecializer(coreTypes, hierarchy),
         _lateLowering = LateLowering(coreTypes, _options);
 
-  void transformAdditionalExports(Library node) {
-    _lateLowering.transformAdditionalExports(node);
-  }
-
   @override
   TreeNode defaultMember(Member node) {
     _currentMember = node;
@@ -51,6 +41,13 @@
   }
 
   @override
+  TreeNode visitLibrary(Library node) {
+    node.transformChildren(this);
+    _lateLowering.exitLibrary();
+    return node;
+  }
+
+  @override
   TreeNode visitStaticInvocation(StaticInvocation node) {
     node.transformChildren(this);
     return factorySpecializer.transformStaticInvocation(node, _currentMember!);
@@ -88,22 +85,4 @@
     node.transformChildren(this);
     return _lateLowering.transformField(node, _currentMember!);
   }
-
-  @override
-  TreeNode visitFieldInitializer(FieldInitializer node) {
-    node.transformChildren(this);
-    return _lateLowering.transformFieldInitializer(node, _currentMember!);
-  }
-
-  @override
-  TreeNode visitStaticGet(StaticGet node) {
-    node.transformChildren(this);
-    return _lateLowering.transformStaticGet(node, _currentMember!);
-  }
-
-  @override
-  TreeNode visitStaticSet(StaticSet node) {
-    node.transformChildren(this);
-    return _lateLowering.transformStaticSet(node, _currentMember!);
-  }
 }
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 788d79e..e81dda1 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -437,7 +437,7 @@
         validTags == null || (validTags.toSet()..removeAll(validTags)).isEmpty);
     if (validTags == null) validTags = knownTags;
 
-    Map<String, String> values = <String, String>{};
+    Map<String, String> values = {};
 
     for (String spec in specs) {
       List<String> tagAndValue = spec.split(':');
@@ -838,7 +838,7 @@
     _behavior.typesReturned.add(type.withoutNullability);
 
     // Breakdown nullable type into TypeWithoutNullability|Null.
-    // Pre-nnbd Declared types are nullable, so we also add null in that case.
+    // Unsound declared types are nullable, so we also add null in that case.
     // TODO(41960): Remove check for legacy subtyping. This was added as a
     // temporary workaround to unblock the null-safe unfork. At this time some
     // native APIs are typed unsoundly because they don't consider browser
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index 9f97703..2177dd4 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -37,8 +37,8 @@
 }
 
 abstract class NativeEnqueuerBase implements NativeEnqueuer {
-  final Set<ClassEntity> _registeredClasses = Set<ClassEntity>();
-  final Set<ClassEntity> _unusedClasses = Set<ClassEntity>();
+  final Set<ClassEntity> _registeredClasses = {};
+  final Set<ClassEntity> _unusedClasses = {};
 
   @override
   bool get hasInstantiatedNativeClasses => !_registeredClasses.isEmpty;
@@ -92,7 +92,7 @@
     }
 
     int unusedBefore = _unusedClasses.length;
-    Set<ClassEntity> matchingClasses = Set<ClassEntity>();
+    Set<ClassEntity> matchingClasses = {};
     for (var type in behavior.typesInstantiated) {
       if (type is SpecialType) {
         if (type == SpecialType.JsObject) {
@@ -182,7 +182,7 @@
 
   /// The set of all native classes.  Each native class is in [nativeClasses]
   /// and exactly one of [unusedClasses] and [registeredClasses].
-  final Set<ClassEntity> _nativeClasses = Set<ClassEntity>();
+  final Set<ClassEntity> _nativeClasses = {};
 
   NativeResolutionEnqueuer(
       CompilerOptions options,
@@ -224,7 +224,7 @@
   final Iterable<ClassEntity> _nativeClasses;
   final NativeData _nativeData;
 
-  final Set<ClassEntity> _doneAddSubtypes = Set<ClassEntity>();
+  final Set<ClassEntity> _doneAddSubtypes = {};
 
   NativeCodegenEnqueuer(
       CompilerOptions options,
@@ -246,7 +246,7 @@
     }
 
     // HACK HACK - add all the resolved classes.
-    Set<ClassEntity> matchingClasses = Set<ClassEntity>();
+    Set<ClassEntity> matchingClasses = {};
     for (ClassEntity classElement in _nativeClasses) {
       if (_unusedClasses.contains(classElement)) {
         matchingClasses.add(classElement);
diff --git a/pkg/compiler/lib/src/native/resolver.dart b/pkg/compiler/lib/src/native/resolver.dart
index b20f6d8..a1a0d84 100644
--- a/pkg/compiler/lib/src/native/resolver.dart
+++ b/pkg/compiler/lib/src/native/resolver.dart
@@ -28,13 +28,13 @@
   final KElementEnvironment _elementEnvironment;
   final NativeBasicData _nativeBasicData;
 
-  Map<String, ClassEntity> _tagOwner = Map<String, ClassEntity>();
+  final Map<String, ClassEntity> _tagOwner = {};
 
   BaseNativeClassFinder(this._elementEnvironment, this._nativeBasicData);
 
   @override
   Iterable<ClassEntity> computeNativeClasses(Iterable<Uri> libraries) {
-    Set<ClassEntity> nativeClasses = Set<ClassEntity>();
+    Set<ClassEntity> nativeClasses = {};
     libraries.forEach((uri) => _processNativeClassesInLibrary(
         _elementEnvironment.lookupLibrary(uri), nativeClasses));
     _processSubclassesOfNativeClasses(libraries, nativeClasses);
@@ -84,23 +84,22 @@
   /// [nativeClasses].
   void _processSubclassesOfNativeClasses(
       Iterable<Uri> libraries, Set<ClassEntity> nativeClasses) {
-    Set<ClassEntity> nativeClassesAndSubclasses = Set<ClassEntity>();
+    Set<ClassEntity> nativeClassesAndSubclasses = {};
     // Collect potential subclasses, e.g.
     //
     //     class B extends foo.A {}
     //
     // String "A" has a potential subclass B.
 
-    Map<String, Set<ClassEntity>> potentialExtends =
-        <String, Set<ClassEntity>>{};
+    Map<String, Set<ClassEntity>> potentialExtends = {};
 
     libraries.forEach((Uri uri) {
       LibraryEntity library = _elementEnvironment.lookupLibrary(uri);
       _elementEnvironment.forEachClass(library, (ClassEntity cls) {
         String extendsName = _findExtendsNameOfClass(cls);
         if (extendsName != null) {
-          Set<ClassEntity> potentialSubclasses = potentialExtends.putIfAbsent(
-              extendsName, () => Set<ClassEntity>());
+          Set<ClassEntity> potentialSubclasses =
+              potentialExtends.putIfAbsent(extendsName, () => {});
           potentialSubclasses.add(cls);
         }
       });
diff --git a/pkg/compiler/lib/src/null_compiler_output.dart b/pkg/compiler/lib/src/null_compiler_output.dart
index b01e544..a6443e7 100644
--- a/pkg/compiler/lib/src/null_compiler_output.dart
+++ b/pkg/compiler/lib/src/null_compiler_output.dart
@@ -19,7 +19,7 @@
 
   @override
   BinaryOutputSink createBinarySink(Uri uri) {
-    return new NullBinarySink(uri);
+    return NullBinarySink(uri);
   }
 }
 
@@ -41,7 +41,7 @@
   /// Convenience method for getting an [api.CompilerOutputProvider].
   static NullSink outputProvider(
       String name, String extension, OutputType type) {
-    return new NullSink('$name.$extension.$type');
+    return NullSink('$name.$extension.$type');
   }
 }
 
diff --git a/pkg/compiler/lib/src/old_to_new_api.dart b/pkg/compiler/lib/src/old_to_new_api.dart
index a5d7c45..73ab528 100644
--- a/pkg/compiler/lib/src/old_to_new_api.dart
+++ b/pkg/compiler/lib/src/old_to_new_api.dart
@@ -22,7 +22,7 @@
   LegacyCompilerInput(this._inputProvider);
 
   @override
-  Future<Input> readFromUri(Uri uri, {InputKind inputKind: InputKind.UTF8}) {
+  Future<Input> readFromUri(Uri uri, {InputKind inputKind = InputKind.UTF8}) {
     // The switch handles all enum values, but not null.
     // ignore: missing_return
     return _inputProvider(uri).then((/*String|List<int>*/ data) {
@@ -30,9 +30,9 @@
         case InputKind.UTF8:
           SourceFile sourceFile;
           if (data is List<int>) {
-            sourceFile = new Utf8BytesSourceFile(uri, data);
+            sourceFile = Utf8BytesSourceFile(uri, data);
           } else if (data is String) {
-            sourceFile = new StringSourceFile.fromUri(uri, data);
+            sourceFile = StringSourceFile.fromUri(uri, data);
           } else {
             throw "Expected a 'String' or a 'List<int>' from the input "
                 "provider, but got: ${Error.safeToString(data)}.";
@@ -42,7 +42,7 @@
           if (data is String) {
             data = utf8.encode(data);
           }
-          return new Binary(uri, data);
+          return Binary(uri, data);
       }
     });
   }
@@ -82,14 +82,14 @@
           break;
         default:
       }
-      return new LegacyOutputSink(_outputProvider(name, extension));
+      return LegacyOutputSink(_outputProvider(name, extension));
     }
     return NullSink.outputProvider(name, extension, type);
   }
 
   @override
   BinaryOutputSink createBinarySink(Uri uri) {
-    throw new UnsupportedError("LegacyCompilerOutput.createBinarySink");
+    throw UnsupportedError("LegacyCompilerOutput.createBinarySink");
   }
 }
 
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 8e07e11..5f7b288 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -68,11 +68,14 @@
   /// Whether to use optimized holders.
   FeatureOption newHolders = FeatureOption('new-holders');
 
+  /// Whether to generate code compliant with Content Security Policy.
+  FeatureOption useContentSecurityPolicy = FeatureOption('csp');
+
   /// [FeatureOption]s which default to enabled.
-  late final List<FeatureOption> shipping = [legacyJavaScript];
+  late final List<FeatureOption> shipping = [legacyJavaScript, newHolders];
 
   /// [FeatureOption]s which default to disabled.
-  late final List<FeatureOption> canary = [newHolders];
+  late final List<FeatureOption> canary = [useContentSecurityPolicy];
 
   /// Forces canary feature on. This must run after [Option].parse.
   void forceCanary() {
@@ -86,12 +89,15 @@
     bool _shouldPrint(FeatureOption feature) {
       return feature.isNegativeFlag ? feature.isDisabled : feature.isEnabled;
     }
+
     String _toString(FeatureOption feature) {
       return feature.isNegativeFlag ? 'no-${feature.flag}' : feature.flag;
     }
+
     Iterable<String> _listToString(List<FeatureOption> options) {
       return options.where(_shouldPrint).map(_toString);
     }
+
     return _listToString(shipping).followedBy(_listToString(canary)).join(', ');
   }
 
@@ -153,6 +159,13 @@
   /// files for linking.
   List<Uri>? dillDependencies;
 
+  Uri? writeModularAnalysisUri;
+
+  /// Helper to determine if compiler is being run just for modular analysis.
+  bool get modularMode => writeModularAnalysisUri != null;
+
+  List<Uri>? modularAnalysisInputs;
+
   /// Location from which serialized inference data is read.
   ///
   /// If this is set, the [entryPoint] is expected to be a .dill file and the
@@ -426,9 +439,6 @@
   /// This is an internal configuration option derived from other flags.
   late CheckPolicy defaultIndexBoundsCheckPolicy;
 
-  /// Whether to generate code compliant with content security policy (CSP).
-  bool useContentSecurityPolicy = false;
-
   /// When obfuscating for minification, whether to use the frequency of a name
   /// as an heuristic to pick shorter names.
   bool useFrequencyNamer = true;
@@ -481,10 +491,6 @@
   /// called.
   bool experimentCallInstrumentation = false;
 
-  /// Use the dart2js lowering of late instance variables rather than the CFE
-  /// lowering.
-  bool experimentLateInstanceVariables = false;
-
   /// When null-safety is enabled, whether the compiler should emit code with
   /// unsound or sound semantics.
   ///
@@ -609,8 +615,6 @@
           _hasOption(options, Flags.experimentUnreachableMethodsThrow)
       ..experimentCallInstrumentation =
           _hasOption(options, Flags.experimentCallInstrumentation)
-      ..experimentLateInstanceVariables =
-          _hasOption(options, Flags.experimentLateInstanceVariables)
       ..generateSourceMap = !_hasOption(options, Flags.noSourceMaps)
       ..outputUri = _extractUriOption(options, '--out=')
       ..platformBinaries = platformBinaries
@@ -622,8 +626,6 @@
           _hasOption(options, Flags.laxRuntimeTypeToString)
       ..testMode = _hasOption(options, Flags.testMode)
       ..trustPrimitives = _hasOption(options, Flags.trustPrimitives)
-      ..useContentSecurityPolicy =
-          _hasOption(options, Flags.useContentSecurityPolicy)
       ..useFrequencyNamer =
           !_hasOption(options, Flags.noFrequencyBasedMinification)
       ..useMultiSourceInfo = _hasOption(options, Flags.useMultiSourceInfo)
@@ -637,6 +639,10 @@
           _extractUriListOption(options, '${Flags.dillDependencies}')
       ..readProgramSplit =
           _extractUriOption(options, '${Flags.readProgramSplit}=')
+      ..writeModularAnalysisUri =
+          _extractUriOption(options, '${Flags.writeModularAnalysis}=')
+      ..modularAnalysisInputs =
+          _extractUriListOption(options, '${Flags.readModularAnalysis}')
       ..readDataUri = _extractUriOption(options, '${Flags.readData}=')
       ..writeDataUri = _extractUriOption(options, '${Flags.writeData}=')
       ..noClosedWorldInData = _hasOption(options, Flags.noClosedWorldInData)
@@ -669,18 +675,18 @@
     // null? In unittests we use the same compiler to analyze or build multiple
     // entrypoints.
     if (librariesSpecificationUri == null) {
-      throw new ArgumentError("[librariesSpecificationUri] is null.");
+      throw ArgumentError("[librariesSpecificationUri] is null.");
     }
     if (librariesSpecificationUri!.path.endsWith('/')) {
-      throw new ArgumentError(
+      throw ArgumentError(
           "[librariesSpecificationUri] should be a file: $librariesSpecificationUri");
     }
     Map<fe.ExperimentalFlag, bool> experimentalFlags =
-        new Map.from(fe.defaultExperimentalFlags);
+        Map.from(fe.defaultExperimentalFlags);
     experimentalFlags.addAll(explicitExperimentalFlags);
     if (platformBinaries == null &&
         equalMaps(experimentalFlags, fe.defaultExperimentalFlags)) {
-      throw new ArgumentError("Missing required ${Flags.platformBinaries}");
+      throw ArgumentError("Missing required ${Flags.platformBinaries}");
     }
     if (_soundNullSafety && _noSoundNullSafety) {
       throw ArgumentError("'${Flags.soundNullSafety}' incompatible with "
@@ -700,8 +706,7 @@
 
     if (benchmarkingExperiment) {
       // Set flags implied by '--benchmarking-x'.
-      // TODO(sra): Use this for some NNBD variant.
-      useContentSecurityPolicy = true;
+      // TODO(sra): Use this for some null safety variant.
       features.forceCanary();
     }
 
@@ -801,10 +806,10 @@
   /// Whether the type assertion should be emitted and checked.
   final bool isEmitted;
 
-  const CheckPolicy({this.isTrusted: false, this.isEmitted: false});
+  const CheckPolicy({this.isTrusted = false, this.isEmitted = false});
 
-  static const trusted = const CheckPolicy(isTrusted: true);
-  static const checked = const CheckPolicy(isEmitted: true);
+  static const trusted = CheckPolicy(isTrusted: true);
+  static const checked = CheckPolicy(isEmitted: true);
 
   @override
   String toString() => 'CheckPolicy(isTrusted=$isTrusted,'
@@ -864,7 +869,7 @@
     {void Function(String)? onError, void Function(String)? onWarning}) {
   List<String>? experiments =
       _extractOptionalCsvOption(options, Flags.enableLanguageExperiments);
-  onError ??= (String error) => throw new ArgumentError(error);
+  onError ??= (String error) => throw ArgumentError(error);
   onWarning ??= (String warning) => print(warning);
   return fe.parseExperimentalFlags(fe.parseExperimentalArguments(experiments),
       onError: onError, onWarning: onWarning);
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index 8be4970..dc2b669 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -43,8 +43,7 @@
     // internal links like the original type sets do?
     source.begin(tag);
     int typesCount = source.readInt();
-    LinkBuilder<InterfaceType> typeLinkBuilder =
-        new LinkBuilder<InterfaceType>();
+    LinkBuilder<InterfaceType> typeLinkBuilder = LinkBuilder<InterfaceType>();
     List<Link<InterfaceType>> links = [];
     for (int i = 0; i < typesCount; i++) {
       links.add(typeLinkBuilder.addLast(source.readDartType()));
@@ -55,12 +54,12 @@
 
     int levelCount = source.readInt();
     List<Link<InterfaceType>> levels =
-        new List<Link<InterfaceType>>.filled(levelCount, null);
+        List<Link<InterfaceType>>.filled(levelCount, null);
     for (int i = 0; i < levelCount; i++) {
       levels[i] = links[source.readInt()];
     }
     source.end(tag);
-    return new OrderedTypeSet.internal(levels, types);
+    return OrderedTypeSet.internal(levels, types);
   }
 
   /// Serializes this [OrderedTypeSet] to [sink].
@@ -89,11 +88,10 @@
 
   factory OrderedTypeSet.singleton(InterfaceType type) {
     Link<InterfaceType> types =
-        new LinkEntry<InterfaceType>(type, const Link<InterfaceType>());
-    List<Link<InterfaceType>> list =
-        new List<Link<InterfaceType>>.filled(1, null);
+        LinkEntry<InterfaceType>(type, const Link<InterfaceType>());
+    List<Link<InterfaceType>> list = List<Link<InterfaceType>>.filled(1, null);
     list[0] = types;
-    return new OrderedTypeSet.internal(list, types);
+    return OrderedTypeSet.internal(list, types);
   }
 
   /// Creates a new [OrderedTypeSet] for [type] when it directly extends the
@@ -106,15 +104,14 @@
             type.element,
             'Cannot extend generic class ${types.head} using '
             'OrderedTypeSet.extendClass'));
-    Link<InterfaceType> extendedTypes =
-        new LinkEntry<InterfaceType>(type, types);
+    Link<InterfaceType> extendedTypes = LinkEntry<InterfaceType>(type, types);
     List<Link<InterfaceType>> list =
-        new List<Link<InterfaceType>>.filled(levels + 1, null);
+        List<Link<InterfaceType>>.filled(levels + 1, null);
     for (int i = 0; i < levels; i++) {
       list[i] = _levels[i];
     }
     list[levels] = extendedTypes;
-    return new OrderedTypeSet.internal(list, extendedTypes);
+    return OrderedTypeSet.internal(list, extendedTypes);
   }
 
   Link<InterfaceType> get supertypes => types.tail;
@@ -132,7 +129,7 @@
 
   /// Returns the offsets into [types] at which each level begins.
   List<int> get levelOffsets {
-    List<int> offsets = new List.filled(levels, -1);
+    List<int> offsets = List.filled(levels, -1);
     int offset = 0;
     Link<InterfaceType> pointer = types;
     for (int depth = maxDepth; depth >= 0; depth--) {
@@ -201,8 +198,7 @@
 }
 
 abstract class OrderedTypeSetBuilderBase implements OrderedTypeSetBuilder {
-  Map<int, LinkEntry<InterfaceType>> map =
-      new Map<int, LinkEntry<InterfaceType>>();
+  Map<int, LinkEntry<InterfaceType>> map = Map<int, LinkEntry<InterfaceType>>();
   int maxDepth = -1;
 
   final ClassEntity cls;
@@ -245,7 +241,7 @@
       prev = link;
       link = link.tail;
     }
-    LinkEntry<InterfaceType> next = new LinkEntry<InterfaceType>(type);
+    LinkEntry<InterfaceType> next = LinkEntry<InterfaceType>(type);
     next.tail = null;
     if (prev == null) {
       map[depth] = next;
@@ -259,9 +255,9 @@
 
   OrderedTypeSet toTypeSet() {
     List<Link<InterfaceType>> levels =
-        new List<Link<InterfaceType>>.filled(maxDepth + 1, null);
+        List<Link<InterfaceType>>.filled(maxDepth + 1, null);
     if (maxDepth < 0) {
-      return new OrderedTypeSet.internal(levels, const Link<InterfaceType>());
+      return OrderedTypeSet.internal(levels, const Link<InterfaceType>());
     }
     Link<InterfaceType> next = const Link<InterfaceType>();
     for (int depth = 0; depth <= maxDepth; depth++) {
@@ -278,12 +274,12 @@
         next = first;
       }
     }
-    return new OrderedTypeSet.internal(levels, levels.last);
+    return OrderedTypeSet.internal(levels, levels.last);
   }
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     for (int depth = 0; depth <= maxDepth; depth++) {
       sb.write('$depth: ');
       LinkEntry<InterfaceType> first = map[depth];
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index ff64822..9435c0b 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -36,61 +36,50 @@
 
   void registerMapLiteral(MapLiteralUse mapLiteralUse) {
     assert(mapLiteralUse != null);
-    _mapLiterals ??= new Setlet<MapLiteralUse>();
+    _mapLiterals ??= Setlet();
     _mapLiterals.add(mapLiteralUse);
   }
 
   @override
-  Iterable<MapLiteralUse> get mapLiterals {
-    return _mapLiterals != null ? _mapLiterals : const <MapLiteralUse>[];
-  }
+  Iterable<MapLiteralUse> get mapLiterals => _mapLiterals ?? const [];
 
   void registerSetLiteral(SetLiteralUse setLiteralUse) {
     assert(setLiteralUse != null);
-    _setLiterals ??= new Setlet<SetLiteralUse>();
+    _setLiterals ??= Setlet();
     _setLiterals.add(setLiteralUse);
   }
 
   @override
-  Iterable<SetLiteralUse> get setLiterals =>
-      _setLiterals ?? const <SetLiteralUse>[];
+  Iterable<SetLiteralUse> get setLiterals => _setLiterals ?? const [];
 
   void registerListLiteral(ListLiteralUse listLiteralUse) {
     assert(listLiteralUse != null);
-    _listLiterals ??= new Setlet<ListLiteralUse>();
+    _listLiterals ??= Setlet();
     _listLiterals.add(listLiteralUse);
   }
 
   @override
-  Iterable<ListLiteralUse> get listLiterals {
-    return _listLiterals != null ? _listLiterals : const <ListLiteralUse>[];
-  }
+  Iterable<ListLiteralUse> get listLiterals => _listLiterals ?? const [];
 
   void registerRuntimeTypeUse(RuntimeTypeUse runtimeTypeUse) {
     assert(runtimeTypeUse != null);
-    _runtimeTypeUses ??= new Setlet<RuntimeTypeUse>();
+    _runtimeTypeUses ??= Setlet();
     _runtimeTypeUses.add(runtimeTypeUse);
   }
 
   @override
-  Iterable<RuntimeTypeUse> get runtimeTypeUses {
-    return _runtimeTypeUses != null
-        ? _runtimeTypeUses
-        : const <RuntimeTypeUse>[];
-  }
+  Iterable<RuntimeTypeUse> get runtimeTypeUses => _runtimeTypeUses ?? const [];
 
   void registerConstSymbolName(String name) {
-    _constSymbolNames ??= new Setlet<String>();
+    _constSymbolNames ??= Setlet();
     _constSymbolNames.add(name);
   }
 
   @override
-  Iterable<String> get constSymbolNames {
-    return _constSymbolNames != null ? _constSymbolNames : const <String>[];
-  }
+  Iterable<String> get constSymbolNames => _constSymbolNames ?? const [];
 
   void registerFeature(Feature feature) {
-    _features ??= new EnumSet<Feature>();
+    _features ??= EnumSet();
     _features.add(feature);
   }
 
@@ -102,51 +91,42 @@
   }
 
   void registerConstantLiteral(ConstantValue constant) {
-    _constantLiterals ??= new Setlet<ConstantValue>();
+    _constantLiterals ??= Setlet();
     _constantLiterals.add(constant);
   }
 
   @override
-  Iterable<ConstantValue> get constantLiterals {
-    return _constantLiterals != null
-        ? _constantLiterals
-        : const <ConstantValue>[];
-  }
+  Iterable<ConstantValue> get constantLiterals => _constantLiterals ?? const [];
 
   void registerNativeData(dynamic nativeData) {
     assert(nativeData != null);
-    _nativeData ??= new Setlet<dynamic>();
+    _nativeData ??= Setlet();
     _nativeData.add(nativeData);
   }
 
   @override
-  Iterable<dynamic> get nativeData {
-    return _nativeData != null ? _nativeData : const <dynamic>[];
-  }
+  Iterable<dynamic> get nativeData => _nativeData ?? const [];
 
   void registerSeenClass(ClassEntity seenClass) {
-    _seenClasses ??= new Setlet<ClassEntity>();
+    _seenClasses ??= Setlet();
     _seenClasses.add(seenClass);
   }
 
   @override
-  Iterable<ClassEntity> get seenClasses {
-    return _seenClasses ?? const <ClassEntity>[];
-  }
+  Iterable<ClassEntity> get seenClasses => _seenClasses ?? const [];
 
   void registerInstantiation(GenericInstantiation instantiation) {
-    _genericInstantiations ??= new Set<GenericInstantiation>();
+    _genericInstantiations ??= Setlet();
     _genericInstantiations.add(instantiation);
   }
 
   @override
-  Iterable<GenericInstantiation> get genericInstantiations {
-    return _genericInstantiations ?? const <GenericInstantiation>[];
-  }
+  Iterable<GenericInstantiation> get genericInstantiations =>
+      _genericInstantiations ?? const [];
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('ResolutionWorldImpactBuilder($member)');
     WorldImpact.printOn(sb, this);
     if (_features != null) {
diff --git a/pkg/compiler/lib/src/script.dart b/pkg/compiler/lib/src/script.dart
index 5adbdae..cacd79f 100644
--- a/pkg/compiler/lib/src/script.dart
+++ b/pkg/compiler/lib/src/script.dart
@@ -27,7 +27,7 @@
   Script.synthetic(Uri uri)
       : readableUri = uri,
         resourceUri = uri,
-        file = new StringSourceFile.fromUri(
+        file = StringSourceFile.fromUri(
             uri, "// Synthetic source file generated for '$uri'."),
         isSynthesized = true;
 
@@ -36,6 +36,6 @@
 
   /// Creates a new [Script] with the same URIs, but new content ([file]).
   Script copyWithFile(SourceFile file) {
-    return new Script(readableUri, resourceUri, file);
+    return Script(readableUri, resourceUri, file);
   }
 }
diff --git a/pkg/compiler/lib/src/serialization/abstract_sink.dart b/pkg/compiler/lib/src/serialization/abstract_sink.dart
index d4a4746..76d794a 100644
--- a/pkg/compiler/lib/src/serialization/abstract_sink.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_sink.dart
@@ -13,6 +13,7 @@
   /// This is used for debugging data inconsistencies between serialization
   /// and deserialization.
   final bool useDataKinds;
+  DataSourceIndices importedIndices;
 
   /// Visitor used for serializing [ir.DartType]s.
   DartTypeNodeWriter _dartTypeNodeWriter;
@@ -22,7 +23,7 @@
   List<String> _tags;
 
   /// Map of [_MemberData] object for serialized kernel member nodes.
-  Map<ir.Member, _MemberData> _memberData = {};
+  final Map<ir.Member, _MemberData> _memberData = {};
 
   IndexedSink<String> _stringIndex;
   IndexedSink<Uri> _uriIndex;
@@ -30,7 +31,7 @@
   IndexedSink<ImportEntity> _importIndex;
   IndexedSink<ConstantValue> _constantIndex;
 
-  Map<Type, IndexedSink> _generalCaches = {};
+  final Map<Type, IndexedSink> _generalCaches = {};
 
   EntityWriter _entityWriter = const EntityWriter();
   CodegenWriter _codegenWriter;
@@ -40,13 +41,23 @@
   ir.Member _currentMemberContext;
   _MemberData _currentMemberData;
 
-  AbstractDataSink({this.useDataKinds: false, this.tagFrequencyMap}) {
-    _dartTypeNodeWriter = new DartTypeNodeWriter(this);
-    _stringIndex = new IndexedSink<String>(this);
-    _uriIndex = new IndexedSink<Uri>(this);
-    _memberNodeIndex = new IndexedSink<ir.Member>(this);
-    _importIndex = new IndexedSink<ImportEntity>(this);
-    _constantIndex = new IndexedSink<ConstantValue>(this);
+  IndexedSink<T> _createSink<T>() {
+    if (importedIndices == null || !importedIndices.caches.containsKey(T)) {
+      return IndexedSink<T>(this);
+    } else {
+      Map<T, int> cacheCopy = Map.from(importedIndices.caches[T].cache);
+      return IndexedSink<T>(this, cache: cacheCopy);
+    }
+  }
+
+  AbstractDataSink(
+      {this.useDataKinds = false, this.tagFrequencyMap, this.importedIndices}) {
+    _dartTypeNodeWriter = DartTypeNodeWriter(this);
+    _stringIndex = _createSink<String>();
+    _uriIndex = _createSink<Uri>();
+    _memberNodeIndex = _createSink<ir.Member>();
+    _importIndex = _createSink<ImportEntity>();
+    _constantIndex = _createSink<ConstantValue>();
   }
 
   @override
@@ -88,12 +99,12 @@
     assert(_currentMemberContext != null,
         "DataSink has no current member context.");
     return _currentMemberData ??= _memberData[_currentMemberContext] ??=
-        new _MemberData(_currentMemberContext);
+        _MemberData(_currentMemberContext);
   }
 
   @override
   void writeCached<E>(E value, void f(E value)) {
-    IndexedSink sink = _generalCaches[E] ??= new IndexedSink<E>(this);
+    IndexedSink sink = _generalCaches[E] ??= _createSink<E>();
     sink.write(value, (v) => f(v));
   }
 
@@ -106,17 +117,17 @@
   }
 
   @override
-  void writeDartType(DartType value, {bool allowNull: false}) {
+  void writeDartType(DartType value, {bool allowNull = false}) {
     _writeDataKind(DataKind.dartType);
     _writeDartType(value, [], allowNull: allowNull);
   }
 
   void _writeDartType(
       DartType value, List<FunctionTypeVariable> functionTypeVariables,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (value == null) {
       if (!allowNull) {
-        throw new UnsupportedError("Missing DartType is not allowed.");
+        throw UnsupportedError("Missing DartType is not allowed.");
       }
       writeEnum(DartTypeKind.none);
     } else {
@@ -125,17 +136,17 @@
   }
 
   @override
-  void writeDartTypeNode(ir.DartType value, {bool allowNull: false}) {
+  void writeDartTypeNode(ir.DartType value, {bool allowNull = false}) {
     _writeDataKind(DataKind.dartTypeNode);
     _writeDartTypeNode(value, [], allowNull: allowNull);
   }
 
   void _writeDartTypeNode(
       ir.DartType value, List<ir.TypeParameter> functionTypeVariables,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (value == null) {
       if (!allowNull) {
-        throw new UnsupportedError("Missing ir.DartType node is not allowed.");
+        throw UnsupportedError("Missing ir.DartType node is not allowed.");
       }
       writeEnum(DartTypeNodeKind.none);
     } else {
@@ -264,7 +275,7 @@
 
   @override
   void writeTreeNodesInContext(Iterable<ir.TreeNode> values,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -278,7 +289,7 @@
 
   @override
   void writeTreeNodeMapInContext<V>(Map<ir.TreeNode, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -295,13 +306,13 @@
     ir.TreeNode member = node;
     while (member is! ir.Member) {
       if (member == null) {
-        throw new UnsupportedError("No enclosing member of TreeNode "
+        throw UnsupportedError("No enclosing member of TreeNode "
             "$node (${node.runtimeType})");
       }
       member = member.parent;
     }
     _writeMemberNode(member);
-    return _memberData[member] ??= new _MemberData(member);
+    return _memberData[member] ??= _MemberData(member);
   }
 
   void _writeTreeNode(ir.TreeNode value, _MemberData memberData) {
@@ -355,7 +366,7 @@
       _writeEnumInternal(_FunctionNodeKind.functionDeclaration);
       _writeTreeNode(parent, memberData);
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unsupported FunctionNode parent ${parent.runtimeType}");
     }
   }
@@ -377,7 +388,7 @@
       _writeFunctionNode(parent, memberData);
       _writeIntInternal(parent.typeParameters.indexOf(value));
     } else {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Unsupported TypeParameter parent ${parent.runtimeType}");
     }
   }
@@ -425,7 +436,7 @@
       writeEnum(LocalKind.typeVariableLocal);
       writeTypeVariable(local.typeVariable);
     } else {
-      throw new UnsupportedError("Unsupported local ${local.runtimeType}");
+      throw UnsupportedError("Unsupported local ${local.runtimeType}");
     }
   }
 
@@ -442,7 +453,7 @@
   }
 
   void _writeDoubleValue(double value) {
-    ByteData data = new ByteData(8);
+    ByteData data = ByteData(8);
     data.setFloat64(0, value);
     writeInt(data.getUint16(0));
     writeInt(data.getUint16(2));
@@ -453,7 +464,7 @@
   @override
   void writeIntegerValue(int value) {
     _writeDataKind(DataKind.int);
-    _writeBigInt(new BigInt.from(value));
+    _writeBigInt(BigInt.from(value));
   }
 
   void _writeBigInt(BigInt value) {
diff --git a/pkg/compiler/lib/src/serialization/abstract_source.dart b/pkg/compiler/lib/src/serialization/abstract_source.dart
index ed14321..5b45634 100644
--- a/pkg/compiler/lib/src/serialization/abstract_source.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_source.dart
@@ -12,6 +12,7 @@
       List<ir.DartType>.filled(0, null, growable: false);
 
   final bool useDataKinds;
+  DataSourceIndices importedIndices;
   EntityReader _entityReader = const EntityReader();
   ComponentLookup _componentLookup;
   EntityLookup _entityLookup;
@@ -24,17 +25,44 @@
   IndexedSource<ImportEntity> _importIndex;
   IndexedSource<ConstantValue> _constantIndex;
 
-  Map<Type, IndexedSource> _generalCaches = {};
+  final Map<Type, IndexedSource> _generalCaches = {};
 
   ir.Member _currentMemberContext;
   _MemberData _currentMemberData;
 
-  AbstractDataSource({this.useDataKinds: false}) {
-    _stringIndex = new IndexedSource<String>(this);
-    _uriIndex = new IndexedSource<Uri>(this);
-    _memberNodeIndex = new IndexedSource<_MemberData>(this);
-    _importIndex = new IndexedSource<ImportEntity>(this);
-    _constantIndex = new IndexedSource<ConstantValue>(this);
+  IndexedSource<T> _createSource<T>() {
+    if (importedIndices == null || !importedIndices.caches.containsKey(T)) {
+      return IndexedSource<T>(this);
+    } else {
+      List<T> cacheCopy = importedIndices.caches[T].cacheAsList.toList();
+      return IndexedSource<T>(this, cache: cacheCopy);
+    }
+  }
+
+  AbstractDataSource({this.useDataKinds = false, this.importedIndices}) {
+    _stringIndex = _createSource<String>();
+    _uriIndex = _createSource<Uri>();
+    _memberNodeIndex = _createSource<_MemberData>();
+    _importIndex = _createSource<ImportEntity>();
+    _constantIndex = _createSource<ConstantValue>();
+  }
+
+  @override
+  DataSourceIndices exportIndices() {
+    var indices = DataSourceIndices();
+    indices.caches[String] = DataSourceTypeIndices(_stringIndex.cache);
+    indices.caches[Uri] = DataSourceTypeIndices(_uriIndex.cache);
+    indices.caches[ImportEntity] = DataSourceTypeIndices(_importIndex.cache);
+    // _memberNodeIndex needs two entries depending on if the indices will be
+    // consumed by a [DataSource] or [DataSink].
+    indices.caches[_MemberData] = DataSourceTypeIndices(_memberNodeIndex.cache);
+    indices.caches[ir.Member] = DataSourceTypeIndices<ir.Member, _MemberData>(
+        _memberNodeIndex.cache, (_MemberData data) => data?.node);
+    indices.caches[ConstantValue] = DataSourceTypeIndices(_constantIndex.cache);
+    _generalCaches.forEach((type, indexedSource) {
+      indices.caches[type] = DataSourceTypeIndices(indexedSource.cache);
+    });
+    return indices;
   }
 
   @override
@@ -119,7 +147,7 @@
 
   @override
   E readCached<E>(E f()) {
-    IndexedSource source = _generalCaches[E] ??= new IndexedSource<E>(this);
+    IndexedSource source = _generalCaches[E] ??= _createSource<E>();
     return source.read(f);
   }
 
@@ -147,7 +175,7 @@
       List<ir.TypeParameter> functionTypeVariables) {
     int count = readInt();
     if (count == 0) return emptyListOfDartTypes;
-    List<ir.DartType> types = new List<ir.DartType>.filled(count, null);
+    List<ir.DartType> types = List<ir.DartType>.filled(count, null);
     for (int index = 0; index < count; index++) {
       types[index] = _readDartTypeNode(functionTypeVariables);
     }
@@ -160,11 +188,11 @@
     Uri uri = _readUri();
     int begin = _readIntInternal();
     int end = _readIntInternal();
-    return new SourceSpan(uri, begin, end);
+    return SourceSpan(uri, begin, end);
   }
 
   @override
-  DartType readDartType({bool allowNull: false}) {
+  DartType readDartType({bool allowNull = false}) {
     _checkDataKind(DataKind.dartType);
     DartType type = DartType.readFromDataSource(this, []);
     assert(type != null || allowNull);
@@ -172,7 +200,7 @@
   }
 
   @override
-  ir.DartType readDartTypeNode({bool allowNull: false}) {
+  ir.DartType readDartTypeNode({bool allowNull = false}) {
     _checkDataKind(DataKind.dartTypeNode);
     ir.DartType type = _readDartTypeNode([]);
     assert(type != null || allowNull);
@@ -198,7 +226,7 @@
         ir.Nullability typeParameterTypeNullability =
             readEnum(ir.Nullability.values);
         ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
-        return new ir.TypeParameterType(
+        return ir.TypeParameterType(
             typeParameter, typeParameterTypeNullability, promotedBound);
       case DartTypeNodeKind.functionTypeVariable:
         int index = readInt();
@@ -206,16 +234,15 @@
         ir.Nullability typeParameterTypeNullability =
             readEnum(ir.Nullability.values);
         ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
-        return new ir.TypeParameterType(functionTypeVariables[index],
+        return ir.TypeParameterType(functionTypeVariables[index],
             typeParameterTypeNullability, promotedBound);
       case DartTypeNodeKind.functionType:
         begin(functionTypeNodeTag);
         int typeParameterCount = readInt();
-        List<ir.TypeParameter> typeParameters =
-            new List<ir.TypeParameter>.generate(
-                typeParameterCount, (int index) => new ir.TypeParameter());
+        List<ir.TypeParameter> typeParameters = List<ir.TypeParameter>.generate(
+            typeParameterCount, (int index) => ir.TypeParameter());
         functionTypeVariables =
-            new List<ir.TypeParameter>.from(functionTypeVariables)
+            List<ir.TypeParameter>.from(functionTypeVariables)
               ..addAll(typeParameters);
         for (int index = 0; index < typeParameterCount; index++) {
           typeParameters[index].name = readString();
@@ -231,18 +258,17 @@
             _readDartTypeNodes(functionTypeVariables);
         int namedParameterCount = readInt();
         List<ir.NamedType> namedParameters =
-            new List<ir.NamedType>.filled(namedParameterCount, null);
+            List<ir.NamedType>.filled(namedParameterCount, null);
         for (int index = 0; index < namedParameterCount; index++) {
           String name = readString();
           bool isRequired = readBool();
           ir.DartType type = _readDartTypeNode(functionTypeVariables);
           namedParameters[index] =
-              new ir.NamedType(name, type, isRequired: isRequired);
+              ir.NamedType(name, type, isRequired: isRequired);
         }
         ir.TypedefType typedefType = _readDartTypeNode(functionTypeVariables);
         end(functionTypeNodeTag);
-        return new ir.FunctionType(
-            positionalParameters, returnType, nullability,
+        return ir.FunctionType(positionalParameters, returnType, nullability,
             namedParameters: namedParameters,
             typeParameters: typeParameters,
             requiredParameterCount: requiredParameterCount,
@@ -253,35 +279,35 @@
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         List<ir.DartType> typeArguments =
             _readDartTypeNodes(functionTypeVariables);
-        return new ir.InterfaceType(cls, nullability, typeArguments);
+        return ir.InterfaceType(cls, nullability, typeArguments);
       case DartTypeNodeKind.thisInterfaceType:
         ir.Class cls = readClassNode();
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         List<ir.DartType> typeArguments =
             _readDartTypeNodes(functionTypeVariables);
-        return new ThisInterfaceType(cls, nullability, typeArguments);
+        return ThisInterfaceType(cls, nullability, typeArguments);
       case DartTypeNodeKind.exactInterfaceType:
         ir.Class cls = readClassNode();
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         List<ir.DartType> typeArguments =
             _readDartTypeNodes(functionTypeVariables);
-        return new ExactInterfaceType(cls, nullability, typeArguments);
+        return ExactInterfaceType(cls, nullability, typeArguments);
       case DartTypeNodeKind.typedef:
         ir.Typedef typedef = readTypedefNode();
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         List<ir.DartType> typeArguments =
             _readDartTypeNodes(functionTypeVariables);
-        return new ir.TypedefType(typedef, nullability, typeArguments);
+        return ir.TypedefType(typedef, nullability, typeArguments);
       case DartTypeNodeKind.dynamicType:
         return const ir.DynamicType();
       case DartTypeNodeKind.futureOrType:
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         ir.DartType typeArgument = _readDartTypeNode(functionTypeVariables);
-        return new ir.FutureOrType(typeArgument, nullability);
+        return ir.FutureOrType(typeArgument, nullability);
       case DartTypeNodeKind.nullType:
         return const ir.NullType();
     }
-    throw new UnsupportedError("Unexpected DartTypeKind $kind");
+    throw UnsupportedError("Unexpected DartTypeKind $kind");
   }
 
   _MemberData _readMemberData() {
@@ -300,7 +326,7 @@
         String name = _readString();
         return library.lookupMemberDataByName(name);
     }
-    throw new UnsupportedError("Unsupported _MemberKind $kind");
+    throw UnsupportedError("Unsupported _MemberKind $kind");
   }
 
   @override
@@ -426,10 +452,10 @@
 
   @override
   List<E> readTreeNodesInContext<E extends ir.TreeNode>(
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       ir.TreeNode node = readTreeNodeInContextInternal(currentMemberData);
       list[i] = node;
@@ -439,7 +465,7 @@
 
   @override
   Map<K, V> readTreeNodeMapInContext<K extends ir.TreeNode, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -464,7 +490,7 @@
   }
 
   double _readDoubleValue() {
-    ByteData data = new ByteData(8);
+    ByteData data = ByteData(8);
     data.setUint16(0, readInt());
     data.setUint16(2, readInt());
     data.setUint16(4, readInt());
@@ -491,60 +517,60 @@
     switch (kind) {
       case ConstantValueKind.BOOL:
         bool value = readBool();
-        return new BoolConstantValue(value);
+        return BoolConstantValue(value);
       case ConstantValueKind.INT:
         BigInt value = _readBigInt();
-        return new IntConstantValue(value);
+        return IntConstantValue(value);
       case ConstantValueKind.DOUBLE:
         double value = _readDoubleValue();
-        return new DoubleConstantValue(value);
+        return DoubleConstantValue(value);
       case ConstantValueKind.STRING:
         String value = readString();
-        return new StringConstantValue(value);
+        return StringConstantValue(value);
       case ConstantValueKind.NULL:
         return const NullConstantValue();
       case ConstantValueKind.FUNCTION:
         IndexedFunction function = readMember();
         DartType type = readDartType();
-        return new FunctionConstantValue(function, type);
+        return FunctionConstantValue(function, type);
       case ConstantValueKind.LIST:
         DartType type = readDartType();
         List<ConstantValue> entries = readConstants();
-        return new ListConstantValue(type, entries);
+        return ListConstantValue(type, entries);
       case ConstantValueKind.SET:
         DartType type = readDartType();
         MapConstantValue entries = readConstant();
-        return new constant_system.JavaScriptSetConstant(type, entries);
+        return constant_system.JavaScriptSetConstant(type, entries);
       case ConstantValueKind.MAP:
         DartType type = readDartType();
         ListConstantValue keyList = readConstant();
         List<ConstantValue> values = readConstants();
         bool onlyStringKeys = readBool();
-        return new constant_system.JavaScriptMapConstant(
+        return constant_system.JavaScriptMapConstant(
             type, keyList, values, onlyStringKeys);
       case ConstantValueKind.CONSTRUCTED:
         InterfaceType type = readDartType();
         Map<FieldEntity, ConstantValue> fields =
             readMemberMap<FieldEntity, ConstantValue>(
                 (MemberEntity member) => readConstant());
-        return new ConstructedConstantValue(type, fields);
+        return ConstructedConstantValue(type, fields);
       case ConstantValueKind.TYPE:
         DartType representedType = readDartType();
         DartType type = readDartType();
-        return new TypeConstantValue(representedType, type);
+        return TypeConstantValue(representedType, type);
       case ConstantValueKind.INSTANTIATION:
         List<DartType> typeArguments = readDartTypes();
         ConstantValue function = readConstant();
-        return new InstantiationConstantValue(typeArguments, function);
+        return InstantiationConstantValue(typeArguments, function);
       case ConstantValueKind.NON_CONSTANT:
-        return new NonConstantValue();
+        return NonConstantValue();
       case ConstantValueKind.INTERCEPTOR:
         ClassEntity cls = readClass();
-        return new InterceptorConstantValue(cls);
+        return InterceptorConstantValue(cls);
       case ConstantValueKind.DEFERRED_GLOBAL:
         ConstantValue constant = readConstant();
         OutputUnit unit = readOutputUnitReference();
-        return new DeferredGlobalConstantValue(constant, unit);
+        return DeferredGlobalConstantValue(constant, unit);
       case ConstantValueKind.DUMMY_INTERCEPTOR:
         return DummyInterceptorConstantValue();
       case ConstantValueKind.LATE_SENTINEL:
@@ -553,9 +579,9 @@
         return UnreachableConstantValue();
       case ConstantValueKind.JS_NAME:
         js.LiteralString name = readJsNode();
-        return new JsNameConstantValue(name);
+        return JsNameConstantValue(name);
     }
-    throw new UnsupportedError("Unexpexted constant value kind ${kind}.");
+    throw UnsupportedError("Unexpexted constant value kind ${kind}.");
   }
 
   ir.TreeNode _readTreeNode(_MemberData memberData) {
@@ -577,7 +603,7 @@
         ir.ConstantExpression expression = _readTreeNode(memberData);
         ir.Constant constant =
             memberData.getConstantByIndex(expression, _readIntInternal());
-        return new ConstantReference(expression, constant);
+        return ConstantReference(expression, constant);
       case _TreeNodeKind.node:
         memberData ??= _readMemberData();
         int index = _readIntInternal();
@@ -588,7 +614,7 @@
             "${memberData.node}.$_errorContext");
         return treeNode;
     }
-    throw new UnsupportedError("Unexpected _TreeNodeKind $kind");
+    throw UnsupportedError("Unexpected _TreeNodeKind $kind");
   }
 
   ir.FunctionNode _readFunctionNode(_MemberData memberData) {
@@ -607,7 +633,7 @@
         ir.FunctionDeclaration functionDeclaration = _readTreeNode(memberData);
         return functionDeclaration.function;
     }
-    throw new UnsupportedError("Unexpected _FunctionNodeKind $kind");
+    throw UnsupportedError("Unexpected _FunctionNodeKind $kind");
   }
 
   @override
@@ -626,7 +652,7 @@
         ir.FunctionNode functionNode = _readFunctionNode(memberData);
         return functionNode.typeParameters[_readIntInternal()];
     }
-    throw new UnsupportedError("Unexpected _TypeParameterKind kind $kind");
+    throw UnsupportedError("Unexpected _TypeParameterKind kind $kind");
   }
 
   void _checkDataKind(DataKind expectedKind) {
@@ -648,18 +674,18 @@
         return localLookup.getLocalByIndex(memberContext, localIndex);
       case LocalKind.thisLocal:
         ClassEntity cls = readClass();
-        return new ThisLocal(cls);
+        return ThisLocal(cls);
       case LocalKind.boxLocal:
         ClassEntity cls = readClass();
-        return new BoxLocal(cls);
+        return BoxLocal(cls);
       case LocalKind.anonymousClosureLocal:
         ClassEntity cls = readClass();
-        return new AnonymousClosureLocal(cls);
+        return AnonymousClosureLocal(cls);
       case LocalKind.typeVariableLocal:
         TypeVariableEntity typeVariable = readTypeVariable();
-        return new TypeVariableLocal(typeVariable);
+        return TypeVariableLocal(typeVariable);
     }
-    throw new UnsupportedError("Unexpected local kind $kind");
+    throw UnsupportedError("Unexpected local kind $kind");
   }
 
   @override
@@ -677,7 +703,7 @@
     Uri uri = _readUri();
     Uri enclosingLibraryUri = _readUri();
     bool isDeferred = _readBool();
-    return new ImportEntity(isDeferred, name, uri, enclosingLibraryUri);
+    return ImportEntity(isDeferred, name, uri, enclosingLibraryUri);
   }
 
   @override
diff --git a/pkg/compiler/lib/src/serialization/binary_sink.dart b/pkg/compiler/lib/src/serialization/binary_sink.dart
index 6d46fb4..92a4d43 100644
--- a/pkg/compiler/lib/src/serialization/binary_sink.dart
+++ b/pkg/compiler/lib/src/serialization/binary_sink.dart
@@ -13,9 +13,14 @@
   int _length = 0;
 
   BinarySink(this.sink,
-      {bool useDataKinds: false, Map<String, int> tagFrequencyMap})
-      : _bufferedSink = new BufferedSink(sink),
-        super(useDataKinds: useDataKinds, tagFrequencyMap: tagFrequencyMap);
+      {bool useDataKinds = false,
+      Map<String, int> tagFrequencyMap,
+      DataSourceIndices importedIndices})
+      : _bufferedSink = BufferedSink(sink),
+        super(
+            useDataKinds: useDataKinds,
+            tagFrequencyMap: tagFrequencyMap,
+            importedIndices: importedIndices);
 
   @override
   void _begin(String tag) {
diff --git a/pkg/compiler/lib/src/serialization/binary_source.dart b/pkg/compiler/lib/src/serialization/binary_source.dart
index 92888ad..3844b35 100644
--- a/pkg/compiler/lib/src/serialization/binary_source.dart
+++ b/pkg/compiler/lib/src/serialization/binary_source.dart
@@ -13,9 +13,11 @@
   final StringInterner _stringInterner;
 
   BinarySourceImpl(this._bytes,
-      {bool useDataKinds: false, StringInterner stringInterner})
+      {bool useDataKinds = false,
+      StringInterner stringInterner,
+      DataSourceIndices importedIndices})
       : _stringInterner = stringInterner,
-        super(useDataKinds: useDataKinds);
+        super(useDataKinds: useDataKinds, importedIndices: importedIndices);
 
   @override
   void _begin(String tag) {}
@@ -27,7 +29,7 @@
   @override
   String _readStringInternal() {
     int length = _readIntInternal();
-    List<int> bytes = new Uint8List(length);
+    List<int> bytes = Uint8List(length);
     bytes.setRange(0, bytes.length, _bytes, _byteOffset);
     _byteOffset += bytes.length;
     String string = utf8.decode(bytes);
diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart
index 70a8662..a0bd6d7 100644
--- a/pkg/compiler/lib/src/serialization/helpers.dart
+++ b/pkg/compiler/lib/src/serialization/helpers.dart
@@ -141,7 +141,7 @@
   @override
   void defaultDartType(
       ir.DartType node, List<ir.TypeParameter> functionTypeVariables) {
-    throw new UnsupportedError(
+    throw UnsupportedError(
         "Unexpected ir.DartType $node (${node.runtimeType}).");
   }
 
@@ -208,9 +208,8 @@
       ir.FunctionType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.functionType);
     _sink.begin(functionTypeNodeTag);
-    functionTypeVariables =
-        new List<ir.TypeParameter>.from(functionTypeVariables)
-          ..addAll(node.typeParameters);
+    functionTypeVariables = List<ir.TypeParameter>.from(functionTypeVariables)
+      ..addAll(node.typeParameters);
     _sink.writeInt(node.typeParameters.length);
     for (ir.TypeParameter parameter in node.typeParameters) {
       _sink.writeString(parameter.name);
@@ -264,9 +263,12 @@
 /// Data sink helper that canonicalizes [E] values using indices.
 class IndexedSink<E> {
   final AbstractDataSink _sink;
-  final Map<E, int> _cache = {null: 0}; // slot 0 is pre-allocated to `null`.
+  Map<E, int> cache;
 
-  IndexedSink(this._sink);
+  IndexedSink(this._sink, {this.cache}) {
+    // [cache] slot 0 is pre-allocated to `null`.
+    this.cache ??= {null: 0};
+  }
 
   /// Write a reference to [value] to the data sink.
   ///
@@ -274,13 +276,13 @@
   /// serialize the [value] itself.
   void write(E value, void writeValue(E value)) {
     const int pending = -1;
-    int index = _cache[value];
+    int index = cache[value];
     if (index == null) {
-      index = _cache.length;
+      index = cache.length;
       _sink._writeIntInternal(index);
-      _cache[value] = pending; // Increments length to allocate slot.
+      cache[value] = pending; // Increments length to allocate slot.
       writeValue(value);
-      _cache[value] = index;
+      cache[value] = index;
     } else if (index == pending) {
       throw ArgumentError("Cyclic dependency on cached value: $value");
     } else {
@@ -292,9 +294,12 @@
 /// Data source helper reads canonicalized [E] values through indices.
 class IndexedSource<E> {
   final AbstractDataSource _source;
-  final List<E> _cache = [null]; // slot 0 is pre-allocated to `null`.
+  List<E> cache;
 
-  IndexedSource(this._source);
+  IndexedSource(this._source, {this.cache}) {
+    // [cache] slot 0 is pre-allocated to `null`.
+    this.cache ??= [null];
+  }
 
   /// Reads a reference to an [E] value from the data source.
   ///
@@ -302,14 +307,14 @@
   /// the value itself.
   E read(E readValue()) {
     int index = _source._readIntInternal();
-    if (index >= _cache.length) {
-      assert(index == _cache.length);
-      _cache.add(null); // placeholder.
+    if (index >= cache.length) {
+      assert(index == cache.length);
+      cache.add(null); // placeholder.
       E value = readValue();
-      _cache[index] = value;
+      cache[index] = value;
       return value;
     } else {
-      E value = _cache[index];
+      E value = cache[index];
       if (value == null && index != 0) {
         throw StateError('Unfilled index $index of $E');
       }
diff --git a/pkg/compiler/lib/src/serialization/member_data.dart b/pkg/compiler/lib/src/serialization/member_data.dart
index 72b2148..87db36b 100644
--- a/pkg/compiler/lib/src/serialization/member_data.dart
+++ b/pkg/compiler/lib/src/serialization/member_data.dart
@@ -18,7 +18,7 @@
     if (_libraryMap == null) {
       _libraryMap = {};
       for (ir.Library library in _component.libraries) {
-        _libraryMap[library.importUri] = new _LibraryData(library);
+        _libraryMap[library.importUri] = _LibraryData(library);
       }
     }
     _LibraryData data = _libraryMap[canonicalUri];
@@ -30,12 +30,12 @@
 /// Returns a name uniquely identifying a member within its enclosing library
 /// or class.
 String _computeMemberName(ir.Member member) {
-  if (member.name.isPrivate &&
-      member.name.libraryName != member.enclosingLibrary.reference) {
-    // TODO(33732): Handle noSuchMethod forwarders for private members from
-    // other libraries.
-    return null;
-  }
+  // This should mostly be empty except when serializing the name of nSM
+  // forwarders (see dartbug.com/33732).
+  String libraryPrefix = member.name.isPrivate &&
+          member.name.libraryName != member.enclosingLibrary.reference
+      ? '${member.name.libraryName.canonicalName.name}:'
+      : '';
   String name = member.name.text;
   if (member is ir.Constructor) {
     name = '.$name';
@@ -46,7 +46,7 @@
       name += "=";
     }
   }
-  return name;
+  return '${libraryPrefix}${name}';
 }
 
 /// Helper for looking up classes and members from an [ir.Library] node.
@@ -80,7 +80,7 @@
             !_classesByNode.containsKey(cls),
             "Duplicate class '${cls.name}' in $_classesByNode "
             "trying to add $cls.");
-        _classesByNode[cls] = _classesByName[cls.name] = new _ClassData(cls);
+        _classesByNode[cls] = _classesByName[cls.name] = _ClassData(cls);
       }
     }
   }
@@ -126,7 +126,7 @@
             !_membersByNode.containsKey(member),
             "Duplicate member '$name' in $_membersByNode "
             "trying to add $member.");
-        _membersByNode[member] = _membersByName[name] = new _MemberData(member);
+        _membersByNode[member] = _membersByName[name] = _MemberData(member);
       }
     }
   }
@@ -174,7 +174,7 @@
             !_membersByNode.containsKey(member),
             "Duplicate member '$name' in $_membersByNode "
             "trying to add $member.");
-        _membersByNode[member] = _membersByName[name] = new _MemberData(member);
+        _membersByNode[member] = _membersByName[name] = _MemberData(member);
       }
     }
   }
@@ -219,14 +219,13 @@
     if (_indexToNodeMap == null) {
       _indexToNodeMap = {};
       _nodeToIndexMap = {};
-      node.accept(
-          new _TreeNodeIndexerVisitor(_indexToNodeMap, _nodeToIndexMap));
+      node.accept(_TreeNodeIndexerVisitor(_indexToNodeMap, _nodeToIndexMap));
     }
   }
 
   _ConstantNodeIndexerVisitor _createConstantIndexer(
       ir.ConstantExpression node) {
-    _ConstantNodeIndexerVisitor indexer = new _ConstantNodeIndexerVisitor();
+    _ConstantNodeIndexerVisitor indexer = _ConstantNodeIndexerVisitor();
     node.constant.accept(indexer);
     return indexer;
   }
diff --git a/pkg/compiler/lib/src/serialization/mixins.dart b/pkg/compiler/lib/src/serialization/mixins.dart
index 0b48464..8e2bfa3 100644
--- a/pkg/compiler/lib/src/serialization/mixins.dart
+++ b/pkg/compiler/lib/src/serialization/mixins.dart
@@ -16,10 +16,10 @@
   }
 
   @override
-  List<E> readList<E>(E f(), {bool emptyAsNull: false}) {
+  List<E> readList<E>(E f(), {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = f();
     }
@@ -45,10 +45,10 @@
   }
 
   @override
-  List<String> readStrings({bool emptyAsNull: false}) {
+  List<String> readStrings({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<String> list = new List<String>.filled(count, null);
+    List<String> list = List<String>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = readString();
     }
@@ -56,10 +56,10 @@
   }
 
   @override
-  List<DartType> readDartTypes({bool emptyAsNull: false}) {
+  List<DartType> readDartTypes({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<DartType> list = new List<DartType>.filled(count, null);
+    List<DartType> list = List<DartType>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = readDartType();
     }
@@ -67,11 +67,10 @@
   }
 
   @override
-  List<ir.TypeParameter> readTypeParameterNodes({bool emptyAsNull: false}) {
+  List<ir.TypeParameter> readTypeParameterNodes({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<ir.TypeParameter> list =
-        new List<ir.TypeParameter>.filled(count, null);
+    List<ir.TypeParameter> list = List<ir.TypeParameter>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = readTypeParameterNode();
     }
@@ -79,10 +78,10 @@
   }
 
   @override
-  List<E> readMembers<E extends MemberEntity>({bool emptyAsNull: false}) {
+  List<E> readMembers<E extends MemberEntity>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       MemberEntity member = readMember();
       list[i] = member;
@@ -91,10 +90,10 @@
   }
 
   @override
-  List<E> readMemberNodes<E extends ir.Member>({bool emptyAsNull: false}) {
+  List<E> readMemberNodes<E extends ir.Member>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       ir.Member value = readMemberNode();
       list[i] = value;
@@ -103,10 +102,10 @@
   }
 
   @override
-  List<E> readClasses<E extends ClassEntity>({bool emptyAsNull: false}) {
+  List<E> readClasses<E extends ClassEntity>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       ClassEntity cls = readClass();
       list[i] = cls;
@@ -116,7 +115,7 @@
 
   @override
   Map<K, V> readLibraryMap<K extends LibraryEntity, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -130,7 +129,7 @@
 
   @override
   Map<K, V> readClassMap<K extends ClassEntity, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -144,7 +143,7 @@
 
   @override
   Map<K, V> readMemberMap<K extends MemberEntity, V>(V f(MemberEntity member),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -158,7 +157,7 @@
 
   @override
   Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -172,7 +171,7 @@
 
   @override
   Map<K, V> readTreeNodeMap<K extends ir.TreeNode, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -186,7 +185,7 @@
 
   @override
   Map<K, V> readTypeVariableMap<K extends IndexedTypeVariable, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -199,10 +198,10 @@
   }
 
   @override
-  List<E> readLocals<E extends Local>({bool emptyAsNull: false}) {
+  List<E> readLocals<E extends Local>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       Local local = readLocal();
       list[i] = local;
@@ -211,7 +210,8 @@
   }
 
   @override
-  Map<K, V> readLocalMap<K extends Local, V>(V f(), {bool emptyAsNull: false}) {
+  Map<K, V> readLocalMap<K extends Local, V>(V f(),
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -224,10 +224,10 @@
   }
 
   @override
-  List<E> readTreeNodes<E extends ir.TreeNode>({bool emptyAsNull: false}) {
+  List<E> readTreeNodes<E extends ir.TreeNode>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       ir.TreeNode node = readTreeNode();
       list[i] = node;
@@ -236,7 +236,7 @@
   }
 
   @override
-  Map<String, V> readStringMap<V>(V f(), {bool emptyAsNull: false}) {
+  Map<String, V> readStringMap<V>(V f(), {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<String, V> map = {};
@@ -294,10 +294,10 @@
   }
 
   @override
-  List<E> readConstants<E extends ConstantValue>({bool emptyAsNull: false}) {
+  List<E> readConstants<E extends ConstantValue>({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = new List<E>.filled(count, null);
+    List<E> list = List<E>.filled(count, null);
     for (int i = 0; i < count; i++) {
       ConstantValue value = readConstant();
       list[i] = value;
@@ -307,7 +307,7 @@
 
   @override
   Map<K, V> readConstantMap<K extends ConstantValue, V>(V f(),
-      {bool emptyAsNull: false}) {
+      {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<K, V> map = {};
@@ -338,10 +338,10 @@
   }
 
   @override
-  List<ImportEntity> readImports({bool emptyAsNull: false}) {
+  List<ImportEntity> readImports({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<ImportEntity> list = new List<ImportEntity>.filled(count, null);
+    List<ImportEntity> list = List<ImportEntity>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = readImport();
     }
@@ -349,7 +349,7 @@
   }
 
   @override
-  Map<ImportEntity, V> readImportMap<V>(V f(), {bool emptyAsNull: false}) {
+  Map<ImportEntity, V> readImportMap<V>(V f(), {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
     Map<ImportEntity, V> map = {};
@@ -362,10 +362,10 @@
   }
 
   @override
-  List<ir.DartType> readDartTypeNodes({bool emptyAsNull: false}) {
+  List<ir.DartType> readDartTypeNodes({bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<ir.DartType> list = new List<ir.DartType>.filled(count, null);
+    List<ir.DartType> list = List<ir.DartType>.filled(count, null);
     for (int i = 0; i < count; i++) {
       list[i] = readDartTypeNode();
     }
@@ -376,7 +376,7 @@
   ir.Name readName() {
     String text = readString();
     ir.Library library = readValueOrNull(readLibraryNode);
-    return new ir.Name(text, library);
+    return ir.Name(text, library);
   }
 
   @override
@@ -436,7 +436,7 @@
   }
 
   @override
-  void writeClasses(Iterable<ClassEntity> values, {bool allowNull: false}) {
+  void writeClasses(Iterable<ClassEntity> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -449,7 +449,7 @@
   }
 
   @override
-  void writeTreeNodes(Iterable<ir.TreeNode> values, {bool allowNull: false}) {
+  void writeTreeNodes(Iterable<ir.TreeNode> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -462,7 +462,7 @@
   }
 
   @override
-  void writeStrings(Iterable<String> values, {bool allowNull: false}) {
+  void writeStrings(Iterable<String> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -475,7 +475,7 @@
   }
 
   @override
-  void writeMemberNodes(Iterable<ir.Member> values, {bool allowNull: false}) {
+  void writeMemberNodes(Iterable<ir.Member> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -488,7 +488,7 @@
   }
 
   @override
-  void writeDartTypes(Iterable<DartType> values, {bool allowNull: false}) {
+  void writeDartTypes(Iterable<DartType> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -502,7 +502,7 @@
 
   @override
   void writeLibraryMap<V>(Map<LibraryEntity, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -517,7 +517,7 @@
 
   @override
   void writeClassMap<V>(Map<ClassEntity, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -533,7 +533,7 @@
   @override
   void writeMemberMap<V>(
       Map<MemberEntity, V> map, void f(MemberEntity member, V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -548,7 +548,7 @@
 
   @override
   void writeStringMap<V>(Map<String, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -562,7 +562,7 @@
   }
 
   @override
-  void writeLocals(Iterable<Local> values, {bool allowNull: false}) {
+  void writeLocals(Iterable<Local> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -576,7 +576,7 @@
 
   @override
   void writeLocalMap<V>(Map<Local, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -591,7 +591,7 @@
 
   @override
   void writeMemberNodeMap<V>(Map<ir.Member, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -606,7 +606,7 @@
 
   @override
   void writeTreeNodeMap<V>(Map<ir.TreeNode, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -621,7 +621,7 @@
 
   @override
   void writeTypeVariableMap<V>(Map<IndexedTypeVariable, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -636,7 +636,7 @@
 
   @override
   void writeList<E>(Iterable<E> values, void f(E value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -671,7 +671,7 @@
   }
 
   @override
-  void writeMembers(Iterable<MemberEntity> values, {bool allowNull: false}) {
+  void writeMembers(Iterable<MemberEntity> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -685,7 +685,7 @@
 
   @override
   void writeTypeParameterNodes(Iterable<ir.TypeParameter> values,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -706,7 +706,8 @@
   }
 
   @override
-  void writeConstants(Iterable<ConstantValue> values, {bool allowNull: false}) {
+  void writeConstants(Iterable<ConstantValue> values,
+      {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -720,7 +721,7 @@
 
   @override
   void writeConstantMap<V>(Map<ConstantValue, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -750,7 +751,7 @@
   }
 
   @override
-  void writeImports(Iterable<ImportEntity> values, {bool allowNull: false}) {
+  void writeImports(Iterable<ImportEntity> values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -764,7 +765,7 @@
 
   @override
   void writeImportMap<V>(Map<ImportEntity, V> map, void f(V value),
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
       writeInt(0);
@@ -779,7 +780,7 @@
 
   @override
   void writeDartTypeNodes(Iterable<ir.DartType> values,
-      {bool allowNull: false}) {
+      {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
diff --git a/pkg/compiler/lib/src/serialization/node_indexer.dart b/pkg/compiler/lib/src/serialization/node_indexer.dart
index 1e52a8f..377eb80 100644
--- a/pkg/compiler/lib/src/serialization/node_indexer.dart
+++ b/pkg/compiler/lib/src/serialization/node_indexer.dart
@@ -252,14 +252,10 @@
 
 /// Visitor that ascribes an index to all [ir.Constant]s that we potentially
 /// need to reference for serialization and deserialization.
-///
-/// Currently this is only list, map, and set constants, which are used as
-/// allocation identities in the global inference.
 class _ConstantNodeIndexerVisitor implements ir.ConstantVisitor<void> {
   int _currentIndex = 0;
   final Map<int, ir.Constant> _indexToNodeMap = {};
   final Map<ir.Constant, int> _nodeToIndexMap = {};
-  final Set<ir.Constant> _visitedNonindexedNodes = {};
 
   /// Returns `true` if node not already registered.
   bool _register(ir.Constant node) {
@@ -283,34 +279,48 @@
   }
 
   @override
-  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {}
+  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {}
+  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitStaticTearOffConstant(ir.StaticTearOffConstant node) {}
+  void visitStaticTearOffConstant(ir.StaticTearOffConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitConstructorTearOffConstant(ir.ConstructorTearOffConstant node) {}
+  void visitConstructorTearOffConstant(ir.ConstructorTearOffConstant node) {
+    _register(node);
+  }
 
   @override
   void visitRedirectingFactoryTearOffConstant(
-      ir.RedirectingFactoryTearOffConstant node) {}
+      ir.RedirectingFactoryTearOffConstant node) {
+    _register(node);
+  }
 
   @override
   void visitInstantiationConstant(ir.InstantiationConstant node) {
-    node.tearOffConstant.accept(this);
+    if (_register(node)) {
+      node.tearOffConstant.accept(this);
+    }
   }
 
   @override
   void visitTypedefTearOffConstant(ir.TypedefTearOffConstant node) {
-    node.tearOffConstant.accept(this);
+    if (_register(node)) {
+      node.tearOffConstant.accept(this);
+    }
   }
 
   @override
   void visitInstanceConstant(ir.InstanceConstant node) {
-    if (_visitedNonindexedNodes.add(node)) {
+    if (_register(node)) {
       node.fieldValues.forEach((_, ir.Constant value) {
         value.accept(this);
       });
@@ -346,26 +356,38 @@
   }
 
   @override
-  void visitSymbolConstant(ir.SymbolConstant node) {}
+  void visitSymbolConstant(ir.SymbolConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitStringConstant(ir.StringConstant node) {}
+  void visitStringConstant(ir.StringConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitDoubleConstant(ir.DoubleConstant node) {}
+  void visitDoubleConstant(ir.DoubleConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitIntConstant(ir.IntConstant node) {}
+  void visitIntConstant(ir.IntConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitBoolConstant(ir.BoolConstant node) {}
+  void visitBoolConstant(ir.BoolConstant node) {
+    _register(node);
+  }
 
   @override
-  void visitNullConstant(ir.NullConstant node) {}
+  void visitNullConstant(ir.NullConstant node) {
+    _register(node);
+  }
 
   @override
   void defaultConstant(ir.Constant node) {
-    throw new UnimplementedError(
+    throw UnimplementedError(
         "Unexpected constant: $node (${node.runtimeType})");
   }
 }
diff --git a/pkg/compiler/lib/src/serialization/object_sink.dart b/pkg/compiler/lib/src/serialization/object_sink.dart
index 82c8885..bbb91e3 100644
--- a/pkg/compiler/lib/src/serialization/object_sink.dart
+++ b/pkg/compiler/lib/src/serialization/object_sink.dart
@@ -11,17 +11,23 @@
 class ObjectSink extends AbstractDataSink {
   List<dynamic> _data;
 
-  ObjectSink(this._data, {bool useDataKinds, Map<String, int> tagFrequencyMap})
-      : super(useDataKinds: useDataKinds, tagFrequencyMap: tagFrequencyMap);
+  ObjectSink(this._data,
+      {bool useDataKinds,
+      Map<String, int> tagFrequencyMap,
+      DataSourceIndices importedIndices})
+      : super(
+            useDataKinds: useDataKinds,
+            tagFrequencyMap: tagFrequencyMap,
+            importedIndices: importedIndices);
 
   @override
   void _begin(String tag) {
-    _data.add(new Tag('begin:$tag'));
+    _data.add(Tag('begin:$tag'));
   }
 
   @override
   void _end(String tag) {
-    _data.add(new Tag('end:$tag'));
+    _data.add(Tag('end:$tag'));
   }
 
   @override
diff --git a/pkg/compiler/lib/src/serialization/object_source.dart b/pkg/compiler/lib/src/serialization/object_source.dart
index 54207a2..07e07ad 100644
--- a/pkg/compiler/lib/src/serialization/object_source.dart
+++ b/pkg/compiler/lib/src/serialization/object_source.dart
@@ -12,8 +12,9 @@
   int _index = 0;
   final List<dynamic> _data;
 
-  ObjectSource(this._data, {bool useDataKinds})
-      : super(useDataKinds: useDataKinds);
+  ObjectSource(this._data,
+      {bool useDataKinds, DataSourceIndices importedIndices})
+      : super(useDataKinds: useDataKinds, importedIndices: importedIndices);
 
   T _read<T>() {
     dynamic value = _data[_index++];
@@ -23,7 +24,7 @@
 
   @override
   void _begin(String tag) {
-    Tag expectedTag = new Tag('begin:$tag');
+    Tag expectedTag = Tag('begin:$tag');
     Tag actualTag = _read();
     assert(
         expectedTag == actualTag,
@@ -33,7 +34,7 @@
 
   @override
   void _end(String tag) {
-    Tag expectedTag = new Tag('end:$tag');
+    Tag expectedTag = Tag('end:$tag');
     Tag actualTag = _read();
     assert(
         expectedTag == actualTag,
@@ -55,7 +56,7 @@
 
   @override
   String get _errorContext {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     for (int i = _index - 50; i < _index + 10; i++) {
       if (i >= 0 && i < _data.length) {
         if (i == _index - 1) {
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index 8e2cf4d..4fb6654 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -78,7 +78,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readList].
   void writeList<E>(Iterable<E> values, void f(E value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the boolean [value] to this data sink.
   void writeBool(bool value);
@@ -106,7 +106,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readStrings].
-  void writeStrings(Iterable<String> values, {bool allowNull: false});
+  void writeStrings(Iterable<String> values, {bool allowNull = false});
 
   /// Writes the [map] from string to [V] values to this data sink, calling [f]
   /// to write each value to the data sink. If [allowNull] is `true`, [map] is
@@ -115,7 +115,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readStringMap].
   void writeStringMap<V>(Map<String, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the enum value [value] to this data sink.
   // TODO(johnniwinther): Change the signature to
@@ -143,7 +143,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readMemberNodes].
-  void writeMemberNodes(Iterable<ir.Member> values, {bool allowNull: false});
+  void writeMemberNodes(Iterable<ir.Member> values, {bool allowNull = false});
 
   /// Writes the [map] from references to kernel member nodes to [V] values to
   /// this data sink, calling [f] to write each value to the data sink. If
@@ -152,7 +152,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readMemberNodeMap].
   void writeMemberNodeMap<V>(Map<ir.Member, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a kernel name node to this data sink.
   void writeName(ir.Name value);
@@ -179,7 +179,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readTreeNodes].
-  void writeTreeNodes(Iterable<ir.TreeNode> values, {bool allowNull: false});
+  void writeTreeNodes(Iterable<ir.TreeNode> values, {bool allowNull = false});
 
   /// Writes the [map] from references to kernel tree nodes to [V] values to
   /// this data sink, calling [f] to write each value to the data sink. If
@@ -188,7 +188,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readTreeNodeMap].
   void writeTreeNodeMap<V>(Map<ir.TreeNode, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the kernel tree node [value] in the known [context]
   /// to this data sink.
@@ -208,7 +208,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readTreeNodesInContext].
   void writeTreeNodesInContext(Iterable<ir.TreeNode> values,
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the [map] from references to kernel tree nodes to [V] values in the
   /// known [context] to this data sink, calling [f] to write each value to the
@@ -217,7 +217,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readTreeNodeMapInContext].
   void writeTreeNodeMapInContext<V>(Map<ir.TreeNode, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the kernel type parameter node [value] to this data
   /// sink.
@@ -230,22 +230,22 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readTypeParameterNodes].
   void writeTypeParameterNodes(Iterable<ir.TypeParameter> values,
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the type [value] to this data sink. If [allowNull] is `true`,
   /// [value] is allowed to be `null`.
-  void writeDartType(DartType value, {bool allowNull: false});
+  void writeDartType(DartType value, {bool allowNull = false});
 
   /// Writes the type [values] to this data sink. If [allowNull] is `true`,
   /// [values] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readDartTypes].
-  void writeDartTypes(Iterable<DartType> values, {bool allowNull: false});
+  void writeDartTypes(Iterable<DartType> values, {bool allowNull = false});
 
   /// Writes the kernel type node [value] to this data sink. If [allowNull] is
   /// `true`, [value] is allowed to be `null`.
-  void writeDartTypeNode(ir.DartType value, {bool allowNull: false});
+  void writeDartTypeNode(ir.DartType value, {bool allowNull = false});
 
   /// Writes the kernel type node [values] to this data sink. If [allowNull] is
   /// `true`, [values] is allowed to be `null`.
@@ -253,7 +253,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readDartTypeNodes].
   void writeDartTypeNodes(Iterable<ir.DartType> values,
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the source span [value] to this data sink.
   void writeSourceSpan(SourceSpan value);
@@ -275,7 +275,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readLibraryMap].
   void writeLibraryMap<V>(Map<LibraryEntity, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the indexed class [value] to this data sink.
   void writeClass(IndexedClass value);
@@ -292,7 +292,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readClasses].
-  void writeClasses(Iterable<ClassEntity> values, {bool allowNull: false});
+  void writeClasses(Iterable<ClassEntity> values, {bool allowNull = false});
 
   /// Writes the [map] from references to indexed classes to [V] values to this
   /// data sink, calling [f] to write each value to the data sink. If
@@ -301,7 +301,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readClassMap].
   void writeClassMap<V>(Map<ClassEntity, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the indexed member [value] to this data sink.
   void writeMember(IndexedMember value);
@@ -318,7 +318,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readMembers].
-  void writeMembers(Iterable<MemberEntity> values, {bool allowNull: false});
+  void writeMembers(Iterable<MemberEntity> values, {bool allowNull = false});
 
   /// Writes the [map] from references to indexed members to [V] values to this
   /// data sink, calling [f] to write each value to the data sink. If
@@ -328,7 +328,7 @@
   /// [DataSource.readMemberMap].
   void writeMemberMap<V>(
       Map<MemberEntity, V> map, void f(MemberEntity member, V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the indexed type variable [value] to this data sink.
   void writeTypeVariable(IndexedTypeVariable value);
@@ -340,7 +340,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readTypeVariableMap].
   void writeTypeVariableMap<V>(Map<IndexedTypeVariable, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a reference to the local [value] to this data sink.
   void writeLocal(Local local);
@@ -357,7 +357,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readLocals].
-  void writeLocals(Iterable<Local> values, {bool allowNull: false});
+  void writeLocals(Iterable<Local> values, {bool allowNull = false});
 
   /// Writes the [map] from references to locals to [V] values to this data
   /// sink, calling [f] to write each value to the data sink. If [allowNull] is
@@ -366,7 +366,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readLocalMap].
   void writeLocalMap<V>(Map<Local, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes the constant [value] to this data sink.
   void writeConstant(ConstantValue value);
@@ -379,7 +379,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readConstants].
-  void writeConstants(Iterable<ConstantValue> values, {bool allowNull: false});
+  void writeConstants(Iterable<ConstantValue> values, {bool allowNull = false});
 
   /// Writes the [map] from constant values to [V] values to this data sink,
   /// calling [f] to write each value to the data sink. If [allowNull] is
@@ -388,7 +388,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readConstantMap].
   void writeConstantMap<V>(Map<ConstantValue, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes a double value to this data sink.
   void writeDoubleValue(double value);
@@ -410,7 +410,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSource.readImports].
-  void writeImports(Iterable<ImportEntity> values, {bool allowNull: false});
+  void writeImports(Iterable<ImportEntity> values, {bool allowNull = false});
 
   /// Writes the [map] from imports to [V] values to this data sink,
   /// calling [f] to write each value to the data sink. If [allowNull] is
@@ -419,7 +419,7 @@
   /// This is a convenience method to be used together with
   /// [DataSource.readImportMap].
   void writeImportMap<V>(Map<ImportEntity, V> map, void f(V value),
-      {bool allowNull: false});
+      {bool allowNull = false});
 
   /// Writes an abstract [value] to this data sink.
   ///
@@ -460,8 +460,50 @@
   void inMemberContext(ir.Member member, void f());
 }
 
+/// Data class representing cache information for a given [T] which can be
+/// passed from a [DataSource] to other [DataSource]s and [DataSink]s.
+class DataSourceTypeIndices<E, T> {
+  /// Reshapes a [List<T>] to a [Map<E, int>] using [_getValue].
+  Map<E, int> _reshape() {
+    var cache = <E, int>{};
+    for (int i = 0; i < cacheAsList.length; i++) {
+      cache[_getValue(cacheAsList[i])] = i;
+    }
+    return cache;
+  }
+
+  Map<E, int> get cache {
+    return _cache ??= _reshape();
+  }
+
+  final List<T> cacheAsList;
+  E Function(T value) _getValue;
+  Map<E, int> _cache;
+
+  /// Though [DataSourceTypeIndices] supports two types of caches. If the
+  /// exported indices are imported into a [DataSource] then the [cacheAsList]
+  /// will be used as is. If, however, the exported indices are imported into a
+  /// [DataSink] then we need to reshape the [List<T>] into a [Map<E, int>]
+  /// where [E] is either [T] or some value which can be derived from [T] by
+  /// [_getValue].
+  DataSourceTypeIndices(this.cacheAsList, [this._getValue]) {
+    assert(_getValue != null || T == E);
+    _getValue ??= (T t) => t as E;
+  }
+}
+
+/// Data class representing the sum of all cache information for a given
+/// [DataSource].
+class DataSourceIndices {
+  final Map<Type, DataSourceTypeIndices> caches = {};
+}
+
 /// Interface for deserialization.
 abstract class DataSource {
+  /// Exports [DataSourceIndices] for use in other [DataSource]s and
+  /// [DataSink]s.
+  DataSourceIndices exportIndices();
+
   /// Registers that the section [tag] starts.
   ///
   /// This is used for debugging to verify that sections are correctly aligned
@@ -519,7 +561,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeList].
-  List<E> readList<E>(E f(), {bool emptyAsNull: false});
+  List<E> readList<E>(E f(), {bool emptyAsNull = false});
 
   /// Reads a boolean value from this data source.
   bool readBool();
@@ -548,7 +590,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeStrings].
-  List<String> readStrings({bool emptyAsNull: false});
+  List<String> readStrings({bool emptyAsNull = false});
 
   /// Reads a map from string values to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -556,7 +598,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeStringMap].
-  Map<String, V> readStringMap<V>(V f(), {bool emptyAsNull: false});
+  Map<String, V> readStringMap<V>(V f(), {bool emptyAsNull = false});
 
   /// Reads an enum value from the list of enum [values] from this data source.
   ///
@@ -590,7 +632,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeMemberNodes].
   List<ir.Member> readMemberNodes<E extends ir.Member>(
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a map from kernel member nodes to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -599,7 +641,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeMemberNodeMap].
   Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a kernel name node from this data source.
   ir.Name readName();
@@ -623,7 +665,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeTreeNodes].
-  List<E> readTreeNodes<E extends ir.TreeNode>({bool emptyAsNull: false});
+  List<E> readTreeNodes<E extends ir.TreeNode>({bool emptyAsNull = false});
 
   /// Reads a map from kernel tree nodes to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -632,7 +674,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeTreeNodeMap].
   Map<K, V> readTreeNodeMap<K extends ir.TreeNode, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to a kernel tree node in the known [context] from this
   /// data source.
@@ -649,7 +691,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeTreeNodesInContext].
   List<E> readTreeNodesInContext<E extends ir.TreeNode>(
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a map from kernel tree nodes to [V] values in the known [context]
   /// from this data source, calling [f] to read each value from the data
@@ -659,7 +701,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeTreeNodeMapInContext].
   Map<K, V> readTreeNodeMapInContext<K extends ir.TreeNode, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to a kernel type parameter node from this data source.
   ir.TypeParameter readTypeParameterNode();
@@ -670,29 +712,29 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeTypeParameterNodes].
-  List<ir.TypeParameter> readTypeParameterNodes({bool emptyAsNull: false});
+  List<ir.TypeParameter> readTypeParameterNodes({bool emptyAsNull = false});
 
   /// Reads a type from this data source. If [allowNull], the returned type is
   /// allowed to be `null`.
-  DartType readDartType({bool allowNull: false});
+  DartType readDartType({bool allowNull = false});
 
   /// Reads a list of types from this data source. If [emptyAsNull] is `true`,
   /// `null` is returned instead of an empty list.
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeDartTypes].
-  List<DartType> readDartTypes({bool emptyAsNull: false});
+  List<DartType> readDartTypes({bool emptyAsNull = false});
 
   /// Reads a kernel type node from this data source. If [allowNull], the
   /// returned type is allowed to be `null`.
-  ir.DartType readDartTypeNode({bool allowNull: false});
+  ir.DartType readDartTypeNode({bool allowNull = false});
 
   /// Reads a list of kernel type nodes from this data source. If [emptyAsNull]
   /// is `true`, `null` is returned instead of an empty list.
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeDartTypeNodes].
-  List<ir.DartType> readDartTypeNodes({bool emptyAsNull: false});
+  List<ir.DartType> readDartTypeNodes({bool emptyAsNull = false});
 
   /// Reads a source span from this data source.
   SourceSpan readSourceSpan();
@@ -704,7 +746,7 @@
   /// source.
   IndexedLibrary readLibraryOrNull();
   Map<K, V> readLibraryMap<K extends LibraryEntity, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to an indexed class from this data source.
   IndexedClass readClass();
@@ -718,7 +760,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeClasses].
-  List<E> readClasses<E extends ClassEntity>({bool emptyAsNull: false});
+  List<E> readClasses<E extends ClassEntity>({bool emptyAsNull = false});
 
   /// Reads a map from indexed classes to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -727,7 +769,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeClassMap].
   Map<K, V> readClassMap<K extends ClassEntity, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to an indexed member from this data source.
   IndexedMember readMember();
@@ -741,7 +783,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeMembers].
-  List<E> readMembers<E extends MemberEntity>({bool emptyAsNull: false});
+  List<E> readMembers<E extends MemberEntity>({bool emptyAsNull = false});
 
   /// Reads a map from indexed members to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -750,7 +792,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeMemberMap].
   Map<K, V> readMemberMap<K extends MemberEntity, V>(V f(MemberEntity member),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to an indexed type variable from this data source.
   IndexedTypeVariable readTypeVariable();
@@ -762,7 +804,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeTypeVariableMap].
   Map<K, V> readTypeVariableMap<K extends IndexedTypeVariable, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a reference to a local from this data source.
   Local readLocal();
@@ -775,7 +817,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeLocals].
-  List<E> readLocals<E extends Local>({bool emptyAsNull: false});
+  List<E> readLocals<E extends Local>({bool emptyAsNull = false});
 
   /// Reads a map from locals to [V] values from this data source, calling [f]
   /// to read each value from the data source. If [emptyAsNull] is `true`,
@@ -783,7 +825,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeLocalMap].
-  Map<K, V> readLocalMap<K extends Local, V>(V f(), {bool emptyAsNull: false});
+  Map<K, V> readLocalMap<K extends Local, V>(V f(), {bool emptyAsNull = false});
 
   /// Reads a constant value from this data source.
   ConstantValue readConstant();
@@ -805,7 +847,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeConstants].
-  List<E> readConstants<E extends ConstantValue>({bool emptyAsNull: false});
+  List<E> readConstants<E extends ConstantValue>({bool emptyAsNull = false});
 
   /// Reads a map from constant values to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -814,7 +856,7 @@
   /// This is a convenience method to be used together with
   /// [DataSink.writeConstantMap].
   Map<K, V> readConstantMap<K extends ConstantValue, V>(V f(),
-      {bool emptyAsNull: false});
+      {bool emptyAsNull = false});
 
   /// Reads a import from this data source.
   ImportEntity readImport();
@@ -827,7 +869,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeImports].
-  List<ImportEntity> readImports({bool emptyAsNull: false});
+  List<ImportEntity> readImports({bool emptyAsNull = false});
 
   /// Reads a map from imports to [V] values from this data source,
   /// calling [f] to read each value from the data source. If [emptyAsNull] is
@@ -835,7 +877,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSink.writeImportMap].
-  Map<ImportEntity, V> readImportMap<V>(V f(), {bool emptyAsNull: false});
+  Map<ImportEntity, V> readImportMap<V>(V f(), {bool emptyAsNull = false});
 
   /// Reads an [AbstractValue] from this data source.
   ///
diff --git a/pkg/compiler/lib/src/serialization/strategies.dart b/pkg/compiler/lib/src/serialization/strategies.dart
index 9269eed..65c8824 100644
--- a/pkg/compiler/lib/src/serialization/strategies.dart
+++ b/pkg/compiler/lib/src/serialization/strategies.dart
@@ -31,15 +31,15 @@
   }
 
   List<T> serializeGlobalTypeInferenceResults(
-      GlobalTypeInferenceResults results);
+      DataSourceIndices indices, GlobalTypeInferenceResults results);
 
   List<int> serializeComponent(ir.Component component) {
     return ir.serializeComponent(component);
   }
 
   ir.Component deserializeComponent(List<int> data) {
-    ir.Component component = new ir.Component();
-    new BinaryBuilder(data).readComponent(component);
+    ir.Component component = ir.Component();
+    BinaryBuilder(data).readComponent(component);
     return component;
   }
 
@@ -49,12 +49,13 @@
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
-      List<T> closedWorldData,
+      JsClosedWorld closedWorld,
+      DataSourceIndices indices,
       List<T> globalTypeInferenceResultsData);
 
   List<T> serializeClosedWorld(JsClosedWorld closedWorld);
 
-  JsClosedWorld deserializeClosedWorld(
+  ClosedWorldAndIndices deserializeClosedWorld(
       CompilerOptions options,
       DiagnosticReporter reporter,
       Environment environment,
@@ -66,13 +67,14 @@
 class BytesInMemorySerializationStrategy extends SerializationStrategy<int> {
   final bool useDataKinds;
 
-  const BytesInMemorySerializationStrategy({this.useDataKinds: false});
+  const BytesInMemorySerializationStrategy({this.useDataKinds = false});
 
   @override
   List<int> serializeGlobalTypeInferenceResults(
-      GlobalTypeInferenceResults results) {
-    ByteSink byteSink = new ByteSink();
-    DataSink sink = new BinarySink(byteSink, useDataKinds: useDataKinds);
+      DataSourceIndices indices, GlobalTypeInferenceResults results) {
+    ByteSink byteSink = ByteSink();
+    DataSink sink = BinarySink(byteSink,
+        useDataKinds: useDataKinds, importedIndices: indices);
     serializeGlobalTypeInferenceResultsToSink(results, sink);
     return byteSink.builder.takeBytes();
   }
@@ -84,20 +86,13 @@
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
-      List<int> closedWorldData,
+      JsClosedWorld closedWorld,
+      DataSourceIndices indices,
       List<int> globalTypeInferenceResultsData) {
-    DataSource closedWorldSource =
-        BinarySourceImpl(closedWorldData, useDataKinds: useDataKinds);
     DataSource globalTypeInferenceResultsSource = BinarySourceImpl(
         globalTypeInferenceResultsData,
-        useDataKinds: useDataKinds);
-    JsClosedWorld closedWorld = deserializeClosedWorldFromSource(
-        options,
-        reporter,
-        environment,
-        abstractValueStrategy,
-        component,
-        closedWorldSource);
+        useDataKinds: useDataKinds,
+        importedIndices: indices);
     return deserializeGlobalTypeInferenceResultsFromSource(
         options,
         reporter,
@@ -110,40 +105,42 @@
 
   @override
   List<int> serializeClosedWorld(JsClosedWorld closedWorld) {
-    ByteSink byteSink = new ByteSink();
-    DataSink sink = new BinarySink(byteSink, useDataKinds: useDataKinds);
+    ByteSink byteSink = ByteSink();
+    DataSink sink = BinarySink(byteSink, useDataKinds: useDataKinds);
     serializeClosedWorldToSink(closedWorld, sink);
     return byteSink.builder.takeBytes();
   }
 
   @override
-  JsClosedWorld deserializeClosedWorld(
+  ClosedWorldAndIndices deserializeClosedWorld(
       CompilerOptions options,
       DiagnosticReporter reporter,
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
       List<int> data) {
-    DataSource source = new BinarySourceImpl(data, useDataKinds: useDataKinds);
-    return deserializeClosedWorldFromSource(options, reporter, environment,
-        abstractValueStrategy, component, source);
+    DataSource source = BinarySourceImpl(data, useDataKinds: useDataKinds);
+    var closedWorld = deserializeClosedWorldFromSource(options, reporter,
+        environment, abstractValueStrategy, component, source);
+    return ClosedWorldAndIndices(closedWorld, source.exportIndices());
   }
 }
 
 class BytesOnDiskSerializationStrategy extends SerializationStrategy<int> {
   final bool useDataKinds;
 
-  const BytesOnDiskSerializationStrategy({this.useDataKinds: false});
+  const BytesOnDiskSerializationStrategy({this.useDataKinds = false});
 
   @override
   List<int> serializeGlobalTypeInferenceResults(
-      GlobalTypeInferenceResults results) {
+      DataSourceIndices indices, GlobalTypeInferenceResults results) {
     Uri uri = Uri.base.resolve('world.data');
-    DataSink sink = new BinarySink(
-        new BinaryOutputSinkAdapter(new RandomAccessBinaryOutputSink(uri)),
-        useDataKinds: useDataKinds);
+    DataSink sink = BinarySink(
+        BinaryOutputSinkAdapter(RandomAccessBinaryOutputSink(uri)),
+        useDataKinds: useDataKinds,
+        importedIndices: indices);
     serializeGlobalTypeInferenceResultsToSink(results, sink);
-    return new File.fromUri(uri).readAsBytesSync();
+    return File.fromUri(uri).readAsBytesSync();
   }
 
   @override
@@ -153,20 +150,13 @@
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
-      List<int> closedWorldData,
+      JsClosedWorld closedWorld,
+      DataSourceIndices indices,
       List<int> globalTypeInferenceResultsData) {
-    DataSource closedWorldSource =
-        BinarySourceImpl(closedWorldData, useDataKinds: useDataKinds);
     DataSource globalTypeInferenceResultsSource = BinarySourceImpl(
         globalTypeInferenceResultsData,
-        useDataKinds: useDataKinds);
-    JsClosedWorld closedWorld = deserializeClosedWorldFromSource(
-        options,
-        reporter,
-        environment,
-        abstractValueStrategy,
-        component,
-        closedWorldSource);
+        useDataKinds: useDataKinds,
+        importedIndices: indices);
     return deserializeGlobalTypeInferenceResultsFromSource(
         options,
         reporter,
@@ -180,24 +170,25 @@
   @override
   List<int> serializeClosedWorld(JsClosedWorld closedWorld) {
     Uri uri = Uri.base.resolve('closed_world.data');
-    DataSink sink = new BinarySink(
-        new BinaryOutputSinkAdapter(new RandomAccessBinaryOutputSink(uri)),
+    DataSink sink = BinarySink(
+        BinaryOutputSinkAdapter(RandomAccessBinaryOutputSink(uri)),
         useDataKinds: useDataKinds);
     serializeClosedWorldToSink(closedWorld, sink);
-    return new File.fromUri(uri).readAsBytesSync();
+    return File.fromUri(uri).readAsBytesSync();
   }
 
   @override
-  JsClosedWorld deserializeClosedWorld(
+  ClosedWorldAndIndices deserializeClosedWorld(
       CompilerOptions options,
       DiagnosticReporter reporter,
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
       List<int> data) {
-    DataSource source = new BinarySourceImpl(data, useDataKinds: useDataKinds);
-    return deserializeClosedWorldFromSource(options, reporter, environment,
-        abstractValueStrategy, component, source);
+    DataSource source = BinarySourceImpl(data, useDataKinds: useDataKinds);
+    var closedWorld = deserializeClosedWorldFromSource(options, reporter,
+        environment, abstractValueStrategy, component, source);
+    return ClosedWorldAndIndices(closedWorld, source.exportIndices());
   }
 }
 
@@ -205,13 +196,14 @@
     extends SerializationStrategy<Object> {
   final bool useDataKinds;
 
-  const ObjectsInMemorySerializationStrategy({this.useDataKinds: true});
+  const ObjectsInMemorySerializationStrategy({this.useDataKinds = true});
 
   @override
   List<Object> serializeGlobalTypeInferenceResults(
-      GlobalTypeInferenceResults results) {
+      DataSourceIndices indices, GlobalTypeInferenceResults results) {
     List<Object> data = [];
-    DataSink sink = new ObjectSink(data, useDataKinds: useDataKinds);
+    DataSink sink =
+        ObjectSink(data, useDataKinds: useDataKinds, importedIndices: indices);
     serializeGlobalTypeInferenceResultsToSink(results, sink);
     return data;
   }
@@ -223,20 +215,13 @@
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
-      List<Object> closedWorldData,
+      JsClosedWorld closedWorld,
+      DataSourceIndices indices,
       List<Object> globalTypeInferenceResultsData) {
-    DataSource closedWorldSource =
-        ObjectSource(closedWorldData, useDataKinds: useDataKinds);
     DataSource globalTypeInferenceResultsSource = ObjectSource(
         globalTypeInferenceResultsData,
-        useDataKinds: useDataKinds);
-    JsClosedWorld closedWorld = deserializeClosedWorldFromSource(
-        options,
-        reporter,
-        environment,
-        abstractValueStrategy,
-        component,
-        closedWorldSource);
+        useDataKinds: useDataKinds,
+        importedIndices: indices);
     return deserializeGlobalTypeInferenceResultsFromSource(
         options,
         reporter,
@@ -250,21 +235,22 @@
   @override
   List<Object> serializeClosedWorld(JsClosedWorld closedWorld) {
     List<Object> data = [];
-    DataSink sink = new ObjectSink(data, useDataKinds: useDataKinds);
+    DataSink sink = ObjectSink(data, useDataKinds: useDataKinds);
     serializeClosedWorldToSink(closedWorld, sink);
     return data;
   }
 
   @override
-  JsClosedWorld deserializeClosedWorld(
+  ClosedWorldAndIndices deserializeClosedWorld(
       CompilerOptions options,
       DiagnosticReporter reporter,
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
       List<Object> data) {
-    DataSource source = new ObjectSource(data, useDataKinds: useDataKinds);
-    return deserializeClosedWorldFromSource(options, reporter, environment,
-        abstractValueStrategy, component, source);
+    DataSource source = ObjectSource(data, useDataKinds: useDataKinds);
+    var closedWorld = deserializeClosedWorldFromSource(options, reporter,
+        environment, abstractValueStrategy, component, source);
+    return ClosedWorldAndIndices(closedWorld, source.exportIndices());
   }
 }
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index c0240ca..b4943f1 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -6,6 +6,7 @@
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/binary/ast_from_binary.dart' as ir;
 import 'package:kernel/binary/ast_to_binary.dart' as ir;
+import 'package:front_end/src/fasta/util/bytes_sink.dart';
 import '../../compiler_new.dart' as api;
 import '../backend_strategy.dart';
 import '../commandline_options.dart' show Flags;
@@ -16,6 +17,7 @@
 import '../environment.dart';
 import '../inferrer/abstract_value_domain.dart';
 import '../inferrer/types.dart';
+import '../ir/modular.dart';
 import '../js_backend/backend.dart';
 import '../js_backend/inferred_data.dart';
 import '../js_model/js_world.dart';
@@ -26,6 +28,15 @@
 import '../world.dart';
 import 'serialization.dart';
 
+/// A data class holding a [JsClosedWorld] and the associated
+/// [DataSourceIndices].
+class ClosedWorldAndIndices {
+  final JsClosedWorld closedWorld;
+  final DataSourceIndices indices;
+
+  ClosedWorldAndIndices(this.closedWorld, this.indices);
+}
+
 void serializeGlobalTypeInferenceResultsToSink(
     GlobalTypeInferenceResults results, DataSink sink) {
   JsClosedWorld closedWorld = results.closedWorld;
@@ -75,13 +86,13 @@
         AbstractValueStrategy abstractValueStrategy,
         ir.Component component,
         DataSource source) {
-  JsClosedWorld newClosedWorld = new JsClosedWorld.readFromDataSource(
+  JsClosedWorld newClosedWorld = JsClosedWorld.readFromDataSource(
       options, reporter, environment, abstractValueStrategy, component, source);
   GlobalLocalsMap newGlobalLocalsMap = GlobalLocalsMap.readFromDataSource(
       newClosedWorld.closureDataLookup.getEnclosingMember, source);
   InferredData newInferredData =
-      new InferredData.readFromDataSource(source, newClosedWorld);
-  return new GlobalTypeInferenceResults.readFromDataSource(
+      InferredData.readFromDataSource(source, newClosedWorld);
+  return GlobalTypeInferenceResults.readFromDataSource(
       source,
       newClosedWorld.elementMap,
       newClosedWorld,
@@ -101,12 +112,12 @@
     AbstractValueStrategy abstractValueStrategy,
     ir.Component component,
     DataSource source) {
-  return new JsClosedWorld.readFromDataSource(
+  return JsClosedWorld.readFromDataSource(
       options, reporter, environment, abstractValueStrategy, component, source);
 }
 
 class _StringInterner implements ir.StringInterner, StringInterner {
-  Map<String, String> _map = {};
+  final Map<String, String> _map = {};
 
   @override
   String internString(String string) {
@@ -136,8 +147,8 @@
       _reporter.log('Writing dill to ${_options.outputUri}');
       api.BinaryOutputSink dillOutput =
           _outputProvider.createBinarySink(_options.outputUri);
-      BinaryOutputSinkAdapter irSink = new BinaryOutputSinkAdapter(dillOutput);
-      ir.BinaryPrinter printer = new ir.BinaryPrinter(irSink);
+      BinaryOutputSinkAdapter irSink = BinaryOutputSinkAdapter(dillOutput);
+      ir.BinaryPrinter printer = ir.BinaryPrinter(irSink);
       printer.writeComponentFile(component);
       irSink.close();
     });
@@ -148,7 +159,7 @@
       _reporter.log('Reading dill from ${_options.entryPoint}');
       api.Input<List<int>> dillInput = await _provider
           .readFromUri(_options.entryPoint, inputKind: api.InputKind.binary);
-      ir.Component component = new ir.Component();
+      ir.Component component = ir.Component();
       // Not using growable lists saves memory.
       ir.BinaryBuilder(dillInput.data,
               useGrowableLists: false, stringInterner: _stringInterner)
@@ -182,17 +193,78 @@
     return component;
   }
 
+  void serializeModuleData(
+      ModuleData data, ir.Component component, Set<Uri> includedLibraries) {
+    measureSubtask('serialize transformed dill', () {
+      _reporter.log('Writing dill to ${_options.outputUri}');
+      var dillOutput = _outputProvider.createBinarySink(_options.outputUri);
+      var irSink = BinaryOutputSinkAdapter(dillOutput);
+      ir.BinaryPrinter printer = ir.BinaryPrinter(irSink,
+          libraryFilter: (ir.Library l) =>
+              includedLibraries.contains(l.importUri));
+      printer.writeComponentFile(component);
+      irSink.close();
+    });
+
+    measureSubtask('serialize module data', () {
+      _reporter.log('Writing data to ${_options.writeModularAnalysisUri}');
+      api.BinaryOutputSink dataOutput =
+          _outputProvider.createBinarySink(_options.writeModularAnalysisUri);
+      DataSink sink = BinarySink(BinaryOutputSinkAdapter(dataOutput));
+      data.toDataSink(sink);
+      sink.close();
+    });
+  }
+
+  void testModuleSerialization(ModuleData data, ir.Component component) {
+    if (_options.testMode) {
+      // TODO(joshualitt):
+      // Consider using a strategy like we do for the global data, so we can also
+      // test it with the objectSink/objectSource:
+      //   List<Object> encoding = [];
+      //   DataSink sink = new ObjectSink(encoding, useDataKinds: true);
+      //   data.toDataSink(sink);
+      //   DataSource source = new ObjectSource(encoding, useDataKinds: true);
+      //   source.registerComponentLookup(new ComponentLookup(component));
+      //   ModuleData.fromDataSource(source);
+
+      BytesSink bytes = BytesSink();
+      BinarySink binarySink = BinarySink(bytes, useDataKinds: true);
+      data.toDataSink(binarySink);
+      binarySink.close();
+      var source =
+          BinarySourceImpl(bytes.builder.toBytes(), useDataKinds: true);
+      source.registerComponentLookup(ComponentLookup(component));
+      ModuleData.fromDataSource(source);
+    }
+  }
+
+  Future<List<ModuleData>> deserializeModuleData(ir.Component component) async {
+    return await measureIoSubtask('deserialize module data', () async {
+      _reporter.log('Reading data from ${_options.modularAnalysisInputs}');
+      List<ModuleData> results = [];
+      for (Uri uri in _options.modularAnalysisInputs) {
+        api.Input<List<int>> dataInput =
+            await _provider.readFromUri(uri, inputKind: api.InputKind.binary);
+        DataSource source = BinarySourceImpl(dataInput.data);
+        source.registerComponentLookup(ComponentLookup(component));
+        results.add(ModuleData.fromDataSource(source));
+      }
+      return results;
+    });
+  }
+
   void serializeClosedWorld(JsClosedWorld closedWorld) {
     measureSubtask('serialize closed world', () {
       _reporter.log('Writing closed world to ${_options.writeClosedWorldUri}');
       api.BinaryOutputSink dataOutput =
           _outputProvider.createBinarySink(_options.writeClosedWorldUri);
-      DataSink sink = new BinarySink(new BinaryOutputSinkAdapter(dataOutput));
+      DataSink sink = BinarySink(BinaryOutputSinkAdapter(dataOutput));
       serializeClosedWorldToSink(closedWorld, sink);
     });
   }
 
-  Future<JsClosedWorld> deserializeClosedWorld(
+  Future<ClosedWorldAndIndices> deserializeClosedWorld(
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component) async {
@@ -203,12 +275,14 @@
           inputKind: api.InputKind.binary);
       DataSource source =
           BinarySourceImpl(dataInput.data, stringInterner: _stringInterner);
-      return deserializeClosedWorldFromSource(_options, _reporter, environment,
-          abstractValueStrategy, component, source);
+      var closedWorld = deserializeClosedWorldFromSource(_options, _reporter,
+          environment, abstractValueStrategy, component, source);
+      return ClosedWorldAndIndices(closedWorld, source.exportIndices());
     });
   }
 
-  void serializeGlobalTypeInference(GlobalTypeInferenceResults results) {
+  void serializeGlobalTypeInference(
+      GlobalTypeInferenceResults results, DataSourceIndices indices) {
     JsClosedWorld closedWorld = results.closedWorld;
     ir.Component component = closedWorld.elementMap.programEnv.mainComponent;
     serializeComponent(component);
@@ -217,7 +291,8 @@
       _reporter.log('Writing data to ${_options.writeDataUri}');
       api.BinaryOutputSink dataOutput =
           _outputProvider.createBinarySink(_options.writeDataUri);
-      DataSink sink = new BinarySink(new BinaryOutputSinkAdapter(dataOutput));
+      DataSink sink = BinarySink(BinaryOutputSinkAdapter(dataOutput),
+          importedIndices: indices);
       serializeGlobalTypeInferenceResultsToSink(results, sink);
     });
   }
@@ -226,20 +301,21 @@
       Environment environment,
       AbstractValueStrategy abstractValueStrategy,
       ir.Component component,
-      JsClosedWorld closedWorld) async {
+      ClosedWorldAndIndices closedWorldAndIndices) async {
     return await measureIoSubtask('deserialize data', () async {
       _reporter.log('Reading data from ${_options.readDataUri}');
       api.Input<List<int>> dataInput = await _provider
           .readFromUri(_options.readDataUri, inputKind: api.InputKind.binary);
-      DataSource source =
-          BinarySourceImpl(dataInput.data, stringInterner: _stringInterner);
+      DataSource source = BinarySourceImpl(dataInput.data,
+          stringInterner: _stringInterner,
+          importedIndices: closedWorldAndIndices.indices);
       return deserializeGlobalTypeInferenceResultsFromSource(
           _options,
           _reporter,
           environment,
           abstractValueStrategy,
           component,
-          closedWorld,
+          closedWorldAndIndices.closedWorld,
           source);
     });
   }
@@ -254,7 +330,7 @@
       _reporter.log('Writing data to ${_options.writeDataUri}');
       api.BinaryOutputSink dataOutput =
           _outputProvider.createBinarySink(_options.writeDataUri);
-      DataSink sink = new BinarySink(new BinaryOutputSinkAdapter(dataOutput));
+      DataSink sink = BinarySink(BinaryOutputSinkAdapter(dataOutput));
       serializeGlobalTypeInferenceResultsToSinkLegacy(results, sink);
     });
   }
@@ -275,6 +351,8 @@
     });
   }
 
+  // TODO(joshualitt): Investigate whether closed world indices can be shared
+  // with codegen.
   void serializeCodegen(
       BackendStrategy backendStrategy, CodegenResults codegenResults) {
     GlobalTypeInferenceResults globalTypeInferenceResults =
@@ -295,10 +373,10 @@
     measureSubtask('serialize codegen', () {
       Uri uri = Uri.parse('${_options.writeCodegenUri}$shard');
       api.BinaryOutputSink dataOutput = _outputProvider.createBinarySink(uri);
-      DataSink sink = new BinarySink(new BinaryOutputSinkAdapter(dataOutput));
+      DataSink sink = BinarySink(BinaryOutputSinkAdapter(dataOutput));
       _reporter.log('Writing data to ${uri}');
       sink.registerEntityWriter(entityWriter);
-      sink.registerCodegenWriter(new CodegenWriterImpl(closedWorld));
+      sink.registerCodegenWriter(CodegenWriterImpl(closedWorld));
       sink.writeMemberMap(
           results,
           (MemberEntity member, CodegenResult result) =>
@@ -327,7 +405,7 @@
         dataInput.release();
       });
     }
-    return new DeserializedCodegenResults(
+    return DeserializedCodegenResults(
         globalTypeInferenceResults, codegenInputs, results);
   }
 
@@ -345,7 +423,7 @@
       List<ModularName> modularNames = [];
       List<ModularExpression> modularExpressions = [];
       CodegenReader reader =
-          new CodegenReaderImpl(closedWorld, modularNames, modularExpressions);
+          CodegenReaderImpl(closedWorld, modularNames, modularExpressions);
       source.registerCodegenReader(reader);
       CodegenResult result = CodegenResult.readFromDataSource(
           source, modularNames, modularExpressions);
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index 54da609..cc5e875 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -38,14 +38,14 @@
         input = binarySourceFiles[resourceUri];
         break;
     }
-    if (input != null) return new Future.value(input);
+    if (input != null) return Future.value(input);
 
     if (resourceUri.scheme == 'file') {
       return _readFromFile(resourceUri, inputKind);
     } else if (resourceUri.scheme == 'http' || resourceUri.scheme == 'https') {
       return _readFromHttp(resourceUri, inputKind);
     } else {
-      throw new ArgumentError("Unknown scheme in uri '$resourceUri'");
+      throw ArgumentError("Unknown scheme in uri '$resourceUri'");
     }
   }
 
@@ -64,12 +64,11 @@
     api.Input input;
     switch (inputKind) {
       case api.InputKind.UTF8:
-        input = utf8SourceFiles[resourceUri] = new CachingUtf8BytesSourceFile(
+        input = utf8SourceFiles[resourceUri] = CachingUtf8BytesSourceFile(
             resourceUri, relativizeUri(resourceUri), source);
         break;
       case api.InputKind.binary:
-        input =
-            binarySourceFiles[resourceUri] = new Binary(resourceUri, source);
+        input = binarySourceFiles[resourceUri] = Binary(resourceUri, source);
         break;
     }
     return input;
@@ -93,15 +92,15 @@
     try {
       input = _readFromFileSync(resourceUri, inputKind);
     } catch (e) {
-      return new Future.error(e);
+      return Future.error(e);
     }
-    return new Future.value(input);
+    return Future.value(input);
   }
 
   Future<api.Input<List<int>>> _readFromHttp(
       Uri resourceUri, api.InputKind inputKind) {
     assert(resourceUri.scheme == 'http');
-    HttpClient client = new HttpClient();
+    HttpClient client = HttpClient();
     return client
         .getUrl(resourceUri)
         .then((HttpClientRequest request) => request.close())
@@ -116,7 +115,7 @@
       int totalLength = splitContent.fold(0, (int old, List list) {
         return old + list.length;
       });
-      Uint8List result = new Uint8List(totalLength);
+      Uint8List result = Uint8List(totalLength);
       int offset = 0;
       for (List<int> contentPart in splitContent) {
         result.setRange(offset, offset + contentPart.length, contentPart);
@@ -126,12 +125,11 @@
       api.Input<List<int>> input;
       switch (inputKind) {
         case api.InputKind.UTF8:
-          input = utf8SourceFiles[resourceUri] = new CachingUtf8BytesSourceFile(
+          input = utf8SourceFiles[resourceUri] = CachingUtf8BytesSourceFile(
               resourceUri, resourceUri.toString(), result);
           break;
         case api.InputKind.binary:
-          input =
-              binarySourceFiles[resourceUri] = new Binary(resourceUri, result);
+          input = binarySourceFiles[resourceUri] = Binary(resourceUri, result);
           break;
       }
       return input;
@@ -151,14 +149,14 @@
   }
 
   Iterable<Uri> getSourceUris() {
-    Set<Uri> uris = new Set<Uri>();
+    Set<Uri> uris = Set<Uri>();
     uris.addAll(utf8SourceFiles.keys);
     uris.addAll(binarySourceFiles.keys);
     return uris;
   }
 }
 
-List<int> readAll(String filename, {bool zeroTerminated: true}) {
+List<int> readAll(String filename, {bool zeroTerminated = true}) {
   RandomAccessFile file = File(filename).openSync();
   int length = file.lengthSync();
   int bufferLength = length;
@@ -166,7 +164,7 @@
     // +1 to have a 0 terminated list, see [Scanner].
     bufferLength++;
   }
-  var buffer = new Uint8List(bufferLength);
+  var buffer = Uint8List(bufferLength);
   file.readIntoSync(buffer, 0, length);
   file.closeSync();
   return buffer;
@@ -181,7 +179,7 @@
 
   @override
   Future<api.Input<List<int>>> readFromUri(Uri uri,
-          {InputKind inputKind: InputKind.UTF8}) =>
+          {InputKind inputKind = InputKind.UTF8}) =>
       readBytesFromUri(uri, inputKind);
 }
 
@@ -204,7 +202,7 @@
 
   FormattingDiagnosticHandler([SourceFileProvider provider])
       : this.provider =
-            (provider == null) ? new CompilerSourceFileProvider() : provider;
+            (provider == null) ? CompilerSourceFileProvider() : provider;
 
   void info(var message, [api.Diagnostic kind = api.Diagnostic.VERBOSE_INFO]) {
     if (!verbose && kind == api.Diagnostic.VERBOSE_INFO) return;
@@ -301,7 +299,7 @@
     }
     if (fatal && ++fatalCount >= throwOnErrorCount && throwOnError) {
       isAborting = true;
-      throw new AbortLeg(message);
+      throw AbortLeg(message);
     }
   }
 
@@ -312,7 +310,7 @@
   }
 }
 
-typedef void MessageCallback(String message);
+typedef MessageCallback = void Function(String message);
 
 class RandomAccessFileOutputProvider implements CompilerOutput {
   final Uri out;
@@ -420,7 +418,7 @@
       }
     }
 
-    return new _OutputSinkWrapper(writeStringSync, onDone);
+    return _OutputSinkWrapper(writeStringSync, onDone);
   }
 
   @override
@@ -453,7 +451,7 @@
       totalDataWritten += bytesWritten;
     }
 
-    return new _BinaryOutputSinkWrapper(writeBytesSync, onDone);
+    return _BinaryOutputSinkWrapper(writeBytesSync, onDone);
   }
 }
 
@@ -461,7 +459,7 @@
   final RandomAccessFile output;
 
   RandomAccessBinaryOutputSink(Uri uri)
-      : output = new File.fromUri(uri).openSync(mode: FileMode.write);
+      : output = File.fromUri(uri).openSync(mode: FileMode.write);
 
   @override
   void write(List<int> buffer, [int start = 0, int end]) {
@@ -546,14 +544,14 @@
 
   @override
   Future<api.Input<List<int>>> readFromUri(Uri uri,
-      {InputKind inputKind: InputKind.UTF8}) async {
+      {InputKind inputKind = InputKind.UTF8}) async {
     var resolvedUri = uri;
     var path = uri.path;
     if (path.startsWith('/bazel-root')) {
       path = path.substring('/bazel-root/'.length);
       for (var dir in dirs) {
         var file = dir.resolve(path);
-        if (await new File.fromUri(file).exists()) {
+        if (await File.fromUri(file).exists()) {
           resolvedUri = file;
           break;
         }
@@ -579,7 +577,7 @@
       path = path.substring('/bazel-root/'.length);
       for (var dir in dirs) {
         var file = dir.resolve(path);
-        if (new File.fromUri(file).existsSync()) {
+        if (File.fromUri(file).existsSync()) {
           return super.autoReadFromFile(file);
         }
       }
@@ -607,14 +605,14 @@
 
   @override
   Future<api.Input<List<int>>> readFromUri(Uri uri,
-      {InputKind inputKind: InputKind.UTF8}) async {
+      {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()) {
+        if (await File.fromUri(fileUri).exists()) {
           resolvedUri = fileUri;
           break;
         }
@@ -639,7 +637,7 @@
       var path = resourceUri.path;
       for (var dir in roots) {
         var file = dir.resolve(path);
-        if (new File.fromUri(file).existsSync()) {
+        if (File.fromUri(file).existsSync()) {
           return super.autoReadFromFile(file);
         }
       }
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index e74ad8a..cf8fb72 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -85,7 +85,7 @@
 
 class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
   /// Holds the resulting SSA graph.
-  final HGraph graph = new HGraph();
+  final HGraph graph = HGraph();
 
   /// True if the builder is processing nodes inside a try statement. This is
   /// important for generating control flow out of a try block like returns or
@@ -98,7 +98,7 @@
   /// A stack of instructions.
   ///
   /// We build the SSA graph by simulating a stack machine.
-  List<HInstruction> stack = <HInstruction>[];
+  List<HInstruction> stack = [];
 
   /// The count of nested loops we are currently building.
   ///
@@ -107,7 +107,7 @@
   int loopDepth = 0;
 
   /// A mapping from jump targets to their handlers.
-  Map<JumpTarget, JumpHandler> jumpTargets = <JumpTarget, JumpHandler>{};
+  Map<JumpTarget, JumpHandler> jumpTargets = {};
 
   final CompilerOptions options;
   final DiagnosticReporter reporter;
@@ -126,7 +126,7 @@
   /// for these nodes.
   // TODO(karlklose): consider removing this and keeping the (substituted) types
   // of the type variables in an environment (like the [LocalsHandler]).
-  final List<InterfaceType> _currentImplicitInstantiations = <InterfaceType>[];
+  final List<InterfaceType> _currentImplicitInstantiations = [];
 
   /// Used to report information about inlining (which occurs while building the
   /// SSA graph), when dump-info is enabled.
@@ -144,7 +144,7 @@
   /// this is a slow path.
   bool _inExpressionOfThrow = false;
 
-  final List<KernelInliningState> _inliningStack = <KernelInliningState>[];
+  final List<KernelInliningState> _inliningStack = [];
   Local _returnLocal;
   DartType _returnType;
 
@@ -176,12 +176,12 @@
         _memberContextNode =
             _elementMap.getMemberContextNode(_initialTargetElement) {
     _enterFrame(targetElement, null);
-    this._loopHandler = new KernelLoopHandler(this);
-    _typeBuilder = new KernelTypeBuilder(this, _elementMap);
+    this._loopHandler = KernelLoopHandler(this);
+    _typeBuilder = KernelTypeBuilder(this, _elementMap);
     graph.element = targetElement;
     graph.sourceInformation =
         _sourceInformationBuilder.buildVariableDeclaration();
-    this.localsHandler = new LocalsHandler(this, targetElement, targetElement,
+    this.localsHandler = LocalsHandler(this, targetElement, targetElement,
         instanceType, _nativeData, _interceptorData);
   }
 
@@ -229,7 +229,7 @@
 
   /// Pushes a boolean checking [expression] against null.
   pushCheckNull(HInstruction expression) {
-    push(new HIdentity(expression, graph.addConstantNull(closedWorld),
+    push(HIdentity(expression, graph.addConstantNull(closedWorld),
         _abstractValueDomain.boolType));
   }
 
@@ -258,7 +258,7 @@
 
   HLocalValue lastAddedParameter;
 
-  Map<Local, HInstruction> parameters = <Local, HInstruction>{};
+  Map<Local, HInstruction> parameters = {};
   Set<Local> elidedParameters;
 
   HBasicBlock addNewBlock() {
@@ -290,7 +290,7 @@
   }
 
   void goto(HBasicBlock from, HBasicBlock to) {
-    from.close(new HGoto(_abstractValueDomain));
+    from.close(HGoto(_abstractValueDomain));
     from.addSuccessor(to);
   }
 
@@ -312,10 +312,10 @@
   }
 
   HLocalValue addParameter(Entity parameter, AbstractValue type,
-      {bool isElided: false}) {
+      {bool isElided = false}) {
     HLocalValue result = isElided
-        ? new HLocalValue(parameter, type)
-        : new HParameterValue(parameter, type);
+        ? HLocalValue(parameter, type)
+        : HParameterValue(parameter, type);
     if (lastAddedParameter == null) {
       graph.entry.addBefore(graph.entry.first, result);
     } else {
@@ -327,23 +327,23 @@
 
   HSubGraphBlockInformation wrapStatementGraph(SubGraph statements) {
     if (statements == null) return null;
-    return new HSubGraphBlockInformation(statements);
+    return HSubGraphBlockInformation(statements);
   }
 
   HSubExpressionBlockInformation wrapExpressionGraph(SubExpression expression) {
     if (expression == null) return null;
-    return new HSubExpressionBlockInformation(expression);
+    return HSubExpressionBlockInformation(expression);
   }
 
   HLiteralList _buildLiteralList(List<HInstruction> inputs) {
-    return new HLiteralList(inputs, _abstractValueDomain.growableListType);
+    return HLiteralList(inputs, _abstractValueDomain.growableListType);
   }
 
   /// Called when control flow is about to change, in which case we need to
   /// specify special successors if we are already in a try/catch/finally block.
   void _handleInTryStatement() {
     if (!_inTryStatement) return;
-    HBasicBlock block = close(new HExitTry(_abstractValueDomain));
+    HBasicBlock block = close(HExitTry(_abstractValueDomain));
     HBasicBlock newBlock = graph.addNewBlock();
     block.addSuccessor(newBlock);
     open(newBlock);
@@ -363,7 +363,7 @@
       case 'MUST_RETAIN_METADATA':
         return false;
       case 'USE_CONTENT_SECURITY_POLICY':
-        return options.useContentSecurityPolicy;
+        return options.features.useContentSecurityPolicy.isEnabled;
       case 'VARIANCE':
         return options.enableVariance;
       case 'LEGACY':
@@ -381,7 +381,7 @@
     // TODO(johnniwinther): Substitute the type by the this type and type
     // arguments of the current frame.
     ir.DartType type = _currentFrame.staticTypeProvider.getStaticType(node);
-    return new StaticType(
+    return StaticType(
         _elementMap.getDartType(type), computeClassRelationFromType(type));
   }
 
@@ -390,7 +390,7 @@
     // arguments of the current frame.
     ir.DartType type =
         _currentFrame.staticTypeProvider.getForInIteratorType(node);
-    return new StaticType(
+    return StaticType(
         _elementMap.getDartType(type), computeClassRelationFromType(type));
   }
 
@@ -406,13 +406,13 @@
     if (function != null) {
       asyncMarker = getAsyncMarker(function);
     }
-    _currentFrame = new StackFrame(
+    _currentFrame = StackFrame(
         _currentFrame,
         member,
         asyncMarker,
         _globalLocalsMap.getLocalsMap(member),
         {},
-        new KernelToTypeInferenceMapImpl(member, globalInferenceResults),
+        KernelToTypeInferenceMapImpl(member, globalInferenceResults),
         _currentFrame != null
             ? _currentFrame.sourceInformationBuilder
                 .forContext(member, callSourceInformation)
@@ -449,7 +449,7 @@
 
             if (fieldData.initialValue != null) {
               registry.registerConstantUse(
-                  new ConstantUse.init(fieldData.initialValue));
+                  ConstantUse.init(fieldData.initialValue));
               if (targetElement.isStatic || targetElement.isTopLevel) {
                 /// No code is created for this field: All references inline the
                 /// constant value.
@@ -458,10 +458,10 @@
             } else if (fieldData.isLazy) {
               // The generated initializer needs be wrapped in the cyclic-error
               // helper.
-              registry.registerStaticUse(new StaticUse.staticInvoke(
+              registry.registerStaticUse(StaticUse.staticInvoke(
                   closedWorld.commonElements.cyclicThrowHelper,
                   CallStructure.ONE_ARG));
-              registry.registerStaticUse(new StaticUse.staticInvoke(
+              registry.registerStaticUse(StaticUse.staticInvoke(
                   closedWorld.commonElements.throwLateFieldADI,
                   CallStructure.ONE_ARG));
             }
@@ -565,7 +565,7 @@
           constantValue != null,
           failedAt(_elementMap.getMethod(function.parent),
               'No constant computed for $node'));
-      registry?.registerConstantUse(new ConstantUse.init(constantValue));
+      registry?.registerConstantUse(ConstantUse.init(constantValue));
     }
 
     function.positionalParameters
@@ -706,7 +706,7 @@
 
   // Locals for function type parameters that can be forwarded, in argument
   // position order.
-  List<Local> _functionTypeParameterLocals = <Local>[];
+  final List<Local> _functionTypeParameterLocals = [];
 
   /// Builds a generative constructor.
   ///
@@ -752,13 +752,13 @@
     ConstructorData constructorData = ConstructorData();
     _buildInitializers(node, constructorData);
 
-    List<HInstruction> constructorArguments = <HInstruction>[];
+    List<HInstruction> constructorArguments = [];
     // Doing this instead of fieldValues.forEach because we haven't defined the
     // order of the arguments here. We can define that with JElements.
     bool isCustomElement = _nativeData.isNativeOrExtendsNative(cls) &&
         !_nativeData.isJsInteropClass(cls);
     InterfaceType thisType = _elementEnvironment.getThisType(cls);
-    List<FieldEntity> fields = <FieldEntity>[];
+    List<FieldEntity> fields = [];
     _elementEnvironment.forEachInstanceField(cls,
         (ClassEntity enclosingClass, FieldEntity member) {
       HInstruction value = constructorData.fieldValues[member];
@@ -782,7 +782,7 @@
 
     _addImplicitInstantiation(thisType);
     List<DartType> instantiatedTypes =
-        new List<InterfaceType>.from(_currentImplicitInstantiations);
+        List<InterfaceType>.from(_currentImplicitInstantiations);
 
     HInstruction newObject;
     if (isCustomElement) {
@@ -810,7 +810,7 @@
             sourceInformation: sourceInformation);
         constructorArguments.add(typeArgument);
       }
-      newObject = new HCreate(cls, constructorArguments,
+      newObject = HCreate(cls, constructorArguments,
           _abstractValueDomain.createNonNullExact(cls), sourceInformation,
           instantiatedTypes: instantiatedTypes,
           hasRtiInput: needsTypeArguments);
@@ -824,10 +824,10 @@
     for (ir.Constructor body in constructorData.constructorChain.reversed) {
       if (_isEmptyStatement(body.function.body)) continue;
 
-      List<HInstruction> bodyCallInputs = <HInstruction>[];
+      List<HInstruction> bodyCallInputs = [];
       if (isCustomElement) {
         if (interceptor == null) {
-          ConstantValue constant = new InterceptorConstantValue(cls);
+          ConstantValue constant = InterceptorConstantValue(cls);
           interceptor = graph.addConstant(constant, closedWorld);
         }
         bodyCallInputs.add(interceptor);
@@ -894,7 +894,7 @@
 
     if (_inliningStack.isEmpty) {
       _closeAndGotoExit(
-          new HReturn(_abstractValueDomain, newObject, sourceInformation));
+          HReturn(_abstractValueDomain, newObject, sourceInformation));
       _closeFunction();
     } else {
       localsHandler.updateLocal(_returnLocal, newObject,
@@ -911,7 +911,7 @@
   void _invokeConstructorBody(ir.Constructor constructor,
       List<HInstruction> inputs, SourceInformation sourceInformation) {
     MemberEntity constructorBody = _elementMap.getConstructorBody(constructor);
-    HInvokeConstructorBody invoke = new HInvokeConstructorBody(constructorBody,
+    HInvokeConstructorBody invoke = HInvokeConstructorBody(constructorBody,
         inputs, _abstractValueDomain.nonNullType, sourceInformation);
     add(invoke);
   }
@@ -1067,7 +1067,7 @@
 
   List<HInstruction> _normalizeAndBuildArguments(
       ir.Member member, ir.FunctionNode function, ir.Arguments arguments) {
-    var builtArguments = <HInstruction>[];
+    List<HInstruction> builtArguments = [];
     var positionalIndex = 0;
     function.positionalParameters.forEach((ir.VariableDeclaration parameter) {
       if (positionalIndex < arguments.positional.length) {
@@ -1247,11 +1247,8 @@
               .isDefinitelyTrue);
       if (emptyParameters.length > 0) {
         _addComment('${emptyParameters} inferred as [empty]');
-        add(new HInvokeStatic(
-            _commonElements.assertUnreachableMethod,
-            <HInstruction>[],
-            _abstractValueDomain.dynamicType,
-            const <DartType>[]));
+        add(HInvokeStatic(_commonElements.assertUnreachableMethod, [],
+            _abstractValueDomain.dynamicType, const []));
         _closeFunction();
         return;
       }
@@ -1266,8 +1263,8 @@
   /// having side effects which will inhibit code motion.
   // TODO(sra): Figure out how to keep comment anchored without effects.
   void _addComment(String text) {
-    add(new HForeignCode(js.js.statementTemplateYielding(new js.Comment(text)),
-        _abstractValueDomain.dynamicType, <HInstruction>[],
+    add(HForeignCode(js.js.statementTemplateYielding(js.Comment(text)),
+        _abstractValueDomain.dynamicType, [],
         isStatement: true));
   }
 
@@ -1287,7 +1284,7 @@
     var sourceInformation = _sourceInformationBuilder.buildAsyncBody();
 
     // Forward all the parameters to the body.
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     if (graph.thisInstruction != null) {
       inputs.add(graph.thisInstruction);
     }
@@ -1331,7 +1328,7 @@
     }
 
     JGeneratorBody body = _elementMap.getGeneratorBody(function);
-    push(new HInvokeGeneratorBody(
+    push(HInvokeGeneratorBody(
         body,
         inputs,
         _abstractValueDomain.dynamicType, // TODO: better type.
@@ -1409,7 +1406,8 @@
 
       if (targetChecks.checkAllParameters ||
           (targetChecks.checkCovariantParameters &&
-              (variable.isGenericCovariantImpl || variable.isCovariant))) {
+              (variable.isCovariantByClass ||
+                  variable.isCovariantByDeclaration))) {
         newParameter = _typeBuilder.potentiallyCheckOrTrustTypeOfParameter(
             targetElement, newParameter, type);
       } else {
@@ -1423,7 +1421,7 @@
     }
 
     function.positionalParameters.forEach(_handleParameter);
-    function.namedParameters.toList()..forEach(_handleParameter);
+    function.namedParameters.toList().forEach(_handleParameter);
   }
 
   void _checkTypeVariableBounds(FunctionEntity method) {
@@ -1432,8 +1430,8 @@
       ir.FunctionNode function = getFunctionNode(_elementMap, method);
       for (ir.TypeParameter typeParameter in function.typeParameters) {
         Local local = _localsMap.getLocalTypeVariableEntity(_elementMap
-            .getTypeVariableType(new ir.TypeParameterType(
-                typeParameter, ir.Nullability.nonNullable))
+            .getTypeVariableType(
+                ir.TypeParameterType(typeParameter, ir.Nullability.nonNullable))
             .element);
         HInstruction newParameter = localsHandler.directLocals[local];
         DartType bound = _getDartTypeIfValid(typeParameter.bound);
@@ -1470,7 +1468,7 @@
       var sourceInformation = _sourceInformationBuilder.buildAssert(context);
       _pushStaticInvocation(
           _commonElements.assertHelper,
-          <HInstruction>[pop()],
+          [pop()],
           _typeInferenceMap.getReturnTypeOf(_commonElements.assertHelper),
           const <DartType>[],
           sourceInformation: sourceInformation);
@@ -1610,7 +1608,7 @@
 
     Map<Local, AbstractValue> parameterMap = {};
     List<ir.VariableDeclaration> elidedParameters = [];
-    Set<Local> elidedParameterSet = new Set();
+    Set<Local> elidedParameterSet = Set();
     if (functionNode != null) {
       assert(parameterStructure != null);
 
@@ -1637,7 +1635,7 @@
     // but cannot receive constants before it has been closed. By closing it
     // here, we can use constants in the code that sets up the function.
     open(graph.entry);
-    close(new HGoto(_abstractValueDomain)).addSuccessor(block);
+    close(HGoto(_abstractValueDomain)).addSuccessor(block);
     open(block);
 
     localsHandler.startFunction(targetElement, parameterMap, elidedParameterSet,
@@ -1663,7 +1661,7 @@
         _handleIf(
             visitCondition: () {
               HParameterValue parameter = parameters.values.first;
-              push(new HIdentity(parameter, graph.addConstantNull(closedWorld),
+              push(HIdentity(parameter, graph.addConstantNull(closedWorld),
                   _abstractValueDomain.boolType));
             },
             visitThen: () {
@@ -1684,13 +1682,13 @@
   }
 
   void _closeFunction() {
-    if (!isAborted()) _closeAndGotoExit(new HGoto(_abstractValueDomain));
+    if (!isAborted()) _closeAndGotoExit(HGoto(_abstractValueDomain));
     graph.finalize(_abstractValueDomain);
   }
 
   @override
   void defaultNode(ir.Node node) {
-    throw new UnsupportedError("Unhandled node $node (${node.runtimeType})");
+    throw UnsupportedError("Unhandled node $node (${node.runtimeType})");
   }
 
   /// Returns the current source element. This is used by the type builder.
@@ -1720,9 +1718,9 @@
         _elementMap.getSpannable(targetElement, loadLibrary),
         _elementMap.getImport(loadLibrary.import));
     // TODO(efortuna): Source information!
-    push(new HInvokeStatic(
+    push(HInvokeStatic(
         _commonElements.loadDeferredLibrary,
-        <HInstruction>[graph.addConstantString(loadId, closedWorld)],
+        [graph.addConstantString(loadId, closedWorld)],
         _abstractValueDomain.nonNullType,
         const <DartType>[],
         targetCanThrow: false));
@@ -1768,8 +1766,7 @@
       _handleInTryStatement();
       SourceInformation sourceInformation =
           _sourceInformationBuilder.buildThrow(node.expression);
-      _closeAndGotoExit(
-          new HThrow(_abstractValueDomain, pop(), sourceInformation));
+      _closeAndGotoExit(HThrow(_abstractValueDomain, pop(), sourceInformation));
     } else {
       expression.accept(this);
       pop();
@@ -1787,8 +1784,8 @@
       OutputUnit outputUnit =
           closedWorld.outputUnitData.outputUnitForConstant(value);
       ConstantValue deferredConstant =
-          new DeferredGlobalConstantValue(value, outputUnit);
-      registry.registerConstantUse(new ConstantUse.deferred(deferredConstant));
+          DeferredGlobalConstantValue(value, outputUnit);
+      registry.registerConstantUse(ConstantUse.deferred(deferredConstant));
       stack.add(graph.addDeferredConstant(
           deferredConstant, sourceInformation, closedWorld));
     } else {
@@ -1912,7 +1909,7 @@
     HInstruction originalLength = null; // Set for growable lists.
 
     HInstruction buildGetLength(SourceInformation sourceInformation) {
-      HGetLength result = new HGetLength(
+      HGetLength result = HGetLength(
           array, _abstractValueDomain.positiveIntType,
           isAssignable: !isFixed)
         ..sourceInformation = sourceInformation;
@@ -1930,7 +1927,7 @@
       SourceInformation sourceInformation =
           _sourceInformationBuilder.buildForInMoveNext(node);
       HInstruction length = buildGetLength(sourceInformation);
-      push(new HIdentity(length, originalLength, _abstractValueDomain.boolType)
+      push(HIdentity(length, originalLength, _abstractValueDomain.boolType)
         ..sourceInformation = sourceInformation);
       _pushStaticInvocation(
           _commonElements.checkConcurrentModificationError,
@@ -1963,9 +1960,8 @@
       HInstruction index = localsHandler.readLocal(indexVariable,
           sourceInformation: sourceInformation);
       HInstruction length = buildGetLength(sourceInformation);
-      HInstruction compare =
-          new HLess(index, length, _abstractValueDomain.boolType)
-            ..sourceInformation = sourceInformation;
+      HInstruction compare = HLess(index, length, _abstractValueDomain.boolType)
+        ..sourceInformation = sourceInformation;
       add(compare);
       return compare;
     }
@@ -1989,7 +1985,7 @@
           sourceInformation: sourceInformation);
       // No bound check is necessary on indexer as it is immediately guarded by
       // the condition.
-      HInstruction value = new HIndex(array, index, type)
+      HInstruction value = HIndex(array, index, type)
         ..sourceInformation = sourceInformation;
       add(value);
 
@@ -2018,7 +2014,7 @@
           sourceInformation: sourceInformation);
       HInstruction one = graph.addConstantInt(1, closedWorld);
       HInstruction addInstruction =
-          new HAdd(index, one, _abstractValueDomain.positiveIntType)
+          HAdd(index, one, _abstractValueDomain.positiveIntType)
             ..sourceInformation = sourceInformation;
       add(addInstruction);
       localsHandler.updateLocal(indexVariable, addInstruction,
@@ -2057,7 +2053,7 @@
           _getStaticType(node.iterable),
           receiverType,
           Selectors.iterator,
-          <HInstruction>[receiver],
+          [receiver],
           const <DartType>[],
           _sourceInformationBuilder.buildForInIterator(node));
       iterator = pop();
@@ -2071,7 +2067,7 @@
           iteratorType,
           receiverType,
           Selectors.moveNext,
-          <HInstruction>[iterator],
+          [iterator],
           const <DartType>[],
           _sourceInformationBuilder.buildForInMoveNext(node));
       return popBoolified();
@@ -2121,7 +2117,7 @@
         localsHandler.substInContext(dartTypes.interfaceType(cls, [typeArg]));
     // TODO(johnniwinther): This should be the exact type.
     StaticType staticInstanceType =
-        new StaticType(instanceType, ClassRelation.subtype);
+        StaticType(instanceType, ClassRelation.subtype);
     _addImplicitInstantiation(instanceType);
     SourceInformation sourceInformation =
         _sourceInformationBuilder.buildForInIterator(node);
@@ -2151,7 +2147,7 @@
           const <DartType>[],
           _sourceInformationBuilder.buildForInMoveNext(node));
       HInstruction future = pop();
-      push(new HAwait(future, _abstractValueDomain.dynamicType));
+      push(HAwait(future, _abstractValueDomain.dynamicType));
       return popBoolified();
     }
 
@@ -2174,8 +2170,8 @@
     void buildUpdate() {}
 
     // Creates a synthetic try/finally block in case anything async goes amiss.
-    TryCatchFinallyBuilder tryBuilder = new TryCatchFinallyBuilder(
-        this, _sourceInformationBuilder.buildLoop(node));
+    TryCatchFinallyBuilder tryBuilder =
+        TryCatchFinallyBuilder(this, _sourceInformationBuilder.buildLoop(node));
     // Build fake try body:
     _loopHandler.handleLoop(
         node,
@@ -2198,7 +2194,7 @@
           _sourceInformationBuilder
               // ignore:deprecated_member_use_from_same_package
               .buildGeneric(node));
-      add(new HAwait(pop(), _abstractValueDomain.dynamicType));
+      add(HAwait(pop(), _abstractValueDomain.dynamicType));
     }
 
     tryBuilder
@@ -2212,7 +2208,7 @@
     // Set the runtime type information on the object.
     FunctionEntity typeInfoSetterFn = _commonElements.setArrayType;
     // TODO(efortuna): Insert source information in this static invocation.
-    _pushStaticInvocation(typeInfoSetterFn, <HInstruction>[newObject, typeInfo],
+    _pushStaticInvocation(typeInfoSetterFn, [newObject, typeInfo],
         _abstractValueDomain.dynamicType, const <DartType>[],
         sourceInformation: sourceInformation);
 
@@ -2255,7 +2251,7 @@
         _sourceInformationBuilder.buildLoop(node);
     // TODO(efortuna): I think this can be rewritten using
     // LoopHandler.handleLoop with some tricks about when the "update" happens.
-    LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
+    LocalsHandler savedLocals = LocalsHandler.from(localsHandler);
     CapturedLoopScope loopClosureInfo =
         _closureDataLookup.getCapturedLoopScope(node);
     localsHandler.startLoop(loopClosureInfo, sourceInformation);
@@ -2283,7 +2279,7 @@
     HBasicBlock bodyExitBlock;
     bool isAbortingBody = false;
     if (current != null) {
-      bodyExitBlock = close(new HGoto(_abstractValueDomain));
+      bodyExitBlock = close(HGoto(_abstractValueDomain));
     } else {
       isAbortingBody = true;
       bodyExitBlock = lastOpenedBlock;
@@ -2309,16 +2305,15 @@
         if (!isAbortingBody) continueHandlers.add(localsHandler);
         localsHandler =
             savedLocals.mergeMultiple(continueHandlers, conditionBlock);
-        SubGraph bodyGraph = new SubGraph(bodyEntryBlock, bodyExitBlock);
+        SubGraph bodyGraph = SubGraph(bodyEntryBlock, bodyExitBlock);
         List<LabelDefinition> labels = jumpHandler.labels;
         HSubGraphBlockInformation bodyInfo =
-            new HSubGraphBlockInformation(bodyGraph);
+            HSubGraphBlockInformation(bodyGraph);
         HLabeledBlockInformation info;
         if (!labels.isEmpty) {
-          info =
-              new HLabeledBlockInformation(bodyInfo, labels, isContinue: true);
+          info = HLabeledBlockInformation(bodyInfo, labels, isContinue: true);
         } else {
-          info = new HLabeledBlockInformation.implicit(bodyInfo, target,
+          info = HLabeledBlockInformation.implicit(bodyInfo, target,
               isContinue: true);
         }
         bodyEntryBlock.setBlockFlow(info, conditionBlock);
@@ -2328,32 +2323,29 @@
       node.condition.accept(this);
       assert(!isAborted());
       HInstruction conditionInstruction = popBoolified();
-      HBasicBlock conditionEndBlock = close(new HLoopBranch(
-          _abstractValueDomain,
-          conditionInstruction,
-          HLoopBranch.DO_WHILE_LOOP));
+      HBasicBlock conditionEndBlock = close(HLoopBranch(_abstractValueDomain,
+          conditionInstruction, HLoopBranch.DO_WHILE_LOOP));
 
       HBasicBlock avoidCriticalEdge = addNewBlock();
       conditionEndBlock.addSuccessor(avoidCriticalEdge);
       open(avoidCriticalEdge);
-      close(new HGoto(_abstractValueDomain));
+      close(HGoto(_abstractValueDomain));
       avoidCriticalEdge.addSuccessor(loopEntryBlock); // The back-edge.
 
-      conditionExpression =
-          new SubExpression(conditionBlock, conditionEndBlock);
+      conditionExpression = SubExpression(conditionBlock, conditionEndBlock);
 
       // Avoid a critical edge from the condition to the loop-exit body.
       HBasicBlock conditionExitBlock = addNewBlock();
       open(conditionExitBlock);
-      close(new HGoto(_abstractValueDomain));
+      close(HGoto(_abstractValueDomain));
       conditionEndBlock.addSuccessor(conditionExitBlock);
 
       _loopHandler.endLoop(
           loopEntryBlock, conditionExitBlock, jumpHandler, localsHandler);
 
       loopEntryBlock.postProcessLoopHeader();
-      SubGraph bodyGraph = new SubGraph(loopEntryBlock, bodyExitBlock);
-      HLoopBlockInformation loopBlockInfo = new HLoopBlockInformation(
+      SubGraph bodyGraph = SubGraph(loopEntryBlock, bodyExitBlock);
+      HLoopBlockInformation loopBlockInfo = HLoopBlockInformation(
           HLoopBlockInformation.DO_WHILE_LOOP,
           null,
           wrapExpressionGraph(conditionExpression),
@@ -2376,16 +2368,16 @@
 
         // Since the body of the loop has a break, we attach a synthesized label
         // to the body.
-        SubGraph bodyGraph = new SubGraph(bodyEntryBlock, bodyExitBlock);
+        SubGraph bodyGraph = SubGraph(bodyEntryBlock, bodyExitBlock);
         JumpTarget target = _localsMap.getJumpTargetForDo(node);
         LabelDefinition label = target.addLabel('loop', isBreakTarget: true);
-        HLabeledBlockInformation info = new HLabeledBlockInformation(
-            new HSubGraphBlockInformation(bodyGraph), <LabelDefinition>[label]);
+        HLabeledBlockInformation info = HLabeledBlockInformation(
+            HSubGraphBlockInformation(bodyGraph), <LabelDefinition>[label]);
         loopEntryBlock.setBlockFlow(info, current);
         jumpHandler.forEachBreak((HBreak breakInstruction, _) {
           HBasicBlock block = breakInstruction.block;
-          block.addAtExit(new HBreak.toLabel(
-              _abstractValueDomain, label, sourceInformation));
+          block.addAtExit(
+              HBreak.toLabel(_abstractValueDomain, label, sourceInformation));
           block.remove(breakInstruction);
         });
       }
@@ -2408,7 +2400,7 @@
       void visitThen(),
       void visitElse(),
       SourceInformation sourceInformation}) {
-    SsaBranchBuilder branchBuilder = new SsaBranchBuilder(this,
+    SsaBranchBuilder branchBuilder = SsaBranchBuilder(this,
         node == null ? null : _elementMap.getSpannable(targetElement, node));
     branchBuilder.handleIf(visitCondition, visitThen, visitElse,
         sourceInformation: sourceInformation);
@@ -2503,7 +2495,7 @@
       node.condition.accept(this);
       _pushStaticInvocation(
           _commonElements.assertHelper,
-          <HInstruction>[pop()],
+          [pop()],
           _typeInferenceMap.getReturnTypeOf(_commonElements.assertHelper),
           const <DartType>[],
           sourceInformation: sourceInformation);
@@ -2516,7 +2508,7 @@
       node.condition.accept(this);
       _pushStaticInvocation(
           _commonElements.assertTest,
-          <HInstruction>[pop()],
+          [pop()],
           _typeInferenceMap.getReturnTypeOf(_commonElements.assertTest),
           const <DartType>[],
           sourceInformation: sourceInformation);
@@ -2526,7 +2518,7 @@
       node.message.accept(this);
       _pushStaticInvocation(
           _commonElements.assertThrow,
-          <HInstruction>[pop()],
+          [pop()],
           _typeInferenceMap.getReturnTypeOf(_commonElements.assertThrow),
           const <DartType>[],
           sourceInformation: sourceInformation);
@@ -2544,16 +2536,16 @@
   /// to distinguish the synthesized loop created for a switch statement with
   /// continue statements from simple switch statements.
   JumpHandler createJumpHandler(ir.TreeNode node, JumpTarget target,
-      {bool isLoopJump: false}) {
+      {bool isLoopJump = false}) {
     if (target == null) {
       // No breaks or continues to this node.
-      return new NullJumpHandler(reporter);
+      return NullJumpHandler(reporter);
     }
     if (isLoopJump && node is ir.SwitchStatement) {
-      return new KernelSwitchCaseJumpHandler(this, target, node, _localsMap);
+      return KernelSwitchCaseJumpHandler(this, target, node, _localsMap);
     }
 
-    return new JumpHandler(this, target);
+    return JumpHandler(this, target);
   }
 
   @override
@@ -2598,14 +2590,14 @@
 
     JumpHandler handler = createJumpHandler(node, jumpTarget);
 
-    LocalsHandler beforeLocals = new LocalsHandler.from(localsHandler);
+    LocalsHandler beforeLocals = LocalsHandler.from(localsHandler);
 
     HBasicBlock newBlock = openNewBlock();
     body.accept(this);
-    SubGraph bodyGraph = new SubGraph(newBlock, lastOpenedBlock);
+    SubGraph bodyGraph = SubGraph(newBlock, lastOpenedBlock);
 
     HBasicBlock joinBlock = graph.addNewBlock();
-    List<LocalsHandler> breakHandlers = <LocalsHandler>[];
+    List<LocalsHandler> breakHandlers = [];
     handler.forEachBreak((HBreak breakInstruction, LocalsHandler locals) {
       breakInstruction.block.addSuccessor(joinBlock);
       breakHandlers.add(locals);
@@ -2621,8 +2613,8 @@
 
     // There was at least one reachable break, so the label is needed.
     newBlock.setBlockFlow(
-        new HLabeledBlockInformation(
-            new HSubGraphBlockInformation(bodyGraph), handler.labels),
+        HLabeledBlockInformation(
+            HSubGraphBlockInformation(bodyGraph), handler.labels),
         joinBlock);
     handler.close();
   }
@@ -2631,8 +2623,7 @@
   /// expressions to constants.
   Map<ir.Expression, ConstantValue> _buildSwitchCaseConstants(
       ir.SwitchStatement switchStatement) {
-    Map<ir.Expression, ConstantValue> constants =
-        new Map<ir.Expression, ConstantValue>();
+    Map<ir.Expression, ConstantValue> constants = {};
     for (ir.SwitchCase switchCase in switchStatement.cases) {
       for (ir.Expression caseExpression in switchCase.expressions) {
         ConstantValue constant =
@@ -2662,7 +2653,7 @@
     // The switch case indices must match those computed in
     // [KernelSwitchCaseJumpHandler].
     bool hasContinue = false;
-    Map<ir.SwitchCase, int> caseIndex = new Map<ir.SwitchCase, int>();
+    Map<ir.SwitchCase, int> caseIndex = {};
     int switchIndex = 1;
     bool hasDefault = false;
     for (ir.SwitchCase switchCase in node.cases) {
@@ -2704,7 +2695,7 @@
       ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase) {
     Map<ir.Expression, ConstantValue> constantsLookup =
         _buildSwitchCaseConstants(parentSwitch);
-    List<ConstantValue> constantList = <ConstantValue>[];
+    List<ConstantValue> constantList = [];
     if (switchCase != null) {
       for (var expression in switchCase.expressions) {
         constantList.add(constantsLookup[expression]);
@@ -2781,7 +2772,7 @@
       // Use null as the marker for a synthetic default clause.
       // The synthetic default is added because otherwise there would be no
       // good place to give a default value to the local.
-      switchCases = new List<ir.SwitchCase>.from(switchCases);
+      switchCases = List<ir.SwitchCase>.from(switchCases);
       switchCases.add(null);
     }
 
@@ -2823,9 +2814,7 @@
 
       List<ConstantValue> getConstants(
           ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase) {
-        return <ConstantValue>[
-          constant_system.createIntFromInt(caseIndex[switchCase])
-        ];
+        return [constant_system.createIntFromInt(caseIndex[switchCase])];
       }
 
       void buildSwitchCase(ir.SwitchCase switchCase) {
@@ -2842,7 +2831,7 @@
       // in the call to [handleLoop] below.
       _handleSwitch(
           switchStatement, // nor is buildExpression.
-          new NullJumpHandler(reporter),
+          NullJumpHandler(reporter),
           buildExpression,
           switchStatement.cases,
           getConstants,
@@ -2872,7 +2861,7 @@
       // null, so we don't drop into the while loop.
       void buildCondition() {
         js.Template code = js.js.parseForeignJS('#');
-        push(new HForeignCode(code, _abstractValueDomain.boolType,
+        push(HForeignCode(code, _abstractValueDomain.boolType,
             [localsHandler.readLocal(switchTarget)],
             nativeBehavior: NativeBehavior.PURE));
       }
@@ -2907,12 +2896,11 @@
       return;
     }
 
-    HSwitch switchInstruction =
-        new HSwitch(_abstractValueDomain, <HInstruction>[expression]);
+    HSwitch switchInstruction = HSwitch(_abstractValueDomain, [expression]);
     HBasicBlock expressionEnd = close(switchInstruction);
     LocalsHandler savedLocals = localsHandler;
 
-    List<HStatementInformation> statements = <HStatementInformation>[];
+    List<HStatementInformation> statements = [];
     bool hasDefault = false;
     for (ir.SwitchCase switchCase in switchCases) {
       HBasicBlock block = graph.addNewBlock();
@@ -2931,7 +2919,7 @@
         hasDefault = true;
       }
       open(block);
-      localsHandler = new LocalsHandler.from(savedLocals);
+      localsHandler = LocalsHandler.from(savedLocals);
       buildSwitchCase(switchCase);
       if (!isAborted() &&
           // TODO(johnniwinther): Reinsert this if `isReachable` is no longer
@@ -2944,8 +2932,8 @@
         // sure the last case does not fall through to the default case.
         jumpHandler.generateBreak(sourceInformation);
       }
-      statements.add(
-          new HSubGraphBlockInformation(new SubGraph(block, lastOpenedBlock)));
+      statements
+          .add(HSubGraphBlockInformation(SubGraph(block, lastOpenedBlock)));
     }
 
     // Add a join-block if necessary.
@@ -2955,8 +2943,8 @@
     // to create the phis in [joinBlock].
     // If we never jump to the join block, [caseHandlers] will stay empty, and
     // the join block is never added to the graph.
-    HBasicBlock joinBlock = new HBasicBlock();
-    List<LocalsHandler> caseHandlers = <LocalsHandler>[];
+    HBasicBlock joinBlock = HBasicBlock();
+    List<LocalsHandler> caseHandlers = [];
     jumpHandler.forEachBreak((HBreak instruction, LocalsHandler locals) {
       instruction.block.addSuccessor(joinBlock);
       caseHandlers.add(locals);
@@ -2968,7 +2956,7 @@
               'Continue cannot target a switch.'));
     });
     if (!isAborted()) {
-      current.close(new HGoto(_abstractValueDomain));
+      current.close(HGoto(_abstractValueDomain));
       lastOpenedBlock.addSuccessor(joinBlock);
       caseHandlers.add(localsHandler);
     }
@@ -2978,11 +2966,11 @@
       HBasicBlock defaultCase = addNewBlock();
       expressionEnd.addSuccessor(defaultCase);
       open(defaultCase);
-      close(new HGoto(_abstractValueDomain));
+      close(HGoto(_abstractValueDomain));
       defaultCase.addSuccessor(joinBlock);
       caseHandlers.add(savedLocals);
-      statements.add(new HSubGraphBlockInformation(
-          new SubGraph(defaultCase, defaultCase)));
+      statements
+          .add(HSubGraphBlockInformation(SubGraph(defaultCase, defaultCase)));
     }
     assert(caseHandlers.length == joinBlock.predecessors.length);
     if (caseHandlers.isNotEmpty) {
@@ -2999,11 +2987,11 @@
     }
 
     HSubExpressionBlockInformation expressionInfo =
-        new HSubExpressionBlockInformation(
-            new SubExpression(expressionStart, expressionEnd));
+        HSubExpressionBlockInformation(
+            SubExpression(expressionStart, expressionEnd));
     expressionStart.setBlockFlow(
-        new HSwitchBlockInformation(expressionInfo, statements,
-            jumpHandler.target, jumpHandler.labels, sourceInformation),
+        HSwitchBlockInformation(expressionInfo, statements, jumpHandler.target,
+            jumpHandler.labels, sourceInformation),
         joinBlock);
 
     jumpHandler.close();
@@ -3011,14 +2999,14 @@
 
   @override
   void visitConditionalExpression(ir.ConditionalExpression node) {
-    SsaBranchBuilder brancher = new SsaBranchBuilder(this);
+    SsaBranchBuilder brancher = SsaBranchBuilder(this);
     brancher.handleConditional(() => node.condition.accept(this),
         () => node.then.accept(this), () => node.otherwise.accept(this));
   }
 
   @override
   void visitLogicalExpression(ir.LogicalExpression node) {
-    SsaBranchBuilder brancher = new SsaBranchBuilder(this);
+    SsaBranchBuilder brancher = SsaBranchBuilder(this);
     _handleLogicalExpression(node.left, () => node.right.accept(this), brancher,
         node.operatorEnum, _sourceInformationBuilder.buildBinary(node));
   }
@@ -3112,7 +3100,7 @@
       listInstruction = graph.addConstant(
           _elementMap.getConstantValue(_memberContextNode, node), closedWorld);
     } else {
-      List<HInstruction> elements = <HInstruction>[];
+      List<HInstruction> elements = [];
       for (ir.Expression element in node.expressions) {
         element.accept(this);
         elements.add(pop());
@@ -3144,7 +3132,7 @@
     }
 
     // The set literal constructors take the elements as a List.
-    List<HInstruction> elements = <HInstruction>[];
+    List<HInstruction> elements = [];
     for (ir.Expression element in node.expressions) {
       element.accept(this);
       elements.add(pop());
@@ -3152,7 +3140,7 @@
 
     // The constructor is a procedure because it's a factory.
     FunctionEntity constructor;
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     if (elements.isEmpty) {
       constructor = _commonElements.setLiteralConstructorEmpty;
     } else {
@@ -3170,7 +3158,7 @@
     ClassEntity cls = constructor.enclosingClass;
 
     if (_rtiNeed.classNeedsTypeArguments(cls)) {
-      List<HInstruction> typeInputs = <HInstruction>[];
+      List<HInstruction> typeInputs = [];
       type.typeArguments.forEach((DartType argument) {
         typeInputs
             .add(_typeBuilder.analyzeTypeArgument(argument, sourceElement));
@@ -3223,7 +3211,7 @@
     }
 
     // The map literal constructors take the key-value pairs as a List
-    List<HInstruction> constructorArgs = <HInstruction>[];
+    List<HInstruction> constructorArgs = [];
     for (ir.MapLiteralEntry mapEntry in node.entries) {
       mapEntry.key.accept(this);
       constructorArgs.add(pop());
@@ -3233,7 +3221,7 @@
 
     // The constructor is a procedure because it's a factory.
     FunctionEntity constructor;
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     if (constructorArgs.isEmpty) {
       constructor = _commonElements.mapLiteralConstructorEmpty;
     } else {
@@ -3252,7 +3240,7 @@
     ClassEntity cls = constructor.enclosingClass;
 
     if (_rtiNeed.classNeedsTypeArguments(cls)) {
-      List<HInstruction> typeInputs = <HInstruction>[];
+      List<HInstruction> typeInputs = [];
       type.typeArguments.forEach((DartType argument) {
         typeInputs
             .add(_typeBuilder.analyzeTypeArgument(argument, sourceElement));
@@ -3325,7 +3313,7 @@
         sourceInformation: sourceInformation);
     _pushStaticInvocation(
         _commonElements.createRuntimeType,
-        <HInstruction>[value],
+        [value],
         _typeInferenceMap.getReturnTypeOf(_commonElements.createRuntimeType),
         const <DartType>[],
         sourceInformation: sourceInformation);
@@ -3340,14 +3328,14 @@
         staticTarget.kind == ir.ProcedureKind.Getter) {
       FunctionEntity getter = _elementMap.getMember(staticTarget);
       // Invoke the getter
-      _pushStaticInvocation(getter, const <HInstruction>[],
+      _pushStaticInvocation(getter, const [],
           _typeInferenceMap.getReturnTypeOf(getter), const <DartType>[],
           sourceInformation: sourceInformation);
     } else if (staticTarget is ir.Field) {
       FieldEntity field = _elementMap.getField(staticTarget);
       FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(field);
       if (fieldData.isEager) {
-        push(new HStatic(field, _typeInferenceMap.getInferredTypeOf(field),
+        push(HStatic(field, _typeInferenceMap.getInferredTypeOf(field),
             sourceInformation));
       } else if (fieldData.isEffectivelyConstant) {
         OutputUnit outputUnit =
@@ -3358,10 +3346,9 @@
         // unit, the old FE would still generate a deferred wrapper here.
         if (!closedWorld.outputUnitData
             .hasOnlyNonDeferredImportPaths(targetElement, field)) {
-          ConstantValue deferredConstant = new DeferredGlobalConstantValue(
-              fieldData.initialValue, outputUnit);
-          registry
-              .registerConstantUse(new ConstantUse.deferred(deferredConstant));
+          ConstantValue deferredConstant =
+              DeferredGlobalConstantValue(fieldData.initialValue, outputUnit);
+          registry.registerConstantUse(ConstantUse.deferred(deferredConstant));
           stack.add(graph.addDeferredConstant(
               deferredConstant, sourceInformation, closedWorld));
         } else {
@@ -3371,7 +3358,7 @@
       } else {
         assert(
             fieldData.isLazy, "Unexpected field data for $field: $fieldData");
-        push(new HLazyStatic(field, _typeInferenceMap.getInferredTypeOf(field),
+        push(HLazyStatic(field, _typeInferenceMap.getInferredTypeOf(field),
             sourceInformation));
       }
     } else {
@@ -3379,7 +3366,7 @@
       // created a constant value instead. Remove this case when we use CFE
       // constants.
       FunctionEntity member = _elementMap.getMember(staticTarget);
-      push(new HStatic(member, _typeInferenceMap.getInferredTypeOf(member),
+      push(HStatic(member, _typeInferenceMap.getInferredTypeOf(member),
           sourceInformation));
     }
   }
@@ -3393,7 +3380,7 @@
     SourceInformation sourceInformation =
         _sourceInformationBuilder.buildGet(node);
     FunctionEntity member = _elementMap.getMember(staticTarget);
-    push(new HStatic(member, _typeInferenceMap.getInferredTypeOf(member),
+    push(HStatic(member, _typeInferenceMap.getInferredTypeOf(member),
         sourceInformation));
   }
 
@@ -3406,14 +3393,14 @@
     if (staticTarget is ir.Procedure) {
       FunctionEntity setter = _elementMap.getMember(staticTarget);
       // Invoke the setter
-      _pushStaticInvocation(setter, <HInstruction>[value],
+      _pushStaticInvocation(setter, [value],
           _typeInferenceMap.getReturnTypeOf(setter), const <DartType>[],
           sourceInformation: _sourceInformationBuilder.buildSet(node));
       pop();
     } else {
       MemberEntity target = _elementMap.getMember(staticTarget);
       if (!_fieldAnalysis.getFieldData(target).isElided) {
-        add(new HStaticStore(
+        add(HStaticStore(
             _abstractValueDomain,
             target,
             _typeBuilder.potentiallyCheckOrTrustTypeOfAssignment(
@@ -3431,8 +3418,8 @@
         node,
         _getStaticType(receiver),
         _typeInferenceMap.receiverTypeOfGet(node),
-        new Selector.getter(_elementMap.getName(name)),
-        <HInstruction>[receiverInstruction],
+        Selector.getter(_elementMap.getName(name)),
+        [receiverInstruction],
         const <DartType>[],
         _sourceInformationBuilder.buildGet(node));
   }
@@ -3482,8 +3469,8 @@
         node,
         _getStaticType(receiver),
         _typeInferenceMap.receiverTypeOfSet(node, _abstractValueDomain),
-        new Selector.setter(_elementMap.getName(name)),
-        <HInstruction>[receiverInstruction, valueInstruction],
+        Selector.setter(_elementMap.getName(name)),
+        [receiverInstruction, valueInstruction],
         const <DartType>[],
         _sourceInformationBuilder.buildAssignment(node));
 
@@ -3513,14 +3500,14 @@
       // TODO(johnniwinther): Remove this when the CFE checks for missing
       //  concrete super targets.
       _generateSuperNoSuchMethod(node, _elementMap.getSelector(node).name + "=",
-          <HInstruction>[value], const <DartType>[], sourceInformation);
+          [value], const <DartType>[], sourceInformation);
     } else {
       MemberEntity member = _elementMap.getMember(target);
       _buildInvokeSuper(
           _elementMap.getSelector(node),
           _elementMap.getClass(_containingClass(node)),
           member,
-          <HInstruction>[value],
+          [value],
           const <DartType>[],
           sourceInformation);
     }
@@ -3601,7 +3588,7 @@
 
   /// Extracts the list of instructions for the positional subset of arguments.
   List<HInstruction> _visitPositionalArguments(ir.Arguments arguments) {
-    List<HInstruction> result = <HInstruction>[];
+    List<HInstruction> result = [];
     for (ir.Expression argument in arguments.positional) {
       argument.accept(this);
       result.add(pop());
@@ -3619,7 +3606,7 @@
     List<HInstruction> values = _visitPositionalArguments(arguments);
 
     if (arguments.named.isNotEmpty) {
-      Map<String, HInstruction> namedValues = <String, HInstruction>{};
+      Map<String, HInstruction> namedValues = {};
       for (ir.NamedExpression argument in arguments.named) {
         argument.value.accept(this);
         namedValues[argument.name] = pop();
@@ -3651,7 +3638,7 @@
       if (function is ConstructorEntity && function.isFactoryConstructor) {
         // TODO(sra): Have a "CompiledArguments" structure to just update with
         // what values we have rather than creating a map and de-populating it.
-        var namedValues = <String, HInstruction>{};
+        Map<String, HInstruction> namedValues = {};
         for (ir.NamedExpression argument in arguments.named) {
           argument.value.accept(this);
           namedValues[argument.name] = pop();
@@ -3747,7 +3734,7 @@
           // Filter elided parameters.
           .where((p) => parameterStructure.namedParameters.contains(p.name))
           .toList()
-            ..sort(namedOrdering);
+        ..sort(namedOrdering);
       for (ir.VariableDeclaration parameter in namedParameters) {
         HInstruction value = namedValues[parameter.name];
         if (value == null) {
@@ -3985,7 +3972,7 @@
       List<HInstruction> arguments,
       SourceInformation sourceInformation) {
     // `List<T>()` is essentially the same as `<T>[]`.
-    push(_buildLiteralList(<HInstruction>[]));
+    push(_buildLiteralList([]));
     HInstruction allocation = pop();
     var inferredType = globalInferenceResults.typeOfNewList(invocation);
     if (inferredType != null) {
@@ -4014,7 +4001,7 @@
             "Expected 1-2 argument, actual: $arguments."));
     HInstruction lengthInput = arguments.first;
     if (lengthInput.isNumber(_abstractValueDomain).isPotentiallyFalse) {
-      HPrimitiveCheck conversion = new HPrimitiveCheck(
+      HPrimitiveCheck conversion = HPrimitiveCheck(
           _commonElements.numType,
           HPrimitiveCheck.ARGUMENT_TYPE_CHECK,
           _abstractValueDomain.numType,
@@ -4024,7 +4011,7 @@
       lengthInput = conversion;
     }
     js.Template code = js.js.parseForeignJS('new Array(#)');
-    var behavior = new NativeBehavior();
+    var behavior = NativeBehavior();
 
     DartType expectedType = _getStaticType(invocation).type;
     behavior.typesInstantiated.add(expectedType);
@@ -4042,8 +4029,7 @@
     var resultType = globalInferenceResults.typeOfNewList(invocation) ??
         _abstractValueDomain.fixedListType;
 
-    HForeignCode foreign = new HForeignCode(
-        code, resultType, <HInstruction>[lengthInput],
+    HForeignCode foreign = HForeignCode(code, resultType, [lengthInput],
         nativeBehavior: behavior,
         throwBehavior:
             canThrow ? NativeThrowBehavior.MAY : NativeThrowBehavior.NEVER)
@@ -4056,7 +4042,7 @@
       js.Template code = js.js.parseForeignJS(r'#.fixed$length = Array');
       // We set the instruction as [canThrow] to avoid it being dead code.
       // We need a finer grained side effect.
-      add(new HForeignCode(code, _abstractValueDomain.nullType, [stack.last],
+      add(HForeignCode(code, _abstractValueDomain.nullType, [stack.last],
           throwBehavior: NativeThrowBehavior.MAY));
     }
 
@@ -4112,8 +4098,8 @@
     HInstruction object = arguments[0];
     HInstruction closure = arguments[1];
 
-    List<HInstruction> inputs = <HInstruction>[closure];
-    List<DartType> typeArguments = <DartType>[];
+    List<HInstruction> inputs = [closure];
+    List<DartType> typeArguments = [];
 
     closedWorld.registerExtractTypeArguments(cls);
     HInstruction instanceType =
@@ -4126,7 +4112,7 @@
       TypeVariableType variable = _typeVariable;
       typeArguments.add(variable);
       TypeRecipe recipe = TypeExpressionRecipe(variable);
-      HInstruction typeEval = new HTypeEval(
+      HInstruction typeEval = HTypeEval(
           instanceType, envStructure, recipe, _abstractValueDomain.dynamicType);
       add(typeEval);
       inputs.add(typeEval);
@@ -4136,14 +4122,14 @@
     // function of N type arguments.
 
     Selector selector =
-        new Selector.callClosure(0, const <String>[], typeArguments.length);
+        Selector.callClosure(0, const <String>[], typeArguments.length);
     StaticType receiverStaticType =
         _getStaticType(invocation.arguments.positional[1]);
     AbstractValue receiverType = _abstractValueDomain
         .createFromStaticType(receiverStaticType.type,
             classRelation: receiverStaticType.relation, nullable: true)
         .abstractValue;
-    push(new HInvokeClosure(selector, receiverType, inputs,
+    push(HInvokeClosure(selector, receiverType, inputs,
         _abstractValueDomain.dynamicType, typeArguments));
 
     return true;
@@ -4244,20 +4230,20 @@
     Map<String, ir.Expression> namedArguments = {};
     int kind = _readIntLiteral(invocation.arguments.positional[4]);
 
-    Name memberName = new Name(name, _currentFrame.member.library);
+    Name memberName = Name(name, _currentFrame.member.library);
     Selector selector;
     switch (kind) {
       case invocationMirrorGetterKind:
-        selector = new Selector.getter(memberName);
+        selector = Selector.getter(memberName);
         break;
       case invocationMirrorSetterKind:
-        selector = new Selector.setter(memberName);
+        selector = Selector.setter(memberName);
         break;
       case invocationMirrorMethodKind:
         if (memberName == Names.INDEX_NAME) {
-          selector = new Selector.index();
+          selector = Selector.index();
         } else if (memberName == Names.INDEX_SET_NAME) {
-          selector = new Selector.indexSet();
+          selector = Selector.indexSet();
         } else {
           if (namedArgumentsLiteral is ir.MapLiteral) {
             namedArgumentsLiteral.entries.forEach((ir.MapLiteralEntry entry) {
@@ -4269,8 +4255,7 @@
             ir.MapConstant constant = namedArgumentsLiteral.constant;
             for (ir.ConstantMapEntry entry in constant.entries) {
               ir.StringConstant key = entry.key;
-              namedArguments[key.value] =
-                  new ir.ConstantExpression(entry.value);
+              namedArguments[key.value] = ir.ConstantExpression(entry.value);
             }
           } else {
             reporter.internalError(
@@ -4278,15 +4263,15 @@
                 "Unexpected named arguments value in createInvocationMirrror: "
                 "${namedArgumentsLiteral}.");
           }
-          CallStructure callStructure = new CallStructure(
+          CallStructure callStructure = CallStructure(
               positionalArgumentsLiteral.expressions.length,
               namedArguments.keys.toList(),
               typeArguments.length);
           if (Selector.isOperatorName(name)) {
             selector =
-                new Selector(SelectorKind.OPERATOR, memberName, callStructure);
+                Selector(SelectorKind.OPERATOR, memberName, callStructure);
           } else {
-            selector = new Selector.call(memberName, callStructure);
+            selector = Selector.call(memberName, callStructure);
           }
         }
         break;
@@ -4296,13 +4281,13 @@
         constant_system.createSymbol(closedWorld.commonElements, name),
         closedWorld);
 
-    List<HInstruction> arguments = <HInstruction>[];
+    List<HInstruction> arguments = [];
     for (ir.Expression argument in positionalArgumentsLiteral.expressions) {
       argument.accept(this);
       arguments.add(pop());
     }
     if (namedArguments.isNotEmpty) {
-      Map<String, HInstruction> namedValues = <String, HInstruction>{};
+      Map<String, HInstruction> namedValues = {};
       namedArguments.forEach((String name, ir.Expression value) {
         value.accept(this);
         namedValues[name] = pop();
@@ -4514,12 +4499,16 @@
 
   int _extractEnumIndexFromConstantValue(
       ConstantValue constant, ClassEntity classElement) {
-    if (constant is ConstructedConstantValue) {
-      if (constant.type.element == classElement) {
-        assert(constant.fields.length == 1 || constant.fields.length == 2);
-        ConstantValue indexConstant = constant.fields.values.first;
-        if (indexConstant is IntConstantValue) {
-          return indexConstant.intValue.toInt();
+    if (constant is ConstructedConstantValue &&
+        constant.type.element == classElement) {
+      assert(constant.fields.length >= 1);
+      for (var field in constant.fields.keys) {
+        if (field.memberName.text == "index") {
+          ConstantValue indexConstant = constant.fields[field];
+          if (indexConstant is IntConstantValue) {
+            return indexConstant.intValue.toInt();
+          }
+          break;
         }
       }
     }
@@ -4556,7 +4545,7 @@
 
     AbstractValue ssaType =
         _typeInferenceMap.typeFromNativeBehavior(nativeBehavior, closedWorld);
-    push(new HForeignCode(expr, ssaType, const <HInstruction>[],
+    push(HForeignCode(expr, ssaType, const <HInstruction>[],
         nativeBehavior: nativeBehavior));
   }
 
@@ -4587,7 +4576,7 @@
       return;
     }
 
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     for (ir.Expression argument in arguments.skip(2)) {
       argument.accept(this);
       inputs.add(pop());
@@ -4602,7 +4591,7 @@
 
     AbstractValue ssaType =
         _typeInferenceMap.typeFromNativeBehavior(nativeBehavior, closedWorld);
-    push(new HForeignCode(template, ssaType, inputs,
+    push(HForeignCode(template, ssaType, inputs,
         nativeBehavior: nativeBehavior));
   }
 
@@ -4689,7 +4678,7 @@
         InterfaceType type =
             argumentConstant.representedType.withoutNullability;
         // TODO(sra): Check that type is a subclass of [Interceptor].
-        ConstantValue constant = new InterceptorConstantValue(type.element);
+        ConstantValue constant = InterceptorConstantValue(type.element);
         HInstruction instruction = graph.addConstant(constant, closedWorld);
         stack.add(instruction);
         return;
@@ -4760,7 +4749,7 @@
         failedAt(_elementMap.getSpannable(targetElement, invocation),
             "No NativeBehavior for $invocation"));
 
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     for (ir.Expression argument in invocation.arguments.positional.skip(2)) {
       argument.accept(this);
       inputs.add(pop());
@@ -4788,7 +4777,7 @@
         _typeInferenceMap.typeFromNativeBehavior(nativeBehavior, closedWorld);
 
     SourceInformation sourceInformation = null;
-    HInstruction code = new HForeignCode(
+    HInstruction code = HForeignCode(
         nativeBehavior.codeTemplate, ssaType, inputs,
         isStatement: !nativeBehavior.codeTemplate.isExpression,
         effects: nativeBehavior.sideEffects,
@@ -4823,7 +4812,7 @@
         closedWorld.dartTypes
             .isNonNullableIfSound(_getStaticType(invocation).type)) {
       HInstruction code = pop();
-      push(new HNullCheck(
+      push(HNullCheck(
           code, _abstractValueDomain.excludeNull(code.instructionType),
           sticky: true));
     }
@@ -4837,8 +4826,7 @@
       return;
     }
     List<HInstruction> inputs = _visitPositionalArguments(invocation.arguments);
-    push(new HStringConcat(
-        inputs[0], inputs[1], _abstractValueDomain.stringType));
+    push(HStringConcat(inputs[0], inputs[1], _abstractValueDomain.stringType));
   }
 
   void _handleForeignTypeRef(ir.StaticInvocation invocation) {
@@ -4903,14 +4891,14 @@
       return;
     }
 
-    HInvokeStatic instruction = new HInvokeStatic(
+    HInvokeStatic instruction = HInvokeStatic(
         target, arguments, typeMask, typeArguments,
         targetCanThrow: !_inferredData.getCannotThrow(target))
       ..sourceInformation = sourceInformation;
 
     if (_currentImplicitInstantiations.isNotEmpty) {
       instruction.instantiatedTypes =
-          new List<InterfaceType>.from(_currentImplicitInstantiations);
+          List<InterfaceType>.from(_currentImplicitInstantiations);
     }
     instruction.sideEffects = _inferredData.getSideEffectsOfElement(target);
     push(instruction);
@@ -4980,7 +4968,7 @@
     }
 
     HInstruction receiver = arguments.first;
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
 
     selector ??= _elementMap.getSelector(node);
 
@@ -5032,8 +5020,8 @@
       ConstructorEntity constructor = element;
       int i = 0;
       int positions = 0;
-      var filteredArguments = <HInstruction>[];
-      var parameterNameMap = new Map<String, js.Expression>();
+      List<HInstruction> filteredArguments = [];
+      Map<String, js.Expression> parameterNameMap = {};
 
       // Note: we don't use `constructor.parameterStructure` here because
       // we don't elide parameters to js-interop external static targets
@@ -5052,17 +5040,16 @@
         if (argument != null) {
           filteredArguments.add(argument);
           var jsName = _nativeData.computeUnescapedJSInteropName(parameterName);
-          parameterNameMap[jsName] = new js.InterpolatedExpression(positions++);
+          parameterNameMap[jsName] = js.InterpolatedExpression(positions++);
         }
         i++;
       }
-      var codeTemplate =
-          new js.Template(null, js.objectLiteral(parameterNameMap));
+      var codeTemplate = js.Template(null, js.objectLiteral(parameterNameMap));
 
-      var nativeBehavior = new NativeBehavior()..codeTemplate = codeTemplate;
+      var nativeBehavior = NativeBehavior()..codeTemplate = codeTemplate;
       registry.registerNativeMethod(element);
       // TODO(efortuna): Source information.
-      return new HForeignCode(
+      return HForeignCode(
           codeTemplate, _abstractValueDomain.dynamicType, filteredArguments,
           nativeBehavior: nativeBehavior);
     }
@@ -5073,7 +5060,7 @@
     // the factory constructor case.
     List<HInstruction> inputs = arguments.where((arg) => arg != null).toList();
 
-    var nativeBehavior = new NativeBehavior()..sideEffects.setAllSideEffects();
+    var nativeBehavior = NativeBehavior()..sideEffects.setAllSideEffects();
 
     DartType type = element is ConstructorEntity
         ? _elementEnvironment.getThisType(element.enclosingClass)
@@ -5114,7 +5101,7 @@
         _closureDataLookup.getClosureInfo(node.parent);
     ClassEntity closureClassEntity = closureInfo.closureClassEntity;
 
-    List<HInstruction> capturedVariables = <HInstruction>[];
+    List<HInstruction> capturedVariables = [];
     _elementEnvironment.forEachInstanceField(closureClassEntity,
         (_, FieldEntity field) {
       if (_fieldAnalysis.getFieldData(field).isElided) return;
@@ -5125,8 +5112,7 @@
     AbstractValue type =
         _abstractValueDomain.createNonNullExact(closureClassEntity);
     // TODO(efortuna): Add source information here.
-    push(new HCreate(
-        closureClassEntity, capturedVariables, type, sourceInformation,
+    push(HCreate(closureClassEntity, capturedVariables, type, sourceInformation,
         callMethod: closureInfo.callMethod));
   }
 
@@ -5145,7 +5131,7 @@
 
   @override
   void visitInstantiation(ir.Instantiation node) {
-    var arguments = <HInstruction>[];
+    List<HInstruction> arguments = [];
     node.expression.accept(this);
     arguments.add(pop());
     StaticType expressionType = _getStaticType(node.expression);
@@ -5158,7 +5144,7 @@
             : _commonElements.dynamicType)
         .toList();
     registry.registerGenericInstantiation(
-        new GenericInstantiation(functionType, typeArguments));
+        GenericInstantiation(functionType, typeArguments));
     // TODO(johnniwinther): Can we avoid creating the instantiation object?
     for (DartType type in typeArguments) {
       HInstruction instruction =
@@ -5177,7 +5163,7 @@
       stack.add(graph.addConstantNull(closedWorld));
       return;
     }
-    HInstruction instruction = new HInvokeStatic(
+    HInstruction instruction = HInvokeStatic(
         target, arguments, _abstractValueDomain.functionType, <DartType>[],
         targetCanThrow: targetCanThrow);
     // TODO(sra): ..sourceInformation = sourceInformation
@@ -5193,16 +5179,17 @@
     receiver.accept(this);
     HInstruction receiverInstruction = pop();
     Selector selector = _elementMap.getSelector(node);
-    List<DartType> typeArguments = <DartType>[];
+    List<DartType> typeArguments = [];
     selector = _fillDynamicTypeArguments(selector, arguments, typeArguments);
     _pushDynamicInvocation(
         node,
         _getStaticType(receiver),
         _typeInferenceMap.receiverTypeOfInvocation(node, _abstractValueDomain),
         selector,
-        <HInstruction>[receiverInstruction]..addAll(
-            _visitArgumentsForDynamicTarget(
-                selector, arguments, typeArguments)),
+        [
+          receiverInstruction,
+          ..._visitArgumentsForDynamicTarget(selector, arguments, typeArguments)
+        ],
         typeArguments,
         _sourceInformationBuilder.buildCall(receiver, node));
   }
@@ -5259,7 +5246,7 @@
         _getStaticType(left),
         _typeInferenceMap.receiverTypeOfInvocation(node, _abstractValueDomain),
         Selectors.equals,
-        <HInstruction>[leftInstruction, rightInstruction],
+        [leftInstruction, rightInstruction],
         const <DartType>[],
         _sourceInformationBuilder.buildCall(left, node));
   }
@@ -5284,7 +5271,7 @@
   HInterceptor _interceptorFor(
       HInstruction intercepted, SourceInformation sourceInformation) {
     HInterceptor interceptor =
-        new HInterceptor(intercepted, _abstractValueDomain.nonNullType)
+        HInterceptor(intercepted, _abstractValueDomain.nonNullType)
           ..sourceInformation = sourceInformation;
     add(interceptor);
     return interceptor;
@@ -5317,7 +5304,7 @@
     var argumentsInstruction = _buildLiteralList(arguments);
     add(argumentsInstruction);
 
-    var argumentNames = <HInstruction>[];
+    List<HInstruction> argumentNames = [];
     for (String argumentName in selector.namedArguments) {
       ConstantValue argumentNameConstant =
           constant_system.createString(argumentName);
@@ -5344,7 +5331,7 @@
         sourceInformation: sourceInformation);
 
     _buildInvokeSuper(Selectors.noSuchMethod_, containingClass, noSuchMethod,
-        <HInstruction>[pop()], typeArguments, sourceInformation);
+        [pop()], typeArguments, sourceInformation);
   }
 
   HInstruction _buildInvokeSuper(
@@ -5357,7 +5344,7 @@
     HInstruction receiver =
         localsHandler.readThis(sourceInformation: sourceInformation);
 
-    List<HInstruction> inputs = <HInstruction>[];
+    List<HInstruction> inputs = [];
     bool isIntercepted =
         closedWorld.interceptorData.isInterceptedSelector(selector);
     if (isIntercepted) {
@@ -5373,15 +5360,8 @@
     } else {
       typeMask = _abstractValueDomain.dynamicType;
     }
-    HInstruction instruction = new HInvokeSuper(
-        target,
-        containingClass,
-        selector,
-        inputs,
-        isIntercepted,
-        typeMask,
-        typeArguments,
-        sourceInformation,
+    HInstruction instruction = HInvokeSuper(target, containingClass, selector,
+        inputs, isIntercepted, typeMask, typeArguments, sourceInformation,
         isSetter: selector.isSetter || selector.isIndexSet);
     instruction.sideEffects =
         _inferredData.getSideEffectsOfSelector(selector, null);
@@ -5471,13 +5451,13 @@
     HInstruction methodNameInstruction =
         graph.addConstantString(methodName, closedWorld);
     FunctionEntity element = _commonElements.checkTypeBound;
-    var inputs = <HInstruction>[
+    List<HInstruction> inputs = [
       typeInstruction,
       boundInstruction,
       variableNameInstruction,
       methodNameInstruction,
     ];
-    HInstruction checkBound = new HInvokeStatic(
+    HInstruction checkBound = HInvokeStatic(
         element, inputs, typeInstruction.instructionType, const <DartType>[]);
     add(checkBound);
   }
@@ -5502,7 +5482,7 @@
         target.enclosingClass, node.arguments.types);
     instanceType = localsHandler.substInContext(instanceType);
 
-    List<HInstruction> arguments = <HInstruction>[];
+    List<HInstruction> arguments = [];
     if (constructor.isGenerativeConstructor &&
         _nativeData.isNativeOrExtendsNative(constructor.enclosingClass) &&
         !_nativeData.isJsInteropMember(constructor)) {
@@ -5571,8 +5551,7 @@
       SourceInformation sourceInformation =
           _sourceInformationBuilder.buildThrow(node);
       _handleInTryStatement();
-      push(
-          new HThrowExpression(_abstractValueDomain, pop(), sourceInformation));
+      push(HThrowExpression(_abstractValueDomain, pop(), sourceInformation));
       _isReachable = false;
     }
   }
@@ -5590,7 +5569,7 @@
   @override
   void visitYieldStatement(ir.YieldStatement node) {
     node.expression.accept(this);
-    add(new HYield(_abstractValueDomain, pop(), node.isYieldStar,
+    add(HYield(_abstractValueDomain, pop(), node.isYieldStar,
         _sourceInformationBuilder.buildYield(node)));
   }
 
@@ -5599,7 +5578,7 @@
     node.operand.accept(this);
     HInstruction awaited = pop();
     // TODO(herhut): Improve this type.
-    push(new HAwait(awaited, _abstractValueDomain.dynamicType)
+    push(HAwait(awaited, _abstractValueDomain.dynamicType)
       ..sourceInformation = _sourceInformationBuilder.buildAwait(node));
   }
 
@@ -5614,8 +5593,7 @@
     _handleInTryStatement();
     SourceInformation sourceInformation =
         _sourceInformationBuilder.buildThrow(node);
-    _closeAndGotoExit(new HThrow(
-        _abstractValueDomain, exception, sourceInformation,
+    _closeAndGotoExit(HThrow(_abstractValueDomain, exception, sourceInformation,
         isRethrow: true));
     // ir.Rethrow is an expression so we need to push a value - a constant with
     // no type.
@@ -5631,21 +5609,21 @@
   @override
   void visitNot(ir.Not node) {
     node.operand.accept(this);
-    push(new HNot(popBoolified(), _abstractValueDomain.boolType)
+    push(HNot(popBoolified(), _abstractValueDomain.boolType)
       ..sourceInformation = _sourceInformationBuilder.buildUnary(node));
   }
 
   @override
   void visitStringConcatenation(ir.StringConcatenation stringConcat) {
-    KernelStringBuilder stringBuilder = new KernelStringBuilder(this);
+    KernelStringBuilder stringBuilder = KernelStringBuilder(this);
     stringConcat.accept(stringBuilder);
     stack.add(stringBuilder.result);
   }
 
   @override
   void visitTryCatch(ir.TryCatch node) {
-    TryCatchFinallyBuilder tryBuilder = new TryCatchFinallyBuilder(
-        this, _sourceInformationBuilder.buildTry(node));
+    TryCatchFinallyBuilder tryBuilder =
+        TryCatchFinallyBuilder(this, _sourceInformationBuilder.buildTry(node));
     node.body.accept(this);
     tryBuilder
       ..closeTryBody()
@@ -5663,8 +5641,8 @@
   /// recursion.
   @override
   void visitTryFinally(ir.TryFinally node) {
-    TryCatchFinallyBuilder tryBuilder = new TryCatchFinallyBuilder(
-        this, _sourceInformationBuilder.buildTry(node));
+    TryCatchFinallyBuilder tryBuilder =
+        TryCatchFinallyBuilder(this, _sourceInformationBuilder.buildTry(node));
 
     // We do these shenanigans to produce better looking code that doesn't
     // have nested try statements.
@@ -5878,12 +5856,12 @@
     void doInlining() {
       if (function.isConstructor) {
         registry.registerStaticUse(
-            new StaticUse.constructorInlining(function, instanceType));
+            StaticUse.constructorInlining(function, instanceType));
       } else {
         assert(instanceType == null,
             "Unexpected instance type for $function: $instanceType");
         registry.registerStaticUse(
-            new StaticUse.methodInlining(function, typeArguments));
+            StaticUse.methodInlining(function, typeArguments));
       }
 
       // Add an explicit null check on the receiver before doing the inlining.
@@ -5968,7 +5946,7 @@
     ParameterStructure parameterStructure = function.parameterStructure;
     List<String> selectorArgumentNames =
         selector.callStructure.getOrderedNamedArguments();
-    List<HInstruction> compiledArguments = new List<HInstruction>.filled(
+    List<HInstruction> compiledArguments = List<HInstruction>.filled(
         parameterStructure.totalParameters +
             parameterStructure.typeParameters +
             1,
@@ -6061,7 +6039,7 @@
   /// [SsaGraphBuilder].
   void _enterInlinedMethod(FunctionEntity function,
       List<HInstruction> compiledArguments, InterfaceType instanceType) {
-    KernelInliningState state = new KernelInliningState(
+    KernelInliningState state = KernelInliningState(
         function,
         _returnLocal,
         _returnType,
@@ -6087,7 +6065,7 @@
   /// stores it in the [_returnLocal] field.
   void _setupStateForInlining(FunctionEntity function,
       List<HInstruction> compiledArguments, InterfaceType instanceType) {
-    localsHandler = new LocalsHandler(
+    localsHandler = LocalsHandler(
         this,
         function,
         function,
@@ -6099,7 +6077,7 @@
     CapturedScope scopeData = _closureDataLookup.getCapturedScope(function);
     bool forGenerativeConstructorBody = function is ConstructorBodyEntity;
 
-    _returnLocal = new SyntheticLocal("result", function, function);
+    _returnLocal = SyntheticLocal("result", function, function);
     localsHandler.updateLocal(_returnLocal, graph.addConstantNull(closedWorld));
 
     _inTryStatement = false; // TODO(lry): why? Document.
@@ -6330,25 +6308,21 @@
     String name = "${n(element.library)}:${n(element.enclosingClass)}."
         "${n(element)}";
     HConstant nameConstant = graph.addConstantString(name, closedWorld);
-    add(new HInvokeStatic(
-        _commonElements.traceHelper,
-        <HInstruction>[idConstant, nameConstant],
-        _abstractValueDomain.dynamicType,
-        const <DartType>[]));
+    add(HInvokeStatic(_commonElements.traceHelper, [idConstant, nameConstant],
+        _abstractValueDomain.dynamicType, const <DartType>[]));
   }
 }
 
 /// Data collected to create a constructor.
 class ConstructorData {
   /// Inlined (super) constructors.
-  final List<ir.Constructor> constructorChain = <ir.Constructor>[];
+  final List<ir.Constructor> constructorChain = [];
 
   /// Initial values for all instance fields.
-  final Map<FieldEntity, HInstruction> fieldValues =
-      <FieldEntity, HInstruction>{};
+  final Map<FieldEntity, HInstruction> fieldValues = {};
 
   /// Classes for which type variables have been prepared.
-  final Set<ClassEntity> includedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> includedClasses = {};
 }
 
 class KernelInliningState {
@@ -6409,8 +6383,8 @@
   LocalsHandler originalSavedLocals;
 
   TryCatchFinallyBuilder(this.kernelBuilder, this.trySourceInformation) {
-    tryInstruction = new HTry(kernelBuilder._abstractValueDomain);
-    originalSavedLocals = new LocalsHandler.from(kernelBuilder.localsHandler);
+    tryInstruction = HTry(kernelBuilder._abstractValueDomain);
+    originalSavedLocals = LocalsHandler.from(kernelBuilder.localsHandler);
     enterBlock = kernelBuilder.openNewBlock();
     kernelBuilder.close(tryInstruction);
     previouslyInTryStatement = kernelBuilder._inTryStatement;
@@ -6452,15 +6426,13 @@
     // The body has either the catch or the finally block as successor.
     if (endTryBlock != null) {
       assert(startCatchBlock != null || startFinallyBlock != null);
-      endTryBlock.addSuccessor(
-          startCatchBlock != null ? startCatchBlock : startFinallyBlock);
+      endTryBlock.addSuccessor(startCatchBlock ?? startFinallyBlock);
       endTryBlock.addSuccessor(exitBlock);
     }
 
     // The catch block has either the finally or the exit block as
     // successor.
-    endCatchBlock?.addSuccessor(
-        startFinallyBlock != null ? startFinallyBlock : exitBlock);
+    endCatchBlock?.addSuccessor(startFinallyBlock ?? exitBlock);
 
     // The finally block has the exit block as successor.
     endFinallyBlock?.addSuccessor(exitBlock);
@@ -6475,17 +6447,16 @@
   /// Build the finally{} clause of a try/{catch}/finally statement. Note this
   /// does not examine the body of the try clause, only the finally portion.
   void buildFinallyBlock(void buildFinalizer()) {
-    kernelBuilder.localsHandler = new LocalsHandler.from(originalSavedLocals);
+    kernelBuilder.localsHandler = LocalsHandler.from(originalSavedLocals);
     startFinallyBlock = kernelBuilder.graph.addNewBlock();
     kernelBuilder.open(startFinallyBlock);
     buildFinalizer();
     if (!kernelBuilder.isAborted()) {
       endFinallyBlock =
-          kernelBuilder.close(new HGoto(kernelBuilder._abstractValueDomain));
+          kernelBuilder.close(HGoto(kernelBuilder._abstractValueDomain));
     }
     tryInstruction.finallyBlock = startFinallyBlock;
-    finallyGraph =
-        new SubGraph(startFinallyBlock, kernelBuilder.lastOpenedBlock);
+    finallyGraph = SubGraph(startFinallyBlock, kernelBuilder.lastOpenedBlock);
   }
 
   void closeTryBody() {
@@ -6494,19 +6465,19 @@
     // the catch or finally block.
     if (!kernelBuilder.isAborted()) {
       endTryBlock =
-          kernelBuilder.close(new HExitTry(kernelBuilder._abstractValueDomain));
+          kernelBuilder.close(HExitTry(kernelBuilder._abstractValueDomain));
     }
-    bodyGraph = new SubGraph(startTryBlock, kernelBuilder.lastOpenedBlock);
+    bodyGraph = SubGraph(startTryBlock, kernelBuilder.lastOpenedBlock);
   }
 
   void buildCatch(ir.TryCatch tryCatch) {
-    kernelBuilder.localsHandler = new LocalsHandler.from(originalSavedLocals);
+    kernelBuilder.localsHandler = LocalsHandler.from(originalSavedLocals);
     startCatchBlock = kernelBuilder.graph.addNewBlock();
     kernelBuilder.open(startCatchBlock);
     // Note that the name of this local is irrelevant.
     SyntheticLocal local = kernelBuilder.localsHandler.createLocal('exception');
     exception =
-        new HLocalValue(local, kernelBuilder._abstractValueDomain.nonNullType)
+        HLocalValue(local, kernelBuilder._abstractValueDomain.nonNullType)
           ..sourceInformation = trySourceInformation;
     kernelBuilder.add(exception);
     HInstruction oldRethrowableException = kernelBuilder._rethrowableException;
@@ -6526,6 +6497,10 @@
         const <DartType>[],
         sourceInformation: trySourceInformation);
     HInvokeStatic unwrappedException = kernelBuilder.pop();
+    unwrappedException.sideEffects
+      ..clearAllDependencies()
+      ..clearAllSideEffects();
+    unwrappedException.targetCanThrow = false;
     tryInstruction.exception = exception;
     int catchesIndex = 0;
 
@@ -6566,7 +6541,7 @@
 
     void visitElse() {
       if (catchesIndex >= tryCatch.catches.length) {
-        kernelBuilder._closeAndGotoExit(new HThrow(
+        kernelBuilder._closeAndGotoExit(HThrow(
             kernelBuilder._abstractValueDomain,
             exception,
             exception.sourceInformation,
@@ -6595,12 +6570,12 @@
             kernelBuilder._sourceInformationBuilder.buildCatch(firstBlock));
     if (!kernelBuilder.isAborted()) {
       endCatchBlock =
-          kernelBuilder.close(new HGoto(kernelBuilder._abstractValueDomain));
+          kernelBuilder.close(HGoto(kernelBuilder._abstractValueDomain));
     }
 
     kernelBuilder._rethrowableException = oldRethrowableException;
     tryInstruction.catchBlock = startCatchBlock;
-    catchGraph = new SubGraph(startCatchBlock, kernelBuilder.lastOpenedBlock);
+    catchGraph = SubGraph(startCatchBlock, kernelBuilder.lastOpenedBlock);
   }
 
   void cleanUp() {
@@ -6612,7 +6587,7 @@
     kernelBuilder.localsHandler = originalSavedLocals;
     kernelBuilder.open(exitBlock);
     enterBlock.setBlockFlow(
-        new HTryBlockInformation(
+        HTryBlockInformation(
             kernelBuilder.wrapStatementGraph(bodyGraph),
             exception,
             kernelBuilder.wrapStatementGraph(catchGraph),
@@ -6623,7 +6598,7 @@
 }
 
 class KernelTypeBuilder extends TypeBuilder {
-  JsToElementMap _elementMap;
+  final JsToElementMap _elementMap;
 
   KernelTypeBuilder(KernelSsaGraphBuilder builder, this._elementMap)
       : super(builder);
@@ -6643,7 +6618,7 @@
 
   // TODO(30809): Use const constructor.
   static bool check(ir.Initializer initializer) =>
-      initializer.accept(new _ErroneousInitializerVisitor());
+      initializer.accept(_ErroneousInitializerVisitor());
 
   @override
   bool defaultInitializer(ir.Node node) => false;
@@ -6745,13 +6720,14 @@
       this.regularNodeCount,
       this.callCount});
 
-  bool canBeInlined({int maxInliningNodes, bool allowLoops: false}) {
+  bool canBeInlined({int maxInliningNodes, bool allowLoops = false}) {
     return cannotBeInlinedReason(
             maxInliningNodes: maxInliningNodes, allowLoops: allowLoops) ==
         null;
   }
 
-  String cannotBeInlinedReason({int maxInliningNodes, bool allowLoops: false}) {
+  String cannotBeInlinedReason(
+      {int maxInliningNodes, bool allowLoops = false}) {
     if (hasLoop && !allowLoops) {
       return 'loop';
     } else if (hasTry) {
@@ -6819,7 +6795,7 @@
 
   @override
   String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     sb.write('InlineData(');
     String comma = '';
     if (isConstructor) {
@@ -6905,9 +6881,9 @@
   final bool omitImplicitCasts;
 
   InlineDataCache(
-      {this.enableUserAssertions: false, this.omitImplicitCasts: false});
+      {this.enableUserAssertions = false, this.omitImplicitCasts = false});
 
-  Map<FunctionEntity, InlineData> _cache = {};
+  final Map<FunctionEntity, InlineData> _cache = {};
 
   InlineData getInlineData(JsToElementMap elementMap, FunctionEntity function) {
     return _cache[function] ??= InlineWeeder.computeInlineData(
@@ -6958,12 +6934,12 @@
   bool discountParameters = false;
 
   InlineWeeder(
-      {this.enableUserAssertions: false, this.omitImplicitCasts: false});
+      {this.enableUserAssertions = false, this.omitImplicitCasts = false});
 
   static InlineData computeInlineData(
       JsToElementMap elementMap, FunctionEntity function,
-      {bool enableUserAssertions: false, bool omitImplicitCasts: false}) {
-    InlineWeeder visitor = new InlineWeeder(
+      {bool enableUserAssertions = false, bool omitImplicitCasts = false}) {
+    InlineWeeder visitor = InlineWeeder(
         enableUserAssertions: enableUserAssertions,
         omitImplicitCasts: omitImplicitCasts);
     ir.FunctionNode node = getFunctionNode(elementMap, function);
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 8cf8ed8..e7ec92f 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -68,7 +68,7 @@
   js.Fun buildJavaScriptFunction(bool needsAsyncRewrite, FunctionEntity element,
       List<js.Parameter> parameters, js.Block body) {
     js.Fun finish(js.AsyncModifier asyncModifier) {
-      return new js.Fun(parameters, body, asyncModifier: asyncModifier)
+      return js.Fun(parameters, body, asyncModifier: asyncModifier)
           .withSourceInformation(sourceInformationStrategy
               .createBuilderForContext(element)
               .buildDeclaration(element));
@@ -129,7 +129,7 @@
           closedWorld,
           registry);
       codeGenerator.visitGraph(graph);
-      return new js.Fun(codeGenerator.parameters, codeGenerator.body)
+      return js.Fun(codeGenerator.parameters, codeGenerator.body)
           .withSourceInformation(sourceInformation);
     });
   }
@@ -223,17 +223,17 @@
   final CodegenRegistry _registry;
   final _CodegenMetrics _metrics;
 
-  final Set<HInstruction> generateAtUseSite;
-  final Set<HInstruction> controlFlowOperators;
-  final Set<JumpTarget> breakAction;
-  final Set<LabelDefinition> continueAction;
-  final Set<JumpTarget> implicitContinueAction;
-  final List<js.Parameter> parameters;
+  final Set<HInstruction> generateAtUseSite = {};
+  final Set<HInstruction> controlFlowOperators = {};
+  final Set<JumpTarget> breakAction = {};
+  final Set<LabelDefinition> continueAction = {};
+  final Set<JumpTarget> implicitContinueAction = {};
+  final List<js.Parameter> parameters = [];
 
-  js.Block currentContainer;
+  js.Block currentContainer = js.Block.empty();
   js.Block get body => currentContainer;
-  List<js.Expression> expressionStack;
-  List<js.Block> oldContainerStack;
+  List<js.Expression> expressionStack = [];
+  List<js.Block> oldContainerStack = [];
 
   /// Contains the names of the instructions, as well as the parallel
   /// copies to perform on block transitioning.
@@ -248,10 +248,10 @@
   /// Instead we declare them at the start of the function.  When minifying
   /// we do this most of the time, because it reduces the size unless there
   /// is only one variable.
-  final Set<String> collectedVariableDeclarations;
+  final Set<String> collectedVariableDeclarations = {};
 
   /// Set of variables and parameters that have already been declared.
-  final Set<String> declaredLocals;
+  final Set<String> declaredLocals = {};
 
   HGraph currentGraph;
 
@@ -275,19 +275,7 @@
       this._namer,
       this._tracer,
       this._closedWorld,
-      this._registry,
-      {SourceInformation sourceInformation})
-      : declaredLocals = new Set<String>(),
-        collectedVariableDeclarations = new Set<String>(),
-        currentContainer = new js.Block.empty(),
-        parameters = <js.Parameter>[],
-        expressionStack = <js.Expression>[],
-        oldContainerStack = <js.Block>[],
-        generateAtUseSite = new Set<HInstruction>(),
-        controlFlowOperators = new Set<HInstruction>(),
-        breakAction = new Set<JumpTarget>(),
-        continueAction = new Set<LabelDefinition>(),
-        implicitContinueAction = new Set<JumpTarget>();
+      this._registry);
 
   JCommonElements get _commonElements => _closedWorld.commonElements;
 
@@ -373,7 +361,7 @@
     if (bitWidth(instruction) <= 31) return false;
     // If the result of a bit-operation is only used by other bit
     // operations, we do not have to convert to an unsigned integer.
-    return hasNonBitOpUser(instruction, new Set<HPhi>());
+    return hasNonBitOpUser(instruction, Set<HPhi>());
   }
 
   /// If the [instruction] is not `null` it will be used to attach the position
@@ -391,7 +379,7 @@
   /// to the [expression].
   pushExpressionAsStatement(
       js.Expression expression, SourceInformation sourceInformation) {
-    pushStatement(new js.ExpressionStatement(expression)
+    pushStatement(js.ExpressionStatement(expression)
         .withSourceInformation(sourceInformation));
   }
 
@@ -414,18 +402,18 @@
       assert(graph.isValid(), 'Graph not valid after ${phase.name}');
     }
 
-    runPhase(new SsaInstructionSelection(_options, _closedWorld));
-    runPhase(new SsaTypeKnownRemover());
-    runPhase(new SsaTrustedCheckRemover(_options));
-    runPhase(new SsaAssignmentChaining(_closedWorld));
-    runPhase(new SsaInstructionMerger(_abstractValueDomain, generateAtUseSite));
-    runPhase(new SsaConditionMerger(generateAtUseSite, controlFlowOperators));
-    runPhase(new SsaShareRegionConstants());
+    runPhase(SsaInstructionSelection(_options, _closedWorld));
+    runPhase(SsaTypeKnownRemover());
+    runPhase(SsaTrustedCheckRemover(_options));
+    runPhase(SsaAssignmentChaining(_closedWorld));
+    runPhase(SsaInstructionMerger(_abstractValueDomain, generateAtUseSite));
+    runPhase(SsaConditionMerger(generateAtUseSite, controlFlowOperators));
+    runPhase(SsaShareRegionConstants());
 
     SsaLiveIntervalBuilder intervalBuilder =
-        new SsaLiveIntervalBuilder(generateAtUseSite, controlFlowOperators);
+        SsaLiveIntervalBuilder(generateAtUseSite, controlFlowOperators);
     runPhase(intervalBuilder, traceGraph: false);
-    SsaVariableAllocator allocator = new SsaVariableAllocator(
+    SsaVariableAllocator allocator = SsaVariableAllocator(
         _namer,
         intervalBuilder.liveInstructions,
         intervalBuilder.liveIntervals,
@@ -456,9 +444,9 @@
             js.Expression value = expression.value;
             if (_safeInInitializer(value) &&
                 collectedVariableDeclarations.remove(name)) {
-              var initialization = new js.VariableInitialization(
-                      new js.VariableDeclaration(name), value)
-                  .withSourceInformation(expression.sourceInformation);
+              var initialization =
+                  js.VariableInitialization(js.VariableDeclaration(name), value)
+                      .withSourceInformation(expression.sourceInformation);
               declarations.add(initialization);
               ++nextStatement;
               continue;
@@ -471,14 +459,14 @@
 
     List<js.VariableInitialization> uninitialized = [];
     for (String name in collectedVariableDeclarations) {
-      uninitialized.add(new js.VariableInitialization(
-          new js.VariableDeclaration(name), null));
+      uninitialized
+          .add(js.VariableInitialization(js.VariableDeclaration(name), null));
     }
     var declarationList =
-        new js.VariableDeclarationList(uninitialized + declarations)
+        js.VariableDeclarationList(uninitialized + declarations)
             .withSourceInformation(sourceInformation);
     statements.replaceRange(
-        0, nextStatement, [new js.ExpressionStatement(declarationList)]);
+        0, nextStatement, [js.ExpressionStatement(declarationList)]);
   }
 
   // An expression is safe to be pulled into a 'var' initializer if it does not
@@ -489,7 +477,7 @@
   visitGraph(HGraph graph) {
     preGenerateMethod(graph);
     currentGraph = graph;
-    visitSubGraph(new SubGraph(graph.entry, graph.exit));
+    visitSubGraph(SubGraph(graph.entry, graph.exit));
     handleDelayedVariableDeclarations(graph.sourceInformation);
   }
 
@@ -497,7 +485,7 @@
     SubGraph oldSubGraph = subGraph;
     Queue<HBasicBlock> oldBlockQueue = blockQueue;
     subGraph = newSubGraph;
-    blockQueue = new Queue<HBasicBlock>();
+    blockQueue = Queue<HBasicBlock>();
     enterSubGraph(subGraph.start);
     blockQueue = oldBlockQueue;
     subGraph = oldSubGraph;
@@ -586,7 +574,7 @@
   }
 
   js.Block generateStatementsInNewBlock(HBlockInformation block) {
-    js.Block result = new js.Block.empty();
+    js.Block result = js.Block.empty();
     js.Block oldContainer = currentContainer;
     currentContainer = result;
     generateStatements(block);
@@ -600,7 +588,7 @@
   /// If the block is empty, returns a new instance of [js.NOP].
   js.Statement unwrapStatement(js.Block block) {
     int len = block.statements.length;
-    if (len == 0) return new js.EmptyStatement();
+    if (len == 0) return js.EmptyStatement();
     if (len == 1) {
       js.Statement result = block.statements[0];
       if (result is js.Block) return unwrapStatement(result);
@@ -617,7 +605,7 @@
     bool oldIsGeneratingExpression = isGeneratingExpression;
     isGeneratingExpression = true;
     List<js.Expression> oldExpressionStack = expressionStack;
-    List<js.Expression> sequenceElements = <js.Expression>[];
+    List<js.Expression> sequenceElements = [];
     expressionStack = sequenceElements;
     HSubExpressionBlockInformation expressionSubGraph = expression;
     visitSubGraph(expressionSubGraph.subExpression);
@@ -631,7 +619,7 @@
     } else {
       js.Expression result = sequenceElements.removeLast();
       while (sequenceElements.isNotEmpty) {
-        result = new js.Binary(',', sequenceElements.removeLast(), result);
+        result = js.Binary(',', sequenceElements.removeLast(), result);
       }
       return result;
     }
@@ -639,10 +627,10 @@
 
   /// Only visits the arguments starting at inputs[HInvoke.ARGUMENTS_OFFSET].
   List<js.Expression> visitArguments(List<HInstruction> inputs,
-      {int start: HInvoke.ARGUMENTS_OFFSET}) {
+      {int start = HInvoke.ARGUMENTS_OFFSET}) {
     assert(inputs.length >= start);
     List<js.Expression> result =
-        new List<js.Expression>.filled(inputs.length - start, null);
+        List<js.Expression>.filled(inputs.length - start, null);
     for (int i = start; i < inputs.length; i++) {
       use(inputs[i]);
       result[i - start] = pop();
@@ -679,13 +667,13 @@
           if ((op == '+' || op == '-') &&
               right is js.LiteralNumber &&
               right.value == "1") {
-            return new js.Prefix(op == '+' ? '++' : '--', left);
+            return js.Prefix(op == '+' ? '++' : '--', left);
           }
-          return new js.Assignment.compound(binary.left, op, binary.right);
+          return js.Assignment.compound(binary.left, op, binary.right);
         }
       }
     }
-    return new js.Assignment(new js.VariableUse(variableName), value)
+    return js.Assignment(js.VariableUse(variableName), value)
         .withSourceInformation(value.sourceInformation ?? sourceInformation);
   }
 
@@ -706,14 +694,12 @@
       // It may be necessary to remove it from the ones to be declared later.
       collectedVariableDeclarations.remove(variableName);
       declaredLocals.add(variableName);
-      js.VariableDeclaration decl = new js.VariableDeclaration(variableName);
+      js.VariableDeclaration decl = js.VariableDeclaration(variableName);
       js.VariableInitialization initialization =
-          new js.VariableInitialization(decl, value);
+          js.VariableInitialization(decl, value);
 
       pushExpressionAsStatement(
-          new js.VariableDeclarationList(
-              <js.VariableInitialization>[initialization]),
-          sourceInformation);
+          js.VariableDeclarationList([initialization]), sourceInformation);
     } else {
       // Otherwise we are just going to use it.  If we have not already declared
       // it then we make sure we will declare it later.
@@ -818,15 +804,15 @@
   }
 
   void continueAsBreak(LabelDefinition target) {
-    pushStatement(new js.Break(_namer.continueLabelName(target)));
+    pushStatement(js.Break(_namer.continueLabelName(target)));
   }
 
   void implicitContinueAsBreak(JumpTarget target) {
-    pushStatement(new js.Break(_namer.implicitContinueLabelName(target)));
+    pushStatement(js.Break(_namer.implicitContinueLabelName(target)));
   }
 
   void implicitBreakWithLabel(JumpTarget target) {
-    pushStatement(new js.Break(_namer.implicitBreakLabelName(target)));
+    pushStatement(js.Break(_namer.implicitBreakLabelName(target)));
   }
 
   js.Statement wrapIntoLabels(
@@ -834,7 +820,7 @@
     for (LabelDefinition label in labels) {
       if (label.isTarget) {
         String breakLabelString = _namer.breakLabelName(label);
-        result = new js.LabeledStatement(breakLabelString, result);
+        result = js.LabeledStatement(breakLabelString, result);
       }
     }
     return result;
@@ -858,7 +844,7 @@
     }
     js.Expression key = pop();
     bool handledDefault = false;
-    List<js.SwitchClause> cases = <js.SwitchClause>[];
+    List<js.SwitchClause> cases = [];
     HSwitch switchInstruction = info.expression.end.last;
     List<HInstruction> inputs = switchInstruction.inputs;
     List<HBasicBlock> successors = switchInstruction.block.successors;
@@ -873,8 +859,8 @@
       if (successor.isLive) {
         do {
           visit(inputs[inputIndex]);
-          currentContainer = new js.Block.empty();
-          cases.add(new js.Case(pop(), currentContainer));
+          currentContainer = js.Block.empty();
+          cases.add(js.Case(pop(), currentContainer));
           inputIndex++;
         } while ((successors[inputIndex - 1] == successor) &&
             (inputIndex < inputs.length));
@@ -882,8 +868,8 @@
         // If this is the last statement, then these cases also belong to the
         // default block.
         if (statementIndex == info.statements.length - 1) {
-          currentContainer = new js.Block.empty();
-          cases.add(new js.Default(currentContainer));
+          currentContainer = js.Block.empty();
+          cases.add(js.Default(currentContainer));
           handledDefault = true;
         }
 
@@ -901,17 +887,17 @@
     // If the default case is dead, we omit it. Likewise, if it is an
     // empty block, we omit it, too.
     if (info.statements.last.start.isLive && !handledDefault) {
-      currentContainer = new js.Block.empty();
+      currentContainer = js.Block.empty();
       generateStatements(info.statements.last);
       if (currentContainer.statements.isNotEmpty) {
-        cases.add(new js.Default(currentContainer));
+        cases.add(js.Default(currentContainer));
       }
     }
 
     currentContainer = oldContainer;
 
     js.Statement result =
-        new js.Switch(key, cases).withSourceInformation(info.sourceInformation);
+        js.Switch(key, cases).withSourceInformation(info.sourceInformation);
     pushStatement(wrapIntoLabels(result, info.labels));
     return true;
   }
@@ -956,14 +942,14 @@
 
       HLocalValue exception = info.catchVariable;
       String name = variableNames.getName(exception);
-      js.VariableDeclaration decl = new js.VariableDeclaration(name);
+      js.VariableDeclaration decl = js.VariableDeclaration(name);
       js.Block catchBlock = generateStatementsInNewBlock(info.catchBlock);
-      catchPart = new js.Catch(decl, catchBlock);
+      catchPart = js.Catch(decl, catchBlock);
     }
     if (info.finallyBlock != null) {
       finallyPart = generateStatementsInNewBlock(info.finallyBlock);
     }
-    pushStatement(new js.Try(body, catchPart, finallyPart));
+    pushStatement(js.Try(body, catchPart, finallyPart));
     return true;
   }
 
@@ -1004,7 +990,7 @@
         // We inserted a basic block to avoid critical edges. This block is
         // part of the LoopBlockInformation and must therefore be handled here.
         js.Block oldContainer = currentContainer;
-        js.Block avoidContainer = new js.Block.empty();
+        js.Block avoidContainer = js.Block.empty();
         currentContainer = avoidContainer;
         assignPhisOfSuccessors(condition.end.successors.last);
         bool hasPhiUpdates = !avoidContainer.statements.isEmpty;
@@ -1035,7 +1021,7 @@
                   js.Assignment assignment = expression;
                   if (assignment.leftHandSide is js.VariableUse &&
                       !assignment.isCompound) {
-                    if (assignments == null) assignments = <js.Assignment>[];
+                    assignments ??= [];
                     assignments.add(expression);
                     return true;
                   }
@@ -1048,17 +1034,16 @@
               }
 
               if (allSimpleAssignments(jsInitialization)) {
-                List<js.VariableInitialization> inits =
-                    <js.VariableInitialization>[];
+                List<js.VariableInitialization> inits = [];
                 for (js.Assignment assignment in assignments) {
                   String id = (assignment.leftHandSide as js.VariableUse).name;
-                  js.Node declaration = new js.VariableDeclaration(id);
-                  inits.add(new js.VariableInitialization(
-                      declaration, assignment.value));
+                  js.Node declaration = js.VariableDeclaration(id);
+                  inits.add(
+                      js.VariableInitialization(declaration, assignment.value));
                   collectedVariableDeclarations.remove(id);
                   declaredLocals.add(id);
                 }
-                jsInitialization = new js.VariableDeclarationList(inits);
+                jsInitialization = js.VariableDeclarationList(inits);
               }
             }
           }
@@ -1069,12 +1054,12 @@
           // TODO(lrn): Remove this extra labeling when handling all loops
           // using subgraphs.
           oldContainer = currentContainer;
-          js.Statement body = new js.Block.empty();
+          js.Statement body = js.Block.empty();
           currentContainer = body;
           visitBodyIgnoreLabels(info);
           currentContainer = oldContainer;
           body = unwrapStatement(body);
-          loop = new js.For(jsInitialization, jsCondition, jsUpdates, body)
+          loop = js.For(jsInitialization, jsCondition, jsUpdates, body)
               .withSourceInformation(info.sourceInformation);
         } else {
           // We have either no update graph, or it's too complex to
@@ -1084,7 +1069,7 @@
           }
           js.Expression jsCondition;
           js.Block oldContainer = currentContainer;
-          js.Statement body = new js.Block.empty();
+          js.Statement body = js.Block.empty();
           if (isConditionExpression && !hasPhiUpdates) {
             jsCondition = generateExpression(condition);
             currentContainer = body;
@@ -1093,8 +1078,8 @@
             currentContainer = body;
             generateStatements(condition);
             use(condition.conditionExpression);
-            js.Expression ifTest = new js.Prefix("!", pop());
-            js.Statement jsBreak = new js.Break(null);
+            js.Expression ifTest = js.Prefix("!", pop());
+            js.Statement jsBreak = js.Break(null);
             js.Statement exitLoop;
             if (avoidContainer.statements.isEmpty) {
               exitLoop = jsBreak;
@@ -1102,7 +1087,7 @@
               avoidContainer.statements.add(jsBreak);
               exitLoop = avoidContainer;
             }
-            pushStatement(new js.If.noElse(ifTest, exitLoop));
+            pushStatement(js.If.noElse(ifTest, exitLoop));
           }
           if (info.updates != null) {
             wrapLoopBodyForContinue(info);
@@ -1112,7 +1097,7 @@
           }
           currentContainer = oldContainer;
           body = unwrapStatement(body);
-          loop = new js.While(jsCondition, body)
+          loop = js.While(jsCondition, body)
               .withSourceInformation(info.sourceInformation);
         }
         break;
@@ -1123,14 +1108,14 @@
         // We inserted a basic block to avoid critical edges. This block is
         // part of the LoopBlockInformation and must therefore be handled here.
         js.Block oldContainer = currentContainer;
-        js.Block exitAvoidContainer = new js.Block.empty();
+        js.Block exitAvoidContainer = js.Block.empty();
         currentContainer = exitAvoidContainer;
         assignPhisOfSuccessors(condition.end.successors.last);
         bool hasExitPhiUpdates = !exitAvoidContainer.statements.isEmpty;
         currentContainer = oldContainer;
 
         oldContainer = currentContainer;
-        js.Block body = new js.Block.empty();
+        js.Block body = js.Block.empty();
         // If there are phi copies in the block that jumps to the
         // loop entry, we must emit the condition like this:
         // do {
@@ -1143,7 +1128,7 @@
         //   }
         // } while (true);
         HBasicBlock avoidEdge = info.end.successors[0];
-        js.Block updateBody = new js.Block.empty();
+        js.Block updateBody = js.Block.empty();
         currentContainer = updateBody;
         assignPhisOfSuccessors(avoidEdge);
         bool hasPhiUpdates = !updateBody.statements.isEmpty;
@@ -1163,13 +1148,13 @@
           // If the condition is dead code, we turn the do-while into
           // a simpler while because we will never reach the condition
           // at the end of the loop anyway.
-          loop = new js.While(newLiteralBool(true, info.sourceInformation),
+          loop = js.While(newLiteralBool(true, info.sourceInformation),
                   unwrapStatement(body))
               .withSourceInformation(info.sourceInformation);
         } else {
           if (hasPhiUpdates || hasExitPhiUpdates) {
-            updateBody.statements.add(new js.Continue(null));
-            js.Statement jsBreak = new js.Break(null);
+            updateBody.statements.add(js.Continue(null));
+            js.Statement jsBreak = js.Break(null);
             js.Statement exitLoop;
             if (exitAvoidContainer.statements.isEmpty) {
               exitLoop = jsBreak;
@@ -1177,10 +1162,10 @@
               exitAvoidContainer.statements.add(jsBreak);
               exitLoop = exitAvoidContainer;
             }
-            body.statements.add(new js.If(jsCondition, updateBody, exitLoop));
+            body.statements.add(js.If(jsCondition, updateBody, exitLoop));
             jsCondition = newLiteralBool(true, info.sourceInformation);
           }
-          loop = new js.Do(unwrapStatement(body), jsCondition)
+          loop = js.Do(unwrapStatement(body), jsCondition)
               .withSourceInformation(info.sourceInformation);
         }
         currentContainer = oldContainer;
@@ -1193,7 +1178,7 @@
     if (info.kind == HLoopBlockInformation.SWITCH_CONTINUE_LOOP) {
       String continueLabelString =
           _namer.implicitContinueLabelName(info.target);
-      result = new js.LabeledStatement(continueLabelString, result);
+      result = js.LabeledStatement(continueLabelString, result);
     }
     pushStatement(wrapIntoLabels(result, info.labels));
     return true;
@@ -1204,7 +1189,7 @@
     Link<Entity> continueOverrides = const Link<Entity>();
 
     js.Block oldContainer = currentContainer;
-    js.Block body = new js.Block.empty();
+    js.Block body = js.Block.empty();
     js.Statement result = body;
 
     currentContainer = body;
@@ -1217,7 +1202,7 @@
       for (LabelDefinition label in labeledBlockInfo.labels) {
         if (label.isContinueTarget) {
           String labelName = _namer.continueLabelName(label);
-          result = new js.LabeledStatement(labelName, result);
+          result = js.LabeledStatement(labelName, result);
           continueAction.add(label);
           continueOverrides = continueOverrides.prepend(label);
         }
@@ -1227,14 +1212,14 @@
       // a target of an unlabeled continue, and not generate this if it isn't.
       JumpTarget target = labeledBlockInfo.target;
       String labelName = _namer.implicitContinueLabelName(target);
-      result = new js.LabeledStatement(labelName, result);
+      result = js.LabeledStatement(labelName, result);
       implicitContinueAction.add(target);
       continueOverrides = continueOverrides.prepend(target);
     } else {
       for (LabelDefinition label in labeledBlockInfo.labels) {
         if (label.isBreakTarget) {
           String labelName = _namer.breakLabelName(label);
-          result = new js.LabeledStatement(labelName, result);
+          result = js.LabeledStatement(labelName, result);
         }
       }
     }
@@ -1244,7 +1229,7 @@
       // as a nested if/else chain. We add an extra break target
       // so that case code can break.
       String labelName = _namer.implicitBreakLabelName(target);
-      result = new js.LabeledStatement(labelName, result);
+      result = js.LabeledStatement(labelName, result);
       breakAction.add(target);
     }
 
@@ -1272,18 +1257,18 @@
     JumpTarget target = info.target;
     if (target != null && target.isContinueTarget) {
       js.Block oldContainer = currentContainer;
-      js.Block body = new js.Block.empty();
+      js.Block body = js.Block.empty();
       currentContainer = body;
       js.Statement result = body;
       for (LabelDefinition label in info.labels) {
         if (label.isContinueTarget) {
           String labelName = _namer.continueLabelName(label);
-          result = new js.LabeledStatement(labelName, result);
+          result = js.LabeledStatement(labelName, result);
           continueAction.add(label);
         }
       }
       String labelName = _namer.implicitContinueLabelName(target);
-      result = new js.LabeledStatement(labelName, result);
+      result = js.LabeledStatement(labelName, result);
       implicitContinueAction.add(info.target);
       visitBodyIgnoreLabels(info);
       implicitContinueAction.remove(info.target);
@@ -1352,7 +1337,7 @@
 
   void emitAssignment(
       String destination, String source, SourceInformation sourceInformation) {
-    assignVariable(destination, new js.VariableUse(source), sourceInformation);
+    assignVariable(destination, js.VariableUse(source), sourceInformation);
   }
 
   /// Sequentialize a list of conceptually parallel copies. Parallel
@@ -1362,8 +1347,7 @@
       String tempName,
       void doAssignment(
           String target, String source, SourceInformation sourceInformation)) {
-    Map<String, SourceInformation> sourceInformationMap =
-        <String, SourceInformation>{};
+    Map<String, SourceInformation> sourceInformationMap = {};
 
     // Map the instructions to strings.
     Iterable<Copy<String>> copies =
@@ -1372,25 +1356,25 @@
       sourceInformationMap[sourceName] = copy.source.sourceInformation;
       String destinationName = variableNames.getName(copy.destination);
       sourceInformationMap[sourceName] = copy.destination.sourceInformation;
-      return new Copy<String>(sourceName, destinationName);
+      return Copy<String>(sourceName, destinationName);
     });
 
     // Map to keep track of the current location (ie the variable that
     // holds the initial value) of a variable.
-    Map<String, String> currentLocation = new Map<String, String>();
+    Map<String, String> currentLocation = {};
 
     // Map to keep track of the initial value of a variable.
-    Map<String, String> initialValue = new Map<String, String>();
+    Map<String, String> initialValue = {};
 
     // List of variables to assign a value.
-    List<String> worklist = <String>[];
+    List<String> worklist = [];
 
     // List of variables that we can assign a value to (ie are not
     // being used anymore).
-    List<String> ready = <String>[];
+    List<String> ready = [];
 
     // Prune [copies] by removing self-copies.
-    List<Copy<String>> prunedCopies = <Copy<String>>[];
+    List<Copy<String>> prunedCopies = [];
     for (Copy<String> copy in copies) {
       if (copy.source != copy.destination) {
         prunedCopies.add(copy);
@@ -1482,8 +1466,7 @@
     use(node.left);
     js.Expression jsLeft = pop();
     use(node.right);
-    push(new js.Binary(op, jsLeft, pop())
-        .withSourceInformation(sourceInformation));
+    push(js.Binary(op, jsLeft, pop()).withSourceInformation(sourceInformation));
   }
 
   @override
@@ -1504,15 +1487,14 @@
   visitBitInvokeBinary(HBinaryBitOp node, String op) {
     visitInvokeBinary(node, op);
     if (op != '>>>' && requiresUintConversion(node)) {
-      push(new js.Binary(">>>", pop(), new js.LiteralNumber("0"))
+      push(js.Binary(">>>", pop(), js.LiteralNumber("0"))
           .withSourceInformation(node.sourceInformation));
     }
   }
 
   visitInvokeUnary(HInvokeUnary node, String op) {
     use(node.operand);
-    push(
-        new js.Prefix(op, pop()).withSourceInformation(node.sourceInformation));
+    push(js.Prefix(op, pop()).withSourceInformation(node.sourceInformation));
   }
 
   // We want the outcome of bit-operations to be positive. We use the unsigned
@@ -1520,14 +1502,14 @@
   visitBitInvokeUnary(HInvokeUnary node, String op) {
     visitInvokeUnary(node, op);
     if (requiresUintConversion(node)) {
-      push(new js.Binary(">>>", pop(), new js.LiteralNumber("0"))
+      push(js.Binary(">>>", pop(), js.LiteralNumber("0"))
           .withSourceInformation(node.sourceInformation));
     }
   }
 
   void emitIdentityComparison(
       HIdentity instruction, SourceInformation sourceInformation,
-      {bool inverse: false}) {
+      {bool inverse = false}) {
     String op = instruction.singleComparisonOp;
     HInstruction left = instruction.left;
     HInstruction right = instruction.right;
@@ -1535,22 +1517,21 @@
       use(left);
       js.Expression jsLeft = pop();
       use(right);
-      push(new js.Binary(mapRelationalOperator(op, inverse), jsLeft, pop())
+      push(js.Binary(mapRelationalOperator(op, inverse), jsLeft, pop())
           .withSourceInformation(sourceInformation));
     } else {
       assert(NullConstantValue.JsNull == 'null');
       use(left);
-      js.Binary leftEqualsNull =
-          new js.Binary("==", pop(), new js.LiteralNull());
+      js.Binary leftEqualsNull = js.Binary("==", pop(), js.LiteralNull());
       use(right);
-      js.Binary rightEqualsNull = new js.Binary(
-          mapRelationalOperator("==", inverse), pop(), new js.LiteralNull());
+      js.Binary rightEqualsNull = js.Binary(
+          mapRelationalOperator("==", inverse), pop(), js.LiteralNull());
       use(right);
       use(left);
       js.Binary tripleEq =
-          new js.Binary(mapRelationalOperator("===", inverse), pop(), pop());
+          js.Binary(mapRelationalOperator("===", inverse), pop(), pop());
 
-      push(new js.Conditional(leftEqualsNull, rightEqualsNull, tripleEq)
+      push(js.Conditional(leftEqualsNull, rightEqualsNull, tripleEq)
           .withSourceInformation(sourceInformation));
     }
   }
@@ -1591,9 +1572,9 @@
     use(node.left);
     js.Expression jsLeft = pop();
     use(node.right);
-    push(new js.Binary('/', jsLeft, pop())
+    push(js.Binary('/', jsLeft, pop())
         .withSourceInformation(node.sourceInformation));
-    push(new js.Binary('|', pop(), new js.LiteralNumber("0"))
+    push(js.Binary('|', pop(), js.LiteralNumber("0"))
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -1669,7 +1650,7 @@
       if (breakAction.contains(label.target)) {
         implicitBreakWithLabel(label.target);
       } else {
-        pushStatement(new js.Break(_namer.breakLabelName(label))
+        pushStatement(js.Break(_namer.breakLabelName(label))
             .withSourceInformation(node.sourceInformation));
       }
     } else {
@@ -1678,11 +1659,11 @@
         implicitBreakWithLabel(target);
       } else {
         if (node.breakSwitchContinueLoop) {
-          pushStatement(new js.Break(_namer.implicitContinueLabelName(target))
+          pushStatement(js.Break(_namer.implicitContinueLabelName(target))
               .withSourceInformation(node.sourceInformation));
         } else {
           pushStatement(
-              new js.Break(null).withSourceInformation(node.sourceInformation));
+              js.Break(null).withSourceInformation(node.sourceInformation));
         }
       }
     }
@@ -1697,7 +1678,7 @@
         continueAsBreak(label);
       } else {
         // TODO(floitsch): should this really be the breakLabelName?
-        pushStatement(new js.Continue(_namer.breakLabelName(label))
+        pushStatement(js.Continue(_namer.breakLabelName(label))
             .withSourceInformation(node.sourceInformation));
       }
     } else {
@@ -1706,12 +1687,11 @@
         implicitContinueAsBreak(target);
       } else {
         if (target.isSwitch) {
-          pushStatement(
-              new js.Continue(_namer.implicitContinueLabelName(target))
-                  .withSourceInformation(node.sourceInformation));
-        } else {
-          pushStatement(new js.Continue(null)
+          pushStatement(js.Continue(_namer.implicitContinueLabelName(target))
               .withSourceInformation(node.sourceInformation));
+        } else {
+          pushStatement(
+              js.Continue(null).withSourceInformation(node.sourceInformation));
         }
       }
     }
@@ -1883,7 +1863,7 @@
       js.Name name = _namer.nameForGetInterceptor(node.interceptedClasses);
       js.Expression isolate = _namer.readGlobalObjectForInterceptors();
       use(node.receiver);
-      List<js.Expression> arguments = <js.Expression>[pop()];
+      List<js.Expression> arguments = [pop()];
       push(js
           .propertyCall(isolate, name, arguments)
           .withSourceInformation(node.sourceInformation));
@@ -1936,8 +1916,8 @@
     push(js
         .propertyCall(object, methodName, arguments)
         .withSourceInformation(node.sourceInformation));
-    _registry.registerStaticUse(new StaticUse.constructorBodyInvoke(
-        node.element, new CallStructure.unnamed(arguments.length)));
+    _registry.registerStaticUse(StaticUse.constructorBodyInvoke(
+        node.element, CallStructure.unnamed(arguments.length)));
   }
 
   @override
@@ -1954,12 +1934,11 @@
     } else {
       push(_emitter.staticFunctionAccess(element));
       List<js.Expression> arguments = visitArguments(node.inputs, start: 0);
-      push(new js.Call(pop(), arguments,
-          sourceInformation: node.sourceInformation));
+      push(
+          js.Call(pop(), arguments, sourceInformation: node.sourceInformation));
     }
 
-    _registry
-        .registerStaticUse(new StaticUse.generatorBodyInvoke(node.element));
+    _registry.registerStaticUse(StaticUse.generatorBodyInvoke(node.element));
   }
 
   @override
@@ -2028,9 +2007,8 @@
       // TODO(kasperl): If we have a typed selector for the call, we
       // may know something about the types of closures that need
       // the specific closure call method.
-      Selector call = new Selector.callClosureFrom(selector);
-      _registry
-          .registerDynamicUse(new DynamicUse(call, null, node.typeArguments));
+      Selector call = Selector.callClosureFrom(selector);
+      _registry.registerDynamicUse(DynamicUse(call, null, node.typeArguments));
     }
     if (target != null) {
       // This is a dynamic invocation which we have found to have a single
@@ -2041,29 +2019,29 @@
           failedAt(node, '$selector does not apply to $target'));
       assert(!selector.isGetter && !selector.isSetter,
           "Unexpected direct invocation selector: $selector.");
-      _registry.registerStaticUse(new StaticUse.directInvoke(
+      _registry.registerStaticUse(StaticUse.directInvoke(
           target, selector.callStructure, node.typeArguments));
     } else {
       AbstractValue mask =
           getOptimizedSelectorFor(node, selector, node.receiverType);
-      _registry.registerDynamicUse(
-          new DynamicUse(selector, mask, node.typeArguments));
+      _registry
+          .registerDynamicUse(DynamicUse(selector, mask, node.typeArguments));
     }
   }
 
-  void registerSetter(HInvokeDynamic node, {bool needsCheck: false}) {
+  void registerSetter(HInvokeDynamic node, {bool needsCheck = false}) {
     if (node.element is FieldEntity && !needsCheck) {
       // This is a dynamic update which we have found to have a single
       // target but for some reason haven't inlined. We are _still_ accessing
       // the target dynamically but we don't need to enqueue more than target
       // for this to work.
-      _registry.registerStaticUse(new StaticUse.directSet(node.element));
+      _registry.registerStaticUse(StaticUse.directSet(node.element));
     } else {
       Selector selector = node.selector;
       AbstractValue mask =
           getOptimizedSelectorFor(node, selector, node.receiverType);
-      _registry.registerDynamicUse(
-          new DynamicUse(selector, mask, node.typeArguments));
+      _registry
+          .registerDynamicUse(DynamicUse(selector, mask, node.typeArguments));
     }
   }
 
@@ -2075,13 +2053,13 @@
       // dynamically but we don't need to enqueue more than target for this to
       // work. The test above excludes non-getter functions since the element
       // represents two targets - a tearoff getter and the torn-off method.
-      _registry.registerStaticUse(new StaticUse.directGet(node.element));
+      _registry.registerStaticUse(StaticUse.directGet(node.element));
     } else {
       Selector selector = node.selector;
       AbstractValue mask =
           getOptimizedSelectorFor(node, selector, node.receiverType);
-      _registry.registerDynamicUse(
-          new DynamicUse(selector, mask, node.typeArguments));
+      _registry
+          .registerDynamicUse(DynamicUse(selector, mask, node.typeArguments));
     }
   }
 
@@ -2107,7 +2085,7 @@
 
   @override
   visitInvokeClosure(HInvokeClosure node) {
-    Selector call = new Selector.callClosureFrom(node.selector);
+    Selector call = Selector.callClosureFrom(node.selector);
     use(node.receiver);
     push(js
         .propertyCall(
@@ -2116,8 +2094,7 @@
     // TODO(kasperl): If we have a typed selector for the call, we
     // may know something about the types of closures that need
     // the specific closure call method.
-    _registry
-        .registerDynamicUse(new DynamicUse(call, null, node.typeArguments));
+    _registry.registerDynamicUse(DynamicUse(call, null, node.typeArguments));
   }
 
   @override
@@ -2143,7 +2120,7 @@
       FunctionEntity throwFunction =
           _commonElements.throwConcurrentModificationError;
       _registry.registerStaticUse(
-          new StaticUse.staticInvoke(throwFunction, CallStructure.ONE_ARG));
+          StaticUse.staticInvoke(throwFunction, CallStructure.ONE_ARG));
 
       // Calling using `(0, #)(#)` instead of `#(#)` separates the property load
       // of the static function access from the call.  For some reason this
@@ -2164,24 +2141,24 @@
     } else {
       StaticUse staticUse;
       if (element.isConstructor) {
-        CallStructure callStructure = new CallStructure.unnamed(
-            arguments.length, node.typeArguments.length);
-        staticUse = new StaticUse.constructorInvoke(element, callStructure);
+        CallStructure callStructure =
+            CallStructure.unnamed(arguments.length, node.typeArguments.length);
+        staticUse = StaticUse.constructorInvoke(element, callStructure);
       } else if (element.isGetter) {
-        staticUse = new StaticUse.staticGet(element);
+        staticUse = StaticUse.staticGet(element);
       } else if (element.isSetter) {
-        staticUse = new StaticUse.staticSet(element);
+        staticUse = StaticUse.staticSet(element);
       } else {
         assert(element.isFunction);
-        CallStructure callStructure = new CallStructure.unnamed(
-            arguments.length, node.typeArguments.length);
-        staticUse = new StaticUse.staticInvoke(
-            element, callStructure, node.typeArguments);
+        CallStructure callStructure =
+            CallStructure.unnamed(arguments.length, node.typeArguments.length);
+        staticUse =
+            StaticUse.staticInvoke(element, callStructure, node.typeArguments);
       }
       _registry.registerStaticUse(staticUse);
       push(_emitter.staticFunctionAccess(element));
-      push(new js.Call(pop(), arguments,
-          sourceInformation: node.sourceInformation));
+      push(
+          js.Call(pop(), arguments, sourceInformation: node.sourceInformation));
     }
   }
 
@@ -2193,24 +2170,24 @@
     bool useAliasedSuper = canUseAliasedSuperMember(superElement, selector);
     if (selector.isGetter) {
       if (superElement.isField || superElement.isGetter) {
-        _registry.registerStaticUse(new StaticUse.superGet(superElement));
+        _registry.registerStaticUse(StaticUse.superGet(superElement));
       } else {
-        _registry.registerStaticUse(new StaticUse.superTearOff(node.element));
+        _registry.registerStaticUse(StaticUse.superTearOff(node.element));
       }
     } else if (selector.isSetter) {
       if (superElement.isField) {
-        _registry.registerStaticUse(new StaticUse.superFieldSet(superElement));
+        _registry.registerStaticUse(StaticUse.superFieldSet(superElement));
       } else {
         assert(superElement.isSetter);
-        _registry.registerStaticUse(new StaticUse.superSetterSet(superElement));
+        _registry.registerStaticUse(StaticUse.superSetterSet(superElement));
       }
     } else {
       if (useAliasedSuper) {
-        _registry.registerStaticUse(new StaticUse.superInvoke(
-            superElement, new CallStructure.unnamed(node.inputs.length)));
+        _registry.registerStaticUse(StaticUse.superInvoke(
+            superElement, CallStructure.unnamed(node.inputs.length)));
       } else {
-        _registry.registerStaticUse(new StaticUse.superInvoke(
-            superElement, new CallStructure.unnamed(node.inputs.length - 1)));
+        _registry.registerStaticUse(StaticUse.superInvoke(
+            superElement, CallStructure.unnamed(node.inputs.length - 1)));
       }
     }
 
@@ -2218,11 +2195,11 @@
       // TODO(sra): We can lower these in the simplifier.
       js.Name fieldName = _namer.instanceFieldPropertyName(superElement);
       use(node.getDartReceiver(_closedWorld));
-      js.PropertyAccess access = new js.PropertyAccess(pop(), fieldName)
+      js.PropertyAccess access = js.PropertyAccess(pop(), fieldName)
           .withSourceInformation(node.sourceInformation);
       if (node.isSetter) {
         use(node.value);
-        push(new js.Assignment(access, pop())
+        push(js.Assignment(access, pop())
             .withSourceInformation(node.sourceInformation));
       } else {
         push(access);
@@ -2235,9 +2212,9 @@
           // will be created, and that this tear-off must bypass ordinary
           // dispatch to ensure the super method is invoked.
           FunctionEntity helper = _commonElements.closureFromTearOff;
-          _registry.registerStaticUse(new StaticUse.staticInvoke(
+          _registry.registerStaticUse(StaticUse.staticInvoke(
               helper,
-              new CallStructure.unnamed(
+              CallStructure.unnamed(
                   node.inputs.length, node.typeArguments.length),
               node.typeArguments));
           methodName = _namer.invocationName(selector);
@@ -2279,13 +2256,13 @@
   @override
   visitFieldSet(HFieldSet node) {
     FieldEntity element = node.element;
-    _registry.registerStaticUse(new StaticUse.fieldSet(element));
+    _registry.registerStaticUse(StaticUse.fieldSet(element));
     js.Name name = _namer.instanceFieldPropertyName(element);
     use(node.receiver);
     js.Expression receiver = pop();
     use(node.value);
-    push(new js.Assignment(
-            new js.PropertyAccess(receiver, name)
+    push(js.Assignment(
+            js.PropertyAccess(receiver, name)
                 .withSourceInformation(node.sourceInformation),
             pop())
         .withSourceInformation(node.sourceInformation));
@@ -2294,27 +2271,27 @@
   @override
   visitGetLength(HGetLength node) {
     use(node.receiver);
-    push(new js.PropertyAccess.field(pop(), 'length')
+    push(js.PropertyAccess.field(pop(), 'length')
         .withSourceInformation(node.sourceInformation));
   }
 
   @override
   visitReadModifyWrite(HReadModifyWrite node) {
     FieldEntity element = node.element;
-    _registry.registerStaticUse(new StaticUse.fieldGet(element));
-    _registry.registerStaticUse(new StaticUse.fieldSet(element));
+    _registry.registerStaticUse(StaticUse.fieldGet(element));
+    _registry.registerStaticUse(StaticUse.fieldSet(element));
     js.Name name = _namer.instanceFieldPropertyName(element);
     use(node.receiver);
-    js.Expression fieldReference = new js.PropertyAccess(pop(), name);
+    js.Expression fieldReference = js.PropertyAccess(pop(), name);
     if (node.isPreOp) {
-      push(new js.Prefix(node.jsOp, fieldReference)
+      push(js.Prefix(node.jsOp, fieldReference)
           .withSourceInformation(node.sourceInformation));
     } else if (node.isPostOp) {
-      push(new js.Postfix(node.jsOp, fieldReference)
+      push(js.Postfix(node.jsOp, fieldReference)
           .withSourceInformation(node.sourceInformation));
     } else {
       use(node.value);
-      push(new js.Assignment.compound(fieldReference, node.jsOp, pop())
+      push(js.Assignment.compound(fieldReference, node.jsOp, pop())
           .withSourceInformation(node.sourceInformation));
     }
   }
@@ -2430,7 +2407,7 @@
   visitForeignCode(HForeignCode node) {
     List<HInstruction> inputs = node.inputs;
     if (node.isJsStatement()) {
-      List<js.Expression> interpolatedExpressions = <js.Expression>[];
+      List<js.Expression> interpolatedExpressions = [];
       for (int i = 0; i < inputs.length; i++) {
         use(inputs[i]);
         interpolatedExpressions.add(pop());
@@ -2439,7 +2416,7 @@
           .instantiate(interpolatedExpressions)
           .withSourceInformation(node.sourceInformation));
     } else {
-      List<js.Expression> interpolatedExpressions = <js.Expression>[];
+      List<js.Expression> interpolatedExpressions = [];
       for (int i = 0; i < inputs.length; i++) {
         use(inputs[i]);
         interpolatedExpressions.add(pop());
@@ -2457,7 +2434,7 @@
   visitCreate(HCreate node) {
     js.Expression jsClassReference = _emitter.constructorAccess(node.element);
     List<js.Expression> arguments = visitArguments(node.inputs, start: 0);
-    push(new js.New(jsClassReference, arguments)
+    push(js.New(jsClassReference, arguments)
         .withSourceInformation(node.sourceInformation));
     // We also use HCreate to instantiate closure classes that belong to
     // function expressions. We have to register their use here, as otherwise
@@ -2469,25 +2446,24 @@
     }
     node.instantiatedTypes?.forEach(_registry.registerInstantiation);
     if (node.callMethod != null) {
-      _registry
-          ?.registerStaticUse(new StaticUse.implicitInvoke(node.callMethod));
+      _registry?.registerStaticUse(StaticUse.implicitInvoke(node.callMethod));
       _registry?.registerInstantiatedClosure(node.callMethod);
     }
   }
 
   @override
   visitCreateBox(HCreateBox node) {
-    push(new js.ObjectInitializer(<js.Property>[]));
+    push(js.ObjectInitializer([]));
   }
 
   js.Expression newLiteralBool(
       bool value, SourceInformation sourceInformation) {
     if (_options.enableMinification) {
       // Use !0 for true, !1 for false.
-      return new js.Prefix("!", new js.LiteralNumber(value ? "0" : "1"))
+      return js.Prefix("!", js.LiteralNumber(value ? "0" : "1"))
           .withSourceInformation(sourceInformation);
     } else {
-      return new js.LiteralBool(value).withSourceInformation(sourceInformation);
+      return js.LiteralBool(value).withSourceInformation(sourceInformation);
     }
   }
 
@@ -2506,11 +2482,11 @@
     assert(isGenerateAtUseSite(node));
     generateConstant(node.constant, node.sourceInformation);
 
-    _registry.registerConstantUse(new ConstantUse.literal(node.constant));
+    _registry.registerConstantUse(ConstantUse.literal(node.constant));
     if (node.constant.isType) {
       TypeConstantValue typeConstant = node.constant;
       _registry.registerTypeUse(
-          new TypeUse.constTypeLiteral(typeConstant.representedType));
+          TypeUse.constTypeLiteral(typeConstant.representedType));
     }
   }
 
@@ -2521,7 +2497,7 @@
   }
 
   static String mapRelationalOperator(String op, bool inverse) {
-    Map<String, String> inverseOperator = const <String, String>{
+    Map<String, String> inverseOperator = const {
       "==": "!=",
       "!=": "==",
       "===": "!==",
@@ -2575,7 +2551,7 @@
     }
     if (!handledBySpecialCase) {
       use(input);
-      push(new js.Prefix("!", pop()).withSourceInformation(sourceInformation));
+      push(js.Prefix("!", pop()).withSourceInformation(sourceInformation));
     }
   }
 
@@ -2583,7 +2559,7 @@
   visitParameterValue(HParameterValue node) {
     assert(!isGenerateAtUseSite(node));
     String name = variableNames.getName(node);
-    parameters.add(new js.Parameter(name));
+    parameters.add(js.Parameter(name));
     declaredLocals.add(name);
   }
 
@@ -2615,14 +2591,14 @@
       }
       js.Expression left = pop();
       use(node.inputs[0]);
-      push(new js.Binary(operation, left, pop()));
+      push(js.Binary(operation, left, pop()));
     } else {
       use(input);
       js.Expression test = pop();
       use(node.inputs[0]);
       js.Expression then = pop();
       use(node.inputs[1]);
-      push(new js.Conditional(test, then, pop()));
+      push(js.Conditional(test, then, pop()));
     }
   }
 
@@ -2639,7 +2615,7 @@
 
   @override
   visitThis(HThis node) {
-    push(new js.This());
+    push(js.This());
   }
 
   @override
@@ -2659,13 +2635,13 @@
   @override
   visitAwait(HAwait node) {
     use(node.inputs[0]);
-    push(new js.Await(pop()).withSourceInformation(node.sourceInformation));
+    push(js.Await(pop()).withSourceInformation(node.sourceInformation));
   }
 
   @override
   visitYield(HYield node) {
     use(node.inputs[0]);
-    pushStatement(new js.DartYield(pop(), node.hasStar)
+    pushStatement(js.DartYield(pop(), node.hasStar)
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -2834,31 +2810,31 @@
       push(_emitter
           .staticClosureAccess(element)
           .withSourceInformation(node.sourceInformation));
-      _registry.registerStaticUse(new StaticUse.staticTearOff(element));
+      _registry.registerStaticUse(StaticUse.staticTearOff(element));
     } else {
       push(_emitter
           .staticFieldAccess(element)
           .withSourceInformation(node.sourceInformation));
-      _registry.registerStaticUse(new StaticUse.staticGet(element));
+      _registry.registerStaticUse(StaticUse.staticGet(element));
     }
   }
 
   @override
   void visitLazyStatic(HLazyStatic node) {
     FieldEntity element = node.element;
-    _registry.registerStaticUse(new StaticUse.staticInit(element));
+    _registry.registerStaticUse(StaticUse.staticInit(element));
     js.Expression lazyGetter = _emitter.isolateLazyInitializerAccess(element);
-    js.Call call = new js.Call(lazyGetter, <js.Expression>[],
-        sourceInformation: node.sourceInformation);
+    js.Call call =
+        js.Call(lazyGetter, [], sourceInformation: node.sourceInformation);
     push(call);
   }
 
   @override
   void visitStaticStore(HStaticStore node) {
-    _registry.registerStaticUse(new StaticUse.staticSet(node.element));
+    _registry.registerStaticUse(StaticUse.staticSet(node.element));
     js.Node variable = _emitter.staticFieldAccess(node.element);
     use(node.inputs[0]);
-    push(new js.Assignment(variable, pop())
+    push(js.Assignment(variable, pop())
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -2867,7 +2843,7 @@
     use(node.left);
     js.Expression jsLeft = pop();
     use(node.right);
-    push(new js.Binary('+', jsLeft, pop())
+    push(js.Binary('+', jsLeft, pop())
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -2887,17 +2863,17 @@
         // The context is already <string> + value.
       } else {
         // Force an empty string for the first operand.
-        push(new js.Binary('+', js.string(""), pop())
+        push(js.Binary('+', js.string(""), pop())
             .withSourceInformation(node.sourceInformation));
       }
     } else {
       FunctionEntity convertToString =
           _commonElements.stringInterpolationHelper;
       _registry.registerStaticUse(
-          new StaticUse.staticInvoke(convertToString, CallStructure.ONE_ARG));
+          StaticUse.staticInvoke(convertToString, CallStructure.ONE_ARG));
       js.Expression jsHelper = _emitter.staticFunctionAccess(convertToString);
       use(input);
-      push(new js.Call(jsHelper, <js.Expression>[pop()],
+      push(js.Call(jsHelper, [pop()],
           sourceInformation: node.sourceInformation));
     }
   }
@@ -2915,7 +2891,7 @@
       use(input);
       return pop();
     }).toList();
-    push(new js.ArrayInitializer(elements)
+    push(js.ArrayInitializer(elements)
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -2924,7 +2900,7 @@
     use(node.receiver);
     js.Expression receiver = pop();
     use(node.index);
-    push(new js.PropertyAccess(receiver, pop())
+    push(js.PropertyAccess(receiver, pop())
         .withSourceInformation(node.sourceInformation));
   }
 
@@ -2935,15 +2911,15 @@
     use(node.index);
     js.Expression index = pop();
     use(node.value);
-    push(new js.Assignment(new js.PropertyAccess(receiver, index), pop())
+    push(js.Assignment(js.PropertyAccess(receiver, index), pop())
         .withSourceInformation(node.sourceInformation));
   }
 
   void checkTypeOf(HInstruction input, String cmp, String typeName,
       SourceInformation sourceInformation) {
     use(input);
-    js.Expression typeOf = new js.Prefix("typeof", pop());
-    push(new js.Binary(cmp, typeOf, js.string(typeName))
+    js.Expression typeOf = js.Prefix("typeof", pop());
+    push(js.Binary(cmp, typeOf, js.string(typeName))
         .withSourceInformation(sourceInformation));
   }
 
@@ -3008,7 +2984,7 @@
 
   @override
   void visitBoolConversion(HBoolConversion node) {
-    _registry.registerTypeUse(new TypeUse.isCheck(_commonElements.boolType));
+    _registry.registerTypeUse(TypeUse.isCheck(_commonElements.boolType));
     CheckedModeHelper helper = const CheckedModeHelper('boolConversionCheck');
     StaticUse staticUse = helper.getStaticUse(_commonElements);
     _registry.registerStaticUse(staticUse);
@@ -3046,7 +3022,7 @@
 
   @override
   visitIsTest(HIsTest node) {
-    _registry.registerTypeUse(new TypeUse.isCheck(node.dartType));
+    _registry.registerTypeUse(TypeUse.isCheck(node.dartType));
 
     use(node.typeInput);
     js.Expression first = pop();
@@ -3065,7 +3041,7 @@
     _emitIsTestSimple(node);
   }
 
-  _emitIsTestSimple(HIsTestSimple node, {bool negative: false}) {
+  _emitIsTestSimple(HIsTestSimple node, {bool negative = false}) {
     use(node.checkedInput);
     js.Expression value = pop();
     String relation = negative ? '!=' : '==';
@@ -3181,7 +3157,7 @@
 
     void useHelper(FunctionEntity helper) {
       _registry.registerStaticUse(
-          new StaticUse.staticInvoke(helper, CallStructure.ONE_ARG));
+          StaticUse.staticInvoke(helper, CallStructure.ONE_ARG));
       js.Expression helperAccess = _emitter.staticFunctionAccess(helper);
       push(js.js(r'#(#)', [helperAccess, receiver]).withSourceInformation(
           node.sourceInformation));
@@ -3291,7 +3267,7 @@
     ]).withSourceInformation(node.sourceInformation));
 
     _registry.registerStaticUse(
-        new StaticUse.directInvoke(method, selector.callStructure, null));
+        StaticUse.directInvoke(method, selector.callStructure, null));
   }
 
   @override
@@ -3313,11 +3289,11 @@
     ]).withSourceInformation(node.sourceInformation));
 
     _registry.registerStaticUse(
-        new StaticUse.directInvoke(method, selector.callStructure, null));
+        StaticUse.directInvoke(method, selector.callStructure, null));
   }
 
   _emitIsLateSentinel(HIsLateSentinel node, SourceInformation sourceInformation,
-      {inverse: false}) {
+      {inverse = false}) {
     use(node.inputs[0]);
     js.Expression value = pop();
     js.Expression sentinel =
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index 5bf162b..0d27a96 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -266,18 +266,18 @@
       if (isMatchingRead(left)) {
         if (left.usedBy.length == 1) {
           if (right is HConstant && right.constant.isOne) {
-            HInstruction rmw = new HReadModifyWrite.preOp(
+            HInstruction rmw = HReadModifyWrite.preOp(
                 setter.element, incrementOp, receiver, op.instructionType);
             return replaceOp(rmw, left);
           } else {
-            HInstruction rmw = new HReadModifyWrite.assignOp(
+            HInstruction rmw = HReadModifyWrite.assignOp(
                 setter.element, assignOp, receiver, right, op.instructionType);
             return replaceOp(rmw, left);
           }
         } else if (op.usedBy.length == 1 &&
             right is HConstant &&
             right.constant.isOne) {
-          HInstruction rmw = new HReadModifyWrite.postOp(
+          HInstruction rmw = HReadModifyWrite.postOp(
               setter.element, incrementOp, receiver, op.instructionType);
           block.addAfter(left, rmw);
           block.remove(setter);
@@ -294,7 +294,7 @@
         String assignOp, HInstruction left, HInstruction right) {
       if (isMatchingRead(left)) {
         if (left.usedBy.length == 1) {
-          HInstruction rmw = new HReadModifyWrite.assignOp(
+          HInstruction rmw = HReadModifyWrite.assignOp(
               setter.element, assignOp, receiver, right, op.instructionType);
           return replaceOp(rmw, left);
         }
@@ -809,8 +809,8 @@
 
     // The expectedInputs list holds non-trivial instructions that may
     // be generated at their use site, if they occur in the correct order.
-    if (expectedInputs == null) expectedInputs = <HInstruction>[];
-    if (pureInputs == null) pureInputs = new Set<HInstruction>();
+    expectedInputs ??= [];
+    pureInputs ??= {};
 
     // Pop instructions from expectedInputs until instruction is found.
     // Return true if it is found, or false if not.
@@ -1133,7 +1133,7 @@
   _cache(
       HInstruction node, bool Function(HInstruction) cacheable, String name) {
     var users = node.usedBy.toList();
-    var reference = new HLateValue(node);
+    var reference = HLateValue(node);
     // TODO(sra): The sourceInformation should really be from the function
     // entry, not the use of `this`.
     reference.sourceInformation = node.sourceInformation;
diff --git a/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart b/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
index fc51912..2c20593 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_finalizer.dart
@@ -233,12 +233,9 @@
   }
 
   void _replaceReceiverArgumentWithDummy(HInvoke node, int receiverIndex) {
-    HInstruction receiverArgument = node.inputs[receiverIndex];
     ConstantValue constant = DummyInterceptorConstantValue();
     HConstant dummy = _graph.addConstant(constant, _closedWorld);
-    receiverArgument.usedBy.remove(node);
-    node.inputs[receiverIndex] = dummy;
-    dummy.usedBy.add(node);
+    node.replaceInput(receiverIndex, dummy);
   }
 }
 
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index c0b6254..4def583 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -117,7 +117,7 @@
       return _graph.thisInstruction;
     }
 
-    ConstantValue constant = new InterceptorConstantValue(constantInterceptor);
+    ConstantValue constant = InterceptorConstantValue(constantInterceptor);
     return _graph.addConstant(constant, _closedWorld);
   }
 
@@ -340,7 +340,7 @@
               interceptedClasses);
           if (interceptorClass != null) {
             HInstruction constantInstruction = _graph.addConstant(
-                new InterceptorConstantValue(interceptorClass), _closedWorld);
+                InterceptorConstantValue(interceptorClass), _closedWorld);
             node.conditionalConstantInterceptor = constantInstruction;
             constantInstruction.usedBy.add(node);
             return false;
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index ba133a6..2ceac61 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -374,7 +374,7 @@
       OptimizationTestLog log) {
     HInstruction input = instruction.inputs[1];
     if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
-      HBitNot converted = new HBitNot(
+      HBitNot converted = HBitNot(
           input, computeTypeFromInputTypes(instruction, results, closedWorld));
       log?.registerBitNot(instruction, converted);
       return converted;
@@ -420,7 +420,7 @@
       OptimizationTestLog log) {
     HInstruction input = instruction.inputs[1];
     if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
-      HNegate converted = new HNegate(
+      HNegate converted = HNegate(
           input, computeTypeFromInputTypes(instruction, results, closedWorld));
       log?.registerUnaryNegate(instruction, converted);
       return converted;
@@ -459,7 +459,7 @@
       OptimizationTestLog log) {
     HInstruction input = instruction.inputs[1];
     if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
-      HAbs converted = new HAbs(
+      HAbs converted = HAbs(
           input, computeTypeFromInputTypes(instruction, results, closedWorld));
       log?.registerAbs(instruction, converted);
       return converted;
@@ -585,7 +585,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HAdd(instruction.inputs[1], instruction.inputs[2],
+    return HAdd(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -617,7 +617,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HDivide(instruction.inputs[1], instruction.inputs[2],
+    return HDivide(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.numType);
   }
 
@@ -658,7 +658,7 @@
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
     if (inputsArePositiveIntegers(instruction, closedWorld) &&
         !canBeNegativeZero(receiver)) {
-      return new HRemainder(instruction.inputs[1], instruction.inputs[2],
+      return HRemainder(instruction.inputs[1], instruction.inputs[2],
           computeTypeFromInputTypes(instruction, results, closedWorld));
     }
     // TODO(sra):
@@ -700,7 +700,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HRemainder(instruction.inputs[1], instruction.inputs[2],
+    return HRemainder(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -731,7 +731,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HMultiply(instruction.inputs[1], instruction.inputs[2],
+    return HMultiply(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -753,7 +753,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HSubtract(instruction.inputs[1], instruction.inputs[2],
+    return HSubtract(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -858,7 +858,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HTruncatingDivide(instruction.inputs[1], instruction.inputs[2],
+    return HTruncatingDivide(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -893,8 +893,7 @@
       HConstant rightConstant = instruction;
       IntConstantValue intConstant = rightConstant.constant;
       int value = intConstant.intValue.toInt();
-      assert(intConstant.intValue ==
-          new BigInt.from(intConstant.intValue.toInt()));
+      assert(intConstant.intValue == BigInt.from(intConstant.intValue.toInt()));
       return value >= low && value <= high;
     }
     // TODO(sra): Integrate with the bit-width analysis in codegen.dart.
@@ -959,7 +958,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HShiftLeft(instruction.inputs[1], instruction.inputs[2],
+    return HShiftLeft(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -1030,7 +1029,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HShiftRight(instruction.inputs[1], instruction.inputs[2],
+    return HShiftRight(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -1134,7 +1133,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HBitOr(instruction.inputs[1], instruction.inputs[2],
+    return HBitOr(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -1171,7 +1170,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HBitAnd(instruction.inputs[1], instruction.inputs[2],
+    return HBitAnd(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -1205,7 +1204,7 @@
   @override
   HInstruction newBuiltinVariant(HInvokeDynamic instruction,
       GlobalTypeInferenceResults results, JClosedWorld closedWorld) {
-    return new HBitXor(instruction.inputs[1], instruction.inputs[2],
+    return HBitXor(instruction.inputs[1], instruction.inputs[2],
         computeTypeFromInputTypes(instruction, results, closedWorld));
   }
 
@@ -1310,7 +1309,7 @@
   @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return new HIdentity(instruction.inputs[1], instruction.inputs[2],
+    return HIdentity(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.boolType);
   }
 
@@ -1332,7 +1331,7 @@
   @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return new HLess(instruction.inputs[1], instruction.inputs[2],
+    return HLess(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.boolType);
   }
 
@@ -1354,7 +1353,7 @@
   @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return new HGreater(instruction.inputs[1], instruction.inputs[2],
+    return HGreater(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.boolType);
   }
 
@@ -1376,7 +1375,7 @@
   @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return new HGreaterEqual(instruction.inputs[1], instruction.inputs[2],
+    return HGreaterEqual(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.boolType);
   }
 
@@ -1398,7 +1397,7 @@
   @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return new HLessEqual(instruction.inputs[1], instruction.inputs[2],
+    return HLessEqual(instruction.inputs[1], instruction.inputs[2],
         closedWorld.abstractValueDomain.boolType);
   }
 
diff --git a/pkg/compiler/lib/src/ssa/jump_handler.dart b/pkg/compiler/lib/src/ssa/jump_handler.dart
index 767df33..ff2911d 100644
--- a/pkg/compiler/lib/src/ssa/jump_handler.dart
+++ b/pkg/compiler/lib/src/ssa/jump_handler.dart
@@ -22,7 +22,7 @@
 
 abstract class JumpHandler {
   factory JumpHandler(KernelSsaGraphBuilder builder, JumpTarget target) {
-    return new TargetJumpHandler(builder, target);
+    return TargetJumpHandler(builder, target);
   }
   void generateBreak(SourceInformation sourceInformation,
       [LabelDefinition label]);
@@ -72,7 +72,7 @@
   bool hasAnyBreak() => false;
 
   @override
-  List<LabelDefinition> get labels => const <LabelDefinition>[];
+  List<LabelDefinition> get labels => const [];
   @override
   JumpTarget get target => null;
 }
@@ -85,11 +85,9 @@
   final KernelSsaGraphBuilder builder;
   @override
   final JumpTarget target;
-  final List<_JumpHandlerEntry> jumps;
+  final List<_JumpHandlerEntry> jumps = [];
 
-  TargetJumpHandler(KernelSsaGraphBuilder builder, this.target)
-      : this.builder = builder,
-        jumps = <_JumpHandlerEntry>[] {
+  TargetJumpHandler(this.builder, this.target) {
     assert(builder.jumpTargets[target] == null);
     builder.jumpTargets[target] = this;
   }
@@ -103,14 +101,14 @@
     HInstruction breakInstruction;
     if (label == null) {
       breakInstruction =
-          new HBreak(_abstractValueDomain, target, sourceInformation);
+          HBreak(_abstractValueDomain, target, sourceInformation);
     } else {
       breakInstruction =
-          new HBreak.toLabel(_abstractValueDomain, label, sourceInformation);
+          HBreak.toLabel(_abstractValueDomain, label, sourceInformation);
     }
-    LocalsHandler locals = new LocalsHandler.from(builder.localsHandler);
+    LocalsHandler locals = LocalsHandler.from(builder.localsHandler);
     builder.close(breakInstruction);
-    jumps.add(new _JumpHandlerEntry(breakInstruction, locals));
+    jumps.add(_JumpHandlerEntry(breakInstruction, locals));
   }
 
   @override
@@ -119,17 +117,17 @@
     HInstruction continueInstruction;
     if (label == null) {
       continueInstruction =
-          new HContinue(_abstractValueDomain, target, sourceInformation);
+          HContinue(_abstractValueDomain, target, sourceInformation);
     } else {
       continueInstruction =
-          new HContinue.toLabel(_abstractValueDomain, label, sourceInformation);
+          HContinue.toLabel(_abstractValueDomain, label, sourceInformation);
       // Switch case continue statements must be handled by the
       // [SwitchCaseJumpHandler].
       assert(!label.target.isSwitchCase);
     }
-    LocalsHandler locals = new LocalsHandler.from(builder.localsHandler);
+    LocalsHandler locals = LocalsHandler.from(builder.localsHandler);
     builder.close(continueInstruction);
-    jumps.add(new _JumpHandlerEntry(continueInstruction, locals));
+    jumps.add(_JumpHandlerEntry(continueInstruction, locals));
   }
 
   @override
@@ -184,7 +182,7 @@
 abstract class SwitchCaseJumpHandler extends TargetJumpHandler {
   /// Map from switch case targets to indices used to encode the flow of the
   /// switch case loop.
-  final Map<JumpTarget, int> targetIndexMap = new Map<JumpTarget, int>();
+  final Map<JumpTarget, int> targetIndexMap = {};
 
   SwitchCaseJumpHandler(KernelSsaGraphBuilder builder, JumpTarget target)
       : super(builder, target);
@@ -197,12 +195,12 @@
       // for a switch statement with continue statements. See
       // [SsaFromAstMixin.buildComplexSwitchStatement] for detail.
 
-      HInstruction breakInstruction = new HBreak(
+      HInstruction breakInstruction = HBreak(
           _abstractValueDomain, target, sourceInformation,
           breakSwitchContinueLoop: true);
-      LocalsHandler locals = new LocalsHandler.from(builder.localsHandler);
+      LocalsHandler locals = LocalsHandler.from(builder.localsHandler);
       builder.close(breakInstruction);
-      jumps.add(new _JumpHandlerEntry(breakInstruction, locals));
+      jumps.add(_JumpHandlerEntry(breakInstruction, locals));
     } else {
       super.generateBreak(sourceInformation, label);
     }
@@ -227,10 +225,10 @@
 
       assert(label.target.labels.contains(label));
       HInstruction continueInstruction =
-          new HContinue(_abstractValueDomain, target, sourceInformation);
-      LocalsHandler locals = new LocalsHandler.from(builder.localsHandler);
+          HContinue(_abstractValueDomain, target, sourceInformation);
+      LocalsHandler locals = LocalsHandler.from(builder.localsHandler);
       builder.close(continueInstruction);
-      jumps.add(new _JumpHandlerEntry(continueInstruction, locals));
+      jumps.add(_JumpHandlerEntry(continueInstruction, locals));
     } else {
       super.generateContinue(sourceInformation, label);
     }
diff --git a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
index b6f69b6..c21bc69 100644
--- a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
@@ -61,14 +61,14 @@
 
   HInstruction concat(HInstruction left, HInstruction right) {
     HInstruction instruction =
-        new HStringConcat(left, right, _abstractValueDomain.stringType);
+        HStringConcat(left, right, _abstractValueDomain.stringType);
     builder.add(instruction);
     return instruction;
   }
 
   HInstruction stringify(HInstruction expression) {
     HInstruction instruction =
-        new HStringify(expression, _abstractValueDomain.stringType)
+        HStringify(expression, _abstractValueDomain.stringType)
           ..sourceInformation = expression.sourceInformation;
     builder.add(instruction);
     return instruction;
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
index 502d335..2452f1a 100644
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
@@ -32,16 +32,15 @@
   /// iteration order a function only of insertions and not a function of
   /// e.g. Element hash codes.  I'd prefer to use a SortedMap but some elements
   /// don't have source locations for [Elements.compareByPosition].
-  Map<Local, HInstruction> directLocals = new Map<Local, HInstruction>();
-  Map<Local, FieldEntity> redirectionMapping = new Map<Local, FieldEntity>();
+  Map<Local, HInstruction> directLocals = {};
+  Map<Local, FieldEntity> redirectionMapping = {};
   final KernelSsaGraphBuilder builder;
 
   MemberEntity _scopeInfoMember;
   ScopeInfo _scopeInfo;
   KernelToLocalsMap _localsMap;
 
-  Map<TypeVariableEntity, TypeVariableLocal> typeVariableLocals =
-      new Map<TypeVariableEntity, TypeVariableLocal>();
+  Map<TypeVariableEntity, TypeVariableLocal> typeVariableLocals = {};
   final Entity executableContext;
   final MemberEntity memberContext;
 
@@ -106,7 +105,7 @@
   /// copy the [directLocals], since the other fields can be shared
   /// throughout the AST visit.
   LocalsHandler.from(LocalsHandler other)
-      : directLocals = new Map<Local, HInstruction>.from(other.directLocals),
+      : directLocals = Map<Local, HInstruction>.from(other.directLocals),
         redirectionMapping = other.redirectionMapping,
         executableContext = other.executableContext,
         memberContext = other.memberContext,
@@ -148,7 +147,7 @@
   }
 
   HInstruction createBox(SourceInformation sourceInformation) {
-    HInstruction box = new HCreateBox(_abstractValueDomain.nonNullType)
+    HInstruction box = HCreateBox(_abstractValueDomain.nonNullType)
       ..sourceInformation = sourceInformation;
     builder.add(box);
     return box;
@@ -158,7 +157,7 @@
   /// method creates a box and sets up the redirections.
   void enterScope(
       CapturedScope closureInfo, SourceInformation sourceInformation,
-      {bool forGenerativeConstructorBody: false, HInstruction inlinedBox}) {
+      {bool forGenerativeConstructorBody = false, HInstruction inlinedBox}) {
     // See if any variable in the top-scope of the function is captured. If yes
     // we need to create a box-object.
     if (!closureInfo.requiresContextBox) return;
@@ -261,7 +260,7 @@
       });
       // Inside closure redirect references to itself to [:this:].
       HThis thisInstruction =
-          new HThis(closureData.thisLocal, _abstractValueDomain.nonNullType);
+          HThis(closureData.thisLocal, _abstractValueDomain.nonNullType);
       builder.graph.thisInstruction = thisInstruction;
       builder.graph.entry.addAtEntry(thisInstruction);
       updateLocal(closureData.getClosureEntity(_localsMap), thisInstruction);
@@ -269,7 +268,7 @@
       // Once closures have been mapped to classes their instance members might
       // not have any thisElement if the closure was created inside a static
       // context.
-      HThis thisInstruction = new HThis(scopeInfo.thisLocal, getTypeOfThis());
+      HThis thisInstruction = HThis(scopeInfo.thisLocal, getTypeOfThis());
       builder.graph.thisInstruction = thisInstruction;
       builder.graph.entry.addAtEntry(thisInstruction);
       directLocals[scopeInfo.thisLocal] = thisInstruction;
@@ -289,7 +288,7 @@
         _nativeData.isNativeOrExtendsNative(cls);
     if (_interceptorData.isInterceptedMethod(element)) {
       SyntheticLocal parameter = createLocal('receiver');
-      HParameterValue value = new HParameterValue(parameter, getTypeOfThis());
+      HParameterValue value = HParameterValue(parameter, getTypeOfThis());
       builder.graph.explicitReceiverParameter = value;
       builder.graph.entry.addAfter(directLocals[scopeInfo.thisLocal], value);
       if (builder.lastAddedParameter == null) {
@@ -301,7 +300,7 @@
       SyntheticLocal parameter = createLocal('receiver');
       // Unlike `this`, receiver is nullable since direct calls to generative
       // constructor call the constructor with `null`.
-      HParameterValue value = new HParameterValue(
+      HParameterValue value = HParameterValue(
           parameter, _closedWorld.abstractValueDomain.createNullableExact(cls));
       builder.graph.explicitReceiverParameter = value;
       builder.graph.entry.addAtEntry(value);
@@ -359,7 +358,7 @@
       }
       HInstruction value = directLocals[local];
       if (sourceInformation != null) {
-        value = new HRef(value, sourceInformation);
+        value = HRef(value, sourceInformation);
         builder.add(value);
       }
       return value;
@@ -372,7 +371,7 @@
           ? _abstractValueDomain.nonNullType
           : getTypeOfCapturedVariable(redirect);
       HInstruction fieldGet =
-          new HFieldGet(redirect, receiver, type, sourceInformation);
+          HFieldGet(redirect, receiver, type, sourceInformation);
       builder.add(fieldGet);
       return fieldGet;
     } else if (isBoxed(local)) {
@@ -389,14 +388,14 @@
       assert(localBox != null);
 
       HInstruction box = readLocal(localBox);
-      HInstruction lookup = new HFieldGet(redirect, box,
+      HInstruction lookup = HFieldGet(redirect, box,
           getTypeOfCapturedVariable(redirect), sourceInformation);
       builder.add(lookup);
       return lookup;
     } else {
       assert(_isUsedInTryOrGenerator(local));
       HLocalValue localValue = getLocal(local);
-      HInstruction instruction = new HLocalGet(local, localValue,
+      HInstruction instruction = HLocalGet(local, localValue,
           _abstractValueDomain.dynamicType, sourceInformation);
       builder.add(instruction);
       return instruction;
@@ -424,7 +423,7 @@
 
     return activationVariables.putIfAbsent(local, () {
       HLocalValue localValue =
-          new HLocalValue(local, _abstractValueDomain.nonNullType)
+          HLocalValue(local, _abstractValueDomain.nonNullType)
             ..sourceInformation = sourceInformation;
       builder.graph.entry.addAtExit(localValue);
       return localValue;
@@ -432,8 +431,7 @@
   }
 
   Local getTypeVariableAsLocal(TypeVariableType type) {
-    return typeVariableLocals[type.element] ??=
-        new TypeVariableLocal(type.element);
+    return typeVariableLocals[type.element] ??= TypeVariableLocal(type.element);
   }
 
   /// Sets the [element] to [value]. If the element is boxed or stored in a
@@ -462,12 +460,12 @@
       // Inside the closure the box is stored in a closure-field and cannot
       // be accessed directly.
       HInstruction box = readLocal(localBox);
-      builder.add(new HFieldSet(_abstractValueDomain, redirect, box, value)
+      builder.add(HFieldSet(_abstractValueDomain, redirect, box, value)
         ..sourceInformation = sourceInformation);
     } else {
       assert(_isUsedInTryOrGenerator(local));
       HLocalValue localValue = getLocal(local);
-      builder.add(new HLocalSet(_abstractValueDomain, local, localValue, value)
+      builder.add(HLocalSet(_abstractValueDomain, local, localValue, value)
         ..sourceInformation = sourceInformation);
     }
   }
@@ -532,14 +530,14 @@
   void beginLoopHeader(HBasicBlock loopEntry) {
     // Create a copy because we modify the map while iterating over it.
     Map<Local, HInstruction> savedDirectLocals =
-        new Map<Local, HInstruction>.from(directLocals);
+        Map<Local, HInstruction>.from(directLocals);
 
     // Create phis for all elements in the definitions environment.
     savedDirectLocals.forEach((Local local, HInstruction instruction) {
       if (isAccessedDirectly(local)) {
         // We know 'this' cannot be modified.
         if (local != _scopeInfo.thisLocal) {
-          HPhi phi = new HPhi.singleInput(
+          HPhi phi = HPhi.singleInput(
               local, instruction, _abstractValueDomain.dynamicType);
           loopEntry.addPhi(phi);
           directLocals[local] = phi;
@@ -595,7 +593,7 @@
     // block. Since variable declarations are scoped the declared
     // variable cannot be alive outside the block. Note: this is only
     // true for nodes where we do joins.
-    Map<Local, HInstruction> joinedLocals = new Map<Local, HInstruction>();
+    Map<Local, HInstruction> joinedLocals = {};
     otherLocals.directLocals.forEach((Local local, HInstruction instruction) {
       // We know 'this' cannot be modified.
       if (local == _scopeInfo.thisLocal) {
@@ -607,7 +605,7 @@
         if (identical(instruction, mine)) {
           joinedLocals[local] = instruction;
         } else {
-          HInstruction phi = new HPhi.manyInputs(
+          HInstruction phi = HPhi.manyInputs(
               local,
               <HInstruction>[mine, instruction],
               _abstractValueDomain.dynamicType);
@@ -628,11 +626,11 @@
       List<LocalsHandler> localsHandlers, HBasicBlock joinBlock) {
     assert(localsHandlers.length > 0);
     if (localsHandlers.length == 1) return localsHandlers.single;
-    Map<Local, HInstruction> joinedLocals = new Map<Local, HInstruction>();
+    Map<Local, HInstruction> joinedLocals = {};
     HInstruction thisValue = null;
     directLocals.forEach((Local local, HInstruction instruction) {
       if (local != _scopeInfo.thisLocal) {
-        HPhi phi = new HPhi.noInputs(local, _abstractValueDomain.dynamicType);
+        HPhi phi = HPhi.noInputs(local, _abstractValueDomain.dynamicType);
         joinedLocals[local] = phi;
         joinBlock.addPhi(phi);
       } else {
@@ -656,7 +654,7 @@
     }
 
     // Remove locals that are not in all handlers.
-    directLocals = new Map<Local, HInstruction>();
+    directLocals = {};
     joinedLocals.forEach((Local local, HInstruction instruction) {
       if (local != _scopeInfo.thisLocal &&
           instruction.inputs.length != localsHandlers.length) {
@@ -689,8 +687,7 @@
     return result;
   }
 
-  Map<FieldEntity, AbstractValue> cachedTypesOfCapturedVariables =
-      new Map<FieldEntity, AbstractValue>();
+  Map<FieldEntity, AbstractValue> cachedTypesOfCapturedVariables = {};
 
   AbstractValue getTypeOfCapturedVariable(FieldEntity element) {
     return cachedTypesOfCapturedVariables.putIfAbsent(element, () {
@@ -702,10 +699,10 @@
   /// Variables stored in the current activation. These variables are
   /// being updated in try/catch blocks, and should be
   /// accessed indirectly through [HLocalGet] and [HLocalSet].
-  Map<Local, HLocalValue> activationVariables = <Local, HLocalValue>{};
+  Map<Local, HLocalValue> activationVariables = {};
 
   SyntheticLocal createLocal(String name) {
-    return new SyntheticLocal(name, executableContext, memberContext);
+    return SyntheticLocal(name, executableContext, memberContext);
   }
 }
 
diff --git a/pkg/compiler/lib/src/ssa/logging.dart b/pkg/compiler/lib/src/ssa/logging.dart
index 77c888e..fcbb3ab 100644
--- a/pkg/compiler/lib/src/ssa/logging.dart
+++ b/pkg/compiler/lib/src/ssa/logging.dart
@@ -26,14 +26,14 @@
         return null;
       }
     }
-    Features features = new Features();
+    Features features = Features();
     f(features);
-    entries.add(new OptimizationLogEntry(tag, features));
+    entries.add(OptimizationLogEntry(tag, features));
     return features;
   }
 
   void registerNullCheck(HInstruction original, HNullCheck check) {
-    Features features = new Features();
+    Features features = Features();
     if (check.selector != null) {
       features['selector'] = check.selector.name;
     }
@@ -41,12 +41,12 @@
       features['field'] =
           '${check.field.enclosingClass.name}.${check.field.name}';
     }
-    entries.add(new OptimizationLogEntry('NullCheck', features));
+    entries.add(OptimizationLogEntry('NullCheck', features));
   }
 
   void registerConditionValue(
       HInstruction original, bool value, String where, int count) {
-    Features features = new Features();
+    Features features = Features();
     features['value'] = '$value';
     features['where'] = where;
     features['count'] = '$count';
@@ -54,52 +54,52 @@
   }
 
   void registerFieldGet(HInvokeDynamicGetter original, HFieldGet converted) {
-    Features features = new Features();
+    Features features = Features();
     if (converted.element != null) {
       features['name'] =
           '${converted.element.enclosingClass.name}.${converted.element.name}';
     } else {
       features['name'] = '<null-guard>';
     }
-    entries.add(new OptimizationLogEntry('FieldGet', features));
+    entries.add(OptimizationLogEntry('FieldGet', features));
   }
 
   void registerFieldSet(HInvokeDynamicSetter original, [HFieldSet converted]) {
-    Features features = new Features();
+    Features features = Features();
     if (converted != null) {
       features['name'] =
           '${converted.element.enclosingClass.name}.${converted.element.name}';
     } else {
       features['removed'] = original.selector.name;
     }
-    entries.add(new OptimizationLogEntry('FieldSet', features));
+    entries.add(OptimizationLogEntry('FieldSet', features));
   }
 
   void registerFieldCall(HInvokeDynamicMethod original, HFieldGet converted) {
-    Features features = new Features();
+    Features features = Features();
     if (converted.element != null) {
       features['name'] =
           '${converted.element.enclosingClass.name}.${converted.element.name}';
     } else {
       features['name'] = '<null-guard>';
     }
-    entries.add(new OptimizationLogEntry('FieldCall', features));
+    entries.add(OptimizationLogEntry('FieldCall', features));
   }
 
   void registerConstantFieldGet(
       HInvokeDynamicGetter original, FieldEntity field, HConstant converted) {
-    Features features = new Features();
+    Features features = Features();
     features['name'] = '${field.enclosingClass.name}.${field.name}';
     features['value'] = converted.constant.toStructuredText(_dartTypes);
-    entries.add(new OptimizationLogEntry('ConstantFieldGet', features));
+    entries.add(OptimizationLogEntry('ConstantFieldGet', features));
   }
 
   void registerConstantFieldCall(
       HInvokeDynamicMethod original, FieldEntity field, HConstant converted) {
-    Features features = new Features();
+    Features features = Features();
     features['name'] = '${field.enclosingClass.name}.${field.name}';
     features['value'] = converted.constant.toStructuredText(_dartTypes);
-    entries.add(new OptimizationLogEntry('ConstantFieldCall', features));
+    entries.add(OptimizationLogEntry('ConstantFieldCall', features));
   }
 
   Features _registerSpecializer(
@@ -218,17 +218,17 @@
   }
 
   void registerCodeUnitAt(HInvokeDynamic original) {
-    Features features = new Features();
+    Features features = Features();
     features['name'] = original.selector.name;
-    entries.add(new OptimizationLogEntry('CodeUnitAt', features));
+    entries.add(OptimizationLogEntry('CodeUnitAt', features));
   }
 
   void registerCompareTo(HInvokeDynamic original, [HConstant converted]) {
-    Features features = new Features();
+    Features features = Features();
     if (converted != null) {
       features['constant'] = converted.constant.toDartText(_dartTypes);
     }
-    entries.add(new OptimizationLogEntry('CompareTo', features));
+    entries.add(OptimizationLogEntry('CompareTo', features));
   }
 
   void registerSubstring(HInvokeDynamic original) {
@@ -252,7 +252,7 @@
   }
 
   void registerPrimitiveCheck(HInstruction original, HPrimitiveCheck check) {
-    Features features = new Features();
+    Features features = Features();
 
     if (check.isReceiverTypeCheck) {
       features['kind'] = 'receiver';
@@ -262,7 +262,7 @@
     if (check.typeExpression != null) {
       features['type'] = '${check.typeExpression}';
     }
-    entries.add(new OptimizationLogEntry('PrimitiveCheck', features));
+    entries.add(OptimizationLogEntry('PrimitiveCheck', features));
   }
 
   String getText() {
diff --git a/pkg/compiler/lib/src/ssa/loop_handler.dart b/pkg/compiler/lib/src/ssa/loop_handler.dart
index d729fef..73e96e9 100644
--- a/pkg/compiler/lib/src/ssa/loop_handler.dart
+++ b/pkg/compiler/lib/src/ssa/loop_handler.dart
@@ -56,7 +56,7 @@
       startBlock = initializerBlock;
       initialize();
       assert(!builder.isAborted());
-      initializerGraph = new SubExpression(initializerBlock, builder.current);
+      initializerGraph = SubExpression(initializerBlock, builder.current);
     }
 
     builder.loopDepth++;
@@ -66,15 +66,15 @@
     if (startBlock == null) startBlock = conditionBlock;
 
     HInstruction conditionInstruction = condition();
-    HBasicBlock conditionEndBlock = builder
-        .close(new HLoopBranch(_abstractValueDomain, conditionInstruction));
+    HBasicBlock conditionEndBlock =
+        builder.close(HLoopBranch(_abstractValueDomain, conditionInstruction));
     SubExpression conditionExpression =
-        new SubExpression(conditionBlock, conditionEndBlock);
+        SubExpression(conditionBlock, conditionEndBlock);
 
     // Save the values of the local variables at the end of the condition
     // block.  These are the values that will flow to the loop exit if the
     // condition fails.
-    LocalsHandler savedLocals = new LocalsHandler.from(builder.localsHandler);
+    LocalsHandler savedLocals = LocalsHandler.from(builder.localsHandler);
 
     // The body.
     HBasicBlock beginBodyBlock = builder.addNewBlock();
@@ -84,9 +84,9 @@
     builder.localsHandler.enterLoopBody(loopClosureInfo, sourceInformation);
     body();
 
-    SubGraph bodyGraph = new SubGraph(beginBodyBlock, builder.lastOpenedBlock);
+    SubGraph bodyGraph = SubGraph(beginBodyBlock, builder.lastOpenedBlock);
     HBasicBlock bodyBlock = builder.current;
-    if (builder.current != null) builder.close(new HGoto(_abstractValueDomain));
+    if (builder.current != null) builder.close(HGoto(_abstractValueDomain));
 
     SubExpression updateGraph;
 
@@ -117,14 +117,14 @@
       List<LabelDefinition> labels = jumpHandler.labels;
       if (labels.isNotEmpty) {
         beginBodyBlock.setBlockFlow(
-            new HLabeledBlockInformation(
-                new HSubGraphBlockInformation(bodyGraph), jumpHandler.labels,
+            HLabeledBlockInformation(
+                HSubGraphBlockInformation(bodyGraph), jumpHandler.labels,
                 isContinue: true),
             updateBlock);
       } else if (jumpTarget != null && jumpTarget.isContinueTarget) {
         beginBodyBlock.setBlockFlow(
-            new HLabeledBlockInformation.implicit(
-                new HSubGraphBlockInformation(bodyGraph), jumpTarget,
+            HLabeledBlockInformation.implicit(
+                HSubGraphBlockInformation(bodyGraph), jumpTarget,
                 isContinue: true),
             updateBlock);
       }
@@ -134,22 +134,21 @@
 
       update();
 
-      HBasicBlock updateEndBlock =
-          builder.close(new HGoto(_abstractValueDomain));
+      HBasicBlock updateEndBlock = builder.close(HGoto(_abstractValueDomain));
       // The back-edge completing the cycle.
       updateEndBlock.addSuccessor(conditionBlock);
-      updateGraph = new SubExpression(updateBlock, updateEndBlock);
+      updateGraph = SubExpression(updateBlock, updateEndBlock);
 
       // Avoid a critical edge from the condition to the loop-exit body.
       HBasicBlock conditionExitBlock = builder.addNewBlock();
       builder.open(conditionExitBlock);
-      builder.close(new HGoto(_abstractValueDomain));
+      builder.close(HGoto(_abstractValueDomain));
       conditionEndBlock.addSuccessor(conditionExitBlock);
 
       endLoop(conditionBlock, conditionExitBlock, jumpHandler, savedLocals);
 
       conditionBlock.postProcessLoopHeader();
-      HLoopBlockInformation info = new HLoopBlockInformation(
+      HLoopBlockInformation info = HLoopBlockInformation(
           loopKind(loop),
           builder.wrapExpressionGraph(initializerGraph),
           builder.wrapExpressionGraph(conditionExpression),
@@ -174,22 +173,22 @@
       // label to the if.
       HBasicBlock elseBlock = builder.addNewBlock();
       builder.open(elseBlock);
-      builder.close(new HGoto(_abstractValueDomain));
+      builder.close(HGoto(_abstractValueDomain));
       // Pass the elseBlock as the branchBlock, because that's the block we go
       // to just before leaving the 'loop'.
       endLoop(conditionBlock, elseBlock, jumpHandler, savedLocals);
 
-      SubGraph elseGraph = new SubGraph(elseBlock, elseBlock);
+      SubGraph elseGraph = SubGraph(elseBlock, elseBlock);
       // Remove the loop information attached to the header.
       conditionBlock.loopInformation = null;
 
       // Remove the [HLoopBranch] instruction and replace it with
       // [HIf].
       HInstruction condition = conditionEndBlock.last.inputs[0];
-      conditionEndBlock.addAtExit(new HIf(_abstractValueDomain, condition));
+      conditionEndBlock.addAtExit(HIf(_abstractValueDomain, condition));
       conditionEndBlock.addSuccessor(elseBlock);
       conditionEndBlock.remove(conditionEndBlock.last);
-      HIfBlockInformation info = new HIfBlockInformation(
+      HIfBlockInformation info = HIfBlockInformation(
           builder.wrapExpressionGraph(conditionExpression),
           builder.wrapStatementGraph(bodyGraph),
           builder.wrapStatementGraph(elseGraph));
@@ -203,17 +202,16 @@
       if (jumpHandler.hasAnyBreak()) {
         LabelDefinition label =
             jumpTarget.addLabel('loop', isBreakTarget: true);
-        SubGraph labelGraph = new SubGraph(conditionBlock, builder.current);
-        HLabeledBlockInformation labelInfo = new HLabeledBlockInformation(
-            new HSubGraphBlockInformation(labelGraph),
-            <LabelDefinition>[label]);
+        SubGraph labelGraph = SubGraph(conditionBlock, builder.current);
+        HLabeledBlockInformation labelInfo = HLabeledBlockInformation(
+            HSubGraphBlockInformation(labelGraph), <LabelDefinition>[label]);
 
         conditionBlock.setBlockFlow(labelInfo, builder.current);
 
         jumpHandler.forEachBreak((HBreak breakInstruction, _) {
           HBasicBlock block = breakInstruction.block;
-          block.addAtExit(new HBreak.toLabel(
-              _abstractValueDomain, label, sourceInformation));
+          block.addAtExit(
+              HBreak.toLabel(_abstractValueDomain, label, sourceInformation));
           block.remove(breakInstruction);
         });
       }
@@ -227,7 +225,7 @@
   /// Also notifies the locals handler that we're entering a loop.
   JumpHandler beginLoopHeader(ir.TreeNode node, JumpTarget jumpTarget) {
     assert(!builder.isAborted());
-    HBasicBlock previousBlock = builder.close(new HGoto(_abstractValueDomain));
+    HBasicBlock previousBlock = builder.close(HGoto(_abstractValueDomain));
 
     JumpHandler jumpHandler =
         createJumpHandler(node, jumpTarget, isLoopJump: true);
@@ -326,7 +324,7 @@
       builder.createJumpHandler(node, jumpTarget, isLoopJump: isLoopJump);
 
   @override
-  int loopKind(ir.TreeNode node) => node.accept(new _KernelLoopTypeVisitor());
+  int loopKind(ir.TreeNode node) => node.accept(_KernelLoopTypeVisitor());
 }
 
 class _KernelLoopTypeVisitor extends ir.Visitor<int>
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 47298de..7bd3dde 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -131,7 +131,7 @@
     //     }
     //     visitBasicBlockAndSuccessors(graph.entry);
 
-    _Frame frame = new _Frame(null);
+    _Frame frame = _Frame(null);
     frame.block = graph.entry;
     frame.index = 0;
 
@@ -142,7 +142,7 @@
       int index = frame.index;
       if (index < block.dominatedBlocks.length) {
         frame.index = index + 1;
-        frame = frame.next ??= new _Frame(frame);
+        frame = frame.next ??= _Frame(frame);
         frame.block = block.dominatedBlocks[index];
         frame.index = 0;
         visitBasicBlock(frame.block);
@@ -164,7 +164,7 @@
     //     }
     //     visitBasicBlockAndSuccessors(graph.entry);
 
-    _Frame frame = new _Frame(null);
+    _Frame frame = _Frame(null);
     frame.block = graph.entry;
     frame.index = frame.block.dominatedBlocks.length;
 
@@ -173,7 +173,7 @@
       int index = frame.index;
       if (index > 0) {
         frame.index = index - 1;
-        frame = frame.next ??= new _Frame(frame);
+        frame = frame.next ??= _Frame(frame);
         frame.block = block.dominatedBlocks[index - 1];
         frame.index = frame.block.dominatedBlocks.length;
         continue;
@@ -235,24 +235,24 @@
   bool calledInLoop = false;
   bool isLazyInitializer = false;
 
-  final List<HBasicBlock> blocks = <HBasicBlock>[];
+  final List<HBasicBlock> blocks = [];
 
   /// Nodes containing list allocations for which there is a known fixed length.
   // TODO(sigmund,sra): consider not storing this explicitly here (e.g. maybe
   // store it on HInstruction, or maybe this can be computed on demand).
-  final Set<HInstruction> allocatedFixedLists = new Set<HInstruction>();
+  final Set<HInstruction> allocatedFixedLists = {};
 
   SourceInformation sourceInformation;
 
   // We canonicalize all constants used within a graph so we do not
   // have to worry about them for global value numbering.
-  Map<ConstantValue, HConstant> constants = new Map<ConstantValue, HConstant>();
+  Map<ConstantValue, HConstant> constants = {};
 
   HGraph() {
     entry = addNewBlock();
     // The exit block will be added later, so it has an id that is
     // after all others in the system.
-    exit = new HBasicBlock();
+    exit = HBasicBlock();
   }
 
   void addBlock(HBasicBlock block) {
@@ -263,7 +263,7 @@
   }
 
   HBasicBlock addNewBlock() {
-    HBasicBlock result = new HBasicBlock();
+    HBasicBlock result = HBasicBlock();
     addBlock(result);
     return result;
   }
@@ -271,7 +271,7 @@
   HBasicBlock addNewLoopHeaderBlock(
       JumpTarget target, List<LabelDefinition> labels) {
     HBasicBlock result = addNewBlock();
-    result.loopInformation = new HLoopInformation(result, target, labels);
+    result.loopInformation = HLoopInformation(result, target, labels);
     return result;
   }
 
@@ -286,7 +286,7 @@
       }
       AbstractValue type = closedWorld.abstractValueDomain
           .computeAbstractValueForConstant(constant);
-      result = new HConstant.internal(constant, type)
+      result = HConstant.internal(constant, type)
         ..sourceInformation = sourceInformation;
       entry.addAtExit(result);
       constants[constant] = result;
@@ -309,8 +309,7 @@
 
   HConstant addConstantIntAsUnsigned(int i, JClosedWorld closedWorld) {
     return addConstant(
-        constant_system.createInt(new BigInt.from(i).toUnsigned(64)),
-        closedWorld);
+        constant_system.createInt(BigInt.from(i).toUnsigned(64)), closedWorld);
   }
 
   HConstant addConstantDouble(double d, JClosedWorld closedWorld) {
@@ -322,8 +321,7 @@
   }
 
   HConstant addConstantStringFromName(js.Name name, JClosedWorld closedWorld) {
-    return addConstant(
-        new JsNameConstantValue(js.quoteName(name)), closedWorld);
+    return addConstant(JsNameConstantValue(js.quoteName(name)), closedWorld);
   }
 
   HConstant addConstantBool(bool value, JClosedWorld closedWorld) {
@@ -348,7 +346,7 @@
   void finalize(AbstractValueDomain domain) {
     addBlock(exit);
     exit.open();
-    exit.close(new HExit(domain));
+    exit.close(HExit(domain));
     assignDominators();
   }
 
@@ -375,7 +373,7 @@
     // blocks. A dominator has a dfs-in..dfs-out range that includes the range
     // of the dominated block. See [HGraphVisitor.visitDominatorTree] for
     // recursion-free schema.
-    _Frame frame = new _Frame(null);
+    _Frame frame = _Frame(null);
     frame.block = entry;
     frame.index = 0;
 
@@ -387,7 +385,7 @@
       int index = frame.index;
       if (index < block.dominatedBlocks.length) {
         frame.index = index + 1;
-        frame = frame.next ??= new _Frame(frame);
+        frame = frame.next ??= _Frame(frame);
         frame.block = block.dominatedBlocks[index];
         frame.index = 0;
         frame.block.dominatorDfsIn = ++dfsNumber;
@@ -399,7 +397,7 @@
   }
 
   bool isValid() {
-    HValidator validator = new HValidator();
+    HValidator validator = HValidator();
     validator.visitGraph(this);
     return validator.isValid;
   }
@@ -748,27 +746,23 @@
   static const int STATUS_CLOSED = 2;
   int status = STATUS_NEW;
 
-  HInstructionList phis;
+  HInstructionList phis = HInstructionList();
 
   HLoopInformation loopInformation = null;
   HBlockFlow blockFlow = null;
   HBasicBlock parentLoopHeader = null;
   bool isLive = true;
 
-  final List<HBasicBlock> predecessors;
-  List<HBasicBlock> successors;
+  final List<HBasicBlock> predecessors = [];
+  List<HBasicBlock> successors = const [];
 
   HBasicBlock dominator = null;
-  final List<HBasicBlock> dominatedBlocks;
+  final List<HBasicBlock> dominatedBlocks = [];
   int dominatorDfsIn;
   int dominatorDfsOut;
 
   HBasicBlock() : this.withId(null);
-  HBasicBlock.withId(this.id)
-      : phis = new HInstructionList(),
-        predecessors = <HBasicBlock>[],
-        successors = const <HBasicBlock>[],
-        dominatedBlocks = <HBasicBlock>[];
+  HBasicBlock.withId(this.id);
 
   @override
   int get hashCode => id;
@@ -782,7 +776,7 @@
   }
 
   void setBlockFlow(HBlockInformation blockInfo, HBasicBlock continuation) {
-    blockFlow = new HBlockFlow(blockInfo, continuation);
+    blockFlow = HBlockFlow(blockInfo, continuation);
   }
 
   bool isLabeledBlock() =>
@@ -906,7 +900,7 @@
   /// information on [to], and that dominates the user.
   void rewriteWithBetterUser(HInstruction from, HInstruction to) {
     // BUG(11841): Turn this method into a phase to be run after GVN phases.
-    Link<HCheck> better = const Link<HCheck>();
+    Link<HCheck> better = const Link();
     for (HInstruction user in to.usedBy) {
       if (user == from || user is! HCheck) continue;
       HCheck check = user;
@@ -1017,7 +1011,7 @@
 
   bool isValid() {
     assert(isClosed());
-    HValidator validator = new HValidator();
+    HValidator validator = HValidator();
     validator.visitBasicBlock(this);
     return validator.isValid;
   }
@@ -1045,7 +1039,7 @@
   HInstruction previous = null;
   HInstruction next = null;
 
-  SideEffects sideEffects = new SideEffects.empty();
+  SideEffects sideEffects = SideEffects.empty();
   bool _useGvn = false;
 
   // Type codes.
@@ -1147,6 +1141,9 @@
   AbstractBool isNull(AbstractValueDomain domain) =>
       domain.isNull(instructionType);
 
+  AbstractBool isLateSentinel(AbstractValueDomain domain) =>
+      domain.isLateSentinel(instructionType);
+
   AbstractBool isConflicting(AbstractValueDomain domain) =>
       domain.isEmpty(instructionType);
 
@@ -1159,9 +1156,6 @@
   AbstractBool isPrimitiveBoolean(AbstractValueDomain domain) =>
       domain.isPrimitiveBoolean(instructionType);
 
-  AbstractBool isPrimitiveArray(AbstractValueDomain domain) =>
-      domain.isPrimitiveArray(instructionType);
-
   AbstractBool isIndexablePrimitive(AbstractValueDomain domain) =>
       domain.isIndexablePrimitive(instructionType);
 
@@ -1319,8 +1313,8 @@
     removeFromList(usedBy, user);
   }
 
-  // Change all uses of [oldInput] by [this] to [newInput]. Also
-  // updates the [usedBy] of [oldInput] and [newInput].
+  // Change all uses of [oldInput] by [this] to [newInput]. Also updates the
+  // [usedBy] of [oldInput] and [newInput].
   void changeUse(HInstruction oldInput, HInstruction newInput) {
     assert(newInput != null && !identical(oldInput, newInput));
     for (int i = 0; i < inputs.length; i++) {
@@ -1332,6 +1326,16 @@
     removeFromList(oldInput.usedBy, this);
   }
 
+  /// Replace a single input.
+  ///
+  /// Use [changeUse] to change all inputs that are the same value.
+  void replaceInput(int index, HInstruction replacement) {
+    assert(replacement.isInBasicBlock());
+    inputs[index].usedBy.remove(this);
+    inputs[index] = replacement;
+    replacement.usedBy.add(this);
+  }
+
   void replaceAllUsersDominatedBy(
       HInstruction cursor, HInstruction newInstruction) {
     DominatedUses.of(this, cursor).replaceWith(newInstruction);
@@ -1360,7 +1364,7 @@
   bool isInterceptor(JClosedWorld closedWorld) => false;
 
   bool isValid() {
-    HValidator validator = new HValidator();
+    HValidator validator = HValidator();
     validator.currentBlock = block;
     validator.visitInstruction(this);
     return validator.isValid;
@@ -1408,8 +1412,8 @@
 
   // Two list of matching length holding (instruction, input-index) pairs for
   // the dominated uses.
-  final List<HInstruction> _instructions = <HInstruction>[];
-  final List<int> _indexes = <int>[];
+  final List<HInstruction> _instructions = [];
+  final List<int> _indexes = [];
 
   DominatedUses._(this._source);
 
@@ -1424,8 +1428,8 @@
   /// of a loop with many break statements).  If [excludePhiOutEdges] is `true`
   /// then these edge uses are not included.
   static DominatedUses of(HInstruction source, HInstruction dominator,
-      {bool excludeDominator: false, bool excludePhiOutEdges: false}) {
-    return new DominatedUses._(source)
+      {bool excludeDominator = false, bool excludePhiOutEdges = false}) {
+    return DominatedUses._(source)
       .._compute(source, dominator, excludeDominator, excludePhiOutEdges);
   }
 
@@ -1445,9 +1449,7 @@
           identical(oldInstruction, _source),
           'Input ${index} of ${user} changed.'
           '\n  Found: ${oldInstruction}\n  Expected: ${_source}');
-      user.inputs[index] = newInstruction;
-      oldInstruction.usedBy.remove(user);
-      newInstruction.usedBy.add(user);
+      user.replaceInput(index, newInstruction);
     }
   }
 
@@ -1466,8 +1468,8 @@
       bool excludeDominator, bool excludePhiOutEdges) {
     // Keep track of all instructions that we have to deal with later and count
     // the number of them that are in the current block.
-    Set<HInstruction> users = new Setlet<HInstruction>();
-    Set<HInstruction> seen = new Setlet<HInstruction>();
+    Set<HInstruction> users = Setlet();
+    Set<HInstruction> seen = Setlet();
     int usersInCurrentBlock = 0;
 
     HBasicBlock dominatorBlock = dominator.block;
@@ -1567,7 +1569,7 @@
 /// the graph, instructions that depend on the check being done reference the
 /// [HCheck] instruction instead of the input instruction.
 abstract class HCheck extends HInstruction {
-  HCheck(inputs, type) : super(inputs, type) {
+  HCheck(List<HInstruction> inputs, AbstractValue type) : super(inputs, type) {
     setUseGvn();
   }
 
@@ -1594,11 +1596,12 @@
   /// Default is that all checks must be performed dynamically.
   int staticChecks = FULL_CHECK;
 
-  HBoundsCheck(length, index, array, type)
-      : super(<HInstruction>[length, index, array], type);
+  HBoundsCheck(HInstruction index, HInstruction length, HInstruction array,
+      AbstractValue type)
+      : super([index, length, array], type);
 
-  HInstruction get length => inputs[1];
   HInstruction get index => inputs[0];
+  HInstruction get length => inputs[1];
   HInstruction get array => inputs[2];
   // There can be an additional fourth input which is the index to report to
   // [ioore]. This is used by the expansion of [JSArray.removeLast].
@@ -1655,7 +1658,7 @@
 
   HCreate(this.element, List<HInstruction> inputs, AbstractValue type,
       SourceInformation sourceInformation,
-      {this.instantiatedTypes, this.hasRtiInput: false, this.callMethod})
+      {this.instantiatedTypes, this.hasRtiInput = false, this.callMethod})
       : super(inputs, type) {
     this.sourceInformation = sourceInformation;
   }
@@ -1677,7 +1680,7 @@
 
 // Allocates a box to hold mutated captured variables.
 class HCreateBox extends HInstruction {
-  HCreateBox(AbstractValue type) : super(<HInstruction>[], type);
+  HCreateBox(AbstractValue type) : super([], type);
 
   @override
   bool isAllocation(AbstractValueDomain domain) => true;
@@ -1834,7 +1837,7 @@
       AbstractValue resultType,
       this.typeArguments,
       SourceInformation sourceInformation,
-      {bool isIntercepted: false})
+      {bool isIntercepted = false})
       : super(selector, receiverType, null, inputs, isIntercepted, resultType) {
     this.sourceInformation = sourceInformation;
     assert(selector.callStructure.typeArgumentCount == typeArguments.length);
@@ -1883,7 +1886,7 @@
   bool get isTearOff => element != null && element.isFunction;
 
   @override
-  List<DartType> get typeArguments => const <DartType>[];
+  List<DartType> get typeArguments => const [];
 
   // There might be an interceptor input, so `inputs.last` is the dart receiver.
   @override
@@ -1920,7 +1923,7 @@
   accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
 
   @override
-  List<DartType> get typeArguments => const <DartType>[];
+  List<DartType> get typeArguments => const [];
 
   @override
   String toString() =>
@@ -1933,7 +1936,7 @@
   /// The type arguments passed in this static invocation.
   final List<DartType> typeArguments;
 
-  final bool targetCanThrow;
+  bool targetCanThrow;
 
   @override
   bool canThrow(AbstractValueDomain domain) => targetCanThrow;
@@ -1945,8 +1948,9 @@
   List<InterfaceType> instantiatedTypes;
 
   /// The first input must be the target.
-  HInvokeStatic(this.element, inputs, AbstractValue type, this.typeArguments,
-      {this.targetCanThrow: true, bool isIntercepted: false})
+  HInvokeStatic(this.element, List<HInstruction> inputs, AbstractValue type,
+      this.typeArguments,
+      {this.targetCanThrow = true, bool isIntercepted = false})
       : super(inputs, type) {
     isInterceptedCall = isIntercepted;
   }
@@ -2014,7 +2018,7 @@
       List<HInstruction> inputs,
       AbstractValue type,
       SourceInformation sourceInformation)
-      : super(element, inputs, type, const <DartType>[]) {
+      : super(element, inputs, type, const []) {
     this.sourceInformation = sourceInformation;
   }
 
@@ -2035,7 +2039,7 @@
   // creating the generator (T for new Completer<T>() inside the body).
   HInvokeGeneratorBody(FunctionEntity element, List<HInstruction> inputs,
       AbstractValue type, SourceInformation sourceInformation)
-      : super(element, inputs, type, const <DartType>[]) {
+      : super(element, inputs, type, const []) {
     this.sourceInformation = sourceInformation;
   }
 
@@ -2060,9 +2064,8 @@
   HFieldGet(FieldEntity element, HInstruction receiver, AbstractValue type,
       SourceInformation sourceInformation,
       {bool isAssignable})
-      : this.isAssignable =
-            (isAssignable != null) ? isAssignable : element.isAssignable,
-        super(element, <HInstruction>[receiver], type) {
+      : this.isAssignable = isAssignable ?? element.isAssignable,
+        super(element, [receiver], type) {
     this.sourceInformation = sourceInformation;
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -2111,7 +2114,7 @@
 class HFieldSet extends HFieldAccess {
   HFieldSet(AbstractValueDomain domain, FieldEntity element,
       HInstruction receiver, HInstruction value)
-      : super(element, <HInstruction>[receiver, value], domain.emptyType) {
+      : super(element, [receiver, value], domain.emptyType) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setChangesInstanceProperty();
@@ -2162,9 +2165,8 @@
 
 class HGetLength extends HInstruction {
   final bool isAssignable;
-  HGetLength(HInstruction receiver, AbstractValue type,
-      {bool this.isAssignable})
-      : super(<HInstruction>[receiver], type) {
+  HGetLength(HInstruction receiver, AbstractValue type, {this.isAssignable})
+      : super([receiver], type) {
     assert(isAssignable != null);
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -2219,16 +2221,15 @@
 
   HReadModifyWrite.assignOp(FieldEntity element, String jsOp,
       HInstruction receiver, HInstruction operand, AbstractValue type)
-      : this._(
-            element, jsOp, ASSIGN_OP, <HInstruction>[receiver, operand], type);
+      : this._(element, jsOp, ASSIGN_OP, [receiver, operand], type);
 
   HReadModifyWrite.preOp(FieldEntity element, String jsOp,
       HInstruction receiver, AbstractValue type)
-      : this._(element, jsOp, PRE_OP, <HInstruction>[receiver], type);
+      : this._(element, jsOp, PRE_OP, [receiver], type);
 
   HReadModifyWrite.postOp(FieldEntity element, String jsOp,
       HInstruction receiver, AbstractValue type)
-      : this._(element, jsOp, POST_OP, <HInstruction>[receiver], type);
+      : this._(element, jsOp, POST_OP, [receiver], type);
 
   HInstruction get receiver => inputs[0];
 
@@ -2269,7 +2270,7 @@
   // access.
   HLocalGet(Local variable, HLocalValue local, AbstractValue type,
       SourceInformation sourceInformation)
-      : super(variable, <HInstruction>[local], type) {
+      : super(variable, [local], type) {
     this.sourceInformation = sourceInformation;
   }
 
@@ -2285,7 +2286,7 @@
 class HLocalSet extends HLocalAccess {
   HLocalSet(AbstractValueDomain domain, Local variable, HLocalValue local,
       HInstruction value)
-      : super(variable, <HInstruction>[local, value], domain.emptyType);
+      : super(variable, [local, value], domain.emptyType);
 
   @override
   accept(HVisitor visitor) => visitor.visitLocalSet(this);
@@ -2411,7 +2412,7 @@
   NativeThrowBehavior throwBehavior;
 
   HForeignCode(this.codeTemplate, AbstractValue type, List<HInstruction> inputs,
-      {this.isStatement: false,
+      {this.isStatement = false,
       SideEffects effects,
       NativeBehavior nativeBehavior,
       NativeThrowBehavior throwBehavior})
@@ -2491,7 +2492,7 @@
 
 abstract class HInvokeBinary extends HInstruction {
   HInvokeBinary(HInstruction left, HInstruction right, AbstractValue type)
-      : super(<HInstruction>[left, right], type) {
+      : super([left, right], type) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     setUseGvn();
@@ -2715,7 +2716,7 @@
 }
 
 abstract class HInvokeUnary extends HInstruction {
-  HInvokeUnary(HInstruction input, type) : super(<HInstruction>[input], type) {
+  HInvokeUnary(HInstruction input, type) : super([input], type) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     setUseGvn();
@@ -2772,7 +2773,7 @@
 }
 
 class HExit extends HControlFlow {
-  HExit(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  HExit(AbstractValueDomain domain) : super(domain, const []);
   @override
   toString() => 'exit';
   @override
@@ -2780,7 +2781,7 @@
 }
 
 class HGoto extends HControlFlow {
-  HGoto(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  HGoto(AbstractValueDomain domain) : super(domain, const []);
   @override
   toString() => 'goto';
   @override
@@ -2793,14 +2794,14 @@
   HJump(AbstractValueDomain domain, this.target,
       SourceInformation sourceInformation)
       : label = null,
-        super(domain, const <HInstruction>[]) {
+        super(domain, const []) {
     this.sourceInformation = sourceInformation;
   }
   HJump.toLabel(AbstractValueDomain domain, LabelDefinition label,
       SourceInformation sourceInformation)
       : label = label,
         target = label.target,
-        super(domain, const <HInstruction>[]) {
+        super(domain, const []) {
     this.sourceInformation = sourceInformation;
   }
 }
@@ -2813,7 +2814,7 @@
 
   HBreak(AbstractValueDomain domain, JumpTarget target,
       SourceInformation sourceInformation,
-      {bool this.breakSwitchContinueLoop: false})
+      {this.breakSwitchContinueLoop = false})
       : super(domain, target, sourceInformation);
 
   HBreak.toLabel(AbstractValueDomain domain, LabelDefinition label,
@@ -2849,7 +2850,7 @@
   HLocalValue exception;
   HBasicBlock catchBlock;
   HBasicBlock finallyBlock;
-  HTry(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  HTry(AbstractValueDomain domain) : super(domain, const []);
   @override
   toString() => 'try';
   @override
@@ -2863,7 +2864,7 @@
 // leads to one of this instruction a predecessor of catch and
 // finally.
 class HExitTry extends HControlFlow {
-  HExitTry(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  HExitTry(AbstractValueDomain domain) : super(domain, const []);
   @override
   toString() => 'exit try';
   @override
@@ -2874,7 +2875,7 @@
 class HIf extends HConditionalBranch {
   HBlockFlow blockInformation = null;
   HIf(AbstractValueDomain domain, HInstruction condition)
-      : super(domain, <HInstruction>[condition]);
+      : super(domain, [condition]);
   @override
   toString() => 'if';
   @override
@@ -2900,7 +2901,7 @@
   final int kind;
   HLoopBranch(AbstractValueDomain domain, HInstruction condition,
       [this.kind = CONDITION_FIRST_LOOP])
-      : super(domain, <HInstruction>[condition]);
+      : super(domain, [condition]);
   @override
   toString() => 'loop-branch';
   @override
@@ -2910,7 +2911,7 @@
 class HConstant extends HInstruction {
   final ConstantValue constant;
   HConstant.internal(this.constant, AbstractValue constantType)
-      : super(<HInstruction>[], constantType);
+      : super([], constantType);
 
   @override
   toString() => 'literal: ${constant.toStructuredText(null)}';
@@ -2956,8 +2957,7 @@
 }
 
 class HNot extends HInstruction {
-  HNot(HInstruction value, AbstractValue type)
-      : super(<HInstruction>[value], type) {
+  HNot(HInstruction value, AbstractValue type) : super([value], type) {
     setUseGvn();
   }
 
@@ -2975,8 +2975,7 @@
 /// first use must be in an HLocalSet. That is, [HParameterValue]s have a
 /// value from the start, whereas [HLocalValue]s need to be initialized first.
 class HLocalValue extends HInstruction {
-  HLocalValue(Entity variable, AbstractValue type)
-      : super(<HInstruction>[], type) {
+  HLocalValue(Entity variable, AbstractValue type) : super([], type) {
     sourceElement = variable;
   }
 
@@ -3060,10 +3059,9 @@
       : super(inputs, type) {
     sourceElement = variable;
   }
-  HPhi.noInputs(Local variable, AbstractValue type)
-      : this(variable, <HInstruction>[], type);
+  HPhi.noInputs(Local variable, AbstractValue type) : this(variable, [], type);
   HPhi.singleInput(Local variable, HInstruction input, AbstractValue type)
-      : this(variable, <HInstruction>[input], type);
+      : this(variable, [input], type);
   HPhi.manyInputs(Local variable, List<HInstruction> inputs, AbstractValue type)
       : this(variable, inputs, type);
 
@@ -3185,7 +3183,7 @@
 class HThrowExpression extends HInstruction {
   HThrowExpression(AbstractValueDomain domain, HInstruction value,
       SourceInformation sourceInformation)
-      : super(<HInstruction>[value], domain.emptyType) {
+      : super([value], domain.emptyType) {
     this.sourceInformation = sourceInformation;
   }
   @override
@@ -3197,8 +3195,7 @@
 }
 
 class HAwait extends HInstruction {
-  HAwait(HInstruction value, AbstractValue type)
-      : super(<HInstruction>[value], type);
+  HAwait(HInstruction value, AbstractValue type) : super([value], type);
   @override
   toString() => 'await';
   @override
@@ -3207,13 +3204,13 @@
   @override
   bool canThrow(AbstractValueDomain domain) => true;
   @override
-  SideEffects sideEffects = new SideEffects();
+  SideEffects sideEffects = SideEffects();
 }
 
 class HYield extends HInstruction {
   HYield(AbstractValueDomain domain, HInstruction value, this.hasStar,
       SourceInformation sourceInformation)
-      : super(<HInstruction>[value], domain.emptyType) {
+      : super([value], domain.emptyType) {
     this.sourceInformation = sourceInformation;
   }
   bool hasStar;
@@ -3224,15 +3221,15 @@
   @override
   bool canThrow(AbstractValueDomain domain) => false;
   @override
-  SideEffects sideEffects = new SideEffects();
+  SideEffects sideEffects = SideEffects();
 }
 
 class HThrow extends HControlFlow {
   final bool isRethrow;
   HThrow(AbstractValueDomain domain, HInstruction value,
       SourceInformation sourceInformation,
-      {this.isRethrow: false})
-      : super(domain, <HInstruction>[value]) {
+      {this.isRethrow = false})
+      : super(domain, [value]) {
     this.sourceInformation = sourceInformation;
   }
   @override
@@ -3248,7 +3245,7 @@
   final MemberEntity element;
 
   HStatic(this.element, AbstractValue type, SourceInformation sourceInformation)
-      : super(<HInstruction>[], type) {
+      : super([], type) {
     assert(element != null);
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -3290,7 +3287,7 @@
   //
 
   HInterceptor(HInstruction receiver, AbstractValue type)
-      : super(<HInstruction>[receiver], type) {
+      : super([receiver], type) {
     this.sourceInformation = receiver.sourceInformation;
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
@@ -3364,7 +3361,7 @@
 
   HLazyStatic(
       this.element, AbstractValue type, SourceInformation sourceInformation)
-      : super(<HInstruction>[], type) {
+      : super([], type) {
     // TODO(4931): The first access has side-effects, but we afterwards we
     // should be able to GVN.
     sideEffects.setAllSideEffects();
@@ -3389,7 +3386,7 @@
 class HStaticStore extends HInstruction {
   MemberEntity element;
   HStaticStore(AbstractValueDomain domain, this.element, HInstruction value)
-      : super(<HInstruction>[value], domain.emptyType) {
+      : super([value], domain.emptyType) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setChangesStaticProperty();
@@ -3427,7 +3424,7 @@
 /// does not throw because we generate the checks explicitly.
 class HIndex extends HInstruction {
   HIndex(HInstruction receiver, HInstruction index, AbstractValue type)
-      : super(<HInstruction>[receiver, index], type) {
+      : super([receiver, index], type) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setDependsOnIndexStore();
@@ -3468,7 +3465,7 @@
 class HIndexAssign extends HInstruction {
   HIndexAssign(AbstractValueDomain domain, HInstruction receiver,
       HInstruction index, HInstruction value)
-      : super(<HInstruction>[receiver, index, value], domain.emptyType) {
+      : super([receiver, index, value], domain.emptyType) {
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     sideEffects.setChangesIndex();
@@ -3517,10 +3514,10 @@
 /// Check for receiver or argument type when lowering operation to a primitive,
 /// e.g. lowering `+` to [HAdd].
 ///
-/// After NNBD, `a + b` will require `a` and `b` are non-nullable and these
-/// checks will become explicit in the source (e.g. `a! + b!`). At that time,
-/// this check should be removed.  If needed, the `!` check can be optimized
-/// give the same signals to the JavaScript VM.
+/// With sound null safety, `a + b` will require `a` and `b` to be non-nullable
+/// and these checks will become explicit in the source (e.g. `a! + b!`). At
+/// that time, this check should be removed. If needed, the `!` check can be
+/// optimized to give the same signals to the JavaScript VM.
 class HPrimitiveCheck extends HCheck {
   // Values for [kind].
   static const int ARGUMENT_TYPE_CHECK = 1;
@@ -3543,7 +3540,7 @@
       HInstruction input, SourceInformation sourceInformation,
       {this.receiverTypeCheckSelector})
       : checkedType = type,
-        super(<HInstruction>[input], type) {
+        super([input], type) {
     assert(isReceiverTypeCheck == (receiverTypeCheckSelector != null));
     this.sourceElement = input.sourceElement;
     this.sourceInformation = sourceInformation;
@@ -3590,15 +3587,15 @@
 }
 
 /// A check that the input to a condition (if, ?:, while, etc) is non-null. The
-/// front-end generates 'as bool' checks, but until the transition to NNBD is
-/// complete, this allows `null` to be passed to the condition.
+/// front-end generates 'as bool' checks, but until the transition to null
+/// safety is complete, this allows `null` to be passed to the condition.
 ///
 // TODO(sra): Once NNDB is far enough along that the front-end can generate `as
 // bool!` checks and the backend checks them correctly, this instruction will
 // become unnecessary and should be removed.
 class HBoolConversion extends HCheck {
   HBoolConversion(HInstruction input, AbstractValue type)
-      : super(<HInstruction>[input], type);
+      : super([input], type);
 
   @override
   bool isJsStatement() => false;
@@ -3641,7 +3638,7 @@
   FieldEntity field;
 
   HNullCheck(HInstruction input, AbstractValue type, {this.sticky = false})
-      : super(<HInstruction>[input], type);
+      : super([input], type);
 
   @override
   bool isControlFlow() => true;
@@ -3681,16 +3678,13 @@
   AbstractValue knownType;
   final bool _isMovable;
 
-  HTypeKnown.pinned(AbstractValue knownType, HInstruction input)
-      : this.knownType = knownType,
-        this._isMovable = false,
-        super(<HInstruction>[input], knownType);
+  HTypeKnown.pinned(this.knownType, HInstruction input)
+      : this._isMovable = false,
+        super([input], knownType);
 
-  HTypeKnown.witnessed(
-      AbstractValue knownType, HInstruction input, HInstruction witness)
-      : this.knownType = knownType,
-        this._isMovable = true,
-        super(<HInstruction>[input, witness], knownType);
+  HTypeKnown.witnessed(this.knownType, HInstruction input, HInstruction witness)
+      : this._isMovable = true,
+        super([input, witness], knownType);
 
   @override
   toString() => 'TypeKnown $knownType';
@@ -3734,8 +3728,7 @@
 }
 
 class HRangeConversion extends HCheck {
-  HRangeConversion(HInstruction input, type)
-      : super(<HInstruction>[input], type) {
+  HRangeConversion(HInstruction input, type) : super([input], type) {
     sourceElement = input.sourceElement;
   }
 
@@ -3748,7 +3741,7 @@
 
 class HStringConcat extends HInstruction {
   HStringConcat(HInstruction left, HInstruction right, AbstractValue type)
-      : super(<HInstruction>[left, right], type) {
+      : super([left, right], type) {
     // TODO(sra): Until Issue 9293 is fixed, this false dependency keeps the
     // concats bunched with stringified inputs for much better looking code with
     // fewer temps.
@@ -3768,7 +3761,7 @@
 /// into a String value.
 class HStringify extends HInstruction {
   HStringify(HInstruction input, AbstractValue resultType)
-      : super(<HInstruction>[input], resultType) {
+      : super([input], resultType) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
   }
@@ -3782,21 +3775,19 @@
 /// Non-block-based (aka. traditional) loop information.
 class HLoopInformation {
   final HBasicBlock header;
-  final List<HBasicBlock> blocks;
-  final List<HBasicBlock> backEdges;
+  final List<HBasicBlock> blocks = [];
+  final List<HBasicBlock> backEdges = [];
   final List<LabelDefinition> labels;
   final JumpTarget target;
 
   /// Corresponding block information for the loop.
   HLoopBlockInformation loopBlockInformation;
 
-  HLoopInformation(this.header, this.target, this.labels)
-      : blocks = <HBasicBlock>[],
-        backEdges = <HBasicBlock>[];
+  HLoopInformation(this.header, this.target, this.labels);
 
   void addBackEdge(HBasicBlock predecessor) {
     backEdges.add(predecessor);
-    List<HBasicBlock> workQueue = <HBasicBlock>[predecessor];
+    List<HBasicBlock> workQueue = [predecessor];
     do {
       HBasicBlock current = workQueue.removeLast();
       addBlock(current, workQueue);
@@ -3927,13 +3918,13 @@
   final bool isContinue;
 
   HLabeledBlockInformation(this.body, List<LabelDefinition> labels,
-      {this.isContinue: false})
+      {this.isContinue = false})
       : this.labels = labels,
         this.target = labels[0].target;
 
   HLabeledBlockInformation.implicit(this.body, this.target,
-      {this.isContinue: false})
-      : this.labels = const <LabelDefinition>[];
+      {this.isContinue = false})
+      : this.labels = const [];
 
   @override
   HBasicBlock get start => body.start;
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 9faff8ee..d600d7e 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -50,7 +50,7 @@
 class SsaOptimizerTask extends CompilerTask {
   final CompilerOptions _options;
 
-  Map<HInstruction, Range> ranges = <HInstruction, Range>{};
+  Map<HInstruction, Range> ranges = {};
 
   Map<MemberEntity, OptimizationTestLog> loggersForTesting;
 
@@ -82,83 +82,83 @@
     if (retainDataForTesting) {
       loggersForTesting ??= {};
       loggersForTesting[member] =
-          log = new OptimizationTestLog(closedWorld.dartTypes);
+          log = OptimizationTestLog(closedWorld.dartTypes);
     }
 
     measure(() {
-      List<OptimizationPhase> phases = <OptimizationPhase>[
+      List<OptimizationPhase> phases = [
         // Run trivial instruction simplification first to optimize
         // some patterns useful for type conversion.
-        new SsaInstructionSimplifier(globalInferenceResults, _options,
-            closedWorld, typeRecipeDomain, registry, log),
-        new SsaTypeConversionInserter(closedWorld),
-        new SsaRedundantPhiEliminator(),
-        new SsaDeadPhiEliminator(),
-        new SsaTypePropagator(globalInferenceResults,
-            closedWorld.commonElements, closedWorld, log),
+        SsaInstructionSimplifier(globalInferenceResults, _options, closedWorld,
+            typeRecipeDomain, registry, log),
+        SsaTypeConversionInserter(closedWorld),
+        SsaRedundantPhiEliminator(),
+        SsaDeadPhiEliminator(),
+        SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+            closedWorld, log),
         // After type propagation, more instructions can be
         // simplified.
-        new SsaInstructionSimplifier(globalInferenceResults, _options,
-            closedWorld, typeRecipeDomain, registry, log),
-        new SsaInstructionSimplifier(globalInferenceResults, _options,
-            closedWorld, typeRecipeDomain, registry, log),
-        new SsaTypePropagator(globalInferenceResults,
-            closedWorld.commonElements, closedWorld, log),
+        SsaInstructionSimplifier(globalInferenceResults, _options, closedWorld,
+            typeRecipeDomain, registry, log),
+        SsaInstructionSimplifier(globalInferenceResults, _options, closedWorld,
+            typeRecipeDomain, registry, log),
+        SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+            closedWorld, log),
         // Run a dead code eliminator before LICM because dead
         // interceptors are often in the way of LICM'able instructions.
-        new SsaDeadCodeEliminator(closedWorld, this),
-        new SsaGlobalValueNumberer(closedWorld.abstractValueDomain),
+        SsaDeadCodeEliminator(closedWorld, this),
+        SsaGlobalValueNumberer(closedWorld.abstractValueDomain),
         // After GVN, some instructions might need their type to be
         // updated because they now have different inputs.
-        new SsaTypePropagator(globalInferenceResults,
-            closedWorld.commonElements, closedWorld, log),
-        codeMotion = new SsaCodeMotion(closedWorld.abstractValueDomain),
-        loadElimination = new SsaLoadElimination(closedWorld),
-        new SsaRedundantPhiEliminator(),
-        new SsaDeadPhiEliminator(),
+        SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+            closedWorld, log),
+        codeMotion = SsaCodeMotion(closedWorld.abstractValueDomain),
+        loadElimination = SsaLoadElimination(closedWorld),
+        SsaRedundantPhiEliminator(),
+        SsaDeadPhiEliminator(),
         // After GVN and load elimination the same value may be used in code
         // controlled by a test on the value, so redo 'conversion insertion' to
         // learn from the refined type.
-        new SsaTypeConversionInserter(closedWorld),
-        new SsaTypePropagator(globalInferenceResults,
-            closedWorld.commonElements, closedWorld, log),
-        new SsaValueRangeAnalyzer(closedWorld, this),
+        SsaTypeConversionInserter(closedWorld),
+        SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+            closedWorld, log),
+        SsaValueRangeAnalyzer(closedWorld, this),
         // Previous optimizations may have generated new
         // opportunities for instruction simplification.
-        new SsaInstructionSimplifier(globalInferenceResults, _options,
-            closedWorld, typeRecipeDomain, registry, log),
+        SsaInstructionSimplifier(globalInferenceResults, _options, closedWorld,
+            typeRecipeDomain, registry, log),
       ];
       phases.forEach(runPhase);
 
       // Simplifying interceptors is just an optimization, it is required for
       // implementation correctness because the code generator assumes it is
       // always performed to compute the intercepted classes sets.
-      runPhase(new SsaSimplifyInterceptors(closedWorld, member.enclosingClass));
+      runPhase(SsaSimplifyInterceptors(closedWorld, member.enclosingClass));
 
-      SsaDeadCodeEliminator dce = new SsaDeadCodeEliminator(closedWorld, this);
+      SsaDeadCodeEliminator dce = SsaDeadCodeEliminator(closedWorld, this);
       runPhase(dce);
       if (codeMotion.movedCode ||
           dce.eliminatedSideEffects ||
           dce.newGvnCandidates ||
           loadElimination.newGvnCandidates) {
-        phases = <OptimizationPhase>[
-          new SsaTypePropagator(globalInferenceResults,
-              closedWorld.commonElements, closedWorld, log),
-          new SsaGlobalValueNumberer(closedWorld.abstractValueDomain),
-          new SsaCodeMotion(closedWorld.abstractValueDomain),
-          new SsaValueRangeAnalyzer(closedWorld, this),
-          new SsaInstructionSimplifier(globalInferenceResults, _options,
+        phases = [
+          SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+              closedWorld, log),
+          SsaGlobalValueNumberer(closedWorld.abstractValueDomain),
+          SsaCodeMotion(closedWorld.abstractValueDomain),
+          SsaValueRangeAnalyzer(closedWorld, this),
+          SsaInstructionSimplifier(globalInferenceResults, _options,
               closedWorld, typeRecipeDomain, registry, log),
-          new SsaSimplifyInterceptors(closedWorld, member.enclosingClass),
-          new SsaDeadCodeEliminator(closedWorld, this),
+          SsaSimplifyInterceptors(closedWorld, member.enclosingClass),
+          SsaDeadCodeEliminator(closedWorld, this),
         ];
       } else {
-        phases = <OptimizationPhase>[
-          new SsaTypePropagator(globalInferenceResults,
-              closedWorld.commonElements, closedWorld, log),
+        phases = [
+          SsaTypePropagator(globalInferenceResults, closedWorld.commonElements,
+              closedWorld, log),
           // Run the simplifier to remove unneeded type checks inserted by
           // type propagation.
-          new SsaInstructionSimplifier(globalInferenceResults, _options,
+          SsaInstructionSimplifier(globalInferenceResults, _options,
               closedWorld, typeRecipeDomain, registry, log),
         ];
       }
@@ -375,7 +375,7 @@
         _mostlyEmpty(whenNotNullBlock)) {
       HInstruction trueConstant = _graph.addConstantBool(true, _closedWorld);
       HInstruction replacement =
-          new HIdentity(tested, trueConstant, _abstractValueDomain.boolType)
+          HIdentity(tested, trueConstant, _abstractValueDomain.boolType)
             ..sourceElement = phi.sourceElement
             ..sourceInformation = phi.sourceInformation;
       block.rewrite(phi, replacement);
@@ -397,19 +397,19 @@
         _mostlyEmpty(whenNotNullBlock)) {
       HInstruction falseConstant = _graph.addConstantBool(false, _closedWorld);
       HInstruction compare =
-          new HIdentity(tested, falseConstant, _abstractValueDomain.boolType);
+          HIdentity(tested, falseConstant, _abstractValueDomain.boolType);
       block.addAtEntry(compare);
-      HInstruction replacement =
-          new HNot(compare, _abstractValueDomain.boolType)
-            ..sourceElement = phi.sourceElement
-            ..sourceInformation = phi.sourceInformation;
+      HInstruction replacement = HNot(compare, _abstractValueDomain.boolType)
+        ..sourceElement = phi.sourceElement
+        ..sourceInformation = phi.sourceInformation;
       block.rewrite(phi, replacement);
       block.addAfter(compare, replacement);
       block.removePhi(phi);
       return;
     }
 
-    // TODO(sra): Consider other simple diamonds, e.g. with the addition of a special instruction,
+    // TODO(sra): Consider other simple diamonds, e.g. with the addition of a
+    // special instruction,
     //
     //     s == null ? "" : s  --->  s || "".
     return;
@@ -447,7 +447,8 @@
 
   ConstantValue getConstantFromType(HInstruction node) {
     if (node.isValue(_abstractValueDomain) &&
-        node.isNull(_abstractValueDomain).isDefinitelyFalse) {
+        node.isNull(_abstractValueDomain).isDefinitelyFalse &&
+        node.isLateSentinel(_abstractValueDomain).isDefinitelyFalse) {
       ConstantValue value =
           _abstractValueDomain.getPrimitiveValue(node.instructionType);
       if (value.isBool) {
@@ -564,7 +565,7 @@
   @override
   HInstruction visitInvokeUnary(HInvokeUnary node) {
     HInstruction folded = foldUnary(node.operation(), node.operand);
-    return folded != null ? folded : node;
+    return folded ?? node;
   }
 
   HInstruction foldUnary(
@@ -606,7 +607,7 @@
         resultType = _abstractValueDomain.uint32Type;
       }
       HGetLength result =
-          new HGetLength(actualReceiver, resultType, isAssignable: !isFixed);
+          HGetLength(actualReceiver, resultType, isAssignable: !isFixed);
       return result;
     } else if (actualReceiver.isConstantMap()) {
       HConstant constantInput = actualReceiver;
@@ -672,7 +673,7 @@
           HInstruction argument = node.inputs[2];
           if (argument.isString(_abstractValueDomain).isDefinitelyTrue &&
               input.isNull(_abstractValueDomain).isDefinitelyFalse) {
-            return new HStringConcat(input, argument, node.instructionType);
+            return HStringConcat(input, argument, node.instructionType);
           }
         } else if (applies(commonElements.jsStringToString) &&
             input.isNull(_abstractValueDomain).isDefinitelyFalse) {
@@ -689,7 +690,7 @@
         // bounds check will become explicit, so we won't need this
         // optimization.
         // TODO(sra): Fix comment - SsaCheckInserter is deleted.
-        HInvokeDynamicMethod result = new HInvokeDynamicMethod(
+        HInvokeDynamicMethod result = HInvokeDynamicMethod(
             node.selector,
             node.receiverType,
             node.inputs.sublist(1), // Drop interceptor.
@@ -726,7 +727,7 @@
 
     AbstractValue resultMask = _abstractValueDomain.growableListType;
 
-    HInvokeDynamicMethod splitInstruction = new HInvokeDynamicMethod(
+    HInvokeDynamicMethod splitInstruction = HInvokeDynamicMethod(
         node.selector,
         node.receiverType,
         node.inputs.sublist(1), // Drop interceptor.
@@ -750,11 +751,8 @@
         _abstractValueDomain.dynamicType);
     node.block.addBefore(node, typeInfo);
 
-    HInvokeStatic tagInstruction = new HInvokeStatic(
-        commonElements.setArrayType,
-        <HInstruction>[splitInstruction, typeInfo],
-        resultMask,
-        const <DartType>[]);
+    HInvokeStatic tagInstruction = HInvokeStatic(commonElements.setArrayType,
+        [splitInstruction, typeInfo], resultMask, const <DartType>[]);
     // 'Linear typing' trick: [tagInstruction] is the only use of the
     // [splitInstruction], so it becomes the sole alias.
     // TODO(sra): Build this knowledge into alias analysis.
@@ -838,12 +836,14 @@
           node.block.addBefore(node, load);
           insertionPoint = load;
         }
-        Selector callSelector = new Selector.callClosureFrom(node.selector);
-        List<HInstruction> inputs = <HInstruction>[load]
-          ..addAll(node.inputs.skip(node.isInterceptedCall ? 2 : 1));
+        Selector callSelector = Selector.callClosureFrom(node.selector);
+        List<HInstruction> inputs = [
+          load,
+          ...node.inputs.skip(node.isInterceptedCall ? 2 : 1)
+        ];
         DartType fieldType =
             _closedWorld.elementEnvironment.getFieldType(field);
-        HInstruction closureCall = new HInvokeClosure(
+        HInstruction closureCall = HInvokeClosure(
             callSelector,
             _abstractValueDomain
                 .createFromStaticType(fieldType, nullable: true)
@@ -1128,7 +1128,7 @@
       if (constant.constant.isTrue) {
         return input;
       } else {
-        return new HNot(input, _abstractValueDomain.boolType);
+        return HNot(input, _abstractValueDomain.boolType);
       }
     }
 
@@ -1158,23 +1158,95 @@
     return null;
   }
 
+  FieldEntity _indexFieldOfEnumClass(ClassEntity enumClass) {
+    MemberEntity member =
+        _closedWorld.elementEnvironment.lookupClassMember(enumClass, 'index');
+    if (member is FieldEntity) return member;
+    throw StateError('$enumClass should have index field, found $member');
+  }
+
+  IntConstantValue _indexValueOfEnumConstant(
+      ConstantValue constant, ClassEntity enumClass, FieldEntity field) {
+    if (constant is ConstructedConstantValue) {
+      if (constant.type.element == enumClass) {
+        final value = constant.fields[field];
+        if (value is IntConstantValue) return value;
+      }
+    }
+    throw StateError(
+        'Enum constant ${constant.toStructuredText(_closedWorld.dartTypes)}'
+        ' should have $field');
+  }
+
+  // The `enum` class of the [node], or `null` if [node] does not have an
+  // non-nullable enum type.
+  ClassEntity _enumClass(HInstruction node) {
+    final cls = _abstractValueDomain.getExactClass(node.instructionType);
+    if (cls == null) return null;
+    if (_closedWorld.elementEnvironment.isEnumClass(cls)) return cls;
+    return null;
+  }
+
+  // Try to replace enum labels in a switch with the index values. This is
+  // usually smaller, faster, and might allow the JavaScript engine to compile
+  // the switch to a jump-table.
+  void _tryReduceEnumsInSwitch(HSwitch node) {
+    final enumClass = _enumClass(node.expression);
+    if (enumClass == null) return;
+
+    FieldEntity indexField = _indexFieldOfEnumClass(enumClass);
+    // In some cases the `index` field is elided. We can't load an elided field.
+    //
+    // TODO(sra): The ConstantValue has the index value, so we can still reduce
+    // the enum to the index value. We could handle an elided `index` field in
+    // some cases by doing this optimization more like scalar replacement or
+    // unboxing, replacing all enums in the method at once, possibly reducing
+    // phis of enums to phis of indexes.
+    if (_closedWorld.fieldAnalysis.getFieldData(indexField).isElided) return;
+
+    // All the label expressions should be of the same enum class as the switch
+    // expression.
+    for (final label in node.inputs.skip(1)) {
+      if (label is! HConstant) return;
+      if (_enumClass(label) != enumClass) return;
+    }
+
+    final loadIndex = _directFieldGet(node.expression, indexField, node);
+    node.block.addBefore(node, loadIndex);
+    node.replaceInput(0, loadIndex);
+
+    for (int i = 1; i < node.inputs.length; i++) {
+      ConstantValue labelConstant = (node.inputs[i] as HConstant).constant;
+      node.replaceInput(
+          i,
+          _graph.addConstant(
+              _indexValueOfEnumConstant(labelConstant, enumClass, indexField),
+              _closedWorld));
+    }
+  }
+
+  @override
+  HInstruction visitSwitch(HSwitch node) {
+    _tryReduceEnumsInSwitch(node);
+    return node;
+  }
+
   @override
   HInstruction visitIdentity(HIdentity node) {
     HInstruction newInstruction = handleIdentityCheck(node);
-    return newInstruction == null ? super.visitIdentity(node) : newInstruction;
+    return newInstruction ?? super.visitIdentity(node);
   }
 
   @override
   HInstruction visitIsLateSentinel(HIsLateSentinel node) {
     HInstruction value = node.inputs[0];
-    if (value is HConstant) {
-      return _graph.addConstantBool(
-          value.constant is LateSentinelConstantValue, _closedWorld);
+    AbstractBool isLateSentinel = value.isLateSentinel(_abstractValueDomain);
+    if (isLateSentinel.isDefinitelyTrue) {
+      return _graph.addConstantBool(true, _closedWorld);
+    } else if (isLateSentinel.isDefinitelyFalse) {
+      return _graph.addConstantBool(false, _closedWorld);
     }
 
-    // TODO(fishythefish): Simplify to `false` when the input cannot evalute to
-    // the sentinel. This can be implemented in the powerset domain.
-
     return super.visitIsLateSentinel(node);
   }
 
@@ -1282,10 +1354,7 @@
 
   /// Returns [node] after replacing condition.
   HInstruction _replaceHIfCondition(HIf node, HInstruction newCondition) {
-    HInstruction condition = node.condition;
-    node.inputs[0] = newCondition;
-    condition.usedBy.remove(node);
-    newCondition.usedBy.add(node);
+    node.replaceInput(0, newCondition);
     return node;
   }
 
@@ -1398,8 +1467,7 @@
         isFixedLength(receiver.instructionType, _closedWorld)) {
       // The input type has changed to fixed-length so change to an unassignable
       // HGetLength to allow more GVN optimizations.
-      return new HGetLength(receiver, node.instructionType,
-          isAssignable: false);
+      return HGetLength(receiver, node.instructionType, isAssignable: false);
     }
     return node;
   }
@@ -1599,7 +1667,7 @@
         if (parameterStructure.callStructure == node.selector.callStructure) {
           // TODO(sra): Handle adding optional arguments default values.
           assert(!node.isInterceptedCall);
-          return new HInvokeStatic(target, node.inputs.skip(1).toList(),
+          return HInvokeStatic(target, node.inputs.skip(1).toList(),
               node.instructionType, node.typeArguments)
             ..sourceInformation = node.sourceInformation;
         }
@@ -1615,7 +1683,7 @@
 
     if (element == commonElements.identicalFunction) {
       if (node.inputs.length == 2) {
-        return new HIdentity(
+        return HIdentity(
             node.inputs[0], node.inputs[1], _abstractValueDomain.boolType)
           ..sourceInformation = node.sourceInformation;
       }
@@ -1759,7 +1827,7 @@
             .createString(leftString.stringValue + rightString.stringValue),
         _closedWorld);
     if (prefix == null) return folded;
-    return new HStringConcat(prefix, folded, _abstractValueDomain.stringType);
+    return HStringConcat(prefix, folded, _abstractValueDomain.stringType);
   }
 
   @override
@@ -1824,8 +1892,8 @@
       if (_abstractValueDomain
           .isInterceptor(input.instructionType)
           .isDefinitelyFalse) {
-        var inputs = <HInstruction>[input, input]; // [interceptor, receiver].
-        HInstruction result = new HInvokeDynamicMethod(
+        List<HInstruction> inputs = [input, input]; // [interceptor, receiver].
+        HInstruction result = HInvokeDynamicMethod(
             selector,
             input.instructionType, // receiver type.
             inputs,
@@ -1926,8 +1994,8 @@
   @override
   HInstruction visitAsCheck(HAsCheck node) {
     // 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.
+    // [visitAsCheckSimple]) when running with sound null safety. We might get
+    // this for free if nullability is precisely propagated to the typemasks.
 
     HInstruction typeInput = node.typeInput;
     if (typeInput is HLoadType) {
@@ -2310,8 +2378,7 @@
   final SsaOptimizerTask optimizer;
   HGraph _graph;
   SsaLiveBlockAnalyzer analyzer;
-  Map<HInstruction, bool> trivialDeadStoreReceivers =
-      new Maplet<HInstruction, bool>();
+  Map<HInstruction, bool> trivialDeadStoreReceivers = Maplet();
   bool eliminatedSideEffects = false;
   bool newGvnCandidates = false;
 
@@ -2425,7 +2492,7 @@
   @override
   void visitGraph(HGraph graph) {
     _graph = graph;
-    analyzer = new SsaLiveBlockAnalyzer(graph, closedWorld, optimizer);
+    analyzer = SsaLiveBlockAnalyzer(graph, closedWorld, optimizer);
     analyzer.analyze();
     visitPostDominatorTree(graph);
     cleanPhis();
@@ -2509,9 +2576,7 @@
       // Pick the 'live' branch to be the smallest subgraph.
       bool value = thenSize <= elseSize;
       HInstruction newCondition = _graph.addConstantBool(value, closedWorld);
-      instruction.inputs[0] = newCondition;
-      condition.usedBy.remove(instruction);
-      newCondition.usedBy.add(instruction);
+      instruction.replaceInput(0, newCondition);
     }
   }
 
@@ -2566,7 +2631,7 @@
       block.forEachPhi((HPhi phi) {
         for (int i = 0; i < phi.inputs.length; ++i) {
           if (!predecessors[i].isLive && phi.inputs[i] != zapInstruction) {
-            replaceInput(i, phi, zapInstruction);
+            phi.replaceInput(i, zapInstruction);
           }
         }
       });
@@ -2601,12 +2666,6 @@
     }
   }
 
-  void replaceInput(int i, HInstruction from, HInstruction by) {
-    from.inputs[i].usedBy.remove(from);
-    from.inputs[i] = by;
-    by.usedBy.add(from);
-  }
-
   void removeUsers(HInstruction instruction) {
     instruction.usedBy.forEach((user) {
       removeInput(user, instruction);
@@ -2627,8 +2686,8 @@
 
 class SsaLiveBlockAnalyzer extends HBaseVisitor {
   final HGraph graph;
-  final Set<HBasicBlock> live = new Set<HBasicBlock>();
-  final List<HBasicBlock> worklist = <HBasicBlock>[];
+  final Set<HBasicBlock> live = {};
+  final List<HBasicBlock> worklist = [];
   final SsaOptimizerTask optimizer;
   final JClosedWorld closedWorld;
 
@@ -2686,7 +2745,7 @@
         IntValue upperValue = switchRange.upper;
         BigInt lower = lowerValue.value;
         BigInt upper = upperValue.value;
-        Set<BigInt> liveLabels = new Set<BigInt>();
+        Set<BigInt> liveLabels = {};
         for (int pos = 1; pos < node.inputs.length; pos++) {
           HConstant input = node.inputs[pos];
           if (!input.isConstantInteger()) continue;
@@ -2697,7 +2756,7 @@
             liveLabels.add(label);
           }
         }
-        if (new BigInt.from(liveLabels.length) != upper - lower + BigInt.one) {
+        if (BigInt.from(liveLabels.length) != upper - lower + BigInt.one) {
           markBlockLive(node.defaultTarget);
         }
         return;
@@ -2713,9 +2772,9 @@
 
   @override
   void visitGraph(HGraph graph) {
-    final List<HPhi> worklist = <HPhi>[];
+    final List<HPhi> worklist = [];
     // A set to keep track of the live phis that we found.
-    final Set<HPhi> livePhis = new Set<HPhi>();
+    final Set<HPhi> livePhis = {};
 
     // Add to the worklist all live phis: phis referenced by non-phi
     // instructions.
@@ -2772,7 +2831,7 @@
 
   @override
   void visitGraph(HGraph graph) {
-    final List<HPhi> worklist = <HPhi>[];
+    final List<HPhi> worklist = [];
 
     // Add all phis in the worklist.
     for (final block in graph.blocks) {
@@ -2830,20 +2889,18 @@
   final AbstractValueDomain _abstractValueDomain;
   @override
   final String name = "SsaGlobalValueNumberer";
-  final Set<int> visited;
+  final Set<int> visited = {};
 
   List<int> blockChangesFlags;
   List<int> loopChangesFlags;
 
-  SsaGlobalValueNumberer(this._abstractValueDomain) : visited = new Set<int>();
+  SsaGlobalValueNumberer(this._abstractValueDomain);
 
   @override
   void visitGraph(HGraph graph) {
     computeChangesFlags(graph);
     moveLoopInvariantCode(graph);
-    List<GvnWorkItem> workQueue = <GvnWorkItem>[
-      new GvnWorkItem(graph.entry, new ValueSet())
-    ];
+    List<GvnWorkItem> workQueue = [GvnWorkItem(graph.entry, ValueSet())];
     do {
       GvnWorkItem item = workQueue.removeLast();
       visitBasicBlock(item.block, item.valueSet, workQueue);
@@ -2976,7 +3033,7 @@
         } while (!workQueue.isEmpty);
         successorValues.kill(changesFlags);
       }
-      workQueue.add(new GvnWorkItem(dominated, successorValues));
+      workQueue.add(GvnWorkItem(dominated, successorValues));
     }
   }
 
@@ -2985,8 +3042,8 @@
     // loop changes flags list to zero so we can use bitwise or when
     // propagating loop changes upwards.
     final int length = graph.blocks.length;
-    blockChangesFlags = new List<int>.filled(length, null);
-    loopChangesFlags = new List<int>.filled(length, null);
+    blockChangesFlags = List<int>.filled(length, null);
+    loopChangesFlags = List<int>.filled(length, null);
     for (int i = 0; i < length; i++) loopChangesFlags[i] = 0;
 
     // Run through all the basic blocks in the graph and fill in the
@@ -3067,9 +3124,9 @@
 
   @override
   void visitGraph(HGraph graph) {
-    values = new List<ValueSet>.filled(graph.blocks.length, null);
+    values = List<ValueSet>.filled(graph.blocks.length, null);
     for (int i = 0; i < graph.blocks.length; i++) {
-      values[graph.blocks[i].id] = new ValueSet();
+      values[graph.blocks[i].id] = ValueSet();
     }
     visitPostDominatorTree(graph);
   }
@@ -3198,15 +3255,15 @@
       }
     }
 
-    HTypeKnown newInput = new HTypeKnown.pinned(convertedType, input);
+    HTypeKnown newInput = HTypeKnown.pinned(convertedType, input);
     dominator.addBefore(dominator.first, newInput);
     dominatedUses.replaceWith(newInput);
   }
 
   @override
   void visitIsTest(HIsTest instruction) {
-    List<HBasicBlock> trueTargets = <HBasicBlock>[];
-    List<HBasicBlock> falseTargets = <HBasicBlock>[];
+    List<HBasicBlock> trueTargets = [];
+    List<HBasicBlock> falseTargets = [];
 
     collectTargets(instruction, trueTargets, falseTargets);
 
@@ -3264,8 +3321,8 @@
       return;
     }
 
-    List<HBasicBlock> trueTargets = <HBasicBlock>[];
-    List<HBasicBlock> falseTargets = <HBasicBlock>[];
+    List<HBasicBlock> trueTargets = [];
+    List<HBasicBlock> falseTargets = [];
 
     collectTargets(instruction, trueTargets, falseTargets);
 
@@ -3327,6 +3384,14 @@
   bool newGvnCandidates = false;
   HGraph _graph;
 
+  // Blocks that can be reached via control flow not expressed by the basic
+  // block CFG. These are catch and finally blocks that are reached from some
+  // mid-block instruction that throws in the CFG region corresponding to the
+  // Dart language try-block. The value stored in the map is the HTry that owns
+  // the catch or finally block. This map is filled in on-the-fly since the HTry
+  // dominates the catch and finally so is visited first.
+  Map<HBasicBlock, HTry> _blocksWithImprecisePredecessors;
+
   SsaLoadElimination(this._closedWorld)
       : _fieldAnalysis = _closedWorld.fieldAnalysis;
 
@@ -3336,7 +3401,7 @@
   @override
   void visitGraph(HGraph graph) {
     _graph = graph;
-    memories = new List<MemorySet>.filled(graph.blocks.length, null);
+    memories = List<MemorySet>.filled(graph.blocks.length, null);
     List<HBasicBlock> blocks = graph.blocks;
     for (int i = 0; i < blocks.length; i++) {
       HBasicBlock block = blocks[i];
@@ -3358,7 +3423,7 @@
     final indegree = predecessors.length;
     if (indegree == 0) {
       // Entry block.
-      memorySet = new MemorySet(_closedWorld);
+      memorySet = MemorySet(_closedWorld);
     } else if (indegree == 1 && predecessors[0].successors.length == 1) {
       // No need to clone, there is no other successor for
       // `block.predecessors[0]`, and this block has only one predecessor. Since
@@ -3416,6 +3481,15 @@
       }
     }
 
+    // If the current block is a catch or finally block, it is reachable from
+    // any instruction in the try region that can generate an exception.
+    if (_blocksWithImprecisePredecessors != null) {
+      final tryInstruction = _blocksWithImprecisePredecessors[block];
+      if (tryInstruction != null) {
+        memorySet.killLocationsForExceptionEdge();
+      }
+    }
+
     memories[block.id] = memorySet;
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -3425,6 +3499,17 @@
     }
   }
 
+  @override
+  visitTry(HTry instruction) {
+    _blocksWithImprecisePredecessors ??= {};
+    if (instruction.catchBlock != null) {
+      _blocksWithImprecisePredecessors[instruction.catchBlock] = instruction;
+    }
+    if (instruction.finallyBlock != null) {
+      _blocksWithImprecisePredecessors[instruction.finallyBlock] = instruction;
+    }
+  }
+
   void checkNewGvnCandidates(HInstruction instruction, HInstruction existing) {
     if (newGvnCandidates) return;
     bool hasUseGvn(HInstruction insn) => insn.nonCheck().useGvn();
@@ -3657,15 +3742,13 @@
   // TODO(25544): Split length effects from other effects and model lengths
   // separately.
   final Map<Object /*MemberEntity|MemoryFeature*/,
-          Map<HInstruction, HInstruction>>
-      fieldValues = <Object, Map<HInstruction, HInstruction>>{};
+      Map<HInstruction, HInstruction>> fieldValues = {};
 
   /// Maps a receiver to a map of keys to value.
-  final Map<HInstruction, Map<HInstruction, HInstruction>> keyedValues =
-      <HInstruction, Map<HInstruction, HInstruction>>{};
+  final Map<HInstruction, Map<HInstruction, HInstruction>> keyedValues = {};
 
   /// Set of objects that we know don't escape the current function.
-  final Setlet<HInstruction> nonEscapingReceivers = new Setlet<HInstruction>();
+  final Setlet<HInstruction> nonEscapingReceivers = Setlet();
 
   MemorySet(this.closedWorld);
 
@@ -3712,6 +3795,30 @@
     return !nonEscapingReceivers.contains(receiver);
   }
 
+  /// Kills locations that are imprecise due to many possible edges from
+  /// instructions in the try region that can throw.
+  void killLocationsForExceptionEdge() {
+    // Ideally we would treat each strong (must) update in the try region as a
+    // weak (may) update at the catch block, but we don't track this. The
+    // conservative approximation is to kill everything.
+    //
+    // Aliases can be retained because they are not updated - they are generated
+    // by an allocation and are killed by escaping. There is an edge from any
+    // exit from the try region to the catch block which accounts for the kills
+    // via escapes. Similarly, array lengths don't have updates (set:length is
+    // modeled as an escape which kills the length on some path), so lengths
+    // don't need to be killed here.
+    //
+    // TODO(sra): A more precise accounting of the effects in the try region
+    // might improve precision.
+    fieldValues.forEach((key, map) {
+      if (key != MemoryFeature.length) {
+        map?.clear();
+      }
+    });
+    keyedValues.clear();
+  }
+
   void registerAllocation(HInstruction instruction) {
     assert(instruction == instruction.nonCheck());
     nonEscapingReceivers.add(instruction);
@@ -3732,7 +3839,7 @@
     // non-escaping set.
     nonEscapingReceivers.remove(value.nonCheck());
     Map<HInstruction, HInstruction> map =
-        fieldValues.putIfAbsent(field, () => <HInstruction, HInstruction>{});
+        fieldValues.putIfAbsent(field, () => {});
     bool isRedundant = map[receiver] == value;
     map.forEach((key, value) {
       if (mayAlias(receiver, key)) map[key] = null;
@@ -3751,7 +3858,7 @@
       return; // TODO(14955): Remove this restriction?
     }
     Map<HInstruction, HInstruction> map =
-        fieldValues.putIfAbsent(field, () => <HInstruction, HInstruction>{});
+        fieldValues.putIfAbsent(field, () => {});
     map[receiver] = value;
   }
 
@@ -3778,7 +3885,7 @@
 
     if (instruction.sideEffects.changesInstanceProperty() ||
         instruction.sideEffects.changesStaticProperty()) {
-      List<HInstruction> receiversToRemove = <HInstruction>[];
+      List<HInstruction> receiversToRemove = [];
 
       List<Object> fieldsToRemove;
       fieldValues.forEach((Object element, map) {
@@ -3790,7 +3897,7 @@
         });
         if (receiversToRemove.length == map.length) {
           // Remove them all by removing the entire map.
-          (fieldsToRemove ??= <Object>[]).add(element);
+          (fieldsToRemove ??= []).add(element);
         } else {
           receiversToRemove.forEach(map.remove);
         }
@@ -3821,7 +3928,7 @@
   void registerKeyedValue(
       HInstruction receiver, HInstruction index, HInstruction value) {
     Map<HInstruction, HInstruction> map =
-        keyedValues.putIfAbsent(receiver, () => <HInstruction, HInstruction>{});
+        keyedValues.putIfAbsent(receiver, () => {});
     map[index] = value;
   }
 
@@ -3847,7 +3954,7 @@
     if (couldBeTypedArray(receiver)) return;
 
     Map<HInstruction, HInstruction> map =
-        keyedValues.putIfAbsent(receiver, () => <HInstruction, HInstruction>{});
+        keyedValues.putIfAbsent(receiver, () => {});
     map[index] = value;
   }
 
@@ -3896,7 +4003,7 @@
       phi.instructionType = phiType;
       return phi;
     } else {
-      HPhi phi = new HPhi.noInputs(null, phiType);
+      HPhi phi = HPhi.noInputs(null, phiType);
       block.addPhi(phi);
       // Previous predecessors had the same input. A phi must have
       // the same number of inputs as its block has predecessors.
@@ -3911,7 +4018,7 @@
   /// Returns the intersection between [this] and the [other] memory set.
   MemorySet intersectionFor(
       MemorySet other, HBasicBlock block, int predecessorIndex) {
-    MemorySet result = new MemorySet(closedWorld);
+    MemorySet result = MemorySet(closedWorld);
     if (other == null) {
       // This is the first visit to a loop header ([other] is `null` because we
       // have not visited the back edge). Copy the nonEscapingReceivers that are
@@ -3991,16 +4098,16 @@
 
   /// Returns a copy of [this] memory set.
   MemorySet clone() {
-    MemorySet result = new MemorySet(closedWorld);
+    MemorySet result = MemorySet(closedWorld);
 
     fieldValues.forEach((element, values) {
       result.fieldValues[element] =
-          new Map<HInstruction, HInstruction>.from(values);
+          Map<HInstruction, HInstruction>.from(values);
     });
 
     keyedValues.forEach((receiver, values) {
       result.keyedValues[receiver] =
-          new Map<HInstruction, HInstruction>.from(values);
+          Map<HInstruction, HInstruction>.from(values);
     });
 
     result.nonEscapingReceivers.addAll(nonEscapingReceivers);
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 9fd8e25..5b825ce 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -47,11 +47,11 @@
       BackendStrategy backendStrategy,
       Measurer measurer,
       this.sourceInformationStrategy)
-      : generator = new SsaCodeGeneratorTask(
-            measurer, _options, sourceInformationStrategy),
-        _builder = new SsaBuilderTask(
+      : generator =
+            SsaCodeGeneratorTask(measurer, _options, sourceInformationStrategy),
+        _builder = SsaBuilderTask(
             measurer, backendStrategy, sourceInformationStrategy),
-        optimizer = new SsaOptimizerTask(measurer, _options);
+        optimizer = SsaOptimizerTask(measurer, _options);
 
   @override
   void initialize(GlobalTypeInferenceResults globalInferenceResults,
@@ -67,10 +67,10 @@
   CodegenResult compile(MemberEntity member) {
     JClosedWorld closedWorld = _globalInferenceResults.closedWorld;
     CodegenRegistry registry =
-        new CodegenRegistry(closedWorld.elementEnvironment, member);
-    ModularNamer namer = new ModularNamerImpl(
+        CodegenRegistry(closedWorld.elementEnvironment, member);
+    ModularNamer namer = ModularNamerImpl(
         registry, closedWorld.commonElements, _codegen.fixedNames);
-    ModularEmitter emitter = new ModularEmitterImpl(namer, registry, _options);
+    ModularEmitter emitter = ModularEmitterImpl(namer, registry, _options);
     if (member.isConstructor &&
         member.enclosingClass == closedWorld.commonElements.jsNullClass) {
       // Work around a problem compiling JSNull's constructor.
@@ -202,7 +202,7 @@
     List<js.Expression> itemTypeExpression =
         _fetchItemTypeNewRti(commonElements, registry, elementType);
 
-    AsyncRewriter rewriter = new AsyncRewriter(_reporter, element,
+    AsyncRewriter rewriter = AsyncRewriter(_reporter, element,
         asyncStart: emitter.staticFunctionAccess(startFunction),
         asyncAwait:
             emitter.staticFunctionAccess(commonElements.asyncHelperAwait),
@@ -216,7 +216,7 @@
         safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
         bodyName: namer.deriveAsyncBodyName(name));
 
-    registry.registerStaticUse(new StaticUse.staticInvoke(
+    registry.registerStaticUse(StaticUse.staticInvoke(
         completerFactory,
         const CallStructure.unnamed(0, 1),
         [elementEnvironment.getFunctionAsyncOrSyncStarElementType(element)]));
@@ -238,7 +238,7 @@
     List<js.Expression> itemTypeExpression =
         _fetchItemTypeNewRti(commonElements, registry, asyncTypeParameter);
 
-    SyncStarRewriter rewriter = new SyncStarRewriter(_reporter, element,
+    SyncStarRewriter rewriter = SyncStarRewriter(_reporter, element,
         endOfIteration:
             emitter.staticFunctionAccess(commonElements.endOfIteration),
         iterableFactory: emitter
@@ -251,7 +251,7 @@
         safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
         bodyName: namer.deriveAsyncBodyName(name));
 
-    registry.registerStaticUse(new StaticUse.staticInvoke(
+    registry.registerStaticUse(StaticUse.staticInvoke(
         commonElements.syncStarIterableFactory,
         const CallStructure.unnamed(1, 1),
         [elementEnvironment.getFunctionAsyncOrSyncStarElementType(element)]));
@@ -273,7 +273,7 @@
     List<js.Expression> itemTypeExpression =
         _fetchItemTypeNewRti(commonElements, registry, asyncTypeParameter);
 
-    AsyncStarRewriter rewriter = new AsyncStarRewriter(_reporter, element,
+    AsyncStarRewriter rewriter = AsyncStarRewriter(_reporter, element,
         asyncStarHelper:
             emitter.staticFunctionAccess(commonElements.asyncStarHelper),
         streamOfController:
@@ -289,7 +289,7 @@
             emitter.staticFunctionAccess(commonElements.yieldStar),
         bodyName: namer.deriveAsyncBodyName(name));
 
-    registry.registerStaticUse(new StaticUse.staticInvoke(
+    registry.registerStaticUse(StaticUse.staticInvoke(
         commonElements.asyncStarStreamControllerFactory,
         const CallStructure.unnamed(1, 1),
         [elementEnvironment.getFunctionAsyncOrSyncStarElementType(element)]));
@@ -299,7 +299,7 @@
 
   @override
   Iterable<CompilerTask> get tasks {
-    return <CompilerTask>[_builder, optimizer, generator];
+    return [_builder, optimizer, generator];
   }
 }
 
diff --git a/pkg/compiler/lib/src/ssa/ssa_branch_builder.dart b/pkg/compiler/lib/src/ssa/ssa_branch_builder.dart
index 9383983..df4e293 100644
--- a/pkg/compiler/lib/src/ssa/ssa_branch_builder.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_branch_builder.dart
@@ -17,7 +17,7 @@
   LocalsHandler exitLocals;
   SubGraph graph;
 
-  SsaBranch(this.branchBuilder) : block = new HBasicBlock();
+  SsaBranch(this.branchBuilder) : block = HBasicBlock();
 }
 
 class SsaBranchBuilder {
@@ -46,7 +46,7 @@
     checkNotAborted();
     assert(identical(builder.current, builder.lastOpenedBlock));
     HInstruction conditionValue = builder.popBoolified();
-    HIf branch = new HIf(_abstractValueDomain, conditionValue)
+    HIf branch = HIf(_abstractValueDomain, conditionValue)
       ..sourceInformation = sourceInformation;
     HBasicBlock conditionExitBlock = builder.current;
     builder.close(branch);
@@ -59,7 +59,7 @@
         mayReuseFromLocals: conditionBranchLocalsCanBeReused);
 
     conditionBranch.graph =
-        new SubExpression(conditionBranch.block, conditionExitBlock);
+        SubExpression(conditionBranch.block, conditionExitBlock);
   }
 
   /// Returns true if the locals of the [fromBranch] may be reused. A [:true:]
@@ -72,7 +72,7 @@
         toBranch.startLocals = fromLocals;
         return false;
       } else {
-        toBranch.startLocals = new LocalsHandler.from(fromLocals);
+        toBranch.startLocals = LocalsHandler.from(fromLocals);
         return true;
       }
     } else {
@@ -91,7 +91,7 @@
       SsaBranch joinBranch, bool isExpression) {
     startBranch(branch);
     visitBranch();
-    branch.graph = new SubGraph(branch.block, builder.lastOpenedBlock);
+    branch.graph = SubGraph(branch.block, builder.lastOpenedBlock);
     branch.exitLocals = builder.localsHandler;
     if (!builder.isAborted()) {
       builder.goto(builder.current, joinBranch.block);
@@ -163,7 +163,7 @@
       boolifiedLeft = builder.popBoolified();
       builder.stack.add(boolifiedLeft);
       if (!isAnd) {
-        builder.push(new HNot(builder.pop(), _abstractValueDomain.boolType)
+        builder.push(HNot(builder.pop(), _abstractValueDomain.boolType)
           ..sourceInformation = sourceInformation);
       }
     }
@@ -177,10 +177,8 @@
         sourceInformation: sourceInformation);
     HConstant notIsAnd =
         builder.graph.addConstantBool(!isAnd, builder.closedWorld);
-    HPhi result = new HPhi.manyInputs(
-        null,
-        <HInstruction>[boolifiedRight, notIsAnd],
-        _abstractValueDomain.dynamicType)
+    HPhi result = HPhi.manyInputs(
+        null, [boolifiedRight, notIsAnd], _abstractValueDomain.dynamicType)
       ..sourceInformation = sourceInformation;
     builder.current.addPhi(result);
     builder.stack.add(result);
@@ -189,10 +187,10 @@
   void _handleDiamondBranch(
       void visitCondition(), void visitThen(), void visitElse(),
       {bool isExpression, SourceInformation sourceInformation}) {
-    SsaBranch conditionBranch = new SsaBranch(this);
-    SsaBranch thenBranch = new SsaBranch(this);
-    SsaBranch elseBranch = new SsaBranch(this);
-    SsaBranch joinBranch = new SsaBranch(this);
+    SsaBranch conditionBranch = SsaBranch(this);
+    SsaBranch thenBranch = SsaBranch(this);
+    SsaBranch elseBranch = SsaBranch(this);
+    SsaBranch joinBranch = SsaBranch(this);
 
     conditionBranch.startLocals = builder.localsHandler;
     builder.goto(builder.current, conditionBranch.block);
@@ -206,8 +204,8 @@
 
     if (isExpression) {
       assert(thenValue != null && elseValue != null);
-      HPhi phi = new HPhi.manyInputs(null, <HInstruction>[thenValue, elseValue],
-          _abstractValueDomain.dynamicType);
+      HPhi phi = HPhi.manyInputs(
+          null, [thenValue, elseValue], _abstractValueDomain.dynamicType);
       joinBranch.block.addPhi(phi);
       builder.stack.add(phi);
     }
@@ -219,10 +217,10 @@
       joinBlock = joinBranch.block;
     }
 
-    HIfBlockInformation info = new HIfBlockInformation(
-        new HSubExpressionBlockInformation(conditionBranch.graph),
-        new HSubGraphBlockInformation(thenBranch.graph),
-        new HSubGraphBlockInformation(elseBranch.graph));
+    HIfBlockInformation info = HIfBlockInformation(
+        HSubExpressionBlockInformation(conditionBranch.graph),
+        HSubGraphBlockInformation(thenBranch.graph),
+        HSubGraphBlockInformation(elseBranch.graph));
 
     HBasicBlock conditionStartBlock = conditionBranch.block;
     conditionStartBlock.setBlockFlow(info, joinBlock);
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index d25cbd8..8887610 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -75,7 +75,7 @@
   @override
   void visitBasicBlock(HBasicBlock block) {
     HInstructionStringifier stringifier =
-        new HInstructionStringifier(block, closedWorld);
+        HInstructionStringifier(block, closedWorld);
     assert(block.id != null);
     tag("block", () {
       printProperty("name", "B${block.id}");
@@ -94,7 +94,7 @@
           printProperty("method", "None");
           block.forEachPhi((phi) {
             String phiId = stringifier.temporaryId(phi);
-            StringBuffer inputIds = new StringBuffer();
+            StringBuffer inputIds = StringBuffer();
             for (int i = 0; i < phi.inputs.length; i++) {
               inputIds.write(stringifier.temporaryId(phi.inputs[i]));
               inputIds.write(" ");
@@ -326,7 +326,7 @@
 
   String handleGenericInvoke(
       String invokeType, String functionName, List<HInstruction> arguments) {
-    StringBuffer argumentsString = new StringBuffer();
+    StringBuffer argumentsString = StringBuffer();
     for (int i = 0; i < arguments.length; i++) {
       if (i != 0) argumentsString.write(", ");
       argumentsString.write(temporaryId(arguments[i]));
@@ -445,7 +445,7 @@
 
   @override
   String visitLiteralList(HLiteralList node) {
-    StringBuffer elementsString = new StringBuffer();
+    StringBuffer elementsString = StringBuffer();
     for (int i = 0; i < node.inputs.length; i++) {
       if (i != 0) elementsString.write(", ");
       elementsString.write(temporaryId(node.inputs[i]));
@@ -485,7 +485,7 @@
 
   @override
   String visitPhi(HPhi phi) {
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     buffer.write("Phi: ");
     for (int i = 0; i < phi.inputs.length; i++) {
       if (i > 0) buffer.write(", ");
@@ -546,7 +546,7 @@
 
   @override
   String visitSwitch(HSwitch node) {
-    StringBuffer buf = new StringBuffer();
+    StringBuffer buf = StringBuffer();
     buf.write("Switch: (");
     buf.write(temporaryId(node.inputs[0]));
     buf.write(") ");
@@ -584,7 +584,8 @@
 
   @override
   String visitExitTry(HExitTry node) {
-    return "ExitTry";
+    final targets = currentBlock.successors.map((block) => 'B${block.id}');
+    return "ExitTry: (${targets.join(', ')})";
   }
 
   @override
diff --git a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
index 776a5d5..bf99220 100644
--- a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
+++ b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
@@ -12,7 +12,7 @@
   SwitchContinueAnalysis._();
 
   static bool containsContinue(ir.Statement switchCaseBody) {
-    return switchCaseBody.accept(new SwitchContinueAnalysis._());
+    return switchCaseBody.accept(SwitchContinueAnalysis._());
   }
 
   @override
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index 39140be..e7e0a25 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -49,7 +49,7 @@
 
   /// Create a type mask for 'trusting' a DartType. Returns `null` if there is
   /// no approximating type mask (i.e. the type mask would be `dynamic`).
-  AbstractValue trustTypeMask(DartType type) {
+  AbstractValue trustTypeMask(DartType type, {bool hasLateSentinel = false}) {
     if (type == null) return null;
     type = builder.localsHandler.substInContext(type);
     if (_closedWorld.dartTypes.isTopType(type)) return null;
@@ -59,17 +59,22 @@
     if (type is! InterfaceType) return null;
     // The type element is either a class or the void element.
     ClassEntity element = (type as InterfaceType).element;
-    return includeNull
+    AbstractValue mask = includeNull
         ? _abstractValueDomain.createNullableSubtype(element)
         : _abstractValueDomain.createNonNullSubtype(element);
+    if (hasLateSentinel) mask = _abstractValueDomain.includeLateSentinel(mask);
+    return mask;
   }
 
   /// Create an instruction to simply trust the provided type.
   HInstruction _trustType(HInstruction original, DartType type) {
     assert(type != null);
-    AbstractValue mask = trustTypeMask(type);
+    bool hasLateSentinel = _abstractValueDomain
+        .isLateSentinel(original.instructionType)
+        .isPotentiallyTrue;
+    AbstractValue mask = trustTypeMask(type, hasLateSentinel: hasLateSentinel);
     if (mask == null) return original;
-    return new HTypeKnown.pinned(mask, original);
+    return HTypeKnown.pinned(mask, original);
   }
 
   /// Produces code that checks the runtime type is actually the type specified
@@ -82,7 +87,7 @@
     // If it is needed then it seems likely that similar invocations of
     // `buildAsCheck` in `SsaBuilder.visitAs` should also be followed by a
     // similar operation on `registry`; otherwise, this one might not be needed.
-    builder.registry?.registerTypeUse(new TypeUse.isCheck(type));
+    builder.registry?.registerTypeUse(TypeUse.isCheck(type));
     if (other is HAsCheck &&
         other.isRedundant(builder.closedWorld, builder.options)) {
       return original;
@@ -99,7 +104,7 @@
       return original;
     }
     DartType boolType = _closedWorld.commonElements.boolType;
-    builder.registry?.registerTypeUse(new TypeUse.isCheck(boolType));
+    builder.registry?.registerTypeUse(TypeUse.isCheck(boolType));
     return checkInstruction;
   }
 
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index 92a35e1..bd8c259 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -30,10 +30,9 @@
 // TODO(sra): The InvokeDynamicSpecializer should be consulted for better
 // targeted conditioning checks.
 class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
-  final Map<int, HInstruction> workmap = new Map<int, HInstruction>();
-  final List<int> worklist = <int>[];
-  final Map<HInstruction, Function> pendingOptimizations =
-      new Map<HInstruction, Function>();
+  final Map<int, HInstruction> workmap = {};
+  final List<int> worklist = [];
+  final Map<HInstruction, Function> pendingOptimizations = {};
 
   final GlobalTypeInferenceResults results;
   final CommonElements commonElements;
@@ -248,7 +247,7 @@
     Selector selector = (kind == HPrimitiveCheck.RECEIVER_TYPE_CHECK)
         ? instruction.selector
         : null;
-    HPrimitiveCheck converted = new HPrimitiveCheck(
+    HPrimitiveCheck converted = HPrimitiveCheck(
         typeExpression, kind, type, input, instruction.sourceInformation,
         receiverTypeCheckSelector: selector);
     instruction.block.addBefore(instruction, converted);
@@ -418,7 +417,7 @@
           // dominated by the call to use that node instead of [receiver].
           AbstractValue newType = abstractValueDomain.excludeNull(receiverType);
           HTypeKnown converted =
-              new HTypeKnown.witnessed(newType, receiver, instruction);
+              HTypeKnown.witnessed(newType, receiver, instruction);
           instruction.block.addBefore(instruction.next, converted);
           uses.replaceWith(converted);
           addDependentInstructionsToWorkList(converted);
diff --git a/pkg/compiler/lib/src/ssa/validate.dart b/pkg/compiler/lib/src/ssa/validate.dart
index 6bce627..251368b 100644
--- a/pkg/compiler/lib/src/ssa/validate.dart
+++ b/pkg/compiler/lib/src/ssa/validate.dart
@@ -157,7 +157,7 @@
   static bool everyInstruction(
       List<HInstruction> instructions, bool Function(HInstruction, int) f) {
     if (instructions.length > kMaxValidatedInstructionListLength) return true;
-    var copy = new List<HInstruction>.from(instructions);
+    var copy = List<HInstruction>.from(instructions);
     // TODO(floitsch): there is currently no way to sort HInstructions before
     // we have assigned an ID. The loop is therefore O(n^2) for now.
     for (int i = 0; i < copy.length; i++) {
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index a0af6be..2b20fa4 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -18,40 +18,39 @@
   }
 
   Value newIntValue(BigInt value) {
-    return new IntValue(value, this);
+    return IntValue(value, this);
   }
 
   Value newInstructionValue(HInstruction instruction) {
-    return new InstructionValue(instruction, this);
+    return InstructionValue(instruction, this);
   }
 
   Value newPositiveValue(HInstruction instruction) {
-    return new PositiveValue(instruction, this);
+    return PositiveValue(instruction, this);
   }
 
   Value newAddValue(Value left, Value right) {
-    return new AddValue(left, right, this);
+    return AddValue(left, right, this);
   }
 
   Value newSubtractValue(Value left, Value right) {
-    return new SubtractValue(left, right, this);
+    return SubtractValue(left, right, this);
   }
 
   Value newNegateValue(Value value) {
-    return new NegateValue(value, this);
+    return NegateValue(value, this);
   }
 
   Range newUnboundRange() {
-    return new Range.unbound(this);
+    return Range.unbound(this);
   }
 
   Range newNormalizedRange(Value low, Value up) {
-    return new Range.normalize(low, up, this);
+    return Range.normalize(low, up, this);
   }
 
   Range newMarkerRange() {
-    return new Range(
-        new MarkerValue(false, this), new MarkerValue(true, this), this);
+    return Range(MarkerValue(false, this), MarkerValue(true, this), this);
   }
 }
 
@@ -184,7 +183,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('IntValue.hashCode');
+  int get hashCode => throw UnsupportedError('IntValue.hashCode');
 
   @override
   String toString() => 'IntValue $value';
@@ -274,7 +273,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('InstructionValue.hashCode');
+  int get hashCode => throw UnsupportedError('InstructionValue.hashCode');
 
   @override
   Value operator +(Value other) {
@@ -347,7 +346,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('AddValue.hashCode');
+  int get hashCode => throw UnsupportedError('AddValue.hashCode');
 
   @override
   Value operator -() => -left - right;
@@ -402,7 +401,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('SubtractValue.hashCode');
+  int get hashCode => throw UnsupportedError('SubtractValue.hashCode');
 
   @override
   Value operator -() => right - left;
@@ -458,7 +457,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('Negate.hashCode');
+  int get hashCode => throw UnsupportedError('Negate.hashCode');
 
   @override
   Value operator +(other) {
@@ -602,7 +601,7 @@
   }
 
   @override
-  int get hashCode => throw new UnsupportedError('Range.hashCode');
+  int get hashCode => throw UnsupportedError('Range.hashCode');
 
   bool operator <(Range other) {
     return upper != other.lower && upper.min(other.lower) == upper;
@@ -638,11 +637,11 @@
 
   /// List of [HRangeConversion] instructions created by the phase. We
   /// save them here in order to remove them once the phase is done.
-  final List<HRangeConversion> conversions = <HRangeConversion>[];
+  final List<HRangeConversion> conversions = [];
 
   /// Value ranges for integer instructions. This map gets populated by
   /// the dominator tree visit.
-  final Map<HInstruction, Range> ranges = new Map<HInstruction, Range>();
+  final Map<HInstruction, Range> ranges = {};
 
   final JClosedWorld closedWorld;
   final ValueRangeInfo info;
@@ -651,7 +650,7 @@
   HGraph graph;
 
   SsaValueRangeAnalyzer(JClosedWorld closedWorld, this.optimizer)
-      : info = new ValueRangeInfo(),
+      : info = ValueRangeInfo(),
         this.closedWorld = closedWorld;
 
   @override
@@ -719,8 +718,7 @@
       return info.newUnboundRange();
     }
     if (phi.block.isLoopHeader()) {
-      Range range =
-          new LoopUpdateRecognizer(closedWorld, ranges, info).run(phi);
+      Range range = LoopUpdateRecognizer(closedWorld, ranges, info).run(phi);
       if (range == null) return info.newUnboundRange();
       return range;
     }
@@ -750,12 +748,12 @@
       return info.newUnboundRange();
     }
     if (constantNum.isMinusZero) {
-      constantNum = new IntConstantValue(BigInt.zero);
+      constantNum = IntConstantValue(BigInt.zero);
     }
 
     BigInt intValue = constantNum is IntConstantValue
         ? constantNum.intValue
-        : new BigInt.from(constantNum.doubleValue.toInt());
+        : BigInt.from(constantNum.doubleValue.toInt());
     Value value = info.newIntValue(intValue);
     return info.newNormalizedRange(value, value);
   }
@@ -1018,8 +1016,8 @@
 
   HInstruction createRangeConversion(
       HInstruction cursor, HInstruction instruction) {
-    HRangeConversion newInstruction = new HRangeConversion(
-        instruction, closedWorld.abstractValueDomain.intType);
+    HRangeConversion newInstruction =
+        HRangeConversion(instruction, closedWorld.abstractValueDomain.intType);
     conversions.add(newInstruction);
     cursor.block.addBefore(cursor, newInstruction);
     // Update the users of the instruction dominated by [cursor] to
diff --git a/pkg/compiler/lib/src/ssa/value_set.dart b/pkg/compiler/lib/src/ssa/value_set.dart
index f2a6148..9382934 100644
--- a/pkg/compiler/lib/src/ssa/value_set.dart
+++ b/pkg/compiler/lib/src/ssa/value_set.dart
@@ -9,7 +9,7 @@
   int size = 0;
   List<HInstruction> table;
   ValueSetNode collisions;
-  ValueSet() : table = new List<HInstruction>.filled(8, null);
+  ValueSet() : table = List<HInstruction>.filled(8, null);
 
   bool get isEmpty => size == 0;
   int get length => size;
@@ -28,7 +28,7 @@
     if (table[index] == null) {
       table[index] = instruction;
     } else {
-      collisions = new ValueSetNode(instruction, hashCode, collisions);
+      collisions = ValueSetNode(instruction, hashCode, collisions);
     }
     size++;
   }
@@ -81,7 +81,7 @@
   }
 
   ValueSet copy() {
-    return copyTo(new ValueSet(), table, collisions);
+    return copyTo(ValueSet(), table, collisions);
   }
 
   List<HInstruction> toList() {
@@ -111,7 +111,7 @@
 
   ValueSet intersection(ValueSet other) {
     if (size > other.size) return other.intersection(this);
-    ValueSet result = new ValueSet();
+    ValueSet result = ValueSet();
     // Look in the hash table.
     for (int index = 0, length = table.length; index < length; index++) {
       HInstruction instruction = table[index];
@@ -138,7 +138,7 @@
     // Reset the table with a bigger capacity.
     assert(capacity > table.length);
     size = 0;
-    table = new List<HInstruction>.filled(capacity, null);
+    table = List<HInstruction>.filled(capacity, null);
     collisions = null;
     // Add the old instructions to the new table.
     copyTo(this, oldTable, oldCollisions);
diff --git a/pkg/compiler/lib/src/ssa/variable_allocator.dart b/pkg/compiler/lib/src/ssa/variable_allocator.dart
index a544500..2bf062d 100644
--- a/pkg/compiler/lib/src/ssa/variable_allocator.dart
+++ b/pkg/compiler/lib/src/ssa/variable_allocator.dart
@@ -26,7 +26,7 @@
   /// The id where the instruction is defined.
   int start;
   final List<LiveRange> ranges;
-  LiveInterval() : ranges = <LiveRange>[];
+  LiveInterval() : ranges = [];
 
   // We want [HCheck] instructions to have the same name as the
   // instruction it checks, so both instructions should share the same
@@ -59,7 +59,7 @@
 
   @override
   String toString() {
-    List<String> res = <String>[];
+    List<String> res = [];
     for (final interval in ranges) res.add(interval.toString());
     return '(${res.join(", ")})';
   }
@@ -80,30 +80,28 @@
   /// visited. The liveIn set of the loop header will be merged into this
   /// environment. [loopMarkers] is a mapping from block header to the
   /// end instruction id of the loop exit block.
-  final Map<HBasicBlock, int> loopMarkers;
+  final Map<HBasicBlock, int> loopMarkers = {};
 
   /// The instructions that are live in this basic block. The values of
   /// the map contain the instruction ids where the instructions die.
   /// It will be used when adding a range to the live interval of an
   /// instruction.
-  final Map<HInstruction, int> liveInstructions;
+  final Map<HInstruction, int> liveInstructions = {};
 
   /// Map containing the live intervals of instructions.
   final Map<HInstruction, LiveInterval> liveIntervals;
 
-  LiveEnvironment(this.liveIntervals, this.endId)
-      : liveInstructions = new Map<HInstruction, int>(),
-        loopMarkers = new Map<HBasicBlock, int>();
+  LiveEnvironment(this.liveIntervals, this.endId);
 
   /// Remove an instruction from the liveIn set. This method also
   /// updates the live interval of [instruction] to contain the new
   /// range: [id, / id contained in [liveInstructions] /].
   void remove(HInstruction instruction, int id) {
     LiveInterval interval =
-        liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
+        liveIntervals.putIfAbsent(instruction, () => LiveInterval());
     int lastId = liveInstructions[instruction];
     // If [lastId] is null, then this instruction is not being used.
-    interval.add(new LiveRange(id, lastId == null ? id : lastId));
+    interval.add(LiveRange(id, lastId ?? id));
     // The instruction is defined at [id].
     interval.start = id;
     liveInstructions.remove(instruction);
@@ -128,8 +126,8 @@
       // being used in the join block and defined before the if/else.
       if (existingId == endId) return;
       LiveInterval range =
-          liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
-      range.add(new LiveRange(other.startId, existingId));
+          liveIntervals.putIfAbsent(instruction, () => LiveInterval());
+      range.add(LiveRange(other.startId, existingId));
       liveInstructions[instruction] = endId;
     });
     other.loopMarkers.forEach((k, v) {
@@ -260,11 +258,11 @@
       HCheck check = instruction;
       HInstruction checked = checkedInstructionOrNonGenerateAtUseSite(check);
       if (!generateAtUseSite.contains(checked)) {
-        liveIntervals.putIfAbsent(checked, () => new LiveInterval());
+        liveIntervals.putIfAbsent(checked, () => LiveInterval());
         // Unconditionally force the live ranges of the HCheck to
         // be the live ranges of the instruction it is checking.
         liveIntervals[instruction] =
-            new LiveInterval.forCheck(instructionId, liveIntervals[checked]);
+            LiveInterval.forCheck(instructionId, liveIntervals[checked]);
       }
     }
   }
@@ -330,7 +328,7 @@
     // range that covers the loop.
     env.liveInstructions.forEach((HInstruction instruction, int id) {
       LiveInterval range =
-          env.liveIntervals.putIfAbsent(instruction, () => new LiveInterval());
+          env.liveIntervals.putIfAbsent(instruction, () => LiveInterval());
       range.loopUpdate(env.startId, lastId);
       env.liveInstructions[instruction] = lastId;
     });
@@ -369,22 +367,18 @@
 /// after executing all its instructions.
 class CopyHandler {
   /// The copies from an instruction to a phi of the successor.
-  final List<Copy<HInstruction>> copies;
+  final List<Copy<HInstruction>> copies = [];
 
   /// Assignments from an instruction that does not need a name (e.g. a
   /// constant) to the phi of a successor.
-  final List<Copy<HInstruction>> assignments;
-
-  CopyHandler()
-      : copies = <Copy<HInstruction>>[],
-        assignments = <Copy<HInstruction>>[];
+  final List<Copy<HInstruction>> assignments = [];
 
   void addCopy(HInstruction source, HInstruction destination) {
-    copies.add(new Copy<HInstruction>(source, destination));
+    copies.add(Copy<HInstruction>(source, destination));
   }
 
   void addAssignment(HInstruction source, HInstruction destination) {
-    assignments.add(new Copy<HInstruction>(source, destination));
+    assignments.add(Copy<HInstruction>(source, destination));
   }
 
   @override
@@ -396,28 +390,22 @@
 /// Contains the mapping between instructions and their names for code
 /// generation, as well as the [CopyHandler] for each basic block.
 class VariableNames {
-  final Map<HInstruction, String> ownName;
-  final Map<HBasicBlock, CopyHandler> copyHandlers;
+  final Map<HInstruction, String> ownName = {};
+  final Map<HBasicBlock, CopyHandler> copyHandlers = {};
 
   // Used to control heuristic that determines how local variables are declared.
-  final Set<String> allUsedNames;
+  final Set<String> allUsedNames = {};
 
-  /// Name that is used as a temporary to break cycles in
-  /// parallel copies. We make sure this name is not being used
-  /// anywhere by reserving it when we allocate names for instructions.
-  final String swapTemp;
+  /// Name that is used as a temporary to break cycles in parallel copies. We
+  /// make sure this name is not being used anywhere by reserving it when we
+  /// allocate names for instructions.
+  final String swapTemp = 't0';
 
   String getSwapTemp() {
     allUsedNames.add(swapTemp);
     return swapTemp;
   }
 
-  VariableNames()
-      : ownName = new Map<HInstruction, String>(),
-        copyHandlers = new Map<HBasicBlock, CopyHandler>(),
-        allUsedNames = new Set<String>(),
-        swapTemp = 't0';
-
   int get numberOfVariables => allUsedNames.length;
 
   String getName(HInstruction instruction) {
@@ -435,14 +423,12 @@
   bool hasName(HInstruction instruction) => ownName.containsKey(instruction);
 
   void addCopy(HBasicBlock block, HInstruction source, HPhi destination) {
-    CopyHandler handler =
-        copyHandlers.putIfAbsent(block, () => new CopyHandler());
+    CopyHandler handler = copyHandlers.putIfAbsent(block, () => CopyHandler());
     handler.addCopy(source, destination);
   }
 
   void addAssignment(HBasicBlock block, HInstruction source, HPhi destination) {
-    CopyHandler handler =
-        copyHandlers.putIfAbsent(block, () => new CopyHandler());
+    CopyHandler handler = copyHandlers.putIfAbsent(block, () => CopyHandler());
     handler.addAssignment(source, destination);
   }
 }
@@ -451,14 +437,12 @@
 class VariableNamer {
   final VariableNames names;
   final ModularNamer _namer;
-  final Set<String> usedNames;
-  final List<String> freeTemporaryNames;
+  final Set<String> usedNames = {};
+  final List<String> freeTemporaryNames = [];
   int temporaryIndex = 0;
-  static final RegExp regexp = new RegExp('t[0-9]+');
+  static final RegExp regexp = RegExp('t[0-9]+');
 
-  VariableNamer(LiveEnvironment environment, this.names, this._namer)
-      : usedNames = new Set<String>(),
-        freeTemporaryNames = <String>[] {
+  VariableNamer(LiveEnvironment environment, this.names, this._namer) {
     // [VariableNames.swapTemp] is used when there is a cycle in a copy handler.
     // Therefore we make sure no one uses it.
     usedNames.add(names.swapTemp);
@@ -579,7 +563,7 @@
 
   SsaVariableAllocator(this._namer, this.liveInstructions, this.liveIntervals,
       this.generateAtUseSite)
-      : this.names = new VariableNames();
+      : this.names = VariableNames();
 
   @override
   void visitGraph(HGraph graph) {
@@ -589,7 +573,7 @@
   @override
   void visitBasicBlock(HBasicBlock block) {
     VariableNamer variableNamer =
-        new VariableNamer(liveInstructions[block], names, _namer);
+        VariableNamer(liveInstructions[block], names, _namer);
 
     block.forEachPhi((HPhi phi) {
       handlePhi(phi, variableNamer);
diff --git a/pkg/compiler/lib/src/tracer.dart b/pkg/compiler/lib/src/tracer.dart
index c2c5c5f..3386c81 100644
--- a/pkg/compiler/lib/src/tracer.dart
+++ b/pkg/compiler/lib/src/tracer.dart
@@ -44,14 +44,14 @@
     tag("compilation", () {
       printProperty("name", methodName);
       printProperty("method", methodName);
-      printProperty("date", new DateTime.now().millisecondsSinceEpoch);
+      printProperty("date", DateTime.now().millisecondsSinceEpoch);
     });
   }
 
   void traceGraph(String name, var irObject) {
     if (!traceActive) return;
     if (irObject is ssa.HGraph) {
-      new HTracer(output, closedWorld).traceGraph(name, irObject);
+      HTracer(output, closedWorld).traceGraph(name, irObject);
     }
   }
 
@@ -64,7 +64,7 @@
 
 abstract class TracerUtil {
   api.OutputSink get output;
-  final Indentation _ind = new Indentation();
+  final Indentation _ind = Indentation();
 
   void tag(String tagName, Function f) {
     println("begin_$tagName");
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index 7cae519..234a3a9 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -85,10 +85,10 @@
   bool get isUnnamed => true;
 
   /// The names of the named arguments in call-site order.
-  List<String> get namedArguments => const <String>[];
+  List<String> get namedArguments => const [];
 
   /// The names of the named arguments in canonicalized order.
-  List<String> getOrderedNamedArguments() => const <String>[];
+  List<String> getOrderedNamedArguments() => const [];
 
   CallStructure get nonGeneric => typeArgumentCount == 0
       ? this
@@ -209,10 +209,9 @@
 
   NamedCallStructure(
       int argumentCount, List<String> namedArguments, int typeArgumentCount)
-      : this.internal(
-            argumentCount, namedArguments, typeArgumentCount, <String>[]);
+      : this._(argumentCount, namedArguments, typeArgumentCount, []);
 
-  NamedCallStructure.internal(int argumentCount, this.namedArguments,
+  NamedCallStructure._(int argumentCount, this.namedArguments,
       int typeArgumentCount, this._orderedNamedArguments)
       : assert(namedArguments.isNotEmpty),
         super.unnamed(argumentCount, typeArgumentCount);
@@ -233,7 +232,7 @@
   bool get isNormalized => namedArguments == _orderedNamedArguments;
 
   @override
-  CallStructure toNormalized() => NamedCallStructure.internal(
+  CallStructure toNormalized() => NamedCallStructure._(
       argumentCount,
       getOrderedNamedArguments(),
       typeArgumentCount,
diff --git a/pkg/compiler/lib/src/universe/class_hierarchy.dart b/pkg/compiler/lib/src/universe/class_hierarchy.dart
index 6ea468a..df7ee72 100644
--- a/pkg/compiler/lib/src/universe/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/universe/class_hierarchy.dart
@@ -261,7 +261,7 @@
   @override
   Iterable<ClassEntity> subclassesOf(ClassEntity cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls];
-    if (hierarchy == null) return const <ClassEntity>[];
+    if (hierarchy == null) return const [];
     return hierarchy
         .subclassesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
   }
@@ -269,7 +269,7 @@
   @override
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
-    if (subclasses == null) return const <ClassEntity>[];
+    if (subclasses == null) return const [];
     return subclasses.subclassesByMask(
         ClassHierarchyNode.EXPLICITLY_INSTANTIATED,
         strict: true);
@@ -304,7 +304,7 @@
   Iterable<ClassEntity> subtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet
           .subtypesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
@@ -315,7 +315,7 @@
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet.subtypesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED,
           strict: true);
@@ -326,7 +326,7 @@
   Iterable<ClassEntity> allSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet.subtypesByMask(ClassHierarchyNode.ALL);
     }
@@ -472,7 +472,7 @@
       // the common subclasses of "subclass of A" and "subtype of I" returns
       // "subclasses of {B, D}". The inclusion of class `C` is implied because
       // it is a subclass of `B`.
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubclassOf(cls1, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls2)) {
           classes.add(subclass);
@@ -494,7 +494,7 @@
         return SubclassResult.SUBTYPE1;
       }
       // Find all the root subclasses of [cls2] of that implement [cls1].
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubclassOf(cls2, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls1)) {
           classes.add(subclass);
@@ -528,7 +528,7 @@
       // the common subclasses of "subtype of A" and "subtype of I" returns
       // "subclasses of {B, D, E}". The inclusion of classes `C` and `F` is
       // implied because they are subclasses of `B` and `E`, respectively.
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubtypeOf(cls1, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls2)) {
           classes.add(subclass);
@@ -569,11 +569,9 @@
 class ClassHierarchyBuilder {
   // We keep track of subtype and subclass relationships in four
   // distinct sets to make class hierarchy analysis faster.
-  final Map<ClassEntity, ClassHierarchyNode> _classHierarchyNodes =
-      <ClassEntity, ClassHierarchyNode>{};
-  final Map<ClassEntity, ClassSet> _classSets = <ClassEntity, ClassSet>{};
-  final Map<ClassEntity, Set<ClassEntity>> mixinUses =
-      Map<ClassEntity, Set<ClassEntity>>();
+  final Map<ClassEntity, ClassHierarchyNode> _classHierarchyNodes = {};
+  final Map<ClassEntity, ClassSet> _classSets = {};
+  final Map<ClassEntity, Set<ClassEntity>> mixinUses = {};
 
   final CommonElements _commonElements;
   final ClassQueries _classQueries;
@@ -668,8 +666,7 @@
   void registerMixinUse(ClassEntity mixinApplication, ClassEntity mixin) {
     // TODO(johnniwinther): Add map restricted to live classes.
     // We don't support patch classes as mixin.
-    Set<ClassEntity> users =
-        mixinUses.putIfAbsent(mixin, () => Set<ClassEntity>());
+    Set<ClassEntity> users = mixinUses.putIfAbsent(mixin, () => {});
     users.add(mixinApplication);
   }
 
@@ -710,8 +707,8 @@
     return false;
   }
 
-  Map<ClassEntity, _InheritedInThisClassCache> _inheritedInThisClassCacheMap =
-      {};
+  final Map<ClassEntity, _InheritedInThisClassCache>
+      _inheritedInThisClassCacheMap = {};
 
   /// Returns `true` if a `this` expression in [thisClass] can target a member
   /// declared in [memberHoldingClass].
@@ -723,7 +720,8 @@
     return cache.isInheritedInThisClassOf(this, memberHoldingClass, thisClass);
   }
 
-  Map<ClassEntity, _InheritedInSubtypeCache> _inheritedInSubtypeCacheMap = {};
+  final Map<ClassEntity, _InheritedInSubtypeCache> _inheritedInSubtypeCacheMap =
+      {};
 
   bool isInheritedInSubtypeOf(ClassEntity x, ClassEntity y) {
     _InheritedInSubtypeCache cache =
@@ -764,7 +762,7 @@
         builder._classHierarchyNodes[memberHoldingClass];
 
     if (_inheritingClasses == null) {
-      _inheritingClasses = Set<ClassEntity>();
+      _inheritingClasses = {};
       _inheritingClasses.addAll(memberHoldingClassNode
           .subclassesByMask(ClassHierarchyNode.ALL, strict: false));
       for (ClassHierarchyNode mixinApplication
@@ -774,7 +772,7 @@
       }
     }
 
-    Set<ClassEntity> validatingSet = Set<ClassEntity>();
+    Set<ClassEntity> validatingSet = {};
 
     void processHierarchy(ClassHierarchyNode mixerNode) {
       for (ClassEntity inheritingClass in _inheritingClasses) {
@@ -839,7 +837,7 @@
         failedAt(
             x, "No ClassSet for $x (${x.runtimeType}): ${builder._classSets}"));
 
-    Set<ClassEntity> classes = Set<ClassEntity>();
+    Set<ClassEntity> classes = {};
 
     if (builder._isSubtypeOf(x, y)) {
       // [x] implements [y] itself, possible through supertypes.
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index 3a3c138..5dc7629 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -52,8 +52,7 @@
   /// Enum set for selecting instantiated classes in
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
-  static final EnumSet<Instantiation> INSTANTIATED =
-      EnumSet<Instantiation>.fromValues(const <Instantiation>[
+  static final EnumSet<Instantiation> INSTANTIATED = EnumSet.fromValues(const [
     Instantiation.DIRECTLY_INSTANTIATED,
     Instantiation.INDIRECTLY_INSTANTIATED,
     Instantiation.ABSTRACTLY_INSTANTIATED,
@@ -63,7 +62,7 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> EXPLICITLY_INSTANTIATED =
-      EnumSet<Instantiation>.fromValues(const <Instantiation>[
+      EnumSet.fromValues(const [
     Instantiation.DIRECTLY_INSTANTIATED,
     Instantiation.ABSTRACTLY_INSTANTIATED
   ], fixed: true);
@@ -72,7 +71,7 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> ALL =
-      EnumSet<Instantiation>.fromValues(Instantiation.values, fixed: true);
+      EnumSet.fromValues(Instantiation.values, fixed: true);
 
   /// Creates an enum set for selecting the returned classes in
   /// [ClassHierarchyNode.subclassesByMask],
@@ -82,7 +81,7 @@
       bool includeIndirectlyInstantiated = true,
       bool includeUninstantiated = true,
       bool includeAbstractlyInstantiated = true}) {
-    EnumSet<Instantiation> mask = EnumSet<Instantiation>();
+    EnumSet<Instantiation> mask = EnumSet();
     if (includeDirectlyInstantiated) {
       mask.add(Instantiation.DIRECTLY_INSTANTIATED);
     }
@@ -99,8 +98,8 @@
   }
 
   final ClassHierarchyNode parentNode;
-  final EnumSet<Instantiation> _mask = EnumSet<Instantiation>.fromValues(
-      const <Instantiation>[Instantiation.UNINSTANTIATED]);
+  final EnumSet<Instantiation> _mask =
+      EnumSet.fromValues(const [Instantiation.UNINSTANTIATED]);
   final IndexedClass cls;
 
   final int hierarchyDepth;
@@ -204,7 +203,7 @@
   }
 
   /// The nodes for the direct subclasses of [cls].
-  List<ClassHierarchyNode> _directSubclasses = <ClassHierarchyNode>[];
+  final List<ClassHierarchyNode> _directSubclasses = [];
 
   ClassHierarchyNode(this.parentNode, this.cls, this.hierarchyDepth) {
     if (parentNode != null) {
@@ -619,12 +618,12 @@
   /// A class that implements [cls] through its superclasses is not included in
   /// the iterable.
   Iterable<ClassHierarchyNode> get subtypeNodes {
-    return _subtypes ?? const <ClassHierarchyNode>[];
+    return _subtypes ?? const [];
   }
 
   /// Returns an [Iterable] of the classes that mix in [cls] directly.
   Iterable<ClassHierarchyNode> get mixinApplicationNodes {
-    return _mixinApplications ?? const <ClassHierarchyNode>[];
+    return _mixinApplications ?? const [];
   }
 
   /// Returns an [Iterable] of the subclasses of [cls] possibly including [cls].
@@ -752,10 +751,10 @@
       return;
     }
     if (_subtypes == null) {
-      _subtypes = <ClassHierarchyNode>[subtype];
+      _subtypes = [subtype];
     } else {
       int hierarchyDepth = subtype.hierarchyDepth;
-      List<ClassHierarchyNode> newSubtypes = <ClassHierarchyNode>[];
+      List<ClassHierarchyNode> newSubtypes = [];
       bool added = false;
       for (ClassHierarchyNode otherSubtype in _subtypes) {
         int otherHierarchyDepth = otherSubtype.hierarchyDepth;
@@ -798,21 +797,15 @@
 
   /// Adds [mixinApplication] as a class that mixes in [cls].
   void addMixinApplication(ClassHierarchyNode mixinApplication) {
-    if (_mixinApplications == null) {
-      _mixinApplications = <ClassHierarchyNode>[mixinApplication];
-    } else {
-      _mixinApplications.add(mixinApplication);
-    }
+    (_mixinApplications ??= []).add(mixinApplication);
   }
 
   /// Returns the most specific subtype of [cls] (including [cls]) that is
   /// directly instantiated or a superclass of all directly instantiated
   /// subtypes. If no subtypes of [cls] are instantiated, `null` is returned.
   ClassEntity getLubOfInstantiatedSubtypes() {
-    if (_leastUpperInstantiatedSubtype == null) {
-      _leastUpperInstantiatedSubtype = _computeLeastUpperInstantiatedSubtype();
-    }
-    return _leastUpperInstantiatedSubtype;
+    return _leastUpperInstantiatedSubtype ??=
+        _computeLeastUpperInstantiatedSubtype();
   }
 
   ClassEntity _computeLeastUpperInstantiatedSubtype() {
@@ -913,7 +906,7 @@
 
   @override
   ClassEntity get current {
-    return currentNode != null ? currentNode.cls : null;
+    return currentNode?.cls;
   }
 
   @override
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index d960d16..7299ebe 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -328,7 +328,7 @@
 
   void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
     MemberEntity element = staticUse.element;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(element, useSet);
     switch (staticUse.kind) {
       case StaticUseKind.STATIC_TEAR_OFF:
@@ -421,7 +421,7 @@
       ClassEntity cls, MemberEntity member, MemberUsedCallback memberUsed,
       {bool checkEnqueuerConsistency = false}) {
     if (!member.isInstanceMember) return;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(member, useSet);
     if (useSet.isNotEmpty) {
       if (checkEnqueuerConsistency) {
@@ -604,7 +604,7 @@
 }
 
 class CodegenWorldImpl implements CodegenWorld {
-  JClosedWorld _closedWorld;
+  final JClosedWorld _closedWorld;
 
   final Map<MemberEntity, MemberUsage> _liveMemberUsage;
 
diff --git a/pkg/compiler/lib/src/universe/feature.dart b/pkg/compiler/lib/src/universe/feature.dart
index 1e1dd45..ca27733 100644
--- a/pkg/compiler/lib/src/universe/feature.dart
+++ b/pkg/compiler/lib/src/universe/feature.dart
@@ -267,13 +267,23 @@
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! GenericInstantiation) return false;
-    return functionType == other.functionType &&
-        equalElements(typeArguments, other.typeArguments);
+    if (functionType == other.functionType &&
+        equalElements(typeArguments, other.typeArguments)) {
+      assert(
+          this.hashCode == other.hashCode,
+          '\nthis:  ${this.hashCode}  $this'
+          '\nthis:  ${other.hashCode}  $other');
+      return true;
+    } else {
+      return false;
+    }
   }
 
   @override
   String toString() {
-    return 'GenericInstantiation(functionType:$functionType,'
-        'typeArguments:$typeArguments)';
+    return 'GenericInstantiation('
+        'functionType:$functionType,'
+        'typeArguments:$typeArguments'
+        ')';
   }
 }
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 7c934bf..6661fc9 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -17,7 +17,7 @@
   final Map<String, FunctionSetNode> _nodes;
 
   factory FunctionSet(Iterable<MemberEntity> liveInstanceMembers) {
-    Map<String, FunctionSetNode> nodes = Map<String, FunctionSetNode>();
+    Map<String, FunctionSetNode> nodes = {};
     for (MemberEntity member in liveInstanceMembers) {
       String name = member.name;
       (nodes[name] ??= FunctionSetNode(name)).add(member);
@@ -136,14 +136,13 @@
 /// selectors with the same [name].
 class FunctionSetNode {
   final String name;
-  final Map<SelectorMask, FunctionSetQuery> cache =
-      <SelectorMask, FunctionSetQuery>{};
+  final Map<SelectorMask, FunctionSetQuery> cache = {};
 
   // Initially, we keep the elements in a list because it is more
   // compact than a hash set. Once we get enough elements, we change
   // the representation to be a set to get faster contains checks.
   static const int MAX_ELEMENTS_IN_LIST = 8;
-  Iterable<MemberEntity> elements = <MemberEntity>[];
+  Iterable<MemberEntity> elements = [];
   bool isList = true;
 
   FunctionSetNode(this.name);
@@ -211,12 +210,10 @@
     Setlet<MemberEntity> functions;
     for (MemberEntity element in elements) {
       if (selectorMask.applies(element, domain)) {
-        if (functions == null) {
-          // Defer the allocation of the functions set until we are
-          // sure we need it. This allows us to return immutable empty
-          // lists when the filtering produced no results.
-          functions = Setlet<MemberEntity>();
-        }
+        // Defer the allocation of the functions set until we are
+        // sure we need it. This allows us to return immutable empty
+        // lists when the filtering produced no results.
+        functions ??= Setlet();
         functions.add(element);
       }
     }
@@ -229,11 +226,8 @@
       FunctionSetQuery noSuchMethodQuery =
           noSuchMethods.query(noSuchMethodMask, domain);
       if (!noSuchMethodQuery.functions.isEmpty) {
-        if (functions == null) {
-          functions = Setlet<MemberEntity>.from(noSuchMethodQuery.functions);
-        } else {
-          functions.addAll(noSuchMethodQuery.functions);
-        }
+        functions ??= Setlet();
+        functions.addAll(noSuchMethodQuery.functions);
       }
     }
     cache[selectorMask] = result = (functions != null)
@@ -276,7 +270,7 @@
   AbstractValue computeMask(AbstractValueDomain domain) => domain.emptyType;
 
   @override
-  Iterable<MemberEntity> get functions => const <MemberEntity>[];
+  Iterable<MemberEntity> get functions => const [];
 
   @override
   String toString() => '<empty>';
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 591b05a..451b6c5 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -17,7 +17,7 @@
 
   AbstractUsage.cloned(this._pendingUse);
 
-  AbstractUsage() : this._pendingUse = EnumSet<T>() {
+  AbstractUsage() : this._pendingUse = EnumSet() {
     _pendingUse.addAll(_originalUse);
   }
 
@@ -615,14 +615,12 @@
 
 /// Common [EnumSet]s used for [MemberUse].
 class MemberUses {
-  static const EnumSet<MemberUse> NONE = EnumSet<MemberUse>.fixed(0);
-  static const EnumSet<MemberUse> NORMAL_ONLY = EnumSet<MemberUse>.fixed(1);
-  static const EnumSet<MemberUse> CLOSURIZE_INSTANCE_ONLY =
-      EnumSet<MemberUse>.fixed(2);
-  static const EnumSet<MemberUse> CLOSURIZE_STATIC_ONLY =
-      EnumSet<MemberUse>.fixed(4);
-  static const EnumSet<MemberUse> ALL_INSTANCE = EnumSet<MemberUse>.fixed(3);
-  static const EnumSet<MemberUse> ALL_STATIC = EnumSet<MemberUse>.fixed(5);
+  static const EnumSet<MemberUse> NONE = EnumSet.fixed(0);
+  static const EnumSet<MemberUse> NORMAL_ONLY = EnumSet.fixed(1);
+  static const EnumSet<MemberUse> CLOSURIZE_INSTANCE_ONLY = EnumSet.fixed(2);
+  static const EnumSet<MemberUse> CLOSURIZE_STATIC_ONLY = EnumSet.fixed(4);
+  static const EnumSet<MemberUse> ALL_INSTANCE = EnumSet.fixed(3);
+  static const EnumSet<MemberUse> ALL_STATIC = EnumSet.fixed(5);
 }
 
 typedef MemberUsedCallback = void Function(
@@ -666,10 +664,10 @@
 
 /// Common [EnumSet]s used for [ClassUse].
 class ClassUses {
-  static const EnumSet<ClassUse> NONE = EnumSet<ClassUse>.fixed(0);
-  static const EnumSet<ClassUse> INSTANTIATED_ONLY = EnumSet<ClassUse>.fixed(1);
-  static const EnumSet<ClassUse> IMPLEMENTED_ONLY = EnumSet<ClassUse>.fixed(2);
-  static const EnumSet<ClassUse> ALL = EnumSet<ClassUse>.fixed(3);
+  static const EnumSet<ClassUse> NONE = EnumSet.fixed(0);
+  static const EnumSet<ClassUse> INSTANTIATED_ONLY = EnumSet.fixed(1);
+  static const EnumSet<ClassUse> IMPLEMENTED_ONLY = EnumSet.fixed(2);
+  static const EnumSet<ClassUse> ALL = EnumSet.fixed(3);
 }
 
 typedef ClassUsedCallback = void Function(
@@ -820,15 +818,15 @@
 /// Access sets used for registration of member usage.
 class Accesses {
   /// Statically bound access of a member.
-  static const EnumSet<Access> staticAccess = EnumSet<Access>.fixed(1);
+  static const EnumSet<Access> staticAccess = EnumSet.fixed(1);
 
   /// Dynamically bound access of a member. This implies the statically bound
   /// access of the member.
-  static const EnumSet<Access> dynamicAccess = EnumSet<Access>.fixed(3);
+  static const EnumSet<Access> dynamicAccess = EnumSet.fixed(3);
 
   /// Direct access of a super class member. This implies the statically bound
   /// access of the member.
-  static const EnumSet<Access> superAccess = EnumSet<Access>.fixed(5);
+  static const EnumSet<Access> superAccess = EnumSet.fixed(5);
 }
 
 /// The accesses of a member collected during closed world computation.
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index bd6cdc2..7683874 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -199,7 +199,7 @@
   /// Register [type] as the instantiation [kind] using [constructor].
   void addInstantiation(
       ConstructorEntity constructor, InterfaceType type, Instantiation kind) {
-    instantiationMap ??= <ConstructorEntity, Set<Instance>>{};
+    instantiationMap ??= {};
     instantiationMap
         .putIfAbsent(constructor, () => Set<Instance>())
         .add(Instance(type, kind));
@@ -259,36 +259,30 @@
   /// Instantiation information for all classes with instantiated types.
   ///
   /// Invariant: Elements are declaration elements.
-  final Map<ClassEntity, InstantiationInfo> _instantiationInfo =
-      <ClassEntity, InstantiationInfo>{};
+  final Map<ClassEntity, InstantiationInfo> _instantiationInfo = {};
 
   /// Classes implemented by directly instantiated classes.
-  final Set<ClassEntity> _implementedClasses = Set<ClassEntity>();
+  final Set<ClassEntity> _implementedClasses = {};
 
   /// The set of all referenced static fields.
   ///
   /// Invariant: Elements are declaration elements.
-  final Set<FieldEntity> _allReferencedStaticFields = Set<FieldEntity>();
+  final Set<FieldEntity> _allReferencedStaticFields = {};
 
   /// Documentation wanted -- johnniwinther
   ///
   /// Invariant: Elements are declaration elements.
-  final Set<FunctionEntity> _methodsNeedingSuperGetter = Set<FunctionEntity>();
-  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 Set<FunctionEntity> _methodsNeedingSuperGetter = {};
+  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 members of live classes.
-  final Map<MemberEntity, MemberUsage> _memberUsage =
-      <MemberEntity, MemberUsage>{};
+  final Map<MemberEntity, MemberUsage> _memberUsage = {};
 
   Map<MemberEntity, MemberUsage> get memberUsageForTesting => _memberUsage;
 
@@ -297,30 +291,26 @@
   ///
   /// 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<FieldEntity> _fieldSetters = Set<FieldEntity>();
+  final Set<FieldEntity> _fieldSetters = {};
 
-  final Set<DartType> _isChecks = Set<DartType>();
+  final Set<DartType> _isChecks = {};
   final Set<TypeVariableType> _namedTypeVariablesNewRti = {};
 
   /// Set of all closures in the program. Used by the mirror tracking system
   /// to find all live closure instances.
-  final Set<Local> _localFunctions = Set<Local>();
+  final Set<Local> _localFunctions = {};
 
-  final Set<FunctionEntity> _closurizedMembersWithFreeTypeVariables =
-      Set<FunctionEntity>();
+  final Set<FunctionEntity> _closurizedMembersWithFreeTypeVariables = {};
 
   final CompilerOptions _options;
   final ElementEnvironment _elementEnvironment;
@@ -343,13 +333,13 @@
 
   bool _closed = false;
   KClosedWorld _closedWorldCache;
-  final Set<MemberEntity> _liveInstanceMembers = Set<MemberEntity>();
+  final Set<MemberEntity> _liveInstanceMembers = {};
 
-  final Set<ConstantValue> _constantValues = Set<ConstantValue>();
+  final Set<ConstantValue> _constantValues = {};
 
-  final Set<Local> _genericLocalFunctions = Set<Local>();
+  final Set<Local> _genericLocalFunctions = {};
 
-  Set<MemberEntity> _processedMembers = Set<MemberEntity>();
+  final Set<MemberEntity> _processedMembers = {};
 
   bool get isClosed => _closed;
 
@@ -402,7 +392,7 @@
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
-    Set<ClassEntity> classes = Set<ClassEntity>();
+    Set<ClassEntity> classes = {};
     getInstantiationMap().forEach((ClassEntity cls, InstantiationInfo info) {
       if (info.hasInstantiation) {
         classes.add(cls);
@@ -465,18 +455,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, this)) {
-          callStructures ??= Set<CallStructure>();
+          callStructures ??= {};
           callStructures.add(selector.callStructure);
         }
       }
     }
-    return callStructures ?? const <CallStructure>[];
+    return callStructures ?? const [];
   }
 
   bool _hasMatchingSelector(
@@ -624,7 +614,7 @@
     }
 
     MemberEntity element = staticUse.element;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(element, useSet);
 
     if ((element.isStatic || element.isTopLevel) && element.isField) {
@@ -753,8 +743,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] = Set<MemberUsage>();
-    Set<MemberUsage> remaining = Set<MemberUsage>();
+    map[memberName] = {};
+    Set<MemberUsage> remaining = {};
     for (MemberUsage usage in members) {
       if (!updateUsage(usage)) {
         remaining.add(usage);
@@ -850,7 +840,7 @@
 
     MemberUsage usage = _memberUsage[member];
     if (usage == null) {
-      EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+      EnumSet<MemberUse> useSet = EnumSet();
       usage = _getMemberUsage(member, useSet,
           checkEnqueuerConsistency: checkEnqueuerConsistency);
       if (useSet.isNotEmpty) {
@@ -867,7 +857,7 @@
         usage = usage.clone();
       }
       if (usage.hasPendingDynamicUse) {
-        EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+        EnumSet<MemberUse> useSet = EnumSet();
         if (usage.hasPendingDynamicRead && _hasInvokedGetter(member)) {
           useSet.addAll(usage.read(Accesses.dynamicAccess));
         }
@@ -919,8 +909,7 @@
   }
 
   Map<ClassEntity, Set<ClassEntity>> populateHierarchyNodes() {
-    Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
-        Map<ClassEntity, Set<ClassEntity>>();
+    Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = {};
 
     // Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
     // properties of the [ClassHierarchyNode] for [cls].
@@ -938,8 +927,7 @@
       ClassEntity superclass = _classQueries.getSuperClass(cls);
       while (superclass != null) {
         Set<ClassEntity> typesImplementedBySubclassesOfCls =
-            typesImplementedBySubclasses.putIfAbsent(
-                superclass, () => Set<ClassEntity>());
+            typesImplementedBySubclasses.putIfAbsent(superclass, () => {});
         for (InterfaceType current in _classQueries.getSupertypes(cls)) {
           typesImplementedBySubclassesOfCls.add(current.element);
         }
@@ -957,7 +945,7 @@
   }
 
   Iterable<MemberEntity> computeAssignedInstanceMembers() {
-    Set<MemberEntity> assignedInstanceMembers = Set<MemberEntity>();
+    Set<MemberEntity> assignedInstanceMembers = {};
     for (MemberEntity instanceMember in _liveInstanceMembers) {
       if (_hasInvokedSetter(instanceMember)) {
         assignedInstanceMembers.add(instanceMember);
@@ -1025,7 +1013,7 @@
           "Member $member is processed but has not usage.");
     }
 
-    Set<InterfaceType> instantiatedTypes = Set<InterfaceType>();
+    Set<InterfaceType> instantiatedTypes = {};
     getInstantiationMap().forEach((_, InstantiationInfo info) {
       if (info.instantiationMap != null) {
         for (Set<Instance> instances in info.instantiationMap.values) {
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index b66d87c..5235fe1 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -17,9 +17,8 @@
 
 class SelectorKind {
   final String name;
-  @override
-  final int hashCode;
-  const SelectorKind(this.name, this.hashCode);
+  final int index;
+  const SelectorKind(this.name, this.index);
 
   static const SelectorKind GETTER = SelectorKind('getter', 0);
   static const SelectorKind SETTER = SelectorKind('setter', 1);
@@ -28,12 +27,13 @@
   static const SelectorKind INDEX = SelectorKind('index', 4);
   static const SelectorKind SPECIAL = SelectorKind('special', 5);
 
-  int get index => hashCode;
+  @override
+  int get hashCode => index;
 
   @override
   String toString() => name;
 
-  static List<SelectorKind> values = const <SelectorKind>[
+  static const List<SelectorKind> values = [
     GETTER,
     SETTER,
     CALL,
@@ -109,8 +109,7 @@
   factory Selector(SelectorKind kind, Name name, CallStructure callStructure) {
     // TODO(johnniwinther): Maybe use equality instead of implicit hashing.
     int hashCode = computeHashCode(kind, name, callStructure);
-    List<Selector> list =
-        canonicalizedValues.putIfAbsent(hashCode, () => <Selector>[]);
+    List<Selector> list = canonicalizedValues.putIfAbsent(hashCode, () => []);
     for (int i = 0; i < list.length; i++) {
       Selector existing = list[i];
       if (existing.match(kind, name, callStructure)) {
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index 963b52c..c05eaf7 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -295,7 +295,7 @@
 
   void addInput(SideEffectsBuilder input) {
     if (_free) return;
-    (input._depending ??= Set<SideEffectsBuilder>()).add(this);
+    (input._depending ??= {}).add(this);
   }
 
   bool add(SideEffects input) {
@@ -305,8 +305,7 @@
 
   SideEffects get sideEffects => _sideEffects;
 
-  Iterable<SideEffectsBuilder> get depending =>
-      _depending != null ? _depending : const <SideEffectsBuilder>[];
+  Iterable<SideEffectsBuilder> get depending => _depending ?? const [];
 
   MemberEntity get member => _member;
 
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index f213d7a..bb33b0e 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -129,7 +129,7 @@
     }
   }
 
-  List<DartType> get typeArguments => _typeArguments ?? const <DartType>[];
+  List<DartType> get typeArguments => _typeArguments ?? const [];
 
   @override
   int get hashCode => Hashing.listHash(
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index 7ddd42e..ea42f4a 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -148,7 +148,7 @@
       _constraints = null;
       return true;
     }
-    _constraints ??= Set<StrongModeConstraint>();
+    _constraints ??= {};
     return _constraints.add(constraint);
   }
 
@@ -220,26 +220,23 @@
 }
 
 abstract class WorldBuilderBase {
-  final Map<Entity, Set<DartType>> staticTypeArgumentDependencies =
-      <Entity, Set<DartType>>{};
+  final Map<Entity, Set<DartType>> staticTypeArgumentDependencies = {};
 
-  final Map<Selector, Set<DartType>> dynamicTypeArgumentDependencies =
-      <Selector, Set<DartType>>{};
+  final Map<Selector, Set<DartType>> dynamicTypeArgumentDependencies = {};
 
-  final Set<TypeVariableType> typeVariableTypeLiterals =
-      Set<TypeVariableType>();
+  final Set<TypeVariableType> typeVariableTypeLiterals = {};
 
   void _registerStaticTypeArgumentDependency(
       Entity element, List<DartType> typeArguments) {
     staticTypeArgumentDependencies
-        .putIfAbsent(element, () => Set<DartType>())
+        .putIfAbsent(element, () => {})
         .addAll(typeArguments);
   }
 
   void _registerDynamicTypeArgumentDependency(
       Selector selector, List<DartType> typeArguments) {
     dynamicTypeArgumentDependencies
-        .putIfAbsent(selector, () => Set<DartType>())
+        .putIfAbsent(selector, () => {})
         .addAll(typeArguments);
   }
 
diff --git a/pkg/compiler/lib/src/universe/world_impact.dart b/pkg/compiler/lib/src/universe/world_impact.dart
index 85b9bb0..19fe89f 100644
--- a/pkg/compiler/lib/src/universe/world_impact.dart
+++ b/pkg/compiler/lib/src/universe/world_impact.dart
@@ -24,18 +24,18 @@
 
   MemberEntity get member => null;
 
-  Iterable<DynamicUse> get dynamicUses => const <DynamicUse>[];
+  Iterable<DynamicUse> get dynamicUses => const [];
 
-  Iterable<StaticUse> get staticUses => const <StaticUse>[];
+  Iterable<StaticUse> get staticUses => const [];
 
   // TODO(johnniwinther): Replace this by called constructors with type
   // arguments.
   // TODO(johnniwinther): Collect all checked types for checked mode separately
   // to support serialization.
 
-  Iterable<TypeUse> get typeUses => const <TypeUse>[];
+  Iterable<TypeUse> get typeUses => const [];
 
-  Iterable<ConstantUse> get constantUses => const <ConstantUse>[];
+  Iterable<ConstantUse> get constantUses => const [];
 
   bool get isEmpty => true;
 
@@ -113,49 +113,49 @@
   @override
   void registerDynamicUse(DynamicUse dynamicUse) {
     assert(dynamicUse != null);
-    _dynamicUses ??= Setlet<DynamicUse>();
+    _dynamicUses ??= Setlet();
     _dynamicUses.add(dynamicUse);
   }
 
   @override
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null ? _dynamicUses : const <DynamicUse>[];
+    return _dynamicUses ?? const [];
   }
 
   @override
   void registerTypeUse(TypeUse typeUse) {
     assert(typeUse != null);
-    _typeUses ??= Setlet<TypeUse>();
+    _typeUses ??= Setlet();
     _typeUses.add(typeUse);
   }
 
   @override
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null ? _typeUses : const <TypeUse>[];
+    return _typeUses ?? const [];
   }
 
   @override
   void registerStaticUse(StaticUse staticUse) {
     assert(staticUse != null);
-    _staticUses ??= Setlet<StaticUse>();
+    _staticUses ??= Setlet();
     _staticUses.add(staticUse);
   }
 
   @override
   Iterable<StaticUse> get staticUses {
-    return _staticUses != null ? _staticUses : const <StaticUse>[];
+    return _staticUses ?? const [];
   }
 
   @override
   void registerConstantUse(ConstantUse constantUse) {
     assert(constantUse != null);
-    _constantUses ??= Setlet<ConstantUse>();
+    _constantUses ??= Setlet();
     _constantUses.add(constantUse);
   }
 
   @override
   Iterable<ConstantUse> get constantUses {
-    return _constantUses != null ? _constantUses : const <ConstantUse>[];
+    return _constantUses ?? const [];
   }
 }
 
@@ -164,7 +164,7 @@
 class StagedWorldImpactBuilder implements WorldImpactBuilder {
   final bool collectImpacts;
   WorldImpactBuilderImpl _currentBuilder;
-  List<WorldImpactBuilderImpl> _builders = <WorldImpactBuilderImpl>[];
+  final List<WorldImpactBuilderImpl> _builders = [];
 
   StagedWorldImpactBuilder({this.collectImpacts = false});
 
@@ -242,57 +242,45 @@
 
   @override
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null ? _dynamicUses : worldImpact.dynamicUses;
+    return _dynamicUses ?? worldImpact.dynamicUses;
   }
 
   @override
   void registerDynamicUse(DynamicUse dynamicUse) {
-    if (_dynamicUses == null) {
-      _dynamicUses = Setlet<DynamicUse>();
-      _dynamicUses.addAll(worldImpact.dynamicUses);
-    }
+    _dynamicUses ??= Setlet.of(worldImpact.dynamicUses);
     _dynamicUses.add(dynamicUse);
   }
 
   @override
   void registerTypeUse(TypeUse typeUse) {
-    if (_typeUses == null) {
-      _typeUses = Setlet<TypeUse>();
-      _typeUses.addAll(worldImpact.typeUses);
-    }
+    _typeUses ??= Setlet.of(worldImpact.typeUses);
     _typeUses.add(typeUse);
   }
 
   @override
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null ? _typeUses : worldImpact.typeUses;
+    return _typeUses ?? worldImpact.typeUses;
   }
 
   @override
   void registerStaticUse(StaticUse staticUse) {
-    if (_staticUses == null) {
-      _staticUses = Setlet<StaticUse>();
-      _staticUses.addAll(worldImpact.staticUses);
-    }
+    _staticUses ??= Setlet.of(worldImpact.staticUses);
     _staticUses.add(staticUse);
   }
 
   @override
   Iterable<StaticUse> get staticUses {
-    return _staticUses != null ? _staticUses : worldImpact.staticUses;
+    return _staticUses ?? worldImpact.staticUses;
   }
 
   @override
   Iterable<ConstantUse> get constantUses {
-    return _constantUses != null ? _constantUses : worldImpact.constantUses;
+    return _constantUses ?? worldImpact.constantUses;
   }
 
   @override
   void registerConstantUse(ConstantUse constantUse) {
-    if (_constantUses == null) {
-      _constantUses = Setlet<ConstantUse>();
-      _constantUses.addAll(worldImpact.constantUses);
-    }
+    _constantUses ??= Setlet.of(worldImpact.constantUses);
     _constantUses.add(constantUse);
   }
 
diff --git a/pkg/compiler/lib/src/util/maplet.dart b/pkg/compiler/lib/src/util/maplet.dart
index 05d7c4c..1afe289 100644
--- a/pkg/compiler/lib/src/util/maplet.dart
+++ b/pkg/compiler/lib/src/util/maplet.dart
@@ -30,7 +30,7 @@
 
   Maplet();
 
-  Maplet.from(Maplet<K, V> other) {
+  Maplet.of(Maplet<K, V> other) {
     other.forEach((K key, V value) {
       this[key] = value;
     });
diff --git a/pkg/compiler/lib/src/util/setlet.dart b/pkg/compiler/lib/src/util/setlet.dart
index c7aef0d..f44b330 100644
--- a/pkg/compiler/lib/src/util/setlet.dart
+++ b/pkg/compiler/lib/src/util/setlet.dart
@@ -26,7 +26,7 @@
 
   Setlet();
 
-  Setlet.from(Iterable<E> elements) {
+  Setlet.of(Iterable<E> elements) {
     addAll(elements);
   }
 
@@ -209,8 +209,10 @@
   @override
   void removeWhere(bool test(E element)) {
     if (_extra == null) {
-      if (test(_contents)) {
-        _contents = _MARKER;
+      if (_MARKER != _contents) {
+        if (test(_contents)) {
+          _contents = _MARKER;
+        }
       }
     } else if (_MARKER == _extra) {
       _contents.removeWhere(test);
@@ -273,11 +275,11 @@
 
   @override
   Setlet<E> intersection(Set<Object?> other) =>
-      Setlet<E>.from(this.where((e) => other.contains(e)));
+      Setlet.of(this.where((e) => other.contains(e)));
 
   @override
   Setlet<E> difference(Set<Object?> other) =>
-      Setlet<E>.from(this.where((e) => !other.contains(e)));
+      Setlet.of(this.where((e) => !other.contains(e)));
 
   @override
   Setlet<E> toSet() {
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index 6a7894f..7c5f50b 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -233,15 +233,6 @@
   buffer.write(string);
 }
 
-int computeHashCode(part1, [part2, part3, part4, part5]) {
-  return (part1.hashCode ^
-          part2.hashCode ^
-          part3.hashCode ^
-          part4.hashCode ^
-          part5.hashCode) &
-      0x3fffffff;
-}
-
 class Pair<A, B> {
   final A a;
   final B b;
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 72b3ec0..f3d9ab1 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -13,7 +13,6 @@
         KCommonElements,
         KElementEnvironment;
 import 'deferred_load/output_unit.dart';
-import 'diagnostics/diagnostic_listener.dart';
 import 'elements/entities.dart';
 import 'elements/names.dart';
 import 'elements/types.dart';
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index 6e63cb6..ad1c27b 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -39,7 +39,6 @@
   package_config: any
   path: any
   source_maps: any
-  test: any
   cli_util: any
   # Unpublished packages that can be used via path dependency
   async_helper:
diff --git a/pkg/compiler/test/analyses/analysis_helper.dart b/pkg/compiler/test/analyses/analysis_helper.dart
index 43fb4db..329a825 100644
--- a/pkg/compiler/test/analyses/analysis_helper.dart
+++ b/pkg/compiler/test/analyses/analysis_helper.dart
@@ -141,7 +141,7 @@
   final bool Function(Uri uri) analyzedUrisFilter;
 
   Map _expectedJson = {};
-  Map<String, Map<String, List<DiagnosticMessage>>> _actualMessages = {};
+  final Map<String, Map<String, List<DiagnosticMessage>>> _actualMessages = {};
 
   DynamicVisitor(this.reporter, this.component, this._allowedListPath,
       this.analyzedUrisFilter)
diff --git a/pkg/compiler/test/analyses/dart2js_allowed.json b/pkg/compiler/test/analyses/dart2js_allowed.json
index 242faa0..d9943f4 100644
--- a/pkg/compiler/test/analyses/dart2js_allowed.json
+++ b/pkg/compiler/test/analyses/dart2js_allowed.json
@@ -47,66 +47,10 @@
     "Dynamic access of 'memberContext'.": 1,
     "Dynamic access of 'name'.": 1
   },
-  "pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart": {
-    "Dynamic access of 'isNullable'.": 2,
-    "Dynamic access of 'isEmptyOrNull'.": 1,
-    "Dynamic access of 'isContainer'.": 1,
-    "Dynamic access of 'elementType'.": 2,
-    "Dynamic access of 'length'.": 1,
-    "Dynamic access of 'forwardTo'.": 1,
-    "Dynamic access of 'allocationNode'.": 1,
-    "Dynamic access of 'allocationElement'.": 1
-  },
-  "pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart": {
-    "Dynamic access of 'isNullable'.": 2,
-    "Dynamic access of 'isEmptyOrNull'.": 1,
-    "Dynamic access of 'isDictionary'.": 1,
-    "Dynamic access of 'forwardTo'.": 2,
-    "Dynamic access of 'keyType'.": 3,
-    "Dynamic access of 'valueType'.": 3,
-    "Dynamic access of 'masks::_typeMap'.": 2,
-    "Dynamic invocation of 'containsKey'.": 1,
-    "Dynamic invocation of 'nullable'.": 2,
-    "Dynamic invocation of 'union'.": 1,
-    "Dynamic invocation of 'forEach'.": 1,
-    "Dynamic access of 'isMap'.": 1
-  },
-  "pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart": {
-    "Dynamic access of 'isNullable'.": 1
-  },
-  "pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart": {
-    "Dynamic access of 'isNullable'.": 2,
-    "Dynamic access of 'isEmptyOrNull'.": 1,
-    "Dynamic access of 'isMap'.": 1,
-    "Dynamic access of 'keyType'.": 4,
-    "Dynamic access of 'valueType'.": 2,
-    "Dynamic access of 'forwardTo'.": 2,
-    "Dynamic access of 'isDictionary'.": 1,
-    "Dynamic invocation of 'union'.": 1,
-    "Dynamic access of 'typeMap'.": 1,
-    "Dynamic access of 'values'.": 1,
-    "Dynamic invocation of 'fold'.": 1,
-    "Dynamic access of 'allocationNode'.": 1,
-    "Dynamic access of 'allocationElement'.": 1
-  },
-  "pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart": {
-    "Dynamic access of 'isNullable'.": 2,
-    "Dynamic access of 'isEmptyOrNull'.": 1,
-    "Dynamic access of 'isSet'.": 1,
-    "Dynamic access of 'elementType'.": 2,
-    "Dynamic access of 'forwardTo'.": 1
-  },
   "pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart": {
     "Dynamic access of 'isForwarding'.": 1,
     "Dynamic access of 'forwardTo'.": 1
   },
-  "pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart": {
-    "Dynamic invocation of 'nonNullable'.": 2,
-    "Dynamic access of 'isNullable'.": 3,
-    "Dynamic access of 'isUnion'.": 2,
-    "Dynamic access of 'disjointMasks'.": 3,
-    "Dynamic invocation of 'contains'.": 1
-  },
   "pkg/compiler/lib/src/helpers/expensive_map.dart": {
     "Dynamic access of 'length'.": 1,
     "Dynamic access of 'isEmpty'.": 1,
diff --git a/pkg/compiler/test/analysis_options.yaml b/pkg/compiler/test/analysis_options.yaml
index ca57e09..7926857 100644
--- a/pkg/compiler/test/analysis_options.yaml
+++ b/pkg/compiler/test/analysis_options.yaml
@@ -16,3 +16,5 @@
 linter:
   rules:
     - annotate_overrides
+    - prefer_if_null_operators
+    - prefer_null_aware_operators
diff --git a/pkg/compiler/test/annotations/annotations_test.dart b/pkg/compiler/test/annotations/annotations_test.dart
index a4424c6..2f81123 100644
--- a/pkg/compiler/test/annotations/annotations_test.dart
+++ b/pkg/compiler/test/annotations/annotations_test.dart
@@ -10,7 +10,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/annotations.dart';
 import 'package:compiler/src/js_model/element_map.dart';
diff --git a/pkg/compiler/test/closure/data/test_type_class.dart b/pkg/compiler/test/closure/data/test_type_class.dart
index 2d090d6..eff36b1 100644
--- a/pkg/compiler/test/closure/data/test_type_class.dart
+++ b/pkg/compiler/test/closure/data/test_type_class.dart
@@ -33,7 +33,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// Implicit as-cast is only required in spec:nnbd-off mode.
+/// Implicit as-cast is only required in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*member: Class3.:hasThis*/
diff --git a/pkg/compiler/test/closure/data/test_type_method.dart b/pkg/compiler/test/closure/data/test_type_method.dart
index 495ac1b..ee02292 100644
--- a/pkg/compiler/test/closure/data/test_type_method.dart
+++ b/pkg/compiler/test/closure/data/test_type_method.dart
@@ -27,7 +27,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// Implicit as-cast is only required in spec:nnbd-off mode.
+/// Implicit as-cast is only required in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*member: method3:*/
diff --git a/pkg/compiler/test/closure/data/type_annotations_class.dart b/pkg/compiler/test/closure/data/type_annotations_class.dart
index 6c0d99e..f7557f7 100644
--- a/pkg/compiler/test/closure/data/type_annotations_class.dart
+++ b/pkg/compiler/test/closure/data/type_annotations_class.dart
@@ -43,7 +43,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// A local function parameter type is only captured in spec:nnbd-off mode.
+/// A local function parameter type is only captured in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*member: Class2.:hasThis*/
@@ -58,7 +58,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// A local function return type is only captured in spec:nnbd-off mode.
+/// A local function return type is only captured in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*member: Class3.:hasThis*/
diff --git a/pkg/compiler/test/closure/data/type_annotations_method.dart b/pkg/compiler/test/closure/data/type_annotations_method.dart
index 4da1fae..1468024 100644
--- a/pkg/compiler/test/closure/data/type_annotations_method.dart
+++ b/pkg/compiler/test/closure/data/type_annotations_method.dart
@@ -19,7 +19,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// A local function parameter type is captured in spec:nnbd-off mode.
+/// A local function parameter type is captured in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 method2<T>() {
@@ -29,7 +29,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-/// A local function return type is captured in spec:nnbd-off mode.
+/// A local function return type is captured in spec mode.
 ////////////////////////////////////////////////////////////////////////////////
 
 method3<T>(dynamic o) {
diff --git a/pkg/compiler/test/codegen/codegen_test_helper.dart b/pkg/compiler/test/codegen/codegen_test_helper.dart
index b2bb6b1..d8d813c 100644
--- a/pkg/compiler/test/codegen/codegen_test_helper.dart
+++ b/pkg/compiler/test/codegen/codegen_test_helper.dart
@@ -10,7 +10,6 @@
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_strategy.dart';
@@ -135,7 +134,7 @@
   const CodeDataInterpreter();
 
   String _clean(String code) => code.replaceAll(_re, '');
-  static RegExp _re = RegExp(r'[\n\r]\s*');
+  static final RegExp _re = RegExp(r'[\n\r]\s*');
 
   @override
   String isAsExpected(String actualData, String expectedData) {
diff --git a/pkg/compiler/test/codegen/data/array_add.dart b/pkg/compiler/test/codegen/data/array_add.dart
index c0447fe..81ecb40 100644
--- a/pkg/compiler/test/codegen/data/array_add.dart
+++ b/pkg/compiler/test/codegen/data/array_add.dart
@@ -6,9 +6,9 @@
 //
 // TODO(sra): Lower when type of input does not need a generic covariant check.
 @pragma('dart2js:noInline')
-/*spec.member: test1:function() {
-  var t1 = H._setArrayType([], type$.JSArray_int);
-  C.JSArray_methods.add$1(t1, 1);
+/*spec|canary.member: test1:function() {
+  var t1 = A._setArrayType([], type$.JSArray_int);
+  B.JSArray_methods.add$1(t1, 1);
   return t1;
 }*/
 /*prod.member: test1:function() {
@@ -16,20 +16,12 @@
   t1.push(1);
   return t1;
 }*/
-/*canary.member: test1:function() {
-  var t1 = B._setArrayType([], type$.JSArray_int);
-  A.JSArray_methods.add$1(t1, 1);
-  return t1;
-}*/
 test1() {
   return <int>[]..add(1);
 }
 
-/*spec|prod.member: main:function() {
-  F.test1();
-}*/
-/*canary.member: main:function() {
-  B.test1();
+/*member: main:function() {
+  A.test1();
 }*/
 main() {
   test1();
diff --git a/pkg/compiler/test/codegen/data/codeUnitAt_folding.dart b/pkg/compiler/test/codegen/data/codeUnitAt_folding.dart
index e52a16a..993e670 100644
--- a/pkg/compiler/test/codegen/data/codeUnitAt_folding.dart
+++ b/pkg/compiler/test/codegen/data/codeUnitAt_folding.dart
@@ -14,14 +14,11 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo2:function() {
-  return C.JSString_methods.codeUnitAt$1("Hello", H._asInt(1.5));
+/*spec|canary.member: foo2:function() {
+  return B.JSString_methods.codeUnitAt$1("Hello", A._asInt(1.5));
 }*/
 /*prod.member: foo2:function() {
-  return C.JSString_methods.codeUnitAt$1("Hello", 1.5);
-}*/
-/*canary.member: foo2:function() {
-  return A.JSString_methods.codeUnitAt$1("Hello", B._asInt(1.5));
+  return B.JSString_methods.codeUnitAt$1("Hello", 1.5);
 }*/
 foo2() {
   var a = 'Hello';
@@ -31,11 +28,8 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: foo3:function() {
-  return C.JSString_methods._codeUnitAt$1("Hello", 55);
-}*/
-/*canary.member: foo3:function() {
-  return A.JSString_methods._codeUnitAt$1("Hello", 55);
+/*member: foo3:function() {
+  return B.JSString_methods._codeUnitAt$1("Hello", 55);
 }*/
 foo3() {
   var a = 'Hello';
diff --git a/pkg/compiler/test/codegen/data/shift_right_unsigned.dart b/pkg/compiler/test/codegen/data/shift_right_unsigned.dart
index 7cdad26..521f9d3 100644
--- a/pkg/compiler/test/codegen/data/shift_right_unsigned.dart
+++ b/pkg/compiler/test/codegen/data/shift_right_unsigned.dart
@@ -24,25 +24,19 @@
 Object? sink;
 
 @pragma('dart2js:noInline')
-/*spec.member: cannotRecognize:function(thing) {
-  return H._asInt(J.$shru$n(thing, 1));
+/*spec|canary.member: cannotRecognize:function(thing) {
+  return A._asInt(J.$shru$n(thing, 1));
 }*/
 /*prod.member: cannotRecognize:function(thing) {
   return J.$shru$n(thing, 1);
 }*/
-/*canary.member: cannotRecognize:function(thing) {
-  return B._asInt(J.$shru$n(thing, 1));
-}*/
 int cannotRecognize(dynamic thing) {
   return thing >>> 1;
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: cannotConstantFold:function() {
-  return C.JSInt_methods.$shru(1, -1);
-}*/
-/*canary.member: cannotConstantFold:function() {
-  return A.JSInt_methods.$shru(1, -1);
+/*member: cannotConstantFold:function() {
+  return B.JSInt_methods.$shru(1, -1);
 }*/
 int cannotConstantFold() {
   var a = 1;
@@ -68,22 +62,16 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: unspecialized:function(a) {
-  return C.JSInt_methods.$shru(1, a);
-}*/
-/*canary.member: unspecialized:function(a) {
-  return A.JSInt_methods.$shru(1, a);
+/*member: unspecialized:function(a) {
+  return B.JSInt_methods.$shru(1, a);
 }*/
 int unspecialized(int a) {
   return 1 >>> a;
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: otherPositive2:function(param) {
-  return C.JSInt_methods._shruOtherPositive$1(1, param ? 1 : 2);
-}*/
-/*canary.member: otherPositive2:function(param) {
-  return A.JSInt_methods._shruOtherPositive$1(1, param ? 1 : 2);
+/*member: otherPositive2:function(param) {
+  return B.JSInt_methods._shruOtherPositive$1(1, param ? 1 : 2);
 }*/
 int otherPositive2(bool param) {
   var a = param ? 1 : 2;
@@ -110,11 +98,8 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: otherPositive6:function(a, b) {
-  return C.JSInt_methods._shruOtherPositive$1(a, b);
-}*/
-/*canary.member: otherPositive6:function(a, b) {
-  return A.JSInt_methods._shruOtherPositive$1(a, b);
+/*member: otherPositive6:function(a, b) {
+  return B.JSInt_methods._shruOtherPositive$1(a, b);
 }*/
 int otherPositive6(int a, int b) {
   return a >>> b;
diff --git a/pkg/compiler/test/codegen/data/tdiv1.dart b/pkg/compiler/test/codegen/data/tdiv1.dart
index 747fe8f..fe6e9f6 100644
--- a/pkg/compiler/test/codegen/data/tdiv1.dart
+++ b/pkg/compiler/test/codegen/data/tdiv1.dart
@@ -45,11 +45,8 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: foo3:function(param) {
-  return C.JSInt_methods._tdivFast$1(param ? 4294967295 : -1, 2);
-}*/
-/*canary.member: foo3:function(param) {
-  return A.JSInt_methods._tdivFast$1(param ? 4294967295 : -1, 2);
+/*member: foo3:function(param) {
+  return B.JSInt_methods._tdivFast$1(param ? 4294967295 : -1, 2);
 }*/
 int foo3(bool param) {
   var a = param ? 0xFFFFFFFF : -1;
@@ -59,11 +56,8 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: foo4:function(param1, param2) {
-  return C.JSInt_methods.$tdiv(param1 ? 4294967295 : 0, param2);
-}*/
-/*canary.member: foo4:function(param1, param2) {
-  return A.JSInt_methods.$tdiv(param1 ? 4294967295 : 0, param2);
+/*member: foo4:function(param1, param2) {
+  return B.JSInt_methods.$tdiv(param1 ? 4294967295 : 0, param2);
 }*/
 int foo4(bool param1, int param2) {
   var a = param1 ? 0xFFFFFFFF : 0;
@@ -74,13 +68,9 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: foo5:function(param1, param2) {
+/*member: foo5:function(param1, param2) {
   var a = param1 ? 4294967295 : 0;
-  return C.JSInt_methods.$tdiv(a, param2 ? 3 : 4);
-}*/
-/*canary.member: foo5:function(param1, param2) {
-  var a = param1 ? 4294967295 : 0;
-  return A.JSInt_methods.$tdiv(a, param2 ? 3 : 4);
+  return B.JSInt_methods.$tdiv(a, param2 ? 3 : 4);
 }*/
 int foo5(bool param1, bool param2) {
   var a = param1 ? 0xFFFFFFFF : 0;
@@ -93,13 +83,9 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec|prod.member: foo_regress_37502:function(param1, param2) {
+/*member: foo_regress_37502:function(param1, param2) {
   var a = param1 ? 1.2 : 12.3;
-  return C.JSInt_methods.gcd$1(C.JSNumber_methods.$tdiv(a, param2 ? 3.14 : 2.81), 2);
-}*/
-/*canary.member: foo_regress_37502:function(param1, param2) {
-  var a = param1 ? 1.2 : 12.3;
-  return A.JSInt_methods.gcd$1(A.JSNumber_methods.$tdiv(a, param2 ? 3.14 : 2.81), 2);
+  return B.JSInt_methods.gcd$1(B.JSNumber_methods.$tdiv(a, param2 ? 3.14 : 2.81), 2);
 }*/
 foo_regress_37502(param1, param2) {
   var a = param1 ? 1.2 : 12.3;
diff --git a/pkg/compiler/test/codegen/data_2/tdiv1.dart b/pkg/compiler/test/codegen/data_2/tdiv1.dart
index e647e4a..27d6c65 100644
--- a/pkg/compiler/test/codegen/data_2/tdiv1.dart
+++ b/pkg/compiler/test/codegen/data_2/tdiv1.dart
@@ -23,15 +23,12 @@
 Object sink;
 
 @pragma('dart2js:noInline')
-/*spec.member: foo1:function(param) {
-  return (H.boolConversionCheck(param) ? 4294967295 : 1) / 2 | 0;
+/*spec|canary.member: foo1:function(param) {
+  return (A.boolConversionCheck(param) ? 4294967295 : 1) / 2 | 0;
 }*/
 /*prod.member: foo1:function(param) {
   return (param ? 4294967295 : 1) / 2 | 0;
 }*/
-/*canary.member: foo1:function(param) {
-  return (B.boolConversionCheck(param) ? 4294967295 : 1) / 2 | 0;
-}*/
 int foo1(bool param) {
   var a = param ? 0xFFFFFFFF : 1;
   return a ~/ 2;
@@ -40,15 +37,12 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo2:function(param) {
-  return (H.boolConversionCheck(param) ? 4294967295 : 1) / 3 | 0;
+/*spec|canary.member: foo2:function(param) {
+  return (A.boolConversionCheck(param) ? 4294967295 : 1) / 3 | 0;
 }*/
 /*prod.member: foo2:function(param) {
   return (param ? 4294967295 : 1) / 3 | 0;
 }*/
-/*canary.member: foo2:function(param) {
-  return (B.boolConversionCheck(param) ? 4294967295 : 1) / 3 | 0;
-}*/
 int foo2(bool param) {
   var a = param ? 0xFFFFFFFF : 1;
   return a ~/ 3;
@@ -57,14 +51,11 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo3:function(param) {
-  return C.JSInt_methods._tdivFast$1(H.boolConversionCheck(param) ? 4294967295 : -1, 2);
+/*spec|canary.member: foo3:function(param) {
+  return B.JSInt_methods._tdivFast$1(A.boolConversionCheck(param) ? 4294967295 : -1, 2);
 }*/
 /*prod.member: foo3:function(param) {
-  return C.JSInt_methods._tdivFast$1(param ? 4294967295 : -1, 2);
-}*/
-/*canary.member: foo3:function(param) {
-  return A.JSInt_methods._tdivFast$1(B.boolConversionCheck(param) ? 4294967295 : -1, 2);
+  return B.JSInt_methods._tdivFast$1(param ? 4294967295 : -1, 2);
 }*/
 int foo3(bool param) {
   var a = param ? 0xFFFFFFFF : -1;
@@ -74,14 +65,11 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo4:function(param1, param2) {
-  return C.JSInt_methods.$tdiv(H.boolConversionCheck(param1) ? 4294967295 : 0, param2);
+/*spec|canary.member: foo4:function(param1, param2) {
+  return B.JSInt_methods.$tdiv(A.boolConversionCheck(param1) ? 4294967295 : 0, param2);
 }*/
 /*prod.member: foo4:function(param1, param2) {
-  return C.JSInt_methods.$tdiv(param1 ? 4294967295 : 0, param2);
-}*/
-/*canary.member: foo4:function(param1, param2) {
-  return A.JSInt_methods.$tdiv(B.boolConversionCheck(param1) ? 4294967295 : 0, param2);
+  return B.JSInt_methods.$tdiv(param1 ? 4294967295 : 0, param2);
 }*/
 int foo4(bool param1, int param2) {
   var a = param1 ? 0xFFFFFFFF : 0;
@@ -92,17 +80,13 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo5:function(param1, param2) {
-  var a = H.boolConversionCheck(param1) ? 4294967295 : 0;
-  return C.JSInt_methods.$tdiv(a, H.boolConversionCheck(param2) ? 3 : 4);
+/*spec|canary.member: foo5:function(param1, param2) {
+  var a = A.boolConversionCheck(param1) ? 4294967295 : 0;
+  return B.JSInt_methods.$tdiv(a, A.boolConversionCheck(param2) ? 3 : 4);
 }*/
 /*prod.member: foo5:function(param1, param2) {
   var a = param1 ? 4294967295 : 0;
-  return C.JSInt_methods.$tdiv(a, param2 ? 3 : 4);
-}*/
-/*canary.member: foo5:function(param1, param2) {
-  var a = B.boolConversionCheck(param1) ? 4294967295 : 0;
-  return A.JSInt_methods.$tdiv(a, B.boolConversionCheck(param2) ? 3 : 4);
+  return B.JSInt_methods.$tdiv(a, param2 ? 3 : 4);
 }*/
 int foo5(bool param1, bool param2) {
   var a = param1 ? 0xFFFFFFFF : 0;
@@ -115,17 +99,13 @@
 }
 
 @pragma('dart2js:noInline')
-/*spec.member: foo_regress_37502:function(param1, param2) {
-  var a = H.boolConversionCheck(param1) ? 1.2 : 12.3;
-  return C.JSInt_methods.gcd$1(C.JSNumber_methods.$tdiv(a, H.boolConversionCheck(param2) ? 3.14 : 2.81), 2);
+/*spec|canary.member: foo_regress_37502:function(param1, param2) {
+  var a = A.boolConversionCheck(param1) ? 1.2 : 12.3;
+  return B.JSInt_methods.gcd$1(B.JSNumber_methods.$tdiv(a, A.boolConversionCheck(param2) ? 3.14 : 2.81), 2);
 }*/
 /*prod.member: foo_regress_37502:function(param1, param2) {
   var a = param1 ? 1.2 : 12.3;
-  return C.JSInt_methods.gcd$1(C.JSNumber_methods.$tdiv(a, param2 ? 3.14 : 2.81), 2);
-}*/
-/*canary.member: foo_regress_37502:function(param1, param2) {
-  var a = B.boolConversionCheck(param1) ? 1.2 : 12.3;
-  return A.JSInt_methods.gcd$1(A.JSNumber_methods.$tdiv(a, B.boolConversionCheck(param2) ? 3.14 : 2.81), 2);
+  return B.JSInt_methods.gcd$1(B.JSNumber_methods.$tdiv(a, param2 ? 3.14 : 2.81), 2);
 }*/
 foo_regress_37502(param1, param2) {
   var a = param1 ? 1.2 : 12.3;
diff --git a/pkg/compiler/test/codegen/late_test.dart b/pkg/compiler/test/codegen/late_test.dart
new file mode 100644
index 0000000..0810efd
--- /dev/null
+++ b/pkg/compiler/test/codegen/late_test.dart
@@ -0,0 +1,36 @@
+// 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.
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import '../helpers/compiler_helper.dart';
+
+const String TEST = r"""
+class Foo {
+  late int x;
+}
+
+int foo() {
+  final foo = Foo();
+  foo.x = 40;
+  return foo.x + 2;
+  // present: '+ 2'
+  // absent: 'add'
+}
+""";
+
+Future check(String test) {
+  return compile(test,
+      entry: 'foo',
+      check: checkerForAbsentPresent(test),
+      disableTypeInference: false,
+      disableInlining: false,
+      soundNullSafety: true);
+}
+
+void main() {
+  asyncTest(() async {
+    await check(TEST);
+  });
+}
diff --git a/pkg/compiler/test/codegen/model_test.dart b/pkg/compiler/test/codegen/model_test.dart
index ba7376d..9862c60 100644
--- a/pkg/compiler/test/codegen/model_test.dart
+++ b/pkg/compiler/test/codegen/model_test.dart
@@ -11,7 +11,6 @@
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/common/codegen.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js/js.dart' as js;
 import 'package:compiler/src/js_emitter/model.dart';
diff --git a/pkg/compiler/test/codegen/new_rti_is_test.dart b/pkg/compiler/test/codegen/new_rti_is_test.dart
index 1ce65e9..b6d2b53 100644
--- a/pkg/compiler/test/codegen/new_rti_is_test.dart
+++ b/pkg/compiler/test/codegen/new_rti_is_test.dart
@@ -11,7 +11,7 @@
 import '../helpers/compiler_helper.dart';
 
 // 'N' tests all have a nullable input so should not reduce is-test.
-// TODO(NNBD): Add tests with non-nullable input types.
+// TODO(sra): Add tests with non-nullable input types.
 
 const TEST1N = r"""
 foo(int a) {
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
index 54f922e..a7d086f 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib1.dart
@@ -14,10 +14,10 @@
 /*member: m1:
  constants=[
   ConstructedConstant(C(x=IntConstant(1)))=main{},
-  ConstructedConstant(C(x=IntConstant(2)))=1{l1},
-  ConstructedConstant(C(x=IntConstant(3)))=1{l1},
-  ConstructedConstant(C(x=IntConstant(4)))=2{l2}],
- member_unit=1{l1}
+  ConstructedConstant(C(x=IntConstant(2)))=2{l1},
+  ConstructedConstant(C(x=IntConstant(3)))=2{l1},
+  ConstructedConstant(C(x=IntConstant(4)))=1{l2}],
+ member_unit=2{l1}
 */
 m1() async {
   print(c2);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
index 51392c1..39553ee 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/lib2.dart
@@ -15,9 +15,9 @@
 /*member: m2:
  constants=[
   ConstructedConstant(C(x=IntConstant(1)))=main{},
-  ConstructedConstant(C(x=IntConstant(4)))=2{l2},
-  ConstructedConstant(C(x=IntConstant(5)))=2{l2}],
- member_unit=2{l2}
+  ConstructedConstant(C(x=IntConstant(4)))=1{l2},
+  ConstructedConstant(C(x=IntConstant(5)))=1{l2}],
+ member_unit=1{l2}
 */
 m2() async {
   print(c3);
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
index 8f1f9f3..4fd5d66 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
@@ -4,11 +4,11 @@
 
 /*library: 
  a_pre_fragments=[
-  p1: {units: [1{l1}], usedBy: [], needs: []},
-  p2: {units: [2{l2}], usedBy: [], needs: []}],
+  p1: {units: [2{l1}], usedBy: [], needs: []},
+  p2: {units: [1{l2}], usedBy: [], needs: []}],
  b_finalized_fragments=[
-  f1: [1{l1}],
-  f2: [2{l2}]],
+  f1: [2{l1}],
+  f2: [1{l2}]],
  c_steps=[
   l1=(f1),
   l2=(f2)]
@@ -24,7 +24,7 @@
 /*member: main:
  constants=[
   ConstructedConstant(C(x=IntConstant(1)))=main{},
-  ConstructedConstant(C(x=IntConstant(2)))=1{l1}],
+  ConstructedConstant(C(x=IntConstant(2)))=2{l1}],
  member_unit=main{}
 */
 main() async {
diff --git a/pkg/compiler/test/end_to_end/feature_options_test.dart b/pkg/compiler/test/end_to_end/feature_options_test.dart
index d4f3908..d950d19 100644
--- a/pkg/compiler/test/end_to_end/feature_options_test.dart
+++ b/pkg/compiler/test/end_to_end/feature_options_test.dart
@@ -140,10 +140,12 @@
   flavorStringTest(['--no-sf1', '--sf3', '--sf4'], 'sf2');
   flavorStringTest(['--no-sf1', '--no-sf2', '--sf3', '--sf4', '--cf1'], 'cf1');
   flavorStringTest(['--cf1'], 'sf1, sf2, no-sf3, no-sf4, cf1');
-  flavorStringTest(['--no-sf1', '--no-sf2', '--sf3', '--sf4', '--no-cf3'], 'no-cf3');
+  flavorStringTest(
+      ['--no-sf1', '--no-sf2', '--sf3', '--sf4', '--no-cf3'], 'no-cf3');
   flavorStringTest(['--no-cf3'], 'sf1, sf2, no-sf3, no-sf4, no-cf3');
-  flavorStringTest(['--no-sf1', '--no-sf2', '--sf3', '--sf4', '--cf1',
-      '--no-cf3'], 'cf1, no-cf3');
+  flavorStringTest(
+      ['--no-sf1', '--no-sf2', '--sf3', '--sf4', '--cf1', '--no-cf3'],
+      'cf1, no-cf3');
 }
 
 void main() {
diff --git a/pkg/compiler/test/end_to_end/output_type_test.dart b/pkg/compiler/test/end_to_end/output_type_test.dart
index e48e089..848b1ff 100644
--- a/pkg/compiler/test/end_to_end/output_type_test.dart
+++ b/pkg/compiler/test/end_to_end/output_type_test.dart
@@ -87,6 +87,7 @@
       'pkg/compiler/test/deferred/data/deferred_helper.dart',
       '--out=custom.js',
       '--deferred-map=def/deferred.json',
+      '--no-csp',
       Flags.dumpInfo,
     ], [
       'custom.js', 'custom.js.map',
@@ -100,20 +101,19 @@
 
     PRINT_GRAPH = false;
     TRACE_FILTER_PATTERN_FOR_TEST = null;
-    List<String> additionOptionals = <String>[];
-    List<String> expectedOutput = <String>[
+    List<String> additionOptionals = [];
+    List<String> expectedOutput = [
       'out.js',
       'out.js.map',
       'out.js_1.part.js',
       'out.js_1.part.js.map',
     ];
 
-    await test(
-        [
-          'pkg/compiler/test/deferred/data/deferred_helper.dart',
-          Flags.useContentSecurityPolicy,
-        ]..addAll(additionOptionals),
-        expectedOutput);
+    await test([
+      'pkg/compiler/test/deferred/data/deferred_helper.dart',
+      '--csp',
+      ...additionOptionals,
+    ], expectedOutput);
   }
 
   asyncTest(() async {
diff --git a/pkg/compiler/test/field_analysis/jdata/effectively_constant_state.dart b/pkg/compiler/test/field_analysis/jdata/effectively_constant_state.dart
index 1bb9851..b0c0c7e 100644
--- a/pkg/compiler/test/field_analysis/jdata/effectively_constant_state.dart
+++ b/pkg/compiler/test/field_analysis/jdata/effectively_constant_state.dart
@@ -25,7 +25,7 @@
   /*member: Class.state1:constant=IntConstant(1)*/
   final int state1;
 
-  /*member: Class.state2:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
+  /*member: Class.state2:constant=ConstructedConstant(Enum(_name=StringConstant("c"),index=IntConstant(2)))*/
   final Enum state2;
 
   Class({this.state1: 1, this.state2: Enum.c});
diff --git a/pkg/compiler/test/helpers/program_lookup.dart b/pkg/compiler/test/helpers/program_lookup.dart
index d1b5599..12511aa 100644
--- a/pkg/compiler/test/helpers/program_lookup.dart
+++ b/pkg/compiler/test/helpers/program_lookup.dart
@@ -4,14 +4,14 @@
 
 // @dart = 2.7
 
-import 'package:expect/expect.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/deferred_load/output_unit.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/js/js.dart' as js;
 import 'package:compiler/src/js_backend/namer.dart';
 import 'package:compiler/src/js_emitter/model.dart';
 import 'package:compiler/src/js_model/js_strategy.dart';
-import 'package:compiler/src/js/js.dart' as js;
+import 'package:expect/expect.dart';
 
 ClassEntity lookupClass(JElementEnvironment elementEnvironment, String name) {
   ClassEntity cls =
@@ -111,10 +111,10 @@
 
 class LibraryData {
   final Library library;
-  Map<ClassEntity, ClassData> _classMap = {};
-  Map<FunctionEntity, StaticMethod> _methodMap = {};
-  Map<FieldEntity, Field> _fieldMap = {};
-  Map<FieldEntity, StaticField> _staticFieldMap = {};
+  final Map<ClassEntity, ClassData> _classMap = {};
+  final Map<FunctionEntity, StaticMethod> _methodMap = {};
+  final Map<FieldEntity, Field> _fieldMap = {};
+  final Map<FieldEntity, StaticField> _staticFieldMap = {};
 
   LibraryData(this.library, Fragment fragment) {
     for (Class cls in library.classes) {
@@ -178,10 +178,10 @@
 
 class ClassData {
   final Class cls;
-  Map<FunctionEntity, Method> _methodMap = {};
-  Map<FieldEntity, Field> _fieldMap = {};
-  Map<FieldEntity, StaticField> _staticFieldMap = {};
-  Map<FieldEntity, StubMethod> _checkedSetterMap = {};
+  final Map<FunctionEntity, Method> _methodMap = {};
+  final Map<FieldEntity, Field> _fieldMap = {};
+  final Map<FieldEntity, StaticField> _staticFieldMap = {};
+  final Map<FieldEntity, StubMethod> _checkedSetterMap = {};
 
   ClassData(this.cls) {
     if (cls != null) {
diff --git a/pkg/compiler/test/helpers/text_helpers.dart b/pkg/compiler/test/helpers/text_helpers.dart
index cab50ac..d434a2a 100644
--- a/pkg/compiler/test/helpers/text_helpers.dart
+++ b/pkg/compiler/test/helpers/text_helpers.dart
@@ -17,8 +17,8 @@
       if (filter != null && filter(i, lines1, lines2)) {
         String line1 = 0 <= i && i < lines1.length ? lines1[i] : null;
         String line2 = 0 <= i && i < lines2.length ? lines2[i] : null;
-        String text = line1 == null ? '<eof>' : line1;
-        String newText = line2 == null ? '<eof>' : line2;
+        String text = line1 ?? '<eof>';
+        String newText = line2 ?? '<eof>';
         print('(skipped) - $i ${text}');
         print('(skipped) + $i ${newText}');
       } else {
@@ -41,8 +41,8 @@
               print('  $j $line1');
             }
           } else {
-            String text = line1 == null ? '<eof>' : line1;
-            String newText = line2 == null ? '<eof>' : line2;
+            String text = line1 ?? '<eof>';
+            String newText = line2 ?? '<eof>';
 
             if (text.length > 80 && newText.length > 80) {
               flushPendingLines();
diff --git a/pkg/compiler/test/impact/data/classes.dart b/pkg/compiler/test/impact/data/classes.dart
index 3b8bfc7..471a2c8 100644
--- a/pkg/compiler/test/impact/data/classes.dart
+++ b/pkg/compiler/test/impact/data/classes.dart
@@ -264,8 +264,8 @@
 
 /*member: testEnum:
  static=[
-  Enum._name=StringConstant("Enum.A"),
-  Enum.index=IntConstant(0)],
+  _Enum._name=StringConstant("A"),
+  _Enum.index=IntConstant(0)],
  type=[
   const:Enum,
   inst:JSInt,
diff --git a/pkg/compiler/test/inference/callers_test.dart b/pkg/compiler/test/inference/callers_test.dart
index 421ff24..8f9250d 100644
--- a/pkg/compiler/test/inference/callers_test.dart
+++ b/pkg/compiler/test/inference/callers_test.dart
@@ -9,7 +9,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/inferrer/type_graph_inferrer.dart';
 import 'package:compiler/src/js_model/element_map.dart';
diff --git a/pkg/compiler/test/inference/data/and_or.dart b/pkg/compiler/test/inference/data/and_or.dart
index a312110..38525fb 100644
--- a/pkg/compiler/test/inference/data/and_or.dart
+++ b/pkg/compiler/test/inference/data/and_or.dart
@@ -54,16 +54,14 @@
 }
 
 /*member: returnDyn7b:Union([exact=JSString], [exact=JSUInt31])*/
-returnDyn7b(
-    /*Union([exact=JSString], [exact=JSUInt31])*/ x) {
+returnDyn7b(/*Union([exact=JSString], [exact=JSUInt31])*/ x) {
   return x;
 }
 
 /*member: returnDyn7:Union([exact=JSString], [exact=JSUInt31])*/
 returnDyn7() {
   dynamic a = "foo";
-  if (a. /*Value([exact=JSString], value: "foo")*/ length
-      /*invoke: [subclass=JSInt]*/ ==
+  if (a. /*Value([exact=JSString], value: "foo")*/ length /*invoke: [subclass=JSInt]*/ ==
       3) {
     a = 52;
   }
@@ -72,15 +70,13 @@
 }
 
 /*member: returnDyn8:Union([exact=JSString], [exact=JSUInt31])*/
-returnDyn8(
-    /*Union([exact=JSString], [exact=JSUInt31])*/ x) {
+returnDyn8(/*Union([exact=JSString], [exact=JSUInt31])*/ x) {
   return x;
 }
 
 /*member: test8:Union(null, [exact=JSString], [exact=JSUInt31])*/ test8() {
   dynamic a = "foo";
-  if (a. /*Value([exact=JSString], value: "foo")*/ length
-      /*invoke: [subclass=JSInt]*/ ==
+  if (a. /*Value([exact=JSString], value: "foo")*/ length /*invoke: [subclass=JSInt]*/ ==
       3) {
     a = 52;
   }
@@ -89,16 +85,14 @@
 }
 
 /*member: returnDyn9:Union([exact=JSString], [exact=JSUInt31])*/
-returnDyn9(
-    /*Union([exact=JSString], [exact=JSUInt31])*/ x) {
+returnDyn9(/*Union([exact=JSString], [exact=JSUInt31])*/ x) {
   return x;
 }
 
 /*member: test9:[null]*/
 test9() {
   dynamic a = "foo";
-  if (a. /*Value([exact=JSString], value: "foo")*/ length
-      /*invoke: [subclass=JSInt]*/ ==
+  if (a. /*Value([exact=JSString], value: "foo")*/ length /*invoke: [subclass=JSInt]*/ ==
       3) {
     a = 52;
   }
@@ -112,8 +106,7 @@
 /*member: test10:[null]*/
 test10() {
   dynamic a = "foo";
-  if (a. /*Value([exact=JSString], value: "foo")*/ length
-      /*invoke: [subclass=JSInt]*/ ==
+  if (a. /*Value([exact=JSString], value: "foo")*/ length /*invoke: [subclass=JSInt]*/ ==
       3) {
     a = 52;
   }
diff --git a/pkg/compiler/test/inference/data/assign_op.dart b/pkg/compiler/test/inference/data/assign_op.dart
index d658ac3..74dcc9c 100644
--- a/pkg/compiler/test/inference/data/assign_op.dart
+++ b/pkg/compiler/test/inference/data/assign_op.dart
@@ -39,9 +39,8 @@
 /*member: instanceAssignPlus:[subclass=JSPositiveInt]*/
 instanceAssignPlus() {
   var c = new Class1();
-  return c.
-          /*[exact=Class1]*/ /*update: [exact=Class1]*/ field
-      /*invoke: [subclass=JSPositiveInt]*/ += 42;
+  return c. /*[exact=Class1]*/ /*update: [exact=Class1]*/ field /*invoke: [subclass=JSPositiveInt]*/ +=
+      42;
 }
 
 /*member: Class2.:[exact=Class2]*/
@@ -53,9 +52,8 @@
 /*member: instanceAssignAnd:[exact=JSUInt31]*/
 instanceAssignAnd() {
   var c = new Class2();
-  return c.
-          /*[exact=Class2]*/ /*update: [exact=Class2]*/ field
-      /*invoke: [exact=JSUInt31]*/ &= 42;
+  return c. /*[exact=Class2]*/ /*update: [exact=Class2]*/ field /*invoke: [exact=JSUInt31]*/ &=
+      42;
 }
 
 /*member: assignIndexPlus:[subclass=JSPositiveInt]*/
@@ -88,9 +86,8 @@
 /*member: assignIndexDec:[subclass=JSInt]*/
 assignIndexDec() {
   var i = [87];
-  return
-      /*invoke: [subclass=JSInt]*/ --i
-          /*Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
-          /*update: Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
-          [0];
+  return /*invoke: [subclass=JSInt]*/ --i
+      /*Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
+      /*update: Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
+      [0];
 }
diff --git a/pkg/compiler/test/inference/data/call_site.dart b/pkg/compiler/test/inference/data/call_site.dart
index 90356a6..6cc8406 100644
--- a/pkg/compiler/test/inference/data/call_site.dart
+++ b/pkg/compiler/test/inference/data/call_site.dart
@@ -30,9 +30,7 @@
 /*member: A1.:[exact=A1]*/
 class A1 {
   /*member: A1.x1:Value([exact=JSString], value: "s")*/
-  x1(
-          /*Value([exact=JSString], value: "s")*/ p) =>
-      p;
+  x1(/*Value([exact=JSString], value: "s")*/ p) => p;
 }
 
 /*member: test1:[null]*/
@@ -78,9 +76,7 @@
 /*member: A5.:[exact=A5]*/
 class A5 {
   /*member: A5.x5:Union([exact=JSNumNotInt], [exact=JSUInt31])*/
-  x5(
-          /*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) =>
-      p;
+  x5(/*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) => p;
 }
 
 /*member: test5:[null]*/
@@ -92,9 +88,7 @@
 /*member: A6.:[exact=A6]*/
 class A6 {
   /*member: A6.x6:Union([exact=JSNumNotInt], [exact=JSUInt31])*/
-  x6(
-          /*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) =>
-      p;
+  x6(/*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) => p;
 }
 
 /*member: test6:[null]*/
@@ -106,8 +100,8 @@
 /*member: A7.:[exact=A7]*/
 class A7 {
   /*member: A7.x7:[empty]*/
-  x7(
-      /*Union([exact=JSString], [exact=JSUInt31])*/ p) => /*invoke: [exact=A7]*/ x7("x");
+  x7(/*Union([exact=JSString], [exact=JSUInt31])*/ p) => /*invoke: [exact=A7]*/ x7(
+      "x");
 }
 
 /*member: test7:[null]*/
@@ -118,8 +112,7 @@
 /*member: A8.:[exact=A8]*/
 class A8 {
   /*member: A8.x8:[empty]*/
-  x8(
-          /*Union([exact=JSString], [subclass=JsLinkedHashMap])*/ p) =>
+  x8(/*Union([exact=JSString], [subclass=JsLinkedHashMap])*/ p) =>
       /*invoke: [exact=A8]*/ x8("x");
 }
 
@@ -144,8 +137,7 @@
 
 /*member: A10.:[exact=A10]*/
 class A10 {
-  /*member: A10.x10:[empty]*/ x10(
-      /*[exact=JSUInt31]*/ p1,
+  /*member: A10.x10:[empty]*/ x10(/*[exact=JSUInt31]*/ p1,
       /*[exact=JSUInt31]*/ p2) => /*invoke: [exact=A10]*/ x10(p1, p2);
 }
 
@@ -157,8 +149,7 @@
 /*member: A11.:[exact=A11]*/
 class A11 {
   /*member: A11.x11:[empty]*/
-  x11(
-      /*[exact=JSUInt31]*/ p1,
+  x11(/*[exact=JSUInt31]*/ p1,
       /*[exact=JSUInt31]*/ p2) => /*invoke: [exact=A11]*/ x11(p1, p2);
 }
 
@@ -176,8 +167,7 @@
 /*member: A12.:[exact=A12]*/
 class A12 {
   /*member: A12.x12:[empty]*/
-  x12(
-          /*Union([exact=JSString], [exact=JSUInt31])*/ p1,
+  x12(/*Union([exact=JSString], [exact=JSUInt31])*/ p1,
           /*Union([exact=JSString], [exact=JSUInt31])*/ p2) =>
       /*invoke: [exact=A12]*/ x12(1, 2);
 }
@@ -190,8 +180,7 @@
 /*member: A13.:[exact=A13]*/
 class A13 {
   /*member: A13.x13:[exact=JSUInt31]*/
-  x13(
-          /*Value([exact=JSString], value: "x")*/ p1,
+  x13(/*Value([exact=JSString], value: "x")*/ p1,
           [/*[exact=JSUInt31]*/ p2 = 1]) =>
       1;
 }
@@ -205,9 +194,7 @@
 /*member: A14.:[exact=A14]*/
 class A14 {
   /*member: A14.x14:[exact=JSUInt31]*/
-  x14(
-          /*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) =>
-      1;
+  x14(/*Union([exact=JSNumNotInt], [exact=JSUInt31])*/ p) => 1;
 }
 
 /*member: f14:[exact=JSUInt31]*/
@@ -237,8 +224,7 @@
 /*member: A16.:[exact=A16]*/
 class A16 {
   /*member: A16.x16:[exact=JSUInt31]*/
-  x16(
-          /*Value([exact=JSString], value: "x")*/ p1,
+  x16(/*Value([exact=JSString], value: "x")*/ p1,
           [/*[exact=JSBool]*/ p2 = true]) =>
       1;
 }
@@ -297,8 +283,7 @@
 /*member: A19.:[exact=A19]*/
 class A19 {
   /*member: A19.x19:[empty]*/
-  x19(
-          /*Union([exact=JSString], [exact=JSUInt31])*/ p1,
+  x19(/*Union([exact=JSString], [exact=JSUInt31])*/ p1,
           /*Union([exact=JSString], [exact=JSUInt31])*/ p2) =>
       /*invoke: [subclass=A19]*/ x19(p1, p2);
 }
diff --git a/pkg/compiler/test/inference/data/closure_tracer_28919.dart b/pkg/compiler/test/inference/data/closure_tracer_28919.dart
index db6be4f..b7b7fe4 100644
--- a/pkg/compiler/test/inference/data/closure_tracer_28919.dart
+++ b/pkg/compiler/test/inference/data/closure_tracer_28919.dart
@@ -55,11 +55,10 @@
   for (int i = 0;
       i /*invoke: [subclass=JSPositiveInt]*/ != 3;
       i /*invoke: [subclass=JSPositiveInt]*/ ++) {
-    methods. /*invoke: [exact=JSExtendableArray]*/ add(
-        /*[null]*/ (int
-            /*spec.[null|subclass=Object]*/
-            /*prod.[null|subclass=JSInt]*/
-            x) {
+    methods. /*invoke: [exact=JSExtendableArray]*/ add(/*[null]*/ (int
+        /*spec.[null|subclass=Object]*/
+        /*prod.[null|subclass=JSInt]*/
+        x) {
       res = x;
       sum = x /*invoke: [null|subclass=JSInt]*/ + i;
     });
diff --git a/pkg/compiler/test/inference/data/dictionary_types.dart b/pkg/compiler/test/inference/data/dictionary_types.dart
index d87eb2c..61c0072 100644
--- a/pkg/compiler/test/inference/data/dictionary_types.dart
+++ b/pkg/compiler/test/inference/data/dictionary_types.dart
@@ -58,9 +58,9 @@
   anotherInt1 = otherDict1
       /*Dictionary([subclass=JsLinkedHashMap], key: [exact=JSString], value: Union(null, [exact=JSString], [exact=JSUInt31]), map: {stringTwo: Value([exact=JSString], value: "anotherString"), intTwo: [exact=JSUInt31]})*/
       ['intTwo'];
-  dynamic1 = dictionaryA1
-      /*Map([subclass=JsLinkedHashMap], key: [null|subclass=Object], value: [null|subclass=Object])*/ [
-      'int'];
+  dynamic1 =
+      dictionaryA1 /*Map([subclass=JsLinkedHashMap], key: [null|subclass=Object], value: [null|subclass=Object])*/ [
+          'int'];
   nullOrInt1 = dictionaryB1
       /*Dictionary([subclass=JsLinkedHashMap], key: [exact=JSString], value: Union(null, [exact=JSExtendableArray], [exact=JSNumNotInt], [exact=JSString], [exact=JSUInt31]), map: {string: Value([exact=JSString], value: "aString"), int: [exact=JSUInt31], double: [exact=JSNumNotInt], list: Container([exact=JSExtendableArray], element: [null|subclass=Object], length: null), stringTwo: Value([null|exact=JSString], value: "anotherString"), intTwo: [null|exact=JSUInt31]})*/
       ['intTwo'];
diff --git a/pkg/compiler/test/inference/data/enum.dart b/pkg/compiler/test/inference/data/enum.dart
index 5f650f3..5ee2d9b 100644
--- a/pkg/compiler/test/inference/data/enum.dart
+++ b/pkg/compiler/test/inference/data/enum.dart
@@ -55,7 +55,7 @@
   a,
 }
 
-/*member: enumToString1:Value([exact=JSString], value: "Enum4.a")*/
+/*member: enumToString1:[exact=JSString]*/
 enumToString1() {
   return Enum4.a. /*invoke: [exact=Enum4]*/ toString();
 }
diff --git a/pkg/compiler/test/inference/data/field_type.dart b/pkg/compiler/test/inference/data/field_type.dart
index 82f4994..0de85ed 100644
--- a/pkg/compiler/test/inference/data/field_type.dart
+++ b/pkg/compiler/test/inference/data/field_type.dart
@@ -584,7 +584,9 @@
     /*update: [exact=A22]*/ f22a = 42;
     /*update: [exact=A22]*/ f22b = /*[exact=A22]*/ f22a == null
         ? 42
-        : /*[exact=A22]*/ f22c == null ? 41 : 43;
+        : /*[exact=A22]*/ f22c == null
+            ? 41
+            : 43;
     /*update: [exact=A22]*/ f22c = 'foo';
   }
 }
@@ -648,10 +650,9 @@
 
   /*member: A24.:[exact=A24]*/
   A24() : f24d = 42 {
-    /*[subclass=A24]*/ /*update: [subclass=A24]*/ f24a
-        /*invoke: [subclass=JSPositiveInt]*/ ++;
-    /*[subclass=A24]*/ /*update: [subclass=A24]*/ f24b
-        /*invoke: [subclass=JSPositiveInt]*/ += 42;
+    /*[subclass=A24]*/ /*update: [subclass=A24]*/ f24a /*invoke: [subclass=JSPositiveInt]*/ ++;
+    /*[subclass=A24]*/ /*update: [subclass=A24]*/ f24b /*invoke: [subclass=JSPositiveInt]*/ +=
+        42;
     var f24f = 'foo';
     this. /*update: [subclass=A24]*/ f24f = f24f;
   }
@@ -720,8 +721,7 @@
   new A26(). /*update: [exact=A26]*/ f26 = <dynamic>[new B26(), new A26()]
               /*Container([exact=JSExtendableArray], element: Union([exact=A26], [exact=B26]), length: 2)*/
               [0]
-          . /*Union([exact=A26], [exact=B26])*/ f26
-      /*invoke: [subclass=JSPositiveInt]*/ +
+          . /*Union([exact=A26], [exact=B26])*/ f26 /*invoke: [subclass=JSPositiveInt]*/ +
       42;
 }
 
diff --git a/pkg/compiler/test/inference/data/finalized_type_variable.dart b/pkg/compiler/test/inference/data/finalized_type_variable.dart
index 1d81014..ead2bc2 100644
--- a/pkg/compiler/test/inference/data/finalized_type_variable.dart
+++ b/pkg/compiler/test/inference/data/finalized_type_variable.dart
@@ -24,8 +24,7 @@
   @pragma('dart2js:noInline')
   set ng_title(String /*Value([exact=JSString], value: "foo")*/ value) {
     if (/*invoke: [exact=ViewCardComponent]*/ checkBinding(
-        /*[exact=ViewCardComponent]*/ _title,
-        value)) {
+        /*[exact=ViewCardComponent]*/ _title, value)) {
       /*[exact=ViewCardComponent]*/ ctx
           . /*update: [null|exact=CardComponent]*/ title = value;
       /*update: [exact=ViewCardComponent]*/ _title = value;
@@ -33,8 +32,7 @@
   }
 
   /*member: ViewCardComponent.checkBinding:Value([exact=JSBool], value: true)*/
-  checkBinding(
-          /*Value([null|exact=JSString], value: "foo")*/ a,
+  checkBinding(/*Value([null|exact=JSString], value: "foo")*/ a,
           /*Value([exact=JSString], value: "foo")*/ b) =>
       true;
 }
@@ -53,8 +51,7 @@
   @pragma('dart2js:noInline')
   set ng_title(String /*Value([exact=JSString], value: "bar")*/ value) {
     if (/*invoke: [exact=ViewCardComponent2]*/ checkBinding(
-        /*[exact=ViewCardComponent2]*/ _title,
-        value)) {
+        /*[exact=ViewCardComponent2]*/ _title, value)) {
       /*[exact=ViewCardComponent2]*/ ctx
           . /*update: [null|exact=CardComponent2]*/ title = value;
       /*update: [exact=ViewCardComponent2]*/ _title = value;
@@ -62,8 +59,7 @@
   }
 
   /*member: ViewCardComponent2.checkBinding:Value([exact=JSBool], value: true)*/
-  checkBinding(
-          /*Value([null|exact=JSString], value: "bar")*/ a,
+  checkBinding(/*Value([null|exact=JSString], value: "bar")*/ a,
           /*Value([exact=JSString], value: "bar")*/ b) =>
       true;
 }
diff --git a/pkg/compiler/test/inference/data/general.dart b/pkg/compiler/test/inference/data/general.dart
index 67d2c33..da299fc 100644
--- a/pkg/compiler/test/inference/data/general.dart
+++ b/pkg/compiler/test/inference/data/general.dart
@@ -783,8 +783,7 @@
 
   /*member: C.[]=:[null]*/
   operator []=(
-      /*[exact=JSUInt31]*/ index,
-      /*[subclass=JSPositiveInt]*/ value) {}
+      /*[exact=JSUInt31]*/ index, /*[subclass=JSPositiveInt]*/ value) {}
 
   /*member: C.returnInt5:[subclass=JSPositiveInt]*/
   returnInt5() => /*invoke: [subclass=JSPositiveInt]*/ ++this /*[exact=C]*/ /*update: [exact=C]*/ [
@@ -809,8 +808,7 @@
   return new CascadeHelper()
     .. /*update: [exact=CascadeHelper]*/ a = "hello"
     .. /*update: [exact=CascadeHelper]*/ b = 42
-    .. /*[exact=CascadeHelper]*/ i
-        /*invoke: [subclass=JSPositiveInt]*/ /*update: [exact=CascadeHelper]*/ +=
+    .. /*[exact=CascadeHelper]*/ i /*invoke: [subclass=JSPositiveInt]*/ /*update: [exact=CascadeHelper]*/ +=
         1;
 }
 
diff --git a/pkg/compiler/test/inference/data/general7_ea.dart b/pkg/compiler/test/inference/data/general7_ea.dart
index fe01ac9..81c161a 100644
--- a/pkg/compiler/test/inference/data/general7_ea.dart
+++ b/pkg/compiler/test/inference/data/general7_ea.dart
@@ -9,8 +9,7 @@
 /// _disabled_.
 
 /*member: foo:Value([null|exact=JSBool], value: true)*/
-foo(
-        /*Union([exact=JSBool], [exact=JSString], [exact=JSUInt31])*/ x,
+foo(/*Union([exact=JSBool], [exact=JSString], [exact=JSUInt31])*/ x,
         [/*Value([null|exact=JSBool], value: true)*/ y]) =>
     y;
 
diff --git a/pkg/compiler/test/inference/data/index_postfix.dart b/pkg/compiler/test/inference/data/index_postfix.dart
index 157177a..a321ecc 100644
--- a/pkg/compiler/test/inference/data/index_postfix.dart
+++ b/pkg/compiler/test/inference/data/index_postfix.dart
@@ -15,20 +15,18 @@
 listIndexPostfixIncrement() {
   var list = [0];
   return list
-          /*Container([exact=JSExtendableArray], element: [subclass=JSPositiveInt], length: 1)*/
-          /*update: Container([exact=JSExtendableArray], element: [subclass=JSPositiveInt], length: 1)*/
-          [0]
-      /*invoke: [subclass=JSPositiveInt]*/ ++;
+      /*Container([exact=JSExtendableArray], element: [subclass=JSPositiveInt], length: 1)*/
+      /*update: Container([exact=JSExtendableArray], element: [subclass=JSPositiveInt], length: 1)*/
+      [0] /*invoke: [subclass=JSPositiveInt]*/ ++;
 }
 
 /*member: listIndexPostfixDecrement:[subclass=JSInt]*/
 listIndexPostfixDecrement() {
   var list = [0];
   return list
-          /*Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
-          /*update: Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
-          [0]
-      /*invoke: [subclass=JSInt]*/ --;
+      /*Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
+      /*update: Container([exact=JSExtendableArray], element: [subclass=JSInt], length: 1)*/
+      [0] /*invoke: [subclass=JSInt]*/ --;
 }
 
 /*member: Super1.:[exact=Super1]*/
diff --git a/pkg/compiler/test/inference/data/js_interop.dart b/pkg/compiler/test/inference/data/js_interop.dart
index bc4f653..994a675 100644
--- a/pkg/compiler/test/inference/data/js_interop.dart
+++ b/pkg/compiler/test/inference/data/js_interop.dart
@@ -44,9 +44,8 @@
 jsInteropClass() {
   JsInteropClass cls = new JsInteropClass();
   return cls. /*update: [null|subclass=JavaScriptObject]*/ setter =
-      cls. /*[null|subclass=JavaScriptObject]*/ getter
-          /*invoke: [null|subclass=JSInt]*/ +
-          cls. /*invoke: [subclass=JavaScriptObject]*/ method(0)
-          /*invoke: [subclass=JSInt]*/ +
+      cls. /*[null|subclass=JavaScriptObject]*/ getter /*invoke: [null|subclass=JSInt]*/ +
+          cls. /*invoke: [subclass=JavaScriptObject]*/ method(
+              0) /*invoke: [subclass=JSInt]*/ +
           10;
 }
diff --git a/pkg/compiler/test/inference/data/list_tracer_typed_data_length.dart b/pkg/compiler/test/inference/data/list_tracer_typed_data_length.dart
index a08ef1a..f47e3ca 100644
--- a/pkg/compiler/test/inference/data/list_tracer_typed_data_length.dart
+++ b/pkg/compiler/test/inference/data/list_tracer_typed_data_length.dart
@@ -6,8 +6,8 @@
 
 import 'dart:typed_data';
 
-// TODO(johnniwinther): Fix inference for spec:nnbd-off mode. List elements should not
-// be [empty].
+// TODO(johnniwinther): Fix inference for spec mode. List elements should not be
+// [empty].
 
 /*member: myList:Container([null|exact=NativeFloat32List], element: [subclass=JSNumber], length: 42)*/
 var myList = new Float32List(42);
diff --git a/pkg/compiler/test/inference/data/logical_if.dart b/pkg/compiler/test/inference/data/logical_if.dart
index 613dde8..fd4c99f 100644
--- a/pkg/compiler/test/inference/data/logical_if.dart
+++ b/pkg/compiler/test/inference/data/logical_if.dart
@@ -103,8 +103,7 @@
 
 /*member: _promotedAndIfThen:[null]*/
 _promotedAndIfThen(
-    /*Union([exact=Class4], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class4], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is Class4 && c) {
     o. /*invoke: [exact=Class4]*/ toString();
   }
@@ -125,8 +124,7 @@
 
 /*member: _promotedAndIfThenElse:[null]*/
 _promotedAndIfThenElse(
-    /*Union([exact=Class5], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class5], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is Class5 && c) {
     o. /*invoke: [exact=Class5]*/ toString();
   } else {
@@ -151,8 +149,7 @@
 
 /*member: _promotedNotAndIfThenElse:[null]*/
 _promotedNotAndIfThenElse(
-    /*Union([exact=Class6], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class6], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is! Class6 && c) {
     o. /*invoke: Union([exact=Class6], [exact=JSUInt31])*/ toString();
   } else {
@@ -175,8 +172,7 @@
 
 /*member: _promotedOrIfThen:[null]*/
 _promotedOrIfThen(
-    /*Union([exact=Class7], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class7], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is Class7 || c) {
     o. /*invoke: Union([exact=Class7], [exact=JSUInt31])*/ toString();
   }
@@ -197,8 +193,7 @@
 
 /*member: _promotedOrIfThenElse:[null]*/
 _promotedOrIfThenElse(
-    /*Union([exact=Class8], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class8], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is Class8 || c) {
     o. /*invoke: Union([exact=Class8], [exact=JSUInt31])*/ toString();
   } else {
@@ -223,8 +218,7 @@
 
 /*member: _promotedNotOrIfThenElse:[null]*/
 _promotedNotOrIfThenElse(
-    /*Union([exact=Class9], [exact=JSUInt31])*/ o,
-    /*[exact=JSBool]*/ c) {
+    /*Union([exact=Class9], [exact=JSUInt31])*/ o, /*[exact=JSBool]*/ c) {
   if (o is! Class9 || c) {
     o. /*invoke: Union([exact=Class9], [exact=JSUInt31])*/ toString();
   } else {
@@ -269,8 +263,7 @@
 class Class11 {}
 
 /*member: _promotedParenNotIfThenElse:[null]*/
-_promotedParenNotIfThenElse(
-    /*Union([exact=Class11], [exact=JSUInt31])*/ o) {
+_promotedParenNotIfThenElse(/*Union([exact=Class11], [exact=JSUInt31])*/ o) {
   if (!(o is Class11)) {
     // TODO(johnniwinther): Use negative type knowledge to show that the
     // receiver must be [exact=JSUInt31].
diff --git a/pkg/compiler/test/inference/data/postfix_prefix.dart b/pkg/compiler/test/inference/data/postfix_prefix.dart
index 881b489..c98e404 100644
--- a/pkg/compiler/test/inference/data/postfix_prefix.dart
+++ b/pkg/compiler/test/inference/data/postfix_prefix.dart
@@ -21,37 +21,32 @@
   operator []=(/*[empty]*/ index, /*[subclass=JSNumber]*/ value) {}
 
   /*member: A.returnDynamic1:Union([exact=JSString], [exact=JSUInt31])*/
-  returnDynamic1() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo
-      /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
+  returnDynamic1() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
 
   /*member: A.returnNum1:[subclass=JSNumber]*/
-  returnNum1() => /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --
-      /*[subclass=A]*/ /*update: [subclass=A]*/ foo;
+  returnNum1() => /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -- /*[subclass=A]*/ /*update: [subclass=A]*/ foo;
 
   /*member: A.returnNum2:[subclass=JSNumber]*/
-  returnNum2() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo
-      /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -= 42;
+  returnNum2() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -=
+      42;
 
   /*member: A.returnDynamic2:Union([exact=JSString], [exact=JSUInt31])*/
-  returnDynamic2() => this
-          /*[subclass=A]*/ /*update: [subclass=A]*/ [index]
-      /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
+  returnDynamic2() => this /*[subclass=A]*/ /*update: [subclass=A]*/ [
+      index] /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
 
   /*member: A.returnNum3:[subclass=JSNumber]*/
-  returnNum3() => /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --this
-      /*[subclass=A]*/ /*update: [subclass=A]*/ [index];
+  returnNum3() => /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --this /*[subclass=A]*/ /*update: [subclass=A]*/ [
+      index];
 
   /*member: A.returnNum4:[subclass=JSNumber]*/
-  returnNum4() => this
-          /*[subclass=A]*/ /*update: [subclass=A]*/ [index]
-      /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -= 42;
+  returnNum4() => this /*[subclass=A]*/ /*update: [subclass=A]*/ [
+      index] /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -= 42;
 
   /*member: A.returnEmpty3:[empty]*/
   returnEmpty3() {
     dynamic a = this;
     return a. /*[subclass=A]*/ /*update: [subclass=A]*/
-            bar
-        /*invoke: [empty]*/ --;
+        bar /*invoke: [empty]*/ --;
   }
 
   /*member: A.returnEmpty1:[empty]*/
@@ -64,8 +59,8 @@
   /*member: A.returnEmpty2:[empty]*/
   returnEmpty2() {
     dynamic a = this;
-    return a. /*[subclass=A]*/ /*update: [subclass=A]*/ bar
-        /*invoke: [empty]*/ -= 42;
+    return a. /*[subclass=A]*/ /*update: [subclass=A]*/ bar /*invoke: [empty]*/ -=
+        42;
   }
 }
 
@@ -90,8 +85,8 @@
       super.foo /*invoke: Value([exact=JSString], value: "string")*/ -= 42;
 
   /*member: B.returnString2:Value([exact=JSString], value: "string")*/
-  returnString2() => super[index]
-      /*invoke: Value([exact=JSString], value: "string")*/ --;
+  returnString2() =>
+      super[index] /*invoke: Value([exact=JSString], value: "string")*/ --;
 
   /*member: B.returnDynamic3:[empty]*/
   returnDynamic3() =>
@@ -99,8 +94,8 @@
       --super[index];
 
   /*member: B.returnDynamic4:[empty]*/
-  returnDynamic4() => super[index]
-      /*invoke: Value([exact=JSString], value: "string")*/ -= 42;
+  returnDynamic4() =>
+      super[index] /*invoke: Value([exact=JSString], value: "string")*/ -= 42;
 }
 
 /*member: main:[null]*/
diff --git a/pkg/compiler/test/inference/data/prefix.dart b/pkg/compiler/test/inference/data/prefix.dart
index a7302fc..4fdea57 100644
--- a/pkg/compiler/test/inference/data/prefix.dart
+++ b/pkg/compiler/test/inference/data/prefix.dart
@@ -88,11 +88,10 @@
   if (c. /*[exact=Class1]*/ field1 == null) {
     c. /*update: [exact=Class1]*/ field1 = 0;
   }
-  return
-      /*invoke: [null|subclass=JSPositiveInt]*/ ++c.
-          /*[exact=Class1]*/
-          /*update: [exact=Class1]*/
-          field1;
+  return /*invoke: [null|subclass=JSPositiveInt]*/ ++c.
+      /*[exact=Class1]*/
+      /*update: [exact=Class1]*/
+      field1;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -111,11 +110,10 @@
   if (c. /*[exact=Class2]*/ field2 == null) {
     c. /*update: [exact=Class2]*/ field2 = 0;
   }
-  return
-      /*invoke: [null|subclass=JSInt]*/ --c.
-          /*[exact=Class2]*/
-          /*update: [exact=Class2]*/
-          field2;
+  return /*invoke: [null|subclass=JSInt]*/ --c.
+      /*[exact=Class2]*/
+      /*update: [exact=Class2]*/
+      field2;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -134,11 +132,10 @@
   if (c. /*[exact=Class3]*/ field3 == null) {
     c. /*update: [exact=Class3]*/ field3 = 0;
   }
-  return
-      /*invoke: [null|subclass=JSPositiveInt]*/ ++c?.
-          /*[exact=Class3]*/
-          /*update: [exact=Class3]*/
-          field3;
+  return /*invoke: [null|subclass=JSPositiveInt]*/ ++c?.
+      /*[exact=Class3]*/
+      /*update: [exact=Class3]*/
+      field3;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -157,9 +154,8 @@
   if (c. /*[exact=Class4]*/ field4 == null) {
     c. /*update: [exact=Class4]*/ field4 = 0;
   }
-  return
-      /*invoke: [null|subclass=JSInt]*/ --c?.
-          /*[exact=Class4]*/
-          /*update: [exact=Class4]*/
-          field4;
+  return /*invoke: [null|subclass=JSInt]*/ --c?.
+      /*[exact=Class4]*/
+      /*update: [exact=Class4]*/
+      field4;
 }
diff --git a/pkg/compiler/test/inference/data/try.dart b/pkg/compiler/test/inference/data/try.dart
index 5f43edf..8d8dc6b 100644
--- a/pkg/compiler/test/inference/data/try.dart
+++ b/pkg/compiler/test/inference/data/try.dart
@@ -59,7 +59,8 @@
 
 /*member: _emptyTryCatchFinally:[exact=JSUInt31]*/
 _emptyTryCatchFinally(/*[exact=JSUInt31]*/ o) {
-  try {} catch (e) {} finally {}
+  try {} catch (e) {
+  } finally {}
   return o;
 }
 
diff --git a/pkg/compiler/test/inference/inference_data_test.dart b/pkg/compiler/test/inference/inference_data_test.dart
index 1ad073f..d550d3b 100644
--- a/pkg/compiler/test/inference/inference_data_test.dart
+++ b/pkg/compiler/test/inference/inference_data_test.dart
@@ -10,7 +10,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/inferred_data.dart';
 import 'package:compiler/src/js_model/element_map.dart';
diff --git a/pkg/compiler/test/inference/inference_test_helper.dart b/pkg/compiler/test/inference/inference_test_helper.dart
index 231a108..d1374d6 100644
--- a/pkg/compiler/test/inference/inference_test_helper.dart
+++ b/pkg/compiler/test/inference/inference_test_helper.dart
@@ -9,7 +9,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/inferrer/types.dart';
@@ -146,23 +145,19 @@
         node is ir.FunctionDeclaration) {
       ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
       return getMemberValue(info.callMethod);
-    } else if (
-        node is ir.InstanceInvocation ||
+    } else if (node is ir.InstanceInvocation ||
         node is ir.InstanceGetterInvocation ||
         node is ir.DynamicInvocation ||
         node is ir.FunctionInvocation ||
         node is ir.EqualsNull ||
         node is ir.EqualsCall) {
       return getTypeMaskValue(result.typeOfReceiver(node));
-    } else if (
-        node is ir.InstanceGet ||
+    } else if (node is ir.InstanceGet ||
         node is ir.DynamicGet ||
         node is ir.InstanceTearOff ||
         node is ir.FunctionTearOff) {
       return getTypeMaskValue(result.typeOfReceiver(node));
-    } else if (
-        node is ir.InstanceSet ||
-        node is ir.DynamicSet) {
+    } else if (node is ir.InstanceSet || node is ir.DynamicSet) {
       return getTypeMaskValue(result.typeOfReceiver(node));
     } else if (node is ir.ForInStatement) {
       if (id.kind == IdKind.iterator) {
diff --git a/pkg/compiler/test/inference/side_effects_test.dart b/pkg/compiler/test/inference/side_effects_test.dart
index f6b92f1..53a8d48 100644
--- a/pkg/compiler/test/inference/side_effects_test.dart
+++ b/pkg/compiler/test/inference/side_effects_test.dart
@@ -9,7 +9,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/inferred_data.dart';
 import 'package:compiler/src/js_model/element_map.dart';
diff --git a/pkg/compiler/test/inference/type_combination_test.dart b/pkg/compiler/test/inference/type_combination_test.dart
index 517ac76..0588216 100644
--- a/pkg/compiler/test/inference/type_combination_test.dart
+++ b/pkg/compiler/test/inference/type_combination_test.dart
@@ -69,19 +69,23 @@
 class RuleSet {
   final name;
   final operate;
-  final Set typesSeen = new Set();
-  final Set pairsSeen = new Set();
+  final Set typesSeen = {};
+  final Set pairsSeen = {};
 
   RuleSet(this.name, this.operate);
 
   void rule(type1, type2, result) {
-    typesSeen..add(type1)..add(type2);
-    var pair1 = new Pair(type1, type2);
-    var pair2 = new Pair(type2, type1);
+    typesSeen
+      ..add(type1)
+      ..add(type2);
+    var pair1 = Pair(type1, type2);
+    var pair2 = Pair(type2, type1);
     if (pairsSeen.contains(pair1)) {
       Expect.isFalse(true, 'Redundant rule ($type1, $type2, ...)');
     }
-    pairsSeen..add(pair1)..add(pair2);
+    pairsSeen
+      ..add(pair1)
+      ..add(pair2);
 
     var r1 = operate(type1, type2);
     var r2 = operate(type2, type1);
@@ -90,8 +94,10 @@
   }
 
   void check(type1, type2, predicate) {
-    typesSeen..add(type1)..add(type2);
-    var pair = new Pair(type1, type2);
+    typesSeen
+      ..add(type1)
+      ..add(type2);
+    var pair = Pair(type1, type2);
     pairsSeen..add(pair);
     var result = operate(type1, type2);
     Expect.isTrue(predicate(result));
@@ -100,7 +106,7 @@
   void validateCoverage() {
     for (var type1 in typesSeen) {
       for (var type2 in typesSeen) {
-        var pair = new Pair(type1, type2);
+        var pair = Pair(type1, type2);
         if (!pairsSeen.contains(pair)) {
           Expect.isTrue(false, 'Missing rule: $name($type1, $type2)');
         }
@@ -111,7 +117,7 @@
 
 void testUnion(JClosedWorld closedWorld) {
   AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
-  RuleSet ruleSet = new RuleSet(
+  RuleSet ruleSet = RuleSet(
       '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);
@@ -422,7 +428,7 @@
 }
 
 void testIntersection(JClosedWorld closedWorld) {
-  RuleSet ruleSet = new RuleSet('intersection',
+  RuleSet ruleSet = RuleSet('intersection',
       (t1, t2) => t1.intersection(t2, closedWorld.abstractValueDomain));
   rule(type1, type2, result) => ruleSet.rule(type1, type2, result);
 
@@ -566,12 +572,12 @@
   rule(
       jsIndexable,
       potentialArray,
-      new TypeMask.nonNullSubtype(
+      TypeMask.nonNullSubtype(
           closedWorld.commonElements.jsArrayClass, closedWorld));
   rule(
       jsIndexable,
       potentialString,
-      new TypeMask.nonNullSubtype(
+      TypeMask.nonNullSubtype(
           closedWorld.commonElements.jsStringClass, closedWorld));
   rule(jsIndexable, jsBooleanOrNull, emptyType);
   rule(jsIndexable, jsNumberOrNull, emptyType);
@@ -738,7 +744,7 @@
 
 void testRegressions(JClosedWorld closedWorld) {
   TypeMask nonNullPotentialString =
-      new TypeMask.nonNullSubtype(patternClass, closedWorld);
+      TypeMask.nonNullSubtype(patternClass, closedWorld);
   Expect.equals(
       potentialString,
       jsStringOrNull.union(
@@ -776,67 +782,67 @@
   LibraryEntity coreLibrary = commonElements.coreLibrary;
   patternClass = elementEnvironment.lookupClass(coreLibrary, 'Pattern');
 
-  nonPrimitive1 = new TypeMask.nonNullSubtype(
-      closedWorld.commonElements.mapClass, closedWorld);
-  nonPrimitive2 = new TypeMask.nonNullSubtype(
+  nonPrimitive1 =
+      TypeMask.nonNullSubtype(closedWorld.commonElements.mapClass, closedWorld);
+  nonPrimitive2 = TypeMask.nonNullSubtype(
       closedWorld.commonElements.functionClass, closedWorld);
   potentialArray =
-      new TypeMask.subtype(closedWorld.commonElements.listClass, closedWorld);
-  potentialString = new TypeMask.subtype(patternClass, closedWorld);
-  jsInterceptor = new TypeMask.nonNullSubclass(
+      TypeMask.subtype(closedWorld.commonElements.listClass, closedWorld);
+  potentialString = TypeMask.subtype(patternClass, closedWorld);
+  jsInterceptor = TypeMask.nonNullSubclass(
       closedWorld.commonElements.jsInterceptorClass, closedWorld);
-  jsArrayOrNull = new TypeMask.subclass(
+  jsArrayOrNull =
+      TypeMask.subclass(closedWorld.commonElements.jsArrayClass, closedWorld);
+  jsReadableArray = TypeMask.nonNullSubclass(
       closedWorld.commonElements.jsArrayClass, closedWorld);
-  jsReadableArray = new TypeMask.nonNullSubclass(
-      closedWorld.commonElements.jsArrayClass, closedWorld);
-  jsMutableArrayOrNull = new TypeMask.subclass(
+  jsMutableArrayOrNull = TypeMask.subclass(
       closedWorld.commonElements.jsMutableArrayClass, closedWorld);
-  jsMutableArray = new TypeMask.nonNullSubclass(
+  jsMutableArray = TypeMask.nonNullSubclass(
       closedWorld.commonElements.jsMutableArrayClass, closedWorld);
-  jsFixedArrayOrNull = new TypeMask.exact(
+  jsFixedArrayOrNull =
+      TypeMask.exact(closedWorld.commonElements.jsFixedArrayClass, closedWorld);
+  jsFixedArray = TypeMask.nonNullExact(
       closedWorld.commonElements.jsFixedArrayClass, closedWorld);
-  jsFixedArray = new TypeMask.nonNullExact(
-      closedWorld.commonElements.jsFixedArrayClass, closedWorld);
-  jsExtendableArrayOrNull = new TypeMask.exact(
+  jsExtendableArrayOrNull = TypeMask.exact(
       closedWorld.commonElements.jsExtendableArrayClass, closedWorld);
-  jsExtendableArray = new TypeMask.nonNullExact(
+  jsExtendableArray = TypeMask.nonNullExact(
       closedWorld.commonElements.jsExtendableArrayClass, closedWorld);
-  jsUnmodifiableArrayOrNull = new TypeMask.exact(
+  jsUnmodifiableArrayOrNull = TypeMask.exact(
       closedWorld.commonElements.jsUnmodifiableArrayClass, closedWorld);
-  jsUnmodifiableArray = new TypeMask.nonNullExact(
+  jsUnmodifiableArray = TypeMask.nonNullExact(
       closedWorld.commonElements.jsUnmodifiableArrayClass, closedWorld);
-  jsIndexableOrNull = new TypeMask.subtype(
+  jsIndexableOrNull = TypeMask.subtype(
       closedWorld.commonElements.jsIndexableClass, closedWorld);
-  jsIndexable = new TypeMask.nonNullSubtype(
+  jsIndexable = TypeMask.nonNullSubtype(
       closedWorld.commonElements.jsIndexableClass, closedWorld);
-  jsInterceptorOrNull = new TypeMask.subclass(
+  jsInterceptorOrNull = TypeMask.subclass(
       closedWorld.commonElements.jsInterceptorClass, closedWorld);
   jsStringOrNull =
-      new TypeMask.exact(closedWorld.commonElements.jsStringClass, closedWorld);
-  jsString = new TypeMask.nonNullExact(
+      TypeMask.exact(closedWorld.commonElements.jsStringClass, closedWorld);
+  jsString = TypeMask.nonNullExact(
       closedWorld.commonElements.jsStringClass, closedWorld);
-  jsBoolean = new TypeMask.nonNullExact(
+  jsBoolean = TypeMask.nonNullExact(
       closedWorld.commonElements.jsBoolClass, closedWorld);
-  jsNumber = new TypeMask.nonNullSubclass(
+  jsNumber = TypeMask.nonNullSubclass(
       closedWorld.commonElements.jsNumberClass, closedWorld);
-  jsInteger = new TypeMask.nonNullExact(
-      closedWorld.commonElements.jsIntClass, closedWorld);
-  jsNumNotInt = new TypeMask.nonNullExact(
+  jsInteger =
+      TypeMask.nonNullExact(closedWorld.commonElements.jsIntClass, closedWorld);
+  jsNumNotInt = TypeMask.nonNullExact(
       closedWorld.commonElements.jsNumNotIntClass, closedWorld);
   jsBooleanOrNull =
-      new TypeMask.exact(closedWorld.commonElements.jsBoolClass, closedWorld);
-  jsNumberOrNull = new TypeMask.subclass(
-      closedWorld.commonElements.jsNumberClass, closedWorld);
+      TypeMask.exact(closedWorld.commonElements.jsBoolClass, closedWorld);
+  jsNumberOrNull =
+      TypeMask.subclass(closedWorld.commonElements.jsNumberClass, closedWorld);
   jsIntegerOrNull =
-      new TypeMask.exact(closedWorld.commonElements.jsIntClass, closedWorld);
-  jsNumNotIntOrNull = new TypeMask.exact(
-      closedWorld.commonElements.jsNumNotIntClass, closedWorld);
-  nullType = const TypeMask.empty();
-  objectType = new TypeMask.nonNullSubclass(
+      TypeMask.exact(closedWorld.commonElements.jsIntClass, closedWorld);
+  jsNumNotIntOrNull =
+      TypeMask.exact(closedWorld.commonElements.jsNumNotIntClass, closedWorld);
+  nullType = TypeMask.empty();
+  objectType = TypeMask.nonNullSubclass(
       closedWorld.commonElements.objectClass, closedWorld);
-  emptyType = const TypeMask.nonNullEmpty();
-  dynamicType = new TypeMask.subclass(
-      closedWorld.commonElements.objectClass, closedWorld);
+  emptyType = TypeMask.nonNullEmpty();
+  dynamicType =
+      TypeMask.subclass(closedWorld.commonElements.objectClass, closedWorld);
 
   jsInterceptorOrComparable =
       interceptorOrComparable(closedWorld, nullable: false);
diff --git a/pkg/compiler/test/inference/type_mask2_test.dart b/pkg/compiler/test/inference/type_mask2_test.dart
index e5056f8..5fcc9b1 100644
--- a/pkg/compiler/test/inference/type_mask2_test.dart
+++ b/pkg/compiler/test/inference/type_mask2_test.dart
@@ -35,18 +35,20 @@
     List<ClassEntity> containedClasses}) {
   AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
   bool isNullable = masks.any((FlatTypeMask mask) => mask.isNullable);
+  bool hasLateSentinel = masks.any((FlatTypeMask mask) => mask.hasLateSentinel);
   List<FlatTypeMask> disjoint = <FlatTypeMask>[];
   UnionTypeMask.unionOfHelper(masks, disjoint, commonMasks);
   Expect.listEquals(disjointMasks, disjoint,
       'Unexpected disjoint masks: $disjoint, expected $disjointMasks.');
   if (flattened == null) {
     Expect.throws(
-        () => UnionTypeMask.flatten(disjoint, isNullable, commonMasks),
+        () => UnionTypeMask.flatten(disjoint, commonMasks,
+            includeNull: isNullable, includeLateSentinel: hasLateSentinel),
         (e) => e is ArgumentError,
         'Expect argument error on flattening of $disjoint.');
   } else {
-    TypeMask flattenResult =
-        UnionTypeMask.flatten(disjoint, isNullable, commonMasks);
+    TypeMask flattenResult = UnionTypeMask.flatten(disjoint, commonMasks,
+        includeNull: isNullable, includeLateSentinel: hasLateSentinel);
     Expect.equals(
         flattened,
         flattenResult,
@@ -120,16 +122,25 @@
         containedClasses: containedClasses);
   }
 
-  TypeMask empty = const TypeMask.nonNullEmpty();
-  TypeMask subclassObject = new TypeMask.nonNullSubclass(Object_, closedWorld);
-  TypeMask exactA = new TypeMask.nonNullExact(A, closedWorld);
-  TypeMask subclassA = new TypeMask.nonNullSubclass(A, closedWorld);
-  TypeMask subtypeA = new TypeMask.nonNullSubtype(A, closedWorld);
-  TypeMask exactB = new TypeMask.nonNullExact(B, closedWorld);
-  TypeMask subclassB = new TypeMask.nonNullSubclass(B, closedWorld);
-  TypeMask exactC = new TypeMask.nonNullExact(C, closedWorld);
-  TypeMask exactD = new TypeMask.nonNullExact(D, closedWorld);
-  TypeMask exactE = new TypeMask.nonNullExact(E, closedWorld);
+  TypeMask empty = TypeMask.nonNullEmpty();
+  TypeMask sentinel = TypeMask.nonNullEmpty(hasLateSentinel: true);
+  TypeMask subclassObject = TypeMask.nonNullSubclass(Object_, closedWorld);
+  TypeMask subclassObjectOrSentinel =
+      TypeMask.nonNullSubclass(Object_, closedWorld, hasLateSentinel: true);
+  TypeMask exactA = TypeMask.nonNullExact(A, closedWorld);
+  TypeMask exactAOrSentinel =
+      TypeMask.nonNullExact(A, closedWorld, hasLateSentinel: true);
+  TypeMask subclassA = TypeMask.nonNullSubclass(A, closedWorld);
+  TypeMask subtypeA = TypeMask.nonNullSubtype(A, closedWorld);
+  TypeMask subtypeAOrSentinel =
+      TypeMask.nonNullSubtype(A, closedWorld, hasLateSentinel: true);
+  TypeMask exactB = TypeMask.nonNullExact(B, closedWorld);
+  TypeMask exactBOrSentinel =
+      TypeMask.nonNullExact(B, closedWorld, hasLateSentinel: true);
+  TypeMask subclassB = TypeMask.nonNullSubclass(B, closedWorld);
+  TypeMask exactC = TypeMask.nonNullExact(C, closedWorld);
+  TypeMask exactD = TypeMask.nonNullExact(D, closedWorld);
+  TypeMask exactE = TypeMask.nonNullExact(E, closedWorld);
 
   check([],
       result: empty,
@@ -213,6 +224,52 @@
       disjointMasks: [subclassB, exactA],
       flattened: subclassObject,
       containedClasses: [A, B, E]);
+
+  check([sentinel],
+      result: sentinel,
+      disjointMasks: const [],
+      flattened: null,
+      containedClasses: const []);
+
+  check([sentinel, sentinel],
+      result: sentinel,
+      disjointMasks: const [],
+      flattened: null,
+      containedClasses: const []);
+
+  check([empty, sentinel],
+      result: sentinel,
+      disjointMasks: const [],
+      flattened: null,
+      containedClasses: const []);
+
+  check([sentinel, empty],
+      result: sentinel,
+      disjointMasks: const [],
+      flattened: null,
+      containedClasses: const []);
+
+  check([exactAOrSentinel],
+      result: exactAOrSentinel,
+      disjointMasks: [exactA],
+      flattened: subtypeAOrSentinel, // TODO(37602): Imprecise.
+      containedClasses: [A]);
+
+  check([exactA, exactAOrSentinel],
+      result: exactAOrSentinel,
+      disjointMasks: [exactA],
+      flattened: subtypeAOrSentinel, // TODO(37602): Imprecise.
+      containedClasses: [A]);
+
+  check([exactAOrSentinel, exactB],
+      disjointMasks: [exactA, exactB],
+      flattened: subclassObjectOrSentinel,
+      containedClasses: [A, B]);
+
+  check([exactAOrSentinel, exactBOrSentinel],
+      disjointMasks: [exactA, exactB],
+      flattened: subclassObjectOrSentinel,
+      containedClasses: [A, B]);
 }
 
 Future testStringSubtypes() async {
@@ -241,11 +298,10 @@
   Expect.isFalse(closedWorld.classHierarchy.isIndirectlyInstantiated(JSString));
   Expect.isTrue(closedWorld.classHierarchy.isInstantiated(JSString));
 
-  TypeMask subtypeString = new TypeMask.nonNullSubtype(String_, closedWorld);
-  TypeMask exactJSString = new TypeMask.nonNullExact(JSString, closedWorld);
-  TypeMask subtypeJSString = new TypeMask.nonNullSubtype(JSString, closedWorld);
-  TypeMask subclassJSString =
-      new TypeMask.nonNullSubclass(JSString, closedWorld);
+  TypeMask subtypeString = TypeMask.nonNullSubtype(String_, closedWorld);
+  TypeMask exactJSString = TypeMask.nonNullExact(JSString, closedWorld);
+  TypeMask subtypeJSString = TypeMask.nonNullSubtype(JSString, closedWorld);
+  TypeMask subclassJSString = TypeMask.nonNullSubclass(JSString, closedWorld);
 
   Expect.equals(exactJSString, subtypeString);
   Expect.equals(exactJSString, subtypeJSString);
diff --git a/pkg/compiler/test/inference/type_mask_test_helper.dart b/pkg/compiler/test/inference/type_mask_test_helper.dart
index ba29b08..8eb0171 100644
--- a/pkg/compiler/test/inference/type_mask_test_helper.dart
+++ b/pkg/compiler/test/inference/type_mask_test_helper.dart
@@ -16,7 +16,9 @@
   if (value is ForwardingTypeMask) {
     return simplify(value.forwardTo, domain);
   } else if (value is UnionTypeMask) {
-    return UnionTypeMask.flatten(value.disjointMasks, value.isNullable, domain);
+    return UnionTypeMask.flatten(value.disjointMasks, domain,
+        includeNull: value.isNullable,
+        includeLateSentinel: value.hasLateSentinel);
   } else {
     return value;
   }
diff --git a/pkg/compiler/test/inlining/inlining_test.dart b/pkg/compiler/test/inlining/inlining_test.dart
index 717045f..77b1501 100644
--- a/pkg/compiler/test/inlining/inlining_test.dart
+++ b/pkg/compiler/test/inlining/inlining_test.dart
@@ -9,7 +9,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_strategy.dart';
diff --git a/pkg/compiler/test/js/js_spec_string_test.dart b/pkg/compiler/test/js/js_spec_string_test.dart
index 8332491..ad274e5 100644
--- a/pkg/compiler/test/js/js_spec_string_test.dart
+++ b/pkg/compiler/test/js/js_spec_string_test.dart
@@ -96,9 +96,7 @@
         returns: returns,
         creates: creates,
         expectedSideEffects: expectedSideEffects,
-        expectError: sideEffectsExpectError == null
-            ? expectError
-            : sideEffectsExpectError);
+        expectError: sideEffectsExpectError ?? expectError);
   }
 
   SideEffects emptySideEffects = new SideEffects.empty();
diff --git a/pkg/compiler/test/jsinterop/declaration_test.dart b/pkg/compiler/test/jsinterop/declaration_test.dart
index fd61ba4..0e8b004 100644
--- a/pkg/compiler/test/jsinterop/declaration_test.dart
+++ b/pkg/compiler/test/jsinterop/declaration_test.dart
@@ -94,23 +94,6 @@
 
 main() => new A();
 '''),
-  const Test(
-      'Js-interop class with abstract getter.',
-      '''
-@JS()
-library test;
-
-import 'package:js/js.dart';
-
-@JS()
-class A {
-  get foo;
-}
-
-main() => new A();
-''',
-      warnings: const [MessageKind.ABSTRACT_GETTER],
-      skipForKernel: true),
   const Test('Js-interop class that extends a js-interop class.', '''
 @JS()
 library test;
@@ -392,21 +375,18 @@
   final Map<String, String> _sources;
   final List<MessageKind> errors;
   final List<MessageKind> warnings;
-  final bool skipForKernel;
 
   const Test(this.name, this._source,
       {this.errors: const <MessageKind>[],
-      this.warnings: const <MessageKind>[],
-      this.skipForKernel: false})
+      this.warnings: const <MessageKind>[]})
       : _sources = null;
 
   const Test.multi(this.name, this._sources,
       {this.errors: const <MessageKind>[],
-      this.warnings: const <MessageKind>[],
-      this.skipForKernel: false})
+      this.warnings: const <MessageKind>[]})
       : _source = null;
 
-  String get source => _source != null ? _source : _sources['main.dart'];
+  String get source => _source ?? _sources['main.dart'];
 
   Map<String, String> get sources =>
       _source != null ? {'main.dart': _source} : _sources;
@@ -415,9 +395,7 @@
 runTest(Test test) async {
   print('==${test.name}======================================================');
   print(test.source);
-  if (!test.skipForKernel) {
-    await runTestInternal(test);
-  }
+  await runTestInternal(test);
 }
 
 runTestInternal(Test test) async {
diff --git a/pkg/compiler/test/kernel/common_test_utils.dart b/pkg/compiler/test/kernel/common_test_utils.dart
deleted file mode 100644
index ed7c9e5..0000000
--- a/pkg/compiler/test/kernel/common_test_utils.dart
+++ /dev/null
@@ -1,135 +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:front_end/src/api_unstable/dart2js.dart'
-    show
-        CompilerOptions,
-        DiagnosticMessage,
-        computePlatformBinariesLocation,
-        kernelForProgram,
-        parseExperimentalArguments,
-        parseExperimentalFlags;
-import 'package:kernel/ast.dart';
-import 'package:kernel/text/ast_to_text.dart' show Printer;
-import 'package:kernel/target/targets.dart';
-import 'package:test/test.dart';
-
-import 'package:compiler/src/kernel/dart2js_target.dart' show Dart2jsTarget;
-
-/// Environment define to update expectation files on failures.
-const kUpdateExpectations = 'updateExpectations';
-
-/// Environment define to dump actual results alongside expectations.
-const kDumpActualResult = 'dump.actual.result';
-
-class TestingDart2jsTarget extends Dart2jsTarget {
-  TestingDart2jsTarget(TargetFlags flags) : super('dart2js', flags);
-}
-
-Future<Component> compileTestCaseToKernelProgram(Uri sourceUri,
-    {Target target,
-    bool enableSuperMixins = false,
-    List<String> experimentalFlags,
-    Map<String, String> environmentDefines}) async {
-  final platformKernel =
-      computePlatformBinariesLocation().resolve('dart2js_platform.dill');
-  target ??= TestingDart2jsTarget(TargetFlags());
-  environmentDefines ??= <String, String>{};
-  final options = CompilerOptions()
-    ..target = target
-    ..additionalDills = <Uri>[platformKernel]
-    ..environmentDefines = environmentDefines
-    ..explicitExperimentalFlags =
-        parseExperimentalFlags(parseExperimentalArguments(experimentalFlags),
-            onError: (String message) {
-      throw message;
-    })
-    ..onDiagnostic = (DiagnosticMessage message) {
-      fail("Compilation error: ${message.plainTextFormatted.join('\n')}");
-    };
-
-  final Component component =
-      (await kernelForProgram(sourceUri, options)).component;
-
-  // Make sure the library name is the same and does not depend on the order
-  // of test cases.
-  component.mainMethod.enclosingLibrary.name = '#lib';
-
-  return component;
-}
-
-String kernelLibraryToString(Library library) {
-  final buffer = StringBuffer();
-  Printer(buffer, showMetadata: true).writeLibraryFile(library);
-  return buffer
-      .toString()
-      .replaceAll(library.importUri.toString(), library.name);
-}
-
-String kernelComponentToString(Component component) {
-  final buffer = StringBuffer();
-  Printer(buffer, showMetadata: true).writeComponentFile(component);
-  final mainLibrary = component.mainMethod.enclosingLibrary;
-  return buffer
-      .toString()
-      .replaceAll(mainLibrary.importUri.toString(), mainLibrary.name);
-}
-
-class Difference {
-  final int line;
-  final String actual;
-  final String expected;
-
-  Difference(this.line, this.actual, this.expected);
-}
-
-Difference findFirstDifference(String actual, String expected) {
-  final actualLines = actual.split('\n');
-  final expectedLines = expected.split('\n');
-  int i = 0;
-  for (; i < actualLines.length && i < expectedLines.length; ++i) {
-    if (actualLines[i] != expectedLines[i]) {
-      return Difference(i + 1, actualLines[i], expectedLines[i]);
-    }
-  }
-  return Difference(i + 1, i < actualLines.length ? actualLines[i] : '<END>',
-      i < expectedLines.length ? expectedLines[i] : '<END>');
-}
-
-void compareResultWithExpectationsFile(Uri source, String actual) {
-  final expectFile = File(source.toFilePath() + '.expect');
-  final expected = expectFile.existsSync() ? expectFile.readAsStringSync() : '';
-
-  if (actual != expected) {
-    if (bool.fromEnvironment(kUpdateExpectations)) {
-      expectFile.writeAsStringSync(actual);
-      print("  Updated $expectFile");
-    } else {
-      if (bool.fromEnvironment(kDumpActualResult)) {
-        File(source.toFilePath() + '.actual').writeAsStringSync(actual);
-      }
-      Difference diff = findFirstDifference(actual, expected);
-      fail("""
-
-Result is different for the test case $source
-
-The first difference is at line ${diff.line}.
-Actual:   ${diff.actual}
-Expected: ${diff.expected}
-
-This failure can be caused by changes in the front-end if it starts generating
-different kernel AST for the same Dart programs.
-
-In order to re-generate expectations run tests with -D$kUpdateExpectations=true VM option:
-
-  sdk/bin/dart -D$kUpdateExpectations=true pkg/compiler/test/kernel/goldens_test.dart
-
-In order to dump actual results into .actual files run tests with -D$kDumpActualResult=true VM option.
-""");
-    }
-  }
-}
diff --git a/pkg/compiler/test/kernel/data/list_generate_1.dart.expect b/pkg/compiler/test/kernel/data/list_generate_1.dart.expect
deleted file mode 100644
index 62d51f9..0000000
--- a/pkg/compiler/test/kernel/data/list_generate_1.dart.expect
+++ /dev/null
@@ -1,32 +0,0 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_interceptors" as _in;
-
-static field core::List<core::int*>* list1 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateGrowable<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-  }
-} =>_list;
-static field core::List<core::int*>* list2 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateGrowable<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-  }
-} =>_list;
-static field core::List<core::int*>* list3 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateFixed<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-  }
-} =>_list;
-static field core::List<core::int*>* list4 = core::List::generate<core::int*>(10, (core::int* i) → core::int* => i, growable: self::someGrowable);
-static field core::bool* someGrowable = true;
-static method main() → void {
-  self::someGrowable = !self::someGrowable;
-  core::print(<core::List<core::int*>*>[self::list1, self::list2, self::list3, self::list4]);
-}
diff --git a/pkg/compiler/test/kernel/data/list_generate_2.dart.expect b/pkg/compiler/test/kernel/data/list_generate_2.dart.expect
deleted file mode 100644
index c87b037..0000000
--- a/pkg/compiler/test/kernel/data/list_generate_2.dart.expect
+++ /dev/null
@@ -1,21 +0,0 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_interceptors" as _in;
-
-static method main() → void {
-  core::print( block {
-    final _in::JSArray<core::List<core::int*>*> _list = _in::JSArray::allocateGrowable<core::List<core::int*>*>(10);
-    for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-      core::int* i = i;
-      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, block {
-        final core::int _length = i;
-        final _in::JSArray<core::int*> _list = _in::JSArray::allocateGrowable<core::int*>(_length);
-        for (core::int i = 0; i.{core::num::<}(_length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-          core::int* i = i;
-          _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i.{core::num::+}(1){(core::num*) →* core::int*}){(core::int, core::int*) → void};
-        }
-      } =>_list){(core::int, core::List<core::int*>*) → void};
-    }
-  } =>_list);
-}
diff --git a/pkg/compiler/test/kernel/data/list_generate_3.dart.expect b/pkg/compiler/test/kernel/data/list_generate_3.dart.expect
deleted file mode 100644
index c8614fa..0000000
--- a/pkg/compiler/test/kernel/data/list_generate_3.dart.expect
+++ /dev/null
@@ -1,51 +0,0 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_interceptors" as _in;
-
-static field core::List<core::int*>* list1 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateGrowable<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    {
-      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-    }
-  }
-} =>_list;
-static field core::List<core::int*>* list2 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateGrowable<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    {
-      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-    }
-  }
-} =>_list;
-static field core::List<core::int*>* list3 = block {
-  final _in::JSArray<core::int*> _list = _in::JSArray::allocateFixed<core::int*>(10);
-  for (core::int i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int) →* core::int}) {
-    core::int* i = i;
-    {
-      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int*) → void};
-    }
-  }
-} =>_list;
-static field core::List<core::int*>* list4 = core::List::generate<core::int*>(10, (core::int* i) → core::int* {
-  return i;
-}, growable: self::someGrowable);
-static field core::List<core::int*>* list5 = core::List::generate<core::int*>(10, (core::int* i) → core::int* {
-  if(i.{core::int::isEven}{core::bool*})
-    return i.{core::num::+}(1){(core::num*) →* core::int*};
-  return i.{core::num::-}(1){(core::num*) →* core::int*};
-});
-static field core::List<core::int*>* list6 = core::List::generate<core::int*>(10, #C1);
-static field core::List<core::int*>* list7 = core::List::generate<core::int*>(10, self::bar);
-static field core::bool* someGrowable = true;
-static method foo(core::int* i) → core::int*
-  return i;
-static get bar() → (core::int*) →* core::int*
-  return #C1;
-static method main() → void {
-  self::someGrowable = !self::someGrowable;
-  core::print(<core::List<core::int*>*>[self::list1, self::list2, self::list3, self::list4, self::list5, self::list6, self::list7]);
-}
diff --git a/pkg/compiler/test/kernel/goldens_test.dart b/pkg/compiler/test/kernel/goldens_test.dart
deleted file mode 100644
index a945729..0000000
--- a/pkg/compiler/test/kernel/goldens_test.dart
+++ /dev/null
@@ -1,46 +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:io';
-
-import 'package:kernel/target/targets.dart';
-import 'package:kernel/ast.dart';
-import 'package:kernel/kernel.dart';
-import 'package:test/test.dart';
-
-import 'common_test_utils.dart';
-
-final String testRootDir = Platform.script.resolve('.').toFilePath();
-
-runTestCase(
-    Uri source, List<String> experimentalFlags, bool enableNullSafety) async {
-  final target =
-      TestingDart2jsTarget(TargetFlags(enableNullSafety: enableNullSafety));
-  Component component = await compileTestCaseToKernelProgram(source,
-      target: target, experimentalFlags: experimentalFlags);
-
-  String actual = kernelLibraryToString(component.mainMethod.enclosingLibrary);
-
-  compareResultWithExpectationsFile(source, actual);
-}
-
-main() {
-  group('goldens', () {
-    final testCasesDir = new Directory(testRootDir + '/data');
-
-    for (var entry
-        in testCasesDir.listSync(recursive: true, followLinks: false)) {
-      final path = entry.path;
-      if (path.endsWith('.dart')) {
-        final bool enableNullSafety = path.endsWith('_nnbd_strong.dart');
-        final bool enableNNBD = enableNullSafety || path.endsWith('_nnbd.dart');
-        final List<String> experimentalFlags = [
-          if (enableNNBD) 'non-nullable',
-        ];
-        test(path,
-            () => runTestCase(entry.uri, experimentalFlags, enableNullSafety));
-      }
-    }
-  }, timeout: Timeout.none);
-}
diff --git a/pkg/compiler/test/model/class_set_test.dart b/pkg/compiler/test/model/class_set_test.dart
index d884344..fd8526e 100644
--- a/pkg/compiler/test/model/class_set_test.dart
+++ b/pkg/compiler/test/model/class_set_test.dart
@@ -96,7 +96,7 @@
   void checkState(ClassEntity root,
       {ClassEntity currentNode, List<ClassEntity> stack}) {
     ClassEntity classOf(ClassHierarchyNode node) {
-      return node != null ? node.cls : null;
+      return node?.cls;
     }
 
     List<ClassEntity> classesOf(Iterable<ClassHierarchyNode> list) {
diff --git a/pkg/compiler/test/model/maplet_test.dart b/pkg/compiler/test/model/maplet_test.dart
index 1a6e66e..fe9a25f 100644
--- a/pkg/compiler/test/model/maplet_test.dart
+++ b/pkg/compiler/test/model/maplet_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.
 
-// @dart = 2.7
+// @dart = 2.12
 
 import "package:expect/expect.dart";
 import "package:compiler/src/util/maplet.dart";
 
-main() {
+void main() {
   for (int i = 1; i <= 32; i++) {
     test(i);
   }
 }
 
-test(int size) {
-  var maplet = new Maplet();
+void test(int size) {
+  final maplet = Maplet<int?, String>();
   for (int i = 0; i < size; i++) {
     Expect.isTrue(maplet.isEmpty == (i == 0));
     maplet[i] = '$i';
diff --git a/pkg/compiler/test/model/native_test.dart b/pkg/compiler/test/model/native_test.dart
index 0cb0a6e..ed2e47f 100644
--- a/pkg/compiler/test/model/native_test.dart
+++ b/pkg/compiler/test/model/native_test.dart
@@ -328,16 +328,16 @@
       entryPoint: entryPoint,
       memorySourceFiles: sources,
       diagnosticHandler: collector);
-  Expect.isFalse(result.isSuccess,
-      "Expected compile time error(s) 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");
+  Expect.listEquals(
+      expected, actual, "Unexpected compile time error(s) for\n$subTest");
 }
 
 class SubTest {
diff --git a/pkg/compiler/test/model/setlet_test.dart b/pkg/compiler/test/model/setlet_test.dart
index a58f6ce..2b212ba 100644
--- a/pkg/compiler/test/model/setlet_test.dart
+++ b/pkg/compiler/test/model/setlet_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.
 
-// @dart = 2.7
+// @dart = 2.12
 
 import "package:expect/expect.dart";
 import 'dart:collection';
 import 'package:compiler/src/util/setlet.dart';
 
-main() {
+void main() {
   for (int i = 1; i <= 32; i++) {
     test(i);
   }
@@ -16,8 +16,8 @@
   testAllLikeSet();
 }
 
-test(int size) {
-  var setlet = new Setlet();
+void test(int size) {
+  final setlet = Setlet<int?>();
   for (int i = 0; i < size; i++) {
     Expect.isTrue(setlet.isEmpty == (i == 0));
     setlet.add(i);
@@ -73,10 +73,10 @@
   }
 }
 
-testAllLikeSet() {
+void testAllLikeSet() {
   // For a variety of inputs and operations, test that Setlet behaves just like
   // Set.
-  var samples = [
+  final List<List<int>> samples = [
     [],
     [1],
     [1, 2],
@@ -115,33 +115,36 @@
   }
 }
 
-testSetXElement(name, fn, a, b) {
-  var set1 = new LinkedHashSet.from(a);
-  var setlet1 = new Setlet.from(a);
+void testSetXElement<E, R>(
+    String name, R Function(Set<E>, E) fn, Iterable<E> a, E b) {
+  final set1 = LinkedHashSet.of(a);
+  final setlet1 = Setlet.of(a);
 
-  var setResult = fn(set1, b);
-  var setletResult = fn(setlet1, b);
+  final setResult = fn(set1, b);
+  final setletResult = fn(setlet1, b);
 
-  var operationName = '$name $a $b';
+  final operationName = '$name $a $b';
   checkResult(operationName, setResult, setletResult);
   checkModifications(operationName, set1, setlet1);
 }
 
-testSetXSet(name, fn, a, b) {
-  var set1 = new LinkedHashSet.from(a);
-  var set2 = new LinkedHashSet.from(b);
-  var setlet1 = new Setlet.from(a);
-  var setlet2 = new Setlet.from(b);
+void testSetXSet<E, R>(
+    String name, R Function(Set<E>, Set<E>) fn, Iterable<E> a, Iterable<E> b) {
+  final set1 = LinkedHashSet.of(a);
+  final set2 = LinkedHashSet.of(b);
+  final setlet1 = Setlet.of(a);
+  final setlet2 = Setlet.of(b);
 
-  var setResult = fn(set1, set2);
-  var setletResult = fn(setlet1, setlet2);
+  final setResult = fn(set1, set2);
+  final setletResult = fn(setlet1, setlet2);
 
-  var operationName = '$name $a $b';
+  final operationName = '$name $a $b';
   checkResult(operationName, setResult, setletResult);
   checkModifications(operationName, set1, setlet1);
 }
 
-checkResult(operationName, setResult, setletResult) {
+void checkResult(
+    String operationName, dynamic setResult, dynamic setletResult) {
   if (setResult == null || setResult is bool || setResult is num) {
     Expect.equals(setResult, setletResult, '$operationName');
   } else if (setResult is Iterable) {
@@ -152,12 +155,15 @@
         setResult.length, setletResult.length, '$operationName: same length');
     Expect.listEquals(setResult.toList(), setletResult.toList(),
         '$operationName: same toList() result');
+    Expect.listEquals([...setResult], [...setletResult],
+        '$operationName: same spread result');
   } else {
     Expect.isFalse(true, '$operationName: unexpected result type');
   }
 }
 
-checkModifications(operationName, setReceiver, setletReceiver) {
+void checkModifications<E>(
+    String operationName, Set<E> setReceiver, Set<E> setletReceiver) {
   Expect.equals(setReceiver.length, setletReceiver.length,
       '$operationName: same post-operation receiver length');
   Expect.listEquals(setReceiver.toList(), setletReceiver.toList(),
diff --git a/pkg/compiler/test/optimization/optimization_test.dart b/pkg/compiler/test/optimization/optimization_test.dart
index c89e863..e8c1972 100644
--- a/pkg/compiler/test/optimization/optimization_test.dart
+++ b/pkg/compiler/test/optimization/optimization_test.dart
@@ -11,7 +11,6 @@
 import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_strategy.dart';
@@ -27,8 +26,7 @@
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     bool strict = args.contains('-s');
     await checkTests(dataDir, new OptimizationDataComputer(strict: strict),
-      options: [Flags.disableInlining],
-        args: args);
+        options: [Flags.disableInlining], args: args);
   });
 }
 
diff --git a/pkg/compiler/test/rti/data/closure_generic_unneeded.dart b/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
index aa3b2cb..6b0ad84 100644
--- a/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
+++ b/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
@@ -9,7 +9,7 @@
 class A<T> {
   @pragma('dart2js:noInline')
   m() {
-    return /*needsSignature*/(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 aa3b2cb..6b0ad84 100644
--- a/pkg/compiler/test/rti/data/closure_unneeded.dart
+++ b/pkg/compiler/test/rti/data/closure_unneeded.dart
@@ -9,7 +9,7 @@
 class A<T> {
   @pragma('dart2js:noInline')
   m() {
-    return /*needsSignature*/(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 689e659..4693b39 100644
--- a/pkg/compiler/test/rti/data/generic_bounds.dart
+++ b/pkg/compiler/test/rti/data/generic_bounds.dart
@@ -47,7 +47,9 @@
   /*needsArgs,needsSignature,selectors=[Selector(call, call, arity=0, types=1)]*/
   method8<T extends Class2a<num>>() => null;
 
-  /*needsArgs,needsSignature,selectors=[Selector(call, call, arity=0, types=1)]*/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 f852f9f..682672d 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 /*spec.needsSignature*/() {
+    return /*spec.needsSignature*/ () {
       c = f;
     };
   }
diff --git a/pkg/compiler/test/rti/data/instantiation4.dart b/pkg/compiler/test/rti/data/instantiation4.dart
index be3b975..af33f43 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 /*spec.needsSignature*/() {
+    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 5069a9a..851d076 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 /*spec.needsSignature*/() => <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 39ffbd7..0df4990 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() {
-    /*needsArgs,needsSignature*/num local<T>(num n) => null;
+    /*needsArgs,needsSignature*/ num local<T>(num n) => null;
     return local;
   }
 
   method2() {
-    /*needsArgs,needsSignature*/num local<T>(int n) => null;
+    /*needsArgs,needsSignature*/ num local<T>(int n) => null;
     return local;
   }
 
   method3() {
-    /*needsArgs,needsSignature*/int local<T>(num n) => null;
+    /*needsArgs,needsSignature*/ int local<T>(num n) => null;
     return local;
   }
 }
@@ -46,7 +46,7 @@
   /*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>() {
-    /*needsSignature*/num local(num n, T t) => null;
+    /*needsSignature*/ num local(num n, T t) => null;
     return local;
   }
 }
@@ -69,24 +69,24 @@
 /*spec.member: method9:direct,explicit=[method9.T*],needsArgs*/
 /*prod.member: method9:needsArgs*/
 method9<T>() {
-  /*needsSignature*/num local(num n, T t) => null;
+  /*needsSignature*/ num local(num n, T t) => null;
   return local;
 }
 
 method10() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
-  /*prod.needsArgs,needsSignature*/num local<T>(T n) => null;
+  /*prod.needsArgs,needsSignature*/ num local<T>(T n) => null;
   return local;
 }
 
 method11() {
-  /*needsArgs,needsSignature*/T local<T>(num n) => null;
+  /*needsArgs,needsSignature*/ T local<T>(num n) => null;
   return local;
 }
 
 method12() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
-  /*prod.needsArgs,needsSignature*/num local<T>(num n, T t) => null;
+  /*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 7744aa6..9a901bd 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() {
-    /*needsSignature*/num local(int n) => null;
+    /*needsSignature*/ num local(int n) => null;
     return local;
   }
 
   method3() {
-    /*needsSignature*/Object local(num n) => null;
+    /*needsSignature*/ Object local(num n) => null;
     return local;
   }
 }
@@ -47,7 +47,7 @@
 /*prod.class: Class4:needsArgs*/
 class Class4<T> {
   method6() {
-    /*needsSignature*/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 7956fe4..38f07cb 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,8 @@
   }
 
   method2() {
-    /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/num local<T>(int n) => null;
+    /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/ num
+        local<T>(int n) => null;
     return local;
   }
 
@@ -48,7 +49,7 @@
   /*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>() {
-    /*needsSignature*/num local(num n, T t) => null;
+    /*needsSignature*/ num local(num n, T t) => null;
     return local;
   }
 }
@@ -71,7 +72,7 @@
 /*spec.member: method9:direct,explicit=[method9.T*],needsArgs*/
 /*prod.member: method9:needsArgs*/
 method9<T>() {
-  /*needsSignature*/num local(num n, T t) => null;
+  /*needsSignature*/ num local(num n, T t) => null;
   return local;
 }
 
@@ -90,7 +91,7 @@
 
 method12() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
-  /*prod.needsArgs,needsSignature*/num local<T>(num n, T t) => null;
+  /*prod.needsArgs,needsSignature*/ num local<T>(num n, T t) => null;
   return local;
 }
 
diff --git a/pkg/compiler/test/rti/data/method_signatures_generic.dart b/pkg/compiler/test/rti/data/method_signatures_generic.dart
index 0d2c352..b7e0859 100644
--- a/pkg/compiler/test/rti/data/method_signatures_generic.dart
+++ b/pkg/compiler/test/rti/data/method_signatures_generic.dart
@@ -18,7 +18,7 @@
 }
 
 class Class2 {
-  /*spec.member: Class2.method4:direct,explicit=[method4.T*],needsArgs,needsInst=[<num*>,<num*>,<num*>,<num*>]*/
+  /*spec.member: Class2.method4:direct,explicit=[method4.T*],needsArgs,needsInst=[<num*>,<num*>]*/
   num method4<T>(T n) => null;
 }
 
@@ -32,7 +32,7 @@
   num method6<T>(num n, T t) => null;
 }
 
-/*spec.member: method7:direct,explicit=[method7.T*],needsArgs,needsInst=[<num*>,<num*>,<num*>,<num*>]*/
+/*spec.member: method7:direct,explicit=[method7.T*],needsArgs,needsInst=[<num*>,<num*>]*/
 num method7<T>(T n) => null;
 
 /*member: method8:*/
diff --git a/pkg/compiler/test/rti/data/subtype_named_args.dart b/pkg/compiler/test/rti/data/subtype_named_args.dart
index d1e2eb7..530b914 100644
--- a/pkg/compiler/test/rti/data/subtype_named_args.dart
+++ b/pkg/compiler/test/rti/data/subtype_named_args.dart
@@ -95,7 +95,7 @@
       /*needsSignature*/
       ({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
 
-  Expect.isTrue(/*needsSignature*/(
+  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 8b797f3..b2b3cf9 100644
--- a/pkg/compiler/test/rti/data/subtype_named_args1.dart
+++ b/pkg/compiler/test/rti/data/subtype_named_args1.dart
@@ -39,17 +39,15 @@
 main() {
   Expect.isTrue(/*needsSignature*/ ({A a}) {} is t1);
   Expect.isTrue(/*needsSignature*/ ({B a}) {} is t1);
-  Expect.isTrue(
-      /*needsSignature*/ ({C a}) {} is t1);
-  Expect.isTrue(
-      /*needsSignature*/ ({D a}) {} is t1);
+  Expect.isTrue(/*needsSignature*/ ({C a}) {} is t1);
+  Expect.isTrue(/*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(/*needsSignature*/({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,49 +56,49 @@
   Expect.isTrue(/*needsSignature*/ ({Object i}) {} is t3);
   Expect.isTrue(/*needsSignature*/ ({var i}) {} is t3);
 
-  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*/ ({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(/*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*/ ({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(/*needsSignature*/({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(/*needsSignature*/({Map<List, List> m}) {} is t5);
-  Expect.isTrue(/*needsSignature*/({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(/*needsSignature*/({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(/*needsSignature*/({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);
 
   Expect.isTrue(/*needsSignature*/ ({A a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({B a}) {} is t8);
-  Expect.isTrue(
-      /*needsSignature*/ ({C a}) {} is t8);
-  Expect.isTrue(
-      /*needsSignature*/ ({D a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/ ({C a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/ ({D a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({Object a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({var 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);
+  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/rti_emission_test_helper.dart b/pkg/compiler/test/rti/rti_emission_test_helper.dart
index fbded89..aa48230 100644
--- a/pkg/compiler/test/rti/rti_emission_test_helper.dart
+++ b/pkg/compiler/test/rti/rti_emission_test_helper.dart
@@ -10,7 +10,6 @@
 import 'package:compiler/src/closure.dart';
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/runtime_types.dart';
 import 'package:compiler/src/js_emitter/model.dart';
diff --git a/pkg/compiler/test/rti/rti_need_test_helper.dart b/pkg/compiler/test/rti/rti_need_test_helper.dart
index c59c219..f72a9f4 100644
--- a/pkg/compiler/test/rti/rti_need_test_helper.dart
+++ b/pkg/compiler/test/rti/rti_need_test_helper.dart
@@ -11,7 +11,6 @@
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/elements/types.dart';
 import 'package:compiler/src/js_backend/runtime_types_resolution.dart';
diff --git a/pkg/compiler/test/serialization/serialization_test.dart b/pkg/compiler/test/serialization/serialization_test.dart
index 139dde5..3b052f5 100644
--- a/pkg/compiler/test/serialization/serialization_test.dart
+++ b/pkg/compiler/test/serialization/serialization_test.dart
@@ -52,7 +52,6 @@
     testCount++;
     List<String> testOptions = options.toList();
     testOptions.add(Flags.dumpInfo);
-    testOptions.add('--out=out.js');
     if (onTest != null) {
       onTest(entity.uri);
     }
diff --git a/pkg/compiler/test/serialization/serialization_test_helper.dart b/pkg/compiler/test/serialization/serialization_test_helper.dart
index b7b771c..2507434 100644
--- a/pkg/compiler/test/serialization/serialization_test_helper.dart
+++ b/pkg/compiler/test/serialization/serialization_test_helper.dart
@@ -4,11 +4,16 @@
 
 // @dart = 2.7
 
+import 'dart:io';
+
 import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/js_model/js_world.dart';
 import 'package:compiler/src/inferrer/types.dart';
+import 'package:compiler/src/serialization/serialization.dart';
 import 'package:compiler/src/serialization/strategies.dart';
+import 'package:compiler/src/serialization/task.dart';
 import 'package:expect/expect.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../helpers/memory_compiler.dart';
@@ -30,16 +35,18 @@
     bool stoppedAfterTypeInference = false}) {
   if (stoppedAfterClosedWorld) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
-    JsClosedWorld newClosedWorld =
+    var newClosedWorldAndIndices =
         cloneClosedWorld(compiler, closedWorld, strategy);
-    compiler.performGlobalTypeInference(newClosedWorld);
+    compiler.performGlobalTypeInference(newClosedWorldAndIndices.closedWorld);
   }
 
   if (stoppedAfterClosedWorld || stoppedAfterTypeInference) {
     GlobalTypeInferenceResults globalInferenceResults =
         compiler.globalInference.resultsForTesting;
+    var indices = compiler.closedWorldIndicesForTesting;
     GlobalTypeInferenceResults newGlobalInferenceResults =
-        cloneInferenceResults(compiler, globalInferenceResults, strategy);
+        cloneInferenceResults(
+            indices, compiler, globalInferenceResults, strategy);
     compiler.generateJavaScriptCode(newGlobalInferenceResults);
   }
   var actualOutput = actualOutputCollector.clear();
@@ -88,13 +95,14 @@
     List<String> options,
     SerializationStrategy strategy: const BytesInMemorySerializationStrategy(),
     bool useDataKinds: false}) async {
+  var commonOptions = options + ['--out=out.js'];
   OutputCollector collector = new OutputCollector();
   CompilationResult result = await runCompiler(
       entryPoint: entryPoint,
       memorySourceFiles: memorySourceFiles,
       packageConfig: packageConfig,
       librariesSpecificationUri: librariesSpecificationUri,
-      options: options,
+      options: commonOptions,
       outputProvider: collector,
       beforeRun: (Compiler compiler) {
         compiler.kernelLoader.forceSerialization = true;
@@ -108,7 +116,7 @@
       memorySourceFiles: memorySourceFiles,
       packageConfig: packageConfig,
       librariesSpecificationUri: librariesSpecificationUri,
-      options: options,
+      options: commonOptions,
       outputProvider: collector2,
       beforeRun: (Compiler compiler) {
         compiler.kernelLoader.forceSerialization = true;
@@ -116,26 +124,57 @@
       });
   Expect.isTrue(result2.isSuccess);
 
-  OutputCollector collector3 = new OutputCollector();
-  CompilationResult result3 = await runCompiler(
+  var dillUri = Uri.parse('out.dill');
+  var closedWorldUri = Uri.parse('world.data');
+  OutputCollector collector3a = new OutputCollector();
+  CompilationResult result3a = await runCompiler(
       entryPoint: entryPoint,
       memorySourceFiles: memorySourceFiles,
       packageConfig: packageConfig,
       librariesSpecificationUri: librariesSpecificationUri,
-      options: options,
-      outputProvider: collector3,
+      options: options +
+          ['--out=$dillUri', '${Flags.writeClosedWorld}=$closedWorldUri'],
+      outputProvider: collector3a,
+      beforeRun: (Compiler compiler) {
+        compiler.kernelLoader.forceSerialization = true;
+      });
+  Expect.isTrue(result3a.isSuccess);
+  Expect.isTrue(collector3a.binaryOutputMap.containsKey(dillUri));
+  Expect.isTrue(collector3a.binaryOutputMap.containsKey(closedWorldUri));
+
+  Directory dir =
+      await Directory.systemTemp.createTemp('serialization_test_helper');
+  var dillFileUri = dir.uri.resolve('out.dill');
+  var closedWorldFileUri = dir.uri.resolve('world.data');
+  var dillBytes = collector3a.binaryOutputMap[dillUri].list;
+  var closedWorldBytes = collector3a.binaryOutputMap[closedWorldUri].list;
+  File(dillFileUri.path).writeAsBytesSync(dillBytes);
+  File(closedWorldFileUri.path).writeAsBytesSync(closedWorldBytes);
+  OutputCollector collector3b = new OutputCollector();
+  CompilationResult result3b = await runCompiler(
+      entryPoint: dillFileUri,
+      memorySourceFiles: memorySourceFiles,
+      packageConfig: packageConfig,
+      librariesSpecificationUri: librariesSpecificationUri,
+      options: commonOptions +
+          [
+            '${Flags.readClosedWorld}=$closedWorldFileUri',
+            '${Flags.writeData}=global.data'
+          ],
+      outputProvider: collector3b,
       beforeRun: (Compiler compiler) {
         compiler.kernelLoader.forceSerialization = true;
         compiler.stopAfterTypeInference = true;
       });
-  Expect.isTrue(result3.isSuccess);
+  Expect.isTrue(result3b.isSuccess);
 
   finishCompileAndCompare(
       expectedOutput, collector2, result2.compiler, strategy,
       stoppedAfterClosedWorld: true);
   finishCompileAndCompare(
-      expectedOutput, collector3, result3.compiler, strategy,
+      expectedOutput, collector3b, result3b.compiler, strategy,
       stoppedAfterTypeInference: true);
+  await dir.delete(recursive: true);
 }
 
 void checkData(List<int> data, List<int> newData) {
@@ -161,35 +200,48 @@
   Expect.listEquals(data, newData);
 }
 
-JsClosedWorld cloneClosedWorld(Compiler compiler, JsClosedWorld closedWorld,
-    SerializationStrategy strategy) {
+ClosedWorldAndIndices cloneClosedWorld(Compiler compiler,
+    JsClosedWorld closedWorld, SerializationStrategy strategy) {
   ir.Component component = closedWorld.elementMap.programEnv.mainComponent;
   List<int> irData = strategy.serializeComponent(component);
   List<int> closedWorldData = strategy.serializeClosedWorld(closedWorld);
   print('data size: ${closedWorldData.length}');
 
   ir.Component newComponent = strategy.deserializeComponent(irData);
-  JsClosedWorld newClosedWorld = strategy.deserializeClosedWorld(
+  var newClosedWorldAndIndices = strategy.deserializeClosedWorld(
       compiler.options,
       compiler.reporter,
       compiler.environment,
       compiler.abstractValueStrategy,
       newComponent,
       closedWorldData);
-  List<int> newClosedWorldData = strategy.serializeClosedWorld(newClosedWorld);
+  List<int> newClosedWorldData =
+      strategy.serializeClosedWorld(newClosedWorldAndIndices.closedWorld);
   checkData(closedWorldData, newClosedWorldData);
-  return newClosedWorld;
+  return newClosedWorldAndIndices;
 }
 
-GlobalTypeInferenceResults cloneInferenceResults(Compiler compiler,
-    GlobalTypeInferenceResults results, SerializationStrategy strategy) {
+GlobalTypeInferenceResults cloneInferenceResults(
+    DataSourceIndices indices,
+    Compiler compiler,
+    GlobalTypeInferenceResults results,
+    SerializationStrategy strategy) {
   List<int> irData = strategy.unpackAndSerializeComponent(results);
   List<int> closedWorldData =
       strategy.serializeClosedWorld(results.closedWorld);
-  List<int> worldData = strategy.serializeGlobalTypeInferenceResults(results);
+  List<int> worldData =
+      strategy.serializeGlobalTypeInferenceResults(indices, results);
   print('data size: ${worldData.length}');
 
   ir.Component newComponent = strategy.deserializeComponent(irData);
+  var newClosedWorldAndIndices = strategy.deserializeClosedWorld(
+      compiler.options,
+      compiler.reporter,
+      compiler.environment,
+      compiler.abstractValueStrategy,
+      newComponent,
+      closedWorldData);
+  var newIndices = indices == null ? null : newClosedWorldAndIndices.indices;
   GlobalTypeInferenceResults newResults =
       strategy.deserializeGlobalTypeInferenceResults(
           compiler.options,
@@ -197,10 +249,11 @@
           compiler.environment,
           compiler.abstractValueStrategy,
           newComponent,
-          closedWorldData,
+          newClosedWorldAndIndices.closedWorld,
+          newIndices,
           worldData);
   List<int> newWorldData =
-      strategy.serializeGlobalTypeInferenceResults(newResults);
+      strategy.serializeGlobalTypeInferenceResults(newIndices, newResults);
   checkData(worldData, newWorldData);
   return newResults;
 }
diff --git a/pkg/compiler/test/sourcemaps/helpers/diff.dart b/pkg/compiler/test/sourcemaps/helpers/diff.dart
index 1f5ed6a..0b2e9c3 100644
--- a/pkg/compiler/test/sourcemaps/helpers/diff.dart
+++ b/pkg/compiler/test/sourcemaps/helpers/diff.dart
@@ -37,7 +37,7 @@
   }
 
   @override
-  String toString() => '$type${index != null ? index : ''}';
+  String toString() => '$type${index ?? ''}';
 }
 
 /// A block of code in an output column.
@@ -96,7 +96,8 @@
 /// A list of columns that should align in output.
 class DiffBlock {
   final DiffKind kind;
-  Map<DiffColumn, DiffColumnBlock> _columns = <DiffColumn, DiffColumnBlock>{};
+  final Map<DiffColumn, DiffColumnBlock> _columns =
+      <DiffColumn, DiffColumnBlock>{};
 
   DiffBlock(this.kind);
 
diff --git a/pkg/compiler/test/sourcemaps/helpers/output_structure.dart b/pkg/compiler/test/sourcemaps/helpers/output_structure.dart
index be586f6..f2f33b8 100644
--- a/pkg/compiler/test/sourcemaps/helpers/output_structure.dart
+++ b/pkg/compiler/test/sourcemaps/helpers/output_structure.dart
@@ -282,7 +282,7 @@
       'from': from,
       'to': to,
       'children': children.map((child) => child.toJson(strategy)).toList(),
-      'codeSource': codeSource != null ? codeSource.toJson() : null,
+      'codeSource': codeSource?.toJson(),
     };
   }
 
diff --git a/pkg/compiler/test/sourcemaps/tools/source_mapping_tester.dart b/pkg/compiler/test/sourcemaps/tools/source_mapping_tester.dart
index aca0ca8..6bca3c3 100644
--- a/pkg/compiler/test/sourcemaps/tools/source_mapping_tester.dart
+++ b/pkg/compiler/test/sourcemaps/tools/source_mapping_tester.dart
@@ -153,9 +153,8 @@
     String config, String filename, Uri uri, List<String> options,
     {bool verbose: true}) async {
   SourceMapProcessor processor = new SourceMapProcessor(uri);
-  SourceMaps sourceMaps = await processor.process(
-      [Flags.useContentSecurityPolicy, Flags.disableInlining]..addAll(options),
-      verbose: verbose);
+  SourceMaps sourceMaps = await processor
+      .process(['--csp', Flags.disableInlining, ...options], verbose: verbose);
   TestResult result = new TestResult(config, filename, processor);
   for (SourceMapInfo info in sourceMaps.elementSourceMapInfos.values) {
     if (info.element.library.canonicalUri.scheme == 'dart') continue;
diff --git a/pkg/compiler/test/static_type/data/cascade.dart b/pkg/compiler/test/static_type/data/cascade.dart
index 2b06eb3..83f2605 100644
--- a/pkg/compiler/test/static_type/data/cascade.dart
+++ b/pkg/compiler/test/static_type/data/cascade.dart
@@ -10,8 +10,8 @@
 
 promotedCascade(dynamic value) {
   if (/*dynamic*/ value is List<String>) {
-    value = '[${(
-        /*List<String>*/ value.. /*invoke: [List<String>]->void*/ sort()). /*invoke: [List<String>]->String*/ join(',')}]';
+    value =
+        '[${(/*List<String>*/ value.. /*invoke: [List<String>]->void*/ sort()). /*invoke: [List<String>]->String*/ join(',')}]';
   }
   return /*dynamic*/ value;
 }
diff --git a/pkg/compiler/test/static_type/data/effectively_final_access.dart b/pkg/compiler/test/static_type/data/effectively_final_access.dart
index 352b77c..786d6ae 100644
--- a/pkg/compiler/test/static_type/data/effectively_final_access.dart
+++ b/pkg/compiler/test/static_type/data/effectively_final_access.dart
@@ -15,8 +15,8 @@
   Function f = (int i) => /*spec.int*/ i;
   /*spec.int Function(int)*/ f
       . /*spec.invoke: [int Function(int)]->int*/ call(0);
-  (/*spec.int Function(int)*/ f.call)
-      /*spec.invoke: [int Function(int)]->int*/ (0);
+  (/*spec.int Function(int)*/ f
+      .call) /*spec.invoke: [int Function(int)]->int*/ (0);
 }
 
 effectivelyFinalGenericFunctionTyped(T Function<T>(T) g) {
@@ -35,8 +35,8 @@
   /*spec.List<int>*/ list /*spec.[List<int>]->int*/
           [0] /*spec.invoke: [int]->int*/ +
       0;
-  (/*spec.List<int>*/ list.contains)
-      /*spec.invoke: [bool Function(Object)]->bool*/ (0);
+  (/*spec.List<int>*/ list
+      .contains) /*spec.invoke: [bool Function(Object)]->bool*/ (0);
   /*spec.List<int>*/ list
       /*spec.update: [List<int>]->void*/ /*spec.[List<int>]->int*/
       [0] /*spec.invoke: [int]->int*/ ++;
@@ -48,8 +48,8 @@
   /*spec.List<int>*/ list /*spec.[List<int>]->int*/
           [0] /*spec.invoke: [int]->int*/ +
       0;
-  (/*spec.List<int>*/ list.contains)
-      /*spec.invoke: [bool Function(Object)]->bool*/ (0);
+  (/*spec.List<int>*/ list
+      .contains) /*spec.invoke: [bool Function(Object)]->bool*/ (0);
   /*spec.List<int>*/ list
       /*spec.update: [List<int>]->void*/ /*spec.[List<int>]->int*/
       [0] /*spec.invoke: [int]->int*/ ++;
diff --git a/pkg/compiler/test/static_type/data/for.dart b/pkg/compiler/test/static_type/data/for.dart
index df400d8..2845dc4 100644
--- a/pkg/compiler/test/static_type/data/for.dart
+++ b/pkg/compiler/test/static_type/data/for.dart
@@ -18,9 +18,7 @@
 for1(dynamic c) {
   if (/*dynamic*/ c is Class) {
     /*Class*/ c.next;
-    for (/*Class*/ c.next;
-        /*dynamic*/ c != null;
-        /*dynamic*/ c.next) {
+    for (/*Class*/ c.next; /*dynamic*/ c != null; /*dynamic*/ c.next) {
       /*dynamic*/ c.next;
       if (/*dynamic*/ c is Class) {
         /*Class*/ c.next;
@@ -34,9 +32,7 @@
 for2(dynamic c) {
   if (/*dynamic*/ c is Class) {
     /*Class*/ c.next;
-    for (/*Class*/ c.next;
-        /*Class*/ c != null;
-        /*Class*/ c.next) {
+    for (/*Class*/ c.next; /*Class*/ c != null; /*Class*/ c.next) {
       /*Class*/ c.next;
     }
     /*Class*/ c.next;
diff --git a/pkg/compiler/test/static_type/data/issue42281.dart b/pkg/compiler/test/static_type/data/issue42281.dart
index efe3a5d..2b4c5a9 100644
--- a/pkg/compiler/test/static_type/data/issue42281.dart
+++ b/pkg/compiler/test/static_type/data/issue42281.dart
@@ -11,8 +11,7 @@
 }
 
 class SubClass extends Class {
-  SubClass(Type componentType) : super(
-            /*Type*/ componentType);
+  SubClass(Type componentType) : super(/*Type*/ componentType);
 }
 
 method1(Class c, Type type, [o]) {
diff --git a/pkg/compiler/test/static_type/data/while.dart b/pkg/compiler/test/static_type/data/while.dart
index 881015a..832caba 100644
--- a/pkg/compiler/test/static_type/data/while.dart
+++ b/pkg/compiler/test/static_type/data/while.dart
@@ -55,8 +55,7 @@
 }
 
 whileNextGeneric(GenericClass<int> c) {
-  while (
-      /*GenericClass<int>*/ c != null) {
+  while (/*GenericClass<int>*/ c != null) {
     c = /*GenericClass<int>*/ c.next;
   }
   return /*GenericClass<int>*/ c;
diff --git a/pkg/compiler/test/static_type/type_promotion_data/issue42281.dart b/pkg/compiler/test/static_type/type_promotion_data/issue42281.dart
index 3d9a9da..3a19315 100644
--- a/pkg/compiler/test/static_type/type_promotion_data/issue42281.dart
+++ b/pkg/compiler/test/static_type/type_promotion_data/issue42281.dart
@@ -41,10 +41,9 @@
         c = new SubClass(String);
       }
       /*{c:[{true:SubClass},{false:Class}|SubClass,Class]}*/ c;
-      print(
-          /*{c:[{true:SubClass},{false:Class}|SubClass,Class]}*/ type ==
-              /*{c:[{true:SubClass},{false:Class}|SubClass,Class]}*/ c
-                  ?.componentType);
+      print(/*{c:[{true:SubClass},{false:Class}|SubClass,Class]}*/ type ==
+          /*{c:[{true:SubClass},{false:Class}|SubClass,Class]}*/ c
+              ?.componentType);
     }
   }
 }
diff --git a/pkg/compiler/tool/kernel_visitor/dart_html_metrics_visitor.dart b/pkg/compiler/tool/kernel_visitor/dart_html_metrics_visitor.dart
index 13cc373..79b8b41 100644
--- a/pkg/compiler/tool/kernel_visitor/dart_html_metrics_visitor.dart
+++ b/pkg/compiler/tool/kernel_visitor/dart_html_metrics_visitor.dart
@@ -4,7 +4,6 @@
 import "dart:convert";
 import "dart:io";
 import "package:kernel/kernel.dart";
-import "package:kernel/ast.dart";
 
 main(List<String> args) async {
   // Ensure right args are passed.
diff --git a/pkg/compiler/tool/kernel_visitor/test/info_visitor_test.dart b/pkg/compiler/tool/kernel_visitor/test/info_visitor_test.dart
index 1e24648..e5fc258 100644
--- a/pkg/compiler/tool/kernel_visitor/test/info_visitor_test.dart
+++ b/pkg/compiler/tool/kernel_visitor/test/info_visitor_test.dart
@@ -12,7 +12,8 @@
 main() async {
   // Compile Dill
   var sdkPath = getSdkPath();
-  if (!sdkPath.contains("ReleaseX64")) sdkPath = path.join(sdkPath, "ReleaseX64", "dart-sdk");
+  if (!sdkPath.contains("ReleaseX64"))
+    sdkPath = path.join(sdkPath, "ReleaseX64", "dart-sdk");
   var scriptPath = Platform.script.path;
   var pkgPath = path.dirname(
       path.dirname(path.dirname(path.dirname(path.dirname(scriptPath)))));
diff --git a/pkg/compiler/tool/modular_dart2js.dart b/pkg/compiler/tool/modular_dart2js.dart
index f8e15e3..e0f4771 100644
--- a/pkg/compiler/tool/modular_dart2js.dart
+++ b/pkg/compiler/tool/modular_dart2js.dart
@@ -132,7 +132,9 @@
 
 Future subProcess(List<String> baseOptions, List<String> additionalOptions,
     String outputPrefix) async {
-  List<String> options = []..addAll(baseOptions)..addAll(additionalOptions);
+  List<String> options = []
+    ..addAll(baseOptions)
+    ..addAll(additionalOptions);
   print(
       '${outputPrefix}Command: ${Platform.resolvedExecutable} ${options.join(' ')}');
   Process process = await Process.start(Platform.resolvedExecutable, options,
diff --git a/pkg/compiler/tool/modular_test_suite.dart b/pkg/compiler/tool/modular_test_suite.dart
index 780c182..4d42ff3 100644
--- a/pkg/compiler/tool/modular_test_suite.dart
+++ b/pkg/compiler/tool/modular_test_suite.dart
@@ -36,42 +36,43 @@
         sdkRoot.resolve('tests/modular/'),
         'tests/modular',
         _options,
-        new IOPipeline([
+        IOPipeline([
           SourceToDillStep(),
-          ComputeClosedWorldStep(),
+          ModularAnalysisStep(),
+          ComputeClosedWorldStep(useModularAnalysis: true),
           GlobalAnalysisStep(),
           Dart2jsCodegenStep(codeId0),
           Dart2jsCodegenStep(codeId1),
           Dart2jsEmissionStep(),
           RunD8(),
         ], cacheSharedModules: true)),
-    // TODO(joshualitt) Delete this when we stop supporting this way of running
-    // the compiler.
     runSuite(
         sdkRoot.resolve('tests/modular/'),
         'tests/modular',
         _options,
-        new IOPipeline([
+        IOPipeline([
           SourceToDillStep(),
-          ComputeClosedWorldStep(),
+          ComputeClosedWorldStep(useModularAnalysis: false),
           LegacyGlobalAnalysisStep(),
           LegacyDart2jsCodegenStep(codeId0),
           LegacyDart2jsCodegenStep(codeId1),
           LegacyDart2jsEmissionStep(),
           RunD8(),
-        ], cacheSharedModules: true)),
+        ], cacheSharedModules: true))
   ]);
 }
 
-const dillId = const DataId("dill");
-const updatedDillId = const DataId("udill");
-const closedWorldId = const DataId("world");
-const globalDataId = const DataId("gdata");
-const codeId = const ShardsDataId("code", 2);
-const codeId0 = const ShardDataId(codeId, 0);
-const codeId1 = const ShardDataId(codeId, 1);
-const jsId = const DataId("js");
-const txtId = const DataId("txt");
+const dillId = DataId("dill");
+const modularUpdatedDillId = DataId("mdill");
+const modularDataId = DataId("mdata");
+const closedWorldId = DataId("world");
+const globalUpdatedDillId = DataId("gdill");
+const globalDataId = DataId("gdata");
+const codeId = ShardsDataId("code", 2);
+const codeId0 = ShardDataId(codeId, 0);
+const codeId1 = ShardDataId(codeId, 1);
+const jsId = DataId("js");
+const txtId = DataId("txt");
 
 String _packageConfigEntry(String name, Uri root,
     {Uri packageRoot, LanguageVersion version}) {
@@ -140,7 +141,7 @@
     // for these dummy entries..
     // TODO(joshualitt): Generate just the json file.
     var packagesJson = [];
-    var packagesContents = new StringBuffer();
+    var packagesContents = StringBuffer();
     if (module.isPackage) {
       packagesContents.write('${module.name}:${module.packageBase}\n');
       packagesJson.add(_packageConfigEntry(
@@ -232,10 +233,9 @@
   }
 }
 
-// Step that invokes the dart2js closed world computation.
-class ComputeClosedWorldStep implements IOModularStep {
+class ModularAnalysisStep implements IOModularStep {
   @override
-  List<DataId> get resultData => const [closedWorldId, updatedDillId];
+  List<DataId> get resultData => const [modularDataId, modularUpdatedDillId];
 
   @override
   bool get needsSources => false;
@@ -247,6 +247,69 @@
   List<DataId> get moduleDataNeeded => const [dillId];
 
   @override
+  bool get onlyOnMain => false;
+
+  @override
+  Future<void> execute(Module module, Uri root, ModuleDataToRelativeUri toUri,
+      List<String> flags) async {
+    if (_options.verbose) print("\nstep: modular analysis on $module");
+    Set<Module> transitiveDependencies = computeTransitiveDependencies(module);
+    Iterable<String> dillDependencies =
+        transitiveDependencies.map((m) => '${toUri(m, dillId)}');
+    List<String> args = [
+      '--packages=${sdkRoot.toFilePath()}/.packages',
+      _dart2jsScript,
+      if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
+      '${toUri(module, dillId)}',
+      if (dillDependencies.isNotEmpty)
+        '--dill-dependencies=${dillDependencies.join(',')}',
+      '--out=${toUri(module, modularUpdatedDillId)}',
+      '${Flags.writeModularAnalysis}=${toUri(module, modularDataId)}',
+      for (String flag in flags) '--enable-experiment=$flag',
+    ];
+    var result =
+        await _runProcess(Platform.resolvedExecutable, args, root.toFilePath());
+
+    _checkExitCode(result, this, module);
+  }
+
+  @override
+  void notifyCached(Module module) {
+    if (_options.verbose) {
+      print("cached step: dart2js modular analysis on $module");
+    }
+  }
+}
+
+DataId idForDill({bool useModularAnalysis}) =>
+    useModularAnalysis ? modularUpdatedDillId : dillId;
+
+List<DataId> inputFromAnalysis({bool useModularAnalysis = false}) => [
+      idForDill(useModularAnalysis: useModularAnalysis),
+      if (useModularAnalysis) modularDataId,
+    ];
+
+// Step that invokes the dart2js closed world computation.
+class ComputeClosedWorldStep implements IOModularStep {
+  final bool useModularAnalysis;
+
+  ComputeClosedWorldStep({this.useModularAnalysis});
+
+  @override
+  List<DataId> get resultData => const [closedWorldId, globalUpdatedDillId];
+
+  @override
+  bool get needsSources => false;
+
+  @override
+  List<DataId> get dependencyDataNeeded =>
+      inputFromAnalysis(useModularAnalysis: useModularAnalysis);
+
+  @override
+  List<DataId> get moduleDataNeeded =>
+      inputFromAnalysis(useModularAnalysis: useModularAnalysis);
+
+  @override
   bool get onlyOnMain => true;
 
   @override
@@ -255,8 +318,13 @@
     if (_options.verbose)
       print("\nstep: dart2js compute closed world on $module");
     Set<Module> transitiveDependencies = computeTransitiveDependencies(module);
+    DataId dillId = idForDill(useModularAnalysis: useModularAnalysis);
     Iterable<String> dillDependencies =
         transitiveDependencies.map((m) => '${toUri(m, dillId)}');
+    List<String> dataDependencies = transitiveDependencies
+        .map((m) => '${toUri(m, modularDataId)}')
+        .toList();
+    dataDependencies.add('${toUri(module, modularDataId)}');
     List<String> args = [
       '--packages=${sdkRoot.toFilePath()}/.packages',
       _dart2jsScript,
@@ -265,8 +333,10 @@
       '${toUri(module, dillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.dillDependencies}=${dillDependencies.join(',')}',
+      if (useModularAnalysis)
+        '${Flags.readModularAnalysis}=${dataDependencies.join(',')}',
       '${Flags.writeClosedWorld}=${toUri(module, closedWorldId)}',
-      '--out=${toUri(module, updatedDillId)}',
+      '--out=${toUri(module, globalUpdatedDillId)}',
     ];
     var result =
         await _runProcess(Platform.resolvedExecutable, args, root.toFilePath());
@@ -281,8 +351,7 @@
   }
 }
 
-// Step that invokes the dart2js global analysis on the main module by providing
-// the .dill files of all transitive modules as inputs.
+// Step that runs the dart2js modular analysis.
 class GlobalAnalysisStep implements IOModularStep {
   @override
   List<DataId> get resultData => const [globalDataId];
@@ -291,10 +360,11 @@
   bool get needsSources => false;
 
   @override
-  List<DataId> get dependencyDataNeeded => const [updatedDillId];
+  List<DataId> get dependencyDataNeeded => const [globalUpdatedDillId];
 
   @override
-  List<DataId> get moduleDataNeeded => const [closedWorldId, updatedDillId];
+  List<DataId> get moduleDataNeeded =>
+      const [closedWorldId, globalUpdatedDillId];
 
   @override
   bool get onlyOnMain => true;
@@ -308,7 +378,7 @@
       _dart2jsScript,
       // TODO(sigmund): remove this dependency on libraries.json
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.readClosedWorld}=${toUri(module, closedWorldId)}',
       '${Flags.writeData}=${toUri(module, globalDataId)}',
@@ -347,7 +417,7 @@
 
   @override
   List<DataId> get moduleDataNeeded =>
-      const [updatedDillId, closedWorldId, globalDataId];
+      const [globalUpdatedDillId, closedWorldId, globalDataId];
 
   @override
   bool get onlyOnMain => true;
@@ -360,7 +430,7 @@
       '--packages=${sdkRoot.toFilePath()}/.packages',
       _dart2jsScript,
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.readClosedWorld}=${toUri(module, closedWorldId)}',
       '${Flags.readData}=${toUri(module, globalDataId)}',
@@ -393,8 +463,13 @@
   List<DataId> get dependencyDataNeeded => const [];
 
   @override
-  List<DataId> get moduleDataNeeded =>
-      const [updatedDillId, closedWorldId, globalDataId, codeId0, codeId1];
+  List<DataId> get moduleDataNeeded => const [
+        globalUpdatedDillId,
+        closedWorldId,
+        globalDataId,
+        codeId0,
+        codeId1
+      ];
 
   @override
   bool get onlyOnMain => true;
@@ -407,7 +482,7 @@
       '--packages=${sdkRoot.toFilePath()}/.packages',
       _dart2jsScript,
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '${Flags.enableLanguageExperiments}=$flag',
       '${Flags.readClosedWorld}=${toUri(module, closedWorldId)}',
       '${Flags.readData}=${toUri(module, globalDataId)}',
@@ -436,10 +511,11 @@
   bool get needsSources => false;
 
   @override
-  List<DataId> get dependencyDataNeeded => const [updatedDillId];
+  List<DataId> get dependencyDataNeeded => const [globalUpdatedDillId];
 
   @override
-  List<DataId> get moduleDataNeeded => const [closedWorldId, updatedDillId];
+  List<DataId> get moduleDataNeeded =>
+      const [closedWorldId, globalUpdatedDillId];
 
   @override
   bool get onlyOnMain => true;
@@ -453,7 +529,7 @@
       _dart2jsScript,
       // TODO(sigmund): remove this dependency on libraries.json
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.readClosedWorld}=${toUri(module, closedWorldId)}',
       '${Flags.writeData}=${toUri(module, globalDataId)}',
@@ -490,7 +566,8 @@
   List<DataId> get dependencyDataNeeded => const [];
 
   @override
-  List<DataId> get moduleDataNeeded => const [updatedDillId, globalDataId];
+  List<DataId> get moduleDataNeeded =>
+      const [globalUpdatedDillId, globalDataId];
 
   @override
   bool get onlyOnMain => true;
@@ -503,7 +580,7 @@
       '--packages=${sdkRoot.toFilePath()}/.packages',
       _dart2jsScript,
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '--enable-experiment=$flag',
       '${Flags.readData}=${toUri(module, globalDataId)}',
       '${Flags.writeCodegen}=${toUri(module, codeId.dataId)}',
@@ -537,7 +614,7 @@
 
   @override
   List<DataId> get moduleDataNeeded =>
-      const [updatedDillId, globalDataId, codeId0, codeId1];
+      const [globalUpdatedDillId, globalDataId, codeId0, codeId1];
 
   @override
   bool get onlyOnMain => true;
@@ -550,7 +627,7 @@
       '--packages=${sdkRoot.toFilePath()}/.packages',
       _dart2jsScript,
       if (_options.useSdk) '--libraries-spec=$_librarySpecForSnapshot',
-      '${toUri(module, updatedDillId)}',
+      '${toUri(module, globalUpdatedDillId)}',
       for (String flag in flags) '${Flags.enableLanguageExperiments}=$flag',
       '${Flags.readData}=${toUri(module, globalDataId)}',
       '${Flags.readCodegen}=${toUri(module, codeId)}',
@@ -639,7 +716,7 @@
   } else if (Platform.isMacOS) {
     return 'third_party/d8/macos/d8';
   }
-  throw new UnsupportedError('Unsupported platform.');
+  throw UnsupportedError('Unsupported platform.');
 }
 
 class ShardsDataId implements DataId {
diff --git a/pkg/compiler/tool/track_memory.dart b/pkg/compiler/tool/track_memory.dart
index c5c2d03..a07d3e9 100644
--- a/pkg/compiler/tool/track_memory.dart
+++ b/pkg/compiler/tool/track_memory.dart
@@ -167,7 +167,12 @@
 
 const mega = 1024 * 1024;
 _writeNumber(sb, before, now, {color: false}) {
-  if (color) sb.write(before < now ? _RED : before > now ? _GREEN : '');
+  if (color)
+    sb.write(before < now
+        ? _RED
+        : before > now
+            ? _GREEN
+            : '');
   var string;
   if (now < 1024) {
     string = ' ${now}b';
diff --git a/pkg/dart2js_info/tool/update_proto.sh b/pkg/dart2js_info/tool/update_proto.sh
index c784edd..559f87d 100755
--- a/pkg/dart2js_info/tool/update_proto.sh
+++ b/pkg/dart2js_info/tool/update_proto.sh
@@ -10,4 +10,4 @@
 fi
 
 protoc --proto_path="." --dart_out=lib/src/proto info.proto
-dartfmt -w lib/src/proto
+dart format lib/src/proto
diff --git a/pkg/dartdev/README.md b/pkg/dartdev/README.md
index 6679562..7ad5057 100644
--- a/pkg/dartdev/README.md
+++ b/pkg/dartdev/README.md
@@ -36,6 +36,6 @@
 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
+[contributing]: https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md
+[design] https://github.com/dart-lang/sdk/blob/main/pkg/dartdev/doc/design.md
 [tracker]: https://github.com/dart-lang/sdk/labels/area-dart-cli
diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart
index c50d7d0..73cf9c2 100644
--- a/pkg/dartdev/lib/dartdev.dart
+++ b/pkg/dartdev/lib/dartdev.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Do not call exit() directly. Use VmInteropHandler.exit() instead.
+import 'dart:async';
 import 'dart:io' as io hide exit;
 import 'dart:isolate';
 
@@ -10,20 +11,19 @@
 import 'package:args/command_runner.dart';
 import 'package:cli_util/cli_logging.dart';
 import 'package:dart_style/src/cli/format_command.dart';
-import 'package:dartdev/src/commands/migrate.dart';
 import 'package:devtools_server/devtools_server.dart';
 import 'package:meta/meta.dart';
-import 'package:pedantic/pedantic.dart';
 import 'package:pub/pub.dart';
-
 import 'package:usage/usage.dart';
 
 import 'src/analytics.dart';
 import 'src/commands/analyze.dart';
 import 'src/commands/compile.dart';
 import 'src/commands/create.dart';
+import 'src/commands/debug_adapter.dart';
 import 'src/commands/fix.dart';
 import 'src/commands/language_server.dart';
+import 'src/commands/migrate.dart';
 import 'src/commands/run.dart';
 import 'src/commands/test.dart';
 import 'src/core.dart';
@@ -112,6 +112,7 @@
 
     addCommand(AnalyzeCommand(verbose: verbose));
     addCommand(CreateCommand(verbose: verbose));
+    addCommand(DebugAdapterCommand(verbose: verbose));
     addCommand(CompileCommand(verbose: verbose));
     addCommand(DevToolsCommand(
       verbose: verbose,
diff --git a/pkg/dartdev/lib/src/commands/compile.dart b/pkg/dartdev/lib/src/commands/compile.dart
index 6c3269d..140b083 100644
--- a/pkg/dartdev/lib/src/commands/compile.dart
+++ b/pkg/dartdev/lib/src/commands/compile.dart
@@ -261,6 +261,13 @@
         !Sdk.checkArtifactExists(genSnapshot)) {
       return 255;
     }
+    // AOT compilation isn't supported on ia32. Currently, generating an
+    // executable only supports AOT runtimes, so these commands are disabled.
+    if (Platform.version.contains('ia32')) {
+      stderr.write(
+          "'dart compile $format' is not supported on x86 architectures");
+      return 64;
+    }
     // We expect a single rest argument; the dart entry point.
     if (argResults.rest.length != 1) {
       // This throws.
diff --git a/pkg/dartdev/lib/src/commands/debug_adapter.dart b/pkg/dartdev/lib/src/commands/debug_adapter.dart
new file mode 100644
index 0000000..e1a87b5
--- /dev/null
+++ b/pkg/dartdev/lib/src/commands/debug_adapter.dart
@@ -0,0 +1,72 @@
+// 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.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:dds/dap.dart';
+
+import '../core.dart';
+
+/// A command to start a debug adapter process that communicates over
+/// stdin/stdout using the Debug Adapter Protocol to allow editors to run debug
+/// sessions in a standard way.
+class DebugAdapterCommand extends DartdevCommand {
+  static const String cmdName = 'debug_adapter';
+
+  static const argIpv6 = 'ipv6';
+  static const argDds = 'dds';
+  static const argAuthCodes = 'auth-codes';
+  static const argTest = 'test';
+
+  DebugAdapterCommand({bool verbose = false})
+      : super(
+          cmdName,
+          'Start a debug adapter that conforms to the Debug Adapter Protocol.',
+          verbose,
+          hidden: true,
+        ) {
+    argParser
+      ..addFlag(
+        argIpv6,
+        defaultsTo: false,
+        help: 'Whether to bind DAP/VM Service/DDS to IPv6 addresses.',
+      )
+      ..addFlag(
+        argDds,
+        defaultsTo: true,
+        help: 'Whether to enable DDS for debug sessions.',
+      )
+      ..addFlag(
+        argAuthCodes,
+        defaultsTo: true,
+        help: 'Whether to enable authentication codes for VM Services.',
+      )
+      ..addFlag(
+        argTest,
+        defaultsTo: false,
+        help: 'Whether to use the "dart test" debug adapter to run tests'
+            ' and emit custom events for test progress/results.',
+      );
+  }
+
+  @override
+  FutureOr<int> run() async {
+    final args = argResults;
+    final ipv6 = args[argIpv6] as bool;
+
+    final server = DapServer(
+      stdin,
+      stdout.nonBlocking,
+      ipv6: ipv6,
+      enableDds: args[argDds],
+      enableAuthCodes: args[argAuthCodes],
+      test: args[argTest],
+    );
+
+    await server.channel.closed;
+
+    return 0;
+  }
+}
diff --git a/pkg/dartdev/lib/src/commands/language_server.dart b/pkg/dartdev/lib/src/commands/language_server.dart
index 2821682..6de3df3 100644
--- a/pkg/dartdev/lib/src/commands/language_server.dart
+++ b/pkg/dartdev/lib/src/commands/language_server.dart
@@ -22,7 +22,7 @@
 
 For more information about the server's capabilities and configuration, see:
 
-  https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server''';
+  https://github.com/dart-lang/sdk/tree/main/pkg/analysis_server''';
 
   LanguageServerCommand({bool verbose = false})
       : super(commandName, commandDescription, verbose, hidden: !verbose);
diff --git a/pkg/dartdev/lib/src/commands/run.dart b/pkg/dartdev/lib/src/commands/run.dart
index 22e9e1a..ace7285 100644
--- a/pkg/dartdev/lib/src/commands/run.dart
+++ b/pkg/dartdev/lib/src/commands/run.dart
@@ -165,6 +165,12 @@
         negatable: false,
         help: 'Enables tracing of library and script loading.',
       )
+      ..addFlag('dds',
+          hide: !verbose,
+          help: 'Use the Dart Development Service (DDS) for enhanced debugging '
+              'functionality. Note: Disabling DDS may break some functionality '
+              'in IDEs and other tooling.',
+          defaultsTo: true)
       ..addFlag(
         'debug-dds',
         hide: true,
diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml
index 5f509c2..9fbdb4b 100644
--- a/pkg/dartdev/pubspec.yaml
+++ b/pkg/dartdev/pubspec.yaml
@@ -17,6 +17,8 @@
   dart2native:
     path: ../dart2native
   dart_style: any
+  dds:
+    path: ../dds
   devtools_server: any
   front_end:
     path: ../front_end
@@ -26,7 +28,6 @@
   nnbd_migration:
     path: ../nnbd_migration
   path: any
-  pedantic: any
   pub: any
   telemetry:
     path: ../telemetry
diff --git a/pkg/dartdev/test/commands/compile_test.dart b/pkg/dartdev/test/commands/compile_test.dart
index 4bf62f0..be43ac7 100644
--- a/pkg/dartdev/test/commands/compile_test.dart
+++ b/pkg/dartdev/test/commands/compile_test.dart
@@ -20,6 +20,7 @@
     'Info: Compiling without sound null safety';
 
 void defineCompileTests() {
+  final isRunningOnIA32 = Platform.version.contains('ia32');
   // *** NOTE ***: These tests *must* be run with the `--use-sdk` option
   // as they depend on a fully built SDK to resolve various snapshot files
   // used by compilation.
@@ -51,6 +52,12 @@
         'Usage: dart compile <subcommand> [arguments]',
       ),
     );
+
+    expect(result.stdout, contains('jit-snapshot'));
+    expect(result.stdout, contains('kernel'));
+    expect(result.stdout, contains('js'));
+    expect(result.stdout, contains('aot-snapshot'));
+    expect(result.stdout, contains('exe'));
     expect(result.exitCode, 0);
   });
 
@@ -118,7 +125,41 @@
     expect(result.stdout, contains('I love executables'));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
+
+  test('Compile to executable disabled on IA32', () {
+    final p = project(mainSrc: 'void main() { print("I love executables"); }');
+    final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
+
+    var result = p.runSync(
+      [
+        'compile',
+        'exe',
+        inFile,
+      ],
+    );
+
+    expect(result.stderr,
+        "'dart compile exe' is not supported on x86 architectures");
+    expect(result.exitCode, 64);
+  }, skip: !isRunningOnIA32);
+
+  test('Compile to AOT snapshot disabled on IA32', () {
+    final p = project(mainSrc: 'void main() { print("I love executables"); }');
+    final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
+
+    var result = p.runSync(
+      [
+        'compile',
+        'aot-snapshot',
+        inFile,
+      ],
+    );
+
+    expect(result.stderr,
+        "'dart compile aot-snapshot' is not supported on x86 architectures");
+    expect(result.exitCode, 64);
+  }, skip: !isRunningOnIA32);
 
   test('Compile and run executable with options', () {
     final p = project(
@@ -151,7 +192,7 @@
     expect(result.stdout, contains('42'));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile and run aot snapshot', () {
     final p = project(mainSrc: 'void main() { print("I love AOT"); }');
@@ -182,7 +223,7 @@
     expect(result.stdout, contains('I love AOT'));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile and run kernel snapshot', () {
     final p = project(mainSrc: 'void main() { print("I love kernel"); }');
@@ -266,7 +307,7 @@
     expect(result.exitCode, compileErrorExitCode);
     expect(File(outFile).existsSync(), false,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile exe with warnings', () {
     final p = project(mainSrc: '''
@@ -293,7 +334,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile exe with sound null safety', () {
     final p = project(mainSrc: '''void main() {}''');
@@ -315,7 +356,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile exe with unsound null safety', () {
     final p = project(mainSrc: '''
@@ -340,7 +381,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile and run exe with --sound-null-safety', () {
     final p = project(mainSrc: '''void main() {
@@ -374,7 +415,7 @@
     expect(result.stdout, contains('sound'));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile and run exe with --no-sound-null-safety', () {
     final p = project(mainSrc: '''void main() {
@@ -408,7 +449,7 @@
     expect(result.stdout, contains('unsound'));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile exe without info', () {
     final p = project(mainSrc: '''void main() {}''');
@@ -432,7 +473,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile exe without warnings', () {
     final p = project(mainSrc: '''
@@ -459,7 +500,7 @@
         predicate((o) => !'$o'.contains(soundNullSafetyMessage)));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile JS with sound null safety', () {
     final p = project(mainSrc: '''void main() {}''');
@@ -579,7 +620,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile AOT snapshot with unsound null safety', () {
     final p = project(mainSrc: '''
@@ -604,7 +645,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile AOT snapshot without info', () {
     final p = project(mainSrc: '''void main() {}''');
@@ -628,7 +669,7 @@
     expect(result.exitCode, 0);
     expect(File(outFile).existsSync(), true,
         reason: 'File not found: $outFile');
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile AOT snapshot without warnings', () {
     final p = project(mainSrc: '''
@@ -655,7 +696,7 @@
         predicate((o) => !'$o'.contains(soundNullSafetyMessage)));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile AOT snapshot with warnings', () {
     final p = project(mainSrc: '''
@@ -683,7 +724,7 @@
     expect(result.stdout, contains('Warning: '));
     expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
-  });
+  }, skip: isRunningOnIA32);
 
   test('Compile kernel with invalid trailing argument', () {
     final p = project(mainSrc: '''void main() {}''');
diff --git a/pkg/dartdev/test/commands/debug_adapter_test.dart b/pkg/dartdev/test/commands/debug_adapter_test.dart
new file mode 100644
index 0000000..c21f476
--- /dev/null
+++ b/pkg/dartdev/test/commands/debug_adapter_test.dart
@@ -0,0 +1,29 @@
+// 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.
+
+import 'package:test/test.dart';
+
+import '../utils.dart';
+
+void main() {
+  group('debug_adapter', debugAdapter, timeout: longTimeout);
+}
+
+void debugAdapter() {
+  // Implementation of debug_adapter is tested in the DDS package where the
+  // DAP implementation lives.
+  test('--help', () {
+    final p = project();
+    var result = p.runSync(['debug_adapter', '--help']);
+
+    expect(
+        result.stdout,
+        contains(
+            'Start a debug adapter that conforms to the Debug Adapter Protocol.'));
+    expect(result.stdout,
+        contains('Whether to use the "dart test" debug adapter to run tests'));
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+}
diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart
index 45eb00c..613a508 100644
--- a/pkg/dartdev/test/commands/run_test.dart
+++ b/pkg/dartdev/test/commands/run_test.dart
@@ -12,6 +12,9 @@
 import '../utils.dart';
 
 const String soundNullSafetyMessage = 'Info: Compiling with sound null safety';
+const devToolsMessagePrefix =
+    'The Dart DevTools debugger and profiler is available at: http://127.0.0.1:';
+const observatoryMessagePrefix = 'Observatory listening on http://127.0.0.1:';
 
 void main() {
   group('run', run, timeout: longTimeout);
@@ -347,10 +350,59 @@
     expect(result.exitCode, 0);
   });
 
-  group('DevTools', () {
-    const devToolsMessagePrefix =
-        'The Dart DevTools debugger and profiler is available at: http://127.0.0.1:';
+  group('DDS', () {
+    group('disable', () {
+      test('dart run simple', () {
+        p = project(mainSrc: "void main() { print('Hello World'); }");
+        ProcessResult result = p.runSync([
+          'run',
+          '--no-dds',
+          '--enable-vm-service',
+          p.relativeFilePath,
+        ]);
+        expect(result.stdout, isNot(contains(devToolsMessagePrefix)));
+        expect(result.stdout, contains(observatoryMessagePrefix));
+      });
 
+      test('dart simple', () {
+        p = project(mainSrc: "void main() { print('Hello World'); }");
+        ProcessResult result = p.runSync([
+          '--no-dds',
+          '--enable-vm-service',
+          p.relativeFilePath,
+        ]);
+        expect(result.stdout, isNot(contains(devToolsMessagePrefix)));
+        expect(result.stdout, contains(observatoryMessagePrefix));
+      });
+    });
+
+    group('explicit enable', () {
+      test('dart run simple', () {
+        p = project(mainSrc: "void main() { print('Hello World'); }");
+        ProcessResult result = p.runSync([
+          'run',
+          '--dds',
+          '--enable-vm-service',
+          p.relativeFilePath,
+        ]);
+        expect(result.stdout, contains(devToolsMessagePrefix));
+        expect(result.stdout, contains(observatoryMessagePrefix));
+      });
+
+      test('dart simple', () {
+        p = project(mainSrc: "void main() { print('Hello World'); }");
+        ProcessResult result = p.runSync([
+          '--dds',
+          '--enable-vm-service',
+          p.relativeFilePath,
+        ]);
+        expect(result.stdout, contains(devToolsMessagePrefix));
+        expect(result.stdout, contains(observatoryMessagePrefix));
+      });
+    });
+  });
+
+  group('DevTools', () {
     test('dart run simple', () async {
       p = project(mainSrc: "void main() { print('Hello World'); }");
       ProcessResult result = p.runSync([
diff --git a/pkg/dartdev/test/smoke/smoke_test.dart b/pkg/dartdev/test/smoke/smoke_test.dart
index 17abdc3..7b1c688 100644
--- a/pkg/dartdev/test/smoke/smoke_test.dart
+++ b/pkg/dartdev/test/smoke/smoke_test.dart
@@ -54,7 +54,7 @@
       // This test verifies that an error isn't thrown when a valid experiment
       // is passed.
       // Experiments are lists here:
-      // https://github.com/dart-lang/sdk/blob/master/tools/experimental_features.yaml
+      // https://github.com/dart-lang/sdk/blob/main/tools/experimental_features.yaml
       test(
           'dart --enable-experiment=variance '
           'run smoke.dart', () async {
diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md
index 953e36b..15f499b 100644
--- a/pkg/dds/CHANGELOG.md
+++ b/pkg/dds/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 2.1.3
+- Ensure cancelling multiple historical streams with the same name doesn't cause an
+  asynchronous `StateError` to be thrown.
+
 # 2.1.2
 - Silently handle exceptions that occur within RPC request handlers.
 
diff --git a/pkg/dds/README.md b/pkg/dds/README.md
index ec3567b..ef1be7d 100644
--- a/pkg/dds/README.md
+++ b/pkg/dds/README.md
@@ -33,4 +33,4 @@
 ```
 
 [dds-protocol]: dds_protocol.md
-[service-protocol]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md
+[service-protocol]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md
diff --git a/pkg/dds/dds_protocol.md b/pkg/dds/dds_protocol.md
index 48ac4c1..6563543 100644
--- a/pkg/dds/dds_protocol.md
+++ b/pkg/dds/dds_protocol.md
@@ -282,17 +282,17 @@
 1.2 | Added `getStreamHistory` RPC.
 1.3 | Added `getAvailableCachedCpuSamples` and `getCachedCpuSamples` RPCs.
 
-[resume]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#resume
-[success]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#success
-[version]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#version
-[cpu-samples]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#cpusamples
+[resume]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#resume
+[success]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#success
+[version]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#version
+[cpu-samples]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#cpusamples
 
-[service-protocol]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md
-[service-protocol-rpcs-requests-and-responses]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#rpcs-requests-and-responses
-[service-protocol-events]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#events
-[service-protocol-streams]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#streamlisten
-[service-protocol-binary-events]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#binary-events
-[service-protocol-types]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#types
-[service-protocol-ids-and-names]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#ids-and-names
-[service-protocol-public-rpcs]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#public-rpcs
-[service-protocol-public-types]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#public-types
+[service-protocol]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md
+[service-protocol-rpcs-requests-and-responses]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#rpcs-requests-and-responses
+[service-protocol-events]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#events
+[service-protocol-streams]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#streamlisten
+[service-protocol-binary-events]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#binary-events
+[service-protocol-types]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#types
+[service-protocol-ids-and-names]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#ids-and-names
+[service-protocol-public-rpcs]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#public-rpcs
+[service-protocol-public-types]: https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md#public-types
diff --git a/pkg/dds/lib/dap.dart b/pkg/dds/lib/dap.dart
new file mode 100644
index 0000000..792e9dd
--- /dev/null
+++ b/pkg/dds/lib/dap.dart
@@ -0,0 +1,13 @@
+// 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.
+
+export 'src/dap/adapters/dart.dart';
+export 'src/dap/adapters/mixins.dart';
+export 'src/dap/exceptions.dart';
+export 'src/dap/logging.dart';
+export 'src/dap/protocol_common.dart';
+export 'src/dap/protocol_generated.dart';
+export 'src/dap/protocol_stream.dart';
+export 'src/dap/server.dart' show DapServer;
+export 'src/dap/stream_transformers.dart';
diff --git a/pkg/dds/lib/src/dap/adapters/dart.dart b/pkg/dds/lib/src/dap/adapters/dart.dart
index 5099eef..cc0e49a 100644
--- a/pkg/dds/lib/src/dap/adapters/dart.dart
+++ b/pkg/dds/lib/src/dap/adapters/dart.dart
@@ -67,22 +67,17 @@
 /// Pattern for a trailing semicolon.
 final _trailingSemicolonPattern = RegExp(r';$');
 
-/// An implementation of [LaunchRequestArguments] that includes all fields used
+/// An implementation of [AttachRequestArguments] that includes all fields used
 /// by the base Dart debug adapter.
 ///
 /// This class represents the data passed from the client editor to the debug
-/// adapter in launchRequest, which is a request to start debugging an
+/// adapter in attachRequest, which is a request to start debugging an
 /// application.
 ///
-/// Specialised adapters (such as Flutter) will likely extend this class with
-/// their own additional fields.
+/// Specialised adapters (such as Flutter) will likely have their own versions
+/// of this class.
 class DartAttachRequestArguments extends DartCommonLaunchAttachRequestArguments
     implements AttachRequestArguments {
-  /// Optional data from the previous, restarted session.
-  /// The data is sent as the 'restart' attribute of the 'terminated' event.
-  /// The client should leave the data intact.
-  final Object? restart;
-
   /// The VM Service URI to attach to.
   ///
   /// Either this or [vmServiceInfoFile] must be supplied.
@@ -94,9 +89,9 @@
   final String? vmServiceInfoFile;
 
   DartAttachRequestArguments({
-    this.restart,
     this.vmServiceUri,
     this.vmServiceInfoFile,
+    Object? restart,
     String? name,
     String? cwd,
     List<String>? additionalProjectPaths,
@@ -108,6 +103,7 @@
   }) : super(
           name: name,
           cwd: cwd,
+          restart: restart,
           additionalProjectPaths: additionalProjectPaths,
           debugSdkLibraries: debugSdkLibraries,
           debugExternalPackageLibraries: debugExternalPackageLibraries,
@@ -117,15 +113,13 @@
         );
 
   DartAttachRequestArguments.fromMap(Map<String, Object?> obj)
-      : restart = obj['restart'],
-        vmServiceUri = obj['vmServiceUri'] as String?,
+      : vmServiceUri = obj['vmServiceUri'] as String?,
         vmServiceInfoFile = obj['vmServiceInfoFile'] as String?,
         super.fromMap(obj);
 
   @override
   Map<String, Object?> toJson() => {
         ...super.toJson(),
-        if (restart != null) 'restart': restart,
         if (vmServiceUri != null) 'vmServiceUri': vmServiceUri,
         if (vmServiceInfoFile != null) 'vmServiceInfoFile': vmServiceInfoFile,
       };
@@ -137,6 +131,11 @@
 /// A common base for [DartLaunchRequestArguments] and
 /// [DartAttachRequestArguments] for fields that are common to both.
 class DartCommonLaunchAttachRequestArguments extends RequestArguments {
+  /// Optional data from the previous, restarted session.
+  /// The data is sent as the 'restart' attribute of the 'terminated' event.
+  /// The client should leave the data intact.
+  final Object? restart;
+
   final String? name;
   final String? cwd;
 
@@ -187,6 +186,7 @@
   final bool? sendLogsToClient;
 
   DartCommonLaunchAttachRequestArguments({
+    required this.restart,
     required this.name,
     required this.cwd,
     required this.additionalProjectPaths,
@@ -198,7 +198,8 @@
   });
 
   DartCommonLaunchAttachRequestArguments.fromMap(Map<String, Object?> obj)
-      : name = obj['name'] as String?,
+      : restart = obj['restart'],
+        name = obj['name'] as String?,
         cwd = obj['cwd'] as String?,
         additionalProjectPaths =
             (obj['additionalProjectPaths'] as List?)?.cast<String>(),
@@ -212,6 +213,7 @@
         sendLogsToClient = obj['sendLogsToClient'] as bool?;
 
   Map<String, Object?> toJson() => {
+        if (restart != null) 'restart': restart,
         if (name != null) 'name': name,
         if (cwd != null) 'cwd': cwd,
         if (additionalProjectPaths != null)
@@ -263,8 +265,8 @@
 /// an expression into an evaluation console) or to events sent by the server
 /// (for example when the server sends a `StoppedEvent` it may cause the client
 /// to then send a `stackTraceRequest` or `scopesRequest` to get variables).
-abstract class DartDebugAdapter<TL extends DartLaunchRequestArguments,
-    TA extends DartAttachRequestArguments> extends BaseDebugAdapter<TL, TA> {
+abstract class DartDebugAdapter<TL extends LaunchRequestArguments,
+    TA extends AttachRequestArguments> extends BaseDebugAdapter<TL, TA> {
   late final DartCommonLaunchAttachRequestArguments args;
   final _debuggerInitializedCompleter = Completer<void>();
   final _configurationDoneCompleter = Completer<void>();
@@ -359,6 +361,8 @@
     this.enableAuthCodes = true,
     this.logger,
   }) : super(channel) {
+    channel.closed.then((_) => shutdown());
+
     _isolateManager = IsolateManager(this);
     _converter = ProtocolConverter(this);
   }
@@ -378,6 +382,14 @@
   /// `null` if the `initialize` request has not yet been made.
   InitializeRequestArguments? get initializeArgs => _initializeArgs;
 
+  /// Whether or not this adapter can handle the restartRequest.
+  ///
+  /// If false, the editor will just terminate the debug session and start a new
+  /// one when the user asks to restart. If true, the adapter must implement
+  /// the [restartRequest] method and handle its own restart (for example the
+  /// Flutter adapter will perform a Hot Restart).
+  bool get supportsRestartRequest => false;
+
   /// Whether the VM Service closing should be used as a signal to terminate the
   /// debug session.
   ///
@@ -407,7 +419,7 @@
     TA args,
     void Function() sendResponse,
   ) async {
-    this.args = args;
+    this.args = args as DartCommonLaunchAttachRequestArguments;
     isAttach = true;
     _subscribeToOutputStreams = true;
 
@@ -480,7 +492,7 @@
       logger?.call('Starting a DDS instance for $uri');
       try {
         final dds = await DartDevelopmentService.startDartDevelopmentService(
-          uri,
+          vmServiceUriToHttp(uri),
           enableAuthCodes: enableAuthCodes,
           ipv6: ipv6,
         );
@@ -492,13 +504,13 @@
         // instance.
         if (e.errorCode ==
             DartDevelopmentServiceException.existingDdsInstanceError) {
-          uri = _cleanVmServiceUri(uri);
+          uri = vmServiceUriToWebSocket(uri);
         } else {
           rethrow;
         }
       }
     } else {
-      uri = _cleanVmServiceUri(uri);
+      uri = vmServiceUriToWebSocket(uri);
     }
 
     logger?.call('Connecting to debugger at $uri');
@@ -506,21 +518,25 @@
     final vmService = await _vmServiceConnectUri(uri.toString());
     logger?.call('Connected to debugger at $uri!');
 
-    // TODO(dantup): VS Code currently depends on a custom dart.debuggerUris
-    // event to notify it of VM Services that become available (for example to
-    // register with the DevTools server). If this is still required, it will
-    // need implementing here (and also documented as a customisation and
-    // perhaps gated on a capability/argument).
+    // Send a custom event with the VM Service URI as the editor might want to
+    // know about this (for example so it can connect an embedded DevTools to
+    // this app).
+    sendEvent(
+      RawEventBody({
+        'vmServiceUri': uri.toString(),
+      }),
+      eventType: 'dart.debuggerUris',
+    );
+
     this.vmService = vmService;
 
     unawaited(vmService.onDone.then((_) => _handleVmServiceClosed()));
     _subscriptions.addAll([
-      vmService.onIsolateEvent.listen(_handleIsolateEvent),
-      vmService.onDebugEvent.listen(_handleDebugEvent),
-      vmService.onLoggingEvent.listen(_handleLoggingEvent),
-      // TODO(dantup): Implement these.
-      // vmService.onExtensionEvent.listen(_handleExtensionEvent),
-      // vmService.onServiceEvent.listen(_handleServiceEvent),
+      vmService.onIsolateEvent.listen(handleIsolateEvent),
+      vmService.onDebugEvent.listen(handleDebugEvent),
+      vmService.onLoggingEvent.listen(handleLoggingEvent),
+      vmService.onExtensionEvent.listen(handleExtensionEvent),
+      vmService.onServiceEvent.listen(handleServiceEvent),
       if (_subscribeToOutputStreams)
         vmService.onStdoutEvent.listen(_handleStdoutEvent),
       if (_subscribeToOutputStreams)
@@ -530,8 +546,8 @@
       vmService.streamListen(vm.EventStreams.kIsolate),
       vmService.streamListen(vm.EventStreams.kDebug),
       vmService.streamListen(vm.EventStreams.kLogging),
-      // vmService.streamListen(vm.EventStreams.kExtension),
-      // vmService.streamListen(vm.EventStreams.kService),
+      vmService.streamListen(vm.EventStreams.kExtension),
+      vmService.streamListen(vm.EventStreams.kService),
       vmService.streamListen(vm.EventStreams.kStdout),
       vmService.streamListen(vm.EventStreams.kStderr),
     ]);
@@ -633,6 +649,24 @@
         sendResponse(null);
         break;
 
+      /// Allows an editor to call a service/service extension that it was told
+      /// about via a custom 'dart.serviceRegistered' or
+      /// 'dart.serviceExtensionAdded' event.
+      case 'callService':
+        final method = args?.args['method'] as String?;
+        if (method == null) {
+          throw DebugAdapterException(
+            'Method is required to call services/service extensions',
+          );
+        }
+        final params = args?.args['params'] as Map<String, Object?>?;
+        final response = await vmService?.callServiceExtension(
+          method,
+          args: params,
+        );
+        sendResponse(response?.json);
+        break;
+
       default:
         await super.customRequest(request, args, sendResponse);
     }
@@ -848,6 +882,7 @@
       supportsDelayedStackTraceLoading: true,
       supportsEvaluateForHovers: true,
       supportsLogPoints: true,
+      supportsRestartRequest: supportsRestartRequest,
       // TODO(dantup): All of these...
       // supportsRestartFrame: true,
       supportsTerminateRequest: true,
@@ -903,7 +938,7 @@
     TL args,
     void Function() sendResponse,
   ) async {
-    this.args = args;
+    this.args = args as DartCommonLaunchAttachRequestArguments;
     isAttach = false;
 
     // Common setup.
@@ -947,6 +982,23 @@
   /// not in the package mapping file.
   String? resolvePackageUri(Uri uri) => _converter.resolvePackageUri(uri);
 
+  /// restart is called by the client when the user invokes a restart (for
+  /// example with the button on the debug toolbar).
+  ///
+  /// The base implementation of this method throws. It is up to a debug adapter
+  /// that advertises `supportsRestartRequest` to override this method.
+  @override
+  Future<void> restartRequest(
+    Request request,
+    RestartArguments? args,
+    void Function() sendResponse,
+  ) async {
+    throw DebugAdapterException(
+      'restartRequest was called on an adapter that '
+      'does not provide an implementation',
+    );
+  }
+
   /// [scopesRequest] is called by the client to request all of the variables
   /// scopes available for a given stack frame.
   @override
@@ -1417,11 +1469,25 @@
     sendResponse(VariablesResponseBody(variables: variables));
   }
 
+  /// Fixes up a VM Service WebSocket URI to not have a trailing /ws
+  /// and use the HTTP scheme which is what DDS expects.
+  Uri vmServiceUriToHttp(Uri uri) {
+    final isSecure = uri.isScheme('https') || uri.isScheme('wss');
+    uri = uri.replace(scheme: isSecure ? 'https' : 'http');
+
+    final segments = uri.pathSegments;
+    if (segments.isNotEmpty && segments.last == 'ws') {
+      uri = uri.replace(pathSegments: segments.take(segments.length - 1));
+    }
+
+    return uri;
+  }
+
   /// Fixes up an Observatory [uri] to a WebSocket URI with a trailing /ws
   /// for connecting when not using DDS.
   ///
   /// DDS does its own cleaning up of the URI.
-  Uri _cleanVmServiceUri(Uri uri) {
+  Uri vmServiceUriToWebSocket(Uri uri) {
     // The VM Service library always expects the WebSockets URI so fix the
     // scheme (http -> ws, https -> wss).
     final isSecure = uri.isScheme('https') || uri.isScheme('wss');
@@ -1468,7 +1534,9 @@
     );
   }
 
-  Future<void> _handleDebugEvent(vm.Event event) async {
+  @protected
+  @mustCallSuper
+  Future<void> handleDebugEvent(vm.Event event) async {
     // Delay processing any events until the debugger initialization has
     // finished running, as events may arrive (for ex. IsolateRunnable) while
     // it's doing is own initialization that this may interfere with.
@@ -1477,17 +1545,42 @@
     await _isolateManager.handleEvent(event);
   }
 
-  Future<void> _handleIsolateEvent(vm.Event event) async {
+  @protected
+  @mustCallSuper
+  Future<void> handleExtensionEvent(vm.Event event) async {
+    await debuggerInitialized;
+
+    // Base Dart does not do anything here, but other DAs (like Flutter) may
+    // override it to do their own handling.
+  }
+
+  @protected
+  @mustCallSuper
+  Future<void> handleIsolateEvent(vm.Event event) async {
     // Delay processing any events until the debugger initialization has
     // finished running, as events may arrive (for ex. IsolateRunnable) while
     // it's doing is own initialization that this may interfere with.
     await debuggerInitialized;
 
+    // Allow IsolateManager to handle any state-related events.
     await _isolateManager.handleEvent(event);
+
+    switch (event.kind) {
+      // Pass any Service Extension events on to the client so they can enable
+      // functionality based upon them.
+      case vm.EventKind.kServiceExtensionAdded:
+        this._sendServiceExtensionAdded(
+          event.extensionRPC!,
+          event.isolate!.id!,
+        );
+        break;
+    }
   }
 
   /// Handles a dart:developer log() event, sending output to the client.
-  Future<void> _handleLoggingEvent(vm.Event event) async {
+  @protected
+  @mustCallSuper
+  Future<void> handleLoggingEvent(vm.Event event) async {
     final record = event.logRecord;
     final thread = _isolateManager.threadForIsolate(event.isolate);
     if (record == null || thread == null) {
@@ -1501,7 +1594,8 @@
       if (ref == null || ref.kind == vm.InstanceKind.kNull) {
         return null;
       }
-      return _converter.convertVmInstanceRefToDisplayString(
+      return _converter
+          .convertVmInstanceRefToDisplayString(
         thread,
         ref,
         // Always allow calling toString() here as the user expects the full
@@ -1510,7 +1604,14 @@
         allowCallingToString: true,
         allowTruncatedValue: false,
         includeQuotesAroundString: false,
-      );
+      )
+          .catchError((e) {
+        // Fetching strings from the server may throw if they have been
+        // collected since (for example if a Hot Restart occurs while
+        // we're running this). Log the error and just return null so
+        // nothing is shown.
+        logger?.call('$e');
+      });
     }
 
     var loggerName = await asString(record.loggerName);
@@ -1534,6 +1635,23 @@
     }
   }
 
+  @protected
+  @mustCallSuper
+  Future<void> handleServiceEvent(vm.Event event) async {
+    await debuggerInitialized;
+
+    switch (event.kind) {
+      // Service registrations are passed to the client so they can toggle
+      // behaviour based on their presence.
+      case vm.EventKind.kServiceRegistered:
+        this._sendServiceRegistration(event.service!, event.method!);
+        break;
+      case vm.EventKind.kServiceUnregistered:
+        this._sendServiceUnregistration(event.service!, event.method!);
+        break;
+    }
+  }
+
   void _handleStderrEvent(vm.Event event) {
     _sendOutputStreamEvent('stderr', event);
   }
@@ -1585,6 +1703,27 @@
     sendOutput('stdout', message);
   }
 
+  void _sendServiceExtensionAdded(String extensionRPC, String isolateId) {
+    sendEvent(
+      RawEventBody({'extensionRPC': extensionRPC, 'isolateId': isolateId}),
+      eventType: 'dart.serviceExtensionAdded',
+    );
+  }
+
+  void _sendServiceRegistration(String service, String method) {
+    sendEvent(
+      RawEventBody({'service': service, 'method': method}),
+      eventType: 'dart.serviceRegistered',
+    );
+  }
+
+  void _sendServiceUnregistration(String service, String method) {
+    sendEvent(
+      RawEventBody({'service': service, 'method': method}),
+      eventType: 'dart.serviceUnregistered',
+    );
+  }
+
   /// Updates the current debug options for the session.
   ///
   /// Clients may not know about all debug options, so anything not included
@@ -1641,23 +1780,26 @@
 /// adapter in launchRequest, which is a request to start debugging an
 /// application.
 ///
-/// Specialised adapters (such as Flutter) will likely extend this class with
-/// their own additional fields.
+/// Specialised adapters (such as Flutter) will likely have their own versions
+/// of this class.
 class DartLaunchRequestArguments extends DartCommonLaunchAttachRequestArguments
     implements LaunchRequestArguments {
-  /// Optional data from the previous, restarted session.
-  /// The data is sent as the 'restart' attribute of the 'terminated' event.
-  /// The client should leave the data intact.
-  final Object? restart;
-
   /// If noDebug is true the launch request should launch the program without
   /// enabling debugging.
   final bool? noDebug;
 
+  /// The program/Dart script to be run.
   final String program;
+
+  /// Arguments to be passed to [program].
   final List<String>? args;
+
+  /// Arguments to be passed to the tool that will run [program] (for example,
+  /// the VM or Flutter tool).
+  final List<String>? toolArgs;
+
   final int? vmServicePort;
-  final List<String>? vmAdditionalArgs;
+
   final bool? enableAsserts;
 
   /// Which console to run the program in.
@@ -1673,14 +1815,14 @@
   final String? console;
 
   DartLaunchRequestArguments({
-    this.restart,
     this.noDebug,
     required this.program,
     this.args,
     this.vmServicePort,
-    this.vmAdditionalArgs,
+    this.toolArgs,
     this.console,
     this.enableAsserts,
+    Object? restart,
     String? name,
     String? cwd,
     List<String>? additionalProjectPaths,
@@ -1690,6 +1832,7 @@
     bool? evaluateToStringInDebugViews,
     bool? sendLogsToClient,
   }) : super(
+          restart: restart,
           name: name,
           cwd: cwd,
           additionalProjectPaths: additionalProjectPaths,
@@ -1701,11 +1844,10 @@
         );
 
   DartLaunchRequestArguments.fromMap(Map<String, Object?> obj)
-      : restart = obj['restart'],
-        noDebug = obj['noDebug'] as bool?,
+      : noDebug = obj['noDebug'] as bool?,
         program = obj['program'] as String,
         args = (obj['args'] as List?)?.cast<String>(),
-        vmAdditionalArgs = (obj['vmAdditionalArgs'] as List?)?.cast<String>(),
+        toolArgs = (obj['toolArgs'] as List?)?.cast<String>(),
         vmServicePort = obj['vmServicePort'] as int?,
         console = obj['console'] as String?,
         enableAsserts = obj['enableAsserts'] as bool?,
@@ -1714,11 +1856,10 @@
   @override
   Map<String, Object?> toJson() => {
         ...super.toJson(),
-        if (restart != null) 'restart': restart,
         if (noDebug != null) 'noDebug': noDebug,
         'program': program,
         if (args != null) 'args': args,
-        if (vmAdditionalArgs != null) 'vmAdditionalArgs': vmAdditionalArgs,
+        if (toolArgs != null) 'toolArgs': toolArgs,
         if (vmServicePort != null) 'vmServicePort': vmServicePort,
         if (console != null) 'console': console,
         if (enableAsserts != null) 'enableAsserts': enableAsserts,
diff --git a/pkg/dds/lib/src/dap/adapters/dart_cli.dart b/pkg/dds/lib/src/dap/adapters/dart_cli.dart
deleted file mode 100644
index bf0eab9..0000000
--- a/pkg/dds/lib/src/dap/adapters/dart_cli.dart
+++ /dev/null
@@ -1,367 +0,0 @@
-// 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.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:path/path.dart' as path;
-import 'package:pedantic/pedantic.dart';
-import 'package:vm_service/vm_service.dart' as vm;
-
-import '../exceptions.dart';
-import '../logging.dart';
-import '../protocol_generated.dart';
-import '../protocol_stream.dart';
-import 'dart.dart';
-
-/// A DAP Debug Adapter for running and debugging Dart CLI scripts.
-class DartCliDebugAdapter extends DartDebugAdapter<DartLaunchRequestArguments,
-    DartAttachRequestArguments> {
-  Process? _process;
-
-  /// Process IDs to terminate during shutdown.
-  ///
-  /// This may be populated with pids from the VM Service to ensure we clean up
-  /// properly where signals may not be passed through the shell to the
-  /// underlying VM process.
-  /// https://github.com/Dart-Code/Dart-Code/issues/907
-  final pidsToTerminate = <int>{};
-
-  @override
-  final parseLaunchArgs = DartLaunchRequestArguments.fromJson;
-
-  @override
-  final parseAttachArgs = DartAttachRequestArguments.fromJson;
-
-  DartCliDebugAdapter(
-    ByteStreamServerChannel channel, {
-    bool ipv6 = false,
-    bool enableDds = true,
-    bool enableAuthCodes = true,
-    Logger? logger,
-  }) : super(
-          channel,
-          ipv6: ipv6,
-          enableDds: enableDds,
-          enableAuthCodes: enableAuthCodes,
-          logger: logger,
-        ) {
-    channel.closed.then((_) => shutdown());
-  }
-
-  /// Whether the VM Service closing should be used as a signal to terminate the
-  /// debug session.
-  ///
-  /// If we have a process, we will instead use its termination as a signal to
-  /// terminate the debug session. Otherwise, we will use the VM Service close.
-  bool get terminateOnVmServiceClose => _process == null;
-
-  Future<void> debuggerConnected(vm.VM vmInfo) async {
-    if (!isAttach) {
-      // Capture the PID from the VM Service so that we can terminate it when
-      // cleaning up. Terminating the process might not be enough as it could be
-      // just a shell script (e.g. pub on Windows) and may not pass the
-      // signal on correctly.
-      // See: https://github.com/Dart-Code/Dart-Code/issues/907
-      final pid = vmInfo.pid;
-      if (pid != null) {
-        pidsToTerminate.add(pid);
-      }
-    }
-  }
-
-  /// Called by [disconnectRequest] to request that we forcefully shut down the
-  /// app being run (or in the case of an attach, disconnect).
-  Future<void> disconnectImpl() async {
-    // TODO(dantup): In Dart-Code DAP, we first try again with sigint and wait
-    // for a few seconds before sending sigkill.
-    pidsToTerminate.forEach(
-      (pid) => Process.killPid(pid, ProcessSignal.sigkill),
-    );
-  }
-
-  /// Waits for [vmServiceInfoFile] to exist and become valid before returning
-  /// the VM Service URI contained within.
-  Future<Uri> waitForVmServiceInfoFile(File vmServiceInfoFile) async {
-    final completer = Completer<Uri>();
-    late final StreamSubscription<FileSystemEvent> vmServiceInfoFileWatcher;
-
-    Uri? tryParseServiceInfoFile(FileSystemEvent event) {
-      final uri = _readVmServiceInfoFile(vmServiceInfoFile);
-      if (uri != null && !completer.isCompleted) {
-        vmServiceInfoFileWatcher.cancel();
-        completer.complete(uri);
-      }
-    }
-
-    vmServiceInfoFileWatcher = vmServiceInfoFile.parent
-        .watch(events: FileSystemEvent.all)
-        .where((event) => event.path == vmServiceInfoFile.path)
-        .listen(
-          tryParseServiceInfoFile,
-          onError: (e) => logger?.call('Ignoring exception from watcher: $e'),
-        );
-
-    // After setting up the watcher, also check if the file already exists to
-    // ensure we don't miss it if it was created right before we set the
-    // watched up.
-    final uri = _readVmServiceInfoFile(vmServiceInfoFile);
-    if (uri != null && !completer.isCompleted) {
-      unawaited(vmServiceInfoFileWatcher.cancel());
-      completer.complete(uri);
-    }
-
-    return completer.future;
-  }
-
-  /// Called by [launchRequest] to request that we actually start the app to be
-  /// run/debugged.
-  ///
-  /// For debugging, this should start paused, connect to the VM Service, set
-  /// breakpoints, and resume.
-  Future<void> launchImpl() async {
-    final args = this.args as DartLaunchRequestArguments;
-    final vmPath = Platform.resolvedExecutable;
-    File? vmServiceInfoFile;
-
-    final debug = !(args.noDebug ?? false);
-    if (debug) {
-      // Create a temp folder for the VM to write the service-info-file into.
-      // Using tmpDir.createTempory() is flakey on Windows+Linux (at least
-      // on GitHub Actions) complaining the file does not exist when creating a
-      // watcher. Creating/watching a folder and writing the file into it seems
-      // to be reliable.
-      final serviceInfoFilePath = path.join(
-        Directory.systemTemp.createTempSync('dart-vm-service').path,
-        'vm.json',
-      );
-
-      vmServiceInfoFile = File(serviceInfoFilePath);
-      unawaited(waitForVmServiceInfoFile(vmServiceInfoFile)
-          .then((uri) => connectDebugger(uri, resumeIfStarting: true)));
-    }
-
-    final vmArgs = <String>[
-      if (debug) ...[
-        '--enable-vm-service=${args.vmServicePort ?? 0}${ipv6 ? '/::1' : ''}',
-        '--pause_isolates_on_start=true',
-        if (!enableAuthCodes) '--disable-service-auth-codes'
-      ],
-      '--disable-dart-dev',
-      if (debug && vmServiceInfoFile != null) ...[
-        '-DSILENT_OBSERVATORY=true',
-        '--write-service-info=${Uri.file(vmServiceInfoFile.path)}'
-      ],
-      // Default to asserts on, this seems like the most useful behaviour for
-      // editor-spawned debug sessions.
-      if (args.enableAsserts ?? true) '--enable-asserts'
-    ];
-    final processArgs = [
-      ...vmArgs,
-      args.program,
-      ...?args.args,
-    ];
-
-    // Find the package_config file for this script.
-    // TODO(dantup): Remove this once
-    //   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
-    //   necessary.
-    var possibleRoot = path.isAbsolute(args.program)
-        ? path.dirname(args.program)
-        : path.dirname(path.normalize(path.join(args.cwd ?? '', args.program)));
-    final packageConfig = _findPackageConfigFile(possibleRoot);
-    if (packageConfig != null) {
-      this.usePackageConfigFile(packageConfig);
-    }
-
-    // If the client supports runInTerminal and args.console is set to either
-    // 'terminal' or 'runInTerminal' we won't run the process ourselves, but
-    // instead call the client to run it for us (this allows it to run in a
-    // terminal where the user can interact with `stdin`).
-    final canRunInTerminal =
-        initializeArgs?.supportsRunInTerminalRequest ?? false;
-
-    // The terminal kinds used by DAP are 'integrated' and 'external'.
-    final terminalKind = canRunInTerminal
-        ? args.console == 'terminal'
-            ? 'integrated'
-            : args.console == 'externalTerminal'
-                ? 'external'
-                : null
-        : null;
-
-    // TODO(dantup): Support passing env to both of these.
-
-    if (terminalKind != null) {
-      await launchInEditorTerminal(debug, terminalKind, vmPath, processArgs);
-    } else {
-      await launchAsProcess(vmPath, processArgs);
-    }
-  }
-
-  /// Called by [attachRequest] to request that we actually connect to the app
-  /// to be debugged.
-  Future<void> attachImpl() async {
-    final args = this.args as DartAttachRequestArguments;
-    final vmServiceUri = args.vmServiceUri;
-    final vmServiceInfoFile = args.vmServiceInfoFile;
-
-    if ((vmServiceUri == null) == (vmServiceInfoFile == null)) {
-      throw DebugAdapterException(
-        'To attach, provide exactly one of vmServiceUri/vmServiceInfoFile',
-      );
-    }
-
-    // Find the package_config file for this script.
-    // TODO(dantup): Remove this once
-    //   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
-    //   necessary.
-    final cwd = args.cwd;
-    if (cwd != null) {
-      final packageConfig = _findPackageConfigFile(cwd);
-      if (packageConfig != null) {
-        this.usePackageConfigFile(packageConfig);
-      }
-    }
-
-    final uri = vmServiceUri != null
-        ? Uri.parse(vmServiceUri)
-        : await waitForVmServiceInfoFile(File(vmServiceInfoFile!));
-
-    unawaited(connectDebugger(uri, resumeIfStarting: false));
-  }
-
-  /// Calls the client (via a `runInTerminal` request) to spawn the process so
-  /// that it can run in a local terminal that the user can interact with.
-  Future<void> launchInEditorTerminal(
-    bool debug,
-    String terminalKind,
-    String vmPath,
-    List<String> processArgs,
-  ) async {
-    final args = this.args as DartLaunchRequestArguments;
-    logger?.call('Spawning $vmPath with $processArgs in ${args.cwd}'
-        ' via client ${terminalKind} terminal');
-
-    // runInTerminal is a DAP request that goes from server-to-client that
-    // allows the DA to ask the client editor to run the debugee for us. In this
-    // case we will have no access to the process (although we get the PID) so
-    // for debugging will rely on the process writing the service-info file that
-    // we can detect with the normal watching code.
-    final requestArgs = RunInTerminalRequestArguments(
-      args: [vmPath, ...processArgs],
-      cwd: args.cwd ?? path.dirname(args.program),
-      kind: terminalKind,
-      title: args.name ?? 'Dart',
-    );
-    try {
-      final response = await sendRequest(requestArgs);
-      final body =
-          RunInTerminalResponseBody.fromJson(response as Map<String, Object?>);
-      logger?.call(
-        'Client spawned process'
-        ' (proc: ${body.processId}, shell: ${body.shellProcessId})',
-      );
-    } catch (e) {
-      logger?.call('Client failed to spawn process $e');
-      sendOutput('console', '\nFailed to spawn process: $e');
-      handleSessionTerminate();
-    }
-
-    // When using `runInTerminal` and `noDebug`, we will not connect to the VM
-    // Service so we will have no way of knowing when the process completes, so
-    // we just send the termination event right away.
-    if (!debug) {
-      handleSessionTerminate();
-    }
-  }
-
-  /// Launches the program as a process controlled by the debug adapter.
-  ///
-  /// Output to `stdout`/`stderr` will be sent to the editor using
-  /// [OutputEvent]s.
-  Future<void> launchAsProcess(String vmPath, List<String> processArgs) async {
-    logger?.call('Spawning $vmPath with $processArgs in ${args.cwd}');
-    final process = await Process.start(
-      vmPath,
-      processArgs,
-      workingDirectory: args.cwd,
-    );
-    _process = process;
-    pidsToTerminate.add(process.pid);
-
-    process.stdout.listen(_handleStdout);
-    process.stderr.listen(_handleStderr);
-    unawaited(process.exitCode.then(_handleExitCode));
-  }
-
-  /// Find the `package_config.json` file for the program being launched.
-  ///
-  /// TODO(dantup): Remove this once
-  ///   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
-  ///   necessary.
-  File? _findPackageConfigFile(String possibleRoot) {
-    File? packageConfig;
-    while (true) {
-      packageConfig =
-          File(path.join(possibleRoot, '.dart_tool', 'package_config.json'));
-
-      // If this packageconfig exists, use it.
-      if (packageConfig.existsSync()) {
-        break;
-      }
-
-      final parent = path.dirname(possibleRoot);
-
-      // If we can't go up anymore, the search failed.
-      if (parent == possibleRoot) {
-        packageConfig = null;
-        break;
-      }
-
-      possibleRoot = parent;
-    }
-
-    return packageConfig;
-  }
-
-  /// Called by [terminateRequest] to request that we gracefully shut down the
-  /// app being run (or in the case of an attach, disconnect).
-  Future<void> terminateImpl() async {
-    pidsToTerminate.forEach(
-      (pid) => Process.killPid(pid, ProcessSignal.sigint),
-    );
-    await _process?.exitCode;
-  }
-
-  void _handleExitCode(int code) {
-    final codeSuffix = code == 0 ? '' : ' ($code)';
-    logger?.call('Process exited ($code)');
-    handleSessionTerminate(codeSuffix);
-  }
-
-  void _handleStderr(List<int> data) {
-    sendOutput('stderr', utf8.decode(data));
-  }
-
-  void _handleStdout(List<int> data) {
-    sendOutput('stdout', utf8.decode(data));
-  }
-
-  /// Attempts to read VM Service info from a watcher event.
-  ///
-  /// If successful, returns the URI. Otherwise, returns null.
-  Uri? _readVmServiceInfoFile(File file) {
-    try {
-      final content = file.readAsStringSync();
-      final json = jsonDecode(content);
-      return Uri.parse(json['uri']);
-    } catch (e) {
-      // It's possible we tried to read the file before it was completely
-      // written so ignore and try again on the next event.
-      logger?.call('Ignoring error parsing vm-service-info file: $e');
-    }
-  }
-}
diff --git a/pkg/dds/lib/src/dap/adapters/dart_cli_adapter.dart b/pkg/dds/lib/src/dap/adapters/dart_cli_adapter.dart
new file mode 100644
index 0000000..3dca392
--- /dev/null
+++ b/pkg/dds/lib/src/dap/adapters/dart_cli_adapter.dart
@@ -0,0 +1,272 @@
+// 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.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+import 'package:pedantic/pedantic.dart';
+import 'package:vm_service/vm_service.dart' as vm;
+
+import '../logging.dart';
+import '../protocol_generated.dart';
+import '../protocol_stream.dart';
+import 'dart.dart';
+import 'mixins.dart';
+
+/// A DAP Debug Adapter for running and debugging Dart CLI scripts.
+class DartCliDebugAdapter extends DartDebugAdapter<DartLaunchRequestArguments,
+        DartAttachRequestArguments>
+    with PidTracker, VmServiceInfoFileUtils, PackageConfigUtils {
+  Process? _process;
+
+  @override
+  final parseLaunchArgs = DartLaunchRequestArguments.fromJson;
+
+  @override
+  final parseAttachArgs = DartAttachRequestArguments.fromJson;
+
+  DartCliDebugAdapter(
+    ByteStreamServerChannel channel, {
+    bool ipv6 = false,
+    bool enableDds = true,
+    bool enableAuthCodes = true,
+    Logger? logger,
+  }) : super(
+          channel,
+          ipv6: ipv6,
+          enableDds: enableDds,
+          enableAuthCodes: enableAuthCodes,
+          logger: logger,
+        );
+
+  /// Whether the VM Service closing should be used as a signal to terminate the
+  /// debug session.
+  ///
+  /// If we have a process, we will instead use its termination as a signal to
+  /// terminate the debug session. Otherwise, we will use the VM Service close.
+  bool get terminateOnVmServiceClose => _process == null;
+
+  Future<void> debuggerConnected(vm.VM vmInfo) async {
+    if (!isAttach) {
+      // Capture the PID from the VM Service so that we can terminate it when
+      // cleaning up. Terminating the process might not be enough as it could be
+      // just a shell script (e.g. pub on Windows) and may not pass the
+      // signal on correctly.
+      // See: https://github.com/Dart-Code/Dart-Code/issues/907
+      final pid = vmInfo.pid;
+      if (pid != null) {
+        pidsToTerminate.add(pid);
+      }
+    }
+  }
+
+  /// Called by [disconnectRequest] to request that we forcefully shut down the
+  /// app being run (or in the case of an attach, disconnect).
+  Future<void> disconnectImpl() async {
+    terminatePids(ProcessSignal.sigkill);
+  }
+
+  /// Called by [launchRequest] to request that we actually start the app to be
+  /// run/debugged.
+  ///
+  /// For debugging, this should start paused, connect to the VM Service, set
+  /// breakpoints, and resume.
+  Future<void> launchImpl() async {
+    final args = this.args as DartLaunchRequestArguments;
+    final vmPath = Platform.resolvedExecutable;
+    File? vmServiceInfoFile;
+
+    final debug = !(args.noDebug ?? false);
+    if (debug) {
+      vmServiceInfoFile = generateVmServiceInfoFile();
+      unawaited(waitForVmServiceInfoFile(logger, vmServiceInfoFile)
+          .then((uri) => connectDebugger(uri, resumeIfStarting: true)));
+    }
+
+    final vmArgs = <String>[
+      if (debug) ...[
+        '--enable-vm-service=${args.vmServicePort ?? 0}${ipv6 ? '/::1' : ''}',
+        '--pause_isolates_on_start',
+        if (!enableAuthCodes) '--disable-service-auth-codes'
+      ],
+      '--disable-dart-dev',
+      if (debug && vmServiceInfoFile != null) ...[
+        '-DSILENT_OBSERVATORY=true',
+        '--write-service-info=${Uri.file(vmServiceInfoFile.path)}'
+      ],
+      // Default to asserts on, this seems like the most useful behaviour for
+      // editor-spawned debug sessions.
+      if (args.enableAsserts ?? true) '--enable-asserts',
+    ];
+    final processArgs = [
+      ...vmArgs,
+      ...?args.toolArgs,
+      args.program,
+      ...?args.args,
+    ];
+
+    // Find the package_config file for this script.
+    // TODO(dantup): Remove this once
+    //   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
+    //   necessary.
+    var possibleRoot = path.isAbsolute(args.program)
+        ? path.dirname(args.program)
+        : path.dirname(path.normalize(path.join(args.cwd ?? '', args.program)));
+    final packageConfig = findPackageConfigFile(possibleRoot);
+    if (packageConfig != null) {
+      this.usePackageConfigFile(packageConfig);
+    }
+
+    // If the client supports runInTerminal and args.console is set to either
+    // 'terminal' or 'runInTerminal' we won't run the process ourselves, but
+    // instead call the client to run it for us (this allows it to run in a
+    // terminal where the user can interact with `stdin`).
+    final canRunInTerminal =
+        initializeArgs?.supportsRunInTerminalRequest ?? false;
+
+    // The terminal kinds used by DAP are 'integrated' and 'external'.
+    final terminalKind = canRunInTerminal
+        ? args.console == 'terminal'
+            ? 'integrated'
+            : args.console == 'externalTerminal'
+                ? 'external'
+                : null
+        : null;
+
+    // TODO(dantup): Support passing env to both of these.
+
+    if (terminalKind != null) {
+      await launchInEditorTerminal(debug, terminalKind, vmPath, processArgs);
+    } else {
+      await launchAsProcess(vmPath, processArgs);
+    }
+
+    // Delay responding until the debugger is connected.
+    if (debug) {
+      await debuggerInitialized;
+    }
+  }
+
+  /// Called by [attachRequest] to request that we actually connect to the app
+  /// to be debugged.
+  Future<void> attachImpl() async {
+    final args = this.args as DartAttachRequestArguments;
+    final vmServiceUri = args.vmServiceUri;
+    final vmServiceInfoFile = args.vmServiceInfoFile;
+
+    if ((vmServiceUri == null) == (vmServiceInfoFile == null)) {
+      sendOutput(
+        'console',
+        '\nTo attach, provide exactly one of vmServiceUri/vmServiceInfoFile',
+      );
+      handleSessionTerminate();
+      return;
+    }
+
+    // Find the package_config file for this script.
+    // TODO(dantup): Remove this once
+    //   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
+    //   necessary.
+    final cwd = args.cwd;
+    if (cwd != null) {
+      final packageConfig = findPackageConfigFile(cwd);
+      if (packageConfig != null) {
+        this.usePackageConfigFile(packageConfig);
+      }
+    }
+
+    final uri = vmServiceUri != null
+        ? Uri.parse(vmServiceUri)
+        : await waitForVmServiceInfoFile(logger, File(vmServiceInfoFile!));
+
+    unawaited(connectDebugger(uri, resumeIfStarting: false));
+  }
+
+  /// Calls the client (via a `runInTerminal` request) to spawn the process so
+  /// that it can run in a local terminal that the user can interact with.
+  Future<void> launchInEditorTerminal(
+    bool debug,
+    String terminalKind,
+    String vmPath,
+    List<String> processArgs,
+  ) async {
+    final args = this.args as DartLaunchRequestArguments;
+    logger?.call('Spawning $vmPath with $processArgs in ${args.cwd}'
+        ' via client ${terminalKind} terminal');
+
+    // runInTerminal is a DAP request that goes from server-to-client that
+    // allows the DA to ask the client editor to run the debugee for us. In this
+    // case we will have no access to the process (although we get the PID) so
+    // for debugging will rely on the process writing the service-info file that
+    // we can detect with the normal watching code.
+    final requestArgs = RunInTerminalRequestArguments(
+      args: [vmPath, ...processArgs],
+      cwd: args.cwd ?? path.dirname(args.program),
+      kind: terminalKind,
+      title: args.name ?? 'Dart',
+    );
+    try {
+      final response = await sendRequest(requestArgs);
+      final body =
+          RunInTerminalResponseBody.fromJson(response as Map<String, Object?>);
+      logger?.call(
+        'Client spawned process'
+        ' (proc: ${body.processId}, shell: ${body.shellProcessId})',
+      );
+    } catch (e) {
+      logger?.call('Client failed to spawn process $e');
+      sendOutput('console', '\nFailed to spawn process: $e');
+      handleSessionTerminate();
+    }
+
+    // When using `runInTerminal` and `noDebug`, we will not connect to the VM
+    // Service so we will have no way of knowing when the process completes, so
+    // we just send the termination event right away.
+    if (!debug) {
+      handleSessionTerminate();
+    }
+  }
+
+  /// Launches the program as a process controlled by the debug adapter.
+  ///
+  /// Output to `stdout`/`stderr` will be sent to the editor using
+  /// [OutputEvent]s.
+  Future<void> launchAsProcess(String vmPath, List<String> processArgs) async {
+    logger?.call('Spawning $vmPath with $processArgs in ${args.cwd}');
+    final process = await Process.start(
+      vmPath,
+      processArgs,
+      workingDirectory: args.cwd,
+    );
+    _process = process;
+    pidsToTerminate.add(process.pid);
+
+    process.stdout.listen(_handleStdout);
+    process.stderr.listen(_handleStderr);
+    unawaited(process.exitCode.then(_handleExitCode));
+  }
+
+  /// Called by [terminateRequest] to request that we gracefully shut down the
+  /// app being run (or in the case of an attach, disconnect).
+  Future<void> terminateImpl() async {
+    terminatePids(ProcessSignal.sigterm);
+    await _process?.exitCode;
+  }
+
+  void _handleExitCode(int code) {
+    final codeSuffix = code == 0 ? '' : ' ($code)';
+    logger?.call('Process exited ($code)');
+    handleSessionTerminate(codeSuffix);
+  }
+
+  void _handleStderr(List<int> data) {
+    sendOutput('stderr', utf8.decode(data));
+  }
+
+  void _handleStdout(List<int> data) {
+    sendOutput('stdout', utf8.decode(data));
+  }
+}
diff --git a/pkg/dds/lib/src/dap/adapters/dart_test_adapter.dart b/pkg/dds/lib/src/dap/adapters/dart_test_adapter.dart
new file mode 100644
index 0000000..9e517da
--- /dev/null
+++ b/pkg/dds/lib/src/dap/adapters/dart_test_adapter.dart
@@ -0,0 +1,185 @@
+// 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.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+import 'package:pedantic/pedantic.dart';
+import 'package:vm_service/vm_service.dart' as vm;
+
+import '../logging.dart';
+import '../protocol_stream.dart';
+import '../stream_transformers.dart';
+import 'dart.dart';
+import 'mixins.dart';
+
+/// A DAP Debug Adapter for running and debugging Dart test scripts.
+class DartTestDebugAdapter extends DartDebugAdapter<DartLaunchRequestArguments,
+        DartAttachRequestArguments>
+    with PidTracker, VmServiceInfoFileUtils, PackageConfigUtils, TestAdapter {
+  Process? _process;
+
+  @override
+  final parseLaunchArgs = DartLaunchRequestArguments.fromJson;
+
+  @override
+  final parseAttachArgs = DartAttachRequestArguments.fromJson;
+
+  DartTestDebugAdapter(
+    ByteStreamServerChannel channel, {
+    bool ipv6 = false,
+    bool enableDds = true,
+    bool enableAuthCodes = true,
+    Logger? logger,
+  }) : super(
+          channel,
+          ipv6: ipv6,
+          enableDds: enableDds,
+          enableAuthCodes: enableAuthCodes,
+          logger: logger,
+        );
+
+  /// Whether the VM Service closing should be used as a signal to terminate the
+  /// debug session.
+  ///
+  /// Since we do not support attaching for tests, this is always false.
+  bool get terminateOnVmServiceClose => false;
+
+  Future<void> debuggerConnected(vm.VM vmInfo) async {
+    // Capture the PID from the VM Service so that we can terminate it when
+    // cleaning up. Terminating the process might not be enough as it could be
+    // just a shell script (e.g. pub on Windows) and may not pass the
+    // signal on correctly.
+    // See: https://github.com/Dart-Code/Dart-Code/issues/907
+    final pid = vmInfo.pid;
+    if (pid != null) {
+      pidsToTerminate.add(pid);
+    }
+  }
+
+  /// Called by [disconnectRequest] to request that we forcefully shut down the
+  /// app being run (or in the case of an attach, disconnect).
+  Future<void> disconnectImpl() async {
+    terminatePids(ProcessSignal.sigkill);
+  }
+
+  /// Called by [launchRequest] to request that we actually start the app to be
+  /// run/debugged.
+  ///
+  /// For debugging, this should start paused, connect to the VM Service, set
+  /// breakpoints, and resume.
+  Future<void> launchImpl() async {
+    final args = this.args as DartLaunchRequestArguments;
+    final vmPath = Platform.resolvedExecutable;
+    File? vmServiceInfoFile;
+
+    final debug = !(args.noDebug ?? false);
+    if (debug) {
+      vmServiceInfoFile = generateVmServiceInfoFile();
+      unawaited(waitForVmServiceInfoFile(logger, vmServiceInfoFile)
+          .then((uri) => connectDebugger(uri, resumeIfStarting: true)));
+    }
+
+    final vmArgs = <String>[
+      if (debug) ...[
+        '--enable-vm-service=${args.vmServicePort ?? 0}${ipv6 ? '/::1' : ''}',
+        '--pause_isolates_on_start',
+        if (!enableAuthCodes) '--disable-service-auth-codes'
+      ],
+      if (debug && vmServiceInfoFile != null) ...[
+        '-DSILENT_OBSERVATORY=true',
+        '--write-service-info=${Uri.file(vmServiceInfoFile.path)}'
+      ],
+      // Default to asserts on, this seems like the most useful behaviour for
+      // editor-spawned debug sessions.
+      if (args.enableAsserts ?? true) '--enable-asserts',
+      // TODO(dantup): This should be changed from "dart run test:test" to
+      // "dart test" once the started-paused flags are working correctly.
+      // Currently they start paused but do not write the vm-service-info file
+      // to give us the VM-service URI.
+      // https://github.com/dart-lang/sdk/issues/44200#issuecomment-726869539
+      // We should also ensure DDS is disabled (this may need a new flag since
+      // we can't disable-dart-dev to get "dart test") and devtools is not
+      // served.
+      // '--disable-dart-dev',
+      'run',
+      '--no-serve-devtools',
+      'test:test',
+      '-r',
+      'json',
+    ];
+    final processArgs = [
+      ...vmArgs,
+      ...?args.toolArgs,
+      args.program,
+      ...?args.args,
+    ];
+
+    // Find the package_config file for this script.
+    // TODO(dantup): Remove this once
+    //   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
+    //   necessary.
+    var possibleRoot = path.isAbsolute(args.program)
+        ? path.dirname(args.program)
+        : path.dirname(path.normalize(path.join(args.cwd ?? '', args.program)));
+    final packageConfig = findPackageConfigFile(possibleRoot);
+    if (packageConfig != null) {
+      this.usePackageConfigFile(packageConfig);
+    }
+
+    // TODO(dantup): Support passing env to both of these.
+
+    logger?.call('Spawning $vmPath with $processArgs in ${args.cwd}');
+    final process = await Process.start(
+      vmPath,
+      processArgs,
+      workingDirectory: args.cwd,
+    );
+    _process = process;
+    pidsToTerminate.add(process.pid);
+
+    process.stdout.transform(ByteToLineTransformer()).listen(_handleStdout);
+    process.stderr.listen(_handleStderr);
+    unawaited(process.exitCode.then(_handleExitCode));
+  }
+
+  /// Called by [attachRequest] to request that we actually connect to the app
+  /// to be debugged.
+  Future<void> attachImpl() async {
+    sendOutput('console', '\nAttach is not supported for test runs');
+    handleSessionTerminate();
+  }
+
+  /// Called by [terminateRequest] to request that we gracefully shut down the
+  /// app being run (or in the case of an attach, disconnect).
+  Future<void> terminateImpl() async {
+    terminatePids(ProcessSignal.sigterm);
+    await _process?.exitCode;
+  }
+
+  void _handleExitCode(int code) {
+    final codeSuffix = code == 0 ? '' : ' ($code)';
+    logger?.call('Process exited ($code)');
+    handleSessionTerminate(codeSuffix);
+  }
+
+  void _handleStderr(List<int> data) {
+    sendOutput('stderr', utf8.decode(data));
+  }
+
+  void _handleStdout(String data) {
+    // Output to stdout is expected to be JSON from the test runner. If we
+    // get non-JSON output we will just pass it through to the front-end so it
+    // shows up in the client and can be seen (although we generally expect
+    // package:test to have captured output and sent it in "print" events).
+    try {
+      final payload = jsonDecode(data);
+      sendTestEvents(payload);
+    } catch (e) {
+      sendOutput('stdout', data);
+    }
+  }
+}
diff --git a/pkg/dds/lib/src/dap/adapters/mixins.dart b/pkg/dds/lib/src/dap/adapters/mixins.dart
new file mode 100644
index 0000000..3b9991a
--- /dev/null
+++ b/pkg/dds/lib/src/dap/adapters/mixins.dart
@@ -0,0 +1,224 @@
+// 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.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+import 'package:pedantic/pedantic.dart';
+
+import '../logging.dart';
+import '../protocol_common.dart';
+
+/// A mixin providing some utility functions for locating/working with
+/// package_config.json files.
+mixin PackageConfigUtils {
+  /// Find the `package_config.json` file for the program being launched.
+  ///
+  /// TODO(dantup): Remove this once
+  ///   https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
+  ///   necessary.
+  File? findPackageConfigFile(String possibleRoot) {
+    File? packageConfig;
+    while (true) {
+      packageConfig =
+          File(path.join(possibleRoot, '.dart_tool', 'package_config.json'));
+
+      // If this packageconfig exists, use it.
+      if (packageConfig.existsSync()) {
+        break;
+      }
+
+      final parent = path.dirname(possibleRoot);
+
+      // If we can't go up anymore, the search failed.
+      if (parent == possibleRoot) {
+        packageConfig = null;
+        break;
+      }
+
+      possibleRoot = parent;
+    }
+
+    return packageConfig;
+  }
+}
+
+/// A mixin for tracking additional PIDs that can be shut down at the end of a
+/// debug session.
+mixin PidTracker {
+  /// Process IDs to terminate during shutdown.
+  ///
+  /// This may be populated with pids from the VM Service to ensure we clean up
+  /// properly where signals may not be passed through the shell to the
+  /// underlying VM process.
+  /// https://github.com/Dart-Code/Dart-Code/issues/907
+  final pidsToTerminate = <int>{};
+
+  /// Terminates all processes with the PIDs registered in [pidsToTerminate].
+  void terminatePids(ProcessSignal signal) {
+    // TODO(dantup): In Dart-Code DAP, we first try again with sigint and wait
+    // for a few seconds before sending sigkill.
+    pidsToTerminate.forEach(
+      (pid) => Process.killPid(pid, signal),
+    );
+  }
+}
+
+/// A mixin providing some utility functions for adapters that run tests and
+/// provides some basic test reporting since otherwise nothing is printed when
+/// using the JSON test reporter.
+mixin TestAdapter {
+  static const _tick = "✓";
+  static const _cross = "✖";
+
+  /// Test names by testID.
+  ///
+  /// Stored in testStart so that they can be looked up in testDone.
+  Map<int, String> _testNames = {};
+
+  void sendEvent(EventBody body, {String? eventType});
+  void sendOutput(String category, String message);
+
+  void sendTestEvents(Object testNotification) {
+    // Send the JSON package as a raw notification so the client can interpret
+    // the results (for example to populate a test tree).
+    sendEvent(RawEventBody(testNotification),
+        eventType: 'dart.testNotification');
+
+    // Additionally, send a textual output so that the user also has visible
+    // output in the Debug Console.
+    if (testNotification is Map<String, Object?>) {
+      sendTestTextOutput(testNotification);
+    }
+  }
+
+  /// Sends textual output for tests, including pass/fail and test output.
+  ///
+  /// This is sent so that clients that do not handle the package:test JSON
+  /// events still get some useful textual output in their Debug Consoles.
+  void sendTestTextOutput(Map<String, Object?> testNotification) {
+    switch (testNotification['type']) {
+      case 'testStart':
+        // When a test starts, capture its name by ID so we can get it back when
+        // testDone comes.
+        final test = testNotification['test'] as Map<String, Object?>?;
+        if (test != null) {
+          final testID = test['id'] as int?;
+          final testName = test['name'] as String?;
+          if (testID != null && testName != null) {
+            _testNames[testID] = testName;
+          }
+        }
+        break;
+
+      case 'testDone':
+        // Print the status of completed tests with a tick/cross.
+        if (testNotification['hidden'] == true) {
+          break;
+        }
+        final testID = testNotification['testID'] as int?;
+        if (testID != null) {
+          final testName = _testNames[testID];
+          if (testName != null) {
+            final symbol =
+                testNotification['result'] == "success" ? _tick : _cross;
+            sendOutput('console', '$symbol $testName\n');
+          }
+        }
+        break;
+
+      case 'print':
+        final message = testNotification['message'] as String?;
+        if (message != null) {
+          sendOutput('stdout', '${message.trimRight()}\n');
+        }
+        break;
+
+      case 'error':
+        final error = testNotification['error'] as String?;
+        final stack = testNotification['stackTrace'] as String?;
+        if (error != null) {
+          sendOutput('stderr', '${error.trimRight()}\n');
+        }
+        if (stack != null) {
+          sendOutput('stderr', '${stack.trimRight()}\n');
+        }
+        break;
+    }
+  }
+}
+
+/// A mixin providing some utility functions for working with vm-service-info
+/// files such as ensuring a temp folder exists to create them in, and waiting
+/// for the file to become valid parsable JSON.
+mixin VmServiceInfoFileUtils {
+  /// Creates a temp folder for the VM to write the service-info-file into and
+  /// returns the [File] to use.
+  File generateVmServiceInfoFile() {
+    // Using tmpDir.createTempory() is flakey on Windows+Linux (at least
+    // on GitHub Actions) complaining the file does not exist when creating a
+    // watcher. Creating/watching a folder and writing the file into it seems
+    // to be reliable.
+    final serviceInfoFilePath = path.join(
+      Directory.systemTemp.createTempSync('dart-vm-service').path,
+      'vm.json',
+    );
+
+    return File(serviceInfoFilePath);
+  }
+
+  /// Waits for [vmServiceInfoFile] to exist and become valid before returning
+  /// the VM Service URI contained within.
+  Future<Uri> waitForVmServiceInfoFile(
+    Logger? logger,
+    File vmServiceInfoFile,
+  ) async {
+    final completer = Completer<Uri>();
+    late final StreamSubscription<FileSystemEvent> vmServiceInfoFileWatcher;
+
+    Uri? tryParseServiceInfoFile(FileSystemEvent event) {
+      final uri = _readVmServiceInfoFile(logger, vmServiceInfoFile);
+      if (uri != null && !completer.isCompleted) {
+        vmServiceInfoFileWatcher.cancel();
+        completer.complete(uri);
+      }
+    }
+
+    vmServiceInfoFileWatcher = vmServiceInfoFile.parent
+        .watch(events: FileSystemEvent.all)
+        .where((event) => event.path == vmServiceInfoFile.path)
+        .listen(
+          tryParseServiceInfoFile,
+          onError: (e) => logger?.call('Ignoring exception from watcher: $e'),
+        );
+
+    // After setting up the watcher, also check if the file already exists to
+    // ensure we don't miss it if it was created right before we set the
+    // watched up.
+    final uri = _readVmServiceInfoFile(logger, vmServiceInfoFile);
+    if (uri != null && !completer.isCompleted) {
+      unawaited(vmServiceInfoFileWatcher.cancel());
+      completer.complete(uri);
+    }
+
+    return completer.future;
+  }
+
+  /// Attempts to read VM Service info from a watcher event.
+  ///
+  /// If successful, returns the URI. Otherwise, returns null.
+  Uri? _readVmServiceInfoFile(Logger? logger, File file) {
+    try {
+      final content = file.readAsStringSync();
+      final json = jsonDecode(content);
+      return Uri.parse(json['uri']);
+    } catch (e) {
+      // It's possible we tried to read the file before it was completely
+      // written so ignore and try again on the next event.
+      logger?.call('Ignoring error parsing vm-service-info file: $e');
+    }
+  }
+}
diff --git a/pkg/dds/lib/src/dap/base_debug_adapter.dart b/pkg/dds/lib/src/dap/base_debug_adapter.dart
index 3f64d98..2d82bbd 100644
--- a/pkg/dds/lib/src/dap/base_debug_adapter.dart
+++ b/pkg/dds/lib/src/dap/base_debug_adapter.dart
@@ -77,7 +77,7 @@
     RawRequestArguments? args,
     void Function(Object?) sendResponse,
   ) async {
-    throw DebugAdapterException('Unknown command  ${request.command}');
+    throw DebugAdapterException('Unknown command ${request.command}');
   }
 
   Future<void> disconnectRequest(
@@ -167,6 +167,12 @@
     void Function() sendResponse,
   );
 
+  Future<void> restartRequest(
+    Request request,
+    RestartArguments? args,
+    void Function() sendResponse,
+  );
+
   Future<void> scopesRequest(
     Request request,
     ScopesArguments args,
@@ -280,6 +286,12 @@
       handle(request, _withVoidResponse(launchRequest), parseLaunchArgs);
     } else if (request.command == 'attach') {
       handle(request, _withVoidResponse(attachRequest), parseAttachArgs);
+    } else if (request.command == 'restart') {
+      handle(
+        request,
+        _withVoidResponse(restartRequest),
+        _allowNullArg(RestartArguments.fromJson),
+      );
     } else if (request.command == 'terminate') {
       handle(
         request,
diff --git a/pkg/dds/lib/src/dap/isolate_manager.dart b/pkg/dds/lib/src/dap/isolate_manager.dart
index 6eb4a24..fd2d342 100644
--- a/pkg/dds/lib/src/dap/isolate_manager.dart
+++ b/pkg/dds/lib/src/dap/isolate_manager.dart
@@ -558,11 +558,18 @@
       // Set new breakpoints.
       final newBreakpoints = _clientBreakpointsByUri[uri] ?? const [];
       await Future.forEach<SourceBreakpoint>(newBreakpoints, (bp) async {
-        final vmBp = await service.addBreakpointWithScriptUri(
-            isolateId, uri, bp.line,
-            column: bp.column);
-        existingBreakpointsForIsolateAndUri.add(vmBp);
-        _clientBreakpointsByVmId[vmBp.id!] = bp;
+        try {
+          final vmBp = await service.addBreakpointWithScriptUri(
+              isolateId, uri, bp.line,
+              column: bp.column);
+          existingBreakpointsForIsolateAndUri.add(vmBp);
+          _clientBreakpointsByVmId[vmBp.id!] = bp;
+        } catch (e) {
+          // Swallow errors setting breakpoints rather than failing the whole
+          // request as it's very easy for editors to send us breakpoints that
+          // aren't valid any more.
+          _adapter.logger?.call('Failed to add breakpoint $e');
+        }
       });
     }
   }
diff --git a/pkg/dds/lib/src/dap/protocol_generated.dart b/pkg/dds/lib/src/dap/protocol_generated.dart
index 30620e4..105ca1f 100644
--- a/pkg/dds/lib/src/dap/protocol_generated.dart
+++ b/pkg/dds/lib/src/dap/protocol_generated.dart
@@ -4,8 +4,8 @@
 
 // This code was auto-generated by tool/dap/generate_all.dart - do not hand-edit!
 
-import 'package:dds/src/dap/protocol_common.dart';
-import 'package:dds/src/dap/protocol_special.dart';
+import 'protocol_common.dart';
+import 'protocol_special.dart';
 
 /// Arguments for 'attach' request. Additional attributes are implementation
 /// specific.
@@ -172,7 +172,7 @@
     if (obj['offset'] is! int?) {
       return false;
     }
-    if (!Source?.canParse(obj['source'])) {
+    if (!Source.canParse(obj['source'])) {
       return false;
     }
     if (obj['verified'] is! bool) {
@@ -1114,7 +1114,7 @@
     if (obj['text'] is! String?) {
       return false;
     }
-    if (!CompletionItemType?.canParse(obj['type'])) {
+    if (!CompletionItemType.canParse(obj['type'])) {
       return false;
     }
     return true;
@@ -1420,7 +1420,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!DataBreakpointAccessType?.canParse(obj['accessType'])) {
+    if (!DataBreakpointAccessType.canParse(obj['accessType'])) {
       return false;
     }
     if (obj['condition'] is! String?) {
@@ -1748,7 +1748,7 @@
     if (obj['line'] is! int?) {
       return false;
     }
-    if (!Source?.canParse(obj['location'])) {
+    if (!Source.canParse(obj['location'])) {
       return false;
     }
     if (obj['symbol'] is! String?) {
@@ -1949,7 +1949,7 @@
     if (obj['expression'] is! String) {
       return false;
     }
-    if (!ValueFormat?.canParse(obj['format'])) {
+    if (!ValueFormat.canParse(obj['format'])) {
       return false;
     }
     if (obj['frameId'] is! int?) {
@@ -2923,7 +2923,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!Capabilities?.canParse(obj['body'])) {
+    if (!Capabilities.canParse(obj['body'])) {
       return false;
     }
     return Response.canParse(obj);
@@ -3518,7 +3518,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!SteppingGranularity?.canParse(obj['granularity'])) {
+    if (!SteppingGranularity.canParse(obj['granularity'])) {
       return false;
     }
     if (obj['threadId'] is! int) {
@@ -4317,7 +4317,7 @@
     if (obj['presentationHint'] is! String?) {
       return false;
     }
-    if (!Source?.canParse(obj['source'])) {
+    if (!Source.canParse(obj['source'])) {
       return false;
     }
     if (obj['variablesReference'] is! int) {
@@ -4757,7 +4757,7 @@
     if (obj['expression'] is! String) {
       return false;
     }
-    if (!ValueFormat?.canParse(obj['format'])) {
+    if (!ValueFormat.canParse(obj['format'])) {
       return false;
     }
     if (obj['frameId'] is! int?) {
@@ -5004,7 +5004,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!ValueFormat?.canParse(obj['format'])) {
+    if (!ValueFormat.canParse(obj['format'])) {
       return false;
     }
     if (obj['name'] is! String) {
@@ -5206,7 +5206,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!Source?.canParse(obj['source'])) {
+    if (!Source.canParse(obj['source'])) {
       return false;
     }
     if (obj['sourceReference'] is! int) {
@@ -5454,7 +5454,7 @@
     if (obj['presentationHint'] is! String?) {
       return false;
     }
-    if (!Source?.canParse(obj['source'])) {
+    if (!Source.canParse(obj['source'])) {
       return false;
     }
     return true;
@@ -5606,7 +5606,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!StackFrameFormat?.canParse(obj['format'])) {
+    if (!StackFrameFormat.canParse(obj['format'])) {
       return false;
     }
     if (obj['levels'] is! int?) {
@@ -5696,7 +5696,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!SteppingGranularity?.canParse(obj['granularity'])) {
+    if (!SteppingGranularity.canParse(obj['granularity'])) {
       return false;
     }
     if (obj['threadId'] is! int) {
@@ -5781,7 +5781,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!SteppingGranularity?.canParse(obj['granularity'])) {
+    if (!SteppingGranularity.canParse(obj['granularity'])) {
       return false;
     }
     if (obj['targetId'] is! int?) {
@@ -5974,7 +5974,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!SteppingGranularity?.canParse(obj['granularity'])) {
+    if (!SteppingGranularity.canParse(obj['granularity'])) {
       return false;
     }
     if (obj['threadId'] is! int) {
@@ -6393,7 +6393,7 @@
     if (obj['namedVariables'] is! int?) {
       return false;
     }
-    if (!VariablePresentationHint?.canParse(obj['presentationHint'])) {
+    if (!VariablePresentationHint.canParse(obj['presentationHint'])) {
       return false;
     }
     if (obj['type'] is! String?) {
@@ -6527,7 +6527,7 @@
     if (obj['filter'] is! String?) {
       return false;
     }
-    if (!ValueFormat?.canParse(obj['format'])) {
+    if (!ValueFormat.canParse(obj['format'])) {
       return false;
     }
     if (obj['start'] is! int?) {
@@ -6999,7 +6999,7 @@
     if (obj is! Map<String, dynamic>) {
       return false;
     }
-    if (!Message?.canParse(obj['error'])) {
+    if (!Message.canParse(obj['error'])) {
       return false;
     }
     return true;
@@ -7088,7 +7088,7 @@
     if (obj['namedVariables'] is! int?) {
       return false;
     }
-    if (!VariablePresentationHint?.canParse(obj['presentationHint'])) {
+    if (!VariablePresentationHint.canParse(obj['presentationHint'])) {
       return false;
     }
     if (obj['result'] is! String) {
@@ -7156,7 +7156,7 @@
     if (obj['description'] is! String?) {
       return false;
     }
-    if (!ExceptionDetails?.canParse(obj['details'])) {
+    if (!ExceptionDetails.canParse(obj['details'])) {
       return false;
     }
     if (obj['exceptionId'] is! String) {
@@ -7614,7 +7614,7 @@
     if (obj['output'] is! String) {
       return false;
     }
-    if (!Source?.canParse(obj['source'])) {
+    if (!Source.canParse(obj['source'])) {
       return false;
     }
     if (obj['variablesReference'] is! int?) {
@@ -8253,7 +8253,7 @@
     if (obj['namedVariables'] is! int?) {
       return false;
     }
-    if (!VariablePresentationHint?.canParse(obj['presentationHint'])) {
+    if (!VariablePresentationHint.canParse(obj['presentationHint'])) {
       return false;
     }
     if (obj['type'] is! String?) {
diff --git a/pkg/dds/lib/src/dap/server.dart b/pkg/dds/lib/src/dap/server.dart
index 8a38138..6de1eaa 100644
--- a/pkg/dds/lib/src/dap/server.dart
+++ b/pkg/dds/lib/src/dap/server.dart
@@ -4,9 +4,9 @@
 
 import 'dart:async';
 
-import 'package:dds/src/dap/adapters/dart.dart';
-
-import 'adapters/dart_cli.dart';
+import 'adapters/dart.dart';
+import 'adapters/dart_cli_adapter.dart';
+import 'adapters/dart_test_adapter.dart';
 import 'logging.dart';
 import 'protocol_stream.dart';
 
@@ -22,6 +22,7 @@
   final bool ipv6;
   final bool enableDds;
   final bool enableAuthCodes;
+  final bool test;
   final Logger? logger;
 
   DapServer(
@@ -30,15 +31,24 @@
     this.ipv6 = false,
     this.enableDds = true,
     this.enableAuthCodes = true,
+    this.test = false,
     this.logger,
   }) : channel = ByteStreamServerChannel(_input, _output, logger) {
-    adapter = DartCliDebugAdapter(
-      channel,
-      ipv6: ipv6,
-      enableDds: enableDds,
-      enableAuthCodes: enableAuthCodes,
-      logger: logger,
-    );
+    adapter = test
+        ? DartTestDebugAdapter(
+            channel,
+            ipv6: ipv6,
+            enableDds: enableDds,
+            enableAuthCodes: enableAuthCodes,
+            logger: logger,
+          )
+        : DartCliDebugAdapter(
+            channel,
+            ipv6: ipv6,
+            enableDds: enableDds,
+            enableAuthCodes: enableAuthCodes,
+            logger: logger,
+          );
   }
 
   void stop() {
diff --git a/pkg/dds/lib/src/dap/stream_transformers.dart b/pkg/dds/lib/src/dap/stream_transformers.dart
new file mode 100644
index 0000000..7e4540a
--- /dev/null
+++ b/pkg/dds/lib/src/dap/stream_transformers.dart
@@ -0,0 +1,44 @@
+// 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.
+
+import 'dart:async';
+import 'dart:convert';
+
+/// Transforms a stream of bytes into strings whenever a newline is encountered.
+///
+/// This is used to consume output of processes like the package:test JSON
+/// reporter where the stream data may be buffered and we need to process
+/// specific JSON packets that are sent on their own lines.
+class ByteToLineTransformer extends StreamTransformerBase<List<int>, String> {
+  @override
+  Stream<String> bind(Stream<List<int>> stream) {
+    late StreamSubscription<int> input;
+    late StreamController<String> _output;
+    final buffer = <int>[];
+    _output = StreamController<String>(
+      onListen: () {
+        input = stream.expand((b) => b).listen(
+          (codeUnit) {
+            buffer.add(codeUnit);
+            if (_endsWithLf(buffer)) {
+              _output.add(utf8.decode(buffer));
+              buffer.clear();
+            }
+          },
+          onError: _output.addError,
+          onDone: _output.close,
+        );
+      },
+      onPause: () => input.pause(),
+      onResume: () => input.resume(),
+      onCancel: () => input.cancel(),
+    );
+    return _output.stream;
+  }
+
+  /// Whether [buffer] ends in '\n'.
+  static bool _endsWithLf(List<int> buffer) {
+    return buffer.isNotEmpty && buffer.last == 10;
+  }
+}
diff --git a/pkg/dds/lib/vm_service_extensions.dart b/pkg/dds/lib/vm_service_extensions.dart
index 09bda25..536fa57 100644
--- a/pkg/dds/lib/vm_service_extensions.dart
+++ b/pkg/dds/lib/vm_service_extensions.dart
@@ -91,7 +91,11 @@
       }
       unawaited(controller.sink.addStream(streamEvents.rest));
     }, onCancel: () {
-      streamEvents.cancel();
+      try {
+        streamEvents.cancel();
+      } on StateError {
+        // Underlying stream may have already been cancelled.
+      }
     });
 
     return controller.stream;
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index ae212ba..a477fca 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: 2.1.2
+version: 2.1.3
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/dds
 
diff --git a/pkg/dds/test/dap/integration/dart_test_test.dart b/pkg/dds/test/dap/integration/dart_test_test.dart
new file mode 100644
index 0000000..de25a7e
--- /dev/null
+++ b/pkg/dds/test/dap/integration/dart_test_test.dart
@@ -0,0 +1,146 @@
+// 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.
+
+import 'package:test/test.dart';
+
+import 'test_client.dart';
+import 'test_scripts.dart';
+import 'test_support.dart';
+
+main() {
+  late DapTestSession dap;
+  setUp(() async {
+    dap = await DapTestSession.setUp(additionalArgs: ['--test']);
+    await dap.addPackageDependency(dap.testAppDir, 'test');
+  });
+  tearDown(() => dap.tearDown());
+
+  group('dart test', () {
+    /// A helper that verifies a full set of expected test results for the
+    /// [simpleTestProgram] script.
+    void expectStandardSimpleTestResults(TestEvents events) {
+      // Check we recieved all expected test events passed through from
+      // package:test.
+      final eventNames =
+          events.testNotifications.map((e) => e['type']).toList();
+
+      // start/done should always be first/last.
+      expect(eventNames.first, equals('start'));
+      expect(eventNames.last, equals('done'));
+
+      // allSuites should have occurred after start.
+      expect(
+        eventNames,
+        containsAllInOrder(['start', 'allSuites']),
+      );
+
+      // Expect two tests, with the failing one emitting an error.
+      expect(
+        eventNames,
+        containsAllInOrder([
+          'testStart',
+          'testDone',
+          'testStart',
+          'error',
+          'testDone',
+        ]),
+      );
+    }
+
+    test('can run without debugging', () async {
+      final client = dap.client;
+      final testFile = dap.createTestFile(simpleTestProgram);
+
+      // Collect output and test events while running the script.
+      final outputEvents = await client.collectTestOutput(
+        launch: () => client.launch(
+          testFile.path,
+          noDebug: true,
+          cwd: dap.testAppDir.path,
+          args: ['--chain-stack-traces'], // to suppress warnings in the output
+        ),
+      );
+
+      // Check the printed output shows that the run finished, and it's exit
+      // code (which is 1 due to the failing test).
+      final output = outputEvents.output.map((e) => e.output).join();
+      expectLines(output, simpleTestProgramExpectedOutput);
+
+      expectStandardSimpleTestResults(outputEvents);
+    });
+
+    test('can run a single test', () async {
+      final client = dap.client;
+      final testFile = dap.createTestFile(simpleTestProgram);
+
+      // Collect output and test events while running the script.
+      final outputEvents = await client.collectTestOutput(
+        launch: () => client.launch(
+          testFile.path,
+          noDebug: true,
+          cwd: dap.testAppDir.path,
+          // It's up to the calling IDE to pass the correct args for 'dart test'
+          // if it wants to run a subset of tests.
+          args: [
+            '--plain-name',
+            'passing test',
+          ],
+        ),
+      );
+
+      final testsNames = outputEvents.testNotifications
+          .where((e) => e['type'] == 'testStart')
+          .map((e) => (e['test'] as Map<String, Object?>)['name'])
+          .toList();
+
+      expect(testsNames, contains('group 1 passing test'));
+      expect(testsNames, isNot(contains('group 1 failing test')));
+    });
+
+    test('can hit and resume from a breakpoint', () async {
+      final client = dap.client;
+      final testFile = dap.createTestFile(simpleTestProgram);
+      final breakpointLine = lineWith(testFile, breakpointMarker);
+
+      // Collect output and test events while running the script.
+      final outputEvents = await client.collectTestOutput(
+        // When launching, hit a breakpoint and resume.
+        start: () => client.hitBreakpoint(
+          testFile,
+          breakpointLine,
+          cwd: dap.testAppDir.path,
+          args: ['--chain-stack-traces'], // to suppress warnings in the output
+        ).then((stop) => client.continue_(stop.threadId!)),
+      );
+
+      // Check the usual output and test events to ensure breaking/resuming did
+      // not affect the results.
+      final output = outputEvents.output
+          .map((e) => e.output)
+          .skipWhile(dapVmServiceBannerPattern.hasMatch)
+          .join();
+      expectLines(output, simpleTestProgramExpectedOutput);
+      expectStandardSimpleTestResults(outputEvents);
+    });
+
+    test('rejects attaching', () async {
+      final client = dap.client;
+
+      final outputEvents = await client.collectTestOutput(
+        launch: () => client.attach(
+          vmServiceUri: 'ws://bogus.local/',
+          autoResume: false,
+        ),
+      );
+
+      final output = outputEvents.output.map((e) => e.output).join();
+      expectLines(output, [
+        'Attach is not supported for test runs',
+        'Exited.',
+      ]);
+    });
+
+    // These tests can be slow due to starting up the external server process.
+  }, timeout: Timeout.none);
+}
diff --git a/pkg/dds/test/dap/integration/debug_breakpoints_test.dart b/pkg/dds/test/dap/integration/debug_breakpoints_test.dart
index c67890b..974380e 100644
--- a/pkg/dds/test/dap/integration/debug_breakpoints_test.dart
+++ b/pkg/dds/test/dap/integration/debug_breakpoints_test.dart
@@ -287,7 +287,7 @@
           debugExternalPackageLibraries: false,
           // Include the packages folder as an additional project path so that
           // it will be treated as local code.
-          additionalProjectPaths: [dap.testPackageDir.path],
+          additionalProjectPaths: [dap.testPackagesDir.path],
         ),
       );
 
diff --git a/pkg/dds/test/dap/integration/debug_services.dart b/pkg/dds/test/dap/integration/debug_services.dart
new file mode 100644
index 0000000..98f698e
--- /dev/null
+++ b/pkg/dds/test/dap/integration/debug_services.dart
@@ -0,0 +1,98 @@
+// 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.
+
+import 'package:test/test.dart';
+import 'package:vm_service/vm_service_io.dart';
+
+import 'test_client.dart';
+import 'test_scripts.dart';
+import 'test_support.dart';
+
+main() {
+  late DapTestSession dap;
+  setUp(() async {
+    dap = await DapTestSession.setUp();
+  });
+  tearDown(() => dap.tearDown());
+
+  group('debug mode', () {
+    test('reports the VM Service URI to the client', () async {
+      final client = dap.client;
+      final testFile = await dap.createTestFile(simpleBreakpointProgram);
+      final breakpointLine = lineWith(testFile, breakpointMarker);
+
+      await client.hitBreakpoint(testFile, breakpointLine);
+      final vmServiceUri = (await client.vmServiceUri)!;
+      expect(vmServiceUri.scheme, anyOf('ws', 'wss'));
+
+      await client.terminate();
+    });
+
+    test('exposes VM services to the client', () async {
+      final client = dap.client;
+      final testFile = await dap.createTestFile(simpleBreakpointProgram);
+      final breakpointLine = lineWith(testFile, breakpointMarker);
+
+      // Capture our test service registration.
+      final myServiceRegistrationFuture = client.serviceRegisteredEvents
+          .firstWhere((event) => event['service'] == 'myService');
+      await client.hitBreakpoint(testFile, breakpointLine);
+      final vmServiceUri = await client.vmServiceUri;
+
+      // Register a service that echos back its params.
+      final vmService = await vmServiceConnectUri(vmServiceUri.toString());
+      // A service seems mandatory for this to work, even though it's unused.
+      await vmService.registerService('myService', 'myServiceAlias');
+      vmService.registerServiceCallback('myService', (params) async {
+        return {'result': params};
+      });
+
+      // Ensure the service registration event is emitted and includes the
+      // method to call it.
+      final myServiceRegistration = await myServiceRegistrationFuture;
+      final myServiceRegistrationMethod =
+          myServiceRegistration['method'] as String;
+
+      // Call the method and expect it to return the same values.
+      final response = await client.callService(
+        myServiceRegistrationMethod,
+        {'foo': 'bar'},
+      );
+      final result = response.body as Map<String, Object?>;
+      expect(result['foo'], equals('bar'));
+
+      await vmService.dispose();
+      await client.terminate();
+    });
+
+    test('exposes VM service extensions to the client', () async {
+      final client = dap.client;
+      final testFile = await dap.createTestFile(serviceExtensionProgram);
+
+      // Capture our test service registration.
+      final serviceExtensionAddedFuture = client.serviceExtensionAddedEvents
+          .firstWhere(
+              (event) => event['extensionRPC'] == 'ext.service.extension');
+      await client.start(file: testFile);
+
+      // Ensure the service registration event is emitted and includes the
+      // method to call it.
+      final serviceExtensionAdded = await serviceExtensionAddedFuture;
+      final extensionRPC = serviceExtensionAdded['extensionRPC'] as String;
+      final isolateId = serviceExtensionAdded['isolateId'] as String;
+
+      // Call the method and expect it to return the same values.
+      final response = await client.callService(
+        extensionRPC,
+        {
+          'isolateId': isolateId,
+          'foo': 'bar',
+        },
+      );
+      final result = response.body as Map<String, Object?>;
+      expect(result['foo'], equals('bar'));
+    });
+    // These tests can be slow due to starting up the external server process.
+  }, timeout: Timeout.none);
+}
diff --git a/pkg/dds/test/dap/integration/test_client.dart b/pkg/dds/test/dap/integration/test_client.dart
index 77ddc1a..78b145d 100644
--- a/pkg/dds/test/dap/integration/test_client.dart
+++ b/pkg/dds/test/dap/integration/test_client.dart
@@ -26,7 +26,7 @@
 
   final Logger? _logger;
   final bool captureVmServiceTraffic;
-  final _requestWarningDuration = const Duration(seconds: 5);
+  final _requestWarningDuration = const Duration(seconds: 10);
   final Map<int, _OutgoingRequest> _pendingRequests = {};
   final _eventController = StreamController<Event>.broadcast();
   int _seq = 1;
@@ -36,11 +36,20 @@
   final _serverRequestHandlers =
       <String, FutureOr<Object?> Function(Object?)>{};
 
+  late final Future<Uri?> vmServiceUri;
+
   DapTestClient._(
     this._channel,
     this._logger, {
     this.captureVmServiceTraffic = false,
   }) {
+    // Set up a future that will complete when the 'dart.debuggerUris' event is
+    // emitted by the debug adapter so tests have easy access to it.
+    vmServiceUri = event('dart.debuggerUris').then<Uri?>((event) {
+      final body = event.body as Map<String, Object?>;
+      return Uri.parse(body['vmServiceUri'] as String);
+    }).catchError((e) => null);
+
     _subscription = _channel.listen(
       _handleMessage,
       onDone: () {
@@ -59,6 +68,22 @@
   Stream<OutputEventBody> get outputEvents => events('output')
       .map((e) => OutputEventBody.fromJson(e.body as Map<String, Object?>));
 
+  /// Returns a stream of custom 'dart.serviceExtensionAdded' events.
+  Stream<Map<String, Object?>> get serviceExtensionAddedEvents =>
+      events('dart.serviceExtensionAdded')
+          .map((e) => e.body as Map<String, Object?>);
+
+  /// Returns a stream of custom 'dart.serviceRegistered' events.
+  Stream<Map<String, Object?>> get serviceRegisteredEvents =>
+      events('dart.serviceRegistered')
+          .map((e) => e.body as Map<String, Object?>);
+
+  /// Returns a stream of 'dart.testNotification' custom events from the
+  /// package:test JSON reporter.
+  Stream<Map<String, Object?>> get testNotificationEvents =>
+      events('dart.testNotification')
+          .map((e) => e.body as Map<String, Object?>);
+
   /// Send an attachRequest to the server, asking it to attach to an existing
   /// Dart program.
   Future<Response> attach({
@@ -110,6 +135,11 @@
     return attachResponse;
   }
 
+  /// Calls a service method via a custom request.
+  Future<Response> callService(String name, Object? params) {
+    return custom('callService', {'method': name, 'params': params});
+  }
+
   /// Sends a continue request for the given thread.
   ///
   /// Returns a Future that completes when the server returns a corresponding
@@ -297,7 +327,7 @@
   /// [launch] method.
   Future<void> start({
     File? file,
-    Future<Response> Function()? launch,
+    Future<Object?> Function()? launch,
   }) {
     return Future.wait([
       initialize(),
@@ -419,6 +449,17 @@
   }
 }
 
+/// Useful events produced by the debug adapter during a debug session.
+class TestEvents {
+  final List<OutputEventBody> output;
+  final List<Map<String, Object?>> testNotifications;
+
+  TestEvents({
+    required this.output,
+    required this.testNotifications,
+  });
+}
+
 class _OutgoingRequest {
   final Completer<Response> completer;
   final String name;
@@ -442,6 +483,8 @@
     File file,
     int line, {
     String? condition,
+    String? cwd,
+    List<String>? args,
     Future<Response> Function()? launch,
   }) async {
     final stop = expectStop('breakpoint', file: file, line: line);
@@ -454,7 +497,7 @@
           breakpoints: [SourceBreakpoint(line: line, condition: condition)],
         ),
       ),
-      launch?.call() ?? this.launch(file.path),
+      launch?.call() ?? this.launch(file.path, cwd: cwd, args: args),
     ], eagerError: true);
 
     return stop;
@@ -617,17 +660,63 @@
   ///
   /// These results include all events in the order they are recieved, including
   /// console, stdout and stderr.
+  ///
+  /// Only one of [start] or [launch] may be provided. Use [start] to customise
+  /// the whole start of the session (including initialise) or [launch] to only
+  /// customise the [launchRequest].
   Future<List<OutputEventBody>> collectOutput({
     File? file,
+    Future<Response> Function()? start,
     Future<Response> Function()? launch,
   }) async {
+    assert(
+      start == null || launch == null,
+      'Only one of "start" or "launch" may be provided',
+    );
     final outputEventsFuture = outputEvents.toList();
 
-    await start(file: file, launch: launch);
+    if (start != null) {
+      await start();
+    } else {
+      await this.start(file: file, launch: launch);
+    }
 
     return outputEventsFuture;
   }
 
+  /// Collects all output and test events until the program terminates.
+  ///
+  /// These results include all events in the order they are recieved, including
+  /// console, stdout, stderr and test notifications from the test JSON reporter.
+  ///
+  /// Only one of [start] or [launch] may be provided. Use [start] to customise
+  /// the whole start of the session (including initialise) or [launch] to only
+  /// customise the [launchRequest].
+  Future<TestEvents> collectTestOutput({
+    File? file,
+    Future<Response> Function()? start,
+    Future<Object?> Function()? launch,
+  }) async {
+    assert(
+      start == null || launch == null,
+      'Only one of "start" or "launch" may be provided',
+    );
+
+    final outputEventsFuture = outputEvents.toList();
+    final testNotificationEventsFuture = testNotificationEvents.toList();
+
+    if (start != null) {
+      await start();
+    } else {
+      await this.start(file: file, launch: launch);
+    }
+
+    return TestEvents(
+      output: await outputEventsFuture,
+      testNotifications: await testNotificationEventsFuture,
+    );
+  }
+
   /// A helper that fetches scopes for a frame, checks for one with the name
   /// [expectedName] and verifies its variables.
   Future<Scope> expectScopeVariables(
diff --git a/pkg/dds/test/dap/integration/test_scripts.dart b/pkg/dds/test/dap/integration/test_scripts.dart
index 08b5390..2b24727 100644
--- a/pkg/dds/test/dap/integration/test_scripts.dart
+++ b/pkg/dds/test/dap/integration/test_scripts.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:test/test.dart';
+
 /// A marker used in some test scripts/tests for where to set breakpoints.
 const breakpointMarker = '// BREAKPOINT';
 
@@ -20,6 +22,28 @@
   }
 ''';
 
+/// A simple Dart script that registers a simple service extension that returns
+/// its params and waits until it is called before exiting.
+const serviceExtensionProgram = '''
+  import 'dart:async';
+  import 'dart:convert';
+  import 'dart:developer';
+
+  void main(List<String> args) async {
+    // Using a completer here causes the VM to quit when the extension is called
+    // so use a flag.
+    // https://github.com/dart-lang/sdk/issues/47279
+    var wasCalled = false;
+    registerExtension('ext.service.extension', (method, params) async {
+      wasCalled = true;
+      return ServiceExtensionResponse.result(jsonEncode(params));
+    });
+    while (!wasCalled) {
+      await Future.delayed(const Duration(milliseconds: 100));
+    }
+  }
+''';
+
 /// A simple Dart script that prints its arguments.
 const simpleArgPrintingProgram = r'''
   void main(List<String> args) async {
@@ -76,6 +100,41 @@
   }
 ''';
 
+/// A simple package:test script that has a single group named 'group' with
+/// tests named 'passing' and 'failing' respectively.
+///
+/// The 'passing' test contains a [breakpointMarker].
+const simpleTestProgram = '''
+  import 'package:test/test.dart';
+
+  void main() {
+    group('group 1', () {
+      test('passing test', () {
+        expect(1, equals(1)); $breakpointMarker
+      });
+      test('failing test', () {
+        expect(1, equals(2));
+      });
+    });
+  }
+''';
+
+/// Matches for the expected output of [simpleTestProgram].
+final simpleTestProgramExpectedOutput = [
+  // First test
+  '✓ group 1 passing test',
+  // Second test
+  'Expected: <2>',
+  '  Actual: <1>',
+  // These lines contain paths, so just check the non-path parts.
+  allOf(startsWith('package:test_api'), endsWith('expect')),
+  endsWith('main.<fn>.<fn>'),
+  '✖ group 1 failing test',
+  // Exit
+  '',
+  'Exited (1).',
+];
+
 /// A simple Dart script that throws in user code.
 const simpleThrowingProgram = r'''
   void main(List<String> args) async {
diff --git a/pkg/dds/test/dap/integration/test_server.dart b/pkg/dds/test/dap/integration/test_server.dart
index 3e4cb72..ccb4c1d 100644
--- a/pkg/dds/test/dap/integration/test_server.dart
+++ b/pkg/dds/test/dap/integration/test_server.dart
@@ -12,6 +12,9 @@
 import 'package:path/path.dart' as path;
 import 'package:pedantic/pedantic.dart';
 
+/// Enable to run from local source (useful in development).
+const runFromSource = false;
+
 abstract class DapTestServer {
   Future<void> stop();
   StreamSink<List<int>> get sink;
@@ -39,6 +42,7 @@
       enableDds: !args.contains('--no-dds'),
       ipv6: args.contains('--ipv6'),
       enableAuthCodes: !args.contains('--no-auth-codes'),
+      test: args.contains('--test'),
     );
   }
 
@@ -101,13 +105,18 @@
     final ddsEntryScript =
         await Isolate.resolvePackageUri(Uri.parse('package:dds/dds.dart'));
     final ddsLibFolder = path.dirname(ddsEntryScript!.toFilePath());
-    final dapServerScript =
-        path.join(ddsLibFolder, '../tool/dap/run_server.dart');
+    final dartdevScript = path
+        .normalize(path.join(ddsLibFolder, '../../dartdev/bin/dartdev.dart'));
 
-    final _process = await Process.start(
-      Platform.resolvedExecutable,
-      [dapServerScript, 'dap', ...?additionalArgs],
-    );
+    final args = [
+      // When running from source, run the script instead of directly using
+      // the "dart debug_adapter" command.
+      if (runFromSource) dartdevScript,
+      'debug_adapter',
+      ...?additionalArgs,
+    ];
+
+    final _process = await Process.start(Platform.resolvedExecutable, args);
 
     return OutOfProcessDapTestServer._(_process, logger);
   }
diff --git a/pkg/dds/test/dap/integration/test_support.dart b/pkg/dds/test/dap/integration/test_support.dart
index 4c804c6..9201798 100644
--- a/pkg/dds/test/dap/integration/test_support.dart
+++ b/pkg/dds/test/dap/integration/test_support.dart
@@ -8,7 +8,6 @@
 
 import 'package:dds/src/dap/logging.dart';
 import 'package:dds/src/dap/protocol_generated.dart';
-import 'package:package_config/package_config.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 
@@ -44,12 +43,12 @@
 /// by the VM when not using --write-service-info.
 final vmServiceBannerPattern = RegExp(r'Observatory listening on ([^\s]+)\s');
 
-/// Expects [actual] to equal the lines [expected], ignoring differences in line
-/// endings and trailing whitespace.
-void expectLines(String actual, List<String> expected) {
+/// Expects the lines in [actual] to match the relevant matcher in [expected],
+/// ignoring differences in line endings and trailing whitespace.
+void expectLines(String actual, List<Object> expected) {
   expect(
-    actual.replaceAll('\r\n', '\n').trim(),
-    equals(expected.join('\n').trim()),
+    actual.replaceAll('\r\n', '\n').trim().split('\n'),
+    equals(expected),
   );
 }
 
@@ -88,7 +87,7 @@
   vmArgs ??= [];
   vmArgs.addAll([
     '--enable-vm-service=0',
-    '--pause_isolates_on_start=true',
+    '--pause_isolates_on_start',
   ]);
   final processArgs = [
     ...vmArgs,
@@ -134,12 +133,42 @@
   final Directory _testDir =
       Directory.systemTemp.createTempSync('dart-sdk-dap-test');
   late final Directory testAppDir;
-  late final Directory testPackageDir;
-  var _packageConfig = PackageConfig.empty;
+  late final Directory testPackagesDir;
 
   DapTestSession._(this.server, this.client) {
     testAppDir = _testDir.createTempSync('app');
-    testPackageDir = _testDir.createTempSync('packages');
+    createPubspec(testAppDir, 'my_test_project');
+    testPackagesDir = _testDir.createTempSync('packages');
+  }
+
+  /// Adds package with [name] (optionally at [packageFolderUri]) to the
+  /// project in [dir].
+  ///
+  /// If [packageFolderUri] is not supplied, will use [Isolate.resolvePackageUri]
+  /// assuming the package is available to the tests.
+  Future<void> addPackageDependency(
+    Directory dir,
+    String name, [
+    Uri? packageFolderUri,
+  ]) async {
+    final proc = await Process.run(
+      Platform.resolvedExecutable,
+      [
+        'pub',
+        'add',
+        name,
+        if (packageFolderUri != null) ...[
+          '--path',
+          packageFolderUri.toFilePath(),
+        ],
+      ],
+      workingDirectory: dir.path,
+    );
+    expect(
+      proc.exitCode,
+      isZero,
+      reason: '${proc.stdout}\n${proc.stderr}'.trim(),
+    );
   }
 
   /// Create a simple package named `foo` that has an empty `foo` function.
@@ -154,32 +183,38 @@
     );
   }
 
+  void createPubspec(Directory dir, String projectName) {
+    final pubspecFile = File(path.join(dir.path, 'pubspec.yaml'));
+    pubspecFile
+      ..createSync()
+      ..writeAsStringSync('''
+name: $projectName
+version: 1.0.0
+
+environment:
+  sdk: '>=2.13.0 <3.0.0'
+''');
+  }
+
   /// Creates a simple package script and adds the package to
   /// .dart_tool/package_config.json
   Future<Uri> createSimplePackage(
     String name,
     String content,
   ) async {
-    final dartToolDirectory =
-        Directory(path.join(testAppDir.path, '.dart_tool'))..createSync();
-    final packageConfigJsonFile =
-        File(path.join(dartToolDirectory.path, 'package_config.json'));
-    final packageConfigJsonUri = Uri.file(packageConfigJsonFile.path);
-
-    // Write the packages Dart implementation file.
-    final testPackageDirectory = Directory(path.join(testPackageDir.path, name))
+    final packageDir = Directory(path.join(testPackagesDir.path, name))
       ..createSync(recursive: true);
-    final testFile = File(path.join(testPackageDirectory.path, '$name.dart'));
+    final packageLibDir = Directory(path.join(packageDir.path, 'lib'))
+      ..createSync(recursive: true);
+
+    // Create a pubspec and a implementation file in the lib folder.
+    createPubspec(packageDir, name);
+    final testFile = File(path.join(packageLibDir.path, '$name.dart'));
     testFile.writeAsStringSync(content);
 
-    // Add this new package to the PackageConfig.
-    final newPackage = Package(name, Uri.file('${testPackageDirectory.path}/'));
-    _packageConfig = PackageConfig([..._packageConfig.packages, newPackage]);
-
-    // Write the PackageConfig to disk.
-    final sink = packageConfigJsonFile.openWrite();
-    PackageConfig.writeString(_packageConfig, sink, packageConfigJsonUri);
-    await sink.close();
+    // Add this new package as a dependency for the app.
+    final fileUri = Uri.file('${packageDir.path}/');
+    await addPackageDependency(testAppDir, name, fileUri);
 
     return Uri.parse('package:$name/$name.dart');
   }
diff --git a/pkg/dds/test/regress_devtools_issue_3302_test.dart b/pkg/dds/test/regress_devtools_issue_3302_test.dart
new file mode 100644
index 0000000..8c97a12
--- /dev/null
+++ b/pkg/dds/test/regress_devtools_issue_3302_test.dart
@@ -0,0 +1,59 @@
+// 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.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:dds/dds.dart';
+import 'package:dds/vm_service_extensions.dart';
+import 'package:test/test.dart';
+import 'package:vm_service/vm_service_io.dart';
+import 'common/test_helper.dart';
+
+// Regression test for https://github.com/flutter/devtools/issues/3302.
+
+void main() {
+  late Process process;
+  late DartDevelopmentService dds;
+
+  setUp(() async {
+    process = await spawnDartProcess(
+      'smoke.dart',
+    );
+  });
+
+  tearDown(() async {
+    await dds.shutdown();
+    process.kill();
+  });
+
+  test(
+    'Ensure various historical streams can be cancelled without throwing StateError',
+    () async {
+      dds = await DartDevelopmentService.startDartDevelopmentService(
+        remoteVmServiceUri,
+      );
+      expect(dds.isRunning, true);
+      final service = await vmServiceConnectUri(dds.wsUri.toString());
+
+      // This creates two single-subscription streams which are backed by a
+      // broadcast stream.
+      final stream1 = service.onExtensionEventWithHistory;
+      final stream2 = service.onExtensionEventWithHistory;
+
+      // Subscribe to each stream so `cancel()` doesn't hang.
+      final sub1 = stream1.listen((_) => null);
+      final sub2 = stream2.listen((_) => null);
+
+      // Give some time for the streams to get setup.
+      await Future.delayed(const Duration(seconds: 1));
+
+      // The second call to `cancel()` shouldn't cause an exception to be thrown
+      // when we try to cancel the underlying broadcast stream again.
+      await sub1.cancel();
+      await sub2.cancel();
+    },
+    timeout: Timeout.none,
+  );
+}
diff --git a/pkg/dds/tool/dap/codegen.dart b/pkg/dds/tool/dap/codegen.dart
index 7dee5b3..ccb78a6 100644
--- a/pkg/dds/tool/dap/codegen.dart
+++ b/pkg/dds/tool/dap/codegen.dart
@@ -646,7 +646,7 @@
       }
       buffer.write(')');
     } else if (type.isSpecType) {
-      buffer.write('$opBang$dartType.canParse($valueCode)');
+      buffer.write('$opBang${type.asDartType()}.canParse($valueCode)');
     } else {
       throw 'Unable to type check $valueCode against $type';
     }
diff --git a/pkg/dds/tool/dap/generate_all.dart b/pkg/dds/tool/dap/generate_all.dart
index 8fe4b60..ec769fe9 100644
--- a/pkg/dds/tool/dap/generate_all.dart
+++ b/pkg/dds/tool/dap/generate_all.dart
@@ -46,8 +46,8 @@
 
 // This code was auto-generated by tool/dap/generate_all.dart - do not hand-edit!
 
-import 'package:dds/src/dap/protocol_common.dart';
-import 'package:dds/src/dap/protocol_special.dart';
+import 'protocol_common.dart';
+import 'protocol_special.dart';
 ''';
 final argParser = ArgParser()
   ..addFlag(argHelp, hide: true)
diff --git a/pkg/dds/tool/dap/run_server.dart b/pkg/dds/tool/dap/run_server.dart
deleted file mode 100644
index 0178e85..0000000
--- a/pkg/dds/tool/dap/run_server.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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.
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:args/command_runner.dart';
-import 'package:dds/src/dap/server.dart';
-
-Future<void> main(List<String> arguments) async {
-  // TODO(dantup): "dap_tool" is a placeholder and will likely eventually be a
-  // "dart" command.
-  final runner = CommandRunner('dap_tool', 'Dart DAP Tool')
-    ..addCommand(DapCommand(stdin, stdout.nonBlocking));
-
-  try {
-    await runner.run(arguments);
-  } on UsageException catch (e) {
-    print(e);
-    exit(64);
-  }
-}
-
-class DapCommand extends Command {
-  static const argIpv6 = 'ipv6';
-  static const argDds = 'dds';
-  static const argAuthCodes = 'auth-codes';
-
-  final Stream<List<int>> _inputStream;
-  final StreamSink<List<int>> _outputSink;
-
-  @override
-  final String description = 'Start a DAP debug server.';
-
-  @override
-  final String name = 'dap';
-
-  DapCommand(this._inputStream, this._outputSink) {
-    argParser
-      ..addFlag(
-        argIpv6,
-        defaultsTo: false,
-        help: 'Whether to bind DAP/VM Service/DDS to IPv6 addresses',
-      )
-      ..addFlag(
-        argDds,
-        defaultsTo: true,
-        help: 'Whether to enable DDS for debug sessions',
-      )
-      ..addFlag(
-        argAuthCodes,
-        defaultsTo: true,
-        help: 'Whether to enable authentication codes for VM Services',
-      );
-  }
-
-  Future<void> run() async {
-    final args = argResults!;
-    final ipv6 = args[argIpv6] as bool;
-
-    final server = DapServer(
-      _inputStream,
-      _outputSink,
-      ipv6: ipv6,
-      enableDds: args[argDds],
-      enableAuthCodes: args[argAuthCodes],
-    );
-
-    await server.channel.closed;
-  }
-}
diff --git a/pkg/dev_compiler/doc/STATIC_SAFETY.md b/pkg/dev_compiler/doc/STATIC_SAFETY.md
index 9201c33..4710af4 100644
--- a/pkg/dev_compiler/doc/STATIC_SAFETY.md
+++ b/pkg/dev_compiler/doc/STATIC_SAFETY.md
@@ -370,7 +370,7 @@
 
 Strong mode effectively treats all standard Dart static warnings as static errors.  Most of these warnings are required for soundness (e.g., if a concrete class is missing methods required by a declared interface).  A full list of Dart static warnings may found in the [Dart specification][dartspec], or enumerated here:
 
-[https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/lib/src/generated/error.dart#L3772](https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdart-lang%2Fsdk%2Fblob%2Fmaster%2Fpkg%2Fanalyzer%2Flib%2Fsrc%2Fgenerated%2Ferror.dart%23L3772&sa=D&sntz=1&usg=AFQjCNFc4E37M1PshVcw4zk7C9jXgqfGbw)
+[https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/lib/src/generated/error.dart#L3772](https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdart-lang%2Fsdk%2Fblob%2Fmaster%2Fpkg%2Fanalyzer%2Flib%2Fsrc%2Fgenerated%2Ferror.dart%23L3772&sa=D&sntz=1&usg=AFQjCNFc4E37M1PshVcw4zk7C9jXgqfGbw)
 
 ### Super Invocations
 
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index c0a9c24..77fc615 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -23,34 +23,6 @@
 /// This file should only implement functionality that does not depend on
 /// Analyzer/Kernel imports.
 
-/// Variables that indicate which libraries are available in dev compiler.
-// TODO(jmesserly): provide an option to compile without dart:html & friends?
-Map<String, String> sdkLibraryVariables = {
-  'dart.isVM': 'false',
-  'dart.library.async': 'true',
-  'dart.library.core': 'true',
-  'dart.library.collection': 'true',
-  'dart.library.convert': 'true',
-  // TODO(jmesserly): this is not really supported in dart4web other than
-  // `debugger()`
-  'dart.library.developer': 'true',
-  'dart.library.io': 'false',
-  'dart.library.isolate': 'false',
-  'dart.library.js': 'true',
-  'dart.library.js_util': 'true',
-  'dart.library.math': 'true',
-  'dart.library.mirrors': 'false',
-  'dart.library.typed_data': 'true',
-  'dart.library.indexed_db': 'true',
-  'dart.library.html': 'true',
-  'dart.library.html_common': 'true',
-  'dart.library.svg': 'true',
-  'dart.library.ui': 'false',
-  'dart.library.web_audio': 'true',
-  'dart.library.web_gl': 'true',
-  'dart.library.web_sql': 'true',
-};
-
 /// Compiler options for the `dartdevc` backend.
 class SharedCompilerOptions {
   /// Whether to emit the source mapping file.
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index 408d757..d8435ca 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -266,7 +266,7 @@
   var additionalDills = summaryModules.keys.toList();
 
   if (!useIncrementalCompiler) {
-    compilerState = await fe.initializeCompiler(
+    compilerState = fe.initializeCompiler(
         oldCompilerState,
         compileSdk,
         sourcePathToUri(getSdkPath()),
@@ -819,7 +819,8 @@
   }
 
   // Add platform defined variables
-  declaredVariables.addAll(sdkLibraryVariables);
+  // TODO(47243) Remove when all code paths read these from the `Target`.
+  declaredVariables.addAll(sdkLibraryEnvironmentDefines);
 
   return declaredVariables;
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 102b0e8..f55ce1a 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -1046,8 +1046,9 @@
           if (name != '' || hasUnnamedSuper)
             _emitSuperConstructorCall(className, name, jsParams),
         ];
-        body.add(_addConstructorToClass(
-            c, className, name, js_ast.Fun(jsParams, js_ast.Block(ctorBody))));
+        // TODO(nshahan) Record the name for this constructor in memberNames.
+        body.add(_addConstructorToClass(c, className, _constructorName(name),
+            js_ast.Fun(jsParams, js_ast.Block(ctorBody))));
       }
     }
 
@@ -1197,14 +1198,17 @@
       return body;
     }
 
-    void addConstructor(String name, js_ast.Expression jsCtor) {
+    void addConstructor(js_ast.LiteralString name, js_ast.Expression jsCtor) {
       body.add(_addConstructorToClass(c, className, name, jsCtor));
     }
 
     var fields = c.fields;
     for (var ctor in c.constructors) {
       if (ctor.isExternal) continue;
-      addConstructor(ctor.name.text, _emitConstructor(ctor, fields, className));
+      var constructorName = _constructorName(ctor.name.text);
+      memberNames[ctor] = constructorName.valueWithoutQuotes;
+      addConstructor(
+          constructorName, _emitConstructor(ctor, fields, className));
     }
 
     // If classElement has only factory constructors, and it can be mixed in,
@@ -1617,7 +1621,7 @@
     return body;
   }
 
-  js_ast.Expression _constructorName(String name) {
+  js_ast.LiteralString _constructorName(String name) {
     if (name == '') {
       // Default constructors (factory or not) use `new` as their name.
       return propertyName('new');
@@ -1773,8 +1777,8 @@
   }
 
   js_ast.Statement _addConstructorToClass(Class c, js_ast.Expression className,
-      String name, js_ast.Expression jsCtor) {
-    jsCtor = defineValueOnClass(c, className, _constructorName(name), jsCtor);
+      js_ast.LiteralString name, js_ast.Expression jsCtor) {
+    jsCtor = defineValueOnClass(c, className, name, jsCtor);
     return js.statement('#.prototype = #.prototype;', [jsCtor, className]);
   }
 
@@ -2084,9 +2088,10 @@
     /// [_emitFunction] instead.
     var name = node.name.text;
     var jsBody = _emitSyncFunctionBody(function, name);
+    var jsName = _constructorName(name);
+    memberNames[node] = jsName.valueWithoutQuotes;
 
-    return js_ast.Method(
-        _constructorName(name), js_ast.Fun(_emitParameters(function), jsBody),
+    return js_ast.Method(jsName, js_ast.Fun(_emitParameters(function), jsBody),
         isStatic: true)
       ..sourceInformation = _nodeEnd(node.fileEndOffset);
   }
@@ -3719,7 +3724,7 @@
   void _emitCovarianceBoundsCheck(
       List<TypeParameter> typeFormals, List<js_ast.Statement> body) {
     for (var t in typeFormals) {
-      if (t.isGenericCovariantImpl && !_types.isTop(t.bound)) {
+      if (t.isCovariantByClass && !_types.isTop(t.bound)) {
         body.add(runtimeStatement('checkTypeBound(#, #, #)', [
           _emitTypeParameterType(TypeParameterType(t, Nullability.undetermined),
               emitNullability: false),
@@ -4695,11 +4700,15 @@
   @override
   js_ast.Expression visitSuperPropertyGet(SuperPropertyGet node) {
     var target = node.interfaceTarget;
-    var jsTarget = _emitSuperTarget(target);
     if (_reifyTearoff(target)) {
-      return runtimeCall('bind(this, #, #)', [jsTarget.selector, jsTarget]);
+      if (_superAllowed) {
+        var jsTarget = _emitSuperTarget(target);
+        return runtimeCall('bind(this, #, #)', [jsTarget.selector, jsTarget]);
+      } else {
+        return _emitSuperTearoff(target);
+      }
     }
-    return jsTarget;
+    return _emitSuperTarget(target);
   }
 
   @override
@@ -5318,6 +5327,10 @@
 
     // If we can't emit `super` in this context, generate a helper that does it
     // for us, and call the helper.
+    //
+    // NOTE: This is intended to help in the cases of calling a `super` getter,
+    // setter, or method. For the case of tearing off a `super` method in
+    // contexts where `super` isn't allowed, see [_emitSuperTearoff].
     var name = member.name.text;
     var jsMethod = _superHelpers.putIfAbsent(name, () {
       var isAccessor = member is Procedure ? member.isAccessor : true;
@@ -5351,6 +5364,25 @@
     return js_ast.PropertyAccess(js_ast.This(), jsMethod.name);
   }
 
+  /// Generates a helper method that is inserted into the class that binds a
+  /// tearoff of [member] from `super` and returns a call to the helper.
+  ///
+  /// This method assumes `super` is not allowed in the current context.
+  // TODO(nshahan) Replace with a kernel transform and synthetic method filters
+  // for devtools.
+  js_ast.Expression _emitSuperTearoff(Member member) {
+    var jsName = _emitMemberName(member.name.text, member: member);
+    var name = '_#super#tearOff#${member.name.text}';
+    var jsMethod = _superHelpers.putIfAbsent(name, () {
+      var jsReturnValue =
+          runtimeCall('bind(this, #, super[#])', [jsName, jsName]);
+      var fn = js.fun('function() { return #; }', [jsReturnValue]);
+      name = js_ast.friendlyNameForDartOperator[name] ?? name;
+      return js_ast.Method(_emitTemporaryId(name), fn);
+    });
+    return js_ast.Call(js_ast.PropertyAccess(js_ast.This(), jsMethod.name), []);
+  }
+
   /// If [e] is a [TypeLiteral] or a [TypeLiteralConstant] expression, return
   /// the underlying [DartType], otherwise returns null.
   // TODO(sigmund,nshahan): remove all uses of type literals in the runtime
diff --git a/pkg/dev_compiler/lib/src/kernel/constants.dart b/pkg/dev_compiler/lib/src/kernel/constants.dart
index 87df7e3..9a938b2 100644
--- a/pkg/dev_compiler/lib/src/kernel/constants.dart
+++ b/pkg/dev_compiler/lib/src/kernel/constants.dart
@@ -99,7 +99,11 @@
   NumberSemantics get numberSemantics => NumberSemantics.js;
 
   @override
+  bool get alwaysInlineConstants => false;
+
+  @override
   bool shouldInlineConstant(ConstantExpression initializer) {
+    assert(!alwaysInlineConstants);
     var constant = initializer.constant;
     if (constant is StringConstant) {
       // Only inline small string constants, not large ones.
diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart
index 23cc5bb..8d195b3 100644
--- a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart
@@ -440,8 +440,8 @@
         scope.typeParameters,
         debugProcedureName,
         scope.library.importUri,
-        scope.cls?.name,
-        scope.isStatic);
+        className: scope.cls?.name,
+        isStatic: scope.isStatic);
 
     _log('Compiled expression to kernel');
 
diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
index 06310f6..6f11aa6 100644
--- a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
+++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
@@ -12,6 +12,8 @@
 import 'package:args/args.dart';
 import 'package:build_integration/file_system/multi_root.dart';
 import 'package:dev_compiler/dev_compiler.dart';
+import 'package:dev_compiler/src/kernel/target.dart'
+    show sdkLibraryEnvironmentDefines;
 import 'package:front_end/src/api_prototype/file_system.dart';
 import 'package:front_end/src/api_unstable/ddc.dart';
 import 'package:kernel/ast.dart' show Component, Library;
@@ -206,7 +208,7 @@
     @required Uri sdkSummary,
     @required FileSystem fileSystem,
     Uri packagesFile,
-    Map<String, String> environmentDefines = const {},
+    Map<String, String> environmentDefines,
     Map<ExperimentalFlag, bool> explicitExperimentalFlags = const {},
     Uri sdkRoot,
     bool trackWidgetCreation = false,
@@ -228,7 +230,11 @@
           TargetFlags(trackWidgetCreation: trackWidgetCreation))
       ..fileSystem = fileSystem
       ..omitPlatform = true
-      ..environmentDefines = environmentDefines
+      ..environmentDefines = {
+        if (environmentDefines != null) ...environmentDefines,
+        // TODO(47243) Remove when all code paths read these from the `Target`.
+        ...sdkLibraryEnvironmentDefines
+      }
       ..explicitExperimentalFlags = explicitExperimentalFlags
       ..onDiagnostic = _onDiagnosticHandler(errors, warnings, infos)
       ..nnbdMode = soundNullSafety ? NnbdMode.Strong : NnbdMode.Weak
diff --git a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
index 166080a..958e4af 100644
--- a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
+++ b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
@@ -211,13 +211,13 @@
 /// Whether the parameter [p] is covariant (either explicitly `covariant` or
 /// implicitly due to generics) and needs a check for soundness.
 bool isCovariantParameter(VariableDeclaration p) {
-  return p.isCovariant || p.isGenericCovariantImpl;
+  return p.isCovariantByDeclaration || p.isCovariantByClass;
 }
 
 /// Whether the field [p] is covariant (either explicitly `covariant` or
 /// implicitly due to generics) and needs a check for soundness.
 bool isCovariantField(Field f) {
-  return f.isCovariant || f.isGenericCovariantImpl;
+  return f.isCovariantByDeclaration || f.isCovariantByClass;
 }
 
 /// Returns true iff this factory constructor just throws [UnsupportedError]/
diff --git a/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart b/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart
index 7c77325e..2b458bb 100644
--- a/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart
+++ b/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart
@@ -49,12 +49,38 @@
       // TODO(nshahan) How to handle function types or types from other modules?
       type is InterfaceType ? _classJsNames[type.classNode] : null;
 
+  /// Returns the symbol for the function defined by [node].
+  void _createFunctionSymbol(Member node) {
+    var functionSymbol = FunctionSymbol(
+        name: node.name.text,
+        // TODO(nshahan) typeId - probably should canonicalize but keep original
+        // type argument names.
+        // TODO(nshahan) Should we mark all constructors static?
+        isStatic: node is Procedure ? node.isStatic : false,
+        isConst: node.isConst,
+        localId: _memberJsNames[node] ?? _procedureJsNames[node],
+        scopeId: _scopes.last.id,
+        variableIds: <String>[],
+        scopeIds: <String>[],
+        location: SourceLocation(
+            scriptId: _scriptId(node.location.file),
+            tokenPos: node.fileOffset,
+            endTokenPos: node.fileEndOffset));
+
+    _scopes.add(functionSymbol);
+    node.visitChildren(this);
+    _scopes
+      ..removeLast()
+      ..last.scopeIds.add(functionSymbol.id);
+    _moduleSymbols.functions.add(functionSymbol);
+  }
+
   @override
   void visitClass(Class node) {
     var classSymbol = ClassSymbol(
         name: node.name,
         isAbstract: node.isAbstract,
-        // TODO(nshahan) isConst - Does this mean has a const constructor?
+        isConst: node.constructors.any((constructor) => constructor.isConst),
         superClassId: _classJsNames[node.superclass],
         interfaceIds: [
           for (var type in node.implementedTypes) _classJsNames[type.classNode]
@@ -83,6 +109,9 @@
   }
 
   @override
+  void visitConstructor(Constructor node) => _createFunctionSymbol(node);
+
+  @override
   void visitField(Field node) {
     var fieldSymbol = VariableSymbol(
         name: node.name.text,
@@ -149,32 +178,12 @@
     // Also avoid adding information for the static methods introduced by the
     // CFE lowering for constructor tearoffs.
     if (node.function.body == null || isTearOffLowering(node)) return;
-    var functionSymbol = FunctionSymbol(
-        name: node.name.text,
-        // TODO(nshahan) typeId - probably should canonicalize but keep original
-        // type argument names.
-        isStatic: node.isStatic,
-        isConst: node.isConst,
-        localId: _memberJsNames[node] ?? _procedureJsNames[node],
-        scopeId: _scopes.last.id,
-        variableIds: <String>[],
-        scopeIds: <String>[],
-        location: SourceLocation(
-            scriptId: _scriptId(node.location.file),
-            tokenPos: node.fileOffset,
-            endTokenPos: node.fileEndOffset));
-
-    _scopes.add(functionSymbol);
-    node.visitChildren(this);
-    _scopes
-      ..removeLast()
-      ..last.scopeIds.add(functionSymbol.id);
-    _moduleSymbols.functions.add(functionSymbol);
+    _createFunctionSymbol(node);
   }
 
   @override
   void visitVariableDeclaration(VariableDeclaration node) {
-    var kind = node.isFieldFormal
+    var kind = node.isInitializingFormal
         ? VariableSymbolKind.formal
         : VariableSymbolKind.local;
     var variableSymbol = _createVariableSymbol(node, kind);
diff --git a/pkg/dev_compiler/lib/src/kernel/property_model.dart b/pkg/dev_compiler/lib/src/kernel/property_model.dart
index fc403b3..294b9a3 100644
--- a/pkg/dev_compiler/lib/src/kernel/property_model.dart
+++ b/pkg/dev_compiler/lib/src/kernel/property_model.dart
@@ -273,8 +273,8 @@
       var name = field.name.text;
       if (virtualAccessorNames.contains(name) ||
           fieldModel.isVirtual(field) ||
-          field.isCovariant ||
-          field.isGenericCovariantImpl) {
+          field.isCovariantByDeclaration ||
+          field.isCovariantByClass) {
         virtualFields[field] = js_ast.TemporaryId(js_ast.toJSIdentifier(name));
       }
     }
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index 8468f28..47cd497 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -19,6 +19,35 @@
 import 'constants.dart' show DevCompilerConstantsBackend;
 import 'kernel_helpers.dart';
 
+/// Boolean environment variables that indicate which libraries are available in
+/// dev compiler.
+// TODO(jmesserly): provide an option to compile without dart:html & friends?
+const sdkLibraryEnvironmentDefines = {
+  'dart.isVM': 'false',
+  'dart.library.async': 'true',
+  'dart.library.core': 'true',
+  'dart.library.collection': 'true',
+  'dart.library.convert': 'true',
+  // TODO(jmesserly): this is not really supported in dart4web other than
+  // `debugger()`
+  'dart.library.developer': 'true',
+  'dart.library.io': 'false',
+  'dart.library.isolate': 'false',
+  'dart.library.js': 'true',
+  'dart.library.js_util': 'true',
+  'dart.library.math': 'true',
+  'dart.library.mirrors': 'false',
+  'dart.library.typed_data': 'true',
+  'dart.library.indexed_db': 'true',
+  'dart.library.html': 'true',
+  'dart.library.html_common': 'true',
+  'dart.library.svg': 'true',
+  'dart.library.ui': 'false',
+  'dart.library.web_audio': 'true',
+  'dart.library.web_gl': 'true',
+  'dart.library.web_sql': 'true',
+};
+
 /// A kernel [Target] to configure the Dart Front End for dartdevc.
 class DevCompilerTarget extends Target {
   DevCompilerTarget(this.flags);
@@ -31,6 +60,10 @@
   Map<String, Class>? _nativeClasses;
 
   @override
+  Map<String, String> updateEnvironmentDefines(Map<String, String> map) =>
+      map..addAll(sdkLibraryEnvironmentDefines);
+
+  @override
   bool get enableSuperMixins => true;
 
   @override
@@ -160,12 +193,12 @@
     var jsUtilOptimizer = JsUtilOptimizer(coreTypes, hierarchy);
     for (var library in libraries) {
       _CovarianceTransformer(library).transform();
-      jsUtilOptimizer.visitLibrary(library);
       JsInteropChecks(
               coreTypes,
               diagnosticReporter as DiagnosticReporter<Message, LocatedMessage>,
               _nativeClasses!)
           .visitLibrary(library);
+      jsUtilOptimizer.visitLibrary(library);
     }
   }
 
@@ -243,8 +276,7 @@
   }
 
   @override
-  ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      const DevCompilerConstantsBackend();
+  ConstantsBackend get constantsBackend => const DevCompilerConstantsBackend();
 }
 
 /// Analyzes a component to determine if any covariance checks in private
@@ -277,14 +309,15 @@
 
   _CovarianceTransformer(this._library);
 
-  /// Transforms [_library], eliminating unncessary checks for private members.
+  /// Transforms [_library], eliminating unnecessary checks for private members.
   ///
   /// Kernel will mark covariance checks on members, for example:
-  /// - a field with [Field.isGenericCovariantImpl] or [Field.isCovariant].
+  /// - a field with [Field.isCovariantByClass] or
+  ///   [Field.isCovariantByDeclaration].
   /// - a method/setter with parameter(s) or type parameter(s) that have
-  ///   `isGenericCovariantImpl` or `isCovariant` set.
+  ///   `isCovariantByClass` or `isCovariantByDeclaration` set.
   ///
-  /// If the check can be safely eliminanted, those properties will be set to
+  /// If the check can be safely eliminated, those properties will be set to
   /// false so the JS compiler does not emit checks.
   ///
   /// Public members always need covariance checks (we cannot see all potential
@@ -320,13 +353,13 @@
     // Update the tree based on the methods that need checks.
     for (var field in _privateFields) {
       if (!_checkedMembers.contains(field)) {
-        field.isCovariant = false;
-        field.isGenericCovariantImpl = false;
+        field.isCovariantByDeclaration = false;
+        field.isCovariantByClass = false;
       }
     }
     void clearCovariant(VariableDeclaration parameter) {
-      parameter.isCovariant = false;
-      parameter.isGenericCovariantImpl = false;
+      parameter.isCovariantByDeclaration = false;
+      parameter.isCovariantByClass = false;
     }
 
     for (var member in _privateProcedures) {
@@ -335,7 +368,7 @@
         function.positionalParameters.forEach(clearCovariant);
         function.namedParameters.forEach(clearCovariant);
         for (var t in function.typeParameters) {
-          t.isGenericCovariantImpl = false;
+          t.isCovariantByClass = false;
         }
       }
     }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_legacy_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_legacy_test.dart
new file mode 100644
index 0000000..e124753
--- /dev/null
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_legacy_test.dart
@@ -0,0 +1,28 @@
+// 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.
+
+// @dart = 2.9
+
+import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
+import 'package:test/test.dart';
+import 'expression_compiler_e2e_shared.dart';
+import 'expression_compiler_e2e_suite.dart';
+
+void main() async {
+  var driver = await TestDriver.init();
+
+  group('(Legacy code)', () {
+    tearDownAll(() async {
+      await driver.finish();
+    });
+
+    group('(AMD module system)', () {
+      var setup = SetupCompilerOptions(
+          soundNullSafety: false,
+          legacyCode: true,
+          moduleFormat: ModuleFormat.amd);
+      runAgnosticSharedTests(setup, driver);
+    });
+  });
+}
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_sound_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_sound_test.dart
index 9b56991..24e6238 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_sound_test.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_sound_test.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
 import 'package:test/test.dart';
 import 'expression_compiler_e2e_shared.dart';
@@ -21,8 +19,11 @@
 
     group('(AMD module system)', () {
       var setup = SetupCompilerOptions(
-          soundNullSafety: true, moduleFormat: ModuleFormat.amd);
-      runSharedTests(setup, driver);
+          soundNullSafety: true,
+          legacyCode: false,
+          moduleFormat: ModuleFormat.amd);
+      runAgnosticSharedTests(setup, driver);
+      runNullSafeSharedTests(setup, driver);
     });
   });
 }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_unsound_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_unsound_test.dart
index 92a7c96..e7a1804 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_unsound_test.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_amd_unsound_test.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
 import 'package:test/test.dart';
 import 'expression_compiler_e2e_shared.dart';
@@ -21,8 +19,11 @@
 
     group('(AMD module system)', () {
       var setup = SetupCompilerOptions(
-          soundNullSafety: false, moduleFormat: ModuleFormat.amd);
-      runSharedTests(setup, driver);
+          soundNullSafety: false,
+          legacyCode: false,
+          moduleFormat: ModuleFormat.amd);
+      runAgnosticSharedTests(setup, driver);
+      runNullSafeSharedTests(setup, driver);
     });
   });
 }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_legacy_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_legacy_test.dart
new file mode 100644
index 0000000..81952a8
--- /dev/null
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_legacy_test.dart
@@ -0,0 +1,28 @@
+// 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.
+
+// @dart = 2.9
+
+import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
+import 'package:test/test.dart';
+import 'expression_compiler_e2e_shared.dart';
+import 'expression_compiler_e2e_suite.dart';
+
+void main() async {
+  var driver = await TestDriver.init();
+
+  group('(Legacy code)', () {
+    tearDownAll(() async {
+      await driver.finish();
+    });
+
+    group('(DDC module system)', () {
+      var setup = SetupCompilerOptions(
+          soundNullSafety: false,
+          legacyCode: true,
+          moduleFormat: ModuleFormat.ddc);
+      runAgnosticSharedTests(setup, driver);
+    });
+  });
+}
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_sound_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_sound_test.dart
index 682327e..6d40892 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_sound_test.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_sound_test.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
 import 'package:test/test.dart';
 import 'expression_compiler_e2e_shared.dart';
@@ -21,8 +19,11 @@
 
     group('(DDC module system)', () {
       var setup = SetupCompilerOptions(
-          soundNullSafety: true, moduleFormat: ModuleFormat.ddc);
-      runSharedTests(setup, driver);
+          soundNullSafety: true,
+          legacyCode: false,
+          moduleFormat: ModuleFormat.ddc);
+      runAgnosticSharedTests(setup, driver);
+      runNullSafeSharedTests(setup, driver);
     });
   });
 }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_unsound_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_unsound_test.dart
index 21bc460..aa231e2 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_unsound_test.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_ddc_unsound_test.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'package:dev_compiler/dev_compiler.dart' show ModuleFormat;
 import 'package:test/test.dart';
 import 'expression_compiler_e2e_shared.dart';
@@ -21,8 +19,11 @@
 
     group('(DDC module system)', () {
       var setup = SetupCompilerOptions(
-          soundNullSafety: false, moduleFormat: ModuleFormat.ddc);
-      runSharedTests(setup, driver);
+          soundNullSafety: false,
+          legacyCode: false,
+          moduleFormat: ModuleFormat.ddc);
+      runAgnosticSharedTests(setup, driver);
+      runNullSafeSharedTests(setup, driver);
     });
   });
 }
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
index be6d857..c121403 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_shared.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'package:test/test.dart';
 import 'expression_compiler_e2e_suite.dart';
 
@@ -30,6 +28,12 @@
     var nop;
   }
 
+  C.named(this.field): _field = 42;
+
+  C.redirecting(int x) : this(x, 99);
+
+  factory C.factory() => C(42, 0);
+
   int methodFieldAccess(int x) {
     // Breakpoint: methodBP
     var inScope = 1;
@@ -57,7 +61,300 @@
 }
 ''';
 
-void runSharedTests(SetupCompilerOptions setup, TestDriver driver) {
+/// Shared tests that require a language version greater than 2.12.
+///
+/// Tests that exercise language features introduced with 2.12 or after are
+/// valid here.
+// TODO(nshahan) Merge with [runAgnosticSharedTests] after we no longer need to
+// test support for evaluation in legacy (pre-null safety) code.
+void runNullSafeSharedTests(SetupCompilerOptions setup, TestDriver driver) {
+  group('Correct null safety mode used', () {
+    var source = '''
+        const soundNullSafety = !(<Null>[] is List<int>);
+        main() {
+          // Breakpoint: bp
+          print('hello world');
+        }
+        ''';
+
+    setUpAll(() async {
+      await driver.initSource(setup, source);
+    });
+
+    tearDownAll(() async {
+      await driver.cleanupTest();
+    });
+
+    test('in original source compilation', () async {
+      await driver.check(
+          breakpointId: 'bp',
+          expression: 'soundNullSafety',
+          expectedResult: setup.soundNullSafety.toString());
+    });
+
+    test('in expression compilation', () async {
+      await driver.check(
+          breakpointId: 'bp',
+          expression: '!(<Null>[] is List<int>)',
+          expectedResult: setup.soundNullSafety.toString());
+    });
+  });
+
+  group('Expression compiler tests in method:', () {
+    var source = simpleClassSource;
+
+    setUpAll(() async {
+      await driver.initSource(setup, source);
+    });
+
+    tearDownAll(() async {
+      await driver.cleanupTest();
+    });
+
+    test('tear off default constructor', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: 'C.new.runtimeType.toString()',
+          expectedResult: '(int, int) => C');
+    });
+
+    test('call default constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: '(C.new)(0, 0)',
+          expectedResult: 'test.C.new {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 0}');
+    });
+
+    test('tear off named constructor', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: 'C.named.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call named constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: '(C.named)(0)',
+          expectedResult: 'test.C.named {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 42}');
+    });
+
+    test('tear off redirecting constructor', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: 'C.redirecting.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call redirecting constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: '(C.redirecting)(0)',
+          expectedResult: 'test.C.redirecting { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 99}');
+    });
+
+    test('tear off factory constructor', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: 'C.factory.runtimeType.toString()',
+          expectedResult: '() => C');
+    });
+
+    test('call factory constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'methodBP',
+          expression: '(C.factory)()',
+          expectedResult: 'test.C.new { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 42, Symbol(_field): 0}');
+    });
+  });
+
+  group('Expression compiler tests in global function:', () {
+    var source = simpleClassSource;
+
+    setUpAll(() async {
+      await driver.initSource(setup, source);
+    });
+
+    tearDownAll(() async {
+      await driver.cleanupTest();
+    });
+
+    test('tear off default constructor', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: 'C.new.runtimeType.toString()',
+          expectedResult: '(int, int) => C');
+    });
+
+    test('call default constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: '(C.new)(0, 0)',
+          expectedResult: 'test.C.new {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 0}');
+    });
+
+    test('tear off named constructor', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: 'C.named.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call named constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: '(C.named)(0)',
+          expectedResult: 'test.C.named {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 42}');
+    });
+
+    test('tear off redirecting constructor', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: 'C.redirecting.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call redirecting constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: '(C.redirecting)(0)',
+          expectedResult: 'test.C.redirecting { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 99}');
+    });
+
+    test('tear off factory constructor', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: 'C.factory.runtimeType.toString()',
+          expectedResult: '() => C');
+    });
+
+    test('call factory constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'globalFunctionBP',
+          expression: '(C.factory)()',
+          expectedResult: 'test.C.new { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 42, Symbol(_field): 0}');
+    });
+  });
+
+  group('Expression compiler tests in constructor:', () {
+    var source = simpleClassSource;
+
+    setUpAll(() async {
+      await driver.initSource(setup, source);
+    });
+
+    tearDownAll(() async {
+      await driver.cleanupTest();
+    });
+
+    test('tear off default constructor', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: 'C.new.runtimeType.toString()',
+          expectedResult: '(int, int) => C');
+    });
+
+    test('call default constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: '(C.new)(0, 0)',
+          expectedResult: 'test.C.new {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 0}');
+    });
+
+    test('tear off named constructor', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: 'C.named.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call named constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: '(C.named)(0)',
+          expectedResult: 'test.C.named {Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 42}');
+    });
+
+    test('tear off redirecting constructor', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: 'C.redirecting.runtimeType.toString()',
+          expectedResult: '(int) => C');
+    });
+
+    test('call redirecting constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: '(C.redirecting)(0)',
+          expectedResult: 'test.C.redirecting { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 0, Symbol(_field): 99}');
+    });
+
+    test('tear off factory constructor', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: 'C.factory.runtimeType.toString()',
+          expectedResult: '() => C');
+    });
+
+    test('call factory constructor tear off', () async {
+      await driver.check(
+          breakpointId: 'constructorBP',
+          expression: '(C.factory)()',
+          expectedResult: 'test.C.new { Symbol(_unusedField): 4, '
+              'Symbol(C.field): 42, Symbol(_field): 0}');
+    });
+  });
+}
+
+/// Shared tests that are valid in legacy (before 2.12) and are agnostic to
+/// changes in modern versions of Dart.
+///
+/// Tests that exercise language features introduced strictly before 2.12 are
+/// valid here.
+void runAgnosticSharedTests(SetupCompilerOptions setup, TestDriver driver) {
+  group('Correct null safety mode used', () {
+    var source = '''
+        const soundNullSafety = !(<Null>[] is List<int>);
+        main() {
+          // Breakpoint: bp
+          print('hello world');
+        }
+        ''';
+
+    setUpAll(() async {
+      await driver.initSource(setup, source);
+    });
+
+    tearDownAll(() async {
+      await driver.cleanupTest();
+    });
+
+    test('in original source compilation', () async {
+      await driver.check(
+          breakpointId: 'bp',
+          expression: 'soundNullSafety',
+          expectedResult: setup.soundNullSafety.toString());
+    });
+
+    test('in expression compilation', () async {
+      await driver.check(
+          breakpointId: 'bp',
+          expression: '!(<Null>[] is List<int>)',
+          expectedResult: setup.soundNullSafety.toString());
+    });
+  });
+
   group('Expression compiler scope collection tests', () {
     var source = simpleClassSource;
 
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
index a20eb79..8e8f1bf 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
@@ -4,8 +4,6 @@
 
 // @dart = 2.9
 
-library dev_compiler.test.expression_compiler;
-
 import 'dart:async';
 import 'dart:convert';
 import 'dart:io' show Directory, File, Platform;
@@ -21,7 +19,6 @@
 import 'package:kernel/ast.dart' show Component, Library;
 import 'package:kernel/target/targets.dart';
 import 'package:path/path.dart' as p;
-import 'package:source_maps/parser.dart' as source_maps;
 import 'package:source_maps/source_maps.dart' as source_maps;
 import 'package:test/test.dart';
 import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'
@@ -60,10 +57,8 @@
       p.join(sdkRoot.toFilePath(), 'ddc_outline_sound.dill');
   static final librariesSpecificationUri =
       p.join(p.dirname(p.dirname(getSdkPath())), 'libraries.json');
-  static final String dartUnsoundComment = '// @dart = 2.9';
-  static final String dartSoundComment = '//';
 
-  final String dartLangComment;
+  final bool legacyCode;
   final List<String> errors = [];
   final List<String> diagnosticMessages = [];
   final ModuleFormat moduleFormat;
@@ -85,10 +80,10 @@
   }
 
   SetupCompilerOptions(
-      {this.soundNullSafety = true, this.moduleFormat = ModuleFormat.amd})
-      : options = _getOptions(soundNullSafety),
-        dartLangComment =
-            soundNullSafety ? dartSoundComment : dartUnsoundComment {
+      {this.soundNullSafety = true,
+      this.legacyCode = false,
+      this.moduleFormat = ModuleFormat.amd})
+      : options = _getOptions(soundNullSafety) {
     options.onDiagnostic = (fe.DiagnosticMessage m) {
       diagnosticMessages.addAll(m.plainTextFormatted);
       if (m.severity == fe.Severity.error) {
@@ -281,8 +276,8 @@
       throw StateError('Unable to find SDK summary at path: $summaryPath.');
     }
 
-    // Prepend Dart nullability comment.
-    source = '${setup.dartLangComment}\n\n$source';
+    // Prepend legacy Dart version comment.
+    if (setup.legacyCode) source = '// @dart = 2.11\n\n$source';
     this.setup = setup;
     this.source = source;
     testDir = chromeDir.createTempSync('ddc_eval_test');
@@ -525,7 +520,7 @@
     expect(
         result,
         const TypeMatcher<TestCompilationResult>()
-            .having((_) => '$value', 'result', _matches(expectedResult)));
+            .having((_) => value, 'result', _matches(expectedResult)));
   }
 
   /// Generate simple string representation of a RemoteObject that closely
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_amd_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_amd_test.dart
new file mode 100644
index 0000000..aa00557
--- /dev/null
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_amd_test.dart
@@ -0,0 +1,19 @@
+// 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.
+
+// @dart = 2.9
+
+import 'package:test/test.dart';
+
+import 'expression_compiler_worker_shared.dart';
+
+void main() async {
+  group('amd module format -', () {
+    for (var soundNullSafety in [true, false]) {
+      group('${soundNullSafety ? "sound" : "unsound"} null safety -', () {
+        runTests('amd', soundNullSafety);
+      });
+    }
+  });
+}
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_ddc_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_ddc_test.dart
new file mode 100644
index 0000000..cc272c3
--- /dev/null
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_ddc_test.dart
@@ -0,0 +1,19 @@
+// 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.
+
+// @dart = 2.9
+
+import 'package:test/test.dart';
+
+import 'expression_compiler_worker_shared.dart';
+
+void main() async {
+  group('ddc module format -', () {
+    for (var soundNullSafety in [true, false]) {
+      group('${soundNullSafety ? "sound" : "unsound"} null safety -', () {
+        runTests('ddc', soundNullSafety);
+      });
+    }
+  });
+}
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_shared.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_shared.dart
new file mode 100644
index 0000000..cd8a9ef
--- /dev/null
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_shared.dart
@@ -0,0 +1,1130 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io'
+    show Directory, File, HttpServer, Platform, Process, stderr, stdout;
+import 'dart:isolate';
+
+import 'package:browser_launcher/browser_launcher.dart';
+import 'package:build_integration/file_system/multi_root.dart';
+import 'package:dev_compiler/src/kernel/asset_file_system.dart';
+import 'package:dev_compiler/src/kernel/expression_compiler_worker.dart';
+import 'package:front_end/src/api_prototype/file_system.dart';
+import 'package:front_end/src/api_prototype/standard_file_system.dart';
+import 'package:front_end/src/compute_platform_binaries_location.dart';
+import 'package:http_multi_server/http_multi_server.dart';
+import 'package:path/path.dart' as p;
+import 'package:pedantic/pedantic.dart';
+import 'package:shelf/shelf.dart';
+import 'package:shelf/shelf_io.dart';
+import 'package:test/test.dart';
+
+/// Verbose mode for debugging
+bool get verbose => false;
+
+void runTests(String moduleFormat, bool soundNullSafety) {
+  group('expression compiler worker on startup', () {
+    Directory tempDir;
+    ReceivePort receivePort;
+
+    setUp(() async {
+      tempDir = Directory.systemTemp.createTempSync('foo bar');
+      receivePort = ReceivePort();
+    });
+
+    tearDown(() async {
+      tempDir.deleteSync(recursive: true);
+      receivePort.close();
+    });
+
+    test('reports failure to consumer', () async {
+      expect(
+          receivePort,
+          emitsInOrder([
+            equals(isA<SendPort>()),
+            equals({
+              'succeeded': false,
+              'stackTrace': isNotNull,
+              'exception': contains('Could not load SDK component'),
+            }),
+          ]));
+
+      try {
+        var badPath = 'file:///path/does/not/exist';
+        await ExpressionCompilerWorker.createAndStart(
+          [
+            '--libraries-file',
+            badPath,
+            '--dart-sdk-summary',
+            badPath,
+            '--module-format',
+            moduleFormat,
+            soundNullSafety ? '--sound-null-safety' : '--no-sound-null-safety',
+            if (verbose) '--verbose',
+          ],
+          sendPort: receivePort.sendPort,
+        );
+      } catch (e) {
+        throwsA(contains('Could not load SDK component'));
+      }
+    });
+  });
+
+  group('reading assets using standard file system - ', () {
+    runExpressionCompilationTests(
+        StandardFileSystemTestDriver(soundNullSafety, moduleFormat));
+  });
+
+  group('reading assets using multiroot file system - ', () {
+    runExpressionCompilationTests(
+        MultiRootFileSystemTestDriver(soundNullSafety, moduleFormat));
+  });
+
+  group('reading assets using asset file system -', () {
+    runExpressionCompilationTests(
+        AssetFileSystemTestDriver(soundNullSafety, moduleFormat));
+  });
+}
+
+void runExpressionCompilationTests(TestDriver driver) {
+  group('expression compiler worker', () {
+    setUpAll(() async {
+      await driver.setUpAll();
+    });
+
+    tearDownAll(() async {
+      await driver.tearDownAll();
+    });
+
+    setUp(() async {
+      await driver.setUp();
+    });
+
+    tearDown(() async {
+      await driver.tearDown();
+    });
+
+    test('can compile expressions in sdk', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'other',
+        'line': 107,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'other': 'other'},
+        'libraryUri': 'dart:collection',
+        'moduleName': 'dart_sdk',
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return other;'),
+            })
+          ]));
+    }, skip: 'Evaluating expressions in SDK is not supported yet');
+
+    test('can compile expressions in a library', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 5,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule.libraryUri,
+        'moduleName': driver.config.testModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            })
+          ]));
+    });
+
+    test('compile expressions include "dart.library..." environment defines.',
+        () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'const bool.fromEnvironment("dart.library.html")',
+        'line': 5,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule.libraryUri,
+        'moduleName': driver.config.testModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('true'),
+            })
+          ]));
+    });
+
+    test('can compile expressions in main', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'count',
+        'line': 9,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'count': 'count'},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return count;'),
+            })
+          ]));
+    });
+
+    test('can compile expressions in main (extension method)', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'ret',
+        'line': 19,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'ret': 'ret'},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return ret;'),
+            })
+          ]));
+    });
+
+    test('can compile transitive expressions in main', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().c().getNumber()',
+        'line': 9,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('new test_library.B.new().c().getNumber()'),
+            })
+          ]));
+    });
+
+    test('can compile series of expressions in various libraries', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().c().getNumber()',
+        'line': 8,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 5,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule.libraryUri,
+        'moduleName': driver.config.testModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 3,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule2.libraryUri,
+        'moduleName': driver.config.testModule2.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 3,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule3.libraryUri,
+        'moduleName': driver.config.testModule3.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().printNumber()',
+        'line': 9,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('new test_library.B.new().c().getNumber()'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('test_library.B.new().printNumber()'),
+            })
+          ]));
+    });
+
+    test('can compile after dependency update', () async {
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().c().getNumber()',
+        'line': 8,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 5,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule.libraryUri,
+        'moduleName': driver.config.testModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().printNumber()',
+        'line': 9,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'UpdateDeps',
+        'inputs': driver.inputs,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'B().c().getNumber()',
+        'line': 8,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {},
+        'libraryUri': driver.config.mainModule.libraryUri,
+        'moduleName': driver.config.mainModule.moduleName,
+      });
+
+      driver.requestController.add({
+        'command': 'CompileExpression',
+        'expression': 'formal',
+        'line': 3,
+        'column': 1,
+        'jsModules': {},
+        'jsScope': {'formal': 'formal'},
+        'libraryUri': driver.config.testModule3.libraryUri,
+        'moduleName': driver.config.testModule3.moduleName,
+      });
+
+      expect(
+          driver.responseController.stream,
+          emitsInOrder([
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('new test_library.B.new().c().getNumber()'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('test_library.B.new().printNumber()'),
+            }),
+            equals({
+              'succeeded': true,
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure':
+                  contains('new test_library.B.new().c().getNumber()'),
+            }),
+            equals({
+              'succeeded': true,
+              'errors': isEmpty,
+              'warnings': isEmpty,
+              'infos': isEmpty,
+              'compiledProcedure': contains('return formal;'),
+            }),
+          ]));
+    });
+  });
+}
+
+class ModuleConfiguration {
+  final Uri root;
+  final String outputDir;
+  final String libraryUri;
+  final String moduleName;
+  final String jsFileName;
+  final String fullDillFileName;
+  final String summaryDillFileName;
+
+  ModuleConfiguration(
+      {this.root,
+      this.outputDir,
+      this.moduleName,
+      this.libraryUri,
+      this.jsFileName,
+      this.fullDillFileName,
+      this.summaryDillFileName});
+
+  Uri get jsUri => root.resolve('$outputDir/$jsFileName');
+  Uri get multiRootFullDillUri =>
+      Uri.parse('org-dartlang-app:///$outputDir/$fullDillFileName');
+  Uri get multiRootSummaryUri =>
+      Uri.parse('org-dartlang-app:///$outputDir/$summaryDillFileName');
+
+  Uri get relativeFullDillUri => Uri.parse('$outputDir/$fullDillFileName');
+  Uri get realtiveSummaryUri => Uri.parse('$outputDir/$summaryDillFileName');
+
+  String get fullDillPath => root.resolve('$outputDir/$fullDillFileName').path;
+  String get summaryDillPath =>
+      root.resolve('$outputDir/$summaryDillFileName').path;
+}
+
+class TestProjectConfiguration {
+  final Directory rootDirectory;
+  final String outputDir = 'out';
+  final bool soundNullSafety;
+  final String moduleFormat;
+
+  TestProjectConfiguration(
+      this.rootDirectory, this.soundNullSafety, this.moduleFormat);
+
+  ModuleConfiguration get mainModule => ModuleConfiguration(
+      root: root,
+      outputDir: outputDir,
+      moduleName: 'packages/_testPackage/main',
+      libraryUri: 'org-dartlang-app:/lib/main.dart',
+      jsFileName: 'main.js',
+      fullDillFileName: 'main.full.dill',
+      summaryDillFileName: 'main.dill');
+
+  ModuleConfiguration get testModule => ModuleConfiguration(
+      root: root,
+      outputDir: outputDir,
+      moduleName: 'packages/_testPackage/test_library',
+      libraryUri: 'package:_testPackage/test_library.dart',
+      jsFileName: 'test_library.js',
+      fullDillFileName: 'test_library.full.dill',
+      summaryDillFileName: 'test_library.dill');
+
+  // TODO(annagrin): E.g. this module should have a file included that's not
+  // directly reachable from the libraryUri (i.e. where "too much" has been
+  // bundled).
+  ModuleConfiguration get testModule2 => ModuleConfiguration(
+      root: root,
+      outputDir: outputDir,
+      moduleName: 'packages/_testPackage/test_library2',
+      libraryUri: 'package:_testPackage/test_library2.dart',
+      jsFileName: 'test_library2.js',
+      fullDillFileName: 'test_library2.full.dill',
+      summaryDillFileName: 'test_library2.dill');
+
+  ModuleConfiguration get testModule3 => ModuleConfiguration(
+      root: root,
+      outputDir: outputDir,
+      moduleName: 'packages/_testPackage/test_library3',
+      libraryUri: 'package:_testPackage/test_library3.dart',
+      jsFileName: 'test_library3.js',
+      fullDillFileName: 'test_library3.full.dill',
+      summaryDillFileName: 'test_library3.dill');
+
+  String get rootPath => rootDirectory.path;
+  Uri get root => rootDirectory.uri;
+  Uri get outputPath => root.resolve(outputDir);
+  Uri get packagesPath => root.resolve('package_config.json');
+
+  Uri get sdkRoot => computePlatformBinariesLocation();
+  Uri get sdkSummaryPath => soundNullSafety
+      ? sdkRoot.resolve('ddc_outline_sound.dill')
+      : sdkRoot.resolve('ddc_sdk.dill');
+  Uri get librariesPath => sdkRoot.resolve('lib/libraries.json');
+
+  List get inputUris => [
+        {
+          'path': '${mainModule.multiRootFullDillUri}',
+          'summaryPath': '${mainModule.multiRootSummaryUri}',
+          'moduleName': mainModule.moduleName
+        },
+        {
+          'path': '${testModule.multiRootFullDillUri}',
+          'summaryPath': '${testModule.multiRootSummaryUri}',
+          'moduleName': testModule.moduleName
+        },
+        {
+          'path': '${testModule2.multiRootFullDillUri}',
+          'summaryPath': '${testModule2.multiRootSummaryUri}',
+          'moduleName': testModule2.moduleName
+        },
+        {
+          'path': '${testModule3.multiRootFullDillUri}',
+          'summaryPath': '${testModule3.multiRootSummaryUri}',
+          'moduleName': testModule3.moduleName
+        },
+      ];
+
+  List get inputRelativeUris => [
+        {
+          'path': '${mainModule.multiRootFullDillUri}',
+          'summaryPath': '${mainModule.multiRootSummaryUri}',
+          'moduleName': mainModule.moduleName
+        },
+        {
+          'path': '${testModule.multiRootFullDillUri}',
+          'summaryPath': '${testModule.multiRootSummaryUri}',
+          'moduleName': testModule.moduleName
+        },
+        {
+          'path': '${testModule2.multiRootFullDillUri}',
+          'summaryPath': '${testModule2.multiRootSummaryUri}',
+          'moduleName': testModule2.moduleName
+        },
+        {
+          'path': '${testModule3.multiRootFullDillUri}',
+          'summaryPath': '${testModule3.multiRootSummaryUri}',
+          'moduleName': testModule3.moduleName
+        },
+      ];
+
+  List get inputPaths => [
+        {
+          'path': mainModule.fullDillPath,
+          'summaryPath': mainModule.summaryDillPath,
+          'moduleName': mainModule.moduleName
+        },
+        {
+          'path': testModule.fullDillPath,
+          'summaryPath': testModule.summaryDillPath,
+          'moduleName': testModule.moduleName
+        },
+        {
+          'path': testModule2.fullDillPath,
+          'summaryPath': testModule2.summaryDillPath,
+          'moduleName': testModule2.moduleName
+        },
+        {
+          'path': testModule3.fullDillPath,
+          'summaryPath': testModule3.summaryDillPath,
+          'moduleName': testModule3.moduleName
+        },
+      ];
+
+  void createTestProject() {
+    var pubspec = root.resolve('pubspec.yaml');
+    File.fromUri(pubspec)
+      ..createSync()
+      ..writeAsStringSync('''
+name: _testPackage
+version: 1.0.0
+
+environment:
+  sdk: '>=2.8.0 <3.0.0'
+''');
+
+    File.fromUri(packagesPath)
+      ..createSync()
+      ..writeAsStringSync('''
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "_testPackage",
+            "rootUri": "./lib",
+            "packageUri": "./"
+          }
+        ]
+      }
+      ''');
+
+    var main = root.resolve('lib/main.dart');
+    File.fromUri(main)
+      ..createSync(recursive: true)
+      ..writeAsStringSync('''
+
+import 'package:_testPackage/test_library.dart';
+import 'package:_testPackage/test_library3.dart';
+
+var global = 0;
+
+void main() {
+  var count = 0;
+  // line 9
+  print('Global is: \${++global}');
+  print('Count is: \${++count}');
+
+  B b = new B();
+}
+
+extension NumberParsing on String {
+  int parseInt() {
+    var ret = int.parse(this);
+    // line 19
+    return ret;
+  }
+}
+
+void linkToImports() {
+  testLibraryFunction(42);
+  testLibraryFunction3(42);
+}
+''');
+
+    var testLibrary = root.resolve('lib/test_library.dart');
+    File.fromUri(testLibrary)
+      ..createSync()
+      ..writeAsStringSync('''
+
+import 'package:_testPackage/test_library2.dart';
+
+int testLibraryFunction(int formal) {
+  return formal; // line 5
+}
+
+int callLibraryFunction2(int formal) {
+  return testLibraryFunction2(formal); // line 9
+}
+
+class B {
+  C c() => new C();
+  void printNumber() {
+    print(c().getNumber() + 1);
+  }
+}
+''');
+
+    var testLibrary2 = root.resolve('lib/test_library2.dart');
+    File.fromUri(testLibrary2)
+      ..createSync()
+      ..writeAsStringSync('''
+
+int testLibraryFunction2(int formal) {
+  return formal; // line 3
+}
+
+class C {
+  int getNumber() => 42;
+}
+''');
+
+    var testLibrary3 = root.resolve('lib/test_library3.dart');
+    File.fromUri(testLibrary3)
+      ..createSync()
+      ..writeAsStringSync('''
+
+int testLibraryFunction3(int formal) {
+  return formal; // line 3
+}
+''');
+  }
+}
+
+abstract class TestDriver {
+  final bool soundNullSafety;
+  final String moduleFormat;
+
+  FileSystem fileSystem;
+  FileSystem assetFileSystem;
+
+  Directory tempDir;
+  TestProjectConfiguration config;
+  List inputs;
+
+  StreamController<Map<String, dynamic>> requestController;
+  StreamController<Map<String, dynamic>> responseController;
+  ExpressionCompilerWorker worker;
+  Future<void> workerDone;
+
+  TestDriver(this.soundNullSafety, this.moduleFormat);
+
+  /// Initialize file systems, inputs, and start servers if needed.
+  Future<void> start();
+
+  Future<void> stop() => workerDone;
+
+  Future<void> setUpAll() async {
+    tempDir = Directory.systemTemp.createTempSync('foo bar');
+    config = TestProjectConfiguration(tempDir, soundNullSafety, moduleFormat);
+
+    await start();
+
+    // Build the project.
+    config.createTestProject();
+    var kernelGenerator = DDCKernelGenerator(config);
+    await kernelGenerator.generate();
+  }
+
+  Future<void> tearDownAll() async {
+    await stop();
+    tempDir.deleteSync(recursive: true);
+  }
+
+  Future<void> setUp() async {
+    requestController = StreamController<Map<String, dynamic>>();
+    responseController = StreamController<Map<String, dynamic>>();
+    worker = await ExpressionCompilerWorker.create(
+      librariesSpecificationUri: config.librariesPath,
+      // We should be able to load everything from dill and not
+      // require source parsing. Webdev and google3 integration
+      // currently rely on that. Make the test fail on source
+      // reading by not providing a packages file.
+      packagesFile: null,
+      sdkSummary: config.sdkSummaryPath,
+      fileSystem: assetFileSystem,
+      requestStream: requestController.stream,
+      sendResponse: responseController.add,
+      soundNullSafety: soundNullSafety,
+      verbose: verbose,
+    );
+    workerDone = worker.run();
+  }
+
+  Future<void> tearDown() async {
+    unawaited(requestController.close());
+    await workerDone;
+    unawaited(responseController.close());
+    worker?.close();
+  }
+}
+
+class StandardFileSystemTestDriver extends TestDriver {
+  StandardFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
+      : super(soundNullSafety, moduleFormat);
+
+  @override
+  Future<void> start() async {
+    inputs = config.inputPaths;
+    fileSystem = MultiRootFileSystem(
+        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
+    assetFileSystem = StandardFileSystem.instance;
+  }
+}
+
+class MultiRootFileSystemTestDriver extends TestDriver {
+  MultiRootFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
+      : super(soundNullSafety, moduleFormat);
+
+  @override
+  Future<void> start() async {
+    inputs = config.inputUris;
+    fileSystem = MultiRootFileSystem(
+        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
+    assetFileSystem = fileSystem;
+  }
+}
+
+class AssetFileSystemTestDriver extends TestDriver {
+  TestAssetServer server;
+  int port;
+
+  AssetFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
+      : super(soundNullSafety, moduleFormat);
+
+  @override
+  Future<void> start() async {
+    inputs = config.inputRelativeUris;
+    fileSystem = MultiRootFileSystem(
+        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
+    port = await findUnusedPort();
+    server = TestAssetServer(fileSystem);
+    assetFileSystem = AssetFileSystem(fileSystem, 'localhost', '$port');
+    await server.start('localhost', port);
+  }
+
+  @override
+  Future<void> stop() async {
+    server.stop();
+    await super.stop();
+    (assetFileSystem as AssetFileSystem).close();
+  }
+}
+
+class TestAssetServer {
+  FileSystem fileSystem;
+  HttpServer server;
+
+  TestAssetServer(this.fileSystem);
+
+  FutureOr<Response> handler(Request request) async {
+    var requested = request.requestedUri.path;
+    final uri = Uri.parse('org-dartlang-app:/$requested');
+
+    assert(requested.startsWith('/'));
+    final path = requested.substring(1);
+
+    try {
+      var entity = fileSystem.entityForUri(uri);
+      if (await entity.existsAsyncIfPossible()) {
+        if (request.method == 'HEAD') {
+          var headers = {
+            'content-length': null,
+            ...request.headers,
+          };
+          return Response.ok(null, headers: headers);
+        }
+
+        if (request.method == 'GET') {
+          // 'readAsBytes'
+          var contents = await entity.readAsBytesAsyncIfPossible();
+          var headers = {
+            'content-length': '${contents.length}',
+            ...request.headers,
+          };
+          return Response.ok(contents, headers: headers);
+        }
+      }
+      return Response.notFound(path);
+    } catch (e, s) {
+      return Response.internalServerError(body: '$e:$s');
+    }
+  }
+
+  Future<void> start(String hostname, int port) async {
+    server = await HttpMultiServer.bind(hostname, port);
+    serveRequests(server, handler);
+  }
+
+  void stop() {
+    server?.close(force: true);
+  }
+}
+
+/// Uses DDC to generate kernel from the test code
+/// in order to simulate webdev environment
+class DDCKernelGenerator {
+  final TestProjectConfiguration config;
+
+  DDCKernelGenerator(this.config);
+
+  Future<int> generate() async {
+    var dart = Platform.resolvedExecutable;
+    var dartdevc =
+        p.join(p.dirname(dart), 'snapshots', 'dartdevc.dart.snapshot');
+
+    Directory.fromUri(config.outputPath).createSync();
+
+    // generate test_library3.full.dill
+    var args = [
+      dartdevc,
+      config.testModule3.libraryUri,
+      '-o',
+      config.testModule3.jsUri.toFilePath(),
+      '--source-map',
+      '--experimental-emit-debug-metadata',
+      '--emit-debug-symbols',
+      '--experimental-output-compiled-kernel',
+      '--dart-sdk-summary',
+      config.sdkSummaryPath.path,
+      '--multi-root',
+      '${config.root}',
+      '--multi-root-scheme',
+      'org-dartlang-app',
+      '--packages',
+      config.packagesPath.path,
+      if (config.soundNullSafety) '--sound-null-safety',
+      if (!config.soundNullSafety) '--no-sound-null-safety',
+      '--modules',
+      '${config.moduleFormat}',
+    ];
+
+    var exitCode = await runProcess(dart, args, config.rootPath);
+    if (exitCode != 0) {
+      return exitCode;
+    }
+
+    // generate test_library2.full.dill
+    args = [
+      dartdevc,
+      config.testModule2.libraryUri,
+      '-o',
+      config.testModule2.jsUri.toFilePath(),
+      '--source-map',
+      '--experimental-emit-debug-metadata',
+      '--emit-debug-symbols',
+      '--experimental-output-compiled-kernel',
+      '--dart-sdk-summary',
+      config.sdkSummaryPath.path,
+      '--multi-root',
+      '${config.root}',
+      '--multi-root-scheme',
+      'org-dartlang-app',
+      '--packages',
+      config.packagesPath.path,
+      if (config.soundNullSafety) '--sound-null-safety',
+      if (!config.soundNullSafety) '--no-sound-null-safety',
+      '--modules',
+      '${config.moduleFormat}',
+    ];
+
+    exitCode = await runProcess(dart, args, config.rootPath);
+    if (exitCode != 0) {
+      return exitCode;
+    }
+
+    // generate test_library.full.dill
+    args = [
+      dartdevc,
+      config.testModule.libraryUri,
+      '--summary',
+      '${config.testModule2.multiRootSummaryUri}='
+          '${config.testModule2.moduleName}',
+      '-o',
+      config.testModule.jsUri.toFilePath(),
+      '--source-map',
+      '--experimental-emit-debug-metadata',
+      '--emit-debug-symbols',
+      '--experimental-output-compiled-kernel',
+      '--dart-sdk-summary',
+      config.sdkSummaryPath.path,
+      '--multi-root',
+      '${config.root}',
+      '--multi-root-scheme',
+      'org-dartlang-app',
+      '--packages',
+      config.packagesPath.path,
+      if (config.soundNullSafety) '--sound-null-safety',
+      if (!config.soundNullSafety) '--no-sound-null-safety',
+      '--modules',
+      '${config.moduleFormat}',
+    ];
+
+    exitCode = await runProcess(dart, args, config.rootPath);
+    if (exitCode != 0) {
+      return exitCode;
+    }
+
+    // generate main.full.dill
+    args = [
+      dartdevc,
+      config.mainModule.libraryUri,
+      '--summary',
+      '${config.testModule3.multiRootSummaryUri}='
+          '${config.testModule3.moduleName}',
+      '--summary',
+      '${config.testModule.multiRootSummaryUri}='
+          '${config.testModule.moduleName}',
+      '-o',
+      config.mainModule.jsUri.toFilePath(),
+      '--source-map',
+      '--experimental-emit-debug-metadata',
+      '--emit-debug-symbols',
+      '--experimental-output-compiled-kernel',
+      '--dart-sdk-summary',
+      config.sdkSummaryPath.path,
+      '--multi-root',
+      '${config.root}',
+      '--multi-root-scheme',
+      'org-dartlang-app',
+      '--packages',
+      config.packagesPath.toFilePath(),
+      if (config.soundNullSafety) '--sound-null-safety',
+      if (!config.soundNullSafety) '--no-sound-null-safety',
+      '--modules',
+      '${config.moduleFormat}',
+    ];
+
+    return await runProcess(dart, args, config.rootPath);
+  }
+}
+
+Future<int> runProcess(
+    String command, List<String> args, String workingDirectory) async {
+  if (verbose) {
+    print('Running command in $workingDirectory:'
+        '\n\t $command ${args.join(' ')}, ');
+  }
+  var process =
+      await Process.start(command, args, workingDirectory: workingDirectory)
+          .then((Process process) {
+    process
+      ..stdout.transform(utf8.decoder).listen(stdout.write)
+      ..stderr.transform(utf8.decoder).listen(stderr.write);
+    return process;
+  });
+
+  return await process.exitCode;
+}
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_test.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_test.dart
deleted file mode 100644
index 8bf3653..0000000
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_worker_test.dart
+++ /dev/null
@@ -1,1106 +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.
-
-// @dart = 2.9
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io'
-    show Directory, File, HttpServer, Platform, Process, stderr, stdout;
-import 'dart:isolate';
-
-import 'package:browser_launcher/browser_launcher.dart';
-import 'package:build_integration/file_system/multi_root.dart';
-import 'package:dev_compiler/src/kernel/asset_file_system.dart';
-import 'package:dev_compiler/src/kernel/expression_compiler_worker.dart';
-import 'package:front_end/src/api_prototype/file_system.dart';
-import 'package:front_end/src/api_prototype/standard_file_system.dart';
-import 'package:front_end/src/compute_platform_binaries_location.dart';
-import 'package:http_multi_server/http_multi_server.dart';
-import 'package:path/path.dart' as p;
-import 'package:pedantic/pedantic.dart';
-import 'package:shelf/shelf.dart';
-import 'package:shelf/shelf_io.dart';
-import 'package:test/test.dart';
-
-/// Verbose mode for debugging
-bool get verbose => false;
-
-void main() async {
-  for (var moduleFormat in ['amd', 'ddc']) {
-    group('$moduleFormat module format -', () {
-      for (var soundNullSafety in [true, false]) {
-        group('${soundNullSafety ? "sound" : "unsound"} null safety -', () {
-          group('expression compiler worker on startup', () {
-            Directory tempDir;
-            ReceivePort receivePort;
-
-            setUp(() async {
-              tempDir = Directory.systemTemp.createTempSync('foo bar');
-              receivePort = ReceivePort();
-            });
-
-            tearDown(() async {
-              tempDir.deleteSync(recursive: true);
-              receivePort.close();
-            });
-
-            test('reports failure to consumer', () async {
-              expect(
-                  receivePort,
-                  emitsInOrder([
-                    equals(isA<SendPort>()),
-                    equals({
-                      'succeeded': false,
-                      'stackTrace': isNotNull,
-                      'exception': contains('Could not load SDK component'),
-                    }),
-                  ]));
-
-              try {
-                var badPath = 'file:///path/does/not/exist';
-                await ExpressionCompilerWorker.createAndStart(
-                  [
-                    '--libraries-file',
-                    badPath,
-                    '--dart-sdk-summary',
-                    badPath,
-                    '--module-format',
-                    moduleFormat,
-                    soundNullSafety
-                        ? '--sound-null-safety'
-                        : '--no-sound-null-safety',
-                    if (verbose) '--verbose',
-                  ],
-                  sendPort: receivePort.sendPort,
-                );
-              } catch (e) {
-                throwsA(contains('Could not load SDK component'));
-              }
-            });
-          });
-
-          group('reading assets using standard file system - ', () {
-            runExpressionCompilationTests(
-                StandardFileSystemTestDriver(soundNullSafety, moduleFormat));
-          });
-
-          group('reading assets using multiroot file system - ', () {
-            runExpressionCompilationTests(
-                MultiRootFileSystemTestDriver(soundNullSafety, moduleFormat));
-          });
-
-          group('reading assets using asset file system -', () {
-            runExpressionCompilationTests(
-                AssetFileSystemTestDriver(soundNullSafety, moduleFormat));
-          });
-        });
-      }
-    });
-  }
-}
-
-void runExpressionCompilationTests(TestDriver driver) {
-  group('expression compiler worker', () {
-    setUpAll(() async {
-      await driver.setUpAll();
-    });
-
-    tearDownAll(() async {
-      await driver.tearDownAll();
-    });
-
-    setUp(() async {
-      await driver.setUp();
-    });
-
-    tearDown(() async {
-      await driver.tearDown();
-    });
-
-    test('can compile expressions in sdk', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'other',
-        'line': 107,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'other': 'other'},
-        'libraryUri': 'dart:collection',
-        'moduleName': 'dart_sdk',
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return other;'),
-            })
-          ]));
-    }, skip: 'Evaluating expressions in SDK is not supported yet');
-
-    test('can compile expressions in a library', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 5,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule.libraryUri,
-        'moduleName': driver.config.testModule.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            })
-          ]));
-    });
-
-    test('can compile expressions in main', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'count',
-        'line': 9,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'count': 'count'},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return count;'),
-            })
-          ]));
-    });
-
-    test('can compile expressions in main (extension method)', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'ret',
-        'line': 19,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'ret': 'ret'},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return ret;'),
-            })
-          ]));
-    });
-
-    test('can compile transitive expressions in main', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().c().getNumber()',
-        'line': 9,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('new test_library.B.new().c().getNumber()'),
-            })
-          ]));
-    });
-
-    test('can compile series of expressions in various libraries', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().c().getNumber()',
-        'line': 8,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 5,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule.libraryUri,
-        'moduleName': driver.config.testModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 3,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule2.libraryUri,
-        'moduleName': driver.config.testModule2.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 3,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule3.libraryUri,
-        'moduleName': driver.config.testModule3.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().printNumber()',
-        'line': 9,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('new test_library.B.new().c().getNumber()'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('test_library.B.new().printNumber()'),
-            })
-          ]));
-    });
-
-    test('can compile after dependency update', () async {
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().c().getNumber()',
-        'line': 8,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 5,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule.libraryUri,
-        'moduleName': driver.config.testModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().printNumber()',
-        'line': 9,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'UpdateDeps',
-        'inputs': driver.inputs,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'B().c().getNumber()',
-        'line': 8,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {},
-        'libraryUri': driver.config.mainModule.libraryUri,
-        'moduleName': driver.config.mainModule.moduleName,
-      });
-
-      driver.requestController.add({
-        'command': 'CompileExpression',
-        'expression': 'formal',
-        'line': 3,
-        'column': 1,
-        'jsModules': {},
-        'jsScope': {'formal': 'formal'},
-        'libraryUri': driver.config.testModule3.libraryUri,
-        'moduleName': driver.config.testModule3.moduleName,
-      });
-
-      expect(
-          driver.responseController.stream,
-          emitsInOrder([
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('new test_library.B.new().c().getNumber()'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('test_library.B.new().printNumber()'),
-            }),
-            equals({
-              'succeeded': true,
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure':
-                  contains('new test_library.B.new().c().getNumber()'),
-            }),
-            equals({
-              'succeeded': true,
-              'errors': isEmpty,
-              'warnings': isEmpty,
-              'infos': isEmpty,
-              'compiledProcedure': contains('return formal;'),
-            }),
-          ]));
-    });
-  });
-}
-
-class ModuleConfiguration {
-  final Uri root;
-  final String outputDir;
-  final String libraryUri;
-  final String moduleName;
-  final String jsFileName;
-  final String fullDillFileName;
-  final String summaryDillFileName;
-
-  ModuleConfiguration(
-      {this.root,
-      this.outputDir,
-      this.moduleName,
-      this.libraryUri,
-      this.jsFileName,
-      this.fullDillFileName,
-      this.summaryDillFileName});
-
-  Uri get jsUri => root.resolve('$outputDir/$jsFileName');
-  Uri get multiRootFullDillUri =>
-      Uri.parse('org-dartlang-app:///$outputDir/$fullDillFileName');
-  Uri get multiRootSummaryUri =>
-      Uri.parse('org-dartlang-app:///$outputDir/$summaryDillFileName');
-
-  Uri get relativeFullDillUri => Uri.parse('$outputDir/$fullDillFileName');
-  Uri get realtiveSummaryUri => Uri.parse('$outputDir/$summaryDillFileName');
-
-  String get fullDillPath => root.resolve('$outputDir/$fullDillFileName').path;
-  String get summaryDillPath =>
-      root.resolve('$outputDir/$summaryDillFileName').path;
-}
-
-class TestProjectConfiguration {
-  final Directory rootDirectory;
-  final String outputDir = 'out';
-  final bool soundNullSafety;
-  final String moduleFormat;
-
-  TestProjectConfiguration(
-      this.rootDirectory, this.soundNullSafety, this.moduleFormat);
-
-  ModuleConfiguration get mainModule => ModuleConfiguration(
-      root: root,
-      outputDir: outputDir,
-      moduleName: 'packages/_testPackage/main',
-      libraryUri: 'org-dartlang-app:/lib/main.dart',
-      jsFileName: 'main.js',
-      fullDillFileName: 'main.full.dill',
-      summaryDillFileName: 'main.dill');
-
-  ModuleConfiguration get testModule => ModuleConfiguration(
-      root: root,
-      outputDir: outputDir,
-      moduleName: 'packages/_testPackage/test_library',
-      libraryUri: 'package:_testPackage/test_library.dart',
-      jsFileName: 'test_library.js',
-      fullDillFileName: 'test_library.full.dill',
-      summaryDillFileName: 'test_library.dill');
-
-  // TODO(annagrin): E.g. this module should have a file included that's not
-  // directly reachable from the libraryUri (i.e. where "too much" has been
-  // bundled).
-  ModuleConfiguration get testModule2 => ModuleConfiguration(
-      root: root,
-      outputDir: outputDir,
-      moduleName: 'packages/_testPackage/test_library2',
-      libraryUri: 'package:_testPackage/test_library2.dart',
-      jsFileName: 'test_library2.js',
-      fullDillFileName: 'test_library2.full.dill',
-      summaryDillFileName: 'test_library2.dill');
-
-  ModuleConfiguration get testModule3 => ModuleConfiguration(
-      root: root,
-      outputDir: outputDir,
-      moduleName: 'packages/_testPackage/test_library3',
-      libraryUri: 'package:_testPackage/test_library3.dart',
-      jsFileName: 'test_library3.js',
-      fullDillFileName: 'test_library3.full.dill',
-      summaryDillFileName: 'test_library3.dill');
-
-  String get rootPath => rootDirectory.path;
-  Uri get root => rootDirectory.uri;
-  Uri get outputPath => root.resolve(outputDir);
-  Uri get packagesPath => root.resolve('package_config.json');
-
-  Uri get sdkRoot => computePlatformBinariesLocation();
-  Uri get sdkSummaryPath => soundNullSafety
-      ? sdkRoot.resolve('ddc_outline_sound.dill')
-      : sdkRoot.resolve('ddc_sdk.dill');
-  Uri get librariesPath => sdkRoot.resolve('lib/libraries.json');
-
-  List get inputUris => [
-        {
-          'path': '${mainModule.multiRootFullDillUri}',
-          'summaryPath': '${mainModule.multiRootSummaryUri}',
-          'moduleName': mainModule.moduleName
-        },
-        {
-          'path': '${testModule.multiRootFullDillUri}',
-          'summaryPath': '${testModule.multiRootSummaryUri}',
-          'moduleName': testModule.moduleName
-        },
-        {
-          'path': '${testModule2.multiRootFullDillUri}',
-          'summaryPath': '${testModule2.multiRootSummaryUri}',
-          'moduleName': testModule2.moduleName
-        },
-        {
-          'path': '${testModule3.multiRootFullDillUri}',
-          'summaryPath': '${testModule3.multiRootSummaryUri}',
-          'moduleName': testModule3.moduleName
-        },
-      ];
-
-  List get inputRelativeUris => [
-        {
-          'path': '${mainModule.multiRootFullDillUri}',
-          'summaryPath': '${mainModule.multiRootSummaryUri}',
-          'moduleName': mainModule.moduleName
-        },
-        {
-          'path': '${testModule.multiRootFullDillUri}',
-          'summaryPath': '${testModule.multiRootSummaryUri}',
-          'moduleName': testModule.moduleName
-        },
-        {
-          'path': '${testModule2.multiRootFullDillUri}',
-          'summaryPath': '${testModule2.multiRootSummaryUri}',
-          'moduleName': testModule2.moduleName
-        },
-        {
-          'path': '${testModule3.multiRootFullDillUri}',
-          'summaryPath': '${testModule3.multiRootSummaryUri}',
-          'moduleName': testModule3.moduleName
-        },
-      ];
-
-  List get inputPaths => [
-        {
-          'path': mainModule.fullDillPath,
-          'summaryPath': mainModule.summaryDillPath,
-          'moduleName': mainModule.moduleName
-        },
-        {
-          'path': testModule.fullDillPath,
-          'summaryPath': testModule.summaryDillPath,
-          'moduleName': testModule.moduleName
-        },
-        {
-          'path': testModule2.fullDillPath,
-          'summaryPath': testModule2.summaryDillPath,
-          'moduleName': testModule2.moduleName
-        },
-        {
-          'path': testModule3.fullDillPath,
-          'summaryPath': testModule3.summaryDillPath,
-          'moduleName': testModule3.moduleName
-        },
-      ];
-
-  void createTestProject() {
-    var pubspec = root.resolve('pubspec.yaml');
-    File.fromUri(pubspec)
-      ..createSync()
-      ..writeAsStringSync('''
-name: _testPackage
-version: 1.0.0
-
-environment:
-  sdk: '>=2.8.0 <3.0.0'
-''');
-
-    File.fromUri(packagesPath)
-      ..createSync()
-      ..writeAsStringSync('''
-      {
-        "configVersion": 2,
-        "packages": [
-          {
-            "name": "_testPackage",
-            "rootUri": "./lib",
-            "packageUri": "./"
-          }
-        ]
-      }
-      ''');
-
-    var main = root.resolve('lib/main.dart');
-    File.fromUri(main)
-      ..createSync(recursive: true)
-      ..writeAsStringSync('''
-
-import 'package:_testPackage/test_library.dart';
-import 'package:_testPackage/test_library3.dart';
-
-var global = 0;
-
-void main() {
-  var count = 0;
-  // line 9
-  print('Global is: \${++global}');
-  print('Count is: \${++count}');
-
-  B b = new B();
-}
-
-extension NumberParsing on String {
-  int parseInt() {
-    var ret = int.parse(this);
-    // line 19
-    return ret;
-  }
-}
-
-void linkToImports() {
-  testLibraryFunction(42);
-  testLibraryFunction3(42);
-}
-''');
-
-    var testLibrary = root.resolve('lib/test_library.dart');
-    File.fromUri(testLibrary)
-      ..createSync()
-      ..writeAsStringSync('''
-
-import 'package:_testPackage/test_library2.dart';
-
-int testLibraryFunction(int formal) {
-  return formal; // line 5
-}
-
-int callLibraryFunction2(int formal) {
-  return testLibraryFunction2(formal); // line 9
-}
-
-class B {
-  C c() => new C();
-  void printNumber() {
-    print(c().getNumber() + 1);
-  }
-}
-''');
-
-    var testLibrary2 = root.resolve('lib/test_library2.dart');
-    File.fromUri(testLibrary2)
-      ..createSync()
-      ..writeAsStringSync('''
-
-int testLibraryFunction2(int formal) {
-  return formal; // line 3
-}
-
-class C {
-  int getNumber() => 42;
-}
-''');
-
-    var testLibrary3 = root.resolve('lib/test_library3.dart');
-    File.fromUri(testLibrary3)
-      ..createSync()
-      ..writeAsStringSync('''
-
-int testLibraryFunction3(int formal) {
-  return formal; // line 3
-}
-''');
-  }
-}
-
-abstract class TestDriver {
-  final bool soundNullSafety;
-  final String moduleFormat;
-
-  FileSystem fileSystem;
-  FileSystem assetFileSystem;
-
-  Directory tempDir;
-  TestProjectConfiguration config;
-  List inputs;
-
-  StreamController<Map<String, dynamic>> requestController;
-  StreamController<Map<String, dynamic>> responseController;
-  ExpressionCompilerWorker worker;
-  Future<void> workerDone;
-
-  TestDriver(this.soundNullSafety, this.moduleFormat);
-
-  /// Initialize file systems, inputs, and start servers if needed.
-  Future<void> start();
-
-  Future<void> stop() => workerDone;
-
-  Future<void> setUpAll() async {
-    tempDir = Directory.systemTemp.createTempSync('foo bar');
-    config = TestProjectConfiguration(tempDir, soundNullSafety, moduleFormat);
-
-    await start();
-
-    // Build the project.
-    config.createTestProject();
-    var kernelGenerator = DDCKernelGenerator(config);
-    await kernelGenerator.generate();
-  }
-
-  Future<void> tearDownAll() async {
-    await stop();
-    tempDir.deleteSync(recursive: true);
-  }
-
-  Future<void> setUp() async {
-    requestController = StreamController<Map<String, dynamic>>();
-    responseController = StreamController<Map<String, dynamic>>();
-    worker = await ExpressionCompilerWorker.create(
-      librariesSpecificationUri: config.librariesPath,
-      // We should be able to load everything from dill and not
-      // require source parsing. Webdev and google3 integration
-      // currently rely on that. Make the test fail on source
-      // reading by not providing a packages file.
-      packagesFile: null,
-      sdkSummary: config.sdkSummaryPath,
-      fileSystem: assetFileSystem,
-      requestStream: requestController.stream,
-      sendResponse: responseController.add,
-      soundNullSafety: soundNullSafety,
-      verbose: verbose,
-    );
-    workerDone = worker.run();
-  }
-
-  Future<void> tearDown() async {
-    unawaited(requestController.close());
-    await workerDone;
-    unawaited(responseController.close());
-    worker?.close();
-  }
-}
-
-class StandardFileSystemTestDriver extends TestDriver {
-  StandardFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
-      : super(soundNullSafety, moduleFormat);
-
-  @override
-  Future<void> start() async {
-    inputs = config.inputPaths;
-    fileSystem = MultiRootFileSystem(
-        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
-    assetFileSystem = StandardFileSystem.instance;
-  }
-}
-
-class MultiRootFileSystemTestDriver extends TestDriver {
-  MultiRootFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
-      : super(soundNullSafety, moduleFormat);
-
-  @override
-  Future<void> start() async {
-    inputs = config.inputUris;
-    fileSystem = MultiRootFileSystem(
-        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
-    assetFileSystem = fileSystem;
-  }
-}
-
-class AssetFileSystemTestDriver extends TestDriver {
-  TestAssetServer server;
-  int port;
-
-  AssetFileSystemTestDriver(bool soundNullSafety, String moduleFormat)
-      : super(soundNullSafety, moduleFormat);
-
-  @override
-  Future<void> start() async {
-    inputs = config.inputRelativeUris;
-    fileSystem = MultiRootFileSystem(
-        'org-dartlang-app', [tempDir.uri], StandardFileSystem.instance);
-    port = await findUnusedPort();
-    server = TestAssetServer(fileSystem);
-    assetFileSystem = AssetFileSystem(fileSystem, 'localhost', '$port');
-    await server.start('localhost', port);
-  }
-
-  @override
-  Future<void> stop() async {
-    server.stop();
-    await super.stop();
-    (assetFileSystem as AssetFileSystem).close();
-  }
-}
-
-class TestAssetServer {
-  FileSystem fileSystem;
-  HttpServer server;
-
-  TestAssetServer(this.fileSystem);
-
-  FutureOr<Response> handler(Request request) async {
-    var requested = request.requestedUri.path;
-    final uri = Uri.parse('org-dartlang-app:/$requested');
-
-    assert(requested.startsWith('/'));
-    final path = requested.substring(1);
-
-    try {
-      var entity = fileSystem.entityForUri(uri);
-      if (await entity.existsAsyncIfPossible()) {
-        if (request.method == 'HEAD') {
-          var headers = {
-            'content-length': null,
-            ...request.headers,
-          };
-          return Response.ok(null, headers: headers);
-        }
-
-        if (request.method == 'GET') {
-          // 'readAsBytes'
-          var contents = await entity.readAsBytesAsyncIfPossible();
-          var headers = {
-            'content-length': '${contents.length}',
-            ...request.headers,
-          };
-          return Response.ok(contents, headers: headers);
-        }
-      }
-      return Response.notFound(path);
-    } catch (e, s) {
-      return Response.internalServerError(body: '$e:$s');
-    }
-  }
-
-  Future<void> start(String hostname, int port) async {
-    server = await HttpMultiServer.bind(hostname, port);
-    serveRequests(server, handler);
-  }
-
-  void stop() {
-    server?.close(force: true);
-  }
-}
-
-/// Uses DDC to generate kernel from the test code
-/// in order to simulate webdev environment
-class DDCKernelGenerator {
-  final TestProjectConfiguration config;
-
-  DDCKernelGenerator(this.config);
-
-  Future<int> generate() async {
-    var dart = Platform.resolvedExecutable;
-    var dartdevc =
-        p.join(p.dirname(dart), 'snapshots', 'dartdevc.dart.snapshot');
-
-    Directory.fromUri(config.outputPath).createSync();
-
-    // generate test_library3.full.dill
-    var args = [
-      dartdevc,
-      config.testModule3.libraryUri,
-      '-o',
-      config.testModule3.jsUri.toFilePath(),
-      '--source-map',
-      '--experimental-emit-debug-metadata',
-      '--emit-debug-symbols',
-      '--experimental-output-compiled-kernel',
-      '--dart-sdk-summary',
-      config.sdkSummaryPath.path,
-      '--multi-root',
-      '${config.root}',
-      '--multi-root-scheme',
-      'org-dartlang-app',
-      '--packages',
-      config.packagesPath.path,
-      if (config.soundNullSafety) '--sound-null-safety',
-      if (!config.soundNullSafety) '--no-sound-null-safety',
-      '--modules',
-      '${config.moduleFormat}',
-    ];
-
-    var exitCode = await runProcess(dart, args, config.rootPath);
-    if (exitCode != 0) {
-      return exitCode;
-    }
-
-    // generate test_library2.full.dill
-    args = [
-      dartdevc,
-      config.testModule2.libraryUri,
-      '-o',
-      config.testModule2.jsUri.toFilePath(),
-      '--source-map',
-      '--experimental-emit-debug-metadata',
-      '--emit-debug-symbols',
-      '--experimental-output-compiled-kernel',
-      '--dart-sdk-summary',
-      config.sdkSummaryPath.path,
-      '--multi-root',
-      '${config.root}',
-      '--multi-root-scheme',
-      'org-dartlang-app',
-      '--packages',
-      config.packagesPath.path,
-      if (config.soundNullSafety) '--sound-null-safety',
-      if (!config.soundNullSafety) '--no-sound-null-safety',
-      '--modules',
-      '${config.moduleFormat}',
-    ];
-
-    exitCode = await runProcess(dart, args, config.rootPath);
-    if (exitCode != 0) {
-      return exitCode;
-    }
-
-    // generate test_library.full.dill
-    args = [
-      dartdevc,
-      config.testModule.libraryUri,
-      '--summary',
-      '${config.testModule2.multiRootSummaryUri}='
-          '${config.testModule2.moduleName}',
-      '-o',
-      config.testModule.jsUri.toFilePath(),
-      '--source-map',
-      '--experimental-emit-debug-metadata',
-      '--emit-debug-symbols',
-      '--experimental-output-compiled-kernel',
-      '--dart-sdk-summary',
-      config.sdkSummaryPath.path,
-      '--multi-root',
-      '${config.root}',
-      '--multi-root-scheme',
-      'org-dartlang-app',
-      '--packages',
-      config.packagesPath.path,
-      if (config.soundNullSafety) '--sound-null-safety',
-      if (!config.soundNullSafety) '--no-sound-null-safety',
-      '--modules',
-      '${config.moduleFormat}',
-    ];
-
-    exitCode = await runProcess(dart, args, config.rootPath);
-    if (exitCode != 0) {
-      return exitCode;
-    }
-
-    // generate main.full.dill
-    args = [
-      dartdevc,
-      config.mainModule.libraryUri,
-      '--summary',
-      '${config.testModule3.multiRootSummaryUri}='
-          '${config.testModule3.moduleName}',
-      '--summary',
-      '${config.testModule.multiRootSummaryUri}='
-          '${config.testModule.moduleName}',
-      '-o',
-      config.mainModule.jsUri.toFilePath(),
-      '--source-map',
-      '--experimental-emit-debug-metadata',
-      '--emit-debug-symbols',
-      '--experimental-output-compiled-kernel',
-      '--dart-sdk-summary',
-      config.sdkSummaryPath.path,
-      '--multi-root',
-      '${config.root}',
-      '--multi-root-scheme',
-      'org-dartlang-app',
-      '--packages',
-      config.packagesPath.toFilePath(),
-      if (config.soundNullSafety) '--sound-null-safety',
-      if (!config.soundNullSafety) '--no-sound-null-safety',
-      '--modules',
-      '${config.moduleFormat}',
-    ];
-
-    return await runProcess(dart, args, config.rootPath);
-  }
-}
-
-Future<int> runProcess(
-    String command, List<String> args, String workingDirectory) async {
-  if (verbose) {
-    print('Running command in $workingDirectory:'
-        '\n\t $command ${args.join(' ')}, ');
-  }
-  var process =
-      await Process.start(command, args, workingDirectory: workingDirectory)
-          .then((Process process) {
-    process
-      ..stdout.transform(utf8.decoder).listen(stdout.write)
-      ..stderr.transform(utf8.decoder).listen(stderr.write);
-    return process;
-  });
-
-  return await process.exitCode;
-}
diff --git a/pkg/dev_compiler/test/module_symbols/class_symbols_test.dart b/pkg/dev_compiler/test/module_symbols/class_symbols_test.dart
index c08995f..7d89f6d0 100644
--- a/pkg/dev_compiler/test/module_symbols/class_symbols_test.dart
+++ b/pkg/dev_compiler/test/module_symbols/class_symbols_test.dart
@@ -10,6 +10,13 @@
 import '../shared_test_options.dart';
 import 'module_symbols_test_shared.dart';
 
+/// Returns the [FunctionSymbol] from [ModuleSymbols] with the [name] in the
+/// original Dart source code or throws an error if there isn't exactly one.
+FunctionSymbol _symbolForDartFunction(ModuleSymbols symbols, String name) =>
+    symbols.functions
+        .where((functionSymbol) => functionSymbol.name == name)
+        .single;
+
 void main() async {
   for (var mode in [
     NullSafetyTestOption('Sound Mode:', true),
@@ -20,6 +27,7 @@
       group('simple class debug symbols', () {
         TestDriver driver;
         ClassSymbol classSymbol;
+        FunctionSymbol functionSymbol;
         final source = '''
           ${options.dartLangComment}
 
@@ -29,6 +37,7 @@
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
+          functionSymbol = result.symbols.functions.single;
         });
         tearDownAll(() {
           driver.cleanUp();
@@ -39,7 +48,9 @@
         test('is not abstract', () async {
           expect(classSymbol.isAbstract, isFalse);
         });
-        // TODO test isConst
+        test('is not const', () async {
+          expect(classSymbol.isConst, isFalse);
+        });
         test('has no superclassId', () async {
           expect(classSymbol.superClassId, isNull);
         });
@@ -71,7 +82,14 @@
         test('no fields', () async {
           expect(classSymbol.variableIds, isEmpty);
         });
-        // TODO only has the implicit constructor in scopeIds.
+        test('only default constructor in functionIds', () {
+          var constructorId = classSymbol.functionIds.single;
+          expect(constructorId, functionSymbol.id);
+          // Default constructor has no name in Dart Kernel AST.
+          expect(functionSymbol.name, isEmpty);
+          // Default constructor is named 'new' in JavaScript.
+          expect(functionSymbol.id, endsWith('A|new'));
+        });
       });
       group('abstract class debug symbols', () {
         TestDriver driver;
@@ -308,14 +326,15 @@
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicInstanceMethod');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
           expect(methodSymbol.id, endsWith('A|publicInstanceMethod'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -340,14 +359,15 @@
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateInstanceMethod');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
           expect(methodSymbol.id, endsWith('A|Symbol(_privateInstanceMethod)'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -372,14 +392,15 @@
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicStaticMethod');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
           expect(methodSymbol.id, endsWith('A|publicStaticMethod'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -404,14 +425,15 @@
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateStaticMethod');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
           expect(methodSymbol.id, endsWith('A|_privateStaticMethod'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -429,21 +451,22 @@
           ${options.dartLangComment}
 
           class A {
-            String get publicGetter() => 'Fosse';
+            String get publicInstanceGetter() => 'Fosse';
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicInstanceGetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|publicGetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|publicInstanceGetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -461,21 +484,22 @@
           ${options.dartLangComment}
 
           class A {
-            String get _privateGetter() => 'Fosse';
+            String get _privateInstanceGetter() => 'Fosse';
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateInstanceGetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|Symbol(_privateGetter)'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|Symbol(_privateInstanceGetter)'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -494,21 +518,22 @@
 
           class A {
             var _value
-            set publicSetter(String v) => _value = v;
+            set publicInstanceSetter(String v) => _value = v;
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicInstanceSetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|publicSetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|publicInstanceSetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -527,21 +552,22 @@
 
           class A {
             var _value
-            set _privateSetter(String v) => _value = v;
+            set _privateInstanceSetter(String v) => _value = v;
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateInstanceSetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|Symbol(_privateSetter)'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|Symbol(_privateInstanceSetter)'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -559,21 +585,22 @@
           ${options.dartLangComment}
 
           class A {
-            static String get publicGetter() => 'Fosse';
+            static String get publicStaticGetter() => 'Fosse';
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicStaticGetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|publicGetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|publicStaticGetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -591,21 +618,22 @@
           ${options.dartLangComment}
 
           class A {
-            static String get _privateGetter() => 'Fosse';
+            static String get _privateStaticGetter() => 'Fosse';
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateStaticGetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|_privateGetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|_privateStaticGetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -624,21 +652,22 @@
 
           class A {
             var _value;
-            static set publicSetter(String v) => _value = v;
+            static set publicStaticSetter(String v) => _value = v;
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicStaticSetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|publicSetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|publicStaticSetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -657,21 +686,22 @@
 
           class A {
             var _value;
-            static set _privateSetter(String v) => _value = v;
+            static set _privateStaticSetter(String v) => _value = v;
           }
           ''';
         setUpAll(() async {
           driver = TestDriver(options, source);
           var result = await driver.compile();
           classSymbol = result.symbols.classes.single;
-          methodSymbol = result.symbols.functions.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateStaticSetter');
         });
         tearDownAll(() {
           driver.cleanUp();
         });
         test('functionId in classSymbol', () async {
-          expect(methodSymbol.id, endsWith('A|_privateSetter'));
-          expect(methodSymbol.id, classSymbol.functionIds.single);
+          expect(methodSymbol.id, endsWith('A|_privateStaticSetter'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
         });
         test('has class scopeId', () async {
           expect(methodSymbol.scopeId, endsWith('|A'));
@@ -681,6 +711,257 @@
           expect(methodSymbol.isStatic, isTrue);
         });
       });
+      group('class public const constructor debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            const A();
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol = _symbolForDartFunction(result.symbols, '');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|new'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+        test('is const', () async {
+          expect(methodSymbol.isConst, isTrue);
+          expect(classSymbol.isConst, isTrue);
+        });
+      });
+      group('class public named constructor debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            A.named();
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol = _symbolForDartFunction(result.symbols, 'named');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|named'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class private named constructor debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A._(this._value);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol = _symbolForDartFunction(result.symbols, '_');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|__'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class unnamed factory debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A._(this._value);
+            factory A() => A._(10);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol = _symbolForDartFunction(result.symbols, '');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|new'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class public named factory debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A._(this._value);
+            factory A.publicFactory() => A._(10);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicFactory');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|publicFactory'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class private named factory debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A._(this._value);
+            factory A._privateFactory() => A._(10);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateFactory');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|_privateFactory'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class public redirecting constructor debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A(this._value);
+            A.publicRedirecting() : this(10);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, 'publicRedirecting');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|publicRedirecting'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
+      group('class private redirecting constructor debug symbols', () {
+        TestDriver driver;
+        ClassSymbol classSymbol;
+        FunctionSymbol methodSymbol;
+        final source = '''
+          ${options.dartLangComment}
+
+          class A {
+            var _value;
+            A(this._value);
+            A._privateRedirecting() : this(10);
+          }
+          ''';
+        setUpAll(() async {
+          driver = TestDriver(options, source);
+          var result = await driver.compile();
+          classSymbol = result.symbols.classes.single;
+          methodSymbol =
+              _symbolForDartFunction(result.symbols, '_privateRedirecting');
+        });
+        tearDownAll(() {
+          driver.cleanUp();
+        });
+        test('functionId in classSymbol', () async {
+          expect(methodSymbol.id, endsWith('A|_privateRedirecting'));
+          expect(classSymbol.functionIds, contains(methodSymbol.id));
+        });
+        test('has class scopeId', () async {
+          expect(methodSymbol.scopeId, endsWith('|A'));
+          expect(methodSymbol.scopeId, classSymbol.id);
+        });
+      });
     });
   }
 }
diff --git a/pkg/dev_compiler/test/module_symbols/module_symbols_json_test.dart b/pkg/dev_compiler/test/module_symbols/module_symbols_json_test.dart
index b62c1c1..586f202 100644
--- a/pkg/dev_compiler/test/module_symbols/module_symbols_json_test.dart
+++ b/pkg/dev_compiler/test/module_symbols/module_symbols_json_test.dart
@@ -4,7 +4,6 @@
 
 // @dart = 2.9
 
-import 'dart:core';
 import 'package:dev_compiler/src/kernel/module_symbols.dart';
 import 'package:test/test.dart';
 
diff --git a/pkg/dev_compiler/test/nullable_inference_test.dart b/pkg/dev_compiler/test/nullable_inference_test.dart
index 47f9e8d..da8d7c6 100644
--- a/pkg/dev_compiler/test/nullable_inference_test.dart
+++ b/pkg/dev_compiler/test/nullable_inference_test.dart
@@ -676,8 +676,8 @@
   var mainUri = Uri.file('/memory/test.dart');
   _fileSystem.entityForUri(mainUri).writeAsStringSync(code);
   var oldCompilerState = _compilerState;
-  _compilerState = await fe.initializeCompiler(oldCompilerState, false, null,
-      sdkUri, packagesUri, null, [], DevCompilerTarget(TargetFlags()),
+  _compilerState = fe.initializeCompiler(oldCompilerState, false, null, sdkUri,
+      packagesUri, null, [], DevCompilerTarget(TargetFlags()),
       fileSystem: _fileSystem,
       explicitExperimentalFlags: const {},
       environmentDefines: const {},
diff --git a/pkg/diagnostic/README.md b/pkg/diagnostic/README.md
index c71c3a7..4c5ddfa 100644
--- a/pkg/diagnostic/README.md
+++ b/pkg/diagnostic/README.md
@@ -11,4 +11,4 @@
 
 See the [LICENSE] file.
 
-[LICENSE]: https://github.com/dart-lang/sdk/blob/master/pkg/diagnostic/LICENSE
+[LICENSE]: https://github.com/dart-lang/sdk/blob/main/pkg/diagnostic/LICENSE
diff --git a/pkg/front_end/analysis_options.yaml b/pkg/front_end/analysis_options.yaml
index b82914b..907c504 100644
--- a/pkg/front_end/analysis_options.yaml
+++ b/pkg/front_end/analysis_options.yaml
@@ -9,6 +9,7 @@
     - curly_braces_in_flow_control_structures
     - prefer_adjacent_string_concatenation
     - unawaited_futures
+    - avoid_void_async
     - recursive_getters
     - avoid_empty_else
     - empty_statements
diff --git a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
index a6d071f..d28d71c 100644
--- a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
+++ b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
@@ -136,8 +136,9 @@
       List<TypeParameter> typeDefinitions,
       String syntheticProcedureName,
       Uri libraryUri,
-      [String? className,
-      bool isStatic = false]);
+      {String? className,
+      String? methodName,
+      bool isStatic = false});
 
   /// Sets experimental features.
   ///
diff --git a/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart b/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart
index d1a2a4e..1375e06a 100644
--- a/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart
+++ b/pkg/front_end/lib/src/api_prototype/lowering_predicates.dart
@@ -660,8 +660,8 @@
 ///
 /// where '#this' is the synthetic "extension this" parameter.
 bool isExtensionThis(VariableDeclaration node) {
-  assert(
-      node.isLowered || node.name == null || !isExtensionThisName(node.name));
+  assert(node.isLowered || node.name == null || !isExtensionThisName(node.name),
+      "$node has name ${node.name} and node.isLowered = ${node.isLowered}");
   return node.isLowered && isExtensionThisName(node.name);
 }
 
diff --git a/pkg/front_end/lib/src/api_prototype/memory_file_system.dart b/pkg/front_end/lib/src/api_prototype/memory_file_system.dart
index 01aa2e6..b510fc4 100644
--- a/pkg/front_end/lib/src/api_prototype/memory_file_system.dart
+++ b/pkg/front_end/lib/src/api_prototype/memory_file_system.dart
@@ -80,21 +80,23 @@
   }
 
   @override
-  Future<bool> exists() async {
-    return _fileSystem._files[uri] != null ||
-        _fileSystem._directories.contains(uri);
+  Future<bool> exists() {
+    return new Future.value(_fileSystem._files[uri] != null ||
+        _fileSystem._directories.contains(uri));
   }
 
   @override
   Future<bool> existsAsyncIfPossible() => exists();
 
   @override
-  Future<List<int>> readAsBytes() async {
+  Future<List<int>> readAsBytes() {
     Uint8List? contents = _fileSystem._files[uri];
     if (contents == null) {
-      throw new FileSystemException(uri, 'File $uri does not exist.');
+      return new Future.error(
+          new FileSystemException(uri, 'File $uri does not exist.'),
+          StackTrace.current);
     }
-    return contents;
+    return new Future.value(contents);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/api_prototype/standard_file_system.dart b/pkg/front_end/lib/src/api_prototype/standard_file_system.dart
index ead93b4..e7fd2c5 100644
--- a/pkg/front_end/lib/src/api_prototype/standard_file_system.dart
+++ b/pkg/front_end/lib/src/api_prototype/standard_file_system.dart
@@ -52,15 +52,15 @@
       other is _IoFileSystemEntity && other.uri == uri;
 
   @override
-  Future<bool> exists() async {
+  Future<bool> exists() {
     if (new io.File.fromUri(uri).existsSync()) {
-      return true;
+      return new Future.value(true);
     }
     if (io.FileSystemEntity.isDirectorySync(uri.toFilePath())) {
-      return true;
+      return new Future.value(true);
     }
     // TODO(CFE-team): What about [Link]s?
-    return false;
+    return new Future.value(false);
   }
 
   @override
@@ -76,12 +76,13 @@
   }
 
   @override
-  Future<List<int>> readAsBytes() async {
+  Future<List<int>> readAsBytes() {
     try {
       CompilerContext.recordDependency(uri);
-      return new io.File.fromUri(uri).readAsBytesSync();
+      return new Future.value(new io.File.fromUri(uri).readAsBytesSync());
     } on io.FileSystemException catch (exception) {
-      throw _toFileSystemException(exception);
+      return new Future.error(
+          _toFileSystemException(exception), StackTrace.current);
     }
   }
 
@@ -135,13 +136,13 @@
       other is DataFileSystemEntity && other.uri == uri;
 
   @override
-  Future<bool> exists() async {
-    return true;
+  Future<bool> exists() {
+    return new Future.value(true);
   }
 
   @override
-  Future<List<int>> readAsBytes() async {
-    return uri.data!.contentAsBytes();
+  Future<List<int>> readAsBytes() {
+    return new Future.value(uri.data!.contentAsBytes());
   }
 
   @override
@@ -151,7 +152,7 @@
   Future<List<int>> readAsBytesAsyncIfPossible() => readAsBytes();
 
   @override
-  Future<String> readAsString() async {
-    return uri.data!.contentAsString();
+  Future<String> readAsString() {
+    return new Future.value(uri.data!.contentAsString());
   }
 }
diff --git a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
index 8cf810b..7d167c4 100644
--- a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
+++ b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
@@ -72,7 +72,7 @@
     Map<String, String> environmentDefines,
     {bool trackNeededDillLibraries: false,
     bool verbose: false,
-    NnbdMode nnbdMode: NnbdMode.Weak}) async {
+    NnbdMode nnbdMode: NnbdMode.Weak}) {
   List<Component> outputLoadedAdditionalDills =
       new List<Component>.filled(additionalDills.length, dummyComponent);
   Map<ExperimentalFlag, bool> experimentalFlags = parseExperimentalFlags(
@@ -98,7 +98,7 @@
       nnbdMode: nnbdMode);
 }
 
-Future<InitializedCompilerState> initializeCompiler(
+InitializedCompilerState initializeCompiler(
   InitializedCompilerState? oldState,
   Uri sdkSummary,
   Uri librariesSpecificationUri,
@@ -110,7 +110,7 @@
   Map<String, String> environmentDefines, {
   bool verbose: false,
   NnbdMode nnbdMode: NnbdMode.Weak,
-}) async {
+}) {
   // TODO(sigmund): use incremental compiler when it supports our use case.
   // Note: it is common for the summary worker to invoke the compiler with the
   // same input summary URIs, but with different contents, so we'd need to be
diff --git a/pkg/front_end/lib/src/api_unstable/dart2js.dart b/pkg/front_end/lib/src/api_unstable/dart2js.dart
index b8d1d74..e811ba1 100644
--- a/pkg/front_end/lib/src/api_unstable/dart2js.dart
+++ b/pkg/front_end/lib/src/api_unstable/dart2js.dart
@@ -241,23 +241,3 @@
 // TODO(sigmund): Delete this API once `member.isRedirectingFactory`
 // is implemented correctly for patch files (Issue #33495).
 bool isRedirectingFactory(ir.Procedure member) => member.isRedirectingFactory;
-
-/// Determines what `ProcedureKind` the given extension [member] is based on
-/// the member name.
-///
-/// Note: classifies operators as `ProcedureKind.Method`.
-ir.ProcedureKind getExtensionMemberKind(ir.Procedure member) {
-  assert(member.isExtensionMember);
-  String name = member.name.text;
-  int pipeIndex = name.indexOf('|');
-  int poundIndex = name.indexOf('#');
-  assert(pipeIndex >= 0);
-  if (poundIndex >= 0) {
-    String getOrSet = name.substring(pipeIndex + 1, poundIndex);
-    return getOrSet == 'get'
-        ? ir.ProcedureKind.Getter
-        : ir.ProcedureKind.Setter;
-  } else {
-    return member.kind;
-  }
-}
diff --git a/pkg/front_end/lib/src/api_unstable/ddc.dart b/pkg/front_end/lib/src/api_unstable/ddc.dart
index d59fef2..23e1784 100644
--- a/pkg/front_end/lib/src/api_unstable/ddc.dart
+++ b/pkg/front_end/lib/src/api_unstable/ddc.dart
@@ -102,7 +102,7 @@
   }
 }
 
-Future<InitializedCompilerState> initializeCompiler(
+InitializedCompilerState initializeCompiler(
     InitializedCompilerState? oldState,
     bool compileSdk,
     Uri sdkRoot,
@@ -114,7 +114,7 @@
     {FileSystem? fileSystem,
     Map<ExperimentalFlag, bool>? explicitExperimentalFlags,
     Map<String, String>? environmentDefines,
-    required NnbdMode nnbdMode}) async {
+    required NnbdMode nnbdMode}) {
   // ignore: unnecessary_null_comparison
   assert(nnbdMode != null, "No NnbdMode provided.");
   additionalDills.sort((a, b) => a.toString().compareTo(b.toString()));
@@ -173,7 +173,7 @@
     required Map<ExperimentalFlag, bool> explicitExperimentalFlags,
     required Map<String, String> environmentDefines,
     bool trackNeededDillLibraries: false,
-    required NnbdMode nnbdMode}) async {
+    required NnbdMode nnbdMode}) {
   return modular.initializeIncrementalCompiler(
       oldState,
       tags,
diff --git a/pkg/front_end/lib/src/api_unstable/vm.dart b/pkg/front_end/lib/src/api_unstable/vm.dart
index f592c51..e981bd3 100644
--- a/pkg/front_end/lib/src/api_unstable/vm.dart
+++ b/pkg/front_end/lib/src/api_unstable/vm.dart
@@ -29,6 +29,8 @@
 export '../api_prototype/kernel_generator.dart'
     show kernelForModule, kernelForProgram;
 
+export '../api_prototype/lowering_predicates.dart' show isExtensionThisName;
+
 export '../api_prototype/memory_file_system.dart' show MemoryFileSystem;
 
 export '../api_prototype/standard_file_system.dart' show StandardFileSystem;
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 219a798..e6a3ec0 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -848,6 +848,8 @@
       return null;
     }
   }
+
+  CompilerOptions get rawOptionsForTesting => _raw;
 }
 
 /// A [FileSystem] that only allows access to files that have been explicitly
diff --git a/pkg/front_end/lib/src/fasta/builder/builder.dart b/pkg/front_end/lib/src/fasta/builder/builder.dart
index b0fa8e8..f933d9f 100644
--- a/pkg/front_end/lib/src/fasta/builder/builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/builder.dart
@@ -36,6 +36,8 @@
 
   bool get isGetter;
 
+  bool get isExternal;
+
   /// Returns `true` if this builder is an extension declaration.
   ///
   /// For instance `B` in:
@@ -277,6 +279,9 @@
   bool get isStatic => false;
 
   @override
+  bool get isExternal => false;
+
+  @override
   bool get isSynthetic => false;
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/builder/constructor_builder.dart b/pkg/front_end/lib/src/fasta/builder/constructor_builder.dart
index 2167087..cf6125b 100644
--- a/pkg/front_end/lib/src/fasta/builder/constructor_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/constructor_builder.dart
@@ -18,11 +18,11 @@
 import '../kernel/constructor_tearoff_lowering.dart';
 import '../kernel/expression_generator_helper.dart'
     show ExpressionGeneratorHelper;
-import '../kernel/kernel_builder.dart'
+import '../kernel/utils.dart'
     show isRedirectingGenerativeConstructorImplementation;
 import '../kernel/kernel_helper.dart' show SynthesizedFunctionNode;
 
-import '../loader.dart' show Loader;
+import '../source/source_loader.dart' show SourceLoader;
 
 import '../messages.dart'
     show
@@ -90,7 +90,7 @@
   Set<FieldBuilder>? takeInitializedFields();
 }
 
-class ConstructorBuilderImpl extends FunctionBuilderImpl
+class SourceConstructorBuilder extends FunctionBuilderImpl
     implements ConstructorBuilder {
   final Constructor _constructor;
   final Procedure? _constructorTearOff;
@@ -114,7 +114,7 @@
   @override
   Constructor get actualConstructor => _constructor;
 
-  ConstructorBuilderImpl(
+  SourceConstructorBuilder(
       List<MetadataBuilder>? metadata,
       int modifiers,
       TypeBuilder? returnType,
@@ -147,6 +147,10 @@
   SourceLibraryBuilder get library => super.library as SourceLibraryBuilder;
 
   @override
+  SourceClassBuilder get classBuilder =>
+      super.classBuilder as SourceClassBuilder;
+
+  @override
   Member? get readTarget => _constructorTearOff ?? _constructor;
 
   @override
@@ -213,7 +217,7 @@
 
       if (_constructorTearOff != null) {
         buildConstructorTearOffProcedure(_constructorTearOff!, _constructor,
-            classBuilder!.cls, libraryBuilder);
+            classBuilder.cls, libraryBuilder);
       }
 
       _hasBeenBuilt = true;
@@ -243,7 +247,7 @@
     if (formals != null) {
       for (FormalParameterBuilder formal in formals!) {
         if (formal.type == null && formal.isInitializingFormal) {
-          formal.finalizeInitializingFormal(classBuilder!);
+          formal.finalizeInitializingFormal(classBuilder);
         }
       }
     }
@@ -270,7 +274,7 @@
     if (isConst && beginInitializers != null) {
       BodyBuilder bodyBuilder = library.loader
           .createBodyBuilderForOutlineExpression(
-              library, classBuilder!, this, classBuilder!.scope, fileUri);
+              library, classBuilder, this, classBuilder.scope, fileUri);
       bodyBuilder.constantContext = ConstantContext.required;
       bodyBuilder.parseInitializers(beginInitializers!);
       bodyBuilder.performBacklogComputations(delayedActionPerformers);
@@ -287,7 +291,7 @@
     // According to the specification §9.3 the return type of a constructor
     // function is its enclosing class.
     super.buildFunction(library);
-    Class enclosingClass = classBuilder!.cls;
+    Class enclosingClass = classBuilder.cls;
     List<DartType> typeParameterTypes = <DartType>[];
     for (int i = 0; i < enclosingClass.typeParameters.length; i++) {
       TypeParameter typeParameter = enclosingClass.typeParameters[i];
@@ -426,14 +430,14 @@
   }
 
   @override
-  void becomeNative(Loader loader) {
+  void becomeNative(SourceLoader loader) {
     _constructor.isExternal = true;
     super.becomeNative(loader);
   }
 
   @override
   void applyPatch(Builder patch) {
-    if (patch is ConstructorBuilderImpl) {
+    if (patch is SourceConstructorBuilder) {
       if (checkPatch(patch)) {
         patch.actualOrigin = this;
         dataForTesting?.patchForTesting = patch;
diff --git a/pkg/front_end/lib/src/fasta/builder/enum_builder.dart b/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
index 98e54de..6f9fcec 100644
--- a/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
@@ -13,7 +13,6 @@
         ConstructorInvocation,
         Expression,
         Field,
-        FieldInitializer,
         InstanceAccessKind,
         InstanceGet,
         IntLiteral,
@@ -24,10 +23,10 @@
         Reference,
         ReturnStatement,
         StaticGet,
+        StringConcatenation,
         StringLiteral,
         SuperInitializer,
-        ThisExpression,
-        VariableGet;
+        ThisExpression;
 import 'package:kernel/core_types.dart';
 
 import 'package:kernel/reference_from_index.dart' show IndexedClass;
@@ -45,18 +44,12 @@
 
 import '../util/helpers.dart';
 
-import '../modifier.dart'
-    show
-        constMask,
-        finalMask,
-        hasInitializerMask,
-        initializingFormalMask,
-        staticMask;
+import '../modifier.dart' show constMask, hasInitializerMask, staticMask;
 
 import '../scope.dart';
 
+import '../source/name_scheme.dart';
 import '../source/source_class_builder.dart' show SourceClassBuilder;
-
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
 
 import 'builder.dart';
@@ -81,8 +74,6 @@
 
   final NamedTypeBuilder objectType;
 
-  final NamedTypeBuilder enumType;
-
   final NamedTypeBuilder listType;
 
   EnumBuilder.internal(
@@ -95,7 +86,7 @@
       this.intType,
       this.listType,
       this.objectType,
-      this.enumType,
+      TypeBuilder enumType,
       this.stringType,
       SourceLibraryBuilder parent,
       int startCharOffset,
@@ -107,7 +98,7 @@
             0,
             name,
             /* typeVariable = */ null,
-            /* supertype = */ null,
+            enumType,
             /* interfaces = */ null,
             /* onTypes = */ null,
             scope,
@@ -154,7 +145,7 @@
         /* fileUri = */ null,
         /* charOffset = */ null);
     NamedTypeBuilder enumType = new NamedTypeBuilder(
-        "Enum",
+        "_Enum",
         const NullabilityBuilder.omitted(),
         /* arguments = */ null,
         /* fileUri = */ null,
@@ -178,27 +169,18 @@
         /* fileUri = */ null,
         /* charOffset = */ null);
 
-    /// metadata class E {
-    ///   final int index;
-    ///   final String _name;
-    ///   const E(this.index, this._name);
-    ///   static const E id0 = const E(0, 'E.id0');
-    ///   ...
-    ///   static const E idn-1 = const E(n - 1, 'E.idn-1');
-    ///   static const List<E> values = const <E>[id0, ..., idn-1];
-    ///   String toString() => _name;
-    /// }
+    // metadata class E extends _Enum {
+    //   const E(int index, String name) : super(index, name);
+    //   static const E id0 = const E(0, 'id0');
+    //   ...
+    //   static const E id${n-1} = const E(n - 1, 'idn-1');
+    //   static const List<E> values = const <E>[id0, ..., id${n-1}];
+    //   String toString() {
+    //     return "E.${_Enum::_name}";
+    //   }
+    // }
 
-    FieldNameScheme instanceFieldNameScheme = new FieldNameScheme(
-        isInstanceMember: true,
-        className: name,
-        isExtensionMember: false,
-        extensionName: null,
-        libraryReference: referencesFromIndexed != null
-            ? referencesFromIndexed.library.reference
-            : parent.library.reference);
-
-    FieldNameScheme staticFieldNameScheme = new FieldNameScheme(
+    NameScheme staticFieldNameScheme = new NameScheme(
         isInstanceMember: false,
         className: name,
         isExtensionMember: false,
@@ -207,8 +189,9 @@
             ? referencesFromIndexed.library.reference
             : parent.library.reference);
 
-    ProcedureNameScheme procedureNameScheme = new ProcedureNameScheme(
-        isStatic: false,
+    NameScheme procedureNameScheme = new NameScheme(
+        isInstanceMember: true,
+        className: name,
         isExtensionMember: false,
         extensionName: null,
         libraryReference: referencesFromIndexed != null
@@ -217,10 +200,7 @@
 
     Constructor? constructorReference;
     Reference? toStringReference;
-    Reference? indexGetterReference;
-    Reference? indexSetterReference;
-    Reference? _nameGetterReference;
-    Reference? _nameSetterReference;
+    Reference? valuesFieldReference;
     Reference? valuesGetterReference;
     Reference? valuesSetterReference;
     if (referencesFromIndexed != null) {
@@ -228,61 +208,26 @@
           referencesFromIndexed.lookupConstructor(new Name("")) as Constructor;
       toStringReference =
           referencesFromIndexed.lookupGetterReference(new Name("toString"));
-      Name indexName = new Name("index");
-      indexGetterReference =
-          referencesFromIndexed.lookupGetterReference(indexName);
-      indexSetterReference =
-          referencesFromIndexed.lookupSetterReference(indexName);
-      _nameGetterReference = referencesFromIndexed.lookupGetterReference(
-          new Name("_name", referencesFromIndexed.library));
-      _nameSetterReference = referencesFromIndexed.lookupSetterReference(
-          new Name("_name", referencesFromIndexed.library));
       Name valuesName = new Name("values");
+      valuesFieldReference =
+          referencesFromIndexed.lookupFieldReference(valuesName);
       valuesGetterReference =
           referencesFromIndexed.lookupGetterReference(valuesName);
       valuesSetterReference =
           referencesFromIndexed.lookupSetterReference(valuesName);
     }
 
-    FieldBuilder indexBuilder = new SourceFieldBuilder(
-        /* metadata = */ null,
-        intType,
-        "index",
-        finalMask | hasInitializerMask,
-        /* isTopLevel = */ false,
-        parent,
-        charOffset,
-        charOffset,
-        instanceFieldNameScheme,
-        isInstanceMember: true,
-        fieldGetterReference: indexGetterReference,
-        fieldSetterReference: indexSetterReference);
-    members["index"] = indexBuilder;
-    FieldBuilder nameBuilder = new SourceFieldBuilder(
-        /* metadata = */ null,
-        stringType,
-        "_name",
-        finalMask | hasInitializerMask,
-        /* isTopLevel = */ false,
-        parent,
-        charOffset,
-        charOffset,
-        instanceFieldNameScheme,
-        isInstanceMember: true,
-        fieldGetterReference: _nameGetterReference,
-        fieldSetterReference: _nameSetterReference);
-    members["_name"] = nameBuilder;
-    ConstructorBuilder constructorBuilder = new ConstructorBuilderImpl(
+    ConstructorBuilder constructorBuilder = new SourceConstructorBuilder(
         /* metadata = */ null,
         constMask,
         /* returnType = */ null,
         "",
         /* typeParameters = */ null,
         <FormalParameterBuilder>[
-          new FormalParameterBuilder(null, initializingFormalMask, intType,
-              "index", parent, charOffset),
-          new FormalParameterBuilder(null, initializingFormalMask, stringType,
-              "_name", parent, charOffset)
+          new FormalParameterBuilder(
+              null, 0, intType, "index", parent, charOffset),
+          new FormalParameterBuilder(
+              null, 0, stringType, "name", parent, charOffset)
         ],
         parent,
         charOffset,
@@ -302,14 +247,10 @@
         charOffset,
         charOffset,
         staticFieldNameScheme,
-        isInstanceMember: false,
+        fieldReference: valuesFieldReference,
         fieldGetterReference: valuesGetterReference,
         fieldSetterReference: valuesSetterReference);
     members["values"] = valuesBuilder;
-    constructorBuilder
-      ..registerInitializedField(nameBuilder)
-      ..registerInitializedField(indexBuilder)
-      ..registerInitializedField(valuesBuilder);
     ProcedureBuilder toStringBuilder = new SourceProcedureBuilder(
         /* metadata = */ null,
         0,
@@ -330,6 +271,7 @@
         isExtensionMember: false,
         isInstanceMember: true);
     members["toString"] = toStringBuilder;
+    constructorBuilder.registerInitializedField(valuesBuilder);
     String className = name;
     if (enumConstantInfos != null) {
       for (int i = 0; i < enumConstantInfos.length; i++) {
@@ -365,10 +307,12 @@
               name.length,
               parent.fileUri);
         }
+        Reference? fieldReference;
         Reference? getterReference;
         Reference? setterReference;
         if (referencesFromIndexed != null) {
           Name nameName = new Name(name, referencesFromIndexed.library);
+          fieldReference = referencesFromIndexed.lookupFieldReference(nameName);
           getterReference =
               referencesFromIndexed.lookupGetterReference(nameName);
           setterReference =
@@ -384,7 +328,7 @@
             enumConstantInfo.charOffset,
             enumConstantInfo.charOffset,
             staticFieldNameScheme,
-            isInstanceMember: false,
+            fieldReference: fieldReference,
             fieldGetterReference: getterReference,
             fieldSetterReference: setterReference);
         members[name] = fieldBuilder..next = existing;
@@ -445,26 +389,11 @@
         coreLibrary.scope, charOffset, fileUri, libraryBuilder);
     objectType.resolveIn(
         coreLibrary.scope, charOffset, fileUri, libraryBuilder);
-    enumType.resolveIn(coreLibrary.scope, charOffset, fileUri, libraryBuilder);
+    TypeBuilder supertypeBuilder = this.supertypeBuilder!;
+    supertypeBuilder.resolveIn(
+        coreLibrary.scope, charOffset, fileUri, libraryBuilder);
     listType.resolveIn(coreLibrary.scope, charOffset, fileUri, libraryBuilder);
 
-    cls.implementedTypes
-        .add(enumType.buildSupertype(libraryBuilder, charOffset, fileUri)!);
-
-    SourceFieldBuilder indexFieldBuilder =
-        firstMemberNamed("index") as SourceFieldBuilder;
-    indexFieldBuilder.build(libraryBuilder);
-    Field indexField = indexFieldBuilder.field;
-    SourceFieldBuilder nameFieldBuilder =
-        firstMemberNamed("_name") as SourceFieldBuilder;
-    nameFieldBuilder.build(libraryBuilder);
-    Field nameField = nameFieldBuilder.field;
-    ProcedureBuilder toStringBuilder =
-        firstMemberNamed("toString") as ProcedureBuilder;
-    toStringBuilder.body = new ReturnStatement(new InstanceGet(
-        InstanceAccessKind.Instance, new ThisExpression(), nameField.name,
-        interfaceTarget: nameField, resultType: nameField.type));
-
     List<Expression> values = <Expression>[];
     if (enumConstantInfos != null) {
       for (EnumConstantInfo? enumConstantInfo in enumConstantInfos!) {
@@ -481,32 +410,25 @@
     SourceFieldBuilder valuesBuilder =
         firstMemberNamed("values") as SourceFieldBuilder;
     valuesBuilder.build(libraryBuilder);
-    ConstructorBuilderImpl constructorBuilder =
-        constructorScopeBuilder[""] as ConstructorBuilderImpl;
+    SourceConstructorBuilder constructorBuilder =
+        constructorScopeBuilder[""] as SourceConstructorBuilder;
     Constructor constructor = constructorBuilder.build(libraryBuilder);
-    constructor.initializers.insert(
-        0,
-        new FieldInitializer(indexField,
-            new VariableGet(constructor.function.positionalParameters[0]))
-          ..parent = constructor);
-    constructor.initializers.insert(
-        1,
-        new FieldInitializer(nameField,
-            new VariableGet(constructor.function.positionalParameters[1]))
-          ..parent = constructor);
     ClassBuilder objectClass = objectType.declaration as ClassBuilder;
-    MemberBuilder? superConstructor = objectClass.findConstructorOrFactory(
+    ClassBuilder enumClass = supertypeBuilder.declaration as ClassBuilder;
+    MemberBuilder? superConstructor = enumClass.findConstructorOrFactory(
         "", charOffset, fileUri, libraryBuilder);
     if (superConstructor == null || !superConstructor.isConstructor) {
       // TODO(ahe): Ideally, we would also want to check that [Object]'s
       // unnamed constructor requires no arguments. But that information isn't
       // always available at this point, and it's not really a situation that
       // can happen unless you start modifying the SDK sources.
+      // (We should add a correct message. We no longer depend on Object here.)
       library.addProblem(messageNoUnnamedConstructorInObject,
           objectClass.charOffset, objectClass.name.length, objectClass.fileUri);
     } else {
       constructor.initializers.add(new SuperInitializer(
-          superConstructor.member as Constructor, new Arguments.empty())
+          superConstructor.member as Constructor,
+          new Arguments.forwarded(constructor.function, libraryBuilder.library))
         ..parent = constructor);
     }
     return super.build(libraryBuilder, coreLibrary);
@@ -537,8 +459,8 @@
         coreTypes,
         new ListLiteral(values,
             typeArgument: rawType(library.nonNullable), isConst: true));
-    ConstructorBuilderImpl constructorBuilder =
-        constructorScopeBuilder[""] as ConstructorBuilderImpl;
+    SourceConstructorBuilder constructorBuilder =
+        constructorScopeBuilder[""] as SourceConstructorBuilder;
     Constructor constructor = constructorBuilder.constructor;
     int index = 0;
     if (enumConstantInfos != null) {
@@ -554,13 +476,33 @@
           }
           Arguments arguments = new Arguments(<Expression>[
             new IntLiteral(index++),
-            new StringLiteral("$name.$constant")
+            new StringLiteral(constant),
           ]);
           field.buildBody(coreTypes,
               new ConstructorInvocation(constructor, arguments, isConst: true));
         }
       }
     }
+
+    ProcedureBuilder toStringBuilder =
+        firstMemberNamed("toString") as ProcedureBuilder;
+
+    TypeBuilder supertypeBuilder = this.supertypeBuilder!;
+    ClassBuilder enumClass = supertypeBuilder.declaration as ClassBuilder;
+    MemberBuilder? nameFieldBuilder =
+        enumClass.lookupLocalMember("_name") as MemberBuilder?;
+    if (nameFieldBuilder != null) {
+      Field nameField = nameFieldBuilder.member as Field;
+
+      toStringBuilder.body = new ReturnStatement(new StringConcatenation([
+        new StringLiteral("${cls.demangledName}."),
+        new InstanceGet.byReference(
+            InstanceAccessKind.Instance, new ThisExpression(), nameField.name,
+            interfaceTargetReference: nameField.getterReference,
+            resultType: nameField.getterType),
+      ]));
+    } else {}
+
     super.buildOutlineExpressions(
         library, coreTypes, delayedActionPerformers, synthesizedFunctionNodes);
   }
diff --git a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
index d0250bf..4ac03ac 100644
--- a/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/extension_builder.dart
@@ -15,6 +15,7 @@
 
 import 'builder.dart';
 import 'declaration_builder.dart';
+import 'field_builder.dart';
 import 'library_builder.dart';
 import 'member_builder.dart';
 import 'metadata_builder.dart';
@@ -181,9 +182,21 @@
       {bool setter: false, bool required: false}) {
     Builder? builder =
         lookupLocalMember(name.text, setter: setter, required: required);
+    if (builder == null && setter) {
+      // When looking up setters, we include assignable fields.
+      builder = lookupLocalMember(name.text, setter: false, required: required);
+      if (builder is! FieldBuilder || !builder.isAssignable) {
+        builder = null;
+      }
+    }
     if (builder != null) {
       if (name.isPrivate && library.library != name.library) {
         builder = null;
+      } else if (builder is FieldBuilder &&
+          !builder.isStatic &&
+          !builder.isExternal) {
+        // Non-external extension instance fields are invalid.
+        builder = null;
       } else if (builder.isDuplicate) {
         // Duplicates are not visible in the instance scope.
         builder = null;
diff --git a/pkg/front_end/lib/src/fasta/builder/factory_builder.dart b/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
index 14c0575..d19bcde 100644
--- a/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/factory_builder.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/core_types.dart';
 import 'package:kernel/type_algebra.dart';
 
 import '../dill/dill_member_builder.dart';
@@ -11,18 +12,18 @@
 import '../kernel/constructor_tearoff_lowering.dart';
 import '../kernel/forest.dart';
 import '../kernel/internal_ast.dart';
-import '../kernel/kernel_api.dart';
 import '../kernel/kernel_helper.dart';
 import '../kernel/redirecting_factory_body.dart'
     show getRedirectingFactoryBody, RedirectingFactoryBody;
 
-import '../loader.dart' show Loader;
+import '../source/source_loader.dart' show SourceLoader;
 
 import '../messages.dart'
     show messageConstFactoryRedirectionToNonConst, noLength;
 
 import '../problems.dart' show unexpected, unhandled;
 
+import '../source/name_scheme.dart';
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
 
 import '../type_inference/type_inferrer.dart';
@@ -36,7 +37,6 @@
 import 'function_builder.dart';
 import 'member_builder.dart';
 import 'metadata_builder.dart';
-import 'procedure_builder.dart';
 import 'type_builder.dart';
 import 'type_variable_builder.dart';
 
@@ -67,10 +67,10 @@
       int charEndOffset,
       Reference? procedureReference,
       AsyncMarker asyncModifier,
-      ProcedureNameScheme procedureNameScheme,
+      NameScheme nameScheme,
       {String? nativeMethodName})
       : _procedureInternal = new Procedure(
-            procedureNameScheme.getName(ProcedureKind.Factory, name),
+            nameScheme.getProcedureName(ProcedureKind.Factory, name),
             ProcedureKind.Factory,
             new FunctionNode(null),
             fileUri: libraryBuilder.fileUri,
@@ -199,7 +199,7 @@
       throw new UnsupportedError('${runtimeType}.localSetters');
 
   @override
-  void becomeNative(Loader loader) {
+  void becomeNative(SourceLoader loader) {
     _procedureInternal.isExternal = true;
     super.becomeNative(loader);
   }
@@ -273,7 +273,7 @@
       int charOpenParenOffset,
       int charEndOffset,
       Reference? procedureReference,
-      ProcedureNameScheme procedureNameScheme,
+      NameScheme nameScheme,
       String? nativeMethodName,
       this.redirectionTarget)
       : super(
@@ -290,7 +290,7 @@
             charEndOffset,
             procedureReference,
             AsyncMarker.Sync,
-            procedureNameScheme,
+            nameScheme,
             nativeMethodName: nativeMethodName);
 
   @override
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 1915d6c..df0d819 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -9,6 +9,7 @@
 import 'package:kernel/ast.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/src/legacy_erasure.dart';
+import 'package:kernel/type_algebra.dart';
 
 import '../constant_context.dart' show ConstantContext;
 
@@ -16,7 +17,7 @@
 
 import '../kernel/body_builder.dart' show BodyBuilder;
 import '../kernel/class_hierarchy_builder.dart';
-import '../kernel/kernel_builder.dart' show ImplicitFieldType;
+import '../kernel/implicit_field_type.dart';
 import '../kernel/kernel_helper.dart';
 import '../kernel/late_lowering.dart' as late_lowering;
 import '../kernel/member_covariance.dart';
@@ -27,8 +28,9 @@
 
 import '../scope.dart' show Scope;
 
+import '../source/name_scheme.dart';
+import '../source/source_extension_builder.dart';
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
-
 import '../source/source_loader.dart' show SourceLoader;
 
 import '../type_inference/type_inference_engine.dart'
@@ -48,7 +50,7 @@
 
   TypeBuilder? get type;
 
-  bool get isCovariant;
+  bool get isCovariantByDeclaration;
 
   bool get isLate;
 
@@ -117,10 +119,11 @@
       SourceLibraryBuilder libraryBuilder,
       int charOffset,
       int charEndOffset,
-      FieldNameScheme fieldNameScheme,
-      {required bool isInstanceMember,
+      NameScheme fieldNameScheme,
+      {Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
@@ -128,8 +131,7 @@
       Token? constInitializerToken})
       : _constInitializerToken = constInitializerToken,
         super(libraryBuilder, charOffset) {
-    // ignore: unnecessary_null_comparison
-    assert(isInstanceMember != null);
+    bool isInstanceMember = fieldNameScheme.isInstanceMember;
 
     Uri fileUri = libraryBuilder.fileUri;
     // If in mixed mode, late lowerings cannot use `null` as a sentinel on
@@ -138,11 +140,14 @@
         late_lowering.computeIsSetStrategy(libraryBuilder);
 
     if (isAbstract || isExternal) {
+      assert(fieldReference == null);
+      assert(lateIsSetFieldReference == null);
       assert(lateIsSetGetterReference == null);
       assert(lateIsSetSetterReference == null);
       assert(lateGetterReference == null);
       assert(lateSetterReference == null);
       _fieldEncoding = new AbstractOrExternalFieldEncoding(
+          this,
           name,
           fieldNameScheme,
           fileUri,
@@ -153,7 +158,7 @@
           isAbstract: isAbstract,
           isExternal: isExternal,
           isFinal: isFinal,
-          isCovariant: isCovariant,
+          isCovariantByDeclaration: isCovariantByDeclaration,
           isNonNullableByDefault: library.isNonNullableByDefault);
     } else if (isLate &&
         libraryBuilder.loader.target.backendTarget.isLateFieldLoweringEnabled(
@@ -168,13 +173,15 @@
               fileUri,
               charOffset,
               charEndOffset,
+              fieldReference,
               fieldGetterReference,
               fieldSetterReference,
+              lateIsSetFieldReference,
               lateIsSetGetterReference,
               lateIsSetSetterReference,
               lateGetterReference,
               lateSetterReference,
-              isCovariant,
+              isCovariantByDeclaration,
               isSetStrategy);
         } else {
           _fieldEncoding = new LateFieldWithInitializerEncoding(
@@ -183,13 +190,15 @@
               fileUri,
               charOffset,
               charEndOffset,
+              fieldReference,
               fieldGetterReference,
               fieldSetterReference,
+              lateIsSetFieldReference,
               lateIsSetGetterReference,
               lateIsSetSetterReference,
               lateGetterReference,
               lateSetterReference,
-              isCovariant,
+              isCovariantByDeclaration,
               isSetStrategy);
         }
       } else {
@@ -200,13 +209,15 @@
               fileUri,
               charOffset,
               charEndOffset,
+              fieldReference,
               fieldGetterReference,
               fieldSetterReference,
+              lateIsSetFieldReference,
               lateIsSetGetterReference,
               lateIsSetSetterReference,
               lateGetterReference,
               lateSetterReference,
-              isCovariant,
+              isCovariantByDeclaration,
               isSetStrategy);
         } else {
           _fieldEncoding = new LateFieldWithoutInitializerEncoding(
@@ -215,13 +226,15 @@
               fileUri,
               charOffset,
               charEndOffset,
+              fieldReference,
               fieldGetterReference,
               fieldSetterReference,
+              lateIsSetFieldReference,
               lateIsSetGetterReference,
               lateIsSetSetterReference,
               lateGetterReference,
               lateSetterReference,
-              isCovariant,
+              isCovariantByDeclaration,
               isSetStrategy);
         }
       }
@@ -237,13 +250,15 @@
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
       } else {
         _fieldEncoding = new LateFieldWithInitializerEncoding(
@@ -252,16 +267,19 @@
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
       }
     } else {
+      assert(lateIsSetFieldReference == null);
       assert(lateIsSetGetterReference == null);
       assert(lateIsSetSetterReference == null);
       assert(lateGetterReference == null);
@@ -273,6 +291,7 @@
           isLate: isLate,
           hasInitializer: hasInitializer,
           isNonNullableByDefault: library.isNonNullableByDefault,
+          fieldReference: fieldReference,
           getterReference: fieldGetterReference,
           setterReference: fieldSetterReference);
     }
@@ -319,7 +338,7 @@
   bool get isLate => (modifiers & lateMask) != 0;
 
   @override
-  bool get isCovariant => (modifiers & covariantMask) != 0;
+  bool get isCovariantByDeclaration => (modifiers & covariantMask) != 0;
 
   @override
   bool get hasInitializer => (modifiers & hasInitializerMask) != 0;
@@ -393,7 +412,7 @@
       // notInstanceContext is set to true for extension fields as they
       // ultimately become static.
       fieldType = type!.build(libraryBuilder,
-          nonInstanceContext: isStatic || isExtensionMember);
+          nonInstanceContext: isStatic || (isExtensionMember && !isExternal));
     }
     _fieldEncoding.build(libraryBuilder, this);
   }
@@ -520,86 +539,6 @@
   @override
   List<ClassMember> get localSetters =>
       _localSetters ??= _fieldEncoding.getLocalSetters(this);
-
-  static String createFieldName(FieldNameType type, String name,
-      {required bool isInstanceMember,
-      required String? className,
-      bool isExtensionMethod: false,
-      String? extensionName,
-      bool isSynthesized: false}) {
-    assert(isSynthesized || type == FieldNameType.Field,
-        "Unexpected field name type for non-synthesized field: $type");
-    // ignore: unnecessary_null_comparison
-    assert(isExtensionMethod || isInstanceMember != null,
-        "`isInstanceMember` is null for class member.");
-    assert(!(isExtensionMethod && extensionName == null),
-        "No extension name provided for extension member.");
-    // ignore: unnecessary_null_comparison
-    assert(isInstanceMember == null || !(isInstanceMember && className == null),
-        "No class name provided for instance member.");
-    String baseName;
-    if (!isExtensionMethod) {
-      baseName = name;
-    } else {
-      baseName = "${extensionName}|${name}";
-    }
-
-    if (!isSynthesized) {
-      return baseName;
-    } else {
-      String namePrefix = late_lowering.lateFieldPrefix;
-      if (isInstanceMember) {
-        namePrefix = '$namePrefix${className}#';
-      }
-      switch (type) {
-        case FieldNameType.Field:
-          return "$namePrefix$baseName";
-        case FieldNameType.Getter:
-          return baseName;
-        case FieldNameType.Setter:
-          return baseName;
-        case FieldNameType.IsSetField:
-          return "$namePrefix$baseName${late_lowering.lateIsSetSuffix}";
-      }
-    }
-  }
-}
-
-enum FieldNameType { Field, Getter, Setter, IsSetField }
-
-class FieldNameScheme {
-  final bool isInstanceMember;
-  final String? className;
-  final bool isExtensionMember;
-  final String? extensionName;
-  final Reference? libraryReference;
-
-  FieldNameScheme(
-      {required this.isInstanceMember,
-      required this.className,
-      required this.isExtensionMember,
-      required this.extensionName,
-      required this.libraryReference})
-      // ignore: unnecessary_null_comparison
-      : assert(isInstanceMember != null),
-        // ignore: unnecessary_null_comparison
-        assert(isExtensionMember != null),
-        // ignore: unnecessary_null_comparison
-        assert(!isExtensionMember || extensionName != null),
-        // ignore: unnecessary_null_comparison
-        assert(libraryReference != null);
-
-  Name getName(FieldNameType type, String name, {required bool isSynthesized}) {
-    // ignore: unnecessary_null_comparison
-    assert(isSynthesized != null);
-    String text = SourceFieldBuilder.createFieldName(type, name,
-        isInstanceMember: isInstanceMember,
-        className: className,
-        isExtensionMethod: isExtensionMember,
-        extensionName: extensionName,
-        isSynthesized: isSynthesized);
-    return new Name.byReference(text, libraryReference);
-  }
 }
 
 /// Strategy pattern for creating different encodings of a declared field.
@@ -671,13 +610,14 @@
 class RegularFieldEncoding implements FieldEncoding {
   late final Field _field;
 
-  RegularFieldEncoding(String name, FieldNameScheme fieldNameScheme,
-      Uri fileUri, int charOffset, int charEndOffset,
+  RegularFieldEncoding(String name, NameScheme nameScheme, Uri fileUri,
+      int charOffset, int charEndOffset,
       {required bool isFinal,
       required bool isConst,
       required bool isLate,
       required bool hasInitializer,
       required bool isNonNullableByDefault,
+      required Reference? fieldReference,
       required Reference? getterReference,
       required Reference? setterReference}) {
     // ignore: unnecessary_null_comparison
@@ -692,19 +632,21 @@
         isLate ? (isFinal && hasInitializer) : (isFinal || isConst);
     _field = isImmutable
         ? new Field.immutable(
-            fieldNameScheme.getName(FieldNameType.Field, name,
+            nameScheme.getFieldName(FieldNameType.Field, name,
                 isSynthesized: false),
             isFinal: isFinal,
             isConst: isConst,
             isLate: isLate,
             fileUri: fileUri,
+            fieldReference: fieldReference,
             getterReference: getterReference)
         : new Field.mutable(
-            fieldNameScheme.getName(FieldNameType.Field, name,
+            nameScheme.getFieldName(FieldNameType.Field, name,
                 isSynthesized: false),
             isFinal: isFinal,
             isLate: isLate,
             fileUri: fileUri,
+            fieldReference: fieldReference,
             getterReference: getterReference,
             setterReference: setterReference);
     _field
@@ -744,7 +686,7 @@
   @override
   void build(
       SourceLibraryBuilder libraryBuilder, SourceFieldBuilder fieldBuilder) {
-    _field..isCovariant = fieldBuilder.isCovariant;
+    _field..isCovariantByDeclaration = fieldBuilder.isCovariantByDeclaration;
     if (fieldBuilder.isExtensionMember) {
       _field
         ..isStatic = true
@@ -774,7 +716,7 @@
 
   @override
   void setGenericCovariantImpl() {
-    _field.isGenericCovariantImpl = true;
+    _field.isCovariantByClass = true;
   }
 
   @override
@@ -883,17 +825,19 @@
 
   AbstractLateFieldEncoding(
       this.name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
+      Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
       Reference? lateSetterReference,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       late_lowering.IsSetStrategy isSetStrategy)
       : fileOffset = charOffset,
         fileEndOffset = charEndOffset,
@@ -901,8 +845,9 @@
         _forceIncludeIsSetField =
             isSetStrategy == late_lowering.IsSetStrategy.forceUseIsSetField {
     _field = new Field.mutable(
-        fieldNameScheme.getName(FieldNameType.Field, name, isSynthesized: true),
+        nameScheme.getFieldName(FieldNameType.Field, name, isSynthesized: true),
         fileUri: fileUri,
+        fieldReference: fieldReference,
         getterReference: fieldGetterReference,
         setterReference: fieldSetterReference)
       ..fileOffset = charOffset
@@ -917,9 +862,10 @@
       case late_lowering.IsSetStrategy.forceUseIsSetField:
       case late_lowering.IsSetStrategy.useIsSetFieldOrNull:
         _lateIsSetField = new Field.mutable(
-            fieldNameScheme.getName(FieldNameType.IsSetField, name,
+            nameScheme.getFieldName(FieldNameType.IsSetField, name,
                 isSynthesized: true),
             fileUri: fileUri,
+            fieldReference: lateIsSetFieldReference,
             getterReference: lateIsSetGetterReference,
             setterReference: lateIsSetSetterReference)
           ..fileOffset = charOffset
@@ -929,7 +875,7 @@
         break;
     }
     _lateGetter = new Procedure(
-        fieldNameScheme.getName(FieldNameType.Getter, name,
+        nameScheme.getFieldName(FieldNameType.Getter, name,
             isSynthesized: true),
         ProcedureKind.Getter,
         new FunctionNode(null)
@@ -941,12 +887,12 @@
       ..fileEndOffset = charEndOffset
       ..isNonNullableByDefault = true;
     _lateSetter = _createSetter(
-        fieldNameScheme.getName(FieldNameType.Setter, name,
+        nameScheme.getFieldName(FieldNameType.Setter, name,
             isSynthesized: true),
         fileUri,
         charOffset,
         lateSetterReference,
-        isCovariant: isCovariant);
+        isCovariantByDeclaration: isCovariantByDeclaration);
   }
 
   late_lowering.IsSetEncoding get isSetEncoding {
@@ -1054,11 +1000,11 @@
 
   Procedure? _createSetter(
       Name name, Uri fileUri, int charOffset, Reference? reference,
-      {required bool isCovariant}) {
+      {required bool isCovariantByDeclaration}) {
     // ignore: unnecessary_null_comparison
-    assert(isCovariant != null);
+    assert(isCovariantByDeclaration != null);
     VariableDeclaration parameter = new VariableDeclaration(null)
-      ..isCovariant = isCovariant
+      ..isCovariantByDeclaration = isCovariantByDeclaration
       ..fileOffset = fileOffset;
     return new Procedure(
         name,
@@ -1104,9 +1050,8 @@
 
   @override
   void setGenericCovariantImpl() {
-    _field.isGenericCovariantImpl = true;
-    _lateSetter?.function.positionalParameters.single.isGenericCovariantImpl =
-        true;
+    _field.isCovariantByClass = true;
+    _lateSetter?.function.positionalParameters.single.isCovariantByClass = true;
   }
 
   @override
@@ -1267,31 +1212,35 @@
     with NonFinalLate, LateWithoutInitializer {
   LateFieldWithoutInitializerEncoding(
       String name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
+      Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
       Reference? lateSetterReference,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       late_lowering.IsSetStrategy isSetStrategy)
       : super(
             name,
-            fieldNameScheme,
+            nameScheme,
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
 }
 
@@ -1299,31 +1248,35 @@
     with NonFinalLate {
   LateFieldWithInitializerEncoding(
       String name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
+      Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
       Reference? lateSetterReference,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       late_lowering.IsSetStrategy isSetStrategy)
       : super(
             name,
-            fieldNameScheme,
+            nameScheme,
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
 
   @override
@@ -1346,31 +1299,35 @@
     with LateWithoutInitializer {
   LateFinalFieldWithoutInitializerEncoding(
       String name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
+      Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
       Reference? lateSetterReference,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       late_lowering.IsSetStrategy isSetStrategy)
       : super(
             name,
-            fieldNameScheme,
+            nameScheme,
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
 
   @override
@@ -1394,31 +1351,35 @@
 class LateFinalFieldWithInitializerEncoding extends AbstractLateFieldEncoding {
   LateFinalFieldWithInitializerEncoding(
       String name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
+      Reference? fieldReference,
       Reference? fieldGetterReference,
       Reference? fieldSetterReference,
+      Reference? lateIsSetFieldReference,
       Reference? lateIsSetGetterReference,
       Reference? lateIsSetSetterReference,
       Reference? lateGetterReference,
       Reference? lateSetterReference,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       late_lowering.IsSetStrategy isSetStrategy)
       : super(
             name,
-            fieldNameScheme,
+            nameScheme,
             fileUri,
             charOffset,
             charEndOffset,
+            fieldReference,
             fieldGetterReference,
             fieldSetterReference,
+            lateIsSetFieldReference,
             lateIsSetGetterReference,
             lateIsSetSetterReference,
             lateGetterReference,
             lateSetterReference,
-            isCovariant,
+            isCovariantByDeclaration,
             isSetStrategy);
   @override
   Statement _createGetterBody(
@@ -1439,7 +1400,7 @@
   @override
   Procedure? _createSetter(
           Name name, Uri fileUri, int charOffset, Reference? reference,
-          {required bool isCovariant}) =>
+          {required bool isCovariantByDeclaration}) =>
       null;
 
   @override
@@ -1595,15 +1556,19 @@
 }
 
 class AbstractOrExternalFieldEncoding implements FieldEncoding {
+  final SourceFieldBuilder _fieldBuilder;
   final bool isAbstract;
   final bool isExternal;
+  final bool _isExtensionInstanceMember;
 
   late Procedure _getter;
   Procedure? _setter;
+  DartType? _type;
 
   AbstractOrExternalFieldEncoding(
+      this._fieldBuilder,
       String name,
-      FieldNameScheme fieldNameScheme,
+      NameScheme nameScheme,
       Uri fileUri,
       int charOffset,
       int charEndOffset,
@@ -1612,7 +1577,7 @@
       {required this.isAbstract,
       required this.isExternal,
       required bool isFinal,
-      required bool isCovariant,
+      required bool isCovariantByDeclaration,
       required bool isNonNullableByDefault})
       // ignore: unnecessary_null_comparison
       : assert(isAbstract != null),
@@ -1621,47 +1586,140 @@
         // ignore: unnecessary_null_comparison
         assert(isFinal != null),
         // ignore: unnecessary_null_comparison
-        assert(isCovariant != null),
+        assert(isCovariantByDeclaration != null),
         // ignore: unnecessary_null_comparison
-        assert(isNonNullableByDefault != null) {
-    _getter = new Procedure(
-        fieldNameScheme.getName(FieldNameType.Getter, name,
-            isSynthesized: true),
-        ProcedureKind.Getter,
-        new FunctionNode(null),
-        fileUri: fileUri,
-        reference: getterReference)
-      ..fileOffset = charOffset
-      ..fileEndOffset = charEndOffset
-      ..isNonNullableByDefault = isNonNullableByDefault;
-    if (!isFinal) {
-      VariableDeclaration parameter =
-          new VariableDeclaration("#externalFieldValue")
-            ..isCovariant = isCovariant
-            ..fileOffset = charOffset;
-      _setter = new Procedure(
-          fieldNameScheme.getName(FieldNameType.Setter, name,
-              isSynthesized: true),
-          ProcedureKind.Setter,
-          new FunctionNode(null,
-              positionalParameters: [parameter], returnType: const VoidType())
-            ..fileOffset = charOffset
-            ..fileEndOffset = charEndOffset,
+        assert(isNonNullableByDefault != null),
+        _isExtensionInstanceMember = isExternal &&
+            nameScheme.isExtensionMember &&
+            nameScheme.isInstanceMember {
+    if (_isExtensionInstanceMember) {
+      _getter = new Procedure(
+          nameScheme.getProcedureName(ProcedureKind.Getter, name),
+          ProcedureKind.Method,
+          new FunctionNode(null, positionalParameters: [
+            new VariableDeclaration(extensionThisName)..fileOffset
+          ]),
           fileUri: fileUri,
-          reference: setterReference)
+          reference: getterReference)
         ..fileOffset = charOffset
         ..fileEndOffset = charEndOffset
         ..isNonNullableByDefault = isNonNullableByDefault;
+      if (!isFinal) {
+        VariableDeclaration parameter =
+            new VariableDeclaration("#externalFieldValue")
+              ..isCovariantByDeclaration = isCovariantByDeclaration
+              ..fileOffset = charOffset;
+        _setter = new Procedure(
+            nameScheme.getProcedureName(ProcedureKind.Setter, name),
+            ProcedureKind.Method,
+            new FunctionNode(null,
+                positionalParameters: [
+                  new VariableDeclaration(extensionThisName)..fileOffset,
+                  parameter
+                ],
+                returnType: const VoidType())
+              ..fileOffset = charOffset
+              ..fileEndOffset = charEndOffset,
+            fileUri: fileUri,
+            reference: setterReference)
+          ..fileOffset = charOffset
+          ..fileEndOffset = charEndOffset
+          ..isNonNullableByDefault = isNonNullableByDefault;
+      }
+    } else {
+      _getter = new Procedure(
+          nameScheme.getFieldName(FieldNameType.Getter, name,
+              isSynthesized: true),
+          ProcedureKind.Getter,
+          new FunctionNode(null),
+          fileUri: fileUri,
+          reference: getterReference)
+        ..fileOffset = charOffset
+        ..fileEndOffset = charEndOffset
+        ..isNonNullableByDefault = isNonNullableByDefault;
+      if (!isFinal) {
+        VariableDeclaration parameter =
+            new VariableDeclaration("#externalFieldValue")
+              ..isCovariantByDeclaration = isCovariantByDeclaration
+              ..fileOffset = charOffset;
+        _setter = new Procedure(
+            nameScheme.getFieldName(FieldNameType.Setter, name,
+                isSynthesized: true),
+            ProcedureKind.Setter,
+            new FunctionNode(null,
+                positionalParameters: [parameter], returnType: const VoidType())
+              ..fileOffset = charOffset
+              ..fileEndOffset = charEndOffset,
+            fileUri: fileUri,
+            reference: setterReference)
+          ..fileOffset = charOffset
+          ..fileEndOffset = charEndOffset
+          ..isNonNullableByDefault = isNonNullableByDefault;
+      }
     }
   }
 
   @override
-  DartType get type => _getter.function.returnType;
+  DartType get type {
+    assert(_type != null,
+        "Type has not been computed for field ${_fieldBuilder.name}.");
+    return _type!;
+  }
 
   @override
   void set type(DartType value) {
-    _getter.function.returnType = value;
-    _setter?.function.positionalParameters.first.type = value;
+    assert(_type == null || _type is ImplicitFieldType,
+        "Type has already been computed for field ${_fieldBuilder.name}.");
+    _type = value;
+    if (value is! ImplicitFieldType) {
+      if (_isExtensionInstanceMember) {
+        SourceExtensionBuilder extensionBuilder =
+            _fieldBuilder.parent as SourceExtensionBuilder;
+        DartType onType = extensionBuilder.extension.onType;
+        List<TypeParameter> typeParameters =
+            extensionBuilder.extension.typeParameters;
+        if (typeParameters.isNotEmpty) {
+          FreshTypeParameters getterTypeParameters =
+              getFreshTypeParameters(typeParameters);
+          _getter.function.positionalParameters.first.type =
+              getterTypeParameters.substitute(onType);
+          _getter.function.returnType = getterTypeParameters.substitute(value);
+          _getter.function.typeParameters =
+              getterTypeParameters.freshTypeParameters;
+          setParents(
+              getterTypeParameters.freshTypeParameters, _getter.function);
+
+          Procedure? setter = _setter;
+          if (setter != null) {
+            FreshTypeParameters setterTypeParameters =
+                getFreshTypeParameters(typeParameters);
+            setter.function.positionalParameters.first.type =
+                setterTypeParameters.substitute(onType);
+            setter.function.positionalParameters[1].type =
+                setterTypeParameters.substitute(value);
+            setter.function.typeParameters =
+                setterTypeParameters.freshTypeParameters;
+            setParents(
+                setterTypeParameters.freshTypeParameters, setter.function);
+          }
+        } else {
+          _getter.function.returnType = value;
+          _setter?.function.positionalParameters[1].type = value;
+          _getter.function.positionalParameters.first.type = onType;
+          _setter?.function.positionalParameters.first.type = onType;
+        }
+      } else {
+        _getter.function.returnType = value;
+        Procedure? setter = _setter;
+        if (setter != null) {
+          if (setter.kind == ProcedureKind.Method) {
+            setter.function.positionalParameters[1].type = value;
+          } else {
+            setter.function.positionalParameters.first.type = value;
+          }
+        }
+      }
+    }
   }
 
   @override
@@ -1724,7 +1782,7 @@
 
   @override
   void setGenericCovariantImpl() {
-    _setter!.function.positionalParameters.first.isGenericCovariantImpl = true;
+    _setter!.function.positionalParameters.first.isCovariantByClass = true;
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
index 216d044..c0df993 100644
--- a/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/formal_parameter_builder.dart
@@ -116,7 +116,7 @@
 
   bool get isInitializingFormal => (modifiers & initializingFormalMask) != 0;
 
-  bool get isCovariant => (modifiers & covariantMask) != 0;
+  bool get isCovariantByDeclaration => (modifiers & covariantMask) != 0;
 
   // An initializing formal parameter might be final without its
   // VariableDeclaration being final. See
@@ -141,8 +141,8 @@
           type: builtType,
           isFinal: isFinal,
           isConst: isConst,
-          isFieldFormal: isInitializingFormal,
-          isCovariant: isCovariant,
+          isInitializingFormal: isInitializingFormal,
+          isCovariantByDeclaration: isCovariantByDeclaration,
           isRequired: isNamedRequired,
           hasDeclaredInitializer: hasDeclaredInitializer,
           isLowered: isExtensionThis)
diff --git a/pkg/front_end/lib/src/fasta/builder/function_builder.dart b/pkg/front_end/lib/src/fasta/builder/function_builder.dart
index c462800..8c525b7 100644
--- a/pkg/front_end/lib/src/fasta/builder/function_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/function_builder.dart
@@ -15,7 +15,7 @@
 import '../kernel/internal_ast.dart' show VariableDeclarationImpl;
 import '../kernel/kernel_helper.dart';
 
-import '../loader.dart' show Loader;
+import '../source/source_loader.dart' show SourceLoader;
 
 import '../messages.dart'
     show
@@ -129,7 +129,7 @@
   /// members.
   List<TypeParameter>? get extensionTypeParameters;
 
-  void becomeNative(Loader loader);
+  void becomeNative(SourceLoader loader);
 
   bool checkPatch(FunctionBuilder patch);
 
@@ -346,7 +346,7 @@
         function.typeParameters.add(parameter);
         if (needsCheckVisitor != null) {
           if (parameter.bound.accept(needsCheckVisitor)) {
-            parameter.isGenericCovariantImpl = true;
+            parameter.isCovariantByClass = true;
           }
         }
       }
@@ -358,7 +358,7 @@
             nonInstanceContext: !isConstructor && !isDeclarationInstanceMember);
         if (needsCheckVisitor != null) {
           if (parameter.type.accept(needsCheckVisitor)) {
-            parameter.isGenericCovariantImpl = true;
+            parameter.isCovariantByClass = true;
           }
         }
         if (formal.isNamed) {
@@ -526,7 +526,7 @@
   Member build(SourceLibraryBuilder library);
 
   @override
-  void becomeNative(Loader loader) {
+  void becomeNative(SourceLoader loader) {
     MemberBuilder constructor = loader.getNativeAnnotation();
     Arguments arguments =
         new Arguments(<Expression>[new StringLiteral(nativeMethodName!)]);
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index 439f98b..73cabf5 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -8,7 +8,7 @@
 
 import 'package:kernel/ast.dart' show Library, Nullability;
 
-import '../combinator.dart' show Combinator;
+import '../combinator.dart' show CombinatorBuilder;
 
 import '../problems.dart' show internalProblem, unsupported;
 
@@ -76,8 +76,8 @@
 
   Builder? addBuilder(String? name, Builder declaration, int charOffset);
 
-  void addExporter(
-      LibraryBuilder exporter, List<Combinator>? combinators, int charOffset);
+  void addExporter(LibraryBuilder exporter,
+      List<CombinatorBuilder>? combinators, int charOffset);
 
   /// Add a problem with a severity determined by the severity of the message.
   ///
@@ -242,8 +242,8 @@
   }
 
   @override
-  void addExporter(
-      LibraryBuilder exporter, List<Combinator>? combinators, int charOffset) {
+  void addExporter(LibraryBuilder exporter,
+      List<CombinatorBuilder>? combinators, int charOffset) {
     exporters.add(new Export(exporter, this, combinators, charOffset));
   }
 
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 bae23b9..772314b 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -54,7 +54,7 @@
 
   /// The [Member] to use when invoking this member builder.
   ///
-  /// For a constructor, a field, a regular method, a getter an operator or
+  /// For a constructor, a field, a regular method, a getter, an operator or
   /// a factory this is the [member] itself. For a setter this is `null`.
   Member? get invokeTarget;
 
@@ -68,6 +68,7 @@
   // TODO(johnniwinther): Remove this and create a [ProcedureBuilder] interface.
   ProcedureKind? get kind;
 
+  @override
   bool get isExternal;
 
   bool get isAbstract;
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index bccd75e..70e72af 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -16,6 +16,7 @@
         messageTypeVariableInStaticContext,
         messageTypedefCause,
         noLength,
+        templateExperimentNotEnabled,
         templateExtendingRestricted,
         templateNotAType,
         templateSupertypeIsIllegal,
@@ -149,16 +150,27 @@
     Template<Message Function(String name)> template =
         member == null ? templateTypeNotFound : templateNotAType;
     String flatName = flattenName(name, charOffset, fileUri);
+    int length =
+        name is Identifier ? name.endCharOffset - charOffset : flatName.length;
+    Message message;
     List<LocatedMessage>? context;
-    if (member != null) {
+    if (member == null) {
+      template = templateTypeNotFound;
+      message = template.withArguments(flatName);
+    } else if (declaration != null &&
+        declaration!.isExtension &&
+        library is SourceLibraryBuilder &&
+        !library.enableExtensionTypesInLibrary) {
+      message = templateExperimentNotEnabled.withArguments('extension-types',
+          library.enableExtensionTypesVersionInLibrary.toText());
+    } else {
+      template = templateNotAType;
       context = <LocatedMessage>[
         messageNotATypeContext.withLocation(member.fileUri!, member.charOffset,
             name is Identifier ? name.name.length : "$name".length)
       ];
+      message = template.withArguments(flatName);
     }
-    int length =
-        name is Identifier ? name.endCharOffset - charOffset : flatName.length;
-    Message message = template.withArguments(flatName);
     library.addProblem(message, charOffset, length, fileUri, context: context);
     declaration = buildInvalidTypeDeclarationBuilder(
         message.withLocation(fileUri, charOffset, length),
@@ -276,7 +288,7 @@
   // TODO(johnniwinther): Store [origin] on the built type.
   DartType buildInternal(LibraryBuilder library,
       {TypedefType? origin,
-      bool? nonInstanceContext,
+      required bool? nonInstanceContext,
       required bool forTypeLiteral}) {
     assert(declaration != null, "Declaration has not been resolved on $this.");
     // TODO(johnniwinther): Change `nonInstanceContext == true` to
diff --git a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
index 741445c..a1118c6 100644
--- a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/type_algebra.dart';
 
 import '../kernel/class_hierarchy_builder.dart';
-import '../kernel/kernel_api.dart';
 import '../kernel/member_covariance.dart';
 
-import '../loader.dart' show Loader;
-
+import '../source/name_scheme.dart';
+import '../source/source_loader.dart' show SourceLoader;
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
 
 import 'builder.dart';
@@ -94,7 +94,7 @@
       Reference? procedureReference,
       this._tearOffReference,
       AsyncMarker asyncModifier,
-      ProcedureNameScheme procedureNameScheme,
+      NameScheme nameScheme,
       {required bool isExtensionMember,
       required bool isInstanceMember,
       String? nativeMethodName})
@@ -107,7 +107,7 @@
         super(metadata, modifiers, returnType, name, typeVariables, formals,
             libraryBuilder, charOffset, nativeMethodName) {
     _procedure = new Procedure(
-        procedureNameScheme.getName(kind, name),
+        nameScheme.getProcedureName(kind, name),
         isExtensionInstanceMember ? ProcedureKind.Method : kind,
         new FunctionNode(null),
         fileUri: libraryBuilder.fileUri,
@@ -119,7 +119,7 @@
     this.asyncModifier = asyncModifier;
     if (isExtensionMember && isInstanceMember && kind == ProcedureKind.Method) {
       _extensionTearOff ??= new Procedure(
-          procedureNameScheme.getName(ProcedureKind.Getter, name),
+          nameScheme.getProcedureName(ProcedureKind.Getter, name),
           ProcedureKind.Method,
           new FunctionNode(null),
           isStatic: true,
@@ -310,35 +310,6 @@
     return _procedure;
   }
 
-  static String createProcedureName(bool isExtensionMethod, bool isStatic,
-      ProcedureKind kind, String? extensionName, String name) {
-    if (isExtensionMethod) {
-      String kindInfix = '';
-      if (!isStatic) {
-        // Instance getter and setter are converted to methods so we use an
-        // infix to make their names unique.
-        switch (kind) {
-          case ProcedureKind.Getter:
-            kindInfix = 'get#';
-            break;
-          case ProcedureKind.Setter:
-            kindInfix = 'set#';
-            break;
-          case ProcedureKind.Method:
-          case ProcedureKind.Operator:
-            kindInfix = '';
-            break;
-          case ProcedureKind.Factory:
-            throw new UnsupportedError(
-                'Unexpected extension method kind ${kind}');
-        }
-      }
-      return '${extensionName}|${kindInfix}${name}';
-    } else {
-      return name;
-    }
-  }
-
   /// Creates a top level function that creates a tear off of an extension
   /// instance method.
   ///
@@ -505,7 +476,7 @@
           : const <ClassMember>[];
 
   @override
-  void becomeNative(Loader loader) {
+  void becomeNative(SourceLoader loader) {
     _procedure.isExternal = true;
     super.becomeNative(loader);
   }
@@ -591,33 +562,3 @@
         memberBuilder == other.memberBuilder;
   }
 }
-
-class ProcedureNameScheme {
-  final bool isExtensionMember;
-  final bool isStatic;
-  final String? extensionName;
-  final Reference libraryReference;
-
-  ProcedureNameScheme(
-      {required this.isExtensionMember,
-      required this.isStatic,
-      this.extensionName,
-      required this.libraryReference})
-      // ignore: unnecessary_null_comparison
-      : assert(isExtensionMember != null),
-        // ignore: unnecessary_null_comparison
-        assert(isStatic != null),
-        // ignore: unnecessary_null_comparison
-        assert(!isExtensionMember || extensionName != null),
-        // ignore: unnecessary_null_comparison
-        assert(libraryReference != null);
-
-  Name getName(ProcedureKind kind, String name) {
-    // ignore: unnecessary_null_comparison
-    assert(kind != null);
-    return new Name.byReference(
-        SourceProcedureBuilder.createProcedureName(
-            isExtensionMember, isStatic, kind, extensionName, name),
-        libraryReference);
-  }
-}
diff --git a/pkg/front_end/lib/src/fasta/combinator.dart b/pkg/front_end/lib/src/fasta/combinator.dart
index 9f97607..9f07af0 100644
--- a/pkg/front_end/lib/src/fasta/combinator.dart
+++ b/pkg/front_end/lib/src/fasta/combinator.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.
 
-library fasta.combinator;
-
-class Combinator {
+class CombinatorBuilder {
   final bool isShow;
 
   final Set<String> names;
 
-  Combinator(this.isShow, this.names, int charOffset, Uri fileUri);
+  CombinatorBuilder(this.isShow, this.names, int charOffset, Uri fileUri);
 
-  Combinator.show(Iterable<String> names, int charOffset, Uri fileUri)
+  CombinatorBuilder.show(Iterable<String> names, int charOffset, Uri fileUri)
       : this(true, new Set<String>.from(names), charOffset, fileUri);
 
-  Combinator.hide(Iterable<String> names, int charOffset, Uri fileUri)
+  CombinatorBuilder.hide(Iterable<String> names, int charOffset, Uri fileUri)
       : this(false, new Set<String>.from(names), charOffset, fileUri);
 
   bool get isHide => !isShow;
diff --git a/pkg/front_end/lib/src/fasta/diagnostics.md b/pkg/front_end/lib/src/fasta/diagnostics.md
index 4307597..9ae63d6 100644
--- a/pkg/front_end/lib/src/fasta/diagnostics.md
+++ b/pkg/front_end/lib/src/fasta/diagnostics.md
@@ -8,7 +8,6 @@
   -- Note: if you move this file to a different location, please make sure that
   -- you also update these references to it:
   --  * pkg/compiler/lib/src/diagnostics/messages.dart
-  --  * pkg/dart_messages/lib/shared_messages.dart
   --  * pkg/_fe_analyzer_shared/lib/src/base/errors.dart
   --  * https://github.com/dart-lang/linter/
   -->
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
index 14ea957..3598ae5 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
@@ -4,35 +4,251 @@
 
 library fasta.dill_loader;
 
+import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
+
 import 'package:kernel/ast.dart' show Class, Component, DartType, Library;
 
 import '../builder/class_builder.dart';
 import '../builder/library_builder.dart';
 import '../builder/type_builder.dart';
 
+import '../crash.dart' show firstSourceUri;
+
 import '../fasta_codes.dart'
     show SummaryTemplate, Template, templateDillOutlineSummary;
 
 import '../kernel/type_builder_computer.dart' show TypeBuilderComputer;
 
-import '../loader.dart' show Loader;
+import '../loader.dart';
 
-import '../problems.dart' show unhandled;
+import '../messages.dart'
+    show
+        FormattedMessage,
+        LocatedMessage,
+        Message,
+        noLength,
+        SummaryTemplate,
+        Template,
+        messagePlatformPrivateLibraryAccess,
+        templateInternalProblemContextSeverity;
+
+import '../problems.dart' show internalProblem, unhandled;
 
 import '../source/source_loader.dart' show SourceLoader;
 
-import '../target_implementation.dart' show TargetImplementation;
+import '../ticker.dart' show Ticker;
 
 import 'dill_library_builder.dart' show DillLibraryBuilder;
 
 import 'dill_target.dart' show DillTarget;
 
+import 'dart:collection' show Queue;
+
 class DillLoader extends Loader {
   SourceLoader? currentSourceLoader;
 
-  DillLoader(TargetImplementation target) : super(target);
+  @override
+  final Map<Uri, DillLibraryBuilder> builders = <Uri, DillLibraryBuilder>{};
+
+  final Queue<DillLibraryBuilder> _unparsedLibraries =
+      new Queue<DillLibraryBuilder>();
+
+  final List<Library> libraries = <Library>[];
 
   @override
+  final DillTarget target;
+
+  /// List of all handled compile-time errors seen so far by libraries loaded
+  /// by this loader.
+  ///
+  /// A handled error is an error that has been added to the generated AST
+  /// already, for example, as a throw expression.
+  final List<LocatedMessage> handledErrors = <LocatedMessage>[];
+
+  /// List of all unhandled compile-time errors seen so far by libraries loaded
+  /// by this loader.
+  ///
+  /// An unhandled error is an error that hasn't been handled, see
+  /// [handledErrors].
+  final List<LocatedMessage> unhandledErrors = <LocatedMessage>[];
+
+  final Set<String> seenMessages = new Set<String>();
+
+  LibraryBuilder? _coreLibrary;
+
+  /// The first library loaded by this [DillLoader].
+  // TODO(johnniwinther): Do we need this?
+  LibraryBuilder? first;
+
+  int byteCount = 0;
+
+  DillLoader(this.target);
+
+  @override
+  LibraryBuilder get coreLibrary => _coreLibrary!;
+
+  void set coreLibrary(LibraryBuilder value) {
+    _coreLibrary = value;
+  }
+
+  Ticker get ticker => target.ticker;
+
+  /// Look up a library builder by the [uri], or if such doesn't exist, create
+  /// one. The canonical URI of the library is [uri], and its actual location is
+  /// [fileUri].
+  ///
+  /// Canonical URIs have schemes like "dart", or "package", and the actual
+  /// location is often a file URI.
+  ///
+  /// The [accessor] is the library that's trying to import, export, or include
+  /// as part [uri], and [charOffset] is the location of the corresponding
+  /// directive. If [accessor] isn't allowed to access [uri], it's a
+  /// compile-time error.
+  DillLibraryBuilder read(Uri uri, int charOffset, {LibraryBuilder? accessor}) {
+    DillLibraryBuilder builder = builders.putIfAbsent(uri, () {
+      DillLibraryBuilder library = target.createLibraryBuilder(uri);
+      assert(library.loader == this);
+      if (uri.scheme == "dart") {
+        if (uri.path == "core") {
+          _coreLibrary = library;
+        }
+      }
+      {
+        // Add any additional logic after this block. Setting the
+        // firstSourceUri and first library should be done as early as
+        // possible.
+        firstSourceUri ??= uri;
+        first ??= library;
+      }
+      if (_coreLibrary == library) {
+        target.loadExtraRequiredLibraries(this);
+      }
+      if (target.backendTarget.mayDefineRestrictedType(uri)) {
+        library.mayImplementRestrictedTypes = true;
+      }
+      _unparsedLibraries.addLast(library);
+      return library;
+    });
+    if (accessor != null) {
+      builder.recordAccess(charOffset, noLength, accessor.fileUri);
+      if (!accessor.isPatch &&
+          !accessor.isPart &&
+          !target.backendTarget
+              .allowPlatformPrivateLibraryAccess(accessor.importUri, uri)) {
+        accessor.addProblem(messagePlatformPrivateLibraryAccess, charOffset,
+            noLength, accessor.fileUri);
+      }
+    }
+    return builder;
+  }
+
+  void _ensureCoreLibrary() {
+    if (_coreLibrary == null) {
+      read(Uri.parse("dart:core"), 0, accessor: first);
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      read(Uri.parse("dart:collection"), 0, accessor: first);
+      assert(_coreLibrary != null);
+    }
+  }
+
+  void buildOutlines() {
+    _ensureCoreLibrary();
+    while (_unparsedLibraries.isNotEmpty) {
+      DillLibraryBuilder library = _unparsedLibraries.removeFirst();
+      buildOutline(library);
+    }
+    _logSummary(outlineSummaryTemplate);
+  }
+
+  void _logSummary(Template<SummaryTemplate> template) {
+    ticker.log((Duration elapsed, Duration sinceStart) {
+      int libraryCount = 0;
+      for (DillLibraryBuilder library in builders.values) {
+        assert(library.loader == this);
+        libraryCount++;
+      }
+      double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond;
+      Message message = template.withArguments(
+          libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount);
+      print("$sinceStart: ${message.message}");
+    });
+  }
+
+  /// Register [message] as a problem with a severity determined by the
+  /// intrinsic severity of the message.
+  // TODO(johnniwinther): Avoid the need for this. If this is ever used, it is
+  // inconsistent with messages reported through the [SourceLoader] since they
+  // each have their own list of unhandled/unhandled errors and seen messages,
+  // and only those of the [SourceLoader] are used elsewhere. Use
+  // [currentSourceLoader] to forward messages to the [SourceLoader] instead.
+  @override
+  FormattedMessage? addProblem(
+      Message message, int charOffset, int length, Uri? fileUri,
+      {bool wasHandled: false,
+      List<LocatedMessage>? context,
+      Severity? severity,
+      bool problemOnLibrary: false,
+      List<Uri>? involvedFiles}) {
+    return _addMessage(message, charOffset, length, fileUri, severity,
+        wasHandled: wasHandled,
+        context: context,
+        problemOnLibrary: problemOnLibrary,
+        involvedFiles: involvedFiles);
+  }
+
+  /// All messages reported by the compiler (errors, warnings, etc.) are routed
+  /// through this method.
+  ///
+  /// Returns a FormattedMessage if the message is new, that is, not previously
+  /// reported. This is important as some parser errors may be reported up to
+  /// three times by `OutlineBuilder`, `DietListener`, and `BodyBuilder`.
+  /// If the message is not new, [null] is reported.
+  ///
+  /// If [severity] is `Severity.error`, the message is added to
+  /// [handledErrors] if [wasHandled] is true or to [unhandledErrors] if
+  /// [wasHandled] is false.
+  FormattedMessage? _addMessage(Message message, int charOffset, int length,
+      Uri? fileUri, Severity? severity,
+      {bool wasHandled: false,
+      List<LocatedMessage>? context,
+      bool problemOnLibrary: false,
+      List<Uri>? involvedFiles}) {
+    severity ??= message.code.severity;
+    if (severity == Severity.ignored) return null;
+    String trace = """
+message: ${message.message}
+charOffset: $charOffset
+fileUri: $fileUri
+severity: $severity
+""";
+    if (!seenMessages.add(trace)) return null;
+    if (message.code.severity == Severity.context) {
+      internalProblem(
+          templateInternalProblemContextSeverity
+              .withArguments(message.code.name),
+          charOffset,
+          fileUri);
+    }
+    target.context.report(
+        fileUri != null
+            ? message.withLocation(fileUri, charOffset, length)
+            : message.withoutLocation(),
+        severity,
+        context: context,
+        involvedFiles: involvedFiles);
+    if (severity == Severity.error) {
+      (wasHandled ? handledErrors : unhandledErrors).add(fileUri != null
+          ? message.withLocation(fileUri, charOffset, length)
+          : message.withoutLocation());
+    }
+    FormattedMessage formattedMessage = target.createFormattedMessage(
+        message, charOffset, length, fileUri, context, severity,
+        involvedFiles: involvedFiles);
+    return formattedMessage;
+  }
+
   Template<SummaryTemplate> get outlineSummaryTemplate =>
       templateDillOutlineSummary;
 
@@ -43,22 +259,19 @@
     List<Library> componentLibraries = component.libraries;
     List<Uri> requestedLibraries = <Uri>[];
     List<Uri> requestedLibrariesFileUri = <Uri>[];
-    DillTarget target = this.target as DillTarget;
     for (int i = 0; i < componentLibraries.length; i++) {
       Library library = componentLibraries[i];
       Uri uri = library.importUri;
       if (filter == null || filter(library.importUri)) {
         libraries.add(library);
-        target.addLibrary(library);
+        target.registerLibrary(library);
         requestedLibraries.add(uri);
         requestedLibrariesFileUri.add(library.fileUri);
       }
     }
     List<DillLibraryBuilder> result = <DillLibraryBuilder>[];
     for (int i = 0; i < requestedLibraries.length; i++) {
-      result.add(
-          read(requestedLibraries[i], -1, fileUri: requestedLibrariesFileUri[i])
-              as DillLibraryBuilder);
+      result.add(read(requestedLibraries[i], -1));
     }
     target.uriToSource.addAll(component.uriToSource);
     this.byteCount += byteCount;
@@ -74,18 +287,16 @@
     libraries.add(library);
 
     // Weird interaction begins.
-    DillTarget target = this.target as DillTarget;
+    //
     // Create dill library builder (adds it to a map where it's fetched
     // again momentarily).
-    target.addLibrary(library);
+    target.registerLibrary(library);
     // Set up the dill library builder (fetch it from the map again, add it to
     // another map and setup some auxiliary things).
-    return read(library.importUri, -1, fileUri: library.fileUri)
-        as DillLibraryBuilder;
+    return read(library.importUri, -1);
   }
 
-  @override
-  Future<Null> buildOutline(DillLibraryBuilder builder) async {
+  void buildOutline(DillLibraryBuilder builder) {
     // ignore: unnecessary_null_comparison
     if (builder.library == null) {
       unhandled("null", "builder.library", 0, builder.fileUri);
@@ -93,11 +304,6 @@
     builder.markAsReadyToBuild();
   }
 
-  @override
-  Future<Null> buildBody(DillLibraryBuilder builder) {
-    return buildOutline(builder);
-  }
-
   void finalizeExports({bool suppressFinalizationErrors: false}) {
     for (LibraryBuilder builder in builders.values) {
       DillLibraryBuilder library = builder as DillLibraryBuilder;
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
index 9730305..4917953 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
@@ -14,7 +14,7 @@
 import '../kernel/class_hierarchy_builder.dart'
     show ClassHierarchyBuilder, ClassMember;
 import '../kernel/member_covariance.dart';
-import '../kernel/kernel_builder.dart'
+import '../kernel/utils.dart'
     show isRedirectingGenerativeConstructorImplementation;
 
 import '../modifier.dart'
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_target.dart b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
index f9c24fd..28ccfbc 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_target.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
@@ -2,92 +2,114 @@
 // for 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 fasta.dill_target;
+import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
 
-import 'package:kernel/ast.dart' show Library;
+import 'package:kernel/ast.dart' show Library, Source;
 
 import 'package:kernel/target/targets.dart' show Target;
 
-import '../builder/class_builder.dart';
+import '../../base/processed_options.dart' show ProcessedOptions;
 
-import '../builder/library_builder.dart' show LibraryBuilder;
+import '../compiler_context.dart' show CompilerContext;
 
-import '../problems.dart' show unsupported;
-
-import '../source/source_library_builder.dart' show LanguageVersion;
-
-import '../target_implementation.dart' show TargetImplementation;
+import '../messages.dart' show FormattedMessage, LocatedMessage, Message;
 
 import '../ticker.dart' show Ticker;
 
 import '../uri_translator.dart' show UriTranslator;
 
+import '../target_implementation.dart' show TargetImplementation;
+
 import 'dill_library_builder.dart' show DillLibraryBuilder;
 
 import 'dill_loader.dart' show DillLoader;
 
 class DillTarget extends TargetImplementation {
-  final Map<Uri, DillLibraryBuilder> libraryBuilders =
+  final Ticker ticker;
+
+  final Map<Uri, DillLibraryBuilder> _knownLibraryBuilders =
       <Uri, DillLibraryBuilder>{};
 
   bool isLoaded = false;
 
   late final DillLoader loader;
 
-  DillTarget(Ticker ticker, UriTranslator uriTranslator, Target backendTarget)
-      : super(ticker, uriTranslator, backendTarget) {
+  final UriTranslator uriTranslator;
+
+  @override
+  final Target backendTarget;
+
+  @override
+  final CompilerContext context = CompilerContext.current;
+
+  /// Shared with [CompilerContext].
+  final Map<Uri, Source> uriToSource = CompilerContext.current.uriToSource;
+
+  DillTarget(this.ticker, this.uriTranslator, this.backendTarget)
+      // ignore: unnecessary_null_comparison
+      : assert(ticker != null),
+        // ignore: unnecessary_null_comparison
+        assert(uriTranslator != null),
+        // ignore: unnecessary_null_comparison
+        assert(backendTarget != null) {
     loader = new DillLoader(this);
   }
 
-  @override
-  void addSourceInformation(
-      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
-    unsupported("addSourceInformation", -1, null);
+  void loadExtraRequiredLibraries(DillLoader loader) {
+    for (String uri in backendTarget.extraRequiredLibraries) {
+      loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
+    }
+    if (context.compilingPlatform) {
+      for (String uri in backendTarget.extraRequiredLibrariesPlatform) {
+        loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
+      }
+    }
   }
 
-  @override
-  Future<Null> buildComponent() {
-    return new Future<Null>.sync(() => unsupported("buildComponent", -1, null));
+  FormattedMessage createFormattedMessage(
+      Message message,
+      int charOffset,
+      int length,
+      Uri? fileUri,
+      List<LocatedMessage>? messageContext,
+      Severity severity,
+      {List<Uri>? involvedFiles}) {
+    ProcessedOptions processedOptions = context.options;
+    return processedOptions.format(
+        fileUri != null
+            ? message.withLocation(fileUri, charOffset, length)
+            : message.withoutLocation(),
+        severity,
+        messageContext,
+        involvedFiles: involvedFiles);
   }
 
-  @override
-  Future<Null> buildOutlines({bool suppressFinalizationErrors: false}) async {
+  void buildOutlines({bool suppressFinalizationErrors: false}) {
     if (loader.libraries.isNotEmpty) {
-      await loader.buildOutlines();
+      loader.buildOutlines();
       loader.finalizeExports(
           suppressFinalizationErrors: suppressFinalizationErrors);
     }
     isLoaded = true;
   }
 
-  @override
-  DillLibraryBuilder createLibraryBuilder(
-      Uri uri,
-      Uri fileUri,
-      Uri? packageUri,
-      LanguageVersion packageLanguageVersion,
-      LibraryBuilder? origin,
-      Library? referencesFrom,
-      bool? referenceIsPartOwner) {
-    assert(origin == null);
-    assert(referencesFrom == null);
+  /// Returns the [DillLibraryBuilder] corresponding to [uri].
+  ///
+  /// The [DillLibraryBuilder] is pulled from [_knownLibraryBuilders].
+  DillLibraryBuilder createLibraryBuilder(Uri uri) {
     DillLibraryBuilder libraryBuilder =
-        libraryBuilders.remove(uri) as DillLibraryBuilder;
+        _knownLibraryBuilders.remove(uri) as DillLibraryBuilder;
     // ignore: unnecessary_null_comparison
     assert(libraryBuilder != null, "No library found for $uri.");
     return libraryBuilder;
   }
 
-  @override
-  void breakCycle(ClassBuilder cls) {}
-
-  void addLibrary(Library library) {
-    libraryBuilders[library.importUri] =
+  void registerLibrary(Library library) {
+    _knownLibraryBuilders[library.importUri] =
         new DillLibraryBuilder(library, loader);
   }
 
-  @override
   void releaseAncillaryResources() {
-    libraryBuilders.clear();
+    _knownLibraryBuilders.clear();
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/export.dart b/pkg/front_end/lib/src/fasta/export.dart
index 34a0ba9..323a5f7 100644
--- a/pkg/front_end/lib/src/fasta/export.dart
+++ b/pkg/front_end/lib/src/fasta/export.dart
@@ -7,7 +7,7 @@
 import 'builder/builder.dart';
 import 'builder/library_builder.dart';
 
-import 'combinator.dart' show Combinator;
+import 'combinator.dart' show CombinatorBuilder;
 import 'fasta_codes.dart';
 
 class Export {
@@ -17,7 +17,7 @@
   /// The library being exported.
   LibraryBuilder exported;
 
-  final List<Combinator>? combinators;
+  final List<CombinatorBuilder>? combinators;
 
   final int charOffset;
 
@@ -27,7 +27,7 @@
 
   bool addToExportScope(String name, Builder member) {
     if (combinators != null) {
-      for (Combinator combinator in combinators!) {
+      for (CombinatorBuilder combinator in combinators!) {
         if (combinator.isShow && !combinator.names.contains(name)) return false;
         if (combinator.isHide && combinator.names.contains(name)) return false;
       }
diff --git a/pkg/front_end/lib/src/fasta/get_dependencies.dart b/pkg/front_end/lib/src/fasta/get_dependencies.dart
index 78504b7..1db1afa 100644
--- a/pkg/front_end/lib/src/fasta/get_dependencies.dart
+++ b/pkg/front_end/lib/src/fasta/get_dependencies.dart
@@ -52,7 +52,7 @@
         new KernelTarget(fileSystem, false, dillTarget, uriTranslator);
 
     kernelTarget.setEntryPoints(<Uri>[script]);
-    await dillTarget.buildOutlines();
+    dillTarget.buildOutlines();
     await kernelTarget.loader.buildOutlines();
     return new List<Uri>.from(c.dependencies);
   });
diff --git a/pkg/front_end/lib/src/fasta/import.dart b/pkg/front_end/lib/src/fasta/import.dart
index 439ec37..ec7df03 100644
--- a/pkg/front_end/lib/src/fasta/import.dart
+++ b/pkg/front_end/lib/src/fasta/import.dart
@@ -10,9 +10,9 @@
 import 'builder/library_builder.dart';
 import 'builder/prefix_builder.dart';
 
-import 'kernel/kernel_builder.dart' show toKernelCombinators;
+import 'kernel/utils.dart' show toKernelCombinators;
 
-import 'combinator.dart' show Combinator;
+import 'combinator.dart' show CombinatorBuilder;
 
 import 'configuration.dart' show Configuration;
 
@@ -31,7 +31,7 @@
 
   final String? prefix;
 
-  final List<Combinator>? combinators;
+  final List<CombinatorBuilder>? combinators;
 
   final List<Configuration>? configurations;
 
@@ -73,7 +73,7 @@
     }
     imported!.exportScope.forEach((String name, Builder member) {
       if (combinators != null) {
-        for (Combinator combinator in combinators!) {
+        for (CombinatorBuilder combinator in combinators!) {
           if (combinator.isShow && !combinator.names.contains(name)) return;
           if (combinator.isHide && combinator.names.contains(name)) return;
         }
@@ -94,7 +94,7 @@
     String? prefix,
     SourceLibraryBuilder importer,
     LibraryBuilder? imported,
-    List<Combinator>? combinators,
+    List<CombinatorBuilder>? combinators,
     bool deferred,
     int charOffset,
     int prefixCharOffset,
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 6a57d1d..a188b12 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -10,8 +10,15 @@
     show ScannerConfiguration;
 
 import 'package:front_end/src/api_prototype/experimental_flags.dart';
-import 'package:front_end/src/api_prototype/front_end.dart';
+
+import 'package:front_end/src/api_prototype/lowering_predicates.dart'
+    show isExtensionThisName;
+
 import 'package:front_end/src/base/nnbd_mode.dart';
+
+import 'package:front_end/src/fasta/builder/member_builder.dart'
+    show MemberBuilder;
+
 import 'package:front_end/src/fasta/fasta_codes.dart';
 import 'package:front_end/src/fasta/source/source_loader.dart';
 import 'package:kernel/binary/ast_from_binary.dart'
@@ -34,6 +41,7 @@
         Component,
         DartType,
         Expression,
+        Extension,
         FunctionNode,
         Library,
         LibraryDependency,
@@ -48,7 +56,8 @@
         Source,
         Supertype,
         TreeNode,
-        TypeParameter;
+        TypeParameter,
+        VariableDeclaration;
 
 import 'package:kernel/canonical_name.dart'
     show CanonicalNameError, CanonicalNameSdkError;
@@ -71,6 +80,8 @@
 
 import 'builder/class_builder.dart' show ClassBuilder;
 
+import 'builder/extension_builder.dart' show ExtensionBuilder;
+
 import 'builder/field_builder.dart' show FieldBuilder;
 
 import 'builder/library_builder.dart' show LibraryBuilder;
@@ -83,7 +94,7 @@
 
 import 'builder_graph.dart' show BuilderGraph;
 
-import 'combinator.dart' show Combinator;
+import 'combinator.dart' show CombinatorBuilder;
 
 import 'compiler_context.dart' show CompilerContext;
 
@@ -111,7 +122,7 @@
 
 import 'hybrid_file_system.dart' show HybridFileSystem;
 
-import 'kernel/kernel_builder.dart' show ClassHierarchyBuilder;
+import 'kernel/class_hierarchy_builder.dart' show ClassHierarchyBuilder;
 
 import 'kernel/internal_ast.dart' show VariableDeclarationImpl;
 
@@ -277,7 +288,7 @@
 
       // For modular compilation we can be asked to load components and track
       // which libraries we actually use for the compilation. Set that up now.
-      await loadEnsureLoadedComponents(reusedLibraries);
+      loadEnsureLoadedComponents(reusedLibraries);
       resetTrackingOfUsedLibraries(hierarchy);
 
       // For each computeDelta call we create a new userCode object which needs
@@ -362,7 +373,7 @@
         dillLoadedData!.loader.currentSourceLoader = userCode!.loader;
       } else {
         previousSourceBuilders =
-            await convertSourceLibraryBuildersToDill(experimentalInvalidation);
+            convertSourceLibraryBuildersToDill(experimentalInvalidation);
       }
 
       experimentalInvalidation = null;
@@ -398,8 +409,8 @@
   /// source builders and they will thus be patched up here too.
   ///
   /// Returns the set of Libraries that now has new (dill) builders.
-  Future<Set<Library>> convertSourceLibraryBuildersToDill(
-      ExperimentalInvalidation? experimentalInvalidation) async {
+  Set<Library> convertSourceLibraryBuildersToDill(
+      ExperimentalInvalidation? experimentalInvalidation) {
     bool changed = false;
     Set<Library> newDillLibraryBuilders = new Set<Library>();
     userBuilders ??= <Uri, LibraryBuilder>{};
@@ -427,7 +438,7 @@
     if (changed) {
       // We suppress finalization errors because they have already been
       // reported.
-      await dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
+      dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
       assert(_checkEquivalentScopes(
           userCode!.loader.builders, dillLoadedData!.loader.builders));
 
@@ -618,9 +629,15 @@
     if (trackNeededDillLibraries) {
       // Which dill builders were built?
       neededDillLibraries = new Set<Library>();
+
+      // Propagate data from constant evaluator: Libraries used in the constant
+      // evaluator - that comes from dill - are marked.
+      Set<Library> librariesUsedByConstantEvaluator = userCode!.librariesUsed;
+
       for (LibraryBuilder builder in dillLoadedData!.loader.builders.values) {
         if (builder is DillLibraryBuilder) {
-          if (builder.isBuiltAndMarked) {
+          if (builder.isBuiltAndMarked ||
+              librariesUsedByConstantEvaluator.contains(builder.library)) {
             neededDillLibraries!.add(builder.library);
           }
         }
@@ -1267,7 +1284,7 @@
 
       // We suppress finalization errors because they will reported via
       // problemsAsJson fields (with better precision).
-      await dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
+      dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
       userBuilders = <Uri, LibraryBuilder>{};
       platformBuilders = <LibraryBuilder>[];
       dillLoadedData!.loader.builders.forEach((uri, builder) {
@@ -1403,8 +1420,7 @@
   }
 
   /// Internal method.
-  Future<void> loadEnsureLoadedComponents(
-      List<LibraryBuilder> reusedLibraries) async {
+  void loadEnsureLoadedComponents(List<LibraryBuilder> reusedLibraries) {
     if (modulesToLoad != null) {
       bool loadedAnything = false;
       for (Component module in modulesToLoad!) {
@@ -1412,7 +1428,7 @@
         for (Library lib in module.libraries) {
           if (!dillLoadedData!.loader.builders.containsKey(lib.importUri)) {
             dillLoadedData!.loader.libraries.add(lib);
-            dillLoadedData!.addLibrary(lib);
+            dillLoadedData!.registerLibrary(lib);
             reusedLibraries.add(dillLoadedData!.loader.read(lib.importUri, -1));
             usedComponent = true;
           }
@@ -1425,7 +1441,7 @@
       if (loadedAnything) {
         // We suppress finalization errors because they will reported via
         // problemsAsJson fields (with better precision).
-        await dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
+        dillLoadedData!.buildOutlines(suppressFinalizationErrors: true);
         userBuilders = <Uri, LibraryBuilder>{};
         platformBuilders = <LibraryBuilder>[];
         dillLoadedData!.loader.builders.forEach((uri, builder) {
@@ -1901,8 +1917,9 @@
       List<TypeParameter> typeDefinitions,
       String syntheticProcedureName,
       Uri libraryUri,
-      [String? className,
-      bool isStatic = false]) async {
+      {String? className,
+      String? methodName,
+      bool isStatic = false}) async {
     assert(dillLoadedData != null && userCode != null);
 
     return await context.runInContext((_) async {
@@ -1917,6 +1934,26 @@
         cls = classBuilder?.cls;
         if (cls == null) return null;
       }
+      Extension? extension;
+      String? extensionName;
+      if (methodName != null) {
+        int indexOfDot = methodName.indexOf(".");
+        if (indexOfDot >= 0) {
+          String beforeDot = methodName.substring(0, indexOfDot);
+          String afterDot = methodName.substring(indexOfDot + 1);
+          Builder? builder = libraryBuilder.scopeBuilder[beforeDot];
+          extensionName = beforeDot;
+          if (builder is ExtensionBuilder) {
+            extension = builder.extension;
+            Builder? subBuilder = builder.scopeBuilder[afterDot];
+            if (subBuilder is MemberBuilder) {
+              if (subBuilder.isExtensionInstanceMember) {
+                isStatic = false;
+              }
+            }
+          }
+        }
+      }
 
       userCode!.loader.resetSeenMessages();
 
@@ -1931,8 +1968,14 @@
           return null;
         }
       }
+      int index = 0;
       for (String name in definitions.keys) {
-        if (!isLegalIdentifier(name)) {
+        index++;
+        if (!(isLegalIdentifier(name) ||
+            (extension != null &&
+                !isStatic &&
+                index == 1 &&
+                isExtensionThisName(name)))) {
           userCode!.loader.addProblem(
               templateIncrementalCompilerIllegalParameter.withArguments(name),
               // TODO: pass variable declarations instead of
@@ -1962,16 +2005,16 @@
             in libraryBuilder.library.dependencies) {
           if (!dependency.isImport) continue;
 
-          List<Combinator>? combinators;
+          List<CombinatorBuilder>? combinators;
 
           for (kernel.Combinator combinator in dependency.combinators) {
-            combinators ??= <Combinator>[];
+            combinators ??= <CombinatorBuilder>[];
 
             combinators.add(combinator.isShow
-                ? new Combinator.show(combinator.names, combinator.fileOffset,
-                    libraryBuilder.fileUri)
-                : new Combinator.hide(combinator.names, combinator.fileOffset,
-                    libraryBuilder.fileUri));
+                ? new CombinatorBuilder.show(combinator.names,
+                    combinator.fileOffset, libraryBuilder.fileUri)
+                : new CombinatorBuilder.hide(combinator.names,
+                    combinator.fileOffset, libraryBuilder.fileUri));
           }
 
           debugLibrary.addImport(
@@ -2003,13 +2046,29 @@
           positionalParameters: definitions.keys
               .map((name) =>
                   new VariableDeclarationImpl(name, 0, type: definitions[name])
-                    ..fileOffset =
-                        cls?.fileOffset ?? libraryBuilder.library.fileOffset)
+                    ..fileOffset = cls?.fileOffset ??
+                        extension?.fileOffset ??
+                        libraryBuilder.library.fileOffset)
               .toList());
 
+      VariableDeclaration? extensionThis;
+      if (extension != null &&
+          !isStatic &&
+          parameters.positionalParameters.isNotEmpty) {
+        // We expect the first parameter to be called #this and be special.
+        if (isExtensionThisName(parameters.positionalParameters.first.name)) {
+          extensionThis = parameters.positionalParameters.first;
+          extensionThis.isLowered = true;
+        }
+      }
+
       debugLibrary.build(userCode!.loader.coreLibrary, modifyTarget: false);
       Expression compiledExpression = await userCode!.loader.buildExpression(
-          debugLibrary, className, className != null && !isStatic, parameters);
+          debugLibrary,
+          className ?? extensionName,
+          (className != null && !isStatic) || extensionThis != null,
+          parameters,
+          extensionThis);
 
       Procedure procedure = new Procedure(
           new Name(syntheticProcedureName), ProcedureKind.Method, parameters,
@@ -2020,7 +2079,7 @@
         ..parent = parameters;
 
       procedure.fileUri = debugLibrary.fileUri;
-      procedure.parent = className != null ? cls : libraryBuilder.library;
+      procedure.parent = cls ?? libraryBuilder.library;
 
       userCode!.uriToSource.remove(debugExprUri);
       userCode!.loader.sourceBytes.remove(debugExprUri);
@@ -2396,6 +2455,7 @@
     implements ChangedStructureNotifier {
   Set<Class>? classHierarchyChanges;
   Set<Class>? classMemberChanges;
+  Set<Library> librariesUsed = {};
 
   IncrementalKernelTarget(FileSystem fileSystem, bool includeComments,
       DillTarget dillTarget, UriTranslator uriTranslator)
@@ -2415,4 +2475,9 @@
     classHierarchyChanges ??= <Class>{};
     classHierarchyChanges!.add(cls);
   }
+
+  @override
+  void markLibrariesUsed(Set<Library> visitedLibraries) {
+    librariesUsed.addAll(visitedLibraries);
+  }
 }
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 0db0a7a..3bf6051 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -29,7 +29,8 @@
         unescapeFirstStringPart,
         unescapeLastStringPart,
         unescapeString;
-
+import 'package:_fe_analyzer_shared/src/parser/stack_listener.dart'
+    show FixedNullableList, GrowableList, NullValue, ParserRecovery;
 import 'package:_fe_analyzer_shared/src/parser/value_kind.dart';
 
 import 'package:_fe_analyzer_shared/src/scanner/scanner.dart' show Token;
@@ -39,6 +40,12 @@
 import 'package:_fe_analyzer_shared/src/util/link.dart';
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/clone.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/src/bounds_checks.dart' hide calculateBounds;
+import 'package:kernel/transformations/flags.dart';
+import 'package:kernel/type_algebra.dart';
 import 'package:kernel/type_environment.dart';
 
 import '../builder/builder.dart';
@@ -49,7 +56,6 @@
 import '../builder/extension_builder.dart';
 import '../builder/factory_builder.dart';
 import '../builder/field_builder.dart';
-import '../builder/fixed_type_builder.dart';
 import '../builder/formal_parameter_builder.dart';
 import '../builder/function_builder.dart';
 import '../builder/function_type_builder.dart';
@@ -101,59 +107,35 @@
 import '../scope.dart';
 
 import '../source/diet_parser.dart';
-
-import '../source/scope_listener.dart'
-    show
-        FixedNullableList,
-        GrowableList,
-        JumpTargetKind,
-        NullValue,
-        ParserRecovery,
-        ScopeListener;
-
+import '../source/scope_listener.dart' show JumpTargetKind, ScopeListener;
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
-
 import '../source/stack_listener_impl.dart' show offsetForToken;
-
 import '../source/value_kinds.dart';
 
 import '../type_inference/type_inferrer.dart'
     show TypeInferrer, InferredFunctionBody;
-
 import '../type_inference/type_schema.dart' show UnknownType;
 
 import '../util/helpers.dart' show DelayedActionPerformer;
 
 import 'collections.dart';
-
 import 'constness.dart' show Constness;
-
 import 'constructor_tearoff_lowering.dart';
-
 import 'expression_generator.dart';
-
 import 'expression_generator_helper.dart';
-
 import 'forest.dart' show Forest;
-
 import 'implicit_type_argument.dart' show ImplicitTypeArgument;
-
+import 'internal_ast.dart';
+import 'kernel_variable_builder.dart';
+import 'load_library_builder.dart';
 import 'redirecting_factory_body.dart'
     show
         RedirectingFactoryBody,
         RedirectionTarget,
         getRedirectingFactoryBody,
         getRedirectionTarget;
-
 import 'type_algorithms.dart' show calculateBounds;
-
-import 'kernel_api.dart';
-
-import 'kernel_ast_api.dart';
-
-import 'internal_ast.dart';
-
-import 'kernel_builder.dart';
+import 'utils.dart';
 
 // TODO(ahe): Remove this and ensure all nodes have a location.
 const int noLocation = TreeNode.noOffset;
@@ -236,7 +218,10 @@
   /// When parsing this initializer `x = x`, `x` must be resolved in two
   /// different scopes. The first `x` must be resolved in the class' scope, the
   /// second in the formal parameter scope.
-  bool inInitializer = false;
+  bool inInitializerLeftHandSide = false;
+
+  /// This is set to true when we are parsing constructor initializers.
+  bool inConstructorInitializer = false;
 
   /// Set to `true` when we are parsing a field initializer either directly
   /// or within an initializer list.
@@ -281,7 +266,6 @@
 
   Link<bool> _isOrAsOperatorTypeState = const Link<bool>().prepend(false);
 
-  @override
   bool get inIsOrAsOperatorType => _isOrAsOperatorTypeState.head;
 
   Link<bool> _localInitializerState = const Link<bool>().prepend(false);
@@ -311,7 +295,7 @@
   @override
   ConstantContext constantContext = ConstantContext.none;
 
-  UnresolvedType? currentLocalVariableType;
+  DartType? currentLocalVariableType;
 
   // Using non-null value to initialize this field based on performance advice
   // from VM engineers. TODO(ahe): Does this still apply?
@@ -495,7 +479,7 @@
     if (node is DartType) {
       unhandled("DartType", "push", -1, uri);
     }
-    inInitializer = false;
+    inInitializerLeftHandSide = false;
     super.push(node);
   }
 
@@ -869,7 +853,7 @@
       // `invalid-type`.
       UnresolvedType? type = pop() as UnresolvedType?;
       if (type != null) {
-        buildDartType(type);
+        buildDartType(type, allowPotentiallyConstantType: false);
       }
     }
     pop(); // Annotations.
@@ -973,6 +957,7 @@
     if (functionNestingLevel == 0) {
       prepareInitializers();
     }
+    inConstructorInitializer = true;
   }
 
   @override
@@ -981,12 +966,13 @@
     if (functionNestingLevel == 0) {
       scope = formalParameterScope ?? new Scope.immutable();
     }
+    inConstructorInitializer = false;
   }
 
   @override
   void beginInitializer(Token token) {
     debugEvent("beginInitializer");
-    inInitializer = true;
+    inInitializerLeftHandSide = true;
     inFieldInitializer = true;
   }
 
@@ -1002,7 +988,7 @@
 
     debugEvent("endInitializer");
     inFieldInitializer = false;
-    assert(!inInitializer);
+    assert(!inInitializerLeftHandSide);
     Object? node = pop();
     List<Initializer> initializers;
 
@@ -1822,7 +1808,9 @@
     if (isInForest) {
       assert(forest.argumentsTypeArguments(arguments).isEmpty);
       forest.argumentsSetTypeArguments(
-          arguments, buildDartTypeArguments(typeArguments));
+          arguments,
+          buildDartTypeArguments(typeArguments,
+              allowPotentiallyConstantType: false));
     } else {
       assert(typeArguments == null ||
           (receiver is TypeUseGenerator &&
@@ -2374,25 +2362,15 @@
     debugEvent("handleIdentifier");
     String name = token.lexeme;
     if (context.isScopeReference) {
-      assert(!inInitializer ||
+      assert(!inInitializerLeftHandSide ||
           this.scope == enclosingScope ||
           this.scope.parent == enclosingScope);
       // This deals with this kind of initializer: `C(a) : a = a;`
-      Scope scope = inInitializer ? enclosingScope : this.scope;
+      Scope scope = inInitializerLeftHandSide ? enclosingScope : this.scope;
       push(scopeLookup(scope, name, token));
     } else {
-      if (context.inDeclaration) {
-        if (context == IdentifierContext.topLevelVariableDeclaration ||
-            context == IdentifierContext.fieldDeclaration) {
-          constantContext = member.isConst
-              ? ConstantContext.inferred
-              : !member.isStatic &&
-                      classBuilder != null &&
-                      classBuilder!.declaresConstConstructor
-                  ? ConstantContext.required
-                  : ConstantContext.none;
-        }
-      } else if (constantContext != ConstantContext.none &&
+      if (!context.inDeclaration &&
+          constantContext != ConstantContext.none &&
           !context.allowedInConstantExpression) {
         addProblem(fasta.messageNotAConstantExpression, token.charOffset,
             token.length);
@@ -2463,7 +2441,7 @@
     if (declaration != null &&
         declaration.isDeclarationInstanceMember &&
         (inFieldInitializer && !inLateFieldInitializer) &&
-        !inInitializer) {
+        !inInitializerLeftHandSide) {
       // We cannot access a class instance member in an initializer of a
       // field.
       //
@@ -2486,7 +2464,8 @@
       if (!isQualified && isDeclarationInstanceContext) {
         assert(declaration == null);
         if (constantContext != ConstantContext.none ||
-            (inFieldInitializer && !inLateFieldInitializer) && !inInitializer) {
+            (inFieldInitializer && !inLateFieldInitializer) &&
+                !inInitializerLeftHandSide) {
           return new UnresolvedNameGenerator(this, token, n,
               unresolvedReadKind: UnresolvedKind.Unknown);
         }
@@ -2538,7 +2517,7 @@
       }
     } else if (declaration.isClassInstanceMember) {
       if (constantContext != ConstantContext.none &&
-          !inInitializer &&
+          !inInitializerLeftHandSide &&
           // TODO(ahe): This is a hack because Fasta sets up the scope
           // "this.field" parameters according to old semantics. Under the new
           // semantics, such parameters introduces a new parameter with that
@@ -2901,9 +2880,7 @@
         identifier.name, functionNestingLevel,
         forSyntheticToken: identifier.token.isSynthetic,
         initializer: initializer,
-        type: currentLocalVariableType != null
-            ? buildDartType(currentLocalVariableType!)
-            : null,
+        type: currentLocalVariableType,
         isFinal: isFinal,
         isConst: isConst,
         isLate: isLate,
@@ -2923,6 +2900,13 @@
   @override
   void beginFieldInitializer(Token token) {
     inFieldInitializer = true;
+    constantContext = member.isConst
+        ? ConstantContext.inferred
+        : !member.isStatic &&
+                classBuilder != null &&
+                classBuilder!.declaresConstConstructor
+            ? ConstantContext.required
+            : ConstantContext.none;
     if (member is FieldBuilder) {
       FieldBuilder fieldBuilder = member as FieldBuilder;
       inLateFieldInitializer = fieldBuilder.isLate;
@@ -2945,17 +2929,26 @@
     inLateFieldInitializer = false;
     assert(assignmentOperator.stringValue == "=");
     push(popForValue());
+    constantContext = ConstantContext.none;
   }
 
   @override
   void handleNoFieldInitializer(Token token) {
     debugEvent("NoFieldInitializer");
+    constantContext = member.isConst
+        ? ConstantContext.inferred
+        : !member.isStatic &&
+                classBuilder != null &&
+                classBuilder!.declaresConstConstructor
+            ? ConstantContext.required
+            : ConstantContext.none;
     if (constantContext == ConstantContext.inferred) {
       // Creating a null value to prevent the Dart VM from crashing.
       push(forest.createNullLiteral(offsetForToken(token)));
     } else {
       push(NullValue.FieldInitializer);
     }
+    constantContext = ConstantContext.none;
   }
 
   @override
@@ -2980,7 +2973,11 @@
     if (!libraryBuilder.isNonNullableByDefault) {
       reportNonNullableModifierError(lateToken);
     }
-    UnresolvedType? type = pop() as UnresolvedType?;
+    UnresolvedType? unresolvedType =
+        pop(NullValue.UnresolvedType) as UnresolvedType?;
+    DartType? type = unresolvedType != null
+        ? buildDartType(unresolvedType, allowPotentiallyConstantType: false)
+        : null;
     int modifiers = (lateToken != null ? lateMask : 0) |
         Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme);
     _enterLocalState(inLateLocalInitializer: lateToken != null);
@@ -3000,7 +2997,7 @@
     if (count == 1) {
       Object? node = pop();
       constantContext = pop() as ConstantContext;
-      currentLocalVariableType = pop() as UnresolvedType?;
+      currentLocalVariableType = pop(NullValue.Type) as DartType?;
       currentLocalVariableModifiers = pop() as int;
       List<Expression>? annotations = pop() as List<Expression>?;
       if (node is ParserRecovery) {
@@ -3020,7 +3017,7 @@
           const FixedNullableList<VariableDeclaration>()
               .popNonNullable(stack, count, dummyVariableDeclaration);
       constantContext = pop() as ConstantContext;
-      currentLocalVariableType = pop() as UnresolvedType?;
+      currentLocalVariableType = pop(NullValue.Type) as DartType?;
       currentLocalVariableModifiers = pop() as int;
       List<Expression>? annotations = pop() as List<Expression>?;
       if (variables == null) {
@@ -3421,7 +3418,8 @@
             lengthOfSpan(leftBracket, leftBracket.endGroup));
         typeArgument = const InvalidType();
       } else {
-        typeArgument = buildDartType(typeArguments.single);
+        typeArgument = buildDartType(typeArguments.single,
+            allowPotentiallyConstantType: false);
         typeArgument = instantiateToBounds(
             typeArgument, coreTypes.objectClass, libraryBuilder.library);
       }
@@ -3445,7 +3443,8 @@
       Token leftBrace, List<dynamic>? setOrMapEntries) {
     DartType typeArgument;
     if (typeArguments != null) {
-      typeArgument = buildDartType(typeArguments.single);
+      typeArgument = buildDartType(typeArguments.single,
+          allowPotentiallyConstantType: false);
       typeArgument = instantiateToBounds(
           typeArgument, coreTypes.objectClass, libraryBuilder.library);
     } else {
@@ -3585,8 +3584,10 @@
         keyType = const InvalidType();
         valueType = const InvalidType();
       } else {
-        keyType = buildDartType(typeArguments[0]);
-        valueType = buildDartType(typeArguments[1]);
+        keyType = buildDartType(typeArguments[0],
+            allowPotentiallyConstantType: false);
+        valueType = buildDartType(typeArguments[1],
+            allowPotentiallyConstantType: false);
         keyType = instantiateToBounds(
             keyType, coreTypes.objectClass, libraryBuilder.library);
         valueType = instantiateToBounds(
@@ -3715,8 +3716,19 @@
     }
     TypeBuilder? result;
     if (name is Generator) {
+      bool allowPotentiallyConstantType;
+      if (libraryBuilder.isNonNullableByDefault) {
+        if (enableConstructorTearOffsInLibrary) {
+          allowPotentiallyConstantType = true;
+        } else {
+          allowPotentiallyConstantType = inIsOrAsOperatorType;
+        }
+      } else {
+        allowPotentiallyConstantType = false;
+      }
       result = name.buildTypeWithResolvedArguments(
-          libraryBuilder.nullableBuilderIfTrue(isMarkedAsNullable), arguments);
+          libraryBuilder.nullableBuilderIfTrue(isMarkedAsNullable), arguments,
+          allowPotentiallyConstantType: allowPotentiallyConstantType);
       // ignore: unnecessary_null_comparison
       if (result == null) {
         unhandled("null", "result", beginToken.charOffset, uri);
@@ -3961,7 +3973,7 @@
       // where not calling [buildDartType] leads to a missing compile-time
       // error. Also, notice that the type of the problematic parameter isn't
       // `invalid-type`.
-      buildDartType(type);
+      buildDartType(type, allowPotentiallyConstantType: false);
     }
     int modifiers = pop() as int;
     if (inCatchClause) {
@@ -4169,7 +4181,8 @@
         popIfNotNull(onKeyword) as UnresolvedType?;
     DartType exceptionType;
     if (unresolvedExceptionType != null) {
-      exceptionType = buildDartType(unresolvedExceptionType);
+      exceptionType = buildDartType(unresolvedExceptionType,
+          allowPotentiallyConstantType: false);
     } else {
       exceptionType = (libraryBuilder.isNonNullableByDefault
           ? coreTypes.objectNonNullableRawType
@@ -4833,6 +4846,8 @@
     } else if (type is ParserRecovery) {
       push(new ParserErrorGenerator(
           this, nameToken, fasta.messageSyntheticToken));
+    } else if (type is InvalidExpression) {
+      push(type);
     } else if (type is Expression) {
       push(createInstantiationAndInvocation(
           () => type, typeArguments, name, name, arguments,
@@ -4870,8 +4885,11 @@
     if (enableConstructorTearOffsInLibrary && inImplicitCreationContext) {
       Expression receiver = receiverFunction();
       if (typeArguments != null) {
-        receiver = forest.createInstantiation(instantiationOffset, receiver,
-            buildDartTypeArguments(typeArguments));
+        receiver = forest.createInstantiation(
+            instantiationOffset,
+            receiver,
+            buildDartTypeArguments(typeArguments,
+                allowPotentiallyConstantType: true));
       }
       return forest.createMethodInvocation(invocationOffset, receiver,
           new Name(constructorName, libraryBuilder.nameOrigin), arguments);
@@ -4879,7 +4897,9 @@
       if (typeArguments != null) {
         assert(forest.argumentsTypeArguments(arguments).isEmpty);
         forest.argumentsSetTypeArguments(
-            arguments, buildDartTypeArguments(typeArguments));
+            arguments,
+            buildDartTypeArguments(typeArguments,
+                allowPotentiallyConstantType: false));
       }
       return buildUnresolvedError(
           forest.createNullLiteral(instantiationOffset),
@@ -5100,7 +5120,9 @@
       if (typeArguments != null && !isTypeArgumentsInForest) {
         assert(forest.argumentsTypeArguments(arguments).isEmpty);
         forest.argumentsSetTypeArguments(
-            arguments, buildDartTypeArguments(typeArguments));
+            arguments,
+            buildDartTypeArguments(typeArguments,
+                allowPotentiallyConstantType: false));
       }
     }
     if (type is ClassBuilder) {
@@ -5334,7 +5356,7 @@
         push(_createReadOnlyVariableAccess(extensionThis!, token,
             offsetForToken(token), 'this', ReadOnlyAccessKind.ExtensionThis));
       } else {
-        push(new ThisAccessGenerator(this, token, inInitializer,
+        push(new ThisAccessGenerator(this, token, inInitializerLeftHandSide,
             inFieldInitializer, inLateFieldInitializer));
       }
     } else {
@@ -5351,7 +5373,7 @@
         extensionThis == null) {
       MemberBuilder memberBuilder = member as MemberBuilder;
       memberBuilder.member.transformerFlags |= TransformerFlag.superCalls;
-      push(new ThisAccessGenerator(this, token, inInitializer,
+      push(new ThisAccessGenerator(this, token, inInitializerLeftHandSide,
           inFieldInitializer, inLateFieldInitializer,
           isSuper: true));
     } else {
@@ -5994,7 +6016,7 @@
     // If in an assert initializer, make sure [inInitializer] is false so we
     // use the formal parameter scope. If this is any other kind of assert,
     // inInitializer should be false anyway.
-    inInitializer = false;
+    inInitializerLeftHandSide = false;
   }
 
   @override
@@ -6780,7 +6802,9 @@
             openAngleBracket.charOffset, noLength));
       } else {
         push(new Instantiation(
-            toValue(operand), buildDartTypeArguments(typeArguments))
+            toValue(operand),
+            buildDartTypeArguments(typeArguments,
+                allowPotentiallyConstantType: true))
           ..fileOffset = openAngleBracket.charOffset);
       }
     } else {
@@ -6795,93 +6819,72 @@
   }
 
   @override
-  UnresolvedType validateTypeUse(UnresolvedType unresolved,
-      {required bool nonInstanceAccessIsError,
-      required bool allowPotentiallyConstantType}) {
-    // ignore: unnecessary_null_comparison
-    assert(nonInstanceAccessIsError != null);
+  UnresolvedType validateTypeVariableUse(UnresolvedType unresolved,
+      {required bool allowPotentiallyConstantType}) {
     // ignore: unnecessary_null_comparison
     assert(allowPotentiallyConstantType != null);
-    TypeBuilder builder = unresolved.builder;
-    if (builder is NamedTypeBuilder && builder.declaration!.isTypeVariable) {
-      TypeVariableBuilder typeParameterBuilder =
-          builder.declaration as TypeVariableBuilder;
-      TypeParameter typeParameter = typeParameterBuilder.parameter;
-      LocatedMessage? message = _validateTypeUseIsInternal(
-          builder, unresolved.fileUri, unresolved.charOffset,
-          allowPotentiallyConstantType: allowPotentiallyConstantType);
-      if (message == null) return unresolved;
-      return new UnresolvedType(
-          new NamedTypeBuilder(typeParameter.name!, builder.nullabilityBuilder,
-              /* arguments = */ null, unresolved.fileUri, unresolved.charOffset)
-            ..bind(new InvalidTypeDeclarationBuilder(
-                typeParameter.name!, message)),
-          unresolved.charOffset,
-          unresolved.fileUri);
-    } else if (builder is FunctionTypeBuilder) {
-      LocatedMessage? message = _validateTypeUseIsInternal(
-          builder, unresolved.fileUri, unresolved.charOffset,
-          allowPotentiallyConstantType: allowPotentiallyConstantType);
-      if (message == null) return unresolved;
-      // TODO(johnniwinther): We should either remove this method completely and
-      // fully handle this with `nonInstanceContext`, or fully handle all types
-      // and remove `nonInstanceContext`.
-      return new UnresolvedType(
-          new FixedTypeBuilder(
-              const InvalidType(), unresolved.fileUri, unresolved.charOffset),
-          unresolved.charOffset,
-          unresolved.fileUri);
-    }
+    _validateTypeVariableUseInternal(
+        unresolved.builder, unresolved.fileUri, unresolved.charOffset,
+        allowPotentiallyConstantType: allowPotentiallyConstantType);
     return unresolved;
   }
 
-  LocatedMessage? _validateTypeUseIsInternal(
+  void _validateTypeVariableUseInternal(
       TypeBuilder? builder, Uri fileUri, int charOffset,
       {required bool allowPotentiallyConstantType}) {
     // ignore: unnecessary_null_comparison
     assert(allowPotentiallyConstantType != null);
-    if (builder is NamedTypeBuilder && builder.declaration!.isTypeVariable) {
-      TypeVariableBuilder typeParameterBuilder =
-          builder.declaration as TypeVariableBuilder;
-      TypeParameter typeParameter = typeParameterBuilder.parameter;
-      LocatedMessage message;
-      bool extensionField = member.isExtensionMember && member.isField;
-      if ((extensionField || !isDeclarationInstanceContext) &&
-          (typeParameter.parent is Class ||
-              typeParameter.parent is Extension)) {
-        message = fasta.messageTypeVariableInStaticContext.withLocation(
-            builder.fileUri ?? fileUri,
-            builder.charOffset ?? charOffset,
-            typeParameter.name!.length);
-      } else if (constantContext == ConstantContext.inferred &&
-          !allowPotentiallyConstantType) {
-        message = fasta.messageTypeVariableInConstantContext
-            .withLocation(fileUri, charOffset, typeParameter.name!.length);
-      } else {
-        return null;
+    if (builder is NamedTypeBuilder) {
+      if (builder.declaration!.isTypeVariable) {
+        TypeVariableBuilder typeParameterBuilder =
+            builder.declaration as TypeVariableBuilder;
+        TypeParameter typeParameter = typeParameterBuilder.parameter;
+        bool extensionField =
+            member.isExtensionMember && member.isField && !member.isExternal;
+        if ((extensionField || !isDeclarationInstanceContext) &&
+            (typeParameter.parent is Class ||
+                typeParameter.parent is Extension)) {
+          // TODO(johnniwinther): Can we unify this check with the similar check
+          // in NamedTypeBuilder.buildTypeInternal. If we skip it here, the
+          // error below (type variable in constant context) will be emitted
+          // _instead_ of this (type variable in static context), which seems
+          // like an odd prioritization.
+          LocatedMessage message = fasta.messageTypeVariableInStaticContext
+              .withLocation(builder.fileUri ?? fileUri,
+                  builder.charOffset ?? charOffset, typeParameter.name!.length);
+          builder.bind(
+              new InvalidTypeDeclarationBuilder(typeParameter.name!, message));
+          addProblem(message.messageObject, message.charOffset, message.length);
+        } else if (constantContext != ConstantContext.none &&
+            (!inConstructorInitializer || !allowPotentiallyConstantType)) {
+          LocatedMessage message = fasta.messageTypeVariableInConstantContext
+              .withLocation(fileUri, charOffset, typeParameter.name!.length);
+          builder.bind(
+              new InvalidTypeDeclarationBuilder(typeParameter.name!, message));
+          addProblem(message.messageObject, message.charOffset, message.length);
+        }
       }
-      addProblem(message.messageObject, message.charOffset, message.length);
-      return message;
+      if (builder.arguments != null) {
+        for (TypeBuilder typeBuilder in builder.arguments!) {
+          _validateTypeVariableUseInternal(
+              typeBuilder,
+              typeBuilder.fileUri ?? fileUri,
+              typeBuilder.charOffset ?? charOffset,
+              allowPotentiallyConstantType: allowPotentiallyConstantType);
+        }
+      }
     } else if (builder is FunctionTypeBuilder) {
-      LocatedMessage? result = _validateTypeUseIsInternal(
-          builder.returnType, fileUri, charOffset,
+      _validateTypeVariableUseInternal(builder.returnType, fileUri, charOffset,
           allowPotentiallyConstantType: allowPotentiallyConstantType);
-      if (result != null) {
-        return result;
-      }
       if (builder.formals != null) {
         for (FormalParameterBuilder formalParameterBuilder
             in builder.formals!) {
-          result = _validateTypeUseIsInternal(
+          _validateTypeVariableUseInternal(
               formalParameterBuilder.type, fileUri, charOffset,
               allowPotentiallyConstantType: allowPotentiallyConstantType);
-          if (result != null) {
-            return result;
-          }
         }
       }
     }
-    return null;
   }
 
   @override
@@ -7040,10 +7043,8 @@
 
   @override
   DartType buildDartType(UnresolvedType unresolvedType,
-      {bool nonInstanceAccessIsError: false,
-      bool allowPotentiallyConstantType: false}) {
-    return validateTypeUse(unresolvedType,
-            nonInstanceAccessIsError: nonInstanceAccessIsError,
+      {required bool allowPotentiallyConstantType}) {
+    return validateTypeVariableUse(unresolvedType,
             allowPotentiallyConstantType: allowPotentiallyConstantType)
         .builder
         .build(libraryBuilder);
@@ -7051,20 +7052,21 @@
 
   @override
   DartType buildTypeLiteralDartType(UnresolvedType unresolvedType,
-      {bool nonInstanceAccessIsError: false,
-      bool allowPotentiallyConstantType: false}) {
-    return validateTypeUse(unresolvedType,
-            nonInstanceAccessIsError: nonInstanceAccessIsError,
+      {required bool allowPotentiallyConstantType}) {
+    return validateTypeVariableUse(unresolvedType,
             allowPotentiallyConstantType: allowPotentiallyConstantType)
         .builder
         .buildTypeLiteralType(libraryBuilder);
   }
 
   @override
-  List<DartType> buildDartTypeArguments(List<UnresolvedType>? unresolvedTypes) {
+  List<DartType> buildDartTypeArguments(List<UnresolvedType>? unresolvedTypes,
+      {required bool allowPotentiallyConstantType}) {
     if (unresolvedTypes == null) return <DartType>[];
     return new List<DartType>.generate(
-        unresolvedTypes.length, (int i) => buildDartType(unresolvedTypes[i]),
+        unresolvedTypes.length,
+        (int i) => buildDartType(unresolvedTypes[i],
+            allowPotentiallyConstantType: allowPotentiallyConstantType),
         growable: true);
   }
 
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 99eba28..b11496e 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
@@ -422,7 +422,9 @@
   List<TypeParameter> aTypeParameters = a.typeParameters;
   List<TypeParameter> bTypeParameters = b.typeParameters;
   int typeParameterCount = aTypeParameters.length;
-  if (typeParameterCount != bTypeParameters.length) return false;
+  if (typeParameterCount != bTypeParameters.length) {
+    return false;
+  }
   Substitution? substitution;
   if (typeParameterCount != 0) {
     List<DartType> types = new List<DartType>.generate(
@@ -434,11 +436,15 @@
     for (int i = 0; i < typeParameterCount; i++) {
       DartType aBound = aTypeParameters[i].bound;
       DartType bBound = substitution.substituteType(bTypeParameters[i].bound);
-      if (aBound != bBound) return false;
+      if (aBound != bBound) {
+        return false;
+      }
     }
   }
 
-  if (a.requiredParameterCount != b.requiredParameterCount) return false;
+  if (a.requiredParameterCount != b.requiredParameterCount) {
+    return false;
+  }
   List<VariableDeclaration> aPositionalParameters = a.positionalParameters;
   List<VariableDeclaration> bPositionalParameters = b.positionalParameters;
   if (aPositionalParameters.length != bPositionalParameters.length) {
@@ -447,7 +453,10 @@
   for (int i = 0; i < aPositionalParameters.length; i++) {
     VariableDeclaration aParameter = aPositionalParameters[i];
     VariableDeclaration bParameter = bPositionalParameters[i];
-    if (aParameter.isCovariant != bParameter.isCovariant) return false;
+    if (aParameter.isCovariantByDeclaration !=
+        bParameter.isCovariantByDeclaration) {
+      return false;
+    }
     DartType aType = aParameter.type;
     DartType bType = bParameter.type;
     if (substitution != null) {
@@ -458,18 +467,27 @@
 
   List<VariableDeclaration> aNamedParameters = a.namedParameters;
   List<VariableDeclaration> bNamedParameters = b.namedParameters;
-  if (aNamedParameters.length != bNamedParameters.length) return false;
+  if (aNamedParameters.length != bNamedParameters.length) {
+    return false;
+  }
   for (int i = 0; i < aNamedParameters.length; i++) {
     VariableDeclaration aParameter = aNamedParameters[i];
     VariableDeclaration bParameter = bNamedParameters[i];
-    if (aParameter.isCovariant != bParameter.isCovariant) return false;
-    if (aParameter.name != bParameter.name) return false;
+    if (aParameter.isCovariantByDeclaration !=
+        bParameter.isCovariantByDeclaration) {
+      return false;
+    }
+    if (aParameter.name != bParameter.name) {
+      return false;
+    }
     DartType aType = aParameter.type;
     DartType bType = bParameter.type;
     if (substitution != null) {
       bType = substitution.substituteType(bType);
     }
-    if (aType != bType) return false;
+    if (aType != bType) {
+      return false;
+    }
   }
 
   DartType aReturnType = a.returnType;
diff --git a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
index 15b0460..414c8c2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
@@ -314,6 +314,25 @@
     return candidateType;
   }
 
+  DartType getMemberTypeForTarget(Member target) {
+    DartType candidateType = _computeMemberType(thisType, target);
+    if (!classBuilder.library.isNonNullableByDefault) {
+      DartType? legacyErasure;
+      if (target == hierarchy.coreTypes.objectEquals) {
+        // In legacy code we special case `Object.==` to infer `dynamic`
+        // instead `Object!`.
+        legacyErasure = new FunctionType([const DynamicType()],
+            hierarchy.coreTypes.boolLegacyRawType, Nullability.legacy);
+      } else {
+        legacyErasure = rawLegacyErasure(candidateType);
+      }
+      if (legacyErasure != null) {
+        candidateType = legacyErasure;
+      }
+    }
+    return candidateType;
+  }
+
   void _ensureCombinedMemberSignatureType() {
     if (!_isCombinedMemberSignatureTypeComputed) {
       _isCombinedMemberSignatureTypeComputed = true;
@@ -464,9 +483,9 @@
               member.function.positionalParameters.first;
           combinedMemberSignature = _createSetterMemberSignature(
               member, combinedMemberSignatureType!,
-              isGenericCovariantImpl: parameter.isGenericCovariantImpl,
-              isCovariant: parameter.isCovariant,
-              parameterName: parameter.name,
+              isCovariantByClass: parameter.isCovariantByClass,
+              isCovariantByDeclaration: parameter.isCovariantByDeclaration,
+              parameter: parameter,
               copyLocation: copyLocation);
           break;
         case ProcedureKind.Method:
@@ -484,8 +503,8 @@
       if (forSetter) {
         combinedMemberSignature = _createSetterMemberSignature(
             member, combinedMemberSignatureType!,
-            isGenericCovariantImpl: member.isGenericCovariantImpl,
-            isCovariant: member.isCovariant,
+            isCovariantByClass: member.isCovariantByClass,
+            isCovariantByDeclaration: member.isCovariantByDeclaration,
             copyLocation: copyLocation);
       } else {
         combinedMemberSignature = _createGetterMemberSignature(
@@ -540,17 +559,18 @@
   }
 
   /// Creates a setter member signature for [member] with the given
-  /// [type]. The flags of parameter is set according to [isCovariant] and
-  /// [isGenericCovariantImpl] and the [parameterName] is used, if provided.
+  /// [type]. The flags of parameter is set according to
+  /// [isCovariantByDeclaration] and [isCovariantByClass] and the name of the
+  /// [parameter] is used, if provided.
   Procedure _createSetterMemberSignature(Member member, DartType type,
-      {required bool isCovariant,
-      required bool isGenericCovariantImpl,
-      String? parameterName,
+      {required bool isCovariantByDeclaration,
+      required bool isCovariantByClass,
+      VariableDeclaration? parameter,
       required bool copyLocation}) {
     // ignore: unnecessary_null_comparison
-    assert(isCovariant != null);
+    assert(isCovariantByDeclaration != null);
     // ignore: unnecessary_null_comparison
-    assert(isGenericCovariantImpl != null);
+    assert(isCovariantByClass != null);
     // ignore: unnecessary_null_comparison
     assert(copyLocation != null);
     Class enclosingClass = classBuilder.cls;
@@ -574,9 +594,12 @@
       new FunctionNode(null,
           returnType: const VoidType(),
           positionalParameters: [
-            new VariableDeclaration(parameterName ?? 'value',
-                type: type, isCovariant: isCovariant)
-              ..isGenericCovariantImpl = isGenericCovariantImpl
+            new VariableDeclaration(parameter?.name ?? 'value',
+                type: type, isCovariantByDeclaration: isCovariantByDeclaration)
+              ..isCovariantByClass = isCovariantByClass
+              ..fileOffset = copyLocation
+                  ? parameter?.fileOffset ?? fileOffset
+                  : fileOffset
           ]),
       isAbstract: true,
       fileUri: fileUri,
@@ -616,8 +639,10 @@
       VariableDeclaration parameter = function.positionalParameters[i];
       DartType parameterType = functionType.positionalParameters[i];
       positionalParameters.add(new VariableDeclaration(parameter.name,
-          type: parameterType, isCovariant: parameter.isCovariant)
-        ..isGenericCovariantImpl = parameter.isGenericCovariantImpl);
+          type: parameterType,
+          isCovariantByDeclaration: parameter.isCovariantByDeclaration)
+        ..isCovariantByClass = parameter.isCovariantByClass
+        ..fileOffset = copyLocation ? parameter.fileOffset : fileOffset);
     }
     List<VariableDeclaration> namedParameters = [];
     int namedParameterCount = function.namedParameters.length;
@@ -627,8 +652,9 @@
       namedParameters.add(new VariableDeclaration(parameter.name,
           type: namedType.type,
           isRequired: namedType.isRequired,
-          isCovariant: parameter.isCovariant)
-        ..isGenericCovariantImpl = parameter.isGenericCovariantImpl);
+          isCovariantByDeclaration: parameter.isCovariantByDeclaration)
+        ..isCovariantByClass = parameter.isCovariantByClass
+        ..fileOffset = copyLocation ? parameter.fileOffset : fileOffset);
     } else if (namedParameterCount > 1) {
       Map<String, NamedType> namedTypes = {};
       for (NamedType namedType in functionType.namedParameters) {
@@ -640,8 +666,9 @@
         namedParameters.add(new VariableDeclaration(parameter.name,
             type: namedParameterType.type,
             isRequired: namedParameterType.isRequired,
-            isCovariant: parameter.isCovariant)
-          ..isGenericCovariantImpl = parameter.isGenericCovariantImpl);
+            isCovariantByDeclaration: parameter.isCovariantByDeclaration)
+          ..isCovariantByClass = parameter.isCovariantByClass
+          ..fileOffset = copyLocation ? parameter.fileOffset : fileOffset);
       }
     }
     return new Procedure(
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 329190f..13f9ead 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -24,7 +24,6 @@
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/clone.dart';
 import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
 import 'package:kernel/src/const_canonical_type.dart';
 import 'package:kernel/src/legacy_erasure.dart';
 import 'package:kernel/src/norm.dart';
@@ -82,7 +81,7 @@
   return component;
 }
 
-ConstantCoverage transformLibraries(
+ConstantEvaluationData transformLibraries(
     List<Library> libraries,
     ConstantsBackend backend,
     Map<String, String>? environmentDefines,
@@ -118,7 +117,10 @@
   for (final Library library in libraries) {
     constantsTransformer.convertLibrary(library);
   }
-  return constantsTransformer.constantEvaluator.getConstantCoverage();
+
+  return new ConstantEvaluationData(
+      constantsTransformer.constantEvaluator.getConstantCoverage(),
+      constantsTransformer.constantEvaluator.visitedLibraries);
 }
 
 void transformProcedure(
@@ -688,6 +690,14 @@
     Instantiation result =
         super.visitInstantiation(node, removalSentinel) as Instantiation;
     Expression expression = result.expression;
+    if (expression is StaticGet && expression.target.isConst) {
+      // Handle [StaticGet] of constant fields also when these are not inlined.
+      expression = (expression.target as Field).initializer!;
+    } else if (expression is VariableGet && expression.variable.isConst) {
+      // Handle [VariableGet] of constant locals also when these are not
+      // inlined.
+      expression = expression.variable.initializer!;
+    }
     if (expression is ConstantExpression) {
       if (result.typeArguments.every(isInstantiated)) {
         return evaluateAndTransformWithContext(node, result);
@@ -879,6 +889,9 @@
   }
 
   bool shouldInline(Expression initializer) {
+    if (backend.alwaysInlineConstants) {
+      return true;
+    }
     if (initializer is ConstantExpression) {
       return backend.shouldInlineConstant(initializer);
     }
@@ -911,6 +924,8 @@
   final BoolConstant trueConstant = new BoolConstant(true);
   final BoolConstant falseConstant = new BoolConstant(false);
 
+  final Set<Library> visitedLibraries = {};
+
   InstanceBuilder? instanceBuilder;
   EvaluationEnvironment env;
   Set<Expression> replacementNodes = new Set<Expression>.identity();
@@ -2835,6 +2850,7 @@
   Constant visitStaticGet(StaticGet node) {
     return withNewEnvironment(() {
       final Member target = node.target;
+      visitedLibraries.add(target.enclosingLibrary);
       if (target is Field) {
         if (target.isConst) {
           return _evaluateExpressionInContext(target, target.initializer!);
@@ -4028,6 +4044,13 @@
   ConstantCoverage(this.constructorCoverage);
 }
 
+class ConstantEvaluationData {
+  final ConstantCoverage coverage;
+  final Set<Library> visitedLibraries;
+
+  ConstantEvaluationData(this.coverage, this.visitedLibraries);
+}
+
 /// Holds the necessary information for a constant object, namely
 ///   * the [klass] being instantiated
 ///   * the [typeArguments] used for the instantiation
@@ -4060,7 +4083,7 @@
     final Map<Reference, Constant> fieldValues = <Reference, Constant>{};
     fields.forEach((Field field, Constant value) {
       assert(value is! UnevaluatedConstant);
-      fieldValues[field.getterReference] = value;
+      fieldValues[field.fieldReference] = value;
     });
     assert(unusedArguments.isEmpty);
     return new InstanceConstant(klass.reference, typeArguments, fieldValues);
@@ -4069,7 +4092,7 @@
   InstanceCreation buildUnevaluatedInstance() {
     final Map<Reference, Expression> fieldValues = <Reference, Expression>{};
     fields.forEach((Field field, Constant value) {
-      fieldValues[field.getterReference] = evaluator.extract(value);
+      fieldValues[field.fieldReference] = evaluator.extract(value);
     });
     return new InstanceCreation(
         klass.reference, typeArguments, fieldValues, asserts, unusedArguments);
diff --git a/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
index ad3885a..4fff165 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
@@ -6,7 +6,6 @@
 import 'package:kernel/type_algebra.dart';
 import '../builder/member_builder.dart';
 import '../source/source_library_builder.dart';
-import 'kernel_api.dart';
 import 'kernel_helper.dart';
 
 const String _tearOffNamePrefix = '_#';
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index dd26634..04979e2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -11,6 +11,7 @@
 import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token;
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/text/ast_to_text.dart';
 import 'package:kernel/type_algebra.dart';
 
 import '../builder/builder.dart';
@@ -67,12 +68,12 @@
 
 import 'forest.dart';
 
-import 'kernel_api.dart' show NameSystem, printNodeOn, printQualifiedNameOn;
-
-import 'kernel_builder.dart' show LoadLibraryBuilder;
-
 import 'internal_ast.dart';
 
+import 'load_library_builder.dart';
+
+import 'utils.dart';
+
 /// A generator represents a subexpression for which we can't yet build an
 /// expression because we don't yet know the context in which it's used.
 ///
@@ -259,7 +260,9 @@
   Expression_Generator applyTypeArguments(
       int fileOffset, List<UnresolvedType>? typeArguments) {
     return new Instantiation(
-        buildSimpleRead(), _helper.buildDartTypeArguments(typeArguments))
+        buildSimpleRead(),
+        _helper.buildDartTypeArguments(typeArguments,
+            allowPotentiallyConstantType: true))
       ..fileOffset = fileOffset;
   }
 
@@ -269,7 +272,8 @@
   /// The type arguments have not been resolved and should be resolved to
   /// create a [TypeBuilder] for a valid type.
   TypeBuilder buildTypeWithResolvedArguments(
-      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments) {
+      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments,
+      {required bool allowPotentiallyConstantType}) {
     // TODO(johnniwinther): Could we use a FixedTypeBuilder(InvalidType()) here?
     NamedTypeBuilder result = new NamedTypeBuilder(
         token.lexeme,
@@ -1942,6 +1946,10 @@
         assert(!getterBuilder.isStatic);
         MemberBuilder memberBuilder = getterBuilder as MemberBuilder;
         invokeTarget = memberBuilder.invokeTarget as Procedure?;
+      } else if (getterBuilder.isField) {
+        assert(!getterBuilder.isStatic);
+        MemberBuilder memberBuilder = getterBuilder as MemberBuilder;
+        readTarget = memberBuilder.invokeTarget as Procedure?;
       } else {
         return unhandled(
             "$getterBuilder (${getterBuilder.runtimeType})",
@@ -1959,6 +1967,10 @@
         assert(!setterBuilder.isStatic);
         MemberBuilder memberBuilder = setterBuilder as MemberBuilder;
         writeTarget = memberBuilder.writeTarget as Procedure?;
+      } else if (setterBuilder.isField) {
+        assert(!setterBuilder.isStatic);
+        MemberBuilder memberBuilder = setterBuilder as MemberBuilder;
+        writeTarget = memberBuilder.writeTarget as Procedure?;
       } else {
         return unhandled(
             "$setterBuilder (${setterBuilder.runtimeType})",
@@ -2598,7 +2610,7 @@
   Generator _createInstanceAccess(Token token, Name name,
       {bool isNullAware: false}) {
     Builder? getter = extensionBuilder.lookupLocalMemberByName(name);
-    if (getter != null && (getter.isStatic || getter.isField)) {
+    if (getter != null && getter.isStatic) {
       getter = null;
     }
     Builder? setter =
@@ -2888,11 +2900,13 @@
 
   @override
   TypeBuilder buildTypeWithResolvedArguments(
-      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments) {
+      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments,
+      {required bool allowPotentiallyConstantType}) {
     String name = "${prefixGenerator._plainNameForRead}."
         "${suffixGenerator._plainNameForRead}";
     TypeBuilder type = suffixGenerator.buildTypeWithResolvedArguments(
-        nullabilityBuilder, arguments);
+        nullabilityBuilder, arguments,
+        allowPotentiallyConstantType: allowPotentiallyConstantType);
     LocatedMessage message;
     if (type is NamedTypeBuilder &&
         type.declaration is InvalidTypeDeclarationBuilder) {
@@ -2903,7 +2917,8 @@
       int charOffset = offsetForToken(prefixGenerator.token);
       message = templateDeferredTypeAnnotation
           .withArguments(
-              _helper.buildDartType(new UnresolvedType(type, charOffset, _uri)),
+              _helper.buildDartType(new UnresolvedType(type, charOffset, _uri),
+                  allowPotentiallyConstantType: allowPotentiallyConstantType),
               prefixGenerator._plainNameForRead,
               _helper.libraryBuilder.isNonNullableByDefault)
           .withLocation(
@@ -3013,17 +3028,19 @@
 
   @override
   TypeBuilder buildTypeWithResolvedArguments(
-      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments) {
+      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments,
+      {required bool allowPotentiallyConstantType}) {
     if (declaration.isExtension && !_helper.enableExtensionTypesInLibrary) {
       // Extension declarations cannot be used as types.
-      return super
-          .buildTypeWithResolvedArguments(nullabilityBuilder, arguments);
+      return super.buildTypeWithResolvedArguments(nullabilityBuilder, arguments,
+          allowPotentiallyConstantType: allowPotentiallyConstantType);
     }
     if (arguments != null) {
       int expected = declaration.typeVariablesCount;
       if (arguments.length != expected) {
         // Build the type arguments to report any errors they may have.
-        _helper.buildDartTypeArguments(arguments);
+        _helper.buildDartTypeArguments(arguments,
+            allowPotentiallyConstantType: allowPotentiallyConstantType);
         _helper.warnTypeArgumentsMismatch(
             declaration.name, expected, fileOffset);
         // We ignore the provided arguments, which will in turn return the
@@ -3039,11 +3056,8 @@
       argumentBuilders =
           new List<TypeBuilder>.generate(arguments.length, (int i) {
         return _helper
-            .validateTypeUse(arguments![i],
-                nonInstanceAccessIsError: false,
-                allowPotentiallyConstantType:
-                    _helper.libraryBuilder.isNonNullableByDefault &&
-                        _helper.inIsOrAsOperatorType)
+            .validateTypeVariableUse(arguments![i],
+                allowPotentiallyConstantType: allowPotentiallyConstantType)
             .builder;
       }, growable: false);
     }
@@ -3096,10 +3110,12 @@
                 new UnresolvedType(
                     buildTypeWithResolvedArguments(
                         _helper.libraryBuilder.nonNullableBuilder,
-                        typeArguments),
+                        typeArguments,
+                        allowPotentiallyConstantType: true),
                     fileOffset,
                     _uri),
-                nonInstanceAccessIsError: true));
+                allowPotentiallyConstantType:
+                    _helper.enableConstructorTearOffsInLibrary));
       }
     }
     return _expression!;
@@ -3122,8 +3138,16 @@
           isUsedAsClass: true,
           usedAsClassCharOffset: this.fileOffset,
           usedAsClassFileUri: _uri);
-      List<TypeBuilder>? aliasedTypeArguments =
-          typeArguments?.map((unknownType) => unknownType.builder).toList();
+
+      bool isConstructorTearOff = send is PropertySelector &&
+          _helper.enableConstructorTearOffsInLibrary &&
+          declarationBuilder is ClassBuilder;
+      List<TypeBuilder>? aliasedTypeArguments = typeArguments
+          ?.map((unknownType) => _helper
+              .validateTypeVariableUse(unknownType,
+                  allowPotentiallyConstantType: isConstructorTearOff)
+              .builder)
+          .toList();
       if (aliasedTypeArguments != null &&
           aliasedTypeArguments.length != aliasBuilder.typeVariablesCount) {
         _helper.libraryBuilder.addProblem(
@@ -3227,8 +3251,9 @@
                       _helper.libraryBuilder, unaliasedTypeArguments);
                 }
               } else if (typeArguments != null) {
-                builtTypeArguments =
-                    _helper.buildDartTypeArguments(typeArguments);
+                builtTypeArguments = _helper.buildDartTypeArguments(
+                    typeArguments,
+                    allowPotentiallyConstantType: true);
               }
               if (isGenericTypedefTearOff) {
                 if (isProperRenameForClass(_helper.typeEnvironment,
@@ -3661,7 +3686,9 @@
     if (typeArguments != null) {
       assert(_forest.argumentsTypeArguments(arguments).isEmpty);
       _forest.argumentsSetTypeArguments(
-          arguments, _helper.buildDartTypeArguments(typeArguments));
+          arguments,
+          _helper.buildDartTypeArguments(typeArguments,
+              allowPotentiallyConstantType: false));
     }
     return buildError(arguments, kind: UnresolvedKind.Constructor);
   }
@@ -4136,7 +4163,8 @@
 
   @override
   TypeBuilder buildTypeWithResolvedArguments(
-      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments) {
+      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments,
+      {required bool allowPotentiallyConstantType}) {
     Template<Message Function(String, String)> template = isUnresolved
         ? templateUnresolvedPrefixInTypeAnnotation
         : templateNotAPrefixInTypeAnnotation;
@@ -4260,7 +4288,8 @@
 
   @override
   TypeBuilder buildTypeWithResolvedArguments(
-      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments) {
+      NullabilityBuilder nullabilityBuilder, List<UnresolvedType>? arguments,
+      {required bool allowPotentiallyConstantType}) {
     // TODO(johnniwinther): Could we use a FixedTypeBuilder(InvalidType()) here?
     NamedTypeBuilder result = new NamedTypeBuilder(
         token.lexeme,
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
index ecc97bb..96e8b7f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
@@ -5,6 +5,7 @@
 library fasta.expression_generator_helper;
 
 import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token;
+import 'package:kernel/ast.dart';
 import 'package:kernel/type_algebra.dart';
 import 'package:kernel/type_environment.dart';
 
@@ -24,25 +25,6 @@
 import 'constness.dart' show Constness;
 import 'forest.dart' show Forest;
 import 'internal_ast.dart';
-import 'kernel_ast_api.dart'
-    show
-        Arguments,
-        Constructor,
-        DartType,
-        Expression,
-        FunctionNode,
-        Initializer,
-        InterfaceType,
-        Library,
-        Member,
-        Name,
-        Procedure,
-        StaticGet,
-        TreeNode,
-        TypeParameter,
-        TypeParameterType,
-        Typedef,
-        VariableDeclaration;
 
 /// Alias for Expression | Generator
 typedef Expression_Generator = dynamic;
@@ -66,9 +48,6 @@
 
   Member? lookupInstanceMember(Name name, {bool isSetter, bool isSuper});
 
-  /// `true` if we are in the type of an as expression.
-  bool get inIsOrAsOperatorType;
-
   bool get enableExtensionTypesInLibrary;
 
   bool get enableConstFunctionsInLibrary;
@@ -143,9 +122,8 @@
       TypeDeclarationBuilder? typeAliasBuilder,
       required UnresolvedKind unresolvedKind});
 
-  UnresolvedType validateTypeUse(UnresolvedType unresolved,
-      {required bool nonInstanceAccessIsError,
-      required bool allowPotentiallyConstantType});
+  UnresolvedType validateTypeVariableUse(UnresolvedType unresolved,
+      {required bool allowPotentiallyConstantType});
 
   void addProblemErrorIfConst(Message message, int charOffset, int length);
 
@@ -168,12 +146,13 @@
       Arguments arguments, Expression expression);
 
   DartType buildDartType(UnresolvedType unresolvedType,
-      {bool nonInstanceAccessIsError: false});
+      {required bool allowPotentiallyConstantType});
 
   DartType buildTypeLiteralDartType(UnresolvedType unresolvedType,
-      {bool nonInstanceAccessIsError});
+      {required bool allowPotentiallyConstantType});
 
-  List<DartType> buildDartTypeArguments(List<UnresolvedType>? unresolvedTypes);
+  List<DartType> buildDartTypeArguments(List<UnresolvedType>? unresolvedTypes,
+      {required bool allowPotentiallyConstantType});
 
   void reportDuplicatedDeclaration(
       Builder existing, String name, int charOffset);
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 12ba226..4cc99a7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -644,8 +644,8 @@
       DartType? type,
       bool isFinal: false,
       bool isConst: false,
-      bool isFieldFormal: false,
-      bool isCovariant: false,
+      bool isInitializingFormal: false,
+      bool isCovariantByDeclaration: false,
       bool isLocalFunction: false}) {
     // ignore: unnecessary_null_comparison
     assert(fileOffset != null);
@@ -654,8 +654,8 @@
         initializer: initializer,
         isFinal: isFinal,
         isConst: isConst,
-        isFieldFormal: isFieldFormal,
-        isCovariant: isCovariant,
+        isInitializingFormal: isInitializingFormal,
+        isCovariantByDeclaration: isCovariantByDeclaration,
         isLocalFunction: isLocalFunction,
         hasDeclaredInitializer: initializer != null);
   }
diff --git a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
index 43f0293..2ae41d0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
@@ -2,27 +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:kernel/ast.dart"
-    show
-        Arguments,
-        Class,
-        DartType,
-        Expression,
-        FunctionNode,
-        Member,
-        Name,
-        NamedExpression,
-        Procedure,
-        ProcedureKind,
-        ProcedureStubKind,
-        ReturnStatement,
-        SuperMethodInvocation,
-        SuperPropertyGet,
-        SuperPropertySet,
-        TypeParameterType,
-        VariableGet;
+import "package:kernel/ast.dart";
 
 import 'package:kernel/transformations/flags.dart' show TransformerFlag;
+import 'package:kernel/type_algebra.dart';
+import 'package:kernel/type_environment.dart';
 
 import "../source/source_class_builder.dart";
 
@@ -183,20 +167,6 @@
       superTarget = superTarget.memberSignatureOrigin ?? superTarget;
     }
     procedure.isAbstract = false;
-    List<Expression> positionalArguments = function.positionalParameters
-        .map<Expression>((parameter) => new VariableGet(parameter))
-        .toList();
-    List<NamedExpression> namedArguments = function.namedParameters
-        .map((parameter) =>
-            new NamedExpression(parameter.name!, new VariableGet(parameter)))
-        .toList();
-    List<DartType> typeArguments = function.typeParameters
-        .map<DartType>((typeParameter) =>
-            new TypeParameterType.withDefaultNullabilityForLibrary(
-                typeParameter, enclosingClass.enclosingLibrary))
-        .toList();
-    Arguments arguments = new Arguments(positionalArguments,
-        types: typeArguments, named: namedArguments);
     Expression superCall;
     // ignore: unnecessary_null_comparison
     assert(superTarget != null,
@@ -208,6 +178,66 @@
     switch (kind) {
       case ProcedureKind.Method:
       case ProcedureKind.Operator:
+        FunctionType type = _combinedMemberSignature
+            .getMemberTypeForTarget(superTarget) as FunctionType;
+        if (type.typeParameters.isNotEmpty) {
+          type = Substitution.fromPairs(
+                  type.typeParameters,
+                  function.typeParameters
+                      .map((TypeParameter parameter) => new TypeParameterType
+                              .withDefaultNullabilityForLibrary(
+                          parameter, procedure.enclosingLibrary))
+                      .toList())
+              .substituteType(type.withoutTypeParameters) as FunctionType;
+        }
+        List<Expression> positionalArguments = new List.generate(
+            function.positionalParameters.length, (int index) {
+          VariableDeclaration parameter = function.positionalParameters[index];
+          int fileOffset = parameter.fileOffset;
+          Expression expression = new VariableGet(parameter)
+            ..fileOffset = fileOffset;
+          DartType superParameterType = type.positionalParameters[index];
+          if (!_combinedMemberSignature.hierarchy.types.isSubtypeOf(
+              parameter.type,
+              superParameterType,
+              _combinedMemberSignature
+                      .classBuilder.library.isNonNullableByDefault
+                  ? SubtypeCheckMode.withNullabilities
+                  : SubtypeCheckMode.ignoringNullabilities)) {
+            expression = new AsExpression(expression, superParameterType)
+              ..fileOffset = fileOffset;
+          }
+          return expression;
+        }, growable: true);
+        List<NamedExpression> namedArguments =
+            new List.generate(function.namedParameters.length, (int index) {
+          VariableDeclaration parameter = function.namedParameters[index];
+          int fileOffset = parameter.fileOffset;
+          Expression expression = new VariableGet(parameter)
+            ..fileOffset = fileOffset;
+          DartType superParameterType = type.namedParameters
+              .singleWhere(
+                  (NamedType namedType) => namedType.name == parameter.name)
+              .type;
+          if (!_combinedMemberSignature.hierarchy.types.isSubtypeOf(
+              parameter.type,
+              superParameterType,
+              _combinedMemberSignature
+                      .classBuilder.library.isNonNullableByDefault
+                  ? SubtypeCheckMode.withNullabilities
+                  : SubtypeCheckMode.ignoringNullabilities)) {
+            expression = new AsExpression(expression, superParameterType)
+              ..fileOffset = fileOffset;
+          }
+          return new NamedExpression(parameter.name!, expression);
+        }, growable: true);
+        List<DartType> typeArguments = function.typeParameters
+            .map<DartType>((typeParameter) =>
+                new TypeParameterType.withDefaultNullabilityForLibrary(
+                    typeParameter, enclosingClass.enclosingLibrary))
+            .toList();
+        Arguments arguments = new Arguments(positionalArguments,
+            types: typeArguments, named: namedArguments);
         superCall = new SuperMethodInvocation(
             name, arguments, superTarget as Procedure);
         break;
@@ -215,13 +245,29 @@
         superCall = new SuperPropertyGet(name, superTarget);
         break;
       case ProcedureKind.Setter:
-        superCall =
-            new SuperPropertySet(name, positionalArguments[0], superTarget);
+        DartType superParameterType =
+            _combinedMemberSignature.getMemberTypeForTarget(superTarget);
+        VariableDeclaration parameter = function.positionalParameters[0];
+        int fileOffset = parameter.fileOffset;
+        Expression expression = new VariableGet(parameter)
+          ..fileOffset = fileOffset;
+        if (!_combinedMemberSignature.hierarchy.types.isSubtypeOf(
+            parameter.type,
+            superParameterType,
+            _combinedMemberSignature.classBuilder.library.isNonNullableByDefault
+                ? SubtypeCheckMode.withNullabilities
+                : SubtypeCheckMode.ignoringNullabilities)) {
+          expression = new AsExpression(expression, superParameterType)
+            ..fileOffset = fileOffset;
+        }
+        superCall = new SuperPropertySet(name, expression, superTarget);
         break;
       default:
         unhandled('$kind', '_createForwardingImplIfNeeded', -1, null);
     }
-    function.body = new ReturnStatement(superCall)..parent = function;
+    function.body = new ReturnStatement(superCall)
+      ..fileOffset = procedure.fileOffset
+      ..parent = function;
     procedure.transformerFlags |= TransformerFlag.superCalls;
     procedure.stubKind = isForwardingStub
         ? ProcedureStubKind.ConcreteForwardingStub
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 3f1b27e..9956d82 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -1381,11 +1381,6 @@
     reportNonNullableInNullAwareWarningIfNeeded(
         lhsResult.inferredType, "??", node.left.fileOffset);
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(
-            lhsResult.inferredType, equalsName, node.fileOffset)
-        .member!;
-
     // This ends any shorting in `node.left`.
     Expression left = lhsResult.expression;
 
@@ -1420,9 +1415,7 @@
       VariableDeclaration variable =
           createVariable(left, lhsResult.inferredType);
       Expression equalsNull = inferrer.createEqualsNull(
-          lhsResult.expression.fileOffset,
-          createVariableGet(variable),
-          equalsMember);
+          lhsResult.expression.fileOffset, createVariableGet(variable));
       VariableGet variableGet = createVariableGet(variable);
       if (inferrer.library.isNonNullableByDefault &&
           !identical(nonNullableLhsType, originalLhsType)) {
@@ -3054,7 +3047,9 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, node.propertyName, node.writeOffset,
-        setter: true, instrumented: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        instrumented: true,
+        includeExtensionMethods: true);
     DartType writeType = inferrer.getSetterType(writeTarget, receiverType);
 
     ExpressionInferenceResult binaryResult = _computeBinaryExpression(
@@ -3115,7 +3110,9 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, node.propertyName, receiver.fileOffset,
-        setter: true, instrumented: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        instrumented: true,
+        includeExtensionMethods: true);
     DartType writeContext = inferrer.getSetterType(writeTarget, receiverType);
 
     inferrer.flowAnalysis.ifNullExpression_rightBegin(read, readType);
@@ -3130,10 +3127,6 @@
         receiverType, node.propertyName, writeTarget, rhs,
         forEffect: node.forEffect, valueType: writeType);
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.fileOffset)
-        .member!;
-
     DartType nonNullableReadType = readType.toNonNull();
     DartType inferredType = inferrer.typeSchemaEnvironment
         .getStandardUpperBound(
@@ -3145,8 +3138,7 @@
       //
       //     let v1 = o in v1.a == null ? v1.a = b : null
       //
-      Expression equalsNull =
-          inferrer.createEqualsNull(node.fileOffset, read, equalsMember);
+      Expression equalsNull = inferrer.createEqualsNull(node.fileOffset, read);
       ConditionalExpression conditional = new ConditionalExpression(equalsNull,
           write, new NullLiteral()..fileOffset = node.fileOffset, inferredType)
         ..fileOffset = node.fileOffset;
@@ -3160,7 +3152,7 @@
       //
       VariableDeclaration readVariable = createVariable(read, readType);
       Expression equalsNull = inferrer.createEqualsNull(
-          node.fileOffset, createVariableGet(readVariable), equalsMember);
+          node.fileOffset, createVariableGet(readVariable));
       VariableGet variableGet = createVariableGet(readVariable);
       if (inferrer.library.isNonNullableByDefault &&
           !identical(nonNullableReadType, readType)) {
@@ -3194,10 +3186,6 @@
         .inferExpression(node.write, typeContext, true, isVoidAllowed: true);
     inferrer.flowAnalysis.ifNullExpression_end();
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.fileOffset)
-        .member!;
-
     DartType originalReadType = readType;
     DartType nonNullableReadType = originalReadType.toNonNull();
     DartType inferredType = inferrer.typeSchemaEnvironment
@@ -3210,8 +3198,7 @@
       //
       //     a == null ? a = b : null
       //
-      Expression equalsNull =
-          inferrer.createEqualsNull(node.fileOffset, read, equalsMember);
+      Expression equalsNull = inferrer.createEqualsNull(node.fileOffset, read);
       replacement = new ConditionalExpression(
           equalsNull,
           writeResult.expression,
@@ -3225,7 +3212,7 @@
       //
       VariableDeclaration readVariable = createVariable(read, readType);
       Expression equalsNull = inferrer.createEqualsNull(
-          node.fileOffset, createVariableGet(readVariable), equalsMember);
+          node.fileOffset, createVariableGet(readVariable));
       VariableGet variableGet = createVariableGet(readVariable);
       if (inferrer.library.isNonNullableByDefault &&
           !identical(nonNullableReadType, originalReadType)) {
@@ -3252,7 +3239,8 @@
 
     ObjectAccessTarget indexGetTarget = inferrer.findInterfaceMember(
         receiverType, indexGetName, node.fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     DartType indexType = inferrer.getIndexKeyType(indexGetTarget, receiverType);
 
@@ -3294,7 +3282,8 @@
 
     ObjectAccessTarget indexSetTarget = inferrer.findInterfaceMember(
         receiverType, indexSetName, node.fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     DartType indexType = inferrer.getIndexKeyType(indexSetTarget, receiverType);
     DartType valueType =
@@ -3517,7 +3506,8 @@
 
     ObjectAccessTarget readTarget = inferrer.findInterfaceMember(
         receiverType, indexGetName, node.readOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     MethodContravarianceCheckKind checkKind =
         inferrer.preCheckInvocationContravariance(receiverType, readTarget,
@@ -3527,7 +3517,8 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, indexSetName, node.writeOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     DartType writeIndexType =
         inferrer.getIndexKeyType(writeTarget, receiverType);
@@ -3568,10 +3559,6 @@
     DartType readType = readResult.inferredType;
     inferrer.flowAnalysis.ifNullExpression_rightBegin(read, readType);
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.testOffset)
-        .member!;
-
     writeIndex = inferrer.ensureAssignable(
         writeIndexType, indexResult.inferredType, writeIndex,
         whyNotPromoted: whyNotPromotedIndex);
@@ -3623,8 +3610,7 @@
       //     let indexVariable = a in
       //         o[indexVariable] == null ? o.[]=(indexVariable, b) : null
       //
-      Expression equalsNull =
-          inferrer.createEqualsNull(node.testOffset, read, equalsMember);
+      Expression equalsNull = inferrer.createEqualsNull(node.testOffset, read);
       ConditionalExpression conditional = new ConditionalExpression(equalsNull,
           write, new NullLiteral()..fileOffset = node.testOffset, inferredType)
         ..fileOffset = node.testOffset;
@@ -3656,7 +3642,7 @@
       //
       VariableDeclaration readVariable = createVariable(read, readType);
       Expression equalsNull = inferrer.createEqualsNull(
-          node.testOffset, createVariableGet(readVariable), equalsMember);
+          node.testOffset, createVariableGet(readVariable));
       VariableDeclaration writeVariable =
           createVariable(write, const VoidType());
       VariableGet variableGet = createVariableGet(readVariable);
@@ -3701,10 +3687,6 @@
     DartType readIndexType =
         inferrer.getIndexKeyType(readTarget, inferrer.thisType!);
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.testOffset)
-        .member!;
-
     ObjectAccessTarget writeTarget = node.setter != null
         ? new ObjectAccessTarget.interfaceMember(node.setter!,
             isPotentiallyNullable: false)
@@ -3807,8 +3789,7 @@
       //        super[v1] == null ? super.[]=(v1, b) : null
       //
       assert(valueVariable == null);
-      Expression equalsNull =
-          inferrer.createEqualsNull(node.testOffset, read, equalsMember);
+      Expression equalsNull = inferrer.createEqualsNull(node.testOffset, read);
       replacement = new ConditionalExpression(equalsNull, write,
           new NullLiteral()..fileOffset = node.testOffset, inferredType)
         ..fileOffset = node.testOffset;
@@ -3826,7 +3807,7 @@
 
       VariableDeclaration readVariable = createVariable(read, readType);
       Expression equalsNull = inferrer.createEqualsNull(
-          node.testOffset, createVariableGet(readVariable), equalsMember);
+          node.testOffset, createVariableGet(readVariable));
       VariableDeclaration writeVariable =
           createVariable(write, const VoidType());
       VariableGet readVariableGet = createVariableGet(readVariable);
@@ -3925,10 +3906,6 @@
     DartType readType = readResult.inferredType;
     inferrer.flowAnalysis.ifNullExpression_rightBegin(read, readType);
 
-    Member equalsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.testOffset)
-        .member!;
-
     writeIndex = inferrer.ensureAssignable(
         writeIndexType, indexResult.inferredType, writeIndex);
 
@@ -3974,8 +3951,7 @@
       //          ? receiverVariable.[]=(indexVariable, b) : null
       //
       assert(valueVariable == null);
-      Expression equalsNull =
-          inferrer.createEqualsNull(node.testOffset, read, equalsMember);
+      Expression equalsNull = inferrer.createEqualsNull(node.testOffset, read);
       replacement = new ConditionalExpression(equalsNull, write,
           new NullLiteral()..fileOffset = node.testOffset, inferredType)
         ..fileOffset = node.testOffset;
@@ -3994,7 +3970,7 @@
       //
       VariableDeclaration readVariable = createVariable(read, readType);
       Expression equalsNull = inferrer.createEqualsNull(
-          node.testOffset, createVariableGet(readVariable), equalsMember);
+          node.testOffset, createVariableGet(readVariable));
       VariableDeclaration writeVariable =
           createVariable(write, const VoidType());
       VariableGet readVariableGet = createVariableGet(readVariable);
@@ -4063,7 +4039,8 @@
 
     ObjectAccessTarget equalsTarget = inferrer.findInterfaceMember(
         leftType, equalsName, fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     assert(
         equalsTarget.isInstanceMember ||
@@ -4109,7 +4086,8 @@
       // Ensure operator == member even for `Never`.
       Member target = inferrer
           .findInterfaceMember(const DynamicType(), equalsName, -1,
-              instrumented: false)
+              instrumented: false,
+              callSiteAccessKind: CallSiteAccessKind.operatorInvocation)
           .member!;
       equals = new EqualsCall(left, right,
           functionType: functionType, interfaceTarget: target as Procedure)
@@ -4147,7 +4125,8 @@
 
     ObjectAccessTarget binaryTarget = inferrer.findInterfaceMember(
         leftType, binaryName, fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     MethodContravarianceCheckKind binaryCheckKind =
         inferrer.preCheckInvocationContravariance(leftType, binaryTarget,
@@ -4328,7 +4307,8 @@
       Map<DartType, NonPromotionReason> Function() whyNotPromoted) {
     ObjectAccessTarget unaryTarget = inferrer.findInterfaceMember(
         expressionType, unaryName, fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     MethodContravarianceCheckKind unaryCheckKind =
         inferrer.preCheckInvocationContravariance(expressionType, unaryTarget,
@@ -4688,7 +4668,8 @@
 
     ObjectAccessTarget readTarget = inferrer.findInterfaceMember(
         receiverType, propertyName, fileOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.getterInvocation);
 
     DartType readType = inferrer.getGetterType(readTarget, receiverType);
 
@@ -4977,7 +4958,8 @@
 
     ObjectAccessTarget readTarget = inferrer.findInterfaceMember(
         receiverType, indexGetName, node.readOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     MethodContravarianceCheckKind readCheckKind =
         inferrer.preCheckInvocationContravariance(receiverType, readTarget,
@@ -5029,7 +5011,8 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, indexSetName, node.writeOffset,
-        includeExtensionMethods: true);
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.operatorInvocation);
 
     DartType writeIndexType =
         inferrer.getIndexKeyType(writeTarget, receiverType);
@@ -5175,7 +5158,8 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         nonNullReceiverType, node.propertyName, node.writeOffset,
-        setter: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        includeExtensionMethods: true);
 
     DartType valueType =
         inferrer.getSetterType(writeTarget, nonNullReceiverType);
@@ -5643,7 +5627,9 @@
 
     ObjectAccessTarget target = inferrer.findInterfaceMember(
         receiverType, node.name, node.fileOffset,
-        setter: true, instrumented: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        instrumented: true,
+        includeExtensionMethods: true);
     if (target.isInstanceMember || target.isObjectMember) {
       if (inferrer.instrumentation != null &&
           receiverType == const DynamicType()) {
@@ -5697,10 +5683,6 @@
     DartType readType = readResult.inferredType;
     inferrer.flowAnalysis.ifNullExpression_rightBegin(read, readType);
 
-    Member readEqualsMember = inferrer
-        .findInterfaceMember(readType, equalsName, node.testOffset)
-        .member!;
-
     VariableDeclaration? readVariable;
     if (!node.forEffect) {
       readVariable = createVariable(read, readType);
@@ -5709,7 +5691,8 @@
 
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         nonNullReceiverType, node.name, node.writeOffset,
-        setter: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        includeExtensionMethods: true);
 
     DartType valueType =
         inferrer.getSetterType(writeTarget, nonNullReceiverType);
@@ -5741,7 +5724,7 @@
       //
 
       Expression readEqualsNull =
-          inferrer.createEqualsNull(node.readOffset, read, readEqualsMember);
+          inferrer.createEqualsNull(node.readOffset, read);
       replacement = new ConditionalExpression(readEqualsNull, write,
           new NullLiteral()..fileOffset = node.writeOffset, inferredType)
         ..fileOffset = node.writeOffset;
@@ -5756,8 +5739,8 @@
       //
       assert(readVariable != null);
 
-      Expression readEqualsNull = inferrer.createEqualsNull(
-          receiverVariable.fileOffset, read, readEqualsMember);
+      Expression readEqualsNull =
+          inferrer.createEqualsNull(receiverVariable.fileOffset, read);
       VariableGet variableGet = createVariableGet(readVariable!);
       if (inferrer.library.isNonNullableByDefault &&
           !identical(nonNullableReadType, readType)) {
@@ -7016,7 +6999,9 @@
     DartType receiverType = receiverResult.inferredType;
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, propertySet.name, propertySet.fileOffset,
-        setter: true, instrumented: true, includeExtensionMethods: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        instrumented: true,
+        includeExtensionMethods: true);
     DartType elementType =
         _writeType = inferrer.getSetterType(writeTarget, receiverType);
     Expression? error = inferrer.reportMissingInterfaceMember(
@@ -7074,7 +7059,8 @@
     DartType receiverType = inferrer.thisType!;
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, superPropertySet.name, superPropertySet.fileOffset,
-        setter: true, instrumented: true);
+        callSiteAccessKind: CallSiteAccessKind.setterInvocation,
+        instrumented: true);
     if (writeTarget.isInstanceMember || writeTarget.isObjectMember) {
       superPropertySet.interfaceTarget = writeTarget.member;
     }
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 3a1de7d..b587d91 100644
--- a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
@@ -1591,8 +1591,8 @@
       DartType? type,
       bool isFinal: false,
       bool isConst: false,
-      bool isFieldFormal: false,
-      bool isCovariant: false,
+      bool isInitializingFormal: false,
+      bool isCovariantByDeclaration: false,
       bool isLocalFunction: false,
       bool isLate: false,
       bool isRequired: false,
@@ -1605,8 +1605,8 @@
             type: type ?? const DynamicType(),
             isFinal: isFinal,
             isConst: isConst,
-            isFieldFormal: isFieldFormal,
-            isCovariant: isCovariant,
+            isInitializingFormal: isInitializingFormal,
+            isCovariantByDeclaration: isCovariantByDeclaration,
             isLate: isLate,
             isRequired: isRequired,
             isLowered: isLowered);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_api.dart
deleted file mode 100644
index 40f86af..0000000
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_api.dart
+++ /dev/null
@@ -1,50 +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.
-
-/// This library exports all API from Kernel that can be used throughout fasta.
-library fasta.kernel_api;
-
-export 'package:kernel/type_algebra.dart' show Substitution, substitute;
-
-export 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
-
-export 'package:kernel/clone.dart' show CloneVisitorNotMembers;
-
-export 'package:kernel/core_types.dart' show CoreTypes;
-
-export 'package:kernel/transformations/flags.dart' show TransformerFlag;
-
-export 'package:kernel/text/ast_to_text.dart' show NameSystem;
-
-export 'package:kernel/type_environment.dart' show TypeEnvironment;
-
-export 'package:kernel/src/bounds_checks.dart' show instantiateToBounds;
-
-import 'package:kernel/text/ast_to_text.dart' show NameSystem, Printer;
-
-import 'package:kernel/ast.dart' show Class, Member, Node;
-
-void printNodeOn(Node? node, StringSink sink, {NameSystem? syntheticNames}) {
-  if (node == null) {
-    sink.write("null");
-  } else {
-    syntheticNames ??= new NameSystem();
-    new Printer(sink, syntheticNames: syntheticNames).writeNode(node);
-  }
-}
-
-void printQualifiedNameOn(Member? member, StringSink sink) {
-  if (member == null) {
-    sink.write("null");
-  } else {
-    sink.write(member.enclosingLibrary.importUri);
-    sink.write("::");
-    Class? cls = member.enclosingClass;
-    if (cls != null) {
-      sink.write(cls.name);
-      sink.write("::");
-    }
-    sink.write(member.name.text);
-  }
-}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
deleted file mode 100644
index c82741e..0000000
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ /dev/null
@@ -1,98 +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.
-
-/// This library exports all API from Kernel's ast.dart that can be used
-/// throughout fasta.
-library fasta.kernel_ast_api;
-
-export 'package:kernel/ast.dart'
-    show
-        Arguments,
-        AsExpression,
-        AssertStatement,
-        AsyncMarker,
-        Block,
-        BreakStatement,
-        Catch,
-        CheckLibraryIsLoaded,
-        Class,
-        Component,
-        Constructor,
-        ConstructorInvocation,
-        ContinueSwitchStatement,
-        DartType,
-        DynamicType,
-        EmptyStatement,
-        Expression,
-        ExpressionStatement,
-        Field,
-        ForInStatement,
-        FunctionDeclaration,
-        FunctionExpression,
-        FunctionNode,
-        FunctionType,
-        Initializer,
-        InterfaceType,
-        InvalidExpression,
-        InvalidType,
-        IsExpression,
-        LabeledStatement,
-        Let,
-        Library,
-        LibraryDependency,
-        LibraryPart,
-        ListLiteral,
-        LocalInitializer,
-        Location,
-        MapLiteralEntry,
-        MapLiteral,
-        Member,
-        Name,
-        NamedExpression,
-        NamedType,
-        Node,
-        NullLiteral,
-        Procedure,
-        ProcedureKind,
-        Rethrow,
-        ReturnStatement,
-        Statement,
-        StaticGet,
-        StaticInvocation,
-        StaticSet,
-        StringConcatenation,
-        SuperInitializer,
-        SuperMethodInvocation,
-        SuperPropertySet,
-        SwitchCase,
-        ThisExpression,
-        TreeNode,
-        TypeParameter,
-        TypeParameterType,
-        Typedef,
-        TypedefType,
-        VariableDeclaration,
-        VariableGet,
-        VariableSet,
-        VoidType,
-        setParents;
-
-export 'internal_ast.dart'
-    show
-        ArgumentsImpl,
-        Cascade,
-        DeferredCheck,
-        FactoryConstructorInvocation,
-        FunctionDeclarationImpl,
-        InvalidSuperInitializerJudgment,
-        LoadLibraryTearOff,
-        NamedFunctionExpressionJudgment,
-        NullAwareMethodInvocation,
-        NullAwarePropertyGet,
-        ReturnStatementImpl,
-        ShadowInvalidFieldInitializer,
-        ShadowInvalidInitializer,
-        ShadowLargeIntLiteral,
-        VariableDeclarationImpl,
-        VariableGetImpl;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
deleted file mode 100644
index 3b8d62c..0000000
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
+++ /dev/null
@@ -1,53 +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.
-
-library fasta.kernel_builder;
-
-import 'package:kernel/ast.dart'
-    show
-        Combinator,
-        Constructor,
-        Initializer,
-        Procedure,
-        RedirectingInitializer;
-
-import '../combinator.dart' as fasta;
-
-export 'class_hierarchy_builder.dart'
-    show ClassHierarchyBuilder, ClassMember, DelayedCheck;
-
-export 'implicit_field_type.dart' show ImplicitFieldType;
-
-export 'kernel_variable_builder.dart' show VariableBuilderImpl;
-
-export 'load_library_builder.dart' show LoadLibraryBuilder;
-
-int compareProcedures(Procedure a, Procedure b) {
-  int i = "${a.fileUri}".compareTo("${b.fileUri}");
-  if (i != 0) return i;
-  return a.fileOffset.compareTo(b.fileOffset);
-}
-
-bool isRedirectingGenerativeConstructorImplementation(Constructor constructor) {
-  List<Initializer> initializers = constructor.initializers;
-  return initializers.length == 1 &&
-      initializers.single is RedirectingInitializer;
-}
-
-List<Combinator>? toKernelCombinators(
-    List<fasta.Combinator>? fastaCombinators) {
-  if (fastaCombinators == null) {
-    // Note: it's safe to return null here as Kernel's LibraryDependency will
-    // convert null to an empty list.
-    return null;
-  }
-
-  return new List<Combinator>.generate(fastaCombinators.length, (int i) {
-    fasta.Combinator combinator = fastaCombinators[i];
-    List<String> nameList = combinator.names.toList();
-    return combinator.isShow
-        ? new Combinator.show(nameList)
-        : new Combinator.hide(nameList);
-  }, growable: true);
-}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
index a7da5cc..67be0a6 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
@@ -8,12 +8,12 @@
 
 import '../fasta_codes.dart' show LocatedMessage;
 
-import '../loader.dart' show Loader;
+import '../source/source_loader.dart' show SourceLoader;
 
 import 'constant_evaluator.dart' show ErrorReporter;
 
 class KernelConstantErrorReporter extends ErrorReporter {
-  final Loader loader;
+  final SourceLoader loader;
 
   KernelConstantErrorReporter(this.loader);
 
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 64ce17a..296cbc5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -4,21 +4,23 @@
 
 library fasta.kernel_target;
 
+import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
 import 'package:kernel/ast.dart';
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart';
 import 'package:kernel/reference_from_index.dart' show IndexedClass;
 import 'package:kernel/target/changed_structure_notifier.dart'
     show ChangedStructureNotifier;
-import 'package:kernel/target/targets.dart' show DiagnosticReporter;
+import 'package:kernel/target/targets.dart' show DiagnosticReporter, Target;
 import 'package:kernel/transformations/value_class.dart' as valueClass;
 import 'package:kernel/type_algebra.dart' show substitute;
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 import 'package:package_config/package_config.dart' hide LanguageVersion;
 
+import '../../api_prototype/experimental_flags.dart' show ExperimentalFlag;
 import '../../api_prototype/file_system.dart' show FileSystem;
-import '../../api_prototype/experimental_flags.dart';
 import '../../base/nnbd_mode.dart';
+import '../../base/processed_options.dart' show ProcessedOptions;
 import '../builder/builder.dart';
 import '../builder/class_builder.dart';
 import '../builder/constructor_builder.dart';
@@ -38,15 +40,16 @@
 import '../builder/void_type_declaration_builder.dart';
 import '../compiler_context.dart' show CompilerContext;
 import '../crash.dart' show withCrashReporting;
-import '../dill/dill_member_builder.dart' show DillMemberBuilder;
 import '../dill/dill_library_builder.dart' show DillLibraryBuilder;
+import '../dill/dill_member_builder.dart' show DillMemberBuilder;
 import '../dill/dill_target.dart' show DillTarget;
-import '../fasta_codes.dart' show LocatedMessage, Message;
 import '../kernel/constructor_tearoff_lowering.dart';
 import '../loader.dart' show Loader;
 import '../messages.dart'
     show
         FormattedMessage,
+        LocatedMessage,
+        Message,
         messageAgnosticWithStrongDillLibrary,
         messageAgnosticWithWeakDillLibrary,
         messageConstConstructorLateFinalFieldCause,
@@ -67,11 +70,13 @@
         templateSuperclassHasNoDefaultConstructor;
 import '../problems.dart' show unhandled;
 import '../scope.dart' show AmbiguousBuilder;
+import '../source/name_scheme.dart';
 import '../source/source_class_builder.dart' show SourceClassBuilder;
 import '../source/source_library_builder.dart'
     show LanguageVersion, SourceLibraryBuilder;
 import '../source/source_loader.dart' show SourceLoader;
 import '../target_implementation.dart' show TargetImplementation;
+import '../ticker.dart' show Ticker;
 import '../type_inference/type_schema.dart';
 import '../uri_translator.dart' show UriTranslator;
 import 'constant_evaluator.dart' as constants
@@ -79,12 +84,15 @@
         EvaluationMode,
         transformLibraries,
         transformProcedure,
-        ConstantCoverage;
+        ConstantCoverage,
+        ConstantEvaluationData;
 import 'kernel_constants.dart' show KernelConstantErrorReporter;
 import 'kernel_helper.dart';
 import 'verifier.dart' show verifyComponent, verifyGetStaticType;
 
 class KernelTarget extends TargetImplementation {
+  final Ticker ticker;
+
   /// The [FileSystem] which should be used to access files.
   final FileSystem fileSystem;
 
@@ -142,17 +150,161 @@
   final List<SynthesizedFunctionNode> synthesizedFunctionNodes =
       <SynthesizedFunctionNode>[];
 
+  final UriTranslator uriTranslator;
+
+  @override
+  final Target backendTarget;
+
+  @override
+  final CompilerContext context = CompilerContext.current;
+
+  /// Shared with [CompilerContext].
+  final Map<Uri, Source> uriToSource = CompilerContext.current.uriToSource;
+
+  MemberBuilder? _cachedAbstractClassInstantiationError;
+  MemberBuilder? _cachedCompileTimeError;
+  MemberBuilder? _cachedDuplicatedFieldInitializerError;
+  MemberBuilder? _cachedNativeAnnotation;
+
+  final ProcessedOptions _options;
+
   KernelTarget(this.fileSystem, this.includeComments, DillTarget dillTarget,
-      UriTranslator uriTranslator)
+      this.uriTranslator)
       : dillTarget = dillTarget,
-        super(dillTarget.ticker, uriTranslator, dillTarget.backendTarget) {
+        backendTarget = dillTarget.backendTarget,
+        _options = CompilerContext.current.options,
+        ticker = dillTarget.ticker {
     loader = createLoader();
   }
 
+  bool isExperimentEnabledInLibrary(ExperimentalFlag flag, Uri importUri) {
+    return _options.isExperimentEnabledInLibrary(flag, importUri);
+  }
+
+  Version getExperimentEnabledVersionInLibrary(
+      ExperimentalFlag flag, Uri importUri) {
+    return _options.getExperimentEnabledVersionInLibrary(flag, importUri);
+  }
+
+  bool isExperimentEnabledInLibraryByVersion(
+      ExperimentalFlag flag, Uri importUri, Version version) {
+    return _options.isExperimentEnabledInLibraryByVersion(
+        flag, importUri, version);
+  }
+
+  /// Returns `true` if the [flag] is enabled by default.
+  bool isExperimentEnabledByDefault(ExperimentalFlag flag) {
+    return _options.isExperimentEnabledByDefault(flag);
+  }
+
+  /// Returns `true` if the [flag] is enabled globally.
+  ///
+  /// This is `true` either if the [flag] is passed through an explicit
+  /// `--enable-experiment` option or if the [flag] is expired and on by
+  /// default.
+  bool isExperimentEnabledGlobally(ExperimentalFlag flag) {
+    return _options.isExperimentEnabledGlobally(flag);
+  }
+
+  Uri? translateUri(Uri uri) => uriTranslator.translate(uri);
+
+  /// Returns a reference to the constructor of
+  /// [AbstractClassInstantiationError] error.  The constructor is expected to
+  /// accept a single argument of type String, which is the name of the
+  /// abstract class.
+  MemberBuilder getAbstractClassInstantiationError(Loader loader) {
+    return _cachedAbstractClassInstantiationError ??=
+        loader.coreLibrary.getConstructor("AbstractClassInstantiationError");
+  }
+
+  /// Returns a reference to the constructor used for creating a compile-time
+  /// error. The constructor is expected to accept a single argument of type
+  /// String, which is the compile-time error message.
+  MemberBuilder getCompileTimeError(Loader loader) {
+    return _cachedCompileTimeError ??= loader.coreLibrary
+        .getConstructor("_CompileTimeError", bypassLibraryPrivacy: true);
+  }
+
+  /// Returns a reference to the constructor used for creating a runtime error
+  /// when a final field is initialized twice. The constructor is expected to
+  /// accept a single argument which is the name of the field.
+  MemberBuilder getDuplicatedFieldInitializerError(Loader loader) {
+    return _cachedDuplicatedFieldInitializerError ??= loader.coreLibrary
+        .getConstructor("_DuplicatedFieldInitializerError",
+            bypassLibraryPrivacy: true);
+  }
+
+  /// Returns a reference to the constructor used for creating `native`
+  /// annotations. The constructor is expected to accept a single argument of
+  /// type String, which is the name of the native method.
+  MemberBuilder getNativeAnnotation(SourceLoader loader) {
+    if (_cachedNativeAnnotation != null) return _cachedNativeAnnotation!;
+    LibraryBuilder internal = loader.read(Uri.parse("dart:_internal"), -1,
+        accessor: loader.coreLibrary);
+    return _cachedNativeAnnotation = internal.getConstructor("ExternalName");
+  }
+
+  void loadExtraRequiredLibraries(SourceLoader loader) {
+    for (String uri in backendTarget.extraRequiredLibraries) {
+      loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
+    }
+    if (context.compilingPlatform) {
+      for (String uri in backendTarget.extraRequiredLibrariesPlatform) {
+        loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
+      }
+    }
+  }
+
+  FormattedMessage createFormattedMessage(
+      Message message,
+      int charOffset,
+      int length,
+      Uri? fileUri,
+      List<LocatedMessage>? messageContext,
+      Severity severity,
+      {List<Uri>? involvedFiles}) {
+    ProcessedOptions processedOptions = context.options;
+    return processedOptions.format(
+        fileUri != null
+            ? message.withLocation(fileUri, charOffset, length)
+            : message.withoutLocation(),
+        severity,
+        messageContext,
+        involvedFiles: involvedFiles);
+  }
+
+  String get currentSdkVersionString {
+    return CompilerContext.current.options.currentSdkVersion;
+  }
+
+  Version? _currentSdkVersion;
+  Version get currentSdkVersion {
+    if (_currentSdkVersion == null) {
+      _parseCurrentSdkVersion();
+    }
+    return _currentSdkVersion!;
+  }
+
+  void _parseCurrentSdkVersion() {
+    bool good = false;
+    // ignore: unnecessary_null_comparison
+    if (currentSdkVersionString != null) {
+      List<String> dotSeparatedParts = currentSdkVersionString.split(".");
+      if (dotSeparatedParts.length >= 2) {
+        _currentSdkVersion = new Version(int.tryParse(dotSeparatedParts[0])!,
+            int.tryParse(dotSeparatedParts[1])!);
+        good = true;
+      }
+    }
+    if (!good) {
+      throw new StateError(
+          "Unparsable sdk version given: $currentSdkVersionString");
+    }
+  }
+
   SourceLoader createLoader() =>
       new SourceLoader(fileSystem, includeComments, this);
 
-  @override
   void addSourceInformation(
       Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
     uriToSource[fileUri] =
@@ -212,7 +364,30 @@
     return entryPoint;
   }
 
-  @override
+  /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
+  /// already.
+  ///
+  /// [fileUri] must not be null and is a URI that can be passed to FileSystem
+  /// to locate the corresponding file.
+  ///
+  /// [origin] is non-null if the created library is a patch to [origin].
+  ///
+  /// [packageUri] is the base uri for the package which the library belongs to.
+  /// For instance 'package:foo'.
+  ///
+  /// This is used to associate libraries in for instance the 'bin' and 'test'
+  /// folders of a package source with the package uri of the 'lib' folder.
+  ///
+  /// If the [packageUri] is `null` the package association of this library is
+  /// based on its [importUri].
+  ///
+  /// For libraries with a 'package:' [importUri], the package path must match
+  /// the path in the [importUri]. For libraries with a 'dart:' [importUri] the
+  /// [packageUri] must be `null`.
+  ///
+  /// [packageLanguageVersion] is the language version defined by the package
+  /// which the library belongs to, or the current sdk version if the library
+  /// doesn't belong to a package.
   LibraryBuilder createLibraryBuilder(
       Uri uri,
       Uri fileUri,
@@ -222,13 +397,13 @@
       Library? referencesFrom,
       bool? referenceIsPartOwner) {
     if (dillTarget.isLoaded) {
-      LibraryBuilder? builder = dillTarget.loader.builders[uri];
+      DillLibraryBuilder? builder = dillTarget.loader.builders[uri];
       if (builder != null) {
         if (!builder.isNonNullableByDefault &&
             (loader.nnbdMode == NnbdMode.Strong ||
                 loader.nnbdMode == NnbdMode.Agnostic)) {
           loader.registerStrongOptOutLibrary(builder);
-        } else if (builder is DillLibraryBuilder) {
+        } else {
           NonNullableByDefaultCompiledMode libraryMode =
               builder.library.nonNullableByDefaultCompiledMode;
           if (libraryMode == NonNullableByDefaultCompiledMode.Invalid) {
@@ -290,7 +465,9 @@
     return result;
   }
 
-  @override
+  /// The class [cls] is involved in a cyclic definition. This method should
+  /// ensure that the cycle is broken, for example, by removing superclass and
+  /// implemented interfaces.
   void breakCycle(ClassBuilder builder) {
     Class cls = builder.cls;
     cls.implementedTypes.clear();
@@ -307,7 +484,6 @@
     builder.mixedInTypeBuilder = null;
   }
 
-  @override
   Future<Component?> buildOutlines({CanonicalName? nameRoot}) async {
     if (loader.first == null) return null;
     return withCrashReporting<Component?>(() async {
@@ -333,6 +509,7 @@
       computeCoreTypes();
       loader.buildClassHierarchy(myClasses, objectClassBuilder);
       loader.computeHierarchy();
+      loader.computeShowHideElements();
       loader.installTypedefTearOffs();
       loader.performTopLevelInference(myClasses);
       loader.checkSupertypes(myClasses);
@@ -360,7 +537,6 @@
   ///
   /// If [verify], run the default kernel verification on the resulting
   /// component.
-  @override
   Future<Component?> buildComponent({bool verify: false}) async {
     if (loader.first == null) return null;
     return withCrashReporting<Component?>(() async {
@@ -1185,7 +1361,7 @@
     assert(() {
       Set<String> patchFieldNames = {};
       builder.forEachDeclaredField((String name, FieldBuilder fieldBuilder) {
-        patchFieldNames.add(SourceFieldBuilder.createFieldName(
+        patchFieldNames.add(NameScheme.createFieldName(
           FieldNameType.Field,
           name,
           isInstanceMember: fieldBuilder.isClassInstanceMember,
@@ -1229,23 +1405,27 @@
         new TypeEnvironment(loader.coreTypes, loader.hierarchy);
     constants.EvaluationMode evaluationMode = _getConstantEvaluationMode();
 
-    constants.ConstantCoverage coverage = constants.transformLibraries(
-        loader.libraries,
-        backendTarget.constantsBackend(loader.coreTypes),
-        environmentDefines,
-        environment,
-        new KernelConstantErrorReporter(loader),
-        evaluationMode,
-        evaluateAnnotations: true,
-        enableTripleShift:
-            isExperimentEnabledGlobally(ExperimentalFlag.tripleShift),
-        enableConstFunctions:
-            isExperimentEnabledGlobally(ExperimentalFlag.constFunctions),
-        enableConstructorTearOff:
-            isExperimentEnabledGlobally(ExperimentalFlag.constructorTearoffs),
-        errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
+    constants.ConstantEvaluationData constantEvaluationData =
+        constants.transformLibraries(
+            loader.libraries,
+            backendTarget.constantsBackend,
+            environmentDefines,
+            environment,
+            new KernelConstantErrorReporter(loader),
+            evaluationMode,
+            evaluateAnnotations: true,
+            enableTripleShift:
+                isExperimentEnabledGlobally(ExperimentalFlag.tripleShift),
+            enableConstFunctions:
+                isExperimentEnabledGlobally(ExperimentalFlag.constFunctions),
+            enableConstructorTearOff: isExperimentEnabledGlobally(
+                ExperimentalFlag.constructorTearoffs),
+            errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
     ticker.logMs("Evaluated constants");
 
+    markLibrariesUsed(constantEvaluationData.visitedLibraries);
+
+    constants.ConstantCoverage coverage = constantEvaluationData.coverage;
     coverage.constructorCoverage.forEach((Uri fileUri, Set<Reference> value) {
       Source? source = uriToSource[fileUri];
       // ignore: unnecessary_null_comparison
@@ -1284,7 +1464,7 @@
 
     constants.transformProcedure(
       procedure,
-      backendTarget.constantsBackend(loader.coreTypes),
+      backendTarget.constantsBackend,
       environmentDefines,
       environment,
       new KernelConstantErrorReporter(loader),
@@ -1355,7 +1535,6 @@
     return loader.libraries.contains(library);
   }
 
-  @override
   void readPatchFiles(SourceLibraryBuilder library) {
     assert(library.importUri.scheme == "dart");
     List<Uri>? patches = uriTranslator.getDartPatches(library.importUri.path);
@@ -1382,10 +1561,13 @@
     }
   }
 
-  @override
   void releaseAncillaryResources() {
     component = null;
   }
+
+  void markLibrariesUsed(Set<Library> visitedLibraries) {
+    // Default implementation does nothing.
+  }
 }
 
 /// Looks for a constructor call that matches `super()` from a constructor in
@@ -1407,7 +1589,7 @@
 
 class KernelDiagnosticReporter
     extends DiagnosticReporter<Message, LocatedMessage> {
-  final Loader loader;
+  final SourceLoader loader;
 
   KernelDiagnosticReporter(this.loader);
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart b/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
index 03c89ce..1e7600c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/member_covariance.dart
@@ -17,32 +17,32 @@
 
   /// Returns the covariance mask for [parameter].
   static int covarianceFromParameter(VariableDeclaration parameter) =>
-      (parameter.isCovariant ? Covariant : 0) |
-      (parameter.isGenericCovariantImpl ? GenericCovariantImpl : 0);
+      (parameter.isCovariantByDeclaration ? Covariant : 0) |
+      (parameter.isCovariantByClass ? GenericCovariantImpl : 0);
 
   /// Returns the covariance mask for [field].
   static int covarianceFromField(Field field) =>
-      (field.isCovariant ? Covariant : 0) |
-      (field.isGenericCovariantImpl ? GenericCovariantImpl : 0);
+      (field.isCovariantByDeclaration ? Covariant : 0) |
+      (field.isCovariantByClass ? GenericCovariantImpl : 0);
 
   /// Applies the [covariance] mask to [parameter].
   static void covarianceToParameter(
       int covariance, VariableDeclaration parameter) {
     if ((covariance & Covariant) != 0) {
-      parameter.isCovariant = true;
+      parameter.isCovariantByDeclaration = true;
     }
     if ((covariance & GenericCovariantImpl) != 0) {
-      parameter.isGenericCovariantImpl = true;
+      parameter.isCovariantByClass = true;
     }
   }
 
   /// Applies the [covariance] mask to parameter.
   static void covarianceToField(int covariance, Field field) {
     if ((covariance & Covariant) != 0) {
-      field.isCovariant = true;
+      field.isCovariantByDeclaration = true;
     }
     if ((covariance & GenericCovariantImpl) != 0) {
-      field.isGenericCovariantImpl = true;
+      field.isCovariantByClass = true;
     }
   }
 
@@ -133,7 +133,7 @@
     List<bool>? typeParameters;
     if (function.typeParameters.isNotEmpty) {
       for (int index = 0; index < function.typeParameters.length; index++) {
-        if (function.typeParameters[index].isGenericCovariantImpl) {
+        if (function.typeParameters[index].isCovariantByClass) {
           typeParameters ??=
               new List<bool>.filled(function.typeParameters.length, false);
           typeParameters[index] = true;
@@ -289,7 +289,7 @@
         for (int index = 0; index < typeParameters.length; index++) {
           if (index < function.typeParameters.length) {
             if (typeParameters[index]) {
-              function.typeParameters[index].isGenericCovariantImpl = true;
+              function.typeParameters[index].isCovariantByClass = true;
             }
           }
         }
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart b/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
index 608b28e..a64b323 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
@@ -37,8 +37,6 @@
 
 import '../kernel/utils.dart';
 
-export 'package:kernel/ast.dart' show Variance;
-
 /// Initial value for "variance" that is to be computed by the compiler.
 const int pendingVariance = -1;
 
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 57d4f7c..4ebcb03 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
@@ -331,7 +331,7 @@
       if (field.isStatic) continue;
       if (!first) result.add(", ");
       result.add("${field.name}: ");
-      node.fieldValues[field.getterReference]!.accept(this);
+      node.fieldValues[field.fieldReference]!.accept(this);
       first = false;
     }
     result.add("}");
diff --git a/pkg/front_end/lib/src/fasta/kernel/utils.dart b/pkg/front_end/lib/src/fasta/kernel/utils.dart
index f1f909e..ad50b91 100644
--- a/pkg/front_end/lib/src/fasta/kernel/utils.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/utils.dart
@@ -10,25 +10,10 @@
 import 'package:_fe_analyzer_shared/src/scanner/token.dart'
     show SyntheticToken, TokenType;
 
-import 'package:kernel/clone.dart' show CloneVisitorWithMembers;
-
-import 'package:kernel/ast.dart'
-    show
-        Class,
-        Component,
-        DartType,
-        Library,
-        Procedure,
-        Supertype,
-        TreeNode,
-        TypeParameter,
-        TypeParameterType,
-        dummyDartType,
-        dummyUri;
-
-import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
-
-import 'package:kernel/text/ast_to_text.dart' show Printer;
+import 'package:kernel/ast.dart';
+import 'package:kernel/clone.dart';
+import 'package:kernel/binary/ast_to_binary.dart';
+import 'package:kernel/text/ast_to_text.dart';
 
 import '../builder/fixed_type_builder.dart';
 import '../builder/formal_parameter_builder.dart';
@@ -42,6 +27,30 @@
 import '../source/source_library_builder.dart';
 import 'body_builder.dart';
 
+void printNodeOn(Node? node, StringSink sink, {NameSystem? syntheticNames}) {
+  if (node == null) {
+    sink.write("null");
+  } else {
+    syntheticNames ??= new NameSystem();
+    new Printer(sink, syntheticNames: syntheticNames).writeNode(node);
+  }
+}
+
+void printQualifiedNameOn(Member? member, StringSink sink) {
+  if (member == null) {
+    sink.write("null");
+  } else {
+    sink.write(member.enclosingLibrary.importUri);
+    sink.write("::");
+    Class? cls = member.enclosingClass;
+    if (cls != null) {
+      sink.write(cls.name);
+      sink.write("::");
+    }
+    sink.write(member.name.text);
+  }
+}
+
 /// Print the given [component].  Do nothing if it is `null`.  If the
 /// [libraryFilter] is provided, then only libraries that satisfy it are
 /// printed.
@@ -161,9 +170,39 @@
   void close() {}
 }
 
+int compareProcedures(Procedure a, Procedure b) {
+  int i = "${a.fileUri}".compareTo("${b.fileUri}");
+  if (i != 0) return i;
+  return a.fileOffset.compareTo(b.fileOffset);
+}
+
+bool isRedirectingGenerativeConstructorImplementation(Constructor constructor) {
+  List<Initializer> initializers = constructor.initializers;
+  return initializers.length == 1 &&
+      initializers.single is RedirectingInitializer;
+}
+
+List<Combinator>? toKernelCombinators(
+    List<CombinatorBuilder>? fastaCombinators) {
+  if (fastaCombinators == null) {
+    // Note: it's safe to return null here as Kernel's LibraryDependency will
+    // convert null to an empty list.
+    return null;
+  }
+
+  return new List<Combinator>.generate(fastaCombinators.length, (int i) {
+    CombinatorBuilder combinator = fastaCombinators[i];
+    List<String> nameList = combinator.names.toList();
+    return combinator.isShow
+        ? new Combinator.show(nameList)
+        : new Combinator.hide(nameList);
+  }, growable: true);
+}
+
 final Token dummyToken = new SyntheticToken(TokenType.AT, -1);
 final Identifier dummyIdentifier = new Identifier(dummyToken);
-final Combinator dummyCombinator = new Combinator(false, {}, -1, dummyUri);
+final CombinatorBuilder dummyCombinator =
+    new CombinatorBuilder(false, {}, -1, dummyUri);
 final MetadataBuilder dummyMetadataBuilder = new MetadataBuilder(dummyToken);
 final TypeBuilder dummyTypeBuilder =
     new FixedTypeBuilder(dummyDartType, dummyUri, -1);
diff --git a/pkg/front_end/lib/src/fasta/kernel/verifier.dart b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
index efc9de8..7543cd9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/verifier.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
@@ -33,8 +33,8 @@
 
 List<LocatedMessage> verifyComponent(Component component, Target target,
     {bool? isOutline, bool? afterConst, bool skipPlatform: false}) {
-  FastaVerifyingVisitor verifier =
-      new FastaVerifyingVisitor(target, isOutline, afterConst, skipPlatform);
+  FastaVerifyingVisitor verifier = new FastaVerifyingVisitor(target,
+      isOutline: isOutline, afterConst: afterConst, skipPlatform: skipPlatform);
   component.accept(verifier);
   return verifier.errors;
 }
@@ -47,9 +47,13 @@
   final List<TreeNode> treeNodeStack = <TreeNode>[];
   final bool skipPlatform;
 
-  FastaVerifyingVisitor(
-      this.target, bool? isOutline, bool? afterConst, this.skipPlatform)
-      : super(isOutline: isOutline, afterConst: afterConst);
+  FastaVerifyingVisitor(this.target,
+      {bool? isOutline, bool? afterConst, required this.skipPlatform})
+      : super(
+            isOutline: isOutline,
+            afterConst: afterConst,
+            constantsAreAlwaysInlined:
+                target.constantsBackend.alwaysInlineConstants);
 
   /// Invoked by all visit methods if the visited node is a [TreeNode].
   void enterTreeNode(TreeNode node) {
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index 7dedab8..5b07db1 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -4,330 +4,24 @@
 
 library fasta.loader;
 
-import 'dart:collection' show Queue;
-
 import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
 
-import 'package:kernel/ast.dart' show Class, DartType, Library, Version;
-import 'package:package_config/package_config.dart';
-
-import 'scope.dart';
+import 'package:kernel/ast.dart' show Class, DartType;
 
 import 'builder/class_builder.dart';
-import 'builder/declaration_builder.dart';
 import 'builder/library_builder.dart';
-import 'builder/member_builder.dart';
-import 'builder/modifier_builder.dart';
 import 'builder/type_builder.dart';
 
-import 'crash.dart' show firstSourceUri;
-
-import 'kernel/body_builder.dart' show BodyBuilder;
-
-import 'messages.dart'
-    show
-        FormattedMessage,
-        LocatedMessage,
-        Message,
-        noLength,
-        SummaryTemplate,
-        Template,
-        messageLanguageVersionInvalidInDotPackages,
-        messagePlatformPrivateLibraryAccess,
-        templateInternalProblemContextSeverity,
-        templateLanguageVersionTooHigh,
-        templateSourceBodySummary;
-
-import 'problems.dart' show internalProblem, unhandled;
-
-import 'source/source_library_builder.dart' as src
-    show
-        LanguageVersion,
-        InvalidLanguageVersion,
-        ImplicitLanguageVersion,
-        SourceLibraryBuilder;
+import 'messages.dart' show FormattedMessage, LocatedMessage, Message;
 
 import 'target_implementation.dart' show TargetImplementation;
 
-import 'ticker.dart' show Ticker;
-
 const String untranslatableUriScheme = "org-dartlang-untranslatable-uri";
 
 abstract class Loader {
-  final Map<Uri, LibraryBuilder> builders = <Uri, LibraryBuilder>{};
+  TargetImplementation get target;
 
-  final Queue<LibraryBuilder> unparsedLibraries = new Queue<LibraryBuilder>();
-
-  final List<Library> libraries = <Library>[];
-
-  final TargetImplementation target;
-
-  /// List of all handled compile-time errors seen so far by libraries loaded
-  /// by this loader.
-  ///
-  /// A handled error is an error that has been added to the generated AST
-  /// already, for example, as a throw expression.
-  final List<LocatedMessage> handledErrors = <LocatedMessage>[];
-
-  /// List of all unhandled compile-time errors seen so far by libraries loaded
-  /// by this loader.
-  ///
-  /// An unhandled error is an error that hasn't been handled, see
-  /// [handledErrors].
-  final List<LocatedMessage> unhandledErrors = <LocatedMessage>[];
-
-  /// List of all problems seen so far by libraries loaded by this loader that
-  /// does not belong directly to a library.
-  final List<FormattedMessage> allComponentProblems = <FormattedMessage>[];
-
-  final Set<String> seenMessages = new Set<String>();
-  bool _hasSeenError = false;
-
-  void resetSeenMessages() {
-    seenMessages.clear();
-    _hasSeenError = false;
-  }
-
-  /// Returns `true` if a compile time error has been reported.
-  bool get hasSeenError => _hasSeenError;
-
-  LibraryBuilder? _coreLibrary;
-  LibraryBuilder? typedDataLibrary;
-
-  /// The first library that we've been asked to compile. When compiling a
-  /// program (aka script), this is the library that should have a main method.
-  LibraryBuilder? first;
-
-  int byteCount = 0;
-
-  Uri? currentUriForCrashReporting;
-
-  Loader(this.target);
-
-  LibraryBuilder get coreLibrary => _coreLibrary!;
-
-  void set coreLibrary(LibraryBuilder value) {
-    _coreLibrary = value;
-  }
-
-  Ticker get ticker => target.ticker;
-
-  Template<SummaryTemplate> get outlineSummaryTemplate;
-
-  bool get isSourceLoader => false;
-
-  /// Look up a library builder by the name [uri], or if such doesn't
-  /// exist, create one. The canonical URI of the library is [uri], and its
-  /// actual location is [fileUri].
-  ///
-  /// Canonical URIs have schemes like "dart", or "package", and the actual
-  /// location is often a file URI.
-  ///
-  /// The [accessor] is the library that's trying to import, export, or include
-  /// as part [uri], and [charOffset] is the location of the corresponding
-  /// directive. If [accessor] isn't allowed to access [uri], it's a
-  /// compile-time error.
-  LibraryBuilder read(Uri uri, int charOffset,
-      {Uri? fileUri,
-      LibraryBuilder? accessor,
-      LibraryBuilder? origin,
-      Library? referencesFrom,
-      bool? referenceIsPartOwner}) {
-    LibraryBuilder builder = builders.putIfAbsent(uri, () {
-      if (fileUri != null &&
-          (fileUri!.scheme == "dart" ||
-              fileUri!.scheme == "package" ||
-              fileUri!.scheme == "dart-ext")) {
-        fileUri = null;
-      }
-      Package? packageForLanguageVersion;
-      if (fileUri == null) {
-        switch (uri.scheme) {
-          case "package":
-          case "dart":
-            fileUri = target.translateUri(uri) ??
-                new Uri(
-                    scheme: untranslatableUriScheme,
-                    path: Uri.encodeComponent("$uri"));
-            if (uri.scheme == "package") {
-              packageForLanguageVersion = target.uriTranslator.getPackage(uri);
-            } else {
-              packageForLanguageVersion =
-                  target.uriTranslator.packages.packageOf(fileUri!);
-            }
-            break;
-
-          default:
-            fileUri = uri;
-            packageForLanguageVersion =
-                target.uriTranslator.packages.packageOf(fileUri!);
-            break;
-        }
-      } else {
-        packageForLanguageVersion =
-            target.uriTranslator.packages.packageOf(fileUri!);
-      }
-      src.LanguageVersion? packageLanguageVersion;
-      Uri? packageUri;
-      Message? packageLanguageVersionProblem;
-      if (packageForLanguageVersion != null) {
-        Uri importUri = origin?.importUri ?? uri;
-        if (importUri.scheme != 'dart' &&
-            importUri.scheme != 'package' &&
-            // ignore: unnecessary_null_comparison
-            packageForLanguageVersion.name != null) {
-          packageUri =
-              new Uri(scheme: 'package', path: packageForLanguageVersion.name);
-        }
-        if (packageForLanguageVersion.languageVersion != null) {
-          if (packageForLanguageVersion.languageVersion
-              is InvalidLanguageVersion) {
-            packageLanguageVersionProblem =
-                messageLanguageVersionInvalidInDotPackages;
-            packageLanguageVersion = new src.InvalidLanguageVersion(
-                fileUri!, 0, noLength, target.currentSdkVersion, false);
-          } else {
-            Version version = new Version(
-                packageForLanguageVersion.languageVersion!.major,
-                packageForLanguageVersion.languageVersion!.minor);
-            if (version > target.currentSdkVersion) {
-              packageLanguageVersionProblem =
-                  templateLanguageVersionTooHigh.withArguments(
-                      target.currentSdkVersion.major,
-                      target.currentSdkVersion.minor);
-              packageLanguageVersion = new src.InvalidLanguageVersion(
-                  fileUri!, 0, noLength, target.currentSdkVersion, false);
-            } else {
-              packageLanguageVersion = new src.ImplicitLanguageVersion(version);
-            }
-          }
-        }
-      }
-      packageLanguageVersion ??=
-          new src.ImplicitLanguageVersion(target.currentSdkVersion);
-
-      LibraryBuilder? library = target.createLibraryBuilder(
-          uri,
-          fileUri!,
-          packageUri,
-          packageLanguageVersion,
-          origin,
-          referencesFrom,
-          referenceIsPartOwner);
-      if (library == null) {
-        throw new StateError("createLibraryBuilder for uri $uri, "
-            "fileUri $fileUri returned null.");
-      }
-      if (packageLanguageVersionProblem != null &&
-          library is src.SourceLibraryBuilder) {
-        library.addPostponedProblem(
-            packageLanguageVersionProblem, 0, noLength, library.fileUri);
-      }
-
-      if (uri.scheme == "dart") {
-        if (uri.path == "core") {
-          _coreLibrary = library;
-        } else if (uri.path == "typed_data") {
-          typedDataLibrary = library;
-        }
-      }
-      if (library.loader != this) {
-        if (_coreLibrary == library) {
-          target.loadExtraRequiredLibraries(this);
-        }
-        // This library isn't owned by this loader, so no further processing
-        // should be attempted.
-        return library;
-      }
-
-      {
-        // Add any additional logic after this block. Setting the
-        // firstSourceUri and first library should be done as early as
-        // possible.
-        firstSourceUri ??= uri;
-        first ??= library;
-      }
-      if (_coreLibrary == library) {
-        target.loadExtraRequiredLibraries(this);
-      }
-      Uri libraryUri = origin?.importUri ?? uri;
-      if (target.backendTarget.mayDefineRestrictedType(libraryUri)) {
-        library.mayImplementRestrictedTypes = true;
-      }
-      if (uri.scheme == "dart") {
-        target.readPatchFiles(library);
-      }
-      unparsedLibraries.addLast(library);
-      return library;
-    });
-    if (accessor == null) {
-      if (builder.loader == this && first != builder && isSourceLoader) {
-        unhandled("null", "accessor", charOffset, uri);
-      }
-    } else {
-      builder.recordAccess(charOffset, noLength, accessor.fileUri);
-      if (!accessor.isPatch &&
-          !accessor.isPart &&
-          !target.backendTarget
-              .allowPlatformPrivateLibraryAccess(accessor.importUri, uri)) {
-        accessor.addProblem(messagePlatformPrivateLibraryAccess, charOffset,
-            noLength, accessor.fileUri);
-      }
-    }
-    return builder;
-  }
-
-  void ensureCoreLibrary() {
-    if (_coreLibrary == null) {
-      read(Uri.parse("dart:core"), 0, accessor: first);
-      // TODO(askesc): When all backends support set literals, we no longer
-      // need to index dart:collection, as it is only needed for desugaring of
-      // const sets. We can remove it from this list at that time.
-      read(Uri.parse("dart:collection"), 0, accessor: first);
-      assert(_coreLibrary != null);
-    }
-  }
-
-  Future<Null> buildBodies() async {
-    assert(_coreLibrary != null);
-    for (LibraryBuilder library in builders.values) {
-      if (library.loader == this) {
-        currentUriForCrashReporting = library.importUri;
-        await buildBody(library);
-      }
-    }
-    currentUriForCrashReporting = null;
-    logSummary(templateSourceBodySummary);
-  }
-
-  Future<Null> buildOutlines() async {
-    ensureCoreLibrary();
-    while (unparsedLibraries.isNotEmpty) {
-      LibraryBuilder library = unparsedLibraries.removeFirst();
-      currentUriForCrashReporting = library.importUri;
-      await buildOutline(library);
-    }
-    currentUriForCrashReporting = null;
-    logSummary(outlineSummaryTemplate);
-  }
-
-  void logSummary(Template<SummaryTemplate> template) {
-    ticker.log((Duration elapsed, Duration sinceStart) {
-      int libraryCount = 0;
-      for (LibraryBuilder library in builders.values) {
-        if (library.loader == this) libraryCount++;
-      }
-      double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond;
-      Message message = template.withArguments(
-          libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount);
-      print("$sinceStart: ${message.message}");
-    });
-  }
-
-  Future<Null> buildOutline(covariant LibraryBuilder library);
-
-  /// Builds all the method bodies found in the given [library].
-  Future<Null> buildBody(covariant LibraryBuilder library);
+  Map<Uri, LibraryBuilder> get builders;
 
   /// Register [message] as a problem with a severity determined by the
   /// intrinsic severity of the message.
@@ -337,94 +31,11 @@
       List<LocatedMessage>? context,
       Severity? severity,
       bool problemOnLibrary: false,
-      List<Uri>? involvedFiles}) {
-    return addMessage(message, charOffset, length, fileUri, severity,
-        wasHandled: wasHandled,
-        context: context,
-        problemOnLibrary: problemOnLibrary,
-        involvedFiles: involvedFiles);
-  }
-
-  /// All messages reported by the compiler (errors, warnings, etc.) are routed
-  /// through this method.
-  ///
-  /// Returns a FormattedMessage if the message is new, that is, not previously
-  /// reported. This is important as some parser errors may be reported up to
-  /// three times by `OutlineBuilder`, `DietListener`, and `BodyBuilder`.
-  /// If the message is not new, [null] is reported.
-  ///
-  /// If [severity] is `Severity.error`, the message is added to
-  /// [handledErrors] if [wasHandled] is true or to [unhandledErrors] if
-  /// [wasHandled] is false.
-  FormattedMessage? addMessage(Message message, int charOffset, int length,
-      Uri? fileUri, Severity? severity,
-      {bool wasHandled: false,
-      List<LocatedMessage>? context,
-      bool problemOnLibrary: false,
-      List<Uri>? involvedFiles}) {
-    severity ??= message.code.severity;
-    if (severity == Severity.ignored) return null;
-    String trace = """
-message: ${message.message}
-charOffset: $charOffset
-fileUri: $fileUri
-severity: $severity
-""";
-    if (!seenMessages.add(trace)) return null;
-    if (message.code.severity == Severity.error) {
-      _hasSeenError = true;
-    }
-    if (message.code.severity == Severity.context) {
-      internalProblem(
-          templateInternalProblemContextSeverity
-              .withArguments(message.code.name),
-          charOffset,
-          fileUri);
-    }
-    target.context.report(
-        fileUri != null
-            ? message.withLocation(fileUri, charOffset, length)
-            : message.withoutLocation(),
-        severity,
-        context: context,
-        involvedFiles: involvedFiles);
-    if (severity == Severity.error) {
-      (wasHandled ? handledErrors : unhandledErrors).add(fileUri != null
-          ? message.withLocation(fileUri, charOffset, length)
-          : message.withoutLocation());
-    }
-    FormattedMessage formattedMessage = target.createFormattedMessage(
-        message, charOffset, length, fileUri, context, severity,
-        involvedFiles: involvedFiles);
-    if (!problemOnLibrary) {
-      allComponentProblems.add(formattedMessage);
-    }
-    return formattedMessage;
-  }
-
-  MemberBuilder getAbstractClassInstantiationError() {
-    return target.getAbstractClassInstantiationError(this);
-  }
-
-  MemberBuilder getCompileTimeError() => target.getCompileTimeError(this);
-
-  MemberBuilder getDuplicatedFieldInitializerError() {
-    return target.getDuplicatedFieldInitializerError(this);
-  }
-
-  MemberBuilder getNativeAnnotation() => target.getNativeAnnotation(this);
+      List<Uri>? involvedFiles});
 
   ClassBuilder computeClassBuilderFromTargetClass(Class cls);
 
   TypeBuilder computeTypeBuilder(DartType type);
 
-  BodyBuilder createBodyBuilderForOutlineExpression(
-      src.SourceLibraryBuilder library,
-      DeclarationBuilder? declarationBuilder,
-      ModifierBuilder member,
-      Scope scope,
-      Uri fileUri) {
-    return new BodyBuilder.forOutlineExpression(
-        library, declarationBuilder, member, scope, fileUri);
-  }
+  LibraryBuilder get coreLibrary;
 }
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index f6e9a39..db65cb2 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -519,6 +519,9 @@
     scope._local.forEach(mergeMember);
     map = _setters;
     scope._setters.forEach(mergeMember);
+    if (scope._extensions != null) {
+      (_extensions ??= {}).addAll(scope._extensions!);
+    }
   }
 
   void forEach(f(String name, Builder member)) {
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 fb22647..2a08cd3 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -862,6 +862,12 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token? identifier) {
+    debugEvent("");
+    // Do nothing
+  }
+
+  @override
   void beginClassOrMixinBody(DeclarationKind kind, Token token) {
     assert(checkState(token, [
       ValueKinds.Token,
@@ -928,7 +934,7 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     debugEvent("endExtensionDeclaration");
     checkEmpty(extensionKeyword.charOffset);
   }
diff --git a/pkg/front_end/lib/src/fasta/source/name_scheme.dart b/pkg/front_end/lib/src/fasta/source/name_scheme.dart
new file mode 100644
index 0000000..65bcfe7
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/source/name_scheme.dart
@@ -0,0 +1,137 @@
+// 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.
+
+import 'package:kernel/ast.dart';
+
+import '../kernel/late_lowering.dart' as late_lowering;
+
+enum FieldNameType { Field, Getter, Setter, IsSetField }
+
+class NameScheme {
+  final bool isInstanceMember;
+  final String? className;
+  final bool isExtensionMember;
+  final String? extensionName;
+  final Reference? libraryReference;
+
+  NameScheme(
+      {required this.isInstanceMember,
+      required this.className,
+      required this.isExtensionMember,
+      required this.extensionName,
+      required this.libraryReference})
+      // ignore: unnecessary_null_comparison
+      : assert(isInstanceMember != null),
+        // ignore: unnecessary_null_comparison
+        assert(isExtensionMember != null),
+        // ignore: unnecessary_null_comparison
+        assert(!isExtensionMember || extensionName != null),
+        // ignore: unnecessary_null_comparison
+        assert(libraryReference != null);
+
+  bool get isStatic => !isInstanceMember;
+
+  Name getFieldName(FieldNameType type, String name,
+      {required bool isSynthesized}) {
+    // ignore: unnecessary_null_comparison
+    assert(isSynthesized != null);
+    String text = createFieldName(type, name,
+        isInstanceMember: isInstanceMember,
+        className: className,
+        isExtensionMethod: isExtensionMember,
+        extensionName: extensionName,
+        isSynthesized: isSynthesized);
+    return new Name.byReference(text, libraryReference);
+  }
+
+  static String createFieldName(FieldNameType type, String name,
+      {required bool isInstanceMember,
+      required String? className,
+      bool isExtensionMethod: false,
+      String? extensionName,
+      bool isSynthesized: false}) {
+    assert(isSynthesized || type == FieldNameType.Field,
+        "Unexpected field name type for non-synthesized field: $type");
+    // ignore: unnecessary_null_comparison
+    assert(isExtensionMethod || isInstanceMember != null,
+        "`isInstanceMember` is null for class member.");
+    assert(!(isExtensionMethod && extensionName == null),
+        "No extension name provided for extension member.");
+    // ignore: unnecessary_null_comparison
+    assert(isInstanceMember == null || !(isInstanceMember && className == null),
+        "No class name provided for instance member.");
+    String baseName;
+    if (!isExtensionMethod) {
+      baseName = name;
+    } else {
+      baseName = "${extensionName}|${name}";
+    }
+
+    if (!isSynthesized) {
+      return baseName;
+    } else {
+      String namePrefix = late_lowering.lateFieldPrefix;
+      if (isInstanceMember) {
+        namePrefix = '$namePrefix${className}#';
+      }
+      switch (type) {
+        case FieldNameType.Field:
+          return "$namePrefix$baseName";
+        case FieldNameType.Getter:
+          return baseName;
+        case FieldNameType.Setter:
+          return baseName;
+        case FieldNameType.IsSetField:
+          return "$namePrefix$baseName${late_lowering.lateIsSetSuffix}";
+      }
+    }
+  }
+
+  Name getProcedureName(ProcedureKind kind, String name) {
+    // ignore: unnecessary_null_comparison
+    assert(kind != null);
+    return new Name.byReference(
+        createProcedureName(
+            isExtensionMethod: isExtensionMember,
+            isStatic: isStatic,
+            kind: kind,
+            extensionName: extensionName,
+            name: name),
+        libraryReference);
+  }
+
+  static String createProcedureName(
+      {required bool isExtensionMethod,
+      required bool isStatic,
+      required ProcedureKind kind,
+      String? extensionName,
+      required String name}) {
+    if (isExtensionMethod) {
+      assert(extensionName != null);
+      String kindInfix = '';
+      if (!isStatic) {
+        // Instance getter and setter are converted to methods so we use an
+        // infix to make their names unique.
+        switch (kind) {
+          case ProcedureKind.Getter:
+            kindInfix = 'get#';
+            break;
+          case ProcedureKind.Setter:
+            kindInfix = 'set#';
+            break;
+          case ProcedureKind.Method:
+          case ProcedureKind.Operator:
+            kindInfix = '';
+            break;
+          case ProcedureKind.Factory:
+            throw new UnsupportedError(
+                'Unexpected extension method kind ${kind}');
+        }
+      }
+      return '${extensionName}|${kindInfix}${name}';
+    } else {
+      return name;
+    }
+  }
+}
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 c1ac2cf..0a838d9 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -41,7 +41,7 @@
 import '../builder/type_variable_builder.dart';
 import '../builder/unresolved_type.dart';
 
-import '../combinator.dart' show Combinator;
+import '../combinator.dart' show CombinatorBuilder;
 
 import '../configuration.dart' show Configuration;
 
@@ -182,7 +182,7 @@
     if (names is ParserRecovery) {
       push(names);
     } else {
-      push(new Combinator.hide(names as Iterable<String>,
+      push(new CombinatorBuilder.hide(names as Iterable<String>,
           hideKeyword.charOffset, libraryBuilder.fileUri));
     }
   }
@@ -194,7 +194,7 @@
     if (names is ParserRecovery) {
       push(names);
     } else {
-      push(new Combinator.show(names as Iterable<String>,
+      push(new CombinatorBuilder.show(names as Iterable<String>,
           showKeyword.charOffset, libraryBuilder.fileUri));
     }
   }
@@ -202,7 +202,7 @@
   @override
   void endCombinators(int count) {
     debugEvent("Combinators");
-    push(const FixedNullableList<Combinator>()
+    push(const FixedNullableList<CombinatorBuilder>()
             .popNonNullable(stack, count, dummyCombinator) ??
         NullValue.Combinators);
   }
@@ -210,7 +210,7 @@
   @override
   void endExport(Token exportKeyword, Token semicolon) {
     debugEvent("Export");
-    List<Combinator>? combinators = pop() as List<Combinator>?;
+    List<CombinatorBuilder>? combinators = pop() as List<CombinatorBuilder>?;
     List<Configuration>? configurations = pop() as List<Configuration>?;
     int uriOffset = popCharOffset();
     String uri = pop() as String;
@@ -235,7 +235,7 @@
   @override
   void endImport(Token importKeyword, Token? semicolon) {
     debugEvent("EndImport");
-    List<Combinator>? combinators = pop() as List<Combinator>?;
+    List<CombinatorBuilder>? combinators = pop() as List<CombinatorBuilder>?;
     bool isDeferred = pop() as bool;
     int prefixOffset = popCharOffset();
     Object? prefix = pop(NullValue.Prefix);
@@ -328,6 +328,30 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    debugEvent("ShowHideIdentifier");
+
+    assert(modifier == null ||
+        modifier.stringValue! == "get" ||
+        modifier.stringValue! == "set" ||
+        modifier.stringValue! == "operator");
+
+    if (modifier == null) {
+      handleIdentifier(
+          identifier, IdentifierContext.extensionShowHideElementMemberOrType);
+    } else if (modifier.stringValue! == "get") {
+      handleIdentifier(
+          identifier, IdentifierContext.extensionShowHideElementGetter);
+    } else if (modifier.stringValue! == "set") {
+      handleIdentifier(
+          identifier, IdentifierContext.extensionShowHideElementSetter);
+    } else if (modifier.stringValue! == "operator") {
+      handleIdentifier(
+          identifier, IdentifierContext.extensionShowHideElementOperator);
+    }
+  }
+
+  @override
   void handleIdentifier(Token token, IdentifierContext context) {
     if (context == IdentifierContext.enumValueDeclaration) {
       debugEvent("handleIdentifier");
@@ -337,6 +361,16 @@
       } else {
         push(new EnumConstantInfo(metadata, token.lexeme, token.charOffset));
       }
+    } else if (context == IdentifierContext.extensionShowHideElementGetter ||
+        context == IdentifierContext.extensionShowHideElementMemberOrType ||
+        context == IdentifierContext.extensionShowHideElementSetter) {
+      push(context);
+      super.handleIdentifier(token, context);
+      push(token.charOffset);
+    } else if (context == IdentifierContext.extensionShowHideElementOperator) {
+      push(context);
+      push(operatorFromString(token.stringValue!));
+      push(token.charOffset);
     } else {
       super.handleIdentifier(token, context);
       push(token.charOffset);
@@ -492,9 +526,22 @@
   void beginClassOrMixinBody(DeclarationKind kind, Token token) {
     if (kind == DeclarationKind.Extension) {
       assert(checkState(token, [
+        /* hide type elements = */ ValueKinds.TypeBuilderListOrNull,
+        /* hide get elements = */ ValueKinds.NameListOrNull,
+        /* hide member or type elements = */ ValueKinds.NameListOrNull,
+        /* hide set elements = */ ValueKinds.NameListOrNull,
+        /* hide operator elements = */ ValueKinds.OperatorListOrNull,
+        /* show type elements = */ ValueKinds.TypeBuilderListOrNull,
+        /* show get elements = */ ValueKinds.NameListOrNull,
+        /* show member or type elements = */ ValueKinds.NameListOrNull,
+        /* show set elements */ ValueKinds.NameListOrNull,
+        /* show operator elements*/ ValueKinds.OperatorListOrNull,
         unionOfKinds([ValueKinds.ParserRecovery, ValueKinds.TypeBuilder])
       ]));
-      Object? extensionThisType = peek();
+
+      // We peek into 10th frame on the stack for the extension 'this' type.
+      Object? extensionThisType = stack[10];
+
       if (extensionThisType is TypeBuilder) {
         libraryBuilder.currentTypeParameterScopeBuilder
             .registerExtensionThisType(extensionThisType);
@@ -533,6 +580,75 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    debugEvent("ExtensionShow");
+
+    List<dynamic> toBePushed = <dynamic>[];
+    void handleShowHideElements(int elementCount) {
+      if (elementCount == 0) {
+        toBePushed.add(NullValue.TypeBuilderList);
+        toBePushed.add(NullValue.IdentifierList);
+        toBePushed.add(NullValue.IdentifierList);
+        toBePushed.add(NullValue.IdentifierList);
+        toBePushed.add(NullValue.OperatorList);
+      } else {
+        List<TypeBuilder> typeElements = <TypeBuilder>[];
+        List<String> getElements = <String>[];
+        List<String> ambiguousMemberOrTypeElements = <String>[];
+        List<String> setElements = <String>[];
+        List<Operator> operatorElements = <Operator>[];
+
+        for (int i = 0; i < elementCount; ++i) {
+          Object leadingElementPart = pop()!;
+          if (leadingElementPart is TypeBuilder) {
+            typeElements.add(leadingElementPart);
+          } else {
+            leadingElementPart as int; // Offset.
+            Object name = pop()!;
+            IdentifierContext context = pop() as IdentifierContext;
+
+            if (name is! ParserRecovery) {
+              assert(context ==
+                      IdentifierContext.extensionShowHideElementGetter ||
+                  context ==
+                      IdentifierContext.extensionShowHideElementMemberOrType ||
+                  context ==
+                      IdentifierContext.extensionShowHideElementOperator ||
+                  context == IdentifierContext.extensionShowHideElementSetter);
+
+              if (context == IdentifierContext.extensionShowHideElementGetter) {
+                getElements.add(name as String);
+              } else if (context ==
+                  IdentifierContext.extensionShowHideElementMemberOrType) {
+                ambiguousMemberOrTypeElements.add(name as String);
+              } else if (context ==
+                  IdentifierContext.extensionShowHideElementOperator) {
+                operatorElements.add(name as Operator);
+              } else if (context ==
+                  IdentifierContext.extensionShowHideElementSetter) {
+                setElements.add(name as String);
+              }
+            }
+          }
+        }
+
+        toBePushed.add(typeElements);
+        toBePushed.add(getElements);
+        toBePushed.add(ambiguousMemberOrTypeElements);
+        toBePushed.add(setElements);
+        toBePushed.add(operatorElements);
+      }
+    }
+
+    handleShowHideElements(hideElementCount);
+    handleShowHideElements(showElementCount);
+    for (int i = toBePushed.length - 1; i >= 0; --i) {
+      push(toBePushed[i]);
+    }
+  }
+
+  @override
   void handleRecoverClassHeader() {
     debugEvent("handleRecoverClassHeader");
     // TODO(jensj): Possibly use these instead... E.g. "class A extend B {}"
@@ -774,8 +890,18 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     assert(checkState(extensionKeyword, [
+      /* hide type elements = */ ValueKinds.TypeBuilderListOrNull,
+      /* hide get elements = */ ValueKinds.NameListOrNull,
+      /* hide member or type elements = */ ValueKinds.NameListOrNull,
+      /* hide set elements = */ ValueKinds.NameListOrNull,
+      /* hide operator elements = */ ValueKinds.OperatorListOrNull,
+      /* show type elements = */ ValueKinds.TypeBuilderListOrNull,
+      /* show get elements = */ ValueKinds.NameListOrNull,
+      /* show member or type elements = */ ValueKinds.NameListOrNull,
+      /* show set elements = */ ValueKinds.NameListOrNull,
+      /* show operator elements = */ ValueKinds.OperatorListOrNull,
       unionOfKinds([ValueKinds.ParserRecovery, ValueKinds.TypeBuilder]),
       ValueKinds.TypeVariableListOrNull,
       ValueKinds.Integer,
@@ -783,6 +909,39 @@
       ValueKinds.MetadataListOrNull
     ]));
     debugEvent("endExtensionDeclaration");
+
+    List<TypeBuilder>? hiddenSupertypes = pop() as List<TypeBuilder>?;
+    List<String>? hiddenGetters = pop() as List<String>?;
+    List<String>? hiddenMembersOrTypes = pop() as List<String>?;
+    List<String>? hiddenSetters = pop() as List<String>?;
+    List<Operator>? hiddenOperators = pop() as List<Operator>?;
+
+    List<TypeBuilder>? shownSupertypes = pop() as List<TypeBuilder>?;
+    List<String>? shownGetters = pop() as List<String>?;
+    List<String>? shownMembersOrTypes = pop() as List<String>?;
+    List<String>? shownSetters = pop() as List<String>?;
+    List<Operator>? shownOperators = pop() as List<Operator>?;
+
+    ExtensionTypeShowHideClauseBuilder extensionTypeShowHideClauseBuilder =
+        new ExtensionTypeShowHideClauseBuilder(
+            shownSupertypes: shownSupertypes ?? const <TypeBuilder>[],
+            shownGetters: shownGetters ?? const <String>[],
+            shownSetters: shownSetters ?? const <String>[],
+            shownMembersOrTypes: shownMembersOrTypes ?? const <String>[],
+            shownOperators: shownOperators ?? const <Operator>[],
+            hiddenSupertypes: hiddenSupertypes ?? const <TypeBuilder>[],
+            hiddenGetters: hiddenGetters ?? const <String>[],
+            hiddenSetters: hiddenSetters ?? const <String>[],
+            hiddenMembersOrTypes: hiddenMembersOrTypes ?? const <String>[],
+            hiddenOperators: hiddenOperators ?? const <Operator>[]);
+
+    if (showKeyword != null && !libraryBuilder.enableExtensionTypesInLibrary) {
+      addProblem(
+          templateExperimentNotEnabled.withArguments('extension-types',
+              libraryBuilder.enableExtensionTypesVersionInLibrary.toText()),
+          showKeyword.charOffset,
+          showKeyword.length);
+    }
     Object? onType = pop();
     if (onType is ParserRecovery) {
       ParserRecovery parserRecovery = onType;
@@ -819,6 +978,7 @@
         name,
         typeVariables,
         onType as TypeBuilder,
+        extensionTypeShowHideClauseBuilder,
         isExtensionTypeDeclaration,
         startOffset,
         nameOffset,
diff --git a/pkg/front_end/lib/src/fasta/source/scope_listener.dart b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
index 21c67fe..221222f 100644
--- a/pkg/front_end/lib/src/fasta/source/scope_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
@@ -15,9 +15,6 @@
 import 'stack_listener_impl.dart';
 import 'value_kinds.dart';
 
-export 'package:_fe_analyzer_shared/src/parser/stack_listener.dart'
-    show FixedNullableList, GrowableList, NullValue, ParserRecovery;
-
 enum JumpTargetKind {
   Break,
   Continue,
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index 0809082..448fe67 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -37,11 +37,10 @@
 import '../fasta_codes.dart';
 
 import '../kernel/combined_member_signature.dart';
-import '../kernel/kernel_builder.dart' show compareProcedures;
 import '../kernel/kernel_target.dart' show KernelTarget;
 import '../kernel/redirecting_factory_body.dart' show redirectingName;
-import '../kernel/type_algorithms.dart'
-    show Variance, computeTypeVariableBuilderVariance;
+import '../kernel/type_algorithms.dart' show computeTypeVariableBuilderVariance;
+import '../kernel/utils.dart' show compareProcedures;
 
 import '../names.dart' show equalsName, noSuchMethodName;
 
@@ -353,7 +352,7 @@
       }
       if (fieldBuilder.isClassInstanceMember &&
           fieldBuilder.isAssignable &&
-          !fieldBuilder.isCovariant) {
+          !fieldBuilder.isCovariantByDeclaration) {
         fieldVariance = Variance.combine(Variance.contravariant, fieldVariance);
         reportVariancePositionIfInvalid(fieldVariance, typeParameter,
             fieldBuilder.fileUri, fieldBuilder.charOffset);
@@ -385,7 +384,7 @@
     // ignore: unnecessary_null_comparison
     if (positionalParameters != null) {
       for (VariableDeclaration formal in positionalParameters) {
-        if (!formal.isCovariant) {
+        if (!formal.isCovariantByDeclaration) {
           for (TypeParameter typeParameter in typeParameters) {
             int formalVariance = Variance.combine(Variance.contravariant,
                 computeVariance(typeParameter, formal.type));
@@ -865,8 +864,11 @@
     procedure.stubTarget = null;
   }
 
-  void _addRedirectingConstructor(SourceFactoryBuilder constructorBuilder,
-      SourceLibraryBuilder library, Reference? getterReference) {
+  void _addRedirectingConstructor(
+      SourceFactoryBuilder constructorBuilder,
+      SourceLibraryBuilder library,
+      Reference? fieldReference,
+      Reference? getterReference) {
     // Add a new synthetic field to this class for representing factory
     // constructors. This is used to support resolving such constructors in
     // source code.
@@ -889,6 +891,7 @@
           isFinal: true,
           initializer: literal,
           fileUri: cls.fileUri,
+          fieldReference: fieldReference,
           getterReference: getterReference)
         ..fileOffset = cls.fileOffset;
       cls.addField(field);
@@ -931,11 +934,18 @@
                 // is actually in the kernel tree. This call creates a StaticGet
                 // to [declaration.target] in a field `_redirecting#` which is
                 // only legal to do to things in the kernel tree.
-                Reference? getterReference =
-                    referencesFromIndexed?.lookupGetterReference(new Name(
-                        "_redirecting#", referencesFromIndexed!.library));
+                Reference? fieldReference;
+                Reference? getterReference;
+                if (referencesFromIndexed != null) {
+                  Name name =
+                      new Name(redirectingName, referencesFromIndexed!.library);
+                  fieldReference =
+                      referencesFromIndexed!.lookupFieldReference(name);
+                  getterReference =
+                      referencesFromIndexed!.lookupGetterReference(name);
+                }
                 _addRedirectingConstructor(
-                    declaration, library, getterReference);
+                    declaration, library, fieldReference, getterReference);
               }
               Member? targetNode;
               if (targetBuilder is FunctionBuilder) {
@@ -1285,7 +1295,7 @@
       for (int i = 0; i < declaredFunction.typeParameters.length; ++i) {
         TypeParameter declaredParameter = declaredFunction.typeParameters[i];
         TypeParameter interfaceParameter = interfaceFunction!.typeParameters[i];
-        if (!interfaceParameter.isGenericCovariantImpl) {
+        if (!interfaceParameter.isCovariantByClass) {
           DartType declaredBound = declaredParameter.bound;
           DartType interfaceBound = interfaceParameter.bound;
           if (interfaceSubstitution != null) {
@@ -1359,7 +1369,7 @@
       Member interfaceMemberOrigin,
       DartType declaredType,
       DartType interfaceType,
-      bool isCovariant,
+      bool isCovariantByDeclaration,
       VariableDeclaration? declaredParameter,
       bool isInterfaceCheck,
       bool declaredNeedsLegacyErasure,
@@ -1386,7 +1396,7 @@
     if (types.isSubtypeOf(
         subtype, supertype, SubtypeCheckMode.withNullabilities)) {
       // No problem--the proper subtyping relation is satisfied.
-    } else if (isCovariant &&
+    } else if (isCovariantByDeclaration &&
         types.isSubtypeOf(
             supertype, subtype, SubtypeCheckMode.withNullabilities)) {
       // No problem--the overriding parameter is marked "covariant" and has
@@ -1398,7 +1408,7 @@
       // Report an error.
       bool isErrorInNnbdOptedOutMode = !types.isSubtypeOf(
               subtype, supertype, SubtypeCheckMode.ignoringNullabilities) &&
-          (!isCovariant ||
+          (!isCovariantByDeclaration ||
               !types.isSubtypeOf(
                   supertype, subtype, SubtypeCheckMode.ignoringNullabilities));
       if (isErrorInNnbdOptedOutMode || library.isNonNullableByDefault) {
@@ -1493,8 +1503,8 @@
         interfaceMemberOrigin,
         declaredFunction.returnType,
         interfaceFunction.returnType,
-        false,
-        null,
+        /* isCovariantByDeclaration = */ false,
+        /* declaredParameter = */ null,
         isInterfaceCheck,
         declaredNeedsLegacyErasure);
     if (declaredFunction.positionalParameters.length <
@@ -1563,11 +1573,12 @@
           interfaceMemberOrigin,
           declaredParameter.type,
           interfaceParameter.type,
-          declaredParameter.isCovariant || interfaceParameter.isCovariant,
+          declaredParameter.isCovariantByDeclaration ||
+              interfaceParameter.isCovariantByDeclaration,
           declaredParameter,
           isInterfaceCheck,
           declaredNeedsLegacyErasure);
-      if (declaredParameter.isCovariant) seenCovariant = true;
+      if (declaredParameter.isCovariantByDeclaration) seenCovariant = true;
     }
     if (declaredFunction.namedParameters.isEmpty &&
         interfaceFunction.namedParameters.isEmpty) {
@@ -1643,7 +1654,7 @@
           interfaceMemberOrigin,
           declaredParameter.type,
           interfaceNamedParameters.current.type,
-          declaredParameter.isCovariant,
+          declaredParameter.isCovariantByDeclaration,
           declaredParameter,
           isInterfaceCheck,
           declaredNeedsLegacyErasure);
@@ -1670,7 +1681,7 @@
                       interfaceMemberOrigin.fileOffset, noLength)
             ]);
       }
-      if (declaredParameter.isCovariant) seenCovariant = true;
+      if (declaredParameter.isCovariantByDeclaration) seenCovariant = true;
     }
     return seenCovariant;
   }
@@ -1709,7 +1720,7 @@
         interfaceMemberOrigin,
         declaredType,
         interfaceType,
-        /* isCovariant = */ false,
+        /* isCovariantByDeclaration = */ false,
         /* declaredParameter = */ null,
         isInterfaceCheck,
         declaredNeedsLegacyErasure);
@@ -1745,12 +1756,13 @@
     DartType interfaceType = interfaceMember.setterType;
     VariableDeclaration? declaredParameter =
         declaredMember.function?.positionalParameters.elementAt(0);
-    bool isCovariant = declaredParameter?.isCovariant ?? false;
-    if (!isCovariant && declaredMember is Field) {
-      isCovariant = declaredMember.isCovariant;
+    bool isCovariantByDeclaration =
+        declaredParameter?.isCovariantByDeclaration ?? false;
+    if (!isCovariantByDeclaration && declaredMember is Field) {
+      isCovariantByDeclaration = declaredMember.isCovariantByDeclaration;
     }
-    if (!isCovariant && interfaceMember is Field) {
-      isCovariant = interfaceMember.isCovariant;
+    if (!isCovariantByDeclaration && interfaceMember is Field) {
+      isCovariantByDeclaration = interfaceMember.isCovariantByDeclaration;
     }
     _checkTypes(
         types,
@@ -1761,12 +1773,12 @@
         interfaceMemberOrigin,
         declaredType,
         interfaceType,
-        isCovariant,
+        isCovariantByDeclaration,
         declaredParameter,
         isInterfaceCheck,
         declaredNeedsLegacyErasure,
         asIfDeclaredParameter: true);
-    return isCovariant;
+    return isCovariantByDeclaration;
   }
 
   // When the overriding member is inherited, report the class containing
diff --git a/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart b/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart
index d528324..4760e58 100644
--- a/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_extension_builder.dart
@@ -28,6 +28,8 @@
 
 import '../kernel/kernel_helper.dart';
 
+import '../operator.dart';
+
 import '../problems.dart';
 
 import '../scope.dart';
@@ -50,12 +52,15 @@
   @override
   final TypeBuilder onType;
 
+  final ExtensionTypeShowHideClauseBuilder extensionTypeShowHideClauseBuilder;
+
   SourceExtensionBuilder(
       List<MetadataBuilder>? metadata,
       int modifiers,
       String name,
       this.typeParameters,
       this.onType,
+      this.extensionTypeShowHideClauseBuilder,
       Scope scope,
       SourceLibraryBuilder parent,
       bool isExtensionTypeDeclaration,
@@ -93,6 +98,10 @@
   Extension build(
       SourceLibraryBuilder libraryBuilder, LibraryBuilder coreLibrary,
       {required bool addMembersToLibrary}) {
+    _extension.onType = onType.build(libraryBuilder);
+    extensionTypeShowHideClauseBuilder.buildAndStoreTypes(
+        _extension, libraryBuilder);
+
     SourceLibraryBuilder.checkMemberConflicts(library, scope,
         checkForInstanceVsStaticConflict: true,
         checkForMethodVsSetterConflict: true);
@@ -166,7 +175,7 @@
               Reference memberReference;
               if (member is Field) {
                 libraryBuilder.library.addField(member);
-                memberReference = member.getterReference;
+                memberReference = member.fieldReference;
               } else if (member is Procedure) {
                 libraryBuilder.library.addProcedure(member);
                 memberReference = member.reference;
@@ -191,8 +200,6 @@
 
     scope.forEach(buildBuilders);
 
-    _extension.onType = onType.build(libraryBuilder);
-
     return _extension;
   }
 
@@ -296,3 +303,45 @@
     scope.forEach(build);
   }
 }
+
+class ExtensionTypeShowHideClauseBuilder {
+  final List<TypeBuilder> shownSupertypes;
+  final List<String> shownGetters;
+  final List<String> shownSetters;
+  final List<String> shownMembersOrTypes;
+  final List<Operator> shownOperators;
+
+  final List<TypeBuilder> hiddenSupertypes;
+  final List<String> hiddenGetters;
+  final List<String> hiddenSetters;
+  final List<String> hiddenMembersOrTypes;
+  final List<Operator> hiddenOperators;
+
+  ExtensionTypeShowHideClauseBuilder(
+      {required this.shownSupertypes,
+      required this.shownGetters,
+      required this.shownSetters,
+      required this.shownMembersOrTypes,
+      required this.shownOperators,
+      required this.hiddenSupertypes,
+      required this.hiddenGetters,
+      required this.hiddenSetters,
+      required this.hiddenMembersOrTypes,
+      required this.hiddenOperators});
+
+  void buildAndStoreTypes(Extension extension, LibraryBuilder libraryBuilder) {
+    List<Supertype> builtShownSupertypes = shownSupertypes
+        .map(
+            (t) => t.buildSupertype(libraryBuilder, t.charOffset!, t.fileUri!)!)
+        .toList();
+    List<Supertype> builtHiddenSupertypes = hiddenSupertypes
+        .map(
+            (t) => t.buildSupertype(libraryBuilder, t.charOffset!, t.fileUri!)!)
+        .toList();
+    ExtensionTypeShowHideClause showHideClause =
+        extension.showHideClause ?? new ExtensionTypeShowHideClause();
+    showHideClause.shownSupertypes.addAll(builtShownSupertypes);
+    showHideClause.hiddenSupertypes.addAll(builtHiddenSupertypes);
+    extension.showHideClause ??= showHideClause;
+  }
+}
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 3cf100e..dbecaaa 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
@@ -67,7 +67,7 @@
 import '../builder/unresolved_type.dart';
 import '../builder/void_type_declaration_builder.dart';
 
-import '../combinator.dart' show Combinator;
+import '../combinator.dart' show CombinatorBuilder;
 
 import '../configuration.dart' show Configuration;
 
@@ -81,15 +81,10 @@
 
 import '../import.dart' show Import;
 
+import '../kernel/class_hierarchy_builder.dart';
+import '../kernel/implicit_field_type.dart';
 import '../kernel/internal_ast.dart';
-
-import '../kernel/kernel_builder.dart'
-    show
-        ImplicitFieldType,
-        LoadLibraryBuilder,
-        compareProcedures,
-        toKernelCombinators;
-
+import '../kernel/load_library_builder.dart';
 import '../kernel/type_algorithms.dart'
     show
         NonSimplicityIssue,
@@ -100,6 +95,7 @@
         getNonSimplicityIssuesForDeclaration,
         getNonSimplicityIssuesForTypeVariables,
         pendingVariance;
+import '../kernel/utils.dart' show compareProcedures, toKernelCombinators;
 
 import '../modifier.dart'
     show
@@ -116,18 +112,18 @@
 
 import '../names.dart' show indexSetName;
 
+import '../operator.dart';
+
 import '../problems.dart' show unexpected, unhandled;
 
 import '../scope.dart';
 
 import '../type_inference/type_inferrer.dart' show TypeInferrerImpl;
 
+import 'name_scheme.dart';
 import 'source_class_builder.dart' show SourceClassBuilder;
-
-import 'source_extension_builder.dart' show SourceExtensionBuilder;
-
+import 'source_extension_builder.dart';
 import 'source_loader.dart' show SourceLoader;
-
 import 'source_type_alias_builder.dart';
 
 class SourceLibraryBuilder extends LibraryBuilderImpl {
@@ -650,7 +646,7 @@
       List<MetadataBuilder>? metadata,
       String uri,
       List<Configuration>? configurations,
-      List<Combinator>? combinators,
+      List<CombinatorBuilder>? combinators,
       int charOffset,
       int uriOffset) {
     if (configurations != null) {
@@ -695,7 +691,7 @@
       String uri,
       List<Configuration>? configurations,
       String? prefix,
-      List<Combinator>? combinators,
+      List<CombinatorBuilder>? combinators,
       bool deferred,
       int charOffset,
       int prefixCharOffset,
@@ -894,7 +890,7 @@
       // name is unique. Only the first of duplicate extensions is accessible
       // by name or by resolution and the remaining are dropped for the output.
       currentTypeParameterScopeBuilder.extensions!
-          .add(declaration as ExtensionBuilder);
+          .add(declaration as SourceExtensionBuilder);
     }
     if (declaration is PrefixBuilder) {
       _prefixBuilders ??= <PrefixBuilder>[];
@@ -1027,12 +1023,15 @@
 
     if (unserializableExports != null) {
       Name fieldName = new Name("_exports#", library);
+      Reference? fieldReference =
+          referencesFromIndexed?.lookupFieldReference(fieldName);
       Reference? getterReference =
           referencesFromIndexed?.lookupGetterReference(fieldName);
       library.addField(new Field.immutable(fieldName,
           initializer: new StringLiteral(jsonEncode(unserializableExports)),
           isStatic: true,
           isConst: true,
+          fieldReference: fieldReference,
           getterReference: getterReference,
           fileUri: library.fileUri));
     }
@@ -1065,6 +1064,17 @@
         export.exporter.addProblem(
             messagePartExport, export.charOffset, "export".length, null,
             context: context);
+        if (library != null) {
+          // Recovery: Export the main library instead.
+          export.exported = library;
+          SourceLibraryBuilder exporter =
+              export.exporter as SourceLibraryBuilder;
+          for (Export export2 in exporter.exports) {
+            if (export2.exported == this) {
+              export2.exported = library;
+            }
+          }
+        }
       }
     }
   }
@@ -1226,6 +1236,12 @@
       part.scope.becomePartOf(scope);
       // TODO(ahe): Include metadata from part?
 
+      // Recovery: Take on all exporters (i.e. if a library has erroneously
+      // exported the part it has (in validatePart) been recovered to import the
+      // main library (this) instead --- to make it complete (and set up scopes
+      // correctly) the exporters in this has to be updated too).
+      exporters.addAll(part.exporters);
+
       nativeMethods.addAll(part.nativeMethods);
       boundlessTypeVariables.addAll(part.boundlessTypeVariables);
       // Check that the targets are different. This is not normally a problem
@@ -1243,6 +1259,11 @@
           _implicitlyTypedFields!.addAll(partImplicitlyTypedFields);
         }
       }
+      if (library != part.library) {
+        // Mark the part library as synthetic as it's not an actual library
+        // (anymore).
+        part.library.isSynthetic = true;
+      }
       return true;
     } else {
       assert(part is DillLibraryBuilder);
@@ -1271,15 +1292,21 @@
   void addImportsToScope() {
     bool explicitCoreImport = this == loader.coreLibrary;
     for (Import import in imports) {
-      if (import.imported == loader.coreLibrary) {
-        explicitCoreImport = true;
-      }
       if (import.imported?.isPart ?? false) {
         addProblem(
             templatePartOfInLibrary.withArguments(import.imported!.fileUri),
             import.charOffset,
             noLength,
             fileUri);
+        if (import.imported?.partOfLibrary != null) {
+          // Recovery: Rewrite to import the "part owner" library.
+          // Note that the part will not have a partOfLibrary if it claims to be
+          // a part, but isn't mentioned as a part by the (would-be) "parent".
+          import.imported = import.imported?.partOfLibrary;
+        }
+      }
+      if (import.imported == loader.coreLibrary) {
+        explicitCoreImport = true;
       }
       import.finalizeImports(this);
     }
@@ -1847,6 +1874,7 @@
       String extensionName,
       List<TypeVariableBuilder>? typeVariables,
       TypeBuilder type,
+      ExtensionTypeShowHideClauseBuilder extensionTypeShowHideClauseBuilder,
       bool isExtensionTypeDeclaration,
       int startOffset,
       int nameOffset,
@@ -1879,6 +1907,7 @@
         extensionName,
         typeVariables,
         type,
+        extensionTypeShowHideClauseBuilder,
         classScope,
         this,
         isExtensionTypeDeclaration,
@@ -2220,14 +2249,16 @@
       extensionName = currentTypeParameterScopeBuilder.name;
     }
 
+    Reference? fieldReference;
     Reference? fieldGetterReference;
     Reference? fieldSetterReference;
+    Reference? lateIsSetFieldReference;
     Reference? lateIsSetGetterReference;
     Reference? lateIsSetSetterReference;
     Reference? lateGetterReference;
     Reference? lateSetterReference;
 
-    FieldNameScheme fieldNameScheme = new FieldNameScheme(
+    NameScheme nameScheme = new NameScheme(
         isInstanceMember: isInstanceMember,
         className: className,
         isExtensionMember: isExtensionMember,
@@ -2236,25 +2267,28 @@
     if (referencesFrom != null) {
       IndexedContainer indexedContainer =
           (_currentClassReferencesFromIndexed ?? referencesFromIndexed)!;
-      Name nameToLookupName = fieldNameScheme.getName(FieldNameType.Field, name,
+      Name nameToLookupName = nameScheme.getFieldName(FieldNameType.Field, name,
           isSynthesized: fieldIsLateWithLowering);
+      fieldReference = indexedContainer.lookupFieldReference(nameToLookupName);
       fieldGetterReference =
           indexedContainer.lookupGetterReference(nameToLookupName);
       fieldSetterReference =
           indexedContainer.lookupSetterReference(nameToLookupName);
       if (fieldIsLateWithLowering) {
-        Name lateIsSetNameName = fieldNameScheme.getName(
+        Name lateIsSetName = nameScheme.getFieldName(
             FieldNameType.IsSetField, name,
             isSynthesized: fieldIsLateWithLowering);
+        lateIsSetFieldReference =
+            indexedContainer.lookupFieldReference(lateIsSetName);
         lateIsSetGetterReference =
-            indexedContainer.lookupGetterReference(lateIsSetNameName);
+            indexedContainer.lookupGetterReference(lateIsSetName);
         lateIsSetSetterReference =
-            indexedContainer.lookupSetterReference(lateIsSetNameName);
+            indexedContainer.lookupSetterReference(lateIsSetName);
         lateGetterReference = indexedContainer.lookupGetterReference(
-            fieldNameScheme.getName(FieldNameType.Getter, name,
+            nameScheme.getFieldName(FieldNameType.Getter, name,
                 isSynthesized: fieldIsLateWithLowering));
         lateSetterReference = indexedContainer.lookupSetterReference(
-            fieldNameScheme.getName(FieldNameType.Setter, name,
+            nameScheme.getFieldName(FieldNameType.Setter, name,
                 isSynthesized: fieldIsLateWithLowering));
       }
     }
@@ -2268,10 +2302,11 @@
         this,
         charOffset,
         charEndOffset,
-        fieldNameScheme,
-        isInstanceMember: isInstanceMember,
+        nameScheme,
+        fieldReference: fieldReference,
         fieldGetterReference: fieldGetterReference,
         fieldSetterReference: fieldSetterReference,
+        lateIsSetFieldReference: lateIsSetFieldReference,
         lateIsSetGetterReference: lateIsSetGetterReference,
         lateIsSetSetterReference: lateIsSetSetterReference,
         lateGetterReference: lateGetterReference,
@@ -2318,7 +2353,7 @@
           new Name(
               constructorName, _currentClassReferencesFromIndexed!.library));
     }
-    ConstructorBuilder constructorBuilder = new ConstructorBuilderImpl(
+    ConstructorBuilder constructorBuilder = new SourceConstructorBuilder(
         metadata,
         modifiers & ~abstractMask,
         returnType,
@@ -2371,12 +2406,16 @@
     assert(!isExtensionMember ||
         currentTypeParameterScopeBuilder.kind ==
             TypeParameterScopeKind.extensionDeclaration);
+    String? className = (isInstanceMember && !isExtensionMember)
+        ? currentTypeParameterScopeBuilder.name
+        : null;
     String? extensionName =
         isExtensionMember ? currentTypeParameterScopeBuilder.name : null;
-    ProcedureNameScheme procedureNameScheme = new ProcedureNameScheme(
+    NameScheme nameScheme = new NameScheme(
         isExtensionMember: isExtensionMember,
+        className: className,
         extensionName: extensionName,
-        isStatic: !isInstanceMember,
+        isInstanceMember: isInstanceMember,
         libraryReference: referencesFrom?.reference ?? library.reference);
 
     if (returnType == null) {
@@ -2390,7 +2429,7 @@
     Reference? procedureReference;
     Reference? tearOffReference;
     if (referencesFrom != null) {
-      Name nameToLookup = procedureNameScheme.getName(kind, name);
+      Name nameToLookup = nameScheme.getProcedureName(kind, name);
       if (_currentClassReferencesFromIndexed != null) {
         if (kind == ProcedureKind.Setter) {
           procedureReference = _currentClassReferencesFromIndexed!
@@ -2411,7 +2450,7 @@
         }
         if (isExtensionMember && kind == ProcedureKind.Method) {
           tearOffReference = referencesFromIndexed!.lookupGetterReference(
-              procedureNameScheme.getName(ProcedureKind.Getter, name));
+              nameScheme.getProcedureName(ProcedureKind.Getter, name));
         }
       }
     }
@@ -2431,7 +2470,7 @@
         procedureReference,
         tearOffReference,
         asyncModifier,
-        procedureNameScheme,
+        nameScheme,
         isExtensionMember: isExtensionMember,
         isInstanceMember: isInstanceMember,
         nativeMethodName: nativeMethodName);
@@ -2460,6 +2499,15 @@
         const NullabilityBuilder.omitted(),
         <TypeBuilder>[],
         charOffset);
+    if (currentTypeParameterScopeBuilder.parent?.kind ==
+        TypeParameterScopeKind.extensionDeclaration) {
+      // Make the synthesized return type invalid for extensions.
+      String name = currentTypeParameterScopeBuilder.parent!.name;
+      returnType.bind(new InvalidTypeDeclarationBuilder(
+          name,
+          messageExtensionDeclaresConstructor.withLocation(
+              fileUri, charOffset, name.length)));
+    }
     // Nested declaration began in `OutlineBuilder.beginFactoryMethod`.
     TypeParameterScopeBuilder factoryDeclaration = endNestedDeclaration(
         TypeParameterScopeKind.factoryMethod, "#factory_method");
@@ -2474,10 +2522,11 @@
       procedureName = name as String;
     }
 
-    ProcedureNameScheme procedureNameScheme = new ProcedureNameScheme(
+    NameScheme procedureNameScheme = new NameScheme(
         isExtensionMember: false,
+        className: null,
         extensionName: null,
-        isStatic: true,
+        isInstanceMember: false,
         libraryReference: referencesFrom != null
             ? (_currentClassReferencesFromIndexed ?? referencesFromIndexed)!
                 .library
@@ -4152,6 +4201,213 @@
     checkUncheckedTypedefTypes(typeEnvironment);
   }
 
+  void computeShowHideElements(ClassHierarchyBuilder hierarchy) {
+    assert(currentTypeParameterScopeBuilder.kind ==
+        TypeParameterScopeKind.library);
+    for (SourceExtensionBuilder extensionBuilder
+        in currentTypeParameterScopeBuilder.extensions!) {
+      DartType onType = extensionBuilder.extension.onType;
+      if (onType is InterfaceType) {
+        ExtensionTypeShowHideClause showHideClause =
+            extensionBuilder.extension.showHideClause ??
+                new ExtensionTypeShowHideClause();
+
+        // TODO(dmitryas): Handle private names.
+        List<Supertype> supertypes =
+            hierarchy.getNodeFromClass(onType.classNode).superclasses;
+        Map<String, Supertype> supertypesByName = <String, Supertype>{};
+        for (Supertype supertype in supertypes) {
+          // TODO(dmitryas): Should only non-generic supertypes be allowed?
+          supertypesByName[supertype.classNode.name] = supertype;
+        }
+
+        // Handling elements of the 'show' clause.
+        for (String memberOrTypeName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.shownMembersOrTypes) {
+          Member? getableMember = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(memberOrTypeName));
+          if (getableMember != null) {
+            if (getableMember is Field) {
+              showHideClause.shownGetters.add(getableMember.getterReference);
+            } else if (getableMember.hasGetter) {
+              showHideClause.shownGetters.add(getableMember.reference);
+            }
+          }
+          if (getableMember is Procedure &&
+              getableMember.kind == ProcedureKind.Method) {
+            showHideClause.shownMethods.add(getableMember.reference);
+          }
+          Member? setableMember = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(memberOrTypeName),
+              setter: true);
+          if (setableMember != null) {
+            if (setableMember is Field) {
+              if (setableMember.setterReference != null) {
+                showHideClause.shownSetters.add(setableMember.setterReference!);
+              } else {
+                // TODO(dmitryas): Report an error.
+              }
+            } else if (setableMember.hasSetter) {
+              showHideClause.shownSetters.add(setableMember.reference);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          }
+          if (getableMember == null && setableMember == null) {
+            if (supertypesByName.containsKey(memberOrTypeName)) {
+              showHideClause.shownSupertypes
+                  .add(supertypesByName[memberOrTypeName]!);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          }
+        }
+        for (String getterName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.shownGetters) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(getterName));
+          if (member != null) {
+            if (member is Field) {
+              showHideClause.shownGetters.add(member.getterReference);
+            } else if (member.hasGetter) {
+              showHideClause.shownGetters.add(member.reference);
+            } else {
+              // TODO(dmitryas): Handle the erroneous case.
+            }
+          } else {
+            // TODO(dmitryas): Handle the erroneous case.
+          }
+        }
+        for (String setterName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.shownSetters) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(setterName),
+              setter: true);
+          if (member != null) {
+            if (member is Field) {
+              if (member.setterReference != null) {
+                showHideClause.shownSetters.add(member.setterReference!);
+              } else {
+                // TODO(dmitryas): Report an error.
+              }
+            } else if (member.hasSetter) {
+              showHideClause.shownSetters.add(member.reference);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          } else {
+            // TODO(dmitryas): Search for a non-setter and report an error.
+          }
+        }
+        for (Operator operator in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.shownOperators) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(operatorToString(operator)));
+          if (member != null) {
+            showHideClause.shownOperators.add(member.reference);
+          } else {
+            // TODO(dmitryas): Handle the erroneous case.
+          }
+        }
+
+        // TODO(dmitryas): Add a helper function to share logic between
+        // handling the 'show' and 'hide' parts.
+
+        // Handling elements of the 'hide' clause.
+        for (String memberOrTypeName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.hiddenMembersOrTypes) {
+          Member? getableMember = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(memberOrTypeName));
+          if (getableMember != null) {
+            if (getableMember is Field) {
+              showHideClause.hiddenGetters.add(getableMember.getterReference);
+            } else if (getableMember.hasGetter) {
+              showHideClause.hiddenGetters.add(getableMember.reference);
+            }
+          }
+          if (getableMember is Procedure &&
+              getableMember.kind == ProcedureKind.Method) {
+            showHideClause.hiddenMethods.add(getableMember.reference);
+          }
+          Member? setableMember = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(memberOrTypeName),
+              setter: true);
+          if (setableMember != null) {
+            if (setableMember is Field) {
+              if (setableMember.setterReference != null) {
+                showHideClause.hiddenSetters
+                    .add(setableMember.setterReference!);
+              } else {
+                // TODO(dmitryas): Report an error.
+              }
+            } else if (setableMember.hasSetter) {
+              showHideClause.hiddenSetters.add(setableMember.reference);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          }
+          if (getableMember == null && setableMember == null) {
+            if (supertypesByName.containsKey(memberOrTypeName)) {
+              showHideClause.hiddenSupertypes
+                  .add(supertypesByName[memberOrTypeName]!);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          }
+        }
+        for (String getterName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.hiddenGetters) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(getterName));
+          if (member != null) {
+            if (member is Field) {
+              showHideClause.hiddenGetters.add(member.getterReference);
+            } else if (member.hasGetter) {
+              showHideClause.hiddenGetters.add(member.reference);
+            } else {
+              // TODO(dmitryas): Handle the erroneous case.
+            }
+          } else {
+            // TODO(dmitryas): Handle the erroneous case.
+          }
+        }
+        for (String setterName in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.hiddenSetters) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(setterName),
+              setter: true);
+          if (member != null) {
+            if (member is Field) {
+              if (member.setterReference != null) {
+                showHideClause.hiddenSetters.add(member.setterReference!);
+              } else {
+                // TODO(dmitryas): Report an error.
+              }
+            } else if (member.hasSetter) {
+              showHideClause.hiddenSetters.add(member.reference);
+            } else {
+              // TODO(dmitryas): Report an error.
+            }
+          } else {
+            // TODO(dmitryas): Search for a non-setter and report an error.
+          }
+        }
+        for (Operator operator in extensionBuilder
+            .extensionTypeShowHideClauseBuilder.hiddenOperators) {
+          Member? member = hierarchy.getInterfaceMember(
+              onType.classNode, new Name(operatorToString(operator)));
+          if (member != null) {
+            showHideClause.hiddenOperators.add(member.reference);
+          } else {
+            // TODO(dmitryas): Handle the erroneous case.
+          }
+        }
+
+        extensionBuilder.extension.showHideClause ??= showHideClause;
+      }
+    }
+  }
+
   void registerImplicitlyTypedField(FieldBuilder fieldBuilder) {
     (_implicitlyTypedFields ??= <FieldBuilder>[]).add(fieldBuilder);
   }
@@ -4277,7 +4533,7 @@
 
   final Map<String, MemberBuilder>? setters;
 
-  final Set<ExtensionBuilder>? extensions;
+  final Set<SourceExtensionBuilder>? extensions;
 
   final List<UnresolvedType> types = <UnresolvedType>[];
 
@@ -4318,7 +4574,7 @@
             <String, Builder>{},
             <String, MemberBuilder>{},
             null, // No support for constructors in library scopes.
-            <ExtensionBuilder>{},
+            <SourceExtensionBuilder>{},
             "<library>",
             -1,
             null);
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 ea3cf9b..9e34d6d 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -4,16 +4,14 @@
 
 library fasta.source_loader;
 
+import 'dart:collection' show Queue;
 import 'dart:convert' show utf8;
-
 import 'dart:typed_data' show Uint8List;
 
 import 'package:_fe_analyzer_shared/src/parser/class_member_parser.dart'
     show ClassMemberParser;
-
 import 'package:_fe_analyzer_shared/src/parser/parser.dart'
     show Parser, lengthForToken;
-
 import 'package:_fe_analyzer_shared/src/scanner/scanner.dart'
     show
         ErrorToken,
@@ -23,56 +21,23 @@
         ScannerResult,
         Token,
         scan;
-
-import 'package:kernel/ast.dart'
-    show
-        Arguments,
-        AsyncMarker,
-        Class,
-        Component,
-        Constructor,
-        DartType,
-        Expression,
-        FunctionNode,
-        InterfaceType,
-        Library,
-        LibraryDependency,
-        Member,
-        NeverType,
-        Nullability,
-        Procedure,
-        ProcedureKind,
-        Reference,
-        Supertype,
-        TreeNode,
-        Version;
-
+import 'package:kernel/ast.dart';
 import 'package:kernel/class_hierarchy.dart'
     show ClassHierarchy, HandleAmbiguousSupertypes;
-
 import 'package:kernel/core_types.dart' show CoreTypes;
-
 import 'package:kernel/reference_from_index.dart' show ReferenceFromIndex;
-
 import 'package:kernel/type_environment.dart';
-
-import 'package:package_config/package_config.dart';
+import 'package:package_config/package_config.dart' as package_config;
 
 import '../../api_prototype/experimental_flags.dart';
 import '../../api_prototype/file_system.dart';
-
 import '../../base/common.dart';
-
 import '../../base/instrumentation.dart' show Instrumentation;
-
 import '../../base/nnbd_mode.dart';
-
-import '../denylisted_classes.dart'
-    show denylistedCoreClasses, denylistedTypedDataClasses;
-
 import '../builder/builder.dart';
 import '../builder/class_builder.dart';
 import '../builder/constructor_builder.dart';
+import '../builder/declaration_builder.dart';
 import '../builder/dynamic_type_declaration_builder.dart';
 import '../builder/enum_builder.dart';
 import '../builder/extension_builder.dart';
@@ -80,6 +45,7 @@
 import '../builder/invalid_type_declaration_builder.dart';
 import '../builder/library_builder.dart';
 import '../builder/member_builder.dart';
+import '../builder/modifier_builder.dart';
 import '../builder/named_type_builder.dart';
 import '../builder/never_type_declaration_builder.dart';
 import '../builder/prefix_builder.dart';
@@ -87,38 +53,39 @@
 import '../builder/type_alias_builder.dart';
 import '../builder/type_builder.dart';
 import '../builder/type_declaration_builder.dart';
-
+import '../crash.dart' show firstSourceUri;
+import '../denylisted_classes.dart'
+    show denylistedCoreClasses, denylistedTypedDataClasses;
 import '../export.dart' show Export;
-
 import '../fasta_codes.dart';
-
 import '../kernel/body_builder.dart' show BodyBuilder;
-import '../kernel/kernel_builder.dart'
-    show ClassHierarchyBuilder, ClassMember, DelayedCheck;
+import '../kernel/class_hierarchy_builder.dart';
 import '../kernel/kernel_helper.dart'
     show SynthesizedFunctionNode, TypeDependency;
 import '../kernel/kernel_target.dart' show KernelTarget;
 import '../kernel/transform_collections.dart' show CollectionTransformer;
 import '../kernel/transform_set_literals.dart' show SetLiteralTransformer;
 import '../kernel/type_builder_computer.dart' show TypeBuilderComputer;
-
 import '../loader.dart' show Loader, untranslatableUriScheme;
-
-import '../problems.dart' show internalProblem;
-
-import '../source/stack_listener_impl.dart' show offsetForToken;
-
+import '../problems.dart' show internalProblem, unhandled;
+import '../scope.dart';
+import '../ticker.dart' show Ticker;
 import '../type_inference/type_inference_engine.dart';
 import '../type_inference/type_inferrer.dart';
-
 import '../util/helpers.dart';
-
 import 'diet_listener.dart' show DietListener;
 import 'diet_parser.dart' show DietParser, useImplicitCreationExpressionInCfe;
+import 'name_scheme.dart';
 import 'outline_builder.dart' show OutlineBuilder;
 import 'source_class_builder.dart' show SourceClassBuilder;
-import 'source_library_builder.dart' show SourceLibraryBuilder;
+import 'source_library_builder.dart'
+    show
+        LanguageVersion,
+        InvalidLanguageVersion,
+        ImplicitLanguageVersion,
+        SourceLibraryBuilder;
 import 'source_type_alias_builder.dart';
+import 'stack_listener_impl.dart' show offsetForToken;
 
 class SourceLoader extends Loader {
   /// The [FileSystem] which should be used to access files.
@@ -174,10 +141,365 @@
 
   final SourceLoaderDataForTesting? dataForTesting;
 
-  SourceLoader(this.fileSystem, this.includeComments, KernelTarget target)
+  @override
+  final Map<Uri, LibraryBuilder> builders = <Uri, LibraryBuilder>{};
+
+  final Queue<LibraryBuilder> _unparsedLibraries = new Queue<LibraryBuilder>();
+
+  final List<Library> libraries = <Library>[];
+
+  @override
+  final KernelTarget target;
+
+  /// List of all handled compile-time errors seen so far by libraries loaded
+  /// by this loader.
+  ///
+  /// A handled error is an error that has been added to the generated AST
+  /// already, for example, as a throw expression.
+  final List<LocatedMessage> handledErrors = <LocatedMessage>[];
+
+  /// List of all unhandled compile-time errors seen so far by libraries loaded
+  /// by this loader.
+  ///
+  /// An unhandled error is an error that hasn't been handled, see
+  /// [handledErrors].
+  final List<LocatedMessage> unhandledErrors = <LocatedMessage>[];
+
+  /// List of all problems seen so far by libraries loaded by this loader that
+  /// does not belong directly to a library.
+  final List<FormattedMessage> allComponentProblems = <FormattedMessage>[];
+
+  /// The text of the messages that have been reported.
+  ///
+  /// This is used filter messages so that we don't report the same error twice.
+  final Set<String> seenMessages = new Set<String>();
+
+  /// Set to `true` if one of the reported errors had severity `Severity.error`.
+  ///
+  /// This is used for [hasSeenError].
+  bool _hasSeenError = false;
+
+  /// Clears the [seenMessages] and [hasSeenError] state.
+  void resetSeenMessages() {
+    seenMessages.clear();
+    _hasSeenError = false;
+  }
+
+  /// Returns `true` if a compile time error has been reported.
+  bool get hasSeenError => _hasSeenError;
+
+  LibraryBuilder? _coreLibrary;
+  LibraryBuilder? typedDataLibrary;
+
+  /// The first library that we've been asked to compile. When compiling a
+  /// program (aka script), this is the library that should have a main method.
+  LibraryBuilder? first;
+
+  int byteCount = 0;
+
+  Uri? currentUriForCrashReporting;
+
+  SourceLoader(this.fileSystem, this.includeComments, this.target)
       : dataForTesting =
-            retainDataForTesting ? new SourceLoaderDataForTesting() : null,
-        super(target);
+            retainDataForTesting ? new SourceLoaderDataForTesting() : null;
+
+  @override
+  LibraryBuilder get coreLibrary => _coreLibrary!;
+
+  void set coreLibrary(LibraryBuilder value) {
+    _coreLibrary = value;
+  }
+
+  Ticker get ticker => target.ticker;
+
+  /// Look up a library builder by the [uri], or if such doesn't exist, create
+  /// one. The canonical URI of the library is [uri], and its actual location is
+  /// [fileUri].
+  ///
+  /// Canonical URIs have schemes like "dart", or "package", and the actual
+  /// location is often a file URI.
+  ///
+  /// The [accessor] is the library that's trying to import, export, or include
+  /// as part [uri], and [charOffset] is the location of the corresponding
+  /// directive. If [accessor] isn't allowed to access [uri], it's a
+  /// compile-time error.
+  LibraryBuilder read(Uri uri, int charOffset,
+      {Uri? fileUri,
+      LibraryBuilder? accessor,
+      LibraryBuilder? origin,
+      Library? referencesFrom,
+      bool? referenceIsPartOwner}) {
+    LibraryBuilder builder = builders.putIfAbsent(uri, () {
+      if (fileUri != null &&
+          (fileUri!.scheme == "dart" ||
+              fileUri!.scheme == "package" ||
+              fileUri!.scheme == "dart-ext")) {
+        fileUri = null;
+      }
+      package_config.Package? packageForLanguageVersion;
+      if (fileUri == null) {
+        switch (uri.scheme) {
+          case "package":
+          case "dart":
+            fileUri = target.translateUri(uri) ??
+                new Uri(
+                    scheme: untranslatableUriScheme,
+                    path: Uri.encodeComponent("$uri"));
+            if (uri.scheme == "package") {
+              packageForLanguageVersion = target.uriTranslator.getPackage(uri);
+            } else {
+              packageForLanguageVersion =
+                  target.uriTranslator.packages.packageOf(fileUri!);
+            }
+            break;
+
+          default:
+            fileUri = uri;
+            packageForLanguageVersion =
+                target.uriTranslator.packages.packageOf(fileUri!);
+            break;
+        }
+      } else {
+        packageForLanguageVersion =
+            target.uriTranslator.packages.packageOf(fileUri!);
+      }
+      LanguageVersion? packageLanguageVersion;
+      Uri? packageUri;
+      Message? packageLanguageVersionProblem;
+      if (packageForLanguageVersion != null) {
+        Uri importUri = origin?.importUri ?? uri;
+        if (importUri.scheme != 'dart' &&
+            importUri.scheme != 'package' &&
+            // ignore: unnecessary_null_comparison
+            packageForLanguageVersion.name != null) {
+          packageUri =
+              new Uri(scheme: 'package', path: packageForLanguageVersion.name);
+        }
+        if (packageForLanguageVersion.languageVersion != null) {
+          if (packageForLanguageVersion.languageVersion
+              is package_config.InvalidLanguageVersion) {
+            packageLanguageVersionProblem =
+                messageLanguageVersionInvalidInDotPackages;
+            packageLanguageVersion = new InvalidLanguageVersion(
+                fileUri!, 0, noLength, target.currentSdkVersion, false);
+          } else {
+            Version version = new Version(
+                packageForLanguageVersion.languageVersion!.major,
+                packageForLanguageVersion.languageVersion!.minor);
+            if (version > target.currentSdkVersion) {
+              packageLanguageVersionProblem =
+                  templateLanguageVersionTooHigh.withArguments(
+                      target.currentSdkVersion.major,
+                      target.currentSdkVersion.minor);
+              packageLanguageVersion = new InvalidLanguageVersion(
+                  fileUri!, 0, noLength, target.currentSdkVersion, false);
+            } else {
+              packageLanguageVersion = new ImplicitLanguageVersion(version);
+            }
+          }
+        }
+      }
+      packageLanguageVersion ??=
+          new ImplicitLanguageVersion(target.currentSdkVersion);
+
+      LibraryBuilder library = target.createLibraryBuilder(
+          uri,
+          fileUri!,
+          packageUri,
+          packageLanguageVersion,
+          origin as SourceLibraryBuilder?,
+          referencesFrom,
+          referenceIsPartOwner);
+      if (packageLanguageVersionProblem != null &&
+          library is SourceLibraryBuilder) {
+        library.addPostponedProblem(
+            packageLanguageVersionProblem, 0, noLength, library.fileUri);
+      }
+
+      if (uri.scheme == "dart") {
+        if (uri.path == "core") {
+          _coreLibrary = library;
+        } else if (uri.path == "typed_data") {
+          typedDataLibrary = library;
+        }
+      }
+      if (library.loader != this) {
+        if (_coreLibrary == library) {
+          target.loadExtraRequiredLibraries(this);
+        }
+        // This library isn't owned by this loader, so no further processing
+        // should be attempted.
+        return library;
+      }
+
+      {
+        // Add any additional logic after this block. Setting the
+        // firstSourceUri and first library should be done as early as
+        // possible.
+        firstSourceUri ??= uri;
+        first ??= library;
+      }
+      if (_coreLibrary == library) {
+        target.loadExtraRequiredLibraries(this);
+      }
+      Uri libraryUri = origin?.importUri ?? uri;
+      if (target.backendTarget.mayDefineRestrictedType(libraryUri)) {
+        library.mayImplementRestrictedTypes = true;
+      }
+      if (uri.scheme == "dart") {
+        target.readPatchFiles(library as SourceLibraryBuilder);
+      }
+      _unparsedLibraries.addLast(library);
+      return library;
+    });
+    if (accessor == null) {
+      if (builder.loader == this && first != builder) {
+        unhandled("null", "accessor", charOffset, uri);
+      }
+    } else {
+      builder.recordAccess(charOffset, noLength, accessor.fileUri);
+      if (!accessor.isPatch &&
+          !accessor.isPart &&
+          !target.backendTarget
+              .allowPlatformPrivateLibraryAccess(accessor.importUri, uri)) {
+        accessor.addProblem(messagePlatformPrivateLibraryAccess, charOffset,
+            noLength, accessor.fileUri);
+      }
+    }
+    return builder;
+  }
+
+  void _ensureCoreLibrary() {
+    if (_coreLibrary == null) {
+      read(Uri.parse("dart:core"), 0, accessor: first);
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      read(Uri.parse("dart:collection"), 0, accessor: first);
+      assert(_coreLibrary != null);
+    }
+  }
+
+  Future<Null> buildBodies() async {
+    assert(_coreLibrary != null);
+    for (LibraryBuilder library in builders.values) {
+      if (library.loader == this) {
+        currentUriForCrashReporting = library.importUri;
+        await buildBody(library);
+      }
+    }
+    currentUriForCrashReporting = null;
+    logSummary(templateSourceBodySummary);
+  }
+
+  void logSummary(Template<SummaryTemplate> template) {
+    ticker.log((Duration elapsed, Duration sinceStart) {
+      int libraryCount = 0;
+      for (LibraryBuilder library in builders.values) {
+        if (library.loader == this) libraryCount++;
+      }
+      double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond;
+      Message message = template.withArguments(
+          libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount);
+      print("$sinceStart: ${message.message}");
+    });
+  }
+
+  /// Register [message] as a problem with a severity determined by the
+  /// intrinsic severity of the message.
+  @override
+  FormattedMessage? addProblem(
+      Message message, int charOffset, int length, Uri? fileUri,
+      {bool wasHandled: false,
+      List<LocatedMessage>? context,
+      Severity? severity,
+      bool problemOnLibrary: false,
+      List<Uri>? involvedFiles}) {
+    return addMessage(message, charOffset, length, fileUri, severity,
+        wasHandled: wasHandled,
+        context: context,
+        problemOnLibrary: problemOnLibrary,
+        involvedFiles: involvedFiles);
+  }
+
+  /// All messages reported by the compiler (errors, warnings, etc.) are routed
+  /// through this method.
+  ///
+  /// Returns a FormattedMessage if the message is new, that is, not previously
+  /// reported. This is important as some parser errors may be reported up to
+  /// three times by `OutlineBuilder`, `DietListener`, and `BodyBuilder`.
+  /// If the message is not new, [null] is reported.
+  ///
+  /// If [severity] is `Severity.error`, the message is added to
+  /// [handledErrors] if [wasHandled] is true or to [unhandledErrors] if
+  /// [wasHandled] is false.
+  FormattedMessage? addMessage(Message message, int charOffset, int length,
+      Uri? fileUri, Severity? severity,
+      {bool wasHandled: false,
+      List<LocatedMessage>? context,
+      bool problemOnLibrary: false,
+      List<Uri>? involvedFiles}) {
+    severity ??= message.code.severity;
+    if (severity == Severity.ignored) return null;
+    String trace = """
+message: ${message.message}
+charOffset: $charOffset
+fileUri: $fileUri
+severity: $severity
+""";
+    if (!seenMessages.add(trace)) return null;
+    if (message.code.severity == Severity.error) {
+      _hasSeenError = true;
+    }
+    if (message.code.severity == Severity.context) {
+      internalProblem(
+          templateInternalProblemContextSeverity
+              .withArguments(message.code.name),
+          charOffset,
+          fileUri);
+    }
+    target.context.report(
+        fileUri != null
+            ? message.withLocation(fileUri, charOffset, length)
+            : message.withoutLocation(),
+        severity,
+        context: context,
+        involvedFiles: involvedFiles);
+    if (severity == Severity.error) {
+      (wasHandled ? handledErrors : unhandledErrors).add(fileUri != null
+          ? message.withLocation(fileUri, charOffset, length)
+          : message.withoutLocation());
+    }
+    FormattedMessage formattedMessage = target.createFormattedMessage(
+        message, charOffset, length, fileUri, context, severity,
+        involvedFiles: involvedFiles);
+    if (!problemOnLibrary) {
+      allComponentProblems.add(formattedMessage);
+    }
+    return formattedMessage;
+  }
+
+  MemberBuilder getAbstractClassInstantiationError() {
+    return target.getAbstractClassInstantiationError(this);
+  }
+
+  MemberBuilder getCompileTimeError() => target.getCompileTimeError(this);
+
+  MemberBuilder getDuplicatedFieldInitializerError() {
+    return target.getDuplicatedFieldInitializerError(this);
+  }
+
+  MemberBuilder getNativeAnnotation() => target.getNativeAnnotation(this);
+
+  BodyBuilder createBodyBuilderForOutlineExpression(
+      SourceLibraryBuilder library,
+      DeclarationBuilder? declarationBuilder,
+      ModifierBuilder member,
+      Scope scope,
+      Uri fileUri) {
+    return new BodyBuilder.forOutlineExpression(
+        library, declarationBuilder, member, scope, fileUri);
+  }
 
   NnbdMode get nnbdMode => target.context.options.nnbdMode;
 
@@ -203,13 +525,9 @@
 
   ClassHierarchyBuilder get builderHierarchy => _builderHierarchy!;
 
-  @override
   Template<SummaryTemplate> get outlineSummaryTemplate =>
       templateSourceOutlineSummary;
 
-  @override
-  bool get isSourceLoader => true;
-
   Future<Token> tokenize(SourceLibraryBuilder library,
       {bool suppressLexicalErrors: false}) async {
     Uri fileUri = library.fileUri;
@@ -372,9 +690,15 @@
     _typeInferenceEngine!.typeDependencies[member] = typeDependency;
   }
 
-  @override
   Future<Null> buildOutlines() async {
-    await super.buildOutlines();
+    _ensureCoreLibrary();
+    while (_unparsedLibraries.isNotEmpty) {
+      LibraryBuilder library = _unparsedLibraries.removeFirst();
+      currentUriForCrashReporting = library.importUri;
+      await buildOutline(library as SourceLibraryBuilder);
+    }
+    currentUriForCrashReporting = null;
+    logSummary(outlineSummaryTemplate);
 
     if (_strongOptOutLibraries != null) {
       // We have libraries that are opted out in strong mode "non-explicitly",
@@ -409,9 +733,9 @@
       Set<LibraryBuilder> libraries,
       {required bool emitNonPackageErrors}) {
     Map<String?, List<LibraryBuilder>> libraryByPackage = {};
-    Map<Package, Version> enableNonNullableVersionByPackage = {};
+    Map<package_config.Package, Version> enableNonNullableVersionByPackage = {};
     for (LibraryBuilder libraryBuilder in libraries) {
-      final Package? package =
+      final package_config.Package? package =
           target.uriTranslator.getPackage(libraryBuilder.importUri);
 
       if (package != null &&
@@ -476,7 +800,6 @@
     return bytes.sublist(0, bytes.length - 1);
   }
 
-  @override
   Future<Null> buildOutline(SourceLibraryBuilder library) async {
     Token tokens = await tokenize(library);
     // ignore: unnecessary_null_comparison
@@ -485,7 +808,7 @@
     new ClassMemberParser(listener).parseUnit(tokens);
   }
 
-  @override
+  /// Builds all the method bodies found in the given [library].
   Future<Null> buildBody(LibraryBuilder library) async {
     if (library is SourceLibraryBuilder) {
       // We tokenize source files twice to keep memory usage low. This is the
@@ -513,26 +836,32 @@
     }
   }
 
-  // TODO(johnniwinther,jensj): Handle expression in extensions?
   Future<Expression> buildExpression(
       SourceLibraryBuilder libraryBuilder,
-      String? enclosingClass,
+      String? enclosingClassOrExtension,
       bool isClassInstanceMember,
-      FunctionNode parameters) async {
+      FunctionNode parameters,
+      VariableDeclaration? extensionThis) async {
     Token token = await tokenize(libraryBuilder, suppressLexicalErrors: false);
     DietListener dietListener = createDietListener(libraryBuilder);
 
     Builder parent = libraryBuilder;
-    if (enclosingClass != null) {
+    if (enclosingClassOrExtension != null) {
       Builder? cls = dietListener.memberScope
-          .lookup(enclosingClass, -1, libraryBuilder.fileUri);
+          .lookup(enclosingClassOrExtension, -1, libraryBuilder.fileUri);
       if (cls is ClassBuilder) {
         parent = cls;
         dietListener
           ..currentDeclaration = cls
           ..memberScope = cls.scope.copyWithParent(
               dietListener.memberScope.withTypeVariables(cls.typeVariables),
-              "debugExpression in $enclosingClass");
+              "debugExpression in class $enclosingClassOrExtension");
+      } else if (cls is ExtensionBuilder) {
+        parent = cls;
+        dietListener
+          ..currentDeclaration = cls
+          ..memberScope = cls.scope.copyWithParent(dietListener.memberScope,
+              "debugExpression in extension $enclosingClassOrExtension");
       }
     }
     ProcedureBuilder builder = new SourceProcedureBuilder(
@@ -551,16 +880,19 @@
         null,
         null,
         AsyncMarker.Sync,
-        new ProcedureNameScheme(
+        new NameScheme(
+            className: null,
+            extensionName: null,
             isExtensionMember: false,
-            isStatic: true,
+            isInstanceMember: false,
             libraryReference: libraryBuilder.library.reference),
         isInstanceMember: false,
         isExtensionMember: false)
       ..parent = parent;
     BodyBuilder listener = dietListener.createListener(
         builder, dietListener.memberScope,
-        isDeclarationInstanceMember: isClassInstanceMember);
+        isDeclarationInstanceMember: isClassInstanceMember,
+        extensionThis: extensionThis);
 
     return listener.parseSingleExpression(
         new Parser(listener,
@@ -569,9 +901,6 @@
         parameters);
   }
 
-  @override
-  KernelTarget get target => super.target as KernelTarget;
-
   DietListener createDietListener(SourceLibraryBuilder library) {
     return new DietListener(library, hierarchy, coreTypes, typeInferenceEngine);
   }
@@ -1088,6 +1417,16 @@
     ticker.logMs("Computed class hierarchy");
   }
 
+  void computeShowHideElements() {
+    for (LibraryBuilder libraryBuilder in builders.values) {
+      if (libraryBuilder.loader == this &&
+          libraryBuilder is SourceLibraryBuilder) {
+        libraryBuilder.computeShowHideElements(_builderHierarchy!);
+      }
+    }
+    ticker.logMs("Computed show and hide elements");
+  }
+
   void handleAmbiguousSupertypes(Class cls, Supertype a, Supertype b) {
     addProblem(
         templateAmbiguousSupertypes.withArguments(cls.name, a.asInterfaceType,
@@ -1589,10 +1928,6 @@
   void operator []=(K key, V value) {}
 }
 
-abstract class _ImmutableMap<K, V> implements Map<K, V> {
-  dynamic _kvPairs;
-}
-
 abstract class pragma {
   String name;
   Object options;
@@ -1617,6 +1952,9 @@
 abstract class Enum {
 }
 
+abstract class _Enum {
+}
+
 class String {}
 
 class Symbol {}
diff --git a/pkg/front_end/lib/src/fasta/source/value_kinds.dart b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
index 6f24626..2c88740 100644
--- a/pkg/front_end/lib/src/fasta/source/value_kinds.dart
+++ b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
@@ -75,6 +75,8 @@
   static const ValueKind ModifiersOrNull =
       const SingleValueKind<List<type.Modifier>>(NullValue.Modifiers);
   static const ValueKind Name = const SingleValueKind<String>();
+  static const ValueKind NameListOrNull =
+      const SingleValueKind<List<String>>(NullValue.IdentifierList);
   static const ValueKind NameOrNull =
       const SingleValueKind<String>(NullValue.Name);
   static const ValueKind NameOrOperator =
@@ -87,6 +89,8 @@
       const SingleValueKind<List<type.MetadataBuilder>>(NullValue.Metadata);
   static const ValueKind ObjectList = const SingleValueKind<List<Object>>();
   static const ValueKind Operator = const SingleValueKind<type.Operator>();
+  static const ValueKind OperatorListOrNull =
+      const SingleValueKind<List<type.Operator>>(NullValue.OperatorList);
   static const ValueKind ParserRecovery =
       const SingleValueKind<type.ParserRecovery>();
   static const ValueKind ProblemBuilder =
@@ -94,8 +98,7 @@
   static const ValueKind QualifiedName =
       const SingleValueKind<type.QualifiedName>();
   static const ValueKind Scope = const SingleValueKind<type.Scope>();
-  static const ValueKind Selector =
-      const SingleValueKind<type.Selector>();
+  static const ValueKind Selector = const SingleValueKind<type.Selector>();
   static const ValueKind SwitchScopeOrNull =
       const SingleValueKind<type.Scope>(NullValue.SwitchScope);
   static const ValueKind Statement = const SingleValueKind<type.Statement>();
@@ -105,7 +108,7 @@
   static const ValueKind TokenOrNull =
       const SingleValueKind<type.Token>(NullValue.Token);
   static const ValueKind TypeOrNull =
-      const SingleValueKind<type.UnresolvedType>(NullValue.Type);
+      const SingleValueKind<type.UnresolvedType>(NullValue.UnresolvedType);
   static const ValueKind TypeArguments =
       const SingleValueKind<List<type.UnresolvedType>>();
   static const ValueKind TypeArgumentsOrNull =
@@ -113,7 +116,9 @@
   static const ValueKind TypeBuilder =
       const SingleValueKind<type.TypeBuilder>();
   static const ValueKind TypeBuilderOrNull =
-      const SingleValueKind<type.TypeBuilder>(NullValue.Type);
+      const SingleValueKind<type.TypeBuilder>(NullValue.UnresolvedType);
+  static const ValueKind TypeBuilderListOrNull =
+      const SingleValueKind<List<type.TypeBuilder>>(NullValue.TypeBuilderList);
   static const ValueKind TypeVariableListOrNull =
       const SingleValueKind<List<type.TypeVariableBuilder>>(
           NullValue.TypeVariables);
diff --git a/pkg/front_end/lib/src/fasta/target.dart b/pkg/front_end/lib/src/fasta/target.dart
deleted file mode 100644
index 4c9944a..0000000
--- a/pkg/front_end/lib/src/fasta/target.dart
+++ /dev/null
@@ -1,26 +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.
-
-library fasta.target;
-
-import 'package:kernel/ast.dart' show Component;
-
-import 'ticker.dart' show Ticker;
-
-/// A compilation target.
-///
-/// A target reads source files with [read], builds outlines when
-/// [buildOutlines] is called and builds the full component when
-/// [buildComponent] is called.
-abstract class Target {
-  final Ticker ticker;
-
-  Target(this.ticker);
-
-  /// Build and return outlines for all libraries.
-  Future<Component?> buildOutlines();
-
-  /// Build and return the full component for all libraries.
-  Future<Component?> buildComponent();
-}
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index d179dbd..14f9c7a 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -2,230 +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.
 
-library fasta.target_implementation;
-
-import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
-
-import 'package:kernel/ast.dart' show Library, Source, Version;
-
-import 'package:kernel/target/targets.dart' as backend show Target;
-
-import '../base/processed_options.dart' show ProcessedOptions;
-
-import 'builder/class_builder.dart';
-import 'builder/library_builder.dart';
-import 'builder/member_builder.dart';
-import 'source/source_library_builder.dart' show LanguageVersion;
+import 'package:kernel/target/targets.dart' show Target;
 
 import 'compiler_context.dart' show CompilerContext;
 
-import 'loader.dart' show Loader;
-
-import 'messages.dart' show FormattedMessage, LocatedMessage, Message;
-
-import 'target.dart' show Target;
-
-import 'ticker.dart' show Ticker;
-
-import 'uri_translator.dart' show UriTranslator;
-
-import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
-
 /// Provides the implementation details used by a loader for a target.
-abstract class TargetImplementation extends Target {
-  final UriTranslator uriTranslator;
+abstract class TargetImplementation {
+  CompilerContext get context;
 
-  final backend.Target backendTarget;
-
-  final CompilerContext context = CompilerContext.current;
-
-  /// Shared with [CompilerContext].
-  final Map<Uri, Source> uriToSource = CompilerContext.current.uriToSource;
-
-  MemberBuilder? cachedAbstractClassInstantiationError;
-  MemberBuilder? cachedCompileTimeError;
-  MemberBuilder? cachedDuplicatedFieldInitializerError;
-  MemberBuilder? cachedNativeAnnotation;
-
-  final ProcessedOptions _options;
-
-  TargetImplementation(Ticker ticker, this.uriTranslator, this.backendTarget)
-      // ignore: unnecessary_null_comparison
-      : assert(ticker != null),
-        // ignore: unnecessary_null_comparison
-        assert(uriTranslator != null),
-        // ignore: unnecessary_null_comparison
-        assert(backendTarget != null),
-        _options = CompilerContext.current.options,
-        super(ticker);
-
-  bool isExperimentEnabledInLibrary(ExperimentalFlag flag, Uri importUri) {
-    return _options.isExperimentEnabledInLibrary(flag, importUri);
-  }
-
-  Version getExperimentEnabledVersionInLibrary(
-      ExperimentalFlag flag, Uri importUri) {
-    return _options.getExperimentEnabledVersionInLibrary(flag, importUri);
-  }
-
-  bool isExperimentEnabledInLibraryByVersion(
-      ExperimentalFlag flag, Uri importUri, Version version) {
-    return _options.isExperimentEnabledInLibraryByVersion(
-        flag, importUri, version);
-  }
-
-  /// Returns `true` if the [flag] is enabled by default.
-  bool isExperimentEnabledByDefault(ExperimentalFlag flag) {
-    return _options.isExperimentEnabledByDefault(flag);
-  }
-
-  /// Returns `true` if the [flag] is enabled globally.
-  ///
-  /// This is `true` either if the [flag] is passed through an explicit
-  /// `--enable-experiment` option or if the [flag] is expired and on by
-  /// default.
-  bool isExperimentEnabledGlobally(ExperimentalFlag flag) {
-    return _options.isExperimentEnabledGlobally(flag);
-  }
-
-  /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
-  /// already.
-  ///
-  /// [fileUri] must not be null and is a URI that can be passed to FileSystem
-  /// to locate the corresponding file.
-  ///
-  /// [origin] is non-null if the created library is a patch to [origin].
-  ///
-  /// [packageUri] is the base uri for the package which the library belongs to.
-  /// For instance 'package:foo'.
-  ///
-  /// This is used to associate libraries in for instance the 'bin' and 'test'
-  /// folders of a package source with the package uri of the 'lib' folder.
-  ///
-  /// If the [packageUri] is `null` the package association of this library is
-  /// based on its [importUri].
-  ///
-  /// For libraries with a 'package:' [importUri], the package path must match
-  /// the path in the [importUri]. For libraries with a 'dart:' [importUri] the
-  /// [packageUri] must be `null`.
-  ///
-  /// [packageLanguageVersion] is the language version defined by the package
-  /// which the library belongs to, or the current sdk version if the library
-  /// doesn't belong to a package.
-  LibraryBuilder? createLibraryBuilder(
-      Uri uri,
-      Uri fileUri,
-      Uri? packageUri,
-      LanguageVersion packageLanguageVersion,
-      covariant LibraryBuilder? origin,
-      Library? referencesFrom,
-      bool? referenceIsPartOwner);
-
-  /// The class [cls] is involved in a cyclic definition. This method should
-  /// ensure that the cycle is broken, for example, by removing superclass and
-  /// implemented interfaces.
-  void breakCycle(ClassBuilder cls);
-
-  Uri? translateUri(Uri uri) => uriTranslator.translate(uri);
-
-  /// Returns a reference to the constructor of
-  /// [AbstractClassInstantiationError] error.  The constructor is expected to
-  /// accept a single argument of type String, which is the name of the
-  /// abstract class.
-  MemberBuilder getAbstractClassInstantiationError(Loader loader) {
-    return cachedAbstractClassInstantiationError ??=
-        loader.coreLibrary.getConstructor("AbstractClassInstantiationError");
-  }
-
-  /// Returns a reference to the constructor used for creating a compile-time
-  /// error. The constructor is expected to accept a single argument of type
-  /// String, which is the compile-time error message.
-  MemberBuilder getCompileTimeError(Loader loader) {
-    return cachedCompileTimeError ??= loader.coreLibrary
-        .getConstructor("_CompileTimeError", bypassLibraryPrivacy: true);
-  }
-
-  /// Returns a reference to the constructor used for creating a runtime error
-  /// when a final field is initialized twice. The constructor is expected to
-  /// accept a single argument which is the name of the field.
-  MemberBuilder getDuplicatedFieldInitializerError(Loader loader) {
-    return cachedDuplicatedFieldInitializerError ??= loader.coreLibrary
-        .getConstructor("_DuplicatedFieldInitializerError",
-            bypassLibraryPrivacy: true);
-  }
-
-  /// Returns a reference to the constructor used for creating `native`
-  /// annotations. The constructor is expected to accept a single argument of
-  /// type String, which is the name of the native method.
-  MemberBuilder getNativeAnnotation(Loader loader) {
-    if (cachedNativeAnnotation != null) return cachedNativeAnnotation!;
-    LibraryBuilder internal = loader.read(Uri.parse("dart:_internal"), -1,
-        accessor: loader.coreLibrary);
-    return cachedNativeAnnotation = internal.getConstructor("ExternalName");
-  }
-
-  void loadExtraRequiredLibraries(Loader loader) {
-    for (String uri in backendTarget.extraRequiredLibraries) {
-      loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
-    }
-    if (context.compilingPlatform) {
-      for (String uri in backendTarget.extraRequiredLibrariesPlatform) {
-        loader.read(Uri.parse(uri), 0, accessor: loader.coreLibrary);
-      }
-    }
-  }
-
-  void addSourceInformation(
-      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode);
-
-  void readPatchFiles(covariant LibraryBuilder library) {}
-
-  FormattedMessage createFormattedMessage(
-      Message message,
-      int charOffset,
-      int length,
-      Uri? fileUri,
-      List<LocatedMessage>? messageContext,
-      Severity severity,
-      {List<Uri>? involvedFiles}) {
-    ProcessedOptions processedOptions = context.options;
-    return processedOptions.format(
-        fileUri != null
-            ? message.withLocation(fileUri, charOffset, length)
-            : message.withoutLocation(),
-        severity,
-        messageContext,
-        involvedFiles: involvedFiles);
-  }
-
-  String get currentSdkVersionString {
-    return CompilerContext.current.options.currentSdkVersion;
-  }
-
-  Version? _currentSdkVersion;
-  Version get currentSdkVersion {
-    if (_currentSdkVersion == null) {
-      _parseCurrentSdkVersion();
-    }
-    return _currentSdkVersion!;
-  }
-
-  void _parseCurrentSdkVersion() {
-    bool good = false;
-    // ignore: unnecessary_null_comparison
-    if (currentSdkVersionString != null) {
-      List<String> dotSeparatedParts = currentSdkVersionString.split(".");
-      if (dotSeparatedParts.length >= 2) {
-        _currentSdkVersion = new Version(int.tryParse(dotSeparatedParts[0])!,
-            int.tryParse(dotSeparatedParts[1])!);
-        good = true;
-      }
-    }
-    if (!good) {
-      throw new StateError(
-          "Unparsable sdk version given: $currentSdkVersionString");
-    }
-  }
-
-  void releaseAncillaryResources();
+  Target get backendTarget;
 }
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 884dfc4..2194bf5 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
@@ -17,9 +17,9 @@
 import '../builder/constructor_builder.dart';
 
 import '../kernel/forest.dart';
+import '../kernel/implicit_field_type.dart';
 import '../kernel/internal_ast.dart';
-import '../kernel/kernel_builder.dart'
-    show ClassHierarchyBuilder, ImplicitFieldType;
+import '../kernel/class_hierarchy_builder.dart' show ClassHierarchyBuilder;
 import '../kernel/kernel_helper.dart';
 
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
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 654c67a..cf74dd7 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
@@ -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.md file.
 
-import 'dart:core';
-
 import 'package:_fe_analyzer_shared/src/flow_analysis/flow_analysis.dart';
 
 import 'package:_fe_analyzer_shared/src/testing/id.dart';
 import 'package:_fe_analyzer_shared/src/util/link.dart';
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/canonical_name.dart' as kernel;
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/type_algebra.dart';
@@ -552,6 +551,20 @@
         isVoidAllowed: isVoidAllowed,
         isExpressionTypePrecise: preciseTypeErrorTemplate != null);
 
+    if (assignabilityResult.needsTearOff) {
+      TypedTearoff typedTearoff =
+          _tearOffCall(expression, expressionType as InterfaceType, fileOffset);
+      expression = typedTearoff.tearoff;
+      expressionType = typedTearoff.tearoffType;
+    }
+    if (assignabilityResult.implicitInstantiation != null) {
+      ExpressionInferenceResult instantiationResult =
+          _applyImplicitInstantiation(assignabilityResult.implicitInstantiation,
+              expressionType, expression);
+      expression = instantiationResult.expression;
+      expressionType = instantiationResult.inferredType;
+    }
+
     Expression result;
     switch (assignabilityResult.kind) {
       case AssignabilityKind.assignable:
@@ -565,21 +578,6 @@
           ..isForDynamic = expressionType is DynamicType
           ..fileOffset = fileOffset;
         break;
-      case AssignabilityKind.assignableTearoff:
-        result = _tearOffCall(
-                expression, expressionType as InterfaceType, fileOffset)
-            .tearoff;
-        break;
-      case AssignabilityKind.assignableTearoffCast:
-        result = new AsExpression(
-            _tearOffCall(
-                    expression, expressionType as InterfaceType, fileOffset)
-                .tearoff,
-            initialContextType)
-          ..isTypeError = true
-          ..isForNonNullableByDefault = isNonNullableByDefault
-          ..fileOffset = fileOffset;
-        break;
       case AssignabilityKind.unassignable:
         // Error: not assignable.  Perform error recovery.
         result = _wrapUnassignableExpression(
@@ -605,17 +603,6 @@
             expression.fileOffset,
             noLength);
         break;
-      case AssignabilityKind.unassignableTearoff:
-        TypedTearoff typedTearoff = _tearOffCall(
-            expression, expressionType as InterfaceType, fileOffset);
-        result = _wrapUnassignableExpression(
-            typedTearoff.tearoff,
-            typedTearoff.tearoffType,
-            contextType,
-            errorTemplate.withArguments(typedTearoff.tearoffType,
-                declaredContextType ?? contextType, isNonNullableByDefault));
-
-        break;
       case AssignabilityKind.unassignableCantTearoff:
         result = _wrapTearoffErrorExpression(
             expression, contextType, templateNullableTearoffError);
@@ -668,30 +655,6 @@
                   isNonNullableByDefault));
         }
         break;
-      case AssignabilityKind.unassignableNullabilityTearoff:
-        TypedTearoff typedTearoff = _tearOffCall(
-            expression, expressionType as InterfaceType, fileOffset);
-        if (expressionType == assignabilityResult.subtype &&
-            contextType == assignabilityResult.supertype) {
-          result = _wrapUnassignableExpression(
-              typedTearoff.tearoff,
-              typedTearoff.tearoffType,
-              contextType,
-              nullabilityErrorTemplate.withArguments(typedTearoff.tearoffType,
-                  declaredContextType ?? contextType, isNonNullableByDefault));
-        } else {
-          result = _wrapUnassignableExpression(
-              typedTearoff.tearoff,
-              typedTearoff.tearoffType,
-              contextType,
-              nullabilityPartErrorTemplate.withArguments(
-                  typedTearoff.tearoffType,
-                  declaredContextType ?? contextType,
-                  assignabilityResult.subtype!,
-                  assignabilityResult.supertype!,
-                  isNonNullableByDefault));
-        }
-        break;
       default:
         return unhandled("${assignabilityResult}", "ensureAssignable",
             fileOffset, helper!.uri);
@@ -809,7 +772,8 @@
           needsTearoff = true;
           if (isNonNullableByDefault && expressionType.isPotentiallyNullable) {
             return const AssignabilityResult(
-                AssignabilityKind.unassignableCantTearoff);
+                AssignabilityKind.unassignableCantTearoff,
+                needsTearOff: false);
           }
           expressionType =
               getGetterTypeForMemberTarget(callMember, expressionType)
@@ -817,9 +781,20 @@
         }
       }
     }
+    ImplicitInstantiation? implicitInstantiation;
+    if (library.enableConstructorTearOffsInLibrary) {
+      implicitInstantiation =
+          computeImplicitInstantiation(expressionType, contextType);
+      if (implicitInstantiation != null) {
+        expressionType = implicitInstantiation.instantiatedType;
+      }
+    }
 
     if (expressionType is VoidType && !isVoidAllowed) {
-      return const AssignabilityResult(AssignabilityKind.unassignableVoid);
+      assert(implicitInstantiation == null);
+      assert(!needsTearoff);
+      return const AssignabilityResult(AssignabilityKind.unassignableVoid,
+          needsTearOff: false);
     }
 
     IsSubtypeOf isDirectSubtypeResult = typeSchemaEnvironment
@@ -828,9 +803,9 @@
         ? isDirectSubtypeResult.isSubtypeWhenUsingNullabilities()
         : isDirectSubtypeResult.isSubtypeWhenIgnoringNullabilities();
     if (isDirectlyAssignable) {
-      return needsTearoff
-          ? const AssignabilityResult(AssignabilityKind.assignableTearoff)
-          : const AssignabilityResult(AssignabilityKind.assignable);
+      return new AssignabilityResult(AssignabilityKind.assignable,
+          needsTearOff: needsTearoff,
+          implicitInstantiation: implicitInstantiation);
     }
 
     bool isIndirectlyAssignable = isNonNullableByDefault
@@ -841,30 +816,30 @@
     if (!isIndirectlyAssignable) {
       if (isNonNullableByDefault &&
           isDirectSubtypeResult.isSubtypeWhenIgnoringNullabilities()) {
-        return needsTearoff
-            ? new AssignabilityResult.withTypes(
-                AssignabilityKind.unassignableNullabilityTearoff,
-                isDirectSubtypeResult.subtype,
-                isDirectSubtypeResult.supertype)
-            : new AssignabilityResult.withTypes(
-                AssignabilityKind.unassignableNullability,
-                isDirectSubtypeResult.subtype,
-                isDirectSubtypeResult.supertype);
+        return new AssignabilityResult.withTypes(
+            AssignabilityKind.unassignableNullability,
+            isDirectSubtypeResult.subtype,
+            isDirectSubtypeResult.supertype,
+            needsTearOff: needsTearoff,
+            implicitInstantiation: implicitInstantiation);
       } else {
-        return needsTearoff
-            ? const AssignabilityResult(AssignabilityKind.unassignableTearoff)
-            : const AssignabilityResult(AssignabilityKind.unassignable);
+        return new AssignabilityResult(AssignabilityKind.unassignable,
+            needsTearOff: needsTearoff,
+            implicitInstantiation: implicitInstantiation);
       }
     }
     if (isExpressionTypePrecise) {
       // The type of the expression is known precisely, so an implicit
       // downcast is guaranteed to fail.  Insert a compile-time error.
-      return const AssignabilityResult(AssignabilityKind.unassignablePrecise);
+      assert(implicitInstantiation == null);
+      assert(!needsTearoff);
+      return const AssignabilityResult(AssignabilityKind.unassignablePrecise,
+          needsTearOff: false);
     }
     // Insert an implicit downcast.
-    return needsTearoff
-        ? const AssignabilityResult(AssignabilityKind.assignableTearoffCast)
-        : const AssignabilityResult(AssignabilityKind.assignableCast);
+    return new AssignabilityResult(AssignabilityKind.assignableCast,
+        needsTearOff: needsTearoff,
+        implicitInstantiation: implicitInstantiation);
   }
 
   bool isNull(DartType type) {
@@ -901,12 +876,31 @@
     return inferredTypes;
   }
 
+  ObjectAccessTarget _findShownExtensionTypeMember(
+      ExtensionType receiverType, Name name, int fileOffset,
+      {required ObjectAccessTarget defaultTarget,
+      required CallSiteAccessKind callSiteAccessKind,
+      required bool isPotentiallyNullable}) {
+    Extension extension = receiverType.extension;
+    ExtensionTypeShowHideClause? showHideClause = extension.showHideClause;
+    if (showHideClause == null) return defaultTarget;
+
+    kernel.Reference? reference = showHideClause.findShownReference(
+        name, callSiteAccessKind, classHierarchy);
+    if (reference != null) {
+      return new ObjectAccessTarget.interfaceMember(reference.asMember,
+          isPotentiallyNullable: isPotentiallyNullable);
+    } else {
+      return defaultTarget;
+    }
+  }
+
   /// Returns extension member declared immediately for [receiverType].
   ///
   /// If none is found, [defaultTarget] is returned.
-  ObjectAccessTarget _findDirectExtensionMember(
+  ObjectAccessTarget _findDirectExtensionTypeMember(
       ExtensionType receiverType, Name name, int fileOffset,
-      {required ObjectAccessTarget defaultTarget}) {
+      {required ObjectAccessTarget defaultTarget, required bool isSetter}) {
     Member? targetMember;
     Member? targetTearoff;
     ProcedureKind? targetKind;
@@ -915,27 +909,37 @@
       if (descriptor.name == name) {
         switch (descriptor.kind) {
           case ExtensionMemberKind.Method:
-            targetMember = descriptor.member.asMember;
-            targetTearoff ??= targetMember;
-            targetKind = ProcedureKind.Method;
+            if (!isSetter) {
+              targetMember = descriptor.member.asMember;
+              targetTearoff ??= targetMember;
+              targetKind = ProcedureKind.Method;
+            }
             break;
           case ExtensionMemberKind.TearOff:
-            targetTearoff = descriptor.member.asMember;
+            if (!isSetter) {
+              targetTearoff = descriptor.member.asMember;
+            }
             break;
           case ExtensionMemberKind.Getter:
-            targetMember = descriptor.member.asMember;
-            targetTearoff = null;
-            targetKind = ProcedureKind.Getter;
+            if (!isSetter) {
+              targetMember = descriptor.member.asMember;
+              targetTearoff = null;
+              targetKind = ProcedureKind.Getter;
+            }
             break;
           case ExtensionMemberKind.Setter:
-            targetMember = descriptor.member.asMember;
-            targetTearoff = null;
-            targetKind = ProcedureKind.Setter;
+            if (isSetter) {
+              targetMember = descriptor.member.asMember;
+              targetTearoff = null;
+              targetKind = ProcedureKind.Setter;
+            }
             break;
           case ExtensionMemberKind.Operator:
-            targetMember = descriptor.member.asMember;
-            targetTearoff = null;
-            targetKind = ProcedureKind.Operator;
+            if (!isSetter) {
+              targetMember = descriptor.member.asMember;
+              targetTearoff = null;
+              targetKind = ProcedureKind.Operator;
+            }
             break;
           default:
             unhandled("${descriptor.kind}", "_findDirectExtensionMember",
@@ -1041,22 +1045,31 @@
 
         if (typeSchemaEnvironment.isSubtypeOf(
             receiverType, onType, SubtypeCheckMode.withNullabilities)) {
+          ObjectAccessTarget target = const ObjectAccessTarget.missing();
+          if (thisBuilder != null && !thisBuilder.isStatic) {
+            if (thisBuilder.isField) {
+              if (thisBuilder.isExternal) {
+                target = new ObjectAccessTarget.extensionMember(
+                    setter ? thisBuilder.writeTarget! : thisBuilder.readTarget!,
+                    thisBuilder.readTarget,
+                    setter ? ProcedureKind.Setter : ProcedureKind.Getter,
+                    inferredTypeArguments,
+                    isPotentiallyNullable: isPotentiallyNullableAccess);
+              }
+            } else {
+              target = new ObjectAccessTarget.extensionMember(
+                  setter ? thisBuilder.writeTarget! : thisBuilder.invokeTarget!,
+                  thisBuilder.readTarget,
+                  thisBuilder.kind!,
+                  inferredTypeArguments,
+                  isPotentiallyNullable: isPotentiallyNullableAccess);
+            }
+          }
           ExtensionAccessCandidate candidate = new ExtensionAccessCandidate(
               (thisBuilder ?? otherBuilder)!,
               onType,
               onTypeInstantiateToBounds,
-              thisBuilder != null &&
-                      !thisBuilder.isField &&
-                      !thisBuilder.isStatic
-                  ? new ObjectAccessTarget.extensionMember(
-                      setter
-                          ? thisBuilder.writeTarget!
-                          : thisBuilder.invokeTarget!,
-                      thisBuilder.readTarget,
-                      thisBuilder.kind!,
-                      inferredTypeArguments,
-                      isPotentiallyNullable: isPotentiallyNullableAccess)
-                  : const ObjectAccessTarget.missing(),
+              target,
               isPlatform: extensionBuilder.library.importUri.scheme == 'dart');
           if (noneMoreSpecific.isNotEmpty) {
             bool isMostSpecific = true;
@@ -1113,12 +1126,14 @@
   /// be targeted due to, e.g., an incorrect argument count).
   ObjectAccessTarget findInterfaceMember(
       DartType receiverType, Name name, int fileOffset,
-      {bool setter: false,
+      {required CallSiteAccessKind callSiteAccessKind,
       bool instrumented: true,
       bool includeExtensionMethods: false}) {
     // ignore: unnecessary_null_comparison
     assert(receiverType != null && isKnown(receiverType));
 
+    bool isSetter = callSiteAccessKind == CallSiteAccessKind.setterInvocation;
+
     DartType receiverBound = resolveTypeParameter(receiverType);
 
     bool isReceiverTypePotentiallyNullable = isNonNullableByDefault &&
@@ -1131,8 +1146,8 @@
         : coreTypes.objectClass;
 
     if (isReceiverTypePotentiallyNullable) {
-      Member? member =
-          _getInterfaceMember(coreTypes.objectClass, name, setter, fileOffset);
+      Member? member = _getInterfaceMember(
+          coreTypes.objectClass, name, isSetter, fileOffset);
       if (member != null) {
         // Null implements all Object members so this is not considered a
         // potentially nullable access.
@@ -1144,7 +1159,7 @@
             coreTypes.objectClass,
             name,
             fileOffset,
-            setter: setter);
+            setter: isSetter);
         if (target != null) {
           return target;
         }
@@ -1162,7 +1177,8 @@
         case Nullability.nullable:
         case Nullability.legacy:
           // Never? and Never* are equivalent to Null.
-          return findInterfaceMember(const NullType(), name, fileOffset);
+          return findInterfaceMember(const NullType(), name, fileOffset,
+              callSiteAccessKind: callSiteAccessKind);
         case Nullability.undetermined:
           return internalProblem(
               templateInternalProblemUnsupportedNullability.withArguments(
@@ -1176,7 +1192,7 @@
 
     ObjectAccessTarget? target;
     Member? interfaceMember =
-        _getInterfaceMember(classNode, name, setter, fileOffset);
+        _getInterfaceMember(classNode, name, isSetter, fileOffset);
     if (interfaceMember != null) {
       target = new ObjectAccessTarget.interfaceMember(interfaceMember,
           isPotentiallyNullable: isReceiverTypePotentiallyNullable);
@@ -1192,8 +1208,15 @@
           : const ObjectAccessTarget.callFunction();
     } else if (library.enableExtensionTypesInLibrary &&
         receiverBound is ExtensionType) {
-      target = _findDirectExtensionMember(receiverBound, name, fileOffset,
+      target = _findDirectExtensionTypeMember(receiverBound, name, fileOffset,
+          isSetter: isSetter,
           defaultTarget: const ObjectAccessTarget.missing());
+      if (target.kind == ObjectAccessTargetKind.missing) {
+        target = _findShownExtensionTypeMember(receiverBound, name, fileOffset,
+            callSiteAccessKind: callSiteAccessKind,
+            isPotentiallyNullable: isReceiverTypePotentiallyNullable,
+            defaultTarget: const ObjectAccessTarget.missing());
+      }
     } else {
       target = const ObjectAccessTarget.missing();
     }
@@ -1220,7 +1243,7 @@
             classNode,
             name,
             fileOffset,
-            setter: setter,
+            setter: isSetter,
             defaultTarget: target,
             isPotentiallyNullableAccess: true)!;
       } else {
@@ -1229,7 +1252,7 @@
             classNode,
             name,
             fileOffset,
-            setter: setter,
+            setter: isSetter,
             defaultTarget: target)!;
       }
     }
@@ -1889,15 +1912,7 @@
   }
 
   NullAwareGuard createNullAwareGuard(VariableDeclaration variable) {
-    Member? equalsMember =
-        findInterfaceMember(variable.type, equalsName, variable.fileOffset)
-            .member;
-    // Ensure operator == member even for `Never`.
-    equalsMember ??= findInterfaceMember(const DynamicType(), equalsName, -1,
-            instrumented: false)
-        .member!;
-    return new NullAwareGuard(
-        variable, variable.fileOffset, equalsMember, this);
+    return new NullAwareGuard(variable, variable.fileOffset, this);
   }
 
   ExpressionInferenceResult wrapExpressionInferenceResultInProblem(
@@ -3307,6 +3322,25 @@
             'checkGetterReturn', new InstrumentationValueForType(functionType));
       }
     }
+
+    if (isExpressionInvocation) {
+      if (isTopLevel) {
+        // Create an expression invocation for reporting the error during
+        // full inference.
+        return new ExpressionInferenceResult(
+            const InvalidType(),
+            new ExpressionInvocation(receiver, arguments)
+              ..fileOffset = fileOffset);
+      } else {
+        Expression error = helper!.buildProblem(
+            templateImplicitCallOfNonMethod.withArguments(
+                receiverType, isNonNullableByDefault),
+            fileOffset,
+            noLength);
+        return new ExpressionInferenceResult(const InvalidType(), error);
+      }
+    }
+
     ExpressionInferenceResult invocationResult = inferMethodInvocation(
         arguments.fileOffset,
         const Link<NullAwareGuard>(),
@@ -3320,15 +3354,6 @@
         isImplicitCall: true,
         implicitInvocationPropertyName: getter.name);
 
-    if (!isTopLevel && isExpressionInvocation) {
-      Expression error = helper!.buildProblem(
-          templateImplicitCallOfNonMethod.withArguments(
-              receiverType, isNonNullableByDefault),
-          fileOffset,
-          noLength);
-      return new ExpressionInferenceResult(const DynamicType(), error);
-    }
-
     if (!isTopLevel && target.isNullable) {
       // Handles cases like:
       //   C? c;
@@ -3492,6 +3517,24 @@
       }
     }
 
+    if (isExpressionInvocation) {
+      if (isTopLevel) {
+        // Create an expression invocation for reporting the error during
+        // full inference.
+        return new ExpressionInferenceResult(
+            const InvalidType(),
+            new ExpressionInvocation(receiver, arguments)
+              ..fileOffset = fileOffset);
+      } else {
+        Expression error = helper!.buildProblem(
+            templateImplicitCallOfNonMethod.withArguments(
+                receiverType, isNonNullableByDefault),
+            fileOffset,
+            noLength);
+        return new ExpressionInferenceResult(const InvalidType(), error);
+      }
+    }
+
     ExpressionInferenceResult invocationResult = inferMethodInvocation(
         arguments.fileOffset,
         const Link<NullAwareGuard>(),
@@ -3505,15 +3548,6 @@
         hoistedExpressions: hoistedExpressions,
         implicitInvocationPropertyName: field.name);
 
-    if (!isTopLevel && isExpressionInvocation) {
-      Expression error = helper!.buildProblem(
-          templateImplicitCallOfNonMethod.withArguments(
-              receiverType, isNonNullableByDefault),
-          fileOffset,
-          noLength);
-      return new ExpressionInferenceResult(const DynamicType(), error);
-    }
-
     if (!isTopLevel && target.isNullable) {
       // Handles cases like:
       //   C? c;
@@ -3598,7 +3632,9 @@
 
     ObjectAccessTarget target = findInterfaceMember(
         receiverType, name, fileOffset,
-        instrumented: true, includeExtensionMethods: true);
+        instrumented: true,
+        includeExtensionMethods: true,
+        callSiteAccessKind: CallSiteAccessKind.methodInvocation);
 
     switch (target.kind) {
       case ObjectAccessTargetKind.instanceMember:
@@ -3902,10 +3938,11 @@
     }
   }
 
-  /// Performs the type inference steps necessary to instantiate a tear-off
-  /// (if necessary).
-  ExpressionInferenceResult instantiateTearOff(
-      DartType tearoffType, DartType context, Expression expression) {
+  /// Computes the implicit instantiation from an expression of [tearOffType]
+  /// to the [context] type. Return `null` if an implicit instantiation is not
+  /// necessary or possible.
+  ImplicitInstantiation? computeImplicitInstantiation(
+      DartType tearoffType, DartType context) {
     if (tearoffType is FunctionType &&
         context is FunctionType &&
         context.typeParameters.isEmpty) {
@@ -3917,19 +3954,42 @@
         FunctionType instantiatedType = functionType.withoutTypeParameters;
         typeSchemaEnvironment.inferGenericFunctionOrType(instantiatedType,
             typeParameters, [], [], context, inferredTypes, library.library);
-        if (!isTopLevel) {
-          checkBoundsInInstantiation(
-              functionType, inferredTypes, expression.fileOffset,
-              inferred: true);
-          expression = new Instantiation(expression, inferredTypes)
-            ..fileOffset = expression.fileOffset;
-        }
         Substitution substitution =
             Substitution.fromPairs(typeParameters, inferredTypes);
         tearoffType = substitution.substituteType(instantiatedType);
+        return new ImplicitInstantiation(
+            inferredTypes, functionType, tearoffType);
       }
     }
-    return new ExpressionInferenceResult(tearoffType, expression);
+    return null;
+  }
+
+  ExpressionInferenceResult _applyImplicitInstantiation(
+      ImplicitInstantiation? implicitInstantiation,
+      DartType tearOffType,
+      Expression expression) {
+    if (implicitInstantiation != null) {
+      if (!isTopLevel) {
+        checkBoundsInInstantiation(implicitInstantiation.functionType,
+            implicitInstantiation.typeArguments, expression.fileOffset,
+            inferred: true);
+      }
+      expression =
+          new Instantiation(expression, implicitInstantiation.typeArguments)
+            ..fileOffset = expression.fileOffset;
+      tearOffType = implicitInstantiation.instantiatedType;
+    }
+    return new ExpressionInferenceResult(tearOffType, expression);
+  }
+
+  /// Performs the type inference steps necessary to instantiate a tear-off
+  /// (if necessary).
+  ExpressionInferenceResult instantiateTearOff(
+      DartType tearoffType, DartType context, Expression expression) {
+    ImplicitInstantiation? implicitInstantiation =
+        computeImplicitInstantiation(tearoffType, context);
+    return _applyImplicitInstantiation(
+        implicitInstantiation, tearoffType, expression);
   }
 
   /// True if the returned [type] has non-covariant occurrences of any of
@@ -4464,10 +4524,8 @@
   }
 
   /// Creates a `e == null` test for the expression [left] using the
-  /// [fileOffset] as file offset for the created nodes and [equalsMember] as
-  /// the interface target of the created method invocation.
-  Expression createEqualsNull(
-      int fileOffset, Expression left, Member equalsMember) {
+  /// [fileOffset] as file offset for the created nodes.
+  Expression createEqualsNull(int fileOffset, Expression left) {
     return new EqualsNull(left)..fileOffset = fileOffset;
   }
 }
@@ -4801,20 +4859,15 @@
   /// The file offset used for the null-test.
   int _nullAwareFileOffset;
 
-  /// The [Member] used for the == call.
-  final Member _nullAwareEquals;
-
   final TypeInferrerImpl _inferrer;
 
-  NullAwareGuard(this._nullAwareVariable, this._nullAwareFileOffset,
-      this._nullAwareEquals, this._inferrer)
+  NullAwareGuard(
+      this._nullAwareVariable, this._nullAwareFileOffset, this._inferrer)
       // ignore: unnecessary_null_comparison
       : assert(_nullAwareVariable != null),
         // ignore: unnecessary_null_comparison
         assert(_nullAwareFileOffset != null),
         // ignore: unnecessary_null_comparison
-        assert(_nullAwareEquals != null),
-        // ignore: unnecessary_null_comparison
         assert(_inferrer != null) {
     // Ensure the initializer of [_nullAwareVariable] is promoted to
     // non-nullable.
@@ -4843,8 +4896,8 @@
     _inferrer.flowAnalysis.nullAwareAccess_end();
     // End non-nullable promotion of the initializer of [_nullAwareVariable].
     _inferrer.flowAnalysis.nullAwareAccess_end();
-    Expression equalsNull = _inferrer.createEqualsNull(_nullAwareFileOffset,
-        createVariableGet(_nullAwareVariable), _nullAwareEquals);
+    Expression equalsNull = _inferrer.createEqualsNull(
+        _nullAwareFileOffset, createVariableGet(_nullAwareVariable));
     ConditionalExpression condition = new ConditionalExpression(
         equalsNull,
         new NullLiteral()..fileOffset = _nullAwareFileOffset,
@@ -4857,8 +4910,7 @@
 
   @override
   String toString() =>
-      'NullAwareGuard($_nullAwareVariable,$_nullAwareFileOffset,'
-      '$_nullAwareEquals)';
+      'NullAwareGuard($_nullAwareVariable,$_nullAwareFileOffset)';
 }
 
 /// The result of an expression inference that is guarded with a null aware
@@ -5204,12 +5256,6 @@
   /// Assignable, but needs an implicit downcast.
   assignableCast,
 
-  /// Assignable, but needs a tearoff due to a function context.
-  assignableTearoff,
-
-  /// Assignable, but needs both a tearoff and an implicit downcast.
-  assignableTearoffCast,
-
   /// Unconditionally unassignable.
   unassignable,
 
@@ -5219,30 +5265,27 @@
   /// The right-hand side type is precise, and the downcast will fail.
   unassignablePrecise,
 
-  /// Unassignable, but needs a tearoff of "call" for better error reporting.
-  unassignableTearoff,
-
   /// Unassignable because the tear-off can't be done on the nullable receiver.
   unassignableCantTearoff,
 
   /// Unassignable only because of nullability modifiers.
   unassignableNullability,
-
-  /// Unassignable because of nullability and needs a tearoff of "call" for
-  /// better error reporting.
-  unassignableNullabilityTearoff,
 }
 
 class AssignabilityResult {
   final AssignabilityKind kind;
   final DartType? subtype; // Can be null.
   final DartType? supertype; // Can be null.
+  final bool needsTearOff;
+  final ImplicitInstantiation? implicitInstantiation;
 
-  const AssignabilityResult(this.kind)
+  const AssignabilityResult(this.kind,
+      {required this.needsTearOff, this.implicitInstantiation})
       : subtype = null,
         supertype = null;
 
-  AssignabilityResult.withTypes(this.kind, this.subtype, this.supertype);
+  AssignabilityResult.withTypes(this.kind, this.subtype, this.supertype,
+      {required this.needsTearOff, this.implicitInstantiation});
 }
 
 /// Convenient way to return both a tear-off expression and its type.
@@ -5324,3 +5367,17 @@
 // TODO(johnniwinther): Should we have a special DartType implementation for
 // this.
 final DartType noInferredType = new UnknownType();
+
+class ImplicitInstantiation {
+  /// The type arguments for the instantiation.
+  final List<DartType> typeArguments;
+
+  /// The function type before the instantiation.
+  final FunctionType functionType;
+
+  /// The function type after the instantiation.
+  final DartType instantiatedType;
+
+  ImplicitInstantiation(
+      this.typeArguments, this.functionType, this.instantiatedType);
+}
diff --git a/pkg/front_end/lib/src/fasta/util/direct_parser_ast_helper.dart b/pkg/front_end/lib/src/fasta/util/direct_parser_ast_helper.dart
index 1b9883e..8c34151 100644
--- a/pkg/front_end/lib/src/fasta/util/direct_parser_ast_helper.dart
+++ b/pkg/front_end/lib/src/fasta/util/direct_parser_ast_helper.dart
@@ -216,6 +216,19 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    DirectParserASTContentExtensionShowHideHandle data =
+        new DirectParserASTContentExtensionShowHideHandle(
+            DirectParserASTType.HANDLE,
+            showKeyword: showKeyword,
+            showElementCount: showElementCount,
+            hideKeyword: hideKeyword,
+            hideElementCount: hideElementCount);
+    seen(data);
+  }
+
+  @override
   void handleClassHeader(Token begin, Token classKeyword, Token? nativeToken) {
     DirectParserASTContentClassHeaderHandle data =
         new DirectParserASTContentClassHeaderHandle(DirectParserASTType.HANDLE,
@@ -311,13 +324,15 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     DirectParserASTContentExtensionDeclarationEnd data =
         new DirectParserASTContentExtensionDeclarationEnd(
             DirectParserASTType.END,
             extensionKeyword: extensionKeyword,
             typeKeyword: typeKeyword,
             onKeyword: onKeyword,
+            showKeyword: showKeyword,
+            hideKeyword: hideKeyword,
             endToken: endToken);
     seen(data);
   }
@@ -2314,6 +2329,16 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    DirectParserASTContentShowHideIdentifierHandle data =
+        new DirectParserASTContentShowHideIdentifierHandle(
+            DirectParserASTType.HANDLE,
+            modifier: modifier,
+            identifier: identifier);
+    seen(data);
+  }
+
+  @override
   void handleIndexedExpression(
       Token? question, Token openSquareBracket, Token closeSquareBracket) {
     DirectParserASTContentIndexedExpressionHandle data =
@@ -3157,6 +3182,29 @@
       };
 }
 
+class DirectParserASTContentExtensionShowHideHandle
+    extends DirectParserASTContent {
+  final Token? showKeyword;
+  final int showElementCount;
+  final Token? hideKeyword;
+  final int hideElementCount;
+
+  DirectParserASTContentExtensionShowHideHandle(DirectParserASTType type,
+      {this.showKeyword,
+      required this.showElementCount,
+      this.hideKeyword,
+      required this.hideElementCount})
+      : super("ExtensionShowHide", type);
+
+  @override
+  Map<String, Object?> get deprecatedArguments => {
+        "showKeyword": showKeyword,
+        "showElementCount": showElementCount,
+        "hideKeyword": hideKeyword,
+        "hideElementCount": hideElementCount,
+      };
+}
+
 class DirectParserASTContentClassHeaderHandle extends DirectParserASTContent {
   final Token begin;
   final Token classKeyword;
@@ -3317,12 +3365,16 @@
   final Token extensionKeyword;
   final Token? typeKeyword;
   final Token onKeyword;
+  final Token? showKeyword;
+  final Token? hideKeyword;
   final Token endToken;
 
   DirectParserASTContentExtensionDeclarationEnd(DirectParserASTType type,
       {required this.extensionKeyword,
       this.typeKeyword,
       required this.onKeyword,
+      this.showKeyword,
+      this.hideKeyword,
       required this.endToken})
       : super("ExtensionDeclaration", type);
 
@@ -3331,6 +3383,8 @@
         "extensionKeyword": extensionKeyword,
         "typeKeyword": typeKeyword,
         "onKeyword": onKeyword,
+        "showKeyword": showKeyword,
+        "hideKeyword": hideKeyword,
         "endToken": endToken,
       };
 }
@@ -6627,6 +6681,22 @@
       };
 }
 
+class DirectParserASTContentShowHideIdentifierHandle
+    extends DirectParserASTContent {
+  final Token? modifier;
+  final Token identifier;
+
+  DirectParserASTContentShowHideIdentifierHandle(DirectParserASTType type,
+      {this.modifier, required this.identifier})
+      : super("ShowHideIdentifier", type);
+
+  @override
+  Map<String, Object?> get deprecatedArguments => {
+        "modifier": modifier,
+        "identifier": identifier,
+      };
+}
+
 class DirectParserASTContentIndexedExpressionHandle
     extends DirectParserASTContent {
   final Token? question;
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 fe35178..3392abe 100644
--- a/pkg/front_end/lib/src/fasta/util/textual_outline.dart
+++ b/pkg/front_end/lib/src/fasta/util/textual_outline.dart
@@ -805,7 +805,7 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     classStartToChunk[extensionKeyword] =
         new _ExtensionDeclarationChunk(extensionKeyword, endToken);
   }
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index a95566c..9ae38bb 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -7,8 +7,9 @@
 
 import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
 
-import 'package:kernel/kernel.dart'
-    show CanonicalName, Component, NonNullableByDefaultCompiledMode;
+import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/core_types.dart';
 
 import 'base/nnbd_mode.dart';
 
@@ -22,15 +23,13 @@
 
 import 'fasta/fasta_codes.dart' show LocatedMessage;
 
-import 'fasta/kernel/kernel_api.dart';
-
 import 'fasta/kernel/kernel_target.dart' show KernelTarget;
 
 import 'fasta/kernel/utils.dart' show printComponentText, serializeComponent;
 
 import 'fasta/kernel/verifier.dart' show verifyComponent;
 
-import 'fasta/loader.dart' show Loader;
+import 'fasta/source/source_loader.dart' show SourceLoader;
 
 import 'fasta/uri_translator.dart' show UriTranslator;
 
@@ -68,7 +67,7 @@
   options.reportNullSafetyCompilationModeInfo();
   FileSystem fs = options.fileSystem;
 
-  Loader? sourceLoader;
+  SourceLoader? sourceLoader;
   return withCrashReporting<CompilerResult>(() async {
     UriTranslator uriTranslator = await options.getUriTranslator();
 
@@ -91,7 +90,7 @@
       dillTarget.loader.appendLibraries(additionalDill);
     }
 
-    await dillTarget.buildOutlines();
+    dillTarget.buildOutlines();
 
     KernelTarget kernelTarget =
         new KernelTarget(fs, false, dillTarget, uriTranslator);
diff --git a/pkg/front_end/lib/src/testing/id_extractor.dart b/pkg/front_end/lib/src/testing/id_extractor.dart
index 0f7429d..0cfa685 100644
--- a/pkg/front_end/lib/src/testing/id_extractor.dart
+++ b/pkg/front_end/lib/src/testing/id_extractor.dart
@@ -312,7 +312,7 @@
 
   @override
   void visitVariableGet(VariableGet node) {
-    if (node.variable.name != null && !node.variable.isFieldFormal) {
+    if (node.variable.name != null && !node.variable.isInitializingFormal) {
       // Skip use of synthetic variables.
       computeForNode(node, computeDefaultNodeId(node));
     }
diff --git a/pkg/front_end/lib/src/testing/id_testing_helper.dart b/pkg/front_end/lib/src/testing/id_testing_helper.dart
index dead4a2..2a8c8c8 100644
--- a/pkg/front_end/lib/src/testing/id_testing_helper.dart
+++ b/pkg/front_end/lib/src/testing/id_testing_helper.dart
@@ -77,7 +77,9 @@
   void setup() {}
 
   // Called to allow for (awaited) inspection of the compilation result.
-  Future<void> inspectComponent(Component component) async {}
+  Future<void> inspectComponent(Component component) {
+    return new Future.value(null);
+  }
 
   /// Function that computes a data mapping for [member].
   ///
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 043ae81..d3859ab 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -5,9 +5,9 @@
 # Each entry in this map corresponds to a diagnostic message. Ideally, each
 # entry contains three parts:
 #
-# 1. A message template (template).
+# 1. A message template (problemMessage).
 #
-# 2. A suggestion for how to correct the problem (tip).
+# 2. A suggestion for how to correct the problem (correctionMessage).
 #
 # 3. Examples that produce the message (one of expression, statement,
 #    declaration, member, script, bytes or external). Note that 'external'
@@ -53,11 +53,11 @@
 # In some cases a message is internal to the frontend, and no meaningful
 # analyzer code can be provided. In such cases set `frontendInternal: true`.
 #
-# ## Parameter Substitution in Template and Tip
+# ## Parameter Substitution in problemMessage and correctionMessage
 #
-# The fields `template` and `tip` are subject to parameter substitution. When
-# the compiler reports a problem, it may also specify a map with the following
-# keys to be substituted into the message:
+# The fields `problemMessage` and `correctionMessage` are subject to parameter
+# substitution. When the compiler reports a problem, it may also specify a map
+# with the following keys to be substituted into the message:
 #
 # `#character` a Unicode character.
 #
@@ -99,155 +99,155 @@
 # width N and with M fraction digits.
 
 AsciiControlCharacter:
-  template: "The control character #unicode can only be used in strings and comments."
+  problemMessage: "The control character #unicode can only be used in strings and comments."
   analyzerCode: ILLEGAL_CHARACTER
   expression: "\x1b 1"
 
 ConstEvalStartingPoint:
-  template: "Constant evaluation error:"
+  problemMessage: "Constant evaluation error:"
 
 ConstEvalContext:
-  template: "While analyzing:"
+  problemMessage: "While analyzing:"
 
 ConstEvalDuplicateElement:
-  template: "The element '#constant' conflicts with another existing element in the set."
+  problemMessage: "The element '#constant' conflicts with another existing element in the set."
   analyzerCode: EQUAL_ELEMENTS_IN_CONST_SET
 
 ConstEvalDuplicateKey:
-  template: "The key '#constant' conflicts with another existing key in the map."
+  problemMessage: "The key '#constant' conflicts with another existing key in the map."
   analyzerCode: EQUAL_KEYS_IN_CONST_MAP
 
 ConstEvalElementImplementsEqual:
-  template: "The element '#constant' does not have a primitive operator '=='."
+  problemMessage: "The element '#constant' does not have a primitive operator '=='."
   analyzerCode: CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS
 
 ConstEvalKeyImplementsEqual:
-  template: "The key '#constant' does not have a primitive operator '=='."
+  problemMessage: "The key '#constant' does not have a primitive operator '=='."
   analyzerCode: CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
 
 ConstEvalCaseImplementsEqual:
-  template: "Case expression '#constant' does not have a primitive operator '=='."
+  problemMessage: "Case expression '#constant' does not have a primitive operator '=='."
 
 ConstEvalInvalidType:
-  template: "Expected constant '#constant' to be of type '#type', but was of type '#type2'."
+  problemMessage: "Expected constant '#constant' to be of type '#type', but was of type '#type2'."
 
 ConstEvalInvalidBinaryOperandType:
-  template: "Binary operator '#stringOKEmpty' on '#constant' requires operand of type '#type', but was of type '#type2'."
+  problemMessage: "Binary operator '#stringOKEmpty' on '#constant' requires operand of type '#type', but was of type '#type2'."
 
 ConstEvalInvalidEqualsOperandType:
-  template: "Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'."
+  problemMessage: "Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'."
 
 ConstEvalZeroDivisor:
-  template: "Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'."
+  problemMessage: "Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'."
   analyzerCode: CONST_EVAL_THROWS_IDBZE
 
 ConstEvalNegativeShift:
-  template: "Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'."
+  problemMessage: "Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'."
 
 ConstEvalTruncateError:
-  template: "Binary operator '#string ~/ #string2' results is Infinity or NaN."
+  problemMessage: "Binary operator '#string ~/ #string2' results is Infinity or NaN."
 
 ConstEvalNonNull:
-  template: "Constant expression must be non-null."
+  problemMessage: "Constant expression must be non-null."
 
 ConstEvalGetterNotFound:
-  template: "Variable get not found: '#nameOKEmpty'"
+  problemMessage: "Variable get not found: '#nameOKEmpty'"
 
 ConstEvalInvalidMethodInvocation:
-  template: "The method '#stringOKEmpty' can't be invoked on '#constant' in a constant expression."
+  problemMessage: "The method '#stringOKEmpty' can't be invoked on '#constant' in a constant expression."
   analyzerCode: UNDEFINED_OPERATOR
 
 ConstEvalInvalidPropertyGet:
-  template: "The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression."
+  problemMessage: "The property '#stringOKEmpty' can't be accessed on '#constant' in a constant expression."
   analyzerCode: CONST_EVAL_THROWS_EXCEPTION
 
 ConstEvalInvalidStringInterpolationOperand:
-  template: |
+  problemMessage: |
     The constant value '#constant' can't be used as part of a string interpolation in a constant expression.
     Only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.
   analyzerCode: CONST_EVAL_TYPE_BOOL_NUM_STRING
 
 ConstEvalInvalidStaticInvocation:
-  template: "The invocation of '#nameOKEmpty' is not allowed in a constant expression."
+  problemMessage: "The invocation of '#nameOKEmpty' is not allowed in a constant expression."
   analyzerCode: CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
 
 ConstEvalInvalidSymbolName:
-  template: "The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '#constant'."
+  problemMessage: "The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '#constant'."
   analyzerCode: CONST_EVAL_THROWS_EXCEPTION
 
 ConstEvalFailedAssertion:
-  template: "This assertion failed."
+  problemMessage: "This assertion failed."
   analyzerCode: CONST_EVAL_THROWS_EXCEPTION
 
 ConstEvalFailedAssertionWithMessage:
-  template: "This assertion failed with message: #stringOKEmpty"
+  problemMessage: "This assertion failed with message: #stringOKEmpty"
   analyzerCode: CONST_EVAL_THROWS_EXCEPTION
 
 ConstEvalNonConstantVariableGet:
-  template: "The variable '#nameOKEmpty' is not a constant, only constant expressions are allowed."
+  problemMessage: "The variable '#nameOKEmpty' is not a constant, only constant expressions are allowed."
   analyzerCode: NON_CONSTANT_VALUE_IN_INITIALIZER
 
 ConstEvalDeferredLibrary:
-  template: >
+  problemMessage: >
     '#nameOKEmpty' can't be used in a constant expression because it's marked as
     'deferred' which means it isn't available until loaded.
-  tip: >
+  correctionMessage: >
     Try moving the constant from the deferred library, or removing 'deferred'
     from the import.
   analyzerCode: INVALID_ANNOTATION_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY
 
 ConstEvalFreeTypeParameter:
-  template: "The type '#type' is not a constant because it depends on a type parameter, only instantiated types are allowed."
+  problemMessage: "The type '#type' is not a constant because it depends on a type parameter, only instantiated types are allowed."
 
 ConstEvalCircularity:
-  template: "Constant expression depends on itself."
+  problemMessage: "Constant expression depends on itself."
   analyzerCode: RECURSIVE_COMPILE_TIME_CONSTANT
 
 ConstEvalNullValue:
-  template: "Null value during constant evaluation."
+  problemMessage: "Null value during constant evaluation."
   analyzerCode: CONST_EVAL_THROWS_EXCEPTION
 
 ConstEvalNotListOrSetInSpread:
-  template: "Only lists and sets can be used in spreads in constant lists and sets."
+  problemMessage: "Only lists and sets can be used in spreads in constant lists and sets."
   analyzerCode: CONST_SPREAD_EXPECTED_LIST_OR_SET
 
 ConstEvalNotMapInSpread:
-  template: "Only maps can be used in spreads in constant maps."
+  problemMessage: "Only maps can be used in spreads in constant maps."
   analyzerCode: CONST_SPREAD_EXPECTED_MAP
 
 ConstEvalExtension:
-  template: "Extension operations can't be used in constant expressions."
+  problemMessage: "Extension operations can't be used in constant expressions."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 ConstEvalExternalConstructor:
-  template: "External constructors can't be evaluated in constant expressions."
+  problemMessage: "External constructors can't be evaluated in constant expressions."
 
 ConstEvalExternalFactory:
-  template: "External factory constructors can't be evaluated in constant expressions."
+  problemMessage: "External factory constructors can't be evaluated in constant expressions."
 
 ConstEvalUnevaluated:
-  template: "Couldn't evaluate constant expression."
+  problemMessage: "Couldn't evaluate constant expression."
 
 ConstEvalError:
-  template: "Error evaluating constant expression: #string"
+  problemMessage: "Error evaluating constant expression: #string"
 
 ConstEvalUnhandledCoreException:
-  template: "Unhandled core exception: #stringOKEmpty"
+  problemMessage: "Unhandled core exception: #stringOKEmpty"
 
 ConstEvalUnhandledException:
-  template: "Unhandled exception: #constant"
+  problemMessage: "Unhandled exception: #constant"
 
 NotConstantExpression:
-  template: "#string is not a constant expression."
+  problemMessage: "#string is not a constant expression."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 NotAConstantExpression:
-  template: "Not a constant expression."
+  problemMessage: "Not a constant expression."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 MissingExplicitConst:
-  template: "Constant expression expected."
-  tip: "Try inserting 'const'."
+  problemMessage: "Constant expression expected."
+  correctionMessage: "Try inserting 'const'."
   analyzerCode: NOT_CONSTANT_EXPRESSION
   script: >
     class A {
@@ -256,48 +256,48 @@
     }
 
 NonAsciiIdentifier:
-  template: "The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments."
-  tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign)."
+  problemMessage: "The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments."
+  correctionMessage: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign)."
   analyzerCode: ILLEGAL_CHARACTER
   expression: "å"
 
 NonAsciiWhitespace:
-  template: "The non-ASCII space character #unicode can only be used in strings and comments."
+  problemMessage: "The non-ASCII space character #unicode can only be used in strings and comments."
   analyzerCode: ILLEGAL_CHARACTER
   expression: "\u2028 1"
 
 Encoding:
-  template: "Unable to decode bytes as UTF-8."
+  problemMessage: "Unable to decode bytes as UTF-8."
   bytes: [255]
 
 ExperimentNotEnabled:
   index: 48
-  template: "This requires the '#string' language feature to be enabled."
-  tip: "Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'."
+  problemMessage: "This requires the '#string' language feature to be enabled."
+  correctionMessage: "Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
 ExperimentNotEnabledNoFlag:
-  template: "This requires the null safety language feature, which is experimental."
-  tip: "You can enable the experiment using the '--enable-experiment=non-nullable' command line option."
+  problemMessage: "This requires the null safety language feature, which is experimental."
+  correctionMessage: "You can enable the experiment using the '--enable-experiment=non-nullable' command line option."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
 ExperimentNotEnabledNoFlagInvalidLanguageVersion:
-  template: "This requires the null safety language feature, which is experimental and requires language version of #string2 or higher."
-  tip: "You can enable the experiment using the '--enable-experiment=non-nullable' command line option."
+  problemMessage: "This requires the null safety language feature, which is experimental and requires language version of #string2 or higher."
+  correctionMessage: "You can enable the experiment using the '--enable-experiment=non-nullable' command line option."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
 ExperimentDisabled:
-  template: "This requires the '#string' language feature to be enabled."
-  tip: "The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-#string' command line option is passed."
+  problemMessage: "This requires the '#string' language feature to be enabled."
+  correctionMessage: "The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-#string' command line option is passed."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
 ExperimentDisabledInvalidLanguageVersion:
-  template: "This requires the null safety language feature, which requires language version of #string2 or higher."
+  problemMessage: "This requires the null safety language feature, which requires language version of #string2 or higher."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
 EmptyNamedParameterList:
-  template: "Named parameter lists cannot be empty."
-  tip: "Try adding a named parameter to the list."
+  problemMessage: "Named parameter lists cannot be empty."
+  correctionMessage: "Try adding a named parameter to the list."
   analyzerCode: "MISSING_IDENTIFIER"
   script: >
     foo({}) {}
@@ -307,8 +307,8 @@
     }
 
 EmptyOptionalParameterList:
-  template: "Optional parameter lists cannot be empty."
-  tip: "Try adding an optional parameter to the list."
+  problemMessage: "Optional parameter lists cannot be empty."
+  correctionMessage: "Try adding an optional parameter to the list."
   analyzerCode: "MISSING_IDENTIFIER"
   script: >
     foo([]) {}
@@ -319,38 +319,38 @@
 
 ExpectedElseOrComma:
   index: 46
-  template: "Expected 'else' or comma."
+  problemMessage: "Expected 'else' or comma."
   analyzerCode: ParserErrorCode.EXPECTED_ELSE_OR_COMMA
 
 ExpectedBlock:
-  template: "Expected a block."
-  tip: "Try adding {}."
+  problemMessage: "Expected a block."
+  correctionMessage: "Try adding {}."
   analyzerCode: EXPECTED_TOKEN
   script: "try finally {}"
 
 ExpectedBlockToSkip:
-  template: "Expected a function body or '=>'."
+  problemMessage: "Expected a function body or '=>'."
   # TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword.
-  tip: "Try adding {}."
+  correctionMessage: "Try adding {}."
   analyzerCode: MISSING_FUNCTION_BODY
   script: "main();"
 
 ExpectedBody:
-  template: "Expected a function body or '=>'."
+  problemMessage: "Expected a function body or '=>'."
   # TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword.
-  tip: "Try adding {}."
+  correctionMessage: "Try adding {}."
   analyzerCode: MISSING_FUNCTION_BODY
   script: "main();"
 
 ExpectedStatement:
   index: 29
-  template: "Expected a statement."
+  problemMessage: "Expected a statement."
   analyzerCode: ParserErrorCode.MISSING_STATEMENT
   statement: "void;"
 
 ExpectedButGot:
   # Also see ExpectedAfterButGot and ExpectedInstead
-  template: "Expected '#string' before this."
+  problemMessage: "Expected '#string' before this."
   # Consider the second example below: the parser expects a ')' before 'y', but
   # a ',' would also have worked. We don't have enough information to give a
   # good suggestion.
@@ -361,7 +361,7 @@
 
 ExpectedAfterButGot:
   # Also see ExpectedButGot and ExpectedInstead
-  template: "Expected '#string' after this."
+  problemMessage: "Expected '#string' after this."
   # This is an alternative to ExpectedButGot when it's better for the error to be
   # associated with the last consumed token rather than the token being parsed.
   # Doing so can make it cognitively easier for the user to understand and fix.
@@ -387,7 +387,7 @@
 ExpectedInstead:
   # Also see ExpectedButGot and ExpectedAfterButGot
   index: 41
-  template: "Expected '#string' instead of this."
+  problemMessage: "Expected '#string' instead of this."
   # This is an alternative to ExpectedButGot when the last consumed token
   # should be replaced with a different token.
   #
@@ -409,14 +409,14 @@
 
 MultipleLibraryDirectives:
   index: 27
-  template: "Only one library directive may be declared in a file."
-  tip: "Try removing all but one of the library directives."
+  problemMessage: "Only one library directive may be declared in a file."
+  correctionMessage: "Try removing all but one of the library directives."
   analyzerCode: ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES
 
 MultipleExtends:
   index: 28
-  template: "Each class definition can have at most one extends clause."
-  tip: "Try choosing one superclass and define your class to implement (or mix in) the others."
+  problemMessage: "Each class definition can have at most one extends clause."
+  correctionMessage: "Try choosing one superclass and define your class to implement (or mix in) the others."
   analyzerCode: ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES
   script:
     - "class B{} class C{} class A extends B extends C {}"
@@ -424,43 +424,43 @@
 
 MultipleWith:
   index: 24
-  template: "Each class definition can have at most one with clause."
-  tip: "Try combining all of the with clauses into a single clause."
+  problemMessage: "Each class definition can have at most one with clause."
+  correctionMessage: "Try combining all of the with clauses into a single clause."
   analyzerCode: ParserErrorCode.MULTIPLE_WITH_CLAUSES
   script: "class A extends B with C, D with E {}"
 
 WithBeforeExtends:
   index: 11
-  template: "The extends clause must be before the with clause."
-  tip: "Try moving the extends clause before the with clause."
+  problemMessage: "The extends clause must be before the with clause."
+  correctionMessage: "Try moving the extends clause before the with clause."
   analyzerCode: ParserErrorCode.WITH_BEFORE_EXTENDS
   script: "class B {} class C {} class A with B extends C {}"
 
 ImplementsBeforeExtends:
   index: 44
-  template: "The extends clause must be before the implements clause."
-  tip: "Try moving the extends clause before the implements clause."
+  problemMessage: "The extends clause must be before the implements clause."
+  correctionMessage: "Try moving the extends clause before the implements clause."
   analyzerCode: ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS
   script: "class A implements B extends C {}"
 
 ImplementsBeforeOn:
   index: 43
-  template: "The on clause must be before the implements clause."
-  tip: "Try moving the on clause before the implements clause."
+  problemMessage: "The on clause must be before the implements clause."
+  correctionMessage: "Try moving the on clause before the implements clause."
   analyzerCode: ParserErrorCode.IMPLEMENTS_BEFORE_ON
   script: "mixin A implements B on C {}"
 
 ImplementsBeforeWith:
   index: 42
-  template: "The with clause must be before the implements clause."
-  tip: "Try moving the with clause before the implements clause."
+  problemMessage: "The with clause must be before the implements clause."
+  correctionMessage: "Try moving the with clause before the implements clause."
   analyzerCode: ParserErrorCode.IMPLEMENTS_BEFORE_WITH
   script: "class A extends B implements C with D {}"
 
 ImplementsRepeated:
-  template: "'#name' can only be implemented once."
+  problemMessage: "'#name' can only be implemented once."
   analyzerCode: IMPLEMENTS_REPEATED
-  tip: "Try removing #count of the occurrences."
+  correctionMessage: "Try removing #count of the occurrences."
   script:
     - >-
       abstract class I {}
@@ -468,65 +468,65 @@
       class K implements I, J, I {}
 
 ImplementsSuperClass:
-  template: "'#name' can't be used in both 'extends' and 'implements' clauses."
+  problemMessage: "'#name' can't be used in both 'extends' and 'implements' clauses."
   analyzerCode: IMPLEMENTS_SUPER_CLASS
-  tip: "Try removing one of the occurrences."
+  correctionMessage: "Try removing one of the occurrences."
   script:
     - >-
       abstract class A {}
       class C extends A implements A {}
 
 MultipleImplements:
-  template: "Each class definition can have at most one implements clause."
-  tip: "Try combining all of the implements clauses into a single clause."
+  problemMessage: "Each class definition can have at most one implements clause."
+  correctionMessage: "Try combining all of the implements clauses into a single clause."
   analyzerCode: MULTIPLE_IMPLEMENTS_CLAUSES
   script: "class A implements B implements C, D {}"
 
 MultipleOnClauses:
   index: 26
-  template: "Each mixin definition can have at most one on clause."
-  tip: "Try combining all of the on clauses into a single clause."
+  problemMessage: "Each mixin definition can have at most one on clause."
+  correctionMessage: "Try combining all of the on clauses into a single clause."
   analyzerCode: ParserErrorCode.MULTIPLE_ON_CLAUSES
   script: "mixin A on B on C, D {}"
 
 ExtendsFutureOr:
-  template: "The type 'FutureOr' can't be used in an 'extends' clause."
+  problemMessage: "The type 'FutureOr' can't be used in an 'extends' clause."
 
 ImplementsFutureOr:
-  template: "The type 'FutureOr' can't be used in an 'implements' clause."
+  problemMessage: "The type 'FutureOr' can't be used in an 'implements' clause."
 
 ExtendsNever:
-  template: "The type 'Never' can't be used in an 'extends' clause."
+  problemMessage: "The type 'Never' can't be used in an 'extends' clause."
 
 ImplementsNever:
-  template: "The type 'Never' can't be used in an 'implements' clause."
+  problemMessage: "The type 'Never' can't be used in an 'implements' clause."
 
 ExtendsVoid:
-  template: "The type 'void' can't be used in an 'extends' clause."
+  problemMessage: "The type 'void' can't be used in an 'extends' clause."
 
 ImplementsVoid:
-  template: "The type 'void' can't be used in an 'implements' clause."
+  problemMessage: "The type 'void' can't be used in an 'implements' clause."
 
 ExpectedClassOrMixinBody:
   index: 8
-  template: "A #string must have a body, even if it is empty."
-  tip: "Try adding an empty body."
+  problemMessage: "A #string must have a body, even if it is empty."
+  correctionMessage: "Try adding an empty body."
   analyzerCode: ParserErrorCode.EXPECTED_BODY
 
 ExpectedDeclaration:
-  template: "Expected a declaration, but got '#lexeme'."
+  problemMessage: "Expected a declaration, but got '#lexeme'."
   analyzerCode: EXPECTED_EXECUTABLE
 
 ExpectedClassMember:
-  template: "Expected a class member, but got '#lexeme'."
+  problemMessage: "Expected a class member, but got '#lexeme'."
   analyzerCode: EXPECTED_CLASS_MEMBER
 
 ExpectedFunctionBody:
-  template: "Expected a function body, but got '#lexeme'."
+  problemMessage: "Expected a function body, but got '#lexeme'."
   analyzerCode: MISSING_FUNCTION_BODY
 
 ExpectedHexDigit:
-  template: "A hex digit (0-9 or A-F) must follow '0x'."
+  problemMessage: "A hex digit (0-9 or A-F) must follow '0x'."
   # No tip, seems obvious from the error message.
   analyzerCode: MISSING_HEX_DIGIT
   script: >
@@ -535,68 +535,68 @@
     }
 
 ExpectedIdentifier:
-  template: "Expected an identifier, but got '#lexeme'."
-  tip: "Try inserting an identifier before '#lexeme'."
+  problemMessage: "Expected an identifier, but got '#lexeme'."
+  correctionMessage: "Try inserting an identifier before '#lexeme'."
   analyzerCode: MISSING_IDENTIFIER
   script: "var = 42;"
 
 ExpectedIdentifierButGotKeyword:
-  template: "'#lexeme' can't be used as an identifier because it's a keyword."
-  tip: "Try renaming this to be an identifier that isn't a keyword."
+  problemMessage: "'#lexeme' can't be used as an identifier because it's a keyword."
+  correctionMessage: "Try renaming this to be an identifier that isn't a keyword."
   index: 113
   analyzerCode: ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD
   script: "var default = 42;"
 
 EqualityCannotBeEqualityOperand:
   index: 1
-  template: "A comparison expression can't be an operand of another comparison expression."
-  tip: "Try putting parentheses around one of the comparisons."
+  problemMessage: "A comparison expression can't be an operand of another comparison expression."
+  correctionMessage: "Try putting parentheses around one of the comparisons."
   analyzerCode: ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND
   script:
     - "main() { var b = a < b < c; }"
     - "main() { var b = a == b != c; }"
 
 ExpectedOpenParens:
-  template: "Expected '('."
+  problemMessage: "Expected '('."
 
 ExpectedString:
-  template: "Expected a String, but got '#lexeme'."
+  problemMessage: "Expected a String, but got '#lexeme'."
   analyzerCode: EXPECTED_STRING_LITERAL
 
 ExpectedToken:
-  template: "Expected to find '#string'."
+  problemMessage: "Expected to find '#string'."
   analyzerCode: EXPECTED_TOKEN
 
 ExpectedType:
-  template: "Expected a type, but got '#lexeme'."
+  problemMessage: "Expected a type, but got '#lexeme'."
   analyzerCode: EXPECTED_TYPE_NAME
 
 VarAsTypeName:
   index: 61
-  template: "The keyword 'var' can't be used as a type name."
+  problemMessage: "The keyword 'var' can't be used as a type name."
   analyzerCode: ParserErrorCode.VAR_AS_TYPE_NAME
   script:
     - "class A { Map<String, var> m; }"
 
 MissingExpressionInThrow:
   index: 32
-  template: "Missing expression after 'throw'."
-  tip: "Add an expression after 'throw' or use 'rethrow' to throw a caught exception"
+  problemMessage: "Missing expression after 'throw'."
+  correctionMessage: "Add an expression after 'throw' or use 'rethrow' to throw a caught exception"
   analyzerCode: ParserErrorCode.MISSING_EXPRESSION_IN_THROW
   statement:
     - "throw;"
 
 MissingConstFinalVarOrType:
   index: 33
-  template: "Variables must be declared using the keywords 'const', 'final', 'var' or a type name."
-  tip: "Try adding the name of the type of the variable or the keyword 'var'."
+  problemMessage: "Variables must be declared using the keywords 'const', 'final', 'var' or a type name."
+  correctionMessage: "Try adding the name of the type of the variable or the keyword 'var'."
   analyzerCode: ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
   script:
     - "class C { static f; }"
 
 FunctionTypedParameterVar:
-  template: "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type."
-  tip: "Try replacing the keyword with a return type."
+  problemMessage: "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type."
+  correctionMessage: "Try replacing the keyword with a return type."
   analyzerCode: FUNCTION_TYPED_PARAMETER_VAR
   script:
     - "void f(const x()) {}"
@@ -605,8 +605,8 @@
 
 AbstractClassMember:
   index: 51
-  template: "Members of classes can't be declared to be 'abstract'."
-  tip: "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration."
+  problemMessage: "Members of classes can't be declared to be 'abstract'."
+  correctionMessage: "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration."
   analyzerCode: ParserErrorCode.ABSTRACT_CLASS_MEMBER
   script:
     - |
@@ -626,9 +626,9 @@
 
 AbstractExternalField:
   index: 110
-  template: "Fields can't be declared both 'abstract' and 'external'."
+  problemMessage: "Fields can't be declared both 'abstract' and 'external'."
   analyzerCode: ParserErrorCode.ABSTRACT_EXTERNAL_FIELD
-  tip: "Try removing the 'abstract' or 'external' keyword."
+  correctionMessage: "Try removing the 'abstract' or 'external' keyword."
   configuration: nnbd-strong
   script:
     - "abstract class C {abstract external var f;}"
@@ -636,31 +636,31 @@
 
 AbstractStaticField:
   index: 107
-  template: "Static fields can't be declared 'abstract'."
+  problemMessage: "Static fields can't be declared 'abstract'."
   analyzerCode: ParserErrorCode.ABSTRACT_STATIC_FIELD
-  tip: "Try removing the 'abstract' or 'static' keyword."
+  correctionMessage: "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."
+  problemMessage: "Extension fields can't be declared 'abstract'."
+  correctionMessage: "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."
+  problemMessage: "Abstract fields cannot have initializers."
+  correctionMessage: "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."
+  problemMessage: "Abstract fields cannot have initializers."
+  correctionMessage: "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);}"
@@ -668,41 +668,41 @@
 
 AbstractLateField:
   index: 108
-  template: "Abstract fields cannot be late."
+  problemMessage: "Abstract fields cannot be late."
   analyzerCode: ParserErrorCode.ABSTRACT_LATE_FIELD
-  tip: "Try removing the 'abstract' or 'late' keyword."
+  correctionMessage: "Try removing the 'abstract' or 'late' keyword."
   configuration: nnbd-strong
   script:
     - "abstract class C {abstract late var f;}"
 
 ClassInClass:
   index: 53
-  template: "Classes can't be declared inside other classes."
-  tip: "Try moving the class to the top-level."
+  problemMessage: "Classes can't be declared inside other classes."
+  correctionMessage: "Try moving the class to the top-level."
   analyzerCode: ParserErrorCode.CLASS_IN_CLASS
   script:
     - "class C { class B {} }"
 
 EnumInClass:
   index: 74
-  template: "Enums can't be declared inside classes."
-  tip: "Try moving the enum to the top-level."
+  problemMessage: "Enums can't be declared inside classes."
+  correctionMessage: "Try moving the enum to the top-level."
   analyzerCode: ParserErrorCode.ENUM_IN_CLASS
   script:
     - "class Foo { enum Bar { Bar1, Bar2, Bar3 } }"
 
 TypedefInClass:
   index: 7
-  template: "Typedefs can't be declared inside classes."
-  tip: "Try moving the typedef to the top-level."
+  problemMessage: "Typedefs can't be declared inside classes."
+  correctionMessage: "Try moving the typedef to the top-level."
   analyzerCode: ParserErrorCode.TYPEDEF_IN_CLASS
   script:
     - "abstract class C { typedef int F(int x); }"
 
 CovariantMember:
   index: 67
-  template: "Getters, setters and methods can't be declared to be 'covariant'."
-  tip: "Try removing the 'covariant' keyword."
+  problemMessage: "Getters, setters and methods can't be declared to be 'covariant'."
+  correctionMessage: "Try removing the 'covariant' keyword."
   analyzerCode: ParserErrorCode.COVARIANT_MEMBER
   script:
     - "static covariant get x => 0;"
@@ -710,8 +710,8 @@
 
 VarReturnType:
   index: 12
-  template: "The return type can't be 'var'."
-  tip: "Try removing the keyword 'var', or replacing it with the name of the return type."
+  problemMessage: "The return type can't be 'var'."
+  correctionMessage: "Try removing the keyword 'var', or replacing it with the name of the return type."
   analyzerCode: ParserErrorCode.VAR_RETURN_TYPE
   script:
     - "class C { var m() {} }"
@@ -719,15 +719,15 @@
 
 ConstClass:
   index: 60
-  template: "Classes can't be declared to be 'const'."
-  tip: "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s)."
+  problemMessage: "Classes can't be declared to be 'const'."
+  correctionMessage: "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s)."
   analyzerCode: ParserErrorCode.CONST_CLASS
   script: "const class C {}"
 
 ConstAndFinal:
   index: 58
-  template: "Members can't be declared to be both 'const' and 'final'."
-  tip: "Try removing either the 'const' or 'final' keyword."
+  problemMessage: "Members can't be declared to be both 'const' and 'final'."
+  correctionMessage: "Try removing either the 'const' or 'final' keyword."
   analyzerCode: ParserErrorCode.CONST_AND_FINAL
   declaration:
     - "class C { static const final int x = 5; }"
@@ -737,8 +737,8 @@
 
 ConflictingModifiers:
   index: 59
-  template: "Members can't be declared to be both '#string' and '#string2'."
-  tip: "Try removing one of the keywords."
+  problemMessage: "Members can't be declared to be both '#string' and '#string2'."
+  correctionMessage: "Try removing one of the keywords."
   analyzerCode: ParserErrorCode.CONFLICTING_MODIFIERS
   script:
     - "class C { const var x; }"
@@ -746,8 +746,8 @@
 
 ConstFactory:
   index: 62
-  template: "Only redirecting factory constructors can be declared to be 'const'."
-  tip: "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target."
+  problemMessage: "Only redirecting factory constructors can be declared to be 'const'."
+  correctionMessage: "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target."
   analyzerCode: ParserErrorCode.CONST_FACTORY
   script: |
     class C {
@@ -756,8 +756,8 @@
     }
 
 ConstFactoryRedirectionToNonConst:
-  template: "Constant factory constructor can't delegate to a non-constant constructor."
-  tip: "Try redirecting to a different constructor or marking the target constructor 'const'."
+  problemMessage: "Constant factory constructor can't delegate to a non-constant constructor."
+  correctionMessage: "Try redirecting to a different constructor or marking the target constructor 'const'."
   analyzerCode: REDIRECT_TO_NON_CONST_CONSTRUCTOR
   script:
     - >-
@@ -767,19 +767,19 @@
       }
 
 NonConstFactory:
-  template: "Cannot invoke a non-'const' factory where a const expression is expected."
-  tip: "Try using a constructor or factory that is 'const'."
+  problemMessage: "Cannot invoke a non-'const' factory where a const expression is expected."
+  correctionMessage: "Try using a constructor or factory that is 'const'."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 NonConstConstructor:
-  template: "Cannot invoke a non-'const' constructor where a const expression is expected."
-  tip: "Try using a constructor or factory that is 'const'."
+  problemMessage: "Cannot invoke a non-'const' constructor where a const expression is expected."
+  correctionMessage: "Try using a constructor or factory that is 'const'."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 ModifierOutOfOrder:
   index: 56
-  template: "The modifier '#string' should be before the modifier '#string2'."
-  tip: "Try re-ordering the modifiers."
+  problemMessage: "The modifier '#string' should be before the modifier '#string2'."
+  correctionMessage: "Try re-ordering the modifiers."
   analyzerCode: ParserErrorCode.MODIFIER_OUT_OF_ORDER
   script:
     - "class C { factory const C() = prefix.B.foo; }"
@@ -791,8 +791,8 @@
 
 TypeBeforeFactory:
   index: 57
-  template: "Factory constructors cannot have a return type."
-  tip: "Try removing the type appearing before 'factory'."
+  problemMessage: "Factory constructors cannot have a return type."
+  correctionMessage: "Try removing the type appearing before 'factory'."
   analyzerCode: ParserErrorCode.TYPE_BEFORE_FACTORY
   script: |
     class C {
@@ -801,24 +801,24 @@
     }
 
 ConstConstructorWithBody:
-  template: "A const constructor can't have a body."
-  tip: "Try removing either the 'const' keyword or the body."
+  problemMessage: "A const constructor can't have a body."
+  correctionMessage: "Try removing either the 'const' keyword or the body."
   analyzerCode: CONST_CONSTRUCTOR_WITH_BODY
   script:
     - "class C { const C() {} }"
 
 ConstMethod:
   index: 63
-  template: "Getters, setters and methods can't be declared to be 'const'."
-  tip: "Try removing the 'const' keyword."
+  problemMessage: "Getters, setters and methods can't be declared to be 'const'."
+  correctionMessage: "Try removing the 'const' keyword."
   analyzerCode: ParserErrorCode.CONST_METHOD
   script:
     - "class C { const m() {} }"
 
 CovariantAndStatic:
   index: 66
-  template: "Members can't be declared to be both 'covariant' and 'static'."
-  tip: "Try removing either the 'covariant' or 'static' keyword."
+  problemMessage: "Members can't be declared to be both 'covariant' and 'static'."
+  correctionMessage: "Try removing either the 'covariant' or 'static' keyword."
   analyzerCode: ParserErrorCode.COVARIANT_AND_STATIC
   script:
     - "class C { covariant static A f; }"
@@ -826,8 +826,8 @@
 
 DuplicatedModifier:
   index: 70
-  template: "The modifier '#lexeme' was already specified."
-  tip: "Try removing all but one occurrence of the modifier."
+  problemMessage: "The modifier '#lexeme' was already specified."
+  correctionMessage: "Try removing all but one occurrence of the modifier."
   analyzerCode: ParserErrorCode.DUPLICATED_MODIFIER
   script:
     - "class C { const const m; }"
@@ -838,29 +838,29 @@
 
 ExternalConstructorWithBody:
   index: 87
-  template: "External constructors can't have a body."
-  tip: "Try removing the body of the constructor, or removing the keyword 'external'."
+  problemMessage: "External constructors can't have a body."
+  correctionMessage: "Try removing the body of the constructor, or removing the keyword 'external'."
   analyzerCode: ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY
   script:
     - "class C { external C() {} }"
 
 ExternalConstructorWithFieldInitializers:
-  template: "An external constructor can't initialize fields."
-  tip: "Try removing the field initializers, or removing the keyword 'external'."
+  problemMessage: "An external constructor can't initialize fields."
+  correctionMessage: "Try removing the field initializers, or removing the keyword 'external'."
   analyzerCode: EXTERNAL_CONSTRUCTOR_WITH_FIELD_INITIALIZERS
 
 ExternalFactoryWithBody:
   index: 86
-  template: "External factories can't have a body."
-  tip: "Try removing the body of the factory, or removing the keyword 'external'."
+  problemMessage: "External factories can't have a body."
+  correctionMessage: "Try removing the body of the factory, or removing the keyword 'external'."
   analyzerCode: ParserErrorCode.EXTERNAL_FACTORY_WITH_BODY
   script:
     - "class C { external factory C() {} }"
 
 ExternalField:
   index: 50
-  template: "Fields can't be declared to be 'external'."
-  tip: "Try removing the keyword 'external', or replacing the field by an external getter and/or setter."
+  problemMessage: "Fields can't be declared to be 'external'."
+  correctionMessage: "Try removing the keyword 'external', or replacing the field by an external getter and/or setter."
   analyzerCode: ParserErrorCode.EXTERNAL_FIELD
   script:
     - |
@@ -869,16 +869,16 @@
 
 
 ExternalFieldInitializer:
-  template: "External fields cannot have initializers."
-  tip: "Try removing the initializer or the 'external' keyword."
+  problemMessage: "External fields cannot have initializers."
+  correctionMessage: "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."
+  problemMessage: "External fields cannot have initializers."
+  correctionMessage: "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);}"
@@ -886,39 +886,39 @@
 
 ExternalLateField:
   index: 109
-  template: "External fields cannot be late."
+  problemMessage: "External fields cannot be late."
   analyzerCode: ParserErrorCode.EXTERNAL_LATE_FIELD
-  tip: "Try removing the 'external' or 'late' keyword."
+  correctionMessage: "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."
+  problemMessage: "'#name' isn't an instance field of this class."
   analyzerCode: INITIALIZER_FOR_STATIC_FIELD
 
 MoreThanOneSuperInitializer:
-  template: "Can't have more than one 'super' initializer."
+  problemMessage: "Can't have more than one 'super' initializer."
   analyzerCode: MULTIPLE_SUPER_INITIALIZERS
   script:
     - "class C { C.bad() : super(), super(); }"
 
 RedirectingConstructorWithSuperInitializer:
-  template: "A redirecting constructor can't have a 'super' initializer."
+  problemMessage: "A redirecting constructor can't have a 'super' initializer."
   analyzerCode: SUPER_IN_REDIRECTING_CONSTRUCTOR
   script:
     - "class C { C(); C.bad() : super(), this(); }"
     - "class C { C(); C.bad() : this(), super(); }"
 
 RedirectingConstructorWithMultipleRedirectInitializers:
-  template: "A redirecting constructor can't have more than one redirection."
+  problemMessage: "A redirecting constructor can't have more than one redirection."
   analyzerCode: MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS
   script:
     - "class C { C(); C.bad() : this(), this(); }"
 
 RedirectingConstructorWithAnotherInitializer:
-  template: "A redirecting constructor can't have other initializers."
+  problemMessage: "A redirecting constructor can't have other initializers."
   # also ASSERT_IN_REDIRECTING_CONSTRUCTOR
   analyzerCode: FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR
   script:
@@ -928,15 +928,15 @@
     - "class C { int? x; C(); C.bad() : this(), assert(true); }"
 
 SuperInitializerNotLast:
-  template: "Can't have initializers after 'super'."
+  problemMessage: "Can't have initializers after 'super'."
   analyzerCode: INVALID_SUPER_INVOCATION
   script:
     - "class C { int x; C.bad() : super(), x = 5; }"
 
 ExtraneousModifier:
   index: 77
-  template: "Can't have modifier '#lexeme' here."
-  tip: "Try removing '#lexeme'."
+  problemMessage: "Can't have modifier '#lexeme' here."
+  correctionMessage: "Try removing '#lexeme'."
   analyzerCode: ParserErrorCode.EXTRANEOUS_MODIFIER
   script:
     - "var String foo; main(){}"
@@ -968,8 +968,8 @@
 
 ExtraneousModifierInExtension:
   index: 98
-  template: "Can't have modifier '#lexeme' in an extension."
-  tip: "Try removing '#lexeme'."
+  problemMessage: "Can't have modifier '#lexeme' in an extension."
+  correctionMessage: "Try removing '#lexeme'."
   analyzerCode: ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION
   hasPublishedDocs: true
   script:
@@ -977,8 +977,8 @@
 
 FinalAndCovariant:
   index: 80
-  template: "Members can't be declared to be both 'final' and 'covariant'."
-  tip: "Try removing either the 'final' or 'covariant' keyword."
+  problemMessage: "Members can't be declared to be both 'final' and 'covariant'."
+  correctionMessage: "Try removing either the 'final' or 'covariant' keyword."
   analyzerCode: ParserErrorCode.FINAL_AND_COVARIANT
   script:
     - "class C { covariant final f = 5; }"
@@ -986,8 +986,8 @@
 
 FinalAndCovariantLateWithInitializer:
   index: 101
-  template: "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'."
-  tip: "Try removing either the 'final' or 'covariant' keyword, or removing the initializer."
+  problemMessage: "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'."
+  correctionMessage: "Try removing either the 'final' or 'covariant' keyword, or removing the initializer."
   analyzerCode: ParserErrorCode.FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER
   # Weak and strong doesn't matter in this instance.
   configuration: nnbd-strong
@@ -996,8 +996,8 @@
 
 FinalAndVar:
   index: 81
-  template: "Members can't be declared to be both 'final' and 'var'."
-  tip: "Try removing the keyword 'var'."
+  problemMessage: "Members can't be declared to be both 'final' and 'var'."
+  correctionMessage: "Try removing the keyword 'var'."
   analyzerCode: ParserErrorCode.FINAL_AND_VAR
   script:
     - "class C { final var x = 5; }"
@@ -1005,8 +1005,8 @@
 
 StaticConstructor:
   index: 4
-  template: "Constructors can't be static."
-  tip: "Try removing the keyword 'static'."
+  problemMessage: "Constructors can't be static."
+  correctionMessage: "Try removing the keyword 'static'."
   analyzerCode: ParserErrorCode.STATIC_CONSTRUCTOR
   script:
     - "class C { static C() {} }"
@@ -1014,41 +1014,41 @@
 
 GetterConstructor:
   index: 103
-  template: "Constructors can't be a getter."
-  tip: "Try removing 'get'."
+  problemMessage: "Constructors can't be a getter."
+  correctionMessage: "Try removing 'get'."
   analyzerCode: ParserErrorCode.GETTER_CONSTRUCTOR
   script:
     - "class C { get C.m() {} }"
 
 SetterConstructor:
   index: 104
-  template: "Constructors can't be a setter."
-  tip: "Try removing 'set'."
+  problemMessage: "Constructors can't be a setter."
+  correctionMessage: "Try removing 'set'."
   analyzerCode: ParserErrorCode.SETTER_CONSTRUCTOR
   script:
     - "class C { set C.m(x) {} }"
 
 StaticOperator:
   index: 17
-  template: "Operators can't be static."
-  tip: "Try removing the keyword 'static'."
+  problemMessage: "Operators can't be static."
+  correctionMessage: "Try removing the keyword 'static'."
   analyzerCode: ParserErrorCode.STATIC_OPERATOR
   script:
     - "class C { static operator +(int x) => x + 1; }"
 
 BreakOutsideOfLoop:
   index: 52
-  template: "A break statement can't be used outside of a loop or switch statement."
-  tip: "Try removing the break statement."
+  problemMessage: "A break statement can't be used outside of a loop or switch statement."
+  correctionMessage: "Try removing the break statement."
   analyzerCode: ParserErrorCode.BREAK_OUTSIDE_OF_LOOP
   script:
     - "main() { break; }"
 
 InvalidBreakTarget:
-  template: "Can't break to '#name'."
+  problemMessage: "Can't break to '#name'."
 
 BreakTargetOutsideFunction:
-  template: "Can't break to '#name' in a different function."
+  problemMessage: "Can't break to '#name' in a different function."
   analyzerCode: LABEL_IN_OUTER_SCOPE
   statement: |
     label: while (true) {
@@ -1060,7 +1060,7 @@
     }
 
 AnonymousBreakTargetOutsideFunction:
-  template: "Can't break to a target in a different function."
+  problemMessage: "Can't break to a target in a different function."
   analyzerCode: LABEL_IN_OUTER_SCOPE
   statement: |
     while (true) {
@@ -1071,17 +1071,17 @@
 
 ContinueOutsideOfLoop:
   index: 2
-  template: "A continue statement can't be used outside of a loop or switch statement."
-  tip: "Try removing the continue statement."
+  problemMessage: "A continue statement can't be used outside of a loop or switch statement."
+  correctionMessage: "Try removing the continue statement."
   analyzerCode: ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP
   script:
     - "main() { continue; }"
 
 InvalidContinueTarget:
-  template: "Can't continue at '#name'."
+  problemMessage: "Can't continue at '#name'."
 
 ContinueTargetOutsideFunction:
-  template: "Can't continue at '#name' in a different function."
+  problemMessage: "Can't continue at '#name' in a different function."
   analyzerCode: LABEL_IN_OUTER_SCOPE
   statement: |
     label: while (true) {
@@ -1093,7 +1093,7 @@
     }
 
 AnonymousContinueTargetOutsideFunction:
-  template: "Can't continue at a target in a different function."
+  problemMessage: "Can't continue at a target in a different function."
   analyzerCode: LABEL_IN_OUTER_SCOPE
   statement: |
     while (true) {
@@ -1103,65 +1103,65 @@
     }
 
 ContinueLabelNotTarget:
-  template: "Target of continue must be a label."
+  problemMessage: "Target of continue must be a label."
   analyzerCode: LABEL_UNDEFINED
 
 ContinueWithoutLabelInCase:
   index: 64
-  template: "A continue statement in a switch statement must have a label as a target."
-  tip: "Try adding a label associated with one of the case clauses to the continue statement."
+  problemMessage: "A continue statement in a switch statement must have a label as a target."
+  correctionMessage: "Try adding a label associated with one of the case clauses to the continue statement."
   analyzerCode: ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE
   script:
     - "main() { switch (x) {case 1: continue;} }"
 
 DuplicateLabelInSwitchStatement:
   index: 72
-  template: "The label '#name' was already used in this switch statement."
-  tip: "Try choosing a different name for this label."
+  problemMessage: "The label '#name' was already used in this switch statement."
+  correctionMessage: "Try choosing a different name for this label."
   analyzerCode: ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT
   statement:
     - "switch (0) {l1: case 0: break; l1: case 1: break;}"
 
 LabelNotFound:
-  template: "Can't find label '#name'."
-  tip: "Try defining the label, or correcting the name to match an existing label."
+  problemMessage: "Can't find label '#name'."
+  correctionMessage: "Try defining the label, or correcting the name to match an existing label."
   analyzerCode: LABEL_UNDEFINED
   statement:
     - "switch (0) {case 0: continue L;}"
 
 InitializedVariableInForEach:
   index: 82
-  template: "The loop variable in a for-each loop can't be initialized."
-  tip: "Try removing the initializer, or using a different kind of loop."
+  problemMessage: "The loop variable in a for-each loop can't be initialized."
+  correctionMessage: "Try removing the initializer, or using a different kind of loop."
   analyzerCode: ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH
   statement:
     - "for (int a = 0 in <int>[10]) {}"
 
 InvalidAwaitFor:
   index: 9
-  template: "The keyword 'await' isn't allowed for a normal 'for' statement."
-  tip: "Try removing the keyword, or use a for-each statement."
+  problemMessage: "The keyword 'await' isn't allowed for a normal 'for' statement."
+  correctionMessage: "Try removing the keyword, or use a for-each statement."
   analyzerCode: ParserErrorCode.INVALID_AWAIT_IN_FOR
   script:
     - "f() async {await for (int i = 0; i < 5; i++) {}}"
 
 InvalidSyncModifier:
-  template: "Invalid modifier 'sync'."
-  tip: "Try replacing 'sync' with 'sync*'."
+  problemMessage: "Invalid modifier 'sync'."
+  correctionMessage: "Try replacing 'sync' with 'sync*'."
   analyzerCode: MISSING_STAR_AFTER_SYNC
   script: "main() sync {}"
 
 InvalidVoid:
-  template: "Type 'void' can't be used here."
-  tip: "Try removing 'void' keyword or replace it with 'var', 'final', or a type."
+  problemMessage: "Type 'void' can't be used here."
+  correctionMessage: "Try removing 'void' keyword or replace it with 'var', 'final', or a type."
   analyzerCode: EXPECTED_TYPE_NAME
   script:
     - "void x; main() {}"
     - "foo(void x) {} main() { foo(null); }"
 
 VoidWithTypeArguments:
-  template: "Type 'void' can't have type arguments."
-  tip: "Try removing the type arguments."
+  problemMessage: "Type 'void' can't have type arguments."
+  correctionMessage: "Try removing the type arguments."
   index: 100
   analyzerCode: ParserErrorCode.VOID_WITH_TYPE_ARGUMENTS
   script:
@@ -1171,21 +1171,21 @@
 # FieldInitializedOutsideDeclaringClass instead of this in some situations.
 InvalidInitializer:
   index: 90
-  template: "Not a valid initializer."
-  tip: "To initialize a field, use the syntax 'name = value'."
+  problemMessage: "Not a valid initializer."
+  correctionMessage: "To initialize a field, use the syntax 'name = value'."
   analyzerCode: ParserErrorCode.INVALID_INITIALIZER
 
 FieldInitializedOutsideDeclaringClass:
   index: 88
-  template: "A field can only be initialized in its declaring class"
-  tip: "Try passing a value into the superclass constructor, or moving the initialization into the constructor body."
+  problemMessage: "A field can only be initialized in its declaring class"
+  correctionMessage: "Try passing a value into the superclass constructor, or moving the initialization into the constructor body."
   analyzerCode: ParserErrorCode.FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS
   script:
     - "class A { int a; } class C extends A { C() : super.a = 42; }"
 
 FinalFieldNotInitialized:
-  template: "Final field '#name' is not initialized."
-  tip: "Try to initialize the field in the declaration or in every constructor."
+  problemMessage: "Final field '#name' is not initialized."
+  correctionMessage: "Try to initialize the field in the declaration or in every constructor."
   analyzerCode: FINAL_NOT_INITIALIZED
   script: >
     class C {
@@ -1193,8 +1193,8 @@
     }
 
 FinalFieldNotInitializedByConstructor:
-  template: "Final field '#name' is not initialized by this constructor."
-  tip: "Try to initialize the field using an initializing formal or a field initializer."
+  problemMessage: "Final field '#name' is not initialized by this constructor."
+  correctionMessage: "Try to initialize the field using an initializing formal or a field initializer."
   analyzerCode: FINAL_NOT_INITIALIZED_CONSTRUCTOR_1
   script: >
     class C {
@@ -1204,8 +1204,8 @@
     }
 
 MissingExponent:
-  template: "Numbers in exponential notation should always contain an exponent (an integer number with an optional sign)."
-  tip: "Make sure there is an exponent, and remove any whitespace before it."
+  problemMessage: "Numbers in exponential notation should always contain an exponent (an integer number with an optional sign)."
+  correctionMessage: "Make sure there is an exponent, and remove any whitespace before it."
   analyzerCode: MISSING_DIGIT
   script: >
     main() {
@@ -1213,8 +1213,8 @@
     }
 
 PositionalParameterWithEquals:
-  template: "Positional optional parameters can't use ':' to specify a default value."
-  tip: "Try replacing ':' with '='."
+  problemMessage: "Positional optional parameters can't use ':' to specify a default value."
+  correctionMessage: "Try replacing ':' with '='."
   analyzerCode: WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER
   script: >
     main() {
@@ -1223,8 +1223,8 @@
     }
 
 RequiredParameterWithDefault:
-  template: "Non-optional parameters can't have a default value."
-  tip: "Try removing the default value or making the parameter optional."
+  problemMessage: "Non-optional parameters can't have a default value."
+  correctionMessage: "Try removing the default value or making the parameter optional."
   analyzerCode: NAMED_PARAMETER_OUTSIDE_GROUP
   script:
     - >
@@ -1240,19 +1240,19 @@
 
 StackOverflow:
   index: 19
-  template: "The file has too many nested expressions or statements."
-  tip: "Try simplifying the code."
+  problemMessage: "The file has too many nested expressions or statements."
+  correctionMessage: "Try simplifying the code."
   analyzerCode: ParserErrorCode.STACK_OVERFLOW
 
 InvalidCodePoint:
-  template: "The escape sequence starting with '\\u' isn't a valid code point."
+  problemMessage: "The escape sequence starting with '\\u' isn't a valid code point."
   analyzerCode: INVALID_CODE_POINT
   expression:
     - "'\\u{110000}'"
 
 InvalidHexEscape:
   index: 40
-  template: "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits."
+  problemMessage: "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits."
   analyzerCode: ParserErrorCode.INVALID_HEX_ESCAPE
   expression:
     - "'\\x0'"
@@ -1260,7 +1260,7 @@
 
 InvalidUnicodeEscape:
   index: 38
-  template: "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'."
+  problemMessage: "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'."
   analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE
   expression:
     - "'\\u'"
@@ -1270,8 +1270,8 @@
     - "'\\u{0Z}'"
 
 UnexpectedDollarInString:
-  template: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})."
-  tip: "Try adding a backslash (\\) to escape the '$'."
+  problemMessage: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})."
+  correctionMessage: "Try adding a backslash (\\) to escape the '$'."
   analyzerCode: UNEXPECTED_DOLLAR_IN_STRING
   expression:
     - "'$'"
@@ -1280,14 +1280,14 @@
     - '"""$"""'
 
 UnexpectedToken:
-  template: "Unexpected token '#lexeme'."
+  problemMessage: "Unexpected token '#lexeme'."
   analyzerCode: UNEXPECTED_TOKEN
   script:
     - "import 'b.dart' d as b;"
 
 LiteralWithClassAndNew:
-  template: "A #string literal can't be prefixed by 'new #lexeme'."
-  tip: "Try removing 'new' and '#lexeme'"
+  problemMessage: "A #string literal can't be prefixed by 'new #lexeme'."
+  correctionMessage: "Try removing 'new' and '#lexeme'"
   analyzerCode: ParserErrorCode.LITERAL_WITH_CLASS_AND_NEW
   index: 115
   script:
@@ -1299,8 +1299,8 @@
     - "var x = new List[1];"
 
 LiteralWithClass:
-  template: "A #string literal can't be prefixed by '#lexeme'."
-  tip: "Try removing '#lexeme'"
+  problemMessage: "A #string literal can't be prefixed by '#lexeme'."
+  correctionMessage: "Try removing '#lexeme'"
   analyzerCode: ParserErrorCode.LITERAL_WITH_CLASS
   index: 116
   script:
@@ -1318,8 +1318,8 @@
     - "var x = const List[1];"
 
 LiteralWithNew:
-  template: "A literal can't be prefixed by 'new'."
-  tip: "Try removing 'new'"
+  problemMessage: "A literal can't be prefixed by 'new'."
+  correctionMessage: "Try removing 'new'"
   analyzerCode: ParserErrorCode.LITERAL_WITH_NEW
   index: 117
   script:
@@ -1334,7 +1334,7 @@
     - "var x = new ['a'];"
 
 UnmatchedToken:
-  template: "Can't find '#string' to match '#lexeme'."
+  problemMessage: "Can't find '#string' to match '#lexeme'."
   analyzerCode: EXPECTED_TOKEN
   script:
     - "main("
@@ -1342,20 +1342,20 @@
     - "main(){[}"
 
 UnsupportedOperator:
-  template: "The '#lexeme' operator is not supported."
+  problemMessage: "The '#lexeme' operator is not supported."
   analyzerCode: UNSUPPORTED_OPERATOR
   script:
     - "class C { void operator ===(x) {} }"
     - "class C { void operator !==(x) {} }"
 
 UnsupportedPrefixPlus:
-  template: "'+' is not a prefix operator."
-  tip: "Try removing '+'."
+  problemMessage: "'+' is not a prefix operator."
+  correctionMessage: "Try removing '+'."
   analyzerCode: MISSING_IDENTIFIER
   expression: "+2" # No longer a valid way to write '2'
 
 UnterminatedComment:
-  template: "Comment starting with '/*' must end with '*/'."
+  problemMessage: "Comment starting with '/*' must end with '*/'."
   analyzerCode: UNTERMINATED_MULTI_LINE_COMMENT
   script:
     main() {
@@ -1363,7 +1363,7 @@
     /*
 
 UnterminatedString:
-  template: "String starting with #string must end with #string2."
+  problemMessage: "String starting with #string must end with #string2."
   analyzerCode: UNTERMINATED_STRING_LITERAL
   script:
     - >
@@ -1397,19 +1397,19 @@
 
 UnterminatedToken:
   # This is a fall-back message that shouldn't happen.
-  template: "Incomplete token."
+  problemMessage: "Incomplete token."
 
 # Note: avoid using this template, it should only be used for debugging and
 # prototyping, see [diagnostics.md](
 # lib/src/fasta/diagnostics.md#avoid-composing-messages-programmatically).
 Unspecified:
-  template: "#string"
+  problemMessage: "#string"
 
 StrongModeNNBDButOptOut:
-  template: "A library can't opt out of null safety by default, when using sound null safety."
+  problemMessage: "A library can't opt out of null safety by default, when using sound null safety."
 
 StrongModeNNBDPackageOptOut:
-  template:  |
+  problemMessage:  |
     Cannot run with sound null safety, because the following dependencies
     don't support null safety:
 
@@ -1418,43 +1418,43 @@
     For solutions, see https://dart.dev/go/unsound-null-safety
 
 WeakWithStrongDillLibrary:
-  template: "Loaded library is compiled with sound null safety and cannot be used in compilation for unsound null safety."
+  problemMessage: "Loaded library is compiled with sound null safety and cannot be used in compilation for unsound null safety."
 
 StrongWithWeakDillLibrary:
-  template: "Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety."
+  problemMessage: "Loaded library is compiled with unsound null safety and cannot be used in compilation for sound null safety."
 
 AgnosticWithStrongDillLibrary:
-  template: "Loaded library is compiled with sound null safety and cannot be used in compilation for agnostic null safety."
+  problemMessage: "Loaded library is compiled with sound null safety and cannot be used in compilation for agnostic null safety."
 
 AgnosticWithWeakDillLibrary:
-  template: "Loaded library is compiled with unsound null safety and cannot be used in compilation for agnostic null safety."
+  problemMessage: "Loaded library is compiled with unsound null safety and cannot be used in compilation for agnostic null safety."
 
 InvalidNnbdDillLibrary:
-  template: "Trying to use library with invalid null safety."
+  problemMessage: "Trying to use library with invalid null safety."
 
 AbstractNotSync:
-  template: "Abstract methods can't use 'async', 'async*', or 'sync*'."
+  problemMessage: "Abstract methods can't use 'async', 'async*', or 'sync*'."
   analyzerCode: NON_SYNC_ABSTRACT_METHOD
 
 AwaitAsIdentifier:
-  template: "'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
+  problemMessage: "'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
   analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER
 
 AwaitNotAsync:
-  template: "'await' can only be used in 'async' or 'async*' methods."
+  problemMessage: "'await' can only be used in 'async' or 'async*' methods."
   analyzerCode: AWAIT_IN_WRONG_CONTEXT
 
 BuiltInIdentifierAsType:
-  template: "The built-in identifier '#lexeme' can't be used as a type."
+  problemMessage: "The built-in identifier '#lexeme' can't be used as a type."
   analyzerCode: BUILT_IN_IDENTIFIER_AS_TYPE
 
 BuiltInIdentifierInDeclaration:
-  template: "Can't use '#lexeme' as a name here."
+  problemMessage: "Can't use '#lexeme' as a name here."
   analyzerCode: BUILT_IN_IDENTIFIER_IN_DECLARATION
 
 AwaitForNotAsync:
-  template: "The asynchronous for-in can only be used in functions marked with 'async' or 'async*'."
-  tip: "Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop."
+  problemMessage: "The asynchronous for-in can only be used in functions marked with 'async' or 'async*'."
+  correctionMessage: "Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop."
   analyzerCode: ASYNC_FOR_IN_WRONG_CONTEXT
   script: >
     main(o) sync* {
@@ -1462,89 +1462,89 @@
     }
 
 ConstructorNotSync:
-  template: "Constructor bodies can't use 'async', 'async*', or 'sync*'."
+  problemMessage: "Constructor bodies can't use 'async', 'async*', or 'sync*'."
   analyzerCode: NON_SYNC_CONSTRUCTOR
 
 FactoryNotSync:
-  template: "Factory bodies can't use 'async', 'async*', or 'sync*'."
+  problemMessage: "Factory bodies can't use 'async', 'async*', or 'sync*'."
   analyzerCode: NON_SYNC_FACTORY
 
 GeneratorReturnsValue:
-  template: "'sync*' and 'async*' can't return a value."
+  problemMessage: "'sync*' and 'async*' can't return a value."
   analyzerCode: RETURN_IN_GENERATOR
 
 InvalidInlineFunctionType:
-  template: "Inline function types cannot be used for parameters in a generic function type."
-  tip: "Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f')."
+  problemMessage: "Inline function types cannot be used for parameters in a generic function type."
+  correctionMessage: "Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f')."
   analyzerCode: INVALID_INLINE_FUNCTION_TYPE
   declaration: "typedef F = Function(int f(String x));"
 
 SetterNotSync:
-  template: "Setters can't use 'async', 'async*', or 'sync*'."
+  problemMessage: "Setters can't use 'async', 'async*', or 'sync*'."
   analyzerCode: INVALID_MODIFIER_ON_SETTER
 
 YieldAsIdentifier:
-  template: "'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
+  problemMessage: "'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
   analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER
 
 YieldNotGenerator:
-  template: "'yield' can only be used in 'sync*' or 'async*' methods."
+  problemMessage: "'yield' can only be used in 'sync*' or 'async*' methods."
   analyzerCode: YIELD_IN_NON_GENERATOR
 
 OnlyTry:
   index: 20
-  template: "A try block must be followed by an 'on', 'catch', or 'finally' clause."
-  tip: "Try adding either a catch or finally clause, or remove the try statement."
+  problemMessage: "A try block must be followed by an 'on', 'catch', or 'finally' clause."
+  correctionMessage: "Try adding either a catch or finally clause, or remove the try statement."
   analyzerCode: ParserErrorCode.MISSING_CATCH_OR_FINALLY
   statement: "try {}"
 
 TypeAfterVar:
   index: 89
-  template: "Variables can't be declared using both 'var' and a type name."
-  tip: "Try removing 'var.'"
+  problemMessage: "Variables can't be declared using both 'var' and a type name."
+  correctionMessage: "Try removing 'var.'"
   analyzerCode: ParserErrorCode.VAR_AND_TYPE
 
 AssertExtraneousArgument:
-  template: "`assert` can't have more than two arguments."
+  problemMessage: "`assert` can't have more than two arguments."
 
 PositionalAfterNamedArgument:
-  template: "Place positional arguments before named arguments."
-  tip: "Try moving the positional argument before the named arguments, or add a name to the argument."
+  problemMessage: "Place positional arguments before named arguments."
+  correctionMessage: "Try moving the positional argument before the named arguments, or add a name to the argument."
   analyzerCode: POSITIONAL_AFTER_NAMED_ARGUMENT
 
 ExpectedNamedArgument:
-  template: "Expected named argument."
+  problemMessage: "Expected named argument."
   analyzerCode: EXTRA_POSITIONAL_ARGUMENTS
 
 AssertAsExpression:
-  template: "`assert` can't be used as an expression."
+  problemMessage: "`assert` can't be used as an expression."
 
 FunctionTypeDefaultValue:
-  template: "Can't have a default value in a function type."
+  problemMessage: "Can't have a default value in a function type."
   analyzerCode: DEFAULT_VALUE_IN_FUNCTION_TYPE
 
 PrivateNamedParameter:
-  template: "An optional named parameter can't start with '_'."
+  problemMessage: "An optional named parameter can't start with '_'."
   analyzerCode: PRIVATE_OPTIONAL_PARAMETER
 
 NoFormals:
-  template: "A function should have formal parameters."
-  tip: "Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter."
+  problemMessage: "A function should have formal parameters."
+  correctionMessage: "Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter."
   analyzerCode: MISSING_FUNCTION_PARAMETERS
 
 GetterWithFormals:
-  template: "A getter can't have formal parameters."
-  tip: "Try removing '(...)'."
+  problemMessage: "A getter can't have formal parameters."
+  correctionMessage: "Try removing '(...)'."
   analyzerCode: GETTER_WITH_PARAMETERS
 
 SetterWithWrongNumberOfFormals:
-  template: "A setter should have exactly one formal parameter."
+  problemMessage: "A setter should have exactly one formal parameter."
   analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 
 CatchSyntax:
   index: 84
-  template: "'catch' must be followed by '(identifier)' or '(identifier, identifier)'."
-  tip: "No types are needed, the first is given by 'on', the second is always 'StackTrace'."
+  problemMessage: "'catch' must be followed by '(identifier)' or '(identifier, identifier)'."
+  correctionMessage: "No types are needed, the first is given by 'on', the second is always 'StackTrace'."
   analyzerCode: ParserErrorCode.CATCH_SYNTAX
   statement:
     - "try {} catch {}"
@@ -1553,54 +1553,54 @@
 
 CatchSyntaxExtraParameters:
   index: 83
-  template: "'catch' must be followed by '(identifier)' or '(identifier, identifier)'."
-  tip: "No types are needed, the first is given by 'on', the second is always 'StackTrace'."
+  problemMessage: "'catch' must be followed by '(identifier)' or '(identifier, identifier)'."
+  correctionMessage: "No types are needed, the first is given by 'on', the second is always 'StackTrace'."
   analyzerCode: ParserErrorCode.CATCH_SYNTAX_EXTRA_PARAMETERS
   statement:
     - "try {} catch (e, s, x) {}"
 
 SuperNullAware:
   index: 18
-  template: "The operator '?.' cannot be used with 'super' because 'super' cannot be null."
-  tip: "Try replacing '?.' with '.'"
+  problemMessage: "The operator '?.' cannot be used with 'super' because 'super' cannot be null."
+  correctionMessage: "Try replacing '?.' with '.'"
   analyzerCode: ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
 
 NullAwareCascadeOutOfOrder:
   index: 96
-  template: "The '?..' cascade operator must be first in the cascade sequence."
-  tip: "Try moving the '?..' operator to be the first cascade operator in the sequence."
+  problemMessage: "The '?..' cascade operator must be first in the cascade sequence."
+  correctionMessage: "Try moving the '?..' operator to be the first cascade operator in the sequence."
   analyzerCode: ParserErrorCode.NULL_AWARE_CASCADE_OUT_OF_ORDER
 
 ConstFieldWithoutInitializer:
-  template: "The const variable '#name' must be initialized."
-  tip: "Try adding an initializer ('= expression') to the declaration."
+  problemMessage: "The const variable '#name' must be initialized."
+  correctionMessage: "Try adding an initializer ('= expression') to the declaration."
   analyzerCode: CONST_NOT_INITIALIZED
 
 FinalFieldWithoutInitializer:
-  template: "The final variable '#name' must be initialized."
-  tip: "Try adding an initializer ('= expression') to the declaration."
+  problemMessage: "The final variable '#name' must be initialized."
+  correctionMessage: "Try adding an initializer ('= expression') to the declaration."
   analyzerCode: FINAL_NOT_INITIALIZED
 
 MetadataTypeArguments:
   index: 91
-  template: "An annotation can't use type arguments."
+  problemMessage: "An annotation can't use type arguments."
   analyzerCode: ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS
 
 MetadataTypeArgumentsUninstantiated:
   index: 114
-  template: "An annotation with type arguments must be followed by an argument list."
+  problemMessage: "An annotation with type arguments must be followed by an argument list."
   analyzerCode: ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED
   script:
     - "@deprecated<int> class C {}"
 
 ConstructorNotFound:
-  template: "Couldn't find constructor '#name'."
+  problemMessage: "Couldn't find constructor '#name'."
   analyzerCode: CONSTRUCTOR_NOT_FOUND
 
 ConstructorWithReturnType:
   index: 55
-  template: "Constructors can't have a return type."
-  tip: "Try removing the return type."
+  problemMessage: "Constructors can't have a return type."
+  correctionMessage: "Try removing the return type."
   analyzerCode: ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE
   script:
     - "class C { int C() {} }"
@@ -1608,9 +1608,9 @@
 
 ConstructorWithTypeParameters:
   index: 99
-  template: "Constructors can't have type parameters."
+  problemMessage: "Constructors can't have type parameters."
   analyzerCode: ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR
-  tip: "Try removing the type parameters."
+  correctionMessage: "Try removing the type parameters."
   script:
     - >-
       class C { C<T>() {} }
@@ -1628,15 +1628,16 @@
       }
 
 ConstructorWithTypeArguments:
-  template: "A constructor invocation can't have type arguments after the constructor name."
-  tip: "Try removing the type arguments or placing them after the class name."
-  analyzerCode: WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  problemMessage: "A constructor invocation can't have type arguments after the constructor name."
+  correctionMessage: "Try removing the type arguments or placing them after the class name."
+  analyzerCode: ParserErrorCode.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
+  index: 118
   script:
     - "class C<X> { C.foo(); } bar() { new C.foo<int>(); }"
     - "class C<X> { C.foo(); } bar() { C.foo<int>(); }"
 
 ConstructorWithWrongName:
-  template: "The name of a constructor must match the name of the enclosing class."
+  problemMessage: "The name of a constructor must match the name of the enclosing class."
   analyzerCode: ParserErrorCode.INVALID_CONSTRUCTOR_NAME
   index: 102
   script:
@@ -1654,101 +1655,101 @@
       }
 
 ConstructorWithWrongNameContext:
-  template: "The name of the enclosing class is '#name'."
+  problemMessage: "The name of the enclosing class is '#name'."
   severity: CONTEXT
 
 ConstructorCyclic:
-  template: "Redirecting constructors can't be cyclic."
-  tip: "Try to have all constructors eventually redirect to a non-redirecting constructor."
+  problemMessage: "Redirecting constructors can't be cyclic."
+  correctionMessage: "Try to have all constructors eventually redirect to a non-redirecting constructor."
   analyzerCode: RECURSIVE_CONSTRUCTOR_REDIRECT
   script:
     - "class C { C.foo() : this.bar(); C.bar() : this.foo(); }"
 
 FieldInitializerOutsideConstructor:
   index: 79
-  template: "Field formal parameters can only be used in a constructor."
-  tip: "Try removing 'this.'."
+  problemMessage: "Field formal parameters can only be used in a constructor."
+  correctionMessage: "Try removing 'this.'."
   analyzerCode: ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
   script:
     - "class C { void m(this.x); }"
 
 RedirectionTargetNotFound:
-  template: "Redirection constructor target not found: '#name'"
+  problemMessage: "Redirection constructor target not found: '#name'"
   analyzerCode: REDIRECT_TO_MISSING_CONSTRUCTOR
 
 CyclicTypedef:
-  template: "The typedef '#name' has a reference to itself."
+  problemMessage: "The typedef '#name' has a reference to itself."
   analyzerCode: TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
 
 TypeNotFound:
-  template: "Type '#name' not found."
+  problemMessage: "Type '#name' not found."
   analyzerCode: UNDEFINED_CLASS
 
 NonInstanceTypeVariableUse:
-  template: "Can only use type variables in instance methods."
+  problemMessage: "Can only use type variables in instance methods."
   analyzerCode: TYPE_PARAMETER_REFERENCED_BY_STATIC
 
 NameNotFound:
-  template: "Undefined name '#name'."
+  problemMessage: "Undefined name '#name'."
   analyzerCode: UNDEFINED_NAME
 
 MemberNotFound:
-  template: "Member not found: '#name'."
+  problemMessage: "Member not found: '#name'."
   analyzerCode: UNDEFINED_GETTER
 
 GetterNotFound:
-  template: "Getter not found: '#name'."
+  problemMessage: "Getter not found: '#name'."
   analyzerCode: UNDEFINED_GETTER
 
 SetterNotFound:
-  template: "Setter not found: '#name'."
+  problemMessage: "Setter not found: '#name'."
   analyzerCode: UNDEFINED_SETTER
 
 MethodNotFound:
-  template: "Method not found: '#name'."
+  problemMessage: "Method not found: '#name'."
   analyzerCode: UNDEFINED_METHOD
 
 CandidateFound:
-  template: "Found this candidate, but the arguments don't match."
+  problemMessage: "Found this candidate, but the arguments don't match."
   severity: CONTEXT
 
 CandidateFoundIsDefaultConstructor:
-  template: "The class '#name' has a constructor that takes no arguments."
+  problemMessage: "The class '#name' has a constructor that takes no arguments."
   severity: CONTEXT
 
 MissingArgumentList:
-  template: "Constructor invocations must have an argument list."
+  problemMessage: "Constructor invocations must have an argument list."
 
 TooFewArguments:
-  template: "Too few positional arguments: #count required, #count2 given."
+  problemMessage: "Too few positional arguments: #count required, #count2 given."
   analyzerCode: NOT_ENOUGH_REQUIRED_ARGUMENTS
 
 TooManyArguments:
-  template: "Too many positional arguments: #count allowed, but #count2 found."
-  tip: "Try removing the extra positional arguments."
+  problemMessage: "Too many positional arguments: #count allowed, but #count2 found."
+  correctionMessage: "Try removing the extra positional arguments."
   analyzerCode: EXTRA_POSITIONAL_ARGUMENTS
 
 NoSuchNamedParameter:
-  template: "No named parameter with the name '#name'."
+  problemMessage: "No named parameter with the name '#name'."
   analyzerCode: UNDEFINED_NAMED_PARAMETER
 
 AbstractClassInstantiation:
-  template: "The class '#name' is abstract and can't be instantiated."
+  problemMessage: "The class '#name' is abstract and can't be instantiated."
   analyzerCode: NEW_WITH_ABSTRACT_CLASS
 
 EnumInstantiation:
-  template: "Enums can't be instantiated."
+  problemMessage: "Enums can't be instantiated."
   analyzerCode: INSTANTIATE_ENUM
 
 AbstractRedirectedClassInstantiation:
-  template: "Factory redirects to class '#name', which is abstract and can't be instantiated."
+  problemMessage: "Factory redirects to class '#name', which is abstract and can't be instantiated."
   analyzerCode: FACTORY_REDIRECTS_TO_ABSTRACT_CLASS
 
 MissingImplementationNotAbstract:
-  template: |
+  problemMessage: |
     The non-abstract class '#name' is missing implementations for these members:
     #names
-  tip: |
+  correctionMessage: |
     Try to either
      - provide an implementation,
      - inherit an implementation from a superclass or mixin,
@@ -1759,50 +1760,50 @@
     - "class C {foo();}"
 
 MissingImplementationCause:
-  template: "'#name' is defined here."
+  problemMessage: "'#name' is defined here."
   severity: CONTEXT
 
 InterfaceCheck:
-  template: "The implementation of '#name' in the non-abstract class '#name2' does not conform to its interface."
+  problemMessage: "The implementation of '#name' in the non-abstract class '#name2' does not conform to its interface."
 
 NamedMixinOverride:
-  template: "The mixin application class '#name' introduces an erroneous override of '#name2'."
+  problemMessage: "The mixin application class '#name' introduces an erroneous override of '#name2'."
 
 ImplicitMixinOverride:
-  template: "Applying the mixin '#name' to '#name2' introduces an erroneous override of '#name3'."
+  problemMessage: "Applying the mixin '#name' to '#name2' introduces an erroneous override of '#name3'."
 
 ListLiteralTooManyTypeArguments:
-  template: "List literal requires exactly one type argument."
+  problemMessage: "List literal requires exactly one type argument."
   analyzerCode: EXPECTED_ONE_LIST_TYPE_ARGUMENTS
 
 SetLiteralTooManyTypeArguments:
-  template: "A set literal requires exactly one type argument."
+  problemMessage: "A set literal requires exactly one type argument."
 
 MapLiteralTypeArgumentMismatch:
-  template: "A map literal requires exactly two type arguments."
+  problemMessage: "A map literal requires exactly two type arguments."
   analyzerCode: EXPECTED_TWO_MAP_TYPE_ARGUMENTS
 
 SetOrMapLiteralTooManyTypeArguments:
-  template: "A set or map literal requires exactly one or two type arguments, respectively."
+  problemMessage: "A set or map literal requires exactly one or two type arguments, respectively."
 
 LoadLibraryTakesNoArguments:
-  template: "'loadLibrary' takes no arguments."
+  problemMessage: "'loadLibrary' takes no arguments."
   analyzerCode: LOAD_LIBRARY_TAKES_NO_ARGUMENTS
 
 TypeArgumentMismatch:
-  template: "Expected #count type arguments."
+  problemMessage: "Expected #count type arguments."
   analyzerCode: WRONG_NUMBER_OF_TYPE_ARGUMENTS
 
 NotAType:
-  template: "'#name' isn't a type."
+  problemMessage: "'#name' isn't a type."
   analyzerCode: NOT_A_TYPE
 
 NotATypeContext:
-  template: "This isn't a type."
+  problemMessage: "This isn't a type."
   severity: CONTEXT
 
 NotAPrefixInTypeAnnotation:
-  template: "'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix."
+  problemMessage: "'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix."
   analyzerCode: NOT_A_TYPE
   declaration:
     - |
@@ -1815,26 +1816,26 @@
         }
 
 FunctionUsedAsDec:
-  template: "'Function' is a built-in identifier, could not used as a #name name."
+  problemMessage: "'Function' is a built-in identifier, could not used as a #name name."
   script:
     - class Function {}
     - extension Function on int {}
     - mixin Function {}
 
 FunctionAsTypeParameter:
-  template: "'Function' is a built-in identifier, could not used as a type identifier."
+  problemMessage: "'Function' is a built-in identifier, could not used as a type identifier."
   script:
     - class C<Function> {}
     - mixin A<Function> {}
     - extension A<Function> on List<Function> {}
 
 UnresolvedPrefixInTypeAnnotation:
-  template: "'#name.#name2' can't be used as a type because '#name' isn't defined."
+  problemMessage: "'#name.#name2' can't be used as a type because '#name' isn't defined."
   analyzerCode: NOT_A_TYPE
   statement: "T.String x;"
 
 FastaUsageShort:
-  template: |
+  problemMessage: |
     Frequently used options:
 
       -o <file> Generate the output into <file>.
@@ -1842,7 +1843,7 @@
 
 FastaUsageLong:
   # TODO(ahe): Consider if the reference to platform.dill needs to change below?
-  template: |
+  problemMessage: |
     Supported options:
 
       -o <file>, --output=<file>
@@ -1930,163 +1931,163 @@
         Multiple experiments can be separated by commas.
 
 FastaCLIArgumentRequired:
-  template: "Expected value after '#name'."
+  problemMessage: "Expected value after '#name'."
 
 NamedFunctionExpression:
-  template: "A function expression can't have a name."
+  problemMessage: "A function expression can't have a name."
   analyzerCode: NAMED_FUNCTION_EXPRESSION
 
 NativeClauseShouldBeAnnotation:
   index: 23
-  template: "Native clause in this form is deprecated."
-  tip: "Try removing this native clause and adding @native() or @native('native-name') before the declaration."
+  problemMessage: "Native clause in this form is deprecated."
+  correctionMessage: "Try removing this native clause and adding @native() or @native('native-name') before the declaration."
   analyzerCode: ParserErrorCode.NATIVE_CLAUSE_SHOULD_BE_ANNOTATION
 
 ReturnTypeFunctionExpression:
-  template: "A function expression can't have a return type."
+  problemMessage: "A function expression can't have a return type."
 
 InternalProblemUnhandled:
-  template: "Unhandled #string in #string2."
+  problemMessage: "Unhandled #string in #string2."
   severity: INTERNAL_PROBLEM
 
 InternalProblemUnimplemented:
-  template: "Unimplemented #string."
+  problemMessage: "Unimplemented #string."
   severity: INTERNAL_PROBLEM
 
 InternalProblemUnexpected:
-  template: "Expected '#string', but got '#string2'."
+  problemMessage: "Expected '#string', but got '#string2'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemUnsupported:
-  template: "Unsupported operation: '#name'."
+  problemMessage: "Unsupported operation: '#name'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemNotFound:
-  template: "Couldn't find '#name'."
+  problemMessage: "Couldn't find '#name'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemNotFoundIn:
-  template: "Couldn't find '#name' in '#name2'."
+  problemMessage: "Couldn't find '#name' in '#name2'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemPrivateConstructorAccess:
-  template: "Can't access private constructor '#name'."
+  problemMessage: "Can't access private constructor '#name'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemConstructorNotFound:
-  template: "No constructor named '#name' in '#uri'."
+  problemMessage: "No constructor named '#name' in '#uri'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemExtendingUnmodifiableScope:
-  template: "Can't extend an unmodifiable scope."
+  problemMessage: "Can't extend an unmodifiable scope."
   severity: INTERNAL_PROBLEM
 
 InternalProblemPreviousTokenNotFound:
-  template: "Couldn't find previous token."
+  problemMessage: "Couldn't find previous token."
   severity: INTERNAL_PROBLEM
 
 InternalProblemStackNotEmpty:
-  template: "#name.stack isn't empty:\n  #string"
+  problemMessage: "#name.stack isn't empty:\n  #string"
   severity: INTERNAL_PROBLEM
 
 InternalProblemAlreadyInitialized:
-  template: "Attempt to set initializer on field without initializer."
+  problemMessage: "Attempt to set initializer on field without initializer."
   severity: INTERNAL_PROBLEM
 
 InternalProblemBodyOnAbstractMethod:
-  template: "Attempting to set body on abstract method."
+  problemMessage: "Attempting to set body on abstract method."
   severity: INTERNAL_PROBLEM
 
 InternalProblemMissingContext:
-  template: "Compiler cannot run without a compiler context."
-  tip: "Are calls to the compiler wrapped in CompilerContext.runInContext?"
+  problemMessage: "Compiler cannot run without a compiler context."
+  correctionMessage: "Are calls to the compiler wrapped in CompilerContext.runInContext?"
   severity: INTERNAL_PROBLEM
 
 InternalProblemProvidedBothCompileSdkAndSdkSummary:
-  template: "The compileSdk and sdkSummary options are mutually exclusive"
+  problemMessage: "The compileSdk and sdkSummary options are mutually exclusive"
   severity: INTERNAL_PROBLEM
 
 InternalProblemUriMissingScheme:
-  template: "The URI '#uri' has no scheme."
+  problemMessage: "The URI '#uri' has no scheme."
   severity: INTERNAL_PROBLEM
 
 InternalProblemContextSeverity:
-  template: "Non-context message has context severity: #string"
+  problemMessage: "Non-context message has context severity: #string"
   severity: INTERNAL_PROBLEM
 
 InternalProblemVerificationError:
-  template: |
+  problemMessage: |
     Verification of the generated program failed:
     #string
   severity: INTERNAL_PROBLEM
 
 VerificationErrorOriginContext:
-  template: "The node most likely is taken from here by a transformer."
+  problemMessage: "The node most likely is taken from here by a transformer."
   severity: CONTEXT
 
 InternalProblemDebugAbort:
-  template: "Compilation aborted due to fatal '#name' at:\n#string"
+  problemMessage: "Compilation aborted due to fatal '#name' at:\n#string"
   severity: INTERNAL_PROBLEM
 
 InternalProblemLabelUsageInVariablesDeclaration:
-  template: "Unexpected usage of label inside declaration of variables."
+  problemMessage: "Unexpected usage of label inside declaration of variables."
   severity: INTERNAL_PROBLEM
 
 InternalProblemUnfinishedTypeVariable:
-  template: "Unfinished type variable '#name' found in non-source library '#uri'."
+  problemMessage: "Unfinished type variable '#name' found in non-source library '#uri'."
   severity: INTERNAL_PROBLEM
 
 InternalProblemUnsupportedNullability:
-  template: "Unsupported nullability value '#string' on type '#type'."
+  problemMessage: "Unsupported nullability value '#string' on type '#type'."
   severity: INTERNAL_PROBLEM
 
 IncrementalCompilerIllegalParameter:
-  template: "Illegal parameter name '#string' found during expression compilation."
+  problemMessage: "Illegal parameter name '#string' found during expression compilation."
 
 IncrementalCompilerIllegalTypeParameter:
-  template: "Illegal type parameter name '#string' found during expression compilation."
+  problemMessage: "Illegal type parameter name '#string' found during expression compilation."
 
 DebugTrace:
-  template: "Fatal '#name' at:\n#string"
+  problemMessage: "Fatal '#name' at:\n#string"
   severity: IGNORED
 
 MissingPrefixInDeferredImport:
   index: 30
-  template: "Deferred imports should have a prefix."
-  tip: "Try adding a prefix to the import by adding an 'as' clause."
+  problemMessage: "Deferred imports should have a prefix."
+  correctionMessage: "Try adding a prefix to the import by adding an 'as' clause."
   analyzerCode: ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT
 
 DeferredAfterPrefix:
   index: 68
-  template: "The deferred keyword should come immediately before the prefix ('as' clause)."
-  tip: "Try moving the deferred keyword before the prefix."
+  problemMessage: "The deferred keyword should come immediately before the prefix ('as' clause)."
+  correctionMessage: "Try moving the deferred keyword before the prefix."
   analyzerCode: ParserErrorCode.DEFERRED_AFTER_PREFIX
 
 DuplicateDeferred:
   index: 71
-  template: "An import directive can only have one 'deferred' keyword."
-  tip: "Try removing all but one 'deferred' keyword."
+  problemMessage: "An import directive can only have one 'deferred' keyword."
+  correctionMessage: "Try removing all but one 'deferred' keyword."
   analyzerCode: ParserErrorCode.DUPLICATE_DEFERRED
 
 DeferredTypeAnnotation:
-  template: "The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation."
-  tip: "Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred."
+  problemMessage: "The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation."
+  correctionMessage: "Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred."
   analyzerCode: TYPE_ANNOTATION_DEFERRED_CLASS
 
 DuplicatePrefix:
   index: 73
-  template: "An import directive can only have one prefix ('as' clause)."
-  tip: "Try removing all but one prefix."
+  problemMessage: "An import directive can only have one prefix ('as' clause)."
+  correctionMessage: "Try removing all but one prefix."
   analyzerCode: ParserErrorCode.DUPLICATE_PREFIX
 
 PrefixAfterCombinator:
   index: 6
-  template: "The prefix ('as' clause) should come before any show/hide combinators."
-  tip: "Try moving the prefix before the combinators."
+  problemMessage: "The prefix ('as' clause) should come before any show/hide combinators."
+  correctionMessage: "Try moving the prefix before the combinators."
   analyzerCode: ParserErrorCode.PREFIX_AFTER_COMBINATOR
 
 DuplicatedExport:
-  template: "'#name' is exported from both '#uri' and '#uri2'."
+  problemMessage: "'#name' is exported from both '#uri' and '#uri2'."
   analyzerCode: AMBIGUOUS_EXPORT
   script:
     lib1.dart: "class A {}"
@@ -2094,10 +2095,10 @@
     main.dart: "export 'lib1.dart'; export 'lib2.dart';"
 
 DuplicatedExportInType:
-  template: "'#name' is exported from both '#uri' and '#uri2'."
+  problemMessage: "'#name' is exported from both '#uri' and '#uri2'."
 
 DuplicatedImportInType:
-  template: "'#name' is imported from both '#uri' and '#uri2'."
+  problemMessage: "'#name' is imported from both '#uri' and '#uri2'."
   analyzerCode: AMBIGUOUS_IMPORT
   script:
     lib1.dart: "class A {}"
@@ -2105,7 +2106,7 @@
     main.dart: "import 'lib1.dart'; import 'lib2.dart'; A a;"
 
 CyclicClassHierarchy:
-  template: "'#name' is a supertype of itself."
+  problemMessage: "'#name' is a supertype of itself."
   analyzerCode: RECURSIVE_INTERFACE_INHERITANCE
   script:
     - |
@@ -2119,18 +2120,18 @@
     - "class C implements C {}"
 
 ExtendingEnum:
-  template: "'#name' is an enum and can't be extended or implemented."
+  problemMessage: "'#name' is an enum and can't be extended or implemented."
   analyzerCode: EXTENDS_ENUM
 
 ExtendingRestricted:
-  template: "'#name' is restricted and can't be extended or implemented."
+  problemMessage: "'#name' is restricted and can't be extended or implemented."
   analyzerCode: EXTENDS_DISALLOWED_CLASS
 
 NoUnnamedConstructorInObject:
-  template: "'Object' has no unnamed constructor."
+  problemMessage: "'Object' has no unnamed constructor."
 
 IllegalAsyncGeneratorReturnType:
-  template: "Functions marked 'async*' must have a return type assignable to 'Stream'."
+  problemMessage: "Functions marked 'async*' must have a return type assignable to 'Stream'."
   analyzerCode: ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
   script:
     - >-
@@ -2139,14 +2140,14 @@
       }
 
 IllegalAsyncGeneratorVoidReturnType:
-  template: "Functions marked 'async*' can't have return type 'void'."
+  problemMessage: "Functions marked 'async*' can't have return type 'void'."
   script:
     - >-
       void g() async* {
       }
 
 IllegalAsyncReturnType:
-  template: "Functions marked 'async' must have a return type assignable to 'Future'."
+  problemMessage: "Functions marked 'async' must have a return type assignable to 'Future'."
   analyzerCode: ILLEGAL_ASYNC_RETURN_TYPE
   script:
     - >-
@@ -2155,7 +2156,7 @@
       }
 
 IllegalSyncGeneratorReturnType:
-  template: "Functions marked 'sync*' must have a return type assignable to 'Iterable'."
+  problemMessage: "Functions marked 'sync*' must have a return type assignable to 'Iterable'."
   analyzerCode: ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
   script:
     - >-
@@ -2164,7 +2165,7 @@
       }
 
 IllegalSyncGeneratorVoidReturnType:
-  template: "Functions marked 'sync*' can't have return type 'void'."
+  problemMessage: "Functions marked 'sync*' can't have return type 'void'."
   script:
     - >-
       void g() sync* {
@@ -2172,76 +2173,76 @@
 
 IllegalMixinDueToConstructors:
   # a class with a constructor is used as a mixin
-  template: "Can't use '#name' as a mixin because it has constructors."
+  problemMessage: "Can't use '#name' as a mixin because it has constructors."
   analyzerCode: MIXIN_DECLARES_CONSTRUCTOR # CompileTimeErrorCode
 
 MixinDeclaresConstructor:
   # a mixin declaration contains a constructor declaration
   index: 95
-  template: "Mixins can't declare constructors."
+  problemMessage: "Mixins can't declare constructors."
   analyzerCode: ParserErrorCode.MIXIN_DECLARES_CONSTRUCTOR
 
 IllegalMixinDueToConstructorsCause:
-  template: "This constructor prevents using '#name' as a mixin."
+  problemMessage: "This constructor prevents using '#name' as a mixin."
   severity: CONTEXT
 
 ExtensionDeclaresAbstractMember:
   index: 94
-  template: "Extensions can't declare abstract members."
-  tip: "Try providing an implementation for the member."
+  problemMessage: "Extensions can't declare abstract members."
+  correctionMessage: "Try providing an implementation for the member."
   analyzerCode: ParserErrorCode.EXTENSION_DECLARES_ABSTRACT_MEMBER
   hasPublishedDocs: true
 
 ExtensionDeclaresConstructor:
   index: 92
-  template: "Extensions can't declare constructors."
-  tip: "Try removing the constructor declaration."
+  problemMessage: "Extensions can't declare constructors."
+  correctionMessage: "Try removing the constructor declaration."
   analyzerCode: ParserErrorCode.EXTENSION_DECLARES_CONSTRUCTOR
   hasPublishedDocs: true
 
 ExtensionDeclaresInstanceField:
   index: 93
-  template: "Extensions can't declare instance fields"
-  tip: "Try removing the field declaration or making it a static field"
+  problemMessage: "Extensions can't declare instance fields"
+  correctionMessage: "Try removing the field declaration or making it a static field"
   analyzerCode: ParserErrorCode.EXTENSION_DECLARES_INSTANCE_FIELD
   hasPublishedDocs: true
 
 ConflictsWithConstructor:
-  template: "Conflicts with constructor '#name'."
+  problemMessage: "Conflicts with constructor '#name'."
   analyzerCode: CONFLICTS_WITH_CONSTRUCTOR
 
 ConflictsWithFactory:
-  template: "Conflicts with factory '#name'."
+  problemMessage: "Conflicts with factory '#name'."
 
 ConflictsWithMember:
-  template: "Conflicts with member '#name'."
+  problemMessage: "Conflicts with member '#name'."
   analyzerCode: CONFLICTS_WITH_MEMBER
 
 ConflictsWithImplicitSetter:
-  template: "Conflicts with the implicit setter of the field '#name'."
+  problemMessage: "Conflicts with the implicit setter of the field '#name'."
   analyzerCode: CONFLICTS_WITH_MEMBER
 
 ConflictsWithSetter:
-  template: "Conflicts with setter '#name'."
+  problemMessage: "Conflicts with setter '#name'."
   analyzerCode: CONFLICTS_WITH_MEMBER
 
 ConflictsWithTypeVariable:
-  template: "Conflicts with type variable '#name'."
+  problemMessage: "Conflicts with type variable '#name'."
   analyzerCode: CONFLICTING_TYPE_VARIABLE_AND_MEMBER
 
 ConflictsWithTypeVariableCause:
-  template: "This is the type variable."
+  problemMessage: "This is the type variable."
   severity: CONTEXT
 
 ExtensionMemberConflictsWithObjectMember:
-  template: "This extension member conflicts with Object member '#name'."
+  problemMessage: "This extension member conflicts with Object member '#name'."
   script:
     extension Extension on String {
       int get noSuchMethod => 42;
     }
 
 DeclaredMemberConflictsWithInheritedMember:
-  template: "Can't declare a member that conflicts with an inherited one."
+  problemMessage: "Can't declare a member that conflicts with an inherited one."
   analyzerCode: DECLARED_MEMBER_CONFLICTS_WITH_INHERITED
   script:
     - >-
@@ -2274,15 +2275,15 @@
       }
 
 DeclaredMemberConflictsWithInheritedMemberCause:
-  template: "This is the inherited member."
+  problemMessage: "This is the inherited member."
   severity: CONTEXT
 
 DeclaredMemberConflictsWithOverriddenMembersCause:
-  template: "This is one of the overridden members."
+  problemMessage: "This is one of the overridden members."
   severity: CONTEXT
 
 InheritedMembersConflict:
-  template: "Can't inherit members that conflict with each other."
+  problemMessage: "Can't inherit members that conflict with each other."
   analyzerCode: CONFLICTS_WITH_INHERITED_MEMBER
   script:
     - >-
@@ -2311,60 +2312,60 @@
       abstract class C extends A implements B {}
 
 InheritedMembersConflictCause1:
-  template: "This is one inherited member."
+  problemMessage: "This is one inherited member."
   severity: CONTEXT
 
 InheritedMembersConflictCause2:
-  template: "This is the other inherited member."
+  problemMessage: "This is the other inherited member."
   severity: CONTEXT
 
 IllegalMixin:
-  template: "The type '#name' can't be mixed in."
+  problemMessage: "The type '#name' can't be mixed in."
   analyzerCode: ILLEGAL_MIXIN
 
 OverrideTypeVariablesMismatch:
-  template: "Declared type variables of '#name' doesn't match those on overridden method '#name2'."
+  problemMessage: "Declared type variables of '#name' doesn't match those on overridden method '#name2'."
   analyzerCode: INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS
 
 OverrideTypeVariablesBoundMismatch:
-  template: "Declared bound '#type' of type variable '#name' of '#name2' doesn't match the bound '#type2' on overridden method '#name3'."
+  problemMessage: "Declared bound '#type' of type variable '#name' of '#name2' doesn't match the bound '#type2' on overridden method '#name3'."
 
 OverriddenMethodCause:
-  template: "This is the overridden method ('#name')."
+  problemMessage: "This is the overridden method ('#name')."
   severity: CONTEXT
 
 OverrideMismatchNamedParameter:
-  template: "The method '#name' doesn't have the named parameter '#name2' of overridden method '#name3'."
+  problemMessage: "The method '#name' doesn't have the named parameter '#name2' of overridden method '#name3'."
   analyzerCode: INVALID_OVERRIDE_NAMED
 
 OverrideFewerNamedArguments:
-  template: "The method '#name' has fewer named arguments than those of overridden method '#name2'."
+  problemMessage: "The method '#name' has fewer named arguments than those of overridden method '#name2'."
   analyzerCode: INVALID_OVERRIDE_NAMED
 
 OverrideFewerPositionalArguments:
-  template: "The method '#name' has fewer positional arguments than those of overridden method '#name2'."
+  problemMessage: "The method '#name' has fewer positional arguments than those of overridden method '#name2'."
   analyzerCode: INVALID_OVERRIDE_POSITIONAL
 
 OverrideMoreRequiredArguments:
-  template: "The method '#name' has more required arguments than those of overridden method '#name2'."
+  problemMessage: "The method '#name' has more required arguments than those of overridden method '#name2'."
   analyzerCode: INVALID_OVERRIDE_REQUIRED
 
 OverrideTypeMismatchParameter:
-  template: "The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'."
-  tip: "Change to a supertype of '#type2', or, for a covariant parameter, a subtype."
+  problemMessage: "The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'."
+  correctionMessage: "Change to a supertype of '#type2', or, for a covariant parameter, a subtype."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
 OverrideTypeMismatchReturnType:
-  template: "The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'."
-  tip: "Change to a subtype of '#type2'."
+  problemMessage: "The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'."
+  correctionMessage: "Change to a subtype of '#type2'."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
 OverrideTypeMismatchSetter:
-  template: "The field '#name' has type '#type', which does not match the corresponding type, '#type2', in the overridden setter, '#name2'."
+  problemMessage: "The field '#name' has type '#type', which does not match the corresponding type, '#type2', in the overridden setter, '#name2'."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
 OverrideMismatchRequiredNamedParameter:
-  template: "The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'."
+  problemMessage: "The required named parameter '#name' in method '#name2' is not required in overridden method '#name3'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2375,7 +2376,7 @@
     }
 
 InvalidGetterSetterType:
-  template: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2384,7 +2385,7 @@
     }
 
 InvalidGetterSetterTypeGetterInherited:
-  template: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2395,7 +2396,7 @@
     }
 
 InvalidGetterSetterTypeFieldInherited:
-  template: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2407,7 +2408,7 @@
     }
 
 InvalidGetterSetterTypeSetterInheritedGetter:
-  template: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2418,7 +2419,7 @@
     }
 
 InvalidGetterSetterTypeSetterInheritedField:
-  template: "The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2430,7 +2431,7 @@
     }
 
 InvalidGetterSetterTypeBothInheritedField:
-  template: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the inherited field '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2443,7 +2444,7 @@
     abstract class C implements A, B {}
 
 InvalidGetterSetterTypeBothInheritedGetter:
-  template: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the inherited getter '#name' is not a subtype of the type '#type2' of the inherited setter '#name2'."
   configuration: nnbd-strong
   script: |
     abstract class A {
@@ -2455,7 +2456,7 @@
     abstract class C implements A, B {}
 
 InvalidGetterSetterTypeLegacy:
-  template: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2464,7 +2465,7 @@
     }
 
 InvalidGetterSetterTypeGetterInheritedLegacy:
-  template: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2475,7 +2476,7 @@
     }
 
 InvalidGetterSetterTypeFieldInheritedLegacy:
-  template: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the setter '#name2'."
+  problemMessage: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2487,7 +2488,7 @@
     }
 
 InvalidGetterSetterTypeSetterInheritedGetterLegacy:
-  template: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2498,7 +2499,7 @@
     }
 
 InvalidGetterSetterTypeSetterInheritedFieldLegacy:
-  template: "The type '#type' of the field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2510,7 +2511,7 @@
     }
 
 InvalidGetterSetterTypeBothInheritedFieldLegacy:
-  template: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the inherited field '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2523,7 +2524,7 @@
     abstract class C implements A, B {}
 
 InvalidGetterSetterTypeBothInheritedGetterLegacy:
-  template: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
+  problemMessage: "The type '#type' of the inherited getter '#name' is not assignable to the type '#type2' of the inherited setter '#name2'."
   script: |
     // @dart=2.9
     abstract class A {
@@ -2535,73 +2536,73 @@
     abstract class C implements A, B {}
 
 InvalidGetterSetterTypeFieldContext:
-  template: "This is the declaration of the field '#name'."
+  problemMessage: "This is the declaration of the field '#name'."
   severity: CONTEXT
 
 InvalidGetterSetterTypeGetterContext:
-  template: "This is the declaration of the getter '#name'."
+  problemMessage: "This is the declaration of the getter '#name'."
   severity: CONTEXT
 
 InvalidGetterSetterTypeSetterContext:
-  template: "This is the declaration of the setter '#name'."
+  problemMessage: "This is the declaration of the setter '#name'."
   severity: CONTEXT
 
 PartOfSelf:
-  template: "A file can't be a part of itself."
+  problemMessage: "A file can't be a part of itself."
   analyzerCode: PART_OF_NON_PART
   script:
     main.dart: "part 'main.dart';"
 
 TypeVariableDuplicatedName:
-  template: "A type variable can't have the same name as another."
+  problemMessage: "A type variable can't have the same name as another."
   analyzerCode: DUPLICATE_DEFINITION
 
 TypeVariableDuplicatedNameCause:
-  template: "The other type variable named '#name'."
+  problemMessage: "The other type variable named '#name'."
   severity: CONTEXT
 
 TypeVariableSameNameAsEnclosing:
-  template: "A type variable can't have the same name as its enclosing declaration."
+  problemMessage: "A type variable can't have the same name as its enclosing declaration."
   analyzerCode: CONFLICTING_TYPE_VARIABLE_AND_CLASS
 
 AnnotationOnTypeArgument:
-  template: "Type arguments can't have annotations because they aren't declarations."
+  problemMessage: "Type arguments can't have annotations because they aren't declarations."
   analyzerCode: ParserErrorCode.ANNOTATION_ON_TYPE_ARGUMENT
   index: 111
   script:
     - "class A<E> {} class C { m() => new A<@Object() C>(); }"
 
 AnnotationOnFunctionTypeTypeVariable:
-  template: "A type variable on a function type can't have annotations."
+  problemMessage: "A type variable on a function type can't have annotations."
   script: |
      // @dart=2.13
      main() { Function<@Object() T>() x; }
 
 ExpectedEnumBody:
-  template: "Expected a enum body, but got '#lexeme'."
-  tip: "An enum definition must have a body with at least one constant name."
+  problemMessage: "Expected a enum body, but got '#lexeme'."
+  correctionMessage: "An enum definition must have a body with at least one constant name."
   analyzerCode: MISSING_ENUM_BODY
   script:
     - "enum E"
 
 EnumDeclarationEmpty:
-  template: "An enum declaration can't be empty."
+  problemMessage: "An enum declaration can't be empty."
   analyzerCode: EMPTY_ENUM_BODY
   script:
     - "enum E {}"
 
 ExternalClass:
   index: 3
-  template: "Classes can't be declared to be 'external'."
-  tip: "Try removing the keyword 'external'."
+  problemMessage: "Classes can't be declared to be 'external'."
+  correctionMessage: "Try removing the keyword 'external'."
   analyzerCode: ParserErrorCode.EXTERNAL_CLASS
   script:
     - "external class C {}"
 
 ExternalEnum:
   index: 5
-  template: "Enums can't be declared to be 'external'."
-  tip: "Try removing the keyword 'external'."
+  problemMessage: "Enums can't be declared to be 'external'."
+  correctionMessage: "Try removing the keyword 'external'."
   analyzerCode: ParserErrorCode.EXTERNAL_ENUM
   script:
     - "external enum E {ONE}"
@@ -2609,7 +2610,7 @@
 ExternalMethodWithBody:
   # TODO(danrubel): remove reference to `native` once support has been removed
   index: 49
-  template: "An external or native method can't have a body."
+  problemMessage: "An external or native method can't have a body."
   analyzerCode: ParserErrorCode.EXTERNAL_METHOD_WITH_BODY
   script:
     - "class C {external foo() {}}"
@@ -2618,7 +2619,7 @@
 
 ExternalConstructorWithInitializer:
   index: 106
-  template: "An external constructor can't have any initializers."
+  problemMessage: "An external constructor can't have any initializers."
   analyzerCode: ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER
   script:
     - "class C { int? x; external C() : x = 1; }"
@@ -2626,60 +2627,60 @@
 
 ExternalTypedef:
   index: 76
-  template: "Typedefs can't be declared to be 'external'."
-  tip: "Try removing the keyword 'external'."
+  problemMessage: "Typedefs can't be declared to be 'external'."
+  correctionMessage: "Try removing the keyword 'external'."
   analyzerCode: ParserErrorCode.EXTERNAL_TYPEDEF
   script:
     - "external typedef F();"
 
 OperatorWithOptionalFormals:
-  template: "An operator can't have optional parameters."
+  problemMessage: "An operator can't have optional parameters."
 
 OperatorWithTypeParameters:
-  template: "Types parameters aren't allowed when defining an operator."
-  tip: "Try removing the type parameters."
+  problemMessage: "Types parameters aren't allowed when defining an operator."
+  correctionMessage: "Try removing the type parameters."
   analyzerCode: TYPE_PARAMETER_ON_OPERATOR
   script:
     - "class C { operator []<T>(T t) => null; }"
 
 PlatformPrivateLibraryAccess:
-  template: "Can't access platform private library."
+  problemMessage: "Can't access platform private library."
   analyzerCode: IMPORT_INTERNAL_LIBRARY
 
 TypedefNotFunction:
-  template: "Can't create typedef from non-function type."
+  problemMessage: "Can't create typedef from non-function type."
   analyzerCode: INVALID_GENERIC_FUNCTION_TYPE
 
 TypedefNotType:
-  template: "Can't create typedef from non-type."
+  problemMessage: "Can't create typedef from non-type."
   analyzerCode: INVALID_TYPE_IN_TYPEDEF
 
 TypedefTypeVariableNotConstructor:
-  template: "Can't use a typedef denoting a type variable as a constructor, nor for a static member access."
+  problemMessage: "Can't use a typedef denoting a type variable as a constructor, nor for a static member access."
 
 TypedefTypeVariableNotConstructorCause:
-  template: "This is the type variable ultimately denoted."
+  problemMessage: "This is the type variable ultimately denoted."
   severity: CONTEXT
 
 TypedefNullableType:
-  template: "Can't create typedef from nullable type."
+  problemMessage: "Can't create typedef from nullable type."
   configuration: nnbd-strong
   script: |
     // @dart=2.12
     typedef F = void Function()?;
 
 TypedefUnaliasedTypeCause:
-  template: "This is the type denoted by the type alias."
+  problemMessage: "This is the type denoted by the type alias."
   severity: CONTEXT
 
 TypedefCause:
-  template: "The issue arises via this type alias."
+  problemMessage: "The issue arises via this type alias."
   severity: CONTEXT
 
 LibraryDirectiveNotFirst:
   index: 37
-  template: "The library directive must appear before all other directives."
-  tip: "Try moving the library directive before any other directives."
+  problemMessage: "The library directive must appear before all other directives."
+  correctionMessage: "Try moving the library directive before any other directives."
   analyzerCode: ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST
   script:
     - "class Foo{} library l;"
@@ -2688,40 +2689,40 @@
 
 ImportAfterPart:
   index: 10
-  template: "Import directives must precede part directives."
-  tip: "Try moving the import directives before the part directives."
+  problemMessage: "Import directives must precede part directives."
+  correctionMessage: "Try moving the import directives before the part directives."
   analyzerCode: ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
   script:
     - "part 'foo.dart'; import 'bar.dart';"
 
 ExportAfterPart:
   index: 75
-  template: "Export directives must precede part directives."
-  tip: "Try moving the export directives before the part directives."
+  problemMessage: "Export directives must precede part directives."
+  correctionMessage: "Try moving the export directives before the part directives."
   analyzerCode: ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
   script:
     - "part 'foo.dart'; export 'bar.dart';"
 
 DirectiveAfterDeclaration:
   index: 69
-  template: "Directives must appear before any declarations."
-  tip: "Try moving the directive before any declarations."
+  problemMessage: "Directives must appear before any declarations."
+  correctionMessage: "Try moving the directive before any declarations."
   analyzerCode: ParserErrorCode.DIRECTIVE_AFTER_DECLARATION
   script:
     - "class foo { } import 'bar.dart';"
     - "class foo { } export 'bar.dart';"
 
 NonPartOfDirectiveInPart:
-  template: "The part-of directive must be the only directive in a part."
-  tip: "Try removing the other directives, or moving them to the library for which this is a part."
+  problemMessage: "The part-of directive must be the only directive in a part."
+  correctionMessage: "Try removing the other directives, or moving them to the library for which this is a part."
   analyzerCode: NON_PART_OF_DIRECTIVE_IN_PART
   script:
     - "part of l; part 'f.dart';"
 
 PartOfTwice:
   index: 25
-  template: "Only one part-of directive may be declared in a file."
-  tip: "Try removing all but one of the part-of directives."
+  problemMessage: "Only one part-of directive may be declared in a file."
+  correctionMessage: "Try removing all but one of the part-of directives."
   analyzerCode: ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES
   script:
     - main.dart: |
@@ -2744,15 +2745,15 @@
         part of "main.dart";
 
 PartTwice:
-  template: "Can't use '#uri' as a part more than once."
+  problemMessage: "Can't use '#uri' as a part more than once."
   analyzerCode: DUPLICATE_PART
   script:
     part.dart: "part of 'main.dart';"
     main.dart: "part 'part.dart'; part 'part.dart';"
 
 PartOfTwoLibraries:
-  template: "A file can't be part of more than one library."
-  tip: "Try moving the shared declarations into the libraries, or into a new library."
+  problemMessage: "A file can't be part of more than one library."
+  correctionMessage: "Try moving the shared declarations into the libraries, or into a new library."
   analyzerCode: PART_OF_DIFFERENT_LIBRARY
   script:
     main.dart: "library lib; import 'lib.dart'; part 'part.dart';"
@@ -2760,29 +2761,29 @@
     part.dart: "part of lib;"
 
 PartOfTwoLibrariesContext:
-  template: "Used as a part in this library."
+  problemMessage: "Used as a part in this library."
   severity: CONTEXT
 
 FactoryTopLevelDeclaration:
   index: 78
-  template: "Top-level declarations can't be declared to be 'factory'."
-  tip: "Try removing the keyword 'factory'."
+  problemMessage: "Top-level declarations can't be declared to be 'factory'."
+  correctionMessage: "Try removing the keyword 'factory'."
   analyzerCode: ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION
   script:
     - "factory class C {}"
 
 RedirectionInNonFactory:
   index: 21
-  template: "Only factory constructor can specify '=' redirection."
-  tip: "Try making this a factory constructor, or remove the redirection."
+  problemMessage: "Only factory constructor can specify '=' redirection."
+  correctionMessage: "Try making this a factory constructor, or remove the redirection."
   analyzerCode: ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR
   script:
     - "class C { C() = D; }"
 
 TopLevelOperator:
   index: 14
-  template: "Operators must be declared within a class."
-  tip: "Try removing the operator, moving it to a class, or converting it to be a function."
+  problemMessage: "Operators must be declared within a class."
+  correctionMessage: "Try removing the operator, moving it to a class, or converting it to be a function."
   analyzerCode: ParserErrorCode.TOP_LEVEL_OPERATOR
   script:
     - "operator +(bool x, bool y) => x | y;"
@@ -2790,36 +2791,36 @@
     - "void operator +(bool x, bool y) => x | y;"
 
 MissingFunctionParameters:
-  template: "A function declaration needs an explicit list of parameters."
-  tip: "Try adding a parameter list to the function declaration."
+  problemMessage: "A function declaration needs an explicit list of parameters."
+  correctionMessage: "Try adding a parameter list to the function declaration."
   analyzerCode: MISSING_FUNCTION_PARAMETERS
   script:
     - "void f {}"
 
 MissingMethodParameters:
-  template: "A method declaration needs an explicit list of parameters."
-  tip: "Try adding a parameter list to the method declaration."
+  problemMessage: "A method declaration needs an explicit list of parameters."
+  correctionMessage: "Try adding a parameter list to the method declaration."
   analyzerCode: MISSING_METHOD_PARAMETERS
   script:
     - "class C { void m {} }"
 
 MissingTypedefParameters:
-  template: "A typedef needs an explicit list of parameters."
-  tip: "Try adding a parameter list to the typedef."
+  problemMessage: "A typedef needs an explicit list of parameters."
+  correctionMessage: "Try adding a parameter list to the typedef."
   analyzerCode: MISSING_TYPEDEF_PARAMETERS
   script:
     - "typedef void F;"
 
 MissingPartOf:
-  template: "Can't use '#uri' as a part, because it has no 'part of' declaration."
+  problemMessage: "Can't use '#uri' as a part, because it has no 'part of' declaration."
   analyzerCode: PART_OF_NON_PART
   script:
     part.dart: ""
     main.dart: "part 'part.dart';"
 
 PartOfInLibrary:
-  template: "Can't import '#uri', because it has a 'part of' declaration."
-  tip: "Try removing the 'part of' declaration, or using '#uri' as a part."
+  problemMessage: "Can't import '#uri', because it has a 'part of' declaration."
+  correctionMessage: "Try removing the 'part of' declaration, or using '#uri' as a part."
   analyzerCode: IMPORT_OF_NON_LIBRARY
   script:
     main.dart: |
@@ -2834,8 +2835,8 @@
       part "part.dart";
 
 PartInPart:
-  template: "A file that's a part of a library can't have parts itself."
-  tip: "Try moving the 'part' declaration to the containing library."
+  problemMessage: "A file that's a part of a library can't have parts itself."
+  correctionMessage: "Try moving the 'part' declaration to the containing library."
   analyzerCode: NON_PART_OF_DIRECTIVE_IN_PART
   script:
     main.dart: |
@@ -2850,16 +2851,16 @@
       part of "part.dart";
 
 PartInPartLibraryContext:
-  template: "This is the containing library."
+  problemMessage: "This is the containing library."
   severity: CONTEXT
 
 PartOrphan:
-  template: "This part doesn't have a containing library."
-  tip: "Try removing the 'part of' declaration."
+  problemMessage: "This part doesn't have a containing library."
+  correctionMessage: "Try removing the 'part of' declaration."
   script: "part of none; main() {}"
 
 PartExport:
-  template: "Can't export this file because it contains a 'part of' declaration."
+  problemMessage: "Can't export this file because it contains a 'part of' declaration."
   analyzerCode: EXPORT_OF_NON_LIBRARY
   script:
     main.dart: |
@@ -2874,24 +2875,24 @@
       part "part.dart";
 
 PartExportContext:
-  template: "This is the file that can't be exported."
+  problemMessage: "This is the file that can't be exported."
   severity: CONTEXT
 
 SupertypeIsFunction:
-  template: "Can't use a function type as supertype."
+  problemMessage: "Can't use a function type as supertype."
 
 DeferredPrefixDuplicated:
-  template: "Can't use the name '#name' for a deferred library, as the name is used elsewhere."
+  problemMessage: "Can't use the name '#name' for a deferred library, as the name is used elsewhere."
   analyzerCode: SHARED_DEFERRED_PREFIX
 
 DeferredPrefixDuplicatedCause:
-  template: "'#name' is used here."
+  problemMessage: "'#name' is used here."
   severity: CONTEXT
 
 TypeArgumentsOnTypeVariable:
   index: 13
-  template: "Can't use type arguments with type variable '#name'."
-  tip: "Try removing the type arguments."
+  problemMessage: "Can't use type arguments with type variable '#name'."
+  correctionMessage: "Try removing the type arguments."
   analyzerCode: ParserErrorCode.TYPE_ARGUMENTS_ON_TYPE_VARIABLE
   script:
     - "dynamic<T>(x) => 0"
@@ -2912,7 +2913,7 @@
 # definitions. Consequently, it is more convenient to use the word
 # "declaration" instead of "definition" as the former implies less.
 DuplicatedDeclaration:
-  template: "'#name' is already declared in this scope."
+  problemMessage: "'#name' is already declared in this scope."
   analyzerCode: DUPLICATE_DEFINITION
   script: |
     class C {} // First declaration (related information points here).
@@ -2924,16 +2925,16 @@
     }
 
 DuplicatedDeclarationCause:
-  template: "Previous declaration of '#name'."
+  problemMessage: "Previous declaration of '#name'."
   severity: CONTEXT
 
 DuplicatedDeclarationSyntheticCause:
-  template: "Previous declaration of '#name' is implied by this definition."
+  problemMessage: "Previous declaration of '#name' is implied by this definition."
   severity: CONTEXT
 
 # Use this message when a duplicated declaration is used.
 DuplicatedDeclarationUse:
-  template: "Can't use '#name' because it is declared more than once."
+  problemMessage: "Can't use '#name' because it is declared more than once."
   exampleAllowMoreCodes: true
   script:
     - main.dart: |
@@ -2968,30 +2969,30 @@
         var f = new C().method();
 
 DuplicatedNamePreviouslyUsed:
-  template: "Can't declare '#name' because it was already used in this scope."
+  problemMessage: "Can't declare '#name' because it was already used in this scope."
   analyzerCode: REFERENCED_BEFORE_DECLARATION
   script:
     - "main(arguments) { arguments; var arguments; }"
 
 DuplicatedNamePreviouslyUsedCause:
-  template: "Previous use of '#name'."
+  problemMessage: "Previous use of '#name'."
   severity: CONTEXT
 
 DuplicatedNamedArgument:
-  template: "Duplicated named argument '#name'."
+  problemMessage: "Duplicated named argument '#name'."
   analyzerCode: DUPLICATE_NAMED_ARGUMENT
 
 DuplicatedParameterName:
-  template: "Duplicated parameter name '#name'."
+  problemMessage: "Duplicated parameter name '#name'."
   analyzerCode: DUPLICATE_DEFINITION
 
 DuplicatedParameterNameCause:
-  template: "Other parameter named '#name'."
+  problemMessage: "Other parameter named '#name'."
   severity: CONTEXT
 
 MemberWithSameNameAsClass:
-  template: "A class member can't have the same name as the enclosing class."
-  tip: "Try renaming the member."
+  problemMessage: "A class member can't have the same name as the enclosing class."
+  correctionMessage: "Try renaming the member."
   analyzerCode: ParserErrorCode.MEMBER_WITH_CLASS_NAME
   index: 105
   script:
@@ -3003,26 +3004,26 @@
     - "class C { int? A, B, C, D, E; }"
 
 EnumConstantSameNameAsEnclosing:
-  template: "Name of enum constant '#name' can't be the same as the enum's own name."
+  problemMessage: "Name of enum constant '#name' can't be the same as the enum's own name."
   analyzerCode: ENUM_CONSTANT_WITH_ENUM_NAME
 
 MissingOperatorKeyword:
   index: 31
-  template: "Operator declarations must be preceded by the keyword 'operator'."
-  tip: "Try adding the keyword 'operator'."
+  problemMessage: "Operator declarations must be preceded by the keyword 'operator'."
+  correctionMessage: "Try adding the keyword 'operator'."
   analyzerCode: ParserErrorCode.MISSING_KEYWORD_OPERATOR
   script:
     - "class C { +(x) {} }"
 
 InvalidOperator:
   index: 39
-  template: "The string '#lexeme' isn't a user-definable operator."
+  problemMessage: "The string '#lexeme' isn't a user-definable operator."
   analyzerCode: ParserErrorCode.INVALID_OPERATOR
   script:
     - "class C { void operator %=(x) {} }"
 
 NotBinaryOperator:
-  template: "'#lexeme' isn't a binary operator."
+  problemMessage: "'#lexeme' isn't a binary operator."
   script: >
     class C { operator~() { return null; } }
 
@@ -3032,25 +3033,25 @@
     }
 
 OperatorParameterMismatch0:
-  template: "Operator '#name' shouldn't have any parameters."
+  problemMessage: "Operator '#name' shouldn't have any parameters."
 
 OperatorParameterMismatch1:
-  template: "Operator '#name' should have exactly one parameter."
+  problemMessage: "Operator '#name' should have exactly one parameter."
   analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
 
 OperatorParameterMismatch2:
-  template: "Operator '#name' should have exactly two parameters."
+  problemMessage: "Operator '#name' should have exactly two parameters."
   analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
 
 OperatorMinusParameterMismatch:
-  template: "Operator '#name' should have zero or one parameter."
-  tip: >-
+  problemMessage: "Operator '#name' should have zero or one parameter."
+  correctionMessage: >-
     With zero parameters, it has the syntactic form '-a', formally known as 'unary-'.
     With one parameter, it has the syntactic form 'a - b', formally known as '-'.
   analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
 
 SupertypeIsIllegal:
-  template: "The type '#name' can't be used as supertype."
+  problemMessage: "The type '#name' can't be used as supertype."
   analyzerCode: EXTENDS_NON_CLASS
   script: |
 
@@ -3058,14 +3059,14 @@
     class C extends dynamic {}
 
 SupertypeIsIllegalAliased:
-  template: "The type '#name' which is an alias of '#type' can't be used as supertype."
+  problemMessage: "The type '#name' which is an alias of '#type' can't be used as supertype."
   analyzerCode: EXTENDS_NON_CLASS
   script: |
     typedef F = void Function();
     class C extends F {}
 
 SupertypeIsNullableAliased:
-  template: "The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable."
+  problemMessage: "The type '#name' which is an alias of '#type' can't be used as supertype because it is nullable."
   analyzerCode: EXTENDS_NON_CLASS
   experiments: nonfunction-type-aliases
   script: |
@@ -3074,78 +3075,78 @@
     class C extends B {}
 
 SupertypeIsTypeVariable:
-  template: "The type variable '#name' can't be used as supertype."
+  problemMessage: "The type variable '#name' can't be used as supertype."
   analyzerCode: EXTENDS_NON_CLASS
   script: |
     class C<T> extends T {}
 
 PartOfLibraryNameMismatch:
-  template: "Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'."
+  problemMessage: "Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'."
   analyzerCode: PART_OF_DIFFERENT_LIBRARY
 
 PartOfUseUri:
-  template: "Using '#uri' as part of '#uri2' but its 'part of' declaration says '#name'."
-  tip: "Try changing the 'part of' declaration to use a relative file name."
+  problemMessage: "Using '#uri' as part of '#uri2' but its 'part of' declaration says '#name'."
+  correctionMessage: "Try changing the 'part of' declaration to use a relative file name."
   analyzerCode: PART_OF_UNNAMED_LIBRARY
 
 PartOfUriMismatch:
-  template: "Using '#uri' as part of '#uri2' but its 'part of' declaration says '#uri3'."
+  problemMessage: "Using '#uri' as part of '#uri2' but its 'part of' declaration says '#uri3'."
   analyzerCode: PART_OF_DIFFERENT_LIBRARY
 
 MissingMain:
-  template: "No 'main' method found."
-  tip: "Try adding a method named 'main' to your program."
+  problemMessage: "No 'main' method found."
+  correctionMessage: "Try adding a method named 'main' to your program."
 
 MissingInput:
-  template: "No input file provided to the compiler."
+  problemMessage: "No input file provided to the compiler."
 
 InputFileNotFound:
-  template: "Input file not found: #uri."
+  problemMessage: "Input file not found: #uri."
 
 SdkRootNotFound:
-  template: "SDK root directory not found: #uri."
+  problemMessage: "SDK root directory not found: #uri."
 
 SdkSummaryNotFound:
-  template: "SDK summary not found: #uri."
+  problemMessage: "SDK summary not found: #uri."
 
 SdkSpecificationNotFound:
-  template: "SDK libraries specification not found: #uri."
-  tip: "Normally, the specification is a file named 'libraries.json' in the Dart SDK install location."
+  problemMessage: "SDK libraries specification not found: #uri."
+  correctionMessage: "Normally, the specification is a file named 'libraries.json' in the Dart SDK install location."
 
 InvalidSuperInInitializer:
   index: 47
-  template: "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')"
+  problemMessage: "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')"
   analyzerCode: ParserErrorCode.INVALID_SUPER_IN_INITIALIZER
 
 InvalidThisInInitializer:
   index: 65
-  template: "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())"
+  problemMessage: "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())"
   analyzerCode: ParserErrorCode.INVALID_THIS_IN_INITIALIZER
 
 ThisAccessInFieldInitializer:
-  template: "Can't access 'this' in a field initializer to read '#name'."
+  problemMessage: "Can't access 'this' in a field initializer to read '#name'."
   analyzerCode: THIS_ACCESS_FROM_FIELD_INITIALIZER
 
 ThisOrSuperAccessInFieldInitializer:
-  template: "Can't access '#string' in a field initializer."
+  problemMessage: "Can't access '#string' in a field initializer."
   analyzerCode: THIS_ACCESS_FROM_INITIALIZER
 
 ThisAsIdentifier:
-  template: "Expected identifier, but got 'this'."
+  problemMessage: "Expected identifier, but got 'this'."
   analyzerCode: INVALID_REFERENCE_TO_THIS
 
 # TODO(johnniwinther): Confusing message, it should probably mention that `super` is not available.
 SuperAsIdentifier:
-  template: "Expected identifier, but got 'super'."
+  problemMessage: "Expected identifier, but got 'super'."
   analyzerCode: SUPER_AS_EXPRESSION
 
 SuperAsExpression:
-  template: "Can't use 'super' as an expression."
-  tip: "To delegate a constructor to a super constructor, put the super call as an initializer."
+  problemMessage: "Can't use 'super' as an expression."
+  correctionMessage: "To delegate a constructor to a super constructor, put the super call as an initializer."
   analyzerCode: SUPER_AS_EXPRESSION
 
 SwitchExpressionNotAssignable:
-  template: "Type '#type' of the switch expression isn't assignable to the type '#type2' of this case expression."
+  problemMessage: "Type '#type' of the switch expression isn't assignable to the type '#type2' of this case expression."
   analyzerCode: SWITCH_EXPRESSION_NOT_ASSIGNABLE
   script:
     - |
@@ -3157,11 +3158,11 @@
       }
 
 SwitchExpressionNotAssignableCause:
-  template: "The switch expression is here."
+  problemMessage: "The switch expression is here."
   severity: CONTEXT
 
 SwitchExpressionNotSubtype:
-  template: "Type '#type' of the case expression is not a subtype of type '#type2' of this switch expression."
+  problemMessage: "Type '#type' of the case expression is not a subtype of type '#type2' of this switch expression."
   script:
     - |
       void f() {
@@ -3172,43 +3173,43 @@
 
 SwitchHasCaseAfterDefault:
   index: 16
-  template: "The default case should be the last case in a switch statement."
-  tip: "Try moving the default case after the other case clauses."
+  problemMessage: "The default case should be the last case in a switch statement."
+  correctionMessage: "Try moving the default case after the other case clauses."
   analyzerCode: ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE
   script:
     - "class C { foo(int a) {switch (a) {default: return 0; case 1: return 1;}} }"
 
 SwitchHasMultipleDefaults:
   index: 15
-  template: "The 'default' case can only be declared once."
-  tip: "Try removing all but one default case."
+  problemMessage: "The 'default' case can only be declared once."
+  correctionMessage: "Try removing all but one default case."
   analyzerCode: ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES
   script:
     - "class C { foo(int a) {switch (a) {default: return 0; default: return 1;}} }"
 
 SwitchCaseFallThrough:
-  template: "Switch case may fall through to the next case."
+  problemMessage: "Switch case may fall through to the next case."
   analyzerCode: CASE_BLOCK_NOT_TERMINATED
 
 FieldAlreadyInitializedAtDeclaration:
-  template: "'#name' is a final instance variable that was initialized at the declaration."
+  problemMessage: "'#name' is a final instance variable that was initialized at the declaration."
   analyzerCode: FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
   script:
     - "class C { final int x = 2; C(): this.x = 3 {} }"
 
 FieldAlreadyInitializedAtDeclarationCause:
-  template: "'#name' was initialized here."
+  problemMessage: "'#name' was initialized here."
   severity: CONTEXT
 
 ConstructorInitializeSameInstanceVariableSeveralTimes:
-  template: "'#name' was already initialized by this constructor."
+  problemMessage: "'#name' was already initialized by this constructor."
   analyzerCode: FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
   script:
     - "class C { final int x; C(): this.x = 1, this.x = 2 {} }"
     - "class C { int x; C(): this.x = 1, this.x = 2 {} }"
 
 TypeVariableInStaticContext:
-  template: "Type variables can't be used in static members."
+  problemMessage: "Type variables can't be used in static members."
   analyzerCode: TYPE_PARAMETER_REFERENCED_BY_STATIC
   declaration:
     - |
@@ -3243,7 +3244,7 @@
       }
 
 TypeVariableInConstantContext:
-  template: "Type variables can't be used as constants."
+  problemMessage: "Type variables can't be used as constants."
   analyzerCode: TYPE_PARAMETER_IN_CONST_EXPRESSION
   declaration:
     - |
@@ -3266,26 +3267,26 @@
       }
 
 SuperclassMethodArgumentMismatch:
-  template: "Superclass doesn't have a method named '#name' with matching arguments."
+  problemMessage: "Superclass doesn't have a method named '#name' with matching arguments."
 
 SuperclassHasNoMember:
-  template: "Superclass has no member named '#name'."
+  problemMessage: "Superclass has no member named '#name'."
   analyzerCode: UNDEFINED_SUPER_GETTER
 
 SuperclassHasNoGetter:
-  template: "Superclass has no getter named '#name'."
+  problemMessage: "Superclass has no getter named '#name'."
   analyzerCode: UNDEFINED_SUPER_GETTER
 
 SuperclassHasNoSetter:
-  template: "Superclass has no setter named '#name'."
+  problemMessage: "Superclass has no setter named '#name'."
   analyzerCode: UNDEFINED_SUPER_SETTER
 
 SuperclassHasNoMethod:
-  template: "Superclass has no method named '#name'."
+  problemMessage: "Superclass has no method named '#name'."
   analyzerCode: UNDEFINED_SUPER_METHOD
 
 SuperclassHasNoConstructor:
-  template: "Superclass has no constructor named '#name'."
+  problemMessage: "Superclass has no constructor named '#name'."
   analyzerCode:
     - UNDEFINED_CONSTRUCTOR_IN_INITIALIZER
     - UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
@@ -3308,26 +3309,26 @@
       }
 
 SuperclassHasNoDefaultConstructor:
-  template: "The superclass, '#name', has no unnamed constructor that takes no arguments."
+  problemMessage: "The superclass, '#name', has no unnamed constructor that takes no arguments."
   analyzerCode: NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
 
 ConstConstructorNonFinalField:
-  template: "Constructor is marked 'const' so all fields must be final."
+  problemMessage: "Constructor is marked 'const' so all fields must be final."
   analyzerCode: CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
 
 ConstConstructorNonFinalFieldCause:
-  template: "Field isn't final, but constructor is 'const'."
+  problemMessage: "Field isn't final, but constructor is 'const'."
   severity: CONTEXT
 
 ConstConstructorLateFinalFieldError:
-  template: "Can't have a late final field in a class with a const constructor."
+  problemMessage: "Can't have a late final field in a class with a const constructor."
 
 ConstConstructorLateFinalFieldCause:
-  template: "This constructor is const."
+  problemMessage: "This constructor is const."
   severity: CONTEXT
 
 ConstConstructorRedirectionToNonConst:
-  template: "A constant constructor can't call a non-constant constructor."
+  problemMessage: "A constant constructor can't call a non-constant constructor."
   script:
     - >-
       class A {
@@ -3336,7 +3337,7 @@
       }
 
 ConstConstructorWithNonConstSuper:
-  template: "A constant constructor can't call a non-constant super constructor."
+  problemMessage: "A constant constructor can't call a non-constant super constructor."
   analyzerCode: CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER
   script:
     - >-
@@ -3348,115 +3349,115 @@
       }
 
 AccessError:
-  template: "Access error: '#name'."
+  problemMessage: "Access error: '#name'."
 
 ExpressionNotMetadata:
-  template: "This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor."
+  problemMessage: "This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor."
 
 ExpectedAnInitializer:
   index: 36
-  template: "Expected an initializer."
+  problemMessage: "Expected an initializer."
   analyzerCode: ParserErrorCode.MISSING_INITIALIZER
   script:
     - "class C { C() : {} }"
 
 MissingAssignmentInInitializer:
   index: 34
-  template: "Expected an assignment after the field name."
-  tip: "To initialize a field, use the syntax 'name = value'."
+  problemMessage: "Expected an assignment after the field name."
+  correctionMessage: "To initialize a field, use the syntax 'name = value'."
   analyzerCode: ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER
   script:
     - "class C { C() : x(3) {} }"
 
 RedirectingConstructorWithBody:
   index: 22
-  template: "Redirecting constructors can't have a body."
-  tip: "Try removing the body, or not making this a redirecting constructor."
+  problemMessage: "Redirecting constructors can't have a body."
+  correctionMessage: "Try removing the body, or not making this a redirecting constructor."
   analyzerCode: ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY
   script:
     - "class C { C() : this.x() {} }"
 
 CannotAssignToParenthesizedExpression:
-  template: "Can't assign to a parenthesized expression."
+  problemMessage: "Can't assign to a parenthesized expression."
   analyzerCode: ASSIGNMENT_TO_PARENTHESIZED_EXPRESSION
 
 NotAnLvalue:
-  template: "Can't assign to this."
+  problemMessage: "Can't assign to this."
   analyzerCode: NOT_AN_LVALUE
 
 CannotAssignToSuper:
-  template: "Can't assign to super."
+  problemMessage: "Can't assign to super."
   analyzerCode: NOT_AN_LVALUE
 
 IllegalAssignmentToNonAssignable:
   index: 45
-  template: "Illegal assignment to non-assignable expression."
+  problemMessage: "Illegal assignment to non-assignable expression."
   analyzerCode: ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
   script:
     - "main(){ f()++; }"
 
 MissingAssignableSelector:
   index: 35
-  template: "Missing selector such as '.identifier' or '[0]'."
-  tip: "Try adding a selector."
+  problemMessage: "Missing selector such as '.identifier' or '[0]'."
+  correctionMessage: "Try adding a selector."
   analyzerCode: ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR
   script:
     - "main(){ ++f(); }"
 
 CannotReadSdkSpecification:
-  template: "Unable to read the 'libraries.json' specification file:\n  #string."
+  problemMessage: "Unable to read the 'libraries.json' specification file:\n  #string."
 
 CantInferPackagesFromManyInputs:
-  template: "Can't infer a packages file when compiling multiple inputs."
-  tip: "Try specifying the file explicitly with the --packages option."
+  problemMessage: "Can't infer a packages file when compiling multiple inputs."
+  correctionMessage: "Try specifying the file explicitly with the --packages option."
 
 CantInferPackagesFromPackageUri:
-  template: "Can't infer a packages file from an input 'package:*' URI."
-  tip: "Try specifying the file explicitly with the --packages option."
+  problemMessage: "Can't infer a packages file from an input 'package:*' URI."
+  correctionMessage: "Try specifying the file explicitly with the --packages option."
 
 PackageNotFound:
-  template: "Couldn't resolve the package '#name' in '#uri'."
+  problemMessage: "Couldn't resolve the package '#name' in '#uri'."
 
 InvalidPackageUri:
-  template: "Invalid package URI '#uri':\n  #string."
+  problemMessage: "Invalid package URI '#uri':\n  #string."
 
 CouldNotParseUri:
-  template: "Couldn't parse URI '#string':\n  #string2."
+  problemMessage: "Couldn't parse URI '#string':\n  #string2."
 
 ExpectedUri:
-  template: "Expected a URI."
+  problemMessage: "Expected a URI."
 
 InterpolationInUri:
-  template: "Can't use string interpolation in a URI."
+  problemMessage: "Can't use string interpolation in a URI."
   analyzerCode: INVALID_LITERAL_IN_CONFIGURATION
 
 IntegerLiteralIsOutOfRange:
-  template: "The integer literal #string can't be represented in 64 bits."
-  tip: "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."
+  problemMessage: "The integer literal #string can't be represented in 64 bits."
+  correctionMessage: "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."
   analyzerCode: INTEGER_LITERAL_OUT_OF_RANGE
 
 ColonInPlaceOfIn:
   index: 54
-  template: "For-in loops use 'in' rather than a colon."
-  tip: "Try replacing the colon with the keyword 'in'."
+  problemMessage: "For-in loops use 'in' rather than a colon."
+  correctionMessage: "Try replacing the colon with the keyword 'in'."
   analyzerCode: ParserErrorCode.COLON_IN_PLACE_OF_IN
 
 BinaryOperatorWrittenOut:
   index: 112
-  template: "Binary operator '#string' is written as '#string2' instead of the written out word."
-  tip: "Try replacing '#string' with '#string2'."
+  problemMessage: "Binary operator '#string' is written as '#string2' instead of the written out word."
+  correctionMessage: "Try replacing '#string' with '#string2'."
   analyzerCode: ParserErrorCode.BINARY_OPERATOR_WRITTEN_OUT
   script: >
     int foo(int x, int y) => x xor y;
 
 ExternalFactoryRedirection:
   index: 85
-  template: "A redirecting factory can't be external."
-  tip: "Try removing the 'external' modifier."
+  problemMessage: "A redirecting factory can't be external."
+  correctionMessage: "Try removing the 'external' modifier."
   analyzerCode: ParserErrorCode.EXTERNAL_FACTORY_REDIRECTION
 
 ArgumentTypeNotAssignable:
-  template: "The argument type '#type' can't be assigned to the parameter type '#type2'."
+  problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2'."
   analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
   script: >
     method(int i) {}
@@ -3465,7 +3466,7 @@
     }
 
 ArgumentTypeNotAssignableNullability:
-  template: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -3476,7 +3477,7 @@
     }
 
 ArgumentTypeNotAssignablePartNullability:
-  template: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -3487,7 +3488,7 @@
     }
 
 ArgumentTypeNotAssignableNullabilityNull:
-  template: "The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable."
+  problemMessage: "The value 'null' can't be assigned to the parameter type '#type' because '#type' is not nullable."
   analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -3497,7 +3498,7 @@
     }
 
 ArgumentTypeNotAssignableNullabilityNullType:
-  template: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable."
+  problemMessage: "The argument type '#type' can't be assigned to the parameter type '#type2' because '#type2' is not nullable."
   analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -3508,7 +3509,7 @@
     }
 
 InvalidAssignmentError:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2'."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2'."
   analyzerCode: INVALID_ASSIGNMENT
   script: >
     main() {
@@ -3517,7 +3518,7 @@
     }
 
 InvalidAssignmentErrorNullability:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: INVALID_ASSIGNMENT
   configuration: nnbd-strong
   script: >
@@ -3528,7 +3529,7 @@
     }
 
 InvalidAssignmentErrorPartNullability:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: INVALID_ASSIGNMENT
   configuration: nnbd-strong
   script: >
@@ -3539,7 +3540,7 @@
     }
 
 InvalidAssignmentErrorNullabilityNull:
-  template: "The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable."
+  problemMessage: "The value 'null' can't be assigned to a variable of type '#type' because '#type' is not nullable."
   analyzerCode: INVALID_ASSIGNMENT
   configuration: nnbd-strong
   script: >
@@ -3549,7 +3550,7 @@
     }
 
 InvalidAssignmentErrorNullabilityNullType:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type2' is not nullable."
   analyzerCode: INVALID_ASSIGNMENT
   configuration: nnbd-strong
   script: >
@@ -3560,79 +3561,79 @@
     }
 
 PatchClassTypeVariablesMismatch:
-  template: "A patch class must have the same number of type variables as its origin class."
+  problemMessage: "A patch class must have the same number of type variables as its origin class."
 
 PatchClassOrigin:
-  template: "This is the origin class."
+  problemMessage: "This is the origin class."
   severity: CONTEXT
 
 PatchDeclarationMismatch:
-  template: "This patch doesn't match origin declaration."
+  problemMessage: "This patch doesn't match origin declaration."
 
 PatchDeclarationOrigin:
-  template: "This is the origin declaration."
+  problemMessage: "This is the origin declaration."
   severity: CONTEXT
 
 PatchInjectionFailed:
-  template: "Can't inject '#name' into '#uri'."
-  tip: "Try adding '@patch'."
+  problemMessage: "Can't inject '#name' into '#uri'."
+  correctionMessage: "Try adding '@patch'."
 
 PatchNonExternal:
-  template: "Can't apply this patch as its origin declaration isn't external."
-  tip: "Try adding 'external' to the origin declaration."
+  problemMessage: "Can't apply this patch as its origin declaration isn't external."
+  correctionMessage: "Try adding 'external' to the origin declaration."
 
 InvalidCastFunctionExpr:
-  template: "The function expression type '#type' isn't of expected type '#type2'."
-  tip: "Change the type of the function expression or the context in which it is used."
+  problemMessage: "The function expression type '#type' isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the function expression or the context in which it is used."
   analyzerCode: INVALID_CAST_FUNCTION_EXPR
 
 InvalidCastLiteralList:
-  template: "The list literal type '#type' isn't of expected type '#type2'."
-  tip: "Change the type of the list literal or the context in which it is used."
+  problemMessage: "The list literal type '#type' isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the list literal or the context in which it is used."
   analyzerCode: INVALID_CAST_LITERAL_LIST
 
 InvalidCastLiteralMap:
-  template: "The map literal type '#type' isn't of expected type '#type2'."
-  tip: "Change the type of the map literal or the context in which it is used."
+  problemMessage: "The map literal type '#type' isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the map literal or the context in which it is used."
   analyzerCode: INVALID_CAST_LITERAL_MAP
 
 InvalidCastLiteralSet:
-  template: "The set literal type '#type' isn't of expected type '#type2'."
-  tip: "Change the type of the set literal or the context in which it is used."
+  problemMessage: "The set literal type '#type' isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the set literal or the context in which it is used."
   analyzerCode: INVALID_CAST_LITERAL_SET
 
 InvalidCastLocalFunction:
-  template: "The local function has type '#type' that isn't of expected type '#type2'."
-  tip: "Change the type of the function or the context in which it is used."
+  problemMessage: "The local function has type '#type' that isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the function or the context in which it is used."
   analyzerCode: INVALID_CAST_FUNCTION
 
 InvalidCastNewExpr:
-  template: "The constructor returns type '#type' that isn't of expected type '#type2'."
-  tip: "Change the type of the object being constructed or the context in which it is used."
+  problemMessage: "The constructor returns type '#type' that isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the object being constructed or the context in which it is used."
   analyzerCode: INVALID_CAST_NEW_EXPR
 
 InvalidCastStaticMethod:
-  template: "The static method has type '#type' that isn't of expected type '#type2'."
-  tip: "Change the type of the method or the context in which it is used."
+  problemMessage: "The static method has type '#type' that isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the method or the context in which it is used."
   analyzerCode: INVALID_CAST_METHOD
 
 InvalidCastTopLevelFunction:
-  template: "The top level function has type '#type' that isn't of expected type '#type2'."
-  tip: "Change the type of the function or the context in which it is used."
+  problemMessage: "The top level function has type '#type' that isn't of expected type '#type2'."
+  correctionMessage: "Change the type of the function or the context in which it is used."
   analyzerCode: INVALID_CAST_FUNCTION
 
 InvalidCatchArguments:
-  template: "Invalid catch arguments."
+  problemMessage: "Invalid catch arguments."
   analyzerCode: INVALID_CATCH_ARGUMENTS
 
 InvalidUseOfNullAwareAccess:
-  template: "Cannot use '?.' here."
-  tip: "Try using '.'."
+  problemMessage: "Cannot use '?.' here."
+  correctionMessage: "Try using '.'."
   analyzerCode: INVALID_USE_OF_NULL_AWARE_ACCESS
 
 UndefinedGetter:
-  template: "The getter '#name' isn't defined for the class '#type'."
-  tip: "Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'."
+  problemMessage: "The getter '#name' isn't defined for the class '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'."
   analyzerCode: UNDEFINED_GETTER
   script: >
     class C {}
@@ -3641,8 +3642,8 @@
     }
 
 UndefinedSetter:
-  template: "The setter '#name' isn't defined for the class '#type'."
-  tip: "Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'."
+  problemMessage: "The setter '#name' isn't defined for the class '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'."
   analyzerCode: UNDEFINED_SETTER
   script: >
     class C {}
@@ -3651,8 +3652,8 @@
     }
 
 UndefinedMethod:
-  template: "The method '#name' isn't defined for the class '#type'."
-  tip: "Try correcting the name to the name of an existing method, or defining a method named '#name'."
+  problemMessage: "The method '#name' isn't defined for the class '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing method, or defining a method named '#name'."
   analyzerCode: UNDEFINED_METHOD
   script: >
     class C {}
@@ -3661,8 +3662,8 @@
     }
 
 UndefinedOperator:
-  template: "The operator '#name' isn't defined for the class '#type'."
-  tip: "Try correcting the operator to an existing operator, or defining a '#name' operator."
+  problemMessage: "The operator '#name' isn't defined for the class '#type'."
+  correctionMessage: "Try correcting the operator to an existing operator, or defining a '#name' operator."
   analyzerCode: UNDEFINED_METHOD
   script: >
     class C {}
@@ -3671,24 +3672,24 @@
     }
 
 UndefinedExtensionGetter:
-  template: "The getter '#name' isn't defined for the extension '#type'."
-  tip: "Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'."
+  problemMessage: "The getter '#name' isn't defined for the extension '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'."
 
 UndefinedExtensionSetter:
-  template: "The setter '#name' isn't defined for the extension '#type'."
-  tip: "Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'."
+  problemMessage: "The setter '#name' isn't defined for the extension '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'."
 
 UndefinedExtensionMethod:
-  template: "The method '#name' isn't defined for the extension '#type'."
-  tip: "Try correcting the name to the name of an existing method, or defining a method name '#name'."
+  problemMessage: "The method '#name' isn't defined for the extension '#type'."
+  correctionMessage: "Try correcting the name to the name of an existing method, or defining a method name '#name'."
 
 UndefinedExtensionOperator:
-  template: "The operator '#name' isn't defined for the extension '#type'."
-  tip: "Try correcting the operator to an existing operator, or defining a '#name' operator."
+  problemMessage: "The operator '#name' isn't defined for the extension '#type'."
+  correctionMessage: "Try correcting the operator to an existing operator, or defining a '#name' operator."
 
 AmbiguousExtensionMethod:
-  template: "The method '#name' is defined in multiple extensions for '#type' and neither is more specific."
-  tip: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
+  problemMessage: "The method '#name' is defined in multiple extensions for '#type' and neither is more specific."
+  correctionMessage: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
   script: |
     class C {}
     extension A on C { method() {} }
@@ -3699,8 +3700,8 @@
     }
 
 AmbiguousExtensionProperty:
-  template: "The property '#name' is defined in multiple extensions for '#type' and neither is more specific."
-  tip: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
+  problemMessage: "The property '#name' is defined in multiple extensions for '#type' and neither is more specific."
+  correctionMessage: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
   script: |
     class C {}
     extension A on C { get property => null; }
@@ -3711,8 +3712,8 @@
     }
 
 AmbiguousExtensionOperator:
-  template: "The operator '#name' is defined in multiple extensions for '#type' and neither is more specific."
-  tip: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
+  problemMessage: "The operator '#name' is defined in multiple extensions for '#type' and neither is more specific."
+  correctionMessage: "Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope."
   script: |
     class C {}
     extension A on C { operator +(int i) {} }
@@ -3723,30 +3724,30 @@
     }
 
 AmbiguousExtensionCause:
-  template: "This is one of the extension members."
+  problemMessage: "This is one of the extension members."
   severity: CONTEXT
 
 SourceOutlineSummary:
-  template: |
+  problemMessage: |
     Built outlines for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
     #num2%12.3 bytes/ms, and
     #num3%12.3 ms/compilation unit.
 
 SourceBodySummary:
-  template: |
+  problemMessage: |
     Built bodies for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
     #num2%12.3 bytes/ms, and
     #num3%12.3 ms/compilation unit.
 
 DillOutlineSummary:
-  template: |
+  problemMessage: |
     Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is,
     #num2%12.3 bytes/ms, and
     #num3%12.3 ms/libraries.
 
 CantInferTypesDueToNoCombinedSignature:
-  template: "Can't infer types for '#name' as the overridden members don't have a combined signature."
-  tip: "Try adding explicit types."
+  problemMessage: "Can't infer types for '#name' as the overridden members don't have a combined signature."
+  correctionMessage: "Try adding explicit types."
   analyzerCode: COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE
   script: |
     class A {
@@ -3760,8 +3761,8 @@
     }
 
 CantInferTypeDueToNoCombinedSignature:
-  template: "Can't infer a type for '#name' as the overridden members don't have a combined signature."
-  tip: "Try adding an explicit type."
+  problemMessage: "Can't infer a type for '#name' as the overridden members don't have a combined signature."
+  correctionMessage: "Try adding an explicit type."
   analyzerCode: COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE
   configuration: nnbd-strong
   script: |
@@ -3776,8 +3777,8 @@
     }
 
 CantInferReturnTypeDueToNoCombinedSignature:
-  template: "Can't infer a return type for '#name' as the overridden members don't have a combined signature."
-  tip: "Try adding an explicit type."
+  problemMessage: "Can't infer a return type for '#name' as the overridden members don't have a combined signature."
+  correctionMessage: "Try adding an explicit type."
   analyzerCode: COMPILE_TIME_ERROR.NO_COMBINED_SUPER_SIGNATURE
   configuration: nnbd-strong
   script: |
@@ -3792,42 +3793,42 @@
     }
 
 CantInferTypeDueToCircularity:
-  template: "Can't infer the type of '#string': circularity found during type inference."
-  tip: "Specify the type explicitly."
+  problemMessage: "Can't infer the type of '#string': circularity found during type inference."
+  correctionMessage: "Specify the type explicitly."
   analyzerCode: RECURSIVE_COMPILE_TIME_CONSTANT
 
 AmbiguousSupertypes:
-  template: "'#name' can't implement both '#type' and '#type2'"
+  problemMessage: "'#name' can't implement both '#type' and '#type2'"
   analyzerCode: AMBIGUOUS_SUPERTYPES
 
 MixinInferenceNoMatchingClass:
-  template: "Type parameters couldn't be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'."
+  problemMessage: "Type parameters couldn't be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'."
   analyzerCode: MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION
 
 ImplicitCallOfNonMethod:
-  template: "Cannot invoke an instance of '#type' because it declares 'call' to be something other than a method."
-  tip: "Try changing 'call' to a method or explicitly invoke 'call'."
+  problemMessage: "Cannot invoke an instance of '#type' because it declares 'call' to be something other than a method."
+  correctionMessage: "Try changing 'call' to a method or explicitly invoke 'call'."
   analyzerCode: IMPLICIT_CALL_OF_NON_METHOD
 
 ExpectedOneExpression:
-  template: "Expected one expression, but found additional input."
+  problemMessage: "Expected one expression, but found additional input."
 
 ForInLoopNotAssignable:
-  template: "Can't assign to this, so it can't be used in a for-in loop."
+  problemMessage: "Can't assign to this, so it can't be used in a for-in loop."
   statement: "for (1 in []) {}"
 
 ForInLoopExactlyOneVariable:
-  template: "A for-in loop can't have more than one loop variable."
+  problemMessage: "A for-in loop can't have more than one loop variable."
   statement: "for (var x, y in []) {}"
 
 ForInLoopWithConstVariable:
-  template: "A for-in loop-variable can't be 'const'."
-  tip: "Try removing the 'const' modifier."
+  problemMessage: "A for-in loop-variable can't be 'const'."
+  correctionMessage: "Try removing the 'const' modifier."
   analyzerCode: FOR_IN_WITH_CONST_VARIABLE
 
 ForInLoopElementTypeNotAssignable:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2'."
-  tip: "Try changing the type of the variable."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2'."
+  correctionMessage: "Try changing the type of the variable."
   analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE
   script: |
     method() {
@@ -3836,8 +3837,8 @@
     }
 
 ForInLoopElementTypeNotAssignableNullability:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't."
-  tip: "Try changing the type of the variable."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type' is nullable and '#type2' isn't."
+  correctionMessage: "Try changing the type of the variable."
   analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE
   configuration: nnbd-strong
   script: |
@@ -3847,8 +3848,8 @@
     }
 
 ForInLoopElementTypeNotAssignablePartNullability:
-  template: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't."
-  tip: "Try changing the type of the variable."
+  problemMessage: "A value of type '#type' can't be assigned to a variable of type '#type2' because '#type3' is nullable and '#type4' isn't."
+  correctionMessage: "Try changing the type of the variable."
   analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE
   configuration: nnbd-strong
   script: |
@@ -3858,7 +3859,7 @@
     }
 
 ForInLoopTypeNotIterable:
-  template: "The type '#type' used in the 'for' loop must implement '#type2'."
+  problemMessage: "The type '#type' used in the 'for' loop must implement '#type2'."
   analyzerCode: FOR_IN_OF_INVALID_TYPE
   script: |
     method() {
@@ -3867,7 +3868,7 @@
     }
 
 ForInLoopTypeNotIterableNullability:
-  template: "The type '#type' used in the 'for' loop must implement '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "The type '#type' used in the 'for' loop must implement '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: FOR_IN_OF_INVALID_TYPE
   configuration: nnbd-strong
   script: |
@@ -3880,12 +3881,12 @@
 # only be a problem at the immediate level as in [ForInLoopTypeNotIterableNullability]. The message is needed for
 # symmetry in the call site.
 ForInLoopTypeNotIterablePartNullability:
-  template: "The type '#type' used in the 'for' loop must implement '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "The type '#type' used in the 'for' loop must implement '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: FOR_IN_OF_INVALID_TYPE
 
 InitializingFormalTypeMismatch:
-  template: "The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'."
-  tip: "Try changing the type of parameter '#name' to a subtype of '#type2'."
+  problemMessage: "The type of parameter '#name', '#type' is not a subtype of the corresponding field's type, '#type2'."
+  correctionMessage: "Try changing the type of parameter '#name' to a subtype of '#type2'."
   analyzerCode: INVALID_PARAMETER_DECLARATION
   script: >
     class C {
@@ -3894,11 +3895,11 @@
     }
 
 InitializingFormalTypeMismatchField:
-  template: "The field that corresponds to the parameter."
+  problemMessage: "The field that corresponds to the parameter."
   severity: CONTEXT
 
 InitializeFromDillNotSelfContained:
-  template: |
+  problemMessage: |
     Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug.
 
     The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.
@@ -3910,7 +3911,7 @@
   external: test/incremental_load_from_invalid_dill_test.dart
 
 InitializeFromDillNotSelfContainedNoDump:
-  template: |
+  problemMessage: |
     Tried to initialize from a previous compilation (#string), but the file was not self-contained. This might be a bug.
 
     The Dart team would greatly appreciate it if you would take a moment to report this problem at http://dartbug.com/new.
@@ -3920,7 +3921,7 @@
   external: test/incremental_load_from_invalid_dill_test.dart
 
 InitializeFromDillUnknownProblem:
-  template: |
+  problemMessage: |
     Tried to initialize from a previous compilation (#string), but couldn't.
     Error message was '#string2'.
     Stacktrace included '#string3'.
@@ -3935,7 +3936,7 @@
   external: test/incremental_load_from_invalid_dill_test.dart
 
 InitializeFromDillUnknownProblemNoDump:
-  template: |
+  problemMessage: |
     Tried to initialize from a previous compilation (#string), but couldn't.
     Error message was '#string2'.
     Stacktrace included '#string3'.
@@ -3948,56 +3949,56 @@
   external: test/incremental_load_from_invalid_dill_test.dart
 
 WebLiteralCannotBeRepresentedExactly:
-  template: "The integer literal #string can't be represented exactly in JavaScript."
-  tip: "Try changing the literal to something that can be represented in Javascript. In Javascript #string2 is the nearest value that can be represented exactly."
+  problemMessage: "The integer literal #string can't be represented exactly in JavaScript."
+  correctionMessage: "Try changing the literal to something that can be represented in Javascript. In Javascript #string2 is the nearest value that can be represented exactly."
 
 BoundIssueViaRawTypeWithNonSimpleBounds:
-  template: "Generic type '#name' can't be used without type arguments in a type variable bound."
-  tip: "Try providing type arguments to '#name' here."
+  problemMessage: "Generic type '#name' can't be used without type arguments in a type variable bound."
+  correctionMessage: "Try providing type arguments to '#name' here."
   analyzerCode: NOT_INSTANTIATED_BOUND
   script: >
     class Hest<X extends Hest<X>> {}
     class Fisk<Y extends Hest> {}
 
 NonSimpleBoundViaVariable:
-  template: "Bound of this variable references variable '#name' from the same declaration."
+  problemMessage: "Bound of this variable references variable '#name' from the same declaration."
   severity: CONTEXT
 
 BoundIssueViaLoopNonSimplicity:
-  template: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables."
-  tip: "Try providing type arguments to '#name' here."
+  problemMessage: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables."
+  correctionMessage: "Try providing type arguments to '#name' here."
   analyzerCode: NOT_INSTANTIATED_BOUND
   script: >
     class Hest<X extends Hest> {}
 
 BoundIssueViaCycleNonSimplicity:
-  template: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '#name2'."
-  tip: "Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain."
+  problemMessage: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '#name2'."
+  correctionMessage: "Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain."
   analyzerCode: NOT_INSTANTIATED_BOUND
   script: >
     class Hest<X extends Fisk> {}
     class Fisk<Y extends Hest> {}
 
 NonSimpleBoundViaReference:
-  template: "Bound of this variable references raw type '#name'."
+  problemMessage: "Bound of this variable references raw type '#name'."
   severity: CONTEXT
 
 CycleInTypeVariables:
-  template: "Type '#name' is a bound of itself via '#string'."
-  tip: "Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle."
+  problemMessage: "Type '#name' is a bound of itself via '#string'."
+  correctionMessage: "Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle."
   analyzerCode: TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND
   script:
     - "foo<A extends B, B extends A>() {}"
 
 DirectCycleInTypeVariables:
-  template: "Type '#name' can't use itself as a bound."
-  tip: "Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle."
+  problemMessage: "Type '#name' can't use itself as a bound."
+  correctionMessage: "Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle."
   analyzerCode: TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND
   script:
     - "foo<A extends A>() {}"
 
 CantUsePrefixAsExpression:
-  template: "A prefix can't be used as an expression."
+  problemMessage: "A prefix can't be used as an expression."
   analyzerCode: PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
   script: |
     import "dart:core" as prefix;
@@ -4007,8 +4008,8 @@
     }
 
 CantUsePrefixWithNullAware:
-  template: "A prefix can't be used with null-aware operators."
-  tip: "Try replacing '?.' with '.'"
+  problemMessage: "A prefix can't be used with null-aware operators."
+  correctionMessage: "Try replacing '?.' with '.'"
   analyzerCode: PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
   script: |
     import "dart:core" as prefix;
@@ -4018,14 +4019,14 @@
     }
 
 CantUseControlFlowOrSpreadAsConstant:
-  template: "'#lexeme' is not supported in constant expressions."
+  problemMessage: "'#lexeme' is not supported in constant expressions."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
 CantUseDeferredPrefixAsConstant:
-  template: >
+  problemMessage: >
     '#lexeme' can't be used in a constant expression because it's marked as
     'deferred' which means it isn't available until loaded.
-  tip: >
+  correctionMessage: >
     Try moving the constant from the deferred library, or removing 'deferred'
     from the import.
   analyzerCode: CONST_DEFERRED_CLASS
@@ -4037,7 +4038,7 @@
     }
 
 CyclicRedirectingFactoryConstructors:
-  template: "Cyclic definition of factory '#name'."
+  problemMessage: "Cyclic definition of factory '#name'."
   analyzerCode: RECURSIVE_FACTORY_REDIRECT
   script: |
     class Foo {
@@ -4047,14 +4048,14 @@
     main() { var foo = new Foo.foo(); }
 
 GenericFunctionTypeInBound:
-  template: "Type variables can't have generic function types in their bounds."
+  problemMessage: "Type variables can't have generic function types in their bounds."
   analyzerCode: GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND
   script: |
     // @dart=2.13
     class Hest<X extends Y Function<Y>(Y)> {}
 
 VoidExpression:
-  template: "This expression has type 'void' and can't be used."
+  problemMessage: "This expression has type 'void' and can't be used."
   analyzerCode: USE_OF_VOID_RESULT
   statement: |
     {
@@ -4063,12 +4064,12 @@
     }
 
 ReturnFromVoidFunction:
-  template: "Can't return a value from a void function."
+  problemMessage: "Can't return a value from a void function."
   analyzerCode: RETURN_OF_INVALID_TYPE
   declaration: "void foo() { return 1; }"
 
 ReturnWithoutExpression:
-  template: "Must explicitly return a value from a non-void function."
+  problemMessage: "Must explicitly return a value from a non-void function."
   severity: WARNING
   analyzerCode: RETURN_WITHOUT_VALUE
   script: |
@@ -4076,79 +4077,79 @@
     int foo() { return; }
 
 ReturnWithoutExpressionSync:
-  template: "A value must be explicitly returned from a non-void function."
+  problemMessage: "A value must be explicitly returned from a non-void function."
   configuration: nnbd-strong
   script: |
     import "dart:async";
     FutureOr<Object?> foo() { return; }
 
 ReturnWithoutExpressionAsync:
-  template: "A value must be explicitly returned from a non-void async function."
+  problemMessage: "A value must be explicitly returned from a non-void async function."
   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'."
+  problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2'."
   configuration: nnbd-strong
   declaration: "int foo() { return true; }"
 
 InvalidReturnNullability:
-  template: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type' is nullable and '#type2' isn't."
   configuration: nnbd-strong
   declaration: "int foo(int? i) { return i; }"
 
 InvalidReturnPartNullability:
-  template: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type3' is nullable and '#type4' isn't."
   configuration: nnbd-strong
   declaration: "List<int> foo(List<int?> list) { return list; }"
 
 InvalidReturnNullabilityNull:
-  template: "The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable."
+  problemMessage: "The value 'null' can't be returned from a function with return type '#type' because '#type' is not nullable."
   configuration: nnbd-strong
   declaration: "int foo() { return null; }"
 
 InvalidReturnNullabilityNullType:
-  template: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable."
+  problemMessage: "A value of type '#type' can't be returned from a function with return type '#type2' because '#type2' is not nullable."
   configuration: nnbd-strong
   declaration: "int foo(Null i) { return i; }"
 
 InvalidReturnAsync:
-  template: "A value of type '#type' can't be returned from an async function with return type '#type2'."
+  problemMessage: "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; }"
 
 InvalidReturnAsyncNullability:
-  template: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type' is nullable and '#type2' isn't."
   configuration: nnbd-strong
   declaration: "Future<int> foo(int? i) async { return i; }"
 
 InvalidReturnAsyncPartNullability:
-  template: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type3' is nullable and '#type4' isn't."
   configuration: nnbd-strong
   declaration: "Future<List<int>> foo(List<int?> list) async { return list; }"
 
 InvalidReturnAsyncNullabilityNull:
-  template: "The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable."
+  problemMessage: "The value 'null' can't be returned from an async function with return type '#type' because '#type' is not nullable."
   configuration: nnbd-strong
   declaration: "Future<int> foo() async { return null; }"
 
 InvalidReturnAsyncNullabilityNullType:
-  template: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable."
+  problemMessage: "A value of type '#type' can't be returned from an async function with return type '#type2' because '#type2' is not nullable."
   configuration: nnbd-strong
   declaration: "Future<int> foo(Null n) async { return n; }"
 
 ImplicitReturnNull:
-  template: "A non-null value must be returned since the return type '#type' doesn't allow null."
+  problemMessage: "A non-null value must be returned since the return type '#type' doesn't allow null."
   configuration: nnbd-strong
   script: |
     String method() {}
 
 RethrowNotCatch:
-  template: "'rethrow' can only be used in catch clauses."
+  problemMessage: "'rethrow' can only be used in catch clauses."
   analyzerCode: RETHROW_OUTSIDE_CATCH
 
 InvokeNonFunction:
-  template: "'#name' isn't a function or method and can't be invoked."
+  problemMessage: "'#name' isn't a function or method and can't be invoked."
   analyzerCode: INVOCATION_OF_NON_FUNCTION
   script: |
     // @dart=2.9
@@ -4161,15 +4162,15 @@
     }
 
 ConstInstanceField:
-  template: "Only static fields can be declared as const."
-  tip: "Try using 'final' instead of 'const', or adding the keyword 'static'."
+  problemMessage: "Only static fields can be declared as const."
+  correctionMessage: "Try using 'final' instead of 'const', or adding the keyword 'static'."
   analyzerCode: CONST_INSTANCE_FIELD
   script:
     - "class C { const field = 0; }"
 
 DefaultValueInRedirectingFactoryConstructor:
-  template: "Can't have a default value here because any default values of '#name' would be used instead."
-  tip: "Try removing the default value."
+  problemMessage: "Can't have a default value here because any default values of '#name' would be used instead."
+  correctionMessage: "Try removing the default value."
   analyzerCode: DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR
   script:
     - >-
@@ -4179,7 +4180,7 @@
       }
 
 UntranslatableUri:
-  template: "Not found: '#uri'"
+  problemMessage: "Not found: '#uri'"
   analyzerCode: URI_DOES_NOT_EXIST
   script: |
     import "dart:non_existing_library";
@@ -4188,7 +4189,7 @@
     }
 
 CantReadFile:
-  template: "Error when reading '#uri': #string"
+  problemMessage: "Error when reading '#uri': #string"
   analyzerCode: URI_DOES_NOT_EXIST
   external: test/packages_format_error_test.dart
   script: |
@@ -4198,14 +4199,14 @@
     }
 
 ExceptionReadingFile:
-  template: "Exception when reading '#uri': #string"
+  problemMessage: "Exception when reading '#uri': #string"
 
 PackagesFileFormat:
-  template: "Problem in packages configuration file: #string"
+  problemMessage: "Problem in packages configuration file: #string"
   external: test/packages_format_error_test.dart
 
 IncompatibleRedirecteeFunctionType:
-  template: "The constructor function type '#type' isn't a subtype of '#type2'."
+  problemMessage: "The constructor function type '#type' isn't a subtype of '#type2'."
   analyzerCode: REDIRECT_TO_INVALID_TYPE
   script:
     - >-
@@ -4242,8 +4243,8 @@
       class B<T extends int, S extends String> implements A<T> {}
 
 RedirectingFactoryIncompatibleTypeArgument:
-  template: "The type '#type' doesn't extend '#type2'."
-  tip: "Try using a different type as argument."
+  problemMessage: "The type '#type' doesn't extend '#type2'."
+  correctionMessage: "Try using a different type as argument."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script:
     - >-
@@ -4253,68 +4254,68 @@
       class B<T extends int, S extends String> implements A<T> {}
 
 SyntheticToken:
-  template: "This couldn't be parsed."
+  problemMessage: "This couldn't be parsed."
   frontendInternal: true
 
 IncorrectTypeArgument:
-  template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
-  tip: "Try changing type arguments so that they conform to the bounds."
+  problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
+  correctionMessage: "Try changing type arguments so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class C<T extends num> {}
     main() { new C<String>(); }
 
 IncorrectTypeArgumentQualified:
-  template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'."
-  tip: "Try changing type arguments so that they conform to the bounds."
+  problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'."
+  correctionMessage: "Try changing type arguments so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class C<T> { foo<U extends num>() {} }
     main() { new C<String>().foo<String>(); }
 
 IncorrectTypeArgumentInSupertype:
-  template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
-  tip: "Try changing type arguments so that they conform to the bounds."
+  problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
+  correctionMessage: "Try changing type arguments so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class A<T extends num> {}
     class B extends A<String> {}
 
 IncorrectTypeArgumentInReturnType:
-  template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type."
-  tip: "Try changing type arguments so that they conform to the bounds."
+  problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the return type."
+  correctionMessage: "Try changing type arguments so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class A<T extends num> {}
     A<String> foo() => throw '';
 
 IncorrectTypeArgumentInferred:
-  template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
-  tip: "Try specifying type arguments explicitly so that they conform to the bounds."
+  problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2'."
+  correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     void foo<T extends num>(T t) {}
     main() { foo("bar"); }
 
 IncorrectTypeArgumentQualifiedInferred:
-  template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'."
-  tip: "Try specifying type arguments explicitly so that they conform to the bounds."
+  problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3.#name2'."
+  correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class C<T> { foo<U extends num>(U u) {} }
     main() { new C<String>().foo(""); }
 
 IncorrectTypeArgumentInSupertypeInferred:
-  template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
-  tip: "Try specifying type arguments explicitly so that they conform to the bounds."
+  problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#name2' in the supertype '#name3' of class '#name4'."
+  correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: >
     class A<T extends A<T>> {}
     class B extends A {}
 
 IncorrectTypeArgumentInstantiation:
-  template: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'."
-  tip: "Try changing type arguments so that they conform to the bounds."
+  problemMessage: "Type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'."
+  correctionMessage: "Try changing type arguments so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   experiments: constructor-tearoffs
   script: |
@@ -4324,8 +4325,8 @@
     }
 
 IncorrectTypeArgumentInstantiationInferred:
-  template: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'."
-  tip: "Try specifying type arguments explicitly so that they conform to the bounds."
+  problemMessage: "Inferred type argument '#type' doesn't conform to the bound '#type2' of the type variable '#name' on '#type3'."
+  correctionMessage: "Try specifying type arguments explicitly so that they conform to the bounds."
   analyzerCode: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
   script: |
     X bounded<X extends num>(X x) => x;
@@ -4334,15 +4335,15 @@
     }
 
 IncorrectTypeArgumentVariable:
-  template: "This is the type variable whose bound isn't conformed to."
+  problemMessage: "This is the type variable whose bound isn't conformed to."
   severity: CONTEXT
 
 SuperBoundedHint:
-  template: "If you want '#type' to be a super-bounded type, note that the inverted type '#type2' must then satisfy its bounds, which it does not."
+  problemMessage: "If you want '#type' to be a super-bounded type, note that the inverted type '#type2' must then satisfy its bounds, which it does not."
   severity: CONTEXT
 
 InferredPackageUri:
-  template: "Interpreting this as package URI, '#uri'."
+  problemMessage: "Interpreting this as package URI, '#uri'."
   severity: WARNING
   frontendInternal: true
   script:
@@ -4352,7 +4353,7 @@
       example:./
 
 MixinApplicationIncompatibleSupertype:
-  template: "'#type' doesn't implement '#type2' so it can't be used with '#type3'."
+  problemMessage: "'#type' doesn't implement '#type2' so it can't be used with '#type3'."
   analyzerCode: MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE
   script: >-
     class I {}
@@ -4360,8 +4361,8 @@
     class C = Object with M;
 
 GenericFunctionTypeUsedAsActualTypeArgument:
-  template: "A generic function type can't be used as a type argument."
-  tip: "Try using a non-generic function type."
+  problemMessage: "A generic function type can't be used as a type argument."
+  correctionMessage: "Try using a non-generic function type."
   analyzerCode: GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT
   script:
     - |
@@ -4380,8 +4381,8 @@
       }
 
 GenericFunctionTypeInferredAsActualTypeArgument:
-  template: "Generic function type '#type' inferred as a type argument."
-  tip: "Try providing a non-generic function type explicitly."
+  problemMessage: "Generic function type '#type' inferred as a type argument."
+  correctionMessage: "Try providing a non-generic function type explicitly."
   analyzerCode: GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT
   script: |
     // @dart=2.13
@@ -4392,32 +4393,32 @@
 # These two message templates are used for constructing supplemental text
 # about the origins of raw interface types in error messages containing types.
 TypeOrigin:
-  template: "'#name' is from '#uri'."
+  problemMessage: "'#name' is from '#uri'."
   frontendInternal: true
   external: test/type_labeler_test.dart
 
 TypeOriginWithFileUri:
-  template: "'#name' is from '#uri' ('#uri2')."
+  problemMessage: "'#name' is from '#uri' ('#uri2')."
   frontendInternal: true
   external: test/type_labeler_test.dart
 
 ObjectExtends:
-  template: "The class 'Object' can't have a superclass."
+  problemMessage: "The class 'Object' can't have a superclass."
   frontendInternal: true
   external: test/fasta/object_supertype_test.dart
 
 ObjectImplements:
-  template: "The class 'Object' can't implement anything."
+  problemMessage: "The class 'Object' can't implement anything."
   frontendInternal: true
   external: test/fasta/object_supertype_test.dart
 
 ObjectMixesIn:
-  template: "The class 'Object' can't use mixins."
+  problemMessage: "The class 'Object' can't use mixins."
   frontendInternal: true
   external: test/fasta/object_supertype_test.dart
 
 StaticAndInstanceConflict:
-  template: "This static member conflicts with an instance member."
+  problemMessage: "This static member conflicts with an instance member."
   script:
     - |
       class C {
@@ -4432,139 +4433,139 @@
   analyzerCode: CONFLICTING_STATIC_AND_INSTANCE
 
 StaticAndInstanceConflictCause:
-  template: "This is the instance member."
+  problemMessage: "This is the instance member."
   severity: CONTEXT
 
 FfiTypeMismatch:
   # Used by dart:ffi
-  template: "Expected type '#type' to be '#type2', which is the Dart type corresponding to '#type3'."
+  problemMessage: "Expected type '#type' to be '#type2', which is the Dart type corresponding to '#type3'."
   external: test/ffi_test.dart
 
 FfiEmptyStruct:
   # Used by dart:ffi
-  template: "#string '#name' is empty. Empty structs and unions are undefined behavior."
+  problemMessage: "#string '#name' is empty. Empty structs and unions are undefined behavior."
   external: test/ffi_test.dart
 
 FfiTypeInvalid:
   # Used by dart:ffi
-  template: "Expected type '#type' to be a valid and instantiated subtype of 'NativeType'."
+  problemMessage: "Expected type '#type' to be a valid and instantiated subtype of 'NativeType'."
   external: test/ffi_test.dart
 
 FfiFieldNull:
   # Used by dart:ffi
-  template: "Field '#name' cannot have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`."
+  problemMessage: "Field '#name' cannot have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`."
   external: test/ffi_test.dart
 
 FfiFieldAnnotation:
   # Used by dart:ffi
-  template: "Field '#name' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields."
+  problemMessage: "Field '#name' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields."
   external: test/ffi_test.dart
 
 FfiFieldNoAnnotation:
   # Used by dart:ffi
-  template: "Field '#name' requires no annotation to declare its native type, it is a Pointer which is represented by the same type in Dart and native code."
+  problemMessage: "Field '#name' requires no annotation to declare its native type, it is a Pointer which is represented by the same type in Dart and native code."
   external: test/ffi_test.dart
 
 FfiFieldCyclic:
   # Used by dart:ffi
-  template: |
+  problemMessage: |
     #string '#name' contains itself. Cycle elements:
     #names
   external: test/ffi_test.dart
 
 FfiNotStatic:
   # Used by dart:ffi
-  template: "#name expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context."
+  problemMessage: "#name expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context."
   external: test/ffi_test.dart
 
 FfiFieldInitializer:
   # Used by dart:ffi
-  template: "Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution."
-  tip: "Mark the field as external to avoid having to initialize it."
+  problemMessage: "Field '#name' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution."
+  correctionMessage: "Mark the field as external to avoid having to initialize it."
   external: test/ffi_test.dart
 
 FfiExtendsOrImplementsSealedClass:
   # Used by dart:ffi
-  template: "Class '#name' cannot be extended or implemented."
+  problemMessage: "Class '#name' cannot be extended or implemented."
   external: test/ffi_test.dart
 
 FfiPackedAnnotation:
   # Used by dart:ffi
-  template: "Struct '#name' must have at most one 'Packed' annotation."
+  problemMessage: "Struct '#name' must have at most one 'Packed' annotation."
   external: test/ffi_test.dart
 
 FfiPackedAnnotationAlignment:
   # Used by dart:ffi
-  template: "Only packing to 1, 2, 4, 8, and 16 bytes is supported."
+  problemMessage: "Only packing to 1, 2, 4, 8, and 16 bytes is supported."
   external: test/ffi_test.dart
 
 FfiPackedNestingNonPacked:
   # Used by dart:ffi
-  template: "Nesting the non-packed or less tightly packed struct '#name' in a packed struct '#name2' is not supported."
+  problemMessage: "Nesting the non-packed or less tightly packed struct '#name' in a packed struct '#name2' is not supported."
   external: test/ffi_test.dart
 
 FfiSizeAnnotation:
   # Used by dart:ffi
-  template: "Field '#name' must have exactly one 'Array' annotation."
+  problemMessage: "Field '#name' must have exactly one 'Array' annotation."
   external: test/ffi_test.dart
 
 FfiSizeAnnotationDimensions:
   # Used by dart:ffi
-  template: "Field '#name' must have an 'Array' annotation that matches the dimensions."
+  problemMessage: "Field '#name' must have an 'Array' annotation that matches the dimensions."
   external: test/ffi_test.dart
 
 FfiStructGeneric:
   # Used by dart:ffi
-  template: "#string '#name' should not be generic."
+  problemMessage: "#string '#name' should not be generic."
   external: test/ffi_test.dart
 
 FfiDartTypeMismatch:
   # Used by dart:ffi
-  template: "Expected '#type' to be a subtype of '#type2'."
+  problemMessage: "Expected '#type' to be a subtype of '#type2'."
   external: test/ffi_test.dart
 
 FfiExpectedExceptionalReturn:
   # Used by dart:ffi
-  template: "Expected an exceptional return value for a native callback returning '#type'."
+  problemMessage: "Expected an exceptional return value for a native callback returning '#type'."
   external: test/ffi_test.dart
 
 FfiExpectedNoExceptionalReturn:
   # Used by dart:ffi
-  template: "Exceptional return value cannot be provided for a native callback returning '#type'."
+  problemMessage: "Exceptional return value cannot be provided for a native callback returning '#type'."
   external: test/ffi_test.dart
 
 FfiExpectedConstant:
   # Used by dart:ffi
-  template: "Exceptional return value must be a constant."
+  problemMessage: "Exceptional return value must be a constant."
   external: test/ffi_test.dart
 
 FfiExceptionalReturnNull:
   # Used by dart:ffi
-  template: "Exceptional return value must not be null."
+  problemMessage: "Exceptional return value must not be null."
   external: test/ffi_test.dart
 
 FfiExpectedConstantArg:
   # Used by dart:ffi
-  template: "Argument '#name' must be a constant."
+  problemMessage: "Argument '#name' must be a constant."
   external: test/ffi_test.dart
 
 FfiLeafCallMustNotTakeHandle:
   # Used by dart:ffi
-  template: "FFI leaf call must not have Handle argument types."
+  problemMessage: "FFI leaf call must not have Handle argument types."
   external: test/ffi_test.dart
 
 FfiLeafCallMustNotReturnHandle:
   # Used by dart:ffi
-  template: "FFI leaf call must not have Handle return type."
+  problemMessage: "FFI leaf call must not have Handle return type."
   external: test/ffi_test.dart
 
 FfiNativeAnnotationMustAnnotateStatic:
   # Used by dart:ffi
-  template: "FfiNative annotations can only be used on static functions."
+  problemMessage: "FfiNative annotations can only be used on static functions."
   external: test/ffi_test.dart
 
 SpreadTypeMismatch:
-  template: "Unexpected type '#type' of a spread.  Expected 'dynamic' or an Iterable."
+  problemMessage: "Unexpected type '#type' of a spread.  Expected 'dynamic' or an Iterable."
   script:
     - |
       main() {
@@ -4578,7 +4579,7 @@
       }
 
 SpreadElementTypeMismatch:
-  template: "Can't assign spread elements of type '#type' to collection elements of type '#type2'."
+  problemMessage: "Can't assign spread elements of type '#type' to collection elements of type '#type2'."
   analyzerCode: LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
   script: >
     main() {
@@ -4587,7 +4588,7 @@
     }
 
 SpreadElementTypeMismatchNullability:
-  template: "Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4597,7 +4598,7 @@
     }
 
 SpreadElementTypeMismatchPartNullability:
-  template: "Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "Can't assign spread elements of type '#type' to collection elements of type '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4607,7 +4608,7 @@
     }
 
 SpreadMapEntryTypeMismatch:
-  template: "Unexpected type '#type' of a map spread entry.  Expected 'dynamic' or a Map."
+  problemMessage: "Unexpected type '#type' of a map spread entry.  Expected 'dynamic' or a Map."
   script:
     - |
       main() {
@@ -4621,7 +4622,7 @@
       }
 
 SpreadMapEntryElementKeyTypeMismatch:
-  template: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'."
+  problemMessage: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'."
   analyzerCode: MAP_KEY_TYPE_NOT_ASSIGNABLE
   script: >
     main() {
@@ -4630,7 +4631,7 @@
     }
 
 SpreadMapEntryElementKeyTypeMismatchNullability:
-  template: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: MAP_KEY_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4640,7 +4641,7 @@
     }
 
 SpreadMapEntryElementKeyTypeMismatchPartNullability:
-  template: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: MAP_KEY_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4650,7 +4651,7 @@
     }
 
 SpreadMapEntryElementValueTypeMismatch:
-  template: "Can't assign spread entry values of type '#type' to map entry values of type '#type2'."
+  problemMessage: "Can't assign spread entry values of type '#type' to map entry values of type '#type2'."
   analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
   script: >
     main() {
@@ -4659,7 +4660,7 @@
     }
 
 SpreadMapEntryElementValueTypeMismatchNullability:
-  template: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type' is nullable and '#type2' isn't."
+  problemMessage: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type' is nullable and '#type2' isn't."
   analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4669,7 +4670,7 @@
     }
 
 SpreadMapEntryElementValueTypeMismatchPartNullability:
-  template: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type3' is nullable and '#type4' isn't."
+  problemMessage: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type3' is nullable and '#type4' isn't."
   analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
   configuration: nnbd-strong
   script: >
@@ -4679,30 +4680,30 @@
     }
 
 CantDisambiguateNotEnoughInformation:
-  template: "Not enough type information to disambiguate between literal set and literal map."
-  tip: "Try providing type arguments for the literal explicitly to disambiguate it."
+  problemMessage: "Not enough type information to disambiguate between literal set and literal map."
+  correctionMessage: "Try providing type arguments for the literal explicitly to disambiguate it."
   script: >
     foo(dynamic spread) {
       var a = {...spread};
     }
 
 CantDisambiguateAmbiguousInformation:
-  template: "Both Iterable and Map spread elements encountered in ambiguous literal."
+  problemMessage: "Both Iterable and Map spread elements encountered in ambiguous literal."
   script: >
     foo(Iterable<int> iterableSpread, Map<int, int> mapSpread) {
       var c = {...iterableSpread, ...mapSpread};
     }
 
 SpreadElement:
-  template: "Iterable spread."
+  problemMessage: "Iterable spread."
   severity: CONTEXT
 
 SpreadMapElement:
-  template: "Map spread."
+  problemMessage: "Map spread."
   severity: CONTEXT
 
 NonNullAwareSpreadIsNull:
-  template: "Can't spread a value with static type '#type'."
+  problemMessage: "Can't spread a value with static type '#type'."
   script: >
     main() {
       <int>[...null];
@@ -4710,30 +4711,30 @@
 
 NonPositiveArrayDimensions:
   # Used by dart:ffi
-  template: "Array dimensions must be positive numbers."
+  problemMessage: "Array dimensions must be positive numbers."
   external: test/ffi_test.dart
 
 InvalidTypeVariableInSupertype:
-  template: "Can't use implicitly 'out' variable '#name' in an '#string2' position in supertype '#name2'."
+  problemMessage: "Can't use implicitly 'out' variable '#name' in an '#string2' position in supertype '#name2'."
   script: >
     class A<X> {}
     class B<Y> extends A<Function(Y)> {}
 
 InvalidTypeVariableInSupertypeWithVariance:
-  template: "Can't use '#string' type variable '#name' in an '#string2' position in supertype '#name2'."
+  problemMessage: "Can't use '#string' type variable '#name' in an '#string2' position in supertype '#name2'."
   script: >
     class A<out X> {}
     class B<out Y> extends A<Function(Y)> {}
 
 InvalidTypeVariableVariancePosition:
-  template: "Can't use '#string' type variable '#name' in an '#string2' position."
+  problemMessage: "Can't use '#string' type variable '#name' in an '#string2' position."
   script: >
     class A<out T> {
       void method(T x) {}
     }
 
 InvalidTypeVariableVariancePositionInReturnType:
-  template: "Can't use '#string' type variable '#name' in an '#string2' position in the return type."
+  problemMessage: "Can't use '#string' type variable '#name' in an '#string2' position in the return type."
   script: >
     class A<in T> {
       T method() {
@@ -4742,8 +4743,8 @@
     }
 
 CombinedMemberSignatureFailed:
-  template: "Class '#name' inherits multiple members named '#name2' with incompatible signatures."
-  tip: "Try adding a declaration of '#name2' to '#name'."
+  problemMessage: "Class '#name' inherits multiple members named '#name2' with incompatible signatures."
+  correctionMessage: "Try adding a declaration of '#name2' to '#name'."
   analyzerCode: INCONSISTENT_INHERITANCE
   script:
     - |
@@ -4758,12 +4759,12 @@
       abstract class C implements I2, I1 {}
 
 LanguageVersionTooHigh:
-  template: "The specified language version is too high. The highest supported language version is #count.#count2."
+  problemMessage: "The specified language version is too high. The highest supported language version is #count.#count2."
   script: >
     // @dart = 100.200
 
 LanguageVersionInvalidInDotPackages:
-  template: "The language version is not specified correctly in the packages file."
+  problemMessage: "The language version is not specified correctly in the packages file."
   exampleAllowMoreCodes: true
   script:
     main.dart: "import 'package:foo/foo.dart';"
@@ -4781,7 +4782,7 @@
       }
 
 LanguageVersionMismatchInPart:
-  template: "The language version override has to be the same in the library and its part(s)."
+  problemMessage: "The language version override has to be the same in the library and its part(s)."
   script:
     main.dart: >
       // @dart = 2.4
@@ -4793,90 +4794,90 @@
       part of 'main.dart';
 
 LanguageVersionMismatchInPatch:
-  template: "The language version override has to be the same in the library and its patch(es)."
+  problemMessage: "The language version override has to be the same in the library and its patch(es)."
 
 LanguageVersionLibraryContext:
-  template: "This is language version annotation in the library."
+  problemMessage: "This is language version annotation in the library."
   severity: CONTEXT
 
 LanguageVersionPartContext:
-  template: "This is language version annotation in the part."
+  problemMessage: "This is language version annotation in the part."
   severity: CONTEXT
 
 LanguageVersionPatchContext:
-  template: "This is language version annotation in the patch."
+  problemMessage: "This is language version annotation in the patch."
   severity: CONTEXT
 
 ExplicitExtensionArgumentMismatch:
-  template: "Explicit extension application requires exactly 1 positional argument."
+  problemMessage: "Explicit extension application requires exactly 1 positional argument."
 
 ExplicitExtensionTypeArgumentMismatch:
-  template: "Explicit extension application of extension '#name' takes '#count' type argument(s)."
+  problemMessage: "Explicit extension application of extension '#name' takes '#count' type argument(s)."
 
 ExplicitExtensionAsExpression:
-  template: "Explicit extension application cannot be used as an expression."
+  problemMessage: "Explicit extension application cannot be used as an expression."
 
 ExplicitExtensionAsLvalue:
-  template: "Explicit extension application cannot be a target for assignment."
+  problemMessage: "Explicit extension application cannot be a target for assignment."
 
 DeferredExtensionImport:
-  template: "Extension '#name' cannot be imported through a deferred import."
-  tip: "Try adding the `hide #name` to the import."
+  problemMessage: "Extension '#name' cannot be imported through a deferred import."
+  correctionMessage: "Try adding the `hide #name` to the import."
   script:
     main.dart: "import 'lib.dart' deferred as prefix;"
     lib.dart: "extension Extension on void {}"
 
 MultipleVarianceModifiers:
   index: 97
-  template: "Each type parameter can have at most one variance modifier."
-  tip: "Use at most one of the 'in', 'out', or 'inout' modifiers."
+  problemMessage: "Each type parameter can have at most one variance modifier."
+  correctionMessage: "Use at most one of the 'in', 'out', or 'inout' modifiers."
   analyzerCode: ParserErrorCode.MULTIPLE_VARIANCE_MODIFIERS
 
 VariableCouldBeNullDueToWrite:
-  template: "Variable '#name' could not be promoted due to an assignment."
-  tip: "Try null checking the variable after the assignment.  See #string"
+  problemMessage: "Variable '#name' could not be promoted due to an assignment."
+  correctionMessage: "Try null checking the variable after the assignment.  See #string"
 
 FieldNotPromoted:
-  template: "'#name' refers to a property so it couldn't be promoted."
-  tip: "See #string"
+  problemMessage: "'#name' refers to a property so it couldn't be promoted."
+  correctionMessage: "See #string"
 
 ThisNotPromoted:
-  template: "'this' can't be promoted."
-  tip: "See #string"
+  problemMessage: "'this' can't be promoted."
+  correctionMessage: "See #string"
 
 NullablePropertyAccessError:
-  template: "Property '#name' cannot be accessed on '#type' because it is potentially null."
-  tip: "Try accessing using ?. instead."
+  problemMessage: "Property '#name' cannot be accessed on '#type' because it is potentially null."
+  correctionMessage: "Try accessing using ?. instead."
 
 NullableMethodCallError:
-  template: "Method '#name' cannot be called on '#type' because it is potentially null."
-  tip: "Try calling using ?. instead."
+  problemMessage: "Method '#name' cannot be called on '#type' because it is potentially null."
+  correctionMessage: "Try calling using ?. instead."
 
 NullableExpressionCallError:
-  template: "Can't use an expression of type '#type' as a function because it's potentially null."
-  tip: "Try calling using ?.call instead."
+  problemMessage: "Can't use an expression of type '#type' as a function because it's potentially null."
+  correctionMessage: "Try calling using ?.call instead."
 
 NullableOperatorCallError:
-  template: "Operator '#name' cannot be called on '#type' because it is potentially null."
+  problemMessage: "Operator '#name' cannot be called on '#type' because it is potentially null."
 
 NullableTearoffError:
-  template: "Can't tear off method '#name' from a potentially null value."
+  problemMessage: "Can't tear off method '#name' from a potentially null value."
 
 NullableSpreadError:
-  template: "An expression whose value can be 'null' must be null-checked before it can be dereferenced."
+  problemMessage: "An expression whose value can be 'null' must be null-checked before it can be dereferenced."
 
 ThrowingNotAssignableToObjectError:
-  template: "Can't throw a value of '#type' since it is neither dynamic nor non-nullable."
+  problemMessage: "Can't throw a value of '#type' since it is neither dynamic nor non-nullable."
 
 RequiredNamedParameterHasDefaultValueError:
-  template: "Named parameter '#name' is required and can't have a default value."
+  problemMessage: "Named parameter '#name' is required and can't have a default value."
 
 ValueForRequiredParameterNotProvidedError:
-  template: "Required named parameter '#name' must be provided."
+  problemMessage: "Required named parameter '#name' must be provided."
 
 OptionalNonNullableWithoutInitializerError:
-  template: "The parameter '#name' can't have a value of 'null' because of its type '#type', but the implicit default value is 'null'."
-  tip: "Try adding either an explicit non-'null' default value or the 'required' modifier."
+  problemMessage: "The parameter '#name' can't have a value of 'null' because of its type '#type', but the implicit default value is 'null'."
+  correctionMessage: "Try adding either an explicit non-'null' default value or the 'required' modifier."
   analyzerCode: MISSING_DEFAULT_VALUE_FOR_PARAMETER
   configuration: nnbd-strong
   script:
@@ -4884,94 +4885,94 @@
     - method2([int a]) {}
 
 FieldNonNullableWithoutInitializerError:
-  template: "Field '#name' should be initialized because its type '#type' doesn't allow null."
+  problemMessage: "Field '#name' should be initialized because its type '#type' doesn't allow null."
 
 FieldNonNullableNotInitializedByConstructorError:
-  template: "This constructor should initialize field '#name' because its type '#type' doesn't allow null."
+  problemMessage: "This constructor should initialize field '#name' because its type '#type' doesn't allow null."
 
 NonNullableOptOutExplicit:
-  template: "Null safety features are disabled for this library."
-  tip: "Try removing the `@dart=` annotation or setting the language version to #string or higher."
+  problemMessage: "Null safety features are disabled for this library."
+  correctionMessage: "Try removing the `@dart=` annotation or setting the language version to #string or higher."
 
 NonNullableOptOutImplicit:
-  template: "Null safety features are disabled for this library."
-  tip: "Try removing the package language version or setting the language version to #string or higher."
+  problemMessage: "Null safety features are disabled for this library."
+  correctionMessage: "Try removing the package language version or setting the language version to #string or higher."
 
 NonNullableOptOutComment:
-  template: "This is the annotation that opts out this library from null safety features."
+  problemMessage: "This is the annotation that opts out this library from null safety features."
   severity: CONTEXT
 
 AwaitInLateLocalInitializer:
-  template: "`await` expressions are not supported in late local initializers."
+  problemMessage: "`await` expressions are not supported in late local initializers."
 
 NullableSuperclassError:
-  template: "Can't extend '#name' because it's marked with '?'."
+  problemMessage: "Can't extend '#name' because it's marked with '?'."
 
 NullableInterfaceError:
-  template: "Can't implement '#name' because it's marked with '?'."
+  problemMessage: "Can't implement '#name' because it's marked with '?'."
 
 NullableMixinError:
-  template: "Can't mix '#name' in because it's marked with '?'."
+  problemMessage: "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."
+  problemMessage: "Factory constructors for @anonymous JS interop classes should not contain any positional parameters."
+  correctionMessage: "Try replacing them with named parameters instead."
 
 JsInteropDartClassExtendsJSClass:
-  template: "Dart class '#name' cannot extend JS interop class '#name2'."
-  tip: "Try adding the JS interop annotation or removing it from the parent class."
+  problemMessage: "Dart class '#name' cannot extend JS interop class '#name2'."
+  correctionMessage: "Try adding the JS interop annotation or removing it from the parent class."
 
 JsInteropEnclosingClassJSAnnotation:
-  template: "Member has a JS interop annotation but the enclosing class does not."
-  tip: "Try adding the annotation to the enclosing class."
+  problemMessage: "Member has a JS interop annotation but the enclosing class does not."
+  correctionMessage: "Try adding the annotation to the enclosing class."
 
 JsInteropEnclosingClassJSAnnotationContext:
-  template: "This is the enclosing class."
+  problemMessage: "This is the enclosing class."
   severity: CONTEXT
 
 JsInteropExternalExtensionMemberOnTypeInvalid:
-  template: "JS interop or Native class required for 'external' extension members."
-  tip: "Try adding a JS interop annotation to the on type class of the extension."
+  problemMessage: "JS interop or Native class required for 'external' extension members."
+  correctionMessage: "Try adding a JS interop annotation to the on type class of the extension."
 
 JsInteropExternalMemberNotJSAnnotated:
-  template: "Only JS interop members may be 'external'."
-  tip: "Try removing the 'external' keyword or adding a JS interop annotation."
+  problemMessage: "Only JS interop members may be 'external'."
+  correctionMessage: "Try removing the 'external' keyword or adding a JS interop annotation."
 
 JsInteropIndexNotSupported:
-  template: "JS interop classes do not support [] and []= operator methods."
-  tip: "Try replacing with a normal method."
+  problemMessage: "JS interop classes do not support [] and []= operator methods."
+  correctionMessage: "Try replacing with a normal method."
 
 JsInteropJSClassExtendsDartClass:
-  template: "JS interop class '#name' cannot extend Dart class '#name2'."
-  tip: "Try removing the JS interop annotation or adding it to the parent class."
+  problemMessage: "JS interop class '#name' cannot extend Dart class '#name2'."
+  correctionMessage: "Try removing the JS interop annotation or adding it to the parent class."
 
 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."
+  problemMessage: "Named parameters for JS interop functions are only allowed in a factory constructor of an @anonymous JS class."
+  correctionMessage: "Try replacing them with normal or optional parameters."
 
 JsInteropNativeClassInAnnotation:
-  template: "JS interop class '#name' conflicts with natively supported class '#name2' in '#string3'."
-  tip: "Try making the @JS class into an @anonymous class or use js_util on the JS object."
+  problemMessage: "JS interop class '#name' conflicts with natively supported class '#name2' in '#string3'."
+  correctionMessage: "Try making the @JS class into an @anonymous class or use js_util on the JS object."
 
 JsInteropNonExternalConstructor:
-  template: "JS interop classes do not support non-external constructors."
-  tip: "Try annotating with `external`."
+  problemMessage: "JS interop classes do not support non-external constructors."
+  correctionMessage: "Try annotating with `external`."
 
 JsInteropNonExternalMember:
-  template: "This JS interop member must be annotated with `external`. Only factories and static methods can be non-external."
-  tip: "Try annotating the member with `external`."
+  problemMessage: "This JS interop member must be annotated with `external`. Only factories and static methods can be non-external."
+  correctionMessage: "Try annotating the member with `external`."
 
 DefaultListConstructorError:
-  template: "Can't use the default List constructor."
-  tip: "Try using List.filled instead."
+  problemMessage: "Can't use the default List constructor."
+  correctionMessage: "Try using List.filled instead."
 
 NonNullableInNullAware:
-  template: "Operand of null-aware operation '#name' has type '#type' which excludes null."
+  problemMessage: "Operand of null-aware operation '#name' has type '#type' which excludes null."
   severity: WARNING
 
 ThisInNullAwareReceiver:
-  template: "The receiver 'this' cannot be null."
-  tip: "Try replacing '?.' with '.'"
+  problemMessage: "The receiver 'this' cannot be null."
+  correctionMessage: "Try replacing '?.' with '.'"
   severity: WARNING
   configuration: nnbd-strong
   script: |
@@ -4983,8 +4984,8 @@
     }
 
 ClassInNullAwareReceiver:
-  template: "The class '#name' cannot be null."
-  tip: "Try replacing '?.' with '.'"
+  problemMessage: "The class '#name' cannot be null."
+  correctionMessage: "Try replacing '?.' with '.'"
   severity: WARNING
   configuration: nnbd-strong
   script: |
@@ -4996,7 +4997,7 @@
     }
 
 NonNullableNotAssignedError:
-  template: "Non-nullable variable '#name' must be assigned before it can be used."
+  problemMessage: "Non-nullable variable '#name' must be assigned before it can be used."
   configuration: nnbd-strong
   script: |
     method<T>() {
@@ -5004,7 +5005,7 @@
     }
 
 FinalNotAssignedError:
-  template: "Final variable '#name' must be assigned before it can be used."
+  problemMessage: "Final variable '#name' must be assigned before it can be used."
   analyzerCode: READ_POTENTIALLY_UNASSIGNED_FINAL
   configuration: nnbd-strong
   script: >
@@ -5017,7 +5018,7 @@
     }
 
 LateDefinitelyUnassignedError:
-  template: "Late variable '#name' without initializer is definitely unassigned."
+  problemMessage: "Late variable '#name' without initializer is definitely unassigned."
   configuration: nnbd-strong
   script: |
     method<T>() {
@@ -5025,7 +5026,7 @@
     }
 
 LateDefinitelyAssignedError:
-  template: "Late final variable '#name' definitely assigned."
+  problemMessage: "Late final variable '#name' definitely assigned."
   configuration: nnbd-strong
   script: |
     method() {
@@ -5035,7 +5036,7 @@
     }
 
 FinalPossiblyAssignedError:
-  template: "Final variable '#name' might already be assigned at this point."
+  problemMessage: "Final variable '#name' might already be assigned at this point."
   analyzerCode: ASSIGNMENT_TO_FINAL_LOCAL
   configuration: nnbd-strong
   script: |
@@ -5046,10 +5047,10 @@
     }
 
 NonAgnosticConstant:
-  template: "Constant value is not strong/weak mode agnostic."
+  problemMessage: "Constant value is not strong/weak mode agnostic."
 
 ExportOptOutFromOptIn:
-  template: "Null safe libraries are not allowed to export declarations from of opt-out libraries."
+  problemMessage: "Null safe libraries are not allowed to export declarations from of opt-out libraries."
   configuration: nnbd-weak
   script:
     main.dart: |
@@ -5059,28 +5060,28 @@
       class A {}
 
 ExtendFunction:
-  template: "Extending 'Function' is deprecated."
-  tip: "Try removing 'Function' from the 'extends' clause."
+  problemMessage: "Extending 'Function' is deprecated."
+  correctionMessage: "Try removing 'Function' from the 'extends' clause."
   severity: IGNORED
   script: |
     class A extends Function {}
 
 ImplementFunction:
-  template: "Implementing 'Function' is deprecated."
-  tip: "Try removing 'Function' from the 'implements' clause."
+  problemMessage: "Implementing 'Function' is deprecated."
+  correctionMessage: "Try removing 'Function' from the 'implements' clause."
   severity: IGNORED
   script: |
     class A implements Function {}
 
 MixinFunction:
-  template: "Mixing in 'Function' is deprecated."
-  tip: "Try removing 'Function' from the 'with' clause."
+  problemMessage: "Mixing in 'Function' is deprecated."
+  correctionMessage: "Try removing 'Function' from the 'with' clause."
   severity: IGNORED
   script: |
     class A extends Object with Function {}
 
 CannotAssignToFinalVariable:
-  template: "Can't assign to the final variable '#name'."
+  problemMessage: "Can't assign to the final variable '#name'."
   script: |
      main() {
        final int i = 0;
@@ -5088,7 +5089,7 @@
      }
 
 CannotAssignToConstVariable:
-  template: "Can't assign to the const variable '#name'."
+  problemMessage: "Can't assign to the const variable '#name'."
   script: |
     main() {
       const int i = 0;
@@ -5096,7 +5097,7 @@
     }
 
 CannotAssignToExtensionThis:
-  template: "Can't assign to 'this'."
+  problemMessage: "Can't assign to 'this'."
   script: |
     extension E on String {
       method() {
@@ -5105,50 +5106,50 @@
     }
 
 CannotAssignToTypeLiteral:
-  template: "Can't assign to a type literal."
+  problemMessage: "Can't assign to a type literal."
   script: |
     main() {
       Object = String;
     }
 
 NonVoidReturnOperator:
-  template: "The return type of the operator []= must be 'void'."
-  tip: "Try changing the return type to 'void'."
+  problemMessage: "The return type of the operator []= must be 'void'."
+  correctionMessage: "Try changing the return type to 'void'."
   analyzerCode: NON_VOID_RETURN_FOR_OPERATOR
   script:
     - class Class { int operator[]=(a, b) {} }
     - class Class { dynamic operator[]=(a, b) {} }
 
 NonVoidReturnSetter:
-  template: "The return type of the setter must be 'void' or absent."
-  tip: "Try removing the return type, or define a method rather than a setter."
+  problemMessage: "The return type of the setter must be 'void' or absent."
+  correctionMessage: "Try removing the return type, or define a method rather than a setter."
   analyzerCode: NON_VOID_RETURN_FOR_SETTER
   script:
     - int set setter(_) {}
     - dynamic set setter(_) {}
 
 NeverReachableSwitchDefaultError:
-  template: "`null` encountered as case in a switch expression with a non-nullable enum type."
+  problemMessage: "`null` encountered as case in a switch expression with a non-nullable enum type."
 
 NeverReachableSwitchDefaultWarning:
-  template: "The default case is not reachable with sound null safety because the switch expression is non-nullable."
+  problemMessage: "The default case is not reachable with sound null safety because the switch expression is non-nullable."
   severity: WARNING
 
 NeverValueError:
-  template: "`null` encountered as the result from expression with type `Never`."
+  problemMessage: "`null` encountered as the result from expression with type `Never`."
 
 NeverValueWarning:
-  template: "The expression can not result in a value with sound null safety because the expression type is `Never`."
+  problemMessage: "The expression can not result in a value with sound null safety because the expression type is `Never`."
   severity: WARNING
 
 MainNotFunctionDeclaration:
-  template: "The 'main' declaration must be a function declaration."
+  problemMessage: "The 'main' declaration must be a function declaration."
   configuration: nnbd-strong
   script:
     - var main;
 
 MainNotFunctionDeclarationExported:
-  template: "The exported 'main' declaration must be a function declaration."
+  problemMessage: "The exported 'main' declaration must be a function declaration."
   configuration: nnbd-strong
   exampleAllowMoreCodes: true
   script:
@@ -5158,13 +5159,13 @@
       var main;
 
 MainTooManyRequiredParameters:
-  template: "The 'main' method must have at most 2 required parameters."
+  problemMessage: "The 'main' method must have at most 2 required parameters."
   configuration: nnbd-strong
   script:
     - main(a, b, c) {}
 
 MainTooManyRequiredParametersExported:
-  template: "The exported 'main' method must have at most 2 required parameters."
+  problemMessage: "The exported 'main' method must have at most 2 required parameters."
   configuration: nnbd-strong
   exampleAllowMoreCodes: true
   script:
@@ -5174,13 +5175,13 @@
       main(a, b, c) {}
 
 MainRequiredNamedParameters:
-  template: "The 'main' method cannot have required named parameters."
+  problemMessage: "The 'main' method cannot have required named parameters."
   configuration: nnbd-strong
   script:
     - main({required a}) {}
 
 MainRequiredNamedParametersExported:
-  template: "The exported 'main' method cannot have required named parameters."
+  problemMessage: "The exported 'main' method cannot have required named parameters."
   configuration: nnbd-strong
   exampleAllowMoreCodes: true
   script:
@@ -5190,13 +5191,13 @@
       main({required a}) {}
 
 MainWrongParameterType:
-  template: "The type '#type' of the first parameter of the 'main' method is not a supertype of '#type2'."
+  problemMessage: "The type '#type' of the first parameter of the 'main' method is not a supertype of '#type2'."
   configuration: nnbd-strong
   script:
     - main(Set<String> args) {}
 
 MainWrongParameterTypeExported:
-  template: "The type '#type' of the first parameter of the exported 'main' method is not a supertype of '#type2'."
+  problemMessage: "The type '#type' of the first parameter of the exported 'main' method is not a supertype of '#type2'."
   configuration: nnbd-strong
   exampleAllowMoreCodes: true
   script:
@@ -5206,11 +5207,11 @@
       main(Set<String> args) {}
 
 ExportedMain:
-  template: "This is exported 'main' declaration."
+  problemMessage: "This is exported 'main' declaration."
   severity: CONTEXT
 
 UnexpectedModifierInNonNnbd:
-  template: "The modifier '#lexeme' is only available in null safe libraries."
+  problemMessage: "The modifier '#lexeme' is only available in null safe libraries."
   exampleAllowMoreCodes: true
   analyzerCode: UNEXPECTED_TOKEN
   script: |
@@ -5218,14 +5219,14 @@
     late int x;
 
 CompilingWithSoundNullSafety:
-  template: "Compiling with sound null safety"
+  problemMessage: "Compiling with sound null safety"
   configuration: nnbd-strong,compile
   severity: INFO
   script: |
     main() {}
 
 CompilingWithoutSoundNullSafety:
-  template: "Compiling without sound null safety"
+  problemMessage: "Compiling without sound null safety"
   configuration: nnbd-weak,compile
   severity: INFO
   script: |
@@ -5233,45 +5234,45 @@
     main() {}
 
 UnsupportedDartExt:
-  template: "Dart native extensions are no longer supported."
-  tip: "Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)"
+  problemMessage: "Dart native extensions are no longer supported."
+  correctionMessage: "Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)"
   script: |
     import 'dart-ext:foo.dart';
 
 InstantiationNonGenericFunctionType:
-  template: "The static type of the explicit instantiation operand must be a generic function type but is '#type'."
-  tip: "Try changing the operand or remove the type arguments."
+  problemMessage: "The static type of the explicit instantiation operand must be a generic function type but is '#type'."
+  correctionMessage: "Try changing the operand or remove the type arguments."
   experiments: constructor-tearoffs
   script: |
     f() {}
     main() => f<int>;
 
 InstantiationTooFewArguments:
-  template: "Too few type arguments: #count required, #count2 given."
-  tip: "Try adding the missing type arguments."
+  problemMessage: "Too few type arguments: #count required, #count2 given."
+  correctionMessage: "Try adding the missing type arguments."
   experiments: constructor-tearoffs
   script: |
     f<X, Y>() {}
     main() => f<int>;
 
 InstantiationTooManyArguments:
-  template: "Too many type arguments: #count allowed, but #count2 found."
-  tip: "Try removing the extra type arguments."
+  problemMessage: "Too many type arguments: #count allowed, but #count2 found."
+  correctionMessage: "Try removing the extra type arguments."
   experiments: constructor-tearoffs
   script: |
     f<X>() {}
     main() => f<int, String>;
 
 AbstractClassConstructorTearOff:
-  template: "Constructors on abstract classes can't be torn off."
+  problemMessage: "Constructors on abstract classes can't be torn off."
   experiments: constructor-tearoffs
   script: |
     abstract class Class {}
     main() => Class.new;
 
 StaticTearOffFromInstantiatedClass:
-  template: "Cannot access static member on an instantiated generic class."
-  tip: "Try removing the type arguments or placing them after the member name."
+  problemMessage: "Cannot access static member on an instantiated generic class."
+  correctionMessage: "Try removing the type arguments or placing them after the member name."
   experiments: constructor-tearoffs
   script: |
     class A<X> { static f() {} }
@@ -5279,8 +5280,8 @@
 
 
 ConstructorTearOffWithTypeArguments:
-  template: "A constructor tear-off can't have type arguments after the constructor name."
-  tip: "Try removing the type arguments or placing them after the class name."
+  problemMessage: "A constructor tear-off can't have type arguments after the constructor name."
+  correctionMessage: "Try removing the type arguments or placing them after the class name."
   experiments: constructor-tearoffs
   script:
     - "class C<X> { C.foo(); } bar() { C.foo<int>; }"
diff --git a/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.expect b/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.expect
index 58a0949..ec1dd0c 100644
--- a/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.expect
@@ -31,6 +31,7 @@
         handleType(T, null)
       endTypeArguments(1, <, >)
       handleType(List, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(bool)
         endMetadataStar(0)
@@ -108,7 +109,7 @@
           endExtensionMethod(set, set, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 3, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration(void)
   beginMetadataStar(void)
   endMetadataStar(0)
diff --git a/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.intertwined.expect
index 0a0206e..0244778 100644
--- a/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/extension_member_contributor_test_completion.dart.intertwined.expect
@@ -31,6 +31,7 @@
         listener: handleType(T, null)
         listener: endTypeArguments(1, <, >)
         listener: handleType(List, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(>, DeclarationKind.Extension, E)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, bool)
@@ -172,7 +173,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 3, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration(void)
   parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
     parseMetadataStar(})
diff --git a/pkg/front_end/parser_testcases/extension_named_type.dart.expect b/pkg/front_end/parser_testcases/extension_named_type.dart.expect
index a502ee7..96b6956 100644
--- a/pkg/front_end/parser_testcases/extension_named_type.dart.expect
+++ b/pkg/front_end/parser_testcases/extension_named_type.dart.expect
@@ -22,6 +22,7 @@
       handleIdentifier(A, typeReference)
       handleNoTypeArguments({)
       handleType(A, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(method)
         endMetadataStar(0)
@@ -39,7 +40,7 @@
           endExtensionMethod(null, method, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration(test)
   beginMetadataStar(test)
   endMetadataStar(0)
diff --git a/pkg/front_end/parser_testcases/extension_named_type.dart.intertwined.expect b/pkg/front_end/parser_testcases/extension_named_type.dart.intertwined.expect
index dc87b68..c5f52cb 100644
--- a/pkg/front_end/parser_testcases/extension_named_type.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extension_named_type.dart.intertwined.expect
@@ -43,6 +43,7 @@
         listener: handleIdentifier(A, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(A, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(A, DeclarationKind.Extension, type)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, method)
@@ -79,7 +80,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration(test)
   parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
     parseMetadataStar(})
diff --git a/pkg/front_end/parser_testcases/extension_type.dart.expect b/pkg/front_end/parser_testcases/extension_type.dart.expect
index c759acc..1efa3c2 100644
--- a/pkg/front_end/parser_testcases/extension_type.dart.expect
+++ b/pkg/front_end/parser_testcases/extension_type.dart.expect
@@ -22,8 +22,9 @@
       handleIdentifier(A, typeReference)
       handleNoTypeArguments({)
       handleType(A, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
       endClassOrMixinBody(DeclarationKind.Extension, 0, {, })
-    endExtensionDeclaration(extension, type, on, })
+    endExtensionDeclaration(extension, type, on, null, null, })
   endTopLevelDeclaration()
 endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/extension_type.dart.intertwined.expect b/pkg/front_end/parser_testcases/extension_type.dart.intertwined.expect
index c8f125d..2272376 100644
--- a/pkg/front_end/parser_testcases/extension_type.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extension_type.dart.intertwined.expect
@@ -43,11 +43,12 @@
         listener: handleIdentifier(A, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(A, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(A, DeclarationKind.Extension, E)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 0, {, })
-        listener: endExtensionDeclaration(extension, type, on, })
+        listener: endExtensionDeclaration(extension, type, on, null, null, })
   listener: endTopLevelDeclaration()
   reportAllErrorTokens(class)
   listener: endCompilationUnit(2, )
diff --git a/pkg/front_end/parser_testcases/extensions/covariant.dart.expect b/pkg/front_end/parser_testcases/extensions/covariant.dart.expect
index 3cc233a..f6e44b8 100644
--- a/pkg/front_end/parser_testcases/extensions/covariant.dart.expect
+++ b/pkg/front_end/parser_testcases/extensions/covariant.dart.expect
@@ -45,6 +45,7 @@
       handleIdentifier(C, typeReference)
       handleNoTypeArguments({)
       handleType(C, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(addChild)
         endMetadataStar(0)
@@ -72,6 +73,6 @@
           endExtensionMethod(null, addChild, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration()
 endCompilationUnit(3, )
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 b493885..f04b161 100644
--- a/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect
@@ -74,6 +74,7 @@
         listener: handleIdentifier(C, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(C, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(C, DeclarationKind.Extension, null)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, addChild)
@@ -124,7 +125,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration()
   reportAllErrorTokens(class)
   listener: endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/extensions/not_covariant.dart.expect b/pkg/front_end/parser_testcases/extensions/not_covariant.dart.expect
index b6adb53..23440f4 100644
--- a/pkg/front_end/parser_testcases/extensions/not_covariant.dart.expect
+++ b/pkg/front_end/parser_testcases/extensions/not_covariant.dart.expect
@@ -39,6 +39,7 @@
       handleIdentifier(C, typeReference)
       handleNoTypeArguments({)
       handleType(C, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(addChild)
         endMetadataStar(0)
@@ -65,6 +66,6 @@
           endExtensionMethod(null, addChild, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration()
 endCompilationUnit(3, )
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 333ccf1..8735e12 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
@@ -74,6 +74,7 @@
         listener: handleIdentifier(C, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(C, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(C, DeclarationKind.Extension, null)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, addChild)
@@ -122,7 +123,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration()
   reportAllErrorTokens(class)
   listener: endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/extensions/static.dart.expect b/pkg/front_end/parser_testcases/extensions/static.dart.expect
index 568639a..5147f20 100644
--- a/pkg/front_end/parser_testcases/extensions/static.dart.expect
+++ b/pkg/front_end/parser_testcases/extensions/static.dart.expect
@@ -39,6 +39,7 @@
       handleIdentifier(C, typeReference)
       handleNoTypeArguments({)
       handleType(C, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(static)
         endMetadataStar(0)
@@ -65,6 +66,6 @@
           endExtensionMethod(null, static, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration()
 endCompilationUnit(3, )
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 f91d314..560c41b 100644
--- a/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect
@@ -74,6 +74,7 @@
         listener: handleIdentifier(C, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(C, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(C, DeclarationKind.Extension, null)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, static)
@@ -121,7 +122,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration()
   reportAllErrorTokens(class)
   listener: endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/extensions/static_covariant.dart.expect b/pkg/front_end/parser_testcases/extensions/static_covariant.dart.expect
index 1e1a39a..b4a4c33 100644
--- a/pkg/front_end/parser_testcases/extensions/static_covariant.dart.expect
+++ b/pkg/front_end/parser_testcases/extensions/static_covariant.dart.expect
@@ -45,6 +45,7 @@
       handleIdentifier(C, typeReference)
       handleNoTypeArguments({)
       handleType(C, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(static)
         endMetadataStar(0)
@@ -72,6 +73,6 @@
           endExtensionMethod(null, static, (, null, })
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration()
 endCompilationUnit(3, )
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 c1ae5d5..3e0aba8 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
@@ -74,6 +74,7 @@
         listener: handleIdentifier(C, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(C, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(C, DeclarationKind.Extension, null)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, static)
@@ -123,7 +124,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration()
   reportAllErrorTokens(class)
   listener: endCompilationUnit(3, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_01.dart b/pkg/front_end/parser_testcases/general/issue_47008_01.dart
new file mode 100644
index 0000000..388e5d8
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_01.dart
@@ -0,0 +1,3 @@
+main() {
+  a(b < c, d < e, 1 >> (2));
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_01.dart.expect b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.expect
new file mode 100644
index 0000000..c74a161
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.expect
@@ -0,0 +1,47 @@
+beginCompilationUnit(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({)
+        handleIdentifier(a, expression)
+        handleNoTypeArguments(()
+        beginArguments(()
+          handleIdentifier(b, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(b, <)
+          beginBinaryExpression(<)
+            handleIdentifier(c, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(c, ,)
+          endBinaryExpression(<)
+          handleIdentifier(d, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(d, <)
+          beginBinaryExpression(<)
+            handleIdentifier(e, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(e, ,)
+          endBinaryExpression(<)
+          handleLiteralInt(1)
+          beginBinaryExpression(>>)
+            handleLiteralInt(2)
+            handleParenthesizedExpression(()
+          endBinaryExpression(>>)
+        endArguments(3, (, ))
+        handleSend(a, ;)
+        handleExpressionStatement(;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(main, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.intertwined.expect
new file mode 100644
index 0000000..406fe2c
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.intertwined.expect
@@ -0,0 +1,137 @@
+parseUnit(main)
+  skipErrorTokens(main)
+  listener: beginCompilationUnit(main)
+  syntheticPreviousToken(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(}, a)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                looksLikeLocalFunction(a)
+                parseExpressionStatement({)
+                  parseExpression({)
+                    parsePrecedenceExpression({, 1, true)
+                      parseUnaryExpression({, true)
+                        parsePrimary({, expression)
+                          parseSendOrFunctionLiteral({, expression)
+                            looksLikeFunctionBody(;)
+                            parseSend({, expression)
+                              isNextIdentifier({)
+                              ensureIdentifier({, expression)
+                                listener: handleIdentifier(a, expression)
+                              listener: handleNoTypeArguments(()
+                              parseArgumentsOpt(a)
+                                parseArguments(a)
+                                  parseArgumentsRest(()
+                                    listener: beginArguments(()
+                                    parseExpression(()
+                                      parsePrecedenceExpression((, 1, true)
+                                        parseUnaryExpression((, true)
+                                          parsePrimary((, expression)
+                                            parseSendOrFunctionLiteral((, expression)
+                                              looksLikeFunctionBody())
+                                              parseSend((, expression)
+                                                isNextIdentifier(()
+                                                ensureIdentifier((, expression)
+                                                  listener: handleIdentifier(b, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(b)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(b, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(c, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(c)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(c, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(d, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(d)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(d, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(e, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(e)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(e, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseLiteralInt(,)
+                                              listener: handleLiteralInt(1)
+                                        listener: beginBinaryExpression(>>)
+                                        parsePrecedenceExpression(>>, 13, true)
+                                          parseUnaryExpression(>>, true)
+                                            parsePrimary(>>, expression)
+                                              parseParenthesizedExpressionOrFunctionLiteral(>>)
+                                                parseParenthesizedExpression(>>)
+                                                  parseExpressionInParenthesis(>>)
+                                                    parseExpressionInParenthesisRest(()
+                                                      parseExpression(()
+                                                        parsePrecedenceExpression((, 1, true)
+                                                          parseUnaryExpression((, true)
+                                                            parsePrimary((, expression)
+                                                              parseLiteralInt(()
+                                                                listener: handleLiteralInt(2)
+                                                      ensureCloseParen(2, ()
+                                                  listener: handleParenthesizedExpression(()
+                                        listener: endBinaryExpression(>>)
+                                    listener: endArguments(3, (, ))
+                              listener: handleSend(a, ;)
+                  ensureSemicolon())
+                  listener: handleExpressionStatement(;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(main)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_01.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.parser.expect
new file mode 100644
index 0000000..f090739
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.parser.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, 1 >> (2));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] 1[StringToken] >>[SimpleToken] ([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_01.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.scanner.expect
new file mode 100644
index 0000000..f090739
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_01.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, 1 >> (2));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] 1[StringToken] >>[SimpleToken] ([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_02.dart b/pkg/front_end/parser_testcases/general/issue_47008_02.dart
new file mode 100644
index 0000000..33c62b6
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_02.dart
@@ -0,0 +1,3 @@
+main() {
+  a(b < c, d < e, f < g, 1 >>> (2));
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_02.dart.expect b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.expect
new file mode 100644
index 0000000..f0770d5
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.expect
@@ -0,0 +1,57 @@
+beginCompilationUnit(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({)
+        handleIdentifier(a, expression)
+        handleNoTypeArguments(()
+        beginArguments(()
+          handleIdentifier(b, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(b, <)
+          beginBinaryExpression(<)
+            handleIdentifier(c, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(c, ,)
+          endBinaryExpression(<)
+          handleIdentifier(d, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(d, <)
+          beginBinaryExpression(<)
+            handleIdentifier(e, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(e, ,)
+          endBinaryExpression(<)
+          handleIdentifier(f, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(f, <)
+          beginBinaryExpression(<)
+            handleIdentifier(g, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(g, ,)
+          endBinaryExpression(<)
+          handleLiteralInt(1)
+          beginBinaryExpression(>>>)
+            handleLiteralInt(2)
+            handleParenthesizedExpression(()
+          endBinaryExpression(>>>)
+        endArguments(4, (, ))
+        handleSend(a, ;)
+        handleExpressionStatement(;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(main, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_02.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.intertwined.expect
new file mode 100644
index 0000000..4f3fe74
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.intertwined.expect
@@ -0,0 +1,164 @@
+parseUnit(main)
+  skipErrorTokens(main)
+  listener: beginCompilationUnit(main)
+  syntheticPreviousToken(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(}, a)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                looksLikeLocalFunction(a)
+                parseExpressionStatement({)
+                  parseExpression({)
+                    parsePrecedenceExpression({, 1, true)
+                      parseUnaryExpression({, true)
+                        parsePrimary({, expression)
+                          parseSendOrFunctionLiteral({, expression)
+                            looksLikeFunctionBody(;)
+                            parseSend({, expression)
+                              isNextIdentifier({)
+                              ensureIdentifier({, expression)
+                                listener: handleIdentifier(a, expression)
+                              listener: handleNoTypeArguments(()
+                              parseArgumentsOpt(a)
+                                parseArguments(a)
+                                  parseArgumentsRest(()
+                                    listener: beginArguments(()
+                                    parseExpression(()
+                                      parsePrecedenceExpression((, 1, true)
+                                        parseUnaryExpression((, true)
+                                          parsePrimary((, expression)
+                                            parseSendOrFunctionLiteral((, expression)
+                                              looksLikeFunctionBody())
+                                              parseSend((, expression)
+                                                isNextIdentifier(()
+                                                ensureIdentifier((, expression)
+                                                  listener: handleIdentifier(b, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(b)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(b, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(c, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(c)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(c, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(d, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(d)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(d, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(e, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(e)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(e, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(f, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(f)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(f, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(g, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(g)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(g, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseLiteralInt(,)
+                                              listener: handleLiteralInt(1)
+                                        listener: beginBinaryExpression(>>>)
+                                        parsePrecedenceExpression(>>>, 13, true)
+                                          parseUnaryExpression(>>>, true)
+                                            parsePrimary(>>>, expression)
+                                              parseParenthesizedExpressionOrFunctionLiteral(>>>)
+                                                parseParenthesizedExpression(>>>)
+                                                  parseExpressionInParenthesis(>>>)
+                                                    parseExpressionInParenthesisRest(()
+                                                      parseExpression(()
+                                                        parsePrecedenceExpression((, 1, true)
+                                                          parseUnaryExpression((, true)
+                                                            parsePrimary((, expression)
+                                                              parseLiteralInt(()
+                                                                listener: handleLiteralInt(2)
+                                                      ensureCloseParen(2, ()
+                                                  listener: handleParenthesizedExpression(()
+                                        listener: endBinaryExpression(>>>)
+                                    listener: endArguments(4, (, ))
+                              listener: handleSend(a, ;)
+                  ensureSemicolon())
+                  listener: handleExpressionStatement(;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(main)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_02.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.parser.expect
new file mode 100644
index 0000000..0e53edf
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.parser.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, f < g, 1 >>> (2));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] f[StringToken] <[BeginToken] g[StringToken],[SimpleToken] 1[StringToken] >>>[SimpleToken] ([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47008_02.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.scanner.expect
new file mode 100644
index 0000000..0e53edf
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47008_02.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, f < g, 1 >>> (2));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] f[StringToken] <[BeginToken] g[StringToken],[SimpleToken] 1[StringToken] >>>[SimpleToken] ([BeginToken]2[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_01.dart b/pkg/front_end/parser_testcases/general/issue_47009_01.dart
new file mode 100644
index 0000000..87237b9
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_01.dart
@@ -0,0 +1,3 @@
+main() {
+  a(b < c, as > (1));
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_01.dart.expect b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.expect
new file mode 100644
index 0000000..5e09e8f
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.expect
@@ -0,0 +1,40 @@
+beginCompilationUnit(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({)
+        handleIdentifier(a, expression)
+        handleNoTypeArguments(()
+        beginArguments(()
+          handleIdentifier(b, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(b, <)
+          beginBinaryExpression(<)
+            handleIdentifier(c, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(c, ,)
+          endBinaryExpression(<)
+          handleIdentifier(as, expression)
+          handleNoTypeArguments(>)
+          handleNoArguments(>)
+          handleSend(as, >)
+          beginBinaryExpression(>)
+            handleLiteralInt(1)
+            handleParenthesizedExpression(()
+          endBinaryExpression(>)
+        endArguments(2, (, ))
+        handleSend(a, ;)
+        handleExpressionStatement(;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(main, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.intertwined.expect
new file mode 100644
index 0000000..1876a12
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.intertwined.expect
@@ -0,0 +1,119 @@
+parseUnit(main)
+  skipErrorTokens(main)
+  listener: beginCompilationUnit(main)
+  syntheticPreviousToken(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(}, a)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                looksLikeLocalFunction(a)
+                parseExpressionStatement({)
+                  parseExpression({)
+                    parsePrecedenceExpression({, 1, true)
+                      parseUnaryExpression({, true)
+                        parsePrimary({, expression)
+                          parseSendOrFunctionLiteral({, expression)
+                            looksLikeFunctionBody(;)
+                            parseSend({, expression)
+                              isNextIdentifier({)
+                              ensureIdentifier({, expression)
+                                listener: handleIdentifier(a, expression)
+                              listener: handleNoTypeArguments(()
+                              parseArgumentsOpt(a)
+                                parseArguments(a)
+                                  parseArgumentsRest(()
+                                    listener: beginArguments(()
+                                    parseExpression(()
+                                      parsePrecedenceExpression((, 1, true)
+                                        parseUnaryExpression((, true)
+                                          parsePrimary((, expression)
+                                            parseSendOrFunctionLiteral((, expression)
+                                              looksLikeFunctionBody())
+                                              parseSend((, expression)
+                                                isNextIdentifier(()
+                                                ensureIdentifier((, expression)
+                                                  listener: handleIdentifier(b, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(b)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(b, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(c, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(c)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(c, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            inPlainSync()
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  inPlainSync()
+                                                  listener: handleIdentifier(as, expression)
+                                                listener: handleNoTypeArguments(>)
+                                                parseArgumentsOpt(as)
+                                                  listener: handleNoArguments(>)
+                                                listener: handleSend(as, >)
+                                        listener: beginBinaryExpression(>)
+                                        parsePrecedenceExpression(>, 9, true)
+                                          parseUnaryExpression(>, true)
+                                            parsePrimary(>, expression)
+                                              parseParenthesizedExpressionOrFunctionLiteral(>)
+                                                parseParenthesizedExpression(>)
+                                                  parseExpressionInParenthesis(>)
+                                                    parseExpressionInParenthesisRest(()
+                                                      parseExpression(()
+                                                        parsePrecedenceExpression((, 1, true)
+                                                          parseUnaryExpression((, true)
+                                                            parsePrimary((, expression)
+                                                              parseLiteralInt(()
+                                                                listener: handleLiteralInt(1)
+                                                      ensureCloseParen(1, ()
+                                                  listener: handleParenthesizedExpression(()
+                                        listener: endBinaryExpression(>)
+                                    listener: endArguments(2, (, ))
+                              listener: handleSend(a, ;)
+                  ensureSemicolon())
+                  listener: handleExpressionStatement(;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(main)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_01.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.parser.expect
new file mode 100644
index 0000000..712e62b
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.parser.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, as > (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] as[KeywordToken] >[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_01.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.scanner.expect
new file mode 100644
index 0000000..712e62b
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_01.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, as > (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] as[KeywordToken] >[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_02.dart b/pkg/front_end/parser_testcases/general/issue_47009_02.dart
new file mode 100644
index 0000000..3d20a33
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_02.dart
@@ -0,0 +1,3 @@
+main() {
+  a(b < c, d < e, as >> (1));
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_02.dart.expect b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.expect
new file mode 100644
index 0000000..a4e0369
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.expect
@@ -0,0 +1,50 @@
+beginCompilationUnit(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({)
+        handleIdentifier(a, expression)
+        handleNoTypeArguments(()
+        beginArguments(()
+          handleIdentifier(b, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(b, <)
+          beginBinaryExpression(<)
+            handleIdentifier(c, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(c, ,)
+          endBinaryExpression(<)
+          handleIdentifier(d, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(d, <)
+          beginBinaryExpression(<)
+            handleIdentifier(e, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(e, ,)
+          endBinaryExpression(<)
+          handleIdentifier(as, expression)
+          handleNoTypeArguments(>>)
+          handleNoArguments(>>)
+          handleSend(as, >>)
+          beginBinaryExpression(>>)
+            handleLiteralInt(1)
+            handleParenthesizedExpression(()
+          endBinaryExpression(>>)
+        endArguments(3, (, ))
+        handleSend(a, ;)
+        handleExpressionStatement(;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(main, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_02.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.intertwined.expect
new file mode 100644
index 0000000..91cb220
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.intertwined.expect
@@ -0,0 +1,146 @@
+parseUnit(main)
+  skipErrorTokens(main)
+  listener: beginCompilationUnit(main)
+  syntheticPreviousToken(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(}, a)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                looksLikeLocalFunction(a)
+                parseExpressionStatement({)
+                  parseExpression({)
+                    parsePrecedenceExpression({, 1, true)
+                      parseUnaryExpression({, true)
+                        parsePrimary({, expression)
+                          parseSendOrFunctionLiteral({, expression)
+                            looksLikeFunctionBody(;)
+                            parseSend({, expression)
+                              isNextIdentifier({)
+                              ensureIdentifier({, expression)
+                                listener: handleIdentifier(a, expression)
+                              listener: handleNoTypeArguments(()
+                              parseArgumentsOpt(a)
+                                parseArguments(a)
+                                  parseArgumentsRest(()
+                                    listener: beginArguments(()
+                                    parseExpression(()
+                                      parsePrecedenceExpression((, 1, true)
+                                        parseUnaryExpression((, true)
+                                          parsePrimary((, expression)
+                                            parseSendOrFunctionLiteral((, expression)
+                                              looksLikeFunctionBody())
+                                              parseSend((, expression)
+                                                isNextIdentifier(()
+                                                ensureIdentifier((, expression)
+                                                  listener: handleIdentifier(b, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(b)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(b, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(c, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(c)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(c, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(d, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(d)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(d, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(e, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(e)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(e, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            inPlainSync()
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  inPlainSync()
+                                                  listener: handleIdentifier(as, expression)
+                                                listener: handleNoTypeArguments(>>)
+                                                parseArgumentsOpt(as)
+                                                  listener: handleNoArguments(>>)
+                                                listener: handleSend(as, >>)
+                                        listener: beginBinaryExpression(>>)
+                                        parsePrecedenceExpression(>>, 13, true)
+                                          parseUnaryExpression(>>, true)
+                                            parsePrimary(>>, expression)
+                                              parseParenthesizedExpressionOrFunctionLiteral(>>)
+                                                parseParenthesizedExpression(>>)
+                                                  parseExpressionInParenthesis(>>)
+                                                    parseExpressionInParenthesisRest(()
+                                                      parseExpression(()
+                                                        parsePrecedenceExpression((, 1, true)
+                                                          parseUnaryExpression((, true)
+                                                            parsePrimary((, expression)
+                                                              parseLiteralInt(()
+                                                                listener: handleLiteralInt(1)
+                                                      ensureCloseParen(1, ()
+                                                  listener: handleParenthesizedExpression(()
+                                        listener: endBinaryExpression(>>)
+                                    listener: endArguments(3, (, ))
+                              listener: handleSend(a, ;)
+                  ensureSemicolon())
+                  listener: handleExpressionStatement(;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(main)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_02.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.parser.expect
new file mode 100644
index 0000000..1e4544c
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.parser.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, as >> (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] as[KeywordToken] >>[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_02.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.scanner.expect
new file mode 100644
index 0000000..1e4544c
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_02.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, as >> (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] as[KeywordToken] >>[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_03.dart b/pkg/front_end/parser_testcases/general/issue_47009_03.dart
new file mode 100644
index 0000000..8479533
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_03.dart
@@ -0,0 +1,3 @@
+main() {
+  a(b < c, d < e, f < g, as >>> (1));
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_03.dart.expect b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.expect
new file mode 100644
index 0000000..1170055
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.expect
@@ -0,0 +1,60 @@
+beginCompilationUnit(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({)
+        handleIdentifier(a, expression)
+        handleNoTypeArguments(()
+        beginArguments(()
+          handleIdentifier(b, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(b, <)
+          beginBinaryExpression(<)
+            handleIdentifier(c, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(c, ,)
+          endBinaryExpression(<)
+          handleIdentifier(d, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(d, <)
+          beginBinaryExpression(<)
+            handleIdentifier(e, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(e, ,)
+          endBinaryExpression(<)
+          handleIdentifier(f, expression)
+          handleNoTypeArguments(<)
+          handleNoArguments(<)
+          handleSend(f, <)
+          beginBinaryExpression(<)
+            handleIdentifier(g, expression)
+            handleNoTypeArguments(,)
+            handleNoArguments(,)
+            handleSend(g, ,)
+          endBinaryExpression(<)
+          handleIdentifier(as, expression)
+          handleNoTypeArguments(>>>)
+          handleNoArguments(>>>)
+          handleSend(as, >>>)
+          beginBinaryExpression(>>>)
+            handleLiteralInt(1)
+            handleParenthesizedExpression(()
+          endBinaryExpression(>>>)
+        endArguments(4, (, ))
+        handleSend(a, ;)
+        handleExpressionStatement(;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(main, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_03.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.intertwined.expect
new file mode 100644
index 0000000..d685108
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.intertwined.expect
@@ -0,0 +1,173 @@
+parseUnit(main)
+  skipErrorTokens(main)
+  listener: beginCompilationUnit(main)
+  syntheticPreviousToken(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(}, a)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                looksLikeLocalFunction(a)
+                parseExpressionStatement({)
+                  parseExpression({)
+                    parsePrecedenceExpression({, 1, true)
+                      parseUnaryExpression({, true)
+                        parsePrimary({, expression)
+                          parseSendOrFunctionLiteral({, expression)
+                            looksLikeFunctionBody(;)
+                            parseSend({, expression)
+                              isNextIdentifier({)
+                              ensureIdentifier({, expression)
+                                listener: handleIdentifier(a, expression)
+                              listener: handleNoTypeArguments(()
+                              parseArgumentsOpt(a)
+                                parseArguments(a)
+                                  parseArgumentsRest(()
+                                    listener: beginArguments(()
+                                    parseExpression(()
+                                      parsePrecedenceExpression((, 1, true)
+                                        parseUnaryExpression((, true)
+                                          parsePrimary((, expression)
+                                            parseSendOrFunctionLiteral((, expression)
+                                              looksLikeFunctionBody())
+                                              parseSend((, expression)
+                                                isNextIdentifier(()
+                                                ensureIdentifier((, expression)
+                                                  listener: handleIdentifier(b, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(b)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(b, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(c, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(c)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(c, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(d, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(d)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(d, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(e, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(e)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(e, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  listener: handleIdentifier(f, expression)
+                                                listener: handleNoTypeArguments(<)
+                                                parseArgumentsOpt(f)
+                                                  listener: handleNoArguments(<)
+                                                listener: handleSend(f, <)
+                                        listener: beginBinaryExpression(<)
+                                        parsePrecedenceExpression(<, 9, true)
+                                          parseUnaryExpression(<, true)
+                                            parsePrimary(<, expression)
+                                              parseSendOrFunctionLiteral(<, expression)
+                                                parseSend(<, expression)
+                                                  isNextIdentifier(<)
+                                                  ensureIdentifier(<, expression)
+                                                    listener: handleIdentifier(g, expression)
+                                                  listener: handleNoTypeArguments(,)
+                                                  parseArgumentsOpt(g)
+                                                    listener: handleNoArguments(,)
+                                                  listener: handleSend(g, ,)
+                                        listener: endBinaryExpression(<)
+                                    parseExpression(,)
+                                      parsePrecedenceExpression(,, 1, true)
+                                        parseUnaryExpression(,, true)
+                                          parsePrimary(,, expression)
+                                            inPlainSync()
+                                            parseSendOrFunctionLiteral(,, expression)
+                                              parseSend(,, expression)
+                                                isNextIdentifier(,)
+                                                ensureIdentifier(,, expression)
+                                                  inPlainSync()
+                                                  listener: handleIdentifier(as, expression)
+                                                listener: handleNoTypeArguments(>>>)
+                                                parseArgumentsOpt(as)
+                                                  listener: handleNoArguments(>>>)
+                                                listener: handleSend(as, >>>)
+                                        listener: beginBinaryExpression(>>>)
+                                        parsePrecedenceExpression(>>>, 13, true)
+                                          parseUnaryExpression(>>>, true)
+                                            parsePrimary(>>>, expression)
+                                              parseParenthesizedExpressionOrFunctionLiteral(>>>)
+                                                parseParenthesizedExpression(>>>)
+                                                  parseExpressionInParenthesis(>>>)
+                                                    parseExpressionInParenthesisRest(()
+                                                      parseExpression(()
+                                                        parsePrecedenceExpression((, 1, true)
+                                                          parseUnaryExpression((, true)
+                                                            parsePrimary((, expression)
+                                                              parseLiteralInt(()
+                                                                listener: handleLiteralInt(1)
+                                                      ensureCloseParen(1, ()
+                                                  listener: handleParenthesizedExpression(()
+                                        listener: endBinaryExpression(>>>)
+                                    listener: endArguments(4, (, ))
+                              listener: handleSend(a, ;)
+                  ensureSemicolon())
+                  listener: handleExpressionStatement(;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(main)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_03.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.parser.expect
new file mode 100644
index 0000000..1fbc7ff
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.parser.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, f < g, as >>> (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] f[StringToken] <[BeginToken] g[StringToken],[SimpleToken] as[KeywordToken] >>>[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_47009_03.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.scanner.expect
new file mode 100644
index 0000000..1fbc7ff
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_47009_03.dart.scanner.expect
@@ -0,0 +1,9 @@
+main() {
+a(b < c, d < e, f < g, as >>> (1));
+}
+
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+a[StringToken]([BeginToken]b[StringToken] <[BeginToken] c[StringToken],[SimpleToken] d[StringToken] <[BeginToken] e[StringToken],[SimpleToken] f[StringToken] <[BeginToken] g[StringToken],[SimpleToken] as[KeywordToken] >>>[SimpleToken] ([BeginToken]1[StringToken])[SimpleToken])[SimpleToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect
index 616d7b4..3a34750 100644
--- a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.expect
@@ -7,6 +7,7 @@
       handleIdentifier(Symbol, typeReference)
       handleNoTypeArguments({)
       handleType(Symbol, null)
+      handleExtensionShowHide(null, 0, null, 0)
       beginClassOrMixinBody(DeclarationKind.Extension, {)
         beginMetadataStar(String)
         endMetadataStar(0)
@@ -59,7 +60,7 @@
           endExtensionMethod(null, String, (, null, ;)
         endMember()
       endClassOrMixinBody(DeclarationKind.Extension, 2, {, })
-    endExtensionDeclaration(extension, null, on, })
+    endExtensionDeclaration(extension, null, on, null, null, })
   endTopLevelDeclaration(void)
   beginMetadataStar(void)
   endMetadataStar(0)
diff --git a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect
index aea9af2..3e7a724 100644
--- a/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/no-triple-shift/triple_shift_not_triple_shift.dart.intertwined.expect
@@ -15,6 +15,7 @@
         listener: handleIdentifier(Symbol, typeReference)
         listener: handleNoTypeArguments({)
         listener: handleType(Symbol, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
         parseClassOrMixinOrExtensionBody(Symbol, DeclarationKind.Extension, null)
           listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
           notEofOrValue(}, String)
@@ -122,7 +123,7 @@
             listener: endMember()
           notEofOrValue(}, })
           listener: endClassOrMixinBody(DeclarationKind.Extension, 2, {, })
-        listener: endExtensionDeclaration(extension, null, on, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
   listener: endTopLevelDeclaration(void)
   parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
     parseMetadataStar(})
diff --git a/pkg/front_end/test/ast_nodes_has_to_string_test.dart b/pkg/front_end/test/ast_nodes_has_to_string_test.dart
index 705ed30..d9ddaba 100644
--- a/pkg/front_end/test/ast_nodes_has_to_string_test.dart
+++ b/pkg/front_end/test/ast_nodes_has_to_string_test.dart
@@ -10,7 +10,7 @@
 
 import 'incremental_suite.dart' as helper;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   exitCode = 1;
   Map<Uri, List<Class>> classMap = {};
   Map<Uri, List<Class>> classMapWithOne = {};
diff --git a/pkg/front_end/test/async_but_no_await_git_test.dart b/pkg/front_end/test/async_but_no_await_git_test.dart
new file mode 100644
index 0000000..d83191f
--- /dev/null
+++ b/pkg/front_end/test/async_but_no_await_git_test.dart
@@ -0,0 +1,138 @@
+// 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.
+
+import 'dart:io';
+
+import 'package:_fe_analyzer_shared/src/messages/severity.dart';
+import 'package:front_end/src/api_prototype/compiler_options.dart' as api;
+import 'package:front_end/src/base/processed_options.dart';
+import 'package:front_end/src/compute_platform_binaries_location.dart'
+    show computePlatformBinariesLocation;
+import 'package:front_end/src/fasta/compiler_context.dart';
+import 'package:front_end/src/fasta/incremental_compiler.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/reference_from_index.dart';
+import 'package:kernel/target/changed_structure_notifier.dart';
+import 'package:kernel/target/targets.dart';
+import "package:vm/target/vm.dart" show VmTarget;
+
+import 'testing_utils.dart' show getGitFiles;
+import "utils/io_utils.dart";
+
+final Uri repoDir = computeRepoDirUri();
+
+Set<Uri> libUris = {};
+
+Future<void> main(List<String> args) async {
+  api.CompilerOptions compilerOptions = getOptions();
+
+  Uri dotPackagesUri = repoDir.resolve(".packages");
+  if (!new File.fromUri(dotPackagesUri).existsSync()) {
+    throw "Couldn't find .packages";
+  }
+  compilerOptions.packagesFileUri = dotPackagesUri;
+
+  ProcessedOptions options = new ProcessedOptions(options: compilerOptions);
+
+  libUris.add(repoDir.resolve("pkg/front_end/lib/"));
+  libUris.add(repoDir.resolve("pkg/front_end/test/fasta/"));
+  libUris.add(repoDir.resolve("pkg/front_end/tool/"));
+
+  for (Uri uri in libUris) {
+    Set<Uri> gitFiles = await getGitFiles(uri);
+    List<FileSystemEntity> entities =
+        new Directory.fromUri(uri).listSync(recursive: true);
+    for (FileSystemEntity entity in entities) {
+      if (entity is File &&
+          entity.path.endsWith(".dart") &&
+          gitFiles.contains(entity.uri)) {
+        options.inputs.add(entity.uri);
+      }
+    }
+  }
+
+  Stopwatch stopwatch = new Stopwatch()..start();
+
+  IncrementalCompiler compiler =
+      new IncrementalCompiler(new CompilerContext(options));
+  Component component = await compiler.computeDelta();
+
+  component.accept(new AsyncNoAwaitVisitor());
+
+  print("Done in ${stopwatch.elapsedMilliseconds} ms. "
+      "Found $errorCount errors.");
+  if (errorCount > 0) {
+    throw "Found $errorCount errors.";
+  }
+}
+
+class AsyncNoAwaitVisitor extends RecursiveVisitor {
+  bool sawAwait = false;
+
+  @override
+  void visitProcedure(Procedure node) {
+    if (node.function.asyncMarker != AsyncMarker.Async) return;
+    sawAwait = false;
+    defaultMember(node);
+    if (!sawAwait) {
+      Location? location = node.location;
+      if (location?.file.path.contains("/pkg/front_end/") == true) {
+        print("$node (${node.location}) is async "
+            "but doesn't use 'await' anywhere.");
+        errorCount++;
+      }
+    }
+  }
+
+  @override
+  void visitAwaitExpression(AwaitExpression node) {
+    sawAwait = true;
+  }
+}
+
+int errorCount = 0;
+
+api.CompilerOptions getOptions() {
+  // Compile sdk because when this is run from a lint it uses the checked-in sdk
+  // and we might not have a suitable compiled platform.dill file.
+  Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
+  api.CompilerOptions options = new api.CompilerOptions()
+    ..sdkRoot = sdkRoot
+    ..compileSdk = true
+    ..target = new TestVmTarget(new TargetFlags())
+    ..librariesSpecificationUri = repoDir.resolve("sdk/lib/libraries.json")
+    ..omitPlatform = true
+    ..onDiagnostic = (api.DiagnosticMessage message) {
+      if (message.severity == Severity.error) {
+        print(message.plainTextFormatted.join('\n'));
+        errorCount++;
+        exitCode = 1;
+      }
+    }
+    ..environmentDefines = const {};
+  return options;
+}
+
+class TestVmTarget extends VmTarget with NoTransformationsMixin {
+  TestVmTarget(TargetFlags flags) : super(flags);
+}
+
+mixin NoTransformationsMixin on Target {
+  @override
+  void performModularTransformationsOnLibraries(
+      Component component,
+      CoreTypes coreTypes,
+      ClassHierarchy hierarchy,
+      List<Library> libraries,
+      Map<String, String>? environmentDefines,
+      DiagnosticReporter diagnosticReporter,
+      ReferenceFromIndex? referenceFromIndex,
+      {void Function(String msg)? logger,
+      ChangedStructureNotifier? changedStructureNotifier}) {
+    // We don't want to do the transformations because we need to await
+    // statements.
+  }
+}
diff --git a/pkg/front_end/test/binary_md_vm_tags_and_version_git_test.dart b/pkg/front_end/test/binary_md_vm_tags_and_version_git_test.dart
index 537c165..fb3e464 100644
--- a/pkg/front_end/test/binary_md_vm_tags_and_version_git_test.dart
+++ b/pkg/front_end/test/binary_md_vm_tags_and_version_git_test.dart
@@ -29,7 +29,7 @@
 // Match stuff like "kNullConstant = 0,"
 final RegExp constantTagParser = new RegExp(r"k(\w*)\s*=\s*(\d+)");
 
-void main() async {
+Future<void> main() async {
   File binaryMd = new File("$repoDir/pkg/kernel/binary.md");
   String binaryMdContent = binaryMd.readAsStringSync();
 
diff --git a/pkg/front_end/test/class_hierarchy/class_hierarchy_test.dart b/pkg/front_end/test/class_hierarchy/class_hierarchy_test.dart
index cf9ece3..4acaf78 100644
--- a/pkg/front_end/test/class_hierarchy/class_hierarchy_test.dart
+++ b/pkg/front_end/test/class_hierarchy/class_hierarchy_test.dart
@@ -6,14 +6,14 @@
 import 'package:_fe_analyzer_shared/src/testing/features.dart';
 import 'package:_fe_analyzer_shared/src/testing/id.dart';
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
-import 'package:front_end/src/fasta/kernel/kernel_api.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:front_end/src/fasta/kernel/class_hierarchy_builder.dart';
 import 'package:front_end/src/testing/id_extractor.dart';
 import 'package:kernel/ast.dart';
+import 'package:kernel/core_types.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<Features>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/compile_benchmark_helper.dart b/pkg/front_end/test/compile_benchmark_helper.dart
index 823a7bc..95a8f54 100644
--- a/pkg/front_end/test/compile_benchmark_helper.dart
+++ b/pkg/front_end/test/compile_benchmark_helper.dart
@@ -4,7 +4,7 @@
 
 import '../tool/_fasta/entry_points.dart' show compileEntryPoint;
 
-void main(List<String> arguments) async {
+Future<void> main(List<String> arguments) async {
   await compileEntryPoint(arguments);
   if (numCalls.isNotEmpty) {
     print("[");
diff --git a/pkg/front_end/test/compile_dart2js_with_no_sdk_test.dart b/pkg/front_end/test/compile_dart2js_with_no_sdk_test.dart
index 74bafaa..3e51713 100644
--- a/pkg/front_end/test/compile_dart2js_with_no_sdk_test.dart
+++ b/pkg/front_end/test/compile_dart2js_with_no_sdk_test.dart
@@ -6,7 +6,7 @@
 
 import 'incremental_suite.dart' show TestIncrementalCompiler, getOptions;
 
-void main() async {
+Future<void> main() async {
   final Uri dart2jsUrl = Uri.base.resolve("pkg/compiler/bin/dart2js.dart");
   CompilerOptions options = getOptions();
   options.sdkSummary = options.sdkSummary!.resolve("nonexisting.dill");
diff --git a/pkg/front_end/test/compile_with_no_sdk_test.dart b/pkg/front_end/test/compile_with_no_sdk_test.dart
index d8f45308..0b34d97 100644
--- a/pkg/front_end/test/compile_with_no_sdk_test.dart
+++ b/pkg/front_end/test/compile_with_no_sdk_test.dart
@@ -7,7 +7,7 @@
 
 import 'incremental_suite.dart' show TestIncrementalCompiler, getOptions;
 
-void main() async {
+Future<void> main() async {
   await compile("import 'foo.dart' if (dart.library.bar) 'baz.dart';");
 }
 
diff --git a/pkg/front_end/test/constant_evaluator_benchmark.dart b/pkg/front_end/test/constant_evaluator_benchmark.dart
index 11ff8c4..5a817a6 100644
--- a/pkg/front_end/test/constant_evaluator_benchmark.dart
+++ b/pkg/front_end/test/constant_evaluator_benchmark.dart
@@ -25,15 +25,16 @@
     show IncrementalCompiler;
 import 'package:front_end/src/fasta/kernel/constant_evaluator.dart' as constants
     show EvaluationMode, transformLibraries, ErrorReporter;
-import 'package:front_end/src/fasta/kernel/kernel_api.dart';
 
 import 'package:front_end/src/fasta/kernel/kernel_target.dart';
 import 'package:kernel/ast.dart';
 import 'package:kernel/binary/ast_from_binary.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/target/changed_structure_notifier.dart';
-
 import 'package:kernel/target/targets.dart'
     show ConstantsBackend, DiagnosticReporter, Target, TargetFlags;
+import 'package:kernel/type_environment.dart';
 
 import "package:vm/target/flutter.dart" show FlutterTarget;
 
@@ -80,7 +81,7 @@
         stopwatch.reset();
         CoreTypes coreTypes = new CoreTypes(component);
         ConstantsBackend constantsBackend =
-            target.backendTarget.constantsBackend(coreTypes);
+            target.backendTarget.constantsBackend;
         ClassHierarchy hierarchy = new ClassHierarchy(component, coreTypes);
         TypeEnvironment environment = new TypeEnvironment(coreTypes, hierarchy);
         if (verbose) {
@@ -130,7 +131,7 @@
 
 late IncrementalCompiler incrementalCompiler;
 
-void main(List<String> arguments) async {
+Future<void> main(List<String> arguments) async {
   Uri? platformUri;
   Uri mainUri;
   bool nnbd = false;
diff --git a/pkg/front_end/test/covariance_check/covariance_check_test.dart b/pkg/front_end/test/covariance_check/covariance_check_test.dart
index eb7cc24..4f59ddc 100644
--- a/pkg/front_end/test/covariance_check/covariance_check_test.dart
+++ b/pkg/front_end/test/covariance_check/covariance_check_test.dart
@@ -11,7 +11,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<String>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/crashing_test_case_minimizer.dart b/pkg/front_end/test/crashing_test_case_minimizer.dart
index 980721c..c5e60d5 100644
--- a/pkg/front_end/test/crashing_test_case_minimizer.dart
+++ b/pkg/front_end/test/crashing_test_case_minimizer.dart
@@ -19,7 +19,7 @@
 // TODO(jensj): Add asserts or similar where - after each rewrite - we run the
 // parser on it and verifies that no syntax errors have been introduced.
 
-void main(List<String> arguments) async {
+Future<void> main(List<String> arguments) async {
   String filename;
   Uri loadJson;
   for (String arg in arguments) {
diff --git a/pkg/front_end/test/dartdoc_test_test.dart b/pkg/front_end/test/dartdoc_test_test.dart
index a3570f1..455a8cf 100644
--- a/pkg/front_end/test/dartdoc_test_test.dart
+++ b/pkg/front_end/test/dartdoc_test_test.dart
@@ -9,7 +9,7 @@
 
 import "../tool/dart_doctest_impl.dart" as impl;
 
-void main() async {
+Future<void> main() async {
   expectCategory = "comment extraction";
   testCommentExtraction();
 
@@ -20,7 +20,7 @@
   await testRunningTests();
 }
 
-void testRunningTests() async {
+Future<void> testRunningTests() async {
   MemoryFileSystem memoryFileSystem =
       new MemoryFileSystem(new Uri(scheme: "darttest", path: "/"));
   HybridFileSystem hybridFileSystem = new HybridFileSystem(memoryFileSystem);
diff --git a/pkg/front_end/test/desugar_test.dart b/pkg/front_end/test/desugar_test.dart
index 5b7539b2..82fdd4a 100644
--- a/pkg/front_end/test/desugar_test.dart
+++ b/pkg/front_end/test/desugar_test.dart
@@ -23,12 +23,11 @@
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
 
-void main() async {
+Future<void> main() async {
   await asyncTest(() async {
     await testRedirectingFactoryDirect();
     await testRedirectingFactorySerialized();
     await testRedirectingFactoryPatchFile();
-    await testExtensionMemberKind();
   });
 }
 
@@ -80,97 +79,3 @@
   _B(int x);
 }
 ''';
-
-Future<void> testExtensionMemberKind() async {
-  var component = await compileUnit(['e.dart'], {'e.dart': extensionSource});
-  var library = component.libraries
-      .firstWhere((l) => l.importUri.path.endsWith('e.dart'));
-  var descriptors =
-      library.extensions.expand((extension) => extension.members).toList();
-
-  // Check generated getters and setters for fields.
-  var fieldGetter =
-      findExtensionField(descriptors, 'field', ir.ExtensionMemberKind.Getter);
-  Expect.equals(
-      api.getExtensionMemberKind(fieldGetter), ir.ProcedureKind.Getter);
-  var fieldSetter =
-      findExtensionField(descriptors, 'field', ir.ExtensionMemberKind.Setter);
-  Expect.equals(
-      api.getExtensionMemberKind(fieldSetter), ir.ProcedureKind.Setter);
-  var staticFieldGetter = findExtensionField(
-      descriptors, 'staticField', ir.ExtensionMemberKind.Getter);
-  Expect.equals(
-      api.getExtensionMemberKind(staticFieldGetter), ir.ProcedureKind.Getter);
-  var staticFieldSetter = findExtensionField(
-      descriptors, 'staticField', ir.ExtensionMemberKind.Setter);
-  Expect.equals(
-      api.getExtensionMemberKind(staticFieldSetter), ir.ProcedureKind.Setter);
-
-  // Check getters and setters.
-  var getter = findExtensionMember(descriptors, 'getter');
-  Expect.equals(api.getExtensionMemberKind(getter), ir.ProcedureKind.Getter);
-  var setter = findExtensionMember(descriptors, 'setter');
-  Expect.equals(api.getExtensionMemberKind(setter), ir.ProcedureKind.Setter);
-  var staticGetter = findExtensionMember(descriptors, 'staticGetter');
-  Expect.equals(
-      api.getExtensionMemberKind(staticGetter), ir.ProcedureKind.Getter);
-  var staticSetter = findExtensionMember(descriptors, 'staticSetter');
-  Expect.equals(
-      api.getExtensionMemberKind(staticSetter), ir.ProcedureKind.Setter);
-
-  // Check methods.
-  var method = findExtensionMember(descriptors, 'method');
-  Expect.equals(api.getExtensionMemberKind(method), ir.ProcedureKind.Method);
-  var methodTearoff = findExtensionTearoff(descriptors, 'get#method');
-  Expect.equals(
-      api.getExtensionMemberKind(methodTearoff), ir.ProcedureKind.Getter);
-  var staticMethod = findExtensionMember(descriptors, 'staticMethod');
-  Expect.equals(
-      api.getExtensionMemberKind(staticMethod), ir.ProcedureKind.Method);
-
-  // Check operators.
-  var operator = findExtensionMember(descriptors, '+');
-  Expect.equals(api.getExtensionMemberKind(operator), ir.ProcedureKind.Method);
-}
-
-ir.Member findExtensionMember(
-    List<ir.ExtensionMemberDescriptor> descriptors, String memberName) {
-  return descriptors
-      .firstWhere((d) => d.name.text == memberName)
-      .member
-      .asMember;
-}
-
-ir.Member findExtensionField(List<ir.ExtensionMemberDescriptor> descriptors,
-    String fieldName, ir.ExtensionMemberKind kind) {
-  return descriptors
-      .firstWhere((d) => d.name.text == fieldName && d.kind == kind)
-      .member
-      .asMember;
-}
-
-ir.Member findExtensionTearoff(
-    List<ir.ExtensionMemberDescriptor> descriptors, String memberName) {
-  return descriptors
-      .map((d) => d.member.asMember)
-      .firstWhere((m) => m.name.text.contains(memberName));
-}
-
-const extensionSource = '''
-class Foo {}
-
-extension Ext on Foo {
-  external int field;
-  external static int staticField;
-
-  external get getter;
-  external set setter(_);
-  external static get staticGetter;
-  external static set staticSetter(_);
-
-  external int method();
-  external static int staticMethod();
-
-  external operator +(_);
-}
-''';
diff --git a/pkg/front_end/test/dill_round_trip_test.dart b/pkg/front_end/test/dill_round_trip_test.dart
index 17bbe1d..32d5759 100644
--- a/pkg/front_end/test/dill_round_trip_test.dart
+++ b/pkg/front_end/test/dill_round_trip_test.dart
@@ -15,7 +15,7 @@
 import 'incremental_suite.dart'
     show checkIsEqual, getOptions, normalCompilePlain;
 
-void main() async {
+Future<void> main() async {
   final Uri dart2jsUrl = Uri.base.resolve("pkg/compiler/bin/dart2js.dart");
   Stopwatch stopwatch = new Stopwatch()..start();
   Component compiledComponent = await normalCompilePlain(dart2jsUrl,
diff --git a/pkg/front_end/test/enable_non_nullable/enable_non_nullable_test.dart b/pkg/front_end/test/enable_non_nullable/enable_non_nullable_test.dart
index b15d91f..f5fb221 100644
--- a/pkg/front_end/test/enable_non_nullable/enable_non_nullable_test.dart
+++ b/pkg/front_end/test/enable_non_nullable/enable_non_nullable_test.dart
@@ -20,7 +20,7 @@
 /// The version used in this test as the experiment enabled version.
 const Version experimentEnabledVersion = const Version(2, 10);
 
-void main() async {
+Future<void> main() async {
   print('--------------------------------------------------------------------');
   print('Test off-by-default with command-line flag');
   print('--------------------------------------------------------------------');
@@ -58,7 +58,7 @@
       versionOptsInAllowed: experimentReleaseVersion);
 }
 
-void test(
+Future<void> test(
     {bool enableNonNullableByDefault,
     bool enableNonNullableExplicitly,
     Version versionImpliesOptIn,
diff --git a/pkg/front_end/test/extensions/data/ambiguous/lib1.dart b/pkg/front_end/test/extensions/data/ambiguous/lib1.dart
index 3e96ec7..d2ec93e 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/lib1.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/lib1.dart
@@ -8,7 +8,9 @@
   AmbiguousExtension1,
   AmbiguousExtension2,
   UnambiguousExtension1,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: AmbiguousExtension1:
  builder-name=AmbiguousExtension1,
diff --git a/pkg/front_end/test/extensions/data/ambiguous/lib2.dart b/pkg/front_end/test/extensions/data/ambiguous/lib2.dart
index 60dab6f..5554fab 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/lib2.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/lib2.dart
@@ -8,7 +8,9 @@
   AmbiguousExtension1,
   AmbiguousExtension2,
   UnambiguousExtension2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: AmbiguousExtension1:
  builder-name=AmbiguousExtension1,
diff --git a/pkg/front_end/test/extensions/data/ambiguous/main.dart b/pkg/front_end/test/extensions/data/ambiguous/main.dart
index 76b412c..b3032bc 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/main.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib1.dart.AmbiguousExtension1,
   lib1.dart.AmbiguousExtension2,
   lib1.dart.UnambiguousExtension1,
diff --git a/pkg/front_end/test/extensions/data/as_show/lib.dart b/pkg/front_end/test/extensions/data/as_show/lib.dart
index 2511ba6..0f83439 100644
--- a/pkg/front_end/test/extensions/data/as_show/lib.dart
+++ b/pkg/front_end/test/extensions/data/as_show/lib.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   Extension1,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: Extension1:
  builder-name=Extension1,
diff --git a/pkg/front_end/test/extensions/data/as_show/main.dart b/pkg/front_end/test/extensions/data/as_show/main.dart
index c65f8c0..6d3e459 100644
--- a/pkg/front_end/test/extensions/data/as_show/main.dart
+++ b/pkg/front_end/test/extensions/data/as_show/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib.dart.Extension1,
   origin.dart.Extension2]*/
 
diff --git a/pkg/front_end/test/extensions/data/as_show/origin.dart b/pkg/front_end/test/extensions/data/as_show/origin.dart
index abbeee6..3ba1c97 100644
--- a/pkg/front_end/test/extensions/data/as_show/origin.dart
+++ b/pkg/front_end/test/extensions/data/as_show/origin.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   Extension2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: Extension2:
  builder-name=Extension2,
diff --git a/pkg/front_end/test/extensions/data/explicit_this.dart b/pkg/front_end/test/extensions/data/explicit_this.dart
index e1fcd49..3fa67bc 100644
--- a/pkg/front_end/test/extensions/data/explicit_this.dart
+++ b/pkg/front_end/test/extensions/data/explicit_this.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   A2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {
   Object field;
diff --git a/pkg/front_end/test/extensions/data/export_twice/lib1.dart b/pkg/front_end/test/extensions/data/export_twice/lib1.dart
index 14a21cd..98bceb7 100644
--- a/pkg/front_end/test/extensions/data/export_twice/lib1.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/lib1.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   E,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A {}
 
diff --git a/pkg/front_end/test/extensions/data/export_twice/lib2.dart b/pkg/front_end/test/extensions/data/export_twice/lib2.dart
index e3d0760..2ec4f6e 100644
--- a/pkg/front_end/test/extensions/data/export_twice/lib2.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/lib2.dart
@@ -2,7 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*library: scope=[async.dart.FutureExtensions]*/
+/*library: scope=[
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 // @dart = 2.9
 
diff --git a/pkg/front_end/test/extensions/data/export_twice/main.dart b/pkg/front_end/test/extensions/data/export_twice/main.dart
index 919a7ff..50f805b 100644
--- a/pkg/front_end/test/extensions/data/export_twice/main.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib1.dart.E]*/
 
 import 'lib1.dart';
diff --git a/pkg/front_end/test/extensions/data/export_unnamed/lib.dart b/pkg/front_end/test/extensions/data/export_unnamed/lib.dart
index b6fab4b..dcba01e 100644
--- a/pkg/front_end/test/extensions/data/export_unnamed/lib.dart
+++ b/pkg/front_end/test/extensions/data/export_unnamed/lib.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   NamedExtension,
   _extension#0,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: _extension#0:
  builder-name=_extension#0,
diff --git a/pkg/front_end/test/extensions/data/export_unnamed/main.dart b/pkg/front_end/test/extensions/data/export_unnamed/main.dart
index 5e37c32..3eabaef 100644
--- a/pkg/front_end/test/extensions/data/export_unnamed/main.dart
+++ b/pkg/front_end/test/extensions/data/export_unnamed/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib.dart.NamedExtension]*/
 
 import 'lib.dart';
diff --git a/pkg/front_end/test/extensions/data/extension_on_type_variable.dart b/pkg/front_end/test/extensions/data/extension_on_type_variable.dart
index 5f7bb41..e40cd1c 100644
--- a/pkg/front_end/test/extensions/data/extension_on_type_variable.dart
+++ b/pkg/front_end/test/extensions/data/extension_on_type_variable.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   GeneralGeneric,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: GeneralGeneric:
  builder-name=GeneralGeneric,
diff --git a/pkg/front_end/test/extensions/data/implicit_this.dart b/pkg/front_end/test/extensions/data/implicit_this.dart
index 733fb79..2dd48a4 100644
--- a/pkg/front_end/test/extensions/data/implicit_this.dart
+++ b/pkg/front_end/test/extensions/data/implicit_this.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   A2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {
   Object field;
diff --git a/pkg/front_end/test/extensions/data/instance_members.dart b/pkg/front_end/test/extensions/data/instance_members.dart
index 6bd7d39..e7ee05b 100644
--- a/pkg/front_end/test/extensions/data/instance_members.dart
+++ b/pkg/front_end/test/extensions/data/instance_members.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   A2,
   B2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {}
 
diff --git a/pkg/front_end/test/extensions/data/named_declarations.dart b/pkg/front_end/test/extensions/data/named_declarations.dart
index 5f7d266..c108a11 100644
--- a/pkg/front_end/test/extensions/data/named_declarations.dart
+++ b/pkg/front_end/test/extensions/data/named_declarations.dart
@@ -9,7 +9,9 @@
   B2,
   B3,
   B4,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {}
 
diff --git a/pkg/front_end/test/extensions/data/other_kinds.dart b/pkg/front_end/test/extensions/data/other_kinds.dart
index d38a105..38003af 100644
--- a/pkg/front_end/test/extensions/data/other_kinds.dart
+++ b/pkg/front_end/test/extensions/data/other_kinds.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   A2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {
   int _instanceField;
diff --git a/pkg/front_end/test/extensions/data/part/main.dart b/pkg/front_end/test/extensions/data/part/main.dart
index 124b206..7f7a5c0 100644
--- a/pkg/front_end/test/extensions/data/part/main.dart
+++ b/pkg/front_end/test/extensions/data/part/main.dart
@@ -5,7 +5,9 @@
 /*library: scope=[
   Extension,
   _extension#0,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 part 'part.dart';
 
diff --git a/pkg/front_end/test/extensions/data/patching/main.dart b/pkg/front_end/test/extensions/data/patching/main.dart
index 43fab2c..c73c1b6 100644
--- a/pkg/front_end/test/extensions/data/patching/main.dart
+++ b/pkg/front_end/test/extensions/data/patching/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   origin.dart.Extension,
   origin.dart.GenericExtension]*/
 
diff --git a/pkg/front_end/test/extensions/data/patching/origin.dart b/pkg/front_end/test/extensions/data/patching/origin.dart
index f11eb98..ee167d4 100644
--- a/pkg/front_end/test/extensions/data/patching/origin.dart
+++ b/pkg/front_end/test/extensions/data/patching/origin.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   Extension,
   GenericExtension,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: Extension:
  builder-name=Extension,
diff --git a/pkg/front_end/test/extensions/data/prefix/lib1.dart b/pkg/front_end/test/extensions/data/prefix/lib1.dart
index 37dcd3b..66eef24 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib1.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib1.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   HiddenExtension1,
   ShownExtension1,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: ShownExtension1:
  builder-name=ShownExtension1,
diff --git a/pkg/front_end/test/extensions/data/prefix/lib2.dart b/pkg/front_end/test/extensions/data/prefix/lib2.dart
index 6c32e13..6bc2749 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib2.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib2.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   HiddenExtension2,
   ShownExtension2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: HiddenExtension2:
  builder-name=HiddenExtension2,
diff --git a/pkg/front_end/test/extensions/data/prefix/lib3.dart b/pkg/front_end/test/extensions/data/prefix/lib3.dart
index a7245a0..f56416d 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib3.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib3.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   ShownExtension3,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: ShownExtension3:
  builder-name=ShownExtension3,
diff --git a/pkg/front_end/test/extensions/data/prefix/main.dart b/pkg/front_end/test/extensions/data/prefix/main.dart
index 3d5a192..05a1e8c 100644
--- a/pkg/front_end/test/extensions/data/prefix/main.dart
+++ b/pkg/front_end/test/extensions/data/prefix/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib1.dart.ShownExtension1,
   lib2.dart.ShownExtension2,
   lib3.dart.ShownExtension3]*/
diff --git a/pkg/front_end/test/extensions/data/reexport/lib.dart b/pkg/front_end/test/extensions/data/reexport/lib.dart
index c250d6a..f9286f6 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib.dart
@@ -2,7 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*library: scope=[async.dart.FutureExtensions]*/
+/*library: scope=[
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 // @dart = 2.9
 
diff --git a/pkg/front_end/test/extensions/data/reexport/lib1.dart b/pkg/front_end/test/extensions/data/reexport/lib1.dart
index ecf38c5..0e1aef3 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib1.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib1.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   ClashingExtension,
   UniqueExtension1,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: ClashingExtension:
  builder-name=ClashingExtension,
diff --git a/pkg/front_end/test/extensions/data/reexport/lib2.dart b/pkg/front_end/test/extensions/data/reexport/lib2.dart
index 56e8c50..a6a9289 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib2.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib2.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   ClashingExtension,
   UniqueExtension2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: ClashingExtension:
  builder-name=ClashingExtension,
diff --git a/pkg/front_end/test/extensions/data/reexport/main.dart b/pkg/front_end/test/extensions/data/reexport/main.dart
index 7238499..cec1552 100644
--- a/pkg/front_end/test/extensions/data/reexport/main.dart
+++ b/pkg/front_end/test/extensions/data/reexport/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib1.dart.UniqueExtension1,
   lib2.dart.UniqueExtension2]*/
 
diff --git a/pkg/front_end/test/extensions/data/show_hide/lib1.dart b/pkg/front_end/test/extensions/data/show_hide/lib1.dart
index 37dcd3b..66eef24 100644
--- a/pkg/front_end/test/extensions/data/show_hide/lib1.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/lib1.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   HiddenExtension1,
   ShownExtension1,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: ShownExtension1:
  builder-name=ShownExtension1,
diff --git a/pkg/front_end/test/extensions/data/show_hide/lib2.dart b/pkg/front_end/test/extensions/data/show_hide/lib2.dart
index 6c32e13..6bc2749 100644
--- a/pkg/front_end/test/extensions/data/show_hide/lib2.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/lib2.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   HiddenExtension2,
   ShownExtension2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 /*class: HiddenExtension2:
  builder-name=HiddenExtension2,
diff --git a/pkg/front_end/test/extensions/data/show_hide/main.dart b/pkg/front_end/test/extensions/data/show_hide/main.dart
index 3846220..470c0ca 100644
--- a/pkg/front_end/test/extensions/data/show_hide/main.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/main.dart
@@ -6,6 +6,8 @@
 
 /*library: scope=[
   async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName,
   lib1.dart.ShownExtension1,
   lib2.dart.ShownExtension2]*/
 
diff --git a/pkg/front_end/test/extensions/data/static_members.dart b/pkg/front_end/test/extensions/data/static_members.dart
index eab1942..0796bc8 100644
--- a/pkg/front_end/test/extensions/data/static_members.dart
+++ b/pkg/front_end/test/extensions/data/static_members.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   A2,
   B2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {}
 
diff --git a/pkg/front_end/test/extensions/data/super.dart b/pkg/front_end/test/extensions/data/super.dart
index df22e8f..e01d659 100644
--- a/pkg/front_end/test/extensions/data/super.dart
+++ b/pkg/front_end/test/extensions/data/super.dart
@@ -6,7 +6,9 @@
 
 /*library: scope=[
   A2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {
   method1() {}
diff --git a/pkg/front_end/test/extensions/data/type_variables.dart b/pkg/front_end/test/extensions/data/type_variables.dart
index 8153930..26c0198 100644
--- a/pkg/front_end/test/extensions/data/type_variables.dart
+++ b/pkg/front_end/test/extensions/data/type_variables.dart
@@ -8,7 +8,9 @@
   A2,
   A3,
   A4,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1<T> {}
 
diff --git a/pkg/front_end/test/extensions/data/unnamed_declarations.dart b/pkg/front_end/test/extensions/data/unnamed_declarations.dart
index ffa10b4..df8a014 100644
--- a/pkg/front_end/test/extensions/data/unnamed_declarations.dart
+++ b/pkg/front_end/test/extensions/data/unnamed_declarations.dart
@@ -10,7 +10,9 @@
   _extension#2,
   _extension#3,
   _extension#4,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {}
 
diff --git a/pkg/front_end/test/extensions/data/use_as_type.dart b/pkg/front_end/test/extensions/data/use_as_type.dart
index 5cdc007..fd5e3dd 100644
--- a/pkg/front_end/test/extensions/data/use_as_type.dart
+++ b/pkg/front_end/test/extensions/data/use_as_type.dart
@@ -7,7 +7,9 @@
 /*library: scope=[
   A2,
   B2,
-  async.dart.FutureExtensions]*/
+  async.dart.FutureExtensions,
+  core.dart.EnumByName,
+  core.dart.EnumName]*/
 
 class A1 {}
 
@@ -39,12 +41,12 @@
   B1</*error: errors=['A2' isn't a type.]*/A2> var3;
 }
 
-/*error: errors=['A2' isn't a type.]*/
+/*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/
 A2 method1() => null;
 
 // TODO(johnniwinther): We should report an error on the number of type
 // arguments here.
-/*error: errors=['B2' isn't a type.,Expected 0 type arguments.]*/
+/*error: errors=[Expected 0 type arguments.,This requires the 'extension-types' language feature to be enabled.]*/
 B2<A1> method2() => null;
 
-B1</*error: errors=['A2' isn't a type.]*/A2> method3() => null;
+B1</*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/A2> method3() => null;
diff --git a/pkg/front_end/test/extensions/extensions_test.dart b/pkg/front_end/test/extensions/extensions_test.dart
index c811201..2666476 100644
--- a/pkg/front_end/test/extensions/extensions_test.dart
+++ b/pkg/front_end/test/extensions/extensions_test.dart
@@ -23,7 +23,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<Features>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/fasta/ambiguous_export_test.dart b/pkg/front_end/test/fasta/ambiguous_export_test.dart
index 579a3f8..fa0ef8f 100644
--- a/pkg/front_end/test/fasta/ambiguous_export_test.dart
+++ b/pkg/front_end/test/fasta/ambiguous_export_test.dart
@@ -20,7 +20,7 @@
 import 'package:kernel/ast.dart'
     show Field, Library, Name, Component, StringLiteral;
 
-void main() async {
+Future<void> main() async {
   await asyncTest(() async {
     Uri uri = Uri.parse("org.dartlang.fasta:library");
     Library library = new Library(uri, fileUri: uri);
diff --git a/pkg/front_end/test/fasta/analyze_git_test.dart b/pkg/front_end/test/fasta/analyze_git_test.dart
index 7ccff17..c649729 100644
--- a/pkg/front_end/test/fasta/analyze_git_test.dart
+++ b/pkg/front_end/test/fasta/analyze_git_test.dart
@@ -8,7 +8,7 @@
 
 import "package:testing/src/run_tests.dart" as testing show main;
 
-void main() async {
+Future<void> main() async {
   // This method is async, but keeps a port open to prevent the VM from exiting
   // prematurely.
   // Note: if you change this file, also change
diff --git a/pkg/front_end/test/fasta/analyze_src_with_lints_git_test.dart b/pkg/front_end/test/fasta/analyze_src_with_lints_git_test.dart
index 34ca1e2..b4b0e5f 100644
--- a/pkg/front_end/test/fasta/analyze_src_with_lints_git_test.dart
+++ b/pkg/front_end/test/fasta/analyze_src_with_lints_git_test.dart
@@ -8,7 +8,7 @@
 
 import "package:testing/src/run_tests.dart" as testing show main;
 
-void main() async {
+Future<void> main() async {
   await testing.main(<String>[
     "--config=pkg/front_end/testing_with_lints.json",
     "--verbose",
diff --git a/pkg/front_end/test/fasta/expression_suite.dart b/pkg/front_end/test/fasta/expression_suite.dart
index 94cef6e..d6159f9 100644
--- a/pkg/front_end/test/fasta/expression_suite.dart
+++ b/pkg/front_end/test/fasta/expression_suite.dart
@@ -140,6 +140,8 @@
 
   final String className;
 
+  final String methodName;
+
   String expression;
 
   List<CompilationResult> results = [];
@@ -153,6 +155,7 @@
       this.isStaticMethod,
       this.library,
       this.className,
+      this.methodName,
       this.expression);
 
   @override
@@ -260,6 +263,7 @@
     bool isStaticMethod = false;
     Uri library;
     String className;
+    String methodName;
     String expression;
 
     dynamic maps = loadYamlNode(contents, sourceUrl: uri);
@@ -281,6 +285,8 @@
           if (uri.fragment != null && uri.fragment != '') {
             className = uri.fragment;
           }
+        } else if (key == "method") {
+          methodName = value as String;
         } else if (key == "definitions") {
           definitions = (value as YamlList).map((x) => x as String).toList();
         } else if (key == "type_definitions") {
@@ -292,8 +298,17 @@
           expression = value;
         }
       }
-      var test = new TestCase(description, entryPoint, import, definitions,
-          typeDefinitions, isStaticMethod, library, className, expression);
+      var test = new TestCase(
+          description,
+          entryPoint,
+          import,
+          definitions,
+          typeDefinitions,
+          isStaticMethod,
+          library,
+          className,
+          methodName,
+          expression);
       var result = test.validate();
       if (result != null) {
         return new Result.fail(tests, result);
@@ -312,7 +327,7 @@
 
   // Compile [test.expression], update [test.errors] with results.
   // As a side effect - verify that generated procedure can be serialized.
-  void compileExpression(TestCase test, IncrementalCompiler compiler,
+  Future<void> compileExpression(TestCase test, IncrementalCompiler compiler,
       Component component, Context context) async {
     Map<String, DartType> definitions = {};
     for (String name in test.definitions) {
@@ -325,13 +340,15 @@
     }
 
     Procedure compiledProcedure = await compiler.compileExpression(
-        test.expression,
-        definitions,
-        typeParams,
-        "debugExpr",
-        test.library,
-        test.className,
-        test.isStaticMethod);
+      test.expression,
+      definitions,
+      typeParams,
+      "debugExpr",
+      test.library,
+      className: test.className,
+      methodName: test.methodName,
+      isStatic: test.isStaticMethod,
+    );
     List<DiagnosticMessage> errors = context.takeErrors();
     test.results.add(new CompilationResult(compiledProcedure, errors));
     if (compiledProcedure != null) {
@@ -369,7 +386,7 @@
         context.fileSystem.entityForUri(dillFileUri).writeAsBytesSync(
             await new File.fromUri(dillFileUri).readAsBytes());
       }
-      compileExpression(test, sourceCompiler, component, context);
+      await compileExpression(test, sourceCompiler, component, context);
 
       var dillCompiler =
           new IncrementalCompiler(context.compilerContext, dillFileUri);
@@ -382,7 +399,7 @@
       // Since it compiled successfully from source, the bootstrap-from-Dill
       // should also succeed without errors.
       assert(errors.isEmpty);
-      compileExpression(test, dillCompiler, component, context);
+      await compileExpression(test, dillCompiler, component, context);
     }
     return new Result.pass(tests);
   }
diff --git a/pkg/front_end/test/fasta/generator_to_string_test.dart b/pkg/front_end/test/fasta/generator_to_string_test.dart
index f59c8c3..b2c4f52 100644
--- a/pkg/front_end/test/fasta/generator_to_string_test.dart
+++ b/pkg/front_end/test/fasta/generator_to_string_test.dart
@@ -46,8 +46,7 @@
 
 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
 
-import 'package:front_end/src/fasta/kernel/kernel_builder.dart'
-    show LoadLibraryBuilder;
+import 'package:front_end/src/fasta/kernel/load_library_builder.dart';
 
 import 'package:front_end/src/fasta/kernel/kernel_target.dart'
     show KernelTarget;
@@ -66,7 +65,7 @@
   Expect.stringEquals(expected, "$generator");
 }
 
-void main() async {
+Future<void> main() async {
   await CompilerContext.runWithDefaultOptions((CompilerContext c) async {
     Token token = scanString("    myToken").tokens;
     Uri uri = Uri.parse("org-dartlang-test:my_library.dart");
diff --git a/pkg/front_end/test/fasta/messages_suite.dart b/pkg/front_end/test/fasta/messages_suite.dart
index 8e884da..152fa07 100644
--- a/pkg/front_end/test/fasta/messages_suite.dart
+++ b/pkg/front_end/test/fasta/messages_suite.dart
@@ -218,7 +218,7 @@
         // characters with two characters without actually having the string
         // "backslash n".
         switch (key) {
-          case "template":
+          case "problemMessage":
             spell.SpellingResult spellingResult = spell.spellcheckString(
                 node.span.text.replaceAll(r"\n", "\n\n"),
                 dictionaries: const [
@@ -230,14 +230,14 @@
               spellingMessages.addAll(formatSpellingMistakes(
                   spellingResult,
                   node.span.start.offset,
-                  "Template has the following word that is "
+                  "problemMessage has the following word that is "
                       "not in our dictionary",
-                  "Template has the following word that is "
+                  "problemMessage has the following word that is "
                       "on our deny-list"));
             }
             break;
 
-          case "tip":
+          case "correctionMessage":
             spell.SpellingResult spellingResult = spell.spellcheckString(
                 node.span.text.replaceAll(r"\n", "\n\n"),
                 dictionaries: const [
@@ -249,9 +249,9 @@
               spellingMessages.addAll(formatSpellingMistakes(
                   spellingResult,
                   node.span.start.offset,
-                  "Tip has the following word that is "
+                  "correctionMessage has the following word that is "
                       "not in our dictionary",
-                  "Tip has the following word that is "
+                  "correctionMessage has the following word that is "
                       "on our deny-list"));
             }
             break;
@@ -741,11 +741,11 @@
 
   @override
   Future<Result<Example>> run(
-      MessageTestDescription description, MessageTestSuite suite) async {
+      MessageTestDescription description, MessageTestSuite suite) {
     if (description.problem != null) {
-      return fail(null, description.problem);
+      return new Future.value(fail(null, description.problem));
     } else {
-      return pass(description.example);
+      return new Future.value(pass(description.example));
     }
   }
 }
@@ -836,10 +836,10 @@
 }
 
 Future<MessageTestSuite> createContext(
-    Chain suite, Map<String, String> environment) async {
+    Chain suite, Map<String, String> environment) {
   final bool fastOnly = environment["fastOnly"] == "true";
   final bool interactive = environment["interactive"] == "true";
-  return new MessageTestSuite(fastOnly, interactive);
+  return new Future.value(new MessageTestSuite(fastOnly, interactive));
 }
 
 String relativize(Uri uri) {
diff --git a/pkg/front_end/test/fasta/object_supertype_test.dart b/pkg/front_end/test/fasta/object_supertype_test.dart
index 62b9210..b588191 100644
--- a/pkg/front_end/test/fasta/object_supertype_test.dart
+++ b/pkg/front_end/test/fasta/object_supertype_test.dart
@@ -80,7 +80,7 @@
       .map((DiagnosticMessage message) => getMessageCodeObject(message).name)
       .toSet();
 
-  void check(String objectHeader, List<Code> expectedCodes) async {
+  Future<void> check(String objectHeader, List<Code> expectedCodes) async {
     List<DiagnosticMessage> messages = (await outline(objectHeader))
         .where((DiagnosticMessage message) =>
             !normalErrors.contains(getMessageCodeObject(message).name))
diff --git a/pkg/front_end/test/fasta/parser/parser_suite.dart b/pkg/front_end/test/fasta/parser/parser_suite.dart
index 5a920de..2dac9f9 100644
--- a/pkg/front_end/test/fasta/parser/parser_suite.dart
+++ b/pkg/front_end/test/fasta/parser/parser_suite.dart
@@ -12,8 +12,8 @@
 import '../../utils/scanner_chain.dart' show Read, Scan, ScannedFile;
 
 Future<ChainContext> createContext(
-    Chain suite, Map<String, String> environment) async {
-  return new ScannerContext();
+    Chain suite, Map<String, String> environment) {
+  return new Future.value(new ScannerContext());
 }
 
 class ScannerContext extends ChainContext {
@@ -32,17 +32,17 @@
   String get name => "parse";
 
   @override
-  Future<Result<Null>> run(ScannedFile file, ChainContext context) async {
+  Future<Result<Null>> run(ScannedFile file, ChainContext context) {
     try {
       List<ParserError> errors = parse(file.result.tokens,
           useImplicitCreationExpression: useImplicitCreationExpressionInCfe);
       if (errors.isNotEmpty) {
-        return fail(null, errors.join("\n"));
+        return new Future.value(fail(null, errors.join("\n")));
       }
     } on ParserError catch (e, s) {
-      return fail(null, e, s);
+      return new Future.value(fail(null, e, s));
     }
-    return pass(null);
+    return new Future.value(pass(null));
   }
 }
 
diff --git a/pkg/front_end/test/fasta/scanner/scanner_suite.dart b/pkg/front_end/test/fasta/scanner/scanner_suite.dart
index 7b89a9e..f9822e8 100644
--- a/pkg/front_end/test/fasta/scanner/scanner_suite.dart
+++ b/pkg/front_end/test/fasta/scanner/scanner_suite.dart
@@ -9,8 +9,8 @@
 import '../../utils/scanner_chain.dart' show Read, Scan;
 
 Future<ChainContext> createContext(
-    Chain suite, Map<String, String> environment) async {
-  return new ScannerContext();
+    Chain suite, Map<String, String> environment) {
+  return new Future.value(new ScannerContext());
 }
 
 class ScannerContext extends ChainContext {
diff --git a/pkg/front_end/test/fasta/sdk_test.dart b/pkg/front_end/test/fasta/sdk_test.dart
index 0ca3cd5..54caf22 100644
--- a/pkg/front_end/test/fasta/sdk_test.dart
+++ b/pkg/front_end/test/fasta/sdk_test.dart
@@ -9,7 +9,7 @@
 import 'testing/suite.dart';
 
 Future<FastaContext> createContext(
-    Chain suite, Map<String, String> environment) async {
+    Chain suite, Map<String, String> environment) {
   environment[ENABLE_FULL_COMPILE] = "";
   environment["skipVm"] ??= "true";
   environment["onlyCrashes"] ??= "true";
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index f38eaff..387f68f 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -67,7 +67,7 @@
 import 'package:front_end/src/fasta/kernel/class_hierarchy_builder.dart'
     show ClassHierarchyNode;
 
-import 'package:front_end/src/fasta/kernel/kernel_builder.dart'
+import 'package:front_end/src/fasta/kernel/class_hierarchy_builder.dart'
     show ClassHierarchyBuilder;
 
 import 'package:front_end/src/fasta/kernel/kernel_target.dart'
@@ -677,14 +677,14 @@
     return platformBinaries.resolve(fileName);
   }
 
-  Future<Component> loadPlatform(Target target, NnbdMode nnbdMode) async {
+  Component loadPlatform(Target target, NnbdMode nnbdMode) {
     Uri uri = _getPlatformUri(target, nnbdMode);
     return _platforms.putIfAbsent(uri, () {
       return loadComponentFromBytes(new File.fromUri(uri).readAsBytesSync());
     });
   }
 
-  void clearPlatformCache(Target target, NnbdMode nnbdMode) async {
+  void clearPlatformCache(Target target, NnbdMode nnbdMode) {
     Uri uri = _getPlatformUri(target, nnbdMode);
     _platforms.remove(uri);
   }
@@ -737,7 +737,7 @@
   }
 
   static Future<FastaContext> create(
-      Chain suite, Map<String, String> environment) async {
+      Chain suite, Map<String, String> environment) {
     const Set<String> knownEnvironmentKeys = {
       "enableExtensionMethods",
       "enableNonNullable",
@@ -785,7 +785,7 @@
     if (platformBinaries != null && !platformBinaries.endsWith('/')) {
       platformBinaries = '$platformBinaries/';
     }
-    return new FastaContext(
+    return new Future.value(new FastaContext(
         suite.uri,
         vm,
         platformBinaries == null
@@ -801,7 +801,7 @@
         kernelTextSerialization,
         environment.containsKey(ENABLE_FULL_COMPILE),
         verify,
-        soundNullSafety);
+        soundNullSafety));
   }
 }
 
@@ -877,10 +877,9 @@
 
   @override
   Future<Result<ComponentResult>> run(
-      ComponentResult result, FastaContext context) async {
+      ComponentResult result, FastaContext context) {
     KernelTarget target = result.sourceTarget;
-    ConstantsBackend constantsBackend =
-        target.backendTarget.constantsBackend(target.loader.coreTypes);
+    ConstantsBackend constantsBackend = target.backendTarget.constantsBackend;
     TypeEnvironment environment =
         new TypeEnvironment(target.loader.coreTypes, target.loader.hierarchy);
     StressConstantEvaluatorVisitor stressConstantEvaluatorVisitor =
@@ -903,7 +902,7 @@
           "evaluated: ${stressConstantEvaluatorVisitor.tries}, "
           "effectively constant: ${stressConstantEvaluatorVisitor.success}");
     }
-    return pass(result);
+    return new Future.value(pass(result));
   }
 }
 
@@ -1159,8 +1158,8 @@
     UriTranslator uriTranslator =
         await context.computeUriTranslator(result.description);
 
-    Component platform = await context.loadPlatform(
-        backendTarget, compilationSetup.options.nnbdMode);
+    Component platform =
+        context.loadPlatform(backendTarget, compilationSetup.options.nnbdMode);
     Result<ComponentResult>? passResult = await performFileInvalidation(
         compilationSetup,
         platform,
@@ -1879,8 +1878,7 @@
       ProcessedOptions options,
       List<Uri> entryPoints,
       {Component? alsoAppend}) async {
-    Component platform =
-        await context.loadPlatform(options.target, options.nnbdMode);
+    Component platform = context.loadPlatform(options.target, options.nnbdMode);
     Ticker ticker = new Ticker();
     UriTranslator uriTranslator =
         await context.computeUriTranslator(description);
@@ -1897,7 +1895,7 @@
         StandardFileSystem.instance, false, dillTarget, uriTranslator);
 
     sourceTarget.setEntryPoints(entryPoints);
-    await dillTarget.buildOutlines();
+    dillTarget.buildOutlines();
     return sourceTarget;
   }
 }
@@ -1971,19 +1969,20 @@
 
     Component component = result.component;
     StringBuffer messages = new StringBuffer();
-    ProcessedOptions options = new ProcessedOptions(
-        options: new CompilerOptions()
-          ..onDiagnostic = (DiagnosticMessage message) {
-            if (messages.isNotEmpty) {
-              messages.write("\n");
-            }
-            messages.writeAll(message.plainTextFormatted, "\n");
-          });
-    return await CompilerContext.runWithOptions(options,
-        (compilerContext) async {
+    void Function(DiagnosticMessage)? previousOnDiagnostics =
+        result.options.rawOptionsForTesting.onDiagnostic;
+    result.options.rawOptionsForTesting.onDiagnostic =
+        (DiagnosticMessage message) {
+      if (messages.isNotEmpty) {
+        messages.write("\n");
+      }
+      messages.writeAll(message.plainTextFormatted, "\n");
+    };
+    Result<ComponentResult> verifyResult = await CompilerContext.runWithOptions(
+        result.options, (compilerContext) async {
       compilerContext.uriToSource.addAll(component.uriToSource);
       List<LocatedMessage> verificationErrors = verifyComponent(
-          component, options.target,
+          component, result.options.target,
           isOutline: !fullCompile, skipPlatform: true);
       assert(verificationErrors.isEmpty || messages.isNotEmpty);
       if (messages.isEmpty) {
@@ -1993,6 +1992,8 @@
             null, context.expectationSet["VerificationError"], "$messages");
       }
     }, errorOnMissingInput: false);
+    result.options.rawOptionsForTesting.onDiagnostic = previousOnDiagnostics;
+    return verifyResult;
   }
 }
 
@@ -2074,14 +2075,14 @@
 
   @override
   Future<Result<ComponentResult>> run(
-      ComponentResult result, FastaContext context) async {
+      ComponentResult result, FastaContext context) {
     List<Iterable<String>> errors = result.compilationSetup.errors;
-    return errors.isEmpty
+    return new Future.value(errors.isEmpty
         ? pass(result)
         : fail(
             result,
             "Unexpected errors:\n"
-            "${errors.map((error) => error.join('\n')).join('\n\n')}");
+            "${errors.map((error) => error.join('\n')).join('\n\n')}"));
   }
 }
 
@@ -2094,7 +2095,7 @@
 
   @override
   Future<Result<ComponentResult>> run(
-      ComponentResult result, FastaContext context) async {
+      ComponentResult result, FastaContext context) {
     Component component = result.component;
     Uri uri =
         component.uriToSource.keys.firstWhere((uri) => uri.scheme == "file");
diff --git a/pkg/front_end/test/fasta/textual_outline_suite.dart b/pkg/front_end/test/fasta/textual_outline_suite.dart
index 09f3387..3d2c902 100644
--- a/pkg/front_end/test/fasta/textual_outline_suite.dart
+++ b/pkg/front_end/test/fasta/textual_outline_suite.dart
@@ -47,9 +47,9 @@
   },
 ];
 
-Future<Context> createContext(
-    Chain suite, Map<String, String> environment) async {
-  return new Context(environment["updateExpectations"] == "true");
+Future<Context> createContext(Chain suite, Map<String, String> environment) {
+  return new Future.value(
+      new Context(environment["updateExpectations"] == "true"));
 }
 
 void main([List<String> arguments = const []]) =>
diff --git a/pkg/front_end/test/fasta/type_inference/factor_type_test.dart b/pkg/front_end/test/fasta/type_inference/factor_type_test.dart
index 65243ed..a365e93 100644
--- a/pkg/front_end/test/fasta/type_inference/factor_type_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/factor_type_test.dart
@@ -102,7 +102,7 @@
       typeToText(type, TypeRepresentation.analyzerNonNullableByDefault);
 }
 
-void main() async {
+Future<void> main() async {
   CompilerOptions options = new CompilerOptions()
     ..explicitExperimentalFlags[ExperimentalFlag.nonNullable] = true;
   InternalCompilerResult result = await compileScript('',
diff --git a/pkg/front_end/test/fasta/types/dill_hierachy_test.dart b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
index fb95755..e37a8c3 100644
--- a/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
+++ b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
@@ -31,7 +31,7 @@
 
 import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
 
-import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+import "package:front_end/src/fasta/kernel/class_hierarchy_builder.dart"
     show ClassHierarchyBuilder;
 
 import "package:front_end/src/fasta/ticker.dart" show Ticker;
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 2852925..33af5ac 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
@@ -22,7 +22,7 @@
 
 import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
 
-import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+import "package:front_end/src/fasta/kernel/class_hierarchy_builder.dart"
     show ClassHierarchyBuilder;
 
 import "package:front_end/src/fasta/ticker.dart" show Ticker;
diff --git a/pkg/front_end/test/fasta/types/fasta_types_test.dart b/pkg/front_end/test/fasta/types/fasta_types_test.dart
index c5be9a4..83135453 100644
--- a/pkg/front_end/test/fasta/types/fasta_types_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_types_test.dart
@@ -31,7 +31,7 @@
 
 import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
 
-import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+import "package:front_end/src/fasta/kernel/class_hierarchy_builder.dart"
     show ClassHierarchyBuilder;
 
 import "package:front_end/src/fasta/ticker.dart" show Ticker;
diff --git a/pkg/front_end/test/fasta/types/subtypes_benchmark.dart b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
index aa23ed4..6ab0236 100644
--- a/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
+++ b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
@@ -36,7 +36,7 @@
 
 import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
 
-import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+import "package:front_end/src/fasta/kernel/class_hierarchy_builder.dart"
     show ClassHierarchyBuilder;
 
 import "package:front_end/src/fasta/ticker.dart" show Ticker;
diff --git a/pkg/front_end/test/flutter_gallery_leak_tester.dart b/pkg/front_end/test/flutter_gallery_leak_tester.dart
index 1b5e46b..973961d 100644
--- a/pkg/front_end/test/flutter_gallery_leak_tester.dart
+++ b/pkg/front_end/test/flutter_gallery_leak_tester.dart
@@ -26,7 +26,7 @@
 // but assumes that flutter has been setup as by the script
 // `tools/bots/flutter/compile_flutter.sh`.
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   if (Platform.isWindows) {
     throw "This script cannot run on Windows as it uses non-Windows "
         "assumptions both for the placement of pub packages and the presence "
diff --git a/pkg/front_end/test/generated_files_up_to_date_git_test.dart b/pkg/front_end/test/generated_files_up_to_date_git_test.dart
index 17773be..5161eef 100644
--- a/pkg/front_end/test/generated_files_up_to_date_git_test.dart
+++ b/pkg/front_end/test/generated_files_up_to_date_git_test.dart
@@ -20,7 +20,7 @@
 
 final Uri repoDir = computeRepoDirUri();
 
-void main() async {
+Future<void> main() async {
   messages();
   experimentalFlags();
   directParserAstHelper();
diff --git a/pkg/front_end/test/id_testing/id_testing_test.dart b/pkg/front_end/test/id_testing/id_testing_test.dart
index c7c8b83..873dc8e 100644
--- a/pkg/front_end/test/id_testing/id_testing_test.dart
+++ b/pkg/front_end/test/id_testing/id_testing_test.dart
@@ -7,7 +7,6 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, StringDataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'dart:io' show Directory, Platform;
 import 'package:front_end/src/fasta/messages.dart' show FormattedMessage;
 import 'package:front_end/src/testing/id_testing_helper.dart'
@@ -30,7 +29,7 @@
         Library,
         TreeNode;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<String>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/id_tests/assigned_variables_test.dart b/pkg/front_end/test/id_tests/assigned_variables_test.dart
index 8a54a08..1b325de 100644
--- a/pkg/front_end/test/id_tests/assigned_variables_test.dart
+++ b/pkg/front_end/test/id_tests/assigned_variables_test.dart
@@ -11,7 +11,6 @@
     show ActualData, Id, IdKind;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/fasta/builder/member_builder.dart';
 import 'package:front_end/src/fasta/source/source_loader.dart';
 
@@ -19,7 +18,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve(
       '../../../_fe_analyzer_shared/test/flow_analysis/assigned_variables/'
       'data'));
diff --git a/pkg/front_end/test/id_tests/constant_test.dart b/pkg/front_end/test/id_tests/constant_test.dart
index 0b2db7e..54eccdb 100644
--- a/pkg/front_end/test/id_tests/constant_test.dart
+++ b/pkg/front_end/test/id_tests/constant_test.dart
@@ -8,7 +8,6 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, StringDataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart'
     show
         CfeDataExtractor,
@@ -23,7 +22,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script
       .resolve('../../../_fe_analyzer_shared/test/constants/data'));
   await runTests<String>(dataDir,
diff --git a/pkg/front_end/test/id_tests/definite_assignment_test.dart b/pkg/front_end/test/id_tests/definite_assignment_test.dart
index 09b7584..74afe1e 100644
--- a/pkg/front_end/test/id_tests/definite_assignment_test.dart
+++ b/pkg/front_end/test/id_tests/definite_assignment_test.dart
@@ -14,7 +14,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve(
       '../../../_fe_analyzer_shared/test/flow_analysis/definite_assignment/'
       'data'));
diff --git a/pkg/front_end/test/id_tests/definite_unassignment_test.dart b/pkg/front_end/test/id_tests/definite_unassignment_test.dart
index 2d25641..30d0fb5 100644
--- a/pkg/front_end/test/id_tests/definite_unassignment_test.dart
+++ b/pkg/front_end/test/id_tests/definite_unassignment_test.dart
@@ -14,7 +14,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve(
       '../../../_fe_analyzer_shared/test/flow_analysis/definite_unassignment/'
       'data'));
diff --git a/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart b/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
index 0670441..6c5aedc 100644
--- a/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
+++ b/pkg/front_end/test/id_tests/inferred_type_arguments_test.dart
@@ -8,14 +8,13 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/fasta/builder/member_builder.dart';
 import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(
       Platform.script.resolve('../../../_fe_analyzer_shared/test/'
           'inference/inferred_type_arguments/data'));
diff --git a/pkg/front_end/test/id_tests/inferred_variable_types_test.dart b/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
index 8403ae5..91c4800 100644
--- a/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
+++ b/pkg/front_end/test/id_tests/inferred_variable_types_test.dart
@@ -8,14 +8,13 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/fasta/builder/member_builder.dart';
 import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(
       Platform.script.resolve('../../../_fe_analyzer_shared/test/'
           'inference/inferred_variable_types/data'));
diff --git a/pkg/front_end/test/id_tests/inheritance_test.dart b/pkg/front_end/test/id_tests/inheritance_test.dart
index 40a5ae9..3d6aba4 100644
--- a/pkg/front_end/test/id_tests/inheritance_test.dart
+++ b/pkg/front_end/test/id_tests/inheritance_test.dart
@@ -10,15 +10,17 @@
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/api_prototype/experimental_flags.dart';
 import 'package:front_end/src/fasta/kernel/class_hierarchy_builder.dart';
-import 'package:front_end/src/fasta/kernel/kernel_api.dart';
 import 'package:front_end/src/testing/id_extractor.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/type_algebra.dart';
 
 const String cfeFromBuilderMarker = 'cfe:builder';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script
       .resolve('../../../_fe_analyzer_shared/test/inheritance/data'));
   await runTests<String>(dataDir,
diff --git a/pkg/front_end/test/id_tests/nullability_test.dart b/pkg/front_end/test/id_tests/nullability_test.dart
index de14982..d77f169 100644
--- a/pkg/front_end/test/id_tests/nullability_test.dart
+++ b/pkg/front_end/test/id_tests/nullability_test.dart
@@ -10,7 +10,7 @@
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve(
       '../../../_fe_analyzer_shared/test/flow_analysis/nullability/data'));
   await runTests<String>(dataDir,
diff --git a/pkg/front_end/test/id_tests/reachability_test.dart b/pkg/front_end/test/id_tests/reachability_test.dart
index 7cd2ab7..d486fde 100644
--- a/pkg/front_end/test/id_tests/reachability_test.dart
+++ b/pkg/front_end/test/id_tests/reachability_test.dart
@@ -8,7 +8,6 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/fasta/builder/member_builder.dart';
 import 'package:front_end/src/fasta/source/source_loader.dart';
@@ -16,7 +15,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve(
       '../../../_fe_analyzer_shared/test/flow_analysis/reachability/data'));
   await runTests<Set<_ReachabilityAssertion>>(dataDir,
diff --git a/pkg/front_end/test/id_tests/type_promotion_test.dart b/pkg/front_end/test/id_tests/type_promotion_test.dart
index 87d3d38..fed4245 100644
--- a/pkg/front_end/test/id_tests/type_promotion_test.dart
+++ b/pkg/front_end/test/id_tests/type_promotion_test.dart
@@ -8,12 +8,11 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script
       .resolve('../../../_fe_analyzer_shared/test/flow_analysis/type_promotion/'
           'data'));
diff --git a/pkg/front_end/test/id_tests/why_not_promoted_test.dart b/pkg/front_end/test/id_tests/why_not_promoted_test.dart
index 603cd8c..ed82ac1 100644
--- a/pkg/front_end/test/id_tests/why_not_promoted_test.dart
+++ b/pkg/front_end/test/id_tests/why_not_promoted_test.dart
@@ -9,14 +9,13 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart' show ActualData, Id;
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:front_end/src/fasta/builder/member_builder.dart';
 import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart';
 import 'package:front_end/src/testing/id_testing_helper.dart';
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart' hide Variance, MapLiteralEntry;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(
       Platform.script.resolve('../../../_fe_analyzer_shared/test/flow_analysis/'
           'why_not_promoted/data'));
diff --git a/pkg/front_end/test/incremental_compiler_leak_test.dart b/pkg/front_end/test/incremental_compiler_leak_test.dart
deleted file mode 100644
index 675bee9..0000000
--- a/pkg/front_end/test/incremental_compiler_leak_test.dart
+++ /dev/null
@@ -1,267 +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.md file.
-
-// @dart = 2.9
-
-import 'dart:async';
-import 'dart:io';
-
-import "simple_stats.dart";
-import "vm_service_helper.dart" as vmService;
-
-const int limit = 10;
-
-void main(List<String> args) async {
-  LeakFinder heapHelper = new LeakFinder();
-
-  heapHelper.start([
-    "--disable-dart-dev",
-    "--enable-asserts",
-    Platform.script.resolve("incremental_dart2js_tester.dart").toString(),
-    "--addDebugBreaks",
-    "--fast",
-    "--limit=$limit",
-  ]);
-}
-
-class LeakFinder extends vmService.LaunchingVMServiceHelper {
-  @override
-  Future<void> run() async {
-    vmService.VM vm = await serviceClient.getVM();
-    if (vm.isolates.length != 1) {
-      throw "Expected 1 isolate, got ${vm.isolates.length}";
-    }
-    vmService.IsolateRef isolateRef = vm.isolates.single;
-    await waitUntilIsolateIsRunnable(isolateRef.id);
-    await serviceClient.resume(isolateRef.id);
-
-    Map<vmService.ClassRef, List<int>> instanceCounts =
-        new Map<vmService.ClassRef, List<int>>();
-    Map<vmService.ClassRef, vmService.Class> classInfo =
-        new Map<vmService.ClassRef, vmService.Class>();
-
-    Completer<String> cTimeout = new Completer();
-    Timer timer = new Timer(new Duration(minutes: 6), () {
-      cTimeout.complete("Timeout");
-      killProcess();
-    });
-
-    Completer<String> cRunDone = new Completer();
-    // ignore: unawaited_futures
-    runInternal(
-        isolateRef,
-        classInfo,
-        instanceCounts,
-        (int iteration) =>
-            // Subtract 2 as it's logically one ahead and asks _before_ the run.
-            (iteration - 2) > limit ||
-            cTimeout.isCompleted ||
-            cProcessExited.isCompleted).then((value) {
-      cRunDone.complete("Done");
-    });
-
-    await Future.any([cRunDone.future, cTimeout.future, cProcessExited.future]);
-    timer.cancel();
-
-    print("\n\n======================\n\n");
-
-    findPossibleLeaks(instanceCounts, classInfo);
-
-    // Make sure the process doesn't hang.
-    killProcess();
-  }
-
-  void findPossibleLeaks(Map<vmService.ClassRef, List<int>> instanceCounts,
-      Map<vmService.ClassRef, vmService.Class> classInfo) {
-    bool foundLeak = false;
-    for (vmService.ClassRef c in instanceCounts.keys) {
-      List<int> listOfInstanceCounts = instanceCounts[c];
-
-      // Ignore VM internal stuff like "PatchClass", "PcDescriptors" etc.
-      // (they don't have a url).
-      vmService.Class classDetails = classInfo[c];
-      String uriString = classDetails.location?.script?.uri;
-      if (uriString == null) continue;
-
-      // For now ignore anything not in package:kernel or package:front_end.
-      if (ignoredClass(classDetails)) continue;
-
-      // If they're all equal there's nothing to talk about.
-      bool same = true;
-      for (int i = 1; i < listOfInstanceCounts.length; i++) {
-        if (listOfInstanceCounts[i] != listOfInstanceCounts[0]) {
-          same = false;
-          break;
-        }
-      }
-      if (same) continue;
-
-      int midPoint = listOfInstanceCounts.length ~/ 2;
-      List<int> firstHalf = listOfInstanceCounts.sublist(0, midPoint);
-      List<int> secondHalf = listOfInstanceCounts.sublist(midPoint);
-      TTestResult ttestResult = SimpleTTestStat.ttest(secondHalf, firstHalf);
-
-      if (!strictClass(classDetails)) {
-        if (!ttestResult.significant) continue;
-
-        // TODO(jensj): We could possibly also ignore if it's less (i.e. a
-        // negative change), or if the change is < 1%, or the change minus the
-        // confidence is < 1% etc.
-      }
-      print("Differences on ${c.name} (${uriString}): "
-          "$listOfInstanceCounts ($ttestResult)");
-      foundLeak = true;
-    }
-
-    print("\n\n");
-
-    if (foundLeak) {
-      print("Possible leak(s) found.");
-      print("(Note that this doesn't guarantee that there are any!)");
-      exitCode = 1;
-    } else {
-      print("Didn't identify any leaks.");
-      print("(Note that this doesn't guarantee that there are none!)");
-      exitCode = 0;
-    }
-  }
-
-  Future<void> runInternal(
-      vmService.IsolateRef isolateRef,
-      Map<vmService.ClassRef, vmService.Class> classInfo,
-      Map<vmService.ClassRef, List<int>> instanceCounts,
-      bool Function(int iteration) shouldBail) async {
-    int iterationNumber = 1;
-    try {
-      while (true) {
-        if (shouldBail(iterationNumber)) break;
-        if (!await waitUntilPaused(isolateRef.id)) break;
-        print("\n\n====================\n\nIteration #$iterationNumber");
-        iterationNumber++;
-        vmService.AllocationProfile allocationProfile =
-            await forceGC(isolateRef.id);
-        for (vmService.ClassHeapStats member in allocationProfile.members) {
-          if (!classInfo.containsKey(member.classRef)) {
-            vmService.Class c = await serviceClient.getObject(
-                isolateRef.id, member.classRef.id);
-            classInfo[member.classRef] = c;
-          }
-          List<int> listOfInstanceCounts = instanceCounts[member.classRef];
-          if (listOfInstanceCounts == null) {
-            listOfInstanceCounts = instanceCounts[member.classRef] = <int>[];
-          }
-          while (listOfInstanceCounts.length < iterationNumber - 2) {
-            listOfInstanceCounts.add(0);
-          }
-          listOfInstanceCounts.add(member.instancesCurrent);
-          if (listOfInstanceCounts.length != iterationNumber - 1) {
-            throw "Unexpected length";
-          }
-        }
-        await serviceClient.resume(isolateRef.id);
-      }
-    } catch (e) {
-      print("Got error: $e");
-    }
-  }
-
-  Completer<String> cProcessExited = new Completer();
-  @override
-  void processExited(int exitCode) {
-    cProcessExited.complete("Exit");
-  }
-
-  bool ignoredClass(vmService.Class classDetails) {
-    String uriString = classDetails.location?.script?.uri;
-    if (uriString == null) return true;
-    if (uriString.startsWith("package:front_end/")) {
-      // Classes used for lazy initialization will naturally fluctuate.
-      if (classDetails.name == "DillClassBuilder") return true;
-      if (classDetails.name == "DillExtensionBuilder") return true;
-      if (classDetails.name == "DillExtensionMemberBuilder") return true;
-      if (classDetails.name == "DillMemberBuilder") return true;
-      if (classDetails.name == "DillTypeAliasBuilder") return true;
-
-      // These classes have proved to fluctuate, although the reason is less
-      // clear.
-      if (classDetails.name == "InheritedImplementationInterfaceConflict") {
-        return true;
-      }
-      if (classDetails.name == "AbstractMemberOverridingImplementation") {
-        return true;
-      }
-      if (classDetails.name == "VoidTypeBuilder") return true;
-      if (classDetails.name == "NamedTypeBuilder") return true;
-      if (classDetails.name == "DillClassMember") return true;
-      if (classDetails.name == "Scope") return true;
-      if (classDetails.name == "ConstructorScope") return true;
-      if (classDetails.name == "ScopeBuilder") return true;
-      if (classDetails.name == "ConstructorScopeBuilder") return true;
-      if (classDetails.name == "NullTypeDeclarationBuilder") return true;
-      if (classDetails.name == "NullabilityBuilder") return true;
-
-      return false;
-    } else if (uriString.startsWith("package:kernel/")) {
-      // DirtifyingList is used for lazy stuff and naturally change in numbers.
-      if (classDetails.name == "DirtifyingList") return true;
-
-      // Constants are canonicalized in their compilation run and will thus
-      // naturally increase, e.g. we can get 2 more booleans every time (up to
-      // a maximum of 2 per library or however many would have been there if we
-      // didn't canonicalize at all).
-      if (classDetails.name.endsWith("Constant")) return true;
-
-      // These classes have proved to fluctuate, although the reason is less
-      // clear.
-      if (classDetails.name == "InterfaceType") return true;
-
-      return false;
-    }
-    return true;
-  }
-
-  // I have commented out the lazy ones below.
-  Set<String> frontEndStrictClasses = {
-    // "DillClassBuilder",
-    // "DillExtensionBuilder",
-    // "DillExtensionMemberBuilder",
-    "DillLibraryBuilder",
-    "DillLoader",
-    // "DillMemberBuilder",
-    "DillTarget",
-    // "DillTypeAliasBuilder",
-    "SourceClassBuilder",
-    "SourceExtensionBuilder",
-    "SourceLibraryBuilder",
-    "SourceLoader",
-  };
-
-  Set<String> kernelAstStrictClasses = {
-    "Class",
-    "Constructor",
-    "Extension",
-    "Field",
-    "Library",
-    "Procedure",
-    "RedirectingFactory",
-    "Typedef",
-  };
-
-  bool strictClass(vmService.Class classDetails) {
-    if (!kernelAstStrictClasses.contains(classDetails.name) &&
-        !frontEndStrictClasses.contains(classDetails.name)) return false;
-
-    if (kernelAstStrictClasses.contains(classDetails.name) &&
-        classDetails.location?.script?.uri == "package:kernel/ast.dart") {
-      return true;
-    }
-    if (frontEndStrictClasses.contains(classDetails.name) &&
-        classDetails.location?.script?.uri?.startsWith("package:front_end/") ==
-            true) {
-      return true;
-    }
-
-    throw "$classDetails: ${classDetails.name} --- ${classDetails.location}";
-  }
-}
diff --git a/pkg/front_end/test/incremental_compiler_leak_tester.dart b/pkg/front_end/test/incremental_compiler_leak_tester.dart
new file mode 100644
index 0000000..a9f3b81
--- /dev/null
+++ b/pkg/front_end/test/incremental_compiler_leak_tester.dart
@@ -0,0 +1,267 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+// @dart = 2.9
+
+import 'dart:async';
+import 'dart:io';
+
+import "simple_stats.dart";
+import "vm_service_helper.dart" as vmService;
+
+const int limit = 10;
+
+Future<void> main(List<String> args) async {
+  LeakFinder heapHelper = new LeakFinder();
+
+  await heapHelper.start([
+    "--disable-dart-dev",
+    "--enable-asserts",
+    Platform.script.resolve("incremental_dart2js_tester.dart").toString(),
+    "--addDebugBreaks",
+    "--fast",
+    "--limit=$limit",
+  ]);
+}
+
+class LeakFinder extends vmService.LaunchingVMServiceHelper {
+  @override
+  Future<void> run() async {
+    vmService.VM vm = await serviceClient.getVM();
+    if (vm.isolates.length != 1) {
+      throw "Expected 1 isolate, got ${vm.isolates.length}";
+    }
+    vmService.IsolateRef isolateRef = vm.isolates.single;
+    await waitUntilIsolateIsRunnable(isolateRef.id);
+    await serviceClient.resume(isolateRef.id);
+
+    Map<vmService.ClassRef, List<int>> instanceCounts =
+        new Map<vmService.ClassRef, List<int>>();
+    Map<vmService.ClassRef, vmService.Class> classInfo =
+        new Map<vmService.ClassRef, vmService.Class>();
+
+    Completer<String> cTimeout = new Completer();
+    Timer timer = new Timer(new Duration(minutes: 6), () {
+      cTimeout.complete("Timeout");
+      killProcess();
+    });
+
+    Completer<String> cRunDone = new Completer();
+    // ignore: unawaited_futures
+    runInternal(
+        isolateRef,
+        classInfo,
+        instanceCounts,
+        (int iteration) =>
+            // Subtract 2 as it's logically one ahead and asks _before_ the run.
+            (iteration - 2) > limit ||
+            cTimeout.isCompleted ||
+            cProcessExited.isCompleted).then((value) {
+      cRunDone.complete("Done");
+    });
+
+    await Future.any([cRunDone.future, cTimeout.future, cProcessExited.future]);
+    timer.cancel();
+
+    print("\n\n======================\n\n");
+
+    findPossibleLeaks(instanceCounts, classInfo);
+
+    // Make sure the process doesn't hang.
+    killProcess();
+  }
+
+  void findPossibleLeaks(Map<vmService.ClassRef, List<int>> instanceCounts,
+      Map<vmService.ClassRef, vmService.Class> classInfo) {
+    bool foundLeak = false;
+    for (vmService.ClassRef c in instanceCounts.keys) {
+      List<int> listOfInstanceCounts = instanceCounts[c];
+
+      // Ignore VM internal stuff like "PatchClass", "PcDescriptors" etc.
+      // (they don't have a url).
+      vmService.Class classDetails = classInfo[c];
+      String uriString = classDetails.location?.script?.uri;
+      if (uriString == null) continue;
+
+      // For now ignore anything not in package:kernel or package:front_end.
+      if (ignoredClass(classDetails)) continue;
+
+      // If they're all equal there's nothing to talk about.
+      bool same = true;
+      for (int i = 1; i < listOfInstanceCounts.length; i++) {
+        if (listOfInstanceCounts[i] != listOfInstanceCounts[0]) {
+          same = false;
+          break;
+        }
+      }
+      if (same) continue;
+
+      int midPoint = listOfInstanceCounts.length ~/ 2;
+      List<int> firstHalf = listOfInstanceCounts.sublist(0, midPoint);
+      List<int> secondHalf = listOfInstanceCounts.sublist(midPoint);
+      TTestResult ttestResult = SimpleTTestStat.ttest(secondHalf, firstHalf);
+
+      if (!strictClass(classDetails)) {
+        if (!ttestResult.significant) continue;
+
+        // TODO(jensj): We could possibly also ignore if it's less (i.e. a
+        // negative change), or if the change is < 1%, or the change minus the
+        // confidence is < 1% etc.
+      }
+      print("Differences on ${c.name} (${uriString}): "
+          "$listOfInstanceCounts ($ttestResult)");
+      foundLeak = true;
+    }
+
+    print("\n\n");
+
+    if (foundLeak) {
+      print("Possible leak(s) found.");
+      print("(Note that this doesn't guarantee that there are any!)");
+      exitCode = 1;
+    } else {
+      print("Didn't identify any leaks.");
+      print("(Note that this doesn't guarantee that there are none!)");
+      exitCode = 0;
+    }
+  }
+
+  Future<void> runInternal(
+      vmService.IsolateRef isolateRef,
+      Map<vmService.ClassRef, vmService.Class> classInfo,
+      Map<vmService.ClassRef, List<int>> instanceCounts,
+      bool Function(int iteration) shouldBail) async {
+    int iterationNumber = 1;
+    try {
+      while (true) {
+        if (shouldBail(iterationNumber)) break;
+        if (!await waitUntilPaused(isolateRef.id)) break;
+        print("\n\n====================\n\nIteration #$iterationNumber");
+        iterationNumber++;
+        vmService.AllocationProfile allocationProfile =
+            await forceGC(isolateRef.id);
+        for (vmService.ClassHeapStats member in allocationProfile.members) {
+          if (!classInfo.containsKey(member.classRef)) {
+            vmService.Class c = await serviceClient.getObject(
+                isolateRef.id, member.classRef.id);
+            classInfo[member.classRef] = c;
+          }
+          List<int> listOfInstanceCounts = instanceCounts[member.classRef];
+          if (listOfInstanceCounts == null) {
+            listOfInstanceCounts = instanceCounts[member.classRef] = <int>[];
+          }
+          while (listOfInstanceCounts.length < iterationNumber - 2) {
+            listOfInstanceCounts.add(0);
+          }
+          listOfInstanceCounts.add(member.instancesCurrent);
+          if (listOfInstanceCounts.length != iterationNumber - 1) {
+            throw "Unexpected length";
+          }
+        }
+        await serviceClient.resume(isolateRef.id);
+      }
+    } catch (e) {
+      print("Got error: $e");
+    }
+  }
+
+  Completer<String> cProcessExited = new Completer();
+  @override
+  void processExited(int exitCode) {
+    cProcessExited.complete("Exit");
+  }
+
+  bool ignoredClass(vmService.Class classDetails) {
+    String uriString = classDetails.location?.script?.uri;
+    if (uriString == null) return true;
+    if (uriString.startsWith("package:front_end/")) {
+      // Classes used for lazy initialization will naturally fluctuate.
+      if (classDetails.name == "DillClassBuilder") return true;
+      if (classDetails.name == "DillExtensionBuilder") return true;
+      if (classDetails.name == "DillExtensionMemberBuilder") return true;
+      if (classDetails.name == "DillMemberBuilder") return true;
+      if (classDetails.name == "DillTypeAliasBuilder") return true;
+
+      // These classes have proved to fluctuate, although the reason is less
+      // clear.
+      if (classDetails.name == "InheritedImplementationInterfaceConflict") {
+        return true;
+      }
+      if (classDetails.name == "AbstractMemberOverridingImplementation") {
+        return true;
+      }
+      if (classDetails.name == "VoidTypeBuilder") return true;
+      if (classDetails.name == "NamedTypeBuilder") return true;
+      if (classDetails.name == "DillClassMember") return true;
+      if (classDetails.name == "Scope") return true;
+      if (classDetails.name == "ConstructorScope") return true;
+      if (classDetails.name == "ScopeBuilder") return true;
+      if (classDetails.name == "ConstructorScopeBuilder") return true;
+      if (classDetails.name == "NullTypeDeclarationBuilder") return true;
+      if (classDetails.name == "NullabilityBuilder") return true;
+
+      return false;
+    } else if (uriString.startsWith("package:kernel/")) {
+      // DirtifyingList is used for lazy stuff and naturally change in numbers.
+      if (classDetails.name == "DirtifyingList") return true;
+
+      // Constants are canonicalized in their compilation run and will thus
+      // naturally increase, e.g. we can get 2 more booleans every time (up to
+      // a maximum of 2 per library or however many would have been there if we
+      // didn't canonicalize at all).
+      if (classDetails.name.endsWith("Constant")) return true;
+
+      // These classes have proved to fluctuate, although the reason is less
+      // clear.
+      if (classDetails.name == "InterfaceType") return true;
+
+      return false;
+    }
+    return true;
+  }
+
+  // I have commented out the lazy ones below.
+  Set<String> frontEndStrictClasses = {
+    // "DillClassBuilder",
+    // "DillExtensionBuilder",
+    // "DillExtensionMemberBuilder",
+    "DillLibraryBuilder",
+    "DillLoader",
+    // "DillMemberBuilder",
+    "DillTarget",
+    // "DillTypeAliasBuilder",
+    "SourceClassBuilder",
+    "SourceExtensionBuilder",
+    "SourceLibraryBuilder",
+    "SourceLoader",
+  };
+
+  Set<String> kernelAstStrictClasses = {
+    "Class",
+    "Constructor",
+    "Extension",
+    "Field",
+    "Library",
+    "Procedure",
+    "RedirectingFactory",
+    "Typedef",
+  };
+
+  bool strictClass(vmService.Class classDetails) {
+    if (!kernelAstStrictClasses.contains(classDetails.name) &&
+        !frontEndStrictClasses.contains(classDetails.name)) return false;
+
+    if (kernelAstStrictClasses.contains(classDetails.name) &&
+        classDetails.location?.script?.uri == "package:kernel/ast.dart") {
+      return true;
+    }
+    if (frontEndStrictClasses.contains(classDetails.name) &&
+        classDetails.location?.script?.uri?.startsWith("package:front_end/") ==
+            true) {
+      return true;
+    }
+
+    throw "$classDetails: ${classDetails.name} --- ${classDetails.location}";
+  }
+}
diff --git a/pkg/front_end/test/incremental_dart2js_load_from_dill_test.dart b/pkg/front_end/test/incremental_dart2js_load_from_dill_test.dart
index d335bf9..f4b0342 100644
--- a/pkg/front_end/test/incremental_dart2js_load_from_dill_test.dart
+++ b/pkg/front_end/test/incremental_dart2js_load_from_dill_test.dart
@@ -22,7 +22,7 @@
 
 Directory outDir;
 
-void main() async {
+Future<void> main() async {
   outDir =
       Directory.systemTemp.createTempSync("incremental_load_from_dill_test");
   try {
diff --git a/pkg/front_end/test/incremental_dart2js_test.dart b/pkg/front_end/test/incremental_dart2js_test.dart
index be9f6f5..3a36586 100644
--- a/pkg/front_end/test/incremental_dart2js_test.dart
+++ b/pkg/front_end/test/incremental_dart2js_test.dart
@@ -6,7 +6,7 @@
 
 import "incremental_dart2js_tester.dart";
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   bool fast = true;
   bool useExperimentalInvalidation = true;
   bool addDebugBreaks = false;
diff --git a/pkg/front_end/test/incremental_dart2js_tester.dart b/pkg/front_end/test/incremental_dart2js_tester.dart
index 8837c39..3428af3 100644
--- a/pkg/front_end/test/incremental_dart2js_tester.dart
+++ b/pkg/front_end/test/incremental_dart2js_tester.dart
@@ -18,7 +18,7 @@
 
 import "incremental_utils.dart" as util;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   bool fast = false;
   bool useExperimentalInvalidation = false;
   bool addDebugBreaks = false;
@@ -59,7 +59,7 @@
   Dart2jsTester(this.useExperimentalInvalidation, this.fast,
       this.addDebugBreaks, this.limit);
 
-  void test() async {
+  Future<void> test() async {
     helper.TestIncrementalCompiler compiler = await setup();
     if (addDebugBreaks) {
       debugger();
diff --git a/pkg/front_end/test/incremental_flutter_tester.dart b/pkg/front_end/test/incremental_flutter_tester.dart
index 5ebaf9a..3663d30 100644
--- a/pkg/front_end/test/incremental_flutter_tester.dart
+++ b/pkg/front_end/test/incremental_flutter_tester.dart
@@ -46,7 +46,7 @@
   exit(1);
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   bool fast = false;
   bool useExperimentalInvalidation = false;
   File inputFile;
diff --git a/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart b/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
index 5fd461d..ac40f6e 100644
--- a/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_invalid_dill_test.dart
@@ -73,7 +73,7 @@
   CompilerOptions options;
   IncrementalCompiler compiler;
 
-  void compileExpectInitializeFailAndSpecificWarning(
+  Future<void> compileExpectInitializeFailAndSpecificWarning(
       Code expectedWarningCode, bool writeFileOnCrashReport) async {
     errorMessages.clear();
     warningMessages.clear();
diff --git a/pkg/front_end/test/incremental_suite.dart b/pkg/front_end/test/incremental_suite.dart
index 51801fd..30745c3 100644
--- a/pkg/front_end/test/incremental_suite.dart
+++ b/pkg/front_end/test/incremental_suite.dart
@@ -26,7 +26,7 @@
     show ExperimentalFlag, experimentEnabledVersion;
 
 import "package:front_end/src/api_prototype/memory_file_system.dart"
-    show MemoryFileSystem;
+    show MemoryFileSystem, MemoryFileSystemEntity;
 
 import 'package:front_end/src/base/nnbd_mode.dart' show NnbdMode;
 
@@ -124,13 +124,13 @@
     const Expectation.fail("InitializedFromDillMismatch");
 const Expectation NNBDModeMismatch = const Expectation.fail("NNBDModeMismatch");
 
-Future<Context> createContext(
-    Chain suite, Map<String, String> environment) async {
+Future<Context> createContext(Chain suite, Map<String, String> environment) {
   // Disable colors to ensure that expectation files are the same across
   // platforms and independent of stdin/stderr.
   colors.enableColors = false;
-  return new Context(environment["updateExpectations"] == "true",
-      environment["addDebugBreaks"] == "true");
+  return new Future.value(new Context(
+      environment["updateExpectations"] == "true",
+      environment["addDebugBreaks"] == "true"));
 }
 
 class Context extends ChainContext {
@@ -299,12 +299,16 @@
   checkIsEqual(normalDillData, initializedDillData);
 }
 
-Future<Map<String, List<int>>> createModules(Map module,
-    final List<int> sdkSummaryData, Target target, String sdkSummary) async {
+Future<Map<String, List<int>>> createModules(
+    Map module,
+    final List<int> sdkSummaryData,
+    Target target,
+    Target originalTarget,
+    String sdkSummary) async {
   final Uri base = Uri.parse("org-dartlang-test:///");
   final Uri sdkSummaryUri = base.resolve(sdkSummary);
 
-  MemoryFileSystem fs = new MemoryFileSystem(base);
+  TestMemoryFileSystem fs = new TestMemoryFileSystem(base);
   fs.entityForUri(sdkSummaryUri).writeAsBytesSync(sdkSummaryData);
 
   // Setup all sources
@@ -332,6 +336,10 @@
         moduleSources.add(uri);
       }
     }
+    bool outlineOnly = false;
+    if (originalTarget is DevCompilerTarget) {
+      outlineOnly = true;
+    }
     CompilerOptions options =
         getOptions(target: target, sdkSummary: sdkSummary);
     options.fileSystem = fs;
@@ -345,8 +353,8 @@
     if (packagesUri != null) {
       options.packagesFileUri = packagesUri;
     }
-    TestIncrementalCompiler compiler =
-        new TestIncrementalCompiler(options, moduleSources.first, null);
+    TestIncrementalCompiler compiler = new TestIncrementalCompiler(
+        options, moduleSources.first, /* initializeFrom = */ null, outlineOnly);
     Component c = await compiler.computeDelta(entryPoints: moduleSources);
     c.computeCanonicalNames();
     List<Library> wantedLibs = <Library>[];
@@ -416,6 +424,7 @@
         throw "Unknown target name '$targetName'";
       }
     }
+    Target originalTarget = target;
     target = new TestTargetWrapper(target, targetFlags);
 
     String sdkSummary = computePlatformDillName(
@@ -442,8 +451,8 @@
     Map<String, Component>? moduleComponents;
 
     if (modules != null) {
-      moduleData =
-          await createModules(modules, sdkSummaryData, target, sdkSummary);
+      moduleData = await createModules(
+          modules, sdkSummaryData, target, originalTarget, sdkSummary);
       sdk = newestWholeComponent = new Component();
       new BinaryBuilder(sdkSummaryData,
               filename: null, disableLazyReading: false)
@@ -499,7 +508,7 @@
       }
 
       if (brandNewWorld) {
-        fs = new MemoryFileSystem(base);
+        fs = new TestMemoryFileSystem(base);
       }
       fs!.entityForUri(sdkSummaryUri).writeAsBytesSync(sdkSummaryData);
       bool expectInitializeFromDill = false;
@@ -1961,9 +1970,12 @@
     Name fieldName = new Name("unique_SimulateTransformer");
     Field field = new Field.immutable(fieldName,
         isFinal: true,
-        getterReference: lib.reference.canonicalName
+        fieldReference: lib.reference.canonicalName
             ?.getChildFromFieldWithName(fieldName)
             .reference,
+        getterReference: lib.reference.canonicalName
+            ?.getChildFromFieldGetterWithName(fieldName)
+            .reference,
         fileUri: lib.fileUri);
     lib.addField(field);
     for (Class c in lib.classes) {
@@ -1974,11 +1986,30 @@
       fieldName = new Name("unique_SimulateTransformer");
       field = new Field.immutable(fieldName,
           isFinal: true,
-          getterReference: c.reference.canonicalName
+          fieldReference: lib.reference.canonicalName
               ?.getChildFromFieldWithName(fieldName)
               .reference,
+          getterReference: c.reference.canonicalName
+              ?.getChildFromFieldGetterWithName(fieldName)
+              .reference,
           fileUri: c.fileUri);
       c.addField(field);
     }
   }
 }
+
+class TestMemoryFileSystem extends MemoryFileSystem {
+  TestMemoryFileSystem(Uri currentDirectory) : super(currentDirectory);
+
+  @override
+  MemoryFileSystemEntity entityForUri(Uri uri) {
+    // Try to "sanitize" the uri as a real file system does, namely
+    // "a/b.dart" and "a//b.dart" returns the same file.
+    if (uri.pathSegments.contains("")) {
+      Uri newUri = uri.replace(
+          pathSegments: uri.pathSegments.where((element) => element != ""));
+      return super.entityForUri(newUri);
+    }
+    return super.entityForUri(uri);
+  }
+}
diff --git a/pkg/front_end/test/issue_34856_test.dart b/pkg/front_end/test/issue_34856_test.dart
index d291270..a82d5c5 100644
--- a/pkg/front_end/test/issue_34856_test.dart
+++ b/pkg/front_end/test/issue_34856_test.dart
@@ -30,6 +30,7 @@
 import 'package:front_end/src/fasta/kernel/verifier.dart' show verifyComponent;
 
 import 'package:kernel/ast.dart' show Component;
+import 'package:kernel/target/targets.dart';
 
 const Map<String, String> files = const <String, String>{
   "repro.dart": """
@@ -88,7 +89,8 @@
   options = new CompilerOptions()
     ..fileSystem = fs
     ..additionalDills = <Uri>[base.resolve("lib.dart.dill")]
-    ..sdkSummary = platformDill;
+    ..sdkSummary = platformDill
+    ..target = new NoneTarget(new TargetFlags());
 
   List<Uri> inputs = <Uri>[base.resolve("repro.dart")];
 
diff --git a/pkg/front_end/test/language_versioning/language_versioning_test.dart b/pkg/front_end/test/language_versioning/language_versioning_test.dart
index c1a9f1c..359c265 100644
--- a/pkg/front_end/test/language_versioning/language_versioning_test.dart
+++ b/pkg/front_end/test/language_versioning/language_versioning_test.dart
@@ -26,7 +26,7 @@
 
 import 'package:kernel/ast.dart' show Component, Library, Version;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   // Fix default/max major and minor version so we can test it.
   // This config sets it to 2.8.
   TestConfigWithLanguageVersion cfeConfig =
diff --git a/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart b/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
index 09ddce5..89c3833 100644
--- a/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
+++ b/pkg/front_end/test/language_versioning/language_versioning_up_to_date_git_test.dart
@@ -16,7 +16,7 @@
 
 String get dartVm => Platform.executable;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   ProcessResult result = await Process.run(
       "python3", ["tools/make_version.py", "--no_git", "-q"],
       workingDirectory: repoDir);
diff --git a/pkg/front_end/test/lint_suite.dart b/pkg/front_end/test/lint_suite.dart
index 8e11c97..af61e9a 100644
--- a/pkg/front_end/test/lint_suite.dart
+++ b/pkg/front_end/test/lint_suite.dart
@@ -15,8 +15,6 @@
 
 import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token;
 
-import 'package:_fe_analyzer_shared/src/scanner/token.dart';
-
 import 'package:_fe_analyzer_shared/src/scanner/utf8_bytes_scanner.dart'
     show Utf8BytesScanner;
 
diff --git a/pkg/front_end/test/lint_test.status b/pkg/front_end/test/lint_test.status
index 83361a2..e7d04be 100644
--- a/pkg/front_end/test/lint_test.status
+++ b/pkg/front_end/test/lint_test.status
@@ -18,21 +18,7 @@
 front_end/lib/src/fasta/fasta_codes/Exports: Fail
 front_end/lib/src/fasta/incremental_compiler/ImportsTwice: Fail
 front_end/lib/src/fasta/kernel/body_builder/ImportsTwice: Fail
-front_end/lib/src/fasta/kernel/constant_evaluator/ExplicitType: Pass
-front_end/lib/src/fasta/kernel/kernel_api/Exports: Fail
-front_end/lib/src/fasta/kernel/kernel_ast_api/Exports: Fail
-front_end/lib/src/fasta/kernel/kernel_builder/Exports: Fail
-front_end/lib/src/fasta/kernel/type_algorithms/Exports: Fail
 front_end/lib/src/fasta/messages/Exports: Fail
-front_end/lib/src/fasta/parser/Exports: Fail
-front_end/lib/src/fasta/parser/parser/ImportsTwice: Fail
-front_end/lib/src/fasta/scanner/abstract_scanner/ImportsTwice: Fail
-front_end/lib/src/fasta/scanner/Exports: Fail
-front_end/lib/src/fasta/scanner/recover/ImportsTwice: Fail
-front_end/lib/src/fasta/scanner/string_scanner/ImportsTwice: Fail
-front_end/lib/src/fasta/scanner/token/ImportsTwice: Fail
-front_end/lib/src/fasta/scanner/utf8_bytes_scanner/ImportsTwice: Fail
-front_end/lib/src/fasta/source/scope_listener/Exports: Fail
 front_end/lib/src/fasta/source/value_kinds/ImportsTwice: Fail
 front_end/lib/src/testing/id_testing_helper/Exports: Fail
 kernel/lib/ast/Exports: Fail
diff --git a/pkg/front_end/test/memory_file_system_test.dart b/pkg/front_end/test/memory_file_system_test.dart
index c5a743f..5c20d45 100644
--- a/pkg/front_end/test/memory_file_system_test.dart
+++ b/pkg/front_end/test/memory_file_system_test.dart
@@ -41,20 +41,20 @@
     file = entityForPath(path);
   }
 
-  void test_createDirectory_doesNotExist() async {
+  Future<void> test_createDirectory_doesNotExist() async {
     file.createDirectory();
     expect(await file.exists(), true);
   }
 
-  void test_createDirectory_exists_asDirectory() async {
+  Future<void> test_createDirectory_exists_asDirectory() async {
     file.createDirectory();
     file.createDirectory();
     expect(await file.exists(), true);
   }
 
-  void test_createDirectory_exists_asFile() async {
+  Future<void> test_createDirectory_exists_asFile() async {
     file.writeAsStringSync('');
-    expect(() => file.createDirectory(), _throwsFileSystemException);
+    await expectLater(file.createDirectory, _throwsFileSystemException);
   }
 
   void test_equals_differentPaths() {
@@ -65,16 +65,16 @@
     expect(file == entityForPath(join(tempPath, 'file.txt')), isTrue);
   }
 
-  void test_exists_directory_exists() async {
+  Future<void> test_exists_directory_exists() async {
     file.createDirectory();
     expect(await file.exists(), true);
   }
 
-  void test_exists_doesNotExist() async {
+  Future<void> test_exists_doesNotExist() async {
     expect(await file.exists(), false);
   }
 
-  void test_exists_file_exists() async {
+  Future<void> test_exists_file_exists() async {
     file.writeAsStringSync('x');
     expect(await file.exists(), true);
   }
@@ -87,56 +87,57 @@
     expect(file.uri, context.toUri(path));
   }
 
-  void test_readAsBytes_badUtf8() async {
+  Future<void> test_readAsBytes_badUtf8() async {
     // A file containing invalid UTF-8 can still be read as raw bytes.
     List<int> bytes = [0xc0, 0x40]; // Invalid UTF-8
     file.writeAsBytesSync(bytes);
     expect(await file.readAsBytes(), bytes);
   }
 
-  void test_readAsBytes_doesNotExist() {
-    expect(file.readAsBytes(), _throwsFileSystemException);
+  Future<void> test_readAsBytes_doesNotExist() async {
+    await expectLater(file.readAsBytes, _throwsFileSystemException);
   }
 
-  void test_readAsBytes_exists() async {
+  Future<void> test_readAsBytes_exists() async {
     var s = 'contents';
     file.writeAsStringSync(s);
     expect(await file.readAsBytes(), utf8.encode(s));
   }
 
-  void test_readAsString_badUtf8() {
+  Future<void> test_readAsString_badUtf8() async {
     file.writeAsBytesSync([0xc0, 0x40]); // Invalid UTF-8
-    expect(file.readAsString(), _throwsFileSystemException);
+    await expectLater(file.readAsString, _throwsFileSystemException);
   }
 
-  void test_readAsString_doesNotExist() {
-    expect(file.readAsString(), _throwsFileSystemException);
+  Future<void> test_readAsString_doesNotExist() async {
+    await expectLater(file.readAsString, _throwsFileSystemException);
   }
 
-  void test_readAsString_exists() async {
+  Future<void> test_readAsString_exists() async {
     var s = 'contents';
     file.writeAsStringSync(s);
     expect(await file.readAsString(), s);
   }
 
-  void test_readAsString_utf8() async {
+  Future<void> test_readAsString_utf8() async {
     file.writeAsBytesSync([0xe2, 0x82, 0xac]); // Unicode € symbol, in UTF-8
     expect(await file.readAsString(), '\u20ac');
   }
 
-  void test_writeAsBytesSync_directory() async {
+  Future<void> test_writeAsBytesSync_directory() async {
     file.createDirectory();
-    expect(() => file.writeAsBytesSync([0]), _throwsFileSystemException);
+    await expectLater(
+        () => file.writeAsBytesSync([0]), _throwsFileSystemException);
   }
 
-  void test_writeAsBytesSync_modifyAfterRead() async {
+  Future<void> test_writeAsBytesSync_modifyAfterRead() async {
     // For efficiency we do not make defensive copies.
     file.writeAsBytesSync([1]);
     (await file.readAsBytes())[0] = 2;
     expect(await file.readAsBytes(), [2]);
   }
 
-  void test_writeAsBytesSync_modifyAfterWrite_Uint8List() async {
+  Future<void> test_writeAsBytesSync_modifyAfterWrite_Uint8List() async {
     // For efficiency we do not make defensive copies.
     var bytes = new Uint8List.fromList([1]);
     file.writeAsBytesSync(bytes);
@@ -144,7 +145,7 @@
     expect(await file.readAsBytes(), [2]);
   }
 
-  void test_writeAsBytesSync_modifyAfterWrite() async {
+  Future<void> test_writeAsBytesSync_modifyAfterWrite() async {
     // For efficiency we generally do not make defensive copies, but on the
     // other hrand we keep everything as `Uint8List`s internally, so in this
     // case a copy is actually made.
@@ -154,24 +155,25 @@
     expect(await file.readAsBytes(), [1]);
   }
 
-  void test_writeAsBytesSync_overwrite() async {
+  Future<void> test_writeAsBytesSync_overwrite() async {
     file.writeAsBytesSync([1]);
     file.writeAsBytesSync([2]);
     expect(await file.readAsBytes(), [2]);
   }
 
-  void test_writeAsStringSync_directory() async {
+  Future<void> test_writeAsStringSync_directory() async {
     file.createDirectory();
-    expect(() => file.writeAsStringSync(''), _throwsFileSystemException);
+    await expectLater(
+        () => file.writeAsStringSync(''), _throwsFileSystemException);
   }
 
-  void test_writeAsStringSync_overwrite() async {
+  Future<void> test_writeAsStringSync_overwrite() async {
     file.writeAsStringSync('first');
     file.writeAsStringSync('second');
     expect(await file.readAsString(), 'second');
   }
 
-  void test_writeAsStringSync_utf8() async {
+  Future<void> test_writeAsStringSync_utf8() async {
     file.writeAsStringSync('\u20ac'); // Unicode € symbol
     expect(await file.readAsBytes(), [0xe2, 0x82, 0xac]);
   }
@@ -221,7 +223,7 @@
         Uri.parse('$tempUri/file.txt'));
   }
 
-  void test_entityForUri_fileUri_relative() {
+  Future<void> test_entityForUri_fileUri_relative() async {
     // A weird quirk of the Uri class is that it doesn't seem possible to create
     // a `file:` uri with a relative path, no matter how many slashes you use or
     // if you populate the fields directly.  But just to be certain, try to do
@@ -234,7 +236,7 @@
       Uri.parse('file:///file.txt')
     ]) {
       if (!uri.path.startsWith('/')) {
-        expect(() => fileSystem.entityForUri(uri),
+        await expectLater(() => fileSystem.entityForUri(uri),
             throwsA(const TypeMatcher<Error>()));
       }
     }
diff --git a/pkg/front_end/test/multiple_simultaneous_compiles_test.dart b/pkg/front_end/test/multiple_simultaneous_compiles_test.dart
index e09aae3..df42515 100644
--- a/pkg/front_end/test/multiple_simultaneous_compiles_test.dart
+++ b/pkg/front_end/test/multiple_simultaneous_compiles_test.dart
@@ -18,7 +18,7 @@
 
 import 'incremental_suite.dart' show getOptions;
 
-void main() async {
+Future<void> main() async {
   Uri compileTarget = Platform.script.resolve("binary_md_dill_reader.dart");
   if (!(new File.fromUri(compileTarget)).existsSync()) {
     throw "$compileTarget doesn't exist";
diff --git a/pkg/front_end/test/parser_test_listener.dart b/pkg/front_end/test/parser_test_listener.dart
index 1a797be..4d45463 100644
--- a/pkg/front_end/test/parser_test_listener.dart
+++ b/pkg/front_end/test/parser_test_listener.dart
@@ -223,6 +223,18 @@
   }
 
   @override
+  void handleExtensionShowHide(Token? showKeyword, int showElementCount,
+      Token? hideKeyword, int hideElementCount) {
+    seen(showKeyword);
+    seen(hideKeyword);
+    doPrint('handleExtensionShowHide('
+        '$showKeyword, '
+        '$showElementCount, '
+        '$hideKeyword, '
+        '$hideElementCount)');
+  }
+
+  @override
   void handleClassHeader(Token begin, Token classKeyword, Token? nativeToken) {
     seen(begin);
     seen(classKeyword);
@@ -300,16 +312,20 @@
 
   @override
   void endExtensionDeclaration(Token extensionKeyword, Token? typeKeyword,
-      Token onKeyword, Token endToken) {
+      Token onKeyword, Token? showKeyword, Token? hideKeyword, Token endToken) {
     indent--;
     seen(extensionKeyword);
     seen(typeKeyword);
     seen(onKeyword);
+    seen(showKeyword);
+    seen(hideKeyword);
     seen(endToken);
     doPrint('endExtensionDeclaration('
         '$extensionKeyword, '
         '$typeKeyword, '
         '$onKeyword, '
+        '$showKeyword, '
+        '$hideKeyword, '
         '$endToken)');
   }
 
@@ -2084,6 +2100,13 @@
   }
 
   @override
+  void handleShowHideIdentifier(Token? modifier, Token identifier) {
+    seen(modifier);
+    seen(identifier);
+    doPrint('handleShowHideIdentifier(' '$modifier, ' '$identifier)');
+  }
+
+  @override
   void handleIndexedExpression(
       Token? question, Token openSquareBracket, Token closeSquareBracket) {
     seen(question);
diff --git a/pkg/front_end/test/patching/patching_test.dart b/pkg/front_end/test/patching/patching_test.dart
index 8ad7d4e..9b7d6d9 100644
--- a/pkg/front_end/test/patching/patching_test.dart
+++ b/pkg/front_end/test/patching/patching_test.dart
@@ -19,7 +19,7 @@
 import 'package:front_end/src/testing/id_testing_utils.dart';
 import 'package:kernel/ast.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<Features>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/predicates/predicate_test.dart b/pkg/front_end/test/predicates/predicate_test.dart
index 98ed0cb..ec7b50d 100644
--- a/pkg/front_end/test/predicates/predicate_test.dart
+++ b/pkg/front_end/test/predicates/predicate_test.dart
@@ -8,7 +8,6 @@
 import 'package:_fe_analyzer_shared/src/testing/id.dart';
 import 'package:_fe_analyzer_shared/src/testing/id_testing.dart'
     show DataInterpreter, runTests;
-import 'package:_fe_analyzer_shared/src/testing/id_testing.dart';
 import 'package:_fe_analyzer_shared/src/testing/features.dart';
 import 'package:front_end/src/api_prototype/experimental_flags.dart';
 import 'package:front_end/src/base/nnbd_mode.dart';
@@ -23,7 +22,7 @@
 const String isNullMarker = 'is-null';
 const String sentinelMarker = 'sentinel';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<Features>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/read_dill_from_binary_md_git_test.dart b/pkg/front_end/test/read_dill_from_binary_md_git_test.dart
index 7d2da16..ec6277b 100644
--- a/pkg/front_end/test/read_dill_from_binary_md_git_test.dart
+++ b/pkg/front_end/test/read_dill_from_binary_md_git_test.dart
@@ -14,7 +14,7 @@
 
 import 'utils/io_utils.dart' show computeRepoDir;
 
-void main() async {
+Future<void> main() async {
   await testDart2jsCompile();
 }
 
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index fe6e872..69249ea 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -501,6 +501,7 @@
 gen
 generation
 getable
+getable
 getables
 gets
 getter1a
@@ -934,6 +935,7 @@
 printer
 printf
 println
+prioritization
 proc
 producers
 product
@@ -959,6 +961,7 @@
 quick
 quiver
 quoted
+qux
 r
 r'$creation
 r'\f
@@ -1110,6 +1113,7 @@
 service
 session
 setable
+setable
 setables
 setaf
 sh
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index 73be42a..dd9f732 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -1539,6 +1539,7 @@
 inout
 input
 inputs
+inscrutable
 insert
 inserted
 inserting
@@ -3156,6 +3157,7 @@
 unaliased
 unaliasing
 unambiguous
+unambiguously
 unary
 unassignable
 unassigned
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 398070d..82edba1 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -825,6 +825,7 @@
 runtimes
 rv
 sandboxed
+sanitize
 saves
 scans
 scheduler
@@ -926,6 +927,7 @@
 timer
 timings
 tinv
+tk
 told
 touch
 tpt
diff --git a/pkg/front_end/test/split_dill_test.dart b/pkg/front_end/test/split_dill_test.dart
index f4ebb71..16484f2 100644
--- a/pkg/front_end/test/split_dill_test.dart
+++ b/pkg/front_end/test/split_dill_test.dart
@@ -22,7 +22,7 @@
 
 import 'utils/io_utils.dart' show computeRepoDir;
 
-void main() async {
+Future<void> main() async {
   final Uri dart2jsUrl = Uri.base.resolve("pkg/compiler/bin/dart2js.dart");
   Stopwatch stopwatch = new Stopwatch()..start();
   Component component = await normalCompileToComponent(dart2jsUrl,
diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart
index 529e56b..b771f32 100644
--- a/pkg/front_end/test/src/base/processed_options_test.dart
+++ b/pkg/front_end/test/src/base/processed_options_test.dart
@@ -77,7 +77,7 @@
     expect(processed.fileSystem, same(fileSystem));
   }
 
-  void test_getSdkSummaryBytes_summaryLocationProvided() async {
+  Future<void> test_getSdkSummaryBytes_summaryLocationProvided() async {
     var uri = Uri.parse('org-dartlang-test:///sdkSummary');
 
     writeMockSummaryTo(uri);
@@ -95,7 +95,7 @@
         mockSummary.libraries.single.importUri);
   }
 
-  void test_getSdkSummary_summaryLocationProvided() async {
+  Future<void> test_getSdkSummary_summaryLocationProvided() async {
     var uri = Uri.parse('org-dartlang-test:///sdkSummary');
     writeMockSummaryTo(uri);
     await checkMockSummary(new CompilerOptions()
@@ -116,7 +116,7 @@
         mockSummary.libraries.single.importUri);
   }
 
-  void test_getUriTranslator_explicitLibrariesSpec() async {
+  Future<void> test_getUriTranslator_explicitLibrariesSpec() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
         .writeAsStringSync('');
@@ -134,7 +134,7 @@
         '/bar.dart');
   }
 
-  void test_getUriTranslator_inferredLibrariesSpec() async {
+  Future<void> test_getUriTranslator_inferredLibrariesSpec() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
         .writeAsStringSync('');
@@ -153,7 +153,7 @@
         '/mysdk/lib/bar.dart');
   }
 
-  void test_getUriTranslator_notInferredLibrariesSpec() async {
+  Future<void> test_getUriTranslator_notInferredLibrariesSpec() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
         .writeAsStringSync('');
@@ -178,7 +178,7 @@
     expect(packages.resolve(input), expected);
   }
 
-  void test_getUriTranslator_explicitPackagesFile() async {
+  Future<void> test_getUriTranslator_explicitPackagesFile() async {
     // This .packages file should be ignored.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
@@ -195,7 +195,8 @@
     checkPackageExpansion('foo', 'baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_explicitPackagesFile_withBaseLocation() async {
+  Future<void>
+      test_getUriTranslator_explicitPackagesFile_withBaseLocation() async {
     // This .packages file should be ignored.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
@@ -214,7 +215,7 @@
     checkPackageExpansion('foo', 'base/location/baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_implicitPackagesFile_ambiguous() async {
+  Future<void> test_getUriTranslator_implicitPackagesFile_ambiguous() async {
     // This .packages file should be ignored.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///.packages'))
@@ -231,7 +232,7 @@
     checkPackageExpansion('foo', 'baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_implicitPackagesFile_nextToScript() async {
+  Future<void> test_getUriTranslator_implicitPackagesFile_nextToScript() async {
     // Create the base directory.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///base/location/'))
@@ -256,7 +257,7 @@
     checkPackageExpansion('foo', 'base/location/baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_implicitPackagesFile_searchAbove() async {
+  Future<void> test_getUriTranslator_implicitPackagesFile_searchAbove() async {
     // Create the base directory.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///base/location/'))
@@ -277,7 +278,8 @@
     checkPackageExpansion('foo', 'base/baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_implicitPackagesFile_packagesDirectory() async {
+  Future<void>
+      test_getUriTranslator_implicitPackagesFile_packagesDirectory() async {
     // Create the base directory.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///base/location/'))
@@ -302,7 +304,7 @@
     checkPackageExpansion('foo', 'base/baz', uriTranslator.packages);
   }
 
-  void test_getUriTranslator_implicitPackagesFile_noPackages() async {
+  Future<void> test_getUriTranslator_implicitPackagesFile_noPackages() async {
     // Create the base directory.
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///base/location/'))
@@ -320,7 +322,7 @@
     expect(uriTranslator.packages.packages, isEmpty);
   }
 
-  void test_getUriTranslator_noPackages() async {
+  Future<void> test_getUriTranslator_noPackages() async {
     var errors = [];
     // .packages file should be ignored.
     fileSystem
@@ -337,7 +339,7 @@
         startsWith(_stringPrefixOf(templateCantReadFile)));
   }
 
-  void test_validateOptions_noInputs() async {
+  Future<void> test_validateOptions_noInputs() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
         .writeAsStringSync('main(){}\n');
@@ -351,7 +353,7 @@
     expect(result, isFalse);
   }
 
-  void test_validateOptions_input_doesnt_exist() async {
+  Future<void> test_validateOptions_input_doesnt_exist() async {
     var errors = [];
     var raw = new CompilerOptions()
       ..fileSystem = fileSystem
@@ -363,7 +365,7 @@
     expect(result, isTrue);
   }
 
-  void test_validateOptions_root_exists() async {
+  Future<void> test_validateOptions_root_exists() async {
     var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root/');
     fileSystem
         // Note: this test is a bit hackish because the memory file system
@@ -390,7 +392,7 @@
     expect(result, isTrue);
   }
 
-  void test_validateOptions_root_doesnt_exists() async {
+  Future<void> test_validateOptions_root_doesnt_exists() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
         .writeAsStringSync('main(){}\n');
@@ -407,7 +409,7 @@
         startsWith(_stringPrefixOf(templateSdkRootNotFound)));
   }
 
-  void test_validateOptions_summary_exists() async {
+  Future<void> test_validateOptions_summary_exists() async {
     var sdkSummary = Uri.parse('org-dartlang-test:///sdk/root/outline.dill');
     fileSystem.entityForUri(sdkSummary).writeAsStringSync('\n');
     fileSystem
@@ -426,7 +428,7 @@
     expect(result, isTrue);
   }
 
-  void test_validateOptions_summary_doesnt_exists() async {
+  Future<void> test_validateOptions_summary_doesnt_exists() async {
     fileSystem
         .entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
         .writeAsStringSync('main(){}\n');
@@ -443,7 +445,7 @@
         startsWith(_stringPrefixOf(templateSdkSummaryNotFound)));
   }
 
-  void test_validateOptions_inferred_summary_exists() async {
+  Future<void> test_validateOptions_inferred_summary_exists() async {
     var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root/');
     var sdkSummary =
         Uri.parse('org-dartlang-test:///sdk/root/vm_platform_strong.dill');
@@ -465,7 +467,7 @@
     expect(result, isTrue);
   }
 
-  void test_validateOptions_inferred_summary_doesnt_exists() async {
+  Future<void> test_validateOptions_inferred_summary_doesnt_exists() async {
     var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root/');
     var sdkSummary = Uri.parse('org-dartlang-test:///sdk/root/outline.dill');
     fileSystem.entityForUri(sdkRoot).writeAsStringSync('\n');
diff --git a/pkg/front_end/test/standard_file_system_test.dart b/pkg/front_end/test/standard_file_system_test.dart
index dce6675..c22913c 100644
--- a/pkg/front_end/test/standard_file_system_test.dart
+++ b/pkg/front_end/test/standard_file_system_test.dart
@@ -49,18 +49,18 @@
     expect(dir == entityForPath(p.join(tempPath, 'dir')), isTrue);
   }
 
-  void test_exists_directoryExists() async {
+  Future<void> test_exists_directoryExists() async {
     await new io.Directory(path).create();
     expect(await dir.exists(), isTrue);
   }
 
-  void test_exists_doesNotExist() async {
+  Future<void> test_exists_doesNotExist() async {
     expect(await dir.exists(), isFalse);
   }
 
-  void test_readAsBytes() async {
+  Future<void> test_readAsBytes() async {
     await new io.Directory(path).create();
-    expect(dir.readAsBytes(), _throwsFileSystemException);
+    await expectLater(dir.readAsBytes, _throwsFileSystemException);
   }
 
   void test_uri() {
@@ -88,11 +88,11 @@
     expect(file == entityForPath(p.join(tempPath, 'file.txt')), isTrue);
   }
 
-  void test_exists_doesNotExist() async {
+  Future<void> test_exists_doesNotExist() async {
     expect(await file.exists(), isFalse);
   }
 
-  void test_exists_fileExists() async {
+  Future<void> test_exists_fileExists() async {
     new io.File(path).writeAsStringSync('contents');
     expect(await file.exists(), isTrue);
   }
@@ -101,39 +101,39 @@
     expect(file.hashCode, entityForPath(p.join(tempPath, 'file.txt')).hashCode);
   }
 
-  void test_readAsBytes_badUtf8() async {
+  Future<void> test_readAsBytes_badUtf8() async {
     // A file containing invalid UTF-8 can still be read as raw bytes.
     List<int> bytes = [0xc0, 0x40]; // Invalid UTF-8
     new io.File(path).writeAsBytesSync(bytes);
     expect(await file.readAsBytes(), bytes);
   }
 
-  void test_readAsBytes_doesNotExist() {
-    expect(file.readAsBytes(), _throwsFileSystemException);
+  Future<void> test_readAsBytes_doesNotExist() async {
+    await expectLater(file.readAsBytes, _throwsFileSystemException);
   }
 
-  void test_readAsBytes_exists() async {
+  Future<void> test_readAsBytes_exists() async {
     var s = 'contents';
     new io.File(path).writeAsStringSync(s);
     expect(await file.readAsBytes(), utf8.encode(s));
   }
 
-  void test_readAsString_badUtf8() {
+  Future<void> test_readAsString_badUtf8() async {
     new io.File(path).writeAsBytesSync([0xc0, 0x40]); // Invalid UTF-8
-    expect(file.readAsString(), _throwsFileSystemException);
+    await expectLater(file.readAsString, _throwsFileSystemException);
   }
 
-  void test_readAsString_doesNotExist() {
-    expect(file.readAsString(), _throwsFileSystemException);
+  Future<void> test_readAsString_doesNotExist() async {
+    await expectLater(file.readAsString, _throwsFileSystemException);
   }
 
-  void test_readAsString_exists() async {
+  Future<void> test_readAsString_exists() async {
     var s = 'contents';
     new io.File(path).writeAsStringSync(s);
     expect(await file.readAsString(), s);
   }
 
-  void test_readAsString_utf8() async {
+  Future<void> test_readAsString_utf8() async {
     var bytes = [0xe2, 0x82, 0xac]; // Unicode € symbol (in UTF-8)
     new io.File(path).writeAsBytesSync(bytes);
     expect(await file.readAsString(), '\u20ac');
@@ -206,8 +206,8 @@
     }
   }
 
-  void test_entityForUri_nonFileUri() {
-    expect(
+  Future<void> test_entityForUri_nonFileUri() async {
+    await expectLater(
         () => StandardFileSystem.instance
             .entityForUri(Uri.parse('package:foo/bar.dart')),
         _throwsFileSystemException);
@@ -242,7 +242,7 @@
     tempPath = tempDirectory.absolute.path;
   }
 
-  void tearDown() async {
+  Future<void> tearDown() async {
     try {
       tempDirectory.deleteSync(recursive: true);
     } on io.FileSystemException {
@@ -257,7 +257,7 @@
 
 @reflectiveTest
 class DataTest {
-  void test_Data_URIs() async {
+  Future<void> test_Data_URIs() async {
     String string = "<{[DART]}>";
     Uri string_uri = new Uri.dataFromString(string, base64: false);
     Uri string_uri_base64 = new Uri.dataFromString(string, base64: true);
diff --git a/pkg/front_end/test/static_types/analysis_helper.dart b/pkg/front_end/test/static_types/analysis_helper.dart
index 6b41b38..cdfdfcc 100644
--- a/pkg/front_end/test/static_types/analysis_helper.dart
+++ b/pkg/front_end/test/static_types/analysis_helper.dart
@@ -22,7 +22,7 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/type_environment.dart';
 
-void run(Uri entryPoint, String allowedListPath,
+Future<void> run(Uri entryPoint, String allowedListPath,
     {bool verbose = false,
     bool generate = false,
     bool analyzedUrisFilter(Uri uri)}) async {
diff --git a/pkg/front_end/test/static_types/cfe_dynamic_test.dart b/pkg/front_end/test/static_types/cfe_dynamic_test.dart
index cda9ff6..ff5e01c 100644
--- a/pkg/front_end/test/static_types/cfe_dynamic_test.dart
+++ b/pkg/front_end/test/static_types/cfe_dynamic_test.dart
@@ -21,7 +21,7 @@
   return false;
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   await run(Uri.base.resolve('pkg/front_end/tool/_fasta/compile.dart'),
       'pkg/front_end/test/static_types/cfe_allowed.json',
       analyzedUrisFilter: cfeOnly,
diff --git a/pkg/front_end/test/static_types/static_type_test.dart b/pkg/front_end/test/static_types/static_type_test.dart
index 7c2d21e..0f168be 100644
--- a/pkg/front_end/test/static_types/static_type_test.dart
+++ b/pkg/front_end/test/static_types/static_type_test.dart
@@ -12,7 +12,7 @@
 import 'package:kernel/ast.dart';
 import 'package:kernel/type_environment.dart';
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<String>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/test_generator_test.dart b/pkg/front_end/test/test_generator_test.dart
index f873a70..23c8f54 100644
--- a/pkg/front_end/test/test_generator_test.dart
+++ b/pkg/front_end/test/test_generator_test.dart
@@ -17,7 +17,7 @@
 
 import 'incremental_suite.dart' as helper;
 
-void main() async {
+Future<void> main() async {
   CompilerAndOptions compilerAndOptions = TestCompiler.initialize();
   TestCompiler compiler = compilerAndOptions.compiler;
   bool hasNewline = true;
diff --git a/pkg/front_end/test/text_representation/text_representation_test.dart b/pkg/front_end/test/text_representation/text_representation_test.dart
index ba24ec6..883ac09 100644
--- a/pkg/front_end/test/text_representation/text_representation_test.dart
+++ b/pkg/front_end/test/text_representation/text_representation_test.dart
@@ -64,7 +64,7 @@
   throw new UnsupportedError("Unexpected marker '${marker}'.");
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
   await runTests<String>(dataDir,
       args: args,
diff --git a/pkg/front_end/test/tool/reload.dart b/pkg/front_end/test/tool/reload.dart
index 7b783bc..40a94a5 100644
--- a/pkg/front_end/test/tool/reload.dart
+++ b/pkg/front_end/test/tool/reload.dart
@@ -107,7 +107,7 @@
 /// launched with `--observe` to enable the service protocol.
 ///
 // TODO(sigmund): provide flags to configure the vm-service port.
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   if (args.length == 0) {
     print('usage: reload <entry-uri>');
     return;
diff --git a/pkg/front_end/test/type_labeler_test.dart b/pkg/front_end/test/type_labeler_test.dart
index 8681a9f..ec09139 100644
--- a/pkg/front_end/test/type_labeler_test.dart
+++ b/pkg/front_end/test/type_labeler_test.dart
@@ -240,20 +240,20 @@
   check({symConst: "#foo", symLibConst: "#dart:core::bar"}, 0);
 
   Constant fooConst = new InstanceConstant(
-      fooClass.reference, [], {booField.getterReference: trueConst});
+      fooClass.reference, [], {booField.fieldReference: trueConst});
   check({fooConst: "Foo {boo: true}"}, 1);
 
   Constant foo2Const = new InstanceConstant(foo2Class.reference, [], {
-    nextField.getterReference: nullConst,
-    valueField.getterReference: intConst
+    nextField.fieldReference: nullConst,
+    valueField.fieldReference: intConst
   });
   check({foo2Const: "Foo {value: 2, next: null}"}, 1);
 
   Constant foo2nConst = new InstanceConstant(foo2Class.reference, [], {
-    valueField.getterReference: intConst,
-    nextField.getterReference: new InstanceConstant(foo2Class.reference, [], {
-      valueField.getterReference: intConst,
-      nextField.getterReference: nullConst
+    valueField.fieldReference: intConst,
+    nextField.fieldReference: new InstanceConstant(foo2Class.reference, [], {
+      valueField.fieldReference: intConst,
+      nextField.fieldReference: nullConst
     }),
   });
   check({foo2nConst: "Foo {value: 2, next: Foo {value: 2, next: null}}"}, 1);
@@ -261,7 +261,7 @@
   Constant bazFooFoo2Const = new InstanceConstant(
       bazClass.reference,
       [foo, foo2],
-      {xField.getterReference: fooConst, yField.getterReference: foo2Const});
+      {xField.fieldReference: fooConst, yField.fieldReference: foo2Const});
   check({
     bazFooFoo2Const: "Baz<Foo/*1*/, Foo/*2*/> "
         "{x: Foo/*1*/ {boo: true}, y: Foo/*2*/ {value: 2, next: null}}"
diff --git a/pkg/front_end/test/unit_test_suites_impl.dart b/pkg/front_end/test/unit_test_suites_impl.dart
index bd7f75f..3376bd2 100644
--- a/pkg/front_end/test/unit_test_suites_impl.dart
+++ b/pkg/front_end/test/unit_test_suites_impl.dart
@@ -495,7 +495,7 @@
   );
 }
 
-void runSuite(SuiteConfiguration configuration) async {
+Future<void> runSuite(SuiteConfiguration configuration) async {
   Suite suite = configuration.suite;
   String name = suite.prefix;
   String fullSuiteName = "$suiteNamePrefix/$name";
@@ -531,7 +531,7 @@
   await File.fromUri(uri).writeAsString(lines.map((line) => "$line\n").join());
 }
 
-void main([List<String> arguments = const <String>[]]) async {
+Future<void> main([List<String> arguments = const <String>[]]) async {
   Stopwatch totalRuntime = new Stopwatch()..start();
 
   List<String> results = [];
diff --git a/pkg/front_end/test/utils/kernel_chain.dart b/pkg/front_end/test/utils/kernel_chain.dart
index a7c055b..a8412e8 100644
--- a/pkg/front_end/test/utils/kernel_chain.dart
+++ b/pkg/front_end/test/utils/kernel_chain.dart
@@ -176,21 +176,21 @@
 
   @override
   Future<Result<ComponentResult>> run(
-      ComponentResult result, ChainContext context) async {
+      ComponentResult result, ChainContext context) {
     Component component = result.component;
     ErrorFormatter errorFormatter = new ErrorFormatter();
     NaiveTypeChecker checker =
         new NaiveTypeChecker(errorFormatter, component, ignoreSdk: true);
     checker.checkComponent(component);
     if (errorFormatter.numberOfFailures == 0) {
-      return pass(result);
+      return new Future.value(pass(result));
     } else {
       errorFormatter.failures.forEach(print);
       print('------- Found ${errorFormatter.numberOfFailures} errors -------');
-      return new Result<ComponentResult>(
+      return new Future.value(new Result<ComponentResult>(
           null,
           context.expectationSet["TypeCheckError"],
-          '${errorFormatter.numberOfFailures} type errors');
+          '${errorFormatter.numberOfFailures} type errors'));
     }
   }
 }
@@ -460,13 +460,13 @@
   String get name => "read .dill";
 
   @override
-  Future<Result<Uri>> run(Uri uri, _) async {
+  Future<Result<Uri>> run(Uri uri, _) {
     try {
       loadComponentFromBinary(uri.toFilePath());
     } catch (e, s) {
-      return fail(uri, e, s);
+      return new Future.value(fail(uri, e, s));
     }
-    return pass(uri);
+    return new Future.value(pass(uri));
   }
 }
 
diff --git a/pkg/front_end/test/utils/scanner_chain.dart b/pkg/front_end/test/utils/scanner_chain.dart
index c312851..e133fc1 100644
--- a/pkg/front_end/test/utils/scanner_chain.dart
+++ b/pkg/front_end/test/utils/scanner_chain.dart
@@ -48,7 +48,7 @@
   String get name => "scan";
 
   @override
-  Future<Result<ScannedFile>> run(ReadFile file, ChainContext context) async {
-    return pass(new ScannedFile(file, scan(file.bytes)));
+  Future<Result<ScannedFile>> run(ReadFile file, ChainContext context) {
+    return new Future.value(pass(new ScannedFile(file, scan(file.bytes))));
   }
 }
diff --git a/pkg/front_end/test/vm_service_coverage.dart b/pkg/front_end/test/vm_service_coverage.dart
index 31e61fe..0d4768a 100644
--- a/pkg/front_end/test/vm_service_coverage.dart
+++ b/pkg/front_end/test/vm_service_coverage.dart
@@ -8,7 +8,7 @@
 
 import 'vm_service_helper.dart' as vmService;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   CoverageHelper coverageHelper = new CoverageHelper();
 
   List<String> allArgs = <String>[];
@@ -19,7 +19,7 @@
   ]);
   allArgs.addAll(args);
 
-  coverageHelper.start(allArgs);
+  await coverageHelper.start(allArgs);
 }
 
 class CoverageHelper extends vmService.LaunchingVMServiceHelper {
diff --git a/pkg/front_end/test/vm_service_coverage_constant_evaluator.dart b/pkg/front_end/test/vm_service_coverage_constant_evaluator.dart
index 1fed414..56b167b 100644
--- a/pkg/front_end/test/vm_service_coverage_constant_evaluator.dart
+++ b/pkg/front_end/test/vm_service_coverage_constant_evaluator.dart
@@ -6,7 +6,7 @@
 
 import 'vm_service_coverage.dart' as helper;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   CoverageHelper coverageHelper = new CoverageHelper();
 
   List<String> allArgs = <String>[];
@@ -17,7 +17,7 @@
   ]);
   allArgs.addAll(args);
 
-  coverageHelper.start(allArgs);
+  await coverageHelper.start(allArgs);
 }
 
 class CoverageHelper extends helper.CoverageHelper {
diff --git a/pkg/front_end/test/vm_service_for_leak_detection.dart b/pkg/front_end/test/vm_service_for_leak_detection.dart
index bae1839..e5782a8 100644
--- a/pkg/front_end/test/vm_service_for_leak_detection.dart
+++ b/pkg/front_end/test/vm_service_for_leak_detection.dart
@@ -8,7 +8,7 @@
 
 import "vm_service_heap_helper.dart" as helper;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   List<helper.Interest> interests = <helper.Interest>[];
   interests.add(new helper.Interest(
     Uri.parse("package:front_end/src/fasta/source/source_library_builder.dart"),
@@ -45,7 +45,7 @@
   );
 
   if (args.length > 0 && args[0] == "--dart2js") {
-    heapHelper.start([
+    await heapHelper.start([
       "--enable-asserts",
       Platform.script.resolve("incremental_dart2js_tester.dart").toString(),
       "--addDebugBreaks",
@@ -53,13 +53,13 @@
       "--experimental",
     ]);
   } else if (args.length > 0 && args[0] == "--weekly") {
-    heapHelper.start([
+    await heapHelper.start([
       "--enable-asserts",
       Platform.script.resolve("incremental_suite.dart").toString(),
       "-DaddDebugBreaks=true",
     ]);
   } else {
-    heapHelper.start([
+    await heapHelper.start([
       "--enable-asserts",
       Platform.script.resolve("incremental_suite.dart").toString(),
       "-DaddDebugBreaks=true",
diff --git a/pkg/front_end/test/vm_service_heap_finder.dart b/pkg/front_end/test/vm_service_heap_finder.dart
index 13f18fc..a098317 100644
--- a/pkg/front_end/test/vm_service_heap_finder.dart
+++ b/pkg/front_end/test/vm_service_heap_finder.dart
@@ -15,7 +15,7 @@
   Foo(this.x, this.y);
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   String connectTo;
   String classToFind;
   String whatToDo;
diff --git a/pkg/front_end/test/vm_service_heap_helper.dart b/pkg/front_end/test/vm_service_heap_helper.dart
index d7bf8d0..ac5e8d9 100644
--- a/pkg/front_end/test/vm_service_heap_helper.dart
+++ b/pkg/front_end/test/vm_service_heap_helper.dart
@@ -50,7 +50,7 @@
     }
   }
 
-  void pause() async {
+  Future<void> pause() async {
     await serviceClient.pause(_isolateRef.id);
   }
 
diff --git a/pkg/front_end/test/vm_service_heap_helper_test.dart b/pkg/front_end/test/vm_service_heap_helper_test.dart
index 470e114..8a7df50 100644
--- a/pkg/front_end/test/vm_service_heap_helper_test.dart
+++ b/pkg/front_end/test/vm_service_heap_helper_test.dart
@@ -49,7 +49,7 @@
     throwOnPossibleLeak: false,
   );
 
-  heapHelper.start(
+  await heapHelper.start(
     [
       "--enable-asserts",
       Platform.script.toString(),
diff --git a/pkg/front_end/test/vm_service_helper.dart b/pkg/front_end/test/vm_service_helper.dart
index f5adc3f..c796b41 100644
--- a/pkg/front_end/test/vm_service_helper.dart
+++ b/pkg/front_end/test/vm_service_helper.dart
@@ -155,7 +155,7 @@
 
   bool _started = false;
 
-  void start(List<String> scriptAndArgs,
+  Future<void> start(List<String> scriptAndArgs,
       {void stdoutReceiver(String line),
       void stderrReceiver(String line)}) async {
     if (_started) throw "Already started";
diff --git a/pkg/front_end/test/weekly_tester.dart b/pkg/front_end/test/weekly_tester.dart
index 6cdd65a..2fe9bbf 100644
--- a/pkg/front_end/test/weekly_tester.dart
+++ b/pkg/front_end/test/weekly_tester.dart
@@ -6,7 +6,7 @@
 import 'dart:convert' show LineSplitter, utf8;
 import 'dart:io' show File, Platform, Process, exitCode;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   // General idea: Launch - in separate processes - whatever we want to run
   // concurrently, capturing the stdout and stderr, printing it with some
   // prepended identification.
diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.expect
index 4802fa3..a399067 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.strong.expect
@@ -4,7 +4,7 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Map<core::List<core::int?>, core::int> c = #C6;
+static const field core::Map<core::List<core::int?>, core::int> c = #C5;
 static method main() → dynamic {}
 
 constants  {
@@ -12,6 +12,5 @@
   #C2 = <core::int?>[]
   #C3 = 0
   #C4 = 1
-  #C5 = <dynamic>[#C1, #C3, #C2, #C4]
-  #C6 = core::_ImmutableMap<core::List<core::int?>, core::int> {_kvPairs:#C5}
+  #C5 = <core::List<core::int?>, core::int>{#C1:#C3, #C2:#C4)
 }
diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
index 4802fa3..a399067 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Map<core::List<core::int?>, core::int> c = #C6;
+static const field core::Map<core::List<core::int?>, core::int> c = #C5;
 static method main() → dynamic {}
 
 constants  {
@@ -12,6 +12,5 @@
   #C2 = <core::int?>[]
   #C3 = 0
   #C4 = 1
-  #C5 = <dynamic>[#C1, #C3, #C2, #C4]
-  #C6 = core::_ImmutableMap<core::List<core::int?>, core::int> {_kvPairs:#C5}
+  #C5 = <core::List<core::int?>, core::int>{#C1:#C3, #C2:#C4)
 }
diff --git a/pkg/front_end/testcases/agnostic/map.dart.weak.expect b/pkg/front_end/testcases/agnostic/map.dart.weak.expect
index 2104776..70e1f24 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.weak.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.weak.expect
@@ -4,7 +4,7 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Map<core::List<core::int?>, core::int> c = #C6;
+static const field core::Map<core::List<core::int?>, core::int> c = #C5;
 static method main() → dynamic {}
 
 constants  {
@@ -12,6 +12,5 @@
   #C2 = <core::int?>[]
   #C3 = 0
   #C4 = 1
-  #C5 = <dynamic>[#C1, #C3, #C2, #C4]
-  #C6 = core::_ImmutableMap<core::List<core::int?>*, core::int*> {_kvPairs:#C5}
+  #C5 = <core::List<core::int?>*, core::int*>{#C1:#C3, #C2:#C4)
 }
diff --git a/pkg/front_end/testcases/agnostic/map.dart.weak.outline.expect b/pkg/front_end/testcases/agnostic/map.dart.weak.outline.expect
index 9a50a62..8309821 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.weak.outline.expect
@@ -12,5 +12,5 @@
 Extra constant evaluation status:
 Evaluated: ListLiteral @ org-dartlang-testcase:///map.dart:5:16 -> ListConstant(const <int*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///map.dart:6:17 -> ListConstant(const <int?>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///map.dart:7:11 -> InstanceConstant(const _ImmutableMap<List<int?>*, int*>{_ImmutableMap._kvPairs: const <dynamic>[const <int*>[], 0, const <int?>[], 1]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///map.dart:7:11 -> MapConstant(const <List<int?>*, int*>{const <int*>[]: 0, const <int?>[]: 1})
 Extra constant evaluation: evaluated: 3, effectively constant: 3
diff --git a/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect b/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
index 2104776..70e1f24 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
@@ -4,7 +4,7 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Map<core::List<core::int?>, core::int> c = #C6;
+static const field core::Map<core::List<core::int?>, core::int> c = #C5;
 static method main() → dynamic {}
 
 constants  {
@@ -12,6 +12,5 @@
   #C2 = <core::int?>[]
   #C3 = 0
   #C4 = 1
-  #C5 = <dynamic>[#C1, #C3, #C2, #C4]
-  #C6 = core::_ImmutableMap<core::List<core::int?>*, core::int*> {_kvPairs:#C5}
+  #C5 = <core::List<core::int?>*, core::int*>{#C1:#C3, #C2:#C4)
 }
diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.expect
index 9da7c28..6113c8a 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.strong.expect
@@ -4,14 +4,11 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Set<core::List<core::int?>> c = #C6;
+static const field core::Set<core::List<core::int?>> c = #C3;
 static method main() → dynamic {}
 
 constants  {
   #C1 = <core::int>[]
   #C2 = <core::int?>[]
-  #C3 = null
-  #C4 = <dynamic>[#C1, #C3, #C2, #C3]
-  #C5 = core::_ImmutableMap<core::List<core::int?>, Null> {_kvPairs:#C4}
-  #C6 = col::_UnmodifiableSet<core::List<core::int?>> {_map:#C5}
+  #C3 = <core::List<core::int?>>{#C1, #C2}
 }
diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
index 9da7c28..6113c8a 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
@@ -4,14 +4,11 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Set<core::List<core::int?>> c = #C6;
+static const field core::Set<core::List<core::int?>> c = #C3;
 static method main() → dynamic {}
 
 constants  {
   #C1 = <core::int>[]
   #C2 = <core::int?>[]
-  #C3 = null
-  #C4 = <dynamic>[#C1, #C3, #C2, #C3]
-  #C5 = core::_ImmutableMap<core::List<core::int?>, Null> {_kvPairs:#C4}
-  #C6 = col::_UnmodifiableSet<core::List<core::int?>> {_map:#C5}
+  #C3 = <core::List<core::int?>>{#C1, #C2}
 }
diff --git a/pkg/front_end/testcases/agnostic/set.dart.weak.expect b/pkg/front_end/testcases/agnostic/set.dart.weak.expect
index 8c54370..add03f5 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.weak.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.weak.expect
@@ -4,14 +4,11 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Set<core::List<core::int?>> c = #C6;
+static const field core::Set<core::List<core::int?>> c = #C3;
 static method main() → dynamic {}
 
 constants  {
   #C1 = <core::int*>[]
   #C2 = <core::int?>[]
-  #C3 = null
-  #C4 = <dynamic>[#C1, #C3, #C2, #C3]
-  #C5 = core::_ImmutableMap<core::List<core::int?>*, Null> {_kvPairs:#C4}
-  #C6 = col::_UnmodifiableSet<core::List<core::int?>*> {_map:#C5}
+  #C3 = <core::List<core::int?>*>{#C1, #C2}
 }
diff --git a/pkg/front_end/testcases/agnostic/set.dart.weak.outline.expect b/pkg/front_end/testcases/agnostic/set.dart.weak.outline.expect
index 62e6f76..a7a0c26 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.weak.outline.expect
@@ -12,5 +12,5 @@
 Extra constant evaluation status:
 Evaluated: ListLiteral @ org-dartlang-testcase:///set.dart:5:16 -> ListConstant(const <int*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///set.dart:6:17 -> ListConstant(const <int?>[])
-Evaluated: SetLiteral @ org-dartlang-testcase:///set.dart:7:11 -> InstanceConstant(const _UnmodifiableSet<List<int?>*>{_UnmodifiableSet._map: const _ImmutableMap<List<int?>*, Null>{_ImmutableMap._kvPairs: const <dynamic>[const <int*>[], null, const <int?>[], null]}})
+Evaluated: SetLiteral @ org-dartlang-testcase:///set.dart:7:11 -> SetConstant(const <List<int?>*>{const <int*>[], const <int?>[]})
 Extra constant evaluation: evaluated: 3, effectively constant: 3
diff --git a/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect b/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
index 8c54370..add03f5 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
@@ -4,14 +4,11 @@
 
 static const field core::List<core::int> a = #C1;
 static const field core::List<core::int?> b = #C2;
-static const field core::Set<core::List<core::int?>> c = #C6;
+static const field core::Set<core::List<core::int?>> c = #C3;
 static method main() → dynamic {}
 
 constants  {
   #C1 = <core::int*>[]
   #C2 = <core::int?>[]
-  #C3 = null
-  #C4 = <dynamic>[#C1, #C3, #C2, #C3]
-  #C5 = core::_ImmutableMap<core::List<core::int?>*, Null> {_kvPairs:#C4}
-  #C6 = col::_UnmodifiableSet<core::List<core::int?>*> {_map:#C5}
+  #C3 = <core::List<core::int?>*>{#C1, #C2}
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.expect
index e55cf4a..819097c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.expect
@@ -9,7 +9,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1));
+    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1);
   }
 }
 class A extends core::Object /*hasConstConstructor*/  {
@@ -25,7 +25,7 @@
 static method fn() → self::A
   return new self::A::•();
 static method main() → void {
-  exp::Expect::equals((#C2).{self::Simple::name}{core::String}, #C1);
+  exp::Expect::equals(#C2.{self::Simple::name}{core::String}, #C1);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.transformed.expect
index e55cf4a..819097c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1));
+    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1);
   }
 }
 class A extends core::Object /*hasConstConstructor*/  {
@@ -25,7 +25,7 @@
 static method fn() → self::A
   return new self::A::•();
 static method main() → void {
-  exp::Expect::equals((#C2).{self::Simple::name}{core::String}, #C1);
+  exp::Expect::equals(#C2.{self::Simple::name}{core::String}, #C1);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.expect
index e55cf4a..819097c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.expect
@@ -9,7 +9,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1));
+    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1);
   }
 }
 class A extends core::Object /*hasConstConstructor*/  {
@@ -25,7 +25,7 @@
 static method fn() → self::A
   return new self::A::•();
 static method main() → void {
-  exp::Expect::equals((#C2).{self::Simple::name}{core::String}, #C1);
+  exp::Expect::equals(#C2.{self::Simple::name}{core::String}, #C1);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.transformed.expect
index e55cf4a..819097c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor.dart.weak.transformed.expect
@@ -9,7 +9,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1));
+    assert(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1);
   }
 }
 class A extends core::Object /*hasConstConstructor*/  {
@@ -25,7 +25,7 @@
 static method fn() → self::A
   return new self::A::•();
 static method main() → void {
-  exp::Expect::equals((#C2).{self::Simple::name}{core::String}, #C1);
+  exp::Expect::equals(#C2.{self::Simple::name}{core::String}, #C1);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.expect
index aff37fe..b972e0f 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.expect
@@ -41,7 +41,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1)));
+    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1));
   }
 }
 class Simple2 extends core::Object /*hasConstConstructor*/  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.transformed.expect
index 3b12ad15..1c93204 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.strong.transformed.expect
@@ -41,7 +41,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1)));
+    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1));
   }
 }
 class Simple2 extends core::Object /*hasConstConstructor*/  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.expect
index aff37fe..b972e0f 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.expect
@@ -41,7 +41,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1)));
+    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1));
   }
 }
 class Simple2 extends core::Object /*hasConstConstructor*/  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.transformed.expect
index 3b12ad15..1c93204 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_const_ctor_error.dart.weak.transformed.expect
@@ -41,7 +41,7 @@
   final field core::String name;
   const constructor •(core::String name) → self::Simple
     : self::Simple::name = name, super core::Object::•() {
-    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} (#C1)));
+    assert(!(this.{self::Simple::name}{core::String} =={core::String::==}{(core::Object) → core::bool} #C1));
   }
 }
 class Simple2 extends core::Object /*hasConstConstructor*/  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.expect
index 81d7277..525bcb7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.expect
@@ -29,7 +29,7 @@
     }
 }
 static method ifTest2(core::int a) → core::int {
-  if(a =={core::num::==}{(core::Object) → core::bool} (#C4)) {
+  if(a =={core::num::==}{(core::Object) → core::bool} #C4) {
     return 100;
   }
   else {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.transformed.expect
index 81d7277..525bcb7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
     }
 }
 static method ifTest2(core::int a) → core::int {
-  if(a =={core::num::==}{(core::Object) → core::bool} (#C4)) {
+  if(a =={core::num::==}{(core::Object) → core::bool} #C4) {
     return 100;
   }
   else {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.expect
index 81d7277..525bcb7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.expect
@@ -29,7 +29,7 @@
     }
 }
 static method ifTest2(core::int a) → core::int {
-  if(a =={core::num::==}{(core::Object) → core::bool} (#C4)) {
+  if(a =={core::num::==}{(core::Object) → core::bool} #C4) {
     return 100;
   }
   else {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.transformed.expect
index 81d7277..525bcb7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_if_statements.dart.weak.transformed.expect
@@ -29,7 +29,7 @@
     }
 }
 static method ifTest2(core::int a) → core::int {
-  if(a =={core::num::==}{(core::Object) → core::bool} (#C4)) {
+  if(a =={core::num::==}{(core::Object) → core::bool} #C4) {
     return 100;
   }
   else {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.expect
index 82b3cb4..889f2d5 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.expect
@@ -29,15 +29,15 @@
 static const field core::int var4 = #C2;
 static const field core::int var5 = #C3;
 static method fn() → core::int
-  return (#C4).{self::A::y}{core::int};
+  return #C4.{self::A::y}{core::int};
 static method fn2() → core::int {
   self::A x = #C4;
   return x.{self::A::y}{core::int};
 }
 static method fn4() → core::int
-  return (#C5).{self::A::y}{core::int};
+  return #C5.{self::A::y}{core::int};
 static method fn5() → core::int
-  return (#C7).{self::C::y}{core::int};
+  return #C7.{self::C::y}{core::int};
 static method main() → void {
   exp::Expect::equals(#C2, 1);
   exp::Expect::equals(#C2, 1);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.transformed.expect
index 82b3cb4..889f2d5 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.strong.transformed.expect
@@ -29,15 +29,15 @@
 static const field core::int var4 = #C2;
 static const field core::int var5 = #C3;
 static method fn() → core::int
-  return (#C4).{self::A::y}{core::int};
+  return #C4.{self::A::y}{core::int};
 static method fn2() → core::int {
   self::A x = #C4;
   return x.{self::A::y}{core::int};
 }
 static method fn4() → core::int
-  return (#C5).{self::A::y}{core::int};
+  return #C5.{self::A::y}{core::int};
 static method fn5() → core::int
-  return (#C7).{self::C::y}{core::int};
+  return #C7.{self::C::y}{core::int};
 static method main() → void {
   exp::Expect::equals(#C2, 1);
   exp::Expect::equals(#C2, 1);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.expect
index 82b3cb4..889f2d5 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.expect
@@ -29,15 +29,15 @@
 static const field core::int var4 = #C2;
 static const field core::int var5 = #C3;
 static method fn() → core::int
-  return (#C4).{self::A::y}{core::int};
+  return #C4.{self::A::y}{core::int};
 static method fn2() → core::int {
   self::A x = #C4;
   return x.{self::A::y}{core::int};
 }
 static method fn4() → core::int
-  return (#C5).{self::A::y}{core::int};
+  return #C5.{self::A::y}{core::int};
 static method fn5() → core::int
-  return (#C7).{self::C::y}{core::int};
+  return #C7.{self::C::y}{core::int};
 static method main() → void {
   exp::Expect::equals(#C2, 1);
   exp::Expect::equals(#C2, 1);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.transformed.expect
index 82b3cb4..889f2d5 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_fields.dart.weak.transformed.expect
@@ -29,15 +29,15 @@
 static const field core::int var4 = #C2;
 static const field core::int var5 = #C3;
 static method fn() → core::int
-  return (#C4).{self::A::y}{core::int};
+  return #C4.{self::A::y}{core::int};
 static method fn2() → core::int {
   self::A x = #C4;
   return x.{self::A::y}{core::int};
 }
 static method fn4() → core::int
-  return (#C5).{self::A::y}{core::int};
+  return #C5.{self::A::y}{core::int};
 static method fn5() → core::int
-  return (#C7).{self::C::y}{core::int};
+  return #C7.{self::C::y}{core::int};
 static method main() → void {
   exp::Expect::equals(#C2, 1);
   exp::Expect::equals(#C2, 1);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.expect
index 4c328e0..740f2d9 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.expect
@@ -46,7 +46,7 @@
   const constructor •() → self::F<self::F::T%, self::F::U%, self::F::V%>
     : super core::Object::•()
     ;
-  method fn(generic-covariant-impl self::F::U% x) → self::F::U%
+  method fn(covariant-by-class self::F::U% x) → self::F::U%
     return x;
 }
 class G<T extends core::Object? = dynamic> extends self::F<self::G::T%, core::String, core::num> /*hasConstConstructor*/  {
@@ -71,26 +71,26 @@
 static const field core::String var8 = #C7;
 static const field core::String fnVal6 = #C7;
 static method fn() → core::String
-  return (#C8).{core::Object::toString}(){() → core::String};
+  return #C8.{core::Object::toString}(){() → core::String};
 static method fn2() → core::String
-  return (#C9).{self::B::toString}(){() → core::String};
+  return #C9.{self::B::toString}(){() → core::String};
 static method fn3() → core::int
-  return (#C11).{self::C::fn}(){() → core::int};
+  return #C11.{self::C::fn}(){() → core::int};
 static method fn4() → core::int
-  return (#C13).{self::C::fn}(){() → core::int};
+  return #C13.{self::C::fn}(){() → core::int};
 static method fn5() → core::int
-  return (#C14).{self::D::fn}(){() → core::int};
+  return #C14.{self::D::fn}(){() → core::int};
 static method fn6() → core::int
-  return (#C15).{self::C::fn}(){() → core::int};
+  return #C15.{self::C::fn}(){() → core::int};
 static method fn7() → core::String
-  return (#C16).{self::F::fn}("string"){(core::String) → core::String};
+  return #C16.{self::F::fn}("string"){(core::String) → core::String};
 static method fn8() → core::String
-  return (#C17).{self::F::fn}("string"){(core::String) → core::String};
+  return #C17.{self::F::fn}("string"){(core::String) → core::String};
 static method main() → void {
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
   exp::Expect::equals(#C4, 200);
   exp::Expect::equals(#C5, 100);
   exp::Expect::equals(#C4, 200);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.transformed.expect
index 4c328e0..740f2d9 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.strong.transformed.expect
@@ -46,7 +46,7 @@
   const constructor •() → self::F<self::F::T%, self::F::U%, self::F::V%>
     : super core::Object::•()
     ;
-  method fn(generic-covariant-impl self::F::U% x) → self::F::U%
+  method fn(covariant-by-class self::F::U% x) → self::F::U%
     return x;
 }
 class G<T extends core::Object? = dynamic> extends self::F<self::G::T%, core::String, core::num> /*hasConstConstructor*/  {
@@ -71,26 +71,26 @@
 static const field core::String var8 = #C7;
 static const field core::String fnVal6 = #C7;
 static method fn() → core::String
-  return (#C8).{core::Object::toString}(){() → core::String};
+  return #C8.{core::Object::toString}(){() → core::String};
 static method fn2() → core::String
-  return (#C9).{self::B::toString}(){() → core::String};
+  return #C9.{self::B::toString}(){() → core::String};
 static method fn3() → core::int
-  return (#C11).{self::C::fn}(){() → core::int};
+  return #C11.{self::C::fn}(){() → core::int};
 static method fn4() → core::int
-  return (#C13).{self::C::fn}(){() → core::int};
+  return #C13.{self::C::fn}(){() → core::int};
 static method fn5() → core::int
-  return (#C14).{self::D::fn}(){() → core::int};
+  return #C14.{self::D::fn}(){() → core::int};
 static method fn6() → core::int
-  return (#C15).{self::C::fn}(){() → core::int};
+  return #C15.{self::C::fn}(){() → core::int};
 static method fn7() → core::String
-  return (#C16).{self::F::fn}("string"){(core::String) → core::String};
+  return #C16.{self::F::fn}("string"){(core::String) → core::String};
 static method fn8() → core::String
-  return (#C17).{self::F::fn}("string"){(core::String) → core::String};
+  return #C17.{self::F::fn}("string"){(core::String) → core::String};
 static method main() → void {
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
   exp::Expect::equals(#C4, 200);
   exp::Expect::equals(#C5, 100);
   exp::Expect::equals(#C4, 200);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.expect
index 4ef96e2..d74febc 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.expect
@@ -46,7 +46,7 @@
   const constructor •() → self::F<self::F::T%, self::F::U%, self::F::V%>
     : super core::Object::•()
     ;
-  method fn(generic-covariant-impl self::F::U% x) → self::F::U%
+  method fn(covariant-by-class self::F::U% x) → self::F::U%
     return x;
 }
 class G<T extends core::Object? = dynamic> extends self::F<self::G::T%, core::String, core::num> /*hasConstConstructor*/  {
@@ -71,26 +71,26 @@
 static const field core::String var8 = #C7;
 static const field core::String fnVal6 = #C7;
 static method fn() → core::String
-  return (#C8).{core::Object::toString}(){() → core::String};
+  return #C8.{core::Object::toString}(){() → core::String};
 static method fn2() → core::String
-  return (#C9).{self::B::toString}(){() → core::String};
+  return #C9.{self::B::toString}(){() → core::String};
 static method fn3() → core::int
-  return (#C11).{self::C::fn}(){() → core::int};
+  return #C11.{self::C::fn}(){() → core::int};
 static method fn4() → core::int
-  return (#C13).{self::C::fn}(){() → core::int};
+  return #C13.{self::C::fn}(){() → core::int};
 static method fn5() → core::int
-  return (#C14).{self::D::fn}(){() → core::int};
+  return #C14.{self::D::fn}(){() → core::int};
 static method fn6() → core::int
-  return (#C15).{self::C::fn}(){() → core::int};
+  return #C15.{self::C::fn}(){() → core::int};
 static method fn7() → core::String
-  return (#C16).{self::F::fn}("string"){(core::String) → core::String};
+  return #C16.{self::F::fn}("string"){(core::String) → core::String};
 static method fn8() → core::String
-  return (#C17).{self::F::fn}("string"){(core::String) → core::String};
+  return #C17.{self::F::fn}("string"){(core::String) → core::String};
 static method main() → void {
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
   exp::Expect::equals(#C4, 200);
   exp::Expect::equals(#C5, 100);
   exp::Expect::equals(#C4, 200);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.outline.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.outline.expect
index 4443d89..2492af1 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.outline.expect
@@ -42,7 +42,7 @@
   const constructor •() → self::F<self::F::T%, self::F::U%, self::F::V%>
     : super core::Object::•()
     ;
-  method fn(generic-covariant-impl self::F::U% x) → self::F::U%
+  method fn(covariant-by-class self::F::U% x) → self::F::U%
     ;
 }
 class G<T extends core::Object? = dynamic> extends self::F<self::G::T%, core::String, core::num> /*hasConstConstructor*/  {
diff --git a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.transformed.expect
index 4ef96e2..d74febc 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_instance_methods.dart.weak.transformed.expect
@@ -46,7 +46,7 @@
   const constructor •() → self::F<self::F::T%, self::F::U%, self::F::V%>
     : super core::Object::•()
     ;
-  method fn(generic-covariant-impl self::F::U% x) → self::F::U%
+  method fn(covariant-by-class self::F::U% x) → self::F::U%
     return x;
 }
 class G<T extends core::Object? = dynamic> extends self::F<self::G::T%, core::String, core::num> /*hasConstConstructor*/  {
@@ -71,26 +71,26 @@
 static const field core::String var8 = #C7;
 static const field core::String fnVal6 = #C7;
 static method fn() → core::String
-  return (#C8).{core::Object::toString}(){() → core::String};
+  return #C8.{core::Object::toString}(){() → core::String};
 static method fn2() → core::String
-  return (#C9).{self::B::toString}(){() → core::String};
+  return #C9.{self::B::toString}(){() → core::String};
 static method fn3() → core::int
-  return (#C11).{self::C::fn}(){() → core::int};
+  return #C11.{self::C::fn}(){() → core::int};
 static method fn4() → core::int
-  return (#C13).{self::C::fn}(){() → core::int};
+  return #C13.{self::C::fn}(){() → core::int};
 static method fn5() → core::int
-  return (#C14).{self::D::fn}(){() → core::int};
+  return #C14.{self::D::fn}(){() → core::int};
 static method fn6() → core::int
-  return (#C15).{self::C::fn}(){() → core::int};
+  return #C15.{self::C::fn}(){() → core::int};
 static method fn7() → core::String
-  return (#C16).{self::F::fn}("string"){(core::String) → core::String};
+  return #C16.{self::F::fn}("string"){(core::String) → core::String};
 static method fn8() → core::String
-  return (#C17).{self::F::fn}("string"){(core::String) → core::String};
+  return #C17.{self::F::fn}("string"){(core::String) → core::String};
 static method main() → void {
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C2, (#C8).{core::Object::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
-  exp::Expect::equals(#C3, (#C9).{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C2, #C8.{core::Object::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
+  exp::Expect::equals(#C3, #C9.{self::B::toString}(){() → core::String});
   exp::Expect::equals(#C4, 200);
   exp::Expect::equals(#C5, 100);
   exp::Expect::equals(#C4, 200);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.expect
index d172063..b84e8cd 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.expect
@@ -20,11 +20,11 @@
 static const field core::List<core::int> mutableListVar = #C6;
 static const field core::List<core::int> mutableListAddVar = #C8;
 static method firstFn() → core::int {
-  return (#C6).{core::Iterable::first}{core::int};
+  return #C6.{core::Iterable::first}{core::int};
 }
 static method firstCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::first}{core::int};
+    core::int v = #C9.{core::Iterable::first}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -32,17 +32,17 @@
   return 1;
 }
 static method isEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isEmpty}{core::bool};
+  return #C6.{core::Iterable::isEmpty}{core::bool};
 }
 static method isNotEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isNotEmpty}{core::bool};
+  return #C6.{core::Iterable::isNotEmpty}{core::bool};
 }
 static method lastFn() → core::int {
-  return (#C6).{core::Iterable::last}{core::int};
+  return #C6.{core::Iterable::last}{core::int};
 }
 static method lastCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::last}{core::int};
+    core::int v = #C9.{core::Iterable::last}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -50,14 +50,14 @@
   return 1;
 }
 static method lengthFn() → core::int {
-  return (#C6).{core::List::length}{core::int};
+  return #C6.{core::List::length}{core::int};
 }
 static method singleFn() → core::int {
-  return (#C10).{core::Iterable::single}{core::int};
+  return #C10.{core::Iterable::single}{core::int};
 }
 static method singleCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::single}{core::int};
+    core::int v = #C9.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -66,7 +66,7 @@
 }
 static method singleCatchFn2() → core::int {
   try {
-    core::int v = (#C6).{core::Iterable::single}{core::int};
+    core::int v = #C6.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -74,11 +74,11 @@
   return 1;
 }
 static method getWithIndexFn() → core::int {
-  return (#C10).{core::List::[]}(0){(core::int) → core::int};
+  return #C10.{core::List::[]}(0){(core::int) → core::int};
 }
 static method rangeErrorCatchFn() → core::int {
   try {
-    core::int v = (#C10).{core::List::[]}(1){(core::int) → core::int};
+    core::int v = #C10.{core::List::[]}(1){(core::int) → core::int};
   }
   on core::RangeError catch(no-exception-var) {
     return 0;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.transformed.expect
index 02621b8..b43660c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list.dart.strong.transformed.expect
@@ -20,11 +20,11 @@
 static const field core::List<core::int> mutableListVar = #C6;
 static const field core::List<core::int> mutableListAddVar = #C8;
 static method firstFn() → core::int {
-  return (#C6).{core::Iterable::first}{core::int};
+  return #C6.{core::Iterable::first}{core::int};
 }
 static method firstCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::first}{core::int};
+    core::int v = #C9.{core::Iterable::first}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -32,17 +32,17 @@
   return 1;
 }
 static method isEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isEmpty}{core::bool};
+  return #C6.{core::Iterable::isEmpty}{core::bool};
 }
 static method isNotEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isNotEmpty}{core::bool};
+  return #C6.{core::Iterable::isNotEmpty}{core::bool};
 }
 static method lastFn() → core::int {
-  return (#C6).{core::Iterable::last}{core::int};
+  return #C6.{core::Iterable::last}{core::int};
 }
 static method lastCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::last}{core::int};
+    core::int v = #C9.{core::Iterable::last}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -50,14 +50,14 @@
   return 1;
 }
 static method lengthFn() → core::int {
-  return (#C6).{core::List::length}{core::int};
+  return #C6.{core::List::length}{core::int};
 }
 static method singleFn() → core::int {
-  return (#C10).{core::Iterable::single}{core::int};
+  return #C10.{core::Iterable::single}{core::int};
 }
 static method singleCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::single}{core::int};
+    core::int v = #C9.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -66,7 +66,7 @@
 }
 static method singleCatchFn2() → core::int {
   try {
-    core::int v = (#C6).{core::Iterable::single}{core::int};
+    core::int v = #C6.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -74,11 +74,11 @@
   return 1;
 }
 static method getWithIndexFn() → core::int {
-  return (#C10).{core::List::[]}(0){(core::int) → core::int};
+  return #C10.{core::List::[]}(0){(core::int) → core::int};
 }
 static method rangeErrorCatchFn() → core::int {
   try {
-    core::int v = (#C10).{core::List::[]}(1){(core::int) → core::int};
+    core::int v = #C10.{core::List::[]}(1){(core::int) → core::int};
   }
   on core::RangeError catch(no-exception-var) {
     return 0;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.expect
index db792b6..bc35178 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.expect
@@ -20,11 +20,11 @@
 static const field core::List<core::int> mutableListVar = #C6;
 static const field core::List<core::int> mutableListAddVar = #C8;
 static method firstFn() → core::int {
-  return (#C6).{core::Iterable::first}{core::int};
+  return #C6.{core::Iterable::first}{core::int};
 }
 static method firstCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::first}{core::int};
+    core::int v = #C9.{core::Iterable::first}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -32,17 +32,17 @@
   return 1;
 }
 static method isEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isEmpty}{core::bool};
+  return #C6.{core::Iterable::isEmpty}{core::bool};
 }
 static method isNotEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isNotEmpty}{core::bool};
+  return #C6.{core::Iterable::isNotEmpty}{core::bool};
 }
 static method lastFn() → core::int {
-  return (#C6).{core::Iterable::last}{core::int};
+  return #C6.{core::Iterable::last}{core::int};
 }
 static method lastCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::last}{core::int};
+    core::int v = #C9.{core::Iterable::last}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -50,14 +50,14 @@
   return 1;
 }
 static method lengthFn() → core::int {
-  return (#C6).{core::List::length}{core::int};
+  return #C6.{core::List::length}{core::int};
 }
 static method singleFn() → core::int {
-  return (#C10).{core::Iterable::single}{core::int};
+  return #C10.{core::Iterable::single}{core::int};
 }
 static method singleCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::single}{core::int};
+    core::int v = #C9.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -66,7 +66,7 @@
 }
 static method singleCatchFn2() → core::int {
   try {
-    core::int v = (#C6).{core::Iterable::single}{core::int};
+    core::int v = #C6.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -74,11 +74,11 @@
   return 1;
 }
 static method getWithIndexFn() → core::int {
-  return (#C10).{core::List::[]}(0){(core::int) → core::int};
+  return #C10.{core::List::[]}(0){(core::int) → core::int};
 }
 static method rangeErrorCatchFn() → core::int {
   try {
-    core::int v = (#C10).{core::List::[]}(1){(core::int) → core::int};
+    core::int v = #C10.{core::List::[]}(1){(core::int) → core::int};
   }
   on core::RangeError catch(no-exception-var) {
     return 0;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.transformed.expect
index 88c7fa4..529b512 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list.dart.weak.transformed.expect
@@ -20,11 +20,11 @@
 static const field core::List<core::int> mutableListVar = #C6;
 static const field core::List<core::int> mutableListAddVar = #C8;
 static method firstFn() → core::int {
-  return (#C6).{core::Iterable::first}{core::int};
+  return #C6.{core::Iterable::first}{core::int};
 }
 static method firstCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::first}{core::int};
+    core::int v = #C9.{core::Iterable::first}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -32,17 +32,17 @@
   return 1;
 }
 static method isEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isEmpty}{core::bool};
+  return #C6.{core::Iterable::isEmpty}{core::bool};
 }
 static method isNotEmptyFn() → core::bool {
-  return (#C6).{core::Iterable::isNotEmpty}{core::bool};
+  return #C6.{core::Iterable::isNotEmpty}{core::bool};
 }
 static method lastFn() → core::int {
-  return (#C6).{core::Iterable::last}{core::int};
+  return #C6.{core::Iterable::last}{core::int};
 }
 static method lastCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::last}{core::int};
+    core::int v = #C9.{core::Iterable::last}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -50,14 +50,14 @@
   return 1;
 }
 static method lengthFn() → core::int {
-  return (#C6).{core::List::length}{core::int};
+  return #C6.{core::List::length}{core::int};
 }
 static method singleFn() → core::int {
-  return (#C10).{core::Iterable::single}{core::int};
+  return #C10.{core::Iterable::single}{core::int};
 }
 static method singleCatchFn() → core::int {
   try {
-    core::int v = (#C9).{core::Iterable::single}{core::int};
+    core::int v = #C9.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -66,7 +66,7 @@
 }
 static method singleCatchFn2() → core::int {
   try {
-    core::int v = (#C6).{core::Iterable::single}{core::int};
+    core::int v = #C6.{core::Iterable::single}{core::int};
   }
   on core::StateError catch(no-exception-var) {
     return 0;
@@ -74,11 +74,11 @@
   return 1;
 }
 static method getWithIndexFn() → core::int {
-  return (#C10).{core::List::[]}(0){(core::int) → core::int};
+  return #C10.{core::List::[]}(0){(core::int) → core::int};
 }
 static method rangeErrorCatchFn() → core::int {
   try {
-    core::int v = (#C10).{core::List::[]}(1){(core::int) → core::int};
+    core::int v = #C10.{core::List::[]}(1){(core::int) → core::int};
   }
   on core::RangeError catch(no-exception-var) {
     return 0;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.expect
index 3694dc3..bdcb3a2 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.expect
@@ -82,37 +82,37 @@
            ^";
 static const field core::List<core::int> constListAddException = invalid-expression "Unhandled core exception: Unsupported operation: add";
 static method firstExceptionFn() → core::int {
-  return (#C1).{core::Iterable::first}{core::int};
+  return #C1.{core::Iterable::first}{core::int};
 }
 static method lastExceptionFn() → core::int {
-  return (#C1).{core::Iterable::last}{core::int};
+  return #C1.{core::Iterable::last}{core::int};
 }
 static method singleExceptionFn() → core::int {
-  return (#C1).{core::Iterable::single}{core::int};
+  return #C1.{core::Iterable::single}{core::int};
 }
 static method singleExceptionMultiFn() → core::int {
-  return (#C4).{core::Iterable::single}{core::int};
+  return #C4.{core::Iterable::single}{core::int};
 }
 static method invalidPropertyFn() → core::int {
   return invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:36:12: Error: The getter 'invalidProperty' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'invalidProperty'.
   return x.invalidProperty;
-           ^^^^^^^^^^^^^^^" in (#C4){<unresolved>}.invalidProperty as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
+           ^^^^^^^^^^^^^^^" in #C4{<unresolved>}.invalidProperty as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
 }
 static method getWithIndexExceptionFn() → core::int {
-  return (#C5).{core::List::[]}(1){(core::int) → core::int};
+  return #C5.{core::List::[]}(1){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn2() → core::int {
-  return (#C5).{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
+  return #C5.{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn3() → core::int {
-  return (#C5).{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C5.{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return x[0.1];
            ^" in 0.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::int};
 }
 static method constListAddExceptionFn() → core::List<core::int> {
-  (#C4).{core::List::add}(3){(core::int) → void};
+  #C4.{core::List::add}(3){(core::int) → void};
   return #C4;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.transformed.expect
index f28eea4..3a0726e 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.strong.transformed.expect
@@ -82,37 +82,37 @@
            ^";
 static const field core::List<core::int> constListAddException = invalid-expression "Unhandled core exception: Unsupported operation: add";
 static method firstExceptionFn() → core::int {
-  return (#C1).{core::Iterable::first}{core::int};
+  return #C1.{core::Iterable::first}{core::int};
 }
 static method lastExceptionFn() → core::int {
-  return (#C1).{core::Iterable::last}{core::int};
+  return #C1.{core::Iterable::last}{core::int};
 }
 static method singleExceptionFn() → core::int {
-  return (#C1).{core::Iterable::single}{core::int};
+  return #C1.{core::Iterable::single}{core::int};
 }
 static method singleExceptionMultiFn() → core::int {
-  return (#C4).{core::Iterable::single}{core::int};
+  return #C4.{core::Iterable::single}{core::int};
 }
 static method invalidPropertyFn() → core::int {
   return invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:36:12: Error: The getter 'invalidProperty' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'invalidProperty'.
   return x.invalidProperty;
-           ^^^^^^^^^^^^^^^" in (#C4){<unresolved>}.invalidProperty;
+           ^^^^^^^^^^^^^^^" in #C4{<unresolved>}.invalidProperty;
 }
 static method getWithIndexExceptionFn() → core::int {
-  return (#C5).{core::List::[]}(1){(core::int) → core::int};
+  return #C5.{core::List::[]}(1){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn2() → core::int {
-  return (#C5).{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
+  return #C5.{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn3() → core::int {
-  return (#C5).{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C5.{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return x[0.1];
            ^" in 0.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::int};
 }
 static method constListAddExceptionFn() → core::List<core::int> {
-  (#C4).{core::List::add}(3){(core::int) → void};
+  #C4.{core::List::add}(3){(core::int) → void};
   return #C4;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.expect
index c19e6d1..a7c5460 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.expect
@@ -82,37 +82,37 @@
            ^";
 static const field core::List<core::int> constListAddException = invalid-expression "Unhandled core exception: Unsupported operation: add";
 static method firstExceptionFn() → core::int {
-  return (#C1).{core::Iterable::first}{core::int};
+  return #C1.{core::Iterable::first}{core::int};
 }
 static method lastExceptionFn() → core::int {
-  return (#C1).{core::Iterable::last}{core::int};
+  return #C1.{core::Iterable::last}{core::int};
 }
 static method singleExceptionFn() → core::int {
-  return (#C1).{core::Iterable::single}{core::int};
+  return #C1.{core::Iterable::single}{core::int};
 }
 static method singleExceptionMultiFn() → core::int {
-  return (#C4).{core::Iterable::single}{core::int};
+  return #C4.{core::Iterable::single}{core::int};
 }
 static method invalidPropertyFn() → core::int {
   return invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:36:12: Error: The getter 'invalidProperty' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'invalidProperty'.
   return x.invalidProperty;
-           ^^^^^^^^^^^^^^^" in (#C4){<unresolved>}.invalidProperty as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
+           ^^^^^^^^^^^^^^^" in #C4{<unresolved>}.invalidProperty as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
 }
 static method getWithIndexExceptionFn() → core::int {
-  return (#C5).{core::List::[]}(1){(core::int) → core::int};
+  return #C5.{core::List::[]}(1){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn2() → core::int {
-  return (#C5).{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
+  return #C5.{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn3() → core::int {
-  return (#C5).{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C5.{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return x[0.1];
            ^" in 0.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::int};
 }
 static method constListAddExceptionFn() → core::List<core::int> {
-  (#C4).{core::List::add}(3){(core::int) → void};
+  #C4.{core::List::add}(3){(core::int) → void};
   return #C4;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.transformed.expect
index 30a7368..5a5f661 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_list_error.dart.weak.transformed.expect
@@ -82,37 +82,37 @@
            ^";
 static const field core::List<core::int> constListAddException = invalid-expression "Unhandled core exception: Unsupported operation: add";
 static method firstExceptionFn() → core::int {
-  return (#C1).{core::Iterable::first}{core::int};
+  return #C1.{core::Iterable::first}{core::int};
 }
 static method lastExceptionFn() → core::int {
-  return (#C1).{core::Iterable::last}{core::int};
+  return #C1.{core::Iterable::last}{core::int};
 }
 static method singleExceptionFn() → core::int {
-  return (#C1).{core::Iterable::single}{core::int};
+  return #C1.{core::Iterable::single}{core::int};
 }
 static method singleExceptionMultiFn() → core::int {
-  return (#C4).{core::Iterable::single}{core::int};
+  return #C4.{core::Iterable::single}{core::int};
 }
 static method invalidPropertyFn() → core::int {
   return invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:36:12: Error: The getter 'invalidProperty' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'invalidProperty'.
   return x.invalidProperty;
-           ^^^^^^^^^^^^^^^" in (#C4){<unresolved>}.invalidProperty;
+           ^^^^^^^^^^^^^^^" in #C4{<unresolved>}.invalidProperty;
 }
 static method getWithIndexExceptionFn() → core::int {
-  return (#C5).{core::List::[]}(1){(core::int) → core::int};
+  return #C5.{core::List::[]}(1){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn2() → core::int {
-  return (#C5).{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
+  return #C5.{core::List::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::int};
 }
 static method getWithIndexExceptionFn3() → core::int {
-  return (#C5).{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C5.{core::List::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_list_error.dart:54:12: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return x[0.1];
            ^" in 0.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::int};
 }
 static method constListAddExceptionFn() → core::List<core::int> {
-  (#C4).{core::List::add}(3){(core::int) → void};
+  #C4.{core::List::add}(3){(core::int) → void};
   return #C4;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.expect
index 0ace590..4c5f0e1 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.expect
@@ -46,7 +46,7 @@
 static method function8() → core::int {
   function add(core::int a, core::int b) → core::int
     return a.{core::num::+}(b){(core::num) → core::int};
-  return (#C1).{core::num::+}(#C4){(core::num) → core::int};
+  return #C1.{core::num::+}(#C4){(core::num) → core::int};
 }
 static method main() → void {
   exp::Expect::equals(self::function1(), 12);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.transformed.expect
index 142ff6a..d4f7f66 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.strong.transformed.expect
@@ -46,7 +46,7 @@
 static method function8() → core::int {
   function add(core::int a, core::int b) → core::int
     return a.{core::num::+}(b){(core::num) → core::int};
-  return (#C1).{core::num::+}(#C4){(core::num) → core::int};
+  return #C1.{core::num::+}(#C4){(core::num) → core::int};
 }
 static method main() → void {
   exp::Expect::equals(self::function1(), 12);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.expect
index 0ace590..4c5f0e1 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.expect
@@ -46,7 +46,7 @@
 static method function8() → core::int {
   function add(core::int a, core::int b) → core::int
     return a.{core::num::+}(b){(core::num) → core::int};
-  return (#C1).{core::num::+}(#C4){(core::num) → core::int};
+  return #C1.{core::num::+}(#C4){(core::num) → core::int};
 }
 static method main() → void {
   exp::Expect::equals(self::function1(), 12);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.transformed.expect
index 142ff6a..d4f7f66 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_local_functions.dart.weak.transformed.expect
@@ -46,7 +46,7 @@
 static method function8() → core::int {
   function add(core::int a, core::int b) → core::int
     return a.{core::num::+}(b){(core::num) → core::int};
-  return (#C1).{core::num::+}(#C4){(core::num) → core::int};
+  return #C1.{core::num::+}(#C4){(core::num) → core::int};
 }
 static method main() → void {
   exp::Expect::equals(self::function1(), 12);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.expect
index f35acb3..04fba22 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.expect
@@ -8,7 +8,7 @@
 static const field core::Object? var1 = #C1;
 static const field core::Object? var2 = #C2;
 static const field core::Object? var3 = #C3;
-static const field core::Map<core::String, core::int> map = #C10;
+static const field core::Map<core::String, core::int> map = #C9;
 static const field core::Object? var4 = #C2;
 static const field core::Object? var5 = #C6;
 static const field core::Object? var6 = #C8;
@@ -17,7 +17,7 @@
   return map.{core::Map::[]}(key){(core::Object?) → core::Object?};
 }
 static method fn2() → core::int? {
-  return (#C13).{core::Map::[]}("key"){(core::Object?) → core::int?};
+  return #C11.{core::Map::[]}("key"){(core::Object?) → core::int?};
 }
 static method main() → void {
   exp::Expect::equals(#C1, "val");
@@ -38,9 +38,7 @@
   #C6 = 3
   #C7 = "key3"
   #C8 = 4
-  #C9 = <dynamic>[#C4, #C2, #C5, #C6, #C7, #C8]
-  #C10 = core::_ImmutableMap<core::String, core::int> {_kvPairs:#C9}
-  #C11 = "key"
-  #C12 = <dynamic>[#C11, #C2]
-  #C13 = core::_ImmutableMap<core::String, core::int> {_kvPairs:#C12}
+  #C9 = <core::String, core::int>{#C4:#C2, #C5:#C6, #C7:#C8)
+  #C10 = "key"
+  #C11 = <core::String, core::int>{#C10:#C2)
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.transformed.expect
index f35acb3..04fba22 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_map.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
 static const field core::Object? var1 = #C1;
 static const field core::Object? var2 = #C2;
 static const field core::Object? var3 = #C3;
-static const field core::Map<core::String, core::int> map = #C10;
+static const field core::Map<core::String, core::int> map = #C9;
 static const field core::Object? var4 = #C2;
 static const field core::Object? var5 = #C6;
 static const field core::Object? var6 = #C8;
@@ -17,7 +17,7 @@
   return map.{core::Map::[]}(key){(core::Object?) → core::Object?};
 }
 static method fn2() → core::int? {
-  return (#C13).{core::Map::[]}("key"){(core::Object?) → core::int?};
+  return #C11.{core::Map::[]}("key"){(core::Object?) → core::int?};
 }
 static method main() → void {
   exp::Expect::equals(#C1, "val");
@@ -38,9 +38,7 @@
   #C6 = 3
   #C7 = "key3"
   #C8 = 4
-  #C9 = <dynamic>[#C4, #C2, #C5, #C6, #C7, #C8]
-  #C10 = core::_ImmutableMap<core::String, core::int> {_kvPairs:#C9}
-  #C11 = "key"
-  #C12 = <dynamic>[#C11, #C2]
-  #C13 = core::_ImmutableMap<core::String, core::int> {_kvPairs:#C12}
+  #C9 = <core::String, core::int>{#C4:#C2, #C5:#C6, #C7:#C8)
+  #C10 = "key"
+  #C11 = <core::String, core::int>{#C10:#C2)
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.expect
index a1dcfec..7f69cd7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.expect
@@ -8,7 +8,7 @@
 static const field core::Object? var1 = #C1;
 static const field core::Object? var2 = #C2;
 static const field core::Object? var3 = #C3;
-static const field core::Map<core::String, core::int> map = #C10;
+static const field core::Map<core::String, core::int> map = #C9;
 static const field core::Object? var4 = #C2;
 static const field core::Object? var5 = #C6;
 static const field core::Object? var6 = #C8;
@@ -17,7 +17,7 @@
   return map.{core::Map::[]}(key){(core::Object?) → core::Object?};
 }
 static method fn2() → core::int? {
-  return (#C13).{core::Map::[]}("key"){(core::Object?) → core::int?};
+  return #C11.{core::Map::[]}("key"){(core::Object?) → core::int?};
 }
 static method main() → void {
   exp::Expect::equals(#C1, "val");
@@ -38,9 +38,7 @@
   #C6 = 3
   #C7 = "key3"
   #C8 = 4
-  #C9 = <dynamic>[#C4, #C2, #C5, #C6, #C7, #C8]
-  #C10 = core::_ImmutableMap<core::String*, core::int*> {_kvPairs:#C9}
-  #C11 = "key"
-  #C12 = <dynamic>[#C11, #C2]
-  #C13 = core::_ImmutableMap<core::String*, core::int*> {_kvPairs:#C12}
+  #C9 = <core::String*, core::int*>{#C4:#C2, #C5:#C6, #C7:#C8)
+  #C10 = "key"
+  #C11 = <core::String*, core::int*>{#C10:#C2)
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.outline.expect b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.outline.expect
index 87b21de..7dfb681 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.outline.expect
@@ -21,11 +21,11 @@
 
 
 Extra constant evaluation status:
-Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:9:17 -> InstanceConstant(const _ImmutableMap<Object*, Object*>{_ImmutableMap._kvPairs: const <dynamic>["key", "val"]})
-Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:11:17 -> InstanceConstant(const _ImmutableMap<Object*, Object*>{_ImmutableMap._kvPairs: const <dynamic>["key", 2]})
-Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:13:17 -> InstanceConstant(const _ImmutableMap<Object*, Object*>{_ImmutableMap._kvPairs: const <dynamic>["key", 2]})
-Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:15:13 -> InstanceConstant(const _ImmutableMap<String*, int*>{_ImmutableMap._kvPairs: const <dynamic>["key1", 2, "key2", 3, "key3", 4]})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:16:17 -> InstanceConstant(const _ImmutableMap<String*, int*>{_ImmutableMap._kvPairs: const <dynamic>["key1", 2, "key2", 3, "key3", 4]})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:17:17 -> InstanceConstant(const _ImmutableMap<String*, int*>{_ImmutableMap._kvPairs: const <dynamic>["key1", 2, "key2", 3, "key3", 4]})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:18:17 -> InstanceConstant(const _ImmutableMap<String*, int*>{_ImmutableMap._kvPairs: const <dynamic>["key1", 2, "key2", 3, "key3", 4]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:9:17 -> MapConstant(const <Object*, Object*>{"key": "val"})
+Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:11:17 -> MapConstant(const <Object*, Object*>{"key": 2})
+Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:13:17 -> MapConstant(const <Object*, Object*>{"key": 2})
+Evaluated: MapLiteral @ org-dartlang-testcase:///const_functions_map.dart:15:13 -> MapConstant(const <String*, int*>{"key1": 2, "key2": 3, "key3": 4})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:16:17 -> MapConstant(const <String*, int*>{"key1": 2, "key2": 3, "key3": 4})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:17:17 -> MapConstant(const <String*, int*>{"key1": 2, "key2": 3, "key3": 4})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_functions_map.dart:18:17 -> MapConstant(const <String*, int*>{"key1": 2, "key2": 3, "key3": 4})
 Extra constant evaluation: evaluated: 14, effectively constant: 7
diff --git a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.transformed.expect
index a1dcfec..7f69cd7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_map.dart.weak.transformed.expect
@@ -8,7 +8,7 @@
 static const field core::Object? var1 = #C1;
 static const field core::Object? var2 = #C2;
 static const field core::Object? var3 = #C3;
-static const field core::Map<core::String, core::int> map = #C10;
+static const field core::Map<core::String, core::int> map = #C9;
 static const field core::Object? var4 = #C2;
 static const field core::Object? var5 = #C6;
 static const field core::Object? var6 = #C8;
@@ -17,7 +17,7 @@
   return map.{core::Map::[]}(key){(core::Object?) → core::Object?};
 }
 static method fn2() → core::int? {
-  return (#C13).{core::Map::[]}("key"){(core::Object?) → core::int?};
+  return #C11.{core::Map::[]}("key"){(core::Object?) → core::int?};
 }
 static method main() → void {
   exp::Expect::equals(#C1, "val");
@@ -38,9 +38,7 @@
   #C6 = 3
   #C7 = "key3"
   #C8 = 4
-  #C9 = <dynamic>[#C4, #C2, #C5, #C6, #C7, #C8]
-  #C10 = core::_ImmutableMap<core::String*, core::int*> {_kvPairs:#C9}
-  #C11 = "key"
-  #C12 = <dynamic>[#C11, #C2]
-  #C13 = core::_ImmutableMap<core::String*, core::int*> {_kvPairs:#C12}
+  #C9 = <core::String*, core::int*>{#C4:#C2, #C5:#C6, #C7:#C8)
+  #C10 = "key"
+  #C11 = <core::String*, core::int*>{#C10:#C2)
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.expect
index 4ea38f7..de04a6c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.expect
@@ -28,8 +28,8 @@
   }
 }
 static method main() → void {
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C2, 2);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.transformed.expect
index 16743c6..4a6a697 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_return.dart.strong.transformed.expect
@@ -28,8 +28,8 @@
   }
 }
 static method main() → void {
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C2, 2);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.expect
index 4ea38f7..de04a6c 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.expect
@@ -28,8 +28,8 @@
   }
 }
 static method main() → void {
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C2, 2);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.transformed.expect
index 16743c6..4a6a697 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_return.dart.weak.transformed.expect
@@ -28,8 +28,8 @@
   }
 }
 static method main() → void {
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
-  exp::Expect::equals((#C1) as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
+  exp::Expect::equals(#C1 as{ForNonNullableByDefault} dynamic, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C1, null);
   exp::Expect::equals(#C2, 2);
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.expect
index 30b3270..21293b7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.expect
@@ -16,7 +16,7 @@
 }
 static method fn2() → dynamic {
   try {
-    core::String x = (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+    core::String x = #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
   }
   on core::RangeError catch(no-exception-var) {
     return 2;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.transformed.expect
index c6e9308..2c524a4 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
 }
 static method fn2() → dynamic {
   try {
-    core::String x = (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+    core::String x = #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
   }
   on core::RangeError catch(no-exception-var) {
     return 2;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.expect
index 30b3270..21293b7 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.expect
@@ -16,7 +16,7 @@
 }
 static method fn2() → dynamic {
   try {
-    core::String x = (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+    core::String x = #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
   }
   on core::RangeError catch(no-exception-var) {
     return 2;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.transformed.expect
index c6e9308..2c524a4 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string.dart.weak.transformed.expect
@@ -16,7 +16,7 @@
 }
 static method fn2() → dynamic {
   try {
-    core::String x = (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+    core::String x = #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
   }
   on core::RangeError catch(no-exception-var) {
     return 2;
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.expect b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.expect
index 6074624..eeab2cc 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.expect
@@ -49,15 +49,15 @@
              ^";
 static method fn() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+  return #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
 }
 static method fn2() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(3){(core::int) → core::String};
+  return #C1.{core::String::[]}(3){(core::int) → core::String};
 }
 static method fn3() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C1.{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return str[1.1];
              ^" in 1.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::String};
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.transformed.expect
index 9cd6e70..b7cb442 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.strong.transformed.expect
@@ -49,15 +49,15 @@
              ^";
 static method fn() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+  return #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
 }
 static method fn2() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(3){(core::int) → core::String};
+  return #C1.{core::String::[]}(3){(core::int) → core::String};
 }
 static method fn3() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C1.{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return str[1.1];
              ^" in 1.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::String};
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.expect b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.expect
index 6074624..eeab2cc 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.expect
@@ -49,15 +49,15 @@
              ^";
 static method fn() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+  return #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
 }
 static method fn2() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(3){(core::int) → core::String};
+  return #C1.{core::String::[]}(3){(core::int) → core::String};
 }
 static method fn3() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C1.{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return str[1.1];
              ^" in 1.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::String};
 }
diff --git a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.transformed.expect b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.transformed.expect
index 9cd6e70..b7cb442 100644
--- a/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/const_functions/const_functions_string_error.dart.weak.transformed.expect
@@ -49,15 +49,15 @@
              ^";
 static method fn() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
+  return #C1.{core::String::[]}(1.{core::int::unary-}(){() → core::int}){(core::int) → core::String};
 }
 static method fn2() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(3){(core::int) → core::String};
+  return #C1.{core::String::[]}(3){(core::int) → core::String};
 }
 static method fn3() → dynamic {
   core::String s = "str";
-  return (#C1).{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  return #C1.{core::String::[]}(invalid-expression "pkg/front_end/testcases/const_functions/const_functions_string_error.dart:28:14: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
   return str[1.1];
              ^" in 1.1 as{TypeError,ForNonNullableByDefault} core::int){(core::int) → core::String};
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart
index 8650911..2a1769b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart
@@ -4,11 +4,11 @@
 
 T func<T>(T value) => value;
 var funcValue = func;
-int Function(int) f = funcValue.call; // Disallowed!
-int Function(int) g = funcValue.call<int>; // Disallowed!
+int Function(int) f = funcValue.call;
+int Function(int) g = funcValue.call<int>;
 
 test(Function f) {
-  int Function(int) g = f.call<int>; // Disallowed!
+  int Function(int) g = f.call<int>;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
index edfaeac..6e425f6 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
@@ -2,23 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
-// int Function(int) f = funcValue.call; // Disallowed!
-//                                 ^
-//
 // pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:11:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
 //  - 'Function' is from 'dart:core'.
 // Try changing the operand or remove the type arguments.
-//   int Function(int) g = f.call<int>; // Disallowed!
+//   int Function(int) g = f.call<int>;
 //                               ^
 //
 import self as self;
 import "dart:core" as core;
 
 static field <T extends core::Object? = dynamic>(T%) → T% funcValue = #C1;
-static field (core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
-int Function(int) f = funcValue.call; // Disallowed!
-                                ^" in self::funcValue.call as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+static field (core::int) → core::int f = self::funcValue.call<core::int>;
 static field (core::int) → core::int g = self::funcValue.call<core::int>;
 static method func<T extends core::Object? = dynamic>(self::func::T% value) → self::func::T%
   return value;
@@ -26,7 +20,7 @@
   (core::int) → core::int g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:11:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
  - 'Function' is from 'dart:core'.
 Try changing the operand or remove the type arguments.
-  int Function(int) g = f.call<int>; // Disallowed!
+  int Function(int) g = f.call<int>;
                               ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
index edfaeac..6e425f6 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
@@ -2,23 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
-// int Function(int) f = funcValue.call; // Disallowed!
-//                                 ^
-//
 // pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:11:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
 //  - 'Function' is from 'dart:core'.
 // Try changing the operand or remove the type arguments.
-//   int Function(int) g = f.call<int>; // Disallowed!
+//   int Function(int) g = f.call<int>;
 //                               ^
 //
 import self as self;
 import "dart:core" as core;
 
 static field <T extends core::Object? = dynamic>(T%) → T% funcValue = #C1;
-static field (core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
-int Function(int) f = funcValue.call; // Disallowed!
-                                ^" in self::funcValue.call as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+static field (core::int) → core::int f = self::funcValue.call<core::int>;
 static field (core::int) → core::int g = self::funcValue.call<core::int>;
 static method func<T extends core::Object? = dynamic>(self::func::T% value) → self::func::T%
   return value;
@@ -26,7 +20,7 @@
   (core::int) → core::int g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:11:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
  - 'Function' is from 'dart:core'.
 Try changing the operand or remove the type arguments.
-  int Function(int) g = f.call<int>; // Disallowed!
+  int Function(int) g = f.call<int>;
                               ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart
index e832879f..3e55497 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart
@@ -30,7 +30,7 @@
 const q = C.redirect;
 const r = C<int>.redirect;
 
-main() {
+test() {
   var a = A.new;
   var b = A<int>.new;
   var c = A.fact;
@@ -49,4 +49,6 @@
   var p = C<int>.fact;
   var q = C.redirect;
   var r = C<int>.redirect;
-}
\ No newline at end of file
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.expect
index f506785..107b186 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.expect
@@ -32,7 +32,7 @@
 static const field () → self::A<core::int> p = #C4;
 static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
 static const field () → self::A<core::int> r = #C6;
-static method main() → dynamic {
+static method test() → dynamic {
   <T extends core::Object? = dynamic>() → self::A<T%> a = #C1;
   () → self::A<core::int> b = #C2;
   <T extends core::Object? = dynamic>() → self::A<T%> c = #C3;
@@ -52,12 +52,7 @@
   <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
   () → self::A<core::int> r = #C6;
 }
-static method _#C#new#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#C#fact#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::fact<core::int>();
-static method _#C#redirect#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::redirect<core::int>();
+static method main() → dynamic {}
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -66,7 +61,7 @@
   #C4 = instantiation self::A::fact <core::int>
   #C5 = redirecting-factory-tearoff self::A::redirect
   #C6 = instantiation self::A::redirect <core::int>
-  #C7 = static-tearoff self::_#C#new#tearOff
-  #C8 = static-tearoff self::_#C#fact#tearOff
-  #C9 = static-tearoff self::_#C#redirect#tearOff
+  #C7 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C1<core::int>)
+  #C8 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C3<core::int>)
+  #C9 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C5<core::int>)
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.transformed.expect
index f506785..107b186 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.strong.transformed.expect
@@ -32,7 +32,7 @@
 static const field () → self::A<core::int> p = #C4;
 static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
 static const field () → self::A<core::int> r = #C6;
-static method main() → dynamic {
+static method test() → dynamic {
   <T extends core::Object? = dynamic>() → self::A<T%> a = #C1;
   () → self::A<core::int> b = #C2;
   <T extends core::Object? = dynamic>() → self::A<T%> c = #C3;
@@ -52,12 +52,7 @@
   <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
   () → self::A<core::int> r = #C6;
 }
-static method _#C#new#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#C#fact#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::fact<core::int>();
-static method _#C#redirect#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::redirect<core::int>();
+static method main() → dynamic {}
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -66,7 +61,7 @@
   #C4 = instantiation self::A::fact <core::int>
   #C5 = redirecting-factory-tearoff self::A::redirect
   #C6 = instantiation self::A::redirect <core::int>
-  #C7 = static-tearoff self::_#C#new#tearOff
-  #C8 = static-tearoff self::_#C#fact#tearOff
-  #C9 = static-tearoff self::_#C#redirect#tearOff
+  #C7 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C1<core::int>)
+  #C8 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C3<core::int>)
+  #C9 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C5<core::int>)
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect
index 7fa3351..091c610 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect
@@ -24,4 +24,5 @@
 const p = C<int>.fact;
 const q = C.redirect;
 const r = C<int>.redirect;
+test() {}
 main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect
index 34b33d7..b58704c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect
@@ -23,5 +23,6 @@
 const q = C.redirect;
 const r = C<int>.redirect;
 main() {}
+test() {}
 typedef B<T> = A<T>;
 typedef C<T> = A<int>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.expect
index baeca6e..fad0d55 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.expect
@@ -32,7 +32,7 @@
 static const field () → self::A<core::int> p = #C4;
 static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
 static const field () → self::A<core::int> r = #C6;
-static method main() → dynamic {
+static method test() → dynamic {
   <T extends core::Object? = dynamic>() → self::A<T%> a = #C1;
   () → self::A<core::int> b = #C2;
   <T extends core::Object? = dynamic>() → self::A<T%> c = #C3;
@@ -52,12 +52,7 @@
   <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
   () → self::A<core::int> r = #C6;
 }
-static method _#C#new#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#C#fact#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::fact<core::int>();
-static method _#C#redirect#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::redirect<core::int>();
+static method main() → dynamic {}
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -66,7 +61,7 @@
   #C4 = instantiation self::A::fact <core::int*>
   #C5 = redirecting-factory-tearoff self::A::redirect
   #C6 = instantiation self::A::redirect <core::int*>
-  #C7 = static-tearoff self::_#C#new#tearOff
-  #C8 = static-tearoff self::_#C#fact#tearOff
-  #C9 = static-tearoff self::_#C#redirect#tearOff
+  #C7 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C1<core::int>)
+  #C8 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C3<core::int>)
+  #C9 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C5<core::int>)
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.outline.expect
index ddd2364..2e30650 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.outline.expect
@@ -25,20 +25,16 @@
 static const field () → self::A<core::int> j = self::A::fact<core::int>;
 static const field <T extends core::Object? = dynamic>() → self::A<T%> k = self::A::redirect;
 static const field () → self::A<core::int> l = self::A::redirect<core::int>;
-static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> m = self::_#C#new#tearOff;
+static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> m = <unrelated T extends core::Object? = dynamic>.(self::A::•<core::int>);
 static const field () → self::A<core::int> n = self::A::•<core::int>;
-static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> o = self::_#C#fact#tearOff;
+static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> o = <unrelated T extends core::Object? = dynamic>.(self::A::fact<core::int>);
 static const field () → self::A<core::int> p = self::A::fact<core::int>;
-static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = self::_#C#redirect#tearOff;
+static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = <unrelated T extends core::Object? = dynamic>.(self::A::redirect<core::int>);
 static const field () → self::A<core::int> r = self::A::redirect<core::int>;
+static method test() → dynamic
+  ;
 static method main() → dynamic
   ;
-static method _#C#new#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#C#fact#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::fact<core::int>();
-static method _#C#redirect#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::redirect<core::int>();
 
 
 Extra constant evaluation status:
@@ -54,10 +50,10 @@
 Evaluated: Instantiation @ org-dartlang-testcase:///const_tear_off.dart:23:11 -> InstantiationConstant(A.fact<int*>)
 Evaluated: RedirectingFactoryTearOff @ org-dartlang-testcase:///const_tear_off.dart:24:11 -> RedirectingFactoryTearOffConstant(A.redirect)
 Evaluated: Instantiation @ org-dartlang-testcase:///const_tear_off.dart:25:11 -> InstantiationConstant(A.redirect<int*>)
-Evaluated: StaticTearOff @ org-dartlang-testcase:///const_tear_off.dart:26:11 -> StaticTearOffConstant(_#C#new#tearOff)
+Evaluated: TypedefTearOff @ org-dartlang-testcase:///const_tear_off.dart:26:11 -> TypedefTearOffConstant(<T>A.<int>)
 Evaluated: Instantiation @ org-dartlang-testcase:///const_tear_off.dart:27:11 -> InstantiationConstant(A.<int*>)
-Evaluated: StaticTearOff @ org-dartlang-testcase:///const_tear_off.dart:28:11 -> StaticTearOffConstant(_#C#fact#tearOff)
+Evaluated: TypedefTearOff @ org-dartlang-testcase:///const_tear_off.dart:28:11 -> TypedefTearOffConstant(<T>A.fact<int>)
 Evaluated: Instantiation @ org-dartlang-testcase:///const_tear_off.dart:29:11 -> InstantiationConstant(A.fact<int*>)
-Evaluated: StaticTearOff @ org-dartlang-testcase:///const_tear_off.dart:30:11 -> StaticTearOffConstant(_#C#redirect#tearOff)
+Evaluated: TypedefTearOff @ org-dartlang-testcase:///const_tear_off.dart:30:11 -> TypedefTearOffConstant(<T>A.redirect<int>)
 Evaluated: Instantiation @ org-dartlang-testcase:///const_tear_off.dart:31:11 -> InstantiationConstant(A.redirect<int*>)
-Extra constant evaluation: evaluated: 24, effectively constant: 18
+Extra constant evaluation: evaluated: 21, effectively constant: 18
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.transformed.expect
index baeca6e..fad0d55 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.weak.transformed.expect
@@ -32,7 +32,7 @@
 static const field () → self::A<core::int> p = #C4;
 static const field <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
 static const field () → self::A<core::int> r = #C6;
-static method main() → dynamic {
+static method test() → dynamic {
   <T extends core::Object? = dynamic>() → self::A<T%> a = #C1;
   () → self::A<core::int> b = #C2;
   <T extends core::Object? = dynamic>() → self::A<T%> c = #C3;
@@ -52,12 +52,7 @@
   <unrelated T extends core::Object? = dynamic>() → self::A<core::int> q = #C9;
   () → self::A<core::int> r = #C6;
 }
-static method _#C#new#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#C#fact#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::fact<core::int>();
-static method _#C#redirect#tearOff<unrelated T extends core::Object? = dynamic>() → self::A<core::int>
-  return self::A::redirect<core::int>();
+static method main() → dynamic {}
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -66,7 +61,7 @@
   #C4 = instantiation self::A::fact <core::int*>
   #C5 = redirecting-factory-tearoff self::A::redirect
   #C6 = instantiation self::A::redirect <core::int*>
-  #C7 = static-tearoff self::_#C#new#tearOff
-  #C8 = static-tearoff self::_#C#fact#tearOff
-  #C9 = static-tearoff self::_#C#redirect#tearOff
+  #C7 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C1<core::int>)
+  #C8 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C3<core::int>)
+  #C9 = typedef-tearoff <unrelated T extends core::Object? = dynamic>.(#C5<core::int>)
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect
index 9ba9e7d..eb48965 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.expect
@@ -238,12 +238,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
   invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   #C5;
@@ -258,7 +258,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -267,7 +267,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -276,7 +276,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
 Try changing the operand or remove the type arguments.
   Class<int><int>.named<int>;
                        ^");
@@ -284,7 +284,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -293,7 +293,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -302,7 +302,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect
index 4ca72c7..de6a5ab 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.strong.transformed.expect
@@ -238,12 +238,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
   invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   #C5;
@@ -258,7 +258,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -267,7 +267,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -276,7 +276,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
 Try changing the operand or remove the type arguments.
   Class<int><int>.named<int>;
                        ^");
@@ -284,7 +284,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -293,7 +293,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -302,7 +302,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect
index 3c1d2af..117593c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.expect
@@ -238,12 +238,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<core::int>[]);
   invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   #C5;
@@ -258,7 +258,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -267,7 +267,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -276,7 +276,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
 Try changing the operand or remove the type arguments.
   Class<int><int>.named<int>;
                        ^");
@@ -284,7 +284,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -293,7 +293,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -302,7 +302,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect
index 5cdc315..0f1d41c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart.weak.transformed.expect
@@ -238,12 +238,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(core::_GrowableList::•<core::int>(0));
   invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:14:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   #C5;
@@ -258,7 +258,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:19:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -267,7 +267,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:20:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -276,7 +276,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:21:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
 Try changing the operand or remove the type arguments.
   Class<int><int>.named<int>;
                        ^");
@@ -284,7 +284,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -293,7 +293,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -302,7 +302,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C2){<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C2{<unresolved>}.<(#C3){dynamic}.>(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/duplicate_instantiation.dart:24:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
index 1ecd540..03be5de 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
@@ -13,7 +13,7 @@
     return value;
   method method() → void {
     (core::int) → core::int f1 = #C2;
-    core::String f1TypeName = (#C2).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C2.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -27,7 +27,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -69,7 +69,7 @@
   return <T extends core::Object? = dynamic>(T% value) → T% => self::Ext|einst<T%>(#this, value);
 static method Ext|emethod(lowered final self::C #this) → void {
   (core::int) → core::int f1 = #C6;
-  core::String f1TypeName = (#C6).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+  core::String f1TypeName = #C6.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f2 = self::Ext|get#einst(#this)<core::int>;
   core::String f2TypeName = (self::Ext|get#einst(#this)<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f3 = self::Ext|get#einst(#this)<core::int>;
@@ -87,23 +87,9 @@
   (core::int) → core::int f4 = d.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f5 = d.{self::_D&C&M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f6 = self::Ext|get#einst(d)<core::int>;
-  core::String typeName = (#C7).{core::Type::toString}(){() → core::String};
+  core::String typeName = #C7.{core::Type::toString}(){() → core::String};
   core::String functionTypeName = (local<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
 }
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#new#tearOff<T extends core::Object? = dynamic>([core::int? length = #C9]) → core::List<core::List<self::_#ListList#new#tearOff::T%>>
-  return core::List::•<core::List<self::_#ListList#new#tearOff::T%>>(length);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#filled#tearOff<T extends core::Object? = dynamic>(core::int length, core::List<self::_#ListList#filled#tearOff::T%> fill, {core::bool growable = #C10}) → core::List<core::List<self::_#ListList#filled#tearOff::T%>>
-  return core::List::filled<core::List<self::_#ListList#filled#tearOff::T%>>(length, fill, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#empty#tearOff<T extends core::Object? = dynamic>({core::bool growable = #C10}) → core::List<core::List<self::_#ListList#empty#tearOff::T%>>
-  return core::List::empty<core::List<self::_#ListList#empty#tearOff::T%>>(growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#from#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#from#tearOff::T%>>
-  return core::List::from<core::List<self::_#ListList#from#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#of#tearOff<T extends core::Object? = dynamic>(core::Iterable<core::List<self::_#ListList#of#tearOff::T%>> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#of#tearOff::T%>>
-  return core::List::of<core::List<self::_#ListList#of#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#generate#tearOff<T extends core::Object? = dynamic>(core::int length, (core::int) → core::List<self::_#ListList#generate#tearOff::T%> generator, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#generate#tearOff::T%>>
-  return core::List::generate<core::List<self::_#ListList#generate#tearOff::T%>>(length, generator, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#unmodifiable#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements) → core::List<core::List<self::_#ListList#unmodifiable#tearOff::T%>>
-  return core::List::unmodifiable<core::List<self::_#ListList#unmodifiable#tearOff::T%>>(elements);
 
 constants  {
   #C1 = static-tearoff self::C::stat
@@ -114,7 +100,4 @@
   #C6 = instantiation self::Ext|estat <core::int>
   #C7 = TypeLiteralConstant(core::List<core::int>)
   #C8 = TypeLiteralConstant(core::List<core::List<core::int>>)
-  #C9 = null
-  #C10 = false
-  #C11 = true
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
index 4176e23..5b832f3 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
     return value;
   method method() → void {
     (core::int) → core::int f1 = #C2;
-    core::String f1TypeName = (#C2).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C2.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -27,7 +27,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -42,7 +42,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -77,7 +77,7 @@
   return <T extends core::Object? = dynamic>(T% value) → T% => self::Ext|einst<T%>(#this, value);
 static method Ext|emethod(lowered final self::C #this) → void {
   (core::int) → core::int f1 = #C6;
-  core::String f1TypeName = (#C6).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+  core::String f1TypeName = #C6.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f2 = self::Ext|get#einst(#this)<core::int>;
   core::String f2TypeName = (self::Ext|get#einst(#this)<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f3 = self::Ext|get#einst(#this)<core::int>;
@@ -95,23 +95,9 @@
   (core::int) → core::int f4 = d.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f5 = d.{self::_D&C&M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f6 = self::Ext|get#einst(d)<core::int>;
-  core::String typeName = (#C7).{core::Type::toString}(){() → core::String};
+  core::String typeName = #C7.{core::Type::toString}(){() → core::String};
   core::String functionTypeName = (local<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
 }
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#new#tearOff<T extends core::Object? = dynamic>([core::int? length = #C9]) → core::List<core::List<self::_#ListList#new#tearOff::T%>>
-  return core::_List::•<core::List<self::_#ListList#new#tearOff::T%>>(length);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#filled#tearOff<T extends core::Object? = dynamic>(core::int length, core::List<self::_#ListList#filled#tearOff::T%> fill, {core::bool growable = #C10}) → core::List<core::List<self::_#ListList#filled#tearOff::T%>>
-  return core::List::filled<core::List<self::_#ListList#filled#tearOff::T%>>(length, fill, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#empty#tearOff<T extends core::Object? = dynamic>({core::bool growable = #C10}) → core::List<core::List<self::_#ListList#empty#tearOff::T%>>
-  return core::List::empty<core::List<self::_#ListList#empty#tearOff::T%>>(growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#from#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#from#tearOff::T%>>
-  return core::List::from<core::List<self::_#ListList#from#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#of#tearOff<T extends core::Object? = dynamic>(core::Iterable<core::List<self::_#ListList#of#tearOff::T%>> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#of#tearOff::T%>>
-  return core::List::of<core::List<self::_#ListList#of#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#generate#tearOff<T extends core::Object? = dynamic>(core::int length, (core::int) → core::List<self::_#ListList#generate#tearOff::T%> generator, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#generate#tearOff::T%>>
-  return core::List::generate<core::List<self::_#ListList#generate#tearOff::T%>>(length, generator, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#unmodifiable#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements) → core::List<core::List<self::_#ListList#unmodifiable#tearOff::T%>>
-  return core::List::unmodifiable<core::List<self::_#ListList#unmodifiable#tearOff::T%>>(elements);
 
 constants  {
   #C1 = static-tearoff self::C::stat
@@ -122,7 +108,4 @@
   #C6 = instantiation self::Ext|estat <core::int>
   #C7 = TypeLiteralConstant(core::List<core::int>)
   #C8 = TypeLiteralConstant(core::List<core::List<core::int>>)
-  #C9 = null
-  #C10 = false
-  #C11 = true
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
index 10969f4..f9f2d98 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
@@ -13,7 +13,7 @@
     return value;
   method method() → void {
     (core::int) → core::int f1 = #C2;
-    core::String f1TypeName = (#C2).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C2.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -27,7 +27,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -69,7 +69,7 @@
   return <T extends core::Object? = dynamic>(T% value) → T% => self::Ext|einst<T%>(#this, value);
 static method Ext|emethod(lowered final self::C #this) → void {
   (core::int) → core::int f1 = #C6;
-  core::String f1TypeName = (#C6).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+  core::String f1TypeName = #C6.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f2 = self::Ext|get#einst(#this)<core::int>;
   core::String f2TypeName = (self::Ext|get#einst(#this)<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f3 = self::Ext|get#einst(#this)<core::int>;
@@ -87,23 +87,9 @@
   (core::int) → core::int f4 = d.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f5 = d.{self::_D&C&M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f6 = self::Ext|get#einst(d)<core::int>;
-  core::String typeName = (#C7).{core::Type::toString}(){() → core::String};
+  core::String typeName = #C7.{core::Type::toString}(){() → core::String};
   core::String functionTypeName = (local<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
 }
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#new#tearOff<T extends core::Object? = dynamic>([core::int? length = #C9]) → core::List<core::List<self::_#ListList#new#tearOff::T%>>
-  return core::List::•<core::List<self::_#ListList#new#tearOff::T%>>(length);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#filled#tearOff<T extends core::Object? = dynamic>(core::int length, core::List<self::_#ListList#filled#tearOff::T%> fill, {core::bool growable = #C10}) → core::List<core::List<self::_#ListList#filled#tearOff::T%>>
-  return core::List::filled<core::List<self::_#ListList#filled#tearOff::T%>>(length, fill, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#empty#tearOff<T extends core::Object? = dynamic>({core::bool growable = #C10}) → core::List<core::List<self::_#ListList#empty#tearOff::T%>>
-  return core::List::empty<core::List<self::_#ListList#empty#tearOff::T%>>(growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#from#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#from#tearOff::T%>>
-  return core::List::from<core::List<self::_#ListList#from#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#of#tearOff<T extends core::Object? = dynamic>(core::Iterable<core::List<self::_#ListList#of#tearOff::T%>> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#of#tearOff::T%>>
-  return core::List::of<core::List<self::_#ListList#of#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#generate#tearOff<T extends core::Object? = dynamic>(core::int length, (core::int) → core::List<self::_#ListList#generate#tearOff::T%> generator, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#generate#tearOff::T%>>
-  return core::List::generate<core::List<self::_#ListList#generate#tearOff::T%>>(length, generator, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#unmodifiable#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements) → core::List<core::List<self::_#ListList#unmodifiable#tearOff::T%>>
-  return core::List::unmodifiable<core::List<self::_#ListList#unmodifiable#tearOff::T%>>(elements);
 
 constants  {
   #C1 = static-tearoff self::C::stat
@@ -114,7 +100,4 @@
   #C6 = instantiation self::Ext|estat <core::int*>
   #C7 = TypeLiteralConstant(core::List<core::int*>*)
   #C8 = TypeLiteralConstant(core::List<core::List<core::int*>*>*)
-  #C9 = null
-  #C10 = false
-  #C11 = true
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.outline.expect
index 0db844e..6476dce 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.outline.expect
@@ -57,17 +57,3 @@
   return () → void => self::Ext|emethod(#this);
 static method main() → void
   ;
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#new#tearOff<T extends core::Object? = dynamic>([core::int? length]) → core::List<core::List<self::_#ListList#new#tearOff::T%>>
-  return core::List::•<core::List<self::_#ListList#new#tearOff::T%>>(length);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#filled#tearOff<T extends core::Object? = dynamic>(core::int length, core::List<self::_#ListList#filled#tearOff::T%> fill, {core::bool growable}) → core::List<core::List<self::_#ListList#filled#tearOff::T%>>
-  return core::List::filled<core::List<self::_#ListList#filled#tearOff::T%>>(length, fill, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#empty#tearOff<T extends core::Object? = dynamic>({core::bool growable}) → core::List<core::List<self::_#ListList#empty#tearOff::T%>>
-  return core::List::empty<core::List<self::_#ListList#empty#tearOff::T%>>(growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#from#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements, {core::bool growable}) → core::List<core::List<self::_#ListList#from#tearOff::T%>>
-  return core::List::from<core::List<self::_#ListList#from#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#of#tearOff<T extends core::Object? = dynamic>(core::Iterable<core::List<self::_#ListList#of#tearOff::T%>> elements, {core::bool growable}) → core::List<core::List<self::_#ListList#of#tearOff::T%>>
-  return core::List::of<core::List<self::_#ListList#of#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#generate#tearOff<T extends core::Object? = dynamic>(core::int length, (core::int) → core::List<self::_#ListList#generate#tearOff::T%> generator, {core::bool growable}) → core::List<core::List<self::_#ListList#generate#tearOff::T%>>
-  return core::List::generate<core::List<self::_#ListList#generate#tearOff::T%>>(length, generator, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#unmodifiable#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements) → core::List<core::List<self::_#ListList#unmodifiable#tearOff::T%>>
-  return core::List::unmodifiable<core::List<self::_#ListList#unmodifiable#tearOff::T%>>(elements);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
index f3202b5..c8aedc8 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
     return value;
   method method() → void {
     (core::int) → core::int f1 = #C2;
-    core::String f1TypeName = (#C2).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C2.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -27,7 +27,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -42,7 +42,7 @@
     return value;
   method mmethod() → void {
     (core::int) → core::int f1 = #C4;
-    core::String f1TypeName = (#C4).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+    core::String f1TypeName = #C4.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f2 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
     core::String f2TypeName = (this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
     (core::int) → core::int f3 = this.{self::M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
@@ -77,7 +77,7 @@
   return <T extends core::Object? = dynamic>(T% value) → T% => self::Ext|einst<T%>(#this, value);
 static method Ext|emethod(lowered final self::C #this) → void {
   (core::int) → core::int f1 = #C6;
-  core::String f1TypeName = (#C6).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
+  core::String f1TypeName = #C6.{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f2 = self::Ext|get#einst(#this)<core::int>;
   core::String f2TypeName = (self::Ext|get#einst(#this)<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
   (core::int) → core::int f3 = self::Ext|get#einst(#this)<core::int>;
@@ -95,23 +95,9 @@
   (core::int) → core::int f4 = d.{self::C::inst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f5 = d.{self::_D&C&M::minst}{<T extends core::Object? = dynamic>(T%) → T%}<core::int>;
   (core::int) → core::int f6 = self::Ext|get#einst(d)<core::int>;
-  core::String typeName = (#C7).{core::Type::toString}(){() → core::String};
+  core::String typeName = #C7.{core::Type::toString}(){() → core::String};
   core::String functionTypeName = (local<core::int>).{core::Object::runtimeType}{core::Type}.{core::Type::toString}(){() → core::String};
 }
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#new#tearOff<T extends core::Object? = dynamic>([core::int? length = #C9]) → core::List<core::List<self::_#ListList#new#tearOff::T%>>
-  return core::_List::•<core::List<self::_#ListList#new#tearOff::T%>>(length);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#filled#tearOff<T extends core::Object? = dynamic>(core::int length, core::List<self::_#ListList#filled#tearOff::T%> fill, {core::bool growable = #C10}) → core::List<core::List<self::_#ListList#filled#tearOff::T%>>
-  return core::List::filled<core::List<self::_#ListList#filled#tearOff::T%>>(length, fill, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#empty#tearOff<T extends core::Object? = dynamic>({core::bool growable = #C10}) → core::List<core::List<self::_#ListList#empty#tearOff::T%>>
-  return core::List::empty<core::List<self::_#ListList#empty#tearOff::T%>>(growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#from#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#from#tearOff::T%>>
-  return core::List::from<core::List<self::_#ListList#from#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#of#tearOff<T extends core::Object? = dynamic>(core::Iterable<core::List<self::_#ListList#of#tearOff::T%>> elements, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#of#tearOff::T%>>
-  return core::List::of<core::List<self::_#ListList#of#tearOff::T%>>(elements, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#generate#tearOff<T extends core::Object? = dynamic>(core::int length, (core::int) → core::List<self::_#ListList#generate#tearOff::T%> generator, {core::bool growable = #C11}) → core::List<core::List<self::_#ListList#generate#tearOff::T%>>
-  return core::List::generate<core::List<self::_#ListList#generate#tearOff::T%>>(length, generator, growable: growable);
-static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/array_patch.dart */ _#ListList#unmodifiable#tearOff<T extends core::Object? = dynamic>(core::Iterable<dynamic> elements) → core::List<core::List<self::_#ListList#unmodifiable#tearOff::T%>>
-  return core::List::unmodifiable<core::List<self::_#ListList#unmodifiable#tearOff::T%>>(elements);
 
 constants  {
   #C1 = static-tearoff self::C::stat
@@ -122,7 +108,4 @@
   #C6 = instantiation self::Ext|estat <core::int*>
   #C7 = TypeLiteralConstant(core::List<core::int*>*)
   #C8 = TypeLiteralConstant(core::List<core::List<core::int*>*>*)
-  #C9 = null
-  #C10 = false
-  #C11 = true
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/folder.options b/pkg/front_end/testcases/constructor_tearoffs/folder.options
index 39d8895..73976a7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/folder.options
+++ b/pkg/front_end/testcases/constructor_tearoffs/folder.options
@@ -1 +1,2 @@
---enable-experiment=constructor-tearoffs
\ No newline at end of file
+--enable-experiment=constructor-tearoffs
+--force-constructor-tear-off-lowering=0
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
index 4382007..cd74ac1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
@@ -75,19 +75,19 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test2() => A.foo2; // Error.
-                               ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C2 as{TypeError,ForNonNullableByDefault} Never;
 static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test3() => A.new; // Error.
-                               ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C3 as{TypeError,ForNonNullableByDefault} Never;
 static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test4() => A<int>.new; // Error.
-                               ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C4 as{TypeError,ForNonNullableByDefault} Never;
 static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -97,7 +97,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-                               ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C5 as{TypeError,ForNonNullableByDefault} Never;
 static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -107,7 +107,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-                               ^" in (#C6) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C6 as{TypeError,ForNonNullableByDefault} Never;
 static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -121,7 +121,7 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test11() => A.bar1; // Error.
-                                ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
+                                ^" in #C7 as{TypeError,ForNonNullableByDefault} Never;
 static method test12() → () → self::A<core::int>
   return #C8;
 static method test13() → () → self::A<core::int>
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
index 4382007..cd74ac1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
@@ -75,19 +75,19 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test2() => A.foo2; // Error.
-                               ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C2 as{TypeError,ForNonNullableByDefault} Never;
 static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test3() => A.new; // Error.
-                               ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C3 as{TypeError,ForNonNullableByDefault} Never;
 static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test4() => A<int>.new; // Error.
-                               ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C4 as{TypeError,ForNonNullableByDefault} Never;
 static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -97,7 +97,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-                               ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C5 as{TypeError,ForNonNullableByDefault} Never;
 static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -107,7 +107,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-                               ^" in (#C6) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C6 as{TypeError,ForNonNullableByDefault} Never;
 static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -121,7 +121,7 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test11() => A.bar1; // Error.
-                                ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
+                                ^" in #C7 as{TypeError,ForNonNullableByDefault} Never;
 static method test12() → () → self::A<core::int>
   return #C8;
 static method test13() → () → self::A<core::int>
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
index 1b4c49e..40ac9f8 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
@@ -75,19 +75,19 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test2() => A.foo2; // Error.
-                               ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C2 as{TypeError,ForNonNullableByDefault} Never;
 static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test3() => A.new; // Error.
-                               ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C3 as{TypeError,ForNonNullableByDefault} Never;
 static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test4() => A<int>.new; // Error.
-                               ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C4 as{TypeError,ForNonNullableByDefault} Never;
 static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -97,7 +97,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-                               ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C5 as{TypeError,ForNonNullableByDefault} Never;
 static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -107,7 +107,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-                               ^" in (#C6) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C6 as{TypeError,ForNonNullableByDefault} Never;
 static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -121,7 +121,7 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test11() => A.bar1; // Error.
-                                ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
+                                ^" in #C7 as{TypeError,ForNonNullableByDefault} Never;
 static method test12() → () → self::A<core::int>
   return #C8;
 static method test13() → () → self::A<core::int>
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
index 1b4c49e..40ac9f8 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
@@ -75,19 +75,19 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test2() => A.foo2; // Error.
-                               ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C2 as{TypeError,ForNonNullableByDefault} Never;
 static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test3() => A.new; // Error.
-                               ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C3 as{TypeError,ForNonNullableByDefault} Never;
 static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test4() => A<int>.new; // Error.
-                               ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C4 as{TypeError,ForNonNullableByDefault} Never;
 static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -97,7 +97,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-                               ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C5 as{TypeError,ForNonNullableByDefault} Never;
 static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -107,7 +107,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
 A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-                               ^" in (#C6) as{TypeError,ForNonNullableByDefault} Never;
+                               ^" in #C6 as{TypeError,ForNonNullableByDefault} Never;
 static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
 Try removing the extra type arguments.
@@ -121,7 +121,7 @@
  - 'X/*1*/' is from 'unknown'.
  - 'X/*2*/' is from 'unknown'.
 A<X> Function<X>(X) test11() => A.bar1; // Error.
-                                ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
+                                ^" in #C7 as{TypeError,ForNonNullableByDefault} Never;
 static method test12() → () → self::A<core::int>
   return #C8;
 static method test13() → () → self::A<core::int>
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart
new file mode 100644
index 0000000..f3c1fd4
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart
@@ -0,0 +1,26 @@
+// 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.
+
+T id<T>(T t) => t;
+T Function<T>(T) alias = id;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+method(int Function(int) f) {}
+
+test() {
+  Class c = new Class();
+  int Function(int) f = alias;
+  int Function(int) g;
+  g = alias;
+  int Function(int) h = c;
+  g = c;
+  method(alias);
+}
+
+main() {
+  test();
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.expect
new file mode 100644
index 0000000..a39c27d
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = self::alias<core::int>;
+  (core::int) → core::int g;
+  g = self::alias<core::int>;
+  (core::int) → core::int h = (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  g = (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  self::method(self::alias<core::int>);
+}
+static method main() → dynamic {
+  self::test();
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.transformed.expect
new file mode 100644
index 0000000..a39c27d
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.strong.transformed.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = self::alias<core::int>;
+  (core::int) → core::int g;
+  g = self::alias<core::int>;
+  (core::int) → core::int h = (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  g = (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  self::method(self::alias<core::int>);
+}
+static method main() → dynamic {
+  self::test();
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline.expect
new file mode 100644
index 0000000..09034a5
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+T id<T>(T t) => t;
+T Function<T>(T) alias = id;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+method(int Function(int) f) {}
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3f658da
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.textual_outline_modelled.expect
@@ -0,0 +1,10 @@
+T Function<T>(T) alias = id;
+T id<T>(T t) => t;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+main() {}
+method(int Function(int) f) {}
+test() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.expect
new file mode 100644
index 0000000..a39c27d
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = self::alias<core::int>;
+  (core::int) → core::int g;
+  g = self::alias<core::int>;
+  (core::int) → core::int h = (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  g = (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  self::method(self::alias<core::int>);
+}
+static method main() → dynamic {
+  self::test();
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.outline.expect
new file mode 100644
index 0000000..20c75c3
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.outline.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    ;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  ;
+static method method((core::int) → core::int f) → dynamic
+  ;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.transformed.expect
new file mode 100644
index 0000000..a39c27d
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation.dart.weak.transformed.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = self::alias<core::int>;
+  (core::int) → core::int g;
+  g = self::alias<core::int>;
+  (core::int) → core::int h = (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  g = (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%})<core::int>;
+  self::method(self::alias<core::int>);
+}
+static method main() → dynamic {
+  self::test();
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart
new file mode 100644
index 0000000..beb6855
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart
@@ -0,0 +1,24 @@
+// 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.
+
+T id<T>(T t, int i) => t;
+T Function<T>(T, int i)? alias = id;
+
+class Class {
+  T call<T>(T t, int i) => t;
+}
+
+method(int Function(int, int?) f) {}
+
+test() {
+  Class c = new Class();
+  int Function(int, int) f = alias;
+  int Function(int, int?)? g;
+  g = alias;
+  int Function(int, int?) h = c;
+  g = c;
+  method(alias);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect
new file mode 100644
index 0000000..473f61e
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+//   int Function(int, int) f = alias;
+//                              ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   int Function(int, int?) h = c;
+//                           ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t, core::int i) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%, core::int) →? T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t, core::int i) → self::id::T%
+  return t;
+static method method((core::int, core::int?) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+  int Function(int, int) f = alias;
+                             ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int) → core::int;
+  (core::int, core::int?) →? core::int g;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = alias;
+      ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  int Function(int, int?) h = c;
+                          ^" in ((let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = c;
+  ^" in ((let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  method(alias);
+         ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect
new file mode 100644
index 0000000..e430e5b
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.strong.transformed.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+//   int Function(int, int) f = alias;
+//                              ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   int Function(int, int?) h = c;
+//                           ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t, core::int i) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%, core::int) →? T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t, core::int i) → self::id::T%
+  return t;
+static method method((core::int, core::int?) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+  int Function(int, int) f = alias;
+                             ^" in let (core::int, core::int) →? core::int #t1 = self::alias<core::int> in #t1 == null ?{(core::int, core::int) → core::int} #t1 as{TypeError,ForNonNullableByDefault} (core::int, core::int) → core::int : #t1{(core::int, core::int) → core::int};
+  (core::int, core::int?) →? core::int g;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = alias;
+      ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  int Function(int, int?) h = c;
+                          ^" in ((let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = c;
+  ^" in ((let final self::Class #t3 = c in #t3 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t3.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  method(alias);
+         ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline.expect
new file mode 100644
index 0000000..cb7f7b4
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+T id<T>(T t, int i) => t;
+T Function<T>(T, int i)? alias = id;
+
+class Class {
+  T call<T>(T t, int i) => t;
+}
+
+method(int Function(int, int?) f) {}
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..ecb4f22
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.textual_outline_modelled.expect
@@ -0,0 +1,10 @@
+T Function<T>(T, int i)? alias = id;
+T id<T>(T t, int i) => t;
+
+class Class {
+  T call<T>(T t, int i) => t;
+}
+
+main() {}
+method(int Function(int, int?) f) {}
+test() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.expect
new file mode 100644
index 0000000..473f61e
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+//   int Function(int, int) f = alias;
+//                              ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   int Function(int, int?) h = c;
+//                           ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t, core::int i) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%, core::int) →? T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t, core::int i) → self::id::T%
+  return t;
+static method method((core::int, core::int?) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+  int Function(int, int) f = alias;
+                             ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int) → core::int;
+  (core::int, core::int?) →? core::int g;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = alias;
+      ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  int Function(int, int?) h = c;
+                          ^" in ((let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = c;
+  ^" in ((let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) →? core::int;
+  self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  method(alias);
+         ^" in (self::alias<core::int>) as{TypeError,ForNonNullableByDefault} (core::int, core::int?) → core::int);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.outline.expect
new file mode 100644
index 0000000..6e67eb2
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.outline.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t, core::int i) → self::Class::call::T%
+    ;
+}
+static field <T extends core::Object? = dynamic>(T%, core::int) →? T% alias;
+static method id<T extends core::Object? = dynamic>(self::id::T% t, core::int i) → self::id::T%
+  ;
+static method method((core::int, core::int?) → core::int f) → dynamic
+  ;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.transformed.expect
new file mode 100644
index 0000000..b6510b1
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart.weak.transformed.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+//   int Function(int, int) f = alias;
+//                              ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   int Function(int, int?) h = c;
+//                           ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t, core::int i) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%, core::int) →? T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t, core::int i) → self::id::T%
+  return t;
+static method method((core::int, core::int?) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int, core::int) → core::int f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:16:30: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int)' because 'int Function(int, int)?' is nullable and 'int Function(int, int)' isn't.
+  int Function(int, int) f = alias;
+                             ^" in self::alias<core::int>;
+  (core::int, core::int?) →? core::int g;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:18:7: Error: A value of type 'int Function(int, int)?' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = alias;
+      ^" in self::alias<core::int>;
+  (core::int, core::int?) → core::int h = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:19:27: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  int Function(int, int?) h = c;
+                          ^" in (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>;
+  g = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:20:3: Error: A value of type 'int Function(int, int)' can't be assigned to a variable of type 'int Function(int, int?)?' because 'int?' is nullable and 'int' isn't.
+  g = c;
+  ^" in (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%, core::int) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%, core::int) → T%})<core::int>;
+  self::method(invalid-expression "pkg/front_end/testcases/constructor_tearoffs/implicit_instantiation_errors.dart:21:10: Error: The argument type 'int Function(int, int)?' can't be assigned to the parameter type 'int Function(int, int?)' because 'int?' is nullable and 'int' isn't.
+  method(alias);
+         ^" in self::alias<core::int>);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect
index ba4c564..ce055a4 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect
@@ -49,12 +49,6 @@
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
     throw "Expected ${expected}, actual ${actual}";
 }
-static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
-  return new self::A::•<self::_#F#new#tearOff::X>();
-static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
-  return new self::A::•<self::_#H#new#tearOff::X%>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect
index 966f2f6..0f0953f 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect
@@ -49,12 +49,6 @@
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
     throw "Expected ${expected}, actual ${actual}";
 }
-static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
-  return new self::A::•<self::_#F#new#tearOff::X>();
-static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
-  return new self::A::•<self::_#H#new#tearOff::X%>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -68,4 +62,4 @@
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:34:3 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:35:3 -> BoolConstant(true)
-Extra constant evaluation: evaluated: 36, effectively constant: 6
+Extra constant evaluation: evaluated: 33, effectively constant: 6
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect
index 379376e..1121885 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect
@@ -49,12 +49,6 @@
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
     throw "Expected ${expected}, actual ${actual}";
 }
-static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
-  return new self::A::•<self::_#F#new#tearOff::X>();
-static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
-  return new self::A::•<self::_#H#new#tearOff::X%>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect
index 6063fc6..ab09476 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect
@@ -12,25 +12,19 @@
 static final field core::bool inSoundMode;
 static const field () → self::A<core::int> f1a = self::A::•<core::int>;
 static const field () → self::A<core::int> f1b = self::A::•<core::int>;
-static const field () → self::A<core::int> f1c = self::_#F#new#tearOff<core::int>;
+static const field () → self::A<core::int> f1c = (<X extends core::num>.(self::A::•<X>))<core::int>;
 static const field () → self::A<core::int> g1a = self::A::•<core::int>;
 static const field () → self::A<core::int> g1b = self::A::•<core::int>;
-static const field () → self::A<core::int> g1c = self::_#G#new#tearOff<dynamic>;
+static const field () → self::A<core::int> g1c = (<unrelated Y extends core::Object? = dynamic>.(self::A::•<core::int>))<dynamic>;
 static const field () → self::A<core::int> h1a = self::A::•<core::int>;
 static const field () → self::A<core::int> h1b = self::A::•<core::int>;
-static const field () → self::A<core::int> h1c = self::_#H#new#tearOff<core::int, dynamic>;
+static const field () → self::A<core::int> h1c = (<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>.(self::A::•<X%>))<core::int, dynamic>;
 static method main() → dynamic
   ;
 static method test<T extends core::num>() → dynamic
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
-static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
-  return new self::A::•<self::_#F#new#tearOff::X>();
-static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
-  return new self::A::•<self::_#H#new#tearOff::X%>();
 
 
 Extra constant evaluation status:
@@ -43,4 +37,4 @@
 Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:21:13 -> InstantiationConstant(A.<int*>)
 Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:22:13 -> InstantiationConstant(A.<int*>)
 Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:23:31 -> InstantiationConstant(A.<int*>)
-Extra constant evaluation: evaluated: 12, effectively constant: 9
+Extra constant evaluation: evaluated: 9, effectively constant: 9
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect
index be2d1f5..74079d8 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect
@@ -49,12 +49,6 @@
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
     throw "Expected ${expected}, actual ${actual}";
 }
-static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
-  return new self::A::•<self::_#F#new#tearOff::X>();
-static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
-  return new self::A::•<core::int>();
-static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
-  return new self::A::•<self::_#H#new#tearOff::X%>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -68,4 +62,4 @@
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:34:3 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:35:3 -> BoolConstant(true)
-Extra constant evaluation: evaluated: 36, effectively constant: 6
+Extra constant evaluation: evaluated: 33, effectively constant: 6
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart
new file mode 100644
index 0000000..209a1f4
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart
@@ -0,0 +1,9 @@
+// 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.
+
+class A {}
+
+test() => A.const.toString();
+
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.expect
new file mode 100644
index 0000000..912d264
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:18: Error: Expected an identifier, but got '.'.
+// Try inserting an identifier before '.'.
+// test() => A.const.toString();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+// Try inserting an identifier before 'const'.
+// test() => A.const.toString();
+//             ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic
+  return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+Try inserting an identifier before 'const'.
+test() => A.const.toString();
+            ^^^^^";
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.transformed.expect
new file mode 100644
index 0000000..912d264
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.strong.transformed.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:18: Error: Expected an identifier, but got '.'.
+// Try inserting an identifier before '.'.
+// test() => A.const.toString();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+// Try inserting an identifier before 'const'.
+// test() => A.const.toString();
+//             ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic
+  return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+Try inserting an identifier before 'const'.
+test() => A.const.toString();
+            ^^^^^";
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.textual_outline.expect
new file mode 100644
index 0000000..a9b23c0
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+class A {}
+test() => A.const.toString();
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.expect
new file mode 100644
index 0000000..912d264
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:18: Error: Expected an identifier, but got '.'.
+// Try inserting an identifier before '.'.
+// test() => A.const.toString();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+// Try inserting an identifier before 'const'.
+// test() => A.const.toString();
+//             ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic
+  return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+Try inserting an identifier before 'const'.
+test() => A.const.toString();
+            ^^^^^";
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.outline.expect
new file mode 100644
index 0000000..3fd2ec8
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:18: Error: Expected an identifier, but got '.'.
+// Try inserting an identifier before '.'.
+// test() => A.const.toString();
+//                  ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.transformed.expect
new file mode 100644
index 0000000..912d264
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46133.dart.weak.transformed.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:18: Error: Expected an identifier, but got '.'.
+// Try inserting an identifier before '.'.
+// test() => A.const.toString();
+//                  ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+// Try inserting an identifier before 'const'.
+// test() => A.const.toString();
+//             ^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+static method test() → dynamic
+  return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46133.dart:7:13: Error: Expected an identifier, but got 'const'.
+Try inserting an identifier before 'const'.
+test() => A.const.toString();
+            ^^^^^";
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.expect
index 2c377ec..980e111 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.expect
@@ -23,35 +23,34 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return <self::m::X%>[x];
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
-  (#C4).{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 static method main() → void {
   self::A<dynamic> a = new self::A::•<dynamic>();
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::int>, <core::Object?>[2]);
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::String>, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C7, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C9, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C10, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C7, <core::Object?>["three"]);
-  (#C3).{core::Object::toString}(){() → core::String};
-  (#C4).{core::Object::toString}(){() → core::String};
+  self::FunctionApplier|applyAndPrint(#C5, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>["three"]);
+  self::FunctionApplier|applyAndPrint(#C8, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C9, <core::Object?>["three"]);
+  self::FunctionApplier|applyAndPrint(#C5, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>["three"]);
+  #C2.{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol, dynamic> {_kvPairs:#C1}
-  #C3 = constructor-tearoff self::A::named
-  #C4 = instantiation self::A::named <core::int>
-  #C5 = static-tearoff self::A::n
-  #C6 = instantiation self::A::n <core::int>
-  #C7 = instantiation self::A::n <core::String>
-  #C8 = static-tearoff self::m
-  #C9 = instantiation self::m <core::int>
-  #C10 = instantiation self::m <core::String>
+  #C1 = <core::Symbol, dynamic>{)
+  #C2 = constructor-tearoff self::A::named
+  #C3 = instantiation self::A::named <core::int>
+  #C4 = static-tearoff self::A::n
+  #C5 = instantiation self::A::n <core::int>
+  #C6 = instantiation self::A::n <core::String>
+  #C7 = static-tearoff self::m
+  #C8 = instantiation self::m <core::int>
+  #C9 = instantiation self::m <core::String>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.transformed.expect
index 67fea71..ae6ee29 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.strong.transformed.expect
@@ -23,35 +23,34 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return core::_GrowableList::_literal1<self::m::X%>(x);
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
-  (#C4).{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 static method main() → void {
   self::A<dynamic> a = new self::A::•<dynamic>();
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::int>, core::_GrowableList::_literal1<core::Object?>(2));
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::String>, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C7, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C9, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C10, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C7, core::_GrowableList::_literal1<core::Object?>("three"));
-  (#C3).{core::Object::toString}(){() → core::String};
-  (#C4).{core::Object::toString}(){() → core::String};
+  self::FunctionApplier|applyAndPrint(#C5, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>("three"));
+  self::FunctionApplier|applyAndPrint(#C8, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C9, core::_GrowableList::_literal1<core::Object?>("three"));
+  self::FunctionApplier|applyAndPrint(#C5, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>("three"));
+  #C2.{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol, dynamic> {_kvPairs:#C1}
-  #C3 = constructor-tearoff self::A::named
-  #C4 = instantiation self::A::named <core::int>
-  #C5 = static-tearoff self::A::n
-  #C6 = instantiation self::A::n <core::int>
-  #C7 = instantiation self::A::n <core::String>
-  #C8 = static-tearoff self::m
-  #C9 = instantiation self::m <core::int>
-  #C10 = instantiation self::m <core::String>
+  #C1 = <core::Symbol, dynamic>{)
+  #C2 = constructor-tearoff self::A::named
+  #C3 = instantiation self::A::named <core::int>
+  #C4 = static-tearoff self::A::n
+  #C5 = instantiation self::A::n <core::int>
+  #C6 = instantiation self::A::n <core::String>
+  #C7 = static-tearoff self::m
+  #C8 = instantiation self::m <core::int>
+  #C9 = instantiation self::m <core::String>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.expect
index a112778..4ad97c0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.expect
@@ -23,35 +23,34 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return <self::m::X%>[x];
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
-  (#C4).{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 static method main() → void {
   self::A<dynamic> a = new self::A::•<dynamic>();
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::int>, <core::Object?>[2]);
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::String>, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C7, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C9, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C10, <core::Object?>["three"]);
-  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C7, <core::Object?>["three"]);
-  (#C3).{core::Object::toString}(){() → core::String};
-  (#C4).{core::Object::toString}(){() → core::String};
+  self::FunctionApplier|applyAndPrint(#C5, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>["three"]);
+  self::FunctionApplier|applyAndPrint(#C8, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C9, <core::Object?>["three"]);
+  self::FunctionApplier|applyAndPrint(#C5, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C6, <core::Object?>["three"]);
+  #C2.{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C1}
-  #C3 = constructor-tearoff self::A::named
-  #C4 = instantiation self::A::named <core::int*>
-  #C5 = static-tearoff self::A::n
-  #C6 = instantiation self::A::n <core::int*>
-  #C7 = instantiation self::A::n <core::String*>
-  #C8 = static-tearoff self::m
-  #C9 = instantiation self::m <core::int*>
-  #C10 = instantiation self::m <core::String*>
+  #C1 = <core::Symbol*, dynamic>{)
+  #C2 = constructor-tearoff self::A::named
+  #C3 = instantiation self::A::named <core::int*>
+  #C4 = static-tearoff self::A::n
+  #C5 = instantiation self::A::n <core::int*>
+  #C6 = instantiation self::A::n <core::String*>
+  #C7 = static-tearoff self::m
+  #C8 = instantiation self::m <core::int*>
+  #C9 = instantiation self::m <core::String*>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.transformed.expect
index ca0d633..516e952 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46719.dart.weak.transformed.expect
@@ -23,35 +23,34 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return core::_GrowableList::_literal1<self::m::X%>(x);
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
-  (#C4).{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 static method main() → void {
   self::A<dynamic> a = new self::A::•<dynamic>();
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::int>, core::_GrowableList::_literal1<core::Object?>(2));
   self::FunctionApplier|applyAndPrint(a.{self::A::m}{<X extends core::Object? = dynamic>(X%) → core::List<X%>}<core::String>, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C7, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C9, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C10, core::_GrowableList::_literal1<core::Object?>("three"));
-  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C7, core::_GrowableList::_literal1<core::Object?>("three"));
-  (#C3).{core::Object::toString}(){() → core::String};
-  (#C4).{core::Object::toString}(){() → core::String};
+  self::FunctionApplier|applyAndPrint(#C5, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>("three"));
+  self::FunctionApplier|applyAndPrint(#C8, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C9, core::_GrowableList::_literal1<core::Object?>("three"));
+  self::FunctionApplier|applyAndPrint(#C5, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C6, core::_GrowableList::_literal1<core::Object?>("three"));
+  #C2.{core::Object::toString}(){() → core::String};
+  #C3.{core::Object::toString}(){() → core::String};
 }
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C1}
-  #C3 = constructor-tearoff self::A::named
-  #C4 = instantiation self::A::named <core::int*>
-  #C5 = static-tearoff self::A::n
-  #C6 = instantiation self::A::n <core::int*>
-  #C7 = instantiation self::A::n <core::String*>
-  #C8 = static-tearoff self::m
-  #C9 = instantiation self::m <core::int*>
-  #C10 = instantiation self::m <core::String*>
+  #C1 = <core::Symbol*, dynamic>{)
+  #C2 = constructor-tearoff self::A::named
+  #C3 = instantiation self::A::named <core::int*>
+  #C4 = static-tearoff self::A::n
+  #C5 = instantiation self::A::n <core::int*>
+  #C6 = instantiation self::A::n <core::String*>
+  #C7 = static-tearoff self::m
+  #C8 = instantiation self::m <core::int*>
+  #C9 = instantiation self::m <core::String*>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.expect
index 1c0eeb1..1d51613 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.expect
@@ -10,7 +10,7 @@
   return "a<${self::a::T1%}, ${self::a::T2%}>(${x})";
 }
 static method main() → dynamic {
-  self::expect("${#C3}, null", self::f((#C3).{core::Object::toString}(){() → core::String}));
+  self::expect("${#C3}, null", self::f(#C3.{core::Object::toString}(){() → core::String}));
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.transformed.expect
index 1c0eeb1..1d51613 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
   return "a<${self::a::T1%}, ${self::a::T2%}>(${x})";
 }
 static method main() → dynamic {
-  self::expect("${#C3}, null", self::f((#C3).{core::Object::toString}(){() → core::String}));
+  self::expect("${#C3}, null", self::f(#C3.{core::Object::toString}(){() → core::String}));
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.expect
index 19cc640..b1a240e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.expect
@@ -10,7 +10,7 @@
   return "a<${self::a::T1%}, ${self::a::T2%}>(${x})";
 }
 static method main() → dynamic {
-  self::expect("${#C3}, null", self::f((#C3).{core::Object::toString}(){() → core::String}));
+  self::expect("${#C3}, null", self::f(#C3.{core::Object::toString}(){() → core::String}));
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.transformed.expect
index 19cc640..b1a240e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46887.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
   return "a<${self::a::T1%}, ${self::a::T2%}>(${x})";
 }
 static method main() → dynamic {
-  self::expect("${#C3}, null", self::f((#C3).{core::Object::toString}(){() → core::String}));
+  self::expect("${#C3}, null", self::f(#C3.{core::Object::toString}(){() → core::String}));
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart
new file mode 100644
index 0000000..a45bc22
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart
@@ -0,0 +1,25 @@
+// 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.
+
+class A {
+  final int Function(int) x;
+  const A(bool b)
+      : x = (b
+            ? id
+            : other)<int>; // OK, `(...)<T1..Tk>` is potentially constant.
+}
+
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+
+void main() {
+  const c1 =
+      id<int>; // Already supported prior to the addition on this feature.
+  const c2 =
+      id; // Make `c2` a constant expression whose value is a function object.
+  const c3 = c2<int>; // OK, perform generic function instantiation on `c2`.
+  const c4 = A(
+      true); // OK, `(b ? id : other)<int>` is constant after substitution `b` -> `true`.
+  print('$c1, $c2, $c3, $c4');
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.expect
new file mode 100644
index 0000000..a23b6b4
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = (b ?{<X extends core::Object? = dynamic>(X%) → X%} #C1 : #C2)<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C3}, ${#C1}, ${#C3}, ${#C4}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = static-tearoff self::other
+  #C3 = instantiation self::id <core::int>
+  #C4 = self::A {x:#C3}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154a.dart:
+- A. (from org-dartlang-testcase:///issue47154a.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.transformed.expect
new file mode 100644
index 0000000..a23b6b4
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.strong.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = (b ?{<X extends core::Object? = dynamic>(X%) → X%} #C1 : #C2)<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C3}, ${#C1}, ${#C3}, ${#C4}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = static-tearoff self::other
+  #C3 = instantiation self::id <core::int>
+  #C4 = self::A {x:#C3}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154a.dart:
+- A. (from org-dartlang-testcase:///issue47154a.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline.expect
new file mode 100644
index 0000000..17cdb52
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+class A {
+  final int Function(int) x;
+  const A(bool b) : x = (b ? id : other)<int>;
+}
+
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6598e5a
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.textual_outline_modelled.expect
@@ -0,0 +1,9 @@
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+
+class A {
+  const A(bool b) : x = (b ? id : other)<int>;
+  final int Function(int) x;
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.expect
new file mode 100644
index 0000000..55aaf0f
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = (b ?{<X extends core::Object? = dynamic>(X%) → X%} #C1 : #C2)<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C3}, ${#C1}, ${#C3}, ${#C4}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = static-tearoff self::other
+  #C3 = instantiation self::id <core::int*>
+  #C4 = self::A {x:#C3}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154a.dart:
+- A. (from org-dartlang-testcase:///issue47154a.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.outline.expect
new file mode 100644
index 0000000..efc3521
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = (b ?{<X extends core::Object? = dynamic>(X%) → X%} self::id : self::other)<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  ;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  ;
+static method main() → void
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue47154a.dart:9:15 -> StaticTearOffConstant(id)
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue47154a.dart:10:15 -> StaticTearOffConstant(other)
+Extra constant evaluation: evaluated: 5, effectively constant: 2
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.transformed.expect
new file mode 100644
index 0000000..55aaf0f
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154a.dart.weak.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = (b ?{<X extends core::Object? = dynamic>(X%) → X%} #C1 : #C2)<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C3}, ${#C1}, ${#C3}, ${#C4}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = static-tearoff self::other
+  #C3 = instantiation self::id <core::int*>
+  #C4 = self::A {x:#C3}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154a.dart:
+- A. (from org-dartlang-testcase:///issue47154a.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart
new file mode 100644
index 0000000..bc54add
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart
@@ -0,0 +1,24 @@
+// 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.
+
+class A {
+  final int Function(int) x;
+  const A(bool b)
+      : x = (b ? id : other); // OK, `(...)<T1..Tk>` is potentially constant.
+}
+
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+
+void main() {
+  const int Function(int) c1 =
+      id; // Already supported prior to the addition on this feature.
+  const c2 =
+      id; // Make `c2` a constant expression whose value is a function object.
+  const int Function(int) c3 =
+      c2; // OK, perform generic function instantiation on `c2`.
+  const c4 = A(
+      true); // OK, `(b ? id : other)<int>` is constant after substitution `b` -> `true`.
+  print('$c1, $c2, $c3, $c4');
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.expect
new file mode 100644
index 0000000..41ae260
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = b ?{(core::int) → core::int} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C2}, ${#C1}, ${#C2}, ${#C5}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = instantiation self::id <core::int>
+  #C3 = static-tearoff self::other
+  #C4 = instantiation self::other <core::int>
+  #C5 = self::A {x:#C2}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154b.dart:
+- A. (from org-dartlang-testcase:///issue47154b.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.transformed.expect
new file mode 100644
index 0000000..41ae260
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.strong.transformed.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = b ?{(core::int) → core::int} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C2}, ${#C1}, ${#C2}, ${#C5}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = instantiation self::id <core::int>
+  #C3 = static-tearoff self::other
+  #C4 = instantiation self::other <core::int>
+  #C5 = self::A {x:#C2}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154b.dart:
+- A. (from org-dartlang-testcase:///issue47154b.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline.expect
new file mode 100644
index 0000000..5d52a74
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+class A {
+  final int Function(int) x;
+  const A(bool b) : x = (b ? id : other);
+}
+
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e5a005e
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.textual_outline_modelled.expect
@@ -0,0 +1,9 @@
+X id<X>(X x) => x;
+X other<X>(X x) => throw '$x';
+
+class A {
+  const A(bool b) : x = (b ? id : other);
+  final int Function(int) x;
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.expect
new file mode 100644
index 0000000..535ad97
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = b ?{(core::int) → core::int} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C2}, ${#C1}, ${#C2}, ${#C5}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = instantiation self::id <core::int*>
+  #C3 = static-tearoff self::other
+  #C4 = instantiation self::other <core::int*>
+  #C5 = self::A {x:#C2}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154b.dart:
+- A. (from org-dartlang-testcase:///issue47154b.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.outline.expect
new file mode 100644
index 0000000..ca341b8
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = b ?{(core::int) → core::int} self::id<core::int> : self::other<core::int>, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  ;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  ;
+static method main() → void
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: Instantiation @ org-dartlang-testcase:///issue47154b.dart:8:18 -> InstantiationConstant(id<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///issue47154b.dart:8:23 -> InstantiationConstant(other<int*>)
+Extra constant evaluation: evaluated: 4, effectively constant: 2
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.transformed.expect
new file mode 100644
index 0000000..535ad97
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154b.dart.weak.transformed.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object /*hasConstConstructor*/  {
+  final field (core::int) → core::int x;
+  const constructor •(core::bool b) → self::A
+    : self::A::x = b ?{(core::int) → core::int} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method id<X extends core::Object? = dynamic>(self::id::X% x) → self::id::X%
+  return x;
+static method other<X extends core::Object? = dynamic>(self::other::X% x) → self::other::X%
+  return throw "${x}";
+static method main() → void {
+  core::print("${#C2}, ${#C1}, ${#C2}, ${#C5}");
+}
+
+constants  {
+  #C1 = static-tearoff self::id
+  #C2 = instantiation self::id <core::int*>
+  #C3 = static-tearoff self::other
+  #C4 = instantiation self::other <core::int*>
+  #C5 = self::A {x:#C2}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154b.dart:
+- A. (from org-dartlang-testcase:///issue47154b.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart
new file mode 100644
index 0000000..26bd054
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart
@@ -0,0 +1,32 @@
+// 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.
+
+// A potentially constant type expression is supported for `as` (and `is`)
+class A<X> {
+  final List<X> x;
+  const A(x) : x = x is List<X> ? x : x as List<X>;
+}
+
+void m<X>(X x) {}
+
+// Generic function instantiation to a type parameter is supported implicitly.
+class B<X> {
+  final void Function(X) f;
+  const B() : f = m;
+}
+
+// But it is not supported explicitly.
+class C<X> {
+  final f;
+  const C() : f = m<X>; // Error, but should be accepted.
+}
+
+void main() {
+  const A<int>(<int>[1]); // OK.
+  const b = B<String>(); // OK.
+  print(b.f.runtimeType); // OK: 'String => void'.
+  const c = C<
+      String>(); // Compile-time error in `C`, but should be accepted when it works.
+  print(c.f.runtimeType); // (Never executed, so we don't know).
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.expect
new file mode 100644
index 0000000..f4cf0df
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<self::A::X%> x;
+  const constructor •(dynamic x) → self::A<self::A::X%>
+    : self::A::x = x is{ForNonNullableByDefault} core::List<self::A::X%> ?{core::List<self::A::X%>} x{core::List<self::A::X%>} : x as{ForNonNullableByDefault} core::List<self::A::X%>, super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field (self::B::X%) → void f;
+  const constructor •() → self::B<self::B::X%>
+    : self::B::f = #C1<self::B::X%>, super core::Object::•()
+    ;
+}
+class C<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic f;
+  const constructor •() → self::C<self::C::X%>
+    : self::C::f = #C1<self::C::X%>, super core::Object::•()
+    ;
+}
+static method m<X extends core::Object? = dynamic>(self::m::X% x) → void {}
+static method main() → void {
+  #C4;
+  core::print((#C6.{self::B::f}{(core::String) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} (core::String) → void).{core::Object::runtimeType}{core::Type});
+  core::print(#C7.{self::C::f}{dynamic}.{core::Object::runtimeType}{core::Type});
+}
+
+constants  {
+  #C1 = static-tearoff self::m
+  #C2 = 1
+  #C3 = <core::int>[#C2]
+  #C4 = self::A<core::int> {x:#C3}
+  #C5 = instantiation self::m <core::String>
+  #C6 = self::B<core::String> {f:#C5}
+  #C7 = self::C<core::String> {f:#C5}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154c.dart:
+- A. (from org-dartlang-testcase:///issue47154c.dart:8:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
+- B. (from org-dartlang-testcase:///issue47154c.dart:16:9)
+- C. (from org-dartlang-testcase:///issue47154c.dart:22:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.transformed.expect
new file mode 100644
index 0000000..f4cf0df
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.strong.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<self::A::X%> x;
+  const constructor •(dynamic x) → self::A<self::A::X%>
+    : self::A::x = x is{ForNonNullableByDefault} core::List<self::A::X%> ?{core::List<self::A::X%>} x{core::List<self::A::X%>} : x as{ForNonNullableByDefault} core::List<self::A::X%>, super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field (self::B::X%) → void f;
+  const constructor •() → self::B<self::B::X%>
+    : self::B::f = #C1<self::B::X%>, super core::Object::•()
+    ;
+}
+class C<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic f;
+  const constructor •() → self::C<self::C::X%>
+    : self::C::f = #C1<self::C::X%>, super core::Object::•()
+    ;
+}
+static method m<X extends core::Object? = dynamic>(self::m::X% x) → void {}
+static method main() → void {
+  #C4;
+  core::print((#C6.{self::B::f}{(core::String) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} (core::String) → void).{core::Object::runtimeType}{core::Type});
+  core::print(#C7.{self::C::f}{dynamic}.{core::Object::runtimeType}{core::Type});
+}
+
+constants  {
+  #C1 = static-tearoff self::m
+  #C2 = 1
+  #C3 = <core::int>[#C2]
+  #C4 = self::A<core::int> {x:#C3}
+  #C5 = instantiation self::m <core::String>
+  #C6 = self::B<core::String> {f:#C5}
+  #C7 = self::C<core::String> {f:#C5}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154c.dart:
+- A. (from org-dartlang-testcase:///issue47154c.dart:8:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
+- B. (from org-dartlang-testcase:///issue47154c.dart:16:9)
+- C. (from org-dartlang-testcase:///issue47154c.dart:22:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline.expect
new file mode 100644
index 0000000..31e8d36
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline.expect
@@ -0,0 +1,18 @@
+class A<X> {
+  final List<X> x;
+  const A(x) : x = x is List<X> ? x : x as List<X>;
+}
+
+void m<X>(X x) {}
+
+class B<X> {
+  final void Function(X) f;
+  const B() : f = m;
+}
+
+class C<X> {
+  final f;
+  const C() : f = m<X>;
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..1a39222
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.textual_outline_modelled.expect
@@ -0,0 +1,17 @@
+class A<X> {
+  const A(x) : x = x is List<X> ? x : x as List<X>;
+  final List<X> x;
+}
+
+class B<X> {
+  const B() : f = m;
+  final void Function(X) f;
+}
+
+class C<X> {
+  const C() : f = m<X>;
+  final f;
+}
+
+void m<X>(X x) {}
+void main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.expect
new file mode 100644
index 0000000..78d6475
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<self::A::X%> x;
+  const constructor •(dynamic x) → self::A<self::A::X%>
+    : self::A::x = x is{ForNonNullableByDefault} core::List<self::A::X%> ?{core::List<self::A::X%>} x{core::List<self::A::X%>} : x as{ForNonNullableByDefault} core::List<self::A::X%>, super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field (self::B::X%) → void f;
+  const constructor •() → self::B<self::B::X%>
+    : self::B::f = #C1<self::B::X%>, super core::Object::•()
+    ;
+}
+class C<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic f;
+  const constructor •() → self::C<self::C::X%>
+    : self::C::f = #C1<self::C::X%>, super core::Object::•()
+    ;
+}
+static method m<X extends core::Object? = dynamic>(self::m::X% x) → void {}
+static method main() → void {
+  #C4;
+  core::print((#C6.{self::B::f}{(core::String) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} (core::String) → void).{core::Object::runtimeType}{core::Type});
+  core::print(#C7.{self::C::f}{dynamic}.{core::Object::runtimeType}{core::Type});
+}
+
+constants  {
+  #C1 = static-tearoff self::m
+  #C2 = 1
+  #C3 = <core::int*>[#C2]
+  #C4 = self::A<core::int*> {x:#C3}
+  #C5 = instantiation self::m <core::String*>
+  #C6 = self::B<core::String*> {f:#C5}
+  #C7 = self::C<core::String*> {f:#C5}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154c.dart:
+- A. (from org-dartlang-testcase:///issue47154c.dart:8:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
+- B. (from org-dartlang-testcase:///issue47154c.dart:16:9)
+- C. (from org-dartlang-testcase:///issue47154c.dart:22:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.outline.expect
new file mode 100644
index 0000000..3c229cc
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.outline.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<self::A::X%> x;
+  const constructor •(dynamic x) → self::A<self::A::X%>
+    : self::A::x = x is{ForNonNullableByDefault} core::List<self::A::X%> ?{core::List<self::A::X%>} x{core::List<self::A::X%>} : x as{ForNonNullableByDefault} core::List<self::A::X%>, super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field (self::B::X%) → void f;
+  const constructor •() → self::B<self::B::X%>
+    : self::B::f = self::m<self::B::X%>, super core::Object::•()
+    ;
+}
+class C<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic f;
+  const constructor •() → self::C<self::C::X%>
+    : self::C::f = self::m<self::C::X%>, super core::Object::•()
+    ;
+}
+static method m<X extends core::Object? = dynamic>(self::m::X% x) → void
+  ;
+static method main() → void
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue47154c.dart:16:19 -> StaticTearOffConstant(m)
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue47154c.dart:22:19 -> StaticTearOffConstant(m)
+Extra constant evaluation: evaluated: 10, effectively constant: 2
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.transformed.expect
new file mode 100644
index 0000000..78d6475
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue47154c.dart.weak.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<self::A::X%> x;
+  const constructor •(dynamic x) → self::A<self::A::X%>
+    : self::A::x = x is{ForNonNullableByDefault} core::List<self::A::X%> ?{core::List<self::A::X%>} x{core::List<self::A::X%>} : x as{ForNonNullableByDefault} core::List<self::A::X%>, super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field (self::B::X%) → void f;
+  const constructor •() → self::B<self::B::X%>
+    : self::B::f = #C1<self::B::X%>, super core::Object::•()
+    ;
+}
+class C<X extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic f;
+  const constructor •() → self::C<self::C::X%>
+    : self::C::f = #C1<self::C::X%>, super core::Object::•()
+    ;
+}
+static method m<X extends core::Object? = dynamic>(self::m::X% x) → void {}
+static method main() → void {
+  #C4;
+  core::print((#C6.{self::B::f}{(core::String) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} (core::String) → void).{core::Object::runtimeType}{core::Type});
+  core::print(#C7.{self::C::f}{dynamic}.{core::Object::runtimeType}{core::Type});
+}
+
+constants  {
+  #C1 = static-tearoff self::m
+  #C2 = 1
+  #C3 = <core::int*>[#C2]
+  #C4 = self::A<core::int*> {x:#C3}
+  #C5 = instantiation self::m <core::String*>
+  #C6 = self::B<core::String*> {f:#C5}
+  #C7 = self::C<core::String*> {f:#C5}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue47154c.dart:
+- A. (from org-dartlang-testcase:///issue47154c.dart:8:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
+- B. (from org-dartlang-testcase:///issue47154c.dart:16:9)
+- C. (from org-dartlang-testcase:///issue47154c.dart:22:9)
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
index 9957901..8666359 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
@@ -23,7 +23,7 @@
   (core::int) → self::Class f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri_part.dart:8:27: Error: A value of type 'Class Function()' can't be assigned to a variable of type 'Class Function(int)'.
  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart'.
   Class Function(int) f = Class.new;
-                          ^" in (#C1) as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
+                          ^" in #C1 as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
index 9957901..8666359 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
@@ -23,7 +23,7 @@
   (core::int) → self::Class f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri_part.dart:8:27: Error: A value of type 'Class Function()' can't be assigned to a variable of type 'Class Function(int)'.
  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart'.
   Class Function(int) f = Class.new;
-                          ^" in (#C1) as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
+                          ^" in #C1 as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
index 9957901..8666359 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
@@ -23,7 +23,7 @@
   (core::int) → self::Class f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri_part.dart:8:27: Error: A value of type 'Class Function()' can't be assigned to a variable of type 'Class Function(int)'.
  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart'.
   Class Function(int) f = Class.new;
-                          ^" in (#C1) as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
+                          ^" in #C1 as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
index 9957901..8666359 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
@@ -23,7 +23,7 @@
   (core::int) → self::Class f = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri_part.dart:8:27: Error: A value of type 'Class Function()' can't be assigned to a variable of type 'Class Function(int)'.
  - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart'.
   Class Function(int) f = Class.new;
-                          ^" in (#C1) as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
+                          ^" in #C1 as{TypeError,ForNonNullableByDefault} (core::int) → self::Class;
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.expect
index d952a09..254bc55 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.expect
@@ -19,7 +19,7 @@
 }
 class B<T extends core::Object? = dynamic> extends core::Object implements self::A {
   field core::int field1;
-  generic-covariant-impl field self::B::T% field2;
+  covariant-by-class field self::B::T% field2;
   constructor •(core::int field1, self::B::T% field2) → self::B<self::B::T%>
     : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.transformed.expect
index d952a09..254bc55 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
 }
 class B<T extends core::Object? = dynamic> extends core::Object implements self::A {
   field core::int field1;
-  generic-covariant-impl field self::B::T% field2;
+  covariant-by-class field self::B::T% field2;
   constructor •(core::int field1, self::B::T% field2) → self::B<self::B::T%>
     : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.expect
index 9294ac3..b80b9d5 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.expect
@@ -19,7 +19,7 @@
 }
 class B<T extends core::Object? = dynamic> extends core::Object implements self::A {
   field core::int field1;
-  generic-covariant-impl field self::B::T% field2;
+  covariant-by-class field self::B::T% field2;
   constructor •(core::int field1, self::B::T% field2) → self::B<self::B::T%>
     : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.outline.expect
index c32ee60..1277311 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.outline.expect
@@ -17,7 +17,7 @@
 }
 class B<T extends core::Object? = dynamic> extends core::Object implements self::A {
   field core::int field1;
-  generic-covariant-impl field self::B::T% field2;
+  covariant-by-class field self::B::T% field2;
   constructor •(core::int field1, self::B::T% field2) → self::B<self::B::T%>
     ;
   constructor named(core::int field1, self::B::T% field2) → self::B<self::B::T%>
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.transformed.expect
index 9294ac3..b80b9d5 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
 }
 class B<T extends core::Object? = dynamic> extends core::Object implements self::A {
   field core::int field1;
-  generic-covariant-impl field self::B::T% field2;
+  covariant-by-class field self::B::T% field2;
   constructor •(core::int field1, self::B::T% field2) → self::B<self::B::T%>
     : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
index dfb83e1..952cefe 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
@@ -36,21 +36,21 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function() test2() => A.foo2; // Error.
-                        ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
+                        ^" in #C2 as{TypeError,ForNonNullableByDefault} () → self::A;
 static method test3() → () → self::A
   return #C3;
 static method test4() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test4() => A.new; // Error.
-                           ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C3 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method test5() → () → self::A
   return #C4;
 static method test6() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test6() => A.bar1; // Error.
-                           ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C4 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method main() → dynamic {}
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
index dfb83e1..952cefe 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
@@ -36,21 +36,21 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function() test2() => A.foo2; // Error.
-                        ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
+                        ^" in #C2 as{TypeError,ForNonNullableByDefault} () → self::A;
 static method test3() → () → self::A
   return #C3;
 static method test4() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test4() => A.new; // Error.
-                           ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C3 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method test5() → () → self::A
   return #C4;
 static method test6() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test6() => A.bar1; // Error.
-                           ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C4 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method main() → dynamic {}
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
index dfb83e1..952cefe 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
@@ -36,21 +36,21 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function() test2() => A.foo2; // Error.
-                        ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
+                        ^" in #C2 as{TypeError,ForNonNullableByDefault} () → self::A;
 static method test3() → () → self::A
   return #C3;
 static method test4() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test4() => A.new; // Error.
-                           ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C3 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method test5() → () → self::A
   return #C4;
 static method test6() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test6() => A.bar1; // Error.
-                           ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C4 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method main() → dynamic {}
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
index dfb83e1..952cefe 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
@@ -36,21 +36,21 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function() test2() => A.foo2; // Error.
-                        ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
+                        ^" in #C2 as{TypeError,ForNonNullableByDefault} () → self::A;
 static method test3() → () → self::A
   return #C3;
 static method test4() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test4() => A.new; // Error.
-                           ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C3 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method test5() → () → self::A
   return #C4;
 static method test6() → (core::int) → self::A
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
  - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
 A Function(int) test6() => A.bar1; // Error.
-                           ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+                           ^" in #C4 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
 static method main() → dynamic {}
 
 constants  {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.expect
index 6f4cc26..2949323 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.expect
@@ -65,10 +65,6 @@
 static method test5() → dynamic
   return invalid-expression "This assertion failed.";
 static method main() → dynamic {}
-static method _#B4#new#tearOff<T extends core::int>() → self::A4<self::_#B4#new#tearOff::T>
-  return new self::A4::•<self::_#B4#new#tearOff::T>();
-static method _#B5#new#tearOff<unrelated T extends core::List<core::Object?>, unrelated S extends Null>() → self::A5<core::List<dynamic>, Never?>
-  return new self::A5::•<core::List<dynamic>, Never?>();
 
 constants  {
   #C1 = self::StaticIdentityTest {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.transformed.expect
index 6f4cc26..2949323 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.strong.transformed.expect
@@ -65,10 +65,6 @@
 static method test5() → dynamic
   return invalid-expression "This assertion failed.";
 static method main() → dynamic {}
-static method _#B4#new#tearOff<T extends core::int>() → self::A4<self::_#B4#new#tearOff::T>
-  return new self::A4::•<self::_#B4#new#tearOff::T>();
-static method _#B5#new#tearOff<unrelated T extends core::List<core::Object?>, unrelated S extends Null>() → self::A5<core::List<dynamic>, Never?>
-  return new self::A5::•<core::List<dynamic>, Never?>();
 
 constants  {
   #C1 = self::StaticIdentityTest {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.expect
index 6f4cc26..2949323 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.expect
@@ -65,10 +65,6 @@
 static method test5() → dynamic
   return invalid-expression "This assertion failed.";
 static method main() → dynamic {}
-static method _#B4#new#tearOff<T extends core::int>() → self::A4<self::_#B4#new#tearOff::T>
-  return new self::A4::•<self::_#B4#new#tearOff::T>();
-static method _#B5#new#tearOff<unrelated T extends core::List<core::Object?>, unrelated S extends Null>() → self::A5<core::List<dynamic>, Never?>
-  return new self::A5::•<core::List<dynamic>, Never?>();
 
 constants  {
   #C1 = self::StaticIdentityTest {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.outline.expect
index 13089c3..fd75da2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.outline.expect
@@ -44,7 +44,3 @@
   ;
 static method main() → dynamic
   ;
-static method _#B4#new#tearOff<T extends core::int>() → self::A4<self::_#B4#new#tearOff::T>
-  return new self::A4::•<self::_#B4#new#tearOff::T>();
-static method _#B5#new#tearOff<unrelated T extends core::List<core::Object?>, unrelated S extends Null>() → self::A5<core::List<dynamic>, Never?>
-  return new self::A5::•<core::List<dynamic>, Never?>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.transformed.expect
index 6f4cc26..2949323 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.weak.transformed.expect
@@ -65,10 +65,6 @@
 static method test5() → dynamic
   return invalid-expression "This assertion failed.";
 static method main() → dynamic {}
-static method _#B4#new#tearOff<T extends core::int>() → self::A4<self::_#B4#new#tearOff::T>
-  return new self::A4::•<self::_#B4#new#tearOff::T>();
-static method _#B5#new#tearOff<unrelated T extends core::List<core::Object?>, unrelated S extends Null>() → self::A5<core::List<dynamic>, Never?>
-  return new self::A5::•<core::List<dynamic>, Never?>();
 
 constants  {
   #C1 = self::StaticIdentityTest {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.expect
index f018785e..ba3e087 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.expect
@@ -80,8 +80,6 @@
                    ^^^";
 }
 static method main() → dynamic {}
-static method _#D2#new#tearOff<X extends core::num>() → self::A<self::_#D2#new#tearOff::X>
-  return new self::A::•<self::_#D2#new#tearOff::X>();
 
 constants  {
   #C1 = static-tearoff self::A::foo
diff --git a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.transformed.expect
index f018785e..ba3e087 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.strong.transformed.expect
@@ -80,8 +80,6 @@
                    ^^^";
 }
 static method main() → dynamic {}
-static method _#D2#new#tearOff<X extends core::num>() → self::A<self::_#D2#new#tearOff::X>
-  return new self::A::•<self::_#D2#new#tearOff::X>();
 
 constants  {
   #C1 = static-tearoff self::A::foo
diff --git a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.expect
index 67dd644..59bdc1d 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.expect
@@ -80,8 +80,6 @@
                    ^^^";
 }
 static method main() → dynamic {}
-static method _#D2#new#tearOff<X extends core::num>() → self::A<self::_#D2#new#tearOff::X>
-  return new self::A::•<self::_#D2#new#tearOff::X>();
 
 constants  {
   #C1 = static-tearoff self::A::foo
diff --git a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.outline.expect
index 07e6b54..377862f 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.outline.expect
@@ -14,5 +14,3 @@
   ;
 static method main() → dynamic
   ;
-static method _#D2#new#tearOff<X extends core::num>() → self::A<self::_#D2#new#tearOff::X>
-  return new self::A::•<self::_#D2#new#tearOff::X>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.transformed.expect
index 67dd644..59bdc1d 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/static_tearoff_from_instantiated_class.dart.weak.transformed.expect
@@ -80,8 +80,6 @@
                    ^^^";
 }
 static method main() → dynamic {}
-static method _#D2#new#tearOff<X extends core::num>() → self::A<self::_#D2#new#tearOff::X>
-  return new self::A::•<self::_#D2#new#tearOff::X>();
 
 constants  {
   #C1 = static-tearoff self::A::foo
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
index ae2f0d4..6c0edc7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
@@ -15,11 +15,21 @@
 // B<num> Function() test9() => DB1.new; // Error.
 //                              ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y>() test17() => DB2.new; // Error.
+//                                ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y>() test17() => DB2.new; // Error.
 //                                ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+//                                   ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
@@ -68,7 +78,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<num> Function() test9() => DB1.new; // Error.
-                             ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+                             ^" in #C4 as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
 static method test10() → () → self::B<core::String>
   return #C6;
 static method test11() → () → self::B<core::String>
@@ -87,7 +97,10 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y>() test17() => DB2.new; // Error.
-                               ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+                               ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y>() test17() => DB2.new; // Error.
+                               ^" in #C12 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%> as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
 static method test18() → () → self::B<core::num>
   return #C9;
 static method test19() → () → self::B<core::num>
@@ -102,24 +115,13 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
-                                  ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+                                  ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+                                  ^" in #C13 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%> as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
 static method test24() → () → self::B<core::String>
   return #C14;
 static method main() → dynamic {}
-static method _#DA2#new#tearOff<unrelated X extends core::num>() → self::A
-  return new self::A::•();
-static method _#DB2#new#tearOff<X extends core::num>() → self::B<self::_#DB2#new#tearOff::X>
-  return new self::B::•<self::_#DB2#new#tearOff::X>();
-static method _#DB2#foo#tearOff<X extends core::num>() → self::B<self::_#DB2#foo#tearOff::X>
-  return new self::B::foo<self::_#DB2#foo#tearOff::X>();
-static method _#DB2#bar#tearOff<X extends core::num>() → self::B<self::_#DB2#bar#tearOff::X>
-  return self::B::bar<self::_#DB2#bar#tearOff::X>();
-static method _#DB3#new#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#new#tearOff::X>
-  return new self::B::•<self::_#DB3#new#tearOff::X>();
-static method _#DB3#foo#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#foo#tearOff::X>
-  return new self::B::foo<self::_#DB3#foo#tearOff::X>();
-static method _#DB3#bar#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#bar#tearOff::X>
-  return self::B::bar<self::_#DB3#bar#tearOff::X>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -133,7 +135,7 @@
   #C9 = instantiation self::B::• <core::num>
   #C10 = instantiation self::B::foo <core::num>
   #C11 = instantiation self::B::bar <core::num>
-  #C12 = static-tearoff self::_#DB2#new#tearOff
-  #C13 = static-tearoff self::_#DB3#new#tearOff
+  #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+  #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
   #C14 = instantiation self::B::• <Never>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
index ae2f0d4..9c2c674 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
@@ -15,11 +15,21 @@
 // B<num> Function() test9() => DB1.new; // Error.
 //                              ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y>() test17() => DB2.new; // Error.
+//                                ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y>() test17() => DB2.new; // Error.
 //                                ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+//                                   ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
@@ -68,7 +78,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<num> Function() test9() => DB1.new; // Error.
-                             ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+                             ^" in #C4 as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
 static method test10() → () → self::B<core::String>
   return #C6;
 static method test11() → () → self::B<core::String>
@@ -87,7 +97,10 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y>() test17() => DB2.new; // Error.
-                               ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+                               ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y>() test17() => DB2.new; // Error.
+                               ^" in #C12 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
 static method test18() → () → self::B<core::num>
   return #C9;
 static method test19() → () → self::B<core::num>
@@ -102,24 +115,13 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
-                                  ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+                                  ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+                                  ^" in #C13 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
 static method test24() → () → self::B<core::String>
   return #C14;
 static method main() → dynamic {}
-static method _#DA2#new#tearOff<unrelated X extends core::num>() → self::A
-  return new self::A::•();
-static method _#DB2#new#tearOff<X extends core::num>() → self::B<self::_#DB2#new#tearOff::X>
-  return new self::B::•<self::_#DB2#new#tearOff::X>();
-static method _#DB2#foo#tearOff<X extends core::num>() → self::B<self::_#DB2#foo#tearOff::X>
-  return new self::B::foo<self::_#DB2#foo#tearOff::X>();
-static method _#DB2#bar#tearOff<X extends core::num>() → self::B<self::_#DB2#bar#tearOff::X>
-  return self::B::bar<self::_#DB2#bar#tearOff::X>();
-static method _#DB3#new#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#new#tearOff::X>
-  return new self::B::•<self::_#DB3#new#tearOff::X>();
-static method _#DB3#foo#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#foo#tearOff::X>
-  return new self::B::foo<self::_#DB3#foo#tearOff::X>();
-static method _#DB3#bar#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#bar#tearOff::X>
-  return self::B::bar<self::_#DB3#bar#tearOff::X>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -133,7 +135,7 @@
   #C9 = instantiation self::B::• <core::num>
   #C10 = instantiation self::B::foo <core::num>
   #C11 = instantiation self::B::bar <core::num>
-  #C12 = static-tearoff self::_#DB2#new#tearOff
-  #C13 = static-tearoff self::_#DB3#new#tearOff
+  #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+  #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
   #C14 = instantiation self::B::• <Never>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
index a1d6e2f..8de913d 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
@@ -15,11 +15,21 @@
 // B<num> Function() test9() => DB1.new; // Error.
 //                              ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y>() test17() => DB2.new; // Error.
+//                                ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y>() test17() => DB2.new; // Error.
 //                                ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+//                                   ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
@@ -68,7 +78,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<num> Function() test9() => DB1.new; // Error.
-                             ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+                             ^" in #C4 as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
 static method test10() → () → self::B<core::String>
   return #C6;
 static method test11() → () → self::B<core::String>
@@ -87,7 +97,10 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y>() test17() => DB2.new; // Error.
-                               ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+                               ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y>() test17() => DB2.new; // Error.
+                               ^" in #C12 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%> as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
 static method test18() → () → self::B<core::num>
   return #C9;
 static method test19() → () → self::B<core::num>
@@ -102,24 +115,13 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
-                                  ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+                                  ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+                                  ^" in #C13 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%> as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
 static method test24() → () → self::B<core::String>
   return #C14;
 static method main() → dynamic {}
-static method _#DA2#new#tearOff<unrelated X extends core::num>() → self::A
-  return new self::A::•();
-static method _#DB2#new#tearOff<X extends core::num>() → self::B<self::_#DB2#new#tearOff::X>
-  return new self::B::•<self::_#DB2#new#tearOff::X>();
-static method _#DB2#foo#tearOff<X extends core::num>() → self::B<self::_#DB2#foo#tearOff::X>
-  return new self::B::foo<self::_#DB2#foo#tearOff::X>();
-static method _#DB2#bar#tearOff<X extends core::num>() → self::B<self::_#DB2#bar#tearOff::X>
-  return self::B::bar<self::_#DB2#bar#tearOff::X>();
-static method _#DB3#new#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#new#tearOff::X>
-  return new self::B::•<self::_#DB3#new#tearOff::X>();
-static method _#DB3#foo#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#foo#tearOff::X>
-  return new self::B::foo<self::_#DB3#foo#tearOff::X>();
-static method _#DB3#bar#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#bar#tearOff::X>
-  return self::B::bar<self::_#DB3#bar#tearOff::X>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -133,7 +135,7 @@
   #C9 = instantiation self::B::• <core::num*>
   #C10 = instantiation self::B::foo <core::num*>
   #C11 = instantiation self::B::bar <core::num*>
-  #C12 = static-tearoff self::_#DB2#new#tearOff
-  #C13 = static-tearoff self::_#DB3#new#tearOff
+  #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+  #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
   #C14 = instantiation self::B::• <Never*>
 }
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.outline.expect
index 7a1ba29..fda6d4f 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.outline.expect
@@ -69,17 +69,3 @@
   ;
 static method main() → dynamic
   ;
-static method _#DA2#new#tearOff<unrelated X extends core::num>() → self::A
-  return new self::A::•();
-static method _#DB2#new#tearOff<X extends core::num>() → self::B<self::_#DB2#new#tearOff::X>
-  return new self::B::•<self::_#DB2#new#tearOff::X>();
-static method _#DB2#foo#tearOff<X extends core::num>() → self::B<self::_#DB2#foo#tearOff::X>
-  return new self::B::foo<self::_#DB2#foo#tearOff::X>();
-static method _#DB2#bar#tearOff<X extends core::num>() → self::B<self::_#DB2#bar#tearOff::X>
-  return self::B::bar<self::_#DB2#bar#tearOff::X>();
-static method _#DB3#new#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#new#tearOff::X>
-  return new self::B::•<self::_#DB3#new#tearOff::X>();
-static method _#DB3#foo#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#foo#tearOff::X>
-  return new self::B::foo<self::_#DB3#foo#tearOff::X>();
-static method _#DB3#bar#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#bar#tearOff::X>
-  return self::B::bar<self::_#DB3#bar#tearOff::X>();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
index a1d6e2f..82dceb0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
@@ -15,11 +15,21 @@
 // B<num> Function() test9() => DB1.new; // Error.
 //                              ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y>() test17() => DB2.new; // Error.
+//                                ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y>() test17() => DB2.new; // Error.
 //                                ^
 //
+// pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+//  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+// B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+//                                   ^
+//
 // pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
 //  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 // B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
@@ -68,7 +78,7 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<num> Function() test9() => DB1.new; // Error.
-                             ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+                             ^" in #C4 as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
 static method test10() → () → self::B<core::String>
   return #C6;
 static method test11() → () → self::B<core::String>
@@ -87,7 +97,10 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y>() test17() => DB2.new; // Error.
-                               ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+                               ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y>() test17() => DB2.new; // Error.
+                               ^" in #C12 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
 static method test18() → () → self::B<core::num>
   return #C9;
 static method test19() → () → self::B<core::num>
@@ -102,24 +115,13 @@
   return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
  - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
 B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
-                                  ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+                                  ^" in invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
+ - 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
+B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
+                                  ^" in #C13 as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
 static method test24() → () → self::B<core::String>
   return #C14;
 static method main() → dynamic {}
-static method _#DA2#new#tearOff<unrelated X extends core::num>() → self::A
-  return new self::A::•();
-static method _#DB2#new#tearOff<X extends core::num>() → self::B<self::_#DB2#new#tearOff::X>
-  return new self::B::•<self::_#DB2#new#tearOff::X>();
-static method _#DB2#foo#tearOff<X extends core::num>() → self::B<self::_#DB2#foo#tearOff::X>
-  return new self::B::foo<self::_#DB2#foo#tearOff::X>();
-static method _#DB2#bar#tearOff<X extends core::num>() → self::B<self::_#DB2#bar#tearOff::X>
-  return self::B::bar<self::_#DB2#bar#tearOff::X>();
-static method _#DB3#new#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#new#tearOff::X>
-  return new self::B::•<self::_#DB3#new#tearOff::X>();
-static method _#DB3#foo#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#foo#tearOff::X>
-  return new self::B::foo<self::_#DB3#foo#tearOff::X>();
-static method _#DB3#bar#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#DB3#bar#tearOff::X>
-  return self::B::bar<self::_#DB3#bar#tearOff::X>();
 
 constants  {
   #C1 = constructor-tearoff self::A::•
@@ -133,7 +135,7 @@
   #C9 = instantiation self::B::• <core::num*>
   #C10 = instantiation self::B::foo <core::num*>
   #C11 = instantiation self::B::bar <core::num*>
-  #C12 = static-tearoff self::_#DB2#new#tearOff
-  #C13 = static-tearoff self::_#DB3#new#tearOff
+  #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+  #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
   #C14 = instantiation self::B::• <Never*>
 }
diff --git a/pkg/front_end/testcases/dart2js/late_fields.dart.strong.expect b/pkg/front_end/testcases/dart2js/late_fields.dart.strong.expect
index 02d73bd..a546427 100644
--- a/pkg/front_end/testcases/dart2js/late_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/dart2js/late_fields.dart.strong.expect
@@ -1,33 +1,15 @@
 library /*isNonNullableByDefault*/;
 import self as self;
 import "dart:core" as core;
-import "dart:_internal" as _in;
 
 class C extends core::Object {
-  field core::int? _#C#a = null;
-  field core::int? _#C#b = null;
-  field core::int? _#C#c = null;
-  field core::int? _#C#d = null;
+  late field core::int a;
+  late final [setter] field core::int b;
+  late field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late final field core::int d = 1.{core::int::unary-}(){() → core::int};
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  get a() → core::int
-    return let final core::int? #t1 = this.{self::C::_#C#a}{core::int?} in #t1 == null ?{core::int} throw new _in::LateError::fieldNI("a") : #t1{core::int};
-  set a(core::int #t2) → void
-    this.{self::C::_#C#a} = #t2;
-  get b() → core::int
-    return let final core::int? #t3 = this.{self::C::_#C#b}{core::int?} in #t3 == null ?{core::int} throw new _in::LateError::fieldNI("b") : #t3{core::int};
-  set b(core::int #t4) → void
-    if(this.{self::C::_#C#b}{core::int?} == null)
-      this.{self::C::_#C#b} = #t4;
-    else
-      throw new _in::LateError::fieldAI("b");
-  get c() → core::int
-    return let final core::int? #t5 = this.{self::C::_#C#c}{core::int?} in #t5 == null ?{core::int} this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int} : #t5{core::int};
-  set c(core::int #t6) → void
-    this.{self::C::_#C#c} = #t6;
-  get d() → core::int
-    return let final core::int? #t7 = this.{self::C::_#C#d}{core::int?} in #t7 == null ?{core::int} let final core::int #t8 = 1.{core::int::unary-}(){() → core::int} in this.{self::C::_#C#d}{core::int?} == null ?{core::int} this.{self::C::_#C#d} = #t8 : throw new _in::LateError::fieldADI("d") : #t7{core::int};
   static method _#new#tearOff() → self::C
     return new self::C::•();
 }
diff --git a/pkg/front_end/testcases/dart2js/late_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/late_fields.dart.strong.transformed.expect
index bf9c284..4b80ddd 100644
--- a/pkg/front_end/testcases/dart2js/late_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_fields.dart.strong.transformed.expect
@@ -1,35 +1,46 @@
 library /*isNonNullableByDefault*/;
 import self as self;
 import "dart:core" as core;
+import "dart:_late_helper" as _la;
 import "dart:_internal" as _in;
 
 class C extends core::Object {
-  field core::int? _#C#a = null;
-  field core::int? _#C#b = null;
-  field core::int? _#C#c = null;
-  field core::int? _#C#d = null;
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  get a() → core::int
-    return let final core::int? #t1 = this.{self::C::_#C#a}{core::int?} in #t1 == null ?{core::int} throw new _in::LateError::fieldNI("a") : #t1{core::int};
-  set a(core::int #t2) → void
-    this.{self::C::_#C#a} = #t2;
-  get b() → core::int
-    return let final core::int? #t3 = this.{self::C::_#C#b}{core::int?} in #t3 == null ?{core::int} throw new _in::LateError::fieldNI("b") : #t3{core::int};
-  set b(core::int #t4) → void
-    if(this.{self::C::_#C#b}{core::int?} == null)
-      this.{self::C::_#C#b} = #t4;
-    else
-      throw new _in::LateError::fieldAI("b");
-  get c() → core::int
-    return let final core::int? #t5 = this.{self::C::_#C#c}{core::int?} in #t5 == null ?{core::int} this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int} : #t5{core::int};
-  set c(core::int #t6) → void
-    this.{self::C::_#C#c} = #t6;
-  get d() → core::int
-    return let final core::int? #t7 = this.{self::C::_#C#d}{core::int?} in #t7 == null ?{core::int} let final core::int #t8 = 1.{core::int::unary-}(){() → core::int} in this.{self::C::_#C#d}{core::int?} == null ?{core::int} this.{self::C::_#C#d} = #t8 : throw new _in::LateError::fieldADI("d") : #t7{core::int};
   static method _#new#tearOff() → self::C
     return new self::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{self::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{self::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{self::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{self::C::_#C#b}{core::int}, "b");
+    this.{self::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{self::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{self::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{self::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{self::C::_#C#d}{core::int}, "d");
+      value = this.{self::C::_#C#d} = result;
+    }
+    return value;
+  }
 }
 static field self::C c = new self::C::•();
 static method main() → void {
@@ -61,5 +72,4 @@
 Extra constant evaluation status:
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_fields.dart:15:16 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_fields.dart:16:22 -> DoubleConstant(-1.0)
-Evaluated: VariableGet @ org-dartlang-testcase:///late_fields.dart:16:18 -> DoubleConstant(-1.0)
-Extra constant evaluation: evaluated: 93, effectively constant: 3
+Extra constant evaluation: evaluated: 77, effectively constant: 2
diff --git a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.expect b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.expect
index 95a7e38..a546427 100644
--- a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.expect
@@ -1,33 +1,15 @@
 library /*isNonNullableByDefault*/;
 import self as self;
 import "dart:core" as core;
-import "dart:_internal" as _in;
 
 class C extends core::Object {
-  field core::int? _#C#a = _in::createSentinel<core::int>();
-  field core::int? _#C#b = _in::createSentinel<core::int>();
-  field core::int? _#C#c = _in::createSentinel<core::int>();
-  field core::int? _#C#d = _in::createSentinel<core::int>();
+  late field core::int a;
+  late final [setter] field core::int b;
+  late field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late final field core::int d = 1.{core::int::unary-}(){() → core::int};
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  get a() → core::int
-    return let final core::int? #t1 = this.{self::C::_#C#a}{core::int?} in _in::isSentinel(#t1) ?{core::int} throw new _in::LateError::fieldNI("a") : #t1{core::int};
-  set a(core::int #t2) → void
-    this.{self::C::_#C#a} = #t2;
-  get b() → core::int
-    return let final core::int? #t3 = this.{self::C::_#C#b}{core::int?} in _in::isSentinel(#t3) ?{core::int} throw new _in::LateError::fieldNI("b") : #t3{core::int};
-  set b(core::int #t4) → void
-    if(_in::isSentinel(this.{self::C::_#C#b}{core::int?}))
-      this.{self::C::_#C#b} = #t4;
-    else
-      throw new _in::LateError::fieldAI("b");
-  get c() → core::int
-    return let final core::int? #t5 = this.{self::C::_#C#c}{core::int?} in _in::isSentinel(#t5) ?{core::int} this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int} : #t5{core::int};
-  set c(core::int #t6) → void
-    this.{self::C::_#C#c} = #t6;
-  get d() → core::int
-    return let final core::int #t7 = this.{self::C::_#C#d}{core::int?} in _in::isSentinel(#t7) ?{core::int} let final core::int #t8 = 1.{core::int::unary-}(){() → core::int} in _in::isSentinel(this.{self::C::_#C#d}{core::int?}) ?{core::int} this.{self::C::_#C#d} = #t8 : throw new _in::LateError::fieldADI("d") : #t7;
   static method _#new#tearOff() → self::C
     return new self::C::•();
 }
diff --git a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.outline.expect
index 57eb7ff..7c10260 100644
--- a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.outline.expect
@@ -3,19 +3,12 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  field core::int? _#C#a;
-  field core::int? _#C#b;
-  field core::int? _#C#c;
-  field core::int? _#C#d;
+  late field core::int a;
+  late final [setter] field core::int b;
+  late field core::int c;
+  late final field core::int d;
   synthetic constructor •() → self::C
     ;
-  get a() → core::int;
-  set a(core::int #t1) → void;
-  get b() → core::int;
-  set b(core::int #t2) → void;
-  get c() → core::int;
-  set c(core::int #t3) → void;
-  get d() → core::int;
   static method _#new#tearOff() → self::C
     return new self::C::•();
 }
diff --git a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.transformed.expect
index 15df6e5..4b80ddd 100644
--- a/pkg/front_end/testcases/dart2js/late_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_fields.dart.weak.transformed.expect
@@ -1,35 +1,46 @@
 library /*isNonNullableByDefault*/;
 import self as self;
 import "dart:core" as core;
+import "dart:_late_helper" as _la;
 import "dart:_internal" as _in;
 
 class C extends core::Object {
-  field core::int? _#C#a = _in::createSentinel<core::int>();
-  field core::int? _#C#b = _in::createSentinel<core::int>();
-  field core::int? _#C#c = _in::createSentinel<core::int>();
-  field core::int? _#C#d = _in::createSentinel<core::int>();
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  get a() → core::int
-    return let final core::int? #t1 = this.{self::C::_#C#a}{core::int?} in _in::isSentinel(#t1) ?{core::int} throw new _in::LateError::fieldNI("a") : #t1{core::int};
-  set a(core::int #t2) → void
-    this.{self::C::_#C#a} = #t2;
-  get b() → core::int
-    return let final core::int? #t3 = this.{self::C::_#C#b}{core::int?} in _in::isSentinel(#t3) ?{core::int} throw new _in::LateError::fieldNI("b") : #t3{core::int};
-  set b(core::int #t4) → void
-    if(_in::isSentinel(this.{self::C::_#C#b}{core::int?}))
-      this.{self::C::_#C#b} = #t4;
-    else
-      throw new _in::LateError::fieldAI("b");
-  get c() → core::int
-    return let final core::int? #t5 = this.{self::C::_#C#c}{core::int?} in _in::isSentinel(#t5) ?{core::int} this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int} : #t5{core::int};
-  set c(core::int #t6) → void
-    this.{self::C::_#C#c} = #t6;
-  get d() → core::int
-    return let final core::int #t7 = this.{self::C::_#C#d}{core::int?} in _in::isSentinel(#t7) ?{core::int} let final core::int #t8 = 1.{core::int::unary-}(){() → core::int} in _in::isSentinel(this.{self::C::_#C#d}{core::int?}) ?{core::int} this.{self::C::_#C#d} = #t8 : throw new _in::LateError::fieldADI("d") : #t7;
   static method _#new#tearOff() → self::C
     return new self::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{self::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{self::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{self::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{self::C::_#C#b}{core::int}, "b");
+    this.{self::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{self::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{self::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{self::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{self::C::_#C#d}{core::int}, "d");
+      value = this.{self::C::_#C#d} = result;
+    }
+    return value;
+  }
 }
 static field self::C c = new self::C::•();
 static method main() → void {
@@ -61,5 +72,4 @@
 Extra constant evaluation status:
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_fields.dart:15:16 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_fields.dart:16:22 -> DoubleConstant(-1.0)
-Evaluated: VariableGet @ org-dartlang-testcase:///late_fields.dart:16:18 -> DoubleConstant(-1.0)
-Extra constant evaluation: evaluated: 97, effectively constant: 3
+Extra constant evaluation: evaluated: 77, effectively constant: 2
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart
new file mode 100644
index 0000000..7292bb7
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart
@@ -0,0 +1,99 @@
+// 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.
+
+import 'main_lib1.dart';
+import 'main_lib2.dart' as lib;
+
+void main() {
+  testUninitializedNonFinalInstanceField();
+  testUninitializedFinalInstanceField();
+  testInitializedNonFinalInstanceField();
+  testInitializedFinalInstanceField();
+
+  testNullableUninitializedNonFinalLocal();
+  testNonNullableUninitializedNonFinalLocal();
+  testNullableUninitializedFinalLocal();
+  testNonNullableUninitializedFinalLocal();
+  testNullableInitializedNonFinalLocal();
+  testNonNullableInitializedNonFinalLocal();
+  testNullableInitializedFinalLocal();
+  testNonNullableInitializedFinalLocal();
+
+  testUninitializedNonFinalStaticField();
+  testUninitializedFinalStaticField();
+  testInitializedNonFinalStaticField();
+  testInitializedFinalStaticField();
+  testUninitializedNonFinalTopLevelField();
+  testUninitializedFinalTopLevelField();
+  testInitializedNonFinalTopLevelField();
+  testInitializedFinalTopLevelField();
+}
+
+var c = C();
+
+void testUninitializedNonFinalInstanceField() {
+  print(c.a);
+  c.a = 42;
+  print(c.a);
+}
+
+void testUninitializedFinalInstanceField() {
+  print(c.b);
+  c.b = 42;
+  print(c.b);
+}
+
+void testInitializedNonFinalInstanceField() {
+  print(c.c);
+  c.c = 42;
+  print(c.c);
+}
+
+void testInitializedFinalInstanceField() {
+  print(c.d);
+}
+
+void testUninitializedNonFinalStaticField() {
+  print(Statics.a);
+  Statics.a = 42;
+  print(Statics.a);
+}
+
+void testUninitializedFinalStaticField() {
+  print(Statics.b);
+  Statics.b = 42;
+  print(Statics.b);
+}
+
+void testInitializedNonFinalStaticField() {
+  print(Statics.c);
+  Statics.c = 42;
+  print(Statics.c);
+}
+
+void testInitializedFinalStaticField() {
+  print(Statics.d);
+}
+
+void testUninitializedNonFinalTopLevelField() {
+  print(lib.a);
+  lib.a = 42;
+  print(lib.a);
+}
+
+void testUninitializedFinalTopLevelField() {
+  print(lib.b);
+  lib.b = 42;
+  print(lib.b);
+}
+
+void testInitializedNonFinalTopLevelField() {
+  print(lib.c);
+  lib.c = 42;
+  print(lib.c);
+}
+
+void testInitializedFinalTopLevelField() {
+  print(lib.d);
+}
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.expect
new file mode 100644
index 0000000..b0d37be
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.expect
@@ -0,0 +1,214 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib1.dart" as mai;
+import "dart:core" as core;
+import "main_lib2.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart";
+import "org-dartlang-testcase:///main_lib2.dart" as lib;
+
+static field mai::C c = new mai::C::•();
+static method main() → void {
+  self::testUninitializedNonFinalInstanceField();
+  self::testUninitializedFinalInstanceField();
+  self::testInitializedNonFinalInstanceField();
+  self::testInitializedFinalInstanceField();
+  mai::testNullableUninitializedNonFinalLocal();
+  mai::testNonNullableUninitializedNonFinalLocal();
+  mai::testNullableUninitializedFinalLocal();
+  mai::testNonNullableUninitializedFinalLocal();
+  mai::testNullableInitializedNonFinalLocal();
+  mai::testNonNullableInitializedNonFinalLocal();
+  mai::testNullableInitializedFinalLocal();
+  mai::testNonNullableInitializedFinalLocal();
+  self::testUninitializedNonFinalStaticField();
+  self::testUninitializedFinalStaticField();
+  self::testInitializedNonFinalStaticField();
+  self::testInitializedFinalStaticField();
+  self::testUninitializedNonFinalTopLevelField();
+  self::testUninitializedFinalTopLevelField();
+  self::testInitializedNonFinalTopLevelField();
+  self::testInitializedFinalTopLevelField();
+}
+static method testUninitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::a}{core::int});
+  self::c.{mai::C::a} = 42;
+  core::print(self::c.{mai::C::a}{core::int});
+}
+static method testUninitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::b}{core::int});
+  self::c.{mai::C::b} = 42;
+  core::print(self::c.{mai::C::b}{core::int});
+}
+static method testInitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::c}{core::int});
+  self::c.{mai::C::c} = 42;
+  core::print(self::c.{mai::C::c}{core::int});
+}
+static method testInitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::d}{core::int});
+}
+static method testUninitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::a);
+  mai::Statics::a = 42;
+  core::print(mai::Statics::a);
+}
+static method testUninitializedFinalStaticField() → void {
+  core::print(mai::Statics::b);
+  mai::Statics::b = 42;
+  core::print(mai::Statics::b);
+}
+static method testInitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::c);
+  mai::Statics::c = 42;
+  core::print(mai::Statics::c);
+}
+static method testInitializedFinalStaticField() → void {
+  core::print(mai::Statics::d);
+}
+static method testUninitializedNonFinalTopLevelField() → void {
+  core::print(mai2::a);
+  mai2::a = 42;
+  core::print(mai2::a);
+}
+static method testUninitializedFinalTopLevelField() → void {
+  core::print(mai2::b);
+  mai2::b = 42;
+  core::print(mai2::b);
+}
+static method testInitializedNonFinalTopLevelField() → void {
+  core::print(mai2::c);
+  mai2::c = 42;
+  core::print(mai2::c);
+}
+static method testInitializedFinalTopLevelField() → void {
+  core::print(mai2::d);
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+import "dart:_internal" as _in;
+
+class C extends core::Object {
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
+  synthetic constructor •() → mai::C
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::C
+    return new mai::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{mai::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#b}{core::int}, "b");
+    this.{mai::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{mai::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{mai::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{mai::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{mai::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{mai::C::_#C#d}{core::int}, "d");
+      value = this.{mai::C::_#C#d} = result;
+    }
+    return value;
+  }
+}
+class Statics extends core::Object {
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
+  late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+  synthetic constructor •() → mai::Statics
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::Statics
+    return new mai::Statics::•();
+  static get a() → core::int
+    return mai::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return mai::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return mai::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return mai::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
+}
+static method testNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
+  y.{_la::_InitializedCell::value} = 42;
+  core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNonNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+}
+static method testNonNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai2;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
+late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return mai2::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return mai2::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return mai2::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return mai2::_#b.{_la::_Cell::finalFieldValue} = value;
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.transformed.expect
new file mode 100644
index 0000000..e24d5f5
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.strong.transformed.expect
@@ -0,0 +1,228 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib1.dart" as mai;
+import "dart:core" as core;
+import "main_lib2.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart";
+import "org-dartlang-testcase:///main_lib2.dart" as lib;
+
+static field mai::C c = new mai::C::•();
+static method main() → void {
+  self::testUninitializedNonFinalInstanceField();
+  self::testUninitializedFinalInstanceField();
+  self::testInitializedNonFinalInstanceField();
+  self::testInitializedFinalInstanceField();
+  mai::testNullableUninitializedNonFinalLocal();
+  mai::testNonNullableUninitializedNonFinalLocal();
+  mai::testNullableUninitializedFinalLocal();
+  mai::testNonNullableUninitializedFinalLocal();
+  mai::testNullableInitializedNonFinalLocal();
+  mai::testNonNullableInitializedNonFinalLocal();
+  mai::testNullableInitializedFinalLocal();
+  mai::testNonNullableInitializedFinalLocal();
+  self::testUninitializedNonFinalStaticField();
+  self::testUninitializedFinalStaticField();
+  self::testInitializedNonFinalStaticField();
+  self::testInitializedFinalStaticField();
+  self::testUninitializedNonFinalTopLevelField();
+  self::testUninitializedFinalTopLevelField();
+  self::testInitializedNonFinalTopLevelField();
+  self::testInitializedFinalTopLevelField();
+}
+static method testUninitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::a}{core::int});
+  self::c.{mai::C::a} = 42;
+  core::print(self::c.{mai::C::a}{core::int});
+}
+static method testUninitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::b}{core::int});
+  self::c.{mai::C::b} = 42;
+  core::print(self::c.{mai::C::b}{core::int});
+}
+static method testInitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::c}{core::int});
+  self::c.{mai::C::c} = 42;
+  core::print(self::c.{mai::C::c}{core::int});
+}
+static method testInitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::d}{core::int});
+}
+static method testUninitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::a);
+  mai::Statics::a = 42;
+  core::print(mai::Statics::a);
+}
+static method testUninitializedFinalStaticField() → void {
+  core::print(mai::Statics::b);
+  mai::Statics::b = 42;
+  core::print(mai::Statics::b);
+}
+static method testInitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::c);
+  mai::Statics::c = 42;
+  core::print(mai::Statics::c);
+}
+static method testInitializedFinalStaticField() → void {
+  core::print(mai::Statics::d);
+}
+static method testUninitializedNonFinalTopLevelField() → void {
+  core::print(mai2::a);
+  mai2::a = 42;
+  core::print(mai2::a);
+}
+static method testUninitializedFinalTopLevelField() → void {
+  core::print(mai2::b);
+  mai2::b = 42;
+  core::print(mai2::b);
+}
+static method testInitializedNonFinalTopLevelField() → void {
+  core::print(mai2::c);
+  mai2::c = 42;
+  core::print(mai2::c);
+}
+static method testInitializedFinalTopLevelField() → void {
+  core::print(mai2::d);
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+import "dart:_internal" as _in;
+
+class C extends core::Object {
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
+  synthetic constructor •() → mai::C
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::C
+    return new mai::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{mai::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#b}{core::int}, "b");
+    this.{mai::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{mai::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{mai::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{mai::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{mai::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{mai::C::_#C#d}{core::int}, "d");
+      value = this.{mai::C::_#C#d} = result;
+    }
+    return value;
+  }
+}
+class Statics extends core::Object {
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
+  late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+  synthetic constructor •() → mai::Statics
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::Statics
+    return new mai::Statics::•();
+  static get a() → core::int
+    return mai::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return mai::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return mai::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return mai::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
+}
+static method testNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
+  y.{_la::_InitializedCell::value} = 42;
+  core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNonNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+}
+static method testNonNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai2;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
+late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return mai2::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return mai2::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return mai2::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return mai2::_#b.{_la::_Cell::finalFieldValue} = value;
+
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:8:16 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:9:22 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:15:23 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:16:29 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:44:17 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:56:16 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:63:23 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:71:22 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib2.dart:7:14 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib2.dart:8:20 -> DoubleConstant(-1.0)
+Extra constant evaluation: evaluated: 229, effectively constant: 10
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline.expect
new file mode 100644
index 0000000..ff4b4dc
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline.expect
@@ -0,0 +1,17 @@
+import 'main_lib1.dart';
+import 'main_lib2.dart' as lib;
+
+void main() {}
+var c = C();
+void testUninitializedNonFinalInstanceField() {}
+void testUninitializedFinalInstanceField() {}
+void testInitializedNonFinalInstanceField() {}
+void testInitializedFinalInstanceField() {}
+void testUninitializedNonFinalStaticField() {}
+void testUninitializedFinalStaticField() {}
+void testInitializedNonFinalStaticField() {}
+void testInitializedFinalStaticField() {}
+void testUninitializedNonFinalTopLevelField() {}
+void testUninitializedFinalTopLevelField() {}
+void testInitializedNonFinalTopLevelField() {}
+void testInitializedFinalTopLevelField() {}
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..92b8923
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,17 @@
+import 'main_lib1.dart';
+import 'main_lib2.dart' as lib;
+
+var c = C();
+void main() {}
+void testInitializedFinalInstanceField() {}
+void testInitializedFinalStaticField() {}
+void testInitializedFinalTopLevelField() {}
+void testInitializedNonFinalInstanceField() {}
+void testInitializedNonFinalStaticField() {}
+void testInitializedNonFinalTopLevelField() {}
+void testUninitializedFinalInstanceField() {}
+void testUninitializedFinalStaticField() {}
+void testUninitializedFinalTopLevelField() {}
+void testUninitializedNonFinalInstanceField() {}
+void testUninitializedNonFinalStaticField() {}
+void testUninitializedNonFinalTopLevelField() {}
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.expect
new file mode 100644
index 0000000..b0d37be
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.expect
@@ -0,0 +1,214 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib1.dart" as mai;
+import "dart:core" as core;
+import "main_lib2.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart";
+import "org-dartlang-testcase:///main_lib2.dart" as lib;
+
+static field mai::C c = new mai::C::•();
+static method main() → void {
+  self::testUninitializedNonFinalInstanceField();
+  self::testUninitializedFinalInstanceField();
+  self::testInitializedNonFinalInstanceField();
+  self::testInitializedFinalInstanceField();
+  mai::testNullableUninitializedNonFinalLocal();
+  mai::testNonNullableUninitializedNonFinalLocal();
+  mai::testNullableUninitializedFinalLocal();
+  mai::testNonNullableUninitializedFinalLocal();
+  mai::testNullableInitializedNonFinalLocal();
+  mai::testNonNullableInitializedNonFinalLocal();
+  mai::testNullableInitializedFinalLocal();
+  mai::testNonNullableInitializedFinalLocal();
+  self::testUninitializedNonFinalStaticField();
+  self::testUninitializedFinalStaticField();
+  self::testInitializedNonFinalStaticField();
+  self::testInitializedFinalStaticField();
+  self::testUninitializedNonFinalTopLevelField();
+  self::testUninitializedFinalTopLevelField();
+  self::testInitializedNonFinalTopLevelField();
+  self::testInitializedFinalTopLevelField();
+}
+static method testUninitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::a}{core::int});
+  self::c.{mai::C::a} = 42;
+  core::print(self::c.{mai::C::a}{core::int});
+}
+static method testUninitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::b}{core::int});
+  self::c.{mai::C::b} = 42;
+  core::print(self::c.{mai::C::b}{core::int});
+}
+static method testInitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::c}{core::int});
+  self::c.{mai::C::c} = 42;
+  core::print(self::c.{mai::C::c}{core::int});
+}
+static method testInitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::d}{core::int});
+}
+static method testUninitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::a);
+  mai::Statics::a = 42;
+  core::print(mai::Statics::a);
+}
+static method testUninitializedFinalStaticField() → void {
+  core::print(mai::Statics::b);
+  mai::Statics::b = 42;
+  core::print(mai::Statics::b);
+}
+static method testInitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::c);
+  mai::Statics::c = 42;
+  core::print(mai::Statics::c);
+}
+static method testInitializedFinalStaticField() → void {
+  core::print(mai::Statics::d);
+}
+static method testUninitializedNonFinalTopLevelField() → void {
+  core::print(mai2::a);
+  mai2::a = 42;
+  core::print(mai2::a);
+}
+static method testUninitializedFinalTopLevelField() → void {
+  core::print(mai2::b);
+  mai2::b = 42;
+  core::print(mai2::b);
+}
+static method testInitializedNonFinalTopLevelField() → void {
+  core::print(mai2::c);
+  mai2::c = 42;
+  core::print(mai2::c);
+}
+static method testInitializedFinalTopLevelField() → void {
+  core::print(mai2::d);
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+import "dart:_internal" as _in;
+
+class C extends core::Object {
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
+  synthetic constructor •() → mai::C
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::C
+    return new mai::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{mai::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#b}{core::int}, "b");
+    this.{mai::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{mai::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{mai::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{mai::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{mai::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{mai::C::_#C#d}{core::int}, "d");
+      value = this.{mai::C::_#C#d} = result;
+    }
+    return value;
+  }
+}
+class Statics extends core::Object {
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
+  late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+  synthetic constructor •() → mai::Statics
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::Statics
+    return new mai::Statics::•();
+  static get a() → core::int
+    return mai::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return mai::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return mai::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return mai::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
+}
+static method testNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
+  y.{_la::_InitializedCell::value} = 42;
+  core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNonNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+}
+static method testNonNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai2;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
+late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return mai2::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return mai2::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return mai2::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return mai2::_#b.{_la::_Cell::finalFieldValue} = value;
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.outline.expect
new file mode 100644
index 0000000..7917e7d
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.outline.expect
@@ -0,0 +1,139 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib1.dart" as mai;
+
+import "org-dartlang-testcase:///main_lib1.dart";
+import "org-dartlang-testcase:///main_lib2.dart" as lib;
+
+static field mai::C c;
+static method main() → void
+  ;
+static method testUninitializedNonFinalInstanceField() → void
+  ;
+static method testUninitializedFinalInstanceField() → void
+  ;
+static method testInitializedNonFinalInstanceField() → void
+  ;
+static method testInitializedFinalInstanceField() → void
+  ;
+static method testUninitializedNonFinalStaticField() → void
+  ;
+static method testUninitializedFinalStaticField() → void
+  ;
+static method testInitializedNonFinalStaticField() → void
+  ;
+static method testInitializedFinalStaticField() → void
+  ;
+static method testUninitializedNonFinalTopLevelField() → void
+  ;
+static method testUninitializedFinalTopLevelField() → void
+  ;
+static method testInitializedNonFinalTopLevelField() → void
+  ;
+static method testInitializedFinalTopLevelField() → void
+  ;
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+import "dart:_internal" as _in;
+
+class C extends core::Object {
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
+  synthetic constructor •() → mai::C
+    ;
+  static method _#new#tearOff() → mai::C
+    return new mai::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{mai::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#b}{core::int}, "b");
+    this.{mai::C::_#C#b} = value;
+  }
+  get c() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#c}{core::int}, "c");
+  set c(core::int value) → void
+    this.{mai::C::_#C#c} = value;
+  get d() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#d}{core::int}, "d");
+  set d(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#d}{core::int}, "d");
+    this.{mai::C::_#C#d} = value;
+  }
+}
+class Statics extends core::Object {
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
+  static final field _la::_Cell _#c = new _la::_Cell::named("c");
+  static final field _la::_Cell _#d = new _la::_Cell::named("d");
+  synthetic constructor •() → mai::Statics
+    ;
+  static method _#new#tearOff() → mai::Statics
+    return new mai::Statics::•();
+  static get a() → core::int
+    return mai::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return mai::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return mai::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return mai::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
+  static get c() → core::int
+    return mai::Statics::_#c.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set c(core::int value) → void
+    return mai::Statics::_#c.{_la::_Cell::value} = value;
+  static get d() → core::int
+    return mai::Statics::_#d.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set d(core::int value) → void
+    return mai::Statics::_#d.{_la::_Cell::finalFieldValue} = value;
+}
+static method testNullableUninitializedNonFinalLocal() → void
+  ;
+static method testNonNullableUninitializedNonFinalLocal() → void
+  ;
+static method testNullableUninitializedFinalLocal() → void
+  ;
+static method testNonNullableUninitializedFinalLocal() → void
+  ;
+static method testNullableInitializedNonFinalLocal() → void
+  ;
+static method testNonNullableInitializedNonFinalLocal() → void
+  ;
+static method testNullableInitializedFinalLocal() → void
+  ;
+static method testNonNullableInitializedFinalLocal() → void
+  ;
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
+static final field _la::_Cell _#c = new _la::_Cell::named("c");
+static final field _la::_Cell _#d = new _la::_Cell::named("d");
+static get a() → core::int
+  return self2::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return self2::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return self2::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return self2::_#b.{_la::_Cell::finalFieldValue} = value;
+static get c() → core::int
+  return self2::_#c.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set c(core::int value) → void
+  return self2::_#c.{_la::_Cell::value} = value;
+static get d() → core::int
+  return self2::_#d.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set d(core::int value) → void
+  return self2::_#d.{_la::_Cell::finalFieldValue} = value;
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..e24d5f5
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main.dart.weak.transformed.expect
@@ -0,0 +1,228 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "main_lib1.dart" as mai;
+import "dart:core" as core;
+import "main_lib2.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart";
+import "org-dartlang-testcase:///main_lib2.dart" as lib;
+
+static field mai::C c = new mai::C::•();
+static method main() → void {
+  self::testUninitializedNonFinalInstanceField();
+  self::testUninitializedFinalInstanceField();
+  self::testInitializedNonFinalInstanceField();
+  self::testInitializedFinalInstanceField();
+  mai::testNullableUninitializedNonFinalLocal();
+  mai::testNonNullableUninitializedNonFinalLocal();
+  mai::testNullableUninitializedFinalLocal();
+  mai::testNonNullableUninitializedFinalLocal();
+  mai::testNullableInitializedNonFinalLocal();
+  mai::testNonNullableInitializedNonFinalLocal();
+  mai::testNullableInitializedFinalLocal();
+  mai::testNonNullableInitializedFinalLocal();
+  self::testUninitializedNonFinalStaticField();
+  self::testUninitializedFinalStaticField();
+  self::testInitializedNonFinalStaticField();
+  self::testInitializedFinalStaticField();
+  self::testUninitializedNonFinalTopLevelField();
+  self::testUninitializedFinalTopLevelField();
+  self::testInitializedNonFinalTopLevelField();
+  self::testInitializedFinalTopLevelField();
+}
+static method testUninitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::a}{core::int});
+  self::c.{mai::C::a} = 42;
+  core::print(self::c.{mai::C::a}{core::int});
+}
+static method testUninitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::b}{core::int});
+  self::c.{mai::C::b} = 42;
+  core::print(self::c.{mai::C::b}{core::int});
+}
+static method testInitializedNonFinalInstanceField() → void {
+  core::print(self::c.{mai::C::c}{core::int});
+  self::c.{mai::C::c} = 42;
+  core::print(self::c.{mai::C::c}{core::int});
+}
+static method testInitializedFinalInstanceField() → void {
+  core::print(self::c.{mai::C::d}{core::int});
+}
+static method testUninitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::a);
+  mai::Statics::a = 42;
+  core::print(mai::Statics::a);
+}
+static method testUninitializedFinalStaticField() → void {
+  core::print(mai::Statics::b);
+  mai::Statics::b = 42;
+  core::print(mai::Statics::b);
+}
+static method testInitializedNonFinalStaticField() → void {
+  core::print(mai::Statics::c);
+  mai::Statics::c = 42;
+  core::print(mai::Statics::c);
+}
+static method testInitializedFinalStaticField() → void {
+  core::print(mai::Statics::d);
+}
+static method testUninitializedNonFinalTopLevelField() → void {
+  core::print(mai2::a);
+  mai2::a = 42;
+  core::print(mai2::a);
+}
+static method testUninitializedFinalTopLevelField() → void {
+  core::print(mai2::b);
+  mai2::b = 42;
+  core::print(mai2::b);
+}
+static method testInitializedNonFinalTopLevelField() → void {
+  core::print(mai2::c);
+  mai2::c = 42;
+  core::print(mai2::c);
+}
+static method testInitializedFinalTopLevelField() → void {
+  core::print(mai2::d);
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+import "dart:_internal" as _in;
+
+class C extends core::Object {
+  field core::int _#C#a = _in::createSentinel<core::int>();
+  field core::int _#C#b = _in::createSentinel<core::int>();
+  field core::int _#C#c = _in::createSentinel<core::int>();
+  field core::int _#C#d = _in::createSentinel<core::int>();
+  synthetic constructor •() → mai::C
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::C
+    return new mai::C::•();
+  get a() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#a}{core::int}, "a");
+  set a(core::int value) → void
+    this.{mai::C::_#C#a} = value;
+  get b() → core::int
+    return _la::_lateReadCheck<core::int>(this.{mai::C::_#C#b}{core::int}, "b");
+  set b(core::int value) → void {
+    _la::_lateWriteOnceCheck(this.{mai::C::_#C#b}{core::int}, "b");
+    this.{mai::C::_#C#b} = value;
+  }
+  get c() → core::int {
+    core::int value = this.{mai::C::_#C#c}{core::int};
+    if(_in::isSentinel(value))
+      value = this.{mai::C::_#C#c} = 1.{core::int::unary-}(){() → core::int};
+    return value;
+  }
+  set c(core::int value) → void
+    this.{mai::C::_#C#c} = value;
+  get d() → core::int {
+    core::int value = this.{mai::C::_#C#d}{core::int};
+    if(_in::isSentinel(value)) {
+      final core::int result = 1.{core::int::unary-}(){() → core::int};
+      _la::_lateInitializeOnceCheck(this.{mai::C::_#C#d}{core::int}, "d");
+      value = this.{mai::C::_#C#d} = result;
+    }
+    return value;
+  }
+}
+class Statics extends core::Object {
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
+  late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+  late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+  synthetic constructor •() → mai::Statics
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff() → mai::Statics
+    return new mai::Statics::•();
+  static get a() → core::int
+    return mai::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return mai::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return mai::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return mai::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
+}
+static method testNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedNonFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::value} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNonNullableUninitializedFinalLocal() → void {
+  final _la::_Cell x = new _la::_Cell::named("x");
+  x.{_la::_Cell::finalLocalValue} = 42;
+  core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
+}
+static method testNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
+  y.{_la::_InitializedCell::value} = 42;
+  core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNonNullableInitializedNonFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+  x.{_la::_InitializedCell::value} = 42;
+  core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
+}
+static method testNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+  final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
+  core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
+}
+static method testNonNullableInitializedFinalLocal() → void {
+  final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
+  core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
+}
+
+library /*isNonNullableByDefault*/;
+import self as mai2;
+import "dart:core" as core;
+import "dart:_late_helper" as _la;
+
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
+late static field core::int c = 1.{core::int::unary-}(){() → core::int};
+late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return mai2::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return mai2::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return mai2::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return mai2::_#b.{_la::_Cell::finalFieldValue} = value;
+
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:8:16 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:9:22 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:15:23 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:16:29 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:44:17 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:56:16 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:63:23 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib1.dart:71:22 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib2.dart:7:14 -> DoubleConstant(-1.0)
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///main_lib2.dart:8:20 -> DoubleConstant(-1.0)
+Extra constant evaluation: evaluated: 229, effectively constant: 10
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main_lib1.dart b/pkg/front_end/testcases/dart2js/late_from_dill/main_lib1.dart
new file mode 100644
index 0000000..7f668da
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main_lib1.dart
@@ -0,0 +1,73 @@
+// 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.
+
+class C {
+  late int a;
+  late final int b;
+  late int c = -1;
+  late final int d = -1;
+}
+
+class Statics {
+  static late int a;
+  static late final int b;
+  static late int c = -1;
+  static late final int d = -1;
+}
+
+void testNullableUninitializedNonFinalLocal() {
+  late int? x;
+  x = 42;
+  print(x);
+}
+
+void testNonNullableUninitializedNonFinalLocal() {
+  late int x;
+  x = 42;
+  print(x);
+}
+
+void testNullableUninitializedFinalLocal() {
+  late final int? x;
+  x = 42;
+  print(x);
+}
+
+void testNonNullableUninitializedFinalLocal() {
+  late final int x;
+  x = 42;
+  print(x);
+}
+
+void testNullableInitializedNonFinalLocal() {
+  late int? x = -1;
+  print(x);
+  x = 42;
+  print(x);
+
+  late int? y = null;
+  print(y);
+  y = 42;
+  print(y);
+}
+
+void testNonNullableInitializedNonFinalLocal() {
+  late int x = -1;
+  print(x);
+  x = 42;
+  print(x);
+}
+
+void testNullableInitializedFinalLocal() {
+  late final int? x = -1;
+  print(x);
+
+  late final int? y = null;
+  print(y);
+}
+
+void testNonNullableInitializedFinalLocal() {
+  late final int x = -1;
+  print(x);
+}
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/main_lib2.dart b/pkg/front_end/testcases/dart2js/late_from_dill/main_lib2.dart
new file mode 100644
index 0000000..853ea39
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/main_lib2.dart
@@ -0,0 +1,8 @@
+// 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.
+
+late int a;
+late final int b;
+late int c = -1;
+late final int d = -1;
diff --git a/pkg/front_end/testcases/dart2js/late_from_dill/test.options b/pkg/front_end/testcases/dart2js/late_from_dill/test.options
new file mode 100644
index 0000000..207c58e
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/late_from_dill/test.options
@@ -0,0 +1,2 @@
+main_lib1.dart
+main_lib2.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
index 209cdb6..d8893fe 100644
--- a/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
@@ -3,18 +3,20 @@
 import "dart:core" as core;
 import "dart:_late_helper" as _la;
 import "late_statics_lib.dart" as lat;
-additionalExports = (lat::c,
-  lat::c,
-  lat::d,
+additionalExports = (lat::a,
   lat::a,
-  lat::b)
+  lat::b,
+  lat::b,
+  lat::c,
+  lat::c,
+  lat::d)
 
 import "org-dartlang-testcase:///late_statics_lib.dart" as lib;
 export "org-dartlang-testcase:///late_statics_lib.dart";
 
 class Statics extends core::Object {
-  static final field _la::_Cell a = new _la::_Cell::named("a");
-  static final field _la::_Cell b = new _la::_Cell::named("b");
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
   late static field core::int c = 1.{core::int::unary-}(){() → core::int};
   late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
   synthetic constructor •() → self::Statics
@@ -22,6 +24,14 @@
     ;
   static method _#new#tearOff() → self::Statics
     return new self::Statics::•();
+  static get a() → core::int
+    return self::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return self::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return self::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return self::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
 }
 static method main() → void {
   self::testUninitializedNonFinalStaticField();
@@ -34,14 +44,14 @@
   self::testInitializedFinalTopLevelField();
 }
 static method testUninitializedNonFinalStaticField() → void {
-  core::print(self::Statics::a.{_la::_Cell::readField}<core::int>(){() → core::int});
-  self::Statics::a.{_la::_Cell::value} = 42;
-  core::print(self::Statics::a.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(self::Statics::a);
+  self::Statics::a = 42;
+  core::print(self::Statics::a);
 }
 static method testUninitializedFinalStaticField() → void {
-  core::print(self::Statics::b.{_la::_Cell::readField}<core::int>(){() → core::int});
-  self::Statics::b.{_la::_Cell::finalFieldValue} = 42;
-  core::print(self::Statics::b.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(self::Statics::b);
+  self::Statics::b = 42;
+  core::print(self::Statics::b);
 }
 static method testInitializedNonFinalStaticField() → void {
   core::print(self::Statics::c);
@@ -52,14 +62,14 @@
   core::print(self::Statics::d);
 }
 static method testUninitializedNonFinalTopLevelField() → void {
-  core::print(lat::a.{_la::_Cell::readField}<core::int>(){() → core::int});
-  lat::a.{_la::_Cell::value} = 42;
-  core::print(lat::a.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(lat::a);
+  lat::a = 42;
+  core::print(lat::a);
 }
 static method testUninitializedFinalTopLevelField() → void {
-  core::print(lat::b.{_la::_Cell::readField}<core::int>(){() → core::int});
-  lat::b.{_la::_Cell::finalFieldValue} = 42;
-  core::print(lat::b.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(lat::b);
+  lat::b = 42;
+  core::print(lat::b);
 }
 static method testInitializedNonFinalTopLevelField() → void {
   core::print(lat::c);
@@ -72,13 +82,21 @@
 
 library /*isNonNullableByDefault*/;
 import self as lat;
-import "dart:_late_helper" as _la;
 import "dart:core" as core;
+import "dart:_late_helper" as _la;
 
-static final field _la::_Cell a = new _la::_Cell::named("a");
-static final field _la::_Cell b = new _la::_Cell::named("b");
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
 late static field core::int c = 1.{core::int::unary-}(){() → core::int};
 late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return lat::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return lat::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return lat::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return lat::_#b.{_la::_Cell::finalFieldValue} = value;
 
 
 Extra constant evaluation status:
@@ -86,4 +104,4 @@
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics.dart:23:29 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics_lib.dart:7:14 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics_lib.dart:8:20 -> DoubleConstant(-1.0)
-Extra constant evaluation: evaluated: 63, effectively constant: 4
+Extra constant evaluation: evaluated: 71, effectively constant: 4
diff --git a/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
index 209cdb6..d8893fe 100644
--- a/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
@@ -3,18 +3,20 @@
 import "dart:core" as core;
 import "dart:_late_helper" as _la;
 import "late_statics_lib.dart" as lat;
-additionalExports = (lat::c,
-  lat::c,
-  lat::d,
+additionalExports = (lat::a,
   lat::a,
-  lat::b)
+  lat::b,
+  lat::b,
+  lat::c,
+  lat::c,
+  lat::d)
 
 import "org-dartlang-testcase:///late_statics_lib.dart" as lib;
 export "org-dartlang-testcase:///late_statics_lib.dart";
 
 class Statics extends core::Object {
-  static final field _la::_Cell a = new _la::_Cell::named("a");
-  static final field _la::_Cell b = new _la::_Cell::named("b");
+  static final field _la::_Cell _#a = new _la::_Cell::named("a");
+  static final field _la::_Cell _#b = new _la::_Cell::named("b");
   late static field core::int c = 1.{core::int::unary-}(){() → core::int};
   late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
   synthetic constructor •() → self::Statics
@@ -22,6 +24,14 @@
     ;
   static method _#new#tearOff() → self::Statics
     return new self::Statics::•();
+  static get a() → core::int
+    return self::Statics::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set a(core::int value) → void
+    return self::Statics::_#a.{_la::_Cell::value} = value;
+  static get b() → core::int
+    return self::Statics::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+  static set b(core::int value) → void
+    return self::Statics::_#b.{_la::_Cell::finalFieldValue} = value;
 }
 static method main() → void {
   self::testUninitializedNonFinalStaticField();
@@ -34,14 +44,14 @@
   self::testInitializedFinalTopLevelField();
 }
 static method testUninitializedNonFinalStaticField() → void {
-  core::print(self::Statics::a.{_la::_Cell::readField}<core::int>(){() → core::int});
-  self::Statics::a.{_la::_Cell::value} = 42;
-  core::print(self::Statics::a.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(self::Statics::a);
+  self::Statics::a = 42;
+  core::print(self::Statics::a);
 }
 static method testUninitializedFinalStaticField() → void {
-  core::print(self::Statics::b.{_la::_Cell::readField}<core::int>(){() → core::int});
-  self::Statics::b.{_la::_Cell::finalFieldValue} = 42;
-  core::print(self::Statics::b.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(self::Statics::b);
+  self::Statics::b = 42;
+  core::print(self::Statics::b);
 }
 static method testInitializedNonFinalStaticField() → void {
   core::print(self::Statics::c);
@@ -52,14 +62,14 @@
   core::print(self::Statics::d);
 }
 static method testUninitializedNonFinalTopLevelField() → void {
-  core::print(lat::a.{_la::_Cell::readField}<core::int>(){() → core::int});
-  lat::a.{_la::_Cell::value} = 42;
-  core::print(lat::a.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(lat::a);
+  lat::a = 42;
+  core::print(lat::a);
 }
 static method testUninitializedFinalTopLevelField() → void {
-  core::print(lat::b.{_la::_Cell::readField}<core::int>(){() → core::int});
-  lat::b.{_la::_Cell::finalFieldValue} = 42;
-  core::print(lat::b.{_la::_Cell::readField}<core::int>(){() → core::int});
+  core::print(lat::b);
+  lat::b = 42;
+  core::print(lat::b);
 }
 static method testInitializedNonFinalTopLevelField() → void {
   core::print(lat::c);
@@ -72,13 +82,21 @@
 
 library /*isNonNullableByDefault*/;
 import self as lat;
-import "dart:_late_helper" as _la;
 import "dart:core" as core;
+import "dart:_late_helper" as _la;
 
-static final field _la::_Cell a = new _la::_Cell::named("a");
-static final field _la::_Cell b = new _la::_Cell::named("b");
+static final field _la::_Cell _#a = new _la::_Cell::named("a");
+static final field _la::_Cell _#b = new _la::_Cell::named("b");
 late static field core::int c = 1.{core::int::unary-}(){() → core::int};
 late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
+static get a() → core::int
+  return lat::_#a.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set a(core::int value) → void
+  return lat::_#a.{_la::_Cell::value} = value;
+static get b() → core::int
+  return lat::_#b.{_la::_Cell::readField}<core::int>(){() → core::int};
+static set b(core::int value) → void
+  return lat::_#b.{_la::_Cell::finalFieldValue} = value;
 
 
 Extra constant evaluation status:
@@ -86,4 +104,4 @@
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics.dart:23:29 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics_lib.dart:7:14 -> DoubleConstant(-1.0)
 Evaluated: InstanceInvocation @ org-dartlang-testcase:///late_statics_lib.dart:8:20 -> DoubleConstant(-1.0)
-Extra constant evaluation: evaluated: 63, effectively constant: 4
+Extra constant evaluation: evaluated: 71, effectively constant: 4
diff --git a/pkg/compiler/test/kernel/data/list_generate_1.dart b/pkg/front_end/testcases/dart2js/list_generate_1.dart
similarity index 100%
rename from pkg/compiler/test/kernel/data/list_generate_1.dart
rename to pkg/front_end/testcases/dart2js/list_generate_1.dart
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.expect
new file mode 100644
index 0000000..ae26523
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1 = core::List::generate<core::int>(10, (core::int i) → core::int => i);
+static field core::List<core::int> list2 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: true);
+static field core::List<core::int> list3 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: false);
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: self::someGrowable);
+static field core::bool someGrowable = true;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4]);
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.transformed.expect
new file mode 100644
index 0000000..037687b
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.strong.transformed.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static field core::List<core::int> list1 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list2 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list3 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateFixed<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: self::someGrowable);
+static field core::bool someGrowable = true;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4]);
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline.expect
new file mode 100644
index 0000000..d940e13
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+var list1 = List<int>.generate(10, (i) => i);
+var list2 = List<int>.generate(10, (i) => i, growable: true);
+var list3 = List<int>.generate(10, (i) => i, growable: false);
+var list4 = List<int>.generate(10, (i) => i, growable: someGrowable);
+bool someGrowable = true;
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4ed37d0
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+bool someGrowable = true;
+var list1 = List<int>.generate(10, (i) => i);
+var list2 = List<int>.generate(10, (i) => i, growable: true);
+var list3 = List<int>.generate(10, (i) => i, growable: false);
+var list4 = List<int>.generate(10, (i) => i, growable: someGrowable);
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.expect
new file mode 100644
index 0000000..ae26523
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1 = core::List::generate<core::int>(10, (core::int i) → core::int => i);
+static field core::List<core::int> list2 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: true);
+static field core::List<core::int> list3 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: false);
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: self::someGrowable);
+static field core::bool someGrowable = true;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4]);
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.outline.expect
new file mode 100644
index 0000000..fd26d48
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1;
+static field core::List<core::int> list2;
+static field core::List<core::int> list3;
+static field core::List<core::int> list4;
+static field core::bool someGrowable;
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.transformed.expect
new file mode 100644
index 0000000..037687b
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_1.dart.weak.transformed.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static field core::List<core::int> list1 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list2 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list3 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateFixed<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+  }
+} =>_list;
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int => i, growable: self::someGrowable);
+static field core::bool someGrowable = true;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4]);
+}
diff --git a/pkg/compiler/test/kernel/data/list_generate_2.dart b/pkg/front_end/testcases/dart2js/list_generate_2.dart
similarity index 100%
rename from pkg/compiler/test/kernel/data/list_generate_2.dart
rename to pkg/front_end/testcases/dart2js/list_generate_2.dart
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.expect
new file mode 100644
index 0000000..d3c85ea
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → void {
+  core::print(core::List::generate<core::List<core::int>>(10, (core::int i) → core::List<core::int> => core::List::generate<core::int>(i, (core::int i) → core::int => i.{core::num::+}(1){(core::num) → core::int})));
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.transformed.expect
new file mode 100644
index 0000000..3f9b290
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.strong.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static method main() → void {
+  core::print( block {
+    final _in::JSArray<core::List<core::int>> _list = _in::JSArray::allocateGrowable<core::List<core::int>>(10);
+    for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+      core::int i = i;
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, block {
+        final core::int* _length = i;
+        final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(_length);
+        for (core::int* i = 0; i.{core::num::<}(_length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+          core::int i = i;
+          _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i.{core::num::+}(1){(core::num) → core::int}){(core::int, core::int) → void};
+        }
+      } =>_list){(core::int, core::List<core::int>) → void};
+    }
+  } =>_list);
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline.expect
new file mode 100644
index 0000000..ab73b3a
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline.expect
@@ -0,0 +1 @@
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..ab73b3a
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.expect
new file mode 100644
index 0000000..d3c85ea
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → void {
+  core::print(core::List::generate<core::List<core::int>>(10, (core::int i) → core::List<core::int> => core::List::generate<core::int>(i, (core::int i) → core::int => i.{core::num::+}(1){(core::num) → core::int})));
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.outline.expect
new file mode 100644
index 0000000..684454e
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.transformed.expect
new file mode 100644
index 0000000..3f9b290
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_2.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static method main() → void {
+  core::print( block {
+    final _in::JSArray<core::List<core::int>> _list = _in::JSArray::allocateGrowable<core::List<core::int>>(10);
+    for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+      core::int i = i;
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, block {
+        final core::int* _length = i;
+        final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(_length);
+        for (core::int* i = 0; i.{core::num::<}(_length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+          core::int i = i;
+          _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i.{core::num::+}(1){(core::num) → core::int}){(core::int, core::int) → void};
+        }
+      } =>_list){(core::int, core::List<core::int>) → void};
+    }
+  } =>_list);
+}
diff --git a/pkg/compiler/test/kernel/data/list_generate_3.dart b/pkg/front_end/testcases/dart2js/list_generate_3.dart
similarity index 100%
rename from pkg/compiler/test/kernel/data/list_generate_3.dart
rename to pkg/front_end/testcases/dart2js/list_generate_3.dart
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.expect
new file mode 100644
index 0000000..4f4c5d2
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.expect
@@ -0,0 +1,36 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+});
+static field core::List<core::int> list2 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: true);
+static field core::List<core::int> list3 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: false);
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: self::someGrowable);
+static field core::List<core::int> list5 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  if(i.{core::int::isEven}{core::bool})
+    return i.{core::num::+}(1){(core::num) → core::int};
+  return i.{core::num::-}(1){(core::num) → core::int};
+});
+static field core::List<core::int> list6 = core::List::generate<core::int>(10, #C1);
+static field core::List<core::int> list7 = core::List::generate<core::int>(10, self::bar);
+static field core::bool someGrowable = true;
+static method foo(core::int i) → core::int
+  return i;
+static get bar() → (core::int) → core::int
+  return #C1;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4, self::list5, self::list6, self::list7]);
+}
+
+constants  {
+  #C1 = static-tearoff self::foo
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.transformed.expect
new file mode 100644
index 0000000..8fbe3a6
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.strong.transformed.expect
@@ -0,0 +1,55 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static field core::List<core::int> list1 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list2 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list3 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateFixed<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: self::someGrowable);
+static field core::List<core::int> list5 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  if(i.{core::int::isEven}{core::bool})
+    return i.{core::num::+}(1){(core::num) → core::int};
+  return i.{core::num::-}(1){(core::num) → core::int};
+});
+static field core::List<core::int> list6 = core::List::generate<core::int>(10, #C1);
+static field core::List<core::int> list7 = core::List::generate<core::int>(10, self::bar);
+static field core::bool someGrowable = true;
+static method foo(core::int i) → core::int
+  return i;
+static get bar() → (core::int) → core::int
+  return #C1;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4, self::list5, self::list6, self::list7]);
+}
+
+constants  {
+  #C1 = static-tearoff self::foo
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline.expect
new file mode 100644
index 0000000..432cc1c
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline.expect
@@ -0,0 +1,22 @@
+var list1 = List<int>.generate(10, (i) {
+  return i;
+});
+var list2 = List<int>.generate(10, (i) {
+  return i;
+}, growable: true);
+var list3 = List<int>.generate(10, (i) {
+  return i;
+}, growable: false);
+var list4 = List<int>.generate(10, (i) {
+  return i;
+}, growable: someGrowable);
+var list5 = List<int>.generate(10, (i) {
+  if (i.isEven) return i + 1;
+  return i - 1;
+});
+var list6 = List<int>.generate(10, foo);
+int foo(int i) => i;
+var list7 = List<int>.generate(10, bar);
+int Function(int) get bar => foo;
+bool someGrowable = true;
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..79c5b5f
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.textual_outline_modelled.expect
@@ -0,0 +1,22 @@
+bool someGrowable = true;
+int Function(int) get bar => foo;
+int foo(int i) => i;
+var list1 = List<int>.generate(10, (i) {
+  return i;
+});
+var list2 = List<int>.generate(10, (i) {
+  return i;
+}, growable: true);
+var list3 = List<int>.generate(10, (i) {
+  return i;
+}, growable: false);
+var list4 = List<int>.generate(10, (i) {
+  return i;
+}, growable: someGrowable);
+var list5 = List<int>.generate(10, (i) {
+  if (i.isEven) return i + 1;
+  return i - 1;
+});
+var list6 = List<int>.generate(10, foo);
+var list7 = List<int>.generate(10, bar);
+void main() {}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.expect
new file mode 100644
index 0000000..4f4c5d2
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.expect
@@ -0,0 +1,36 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+});
+static field core::List<core::int> list2 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: true);
+static field core::List<core::int> list3 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: false);
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: self::someGrowable);
+static field core::List<core::int> list5 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  if(i.{core::int::isEven}{core::bool})
+    return i.{core::num::+}(1){(core::num) → core::int};
+  return i.{core::num::-}(1){(core::num) → core::int};
+});
+static field core::List<core::int> list6 = core::List::generate<core::int>(10, #C1);
+static field core::List<core::int> list7 = core::List::generate<core::int>(10, self::bar);
+static field core::bool someGrowable = true;
+static method foo(core::int i) → core::int
+  return i;
+static get bar() → (core::int) → core::int
+  return #C1;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4, self::list5, self::list6, self::list7]);
+}
+
+constants  {
+  #C1 = static-tearoff self::foo
+}
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.outline.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.outline.expect
new file mode 100644
index 0000000..63bf114
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> list1;
+static field core::List<core::int> list2;
+static field core::List<core::int> list3;
+static field core::List<core::int> list4;
+static field core::List<core::int> list5;
+static field core::List<core::int> list6;
+static field core::List<core::int> list7;
+static field core::bool someGrowable;
+static method foo(core::int i) → core::int
+  ;
+static get bar() → (core::int) → core::int
+  ;
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.transformed.expect
new file mode 100644
index 0000000..8fbe3a6
--- /dev/null
+++ b/pkg/front_end/testcases/dart2js/list_generate_3.dart.weak.transformed.expect
@@ -0,0 +1,55 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_interceptors" as _in;
+
+static field core::List<core::int> list1 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list2 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateGrowable<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list3 = block {
+  final _in::JSArray<core::int> _list = _in::JSArray::allocateFixed<core::int>(10);
+  for (core::int* i = 0; i.{core::num::<}(10){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::int*) → core::int*}) {
+    core::int i = i;
+    {
+      _list.{_in::JSArray::[]=}{Invariant,BoundsSafe}(i, i){(core::int, core::int) → void};
+    }
+  }
+} =>_list;
+static field core::List<core::int> list4 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  return i;
+}, growable: self::someGrowable);
+static field core::List<core::int> list5 = core::List::generate<core::int>(10, (core::int i) → core::int {
+  if(i.{core::int::isEven}{core::bool})
+    return i.{core::num::+}(1){(core::num) → core::int};
+  return i.{core::num::-}(1){(core::num) → core::int};
+});
+static field core::List<core::int> list6 = core::List::generate<core::int>(10, #C1);
+static field core::List<core::int> list7 = core::List::generate<core::int>(10, self::bar);
+static field core::bool someGrowable = true;
+static method foo(core::int i) → core::int
+  return i;
+static get bar() → (core::int) → core::int
+  return #C1;
+static method main() → void {
+  self::someGrowable = !self::someGrowable;
+  core::print(<core::List<core::int>>[self::list1, self::list2, self::list3, self::list4, self::list5, self::list6, self::list7]);
+}
+
+constants  {
+  #C1 = static-tearoff self::foo
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart b/pkg/front_end/testcases/dartdevc/issue47108.dart
new file mode 100644
index 0000000..e3dbb5c
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart
@@ -0,0 +1,17 @@
+// 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.
+
+class C<T> {}
+
+const constructorTearOff = C.new;
+
+main() {
+  // These instantiations are in a const context so they appear in the const pool.
+  const instantiatedTearOff = constructorTearOff<int>;
+  const instantiatedTearOff2 = constructorTearOff<int>;
+  print(identical(instantiatedTearOff, instantiatedTearOff2)); // Prints true
+
+  // These instantiations are not in a const context so they don't appear in the const pool.
+  print(identical(constructorTearOff<String>, constructorTearOff<String>)); // Prints false
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.expect
new file mode 100644
index 0000000..fb9bcc0
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%>
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff<T extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::T%>
+    return new self::C::•<self::C::_#new#tearOff::T%>();
+}
+static const field <T extends core::Object? = dynamic>() → self::C<T%> constructorTearOff = #C1;
+static method main() → dynamic {
+  const () → self::C<core::int> instantiatedTearOff = #C2;
+  const () → self::C<core::int> instantiatedTearOff2 = #C2;
+  core::print(core::identical(instantiatedTearOff, instantiatedTearOff2));
+  core::print(core::identical(#C3, #C3));
+}
+
+constants  {
+  #C1 = static-tearoff self::C::_#new#tearOff
+  #C2 = instantiation self::C::_#new#tearOff <core::int>
+  #C3 = instantiation self::C::_#new#tearOff <core::String>
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.transformed.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.transformed.expect
new file mode 100644
index 0000000..bae63cb
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.strong.transformed.expect
@@ -0,0 +1,29 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%>
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff<T extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::T%>
+    return new self::C::•<self::C::_#new#tearOff::T%>();
+}
+static const field <T extends core::Object? = dynamic>() → self::C<T%> constructorTearOff = #C1;
+static method main() → dynamic {
+  const () → self::C<core::int> instantiatedTearOff = #C2;
+  const () → self::C<core::int> instantiatedTearOff2 = #C2;
+  core::print(core::identical(instantiatedTearOff, instantiatedTearOff2));
+  core::print(core::identical(#C3, #C3));
+}
+
+constants  {
+  #C1 = static-tearoff self::C::_#new#tearOff
+  #C2 = instantiation self::C::_#new#tearOff <core::int>
+  #C3 = instantiation self::C::_#new#tearOff <core::String>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47108.dart:13:9 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47108.dart:16:9 -> BoolConstant(true)
+Extra constant evaluation: evaluated: 5, effectively constant: 2
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline.expect
new file mode 100644
index 0000000..f6ae152
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+class C<T> {}
+
+const constructorTearOff = C.new;
+main() {}
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f6ae152
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+class C<T> {}
+
+const constructorTearOff = C.new;
+main() {}
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.expect
new file mode 100644
index 0000000..04f3df1
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%>
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff<T extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::T%>
+    return new self::C::•<self::C::_#new#tearOff::T%>();
+}
+static const field <T extends core::Object? = dynamic>() → self::C<T%> constructorTearOff = #C1;
+static method main() → dynamic {
+  const () → self::C<core::int> instantiatedTearOff = #C2;
+  const () → self::C<core::int> instantiatedTearOff2 = #C2;
+  core::print(core::identical(instantiatedTearOff, instantiatedTearOff2));
+  core::print(core::identical(#C3, #C3));
+}
+
+constants  {
+  #C1 = static-tearoff self::C::_#new#tearOff
+  #C2 = instantiation self::C::_#new#tearOff <core::int*>
+  #C3 = instantiation self::C::_#new#tearOff <core::String*>
+}
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.outline.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.outline.expect
new file mode 100644
index 0000000..1d9f460
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%>
+    ;
+  static method _#new#tearOff<T extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::T%>
+    return new self::C::•<self::C::_#new#tearOff::T%>();
+}
+static const field <T extends core::Object? = dynamic>() → self::C<T%> constructorTearOff = self::C::_#new#tearOff;
+static method main() → dynamic
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue47108.dart:7:28 -> StaticTearOffConstant(C._#new#tearOff)
+Extra constant evaluation: evaluated: 2, effectively constant: 1
diff --git a/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.transformed.expect b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.transformed.expect
new file mode 100644
index 0000000..0f3b2dc
--- /dev/null
+++ b/pkg/front_end/testcases/dartdevc/issue47108.dart.weak.transformed.expect
@@ -0,0 +1,29 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%>
+    : super core::Object::•()
+    ;
+  static method _#new#tearOff<T extends core::Object? = dynamic>() → self::C<self::C::_#new#tearOff::T%>
+    return new self::C::•<self::C::_#new#tearOff::T%>();
+}
+static const field <T extends core::Object? = dynamic>() → self::C<T%> constructorTearOff = #C1;
+static method main() → dynamic {
+  const () → self::C<core::int> instantiatedTearOff = #C2;
+  const () → self::C<core::int> instantiatedTearOff2 = #C2;
+  core::print(core::identical(instantiatedTearOff, instantiatedTearOff2));
+  core::print(core::identical(#C3, #C3));
+}
+
+constants  {
+  #C1 = static-tearoff self::C::_#new#tearOff
+  #C2 = instantiation self::C::_#new#tearOff <core::int*>
+  #C3 = instantiation self::C::_#new#tearOff <core::String*>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47108.dart:13:9 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47108.dart:16:9 -> BoolConstant(true)
+Extra constant evaluation: evaluated: 5, effectively constant: 2
diff --git a/pkg/front_end/testcases/dartdevc/private_covariant.dart.strong.expect b/pkg/front_end/testcases/dartdevc/private_covariant.dart.strong.expect
index d99381b..aaaca01 100644
--- a/pkg/front_end/testcases/dartdevc/private_covariant.dart.strong.expect
+++ b/pkg/front_end/testcases/dartdevc/private_covariant.dart.strong.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method _privateMethod(covariant core::int i) → dynamic {}
+  method _privateMethod(covariant-by-declaration core::int i) → dynamic {}
   static method _#new#tearOff() → self::Class
     return new self::Class::•();
 }
diff --git a/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.expect b/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.expect
index d99381b..aaaca01 100644
--- a/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method _privateMethod(covariant core::int i) → dynamic {}
+  method _privateMethod(covariant-by-declaration core::int i) → dynamic {}
   static method _#new#tearOff() → self::Class
     return new self::Class::•();
 }
diff --git a/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.outline.expect
index 7c99f9e..e4ccf60 100644
--- a/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/dartdevc/private_covariant.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Class extends core::Object {
   synthetic constructor •() → self::Class
     ;
-  method _privateMethod(covariant core::int i) → dynamic
+  method _privateMethod(covariant-by-declaration core::int i) → dynamic
     ;
   static method _#new#tearOff() → self::Class
     return new self::Class::•();
diff --git a/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
index 7253997..e07be30 100644
--- a/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
@@ -1,7 +1,7 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return (#C2).{main::ConstClass::x}{dart.core::int*};
+  return #C2.{main::ConstClass::x}{dart.core::int*};
 constants  {
   #C1 = 42
   #C2 = main::ConstClass {x:#C1}
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
index 7253997..e07be30 100644
--- a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
@@ -1,7 +1,7 @@
 Errors: {
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
-  return (#C2).{main::ConstClass::x}{dart.core::int*};
+  return #C2.{main::ConstClass::x}{dart.core::int*};
 constants  {
   #C1 = 42
   #C2 = main::ConstClass {x:#C1}
diff --git a/pkg/front_end/testcases/expression/extension_this.expression.yaml b/pkg/front_end/testcases/expression/extension_this.expression.yaml
new file mode 100644
index 0000000..3ac2b8f
--- /dev/null
+++ b/pkg/front_end/testcases/expression/extension_this.expression.yaml
@@ -0,0 +1,10 @@
+# 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.
+
+entry_point: "main.dart"
+definitions: ["#this"]
+position: "main.dart"
+method: "Foo.parseAsInt"
+expression: |
+  () { print(getFortyTwo()); return this; }
diff --git a/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect b/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect
new file mode 100644
index 0000000..aed2ac6
--- /dev/null
+++ b/pkg/front_end/testcases/expression/extension_this.expression.yaml.expect
@@ -0,0 +1,7 @@
+Errors: {
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(lowered dynamic #this) → dynamic
+  return () → dynamic {
+    dart.core::print(main::Foo|getFortyTwo(#this as{TypeError,ForDynamic} dart.core::String*));
+    return #this;
+  };
diff --git a/pkg/front_end/testcases/expression/main.dart b/pkg/front_end/testcases/expression/main.dart
index a4fefb5..f65db93 100644
--- a/pkg/front_end/testcases/expression/main.dart
+++ b/pkg/front_end/testcases/expression/main.dart
@@ -79,3 +79,16 @@
 main() {
   exit(0);
 }
+
+extension Foo on String {
+  int parseAsInt() {
+    int result = int.parse(this);
+    print("Parsed $this to $result");
+    print(getFortyTwo());
+    return result;
+  }
+
+  int getFortyTwo() {
+    return 42;
+  }
+}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart
new file mode 100644
index 0000000..2b50a93
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart
@@ -0,0 +1,20 @@
+// 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.
+
+class A {}
+
+extension E on A {
+  void set foo(int value) {}
+  int get bar => 42;
+}
+
+test(E e) {
+  e.foo = 42; // Ok.
+  e.bar; // Ok.
+
+  e.foo; // Error.
+  e.bar = 42; // Error.
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.strong.expect b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.strong.expect
new file mode 100644
index 0000000..cd89df1
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.strong.expect
@@ -0,0 +1,42 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'.
+//   e.foo; // Error.
+//     ^^^
+//
+// pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'.
+//   e.bar = 42; // Error.
+//     ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension E on self::A {
+  get bar = self::E|get#bar;
+  set foo = self::E|set#foo;
+}
+static method E|set#foo(lowered final self::A #this, core::int value) → void {}
+static method E|get#bar(lowered final self::A #this) → core::int
+  return 42;
+static method test(self::E e) → dynamic {
+  self::E|set#foo(e, 42);
+  self::E|get#bar(e);
+  invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'.
+  e.foo; // Error.
+    ^^^" in e{<unresolved>}.foo;
+  invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'.
+  e.bar = 42; // Error.
+    ^^^" in e{<unresolved>}.bar = 42;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline.expect
new file mode 100644
index 0000000..d7b5f21
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline.expect
@@ -0,0 +1,9 @@
+class A {}
+
+extension E on A {
+  void set foo(int value) {}
+  int get bar => 42;
+}
+
+test(E e) {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..7a2c265
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.textual_outline_modelled.expect
@@ -0,0 +1,9 @@
+class A {}
+
+extension E on A {
+  int get bar => 42;
+  void set foo(int value) {}
+}
+
+main() {}
+test(E e) {}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.expect b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.expect
new file mode 100644
index 0000000..cd89df1
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.expect
@@ -0,0 +1,42 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'.
+//   e.foo; // Error.
+//     ^^^
+//
+// pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'.
+//   e.bar = 42; // Error.
+//     ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension E on self::A {
+  get bar = self::E|get#bar;
+  set foo = self::E|set#foo;
+}
+static method E|set#foo(lowered final self::A #this, core::int value) → void {}
+static method E|get#bar(lowered final self::A #this) → core::int
+  return 42;
+static method test(self::E e) → dynamic {
+  self::E|set#foo(e, 42);
+  self::E|get#bar(e);
+  invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'.
+  e.foo; // Error.
+    ^^^" in e{<unresolved>}.foo;
+  invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'.
+  e.bar = 42; // Error.
+    ^^^" in e{<unresolved>}.bar = 42;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.outline.expect
new file mode 100644
index 0000000..b1f1b7a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/access_setter_as_getter.dart.weak.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
+    ;
+}
+extension E on self::A {
+  get bar = self::E|get#bar;
+  set foo = self::E|set#foo;
+}
+static method E|set#foo(lowered final self::A #this, core::int value) → void
+  ;
+static method E|get#bar(lowered final self::A #this) → core::int
+  ;
+static method test(self::E e) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart b/pkg/front_end/testcases/extension_types/basic_show.dart
new file mode 100644
index 0000000..c4f310b
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart
@@ -0,0 +1,17 @@
+// 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.
+
+extension E1 on int show num {} // Ok.
+
+extension E2 on int {} // Ok.
+
+extension E3 on int show {} // Error.
+
+extension E4 on int show num, Comparable {} // Ok.
+
+extension E5 on int show num, {} // Error.
+
+extension E6 on int show , num {} // Error.
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.strong.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.strong.expect
new file mode 100644
index 0000000..35387e0
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.strong.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:9:26: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E3 on int show {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:13:31: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E5 on int show num, {} // Error.
+//                               ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:26: Error: Expected an identifier, but got ','.
+// Try inserting an identifier before ','.
+// extension E6 on int show , num {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A extension declaration must have a body, even if it is empty.
+// Try adding an empty body.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A function declaration needs an explicit list of parameters.
+// Try adding a parameter list to the function declaration.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension E1 on core::int show-types core::num {
+}
+extension E2 on core::int {
+}
+extension E3 on core::int {
+}
+extension E4 on core::int show-types core::num {
+}
+extension E5 on core::int show-types core::num {
+}
+extension E6 on core::int {
+}
+static method num() → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.strong.transformed.expect
new file mode 100644
index 0000000..35387e0
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.strong.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:9:26: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E3 on int show {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:13:31: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E5 on int show num, {} // Error.
+//                               ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:26: Error: Expected an identifier, but got ','.
+// Try inserting an identifier before ','.
+// extension E6 on int show , num {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A extension declaration must have a body, even if it is empty.
+// Try adding an empty body.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A function declaration needs an explicit list of parameters.
+// Try adding a parameter list to the function declaration.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension E1 on core::int show-types core::num {
+}
+extension E2 on core::int {
+}
+extension E3 on core::int {
+}
+extension E4 on core::int show-types core::num {
+}
+extension E5 on core::int show-types core::num {
+}
+extension E6 on core::int {
+}
+static method num() → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.textual_outline.expect
new file mode 100644
index 0000000..63b59b8
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+extension E1 on int show num {}
+extension E2 on int {}
+extension E3 on int show {}
+extension E4 on int show num, Comparable {}
+extension E5 on int show num, {}
+extension E6 on int show , {}
+num (){}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.weak.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.expect
new file mode 100644
index 0000000..35387e0
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:9:26: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E3 on int show {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:13:31: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E5 on int show num, {} // Error.
+//                               ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:26: Error: Expected an identifier, but got ','.
+// Try inserting an identifier before ','.
+// extension E6 on int show , num {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A extension declaration must have a body, even if it is empty.
+// Try adding an empty body.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A function declaration needs an explicit list of parameters.
+// Try adding a parameter list to the function declaration.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension E1 on core::int show-types core::num {
+}
+extension E2 on core::int {
+}
+extension E3 on core::int {
+}
+extension E4 on core::int show-types core::num {
+}
+extension E5 on core::int show-types core::num {
+}
+extension E6 on core::int {
+}
+static method num() → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.outline.expect
new file mode 100644
index 0000000..c6612b3
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.outline.expect
@@ -0,0 +1,48 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:9:26: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E3 on int show {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:13:31: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E5 on int show num, {} // Error.
+//                               ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:26: Error: Expected an identifier, but got ','.
+// Try inserting an identifier before ','.
+// extension E6 on int show , num {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A extension declaration must have a body, even if it is empty.
+// Try adding an empty body.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A function declaration needs an explicit list of parameters.
+// Try adding a parameter list to the function declaration.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension E1 on core::int show-types core::num {
+}
+extension E2 on core::int {
+}
+extension E3 on core::int {
+}
+extension E4 on core::int show-types core::num {
+}
+extension E5 on core::int show-types core::num {
+}
+extension E6 on core::int {
+}
+static method num() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/basic_show.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.transformed.expect
new file mode 100644
index 0000000..35387e0
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/basic_show.dart.weak.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:9:26: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E3 on int show {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:13:31: Error: Expected an identifier, but got '{'.
+// Try inserting an identifier before '{'.
+// extension E5 on int show num, {} // Error.
+//                               ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:26: Error: Expected an identifier, but got ','.
+// Try inserting an identifier before ','.
+// extension E6 on int show , num {} // Error.
+//                          ^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A extension declaration must have a body, even if it is empty.
+// Try adding an empty body.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+// pkg/front_end/testcases/extension_types/basic_show.dart:15:28: Error: A function declaration needs an explicit list of parameters.
+// Try adding a parameter list to the function declaration.
+// extension E6 on int show , num {} // Error.
+//                            ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension E1 on core::int show-types core::num {
+}
+extension E2 on core::int {
+}
+extension E3 on core::int {
+}
+extension E4 on core::int show-types core::num {
+}
+extension E5 on core::int show-types core::num {
+}
+extension E6 on core::int {
+}
+static method num() → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/call_not_get.dart b/pkg/front_end/testcases/extension_types/call_not_get.dart
new file mode 100644
index 0000000..8253bcd
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/call_not_get.dart
@@ -0,0 +1,17 @@
+// 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.
+
+extension type E on int show get ceil, floor hide get floor {}
+
+test(E e) {
+  e.ceil; // Ok.
+  e.ceil(); // Error.
+  e.ceil = 42; // Error.
+
+  e.floor; // Error.
+  e.floor(); // Ok.
+  e.ceil = 42; // Error.
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/call_not_get.dart.strong.expect b/pkg/front_end/testcases/extension_types/call_not_get.dart.strong.expect
new file mode 100644
index 0000000..a787e50
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/call_not_get.dart.strong.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:9:5: Error: The method 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
+//   e.ceil(); // Error.
+//     ^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:10:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+//   e.ceil = 42; // Error.
+//     ^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:12:5: Error: The getter 'floor' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'floor'.
+//   e.floor; // Error.
+//     ^^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:14:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+//   e.ceil = 42; // Error.
+//     ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension type E on core::int show-methods core::int::floor show-getters core::int::floor, core::int::ceil hide-getters core::int::floor {
+}
+static method test(self::E e) → dynamic {
+  e.{core::int::ceil}{() → core::int};
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:9:5: Error: The method 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
+  e.ceil(); // Error.
+    ^^^^" in e{<unresolved>}.ceil();
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:10:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+  e.ceil = 42; // Error.
+    ^^^^" in e{<unresolved>}.ceil = 42;
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:12:5: Error: The getter 'floor' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'floor'.
+  e.floor; // Error.
+    ^^^^^" in e{<unresolved>}.floor;
+  e.{core::int::floor}(){() → core::int};
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:14:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+  e.ceil = 42; // Error.
+    ^^^^" in e{<unresolved>}.ceil = 42;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/call_not_get.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/call_not_get.dart.textual_outline.expect
new file mode 100644
index 0000000..c7dd52e
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/call_not_get.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+extension type E on int show get ceil, floor hide get floor {}
+test(E e) {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.expect b/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.expect
new file mode 100644
index 0000000..a787e50
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:9:5: Error: The method 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
+//   e.ceil(); // Error.
+//     ^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:10:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+//   e.ceil = 42; // Error.
+//     ^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:12:5: Error: The getter 'floor' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'floor'.
+//   e.floor; // Error.
+//     ^^^^^
+//
+// pkg/front_end/testcases/extension_types/call_not_get.dart:14:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+//   e.ceil = 42; // Error.
+//     ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+extension type E on core::int show-methods core::int::floor show-getters core::int::floor, core::int::ceil hide-getters core::int::floor {
+}
+static method test(self::E e) → dynamic {
+  e.{core::int::ceil}{() → core::int};
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:9:5: Error: The method 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
+  e.ceil(); // Error.
+    ^^^^" in e{<unresolved>}.ceil();
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:10:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+  e.ceil = 42; // Error.
+    ^^^^" in e{<unresolved>}.ceil = 42;
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:12:5: Error: The getter 'floor' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'floor'.
+  e.floor; // Error.
+    ^^^^^" in e{<unresolved>}.floor;
+  e.{core::int::floor}(){() → core::int};
+  invalid-expression "pkg/front_end/testcases/extension_types/call_not_get.dart:14:5: Error: The setter 'ceil' isn't defined for the extension 'E'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'ceil'.
+  e.ceil = 42; // Error.
+    ^^^^" in e{<unresolved>}.ceil = 42;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.outline.expect
new file mode 100644
index 0000000..aca4fe0
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/call_not_get.dart.weak.outline.expect
@@ -0,0 +1,10 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension type E on core::int show-methods core::int::floor show-getters core::int::floor, core::int::ceil hide-getters core::int::floor {
+}
+static method test(self::E e) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart
new file mode 100644
index 0000000..1caf93a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart
@@ -0,0 +1,13 @@
+// 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.
+
+class A {
+  void mixin() {}
+  void as() {}
+}
+
+extension type E1 on A show mixin, as {}
+extension type E2 on A hide mixin, as {}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.expect
new file mode 100644
index 0000000..6111f5a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method mixin() → void {}
+  method as() → void {}
+}
+extension type E1 on self::A show-methods self::A::as, self::A::mixin show-getters self::A::as, self::A::mixin {
+}
+extension type E2 on self::A hide-methods self::A::as, self::A::mixin hide-getters self::A::as, self::A::mixin {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.transformed.expect
new file mode 100644
index 0000000..6111f5a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.strong.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method mixin() → void {}
+  method as() → void {}
+}
+extension type E1 on self::A show-methods self::A::as, self::A::mixin show-getters self::A::as, self::A::mixin {
+}
+extension type E2 on self::A hide-methods self::A::as, self::A::mixin hide-getters self::A::as, self::A::mixin {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.textual_outline.expect
new file mode 100644
index 0000000..b36dba8
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class A {
+  void mixin() {}
+  void as() {}
+}
+extension type E1 on A show mixin, as {}
+extension type E2 on A hide mixin, as {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.expect
new file mode 100644
index 0000000..6111f5a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method mixin() → void {}
+  method as() → void {}
+}
+extension type E1 on self::A show-methods self::A::as, self::A::mixin show-getters self::A::as, self::A::mixin {
+}
+extension type E2 on self::A hide-methods self::A::as, self::A::mixin hide-getters self::A::as, self::A::mixin {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.outline.expect
new file mode 100644
index 0000000..a2e4d10
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  method mixin() → void
+    ;
+  method as() → void
+    ;
+}
+extension type E1 on self::A show-methods self::A::as, self::A::mixin show-getters self::A::as, self::A::mixin {
+}
+extension type E2 on self::A hide-methods self::A::as, self::A::mixin hide-getters self::A::as, self::A::mixin {
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.transformed.expect
new file mode 100644
index 0000000..6111f5a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/keyword_in_show_hide_element.dart.weak.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method mixin() → void {}
+  method as() → void {}
+}
+extension type E1 on self::A show-methods self::A::as, self::A::mixin show-getters self::A::as, self::A::mixin {
+}
+extension type E2 on self::A hide-methods self::A::as, self::A::mixin hide-getters self::A::as, self::A::mixin {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart
new file mode 100644
index 0000000..387f28d
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart
@@ -0,0 +1,19 @@
+// 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.
+
+extension E on double show num {}
+
+expectIdentical(dynamic a, dynamic b) {
+  if (!identical(a, b)) {
+    throw "Expected '${a}' and '${b}' to be identical.";
+  }
+}
+
+test(E e, int value) {
+  expectIdentical(e.ceil(), value);
+}
+
+main() {
+  test(3.14, 4);
+}
diff --git a/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.strong.expect b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.strong.expect
new file mode 100644
index 0000000..61492c2
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::double show-types core::num {
+}
+static method expectIdentical(dynamic a, dynamic b) → dynamic {
+  if(!core::identical(a, b)) {
+    throw "Expected '${a}' and '${b}' to be identical.";
+  }
+}
+static method test(self::E e, core::int value) → dynamic {
+  self::expectIdentical(e.{core::num::ceil}(){() → core::int}, value);
+}
+static method main() → dynamic {
+  self::test(3.14, 4);
+}
diff --git a/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.textual_outline.expect
new file mode 100644
index 0000000..b972325
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+extension E on double show num {}
+expectIdentical(dynamic a, dynamic b) {}
+test(E e, int value) {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.expect b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.expect
new file mode 100644
index 0000000..61492c2
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::double show-types core::num {
+}
+static method expectIdentical(dynamic a, dynamic b) → dynamic {
+  if(!core::identical(a, b)) {
+    throw "Expected '${a}' and '${b}' to be identical.";
+  }
+}
+static method test(self::E e, core::int value) → dynamic {
+  self::expectIdentical(e.{core::num::ceil}(){() → core::int}, value);
+}
+static method main() → dynamic {
+  self::test(3.14, 4);
+}
diff --git a/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.outline.expect
new file mode 100644
index 0000000..ddfdf1f
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_and_run_ceil.dart.weak.outline.expect
@@ -0,0 +1,12 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension E on core::double show-types core::num {
+}
+static method expectIdentical(dynamic a, dynamic b) → dynamic
+  ;
+static method test(self::E e, core::int value) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart
new file mode 100644
index 0000000..d26636c
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart
@@ -0,0 +1,41 @@
+// 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.
+
+class A<X> {}
+class B<X> extends A<X> {}
+class C extends B<int> {}
+
+extension type E on C show B<int> hide A<int> {}
+
+class A2 {}
+class B2 extends A2 {}
+class C2 extends B2 {}
+
+extension type E2 on C2 show B2 hide A2 {}
+
+class A3 {
+  void foo() {}
+  int? field;
+  String? field2;
+  int get getter => 42;
+  void set setter(int value) {}
+  void set setter2(int value) {}
+  void set setter3(int value) {}
+  A3 operator +(A3 other) => other;
+  A3 operator *(A3 other) => this;
+}
+
+class B3 extends A3 {
+  void bar() {}
+}
+
+class C3 extends B3 {
+  void baz() {}
+}
+
+extension type E3 on C3
+  show B3, baz, field, setter, set field2, operator +
+  hide foo, get field, getter, setter2, set setter3, operator * {}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.expect
new file mode 100644
index 0000000..ba0e4db
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.expect
@@ -0,0 +1,70 @@
+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%>
+    : super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends self::A<self::B::X%> {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super self::A::•()
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2
+    : super core::Object::•()
+    ;
+}
+class B2 extends self::A2 {
+  synthetic constructor •() → self::B2
+    : super self::A2::•()
+    ;
+}
+class C2 extends self::B2 {
+  synthetic constructor •() → self::C2
+    : super self::B2::•()
+    ;
+}
+class A3 extends core::Object {
+  field core::int? field = null;
+  field core::String? field2 = null;
+  synthetic constructor •() → self::A3
+    : super core::Object::•()
+    ;
+  method foo() → void {}
+  get getter() → core::int
+    return 42;
+  set setter(core::int value) → void {}
+  set setter2(core::int value) → void {}
+  set setter3(core::int value) → void {}
+  operator +(self::A3 other) → self::A3
+    return other;
+  operator *(self::A3 other) → self::A3
+    return this;
+}
+class B3 extends self::A3 {
+  synthetic constructor •() → self::B3
+    : super self::A3::•()
+    ;
+  method bar() → void {}
+}
+class C3 extends self::B3 {
+  synthetic constructor •() → self::C3
+    : super self::B3::•()
+    ;
+  method baz() → void {}
+}
+extension type E on self::C show-types self::B<core::int> hide-types self::A<core::int> {
+}
+extension type E2 on self::C2 show-types self::B2 hide-types self::A2 {
+}
+extension type E3 on self::C3 show-types self::B3 show-methods self::C3::baz show-getters self::A3::field, self::C3::baz show-setters self::A3::setter, self::A3::field, self::A3::field2 show-operators self::A3::+ hide-methods self::A3::foo hide-getters self::A3::getter, self::A3::foo, self::A3::field hide-setters self::A3::setter2, self::A3::setter3 hide-operators self::A3::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.transformed.expect
new file mode 100644
index 0000000..ba0e4db
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.strong.transformed.expect
@@ -0,0 +1,70 @@
+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%>
+    : super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends self::A<self::B::X%> {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super self::A::•()
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2
+    : super core::Object::•()
+    ;
+}
+class B2 extends self::A2 {
+  synthetic constructor •() → self::B2
+    : super self::A2::•()
+    ;
+}
+class C2 extends self::B2 {
+  synthetic constructor •() → self::C2
+    : super self::B2::•()
+    ;
+}
+class A3 extends core::Object {
+  field core::int? field = null;
+  field core::String? field2 = null;
+  synthetic constructor •() → self::A3
+    : super core::Object::•()
+    ;
+  method foo() → void {}
+  get getter() → core::int
+    return 42;
+  set setter(core::int value) → void {}
+  set setter2(core::int value) → void {}
+  set setter3(core::int value) → void {}
+  operator +(self::A3 other) → self::A3
+    return other;
+  operator *(self::A3 other) → self::A3
+    return this;
+}
+class B3 extends self::A3 {
+  synthetic constructor •() → self::B3
+    : super self::A3::•()
+    ;
+  method bar() → void {}
+}
+class C3 extends self::B3 {
+  synthetic constructor •() → self::C3
+    : super self::B3::•()
+    ;
+  method baz() → void {}
+}
+extension type E on self::C show-types self::B<core::int> hide-types self::A<core::int> {
+}
+extension type E2 on self::C2 show-types self::B2 hide-types self::A2 {
+}
+extension type E3 on self::C3 show-types self::B3 show-methods self::C3::baz show-getters self::A3::field, self::C3::baz show-setters self::A3::setter, self::A3::field, self::A3::field2 show-operators self::A3::+ hide-methods self::A3::foo hide-getters self::A3::getter, self::A3::foo, self::A3::field hide-setters self::A3::setter2, self::A3::setter3 hide-operators self::A3::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.textual_outline.expect
new file mode 100644
index 0000000..0287eb2
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.textual_outline.expect
@@ -0,0 +1,27 @@
+class A<X> {}
+class B<X> extends A<X> {}
+class C extends B<int> {}
+extension type E on C show B<int> hide A<int> {}
+class A2 {}
+class B2 extends A2 {}
+class C2 extends B2 {}
+extension type E2 on C2 show B2 hide A2 {}
+class A3 {
+  void foo() {}
+  int? field;
+  String? field2;
+  int get getter => 42;
+  void set setter(int value) {}
+  void set setter2(int value) {}
+  void set setter3(int value) {}
+  A3 operator +(A3 other) => other;
+  A3 operator *(A3 other) => this;
+}
+class B3 extends A3 {
+  void bar() {}
+}
+class C3 extends B3 {
+  void baz() {}
+}
+extension type E3 on C3 show B3, baz, field, setter, set field2, operator + hide foo, get field, getter, setter2, set setter3, operator * {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.expect
new file mode 100644
index 0000000..ba0e4db
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.expect
@@ -0,0 +1,70 @@
+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%>
+    : super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends self::A<self::B::X%> {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super self::A::•()
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2
+    : super core::Object::•()
+    ;
+}
+class B2 extends self::A2 {
+  synthetic constructor •() → self::B2
+    : super self::A2::•()
+    ;
+}
+class C2 extends self::B2 {
+  synthetic constructor •() → self::C2
+    : super self::B2::•()
+    ;
+}
+class A3 extends core::Object {
+  field core::int? field = null;
+  field core::String? field2 = null;
+  synthetic constructor •() → self::A3
+    : super core::Object::•()
+    ;
+  method foo() → void {}
+  get getter() → core::int
+    return 42;
+  set setter(core::int value) → void {}
+  set setter2(core::int value) → void {}
+  set setter3(core::int value) → void {}
+  operator +(self::A3 other) → self::A3
+    return other;
+  operator *(self::A3 other) → self::A3
+    return this;
+}
+class B3 extends self::A3 {
+  synthetic constructor •() → self::B3
+    : super self::A3::•()
+    ;
+  method bar() → void {}
+}
+class C3 extends self::B3 {
+  synthetic constructor •() → self::C3
+    : super self::B3::•()
+    ;
+  method baz() → void {}
+}
+extension type E on self::C show-types self::B<core::int> hide-types self::A<core::int> {
+}
+extension type E2 on self::C2 show-types self::B2 hide-types self::A2 {
+}
+extension type E3 on self::C3 show-types self::B3 show-methods self::C3::baz show-getters self::A3::field, self::C3::baz show-setters self::A3::setter, self::A3::field, self::A3::field2 show-operators self::A3::+ hide-methods self::A3::foo hide-getters self::A3::getter, self::A3::foo, self::A3::field hide-setters self::A3::setter2, self::A3::setter3 hide-operators self::A3::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.outline.expect
new file mode 100644
index 0000000..4ddfe41
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.outline.expect
@@ -0,0 +1,68 @@
+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<X extends core::Object? = dynamic> extends self::A<self::B::X%> {
+  synthetic constructor •() → self::B<self::B::X%>
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    ;
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2
+    ;
+}
+class B2 extends self::A2 {
+  synthetic constructor •() → self::B2
+    ;
+}
+class C2 extends self::B2 {
+  synthetic constructor •() → self::C2
+    ;
+}
+class A3 extends core::Object {
+  field core::int? field;
+  field core::String? field2;
+  synthetic constructor •() → self::A3
+    ;
+  method foo() → void
+    ;
+  get getter() → core::int
+    ;
+  set setter(core::int value) → void
+    ;
+  set setter2(core::int value) → void
+    ;
+  set setter3(core::int value) → void
+    ;
+  operator +(self::A3 other) → self::A3
+    ;
+  operator *(self::A3 other) → self::A3
+    ;
+}
+class B3 extends self::A3 {
+  synthetic constructor •() → self::B3
+    ;
+  method bar() → void
+    ;
+}
+class C3 extends self::B3 {
+  synthetic constructor •() → self::C3
+    ;
+  method baz() → void
+    ;
+}
+extension type E on self::C show-types self::B<core::int> hide-types self::A<core::int> {
+}
+extension type E2 on self::C2 show-types self::B2 hide-types self::A2 {
+}
+extension type E3 on self::C3 show-types self::B3 show-methods self::C3::baz show-getters self::A3::field, self::C3::baz show-setters self::A3::setter, self::A3::field, self::A3::field2 show-operators self::A3::+ hide-methods self::A3::foo hide-getters self::A3::getter, self::A3::foo, self::A3::field hide-setters self::A3::setter2, self::A3::setter3 hide-operators self::A3::* {
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.transformed.expect
new file mode 100644
index 0000000..ba0e4db
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/show_hide_all_kinds.dart.weak.transformed.expect
@@ -0,0 +1,70 @@
+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%>
+    : super core::Object::•()
+    ;
+}
+class B<X extends core::Object? = dynamic> extends self::A<self::B::X%> {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super self::A::•()
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2
+    : super core::Object::•()
+    ;
+}
+class B2 extends self::A2 {
+  synthetic constructor •() → self::B2
+    : super self::A2::•()
+    ;
+}
+class C2 extends self::B2 {
+  synthetic constructor •() → self::C2
+    : super self::B2::•()
+    ;
+}
+class A3 extends core::Object {
+  field core::int? field = null;
+  field core::String? field2 = null;
+  synthetic constructor •() → self::A3
+    : super core::Object::•()
+    ;
+  method foo() → void {}
+  get getter() → core::int
+    return 42;
+  set setter(core::int value) → void {}
+  set setter2(core::int value) → void {}
+  set setter3(core::int value) → void {}
+  operator +(self::A3 other) → self::A3
+    return other;
+  operator *(self::A3 other) → self::A3
+    return this;
+}
+class B3 extends self::A3 {
+  synthetic constructor •() → self::B3
+    : super self::A3::•()
+    ;
+  method bar() → void {}
+}
+class C3 extends self::B3 {
+  synthetic constructor •() → self::C3
+    : super self::B3::•()
+    ;
+  method baz() → void {}
+}
+extension type E on self::C show-types self::B<core::int> hide-types self::A<core::int> {
+}
+extension type E2 on self::C2 show-types self::B2 hide-types self::A2 {
+}
+extension type E3 on self::C3 show-types self::B3 show-methods self::C3::baz show-getters self::A3::field, self::C3::baz show-setters self::A3::setter, self::A3::field, self::A3::field2 show-operators self::A3::+ hide-methods self::A3::foo hide-getters self::A3::getter, self::A3::foo, self::A3::field hide-setters self::A3::setter2, self::A3::setter3 hide-operators self::A3::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart
new file mode 100644
index 0000000..0b39bde
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart
@@ -0,0 +1,33 @@
+// 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.
+
+class I1<X, Y> {}
+
+class I2<X, Y, Z> {}
+
+class A {}
+
+class B extends A implements I1<int, int> {
+  void methodB() {}
+  void methodB2() {}
+  int get getterB => throw 42;
+  void set setterB(int value) {}
+  B operator *(B other) => throw 42;
+}
+
+class C extends B {}
+
+class D extends C implements I2<int, int, int> {
+  void methodD() {}
+  int get getterD => throw 42;
+  void set setterD(int value) {}
+  D operator +(D other) => throw 42;
+}
+
+extension type E on D
+  show C, I2<int, int, int>, methodD, get getterD, set setterD, operator +
+  hide A, I1<int, int>, methodB, methodB2, get getterB, set setterB, operator *
+  {}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.expect
new file mode 100644
index 0000000..a785e78
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class I1<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I1<self::I1::X%, self::I1::Y%>
+    : super core::Object::•()
+    ;
+}
+class I2<X extends core::Object? = dynamic, Y extends core::Object? = dynamic, Z extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I2<self::I2::X%, self::I2::Y%, self::I2::Z%>
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I1<core::int, core::int> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method methodB() → void {}
+  method methodB2() → void {}
+  get getterB() → core::int
+    return throw 42;
+  set setterB(core::int value) → void {}
+  operator *(self::B other) → self::B
+    return throw 42;
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class D extends self::C implements self::I2<core::int, core::int, core::int> {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  method methodD() → void {}
+  get getterD() → core::int
+    return throw 42;
+  set setterD(core::int value) → void {}
+  operator +(self::D other) → self::D
+    return throw 42;
+}
+extension type E on self::D show-types self::I2<core::int, core::int, core::int>, self::C show-methods self::D::methodD show-getters self::D::methodD, self::D::getterD show-setters self::D::setterD show-operators self::D::+ hide-types self::I1<core::int, core::int>, self::A hide-methods self::B::methodB2, self::B::methodB hide-getters self::B::methodB2, self::B::methodB, self::B::getterB hide-setters self::B::setterB hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.transformed.expect
new file mode 100644
index 0000000..a785e78
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.strong.transformed.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class I1<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I1<self::I1::X%, self::I1::Y%>
+    : super core::Object::•()
+    ;
+}
+class I2<X extends core::Object? = dynamic, Y extends core::Object? = dynamic, Z extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I2<self::I2::X%, self::I2::Y%, self::I2::Z%>
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I1<core::int, core::int> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method methodB() → void {}
+  method methodB2() → void {}
+  get getterB() → core::int
+    return throw 42;
+  set setterB(core::int value) → void {}
+  operator *(self::B other) → self::B
+    return throw 42;
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class D extends self::C implements self::I2<core::int, core::int, core::int> {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  method methodD() → void {}
+  get getterD() → core::int
+    return throw 42;
+  set setterD(core::int value) → void {}
+  operator +(self::D other) → self::D
+    return throw 42;
+}
+extension type E on self::D show-types self::I2<core::int, core::int, core::int>, self::C show-methods self::D::methodD show-getters self::D::methodD, self::D::getterD show-setters self::D::setterD show-operators self::D::+ hide-types self::I1<core::int, core::int>, self::A hide-methods self::B::methodB2, self::B::methodB hide-getters self::B::methodB2, self::B::methodB, self::B::getterB hide-setters self::B::setterB hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.textual_outline.expect
new file mode 100644
index 0000000..fe1d85f
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.textual_outline.expect
@@ -0,0 +1,19 @@
+class I1<X, Y> {}
+class I2<X, Y, Z> {}
+class A {}
+class B extends A implements I1<int, int> {
+  void methodB() {}
+  void methodB2() {}
+  int get getterB => throw 42;
+  void set setterB(int value) {}
+  B operator *(B other) => throw 42;
+}
+class C extends B {}
+class D extends C implements I2<int, int, int> {
+  void methodD() {}
+  int get getterD => throw 42;
+  void set setterD(int value) {}
+  D operator +(D other) => throw 42;
+}
+extension type E on D show C, I2<int, int, int>, methodD, get getterD, set setterD, operator + hide A, I1<int, int>, methodB, methodB2, get getterB, set setterB, operator * {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.expect
new file mode 100644
index 0000000..a785e78
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class I1<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I1<self::I1::X%, self::I1::Y%>
+    : super core::Object::•()
+    ;
+}
+class I2<X extends core::Object? = dynamic, Y extends core::Object? = dynamic, Z extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I2<self::I2::X%, self::I2::Y%, self::I2::Z%>
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I1<core::int, core::int> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method methodB() → void {}
+  method methodB2() → void {}
+  get getterB() → core::int
+    return throw 42;
+  set setterB(core::int value) → void {}
+  operator *(self::B other) → self::B
+    return throw 42;
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class D extends self::C implements self::I2<core::int, core::int, core::int> {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  method methodD() → void {}
+  get getterD() → core::int
+    return throw 42;
+  set setterD(core::int value) → void {}
+  operator +(self::D other) → self::D
+    return throw 42;
+}
+extension type E on self::D show-types self::I2<core::int, core::int, core::int>, self::C show-methods self::D::methodD show-getters self::D::methodD, self::D::getterD show-setters self::D::setterD show-operators self::D::+ hide-types self::I1<core::int, core::int>, self::A hide-methods self::B::methodB2, self::B::methodB hide-getters self::B::methodB2, self::B::methodB, self::B::getterB hide-setters self::B::setterB hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.outline.expect
new file mode 100644
index 0000000..2ab900d
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.outline.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class I1<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I1<self::I1::X%, self::I1::Y%>
+    ;
+}
+class I2<X extends core::Object? = dynamic, Y extends core::Object? = dynamic, Z extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I2<self::I2::X%, self::I2::Y%, self::I2::Z%>
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+class B extends self::A implements self::I1<core::int, core::int> {
+  synthetic constructor •() → self::B
+    ;
+  method methodB() → void
+    ;
+  method methodB2() → void
+    ;
+  get getterB() → core::int
+    ;
+  set setterB(core::int value) → void
+    ;
+  operator *(self::B other) → self::B
+    ;
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    ;
+}
+class D extends self::C implements self::I2<core::int, core::int, core::int> {
+  synthetic constructor •() → self::D
+    ;
+  method methodD() → void
+    ;
+  get getterD() → core::int
+    ;
+  set setterD(core::int value) → void
+    ;
+  operator +(self::D other) → self::D
+    ;
+}
+extension type E on self::D show-types self::I2<core::int, core::int, core::int>, self::C show-methods self::D::methodD show-getters self::D::methodD, self::D::getterD show-setters self::D::setterD show-operators self::D::+ hide-types self::I1<core::int, core::int>, self::A hide-methods self::B::methodB2, self::B::methodB hide-getters self::B::methodB2, self::B::methodB, self::B::getterB hide-setters self::B::setterB hide-operators self::B::* {
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.transformed.expect
new file mode 100644
index 0000000..a785e78
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/simple_show_and_hide.dart.weak.transformed.expect
@@ -0,0 +1,50 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class I1<X extends core::Object? = dynamic, Y extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I1<self::I1::X%, self::I1::Y%>
+    : super core::Object::•()
+    ;
+}
+class I2<X extends core::Object? = dynamic, Y extends core::Object? = dynamic, Z extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::I2<self::I2::X%, self::I2::Y%, self::I2::Z%>
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I1<core::int, core::int> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method methodB() → void {}
+  method methodB2() → void {}
+  get getterB() → core::int
+    return throw 42;
+  set setterB(core::int value) → void {}
+  operator *(self::B other) → self::B
+    return throw 42;
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+}
+class D extends self::C implements self::I2<core::int, core::int, core::int> {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  method methodD() → void {}
+  get getterD() → core::int
+    return throw 42;
+  set setterD(core::int value) → void {}
+  operator +(self::D other) → self::D
+    return throw 42;
+}
+extension type E on self::D show-types self::I2<core::int, core::int, core::int>, self::C show-methods self::D::methodD show-getters self::D::methodD, self::D::getterD show-setters self::D::setterD show-operators self::D::+ hide-types self::I1<core::int, core::int>, self::A hide-methods self::B::methodB2, self::B::methodB hide-getters self::B::methodB2, self::B::methodB, self::B::getterB hide-setters self::B::setterB hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.strong.expect b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.strong.expect
index cfd32eb..a7bbb4c 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.strong.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.strong.expect
@@ -2,127 +2,20 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {}
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:25: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension type MyInt on int show num, isEven hide floor {
-//                         ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: Expected ';' after this.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:34: Error: 'num' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                  ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Context: Previous declaration of 'num'.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: 'isEven' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Context: Previous declaration of 'isEven'.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:51: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension type MyInt on int show num, isEven hide floor {
-//                                                   ^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {}
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: Type 'show' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                             ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:46: Error: Type 'hide' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                                              ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name 'e2'.
 //   e2.floor(); // Ok.
 //   ^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'.
-// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-//   e1.ceil(); // Ok.
-//      ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:10:6: Error: The getter 'isEven' isn't defined for the extension 'E1'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
 //   e1.isEven; // Error.
 //      ^^^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {}
-//                     ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'.
 // Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
 //   e2.ceil(); // Error.
 //      ^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'.
-// Try correcting the name to the name of an existing method, or defining a method name 'floor'.
-//   e2.floor(); // Ok.
-//      ^^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
 //   e2.isEven; // Error.
@@ -138,38 +31,6 @@
 //   e3.isEven; // Error.
 //      ^^^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: 'show' isn't a type.
-// extension type MyInt on int show num, isEven hide floor {
-//                             ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:7: Error: Expected ';' after this.
-//   int get twice => 2 * this;
-//       ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:17: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   int get twice => 2 * this;
-//                 ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'.
-//   int get twice => 2 * this;
-//                        ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'.
-//   m.twice; // OK, in the extension type.
-//     ^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
-//   m.isEven; // OK, a shown instance member.
-//     ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-//   m.ceil(); // OK, a shown instance member.
-//     ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'.
 // Try correcting the name to the name of an existing method, or defining a method name 'floor'.
 //   m.floor(); // Error, hidden.
@@ -178,20 +39,17 @@
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
 }
-extension type MyInt on core::int {
+extension type MyInt on core::int show-types core::num show-getters core::int::isEven hide-methods core::int::floor hide-getters core::int::floor {
+  get twice = self::MyInt|get#twice;
 }
-static method num() → invalid-type {}
 static method test1(self::E1 e1) → dynamic {
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'.
-Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-  e1.ceil(); // Ok.
-     ^^^^" in e1{<unresolved>}.ceil();
+  e1.{core::num::ceil}(){() → core::int};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name 'e2'.
   e2.floor(); // Ok.
   ^^"{dynamic}.floor();
@@ -200,22 +58,17 @@
   e1.isEven; // Error.
      ^^^^^^" in e1{<unresolved>}.isEven;
 }
-static method ceil() → invalid-type {}
 static method test2(self::E2 e2) → dynamic {
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'.
 Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
   e2.ceil(); // Error.
      ^^^^" in e2{<unresolved>}.ceil();
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'.
-Try correcting the name to the name of an existing method, or defining a method name 'floor'.
-  e2.floor(); // Ok.
-     ^^^^^" in e2{<unresolved>}.floor();
+  e2.{core::num::floor}(){() → core::int};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
   e2.isEven; // Error.
      ^^^^^^" in e2{<unresolved>}.isEven;
 }
-static method isEven() → invalid-type {}
 static method test3(self::E3 e3) → dynamic {
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:24:6: Error: The getter 'isOdd' isn't defined for the extension 'E3'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'isOdd'.
@@ -226,27 +79,13 @@
   e3.isEven; // Error.
      ^^^^^^" in e3{<unresolved>}.isEven;
 }
-static method floor() → invalid-type {
-  core::int get;
-  function twice() → core::double
-    return 2.{core::num::*}(invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'.
-  int get twice => 2 * this;
-                       ^^^^"){(core::num) → core::double};
-}
+static method MyInt|get#twice(lowered final core::int #this) → core::int
+  return 2.{core::num::*}(#this){(core::num) → core::int};
 static method test() → dynamic {
   self::MyInt m = 42;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'.
-  m.twice; // OK, in the extension type.
-    ^^^^^" in m{<unresolved>}.twice;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
-  m.isEven; // OK, a shown instance member.
-    ^^^^^^" in m{<unresolved>}.isEven;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-  m.ceil(); // OK, a shown instance member.
-    ^^^^" in m{<unresolved>}.ceil();
+  self::MyInt|get#twice(m);
+  m.{core::int::isEven}{core::bool};
+  m.{core::num::ceil}(){() → core::int};
   m.{core::Object::toString}(){() → core::String};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'.
 Try correcting the name to the name of an existing method, or defining a method name 'floor'.
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.textual_outline.expect
index 6296476..ab59429 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.textual_outline.expect
@@ -1,15 +1,11 @@
-extension E1 on int {}
-show num (){}
+extension E1 on int show num {}
 test1(E1 e1) {}
-extension E2 on int {}
-show num ;
-hide ceil (){}
+extension E2 on int show num hide ceil {}
 test2(E2 e2) {}
-extension E3 on int {}
-hide isEven (){}
+extension E3 on int hide isEven {}
 test3(E3 e3) {}
-extension type MyInt on int {}
-show num, isEven ;
-hide floor (){}
+extension type MyInt on int show num, isEven hide floor {
+  int get twice => 2 * this;
+}
 test() {}
 main() {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.expect b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.expect
index cfd32eb..a7bbb4c 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.expect
@@ -2,127 +2,20 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {}
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:25: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension type MyInt on int show num, isEven hide floor {
-//                         ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: Expected ';' after this.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:34: Error: 'num' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                  ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Context: Previous declaration of 'num'.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: 'isEven' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Context: Previous declaration of 'isEven'.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:51: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension type MyInt on int show num, isEven hide floor {
-//                                                   ^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {}
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: Type 'show' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                             ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:46: Error: Type 'hide' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                                              ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name 'e2'.
 //   e2.floor(); // Ok.
 //   ^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'.
-// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-//   e1.ceil(); // Ok.
-//      ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:10:6: Error: The getter 'isEven' isn't defined for the extension 'E1'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
 //   e1.isEven; // Error.
 //      ^^^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {}
-//                     ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'.
 // Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
 //   e2.ceil(); // Error.
 //      ^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'.
-// Try correcting the name to the name of an existing method, or defining a method name 'floor'.
-//   e2.floor(); // Ok.
-//      ^^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
 //   e2.isEven; // Error.
@@ -138,38 +31,6 @@
 //   e3.isEven; // Error.
 //      ^^^^^^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: 'show' isn't a type.
-// extension type MyInt on int show num, isEven hide floor {
-//                             ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:7: Error: Expected ';' after this.
-//   int get twice => 2 * this;
-//       ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:17: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   int get twice => 2 * this;
-//                 ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'.
-//   int get twice => 2 * this;
-//                        ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'.
-//   m.twice; // OK, in the extension type.
-//     ^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
-//   m.isEven; // OK, a shown instance member.
-//     ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'.
-// Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-//   m.ceil(); // OK, a shown instance member.
-//     ^^^^
-//
 // pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'.
 // Try correcting the name to the name of an existing method, or defining a method name 'floor'.
 //   m.floor(); // Error, hidden.
@@ -178,20 +39,17 @@
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
 }
-extension type MyInt on core::int {
+extension type MyInt on core::int show-types core::num show-getters core::int::isEven hide-methods core::int::floor hide-getters core::int::floor {
+  get twice = self::MyInt|get#twice;
 }
-static method num() → invalid-type {}
 static method test1(self::E1 e1) → dynamic {
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'.
-Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-  e1.ceil(); // Ok.
-     ^^^^" in e1{<unresolved>}.ceil();
+  e1.{core::num::ceil}(){() → core::int};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name 'e2'.
   e2.floor(); // Ok.
   ^^"{dynamic}.floor();
@@ -200,22 +58,17 @@
   e1.isEven; // Error.
      ^^^^^^" in e1{<unresolved>}.isEven;
 }
-static method ceil() → invalid-type {}
 static method test2(self::E2 e2) → dynamic {
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'.
 Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
   e2.ceil(); // Error.
      ^^^^" in e2{<unresolved>}.ceil();
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'.
-Try correcting the name to the name of an existing method, or defining a method name 'floor'.
-  e2.floor(); // Ok.
-     ^^^^^" in e2{<unresolved>}.floor();
+  e2.{core::num::floor}(){() → core::int};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
   e2.isEven; // Error.
      ^^^^^^" in e2{<unresolved>}.isEven;
 }
-static method isEven() → invalid-type {}
 static method test3(self::E3 e3) → dynamic {
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:24:6: Error: The getter 'isOdd' isn't defined for the extension 'E3'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'isOdd'.
@@ -226,27 +79,13 @@
   e3.isEven; // Error.
      ^^^^^^" in e3{<unresolved>}.isEven;
 }
-static method floor() → invalid-type {
-  core::int get;
-  function twice() → core::double
-    return 2.{core::num::*}(invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'.
-  int get twice => 2 * this;
-                       ^^^^"){(core::num) → core::double};
-}
+static method MyInt|get#twice(lowered final core::int #this) → core::int
+  return 2.{core::num::*}(#this){(core::num) → core::int};
 static method test() → dynamic {
   self::MyInt m = 42;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'.
-  m.twice; // OK, in the extension type.
-    ^^^^^" in m{<unresolved>}.twice;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'.
-  m.isEven; // OK, a shown instance member.
-    ^^^^^^" in m{<unresolved>}.isEven;
-  invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'.
-Try correcting the name to the name of an existing method, or defining a method name 'ceil'.
-  m.ceil(); // OK, a shown instance member.
-    ^^^^" in m{<unresolved>}.ceil();
+  self::MyInt|get#twice(m);
+  m.{core::int::isEven}{core::bool};
+  m.{core::num::ceil}(){() → core::int};
   m.{core::Object::toString}(){() → core::String};
   invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'.
 Try correcting the name to the name of an existing method, or defining a method name 'floor'.
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.outline.expect
index 7a2b050..1cd63b0 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide.dart.weak.outline.expect
@@ -1,124 +1,23 @@
 library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {}
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {}
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:25: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension type MyInt on int show num, isEven hide floor {
-//                         ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: Expected ';' after this.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:34: Error: 'num' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                  ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Context: Previous declaration of 'num'.
-// extension E2 on int show num hide ceil {}
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: 'isEven' is already declared in this scope.
-// extension type MyInt on int show num, isEven hide floor {
-//                                       ^^^^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Context: Previous declaration of 'isEven'.
-// extension E3 on int hide isEven {}
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:51: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension type MyInt on int show num, isEven hide floor {
-//                                                   ^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {}
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {}
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: Type 'show' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                             ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:46: Error: Type 'hide' not found.
-// extension type MyInt on int show num, isEven hide floor {
-//                                              ^^^^
-//
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
 }
-extension type MyInt on core::int {
+extension type MyInt on core::int show-types core::num show-getters core::int::isEven hide-methods core::int::floor hide-getters core::int::floor {
+  get twice = self::MyInt|get#twice;
 }
-static method num() → invalid-type
-  ;
 static method test1(self::E1 e1) → dynamic
   ;
-static method ceil() → invalid-type
-  ;
 static method test2(self::E2 e2) → dynamic
   ;
-static method isEven() → invalid-type
-  ;
 static method test3(self::E3 e3) → dynamic
   ;
-static method floor() → invalid-type
+static method MyInt|get#twice(lowered final core::int #this) → core::int
   ;
 static method test() → dynamic
   ;
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.expect
index b62bef7..70175c9 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.expect
@@ -2,140 +2,58 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Error.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Ok.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int floor() {} // Error.
-//   ^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Error: Expected ';' after this.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:18: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isOdd => throw 42; // Error.
-//                  ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Context: Previous declaration of 'get'.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: Expected ';' after this.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:19: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isEven => throw 42; // Ok.
-//                   ^^
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
+  method ceil = self::E1|ceil;
+  tearoff ceil = self::E1|get#ceil;
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
+  method ceil = self::E2|ceil;
+  tearoff ceil = self::E2|get#ceil;
+  method floor = self::E2|floor;
+  tearoff floor = self::E2|get#floor;
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
+  get isOdd = self::E3|get#isOdd;
+  get isEven = self::E3|get#isEven;
 }
-static method num() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method ceil() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E1|ceil(#this);
+static method E2|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Ok.
-  ^" in null;
-  }
-  function floor() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+      ^" in null;
+}
+static method E2|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|ceil(#this);
+static method E2|floor(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int floor() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method isEven() → invalid-type {
-  core::bool get;
-  function isOdd() → Never
-    return throw 42;
-  core::bool get = invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-  bool get isEven => throw 42; // Ok.
-       ^^^";
-  function isEven() → Never
-    return throw 42;
-}
+static method E2|get#floor(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|floor(#this);
+static method E3|get#isOdd(lowered final core::int #this) → core::bool
+  return throw 42;
+static method E3|get#isEven(lowered final core::int #this) → core::bool
+  return throw 42;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.transformed.expect
index b62bef7..70175c9 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.strong.transformed.expect
@@ -2,140 +2,58 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Error.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Ok.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int floor() {} // Error.
-//   ^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Error: Expected ';' after this.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:18: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isOdd => throw 42; // Error.
-//                  ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Context: Previous declaration of 'get'.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: Expected ';' after this.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:19: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isEven => throw 42; // Ok.
-//                   ^^
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
+  method ceil = self::E1|ceil;
+  tearoff ceil = self::E1|get#ceil;
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
+  method ceil = self::E2|ceil;
+  tearoff ceil = self::E2|get#ceil;
+  method floor = self::E2|floor;
+  tearoff floor = self::E2|get#floor;
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
+  get isOdd = self::E3|get#isOdd;
+  get isEven = self::E3|get#isEven;
 }
-static method num() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method ceil() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E1|ceil(#this);
+static method E2|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Ok.
-  ^" in null;
-  }
-  function floor() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+      ^" in null;
+}
+static method E2|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|ceil(#this);
+static method E2|floor(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int floor() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method isEven() → invalid-type {
-  core::bool get;
-  function isOdd() → Never
-    return throw 42;
-  core::bool get = invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-  bool get isEven => throw 42; // Ok.
-       ^^^";
-  function isEven() → Never
-    return throw 42;
-}
+static method E2|get#floor(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|floor(#this);
+static method E3|get#isOdd(lowered final core::int #this) → core::bool
+  return throw 42;
+static method E3|get#isEven(lowered final core::int #this) → core::bool
+  return throw 42;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.textual_outline.expect
index b92215c..89838f5 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.textual_outline.expect
@@ -1,13 +1,12 @@
-extension E1 on int {}
-
-show num() {}
-
-extension E2 on int {}
-
-show num;
-hide ceil() {}
-
-extension E3 on int {}
-
-hide isEven() {}
+extension E1 on int show num {
+  int ceil() {}
+}
+extension E2 on int show num hide ceil {
+  int ceil() {}
+  int floor() {}
+}
+extension E3 on int hide isEven {
+  bool get isOdd => throw 42;
+  bool get isEven => throw 42;
+}
 main() {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.expect
index b62bef7..70175c9 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.expect
@@ -2,140 +2,58 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Error.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Ok.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int floor() {} // Error.
-//   ^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Error: Expected ';' after this.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:18: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isOdd => throw 42; // Error.
-//                  ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Context: Previous declaration of 'get'.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: Expected ';' after this.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:19: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isEven => throw 42; // Ok.
-//                   ^^
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
+  method ceil = self::E1|ceil;
+  tearoff ceil = self::E1|get#ceil;
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
+  method ceil = self::E2|ceil;
+  tearoff ceil = self::E2|get#ceil;
+  method floor = self::E2|floor;
+  tearoff floor = self::E2|get#floor;
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
+  get isOdd = self::E3|get#isOdd;
+  get isEven = self::E3|get#isEven;
 }
-static method num() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method ceil() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E1|ceil(#this);
+static method E2|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Ok.
-  ^" in null;
-  }
-  function floor() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+      ^" in null;
+}
+static method E2|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|ceil(#this);
+static method E2|floor(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int floor() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method isEven() → invalid-type {
-  core::bool get;
-  function isOdd() → Never
-    return throw 42;
-  core::bool get = invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-  bool get isEven => throw 42; // Ok.
-       ^^^";
-  function isEven() → Never
-    return throw 42;
-}
+static method E2|get#floor(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|floor(#this);
+static method E3|get#isOdd(lowered final core::int #this) → core::bool
+  return throw 42;
+static method E3|get#isEven(lowered final core::int #this) → core::bool
+  return throw 42;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.outline.expect
index 5c68071..afb2d37 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.outline.expect
@@ -1,78 +1,36 @@
 library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {
-//                     ^^^^
-//
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
+  method ceil = self::E1|ceil;
+  tearoff ceil = self::E1|get#ceil;
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
+  method ceil = self::E2|ceil;
+  tearoff ceil = self::E2|get#ceil;
+  method floor = self::E2|floor;
+  tearoff floor = self::E2|get#floor;
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
+  get isOdd = self::E3|get#isOdd;
+  get isEven = self::E3|get#isEven;
 }
-static method num() → invalid-type
+static method E1|ceil(lowered final core::int #this) → core::int
   ;
-static method ceil() → invalid-type
+static method E1|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E1|ceil(#this);
+static method E2|ceil(lowered final core::int #this) → core::int
   ;
-static method isEven() → invalid-type
+static method E2|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|ceil(#this);
+static method E2|floor(lowered final core::int #this) → core::int
+  ;
+static method E2|get#floor(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|floor(#this);
+static method E3|get#isOdd(lowered final core::int #this) → core::bool
+  ;
+static method E3|get#isEven(lowered final core::int #this) → core::bool
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.transformed.expect
index b62bef7..70175c9 100644
--- a/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart.weak.transformed.expect
@@ -2,140 +2,58 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E1 on int show num {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E2 on int show num hide ceil {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: Expected ';' after this.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:26: Error: 'num' is already declared in this scope.
-// extension E2 on int show num hide ceil {
-//                          ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:26: Context: Previous declaration of 'num'.
-// extension E1 on int show num {
-//                          ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:35: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E2 on int show num hide ceil {
-//                                   ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:17: Error: A extension declaration must have a body, even if it is empty.
-// Try adding an empty body.
-// extension E3 on int hide isEven {
-//                 ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:26: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-// extension E3 on int hide isEven {
-//                          ^^^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:5:21: Error: Type 'show' not found.
-// extension E1 on int show num {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: Type 'show' not found.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:30: Error: Type 'hide' not found.
-// extension E2 on int show num hide ceil {
-//                              ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:14:21: Error: Type 'hide' not found.
-// extension E3 on int hide isEven {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Error.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:9:21: Error: 'show' isn't a type.
-// extension E2 on int show num hide ceil {
-//                     ^^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int ceil() {} // Ok.
-//   ^
+//       ^
 //
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
 //   int floor() {} // Error.
-//   ^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Error: Expected ';' after this.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:18: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isOdd => throw 42; // Error.
-//                  ^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:16:8: Context: Previous declaration of 'get'.
-//   bool get isOdd => throw 42; // Error.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: Expected ';' after this.
-//   bool get isEven => throw 42; // Ok.
-//        ^^^
-//
-// pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:19: Error: A function declaration needs an explicit list of parameters.
-// Try adding a parameter list to the function declaration.
-//   bool get isEven => throw 42; // Ok.
-//                   ^^
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
-extension E1 on core::int {
+extension E1 on core::int show-types core::num {
+  method ceil = self::E1|ceil;
+  tearoff ceil = self::E1|get#ceil;
 }
-extension E2 on core::int {
+extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil {
+  method ceil = self::E2|ceil;
+  tearoff ceil = self::E2|get#ceil;
+  method floor = self::E2|floor;
+  tearoff floor = self::E2|get#floor;
 }
-extension E3 on core::int {
+extension E3 on core::int hide-getters core::int::isEven {
+  get isOdd = self::E3|get#isOdd;
+  get isEven = self::E3|get#isEven;
 }
-static method num() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:6:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method ceil() → invalid-type {
-  function ceil() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+static method E1|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E1|ceil(#this);
+static method E2|ceil(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:10:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int ceil() {} // Ok.
-  ^" in null;
-  }
-  function floor() → core::int {
-    return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:3: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+      ^" in null;
+}
+static method E2|get#ceil(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|ceil(#this);
+static method E2|floor(lowered final core::int #this) → core::int {
+  return invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:11:7: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
   int floor() {} // Error.
-  ^" in null;
-  }
+      ^" in null;
 }
-static method isEven() → invalid-type {
-  core::bool get;
-  function isOdd() → Never
-    return throw 42;
-  core::bool get = invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide_conflicts.dart:17:8: Error: 'get' is already declared in this scope.
-  bool get isEven => throw 42; // Ok.
-       ^^^";
-  function isEven() → Never
-    return throw 42;
-}
+static method E2|get#floor(lowered final core::int #this) → () → core::int
+  return () → core::int => self::E2|floor(#this);
+static method E3|get#isOdd(lowered final core::int #this) → core::bool
+  return throw 42;
+static method E3|get#isEven(lowered final core::int #this) → core::bool
+  return throw 42;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart b/pkg/front_end/testcases/extension_types/various_hide_elements.dart
new file mode 100644
index 0000000..cd041cd
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart
@@ -0,0 +1,32 @@
+// 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.
+
+import 'dart:core' as prefixedCore;
+import 'dart:core';
+
+extension type E0 on int hide operator * {}
+extension type E1 on int hide get isEven {}
+extension type E2<T> on List<T> hide set length {}
+extension type E3 on int hide num {}
+extension type E4 on List<int> hide prefixedCore.Iterable<int> {} // Error?
+extension type E5 on List hide prefixedCore.Iterable {} // Error?
+extension type E6 on List<int> hide Iterable<int> {}
+
+abstract class A {
+  A operator *(A other);
+}
+
+class B<X> implements A {
+  bool get foo => throw 42;
+  A operator *(A other) => throw 42;
+}
+
+class C extends B<int> {
+  void set bar(int value) {}
+  void baz() {}
+}
+
+extension type E on C hide A, B<int>, operator *, get foo, set bar, baz {}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.expect
new file mode 100644
index 0000000..65db982
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int hide-operators core::num::* {
+}
+extension type E1 on core::int hide-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> hide-setters core::List::length {
+}
+extension type E3 on core::int hide-types core::num {
+}
+extension type E4 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> hide-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E on self::C hide-types self::B<core::int> hide-methods self::C::baz hide-getters self::C::baz, self::B::foo hide-setters self::C::bar hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.transformed.expect
new file mode 100644
index 0000000..65db982
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.strong.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int hide-operators core::num::* {
+}
+extension type E1 on core::int hide-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> hide-setters core::List::length {
+}
+extension type E3 on core::int hide-types core::num {
+}
+extension type E4 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> hide-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E on self::C hide-types self::B<core::int> hide-methods self::C::baz hide-getters self::C::baz, self::B::foo hide-setters self::C::bar hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.textual_outline.expect
new file mode 100644
index 0000000..fbcacbf
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.textual_outline.expect
@@ -0,0 +1,22 @@
+import 'dart:core' as prefixedCore;
+import 'dart:core';
+extension type E0 on int hide operator * {}
+extension type E1 on int hide get isEven {}
+extension type E2<T> on List<T> hide set length {}
+extension type E3 on int hide num {}
+extension type E4 on List<int> hide prefixedCore.Iterable<int> {}
+extension type E5 on List hide prefixedCore.Iterable {}
+extension type E6 on List<int> hide Iterable<int> {}
+abstract class A {
+  A operator *(A other);
+}
+class B<X> implements A {
+  bool get foo => throw 42;
+  A operator *(A other) => throw 42;
+}
+class C extends B<int> {
+  void set bar(int value) {}
+  void baz() {}
+}
+extension type E on C hide A, B<int>, operator *, get foo, set bar, baz {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.expect
new file mode 100644
index 0000000..65db982
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int hide-operators core::num::* {
+}
+extension type E1 on core::int hide-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> hide-setters core::List::length {
+}
+extension type E3 on core::int hide-types core::num {
+}
+extension type E4 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> hide-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E on self::C hide-types self::B<core::int> hide-methods self::C::baz hide-getters self::C::baz, self::B::foo hide-setters self::C::bar hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.outline.expect
new file mode 100644
index 0000000..cf94cf8
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.outline.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    ;
+  get foo() → core::bool
+    ;
+  operator *(self::A other) → self::A
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    ;
+  set bar(core::int value) → void
+    ;
+  method baz() → void
+    ;
+}
+extension type E0 on core::int hide-operators core::num::* {
+}
+extension type E1 on core::int hide-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> hide-setters core::List::length {
+}
+extension type E3 on core::int hide-types core::num {
+}
+extension type E4 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> hide-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E on self::C hide-types self::B<core::int> hide-methods self::C::baz hide-getters self::C::baz, self::B::foo hide-setters self::C::bar hide-operators self::B::* {
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.transformed.expect
new file mode 100644
index 0000000..65db982
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_hide_elements.dart.weak.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int hide-operators core::num::* {
+}
+extension type E1 on core::int hide-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> hide-setters core::List::length {
+}
+extension type E3 on core::int hide-types core::num {
+}
+extension type E4 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> hide-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> hide-types core::Iterable<core::int> {
+}
+extension type E on self::C hide-types self::B<core::int> hide-methods self::C::baz hide-getters self::C::baz, self::B::foo hide-setters self::C::bar hide-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart b/pkg/front_end/testcases/extension_types/various_show_elements.dart
new file mode 100644
index 0000000..1588d78a
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart
@@ -0,0 +1,32 @@
+// 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.
+
+import 'dart:core' as prefixedCore;
+import 'dart:core';
+
+extension type E0 on int show operator * {}
+extension type E1 on int show get isEven {}
+extension type E2<T> on List<T> show set length {}
+extension type E3 on int show num {}
+extension type E4 on List<int> show prefixedCore.Iterable<int> {} // Error?
+extension type E5 on List show prefixedCore.Iterable {} // Error?
+extension type E6 on List<int> show Iterable<int> {}
+
+abstract class A {
+  A operator *(A other);
+}
+
+class B<X> implements A {
+  bool get foo => throw 42;
+  A operator *(A other) => throw 42;
+}
+
+class C extends B<int> {
+  void set bar(int value) {}
+  void baz() {}
+}
+
+extension type E on C show A, B<int>, operator *, get foo, set bar, baz {}
+
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.expect
new file mode 100644
index 0000000..0aae661
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int show-operators core::num::* {
+}
+extension type E1 on core::int show-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> show-setters core::List::length {
+}
+extension type E3 on core::int show-types core::num {
+}
+extension type E4 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> show-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E on self::C show-types self::B<core::int> show-methods self::C::baz show-getters self::C::baz, self::B::foo show-setters self::C::bar show-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.transformed.expect
new file mode 100644
index 0000000..0aae661
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.strong.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int show-operators core::num::* {
+}
+extension type E1 on core::int show-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> show-setters core::List::length {
+}
+extension type E3 on core::int show-types core::num {
+}
+extension type E4 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> show-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E on self::C show-types self::B<core::int> show-methods self::C::baz show-getters self::C::baz, self::B::foo show-setters self::C::bar show-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.textual_outline.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.textual_outline.expect
new file mode 100644
index 0000000..dcd8445
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.textual_outline.expect
@@ -0,0 +1,22 @@
+import 'dart:core' as prefixedCore;
+import 'dart:core';
+extension type E0 on int show operator * {}
+extension type E1 on int show get isEven {}
+extension type E2<T> on List<T> show set length {}
+extension type E3 on int show num {}
+extension type E4 on List<int> show prefixedCore.Iterable<int> {}
+extension type E5 on List show prefixedCore.Iterable {}
+extension type E6 on List<int> show Iterable<int> {}
+abstract class A {
+  A operator *(A other);
+}
+class B<X> implements A {
+  bool get foo => throw 42;
+  A operator *(A other) => throw 42;
+}
+class C extends B<int> {
+  void set bar(int value) {}
+  void baz() {}
+}
+extension type E on C show A, B<int>, operator *, get foo, set bar, baz {}
+main() {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.expect
new file mode 100644
index 0000000..0aae661
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int show-operators core::num::* {
+}
+extension type E1 on core::int show-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> show-setters core::List::length {
+}
+extension type E3 on core::int show-types core::num {
+}
+extension type E4 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> show-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E on self::C show-types self::B<core::int> show-methods self::C::baz show-getters self::C::baz, self::B::foo show-setters self::C::bar show-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.outline.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.outline.expect
new file mode 100644
index 0000000..4272c5c
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.outline.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    ;
+  get foo() → core::bool
+    ;
+  operator *(self::A other) → self::A
+    ;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    ;
+  set bar(core::int value) → void
+    ;
+  method baz() → void
+    ;
+}
+extension type E0 on core::int show-operators core::num::* {
+}
+extension type E1 on core::int show-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> show-setters core::List::length {
+}
+extension type E3 on core::int show-types core::num {
+}
+extension type E4 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> show-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E on self::C show-types self::B<core::int> show-methods self::C::baz show-getters self::C::baz, self::B::foo show-setters self::C::bar show-operators self::B::* {
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.transformed.expect b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.transformed.expect
new file mode 100644
index 0000000..0aae661
--- /dev/null
+++ b/pkg/front_end/testcases/extension_types/various_show_elements.dart.weak.transformed.expect
@@ -0,0 +1,46 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+import "dart:core" as prefixedCore;
+import "dart:core";
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator *(self::A other) → self::A;
+}
+class B<X extends core::Object? = dynamic> extends core::Object implements self::A {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  get foo() → core::bool
+    return throw 42;
+  operator *(self::A other) → self::A
+    return throw 42;
+}
+class C extends self::B<core::int> {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  set bar(core::int value) → void {}
+  method baz() → void {}
+}
+extension type E0 on core::int show-operators core::num::* {
+}
+extension type E1 on core::int show-getters core::int::isEven {
+}
+extension type E2<T extends core::Object? = dynamic> on core::List<T%> show-setters core::List::length {
+}
+extension type E3 on core::int show-types core::num {
+}
+extension type E4 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E5 on core::List<dynamic> show-types core::Iterable<dynamic> {
+}
+extension type E6 on core::List<core::int> show-types core::Iterable<core::int> {
+}
+extension type E on self::C show-types self::B<core::int> show-methods self::C::baz show-getters self::C::baz, self::B::foo show-setters self::C::bar show-operators self::B::* {
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extensions/call_methods.dart.weak.expect b/pkg/front_end/testcases/extensions/call_methods.dart.weak.expect
index 9fbb059..d38841f 100644
--- a/pkg/front_end/testcases/extensions/call_methods.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/call_methods.dart.weak.expect
@@ -22,22 +22,12 @@
 // var topLevel4 = 1.0("10");
 //                    ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-// var topLevel5 = a(2);
-//                  ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
 // var topLevel5 = a(2);
 //                  ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Too many positional arguments: 0 allowed, but 2 found.
-// Try removing the extra positional arguments.
-// var topLevel6 = a(2, "3");
-//                  ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
@@ -64,22 +54,12 @@
 //   1.0("10");
 //      ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:44:4: Error: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//   a(2);
-//    ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:44:4: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
 //   a(2);
 //    ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:45:4: Error: Too many positional arguments: 0 allowed, but 2 found.
-// Try removing the extra positional arguments.
-//   a(2, "3");
-//    ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:45:4: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
@@ -155,17 +135,17 @@
 var topLevel4 = 1.0(\"10\");
                    ^" in self::_extension#2|get#call(self::_extension#1|get#call(1.0)){<inapplicable>}.("10");
 static field self::A* a = new self::A::•();
-static field core::String* topLevel5 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
+static field invalid-type topLevel5 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var topLevel5 = a(2);
-                 ^" as{TypeError,ForDynamic} core::String*;
+                 ^";
 static field self::B* b = new self::B::•();
-static field core::String* topLevel6 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
+static field invalid-type topLevel6 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var topLevel6 = a(2, \"3\");
-                 ^" as{TypeError,ForDynamic} core::String*;
+                 ^";
 static method _extension#0|get#call(lowered final core::int* #this) → core::String*
   return "My name is int";
 static method _extension#1|get#call(lowered final core::num* #this) → core::String*
diff --git a/pkg/front_end/testcases/extensions/call_methods.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/call_methods.dart.weak.outline.expect
index 173e1a4..1745cce 100644
--- a/pkg/front_end/testcases/extensions/call_methods.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/call_methods.dart.weak.outline.expect
@@ -48,9 +48,9 @@
 static field core::String* topLevel3;
 static field core::String* topLevel4;
 static field self::A* a;
-static field core::String* topLevel5;
+static field invalid-type topLevel5;
 static field self::B* b;
-static field core::String* topLevel6;
+static field invalid-type topLevel6;
 static method _extension#0|get#call(lowered final core::int* #this) → core::String*
   ;
 static method _extension#1|get#call(lowered final core::num* #this) → core::String*
diff --git a/pkg/front_end/testcases/extensions/call_methods.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/call_methods.dart.weak.transformed.expect
index f07583d..d38841f 100644
--- a/pkg/front_end/testcases/extensions/call_methods.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/call_methods.dart.weak.transformed.expect
@@ -22,22 +22,12 @@
 // var topLevel4 = 1.0("10");
 //                    ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-// var topLevel5 = a(2);
-//                  ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
 // var topLevel5 = a(2);
 //                  ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Too many positional arguments: 0 allowed, but 2 found.
-// Try removing the extra positional arguments.
-// var topLevel6 = a(2, "3");
-//                  ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
@@ -64,22 +54,12 @@
 //   1.0("10");
 //      ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:44:4: Error: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//   a(2);
-//    ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:44:4: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
 //   a(2);
 //    ^
 //
-// pkg/front_end/testcases/extensions/call_methods.dart:45:4: Error: Too many positional arguments: 0 allowed, but 2 found.
-// Try removing the extra positional arguments.
-//   a(2, "3");
-//    ^
-//
 // pkg/front_end/testcases/extensions/call_methods.dart:45:4: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
 //  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 // Try changing 'call' to a method or explicitly invoke 'call'.
@@ -155,13 +135,13 @@
 var topLevel4 = 1.0(\"10\");
                    ^" in self::_extension#2|get#call(self::_extension#1|get#call(1.0)){<inapplicable>}.("10");
 static field self::A* a = new self::A::•();
-static field core::String* topLevel5 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
+static field invalid-type topLevel5 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:34:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var topLevel5 = a(2);
                  ^";
 static field self::B* b = new self::B::•();
-static field core::String* topLevel6 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
+static field invalid-type topLevel6 = invalid-expression "pkg/front_end/testcases/extensions/call_methods.dart:36:18: Error: Cannot invoke an instance of 'A' because it declares 'call' to be something other than a method.
  - 'A' is from 'pkg/front_end/testcases/extensions/call_methods.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var topLevel6 = a(2, \"3\");
diff --git a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.expect b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.expect
index 9db4ca6..d892e0f 100644
--- a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class GenericClass<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::GenericClass::T* field = null;
+  covariant-by-class field self::GenericClass::T* field = null;
   synthetic constructor •() → self::GenericClass<self::GenericClass::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.outline.expect
index 55a6232..c697396 100644
--- a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class GenericClass<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::GenericClass::T* field;
+  covariant-by-class field self::GenericClass::T* field;
   synthetic constructor •() → self::GenericClass<self::GenericClass::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.transformed.expect
index 9db4ca6..d892e0f 100644
--- a/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/direct_instance_access.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class GenericClass<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::GenericClass::T* field = null;
+  covariant-by-class field self::GenericClass::T* field = null;
   synthetic constructor •() → self::GenericClass<self::GenericClass::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.expect b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.expect
index 6e15fda..ad69a00 100644
--- a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Class<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::Class::T* field1;
-  generic-covariant-impl field self::Class::T* field2;
+  covariant-by-class field self::Class::T* field1;
+  covariant-by-class field self::Class::T* field2;
   constructor •(self::Class::T* field1, self::Class::T* field2) → self::Class<self::Class::T*>*
     : self::Class::field1 = field1, self::Class::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.outline.expect
index 54e9504..322d3b1 100644
--- a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Class<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::Class::T* field1;
-  generic-covariant-impl field self::Class::T* field2;
+  covariant-by-class field self::Class::T* field1;
+  covariant-by-class field self::Class::T* field2;
   constructor •(self::Class::T* field1, self::Class::T* field2) → self::Class<self::Class::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.transformed.expect
index a8c297a..225240c 100644
--- a/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/explicit_generic_extension_access.dart.weak.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Class<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::Class::T* field1;
-  generic-covariant-impl field self::Class::T* field2;
+  covariant-by-class field self::Class::T* field1;
+  covariant-by-class field self::Class::T* field2;
   constructor •(self::Class::T* field1, self::Class::T* field2) → self::Class<self::Class::T*>*
     : self::Class::field1 = field1, self::Class::field2 = field2, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/extensions/extension_call.dart.weak.expect b/pkg/front_end/testcases/extensions/extension_call.dart.weak.expect
index c6d89be..13106a6 100644
--- a/pkg/front_end/testcases/extensions/extension_call.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/extension_call.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::T* a) → self::Class::T*
+  method method(covariant-by-class self::Class::T* a) → self::Class::T*
     return a;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/extension_call.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/extension_call.dart.weak.outline.expect
index bb8bde3..b4a47b5 100644
--- a/pkg/front_end/testcases/extensions/extension_call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/extension_call.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Class<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::T*>*
     ;
-  method method(generic-covariant-impl self::Class::T* a) → self::Class::T*
+  method method(covariant-by-class self::Class::T* a) → self::Class::T*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/extension_call.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/extension_call.dart.weak.transformed.expect
index c6d89be..13106a6 100644
--- a/pkg/front_end/testcases/extensions/extension_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/extension_call.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::T* a) → self::Class::T*
+  method method(covariant-by-class self::Class::T* a) → self::Class::T*
     return a;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.expect b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.expect
index e059431..8400d5d 100644
--- a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.expect
@@ -22,20 +22,6 @@
 //   factory Extension.redirect() = Extension;
 //   ^^^^^^^
 //
-// pkg/front_end/testcases/extensions/extension_constructor.dart:10:11: Error: 'Extension' isn't a type.
-//   factory Extension.fact() => null;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
-// pkg/front_end/testcases/extensions/extension_constructor.dart:11:11: Error: 'Extension' isn't a type.
-//   factory Extension.redirect() = Extension;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.outline.expect
index 5bcfb3c..fec0bcb 100644
--- a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.outline.expect
@@ -22,20 +22,6 @@
 //   factory Extension.redirect() = Extension;
 //   ^^^^^^^
 //
-// pkg/front_end/testcases/extensions/extension_constructor.dart:10:11: Error: 'Extension' isn't a type.
-//   factory Extension.fact() => null;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
-// pkg/front_end/testcases/extensions/extension_constructor.dart:11:11: Error: 'Extension' isn't a type.
-//   factory Extension.redirect() = Extension;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.transformed.expect
index e059431..8400d5d 100644
--- a/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/extension_constructor.dart.weak.transformed.expect
@@ -22,20 +22,6 @@
 //   factory Extension.redirect() = Extension;
 //   ^^^^^^^
 //
-// pkg/front_end/testcases/extensions/extension_constructor.dart:10:11: Error: 'Extension' isn't a type.
-//   factory Extension.fact() => null;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
-// pkg/front_end/testcases/extensions/extension_constructor.dart:11:11: Error: 'Extension' isn't a type.
-//   factory Extension.redirect() = Extension;
-//           ^^^^^^^^^
-// pkg/front_end/testcases/extensions/extension_constructor.dart:7:11: Context: This isn't a type.
-// extension Extension on Class {
-//           ^^^^^^^^^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extensions/external.dart b/pkg/front_end/testcases/extensions/external.dart
new file mode 100644
index 0000000..29f5ed2
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart
@@ -0,0 +1,63 @@
+// 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.
+
+extension Extension<T extends num> on List<T> {
+  external T field;
+  external static int staticField;
+  external final T finalField;
+  external static final int staticFinalField;
+  external T method();
+  external static int staticMethod();
+  external T get getter;
+  external static int get staticGetter;
+  external void set setter(T value);
+  external static void set staticSetter(int value);
+  external T get property;
+  external void set property(T value);
+  external static int get staticProperty;
+  external static void set staticProperty(int value);
+  external final T fieldSetter;
+  external void set fieldSetter(T value);
+  external static final int staticFieldSetter;
+  external static void set staticFieldSetter(int value);
+}
+
+test() {
+  List<int> list = [];
+  int value = list.field;
+  list.field = value;
+  value = list.finalField;
+  value = list.method();
+  value = list.getter;
+  list.setter = value;
+  value = list.property;
+  list.property = value;
+  value = list.fieldSetter;
+  list.fieldSetter = value;
+
+  List<int> iterable = list;
+  num n = Extension<num>(iterable).field;
+  Extension<num>(iterable).field = n;
+  n = Extension<num>(iterable).finalField;
+  n = Extension<num>(iterable).method();
+  n = Extension<num>(iterable).getter;
+  Extension<num>(iterable).setter = n;
+  n = Extension<num>(iterable).property;
+  Extension<num>(iterable).property = n;
+  n = Extension<num>(iterable).fieldSetter;
+  Extension<num>(iterable).fieldSetter = n;
+
+  value = Extension.staticField;
+  Extension.staticField = value;
+  value = Extension.staticFinalField;
+  value = Extension.staticMethod();
+  value = Extension.staticGetter;
+  Extension.staticSetter = value;
+  value = Extension.staticProperty;
+  Extension.staticProperty = value;
+  value = Extension.staticFieldSetter;
+  Extension.staticFieldSetter = value;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/external.dart.textual_outline.expect b/pkg/front_end/testcases/extensions/external.dart.textual_outline.expect
new file mode 100644
index 0000000..8a7d6d9
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart.textual_outline.expect
@@ -0,0 +1,23 @@
+extension Extension<T extends num> on List<T> {
+  external T field;
+  external static int staticField;
+  external final T finalField;
+  external static final int staticFinalField;
+  external T method();
+  external static int staticMethod();
+  external T get getter;
+  external static int get staticGetter;
+  external void set setter(T value);
+  external static void set staticSetter(int value);
+  external T get property;
+  external void set property(T value);
+  external static int get staticProperty;
+  external static void set staticProperty(int value);
+  external final T fieldSetter;
+  external void set fieldSetter(T value);
+  external static final int staticFieldSetter;
+  external static void set staticFieldSetter(int value);
+}
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/extensions/external.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/extensions/external.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e84ee4c
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart.textual_outline_modelled.expect
@@ -0,0 +1,23 @@
+extension Extension<T extends num> on List<T> {
+  external T field;
+  external T get getter;
+  external T get property;
+  external T method();
+  external final T fieldSetter;
+  external final T finalField;
+  external static final int staticFieldSetter;
+  external static final int staticFinalField;
+  external static int get staticGetter;
+  external static int get staticProperty;
+  external static int staticField;
+  external static int staticMethod();
+  external static void set staticFieldSetter(int value);
+  external static void set staticProperty(int value);
+  external static void set staticSetter(int value);
+  external void set fieldSetter(T value);
+  external void set property(T value);
+  external void set setter(T value);
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/extensions/external.dart.weak.expect b/pkg/front_end/testcases/extensions/external.dart.weak.expect
new file mode 100644
index 0000000..f9c3590
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart.weak.expect
@@ -0,0 +1,84 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension Extension<T extends core::num> on core::List<T> {
+  get field = self::Extension|get#field;
+  set field = self::Extension|set#field;
+  static get staticField = get self::Extension|staticField;
+  static set staticField = set self::Extension|staticField;
+  get finalField = self::Extension|get#finalField;
+  static get staticFinalField = get self::Extension|staticFinalField;
+  method method = self::Extension|method;
+  tearoff method = self::Extension|get#method;
+  static method staticMethod = self::Extension|staticMethod;
+  get getter = self::Extension|get#getter;
+  static get staticGetter = get self::Extension|staticGetter;
+  get property = self::Extension|get#property;
+  static get staticProperty = get self::Extension|staticProperty;
+  get fieldSetter = self::Extension|get#fieldSetter;
+  static get staticFieldSetter = get self::Extension|staticFieldSetter;
+  set setter = self::Extension|set#setter;
+  static set staticSetter = set self::Extension|staticSetter;
+  set property = self::Extension|set#property;
+  static set staticProperty = set self::Extension|staticProperty;
+  set fieldSetter = self::Extension|set#fieldSetter;
+  static set staticFieldSetter = set self::Extension|staticFieldSetter;
+}
+external static method Extension|get#field<T extends core::num>(core::List<self::Extension|get#field::T> #this) → self::Extension|get#field::T;
+external static method Extension|set#field<T extends core::num>(core::List<self::Extension|set#field::T> #this, self::Extension|set#field::T #externalFieldValue) → void;
+external static get Extension|staticField() → core::int;
+external static set Extension|staticField(core::int #externalFieldValue) → void;
+external static method Extension|get#finalField<T extends core::num>(core::List<self::Extension|get#finalField::T> #this) → self::Extension|get#finalField::T;
+external static get Extension|staticFinalField() → core::int;
+external static method Extension|method<T extends core::num>(lowered final core::List<self::Extension|method::T> #this) → self::Extension|method::T;
+static method Extension|get#method<T extends core::num>(lowered final core::List<self::Extension|get#method::T> #this) → () → self::Extension|get#method::T
+  return () → self::Extension|get#method::T => self::Extension|method<self::Extension|get#method::T>(#this);
+external static method Extension|staticMethod() → core::int;
+external static method Extension|get#getter<T extends core::num>(lowered final core::List<self::Extension|get#getter::T> #this) → self::Extension|get#getter::T;
+external static get Extension|staticGetter() → core::int;
+external static method Extension|set#setter<T extends core::num>(lowered final core::List<self::Extension|set#setter::T> #this, self::Extension|set#setter::T value) → void;
+external static set Extension|staticSetter(core::int value) → void;
+external static method Extension|get#property<T extends core::num>(lowered final core::List<self::Extension|get#property::T> #this) → self::Extension|get#property::T;
+external static method Extension|set#property<T extends core::num>(lowered final core::List<self::Extension|set#property::T> #this, self::Extension|set#property::T value) → void;
+external static get Extension|staticProperty() → core::int;
+external static set Extension|staticProperty(core::int value) → void;
+external static method Extension|get#fieldSetter<T extends core::num>(core::List<self::Extension|get#fieldSetter::T> #this) → self::Extension|get#fieldSetter::T;
+external static method Extension|set#fieldSetter<T extends core::num>(lowered final core::List<self::Extension|set#fieldSetter::T> #this, self::Extension|set#fieldSetter::T value) → void;
+external static get Extension|staticFieldSetter() → core::int;
+external static set Extension|staticFieldSetter(core::int value) → void;
+static method test() → dynamic {
+  core::List<core::int> list = <core::int>[];
+  core::int value = self::Extension|get#field<core::int>(list);
+  self::Extension|set#field<core::int>(list, value);
+  value = self::Extension|get#finalField<core::int>(list);
+  value = self::Extension|method<core::int>(list);
+  value = self::Extension|get#getter<core::int>(list);
+  self::Extension|set#setter<core::int>(list, value);
+  value = self::Extension|get#property<core::int>(list);
+  self::Extension|set#property<core::int>(list, value);
+  value = self::Extension|get#fieldSetter<core::int>(list);
+  self::Extension|set#fieldSetter<core::int>(list, value);
+  core::List<core::int> iterable = list;
+  core::num n = self::Extension|get#field<core::num>(iterable);
+  self::Extension|set#field<core::num>(iterable, n);
+  n = self::Extension|get#finalField<core::num>(iterable);
+  n = self::Extension|method<core::num>(iterable);
+  n = self::Extension|get#getter<core::num>(iterable);
+  self::Extension|set#setter<core::num>(iterable, n);
+  n = self::Extension|get#property<core::num>(iterable);
+  self::Extension|set#property<core::num>(iterable, n);
+  n = self::Extension|get#fieldSetter<core::num>(iterable);
+  self::Extension|set#fieldSetter<core::num>(iterable, n);
+  value = self::Extension|staticField;
+  self::Extension|staticField = value;
+  value = self::Extension|staticFinalField;
+  value = self::Extension|staticMethod();
+  value = self::Extension|staticGetter;
+  self::Extension|staticSetter = value;
+  value = self::Extension|staticProperty;
+  self::Extension|staticProperty = value;
+  value = self::Extension|staticFieldSetter;
+  self::Extension|staticFieldSetter = value;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extensions/external.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/external.dart.weak.outline.expect
new file mode 100644
index 0000000..9dc219e
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart.weak.outline.expect
@@ -0,0 +1,53 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension Extension<T extends core::num> on core::List<T> {
+  get field = self::Extension|get#field;
+  set field = self::Extension|set#field;
+  static get staticField = get self::Extension|staticField;
+  static set staticField = set self::Extension|staticField;
+  get finalField = self::Extension|get#finalField;
+  static get staticFinalField = get self::Extension|staticFinalField;
+  method method = self::Extension|method;
+  tearoff method = self::Extension|get#method;
+  static method staticMethod = self::Extension|staticMethod;
+  get getter = self::Extension|get#getter;
+  static get staticGetter = get self::Extension|staticGetter;
+  get property = self::Extension|get#property;
+  static get staticProperty = get self::Extension|staticProperty;
+  get fieldSetter = self::Extension|get#fieldSetter;
+  static get staticFieldSetter = get self::Extension|staticFieldSetter;
+  set setter = self::Extension|set#setter;
+  static set staticSetter = set self::Extension|staticSetter;
+  set property = self::Extension|set#property;
+  static set staticProperty = set self::Extension|staticProperty;
+  set fieldSetter = self::Extension|set#fieldSetter;
+  static set staticFieldSetter = set self::Extension|staticFieldSetter;
+}
+external static method Extension|get#field<T extends core::num>(core::List<self::Extension|get#field::T> #this) → self::Extension|get#field::T;
+external static method Extension|set#field<T extends core::num>(core::List<self::Extension|set#field::T> #this, self::Extension|set#field::T #externalFieldValue) → void;
+external static get Extension|staticField() → core::int;
+external static set Extension|staticField(core::int #externalFieldValue) → void;
+external static method Extension|get#finalField<T extends core::num>(core::List<self::Extension|get#finalField::T> #this) → self::Extension|get#finalField::T;
+external static get Extension|staticFinalField() → core::int;
+external static method Extension|method<T extends core::num>(lowered final core::List<self::Extension|method::T> #this) → self::Extension|method::T;
+static method Extension|get#method<T extends core::num>(lowered final core::List<self::Extension|get#method::T> #this) → () → self::Extension|get#method::T
+  return () → self::Extension|get#method::T => self::Extension|method<self::Extension|get#method::T>(#this);
+external static method Extension|staticMethod() → core::int;
+external static method Extension|get#getter<T extends core::num>(lowered final core::List<self::Extension|get#getter::T> #this) → self::Extension|get#getter::T;
+external static get Extension|staticGetter() → core::int;
+external static method Extension|set#setter<T extends core::num>(lowered final core::List<self::Extension|set#setter::T> #this, self::Extension|set#setter::T value) → void;
+external static set Extension|staticSetter(core::int value) → void;
+external static method Extension|get#property<T extends core::num>(lowered final core::List<self::Extension|get#property::T> #this) → self::Extension|get#property::T;
+external static method Extension|set#property<T extends core::num>(lowered final core::List<self::Extension|set#property::T> #this, self::Extension|set#property::T value) → void;
+external static get Extension|staticProperty() → core::int;
+external static set Extension|staticProperty(core::int value) → void;
+external static method Extension|get#fieldSetter<T extends core::num>(core::List<self::Extension|get#fieldSetter::T> #this) → self::Extension|get#fieldSetter::T;
+external static method Extension|set#fieldSetter<T extends core::num>(lowered final core::List<self::Extension|set#fieldSetter::T> #this, self::Extension|set#fieldSetter::T value) → void;
+external static get Extension|staticFieldSetter() → core::int;
+external static set Extension|staticFieldSetter(core::int value) → void;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/extensions/external.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/external.dart.weak.transformed.expect
new file mode 100644
index 0000000..e19cd2d
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/external.dart.weak.transformed.expect
@@ -0,0 +1,84 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+extension Extension<T extends core::num> on core::List<T> {
+  get field = self::Extension|get#field;
+  set field = self::Extension|set#field;
+  static get staticField = get self::Extension|staticField;
+  static set staticField = set self::Extension|staticField;
+  get finalField = self::Extension|get#finalField;
+  static get staticFinalField = get self::Extension|staticFinalField;
+  method method = self::Extension|method;
+  tearoff method = self::Extension|get#method;
+  static method staticMethod = self::Extension|staticMethod;
+  get getter = self::Extension|get#getter;
+  static get staticGetter = get self::Extension|staticGetter;
+  get property = self::Extension|get#property;
+  static get staticProperty = get self::Extension|staticProperty;
+  get fieldSetter = self::Extension|get#fieldSetter;
+  static get staticFieldSetter = get self::Extension|staticFieldSetter;
+  set setter = self::Extension|set#setter;
+  static set staticSetter = set self::Extension|staticSetter;
+  set property = self::Extension|set#property;
+  static set staticProperty = set self::Extension|staticProperty;
+  set fieldSetter = self::Extension|set#fieldSetter;
+  static set staticFieldSetter = set self::Extension|staticFieldSetter;
+}
+external static method Extension|get#field<T extends core::num>(core::List<self::Extension|get#field::T> #this) → self::Extension|get#field::T;
+external static method Extension|set#field<T extends core::num>(core::List<self::Extension|set#field::T> #this, self::Extension|set#field::T #externalFieldValue) → void;
+external static get Extension|staticField() → core::int;
+external static set Extension|staticField(core::int #externalFieldValue) → void;
+external static method Extension|get#finalField<T extends core::num>(core::List<self::Extension|get#finalField::T> #this) → self::Extension|get#finalField::T;
+external static get Extension|staticFinalField() → core::int;
+external static method Extension|method<T extends core::num>(lowered final core::List<self::Extension|method::T> #this) → self::Extension|method::T;
+static method Extension|get#method<T extends core::num>(lowered final core::List<self::Extension|get#method::T> #this) → () → self::Extension|get#method::T
+  return () → self::Extension|get#method::T => self::Extension|method<self::Extension|get#method::T>(#this);
+external static method Extension|staticMethod() → core::int;
+external static method Extension|get#getter<T extends core::num>(lowered final core::List<self::Extension|get#getter::T> #this) → self::Extension|get#getter::T;
+external static get Extension|staticGetter() → core::int;
+external static method Extension|set#setter<T extends core::num>(lowered final core::List<self::Extension|set#setter::T> #this, self::Extension|set#setter::T value) → void;
+external static set Extension|staticSetter(core::int value) → void;
+external static method Extension|get#property<T extends core::num>(lowered final core::List<self::Extension|get#property::T> #this) → self::Extension|get#property::T;
+external static method Extension|set#property<T extends core::num>(lowered final core::List<self::Extension|set#property::T> #this, self::Extension|set#property::T value) → void;
+external static get Extension|staticProperty() → core::int;
+external static set Extension|staticProperty(core::int value) → void;
+external static method Extension|get#fieldSetter<T extends core::num>(core::List<self::Extension|get#fieldSetter::T> #this) → self::Extension|get#fieldSetter::T;
+external static method Extension|set#fieldSetter<T extends core::num>(lowered final core::List<self::Extension|set#fieldSetter::T> #this, self::Extension|set#fieldSetter::T value) → void;
+external static get Extension|staticFieldSetter() → core::int;
+external static set Extension|staticFieldSetter(core::int value) → void;
+static method test() → dynamic {
+  core::List<core::int> list = core::_GrowableList::•<core::int>(0);
+  core::int value = self::Extension|get#field<core::int>(list);
+  self::Extension|set#field<core::int>(list, value);
+  value = self::Extension|get#finalField<core::int>(list);
+  value = self::Extension|method<core::int>(list);
+  value = self::Extension|get#getter<core::int>(list);
+  self::Extension|set#setter<core::int>(list, value);
+  value = self::Extension|get#property<core::int>(list);
+  self::Extension|set#property<core::int>(list, value);
+  value = self::Extension|get#fieldSetter<core::int>(list);
+  self::Extension|set#fieldSetter<core::int>(list, value);
+  core::List<core::int> iterable = list;
+  core::num n = self::Extension|get#field<core::num>(iterable);
+  self::Extension|set#field<core::num>(iterable, n);
+  n = self::Extension|get#finalField<core::num>(iterable);
+  n = self::Extension|method<core::num>(iterable);
+  n = self::Extension|get#getter<core::num>(iterable);
+  self::Extension|set#setter<core::num>(iterable, n);
+  n = self::Extension|get#property<core::num>(iterable);
+  self::Extension|set#property<core::num>(iterable, n);
+  n = self::Extension|get#fieldSetter<core::num>(iterable);
+  self::Extension|set#fieldSetter<core::num>(iterable, n);
+  value = self::Extension|staticField;
+  self::Extension|staticField = value;
+  value = self::Extension|staticFinalField;
+  value = self::Extension|staticMethod();
+  value = self::Extension|staticGetter;
+  self::Extension|staticSetter = value;
+  value = self::Extension|staticProperty;
+  self::Extension|staticProperty = value;
+  value = self::Extension|staticFieldSetter;
+  self::Extension|staticFieldSetter = value;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/extensions/index.dart.weak.expect b/pkg/front_end/testcases/extensions/index.dart.weak.expect
index d141d5b..e91fc4b 100644
--- a/pkg/front_end/testcases/extensions/index.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/index.dart.weak.expect
@@ -9,7 +9,7 @@
     ;
   method get(core::Object* key) → self::MapLike::V*
     return this.{self::MapLike::_map}{core::Map<self::MapLike::K*, self::MapLike::V*>*}.{core::Map::[]}(key){(core::Object*) →* self::MapLike::V*};
-  method put(generic-covariant-impl self::MapLike::K* key, generic-covariant-impl self::MapLike::V* value) → self::MapLike::V*
+  method put(covariant-by-class self::MapLike::K* key, covariant-by-class self::MapLike::V* value) → self::MapLike::V*
     return let final core::Map<self::MapLike::K*, self::MapLike::V*>* #t1 = this.{self::MapLike::_map}{core::Map<self::MapLike::K*, self::MapLike::V*>*} in let final self::MapLike::K* #t2 = key in let final self::MapLike::V* #t3 = value in let final void #t4 = #t1.{core::Map::[]=}(#t2, #t3){(self::MapLike::K*, self::MapLike::V*) →* void} in #t3;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/index.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/index.dart.weak.outline.expect
index 8b0b1ca..b79e0ba 100644
--- a/pkg/front_end/testcases/extensions/index.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/index.dart.weak.outline.expect
@@ -8,7 +8,7 @@
     ;
   method get(core::Object* key) → self::MapLike::V*
     ;
-  method put(generic-covariant-impl self::MapLike::K* key, generic-covariant-impl self::MapLike::V* value) → self::MapLike::V*
+  method put(covariant-by-class self::MapLike::K* key, covariant-by-class self::MapLike::V* value) → self::MapLike::V*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/index.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/index.dart.weak.transformed.expect
index fd7413f..1b49a66 100644
--- a/pkg/front_end/testcases/extensions/index.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/index.dart.weak.transformed.expect
@@ -9,7 +9,7 @@
     ;
   method get(core::Object* key) → self::MapLike::V*
     return this.{self::MapLike::_map}{core::Map<self::MapLike::K*, self::MapLike::V*>*}.{core::Map::[]}(key){(core::Object*) →* self::MapLike::V*};
-  method put(generic-covariant-impl self::MapLike::K* key, generic-covariant-impl self::MapLike::V* value) → self::MapLike::V*
+  method put(covariant-by-class self::MapLike::K* key, covariant-by-class self::MapLike::V* value) → self::MapLike::V*
     return let final core::Map<self::MapLike::K*, self::MapLike::V*>* #t1 = this.{self::MapLike::_map}{core::Map<self::MapLike::K*, self::MapLike::V*>*} in let final self::MapLike::K* #t2 = key in let final self::MapLike::V* #t3 = value in let final void #t4 = #t1.{core::Map::[]=}(#t2, #t3){(self::MapLike::K*, self::MapLike::V*) →* void} in #t3;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
index b9fb9f7..6b86f49 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S*>*
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S* x) → void {
+  method test1(covariant-by-class self::Foo::S* x) → void {
     (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
     S Function(S) f = x.test;
                         ^" in self::Test|get#test<core::num*>(x) as{TypeError} Never;
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.outline.expect
index cf1db41..cabb988 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Foo<S extends core::num*> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::S*>*
     ;
-  method test1(generic-covariant-impl self::Foo::S* x) → void
+  method test1(covariant-by-class self::Foo::S* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
index b9fb9f7..6b86f49 100644
--- a/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/language_issue1182.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S*>*
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S* x) → void {
+  method test1(covariant-by-class self::Foo::S* x) → void {
     (self::Foo::S*) →* self::Foo::S* f = invalid-expression "pkg/front_end/testcases/extensions/language_issue1182.dart:11:25: Error: A value of type 'num Function(num)' can't be assigned to a variable of type 'S Function(S)'.
     S Function(S) f = x.test;
                         ^" in self::Test|get#test<core::num*>(x) as{TypeError} Never;
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart b/pkg/front_end/testcases/extensions/multi_export.dart
new file mode 100644
index 0000000..ac46d9e
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart
@@ -0,0 +1,15 @@
+// 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.
+
+import 'multi_export_lib1.dart' as lib;
+import 'multi_export_lib2.dart' as lib;
+import 'multi_export_lib3.dart' as lib;
+import 'multi_export_lib4.dart' as lib;
+
+main() {
+  lib.SubClass1()..method();
+  lib.SubClass2()..method();
+  lib.SubClass3()..method();
+  lib.SubClass4()..method();
+}
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline.expect b/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline.expect
new file mode 100644
index 0000000..fe7f24f
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'multi_export_lib1.dart' as lib;
+import 'multi_export_lib2.dart' as lib;
+import 'multi_export_lib3.dart' as lib;
+import 'multi_export_lib4.dart' as lib;
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..fe7f24f
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'multi_export_lib1.dart' as lib;
+import 'multi_export_lib2.dart' as lib;
+import 'multi_export_lib3.dart' as lib;
+import 'multi_export_lib4.dart' as lib;
+
+main() {}
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart.weak.expect b/pkg/front_end/testcases/extensions/multi_export.dart.weak.expect
new file mode 100644
index 0000000..b369c9b
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart.weak.expect
@@ -0,0 +1,98 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "multi_export_lib1.dart" as mul;
+import "multi_export_lib.dart" as mul2;
+import "multi_export_lib2.dart" as mul3;
+import "multi_export_lib3.dart" as mul4;
+import "multi_export_lib4.dart" as mul5;
+
+import "org-dartlang-testcase:///multi_export_lib1.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib2.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib3.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib4.dart" as lib;
+
+static method main() → dynamic {
+  let final mul::SubClass1 #t1 = new mul::SubClass1::•() in block {
+    mul2::Extension|method<mul::SubClass1>(#t1);
+  } =>#t1;
+  let final mul3::SubClass2 #t2 = new mul3::SubClass2::•() in block {
+    mul2::Extension|method<mul3::SubClass2>(#t2);
+  } =>#t2;
+  let final mul4::SubClass3 #t3 = new mul4::SubClass3::•() in block {
+    mul2::Extension|method<mul4::SubClass3>(#t3);
+  } =>#t3;
+  let final mul5::SubClass4 #t4 = new mul5::SubClass4::•() in block {
+    mul2::Extension|method<mul5::SubClass4>(#t4);
+  } =>#t4;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul;
+import "multi_export_lib.dart" as mul2;
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+
+class SubClass1 extends mul2::Class {
+  synthetic constructor •() → mul::SubClass1
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul3;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass2 extends mul2::Class {
+  synthetic constructor •() → mul3::SubClass2
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul4;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass3 extends mul2::Class {
+  synthetic constructor •() → mul4::SubClass3
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul5;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass4 extends mul2::Class {
+  synthetic constructor •() → mul5::SubClass4
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul2;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → mul2::Class
+    : super core::Object::•()
+    ;
+}
+extension Extension<T extends mul2::Class> on T {
+  method method = mul2::Extension|method;
+  tearoff method = mul2::Extension|get#method;
+}
+static method Extension|method<T extends mul2::Class>(lowered final mul2::Extension|method::T #this) → dynamic {}
+static method Extension|get#method<T extends mul2::Class>(lowered final mul2::Extension|get#method::T #this) → () → dynamic
+  return () → dynamic => mul2::Extension|method<mul2::Extension|get#method::T>(#this);
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart.weak.outline.expect b/pkg/front_end/testcases/extensions/multi_export.dart.weak.outline.expect
new file mode 100644
index 0000000..73fb1e0
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart.weak.outline.expect
@@ -0,0 +1,77 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///multi_export_lib1.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib2.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib3.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib4.dart" as lib;
+
+static method main() → dynamic
+  ;
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "multi_export_lib.dart" as mul;
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+
+class SubClass1 extends mul::Class {
+  synthetic constructor •() → self2::SubClass1
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "multi_export_lib.dart" as mul;
+additionalExports = (mul::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass2 extends mul::Class {
+  synthetic constructor •() → self3::SubClass2
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self4;
+import "multi_export_lib.dart" as mul;
+additionalExports = (mul::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass3 extends mul::Class {
+  synthetic constructor •() → self4::SubClass3
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self5;
+import "multi_export_lib.dart" as mul;
+additionalExports = (mul::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass4 extends mul::Class {
+  synthetic constructor •() → self5::SubClass4
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → mul::Class
+    ;
+}
+extension Extension<T extends mul::Class> on T {
+  method method = mul::Extension|method;
+  tearoff method = mul::Extension|get#method;
+}
+static method Extension|method<T extends mul::Class>(lowered final mul::Extension|method::T #this) → dynamic
+  ;
+static method Extension|get#method<T extends mul::Class>(lowered final mul::Extension|get#method::T #this) → () → dynamic
+  return () → dynamic => mul::Extension|method<mul::Extension|get#method::T>(#this);
diff --git a/pkg/front_end/testcases/extensions/multi_export.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/multi_export.dart.weak.transformed.expect
new file mode 100644
index 0000000..b369c9b
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export.dart.weak.transformed.expect
@@ -0,0 +1,98 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "multi_export_lib1.dart" as mul;
+import "multi_export_lib.dart" as mul2;
+import "multi_export_lib2.dart" as mul3;
+import "multi_export_lib3.dart" as mul4;
+import "multi_export_lib4.dart" as mul5;
+
+import "org-dartlang-testcase:///multi_export_lib1.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib2.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib3.dart" as lib;
+import "org-dartlang-testcase:///multi_export_lib4.dart" as lib;
+
+static method main() → dynamic {
+  let final mul::SubClass1 #t1 = new mul::SubClass1::•() in block {
+    mul2::Extension|method<mul::SubClass1>(#t1);
+  } =>#t1;
+  let final mul3::SubClass2 #t2 = new mul3::SubClass2::•() in block {
+    mul2::Extension|method<mul3::SubClass2>(#t2);
+  } =>#t2;
+  let final mul4::SubClass3 #t3 = new mul4::SubClass3::•() in block {
+    mul2::Extension|method<mul4::SubClass3>(#t3);
+  } =>#t3;
+  let final mul5::SubClass4 #t4 = new mul5::SubClass4::•() in block {
+    mul2::Extension|method<mul5::SubClass4>(#t4);
+  } =>#t4;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul;
+import "multi_export_lib.dart" as mul2;
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+
+class SubClass1 extends mul2::Class {
+  synthetic constructor •() → mul::SubClass1
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul3;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass2 extends mul2::Class {
+  synthetic constructor •() → mul3::SubClass2
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul4;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass3 extends mul2::Class {
+  synthetic constructor •() → mul4::SubClass3
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul5;
+import "multi_export_lib.dart" as mul2;
+additionalExports = (mul2::Extension)
+
+import "org-dartlang-testcase:///multi_export_lib.dart";
+export "org-dartlang-testcase:///multi_export_lib.dart" show Extension;
+
+class SubClass4 extends mul2::Class {
+  synthetic constructor •() → mul5::SubClass4
+    : super mul2::Class::•()
+    ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as mul2;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → mul2::Class
+    : super core::Object::•()
+    ;
+}
+extension Extension<T extends mul2::Class> on T {
+  method method = mul2::Extension|method;
+  tearoff method = mul2::Extension|get#method;
+}
+static method Extension|method<T extends mul2::Class>(lowered final mul2::Extension|method::T #this) → dynamic {}
+static method Extension|get#method<T extends mul2::Class>(lowered final mul2::Extension|get#method::T #this) → () → dynamic
+  return () → dynamic => mul2::Extension|method<mul2::Extension|get#method::T>(#this);
diff --git a/pkg/front_end/testcases/extensions/multi_export_lib.dart b/pkg/front_end/testcases/extensions/multi_export_lib.dart
new file mode 100644
index 0000000..3c35b93
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export_lib.dart
@@ -0,0 +1,9 @@
+// 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.
+
+class Class {}
+
+extension Extension<T extends Class> on T {
+  method() {}
+}
diff --git a/pkg/front_end/testcases/extensions/multi_export_lib1.dart b/pkg/front_end/testcases/extensions/multi_export_lib1.dart
new file mode 100644
index 0000000..a9afcf3
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export_lib1.dart
@@ -0,0 +1,8 @@
+// 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.
+
+import 'multi_export_lib.dart';
+//export 'multi_export_lib.dart' show Extension;
+
+class SubClass1 extends Class {}
diff --git a/pkg/front_end/testcases/extensions/multi_export_lib2.dart b/pkg/front_end/testcases/extensions/multi_export_lib2.dart
new file mode 100644
index 0000000..16f208a
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export_lib2.dart
@@ -0,0 +1,8 @@
+// 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.
+
+import 'multi_export_lib.dart';
+export 'multi_export_lib.dart' show Extension;
+
+class SubClass2 extends Class {}
diff --git a/pkg/front_end/testcases/extensions/multi_export_lib3.dart b/pkg/front_end/testcases/extensions/multi_export_lib3.dart
new file mode 100644
index 0000000..fd2c3a9
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export_lib3.dart
@@ -0,0 +1,8 @@
+// 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.
+
+import 'multi_export_lib.dart';
+export 'multi_export_lib.dart' show Extension;
+
+class SubClass3 extends Class {}
diff --git a/pkg/front_end/testcases/extensions/multi_export_lib4.dart b/pkg/front_end/testcases/extensions/multi_export_lib4.dart
new file mode 100644
index 0000000..6267625
--- /dev/null
+++ b/pkg/front_end/testcases/extensions/multi_export_lib4.dart
@@ -0,0 +1,8 @@
+// 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.
+
+import 'multi_export_lib.dart';
+export 'multi_export_lib.dart' show Extension;
+
+class SubClass4 extends Class {}
diff --git a/pkg/front_end/testcases/extensions/nested_on_types.dart b/pkg/front_end/testcases/extensions/nested_on_types.dart
index e1fc07d..da3d2d7 100644
--- a/pkg/front_end/testcases/extensions/nested_on_types.dart
+++ b/pkg/front_end/testcases/extensions/nested_on_types.dart
@@ -1,7 +1,9 @@
 // Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 // @dart=2.9
+
 class A<T> {}
 
 extension Extension<T> on A<A<T>> {
diff --git a/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.expect b/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.expect
index 20bfb57..42e4b34 100644
--- a/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.expect
@@ -45,7 +45,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class*>(self::test2::T* t2) → dynamic {
-  if(self::test2::T* =={core::Type::==}{(core::Object*) →* core::bool*} (#C1)) {
+  if(self::test2::T* =={core::Type::==}{(core::Object*) →* core::bool*} #C1) {
     self::SubClass* subClass = self::BoundExtension|method2<self::Class*>(t2) as{TypeError} self::SubClass*;
   }
 }
diff --git a/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.transformed.expect
index 20bfb57..42e4b34 100644
--- a/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/type_variable_bound.dart.weak.transformed.expect
@@ -45,7 +45,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class*>(self::test2::T* t2) → dynamic {
-  if(self::test2::T* =={core::Type::==}{(core::Object*) →* core::bool*} (#C1)) {
+  if(self::test2::T* =={core::Type::==}{(core::Object*) →* core::bool*} #C1) {
     self::SubClass* subClass = self::BoundExtension|method2<self::Class*>(t2) as{TypeError} self::SubClass*;
   }
 }
diff --git a/pkg/front_end/testcases/general/DeltaBlue.dart.weak.expect b/pkg/front_end/testcases/general/DeltaBlue.dart.weak.expect
index 5754a1b..c7ae21e 100644
--- a/pkg/front_end/testcases/general/DeltaBlue.dart.weak.expect
+++ b/pkg/front_end/testcases/general/DeltaBlue.dart.weak.expect
@@ -28,7 +28,7 @@
     : self::Strength::value = value, self::Strength::name = name, super core::Object::•()
     ;
   method nextWeaker() → self::Strength*
-    return (#C19).{core::List::[]}(this.{self::Strength::value}{core::int*}){(core::int*) →* self::Strength*};
+    return #C19.{core::List::[]}(this.{self::Strength::value}{core::int*}){(core::int*) →* self::Strength*};
   static method stronger(self::Strength* s1, self::Strength* s2) → core::bool* {
     return s1.{self::Strength::value}{core::int*}.{core::num::<}(s2.{self::Strength::value}{core::int*}){(core::num*) →* core::bool*};
   }
@@ -74,7 +74,7 @@
   method satisfy(dynamic mark) → self::Constraint* {
     this.{self::Constraint::chooseMethod}(mark as{TypeError,ForDynamic} core::int*){(core::int*) →* void};
     if(!this.{self::Constraint::isSatisfied}(){() →* core::bool*}) {
-      if(this.{self::Constraint::strength}{self::Strength*} =={self::Strength::==}{(dynamic) →* core::bool*} (#C22)) {
+      if(this.{self::Constraint::strength}{self::Strength*} =={self::Strength::==}{(dynamic) →* core::bool*} #C22) {
         core::print("Could not satisfy a required constraint!");
       }
       return null;
@@ -186,14 +186,14 @@
     this.{self::BinaryConstraint::direction} = #C1;
   }
   method isSatisfied() → core::bool*
-    return !(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C1));
+    return !(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C1);
   method markInputs(core::int* mark) → void {
     this.{self::BinaryConstraint::input}(){() →* self::Variable*}.{self::Variable::mark} = mark;
   }
   method input() → self::Variable*
-    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4) ?{self::Variable*} this.{self::BinaryConstraint::v1}{self::Variable*} : this.{self::BinaryConstraint::v2}{self::Variable*};
+    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4 ?{self::Variable*} this.{self::BinaryConstraint::v1}{self::Variable*} : this.{self::BinaryConstraint::v2}{self::Variable*};
   method output() → self::Variable*
-    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4) ?{self::Variable*} this.{self::BinaryConstraint::v2}{self::Variable*} : this.{self::BinaryConstraint::v1}{self::Variable*};
+    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4 ?{self::Variable*} this.{self::BinaryConstraint::v2}{self::Variable*} : this.{self::BinaryConstraint::v1}{self::Variable*};
   method recalculate() → void {
     self::Variable* ihn = this.{self::BinaryConstraint::input}(){() →* self::Variable*};
     self::Variable* out = this.{self::BinaryConstraint::output}(){() →* self::Variable*};
@@ -240,7 +240,7 @@
     this.{self::ScaleConstraint::scale}{self::Variable*}.{self::Variable::mark} = this.{self::ScaleConstraint::offset}{self::Variable*}.{self::Variable::mark} = mark;
   }
   method execute() → void {
-    if(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4)) {
+    if(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4) {
       this.{self::BinaryConstraint::v2}{self::Variable*}.{self::Variable::value} = this.{self::BinaryConstraint::v1}{self::Variable*}.{self::Variable::value}{core::int*}.{core::num::*}(this.{self::ScaleConstraint::scale}{self::Variable*}.{self::Variable::value}{core::int*}){(core::num*) →* core::int*}.{core::num::+}(this.{self::ScaleConstraint::offset}{self::Variable*}.{self::Variable::value}{core::int*}){(core::num*) →* core::int*};
     }
     else {
@@ -318,7 +318,7 @@
       }
       strength = strength.{self::Strength::nextWeaker}(){() →* self::Strength*};
     }
-    while (!(strength =={self::Strength::==}{(dynamic) →* core::bool*} (#C18)))
+    while (!(strength =={self::Strength::==}{(dynamic) →* core::bool*} #C18))
   }
   method newMark() → core::int*
     return this.{self::Planner::currentMark} = this.{self::Planner::currentMark}{core::int*}.{core::num::+}(1){(core::num*) →* core::int*};
diff --git a/pkg/front_end/testcases/general/DeltaBlue.dart.weak.transformed.expect b/pkg/front_end/testcases/general/DeltaBlue.dart.weak.transformed.expect
index 8ce41ca..2bbd69a 100644
--- a/pkg/front_end/testcases/general/DeltaBlue.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/DeltaBlue.dart.weak.transformed.expect
@@ -28,7 +28,7 @@
     : self::Strength::value = value, self::Strength::name = name, super core::Object::•()
     ;
   method nextWeaker() → self::Strength*
-    return (#C19).{core::List::[]}(this.{self::Strength::value}{core::int*}){(core::int*) →* self::Strength*};
+    return #C19.{core::List::[]}(this.{self::Strength::value}{core::int*}){(core::int*) →* self::Strength*};
   static method stronger(self::Strength* s1, self::Strength* s2) → core::bool* {
     return s1.{self::Strength::value}{core::int*}.{core::num::<}(s2.{self::Strength::value}{core::int*}){(core::num*) →* core::bool*};
   }
@@ -74,7 +74,7 @@
   method satisfy(dynamic mark) → self::Constraint* {
     this.{self::Constraint::chooseMethod}(mark as{TypeError,ForDynamic} core::int*){(core::int*) →* void};
     if(!this.{self::Constraint::isSatisfied}(){() →* core::bool*}) {
-      if(this.{self::Constraint::strength}{self::Strength*} =={self::Strength::==}{(dynamic) →* core::bool*} (#C22)) {
+      if(this.{self::Constraint::strength}{self::Strength*} =={self::Strength::==}{(dynamic) →* core::bool*} #C22) {
         core::print("Could not satisfy a required constraint!");
       }
       return null;
@@ -186,14 +186,14 @@
     this.{self::BinaryConstraint::direction} = #C1;
   }
   method isSatisfied() → core::bool*
-    return !(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C1));
+    return !(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C1);
   method markInputs(core::int* mark) → void {
     this.{self::BinaryConstraint::input}(){() →* self::Variable*}.{self::Variable::mark} = mark;
   }
   method input() → self::Variable*
-    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4) ?{self::Variable*} this.{self::BinaryConstraint::v1}{self::Variable*} : this.{self::BinaryConstraint::v2}{self::Variable*};
+    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4 ?{self::Variable*} this.{self::BinaryConstraint::v1}{self::Variable*} : this.{self::BinaryConstraint::v2}{self::Variable*};
   method output() → self::Variable*
-    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4) ?{self::Variable*} this.{self::BinaryConstraint::v2}{self::Variable*} : this.{self::BinaryConstraint::v1}{self::Variable*};
+    return this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4 ?{self::Variable*} this.{self::BinaryConstraint::v2}{self::Variable*} : this.{self::BinaryConstraint::v1}{self::Variable*};
   method recalculate() → void {
     self::Variable* ihn = this.{self::BinaryConstraint::input}(){() →* self::Variable*};
     self::Variable* out = this.{self::BinaryConstraint::output}(){() →* self::Variable*};
@@ -240,7 +240,7 @@
     this.{self::ScaleConstraint::scale}{self::Variable*}.{self::Variable::mark} = this.{self::ScaleConstraint::offset}{self::Variable*}.{self::Variable::mark} = mark;
   }
   method execute() → void {
-    if(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} (#C4)) {
+    if(this.{self::BinaryConstraint::direction}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} #C4) {
       this.{self::BinaryConstraint::v2}{self::Variable*}.{self::Variable::value} = this.{self::BinaryConstraint::v1}{self::Variable*}.{self::Variable::value}{core::int*}.{core::num::*}(this.{self::ScaleConstraint::scale}{self::Variable*}.{self::Variable::value}{core::int*}){(core::num*) →* core::int*}.{core::num::+}(this.{self::ScaleConstraint::offset}{self::Variable*}.{self::Variable::value}{core::int*}){(core::num*) →* core::int*};
     }
     else {
@@ -318,7 +318,7 @@
       }
       strength = strength.{self::Strength::nextWeaker}(){() →* self::Strength*};
     }
-    while (!(strength =={self::Strength::==}{(dynamic) →* core::bool*} (#C18)))
+    while (!(strength =={self::Strength::==}{(dynamic) →* core::bool*} #C18))
   }
   method newMark() → core::int*
     return this.{self::Planner::currentMark} = this.{self::Planner::currentMark}{core::int*}.{core::num::+}(1){(core::num*) →* core::int*};
diff --git a/pkg/front_end/testcases/general/abstract_members.dart.weak.expect b/pkg/front_end/testcases/general/abstract_members.dart.weak.expect
index 67d0267..d874a11 100644
--- a/pkg/front_end/testcases/general/abstract_members.dart.weak.expect
+++ b/pkg/front_end/testcases/general/abstract_members.dart.weak.expect
@@ -431,7 +431,7 @@
   #C1 = #interfaceMethod2
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #abstractMethod
   #C6 = #interfaceMethod1
   #C7 = #interfaceMethod3
diff --git a/pkg/front_end/testcases/general/abstract_members.dart.weak.outline.expect b/pkg/front_end/testcases/general/abstract_members.dart.weak.outline.expect
index 49ba0ba..9685255 100644
--- a/pkg/front_end/testcases/general/abstract_members.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/abstract_members.dart.weak.outline.expect
@@ -428,29 +428,29 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:12:8 -> SymbolConstant(#interfaceMethod2)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:12:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:12:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:12:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:12:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:23:3 -> SymbolConstant(#abstractMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:23:3 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:23:3 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:23:3 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:23:3 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:8:8 -> SymbolConstant(#interfaceMethod1)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:8:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:8:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:8:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:8:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:18:8 -> SymbolConstant(#interfaceMethod3)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:18:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:18:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:18:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:18:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:26:12 -> SymbolConstant(#property3=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:26:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:26:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:26:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:14:7 -> SymbolConstant(#interfaceMethod1=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:14:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:14:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:14:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:24:12 -> SymbolConstant(#property1=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:24:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:24:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:24:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_members.dart:25:12 -> SymbolConstant(#property2=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:25:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:25:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_members.dart:25:12 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 73, effectively constant: 28
diff --git a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.expect b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.expect
index da16394..882db16 100644
--- a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.expect
+++ b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.expect
@@ -54,5 +54,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.outline.expect b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.outline.expect
index db26f68..41d6539 100644
--- a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.outline.expect
@@ -52,5 +52,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_overrides_concrete_with_no_such_method.dart:10:5 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_overrides_concrete_with_no_such_method.dart:10:5 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_overrides_concrete_with_no_such_method.dart:10:5 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_overrides_concrete_with_no_such_method.dart:10:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_overrides_concrete_with_no_such_method.dart:10:5 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 9, effectively constant: 4
diff --git a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.transformed.expect b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.transformed.expect
index da16394..882db16 100644
--- a/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/abstract_overrides_concrete_with_no_such_method.dart.weak.transformed.expect
@@ -54,5 +54,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.expect
index bd3e8df..80eb1d7 100644
--- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.expect
+++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.expect
@@ -18,20 +18,20 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = #C10;
   @#C11
   static const field self::Foo* bar = #C3;
   @#C12
   static const field self::Foo* baz = #C6;
   static const field self::Foo* cafebabe = #C9;
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -47,13 +47,13 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Foo.bar"
+  #C2 = "bar"
   #C3 = self::Foo {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Foo.baz"
+  #C5 = "baz"
   #C6 = self::Foo {index:#C4, _name:#C5}
   #C7 = 2
-  #C8 = "Foo.cafebabe"
+  #C8 = "cafebabe"
   #C9 = self::Foo {index:#C7, _name:#C8}
   #C10 = <self::Foo*>[#C3, #C6, #C9]
   #C11 = 42
@@ -64,5 +64,6 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///annotation_on_enum_values.dart:
 - Foo. (from org-dartlang-testcase:///annotation_on_enum_values.dart:15:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
 - Fisk.fisk (from org-dartlang-testcase:///annotation_on_enum_values.dart:12:9)
diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.outline.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.outline.expect
index 3b90344..e14c553 100644
--- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.outline.expect
@@ -18,20 +18,20 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = const <self::Foo*>[self::Foo::bar, self::Foo::baz, self::Foo::cafebabe];
   @self::hest
-  static const field self::Foo* bar = const self::Foo::•(0, "Foo.bar");
+  static const field self::Foo* bar = const self::Foo::•(0, "bar");
   @self::Fisk::fisk<core::int*>(self::hest)
-  static const field self::Foo* baz = const self::Foo::•(1, "Foo.baz");
-  static const field self::Foo* cafebabe = const self::Foo::•(2, "Foo.cafebabe");
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  static const field self::Foo* baz = const self::Foo::•(1, "baz");
+  static const field self::Foo* cafebabe = const self::Foo::•(2, "cafebabe");
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -48,10 +48,10 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///annotation_on_enum_values.dart:15:6 -> ListConstant(const <Foo*>[const Foo{Foo.index: 0, Foo._name: "Foo.bar"}, const Foo{Foo.index: 1, Foo._name: "Foo.baz"}, const Foo{Foo.index: 2, Foo._name: "Foo.cafebabe"}])
+Evaluated: ListLiteral @ org-dartlang-testcase:///annotation_on_enum_values.dart:15:6 -> ListConstant(const <Foo*>[const Foo{_Enum.index: 0, _Enum._name: "bar"}, const Foo{_Enum.index: 1, _Enum._name: "baz"}, const Foo{_Enum.index: 2, _Enum._name: "cafebabe"}])
 Evaluated: StaticGet @ org-dartlang-testcase:///annotation_on_enum_values.dart:16:4 -> IntConstant(42)
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:17:3 -> InstanceConstant(const Foo{Foo.index: 0, Foo._name: "Foo.bar"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:17:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "bar"})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:18:4 -> InstanceConstant(const Fisk<int*>{Fisk.x: 42})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:19:3 -> InstanceConstant(const Foo{Foo.index: 1, Foo._name: "Foo.baz"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:20:3 -> InstanceConstant(const Foo{Foo.index: 2, Foo._name: "Foo.cafebabe"})
-Extra constant evaluation: evaluated: 11, effectively constant: 6
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:19:3 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "baz"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:20:3 -> InstanceConstant(const Foo{_Enum.index: 2, _Enum._name: "cafebabe"})
+Extra constant evaluation: evaluated: 12, effectively constant: 6
diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.transformed.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.transformed.expect
index bd3e8df..80eb1d7 100644
--- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.weak.transformed.expect
@@ -18,20 +18,20 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = #C10;
   @#C11
   static const field self::Foo* bar = #C3;
   @#C12
   static const field self::Foo* baz = #C6;
   static const field self::Foo* cafebabe = #C9;
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -47,13 +47,13 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Foo.bar"
+  #C2 = "bar"
   #C3 = self::Foo {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Foo.baz"
+  #C5 = "baz"
   #C6 = self::Foo {index:#C4, _name:#C5}
   #C7 = 2
-  #C8 = "Foo.cafebabe"
+  #C8 = "cafebabe"
   #C9 = self::Foo {index:#C7, _name:#C8}
   #C10 = <self::Foo*>[#C3, #C6, #C9]
   #C11 = 42
@@ -64,5 +64,6 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///annotation_on_enum_values.dart:
 - Foo. (from org-dartlang-testcase:///annotation_on_enum_values.dart:15:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
 - Fisk.fisk (from org-dartlang-testcase:///annotation_on_enum_values.dart:12:9)
diff --git a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.expect b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.expect
index 8ca1bc7..228018a 100644
--- a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method bar<generic-covariant-impl Y extends self::A::X*>() → dynamic
+  method bar<covariant-by-class Y extends self::A::X*>() → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.outline.expect b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.outline.expect
index 0828ddb..12e78d8 100644
--- a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X*>*
     ;
-  method bar<generic-covariant-impl Y extends self::A::X*>() → dynamic
+  method bar<covariant-by-class Y extends self::A::X*>() → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.transformed.expect
index 8ca1bc7..228018a 100644
--- a/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/bounds_check_depends_on_inference.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method bar<generic-covariant-impl Y extends self::A::X*>() → dynamic
+  method bar<covariant-by-class Y extends self::A::X*>() → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bug33099.dart.weak.expect b/pkg/front_end/testcases/general/bug33099.dart.weak.expect
index 5df3838..68aa1c4 100644
--- a/pkg/front_end/testcases/general/bug33099.dart.weak.expect
+++ b/pkg/front_end/testcases/general/bug33099.dart.weak.expect
@@ -63,7 +63,7 @@
 static method main() → dynamic {
   mir::ClassMirror* classMirror = mir::reflectClass(#C2);
   classMirror.{mir::ClassMirror::instanceMembers}{core::Map<core::Symbol*, mir::MethodMirror*>*}.{core::Map::forEach}((core::Symbol* symbol, mir::MethodMirror* memberMirror) → Null {
-    if(memberMirror.{mir::DeclarationMirror::simpleName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C3)) {
+    if(memberMirror.{mir::DeclarationMirror::simpleName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C3) {
       core::print(memberMirror);
       core::print(self::_hasFailingTestAnnotation(memberMirror));
     }
diff --git a/pkg/front_end/testcases/general/bug33099.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bug33099.dart.weak.transformed.expect
index 79f0586..183cc55 100644
--- a/pkg/front_end/testcases/general/bug33099.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/bug33099.dart.weak.transformed.expect
@@ -63,7 +63,7 @@
 static method main() → dynamic {
   mir::ClassMirror* classMirror = mir::reflectClass(#C2);
   classMirror.{mir::ClassMirror::instanceMembers}{core::Map<core::Symbol*, mir::MethodMirror*>*}.{core::Map::forEach}((core::Symbol* symbol, mir::MethodMirror* memberMirror) → Null {
-    if(memberMirror.{mir::DeclarationMirror::simpleName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C3)) {
+    if(memberMirror.{mir::DeclarationMirror::simpleName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C3) {
       core::print(memberMirror);
       core::print(self::_hasFailingTestAnnotation(memberMirror));
     }
diff --git a/pkg/front_end/testcases/general/bug33298.dart.weak.expect b/pkg/front_end/testcases/general/bug33298.dart.weak.expect
index 397db9f..d656910 100644
--- a/pkg/front_end/testcases/general/bug33298.dart.weak.expect
+++ b/pkg/front_end/testcases/general/bug33298.dart.weak.expect
@@ -30,7 +30,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method call(generic-covariant-impl self::B::T* t) → self::B::T*
+  method call(covariant-by-class self::B::T* t) → self::B::T*
     return t;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bug33298.dart.weak.outline.expect b/pkg/front_end/testcases/general/bug33298.dart.weak.outline.expect
index 5a653a2..28cafd2 100644
--- a/pkg/front_end/testcases/general/bug33298.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/bug33298.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  method call(generic-covariant-impl self::B::T* t) → self::B::T*
+  method call(covariant-by-class self::B::T* t) → self::B::T*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bug33298.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bug33298.dart.weak.transformed.expect
index 8f7030e..476cd01 100644
--- a/pkg/front_end/testcases/general/bug33298.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/bug33298.dart.weak.transformed.expect
@@ -30,7 +30,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method call(generic-covariant-impl self::B::T* t) → self::B::T*
+  method call(covariant-by-class self::B::T* t) → self::B::T*
     return t;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bug35470.dart.weak.expect b/pkg/front_end/testcases/general/bug35470.dart.weak.expect
index d840067..bc15f31 100644
--- a/pkg/front_end/testcases/general/bug35470.dart.weak.expect
+++ b/pkg/front_end/testcases/general/bug35470.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl Y extends self::A::X*>() → dynamic {}
+  method foo<covariant-by-class Y extends self::A::X*>() → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/bug35470.dart.weak.outline.expect b/pkg/front_end/testcases/general/bug35470.dart.weak.outline.expect
index bfe47d7..1169300 100644
--- a/pkg/front_end/testcases/general/bug35470.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/bug35470.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X*>*
     ;
-  method foo<generic-covariant-impl Y extends self::A::X*>() → dynamic
+  method foo<covariant-by-class Y extends self::A::X*>() → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/bug35470.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bug35470.dart.weak.transformed.expect
index d840067..bc15f31 100644
--- a/pkg/front_end/testcases/general/bug35470.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/bug35470.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl Y extends self::A::X*>() → dynamic {}
+  method foo<covariant-by-class Y extends self::A::X*>() → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/call.dart.weak.expect b/pkg/front_end/testcases/general/call.dart.weak.expect
index c717175..f9559169 100644
--- a/pkg/front_end/testcases/general/call.dart.weak.expect
+++ b/pkg/front_end/testcases/general/call.dart.weak.expect
@@ -139,7 +139,7 @@
 static field dynamic string3 = self::callable.{self::Callable::call}{(dynamic) →* dynamic}(1){(dynamic) →* dynamic};
 static field dynamic string4 = self::callable.{self::Callable::call}{(dynamic) →* dynamic}.call(1){(dynamic) →* dynamic};
 static field self::CallableGetter* callableGetter = new self::CallableGetter::•();
-static field dynamic string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:63:29: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+static field invalid-type string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:63:29: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var string5 = callableGetter(1);
@@ -171,7 +171,7 @@
 static field dynamic nothing8 = invalid-expression "pkg/front_end/testcases/general/call.dart:76:39: Error: Too few positional arguments: 1 required, 0 given.
 var nothing8 = callable.call.call.call();
                                       ^" in self::callable.{self::Callable::call}{(dynamic) →* dynamic}.call{<inapplicable>}.();
-static field dynamic nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:78:30: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+static field invalid-type nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:78:30: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var nothing9 = callableGetter();
@@ -191,7 +191,7 @@
   dynamic string3 = callable.{self::Callable::call}{(dynamic) →* dynamic}(1){(dynamic) →* dynamic};
   dynamic string4 = callable.{self::Callable::call}{(dynamic) →* dynamic}.call(1){(dynamic) →* dynamic};
   self::CallableGetter* callableGetter = new self::CallableGetter::•();
-  dynamic string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:29:31: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+  invalid-type string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:29:31: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
   var string5 = callableGetter(1);
@@ -223,7 +223,7 @@
   invalid-type nothing8 = invalid-expression "pkg/front_end/testcases/general/call.dart:42:41: Error: Too few positional arguments: 1 required, 0 given.
   var nothing8 = callable.call.call.call();
                                         ^" in callable.{self::Callable::call}{(dynamic) →* dynamic}.call{<inapplicable>}.();
-  dynamic nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:44:32: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+  invalid-type nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:44:32: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
   var nothing9 = callableGetter();
diff --git a/pkg/front_end/testcases/general/call.dart.weak.outline.expect b/pkg/front_end/testcases/general/call.dart.weak.outline.expect
index 9026e42..9d8c931 100644
--- a/pkg/front_end/testcases/general/call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/call.dart.weak.outline.expect
@@ -45,7 +45,7 @@
 static field dynamic string3;
 static field dynamic string4;
 static field self::CallableGetter* callableGetter;
-static field dynamic string5;
+static field invalid-type string5;
 static field dynamic string6;
 static field dynamic string7;
 static field dynamic string8;
@@ -57,7 +57,7 @@
 static field dynamic nothing6;
 static field dynamic nothing7;
 static field dynamic nothing8;
-static field dynamic nothing9;
+static field invalid-type nothing9;
 static field dynamic nothing10;
 static field dynamic nothing11;
 static field dynamic nothing12;
diff --git a/pkg/front_end/testcases/general/call.dart.weak.transformed.expect b/pkg/front_end/testcases/general/call.dart.weak.transformed.expect
index 5d9b478..ccac183 100644
--- a/pkg/front_end/testcases/general/call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/call.dart.weak.transformed.expect
@@ -139,7 +139,7 @@
 static field dynamic string3 = self::callable.{self::Callable::call}{(dynamic) →* dynamic}(1){(dynamic) →* dynamic};
 static field dynamic string4 = self::callable.{self::Callable::call}{(dynamic) →* dynamic}.call(1){(dynamic) →* dynamic};
 static field self::CallableGetter* callableGetter = new self::CallableGetter::•();
-static field dynamic string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:63:29: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+static field invalid-type string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:63:29: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var string5 = callableGetter(1);
@@ -171,7 +171,7 @@
 static field dynamic nothing8 = invalid-expression "pkg/front_end/testcases/general/call.dart:76:39: Error: Too few positional arguments: 1 required, 0 given.
 var nothing8 = callable.call.call.call();
                                       ^" in self::callable.{self::Callable::call}{(dynamic) →* dynamic}.call{<inapplicable>}.();
-static field dynamic nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:78:30: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+static field invalid-type nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:78:30: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
 var nothing9 = callableGetter();
@@ -191,7 +191,7 @@
   dynamic string3 = callable.{self::Callable::call}{(dynamic) →* dynamic}(1){(dynamic) →* dynamic};
   dynamic string4 = callable.{self::Callable::call}{(dynamic) →* dynamic}.call(1){(dynamic) →* dynamic};
   self::CallableGetter* callableGetter = new self::CallableGetter::•();
-  dynamic string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:29:31: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+  invalid-type string5 = invalid-expression "pkg/front_end/testcases/general/call.dart:29:31: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
   var string5 = callableGetter(1);
@@ -223,7 +223,7 @@
   invalid-type nothing8 = invalid-expression "pkg/front_end/testcases/general/call.dart:42:41: Error: Too few positional arguments: 1 required, 0 given.
   var nothing8 = callable.call.call.call();
                                         ^" in callable.{self::Callable::call}{(dynamic) →* dynamic}.call{<inapplicable>}.();
-  dynamic nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:44:32: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
+  invalid-type nothing9 = invalid-expression "pkg/front_end/testcases/general/call.dart:44:32: Error: Cannot invoke an instance of 'CallableGetter' because it declares 'call' to be something other than a method.
  - 'CallableGetter' is from 'pkg/front_end/testcases/general/call.dart'.
 Try changing 'call' to a method or explicitly invoke 'call'.
   var nothing9 = callableGetter();
diff --git a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.expect b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.expect
index 59e805d..82b2ca3 100644
--- a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.expect
+++ b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.expect
@@ -14,7 +14,7 @@
 import "dart:core" as core;
 
 class Class1<T extends core::Function*> extends core::Object {
-  generic-covariant-impl field self::Class1::T* field;
+  covariant-by-class field self::Class1::T* field;
   constructor •(self::Class1::T* field) → self::Class1<self::Class1::T*>*
     : self::Class1::field = field, super core::Object::•()
     ;
@@ -37,7 +37,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Class2<T extends (core::int*) →* core::String*> extends core::Object {
-  generic-covariant-impl field self::Class2::T* field;
+  covariant-by-class field self::Class2::T* field;
   constructor •(self::Class2::T* field) → self::Class2<self::Class2::T*>*
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.outline.expect b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.outline.expect
index 654c962..cc8857f2 100644
--- a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Class1<T extends core::Function*> extends core::Object {
-  generic-covariant-impl field self::Class1::T* field;
+  covariant-by-class field self::Class1::T* field;
   constructor •(self::Class1::T* field) → self::Class1<self::Class1::T*>*
     ;
   method method() → dynamic
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Class2<T extends (core::int*) →* core::String*> extends core::Object {
-  generic-covariant-impl field self::Class2::T* field;
+  covariant-by-class field self::Class2::T* field;
   constructor •(self::Class2::T* field) → self::Class2<self::Class2::T*>*
     ;
   method method() → dynamic
diff --git a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.transformed.expect b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.transformed.expect
index f740b10..38bd48c 100644
--- a/pkg/front_end/testcases/general/callable_type_variable.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/callable_type_variable.dart.weak.transformed.expect
@@ -14,7 +14,7 @@
 import "dart:core" as core;
 
 class Class1<T extends core::Function*> extends core::Object {
-  generic-covariant-impl field self::Class1::T* field;
+  covariant-by-class field self::Class1::T* field;
   constructor •(self::Class1::T* field) → self::Class1<self::Class1::T*>*
     : self::Class1::field = field, super core::Object::•()
     ;
@@ -37,7 +37,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Class2<T extends (core::int*) →* core::String*> extends core::Object {
-  generic-covariant-impl field self::Class2::T* field;
+  covariant-by-class field self::Class2::T* field;
   constructor •(self::Class2::T* field) → self::Class2<self::Class2::T*>*
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.expect b/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.expect
index 05feed8..be365f6 100644
--- a/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.expect
@@ -127,7 +127,7 @@
 class Foo extends core::Object /*hasConstConstructor*/  {
   final field core::int* x;
   const constructor •(core::int* x) → self::Foo*
-    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, "x is not positive"), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, ""), assert((#C1) =={core::Object::==}{(core::Object*) →* core::bool*} false, "foo was ${#C1}"), assert((#C1) =={core::Object::==}{(core::Object*) →* core::bool*} false), super core::Object::•()
+    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, "x is not positive"), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, ""), assert(#C1 =={core::Object::==}{(core::Object*) →* core::bool*} false, "foo was ${#C1}"), assert(#C1 =={core::Object::==}{(core::Object*) →* core::bool*} false), super core::Object::•()
     ;
   const constructor withMessage(core::int* x) → self::Foo*
     : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num*) →* core::bool*}, "btw foo was ${#C1}"), super core::Object::•()
diff --git a/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.transformed.expect
index 01b5185..8d10eb2 100644
--- a/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/const_asserts.dart.weak.transformed.expect
@@ -127,7 +127,7 @@
 class Foo extends core::Object /*hasConstConstructor*/  {
   final field core::int* x;
   const constructor •(core::int* x) → self::Foo*
-    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, "x is not positive"), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, ""), assert((#C1) =={core::Object::==}{(core::Object*) →* core::bool*} false, "foo was ${#C1}"), assert((#C1) =={core::Object::==}{(core::Object*) →* core::bool*} false), super core::Object::•()
+    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, "x is not positive"), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}), assert(x.{core::num::>}(0){(core::num*) →* core::bool*}, ""), assert(#C1 =={core::Object::==}{(core::Object*) →* core::bool*} false, "foo was ${#C1}"), assert(#C1 =={core::Object::==}{(core::Object*) →* core::bool*} false), super core::Object::•()
     ;
   const constructor withMessage(core::int* x) → self::Foo*
     : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num*) →* core::bool*}, "btw foo was ${#C1}"), super core::Object::•()
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.expect
index 13b1fa7..456d5c3 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.expect
@@ -222,14 +222,14 @@
   get iterator() → core::Iterator<core::int*>*
     return <core::int*>[].{core::Iterable::iterator}{core::Iterator<core::int*>*};
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::int*) →* self::ConstIterable::map::T* toElement) → core::Iterable<self::ConstIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::int*) →* core::Iterable<self::ConstIterable::expand::T*>* toElements) → core::Iterable<self::ConstIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::int*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::ConstIterable::fold::T* initialValue, (self::ConstIterable::fold::T*, core::int*) →* self::ConstIterable::fold::T* combine) → self::ConstIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::int*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -243,9 +243,9 @@
   abstract member-signature method takeWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::int*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::int*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -283,14 +283,14 @@
   get iterator() → core::Iterator<core::String*>*
     return <core::String*>[].{core::Iterable::iterator}{core::Iterator<core::String*>*};
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::String*) →* self::CustomIterable::map::T* toElement) → core::Iterable<self::CustomIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::String*) →* core::Iterable<self::CustomIterable::expand::T*>* toElements) → core::Iterable<self::CustomIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::String*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::CustomIterable::fold::T* initialValue, (self::CustomIterable::fold::T*, core::String*) →* self::CustomIterable::fold::T* combine) → self::CustomIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::String*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -304,9 +304,9 @@
   abstract member-signature method takeWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::String*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::String*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -330,7 +330,7 @@
   operator [](core::Object* key) → core::String*
     return throw new core::UnimplementedError::•();
   @#C4
-  operator []=(generic-covariant-impl core::String* key, generic-covariant-impl core::String* value) → void
+  operator []=(covariant-by-class core::String* key, covariant-by-class core::String* value) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method cast<RK extends core::Object* = dynamic, RV extends core::Object* = dynamic>() → core::Map<self::CustomMap::cast::RK*, self::CustomMap::cast::RV*>*
@@ -363,24 +363,24 @@
   get values() → core::Iterable<core::String*>*
     return throw new core::UnimplementedError::•();
   @#C4
-  method addAll(generic-covariant-impl core::Map<core::String*, core::String*>* other) → void
+  method addAll(covariant-by-class core::Map<core::String*, core::String*>* other) → void
     return throw new core::UnimplementedError::•();
   @#C4
-  method addEntries(generic-covariant-impl core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
+  method addEntries(covariant-by-class core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method forEach((core::String*, core::String*) →* void f) → void
     return throw new core::UnimplementedError::•();
   @#C4
-  method putIfAbsent(generic-covariant-impl core::String* key, generic-covariant-impl () →* core::String* ifAbsent) → core::String*
+  method putIfAbsent(covariant-by-class core::String* key, covariant-by-class () →* core::String* ifAbsent) → core::String*
     return throw new core::UnimplementedError::•();
   @#C4
-  method updateAll(generic-covariant-impl (core::String*, core::String*) →* core::String* update) → void
+  method updateAll(covariant-by-class (core::String*, core::String*) →* core::String* update) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method removeWhere((core::String*, core::String*) →* core::bool* predicate) → void
     return throw new core::UnimplementedError::•();
-  method update(generic-covariant-impl core::String* key, generic-covariant-impl (core::String*) →* core::String* update, {generic-covariant-impl () →* core::String* ifAbsent = #C3}) → core::String*
+  method update(covariant-by-class core::String* key, covariant-by-class (core::String*) →* core::String* update, {covariant-by-class () →* core::String* ifAbsent = #C3}) → core::String*
     return throw new core::UnimplementedError::•();
   method map<K2 extends core::Object* = dynamic, V2 extends core::Object* = dynamic>((core::String*, core::String*) →* core::MapEntry<self::CustomMap::map::K2*, self::CustomMap::map::V2*>* f) → core::Map<self::CustomMap::map::K2*, self::CustomMap::map::V2*>*
     return throw new core::UnimplementedError::•();
@@ -420,8 +420,8 @@
 static const field core::List<core::String*>* barWithCustomIterableSpread3 = invalid-expression "Only lists and sets can be used in spreads in constant lists and sets.";
 static const field core::List<core::String*>* listConcat = invalid-expression "The method '+' can't be invoked on '<String>[\"Hello\"]' in a constant expression.";
 static const field core::Set<core::String*>* nullSet = #C3;
-static const field core::Set<core::String*>* baz = #C14;
-static const field core::Set<core::String*>* qux = #C17;
+static const field core::Set<core::String*>* baz = #C12;
+static const field core::Set<core::String*>* qux = #C13;
 static const field core::Set<core::String*>* quxWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::Set<core::String*>* quxWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
 const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
@@ -439,8 +439,8 @@
  - 'WithEquals' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.";
 static const field core::Set<dynamic>* setWithDuplicates = invalid-expression "The element '42' conflicts with another existing element in the set.";
 static const field core::Map<core::String*, core::String*>* nullMap = #C3;
-static const field core::Map<core::String*, core::String*>* quux = #C19;
-static const field core::Map<core::String*, core::String*>* quuz = #C22;
+static const field core::Map<core::String*, core::String*>* quux = #C14;
+static const field core::Map<core::String*, core::String*>* quuz = #C16;
 static const field core::Map<core::String*, core::String*>* quuzWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::Map<core::String*, core::String*>* quuzWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
 const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
@@ -453,7 +453,7 @@
                                              ^";
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap1 = invalid-expression "Only maps can be used in spreads in constant maps.";
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap2 = invalid-expression "Only maps can be used in spreads in constant maps.";
-static const field core::Map<core::String*, core::String*>* customMap = #C23;
+static const field core::Map<core::String*, core::String*>* customMap = #C17;
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap3 = invalid-expression "Only maps can be used in spreads in constant maps.";
 static const field core::Map<dynamic, core::int*>* mapWithNonPrimitiveEqualsKey = invalid-expression "The key 'WithEquals {i: 42}' does not have a primitive operator '=='.
  - 'WithEquals' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.";
@@ -463,22 +463,22 @@
 static get barAsGetter() → core::List<core::String*>*
   return #C10;
 static get bazAsGetter() → core::Set<core::String*>*
-  return #C14;
+  return #C12;
 static get quxAsGetter() → core::Set<core::String*>*
-  return #C17;
+  return #C13;
 static get quuxAsGetter() → core::Map<core::String*, core::String*>*
-  return #C19;
+  return #C14;
 static get quuzAsGetter() → core::Map<core::String*, core::String*>*
-  return #C22;
+  return #C16;
 static method main() → dynamic {
   core::print(#C10);
-  core::print(#C17);
-  core::print(#C22);
+  core::print(#C13);
+  core::print(#C16);
   core::print( block {
     final core::Set<core::String*>* #t2 = col::LinkedHashSet::•<core::String*>();
     #t2.{core::Set::add}{Invariant}("hello"){(core::String*) →* core::bool*};
   } =>#t2);
-  core::print(#C26);
+  core::print(#C18);
 }
 
 constants  {
@@ -493,21 +493,13 @@
   #C9 = "!"
   #C10 = <core::String*>[#C6, #C7, #C9]
   #C11 = self::CustomIterable {}
-  #C12 = <dynamic>[#C6, #C3, #C7, #C3]
-  #C13 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C12}
-  #C14 = col::_UnmodifiableSet<core::String*> {_map:#C13}
-  #C15 = <dynamic>[#C6, #C3, #C7, #C3, #C9, #C3]
-  #C16 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C15}
-  #C17 = col::_UnmodifiableSet<core::String*> {_map:#C16}
-  #C18 = <dynamic>[#C6, #C7]
-  #C19 = core::_ImmutableMap<core::String*, core::String*> {_kvPairs:#C18}
-  #C20 = "bye!"
-  #C21 = <dynamic>[#C6, #C7, #C9, #C20]
-  #C22 = core::_ImmutableMap<core::String*, core::String*> {_kvPairs:#C21}
-  #C23 = self::CustomMap {}
-  #C24 = <dynamic>[#C6, #C3]
-  #C25 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C24}
-  #C26 = col::_UnmodifiableSet<core::String*> {_map:#C25}
+  #C12 = <core::String*>{#C6, #C7}
+  #C13 = <core::String*>{#C6, #C7, #C9}
+  #C14 = <core::String*, core::String*>{#C6:#C7)
+  #C15 = "bye!"
+  #C16 = <core::String*, core::String*>{#C6:#C7, #C9:#C15)
+  #C17 = self::CustomMap {}
+  #C18 = <core::String*>{#C6}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
index 3ab56c9..bc85ecb 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.outline.expect
@@ -49,14 +49,14 @@
   get iterator() → core::Iterator<core::int*>*
     ;
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::int*) →* self::ConstIterable::map::T* toElement) → core::Iterable<self::ConstIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::int*) →* core::Iterable<self::ConstIterable::expand::T*>* toElements) → core::Iterable<self::ConstIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::int*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::ConstIterable::fold::T* initialValue, (self::ConstIterable::fold::T*, core::int*) →* self::ConstIterable::fold::T* combine) → self::ConstIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::int*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator]) → core::String*; -> core::Iterable::join
@@ -70,9 +70,9 @@
   abstract member-signature method takeWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::int*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse}) → core::int*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse}) → core::int*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse}) → core::int*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse}) → core::int*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse}) → core::int*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse}) → core::int*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::int*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -109,14 +109,14 @@
   get iterator() → core::Iterator<core::String*>*
     ;
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::String*) →* self::CustomIterable::map::T* toElement) → core::Iterable<self::CustomIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::String*) →* core::Iterable<self::CustomIterable::expand::T*>* toElements) → core::Iterable<self::CustomIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::String*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::CustomIterable::fold::T* initialValue, (self::CustomIterable::fold::T*, core::String*) →* self::CustomIterable::fold::T* combine) → self::CustomIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::String*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator]) → core::String*; -> core::Iterable::join
@@ -130,9 +130,9 @@
   abstract member-signature method takeWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::String*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse}) → core::String*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse}) → core::String*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse}) → core::String*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse}) → core::String*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse}) → core::String*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse}) → core::String*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::String*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -156,7 +156,7 @@
   operator [](core::Object* key) → core::String*
     ;
   @core::override
-  operator []=(generic-covariant-impl core::String* key, generic-covariant-impl core::String* value) → void
+  operator []=(covariant-by-class core::String* key, covariant-by-class core::String* value) → void
     ;
   @core::override
   method cast<RK extends core::Object* = dynamic, RV extends core::Object* = dynamic>() → core::Map<self::CustomMap::cast::RK*, self::CustomMap::cast::RV*>*
@@ -189,24 +189,24 @@
   get values() → core::Iterable<core::String*>*
     ;
   @core::override
-  method addAll(generic-covariant-impl core::Map<core::String*, core::String*>* other) → void
+  method addAll(covariant-by-class core::Map<core::String*, core::String*>* other) → void
     ;
   @core::override
-  method addEntries(generic-covariant-impl core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
+  method addEntries(covariant-by-class core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
     ;
   @core::override
   method forEach((core::String*, core::String*) →* void f) → void
     ;
   @core::override
-  method putIfAbsent(generic-covariant-impl core::String* key, generic-covariant-impl () →* core::String* ifAbsent) → core::String*
+  method putIfAbsent(covariant-by-class core::String* key, covariant-by-class () →* core::String* ifAbsent) → core::String*
     ;
   @core::override
-  method updateAll(generic-covariant-impl (core::String*, core::String*) →* core::String* update) → void
+  method updateAll(covariant-by-class (core::String*, core::String*) →* core::String* update) → void
     ;
   @core::override
   method removeWhere((core::String*, core::String*) →* core::bool* predicate) → void
     ;
-  method update(generic-covariant-impl core::String* key, generic-covariant-impl (core::String*) →* core::String* update, {generic-covariant-impl () →* core::String* ifAbsent}) → core::String*
+  method update(covariant-by-class core::String* key, covariant-by-class (core::String*) →* core::String* update, {covariant-by-class () →* core::String* ifAbsent}) → core::String*
     ;
   method map<K2 extends core::Object* = dynamic, V2 extends core::Object* = dynamic>((core::String*, core::String*) →* core::MapEntry<self::CustomMap::map::K2*, self::CustomMap::map::V2*>* f) → core::Map<self::CustomMap::map::K2*, self::CustomMap::map::V2*>*
     ;
@@ -332,22 +332,22 @@
 Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:32:63 -> InstanceConstant(const CustomIterable{})
 Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:33:33 -> ListConstant(const <String*>["Hello"])
 Evaluated: ListLiteral @ org-dartlang-testcase:///const_collections.dart:33:45 -> ListConstant(const <String*>["World"])
-Evaluated: SetLiteral @ org-dartlang-testcase:///const_collections.dart:36:25 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
-Evaluated: SetConcatenation @ org-dartlang-testcase:///const_collections.dart:38:25 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null, "!", null]}})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:40:43 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
+Evaluated: SetLiteral @ org-dartlang-testcase:///const_collections.dart:36:25 -> SetConstant(const <String*>{"hello", "world"})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///const_collections.dart:38:25 -> SetConstant(const <String*>{"hello", "world", "!"})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:40:43 -> SetConstant(const <String*>{"hello", "world"})
 Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:40:51 -> NullConstant(null)
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:41:42 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:44:6 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:41:42 -> SetConstant(const <String*>{"hello", "world"})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:44:6 -> SetConstant(const <String*>{"hello", "world"})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:45:12 -> InstanceConstant(const CustomIterable{})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:47:54 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:47:54 -> SetConstant(const <String*>{"hello", "world"})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:47:62 -> InstanceConstant(const CustomIterable{})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:48:54 -> InstanceConstant(const _UnmodifiableSet<String*>{_UnmodifiableSet._map: const _ImmutableMap<String*, Null>{_ImmutableMap._kvPairs: const <dynamic>["hello", null, "world", null]}})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:48:54 -> SetConstant(const <String*>{"hello", "world"})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:49:55 -> InstanceConstant(const WithEquals{WithEquals.i: 42})
-Evaluated: MapLiteral @ org-dartlang-testcase:///const_collections.dart:53:34 -> InstanceConstant(const _ImmutableMap<String*, String*>{_ImmutableMap._kvPairs: const <dynamic>["hello", "world"]})
-Evaluated: MapConcatenation @ org-dartlang-testcase:///const_collections.dart:55:27 -> InstanceConstant(const _ImmutableMap<String*, String*>{_ImmutableMap._kvPairs: const <dynamic>["hello", "world", "!", "bye!"]})
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:57:52 -> InstanceConstant(const _ImmutableMap<String*, String*>{_ImmutableMap._kvPairs: const <dynamic>["hello", "world"]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///const_collections.dart:53:34 -> MapConstant(const <String*, String*>{"hello": "world"})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///const_collections.dart:55:27 -> MapConstant(const <String*, String*>{"hello": "world", "!": "bye!"})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:57:52 -> MapConstant(const <String*, String*>{"hello": "world"})
 Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:57:61 -> NullConstant(null)
-Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:58:51 -> InstanceConstant(const _ImmutableMap<String*, String*>{_ImmutableMap._kvPairs: const <dynamic>["hello", "world"]})
+Evaluated: StaticGet @ org-dartlang-testcase:///const_collections.dart:58:51 -> MapConstant(const <String*, String*>{"hello": "world"})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:61:57 -> InstanceConstant(const CustomMap{})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:62:51 -> InstanceConstant(const CustomMap{})
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///const_collections.dart:63:45 -> InstanceConstant(const CustomMap{})
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect
index f8c5584..d5c4674 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect
@@ -222,14 +222,14 @@
   get iterator() → core::Iterator<core::int*>*
     return core::_GrowableList::•<core::int*>(0).{core::Iterable::iterator}{core::Iterator<core::int*>*};
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::int*>* other) → core::Iterable<core::int*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::int*) →* self::ConstIterable::map::T* toElement) → core::Iterable<self::ConstIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::ConstIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::int*) →* core::Iterable<self::ConstIterable::expand::T*>* toElements) → core::Iterable<self::ConstIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::int*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::int*, core::int*) →* core::int* combine) → core::int*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::ConstIterable::fold::T* initialValue, (self::ConstIterable::fold::T*, core::int*) →* self::ConstIterable::fold::T* combine) → self::ConstIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::int*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -243,9 +243,9 @@
   abstract member-signature method takeWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::int*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::int*) →* core::bool* test) → core::Iterable<core::int*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {generic-covariant-impl () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::int*) →* core::bool* test, {covariant-by-class () →* core::int* orElse = #C3}) → core::int*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::int*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -283,14 +283,14 @@
   get iterator() → core::Iterator<core::String*>*
     return core::_GrowableList::•<core::String*>(0).{core::Iterable::iterator}{core::Iterator<core::String*>*};
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::String*>* other) → core::Iterable<core::String*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::String*) →* self::CustomIterable::map::T* toElement) → core::Iterable<self::CustomIterable::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::CustomIterable::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::String*) →* core::Iterable<self::CustomIterable::expand::T*>* toElements) → core::Iterable<self::CustomIterable::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::String*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::String*, core::String*) →* core::String* combine) → core::String*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::CustomIterable::fold::T* initialValue, (self::CustomIterable::fold::T*, core::String*) →* self::CustomIterable::fold::T* combine) → self::CustomIterable::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::String*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -304,9 +304,9 @@
   abstract member-signature method takeWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::String*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::String*) →* core::bool* test) → core::Iterable<core::String*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {generic-covariant-impl () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::String*) →* core::bool* test, {covariant-by-class () →* core::String* orElse = #C3}) → core::String*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::String*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -330,7 +330,7 @@
   operator [](core::Object* key) → core::String*
     return throw new core::UnimplementedError::•();
   @#C4
-  operator []=(generic-covariant-impl core::String* key, generic-covariant-impl core::String* value) → void
+  operator []=(covariant-by-class core::String* key, covariant-by-class core::String* value) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method cast<RK extends core::Object* = dynamic, RV extends core::Object* = dynamic>() → core::Map<self::CustomMap::cast::RK*, self::CustomMap::cast::RV*>*
@@ -363,24 +363,24 @@
   get values() → core::Iterable<core::String*>*
     return throw new core::UnimplementedError::•();
   @#C4
-  method addAll(generic-covariant-impl core::Map<core::String*, core::String*>* other) → void
+  method addAll(covariant-by-class core::Map<core::String*, core::String*>* other) → void
     return throw new core::UnimplementedError::•();
   @#C4
-  method addEntries(generic-covariant-impl core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
+  method addEntries(covariant-by-class core::Iterable<core::MapEntry<core::String*, core::String*>*>* newEntries) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method forEach((core::String*, core::String*) →* void f) → void
     return throw new core::UnimplementedError::•();
   @#C4
-  method putIfAbsent(generic-covariant-impl core::String* key, generic-covariant-impl () →* core::String* ifAbsent) → core::String*
+  method putIfAbsent(covariant-by-class core::String* key, covariant-by-class () →* core::String* ifAbsent) → core::String*
     return throw new core::UnimplementedError::•();
   @#C4
-  method updateAll(generic-covariant-impl (core::String*, core::String*) →* core::String* update) → void
+  method updateAll(covariant-by-class (core::String*, core::String*) →* core::String* update) → void
     return throw new core::UnimplementedError::•();
   @#C4
   method removeWhere((core::String*, core::String*) →* core::bool* predicate) → void
     return throw new core::UnimplementedError::•();
-  method update(generic-covariant-impl core::String* key, generic-covariant-impl (core::String*) →* core::String* update, {generic-covariant-impl () →* core::String* ifAbsent = #C3}) → core::String*
+  method update(covariant-by-class core::String* key, covariant-by-class (core::String*) →* core::String* update, {covariant-by-class () →* core::String* ifAbsent = #C3}) → core::String*
     return throw new core::UnimplementedError::•();
   method map<K2 extends core::Object* = dynamic, V2 extends core::Object* = dynamic>((core::String*, core::String*) →* core::MapEntry<self::CustomMap::map::K2*, self::CustomMap::map::V2*>* f) → core::Map<self::CustomMap::map::K2*, self::CustomMap::map::V2*>*
     return throw new core::UnimplementedError::•();
@@ -420,8 +420,8 @@
 static const field core::List<core::String*>* barWithCustomIterableSpread3 = invalid-expression "Only lists and sets can be used in spreads in constant lists and sets.";
 static const field core::List<core::String*>* listConcat = invalid-expression "The method '+' can't be invoked on '<String>[\"Hello\"]' in a constant expression.";
 static const field core::Set<core::String*>* nullSet = #C3;
-static const field core::Set<core::String*>* baz = #C14;
-static const field core::Set<core::String*>* qux = #C17;
+static const field core::Set<core::String*>* baz = #C12;
+static const field core::Set<core::String*>* qux = #C13;
 static const field core::Set<core::String*>* quxWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::Set<core::String*>* quxWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
 const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
@@ -439,8 +439,8 @@
  - 'WithEquals' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.";
 static const field core::Set<dynamic>* setWithDuplicates = invalid-expression "The element '42' conflicts with another existing element in the set.";
 static const field core::Map<core::String*, core::String*>* nullMap = #C3;
-static const field core::Map<core::String*, core::String*>* quux = #C19;
-static const field core::Map<core::String*, core::String*>* quuz = #C22;
+static const field core::Map<core::String*, core::String*>* quux = #C14;
+static const field core::Map<core::String*, core::String*>* quuz = #C16;
 static const field core::Map<core::String*, core::String*>* quuzWithNullSpread = invalid-expression "Null value during constant evaluation.";
 static const field core::Map<core::String*, core::String*>* quuzWithIntSpread = invalid-expression "pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
 const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
@@ -453,7 +453,7 @@
                                              ^";
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap1 = invalid-expression "Only maps can be used in spreads in constant maps.";
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap2 = invalid-expression "Only maps can be used in spreads in constant maps.";
-static const field core::Map<core::String*, core::String*>* customMap = #C23;
+static const field core::Map<core::String*, core::String*>* customMap = #C17;
 static const field core::Map<core::String*, core::String*>* mapWithCustomMap3 = invalid-expression "Only maps can be used in spreads in constant maps.";
 static const field core::Map<dynamic, core::int*>* mapWithNonPrimitiveEqualsKey = invalid-expression "The key 'WithEquals {i: 42}' does not have a primitive operator '=='.
  - 'WithEquals' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.";
@@ -463,22 +463,22 @@
 static get barAsGetter() → core::List<core::String*>*
   return #C10;
 static get bazAsGetter() → core::Set<core::String*>*
-  return #C14;
+  return #C12;
 static get quxAsGetter() → core::Set<core::String*>*
-  return #C17;
+  return #C13;
 static get quuxAsGetter() → core::Map<core::String*, core::String*>*
-  return #C19;
+  return #C14;
 static get quuzAsGetter() → core::Map<core::String*, core::String*>*
-  return #C22;
+  return #C16;
 static method main() → dynamic {
   core::print(#C10);
-  core::print(#C17);
-  core::print(#C22);
+  core::print(#C13);
+  core::print(#C16);
   core::print( block {
     final core::Set<core::String*>* #t2 = new col::_CompactLinkedHashSet::•<core::String*>();
     #t2.{core::Set::add}{Invariant}("hello"){(core::String*) →* core::bool*};
   } =>#t2);
-  core::print(#C26);
+  core::print(#C18);
 }
 
 constants  {
@@ -493,21 +493,13 @@
   #C9 = "!"
   #C10 = <core::String*>[#C6, #C7, #C9]
   #C11 = self::CustomIterable {}
-  #C12 = <dynamic>[#C6, #C3, #C7, #C3]
-  #C13 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C12}
-  #C14 = col::_UnmodifiableSet<core::String*> {_map:#C13}
-  #C15 = <dynamic>[#C6, #C3, #C7, #C3, #C9, #C3]
-  #C16 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C15}
-  #C17 = col::_UnmodifiableSet<core::String*> {_map:#C16}
-  #C18 = <dynamic>[#C6, #C7]
-  #C19 = core::_ImmutableMap<core::String*, core::String*> {_kvPairs:#C18}
-  #C20 = "bye!"
-  #C21 = <dynamic>[#C6, #C7, #C9, #C20]
-  #C22 = core::_ImmutableMap<core::String*, core::String*> {_kvPairs:#C21}
-  #C23 = self::CustomMap {}
-  #C24 = <dynamic>[#C6, #C3]
-  #C25 = core::_ImmutableMap<core::String*, Null> {_kvPairs:#C24}
-  #C26 = col::_UnmodifiableSet<core::String*> {_map:#C25}
+  #C12 = <core::String*>{#C6, #C7}
+  #C13 = <core::String*>{#C6, #C7, #C9}
+  #C14 = <core::String*, core::String*>{#C6:#C7)
+  #C15 = "bye!"
+  #C16 = <core::String*, core::String*>{#C6:#C7, #C9:#C15)
+  #C17 = self::CustomMap {}
+  #C18 = <core::String*>{#C6}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.expect b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.expect
index c76837e..6d5d48a 100644
--- a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.expect
@@ -4,33 +4,27 @@
 
 import "org-dartlang-testcase:///main_lib.dart" as a;
 
-static const field core::Map<core::int*, core::String*>* map = #C4;
-static const field core::Set<core::int*>* set = #C10;
-static const field core::List<core::int*>* list = #C11;
+static const field core::Map<core::int*, core::String*>* map = #C3;
+static const field core::Set<core::int*>* set = #C6;
+static const field core::List<core::int*>* list = #C7;
 static method main() → dynamic {}
 
 library;
 import self as self2;
 import "dart:core" as core;
 
-static const field core::Map<core::int*, core::String*>* map = #C4;
-static const field core::Set<core::int*>* set = #C14;
-static const field core::List<core::int*>* list = #C15;
+static const field core::Map<core::int*, core::String*>* map = #C3;
+static const field core::Set<core::int*>* set = #C8;
+static const field core::List<core::int*>* list = #C9;
 
 constants  {
   #C1 = 1
   #C2 = "a"
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C3}
-  #C5 = 2
-  #C6 = null
-  #C7 = 3
-  #C8 = <dynamic>[#C5, #C6, #C7, #C6]
-  #C9 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C8}
-  #C10 = col::_UnmodifiableSet<core::int*> {_map:#C9}
-  #C11 = <core::int*>[#C7, #C5]
-  #C12 = <dynamic>[#C5, #C6]
-  #C13 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C12}
-  #C14 = col::_UnmodifiableSet<core::int*> {_map:#C13}
-  #C15 = <core::int*>[#C7]
+  #C3 = <core::int*, core::String*>{#C1:#C2)
+  #C4 = 2
+  #C5 = 3
+  #C6 = <core::int*>{#C4, #C5}
+  #C7 = <core::int*>[#C5, #C4]
+  #C8 = <core::int*>{#C4}
+  #C9 = <core::int*>[#C5]
 }
diff --git a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.outline.expect
index 280c0fe..f0edaba 100644
--- a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.outline.expect
@@ -15,26 +15,22 @@
 import self as mai;
 import "dart:core" as core;
 
-static const field core::Map<core::int*, core::String*>* map = #C4;
-static const field core::Set<core::int*>* set = #C9;
-static const field core::List<core::int*>* list = #C11;
+static const field core::Map<core::int*, core::String*>* map = #C3;
+static const field core::Set<core::int*>* set = #C5;
+static const field core::List<core::int*>* list = #C7;
 
 constants  {
   #C1 = 1
   #C2 = "a"
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C3}
-  #C5 = 2
-  #C6 = null
-  #C7 = <dynamic>[#C5, #C6]
-  #C8 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C7}
-  #C9 = col::_UnmodifiableSet<core::int*> {_map:#C8}
-  #C10 = 3
-  #C11 = <core::int*>[#C10]
+  #C3 = <core::int*, core::String*>{#C1:#C2)
+  #C4 = 2
+  #C5 = <core::int*>{#C4}
+  #C6 = 3
+  #C7 = <core::int*>[#C6]
 }
 
 Extra constant evaluation status:
-Evaluated: MapConcatenation @ org-dartlang-testcase:///main.dart:7:7 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[1, "a"]})
-Evaluated: SetConcatenation @ org-dartlang-testcase:///main.dart:11:18 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[2, null, 3, null]}})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///main.dart:7:7 -> MapConstant(const <int*, String*>{1: "a"})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///main.dart:11:18 -> SetConstant(const <int*>{2, 3})
 Evaluated: ListConcatenation @ org-dartlang-testcase:///main.dart:16:19 -> ListConstant(const <int*>[3, 2])
 Extra constant evaluation: evaluated: 3, effectively constant: 3
diff --git a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.transformed.expect
index c76837e..6d5d48a 100644
--- a/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/from_lib/main.dart.weak.transformed.expect
@@ -4,33 +4,27 @@
 
 import "org-dartlang-testcase:///main_lib.dart" as a;
 
-static const field core::Map<core::int*, core::String*>* map = #C4;
-static const field core::Set<core::int*>* set = #C10;
-static const field core::List<core::int*>* list = #C11;
+static const field core::Map<core::int*, core::String*>* map = #C3;
+static const field core::Set<core::int*>* set = #C6;
+static const field core::List<core::int*>* list = #C7;
 static method main() → dynamic {}
 
 library;
 import self as self2;
 import "dart:core" as core;
 
-static const field core::Map<core::int*, core::String*>* map = #C4;
-static const field core::Set<core::int*>* set = #C14;
-static const field core::List<core::int*>* list = #C15;
+static const field core::Map<core::int*, core::String*>* map = #C3;
+static const field core::Set<core::int*>* set = #C8;
+static const field core::List<core::int*>* list = #C9;
 
 constants  {
   #C1 = 1
   #C2 = "a"
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C3}
-  #C5 = 2
-  #C6 = null
-  #C7 = 3
-  #C8 = <dynamic>[#C5, #C6, #C7, #C6]
-  #C9 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C8}
-  #C10 = col::_UnmodifiableSet<core::int*> {_map:#C9}
-  #C11 = <core::int*>[#C7, #C5]
-  #C12 = <dynamic>[#C5, #C6]
-  #C13 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C12}
-  #C14 = col::_UnmodifiableSet<core::int*> {_map:#C13}
-  #C15 = <core::int*>[#C7]
+  #C3 = <core::int*, core::String*>{#C1:#C2)
+  #C4 = 2
+  #C5 = 3
+  #C6 = <core::int*>{#C4, #C5}
+  #C7 = <core::int*>[#C5, #C4]
+  #C8 = <core::int*>{#C4}
+  #C9 = <core::int*>[#C5]
 }
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart
new file mode 100644
index 0000000..9cb3ac2
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart
@@ -0,0 +1,75 @@
+// 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.
+
+// Pre-nnbd language version
+// @dart=2.9
+
+import 'potentially_constant_type_lib1.dart';
+import 'potentially_constant_type_lib2.dart';
+
+T id<T>(T t) => t;
+
+class Class<T> {
+  final field1;
+  final field5;
+  final field6;
+  final field7;
+  final field8;
+  final field9;
+  final field10;
+  final field11;
+  final field15;
+
+  const Class(o)
+      // Potentially constant context:
+      : field1 = T,
+        field5 = <T>[],
+        field6 = <T>{},
+        field7 = <T, T>{},
+        field8 = o is T,
+        field9 = o is Class<T>,
+        field10 = o as T,
+        field11 = o as Class<T>,
+        field15 = <Class<T>>[];
+
+  void method() {
+    const o = null;
+
+    // Required constant context:
+    const local1 = T;
+    const local5 = <T>[];
+    const local6 = <T>{};
+    const local7 = <T, T>{};
+    const local8 = o is T;
+    const local9 = o is Class<T>;
+    const local10 = o as T;
+    const local11 = o as Class<T>;
+    const local15 = <Class<T>>[];
+    const List<T> listOfNever = []; // ok
+
+    print(local1);
+    print(local5);
+    print(local6);
+    print(local7);
+    print(local8);
+    print(local9);
+    print(local10);
+    print(local11);
+    print(local15);
+    print(listOfNever);
+
+    // Inferred constant context:
+    print(const [T]);
+    print(const [<T>[]]);
+    print(const [<T>{}]);
+    print(const [<T, T>{}]);
+    print(const [o is T]);
+    print(const [o is Class<T>]);
+    print(const [o as T]);
+    print(const [o as Class<T>]);
+    print(const [<Class<T>>[]]);
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline.expect
new file mode 100644
index 0000000..94d8409
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline.expect
@@ -0,0 +1,30 @@
+// @dart = 2.9
+import 'potentially_constant_type_lib1.dart';
+import 'potentially_constant_type_lib2.dart';
+
+T id<T>(T t) => t;
+
+class Class<T> {
+  final field1;
+  final field5;
+  final field6;
+  final field7;
+  final field8;
+  final field9;
+  final field10;
+  final field11;
+  final field15;
+  const Class(o)
+      : field1 = T,
+        field5 = <T>[],
+        field6 = <T>{},
+        field7 = <T, T>{},
+        field8 = o is T,
+        field9 = o is Class<T>,
+        field10 = o as T,
+        field11 = o as Class<T>,
+        field15 = <Class<T>>[];
+  void method() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..80bc031
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.textual_outline_modelled.expect
@@ -0,0 +1,30 @@
+// @dart = 2.9
+import 'potentially_constant_type_lib1.dart';
+import 'potentially_constant_type_lib2.dart';
+
+T id<T>(T t) => t;
+
+class Class<T> {
+  const Class(o)
+      : field1 = T,
+        field5 = <T>[],
+        field6 = <T>{},
+        field7 = <T, T>{},
+        field8 = o is T,
+        field9 = o is Class<T>,
+        field10 = o as T,
+        field11 = o as Class<T>,
+        field15 = <Class<T>>[];
+  final field1;
+  final field10;
+  final field11;
+  final field15;
+  final field5;
+  final field6;
+  final field7;
+  final field8;
+  final field9;
+  void method() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.expect
new file mode 100644
index 0000000..e7b3e08
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.expect
@@ -0,0 +1,666 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:26:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:30:23: Error: Type variables can't be used as constants.
+//         field8 = o is T,
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:31:29: Error: Type variables can't be used as constants.
+//         field9 = o is Class<T>,
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:32:24: Error: Type variables can't be used as constants.
+//         field10 = o as T,
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:33:30: Error: Type variables can't be used as constants.
+//         field11 = o as Class<T>,
+//                              ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:40:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:41:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:42:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:43:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:43:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:44:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:45:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:46:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:47:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:48:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:63:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:64:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:65:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:66:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:66:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:67:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:68:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:69:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:70:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:71:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///potentially_constant_type_lib1.dart";
+import "org-dartlang-testcase:///potentially_constant_type_lib2.dart";
+
+class Class<T extends core::Object* = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self::Class<self::Class::T*>*
+    : self::Class::field1 = #C1, self::Class::field5 = #C2, self::Class::field6 = #C3, self::Class::field7 = #C4, self::Class::field8 = o is invalid-type, self::Class::field9 = o is self::Class<invalid-type>*, self::Class::field10 = o as invalid-type, self::Class::field11 = o as self::Class<invalid-type>*, self::Class::field15 = #C5, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C5);
+    core::print(#C9);
+    core::print(#C10);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C16);
+    core::print(#C17);
+    core::print(#C18);
+  }
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static method id<T extends core::Object* = dynamic>(self::id::T* t) → self::id::T*
+  return t;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:23:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:37:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:38:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:39:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:40:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:40:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:41:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:42:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:43:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:44:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:45:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:60:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:61:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:62:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:63:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:63:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:64:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:65:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:66:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:67:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:68:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+import self as self2;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self2::Class<self2::Class::T%>
+    : self2::Class::field1 = #C1, self2::Class::field5 = #C2, self2::Class::field6 = #C3, self2::Class::field7 = #C4, self2::Class::field8 = o is{ForNonNullableByDefault} self2::Class::T%, self2::Class::field9 = o is{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field10 = o as{ForNonNullableByDefault} self2::Class::T%, self2::Class::field11 = o{self2::Class::T%} as{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field15 = #C19, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C19);
+    core::print(#C20);
+    core::print(#C10);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C21);
+    core::print(#C22);
+    core::print(#C23);
+  }
+}
+static method id<T extends core::Object? = dynamic>(self2::id::T% t) → self2::id::T%
+  return t;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[],
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[],
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:51:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:52:26: Error: Type variables can't be used as constants.
+//     const local2 = Class<T>;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:53:23: Error: Type variables can't be used as constants.
+//     const local3 = id<T>;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:54:25: Error: Type variables can't be used as constants.
+//     const local4 = (id)<T>;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:55:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:56:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:57:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:57:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:58:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:59:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:60:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:61:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:62:27: Error: Type variables can't be used as constants.
+//     const local12 = Class<T>.new;
+//                           ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:63:23: Error: Type variables can't be used as constants.
+//     const local13 = F<T, T>.new;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:63:26: Error: Type variables can't be used as constants.
+//     const local13 = F<T, T>.new;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:64:30: Error: Type variables can't be used as constants.
+//     const local14 = id<Class<T>>;
+//                              ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:65:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:66:23: Error: Type variables can't be used as constants.
+//     const local16 = G<T>.new;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:88:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:89:24: Error: Type variables can't be used as constants.
+//     print(const [Class<T>]);
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:90:21: Error: Type variables can't be used as constants.
+//     print(const [id<T>]);
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:91:23: Error: Type variables can't be used as constants.
+//     print(const [(id)<T>]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:92:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:93:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:94:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:94:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:95:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:96:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:97:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:98:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:99:24: Error: Type variables can't be used as constants.
+//     print(const [Class<T>.new]);
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:100:20: Error: Type variables can't be used as constants.
+//     print(const [F<T, T>.new]);
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:100:23: Error: Type variables can't be used as constants.
+//     print(const [F<T, T>.new]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:101:27: Error: Type variables can't be used as constants.
+//     print(const [id<Class<T>>]);
+//                           ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:102:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:103:20: Error: Type variables can't be used as constants.
+//     print(const [G<T>.new]);
+//                    ^
+//
+import self as self3;
+import "dart:core" as core;
+
+typedef F<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self3::Class<X%>;
+typedef G<unrelated X extends core::Object? = dynamic> = self3::Class<core::int>;
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field2;
+  final field dynamic field3;
+  final field dynamic field4;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field12;
+  final field dynamic field13;
+  final field dynamic field14;
+  final field dynamic field15;
+  final field dynamic field16;
+  const constructor •(dynamic o) → self3::Class<self3::Class::T%>
+    : self3::Class::field1 = self3::Class::T%, self3::Class::field2 = self3::Class<self3::Class::T%>, self3::Class::field3 = #C24<self3::Class::T%>, self3::Class::field4 = #C24<self3::Class::T%>, self3::Class::field5 = #C2, self3::Class::field6 = #C3, self3::Class::field7 = #C4, self3::Class::field8 = o is{ForNonNullableByDefault} self3::Class::T%, self3::Class::field9 = o is{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field10 = o as{ForNonNullableByDefault} self3::Class::T%, self3::Class::field11 = o{self3::Class::T%} as{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field12 = #C25<self3::Class::T%>, self3::Class::field13 = #C25<self3::Class::T%>, self3::Class::field14 = #C24<self3::Class<self3::Class::T%>>, self3::Class::field15 = #C26, self3::Class::field16 = #C27, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C28);
+    core::print(#C29);
+    core::print(#C29);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C30);
+    core::print(#C30);
+    core::print(#C31);
+    core::print(#C26);
+    core::print(#C27);
+    core::print(#C20);
+    core::print(#C10);
+    core::print(#C32);
+    core::print(#C33);
+    core::print(#C33);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C21);
+    core::print(#C34);
+    core::print(#C35);
+    core::print(#C35);
+    core::print(#C36);
+    core::print(#C37);
+    core::print(#C38);
+  }
+}
+static method id<T extends core::Object? = dynamic>(self3::id::T% t) → self3::id::T%
+  return t;
+static method main() → dynamic {}
+static method _#F#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>(dynamic o) → self3::Class<self3::_#F#new#tearOff::X%>
+  return new self3::Class::•<self3::_#F#new#tearOff::X%>(o);
+static method _#G#new#tearOff<unrelated X extends core::Object? = dynamic>(dynamic o) → self3::Class<core::int>
+  return new self3::Class::•<core::int>(o);
+
+constants  {
+  #C1 = TypeLiteralConstant(invalid-type)
+  #C2 = <invalid-type>[]
+  #C3 = <invalid-type>{}
+  #C4 = <invalid-type, invalid-type>{)
+  #C5 = <self::Class<invalid-type>*>[]
+  #C6 = true
+  #C7 = false
+  #C8 = null
+  #C9 = <Null>[]
+  #C10 = <core::Type*>[#C1]
+  #C11 = <core::List<invalid-type>*>[#C2]
+  #C12 = <core::Set<invalid-type>*>[#C3]
+  #C13 = <core::Map<invalid-type, invalid-type>*>[#C4]
+  #C14 = <core::bool*>[#C6]
+  #C15 = <core::bool*>[#C7]
+  #C16 = <invalid-type>[#C8]
+  #C17 = <self::Class<invalid-type>*>[#C8]
+  #C18 = <core::List<self::Class<invalid-type>*>*>[#C5]
+  #C19 = <self2::Class<invalid-type>*>[]
+  #C20 = <Never*>[]
+  #C21 = <dynamic>[#C8]
+  #C22 = <self2::Class<invalid-type>*>[#C8]
+  #C23 = <core::List<self2::Class<invalid-type>*>*>[#C19]
+  #C24 = static-tearoff self3::id
+  #C25 = constructor-tearoff self3::Class::•
+  #C26 = <self3::Class<invalid-type>*>[]
+  #C27 = instantiation self3::Class::• <core::int*>
+  #C28 = TypeLiteralConstant(self3::Class<invalid-type>*)
+  #C29 = instantiation self3::id <invalid-type>
+  #C30 = instantiation self3::Class::• <invalid-type>
+  #C31 = instantiation self3::id <self3::Class<invalid-type>*>
+  #C32 = <core::Type*>[#C28]
+  #C33 = <(invalid-type) →* invalid-type>[#C29]
+  #C34 = <self3::Class<invalid-type>*>[#C8]
+  #C35 = <(dynamic) →* self3::Class<invalid-type>*>[#C30]
+  #C36 = <(self3::Class<invalid-type>*) →* self3::Class<invalid-type>*>[#C31]
+  #C37 = <core::List<self3::Class<invalid-type>*>*>[#C26]
+  #C38 = <(dynamic) →* self3::Class<core::int*>*>[#C27]
+}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.outline.expect
new file mode 100644
index 0000000..559f6ba
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.outline.expect
@@ -0,0 +1,274 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:26:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:30:23: Error: Type variables can't be used as constants.
+//         field8 = o is T,
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:31:29: Error: Type variables can't be used as constants.
+//         field9 = o is Class<T>,
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:32:24: Error: Type variables can't be used as constants.
+//         field10 = o as T,
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:33:30: Error: Type variables can't be used as constants.
+//         field11 = o as Class<T>,
+//                              ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+import "org-dartlang-testcase:///potentially_constant_type_lib1.dart";
+import "org-dartlang-testcase:///potentially_constant_type_lib2.dart";
+
+class Class<T extends core::Object* = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self::Class<self::Class::T*>*
+    : self::Class::field1 = invalid-type, self::Class::field5 = <invalid-type>[], self::Class::field6 = block {
+      final core::Set<invalid-type>* #t1 = col::LinkedHashSet::•<invalid-type>();
+    } =>#t1, self::Class::field7 = <invalid-type, invalid-type>{}, self::Class::field8 = o is invalid-type, self::Class::field9 = o is self::Class<invalid-type>*, self::Class::field10 = o as invalid-type, self::Class::field11 = o as self::Class<invalid-type>*, self::Class::field15 = <self::Class<invalid-type>*>[], super core::Object::•()
+    ;
+  method method() → void
+    ;
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static method id<T extends core::Object* = dynamic>(self::id::T* t) → self::id::T*
+  ;
+static method main() → dynamic
+  ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:23:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+import self as self2;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self2::Class<self2::Class::T%>
+    : self2::Class::field1 = invalid-type, self2::Class::field5 = <invalid-type>[], self2::Class::field6 = block {
+      final core::Set<invalid-type> #t2 = col::LinkedHashSet::•<invalid-type>();
+    } =>#t2, self2::Class::field7 = <invalid-type, invalid-type>{}, self2::Class::field8 = o is{ForNonNullableByDefault} self2::Class::T%, self2::Class::field9 = o is{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field10 = o as{ForNonNullableByDefault} self2::Class::T%, self2::Class::field11 = o{self2::Class::T%} as{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field15 = <self2::Class<invalid-type>>[], super core::Object::•()
+    ;
+  method method() → void
+    ;
+}
+static method id<T extends core::Object? = dynamic>(self2::id::T% t) → self2::id::T%
+  ;
+static method main() → dynamic
+  ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[],
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[],
+//                          ^
+//
+import self as self3;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+typedef F<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self3::Class<X%>;
+typedef G<unrelated X extends core::Object? = dynamic> = self3::Class<core::int>;
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field2;
+  final field dynamic field3;
+  final field dynamic field4;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field12;
+  final field dynamic field13;
+  final field dynamic field14;
+  final field dynamic field15;
+  final field dynamic field16;
+  const constructor •(dynamic o) → self3::Class<self3::Class::T%>
+    : self3::Class::field1 = self3::Class::T%, self3::Class::field2 = self3::Class<self3::Class::T%>, self3::Class::field3 = self3::id<self3::Class::T%>, self3::Class::field4 = self3::id<self3::Class::T%>, self3::Class::field5 = <invalid-type>[], self3::Class::field6 = block {
+      final core::Set<invalid-type> #t3 = col::LinkedHashSet::•<invalid-type>();
+    } =>#t3, self3::Class::field7 = <invalid-type, invalid-type>{}, self3::Class::field8 = o is{ForNonNullableByDefault} self3::Class::T%, self3::Class::field9 = o is{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field10 = o as{ForNonNullableByDefault} self3::Class::T%, self3::Class::field11 = o{self3::Class::T%} as{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field12 = self3::Class::•<self3::Class::T%>, self3::Class::field13 = self3::Class::•<self3::Class::T%>, self3::Class::field14 = self3::id<self3::Class<self3::Class::T%>>, self3::Class::field15 = <self3::Class<invalid-type>>[], self3::Class::field16 = self3::Class::•<core::int>, super core::Object::•()
+    ;
+  method method() → void
+    ;
+}
+static method id<T extends core::Object? = dynamic>(self3::id::T% t) → self3::id::T%
+  ;
+static method main() → dynamic
+  ;
+static method _#F#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>(dynamic o) → self3::Class<self3::_#F#new#tearOff::X%>
+  return new self3::Class::•<self3::_#F#new#tearOff::X%>(o);
+static method _#G#new#tearOff<unrelated X extends core::Object? = dynamic>(dynamic o) → self3::Class<core::int>
+  return new self3::Class::•<core::int>(o);
+
+
+Extra constant evaluation status:
+Evaluated: TypeLiteral @ org-dartlang-testcase:///potentially_constant_type.dart:26:18 -> TypeLiteralConstant(<invalid>)
+Evaluated: TypeLiteral @ org-dartlang-testcase:///potentially_constant_type_lib1.dart:23:18 -> TypeLiteralConstant(<invalid>)
+Evaluated: StaticTearOff @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:32:18 -> StaticTearOffConstant(id)
+Evaluated: StaticTearOff @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:33:19 -> StaticTearOffConstant(id)
+Evaluated: ConstructorTearOff @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:41:19 -> ConstructorTearOffConstant(Class.)
+Evaluated: ConstructorTearOff @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:42:19 -> ConstructorTearOffConstant(Class.)
+Evaluated: StaticTearOff @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:43:19 -> StaticTearOffConstant(id)
+Evaluated: Instantiation @ org-dartlang-testcase:///potentially_constant_type_lib2.dart:45:19 -> InstantiationConstant(Class.<int*>)
+Extra constant evaluation: evaluated: 61, effectively constant: 8
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect
new file mode 100644
index 0000000..e7b3e08
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect
@@ -0,0 +1,666 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:26:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:27:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:28:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:29:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:30:23: Error: Type variables can't be used as constants.
+//         field8 = o is T,
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:31:29: Error: Type variables can't be used as constants.
+//         field9 = o is Class<T>,
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:32:24: Error: Type variables can't be used as constants.
+//         field10 = o as T,
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:33:30: Error: Type variables can't be used as constants.
+//         field11 = o as Class<T>,
+//                              ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:34:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:40:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:41:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:42:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:43:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:43:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:44:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:45:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:46:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:47:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:48:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:63:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:64:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:65:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:66:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:66:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:67:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:68:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:69:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:70:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type.dart:71:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///potentially_constant_type_lib1.dart";
+import "org-dartlang-testcase:///potentially_constant_type_lib2.dart";
+
+class Class<T extends core::Object* = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self::Class<self::Class::T*>*
+    : self::Class::field1 = #C1, self::Class::field5 = #C2, self::Class::field6 = #C3, self::Class::field7 = #C4, self::Class::field8 = o is invalid-type, self::Class::field9 = o is self::Class<invalid-type>*, self::Class::field10 = o as invalid-type, self::Class::field11 = o as self::Class<invalid-type>*, self::Class::field15 = #C5, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C5);
+    core::print(#C9);
+    core::print(#C10);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C16);
+    core::print(#C17);
+    core::print(#C18);
+  }
+  abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
+  abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
+  abstract member-signature method toString() → core::String*; -> core::Object::toString
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
+  abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
+}
+static method id<T extends core::Object* = dynamic>(self::id::T* t) → self::id::T*
+  return t;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:23:18: Error: Type variables can't be used as constants.
+//       : field1 = T,
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:24:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:25:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:26:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[];
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:31:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[];
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:37:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:38:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:39:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:40:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:40:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:41:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:42:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:43:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:44:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:45:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:60:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:61:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:62:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:63:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:63:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:64:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:65:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:66:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:67:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart:68:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+import self as self2;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field15;
+  const constructor •(dynamic o) → self2::Class<self2::Class::T%>
+    : self2::Class::field1 = #C1, self2::Class::field5 = #C2, self2::Class::field6 = #C3, self2::Class::field7 = #C4, self2::Class::field8 = o is{ForNonNullableByDefault} self2::Class::T%, self2::Class::field9 = o is{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field10 = o as{ForNonNullableByDefault} self2::Class::T%, self2::Class::field11 = o{self2::Class::T%} as{ForNonNullableByDefault} self2::Class<self2::Class::T%>, self2::Class::field15 = #C19, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C19);
+    core::print(#C20);
+    core::print(#C10);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C21);
+    core::print(#C22);
+    core::print(#C23);
+  }
+}
+static method id<T extends core::Object? = dynamic>(self2::id::T% t) → self2::id::T%
+  return t;
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field5 = <T>[],
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:34:19: Error: Type variables can't be used as constants.
+//         field5 = <T>[],
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:21: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field6 = <T>{},
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:35:19: Error: Type variables can't be used as constants.
+//         field6 = <T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:24: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field7 = <T, T>{},
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:19: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:36:22: Error: Type variables can't be used as constants.
+//         field7 = <T, T>{},
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:29: Error: Constant expression expected.
+// Try inserting 'const'.
+//         field15 = <Class<T>>[],
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:44:26: Error: Type variables can't be used as constants.
+//         field15 = <Class<T>>[],
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:51:20: Error: Type variables can't be used as constants.
+//     const local1 = T;
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:52:26: Error: Type variables can't be used as constants.
+//     const local2 = Class<T>;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:53:23: Error: Type variables can't be used as constants.
+//     const local3 = id<T>;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:54:25: Error: Type variables can't be used as constants.
+//     const local4 = (id)<T>;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:55:21: Error: Type variables can't be used as constants.
+//     const local5 = <T>[];
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:56:21: Error: Type variables can't be used as constants.
+//     const local6 = <T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:57:21: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:57:24: Error: Type variables can't be used as constants.
+//     const local7 = <T, T>{};
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:58:25: Error: Type variables can't be used as constants.
+//     const local8 = o is T;
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:59:31: Error: Type variables can't be used as constants.
+//     const local9 = o is Class<T>;
+//                               ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:60:26: Error: Type variables can't be used as constants.
+//     const local10 = o as T;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:61:32: Error: Type variables can't be used as constants.
+//     const local11 = o as Class<T>;
+//                                ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:62:27: Error: Type variables can't be used as constants.
+//     const local12 = Class<T>.new;
+//                           ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:63:23: Error: Type variables can't be used as constants.
+//     const local13 = F<T, T>.new;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:63:26: Error: Type variables can't be used as constants.
+//     const local13 = F<T, T>.new;
+//                          ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:64:30: Error: Type variables can't be used as constants.
+//     const local14 = id<Class<T>>;
+//                              ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:65:28: Error: Type variables can't be used as constants.
+//     const local15 = <Class<T>>[];
+//                            ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:66:23: Error: Type variables can't be used as constants.
+//     const local16 = G<T>.new;
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:88:18: Error: Type variables can't be used as constants.
+//     print(const [T]);
+//                  ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:89:24: Error: Type variables can't be used as constants.
+//     print(const [Class<T>]);
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:90:21: Error: Type variables can't be used as constants.
+//     print(const [id<T>]);
+//                     ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:91:23: Error: Type variables can't be used as constants.
+//     print(const [(id)<T>]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:92:19: Error: Type variables can't be used as constants.
+//     print(const [<T>[]]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:93:19: Error: Type variables can't be used as constants.
+//     print(const [<T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:94:19: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                   ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:94:22: Error: Type variables can't be used as constants.
+//     print(const [<T, T>{}]);
+//                      ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:95:23: Error: Type variables can't be used as constants.
+//     print(const [o is T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:96:29: Error: Type variables can't be used as constants.
+//     print(const [o is Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:97:23: Error: Type variables can't be used as constants.
+//     print(const [o as T]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:98:29: Error: Type variables can't be used as constants.
+//     print(const [o as Class<T>]);
+//                             ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:99:24: Error: Type variables can't be used as constants.
+//     print(const [Class<T>.new]);
+//                        ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:100:20: Error: Type variables can't be used as constants.
+//     print(const [F<T, T>.new]);
+//                    ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:100:23: Error: Type variables can't be used as constants.
+//     print(const [F<T, T>.new]);
+//                       ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:101:27: Error: Type variables can't be used as constants.
+//     print(const [id<Class<T>>]);
+//                           ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:102:25: Error: Type variables can't be used as constants.
+//     print(const [<Class<T>>[]]);
+//                         ^
+//
+// pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart:103:20: Error: Type variables can't be used as constants.
+//     print(const [G<T>.new]);
+//                    ^
+//
+import self as self3;
+import "dart:core" as core;
+
+typedef F<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self3::Class<X%>;
+typedef G<unrelated X extends core::Object? = dynamic> = self3::Class<core::int>;
+class Class<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field dynamic field1;
+  final field dynamic field2;
+  final field dynamic field3;
+  final field dynamic field4;
+  final field dynamic field5;
+  final field dynamic field6;
+  final field dynamic field7;
+  final field dynamic field8;
+  final field dynamic field9;
+  final field dynamic field10;
+  final field dynamic field11;
+  final field dynamic field12;
+  final field dynamic field13;
+  final field dynamic field14;
+  final field dynamic field15;
+  final field dynamic field16;
+  const constructor •(dynamic o) → self3::Class<self3::Class::T%>
+    : self3::Class::field1 = self3::Class::T%, self3::Class::field2 = self3::Class<self3::Class::T%>, self3::Class::field3 = #C24<self3::Class::T%>, self3::Class::field4 = #C24<self3::Class::T%>, self3::Class::field5 = #C2, self3::Class::field6 = #C3, self3::Class::field7 = #C4, self3::Class::field8 = o is{ForNonNullableByDefault} self3::Class::T%, self3::Class::field9 = o is{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field10 = o as{ForNonNullableByDefault} self3::Class::T%, self3::Class::field11 = o{self3::Class::T%} as{ForNonNullableByDefault} self3::Class<self3::Class::T%>, self3::Class::field12 = #C25<self3::Class::T%>, self3::Class::field13 = #C25<self3::Class::T%>, self3::Class::field14 = #C24<self3::Class<self3::Class::T%>>, self3::Class::field15 = #C26, self3::Class::field16 = #C27, super core::Object::•()
+    ;
+  method method() → void {
+    core::print(#C1);
+    core::print(#C28);
+    core::print(#C29);
+    core::print(#C29);
+    core::print(#C2);
+    core::print(#C3);
+    core::print(#C4);
+    core::print(#C6);
+    core::print(#C7);
+    core::print(#C8);
+    core::print(#C8);
+    core::print(#C30);
+    core::print(#C30);
+    core::print(#C31);
+    core::print(#C26);
+    core::print(#C27);
+    core::print(#C20);
+    core::print(#C10);
+    core::print(#C32);
+    core::print(#C33);
+    core::print(#C33);
+    core::print(#C11);
+    core::print(#C12);
+    core::print(#C13);
+    core::print(#C14);
+    core::print(#C15);
+    core::print(#C21);
+    core::print(#C34);
+    core::print(#C35);
+    core::print(#C35);
+    core::print(#C36);
+    core::print(#C37);
+    core::print(#C38);
+  }
+}
+static method id<T extends core::Object? = dynamic>(self3::id::T% t) → self3::id::T%
+  return t;
+static method main() → dynamic {}
+static method _#F#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>(dynamic o) → self3::Class<self3::_#F#new#tearOff::X%>
+  return new self3::Class::•<self3::_#F#new#tearOff::X%>(o);
+static method _#G#new#tearOff<unrelated X extends core::Object? = dynamic>(dynamic o) → self3::Class<core::int>
+  return new self3::Class::•<core::int>(o);
+
+constants  {
+  #C1 = TypeLiteralConstant(invalid-type)
+  #C2 = <invalid-type>[]
+  #C3 = <invalid-type>{}
+  #C4 = <invalid-type, invalid-type>{)
+  #C5 = <self::Class<invalid-type>*>[]
+  #C6 = true
+  #C7 = false
+  #C8 = null
+  #C9 = <Null>[]
+  #C10 = <core::Type*>[#C1]
+  #C11 = <core::List<invalid-type>*>[#C2]
+  #C12 = <core::Set<invalid-type>*>[#C3]
+  #C13 = <core::Map<invalid-type, invalid-type>*>[#C4]
+  #C14 = <core::bool*>[#C6]
+  #C15 = <core::bool*>[#C7]
+  #C16 = <invalid-type>[#C8]
+  #C17 = <self::Class<invalid-type>*>[#C8]
+  #C18 = <core::List<self::Class<invalid-type>*>*>[#C5]
+  #C19 = <self2::Class<invalid-type>*>[]
+  #C20 = <Never*>[]
+  #C21 = <dynamic>[#C8]
+  #C22 = <self2::Class<invalid-type>*>[#C8]
+  #C23 = <core::List<self2::Class<invalid-type>*>*>[#C19]
+  #C24 = static-tearoff self3::id
+  #C25 = constructor-tearoff self3::Class::•
+  #C26 = <self3::Class<invalid-type>*>[]
+  #C27 = instantiation self3::Class::• <core::int*>
+  #C28 = TypeLiteralConstant(self3::Class<invalid-type>*)
+  #C29 = instantiation self3::id <invalid-type>
+  #C30 = instantiation self3::Class::• <invalid-type>
+  #C31 = instantiation self3::id <self3::Class<invalid-type>*>
+  #C32 = <core::Type*>[#C28]
+  #C33 = <(invalid-type) →* invalid-type>[#C29]
+  #C34 = <self3::Class<invalid-type>*>[#C8]
+  #C35 = <(dynamic) →* self3::Class<invalid-type>*>[#C30]
+  #C36 = <(self3::Class<invalid-type>*) →* self3::Class<invalid-type>*>[#C31]
+  #C37 = <core::List<self3::Class<invalid-type>*>*>[#C26]
+  #C38 = <(dynamic) →* self3::Class<core::int*>*>[#C27]
+}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart b/pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart
new file mode 100644
index 0000000..f85279e
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type_lib1.dart
@@ -0,0 +1,72 @@
+// 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.
+
+// Pre nonfunction-type-alias language version:
+// @dart=2.12
+
+T id<T>(T t) => t;
+
+class Class<T> {
+  final field1;
+  final field5;
+  final field6;
+  final field7;
+  final field8;
+  final field9;
+  final field10;
+  final field11;
+  final field15;
+
+  const Class(o)
+      // Potentially constant context:
+      : field1 = T,
+        field5 = <T>[],
+        field6 = <T>{},
+        field7 = <T, T>{},
+        field8 = o is T,
+        field9 = o is Class<T>,
+        field10 = o as T,
+        field11 = o as Class<T>,
+        field15 = <Class<T>>[];
+
+  void method() {
+    const o = null;
+
+    // Required constant context:
+    const local1 = T;
+    const local5 = <T>[];
+    const local6 = <T>{};
+    const local7 = <T, T>{};
+    const local8 = o is T;
+    const local9 = o is Class<T>;
+    const local10 = o as T;
+    const local11 = o as Class<T>;
+    const local15 = <Class<T>>[];
+    const List<T> listOfNever = []; // ok
+
+    print(local1);
+    print(local5);
+    print(local6);
+    print(local7);
+    print(local8);
+    print(local9);
+    print(local10);
+    print(local11);
+    print(local15);
+    print(listOfNever);
+
+    // Inferred constant context:
+    print(const [T]);
+    print(const [<T>[]]);
+    print(const [<T>{}]);
+    print(const [<T, T>{}]);
+    print(const [o is T]);
+    print(const [o is Class<T>]);
+    print(const [o as T]);
+    print(const [o as Class<T>]);
+    print(const [<Class<T>>[]]);
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart b/pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart
new file mode 100644
index 0000000..4b31d55
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/potentially_constant_type_lib2.dart
@@ -0,0 +1,107 @@
+// 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.
+
+T id<T>(T t) => t;
+
+typedef F<X, Y> = Class<X>;
+typedef G<X> = Class<int>;
+
+class Class<T> {
+  final field1;
+  final field2;
+  final field3;
+  final field4;
+  final field5;
+  final field6;
+  final field7;
+  final field8;
+  final field9;
+  final field10;
+  final field11;
+  final field12;
+  final field13;
+  final field14;
+  final field15;
+  final field16;
+
+  const Class(o)
+      // Potentially constant context:
+      : field1 = T,
+        field2 = Class<T>,
+        field3 = id<T>,
+        field4 = (id)<T>,
+        field5 = <T>[],
+        field6 = <T>{},
+        field7 = <T, T>{},
+        field8 = o is T,
+        field9 = o is Class<T>,
+        field10 = o as T,
+        field11 = o as Class<T>,
+        field12 = Class<T>.new,
+        field13 = F<T, T>.new,
+        field14 = id<Class<T>>,
+        field15 = <Class<T>>[],
+        field16 = G<T>.new;
+
+  void method() {
+    const o = null;
+
+    // Required constant context:
+    const local1 = T;
+    const local2 = Class<T>;
+    const local3 = id<T>;
+    const local4 = (id)<T>;
+    const local5 = <T>[];
+    const local6 = <T>{};
+    const local7 = <T, T>{};
+    const local8 = o is T;
+    const local9 = o is Class<T>;
+    const local10 = o as T;
+    const local11 = o as Class<T>;
+    const local12 = Class<T>.new;
+    const local13 = F<T, T>.new;
+    const local14 = id<Class<T>>;
+    const local15 = <Class<T>>[];
+    const local16 = G<T>.new;
+    const List<T> listOfNever = []; // ok
+
+    print(local1);
+    print(local2);
+    print(local3);
+    print(local4);
+    print(local5);
+    print(local6);
+    print(local7);
+    print(local8);
+    print(local9);
+    print(local10);
+    print(local11);
+    print(local12);
+    print(local13);
+    print(local14);
+    print(local15);
+    print(local16);
+    print(listOfNever);
+
+    // Inferred constant context:
+    print(const [T]);
+    print(const [Class<T>]);
+    print(const [id<T>]);
+    print(const [(id)<T>]);
+    print(const [<T>[]]);
+    print(const [<T>{}]);
+    print(const [<T, T>{}]);
+    print(const [o is T]);
+    print(const [o is Class<T>]);
+    print(const [o as T]);
+    print(const [o as Class<T>]);
+    print(const [Class<T>.new]);
+    print(const [F<T, T>.new]);
+    print(const [id<Class<T>>]);
+    print(const [<Class<T>>[]]);
+    print(const [G<T>.new]);
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
index 1569bc7..9f6cb29 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
@@ -72,7 +72,7 @@
 class Foo extends core::Object /*hasConstConstructor*/  {
   final field core::int x;
   const constructor •(core::int x) → self::Foo
-    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert((#C2) =={core::Object::==}{(core::Object) → core::bool} false, "foo was ${#C3}"), assert((#C4) =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•()
+    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(#C2 =={core::Object::==}{(core::Object) → core::bool} false, "foo was ${#C3}"), assert(#C4 =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•()
     ;
   const constructor withMessage(core::int x) → self::Foo
     : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "btw foo was ${#C5}"), super core::Object::•()
@@ -119,7 +119,7 @@
   #C6 = 1
   #C7 = false
   #C8 = "foo was "
-  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7), "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7))}
+  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
   #C10 = 42
   #C11 = "btw foo was "
   #C12 = eval self::Foo{x:#C10, assert(#C7, "${#C11}${const core::bool::fromEnvironment(#C1)}")}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
index a5d5b58..0bcf7671 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
@@ -72,7 +72,7 @@
 class Foo extends core::Object /*hasConstConstructor*/  {
   final field core::int x;
   const constructor •(core::int x) → self::Foo
-    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert((#C2) =={core::Object::==}{(core::Object) → core::bool} false, "foo was ${#C3}"), assert((#C4) =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•()
+    : self::Foo::x = x, assert(x.{core::num::>}(0){(core::num) → core::bool}, "x is not positive"), assert(x.{core::num::>}(0){(core::num) → core::bool}), assert(#C2 =={core::Object::==}{(core::Object) → core::bool} false, "foo was ${#C3}"), assert(#C4 =={core::Object::==}{(core::Object) → core::bool} false), super core::Object::•()
     ;
   const constructor withMessage(core::int x) → self::Foo
     : self::Foo::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}, "btw foo was ${#C5}"), super core::Object::•()
@@ -119,11 +119,11 @@
   #C6 = 1
   #C7 = false
   #C8 = "foo was "
-  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7), "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7))}
+  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
   #C10 = 42
   #C11 = "btw foo was "
   #C12 = eval self::Foo{x:#C10, assert(#C7, "${#C11}${const core::bool::fromEnvironment(#C1)}")}
-  #C13 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7), "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} (#C7))}
+  #C13 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
 }
 
 Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
index dffcd85..d340989 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
@@ -181,8 +181,8 @@
   core::print(#C38);
   core::print(#C39);
   core::print(#C20);
-  core::print((#C20).{self::Foo::saved}{core::bool});
-  core::print((#C20).{self::Foo::value}{core::int});
+  core::print(#C20.{self::Foo::saved}{core::bool});
+  core::print(#C20.{self::Foo::value}{core::int});
 }
 
 library /*isNonNullableByDefault*/;
@@ -207,9 +207,9 @@
   #C13 = false
   #C14 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) ?{core::bool} #C8 : #C13
   #C15 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) == null ?{core::bool} #C8 : const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && (#C8)
-  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || (#C8)
-  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || (#C13)
+  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && #C8
+  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C8
+  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C13
   #C19 = 42
   #C20 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
   #C21 = eval const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
index e35282c..78c9eb6 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
@@ -181,8 +181,8 @@
   core::print(#C51);
   core::print(#C52);
   core::print(#C53);
-  core::print((#C53).{self::Foo::saved}{core::bool});
-  core::print((#C53).{self::Foo::value}{core::int});
+  core::print(#C53.{self::Foo::saved}{core::bool});
+  core::print(#C53.{self::Foo::value}{core::int});
 }
 
 library /*isNonNullableByDefault*/;
@@ -207,9 +207,9 @@
   #C13 = false
   #C14 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) ?{core::bool} #C8 : #C13
   #C15 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) == null ?{core::bool} #C8 : const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && (#C8)
-  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || (#C8)
-  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || (#C13)
+  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && #C8
+  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C8
+  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C13
   #C19 = 42
   #C20 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
   #C21 = eval const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8
diff --git a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.expect b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.expect
index 8f994fa..2c1402b 100644
--- a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_Y<self::A::T*>* x;
+  covariant-by-class field self::_Y<self::A::T*>* x;
   constructor •(self::_Y<self::A::T*>* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.outline.expect b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.outline.expect
index 8059549..f0f7deb 100644
--- a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_Y<self::A::T*>* x;
+  covariant-by-class field self::_Y<self::A::T*>* x;
   constructor •(self::_Y<self::A::T*>* x) → self::A<self::A::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.transformed.expect
index 8f994fa..2c1402b 100644
--- a/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constructor_const_inference.dart.weak.transformed.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_Y<self::A::T*>* x;
+  covariant-by-class field self::_Y<self::A::T*>* x;
   constructor •(self::_Y<self::A::T*>* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/covariant_equals.dart.weak.expect b/pkg/front_end/testcases/general/covariant_equals.dart.weak.expect
index 2e6ac11..3f1296f 100644
--- a/pkg/front_end/testcases/general/covariant_equals.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_equals.dart.weak.expect
@@ -126,7 +126,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -142,14 +142,14 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/covariant_equals.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_equals.dart.weak.outline.expect
index 87e562f..a4cf466 100644
--- a/pkg/front_end/testcases/general/covariant_equals.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_equals.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A extends core::Object {
   synthetic constructor •() → self::A*
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -20,13 +20,13 @@
 class B extends self::A {
   synthetic constructor •() → self::B*
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     ;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/covariant_equals.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_equals.dart.weak.transformed.expect
index 2e6ac11..3f1296f 100644
--- a/pkg/front_end/testcases/general/covariant_equals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_equals.dart.weak.transformed.expect
@@ -126,7 +126,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -142,14 +142,14 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/covariant_field.dart.weak.expect b/pkg/front_end/testcases/general/covariant_field.dart.weak.expect
index 829f7cb..6453946 100644
--- a/pkg/front_end/testcases/general/covariant_field.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_field.dart.weak.expect
@@ -15,7 +15,7 @@
 
 class A extends core::Object {
   field core::num* invariantField = null;
-  covariant field core::num* covariantField = null;
+  covariant-by-declaration field core::num* covariantField = null;
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
@@ -37,7 +37,7 @@
   abstract get invariantField() → core::num*;
   abstract set invariantField(core::num* value) → void;
   abstract get covariantField() → core::num*;
-  abstract set covariantField(covariant core::num* value) → void;
+  abstract set covariantField(covariant-by-declaration core::num* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -56,7 +56,7 @@
   abstract get invariantField() → core::int*;
   set invariantField(core::int* value) → void {}
   abstract get covariantField() → core::int*;
-  set covariantField(covariant core::int* value) → void {}
+  set covariantField(covariant-by-declaration core::int* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -73,9 +73,9 @@
     : super core::Object::•()
     ;
   abstract get invariantField() → core::int*;
-  set invariantField(covariant core::int* value) → void {}
+  set invariantField(covariant-by-declaration core::int* value) → void {}
   abstract get covariantField() → core::int*;
-  set covariantField(covariant core::int* value) → void {}
+  set covariantField(covariant-by-declaration core::int* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/covariant_field.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_field.dart.weak.outline.expect
index eb9f223..734e3a9 100644
--- a/pkg/front_end/testcases/general/covariant_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_field.dart.weak.outline.expect
@@ -15,7 +15,7 @@
 
 class A extends core::Object {
   field core::num* invariantField;
-  covariant field core::num* covariantField;
+  covariant-by-declaration field core::num* covariantField;
   synthetic constructor •() → self::A*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -35,7 +35,7 @@
   abstract get invariantField() → core::num*;
   abstract set invariantField(core::num* value) → void;
   abstract get covariantField() → core::num*;
-  abstract set covariantField(covariant core::num* value) → void;
+  abstract set covariantField(covariant-by-declaration core::num* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -54,7 +54,7 @@
   set invariantField(core::int* value) → void
     ;
   abstract get covariantField() → core::int*;
-  set covariantField(covariant core::int* value) → void
+  set covariantField(covariant-by-declaration core::int* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -71,10 +71,10 @@
   synthetic constructor •() → self::D*
     ;
   abstract get invariantField() → core::int*;
-  set invariantField(covariant core::int* value) → void
+  set invariantField(covariant-by-declaration core::int* value) → void
     ;
   abstract get covariantField() → core::int*;
-  set covariantField(covariant core::int* value) → void
+  set covariantField(covariant-by-declaration core::int* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.expect b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.expect
index 22e490c..fb69f60 100644
--- a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object {
-  covariant field core::num* field = null;
+  covariant-by-declaration field core::num* field = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C extends self::A implements self::B {
-  covariant field core::num* field = null;
+  covariant-by-declaration field core::num* field = null;
   synthetic constructor •() → self::C*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.outline.expect
index d5cf801..a7dd616 100644
--- a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object {
-  covariant field core::num* field;
+  covariant-by-declaration field core::num* field;
   synthetic constructor •() → self::B*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C extends self::A implements self::B {
-  covariant field core::num* field;
+  covariant-by-declaration field core::num* field;
   synthetic constructor •() → self::C*
     ;
 }
diff --git a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.transformed.expect
index 22e490c..fb69f60 100644
--- a/pkg/front_end/testcases/general/covariant_field_override.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_field_override.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object {
-  covariant field core::num* field = null;
+  covariant-by-declaration field core::num* field = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C extends self::A implements self::B {
-  covariant field core::num* field = null;
+  covariant-by-declaration field core::num* field = null;
   synthetic constructor •() → self::C*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/general/covariant_generic.dart.weak.expect b/pkg/front_end/testcases/general/covariant_generic.dart.weak.expect
index a195318..f28d890 100644
--- a/pkg/front_end/testcases/general/covariant_generic.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_generic.dart.weak.expect
@@ -6,13 +6,13 @@
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field self::Foo::T* finalField;
   final field (self::Foo::T*) →* void callbackField;
-  generic-covariant-impl field self::Foo::T* mutableField = null;
+  covariant-by-class field self::Foo::T* mutableField = null;
   field (self::Foo::T*) →* void mutableCallbackField = null;
   constructor •(self::Foo::T* finalField, (self::Foo::T*) →* void callbackField) → self::Foo<self::Foo::T*>*
     : self::Foo::finalField = finalField, self::Foo::callbackField = callbackField, super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Foo::T* x) → void {}
-  set setter(generic-covariant-impl self::Foo::T* x) → void {}
+  method method(covariant-by-class self::Foo::T* x) → void {}
+  set setter(covariant-by-class self::Foo::T* x) → void {}
   method withCallback((self::Foo::T*) →* void callback) → void {
     callback(this.{self::Foo::finalField}{self::Foo::T*}){(self::Foo::T*) →* void};
   }
diff --git a/pkg/front_end/testcases/general/covariant_generic.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_generic.dart.weak.outline.expect
index e37f335..eb4adfe 100644
--- a/pkg/front_end/testcases/general/covariant_generic.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_generic.dart.weak.outline.expect
@@ -6,13 +6,13 @@
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field self::Foo::T* finalField;
   final field (self::Foo::T*) →* void callbackField;
-  generic-covariant-impl field self::Foo::T* mutableField;
+  covariant-by-class field self::Foo::T* mutableField;
   field (self::Foo::T*) →* void mutableCallbackField;
   constructor •(self::Foo::T* finalField, (self::Foo::T*) →* void callbackField) → self::Foo<self::Foo::T*>*
     ;
-  method method(generic-covariant-impl self::Foo::T* x) → void
+  method method(covariant-by-class self::Foo::T* x) → void
     ;
-  set setter(generic-covariant-impl self::Foo::T* x) → void
+  set setter(covariant-by-class self::Foo::T* x) → void
     ;
   method withCallback((self::Foo::T*) →* void callback) → void
     ;
diff --git a/pkg/front_end/testcases/general/covariant_generic.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_generic.dart.weak.transformed.expect
index a65e4e7..4784a3f 100644
--- a/pkg/front_end/testcases/general/covariant_generic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_generic.dart.weak.transformed.expect
@@ -6,13 +6,13 @@
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field self::Foo::T* finalField;
   final field (self::Foo::T*) →* void callbackField;
-  generic-covariant-impl field self::Foo::T* mutableField = null;
+  covariant-by-class field self::Foo::T* mutableField = null;
   field (self::Foo::T*) →* void mutableCallbackField = null;
   constructor •(self::Foo::T* finalField, (self::Foo::T*) →* void callbackField) → self::Foo<self::Foo::T*>*
     : self::Foo::finalField = finalField, self::Foo::callbackField = callbackField, super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Foo::T* x) → void {}
-  set setter(generic-covariant-impl self::Foo::T* x) → void {}
+  method method(covariant-by-class self::Foo::T* x) → void {}
+  set setter(covariant-by-class self::Foo::T* x) → void {}
   method withCallback((self::Foo::T*) →* void callback) → void {
     callback(this.{self::Foo::finalField}{self::Foo::T*}){(self::Foo::T*) →* void};
   }
diff --git a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.expect b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.expect
index 60fc7d3..0390bb6 100644
--- a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  method foo(covariant core::num* x) → void {}
+  method foo(covariant-by-declaration core::num* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -54,13 +54,13 @@
   synthetic constructor •() → self::_D&A&B*
     : super self::A::•()
     ;
-  forwarding-stub method foo(covariant core::num* x) → void
+  forwarding-stub method foo(covariant-by-declaration core::num* x) → void
     return super.{self::B::foo}(x);
 }
 class D extends self::_D&A&B implements self::C {
   synthetic constructor •() → self::D*
     : super self::_D&A&B::•()
     ;
-  method foo(covariant core::int* x) → void {}
+  method foo(covariant-by-declaration core::int* x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.outline.expect
index 2ca3173..6da60de 100644
--- a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A extends core::Object {
   synthetic constructor •() → self::A*
     ;
-  method foo(covariant core::num* x) → void
+  method foo(covariant-by-declaration core::num* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -54,13 +54,13 @@
   synthetic constructor •() → self::_D&A&B*
     : super self::A::•()
     ;
-  forwarding-stub method foo(covariant core::num* x) → void
+  forwarding-stub method foo(covariant-by-declaration core::num* x) → void
     return super.{self::B::foo}(x);
 }
 class D extends self::_D&A&B implements self::C {
   synthetic constructor •() → self::D*
     ;
-  method foo(covariant core::int* x) → void
+  method foo(covariant-by-declaration core::int* x) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.transformed.expect
index e6dbddd..502b6f3 100644
--- a/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_parameter_in_superclass_of_mixin_application.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  method foo(covariant core::num* x) → void {}
+  method foo(covariant-by-declaration core::num* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -54,12 +54,12 @@
   synthetic constructor •() → self::_D&A&B*
     : super self::A::•()
     ;
-  method foo(covariant core::num* x) → void {}
+  method foo(covariant-by-declaration core::num* x) → void {}
 }
 class D extends self::_D&A&B implements self::C {
   synthetic constructor •() → self::D*
     : super self::_D&A&B::•()
     ;
-  method foo(covariant core::int* x) → void {}
+  method foo(covariant-by-declaration core::int* x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.expect b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.expect
index c51ea4f..044d867 100644
--- a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.expect
@@ -39,6 +39,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  method method(covariant core::String* a) → dynamic {}
+  method method(covariant-by-declaration core::String* a) → dynamic {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.outline.expect
index e83a1aa..e98cc10 100644
--- a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.outline.expect
@@ -38,7 +38,7 @@
 class C extends self::B {
   synthetic constructor •() → self::C*
     ;
-  method method(covariant core::String* a) → dynamic
+  method method(covariant-by-declaration core::String* a) → dynamic
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.transformed.expect
index c51ea4f..044d867 100644
--- a/pkg/front_end/testcases/general/covariant_super_check.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_super_check.dart.weak.transformed.expect
@@ -39,6 +39,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  method method(covariant core::String* a) → dynamic {}
+  method method(covariant-by-declaration core::String* a) → dynamic {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.expect b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.expect
index 4ba2d78..d28fb6f 100644
--- a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.expect
+++ b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::S*>*
     : super core::Object::•()
     ;
-  method method<generic-covariant-impl T extends self::A::S*>(generic-covariant-impl self::A::S* s) → void {}
+  method method<covariant-by-class T extends self::A::S*>(covariant-by-class self::A::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::B<self::B::S*>*
     : super core::Object::•()
     ;
-  method method<generic-covariant-impl T extends self::B::S*>(covariant generic-covariant-impl self::B::S* s) → void {}
+  method method<covariant-by-class T extends self::B::S*>(covariant-by-declaration covariant-by-class self::B::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,14 +38,14 @@
   synthetic constructor •() → self::C<self::C::S*>*
     : super self::A::•()
     ;
-  forwarding-stub forwarding-semi-stub method method<generic-covariant-impl T extends self::C::S*>(covariant generic-covariant-impl self::C::S* s) → void
+  forwarding-stub forwarding-semi-stub method method<covariant-by-class T extends self::C::S*>(covariant-by-declaration covariant-by-class self::C::S* s) → void
     return super.{self::A::method}<self::C::method::T*>(s);
 }
 class D<S extends core::Object* = dynamic> extends self::A<self::D::S*> implements self::B<self::D::S*> {
   synthetic constructor •() → self::D<self::D::S*>*
     : super self::A::•()
     ;
-  forwarding-stub method method<generic-covariant-impl T extends self::D::S*>(covariant generic-covariant-impl self::D::S* s) → void
+  forwarding-stub method method<covariant-by-class T extends self::D::S*>(covariant-by-declaration covariant-by-class self::D::S* s) → void
     return super.{self::A::method}<self::D::method::T*>(s);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.outline.expect b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.outline.expect
index 066d863..c24dcc9 100644
--- a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<S extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::S*>*
     ;
-  method method<generic-covariant-impl T extends self::A::S*>(generic-covariant-impl self::A::S* s) → void
+  method method<covariant-by-class T extends self::A::S*>(covariant-by-class self::A::S* s) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -21,7 +21,7 @@
 class B<S extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::S*>*
     ;
-  method method<generic-covariant-impl T extends self::B::S*>(covariant generic-covariant-impl self::B::S* s) → void
+  method method<covariant-by-class T extends self::B::S*>(covariant-by-declaration covariant-by-class self::B::S* s) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -37,13 +37,13 @@
 class C<S extends core::Object* = dynamic> extends self::A<self::C::S*> implements self::B<self::C::S*> {
   synthetic constructor •() → self::C<self::C::S*>*
     ;
-  forwarding-stub forwarding-semi-stub method method<generic-covariant-impl T extends self::C::S*>(covariant generic-covariant-impl self::C::S* s) → void
+  forwarding-stub forwarding-semi-stub method method<covariant-by-class T extends self::C::S*>(covariant-by-declaration covariant-by-class self::C::S* s) → void
     return super.{self::A::method}<self::C::method::T*>(s);
 }
 class D<S extends core::Object* = dynamic> extends self::A<self::D::S*> implements self::B<self::D::S*> {
   synthetic constructor •() → self::D<self::D::S*>*
     ;
-  forwarding-stub method method<generic-covariant-impl T extends self::D::S*>(covariant generic-covariant-impl self::D::S* s) → void
+  forwarding-stub method method<covariant-by-class T extends self::D::S*>(covariant-by-declaration covariant-by-class self::D::S* s) → void
     return super.{self::A::method}<self::D::method::T*>(s);
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.transformed.expect b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.transformed.expect
index 4ba2d78..d28fb6f 100644
--- a/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/covariant_type_parameter.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::S*>*
     : super core::Object::•()
     ;
-  method method<generic-covariant-impl T extends self::A::S*>(generic-covariant-impl self::A::S* s) → void {}
+  method method<covariant-by-class T extends self::A::S*>(covariant-by-class self::A::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::B<self::B::S*>*
     : super core::Object::•()
     ;
-  method method<generic-covariant-impl T extends self::B::S*>(covariant generic-covariant-impl self::B::S* s) → void {}
+  method method<covariant-by-class T extends self::B::S*>(covariant-by-declaration covariant-by-class self::B::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,14 +38,14 @@
   synthetic constructor •() → self::C<self::C::S*>*
     : super self::A::•()
     ;
-  forwarding-stub forwarding-semi-stub method method<generic-covariant-impl T extends self::C::S*>(covariant generic-covariant-impl self::C::S* s) → void
+  forwarding-stub forwarding-semi-stub method method<covariant-by-class T extends self::C::S*>(covariant-by-declaration covariant-by-class self::C::S* s) → void
     return super.{self::A::method}<self::C::method::T*>(s);
 }
 class D<S extends core::Object* = dynamic> extends self::A<self::D::S*> implements self::B<self::D::S*> {
   synthetic constructor •() → self::D<self::D::S*>*
     : super self::A::•()
     ;
-  forwarding-stub method method<generic-covariant-impl T extends self::D::S*>(covariant generic-covariant-impl self::D::S* s) → void
+  forwarding-stub method method<covariant-by-class T extends self::D::S*>(covariant-by-declaration covariant-by-class self::D::S* s) → void
     return super.{self::A::method}<self::D::method::T*>(s);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.expect b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.expect
index ab69e1b..3a5d2de 100644
--- a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.expect
@@ -50,7 +50,7 @@
   synthetic constructor •() → self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin
     : super self::RenderSliver::•()
     ;
-  forwarding-stub method handleEvent(invalid-type event, covariant invalid-type entry) → void
+  forwarding-stub method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void
     return super.{self::RenderSliver::handleEvent}(event, entry);
 }
 abstract class _RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin&RenderSliverHelpers extends self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin /*isAnonymousMixin*/  {
@@ -92,7 +92,7 @@
   synthetic constructor •() → mai::RenderObject
     : super core::Object::•()
     ;
-  method handleEvent(invalid-type event, covariant invalid-type entry) → void {}
+  method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void {}
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
 }
diff --git a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.outline.expect
index bac955b..7fdf300 100644
--- a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.outline.expect
@@ -45,7 +45,7 @@
   synthetic constructor •() → self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin
     : super self::RenderSliver::•()
     ;
-  forwarding-stub method handleEvent(invalid-type event, covariant invalid-type entry) → void
+  forwarding-stub method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void
     return super.{self::RenderSliver::handleEvent}(event, entry);
 }
 abstract class _RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin&RenderSliverHelpers extends self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin /*isAnonymousMixin*/  {
@@ -78,7 +78,7 @@
 abstract class RenderObject extends core::Object {
   synthetic constructor •() → mai::RenderObject
     ;
-  method handleEvent(invalid-type event, covariant invalid-type entry) → void
+  method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void
     ;
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
diff --git a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.transformed.expect
index 89640c3..04e18c9 100644
--- a/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/crashes/crash_05/main.dart.weak.transformed.expect
@@ -50,7 +50,7 @@
   synthetic constructor •() → self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin
     : super self::RenderSliver::•()
     ;
-  forwarding-stub method handleEvent(invalid-type event, covariant invalid-type entry) → void
+  forwarding-stub method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void
     return super.{self::RenderSliver::handleEvent}(event, entry);
 }
 abstract class _RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin&RenderSliverHelpers extends self::_RenderSliverSingleBoxAdapter&RenderSliver&RenderObjectWithChildMixin /*isAnonymousMixin*/  {
@@ -92,7 +92,7 @@
   synthetic constructor •() → mai::RenderObject
     : super core::Object::•()
     ;
-  method handleEvent(invalid-type event, covariant invalid-type entry) → void {}
+  method handleEvent(invalid-type event, covariant-by-declaration invalid-type entry) → void {}
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
 }
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
index c27f245..05dcdaa 100644
--- a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
@@ -265,12 +265,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<core::int>[]);
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(<core::int>[]);
   invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:16:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
@@ -285,7 +285,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -294,7 +294,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -303,7 +303,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int>;
@@ -312,7 +312,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -321,7 +321,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:25:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:25:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -330,7 +330,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:26:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:26:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
index 04b2fa3..0717dcf 100644
--- a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
@@ -265,12 +265,12 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(core::_GrowableList::•<core::int>(0));
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(core::_GrowableList::•<core::int>(0));
   invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:16:8: Error: The operator '<' isn't defined for the class 'Type'.
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(<int extends core::Object? = dynamic>() → Null
     ;
 );
   invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
@@ -285,7 +285,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:21:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named;
@@ -294,7 +294,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:22:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named();
@@ -303,7 +303,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:23:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int>;
@@ -312,7 +312,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The method 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:24:19: Error: The method 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'named'.
   Class<int><int>.named<int>();
@@ -321,7 +321,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>;
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:25:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:25:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>;
@@ -330,7 +330,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   Class<int><int>.named<int><int>();
-       ^" in (#C1){<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:26:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
+       ^" in #C1{<unresolved>}.<(#C2){dynamic}.>(invalid-expression "pkg/front_end/testcases/general/duplicate_instantiation.dart:26:19: Error: The getter 'named' isn't defined for the class 'List<int>'.
  - 'List' is from 'dart:core'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
   Class<int><int>.named<int><int>();
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.expect
index e32bbfb..183d7ef 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.expect
@@ -98,20 +98,6 @@
 // enum Enum {
 //      ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:93:3: Error: '_name' is already declared in this scope.
-//   _name,
-//   ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:89:6: Context: Previous declaration of '_name' is implied by this definition.
-// enum AnotherEnum {
-//      ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:94:3: Error: 'index' is already declared in this scope.
-//   index,
-//   ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:89:6: Context: Previous declaration of 'index' is implied by this definition.
-// enum AnotherEnum {
-//      ^^^^^^^^^^^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:95:3: Error: 'toString' is already declared in this scope.
 //   toString,
 //   ^^^^^^^^
@@ -306,6 +292,13 @@
 // class Sub extends C {
 //                   ^
 //
+// pkg/front_end/testcases/general/duplicated_declarations.dart:94:3: Error: Can't declare a member that conflicts with an inherited one.
+//   index,
+//   ^^^^^
+// sdk/lib/core/enum.dart:74:13: Context: This is the inherited member.
+//   final int index;
+//             ^^^^^
+//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:34:3: Error: Can't use 'main' because it is declared more than once.
 //   main();
 //   ^
@@ -345,14 +338,6 @@
 //   m() => super.m();
 //                ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:104:38: Error: Can't use '_name' because it is declared more than once.
-//     "AnotherEnum._name": AnotherEnum._name,
-//                                      ^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:105:38: Error: Can't use 'index' because it is declared more than once.
-//     "AnotherEnum.index": AnotherEnum.index,
-//                                      ^^^^^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:106:41: Error: Can't use 'toString' because it is declared more than once.
 //     "AnotherEnum.toString": AnotherEnum.toString,
 //                                         ^^^^^^^^
@@ -495,16 +480,16 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#4 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#4 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#4*>* values = #C4;
   static const field self::Enum#4* a = #C3;
-  const constructor •(core::int* index, core::String* _name) → self::Enum#4*
-    : self::Enum#4::index = index, self::Enum#4::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Enum#4*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#4::_name}{core::String*};
+    return "Enum#4.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -515,18 +500,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#3 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#3 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#3*>* values = #C12;
   static const field self::Enum#3* a = #C5;
   static const field self::Enum#3* b = #C8;
   static const field self::Enum#3* c = #C11;
-  const constructor •(core::int* index, core::String* _name) → self::Enum#3*
-    : self::Enum#3::index = index, self::Enum#3::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Enum#3*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#3::_name}{core::String*};
+    return "Enum#3.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -537,18 +522,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#2 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#2 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#2*>* values = #C17;
   static const field self::Enum#2* Enum = #C14;
   static const field self::Enum#2* a = #C15;
   static const field self::Enum#2* b = #C16;
-  const constructor •(core::int* index, core::String* _name) → self::Enum#2*
-    : self::Enum#2::index = index, self::Enum#2::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Enum#2*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#2::_name}{core::String*};
+    return "Enum#2.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -559,18 +544,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#1 extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#1 extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum#1*>* values = #C21;
   static const field self::Enum#1* a = #C18;
   static const field self::Enum#1* b = #C19;
   static const field self::Enum#1* c = #C20;
-  const constructor •(core::int* index, core::String* _name) → self::Enum#1*
-    : self::Enum#1::index = index, self::Enum#1::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Enum#1*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#1::_name}{core::String*};
+    return "Enum#1.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -581,18 +566,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum*>* values = #C25;
   static const field self::Enum* Enum = #C22;
   static const field self::Enum* a = #C23;
   static const field self::Enum* b = #C24;
-  const constructor •(core::int* index, core::String* _name) → self::Enum*
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Enum*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum::_name}{core::String*};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -603,18 +588,19 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class AnotherEnum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
-  static const field core::List<self::AnotherEnum*>* values = #C32;
-  static const field self::AnotherEnum* a = #C27;
-  static const field self::AnotherEnum* b = #C29;
-  static const field self::AnotherEnum* c = #C31;
-  const constructor •(core::int* index, core::String* _name) → self::AnotherEnum*
-    : self::AnotherEnum::index = index, self::AnotherEnum::_name = _name, super core::Object::•()
+class AnotherEnum extends core::_Enum /*isEnum*/  {
+  static const field core::List<self::AnotherEnum*>* values = #C35;
+  static const field self::AnotherEnum* a = #C26;
+  static const field self::AnotherEnum* b = #C27;
+  static const field self::AnotherEnum* c = #C28;
+  static const field self::AnotherEnum* _name = #C31;
+  static const field self::AnotherEnum* index = #C34;
+  const constructor •(core::int* index, core::String* name) → self::AnotherEnum*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::AnotherEnum::_name}{core::String*};
+    return "AnotherEnum.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -648,11 +634,7 @@
     ^";
 }
 static method useAnotherEnum() → dynamic {
-  <core::String*, core::Object*>{"AnotherEnum.a": #C27, "AnotherEnum.b": #C29, "AnotherEnum.c": #C31, "AnotherEnum._name": invalid-expression "pkg/front_end/testcases/general/duplicated_declarations.dart:104:38: Error: Can't use '_name' because it is declared more than once.
-    \"AnotherEnum._name\": AnotherEnum._name,
-                                     ^^^^^", "AnotherEnum.index": invalid-expression "pkg/front_end/testcases/general/duplicated_declarations.dart:105:38: Error: Can't use 'index' because it is declared more than once.
-    \"AnotherEnum.index\": AnotherEnum.index,
-                                     ^^^^^", "AnotherEnum.toString": invalid-expression "pkg/front_end/testcases/general/duplicated_declarations.dart:106:41: Error: Can't use 'toString' because it is declared more than once.
+  <core::String*, core::Object*>{"AnotherEnum.a": #C26, "AnotherEnum.b": #C27, "AnotherEnum.c": #C28, "AnotherEnum._name": #C31, "AnotherEnum.index": #C34, "AnotherEnum.toString": invalid-expression "pkg/front_end/testcases/general/duplicated_declarations.dart:106:41: Error: Can't use 'toString' because it is declared more than once.
     \"AnotherEnum.toString\": AnotherEnum.toString,
                                         ^^^^^^^^", "AnotherEnum.values": invalid-expression "pkg/front_end/testcases/general/duplicated_declarations.dart:107:39: Error: Can't use 'values' because it is declared more than once.
     \"AnotherEnum.values\": AnotherEnum.values,
@@ -665,18 +647,18 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.a"
+  #C2 = "a"
   #C3 = self::Enum#4 {index:#C1, _name:#C2}
   #C4 = <self::Enum#4*>[#C3]
   #C5 = self::Enum#3 {index:#C1, _name:#C2}
   #C6 = 1
-  #C7 = "Enum.b"
+  #C7 = "b"
   #C8 = self::Enum#3 {index:#C6, _name:#C7}
   #C9 = 2
-  #C10 = "Enum.c"
+  #C10 = "c"
   #C11 = self::Enum#3 {index:#C9, _name:#C10}
   #C12 = <self::Enum#3*>[#C5, #C8, #C11]
-  #C13 = "Enum.Enum"
+  #C13 = "Enum"
   #C14 = self::Enum#2 {index:#C1, _name:#C13}
   #C15 = self::Enum#2 {index:#C6, _name:#C2}
   #C16 = self::Enum#2 {index:#C9, _name:#C7}
@@ -689,19 +671,23 @@
   #C23 = self::Enum {index:#C6, _name:#C2}
   #C24 = self::Enum {index:#C9, _name:#C7}
   #C25 = <self::Enum*>[#C22, #C23, #C24]
-  #C26 = "AnotherEnum.a"
-  #C27 = self::AnotherEnum {index:#C1, _name:#C26}
-  #C28 = "AnotherEnum.b"
-  #C29 = self::AnotherEnum {index:#C6, _name:#C28}
-  #C30 = "AnotherEnum.c"
-  #C31 = self::AnotherEnum {index:#C9, _name:#C30}
-  #C32 = <self::AnotherEnum*>[#C27, #C29, #C31]
+  #C26 = self::AnotherEnum {index:#C1, _name:#C2}
+  #C27 = self::AnotherEnum {index:#C6, _name:#C7}
+  #C28 = self::AnotherEnum {index:#C9, _name:#C10}
+  #C29 = 3
+  #C30 = "_name"
+  #C31 = self::AnotherEnum {index:#C29, _name:#C30}
+  #C32 = 4
+  #C33 = "index"
+  #C34 = self::AnotherEnum {index:#C32, _name:#C33}
+  #C35 = <self::AnotherEnum*>[#C26, #C27, #C28, #C31, #C34]
 }
 
 
 Constructor coverage from constants:
 org-dartlang-testcase:///duplicated_declarations.dart:
 - Enum#1. (from org-dartlang-testcase:///duplicated_declarations.dart:83:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
 - Enum. (from org-dartlang-testcase:///duplicated_declarations.dart:76:6)
 - AnotherEnum. (from org-dartlang-testcase:///duplicated_declarations.dart:89:6)
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.outline.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.outline.expect
index 287add3..aaa7492 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.weak.outline.expect
@@ -98,20 +98,6 @@
 // enum Enum {
 //      ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:93:3: Error: '_name' is already declared in this scope.
-//   _name,
-//   ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:89:6: Context: Previous declaration of '_name' is implied by this definition.
-// enum AnotherEnum {
-//      ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:94:3: Error: 'index' is already declared in this scope.
-//   index,
-//   ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:89:6: Context: Previous declaration of 'index' is implied by this definition.
-// enum AnotherEnum {
-//      ^^^^^^^^^^^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:95:3: Error: 'toString' is already declared in this scope.
 //   toString,
 //   ^^^^^^^^
@@ -306,6 +292,13 @@
 // class Sub extends C {
 //                   ^
 //
+// pkg/front_end/testcases/general/duplicated_declarations.dart:94:3: Error: Can't declare a member that conflicts with an inherited one.
+//   index,
+//   ^^^^^
+// sdk/lib/core/enum.dart:74:13: Context: This is the inherited member.
+//   final int index;
+//             ^^^^^
+//
 import self as self;
 import "dart:core" as core;
 
@@ -419,16 +412,16 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#4 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#4 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#4*>* values = const <self::Enum#4*>[self::Enum#4::a];
-  static const field self::Enum#4* a = const self::Enum#4::•(0, "Enum.a");
-  const constructor •(core::int* index, core::String* _name) → self::Enum#4*
-    : self::Enum#4::index = index, self::Enum#4::_name = _name, super core::Object::•()
+  static const field self::Enum#4* a = const self::Enum#4::•(0, "a");
+  const constructor •(core::int* index, core::String* name) → self::Enum#4*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#4::_name}{core::String*};
+    return "Enum#4.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -439,18 +432,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#3 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#3 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#3*>* values = const <self::Enum#3*>[self::Enum#3::a, self::Enum#3::b, self::Enum#3::c];
-  static const field self::Enum#3* a = const self::Enum#3::•(0, "Enum.a");
-  static const field self::Enum#3* b = const self::Enum#3::•(1, "Enum.b");
-  static const field self::Enum#3* c = const self::Enum#3::•(2, "Enum.c");
-  const constructor •(core::int* index, core::String* _name) → self::Enum#3*
-    : self::Enum#3::index = index, self::Enum#3::_name = _name, super core::Object::•()
+  static const field self::Enum#3* a = const self::Enum#3::•(0, "a");
+  static const field self::Enum#3* b = const self::Enum#3::•(1, "b");
+  static const field self::Enum#3* c = const self::Enum#3::•(2, "c");
+  const constructor •(core::int* index, core::String* name) → self::Enum#3*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#3::_name}{core::String*};
+    return "Enum#3.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -461,18 +454,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#2 extends core::Object implements core::Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#2 extends core::_Enum /*isEnum*/  { // from org-dartlang-testcase:///duplicated_declarations_part.dart
   static const field core::List<self::Enum#2*>* values = const <self::Enum#2*>[self::Enum#2::Enum, self::Enum#2::a, self::Enum#2::b];
-  static const field self::Enum#2* Enum = const self::Enum#2::•(0, "Enum.Enum");
-  static const field self::Enum#2* a = const self::Enum#2::•(1, "Enum.a");
-  static const field self::Enum#2* b = const self::Enum#2::•(2, "Enum.b");
-  const constructor •(core::int* index, core::String* _name) → self::Enum#2*
-    : self::Enum#2::index = index, self::Enum#2::_name = _name, super core::Object::•()
+  static const field self::Enum#2* Enum = const self::Enum#2::•(0, "Enum");
+  static const field self::Enum#2* a = const self::Enum#2::•(1, "a");
+  static const field self::Enum#2* b = const self::Enum#2::•(2, "b");
+  const constructor •(core::int* index, core::String* name) → self::Enum#2*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#2::_name}{core::String*};
+    return "Enum#2.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -483,18 +476,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum#1 extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Enum#1 extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum#1*>* values = const <self::Enum#1*>[self::Enum#1::a, self::Enum#1::b, self::Enum#1::c];
-  static const field self::Enum#1* a = const self::Enum#1::•(0, "Enum.a");
-  static const field self::Enum#1* b = const self::Enum#1::•(1, "Enum.b");
-  static const field self::Enum#1* c = const self::Enum#1::•(2, "Enum.c");
-  const constructor •(core::int* index, core::String* _name) → self::Enum#1*
-    : self::Enum#1::index = index, self::Enum#1::_name = _name, super core::Object::•()
+  static const field self::Enum#1* a = const self::Enum#1::•(0, "a");
+  static const field self::Enum#1* b = const self::Enum#1::•(1, "b");
+  static const field self::Enum#1* c = const self::Enum#1::•(2, "c");
+  const constructor •(core::int* index, core::String* name) → self::Enum#1*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum#1::_name}{core::String*};
+    return "Enum#1.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -505,18 +498,18 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum*>* values = const <self::Enum*>[self::Enum::Enum, self::Enum::a, self::Enum::b];
-  static const field self::Enum* Enum = const self::Enum::•(0, "Enum.Enum");
-  static const field self::Enum* a = const self::Enum::•(1, "Enum.a");
-  static const field self::Enum* b = const self::Enum::•(2, "Enum.b");
-  const constructor •(core::int* index, core::String* _name) → self::Enum*
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  static const field self::Enum* Enum = const self::Enum::•(0, "Enum");
+  static const field self::Enum* a = const self::Enum::•(1, "a");
+  static const field self::Enum* b = const self::Enum::•(2, "b");
+  const constructor •(core::int* index, core::String* name) → self::Enum*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Enum::_name}{core::String*};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -527,18 +520,19 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-class AnotherEnum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
-  static const field core::List<self::AnotherEnum*>* values = const <self::AnotherEnum*>[self::AnotherEnum::a, self::AnotherEnum::b, self::AnotherEnum::c];
-  static const field self::AnotherEnum* a = const self::AnotherEnum::•(0, "AnotherEnum.a");
-  static const field self::AnotherEnum* b = const self::AnotherEnum::•(1, "AnotherEnum.b");
-  static const field self::AnotherEnum* c = const self::AnotherEnum::•(2, "AnotherEnum.c");
-  const constructor •(core::int* index, core::String* _name) → self::AnotherEnum*
-    : self::AnotherEnum::index = index, self::AnotherEnum::_name = _name, super core::Object::•()
+class AnotherEnum extends core::_Enum /*isEnum*/  {
+  static const field core::List<self::AnotherEnum*>* values = const <self::AnotherEnum*>[self::AnotherEnum::a, self::AnotherEnum::b, self::AnotherEnum::c, self::AnotherEnum::_name, self::AnotherEnum::index];
+  static const field self::AnotherEnum* a = const self::AnotherEnum::•(0, "a");
+  static const field self::AnotherEnum* b = const self::AnotherEnum::•(1, "b");
+  static const field self::AnotherEnum* c = const self::AnotherEnum::•(2, "c");
+  static const field self::AnotherEnum* _name = const self::AnotherEnum::•(3, "_name");
+  static const field self::AnotherEnum* index = const self::AnotherEnum::•(4, "index");
+  const constructor •(core::int* index, core::String* name) → self::AnotherEnum*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::AnotherEnum::_name}{core::String*};
+    return "AnotherEnum.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -563,26 +557,28 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:86:6 -> ListConstant(const <Enum#4*>[const Enum#4{Enum#4.index: 0, Enum#4._name: "Enum.a"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:87:3 -> InstanceConstant(const Enum#4{Enum#4.index: 0, Enum#4._name: "Enum.a"})
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:80:6 -> ListConstant(const <Enum#3*>[const Enum#3{Enum#3.index: 0, Enum#3._name: "Enum.a"}, const Enum#3{Enum#3.index: 1, Enum#3._name: "Enum.b"}, const Enum#3{Enum#3.index: 2, Enum#3._name: "Enum.c"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:81:3 -> InstanceConstant(const Enum#3{Enum#3.index: 0, Enum#3._name: "Enum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:82:3 -> InstanceConstant(const Enum#3{Enum#3.index: 1, Enum#3._name: "Enum.b"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:83:3 -> InstanceConstant(const Enum#3{Enum#3.index: 2, Enum#3._name: "Enum.c"})
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:73:6 -> ListConstant(const <Enum#2*>[const Enum#2{Enum#2.index: 0, Enum#2._name: "Enum.Enum"}, const Enum#2{Enum#2.index: 1, Enum#2._name: "Enum.a"}, const Enum#2{Enum#2.index: 2, Enum#2._name: "Enum.b"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:74:3 -> InstanceConstant(const Enum#2{Enum#2.index: 0, Enum#2._name: "Enum.Enum"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:75:3 -> InstanceConstant(const Enum#2{Enum#2.index: 1, Enum#2._name: "Enum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:77:3 -> InstanceConstant(const Enum#2{Enum#2.index: 2, Enum#2._name: "Enum.b"})
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:83:6 -> ListConstant(const <Enum#1*>[const Enum#1{Enum#1.index: 0, Enum#1._name: "Enum.a"}, const Enum#1{Enum#1.index: 1, Enum#1._name: "Enum.b"}, const Enum#1{Enum#1.index: 2, Enum#1._name: "Enum.c"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:84:3 -> InstanceConstant(const Enum#1{Enum#1.index: 0, Enum#1._name: "Enum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:85:3 -> InstanceConstant(const Enum#1{Enum#1.index: 1, Enum#1._name: "Enum.b"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:86:3 -> InstanceConstant(const Enum#1{Enum#1.index: 2, Enum#1._name: "Enum.c"})
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:76:6 -> ListConstant(const <Enum*>[const Enum{Enum.index: 0, Enum._name: "Enum.Enum"}, const Enum{Enum.index: 1, Enum._name: "Enum.a"}, const Enum{Enum.index: 2, Enum._name: "Enum.b"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:77:3 -> InstanceConstant(const Enum{Enum.index: 0, Enum._name: "Enum.Enum"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:78:3 -> InstanceConstant(const Enum{Enum.index: 1, Enum._name: "Enum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:80:3 -> InstanceConstant(const Enum{Enum.index: 2, Enum._name: "Enum.b"})
-Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:89:6 -> ListConstant(const <AnotherEnum*>[const AnotherEnum{AnotherEnum.index: 0, AnotherEnum._name: "AnotherEnum.a"}, const AnotherEnum{AnotherEnum.index: 1, AnotherEnum._name: "AnotherEnum.b"}, const AnotherEnum{AnotherEnum.index: 2, AnotherEnum._name: "AnotherEnum.c"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:90:3 -> InstanceConstant(const AnotherEnum{AnotherEnum.index: 0, AnotherEnum._name: "AnotherEnum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:91:3 -> InstanceConstant(const AnotherEnum{AnotherEnum.index: 1, AnotherEnum._name: "AnotherEnum.b"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:92:3 -> InstanceConstant(const AnotherEnum{AnotherEnum.index: 2, AnotherEnum._name: "AnotherEnum.c"})
-Extra constant evaluation: evaluated: 46, effectively constant: 22
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:86:6 -> ListConstant(const <Enum#4*>[const Enum#4{_Enum.index: 0, _Enum._name: "a"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:87:3 -> InstanceConstant(const Enum#4{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:80:6 -> ListConstant(const <Enum#3*>[const Enum#3{_Enum.index: 0, _Enum._name: "a"}, const Enum#3{_Enum.index: 1, _Enum._name: "b"}, const Enum#3{_Enum.index: 2, _Enum._name: "c"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:81:3 -> InstanceConstant(const Enum#3{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:82:3 -> InstanceConstant(const Enum#3{_Enum.index: 1, _Enum._name: "b"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:83:3 -> InstanceConstant(const Enum#3{_Enum.index: 2, _Enum._name: "c"})
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:73:6 -> ListConstant(const <Enum#2*>[const Enum#2{_Enum.index: 0, _Enum._name: "Enum"}, const Enum#2{_Enum.index: 1, _Enum._name: "a"}, const Enum#2{_Enum.index: 2, _Enum._name: "b"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:74:3 -> InstanceConstant(const Enum#2{_Enum.index: 0, _Enum._name: "Enum"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:75:3 -> InstanceConstant(const Enum#2{_Enum.index: 1, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:77:3 -> InstanceConstant(const Enum#2{_Enum.index: 2, _Enum._name: "b"})
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:83:6 -> ListConstant(const <Enum#1*>[const Enum#1{_Enum.index: 0, _Enum._name: "a"}, const Enum#1{_Enum.index: 1, _Enum._name: "b"}, const Enum#1{_Enum.index: 2, _Enum._name: "c"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:84:3 -> InstanceConstant(const Enum#1{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:85:3 -> InstanceConstant(const Enum#1{_Enum.index: 1, _Enum._name: "b"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:86:3 -> InstanceConstant(const Enum#1{_Enum.index: 2, _Enum._name: "c"})
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:76:6 -> ListConstant(const <Enum*>[const Enum{_Enum.index: 0, _Enum._name: "Enum"}, const Enum{_Enum.index: 1, _Enum._name: "a"}, const Enum{_Enum.index: 2, _Enum._name: "b"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:77:3 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "Enum"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:78:3 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:80:3 -> InstanceConstant(const Enum{_Enum.index: 2, _Enum._name: "b"})
+Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:89:6 -> ListConstant(const <AnotherEnum*>[const AnotherEnum{_Enum.index: 0, _Enum._name: "a"}, const AnotherEnum{_Enum.index: 1, _Enum._name: "b"}, const AnotherEnum{_Enum.index: 2, _Enum._name: "c"}, const AnotherEnum{_Enum.index: 3, _Enum._name: "_name"}, const AnotherEnum{_Enum.index: 4, _Enum._name: "index"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:90:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:91:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 1, _Enum._name: "b"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:92:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 2, _Enum._name: "c"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:93:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 3, _Enum._name: "_name"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:94:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 4, _Enum._name: "index"})
+Extra constant evaluation: evaluated: 54, effectively constant: 24
diff --git a/pkg/front_end/testcases/general/expressions.dart.weak.expect b/pkg/front_end/testcases/general/expressions.dart.weak.expect
index f2ff8e6..20f5b17 100644
--- a/pkg/front_end/testcases/general/expressions.dart.weak.expect
+++ b/pkg/front_end/testcases/general/expressions.dart.weak.expect
@@ -72,7 +72,7 @@
   self::caller(({dynamic x = #C1}) → Null {
     core::print("<anon> was called with ${x}");
   });
-  core::print((#C3).{core::Type::toString}(){() →* core::String*});
+  core::print(#C3.{core::Type::toString}(){() →* core::String*});
   core::print(#C3);
   core::print(let final core::Type* #t5 = #C3 in block {
     #t5.{core::Type::toString}(){() →* core::String*};
diff --git a/pkg/front_end/testcases/general/expressions.dart.weak.transformed.expect b/pkg/front_end/testcases/general/expressions.dart.weak.transformed.expect
index 17936f5..3569966 100644
--- a/pkg/front_end/testcases/general/expressions.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/expressions.dart.weak.transformed.expect
@@ -72,7 +72,7 @@
   self::caller(({dynamic x = #C1}) → Null {
     core::print("<anon> was called with ${x}");
   });
-  core::print((#C3).{core::Type::toString}(){() →* core::String*});
+  core::print(#C3.{core::Type::toString}(){() →* core::String*});
   core::print(#C3);
   core::print(let final core::Type* #t5 = #C3 in block {
     #t5.{core::Type::toString}(){() →* core::String*};
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart
new file mode 100644
index 0000000..0a2236e
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart
@@ -0,0 +1,13 @@
+// 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.
+
+// @dart=2.14
+
+class A {}
+
+extension E on A {}
+
+test(E e) {} // Error.
+
+main() {}
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline.expect
new file mode 100644
index 0000000..9bafc2d
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+// @dart = 2.14
+class A {}
+
+extension E on A {}
+
+test(E e) {}
+main() {}
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5ef7180
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.textual_outline_modelled.expect
@@ -0,0 +1,7 @@
+// @dart = 2.14
+class A {}
+
+extension E on A {}
+
+main() {}
+test(E e) {}
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect
new file mode 100644
index 0000000..bc4eb86
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// test(E e) {} // Error.
+//      ^
+//
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: 'E' isn't a type.
+// test(E e) {} // Error.
+//      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension E on self::A {
+}
+static method test(invalid-type e) → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect
new file mode 100644
index 0000000..1a1b4af
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// test(E e) {} // Error.
+//      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+extension E on self::A {
+}
+static method test(invalid-type e) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect
new file mode 100644
index 0000000..bc4eb86
--- /dev/null
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
+// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// test(E e) {} // Error.
+//      ^
+//
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: 'E' isn't a type.
+// test(E e) {} // Error.
+//      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension E on self::A {
+}
+static method test(invalid-type e) → dynamic {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
index 87aad44..8f1e1c3 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
@@ -31,21 +31,21 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   @#C8
   get x() → core::double*
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   set x(core::double* #v) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
   @#C8
   get y() → core::double*
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   set y(core::double* #v) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
   get next() → ffi::Pointer<self::Coordinate*>*
-    return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
+    return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
   set next(ffi::Pointer<self::Coordinate*>* #v) → void
-    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v.{ffi::Pointer::address}{core::int});
+    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v.{ffi::Pointer::address}{core::int});
   @#C16
   static get /*isNonNullableByDefault*/ #sizeOf() → core::int*
-    return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.expect b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.expect
index 085bed3..5cfbd7c 100644
--- a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.expect
+++ b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.expect
@@ -4,7 +4,7 @@
 import "dart:async" as asy;
 
 abstract class TestMixin<R extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* async {
+  method test(covariant-by-class asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* async {
     final self::TestMixin::R* response = await fetch;
     self::TestMixin::T* result;
     if(response is self::Response<dynamic>*) {
@@ -86,7 +86,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin*
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>*
+  mixin-super-stub method test(covariant-by-class asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>*
     return super.{self::TestMixin::test}(fetch);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -112,7 +112,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin*
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>*
+  mixin-super-stub method test(covariant-by-class asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>*
     return super.{self::TestMixin::test}(fetch);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.outline.expect b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.outline.expect
index 098d875..87aedc7 100644
--- a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.outline.expect
@@ -4,7 +4,7 @@
 import "dart:async" as asy;
 
 abstract class TestMixin<R extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* async 
+  method test(covariant-by-class asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* async 
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -66,7 +66,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin*
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>*
+  mixin-super-stub method test(covariant-by-class asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>*
     return super.{self::TestMixin::test}(fetch);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -89,7 +89,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin*
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>*
+  mixin-super-stub method test(covariant-by-class asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>*
     return super.{self::TestMixin::test}(fetch);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.transformed.expect b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.transformed.expect
index c0bd1b7..cae05ae 100644
--- a/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/flutter_issue64155.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:_internal" as _in;
 
 abstract class TestMixin<R extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* /* originally async */ {
+  method test(covariant-by-class asy::Future<self::TestMixin::R*>* fetch) → asy::Future<self::TestMixin::T*>* /* originally async */ {
     final asy::_Future<self::TestMixin::T*>* :async_future = new asy::_Future::•<self::TestMixin::T*>();
     core::bool* :is_sync = false;
     FutureOr<self::TestMixin::T*>* :return_value;
@@ -113,7 +113,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin*
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>* /* originally async */ {
+  method test(covariant-by-class asy::Future<self::Response<core::String*>*>* fetch) → asy::Future<core::String*>* /* originally async */ {
     final asy::_Future<core::String*>* :async_future = new asy::_Future::•<core::String*>();
     core::bool* :is_sync = false;
     FutureOr<core::String*>* :return_value;
@@ -182,7 +182,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin*
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>* /* originally async */ {
+  method test(covariant-by-class asy::Future<self::PagingResponse<core::String*>*>* fetch) → asy::Future<core::String*>* /* originally async */ {
     final asy::_Future<core::String*>* :async_future = new asy::_Future::•<core::String*>();
     core::bool* :is_sync = false;
     FutureOr<core::String*>* :return_value;
diff --git a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.expect b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.expect
index 13b9d4e..a80aab5 100644
--- a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → mai::DynamicDispatchRegistry<mai::DynamicDispatchRegistry::T*>*
     : super core::Object::•()
     ;
-  method register(generic-covariant-impl mai::DynamicDispatchRegistry::T* function) → mai::DynamicDispatchRegistry::T*
+  method register(covariant-by-class mai::DynamicDispatchRegistry::T* function) → mai::DynamicDispatchRegistry::T*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.outline.expect
index 63c1b76..4049152 100644
--- a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.outline.expect
@@ -13,7 +13,7 @@
 class DynamicDispatchRegistry<T extends core::Function*> extends core::Object {
   synthetic constructor •() → self2::DynamicDispatchRegistry<self2::DynamicDispatchRegistry::T*>*
     ;
-  method register(generic-covariant-impl self2::DynamicDispatchRegistry::T* function) → self2::DynamicDispatchRegistry::T*
+  method register(covariant-by-class self2::DynamicDispatchRegistry::T* function) → self2::DynamicDispatchRegistry::T*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.transformed.expect
index 13b9d4e..a80aab5 100644
--- a/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/flutter_issue68092/main.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → mai::DynamicDispatchRegistry<mai::DynamicDispatchRegistry::T*>*
     : super core::Object::•()
     ;
-  method register(generic-covariant-impl mai::DynamicDispatchRegistry::T* function) → mai::DynamicDispatchRegistry::T*
+  method register(covariant-by-class mai::DynamicDispatchRegistry::T* function) → mai::DynamicDispatchRegistry::T*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.expect b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.expect
index 48d2f30..04d5bc5 100644
--- a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.expect
+++ b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator +(covariant core::int* a) → dynamic
+  operator +(covariant-by-declaration core::int* a) → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -50,7 +50,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub operator +(covariant dynamic b) → dynamic;
+  abstract forwarding-stub operator +(covariant-by-declaration dynamic b) → dynamic;
 }
 class D extends core::Object {
   synthetic constructor •() → self::D*
@@ -73,7 +73,7 @@
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  forwarding-stub forwarding-semi-stub operator +(covariant core::int* e) → dynamic
+  forwarding-stub forwarding-semi-stub operator +(covariant-by-declaration core::int* e) → dynamic
     return super.{self::D::+}(e);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.outline.expect b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.outline.expect
index 1e2bb90..b2f74cc 100644
--- a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A extends core::Object {
   synthetic constructor •() → self::A*
     ;
-  operator +(covariant core::int* a) → dynamic
+  operator +(covariant-by-declaration core::int* a) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -47,7 +47,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub operator +(covariant dynamic b) → dynamic;
+  abstract forwarding-stub operator +(covariant-by-declaration dynamic b) → dynamic;
 }
 class D extends core::Object {
   synthetic constructor •() → self::D*
@@ -68,7 +68,7 @@
 class E extends self::D {
   synthetic constructor •() → self::E*
     ;
-  forwarding-stub forwarding-semi-stub operator +(covariant core::int* e) → dynamic
+  forwarding-stub forwarding-semi-stub operator +(covariant-by-declaration core::int* e) → dynamic
     return super.{self::D::+}(e);
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.transformed.expect b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.transformed.expect
index 48d2f30..04d5bc5 100644
--- a/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/forwarding_stub_for_operator.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator +(covariant core::int* a) → dynamic
+  operator +(covariant-by-declaration core::int* a) → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -50,7 +50,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub operator +(covariant dynamic b) → dynamic;
+  abstract forwarding-stub operator +(covariant-by-declaration dynamic b) → dynamic;
 }
 class D extends core::Object {
   synthetic constructor •() → self::D*
@@ -73,7 +73,7 @@
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  forwarding-stub forwarding-semi-stub operator +(covariant core::int* e) → dynamic
+  forwarding-stub forwarding-semi-stub operator +(covariant-by-declaration core::int* e) → dynamic
     return super.{self::D::+}(e);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/function_call1.dart b/pkg/front_end/testcases/general/function_call1.dart
new file mode 100644
index 0000000..418da83
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart
@@ -0,0 +1,26 @@
+// 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.
+
+class _Closure1 {
+  _Closure1 get call => this;
+}
+
+class _Closure2 {
+  final _Closure2 call;
+
+  _Closure2(this.call);
+}
+
+test(_Closure1 foo, _Closure2 bar) {
+  foo();
+  bar();
+}
+
+late _Closure1 closure1;
+late _Closure2 closure2;
+
+var field1 = closure1();
+var field2 = closure2();
+
+main() {}
diff --git a/pkg/front_end/testcases/general/function_call1.dart.textual_outline.expect b/pkg/front_end/testcases/general/function_call1.dart.textual_outline.expect
new file mode 100644
index 0000000..aa8f3d6
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart.textual_outline.expect
@@ -0,0 +1,15 @@
+class _Closure1 {
+  _Closure1 get call => this;
+}
+
+class _Closure2 {
+  final _Closure2 call;
+  _Closure2(this.call);
+}
+
+test(_Closure1 foo, _Closure2 bar) {}
+late _Closure1 closure1;
+late _Closure2 closure2;
+var field1 = closure1();
+var field2 = closure2();
+main() {}
diff --git a/pkg/front_end/testcases/general/function_call1.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/function_call1.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..9249223
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart.textual_outline_modelled.expect
@@ -0,0 +1,19 @@
+class _Closure1 {
+  _Closure1 get call => this;
+}
+class _Closure2 {
+  _Closure2(this.call);
+  final _Closure2 call;
+}
+test(_Closure1 foo, _Closure2 bar) {}
+---- unknown chunk starts ----
+late
+---- unknown chunk ends ----
+_Closure1 closure1;
+---- unknown chunk starts ----
+late
+---- unknown chunk ends ----
+_Closure2 closure2;
+main() {}
+var field1 = closure1();
+var field2 = closure2();
diff --git a/pkg/front_end/testcases/general/function_call1.dart.weak.expect b/pkg/front_end/testcases/general/function_call1.dart.weak.expect
new file mode 100644
index 0000000..c5b503d
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart.weak.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/function_call1.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   foo();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   bar();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field1 = closure1();
+//                      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field2 = closure2();
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    : super core::Object::•()
+    ;
+  get call() → self::_Closure1
+    return this;
+}
+class _Closure2 extends core::Object {
+  final field self::_Closure2 call;
+  constructor •(self::_Closure2 call) → self::_Closure2
+    : self::_Closure2::call = call, super core::Object::•()
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1 = invalid-expression "pkg/front_end/testcases/general/function_call1.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field1 = closure1();
+                     ^";
+static field invalid-type field2 = invalid-expression "pkg/front_end/testcases/general/function_call1.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field2 = closure2();
+                     ^";
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/function_call1.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  foo();
+     ^";
+  invalid-expression "pkg/front_end/testcases/general/function_call1.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  bar();
+     ^";
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/function_call1.dart.weak.outline.expect b/pkg/front_end/testcases/general/function_call1.dart.weak.outline.expect
new file mode 100644
index 0000000..8c62285
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart.weak.outline.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    ;
+  get call() → self::_Closure1
+    ;
+}
+class _Closure2 extends core::Object {
+  final field self::_Closure2 call;
+  constructor •(self::_Closure2 call) → self::_Closure2
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1;
+static field invalid-type field2;
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/function_call1.dart.weak.transformed.expect b/pkg/front_end/testcases/general/function_call1.dart.weak.transformed.expect
new file mode 100644
index 0000000..c5b503d
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call1.dart.weak.transformed.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/function_call1.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   foo();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   bar();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field1 = closure1();
+//                      ^
+//
+// pkg/front_end/testcases/general/function_call1.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field2 = closure2();
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    : super core::Object::•()
+    ;
+  get call() → self::_Closure1
+    return this;
+}
+class _Closure2 extends core::Object {
+  final field self::_Closure2 call;
+  constructor •(self::_Closure2 call) → self::_Closure2
+    : self::_Closure2::call = call, super core::Object::•()
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1 = invalid-expression "pkg/front_end/testcases/general/function_call1.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field1 = closure1();
+                     ^";
+static field invalid-type field2 = invalid-expression "pkg/front_end/testcases/general/function_call1.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field2 = closure2();
+                     ^";
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/function_call1.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  foo();
+     ^";
+  invalid-expression "pkg/front_end/testcases/general/function_call1.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call1.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  bar();
+     ^";
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/function_call2.dart b/pkg/front_end/testcases/general/function_call2.dart
new file mode 100644
index 0000000..06322b9
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart
@@ -0,0 +1,26 @@
+// 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.
+
+class _Closure1 {
+  void Function() get call => () {};
+}
+
+class _Closure2 {
+  final void Function() call;
+
+  _Closure2(this.call);
+}
+
+test(_Closure1 foo, _Closure2 bar) {
+  foo();
+  bar();
+}
+
+late _Closure1 closure1;
+late _Closure2 closure2;
+
+var field1 = closure1();
+var field2 = closure2();
+
+main() {}
diff --git a/pkg/front_end/testcases/general/function_call2.dart.textual_outline.expect b/pkg/front_end/testcases/general/function_call2.dart.textual_outline.expect
new file mode 100644
index 0000000..183ffbe
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart.textual_outline.expect
@@ -0,0 +1,15 @@
+class _Closure1 {
+  void Function() get call => () {};
+}
+
+class _Closure2 {
+  final void Function() call;
+  _Closure2(this.call);
+}
+
+test(_Closure1 foo, _Closure2 bar) {}
+late _Closure1 closure1;
+late _Closure2 closure2;
+var field1 = closure1();
+var field2 = closure2();
+main() {}
diff --git a/pkg/front_end/testcases/general/function_call2.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/function_call2.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..eab5305
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart.textual_outline_modelled.expect
@@ -0,0 +1,19 @@
+class _Closure1 {
+  void Function() get call => () {};
+}
+class _Closure2 {
+  _Closure2(this.call);
+  final void Function() call;
+}
+test(_Closure1 foo, _Closure2 bar) {}
+---- unknown chunk starts ----
+late
+---- unknown chunk ends ----
+_Closure1 closure1;
+---- unknown chunk starts ----
+late
+---- unknown chunk ends ----
+_Closure2 closure2;
+main() {}
+var field1 = closure1();
+var field2 = closure2();
diff --git a/pkg/front_end/testcases/general/function_call2.dart.weak.expect b/pkg/front_end/testcases/general/function_call2.dart.weak.expect
new file mode 100644
index 0000000..c0f6881
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart.weak.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/function_call2.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   foo();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   bar();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field1 = closure1();
+//                      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field2 = closure2();
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    : super core::Object::•()
+    ;
+  get call() → () → void
+    return () → void {};
+}
+class _Closure2 extends core::Object {
+  final field () → void call;
+  constructor •(() → void call) → self::_Closure2
+    : self::_Closure2::call = call, super core::Object::•()
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1 = invalid-expression "pkg/front_end/testcases/general/function_call2.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field1 = closure1();
+                     ^";
+static field invalid-type field2 = invalid-expression "pkg/front_end/testcases/general/function_call2.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field2 = closure2();
+                     ^";
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/function_call2.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  foo();
+     ^";
+  invalid-expression "pkg/front_end/testcases/general/function_call2.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  bar();
+     ^";
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/function_call2.dart.weak.outline.expect b/pkg/front_end/testcases/general/function_call2.dart.weak.outline.expect
new file mode 100644
index 0000000..704879e
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart.weak.outline.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    ;
+  get call() → () → void
+    ;
+}
+class _Closure2 extends core::Object {
+  final field () → void call;
+  constructor •(() → void call) → self::_Closure2
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1;
+static field invalid-type field2;
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/function_call2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/function_call2.dart.weak.transformed.expect
new file mode 100644
index 0000000..c0f6881
--- /dev/null
+++ b/pkg/front_end/testcases/general/function_call2.dart.weak.transformed.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/function_call2.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   foo();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+//   bar();
+//      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+//  - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field1 = closure1();
+//                      ^
+//
+// pkg/front_end/testcases/general/function_call2.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+//  - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+// Try changing 'call' to a method or explicitly invoke 'call'.
+// var field2 = closure2();
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class _Closure1 extends core::Object {
+  synthetic constructor •() → self::_Closure1
+    : super core::Object::•()
+    ;
+  get call() → () → void
+    return () → void {};
+}
+class _Closure2 extends core::Object {
+  final field () → void call;
+  constructor •(() → void call) → self::_Closure2
+    : self::_Closure2::call = call, super core::Object::•()
+    ;
+}
+late static field self::_Closure1 closure1;
+late static field self::_Closure2 closure2;
+static field invalid-type field1 = invalid-expression "pkg/front_end/testcases/general/function_call2.dart:23:22: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field1 = closure1();
+                     ^";
+static field invalid-type field2 = invalid-expression "pkg/front_end/testcases/general/function_call2.dart:24:22: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+var field2 = closure2();
+                     ^";
+static method test(self::_Closure1 foo, self::_Closure2 bar) → dynamic {
+  invalid-expression "pkg/front_end/testcases/general/function_call2.dart:16:6: Error: Cannot invoke an instance of '_Closure1' because it declares 'call' to be something other than a method.
+ - '_Closure1' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  foo();
+     ^";
+  invalid-expression "pkg/front_end/testcases/general/function_call2.dart:17:6: Error: Cannot invoke an instance of '_Closure2' because it declares 'call' to be something other than a method.
+ - '_Closure2' is from 'pkg/front_end/testcases/general/function_call2.dart'.
+Try changing 'call' to a method or explicitly invoke 'call'.
+  bar();
+     ^";
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/function_in_field.dart b/pkg/front_end/testcases/general/function_in_field.dart
index 8234ef2..ccfa71b 100644
--- a/pkg/front_end/testcases/general/function_in_field.dart
+++ b/pkg/front_end/testcases/general/function_in_field.dart
@@ -1,7 +1,9 @@
 // Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 // @dart=2.9
+
 var x = () {
   var y = 42;
   return y;
diff --git a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
index e5dcef1..0333159 100644
--- a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
+++ b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
@@ -21,15 +21,15 @@
 
 static field core::String* x = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:11:12: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'String'.
 String x = identity; // No bound
-           ^" in (#C1) as{TypeError} core::String*;
+           ^" in #C1 as{TypeError} core::String*;
 static field core::String* y = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:12:12: Error: A value of type 'T Function<T extends Object>(T)' can't be assigned to a variable of type 'String'.
  - 'Object' is from 'dart:core'.
 String y = identityObject; // Object bound
-           ^" in (#C2) as{TypeError} core::String*;
+           ^" in #C2 as{TypeError} core::String*;
 static field core::String* z = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:13:12: Error: A value of type 'T Function<T extends List<T>>(T)' can't be assigned to a variable of type 'String'.
  - 'List' is from 'dart:core'.
 String z = identityList; // List<T> bound
-           ^" in (#C3) as{TypeError} core::String*;
+           ^" in #C3 as{TypeError} core::String*;
 static method identity<T extends core::Object* = dynamic>(self::identity::T* t) → self::identity::T*
   return t;
 static method identityObject<T extends core::Object*>(self::identityObject::T* t) → self::identityObject::T*
diff --git a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
index e5dcef1..0333159 100644
--- a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
@@ -21,15 +21,15 @@
 
 static field core::String* x = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:11:12: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'String'.
 String x = identity; // No bound
-           ^" in (#C1) as{TypeError} core::String*;
+           ^" in #C1 as{TypeError} core::String*;
 static field core::String* y = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:12:12: Error: A value of type 'T Function<T extends Object>(T)' can't be assigned to a variable of type 'String'.
  - 'Object' is from 'dart:core'.
 String y = identityObject; // Object bound
-           ^" in (#C2) as{TypeError} core::String*;
+           ^" in #C2 as{TypeError} core::String*;
 static field core::String* z = invalid-expression "pkg/front_end/testcases/general/function_type_assignments.dart:13:12: Error: A value of type 'T Function<T extends List<T>>(T)' can't be assigned to a variable of type 'String'.
  - 'List' is from 'dart:core'.
 String z = identityList; // List<T> bound
-           ^" in (#C3) as{TypeError} core::String*;
+           ^" in #C3 as{TypeError} core::String*;
 static method identity<T extends core::Object* = dynamic>(self::identity::T* t) → self::identity::T*
   return t;
 static method identityObject<T extends core::Object*>(self::identityObject::T* t) → self::identityObject::T*
diff --git a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
index 8515449..20b824e 100644
--- a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
+++ b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
@@ -14,7 +14,7 @@
 static method test() → dynamic {
   core::int* x = invalid-expression "pkg/front_end/testcases/general/generic_function_type_in_message.dart:8:11: Error: A value of type 'num Function<A extends num, B extends num>(A, B)' can't be assigned to a variable of type 'int'.
   int x = add;
-          ^" in (#C1) as{TypeError} core::int*;
+          ^" in #C1 as{TypeError} core::int*;
 }
 static method main() → dynamic {
   if(self::add<core::int*, core::int*>(1, 2).{core::num::<}(3){(core::num*) →* core::bool*})
diff --git a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
index 8515449..20b824e 100644
--- a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
@@ -14,7 +14,7 @@
 static method test() → dynamic {
   core::int* x = invalid-expression "pkg/front_end/testcases/general/generic_function_type_in_message.dart:8:11: Error: A value of type 'num Function<A extends num, B extends num>(A, B)' can't be assigned to a variable of type 'int'.
   int x = add;
-          ^" in (#C1) as{TypeError} core::int*;
+          ^" in #C1 as{TypeError} core::int*;
 }
 static method main() → dynamic {
   if(self::add<core::int*, core::int*>(1, 2).{core::num::<}(3){(core::num*) →* core::bool*})
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.expect
index 1208d2b..e38d7f0 100644
--- a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.expect
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.expect
@@ -167,7 +167,7 @@
 abstract class A extends core::Object {
   field core::int* property4 = null;
   field core::int* property5 = null;
-  covariant field core::String* property6 = null;
+  covariant-by-declaration field core::String* property6 = null;
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.outline.expect b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.outline.expect
index a903f97..360523b 100644
--- a/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/getter_vs_setter_type.dart.weak.outline.expect
@@ -155,7 +155,7 @@
 abstract class A extends core::Object {
   field core::int* property4;
   field core::int* property5;
-  covariant field core::String* property6;
+  covariant-by-declaration field core::String* property6;
   synthetic constructor •() → self::A*
     ;
   abstract get property1() → core::int*;
diff --git a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.expect b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.expect
index a8b24bc..3fd3297 100644
--- a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.expect
+++ b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  abstract method foo(generic-covariant-impl self::A::T* x) → dynamic;
+  abstract method foo(covariant-by-class self::A::T* x) → dynamic;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::_D&C&B<self::_D&C&B::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 class D<T extends core::num*> extends self::_D&C&B<self::D::T*> {
@@ -65,7 +65,7 @@
   synthetic constructor •() → self::E<self::E::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.outline.expect b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.outline.expect
index 63349f7..19af3b7 100644
--- a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T*>*
     ;
-  abstract method foo(generic-covariant-impl self::A::T* x) → dynamic;
+  abstract method foo(covariant-by-class self::A::T* x) → dynamic;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::_D&C&B<self::_D&C&B::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 class D<T extends core::num*> extends self::_D&C&B<self::D::T*> {
@@ -62,7 +62,7 @@
   synthetic constructor •() → self::E<self::E::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.transformed.expect b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.transformed.expect
index c1432a4..0d94a2c 100644
--- a/pkg/front_end/testcases/general/implicit_covariance.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/implicit_covariance.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  abstract method foo(generic-covariant-impl self::A::T* x) → dynamic;
+  abstract method foo(covariant-by-class self::A::T* x) → dynamic;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::_D&C&B<self::_D&C&B::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 class D<T extends core::num*> extends self::_D&C&B<self::D::T*> {
@@ -65,7 +65,7 @@
   synthetic constructor •() → self::E<self::E::T*>*
     : super self::C::•()
     ;
-  forwarding-stub method foo(generic-covariant-impl core::num* x) → dynamic
+  forwarding-stub method foo(covariant-by-class core::num* x) → dynamic
     return super.{self::C::foo}(x);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart b/pkg/front_end/testcases/general/implicit_instantiation.dart
new file mode 100644
index 0000000..7459810
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart
@@ -0,0 +1,26 @@
+// 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.
+
+// @dart=2.14
+
+T id<T>(T t) => t;
+T Function<T>(T) alias = id;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+method(int Function(int) f) {}
+
+test() {
+  Class c = new Class();
+  int Function(int) f = alias;
+  int Function(int) g;
+  g = alias;
+  int Function(int) h = c;
+  g = c;
+  method(alias);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline.expect b/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline.expect
new file mode 100644
index 0000000..5322012
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline.expect
@@ -0,0 +1,11 @@
+// @dart = 2.14
+T id<T>(T t) => t;
+T Function<T>(T) alias = id;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+method(int Function(int) f) {}
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5f608c1
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart.textual_outline_modelled.expect
@@ -0,0 +1,11 @@
+// @dart = 2.14
+T Function<T>(T) alias = id;
+T id<T>(T t) => t;
+
+class Class {
+  T call<T>(T t) => t;
+}
+
+main() {}
+method(int Function(int) f) {}
+test() {}
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.expect b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.expect
new file mode 100644
index 0000000..b226b4e
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:18:25: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   int Function(int) f = alias;
+//                         ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:20:7: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:21:21: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   int Function(int) h = c;
+//                     ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:22:3: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:23:10: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'int Function(int)'.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:18:25: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  int Function(int) f = alias;
+                        ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  (core::int) → core::int g;
+  g = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:20:7: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  g = alias;
+      ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  (core::int) → core::int h = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:21:21: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  int Function(int) h = c;
+                    ^" in (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%}) as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  g = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:22:3: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  g = c;
+  ^" in (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%}) as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  self::method(invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:23:10: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'int Function(int)'.
+  method(alias);
+         ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.outline.expect b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.outline.expect
new file mode 100644
index 0000000..20c75c3
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.outline.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    ;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  ;
+static method method((core::int) → core::int f) → dynamic
+  ;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.transformed.expect
new file mode 100644
index 0000000..b226b4e
--- /dev/null
+++ b/pkg/front_end/testcases/general/implicit_instantiation.dart.weak.transformed.expect
@@ -0,0 +1,62 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:18:25: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   int Function(int) f = alias;
+//                         ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:20:7: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   g = alias;
+//       ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:21:21: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   int Function(int) h = c;
+//                     ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:22:3: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+//   g = c;
+//   ^
+//
+// pkg/front_end/testcases/general/implicit_instantiation.dart:23:10: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'int Function(int)'.
+//   method(alias);
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class
+    : super core::Object::•()
+    ;
+  method call<T extends core::Object? = dynamic>(self::Class::call::T% t) → self::Class::call::T%
+    return t;
+}
+static field <T extends core::Object? = dynamic>(T%) → T% alias = #C1;
+static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
+  return t;
+static method method((core::int) → core::int f) → dynamic {}
+static method test() → dynamic {
+  self::Class c = new self::Class::•();
+  (core::int) → core::int f = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:18:25: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  int Function(int) f = alias;
+                        ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  (core::int) → core::int g;
+  g = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:20:7: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  g = alias;
+      ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  (core::int) → core::int h = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:21:21: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  int Function(int) h = c;
+                    ^" in (let final self::Class #t1 = c in #t1 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t1.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%}) as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  g = invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:22:3: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
+  g = c;
+  ^" in (let final self::Class #t2 = c in #t2 == null ?{<T extends core::Object? = dynamic>(T%) → T%} null : #t2.{self::Class::call}{<T extends core::Object? = dynamic>(T%) → T%}) as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
+  self::method(invalid-expression "pkg/front_end/testcases/general/implicit_instantiation.dart:23:10: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'int Function(int)'.
+  method(alias);
+         ^" in self::alias as{TypeError,ForNonNullableByDefault} (core::int) → core::int);
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = static-tearoff self::id
+}
diff --git a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.expect b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.expect
index 475cdb3..4796a9b 100644
--- a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.expect
+++ b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.expect
@@ -173,11 +173,11 @@
   field core::int* field7 = null;
   field core::int* field8 = null;
   field dynamic field9 = null;
-  generic-covariant-impl field self::A::T* field10 = null;
-  generic-covariant-impl field self::A::T* field11 = null;
-  generic-covariant-impl field self::A::T* field12 = null;
-  generic-covariant-impl field self::A::T* field13 = null;
-  generic-covariant-impl field self::A::T* field14 = null;
+  covariant-by-class field self::A::T* field10 = null;
+  covariant-by-class field self::A::T* field11 = null;
+  covariant-by-class field self::A::T* field12 = null;
+  covariant-by-class field self::A::T* field13 = null;
+  covariant-by-class field self::A::T* field14 = null;
   field core::int* field15 = 0;
   field core::int* field16 = null;
   field core::int* field17 = 0;
@@ -206,11 +206,11 @@
   field core::int* field7 = null;
   field core::String* field8 = null;
   field dynamic field9 = null;
-  generic-covariant-impl field self::B::T* field10 = null;
-  generic-covariant-impl field self::B::S* field11 = null;
-  generic-covariant-impl field self::B::T* field12 = null;
-  generic-covariant-impl field self::B::T* field13 = null;
-  generic-covariant-impl field self::B::S* field14 = null;
+  covariant-by-class field self::B::T* field10 = null;
+  covariant-by-class field self::B::S* field11 = null;
+  covariant-by-class field self::B::T* field12 = null;
+  covariant-by-class field self::B::T* field13 = null;
+  covariant-by-class field self::B::S* field14 = null;
   field core::int* field15 = null;
   field core::int* field16 = 0;
   field core::String* field17 = null;
@@ -239,11 +239,11 @@
   field core::int* field7 = 0;
   field invalid-type field8 = 0;
   field dynamic field9;
-  generic-covariant-impl field core::int* field10;
-  generic-covariant-impl field invalid-type field11;
-  generic-covariant-impl field core::int* field12;
-  generic-covariant-impl field core::int* field13 = 0;
-  generic-covariant-impl field core::int* field14;
+  covariant-by-class field core::int* field10;
+  covariant-by-class field invalid-type field11;
+  covariant-by-class field core::int* field12;
+  covariant-by-class field core::int* field13 = 0;
+  covariant-by-class field core::int* field14;
   field core::int* field15;
   field core::int* field16;
   field invalid-type field17;
@@ -272,11 +272,11 @@
   field core::int* field7 = 0;
   field invalid-type field8 = 0;
   field dynamic field9;
-  generic-covariant-impl field self::D::T* field10;
-  generic-covariant-impl field self::D::T* field11;
-  generic-covariant-impl field self::D::T* field12;
-  generic-covariant-impl field self::D::T* field13 = null;
-  generic-covariant-impl field self::D::T* field14;
+  covariant-by-class field self::D::T* field10;
+  covariant-by-class field self::D::T* field11;
+  covariant-by-class field self::D::T* field12;
+  covariant-by-class field self::D::T* field13 = null;
+  covariant-by-class field self::D::T* field14;
   field core::int* field15;
   field core::int* field16;
   field invalid-type field17;
diff --git a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.outline.expect b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.outline.expect
index bd4c14f..e59bd1f 100644
--- a/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/infer_field_from_multiple.dart.weak.outline.expect
@@ -173,11 +173,11 @@
   field core::int* field7;
   field core::int* field8;
   field dynamic field9;
-  generic-covariant-impl field self::A::T* field10;
-  generic-covariant-impl field self::A::T* field11;
-  generic-covariant-impl field self::A::T* field12;
-  generic-covariant-impl field self::A::T* field13;
-  generic-covariant-impl field self::A::T* field14;
+  covariant-by-class field self::A::T* field10;
+  covariant-by-class field self::A::T* field11;
+  covariant-by-class field self::A::T* field12;
+  covariant-by-class field self::A::T* field13;
+  covariant-by-class field self::A::T* field14;
   field core::int* field15;
   field core::int* field16;
   field core::int* field17;
@@ -205,11 +205,11 @@
   field core::int* field7;
   field core::String* field8;
   field dynamic field9;
-  generic-covariant-impl field self::B::T* field10;
-  generic-covariant-impl field self::B::S* field11;
-  generic-covariant-impl field self::B::T* field12;
-  generic-covariant-impl field self::B::T* field13;
-  generic-covariant-impl field self::B::S* field14;
+  covariant-by-class field self::B::T* field10;
+  covariant-by-class field self::B::S* field11;
+  covariant-by-class field self::B::T* field12;
+  covariant-by-class field self::B::T* field13;
+  covariant-by-class field self::B::S* field14;
   field core::int* field15;
   field core::int* field16;
   field core::String* field17;
@@ -237,11 +237,11 @@
   field core::int* field7;
   field invalid-type field8;
   field dynamic field9;
-  generic-covariant-impl field core::int* field10;
-  generic-covariant-impl field invalid-type field11;
-  generic-covariant-impl field core::int* field12;
-  generic-covariant-impl field core::int* field13;
-  generic-covariant-impl field core::int* field14;
+  covariant-by-class field core::int* field10;
+  covariant-by-class field invalid-type field11;
+  covariant-by-class field core::int* field12;
+  covariant-by-class field core::int* field13;
+  covariant-by-class field core::int* field14;
   field core::int* field15;
   field core::int* field16;
   field invalid-type field17;
@@ -269,11 +269,11 @@
   field core::int* field7;
   field invalid-type field8;
   field dynamic field9;
-  generic-covariant-impl field self::D::T* field10;
-  generic-covariant-impl field self::D::T* field11;
-  generic-covariant-impl field self::D::T* field12;
-  generic-covariant-impl field self::D::T* field13;
-  generic-covariant-impl field self::D::T* field14;
+  covariant-by-class field self::D::T* field10;
+  covariant-by-class field self::D::T* field11;
+  covariant-by-class field self::D::T* field12;
+  covariant-by-class field self::D::T* field13;
+  covariant-by-class field self::D::T* field14;
   field core::int* field15;
   field core::int* field16;
   field invalid-type field17;
diff --git a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.expect b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.expect
index 14a0d6d..68f6ac0 100644
--- a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.expect
+++ b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.expect
@@ -26,7 +26,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::A::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::A::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.outline.expect b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.outline.expect
index cef92db..014249d 100644
--- a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.outline.expect
@@ -25,7 +25,7 @@
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T*>*
     ;
-  abstract method f(generic-covariant-impl self::A::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::A::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.transformed.expect b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.transformed.expect
index 14a0d6d..68f6ac0 100644
--- a/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/interface_covariantInterface_from_class.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::A::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::A::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/invalid_operator.dart.weak.expect b/pkg/front_end/testcases/general/invalid_operator.dart.weak.expect
index 85568b7..c3f1e06 100644
--- a/pkg/front_end/testcases/general/invalid_operator.dart.weak.expect
+++ b/pkg/front_end/testcases/general/invalid_operator.dart.weak.expect
@@ -564,37 +564,37 @@
 // Try adding explicit types.
 //   operator ==<T>(a) => true;
 //            ^^
-// sdk/lib/_internal/vm/lib/object_patch.dart:26:17: Context: This is one of the overridden members.
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is one of the overridden members.
+//   external bool operator ==(Object other);
+//                          ^^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect b/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
index 9474e68..c1ee228 100644
--- a/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/invalid_operator.dart.weak.outline.expect
@@ -564,37 +564,37 @@
 // Try adding explicit types.
 //   operator ==<T>(a) => true;
 //            ^^
-// sdk/lib/_internal/vm/lib/object_patch.dart:26:17: Context: This is one of the overridden members.
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is one of the overridden members.
+//   external bool operator ==(Object other);
+//                          ^^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue129167943.dart b/pkg/front_end/testcases/general/issue129167943.dart
index 5b7a3cd..73d1967 100644
--- a/pkg/front_end/testcases/general/issue129167943.dart
+++ b/pkg/front_end/testcases/general/issue129167943.dart
@@ -1,7 +1,9 @@
 // Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 // @dart=2.9
+
 abstract class A {}
 
 abstract class B {
diff --git a/pkg/front_end/testcases/general/issue129167943.dart.weak.expect b/pkg/front_end/testcases/general/issue129167943.dart.weak.expect
index a21207c..dbcaed7 100644
--- a/pkg/front_end/testcases/general/issue129167943.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue129167943.dart.weak.expect
@@ -37,7 +37,7 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::D1*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -69,7 +69,7 @@
   synthetic constructor •() → self::D2*
     : super core::Object::•()
     ;
-  method foo(covariant core::int* x) → void {}
+  method foo(covariant-by-declaration core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -95,13 +95,13 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method foo(covariant core::num* x) → void;
+  abstract forwarding-stub method foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class D4 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D4*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -117,7 +117,7 @@
   synthetic constructor •() → self::D5*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::num* x) → void;
+  abstract method foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -149,7 +149,7 @@
   synthetic constructor •() → self::G*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -165,7 +165,7 @@
   synthetic constructor •() → self::H1*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -181,7 +181,7 @@
   synthetic constructor •() → self::H2*
     : super core::Object::•()
     ;
-  set foo(covariant core::int* x) → void {}
+  set foo(covariant-by-declaration core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -207,13 +207,13 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub set foo(covariant core::num* x) → void;
+  abstract forwarding-stub set foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class H4 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H4*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -229,7 +229,7 @@
   synthetic constructor •() → self::H5*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::num* x) → void;
+  abstract set foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue129167943.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue129167943.dart.weak.outline.expect
index 4a3fad8..6d18c9a 100644
--- a/pkg/front_end/testcases/general/issue129167943.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue129167943.dart.weak.outline.expect
@@ -34,7 +34,7 @@
 abstract class C extends core::Object implements self::B {
   synthetic constructor •() → self::C*
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -49,7 +49,7 @@
 abstract class D1 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D1*
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -64,7 +64,7 @@
 class D2 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D2*
     ;
-  method foo(covariant core::int* x) → void
+  method foo(covariant-by-declaration core::int* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -90,12 +90,12 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method foo(covariant core::num* x) → void;
+  abstract forwarding-stub method foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class D4 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D4*
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -110,7 +110,7 @@
 abstract class D5 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D5*
     ;
-  abstract method foo(covariant core::num* x) → void;
+  abstract method foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -140,7 +140,7 @@
 abstract class G extends core::Object implements self::E {
   synthetic constructor •() → self::G*
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -155,7 +155,7 @@
 abstract class H1 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H1*
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -170,7 +170,7 @@
 class H2 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H2*
     ;
-  set foo(covariant core::int* x) → void
+  set foo(covariant-by-declaration core::int* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -196,12 +196,12 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub set foo(covariant core::num* x) → void;
+  abstract forwarding-stub set foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class H4 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H4*
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -216,7 +216,7 @@
 abstract class H5 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H5*
     ;
-  abstract set foo(covariant core::num* x) → void;
+  abstract set foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue129167943.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue129167943.dart.weak.transformed.expect
index a21207c..dbcaed7 100644
--- a/pkg/front_end/testcases/general/issue129167943.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue129167943.dart.weak.transformed.expect
@@ -37,7 +37,7 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::D1*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -69,7 +69,7 @@
   synthetic constructor •() → self::D2*
     : super core::Object::•()
     ;
-  method foo(covariant core::int* x) → void {}
+  method foo(covariant-by-declaration core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -95,13 +95,13 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method foo(covariant core::num* x) → void;
+  abstract forwarding-stub method foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class D4 extends core::Object implements self::A, self::C, self::B {
   synthetic constructor •() → self::D4*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::int* x) → void;
+  abstract method foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -117,7 +117,7 @@
   synthetic constructor •() → self::D5*
     : super core::Object::•()
     ;
-  abstract method foo(covariant core::num* x) → void;
+  abstract method foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -149,7 +149,7 @@
   synthetic constructor •() → self::G*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -165,7 +165,7 @@
   synthetic constructor •() → self::H1*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -181,7 +181,7 @@
   synthetic constructor •() → self::H2*
     : super core::Object::•()
     ;
-  set foo(covariant core::int* x) → void {}
+  set foo(covariant-by-declaration core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -207,13 +207,13 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub set foo(covariant core::num* x) → void;
+  abstract forwarding-stub set foo(covariant-by-declaration core::num* x) → void;
 }
 abstract class H4 extends core::Object implements self::A, self::E, self::G {
   synthetic constructor •() → self::H4*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::int* x) → void;
+  abstract set foo(covariant-by-declaration core::int* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -229,7 +229,7 @@
   synthetic constructor •() → self::H5*
     : super core::Object::•()
     ;
-  abstract set foo(covariant core::num* x) → void;
+  abstract set foo(covariant-by-declaration core::num* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue34899.dart.weak.expect b/pkg/front_end/testcases/general/issue34899.dart.weak.expect
index 0d6c4cf..c1735e3 100644
--- a/pkg/front_end/testcases/general/issue34899.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue34899.dart.weak.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field () →* asy::Future<dynamic>* quux;
-  generic-covariant-impl field self::Foo::T* t;
+  covariant-by-class field self::Foo::T* t;
   constructor •(() →* asy::Future<dynamic>* quux, self::Foo::T* t) → self::Foo<self::Foo::T*>*
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/issue34899.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue34899.dart.weak.outline.expect
index ada0c39..d15bcb7 100644
--- a/pkg/front_end/testcases/general/issue34899.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue34899.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field () →* asy::Future<dynamic>* quux;
-  generic-covariant-impl field self::Foo::T* t;
+  covariant-by-class field self::Foo::T* t;
   constructor •(() →* asy::Future<dynamic>* quux, self::Foo::T* t) → self::Foo<self::Foo::T*>*
     ;
   method call() → asy::Future<self::Foo::T*>*
diff --git a/pkg/front_end/testcases/general/issue34899.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue34899.dart.weak.transformed.expect
index 0d6c4cf..c1735e3 100644
--- a/pkg/front_end/testcases/general/issue34899.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue34899.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
   final field () →* asy::Future<dynamic>* quux;
-  generic-covariant-impl field self::Foo::T* t;
+  covariant-by-class field self::Foo::T* t;
   constructor •(() →* asy::Future<dynamic>* quux, self::Foo::T* t) → self::Foo<self::Foo::T*>*
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/issue39344.dart.weak.expect b/pkg/front_end/testcases/general/issue39344.dart.weak.expect
index 1c006fb..fd2787d 100644
--- a/pkg/front_end/testcases/general/issue39344.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue39344.dart.weak.expect
@@ -41,7 +41,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method1a(generic-covariant-impl self::Class::T* t) → void {
+  method method1a(covariant-by-class self::Class::T* t) → void {
     if(t is self::B*) {
       core::List<self::Class::T*>* ys = <self::Class::T*>[t{self::Class::T* & self::B* /* '*' & '*' = '*' */}];
       self::xs = invalid-expression "pkg/front_end/testcases/general/issue39344.dart:19:12: Error: A value of type 'List<T>' can't be assigned to a variable of type 'List<B>'.
@@ -51,7 +51,7 @@
            ^" in ys as{TypeError} core::List<self::B*>*;
     }
   }
-  method method1b(generic-covariant-impl self::Class::T* t) → void {
+  method method1b(covariant-by-class self::Class::T* t) → void {
     if(t is self::B*) {
       core::List<core::List<self::Class::T*>*>* yss = <core::List<self::Class::T*>*>[<self::Class::T*>[t{self::Class::T* & self::B* /* '*' & '*' = '*' */}]];
       self::xss = invalid-expression "pkg/front_end/testcases/general/issue39344.dart:31:13: Error: A value of type 'List<List<T>>' can't be assigned to a variable of type 'List<List<B>>'.
@@ -61,7 +61,7 @@
             ^" in yss as{TypeError} core::List<core::List<self::B*>*>*;
     }
   }
-  method method2a(generic-covariant-impl self::Class::T* t) → void {
+  method method2a(covariant-by-class self::Class::T* t) → void {
     dynamic alias;
     if(t is self::B*) {
       core::List<self::Class::T*>* ys = <self::Class::T*>[t{self::Class::T* & self::B* /* '*' & '*' = '*' */}];
@@ -69,7 +69,7 @@
       self::xs = alias as{TypeError,ForDynamic} core::List<self::B*>*;
     }
   }
-  method method2b(generic-covariant-impl self::Class::T* t) → void {
+  method method2b(covariant-by-class self::Class::T* t) → void {
     dynamic alias;
     if(t is self::B*) {
       core::List<core::List<self::Class::T*>*>* yss = <core::List<self::Class::T*>*>[<self::Class::T*>[t{self::Class::T* & self::B* /* '*' & '*' = '*' */}]];
diff --git a/pkg/front_end/testcases/general/issue39344.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue39344.dart.weak.outline.expect
index 03e1065..49bc2e6 100644
--- a/pkg/front_end/testcases/general/issue39344.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue39344.dart.weak.outline.expect
@@ -23,13 +23,13 @@
 class Class<T extends self::A*> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::T*>*
     ;
-  method method1a(generic-covariant-impl self::Class::T* t) → void
+  method method1a(covariant-by-class self::Class::T* t) → void
     ;
-  method method1b(generic-covariant-impl self::Class::T* t) → void
+  method method1b(covariant-by-class self::Class::T* t) → void
     ;
-  method method2a(generic-covariant-impl self::Class::T* t) → void
+  method method2a(covariant-by-class self::Class::T* t) → void
     ;
-  method method2b(generic-covariant-impl self::Class::T* t) → void
+  method method2b(covariant-by-class self::Class::T* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/issue39344.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue39344.dart.weak.transformed.expect
index eecd076..0e2b847 100644
--- a/pkg/front_end/testcases/general/issue39344.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue39344.dart.weak.transformed.expect
@@ -41,7 +41,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method1a(generic-covariant-impl self::Class::T* t) → void {
+  method method1a(covariant-by-class self::Class::T* t) → void {
     if(t is self::B*) {
       core::List<self::Class::T*>* ys = core::_GrowableList::_literal1<self::Class::T*>(t{self::Class::T* & self::B* /* '*' & '*' = '*' */});
       self::xs = invalid-expression "pkg/front_end/testcases/general/issue39344.dart:19:12: Error: A value of type 'List<T>' can't be assigned to a variable of type 'List<B>'.
@@ -51,7 +51,7 @@
            ^" in ys as{TypeError} core::List<self::B*>*;
     }
   }
-  method method1b(generic-covariant-impl self::Class::T* t) → void {
+  method method1b(covariant-by-class self::Class::T* t) → void {
     if(t is self::B*) {
       core::List<core::List<self::Class::T*>*>* yss = core::_GrowableList::_literal1<core::List<self::Class::T*>*>(core::_GrowableList::_literal1<self::Class::T*>(t{self::Class::T* & self::B* /* '*' & '*' = '*' */}));
       self::xss = invalid-expression "pkg/front_end/testcases/general/issue39344.dart:31:13: Error: A value of type 'List<List<T>>' can't be assigned to a variable of type 'List<List<B>>'.
@@ -61,7 +61,7 @@
             ^" in yss as{TypeError} core::List<core::List<self::B*>*>*;
     }
   }
-  method method2a(generic-covariant-impl self::Class::T* t) → void {
+  method method2a(covariant-by-class self::Class::T* t) → void {
     dynamic alias;
     if(t is self::B*) {
       core::List<self::Class::T*>* ys = core::_GrowableList::_literal1<self::Class::T*>(t{self::Class::T* & self::B* /* '*' & '*' = '*' */});
@@ -69,7 +69,7 @@
       self::xs = alias as{TypeError,ForDynamic} core::List<self::B*>*;
     }
   }
-  method method2b(generic-covariant-impl self::Class::T* t) → void {
+  method method2b(covariant-by-class self::Class::T* t) → void {
     dynamic alias;
     if(t is self::B*) {
       core::List<core::List<self::Class::T*>*>* yss = core::_GrowableList::_literal1<core::List<self::Class::T*>*>(core::_GrowableList::_literal1<self::Class::T*>(t{self::Class::T* & self::B* /* '*' & '*' = '*' */}));
diff --git a/pkg/front_end/testcases/general/issue40744.dart.weak.expect b/pkg/front_end/testcases/general/issue40744.dart.weak.expect
index b193d72..cab8593 100644
--- a/pkg/front_end/testcases/general/issue40744.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue40744.dart.weak.expect
@@ -2,18 +2,17 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::Map<core::String*, dynamic>* generatorConfigDefaultJson = #C4;
+static const field core::Map<core::String*, dynamic>* generatorConfigDefaultJson = #C3;
 static method helper(core::Map<core::String*, dynamic>* input) → void {
   core::print(input);
 }
 static method main() → void {
-  final core::Map<core::String*, Null>* nullValueMap = core::Map::fromEntries<core::String*, Null>((#C4).{core::Map::entries}{core::Iterable<core::MapEntry<core::String*, dynamic>*>*}.{core::Iterable::map}<core::MapEntry<core::String*, Null>*>((core::MapEntry<core::String*, dynamic>* e) → core::MapEntry<core::String*, Null>* => new core::MapEntry::_<core::String*, Null>(e.{core::MapEntry::key}{core::String*}, null)){((core::MapEntry<core::String*, dynamic>*) →* core::MapEntry<core::String*, Null>*) →* core::Iterable<core::MapEntry<core::String*, Null>*>*});
+  final core::Map<core::String*, Null>* nullValueMap = core::Map::fromEntries<core::String*, Null>(#C3.{core::Map::entries}{core::Iterable<core::MapEntry<core::String*, dynamic>*>*}.{core::Iterable::map}<core::MapEntry<core::String*, Null>*>((core::MapEntry<core::String*, dynamic>* e) → core::MapEntry<core::String*, Null>* => new core::MapEntry::_<core::String*, Null>(e.{core::MapEntry::key}{core::String*}, null)){((core::MapEntry<core::String*, dynamic>*) →* core::MapEntry<core::String*, Null>*) →* core::Iterable<core::MapEntry<core::String*, Null>*>*});
   self::helper(nullValueMap);
 }
 
 constants  {
   #C1 = "a"
   #C2 = 1
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::String*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::String*, dynamic>{#C1:#C2)
 }
diff --git a/pkg/front_end/testcases/general/issue40744.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue40744.dart.weak.outline.expect
index 3b367f6..5acf79e 100644
--- a/pkg/front_end/testcases/general/issue40744.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue40744.dart.weak.outline.expect
@@ -10,5 +10,5 @@
 
 
 Extra constant evaluation status:
-Evaluated: MapLiteral @ org-dartlang-testcase:///issue40744.dart:5:53 -> InstanceConstant(const _ImmutableMap<String*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>["a", 1]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///issue40744.dart:5:53 -> MapConstant(const <String*, dynamic>{"a": 1})
 Extra constant evaluation: evaluated: 1, effectively constant: 1
diff --git a/pkg/front_end/testcases/general/issue40744.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue40744.dart.weak.transformed.expect
index b193d72..cab8593 100644
--- a/pkg/front_end/testcases/general/issue40744.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue40744.dart.weak.transformed.expect
@@ -2,18 +2,17 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::Map<core::String*, dynamic>* generatorConfigDefaultJson = #C4;
+static const field core::Map<core::String*, dynamic>* generatorConfigDefaultJson = #C3;
 static method helper(core::Map<core::String*, dynamic>* input) → void {
   core::print(input);
 }
 static method main() → void {
-  final core::Map<core::String*, Null>* nullValueMap = core::Map::fromEntries<core::String*, Null>((#C4).{core::Map::entries}{core::Iterable<core::MapEntry<core::String*, dynamic>*>*}.{core::Iterable::map}<core::MapEntry<core::String*, Null>*>((core::MapEntry<core::String*, dynamic>* e) → core::MapEntry<core::String*, Null>* => new core::MapEntry::_<core::String*, Null>(e.{core::MapEntry::key}{core::String*}, null)){((core::MapEntry<core::String*, dynamic>*) →* core::MapEntry<core::String*, Null>*) →* core::Iterable<core::MapEntry<core::String*, Null>*>*});
+  final core::Map<core::String*, Null>* nullValueMap = core::Map::fromEntries<core::String*, Null>(#C3.{core::Map::entries}{core::Iterable<core::MapEntry<core::String*, dynamic>*>*}.{core::Iterable::map}<core::MapEntry<core::String*, Null>*>((core::MapEntry<core::String*, dynamic>* e) → core::MapEntry<core::String*, Null>* => new core::MapEntry::_<core::String*, Null>(e.{core::MapEntry::key}{core::String*}, null)){((core::MapEntry<core::String*, dynamic>*) →* core::MapEntry<core::String*, Null>*) →* core::Iterable<core::MapEntry<core::String*, Null>*>*});
   self::helper(nullValueMap);
 }
 
 constants  {
   #C1 = "a"
   #C2 = 1
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::String*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::String*, dynamic>{#C1:#C2)
 }
diff --git a/pkg/front_end/testcases/general/issue41070.dart.weak.expect b/pkg/front_end/testcases/general/issue41070.dart.weak.expect
index 7a1c9bb..d159c73 100644
--- a/pkg/front_end/testcases/general/issue41070.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41070.dart.weak.expect
@@ -39,7 +39,7 @@
     ;
 }
 static method main() → dynamic {
-  self::expect(42, (#C2).{self::Base::x}{core::int*});
+  self::expect(42, #C2.{self::Base::x}{core::int*});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
diff --git a/pkg/front_end/testcases/general/issue41070.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue41070.dart.weak.transformed.expect
index b7cbfbd..655d5ae 100644
--- a/pkg/front_end/testcases/general/issue41070.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue41070.dart.weak.transformed.expect
@@ -39,7 +39,7 @@
     ;
 }
 static method main() → dynamic {
-  self::expect(42, (#C2).{self::Base::x}{core::int*});
+  self::expect(42, #C2.{self::Base::x}{core::int*});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
diff --git a/pkg/front_end/testcases/general/issue41210a.dart.weak.expect b/pkg/front_end/testcases/general/issue41210a.dart.weak.expect
index b5abffb..f270273 100644
--- a/pkg/front_end/testcases/general/issue41210a.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210a.dart.weak.expect
@@ -35,7 +35,7 @@
   synthetic constructor •() → self::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -109,7 +109,7 @@
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -142,7 +142,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
diff --git a/pkg/front_end/testcases/general/issue41210a.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210a.dart.weak.outline.expect
index 406be0d..3333d00 100644
--- a/pkg/front_end/testcases/general/issue41210a.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210a.dart.weak.outline.expect
@@ -33,7 +33,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -104,7 +104,7 @@
 abstract class D extends core::Object implements self::Interface, self::Interface2 {
   synthetic constructor •() → self::D*
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -137,7 +137,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
diff --git a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.expect b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.expect
index 34d1b47..daf4b8e 100644
--- a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -68,7 +68,7 @@
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -101,7 +101,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
diff --git a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.outline.expect
index babe287..0a5819f 100644
--- a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.outline.expect
@@ -20,7 +20,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -64,7 +64,7 @@
 abstract class D extends core::Object implements self::Interface, self::Interface2 {
   synthetic constructor •() → self::D*
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -97,7 +97,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
diff --git a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.transformed.expect
index bb1ef4a..9d9b4f1 100644
--- a/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue41210a_no_error.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -68,7 +68,7 @@
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -101,7 +101,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.expect
index b2f0c55..bb04fa2 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.expect
@@ -67,7 +67,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -130,7 +130,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -186,7 +186,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
 }
 abstract class F extends core::Object implements iss::Interface {
   synthetic constructor •() → iss::F*
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.outline.expect
index 5c63262..3657882 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.weak.outline.expect
@@ -66,7 +66,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -124,7 +124,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → iss::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -178,7 +178,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
 }
 abstract class F extends core::Object implements iss::Interface {
   synthetic constructor •() → iss::F*
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.expect
index 1692897..038d724 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.expect
@@ -67,7 +67,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -130,7 +130,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -176,7 +176,7 @@
   synthetic constructor •() → iss::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.outline.expect
index 17ea021..1f7c974 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210.no_link.dart.weak.outline.expect
@@ -66,7 +66,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -124,7 +124,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → iss::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -168,7 +168,7 @@
 abstract class D extends core::Object implements iss::Interface, iss::Interface2 {
   synthetic constructor •() → iss::D*
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.expect
index 26a6ec7..9691295 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -87,7 +87,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -143,7 +143,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
 }
 abstract class F extends core::Object implements iss::Interface {
   synthetic constructor •() → iss::F*
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.outline.expect
index e89c33b..90aecca 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.outline.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -84,7 +84,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → iss::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -138,7 +138,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
 }
 abstract class F extends core::Object implements iss::Interface {
   synthetic constructor •() → iss::F*
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.transformed.expect
index b06070d..8aae15b 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -87,7 +87,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -143,7 +143,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
 }
 abstract class F extends core::Object implements iss::Interface {
   synthetic constructor •() → iss::F*
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.expect
index 004a42d..cf99014 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -87,7 +87,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -133,7 +133,7 @@
   synthetic constructor •() → iss::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.outline.expect
index f82c8a7..ac90189 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.outline.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -84,7 +84,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → iss::Interface2*
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -128,7 +128,7 @@
 abstract class D extends core::Object implements iss::Interface, iss::Interface2 {
   synthetic constructor •() → iss::D*
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.transformed.expect
index f7cf6a9..079856d 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210_no_error.no_link.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E&Object&A&D*
     : super self::_E&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E&Object&A::method}(i, s: s);
 }
 class E extends self::_E&Object&A&D {
@@ -87,7 +87,7 @@
   synthetic constructor •() → iss::Interface2*
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int* i) → core::String*;
+  abstract method method(covariant-by-declaration core::int* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -133,7 +133,7 @@
   synthetic constructor •() → iss::D*
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num* i) → core::String*;
+  abstract forwarding-stub method method(covariant-by-declaration core::num* i) → core::String*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/general/issue42997.dart.weak.expect b/pkg/front_end/testcases/general/issue42997.dart.weak.expect
index 8e7c300..b11e219 100644
--- a/pkg/front_end/testcases/general/issue42997.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue42997.dart.weak.expect
@@ -61,7 +61,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '>>' operator.
     for (PropertyState<Object, Object>> state in _states) ;
-                                     ^^" in (#C1){<unresolved>}.>>(invalid-expression "pkg/front_end/testcases/general/issue42997.dart:12:41: Error: The getter 'state' isn't defined for the class 'PropertyState#1<I, O>'.
+                                     ^^" in #C1{<unresolved>}.>>(invalid-expression "pkg/front_end/testcases/general/issue42997.dart:12:41: Error: The getter 'state' isn't defined for the class 'PropertyState#1<I, O>'.
  - 'PropertyState#1' is from 'pkg/front_end/testcases/general/issue42997.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'state'.
     for (PropertyState<Object, Object>> state in _states) ;
diff --git a/pkg/front_end/testcases/general/issue42997.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue42997.dart.weak.transformed.expect
index 8e7c300..b11e219 100644
--- a/pkg/front_end/testcases/general/issue42997.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue42997.dart.weak.transformed.expect
@@ -61,7 +61,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '>>' operator.
     for (PropertyState<Object, Object>> state in _states) ;
-                                     ^^" in (#C1){<unresolved>}.>>(invalid-expression "pkg/front_end/testcases/general/issue42997.dart:12:41: Error: The getter 'state' isn't defined for the class 'PropertyState#1<I, O>'.
+                                     ^^" in #C1{<unresolved>}.>>(invalid-expression "pkg/front_end/testcases/general/issue42997.dart:12:41: Error: The getter 'state' isn't defined for the class 'PropertyState#1<I, O>'.
  - 'PropertyState#1' is from 'pkg/front_end/testcases/general/issue42997.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'state'.
     for (PropertyState<Object, Object>> state in _states) ;
diff --git a/pkg/front_end/testcases/general/issue45003/main.dart.weak.expect b/pkg/front_end/testcases/general/issue45003/main.dart.weak.expect
index 56f882f..d009d81 100644
--- a/pkg/front_end/testcases/general/issue45003/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue45003/main.dart.weak.expect
@@ -5,7 +5,7 @@
 
 import "org-dartlang-testcase:///foo_lib.dart";
 
-static const field core::Set<foo::Foo> foo = #C5;
+static const field core::Set<foo::Foo> foo = #C2;
 static method main() → dynamic {}
 
 library /*isNonNullableByDefault*/;
@@ -41,10 +41,7 @@
 
 constants  {
   #C1 = bar::Bar<dynamic> {}
-  #C2 = null
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<foo::Foo*, Null> {_kvPairs:#C3}
-  #C5 = col::_UnmodifiableSet<foo::Foo*> {_map:#C4}
+  #C2 = <foo::Foo*>{#C1}
 }
 
 
diff --git a/pkg/front_end/testcases/general/issue45003/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue45003/main.dart.weak.outline.expect
index db7011d..277bd57 100644
--- a/pkg/front_end/testcases/general/issue45003/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue45003/main.dart.weak.outline.expect
@@ -43,5 +43,5 @@
 
 
 Extra constant evaluation status:
-Evaluated: SetLiteral @ org-dartlang-testcase:///main.dart:7:27 -> InstanceConstant(const _UnmodifiableSet<Foo*>{_UnmodifiableSet._map: const _ImmutableMap<Foo*, Null>{_ImmutableMap._kvPairs: const <dynamic>[const Bar<dynamic>{}, null]}})
+Evaluated: SetLiteral @ org-dartlang-testcase:///main.dart:7:27 -> SetConstant(const <Foo*>{const Bar<dynamic>{}})
 Extra constant evaluation: evaluated: 4, effectively constant: 1
diff --git a/pkg/front_end/testcases/general/issue45003/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue45003/main.dart.weak.transformed.expect
index 56f882f..d009d81 100644
--- a/pkg/front_end/testcases/general/issue45003/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue45003/main.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 
 import "org-dartlang-testcase:///foo_lib.dart";
 
-static const field core::Set<foo::Foo> foo = #C5;
+static const field core::Set<foo::Foo> foo = #C2;
 static method main() → dynamic {}
 
 library /*isNonNullableByDefault*/;
@@ -41,10 +41,7 @@
 
 constants  {
   #C1 = bar::Bar<dynamic> {}
-  #C2 = null
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<foo::Foo*, Null> {_kvPairs:#C3}
-  #C5 = col::_UnmodifiableSet<foo::Foo*> {_map:#C4}
+  #C2 = <foo::Foo*>{#C1}
 }
 
 
diff --git a/pkg/front_end/testcases/general/issue46389.dart b/pkg/front_end/testcases/general/issue46389.dart
new file mode 100644
index 0000000..b1acb26
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart
@@ -0,0 +1,52 @@
+// 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.
+
+class A {
+  num foo(int n) {
+    print(n.runtimeType); // 'double'
+    return 1.1;
+  }
+
+  num bar({required int x}) {
+    print(x.runtimeType); // 'double'
+    return 1.1;
+  }
+
+  void set baz(int x) {
+    print(x.runtimeType); // 'double'
+  }
+
+  int boz = 0;
+}
+
+abstract class B<X> {
+  X foo(X x);
+  X bar({required X x});
+  void set baz(X x);
+  void set boz(X x);
+}
+
+class C extends A with B<num> {}
+
+void main() {
+  C a = C();
+  a.foo(1);
+  throws(() => a.foo(1.2));
+  a.bar(x: 1);
+  throws(() => a.bar(x: 1.2));
+  a.baz = 1;
+  throws(() => a.baz = 1.2);
+  a.boz = 1;
+  throws(() => a.boz = 1.2);
+}
+
+throws(void Function() f) {
+  try {
+    f();
+  } catch (e) {
+    print(e);
+    return;
+  }
+  throw 'Exception expected';
+}
diff --git a/pkg/front_end/testcases/general/issue46389.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue46389.dart.textual_outline.expect
new file mode 100644
index 0000000..8c1997d
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart.textual_outline.expect
@@ -0,0 +1,18 @@
+class A {
+  num foo(int n) {}
+  num bar({required int x}) {}
+  void set baz(int x) {}
+  int boz = 0;
+}
+
+abstract class B<X> {
+  X foo(X x);
+  X bar({required X x});
+  void set baz(X x);
+  void set boz(X x);
+}
+
+class C extends A with B<num> {}
+
+void main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue46389.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue46389.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8aae483
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart.textual_outline_modelled.expect
@@ -0,0 +1,18 @@
+abstract class B<X> {
+  X bar({required X x});
+  X foo(X x);
+  void set baz(X x);
+  void set boz(X x);
+}
+
+class A {
+  int boz = 0;
+  num bar({required int x}) {}
+  num foo(int n) {}
+  void set baz(int x) {}
+}
+
+class C extends A with B<num> {}
+
+throws(void Function() f) {}
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue46389.dart.weak.expect b/pkg/front_end/testcases/general/issue46389.dart.weak.expect
new file mode 100644
index 0000000..55be1b7
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart.weak.expect
@@ -0,0 +1,73 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int boz = 0;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method foo(core::int n) → core::num {
+    core::print(n.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+  method bar({required core::int x = #C1}) → core::num {
+    core::print(x.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+  set baz(core::int x) → void {
+    core::print(x.{core::Object::runtimeType}{core::Type});
+  }
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+  abstract method bar({required covariant-by-class self::B::X% x = #C1}) → self::B::X%;
+  abstract set baz(covariant-by-class self::B::X% x) → void;
+  abstract set boz(covariant-by-class self::B::X% x) → void;
+}
+abstract class _C&A&B = self::A with self::B<core::num> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  forwarding-stub set boz(covariant-by-class core::num x) → void
+    return super.{self::A::boz} = x as core::int;
+  forwarding-stub method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x as core::int);
+  forwarding-stub method bar({required covariant-by-class core::num x = #C1}) → core::num
+    return super.{self::A::bar}(x: x as core::int);
+  forwarding-stub set baz(covariant-by-class core::num x) → void
+    return super.{self::A::baz} = x as core::int;
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    : super self::_C&A&B::•()
+    ;
+}
+static method main() → void {
+  self::C a = new self::C::•();
+  a.{self::_C&A&B::foo}(1){(core::num) → core::num};
+  self::throws(() → void => a.{self::_C&A&B::foo}(1.2){(core::num) → core::num});
+  a.{self::_C&A&B::bar}(x: 1){({required x: core::num}) → core::num};
+  self::throws(() → void => a.{self::_C&A&B::bar}(x: 1.2){({required x: core::num}) → core::num});
+  a.{self::_C&A&B::baz} = 1;
+  self::throws(() → void => a.{self::_C&A&B::baz} = 1.2);
+  a.{self::_C&A&B::boz} = 1;
+  self::throws(() → void => a.{self::_C&A&B::boz} = 1.2);
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect
new file mode 100644
index 0000000..8ff791a
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart.weak.outline.expect
@@ -0,0 +1,44 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int boz;
+  synthetic constructor •() → self::A
+    ;
+  method foo(core::int n) → core::num
+    ;
+  method bar({required core::int x}) → core::num
+    ;
+  set baz(core::int x) → void
+    ;
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+  abstract method bar({required covariant-by-class self::B::X% x}) → self::B::X%;
+  abstract set baz(covariant-by-class self::B::X% x) → void;
+  abstract set boz(covariant-by-class self::B::X% x) → void;
+}
+abstract class _C&A&B = self::A with self::B<core::num> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  forwarding-stub set boz(covariant-by-class core::num x) → void
+    return super.{self::A::boz} = x as core::int;
+  forwarding-stub method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x as core::int);
+  forwarding-stub method bar({required covariant-by-class core::num x}) → core::num
+    return super.{self::A::bar}(x: x as core::int);
+  forwarding-stub set baz(covariant-by-class core::num x) → void
+    return super.{self::A::baz} = x as core::int;
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    ;
+}
+static method main() → void
+  ;
+static method throws(() → void f) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue46389.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue46389.dart.weak.transformed.expect
new file mode 100644
index 0000000..efd3846
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46389.dart.weak.transformed.expect
@@ -0,0 +1,73 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int boz = 0;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method foo(core::int n) → core::num {
+    core::print(n.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+  method bar({required core::int x = #C1}) → core::num {
+    core::print(x.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+  set baz(core::int x) → void {
+    core::print(x.{core::Object::runtimeType}{core::Type});
+  }
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+  abstract method bar({required covariant-by-class self::B::X% x = #C1}) → self::B::X%;
+  abstract set baz(covariant-by-class self::B::X% x) → void;
+  abstract set boz(covariant-by-class self::B::X% x) → void;
+}
+abstract class _C&A&B extends self::A implements self::B<core::num> /*isAnonymousMixin,isEliminatedMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  set boz(covariant-by-class core::num x) → void
+    return super.{self::A::boz} = x as core::int;
+  method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x as core::int);
+  method bar({required covariant-by-class core::num x = #C1}) → core::num
+    return super.{self::A::bar}(x: x as core::int);
+  set baz(covariant-by-class core::num x) → void
+    return super.{self::A::baz} = x as core::int;
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    : super self::_C&A&B::•()
+    ;
+}
+static method main() → void {
+  self::C a = new self::C::•();
+  a.{self::_C&A&B::foo}(1){(core::num) → core::num};
+  self::throws(() → void => a.{self::_C&A&B::foo}(1.2){(core::num) → core::num});
+  a.{self::_C&A&B::bar}(x: 1){({required x: core::num}) → core::num};
+  self::throws(() → void => a.{self::_C&A&B::bar}(x: 1.2){({required x: core::num}) → core::num});
+  a.{self::_C&A&B::baz} = 1;
+  self::throws(() → void => a.{self::_C&A&B::baz} = 1.2);
+  a.{self::_C&A&B::boz} = 1;
+  self::throws(() → void => a.{self::_C&A&B::boz} = 1.2);
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/general/issue46390.dart b/pkg/front_end/testcases/general/issue46390.dart
new file mode 100644
index 0000000..305717e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart
@@ -0,0 +1,27 @@
+// 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.
+
+class A {
+  num foo(num n) {
+    print(n.runtimeType);
+    return 1.1;
+  }
+}
+
+abstract class B<X> {
+  X foo(X x);
+}
+
+class C extends A with B<num> {}
+
+void main() {
+  B<Object> b = C();
+  try {
+    b.foo(true);
+  } catch (e) {
+    print(e);
+    return;
+  }
+  throw 'Missing type error';
+}
diff --git a/pkg/front_end/testcases/general/issue46390.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue46390.dart.textual_outline.expect
new file mode 100644
index 0000000..554317f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart.textual_outline.expect
@@ -0,0 +1,11 @@
+class A {
+  num foo(num n) {}
+}
+
+abstract class B<X> {
+  X foo(X x);
+}
+
+class C extends A with B<num> {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue46390.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue46390.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..77cbaa0
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart.textual_outline_modelled.expect
@@ -0,0 +1,11 @@
+abstract class B<X> {
+  X foo(X x);
+}
+
+class A {
+  num foo(num n) {}
+}
+
+class C extends A with B<num> {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue46390.dart.weak.expect b/pkg/front_end/testcases/general/issue46390.dart.weak.expect
new file mode 100644
index 0000000..8c31872
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart.weak.expect
@@ -0,0 +1,42 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method foo(core::num n) → core::num {
+    core::print(n.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+}
+abstract class _C&A&B = self::A with self::B<core::num> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  forwarding-stub method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x);
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    : super self::_C&A&B::•()
+    ;
+}
+static method main() → void {
+  self::B<core::Object> b = new self::C::•();
+  try {
+    b.{self::B::foo}(true){(core::Object) → core::Object};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Missing type error";
+}
diff --git a/pkg/front_end/testcases/general/issue46390.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue46390.dart.weak.outline.expect
new file mode 100644
index 0000000..d2a9f01
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart.weak.outline.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  method foo(core::num n) → core::num
+    ;
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+}
+abstract class _C&A&B = self::A with self::B<core::num> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  forwarding-stub method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x);
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    ;
+}
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue46390.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue46390.dart.weak.transformed.expect
new file mode 100644
index 0000000..6447989
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue46390.dart.weak.transformed.expect
@@ -0,0 +1,42 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method foo(core::num n) → core::num {
+    core::print(n.{core::Object::runtimeType}{core::Type});
+    return 1.1;
+  }
+}
+abstract class B<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::B<self::B::X%>
+    : super core::Object::•()
+    ;
+  abstract method foo(covariant-by-class self::B::X% x) → self::B::X%;
+}
+abstract class _C&A&B extends self::A implements self::B<core::num> /*isAnonymousMixin,isEliminatedMixin*/  {
+  synthetic constructor •() → self::_C&A&B
+    : super self::A::•()
+    ;
+  method foo(covariant-by-class core::num x) → core::num
+    return super.{self::A::foo}(x);
+}
+class C extends self::_C&A&B {
+  synthetic constructor •() → self::C
+    : super self::_C&A&B::•()
+    ;
+}
+static method main() → void {
+  self::B<core::Object> b = new self::C::•();
+  try {
+    b.{self::B::foo}(true){(core::Object) → core::Object};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Missing type error";
+}
diff --git a/pkg/front_end/testcases/general/issue46719.dart.weak.expect b/pkg/front_end/testcases/general/issue46719.dart.weak.expect
index 17813ed..449b259 100644
--- a/pkg/front_end/testcases/general/issue46719.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue46719.dart.weak.expect
@@ -77,7 +77,7 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return <self::m::X%>[x];
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
@@ -100,8 +100,8 @@
   invalid-expression "pkg/front_end/testcases/general/issue46719.dart:32:18: Error: Couldn't find constructor 'm.applyAndPrint'.
   self.m<String>.applyAndPrint(['three']);
                  ^^^^^^^^^^^^^";
-  self::FunctionApplier|applyAndPrint(#C3, <core::Object?>[2]);
-  self::FunctionApplier|applyAndPrint(#C3, <core::Object?>["three"]);
+  self::FunctionApplier|applyAndPrint(#C2, <core::Object?>[2]);
+  self::FunctionApplier|applyAndPrint(#C2, <core::Object?>["three"]);
   invalid-expression "pkg/front_end/testcases/general/issue46719.dart:35:5: Error: Member not found: 'named'.
   A.named.toString();
     ^^^^^".{core::Object::toString}(){() → core::String};
@@ -115,7 +115,6 @@
 static method main() → void {}
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C1}
-  #C3 = static-tearoff self::A::n
+  #C1 = <core::Symbol*, dynamic>{)
+  #C2 = static-tearoff self::A::n
 }
diff --git a/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
index c09f829..68480b5 100644
--- a/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
@@ -77,7 +77,7 @@
 static method m<X extends core::Object? = dynamic>(self::m::X% x) → core::List<self::m::X%>
   return core::_GrowableList::_literal1<self::m::X%>(x);
 static method FunctionApplier|applyAndPrint(lowered final core::Function #this, core::List<core::Object?> positionalArguments) → void
-  return core::print(core::Function::apply(#this, positionalArguments, #C2));
+  return core::print(core::Function::apply(#this, positionalArguments, #C1));
 static method FunctionApplier|get#applyAndPrint(lowered final core::Function #this) → (core::List<core::Object?>) → void
   return (core::List<core::Object?> positionalArguments) → void => self::FunctionApplier|applyAndPrint(#this, positionalArguments);
 static method test() → dynamic {
@@ -100,8 +100,8 @@
   invalid-expression "pkg/front_end/testcases/general/issue46719.dart:32:18: Error: Couldn't find constructor 'm.applyAndPrint'.
   self.m<String>.applyAndPrint(['three']);
                  ^^^^^^^^^^^^^";
-  self::FunctionApplier|applyAndPrint(#C3, core::_GrowableList::_literal1<core::Object?>(2));
-  self::FunctionApplier|applyAndPrint(#C3, core::_GrowableList::_literal1<core::Object?>("three"));
+  self::FunctionApplier|applyAndPrint(#C2, core::_GrowableList::_literal1<core::Object?>(2));
+  self::FunctionApplier|applyAndPrint(#C2, core::_GrowableList::_literal1<core::Object?>("three"));
   invalid-expression "pkg/front_end/testcases/general/issue46719.dart:35:5: Error: Member not found: 'named'.
   A.named.toString();
     ^^^^^".{core::Object::toString}(){() → core::String};
@@ -115,7 +115,6 @@
 static method main() → void {}
 
 constants  {
-  #C1 = <dynamic>[]
-  #C2 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C1}
-  #C3 = static-tearoff self::A::n
+  #C1 = <core::Symbol*, dynamic>{)
+  #C2 = static-tearoff self::A::n
 }
diff --git a/pkg/front_end/testcases/general/issue47013.dart b/pkg/front_end/testcases/general/issue47013.dart
new file mode 100644
index 0000000..100055e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart
@@ -0,0 +1,27 @@
+// 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.
+
+class A {
+  void m(int n) {}
+}
+
+abstract class I {
+  void m(covariant num n);
+}
+
+class C extends A implements I {}
+
+void main() {
+  throws(() => (C() as dynamic).m(1.1));
+}
+
+throws(void Function() f) {
+  try {
+    f();
+  } catch (e) {
+    print(e);
+    return;
+  }
+  throw 'Exception expected';
+}
diff --git a/pkg/front_end/testcases/general/issue47013.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47013.dart.textual_outline.expect
new file mode 100644
index 0000000..01511eb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+class A {
+  void m(int n) {}
+}
+
+abstract class I {
+  void m(covariant num n);
+}
+
+class C extends A implements I {}
+
+void main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue47013.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47013.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0b857bf
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart.textual_outline_modelled.expect
@@ -0,0 +1,12 @@
+abstract class I {
+  void m(covariant num n);
+}
+
+class A {
+  void m(int n) {}
+}
+
+class C extends A implements I {}
+
+throws(void Function() f) {}
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue47013.dart.weak.expect b/pkg/front_end/testcases/general/issue47013.dart.weak.expect
new file mode 100644
index 0000000..f555ae6
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart.weak.expect
@@ -0,0 +1,36 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::int n) → void {}
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+  abstract method m(covariant-by-declaration core::num n) → void;
+}
+class C extends self::A implements self::I {
+  synthetic constructor •() → self::C
+    : super self::A::•()
+    ;
+  forwarding-stub method m(covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(n as core::int);
+}
+static method main() → void {
+  self::throws(() → void => (new self::C::•() as{ForNonNullableByDefault} dynamic){dynamic}.m(1.1));
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47013.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47013.dart.weak.outline.expect
new file mode 100644
index 0000000..6e93d0c
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart.weak.outline.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  method m(core::int n) → void
+    ;
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    ;
+  abstract method m(covariant-by-declaration core::num n) → void;
+}
+class C extends self::A implements self::I {
+  synthetic constructor •() → self::C
+    ;
+  forwarding-stub method m(covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(n as core::int);
+}
+static method main() → void
+  ;
+static method throws(() → void f) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47013.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47013.dart.weak.transformed.expect
new file mode 100644
index 0000000..f555ae6
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013.dart.weak.transformed.expect
@@ -0,0 +1,36 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::int n) → void {}
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+  abstract method m(covariant-by-declaration core::num n) → void;
+}
+class C extends self::A implements self::I {
+  synthetic constructor •() → self::C
+    : super self::A::•()
+    ;
+  forwarding-stub method m(covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(n as core::int);
+}
+static method main() → void {
+  self::throws(() → void => (new self::C::•() as{ForNonNullableByDefault} dynamic){dynamic}.m(1.1));
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47013b.dart b/pkg/front_end/testcases/general/issue47013b.dart
new file mode 100644
index 0000000..2106024
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart
@@ -0,0 +1,32 @@
+// 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.
+
+class A {
+  void m(num n) {}
+}
+
+class B extends A {
+  void m(covariant int i);
+}
+
+class C extends B {
+  void m(covariant int i) {}
+}
+
+main() {
+  A a = C();
+  throws(() => a.m(1.5));
+  a = B();
+  a.m(1.5);
+}
+
+throws(void Function() f) {
+  try {
+    f();
+  } catch (e) {
+    print(e);
+    return;
+  }
+  throw 'Exception expected';
+}
diff --git a/pkg/front_end/testcases/general/issue47013b.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47013b.dart.textual_outline.expect
new file mode 100644
index 0000000..4fa0be6
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart.textual_outline.expect
@@ -0,0 +1,14 @@
+class A {
+  void m(num n) {}
+}
+
+class B extends A {
+  void m(covariant int i);
+}
+
+class C extends B {
+  void m(covariant int i) {}
+}
+
+main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue47013b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47013b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4fa0be6
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart.textual_outline_modelled.expect
@@ -0,0 +1,14 @@
+class A {
+  void m(num n) {}
+}
+
+class B extends A {
+  void m(covariant int i);
+}
+
+class C extends B {
+  void m(covariant int i) {}
+}
+
+main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue47013b.dart.weak.expect b/pkg/front_end/testcases/general/issue47013b.dart.weak.expect
new file mode 100644
index 0000000..70fa41f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart.weak.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::num n) → void {}
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i) → void
+    return super.{self::A::m}(i);
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  method m(covariant-by-declaration core::int i) → void {}
+}
+static method main() → dynamic {
+  self::A a = new self::C::•();
+  self::throws(() → void => a.{self::A::m}(1.5){(core::num) → void});
+  a = new self::B::•();
+  a.{self::A::m}(1.5){(core::num) → void};
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47013b.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47013b.dart.weak.outline.expect
new file mode 100644
index 0000000..81997e1
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart.weak.outline.expect
@@ -0,0 +1,26 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  method m(core::num n) → void
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i) → void
+    return super.{self::A::m}(i);
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    ;
+  method m(covariant-by-declaration core::int i) → void
+    ;
+}
+static method main() → dynamic
+  ;
+static method throws(() → void f) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47013b.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47013b.dart.weak.transformed.expect
new file mode 100644
index 0000000..70fa41f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013b.dart.weak.transformed.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::num n) → void {}
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i) → void
+    return super.{self::A::m}(i);
+}
+class C extends self::B {
+  synthetic constructor •() → self::C
+    : super self::B::•()
+    ;
+  method m(covariant-by-declaration core::int i) → void {}
+}
+static method main() → dynamic {
+  self::A a = new self::C::•();
+  self::throws(() → void => a.{self::A::m}(1.5){(core::num) → void});
+  a = new self::B::•();
+  a.{self::A::m}(1.5){(core::num) → void};
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47013c.dart b/pkg/front_end/testcases/general/issue47013c.dart
new file mode 100644
index 0000000..89b8818
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart
@@ -0,0 +1,23 @@
+// 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.
+
+class D1 {}
+
+class D2 {}
+
+class D implements D1, D2 {}
+
+class A {
+  void m(covariant D d) {}
+}
+
+abstract class B1 {
+  void m(D1 d1);
+}
+
+abstract class B2 {
+  void m(D2 d2);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47013c.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47013c.dart.textual_outline.expect
new file mode 100644
index 0000000..e66a813
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart.textual_outline.expect
@@ -0,0 +1,19 @@
+class D1 {}
+
+class D2 {}
+
+class D implements D1, D2 {}
+
+class A {
+  void m(covariant D d) {}
+}
+
+abstract class B1 {
+  void m(D1 d1);
+}
+
+abstract class B2 {
+  void m(D2 d2);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47013c.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47013c.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8652263
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart.textual_outline_modelled.expect
@@ -0,0 +1,19 @@
+abstract class B1 {
+  void m(D1 d1);
+}
+
+abstract class B2 {
+  void m(D2 d2);
+}
+
+class A {
+  void m(covariant D d) {}
+}
+
+class D implements D1, D2 {}
+
+class D1 {}
+
+class D2 {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47013c.dart.weak.expect b/pkg/front_end/testcases/general/issue47013c.dart.weak.expect
new file mode 100644
index 0000000..e4ef550
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart.weak.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class D1 extends core::Object {
+  synthetic constructor •() → self::D1
+    : super core::Object::•()
+    ;
+}
+class D2 extends core::Object {
+  synthetic constructor •() → self::D2
+    : super core::Object::•()
+    ;
+}
+class D extends core::Object implements self::D1, self::D2 {
+  synthetic constructor •() → self::D
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(covariant-by-declaration self::D d) → void {}
+}
+abstract class B1 extends core::Object {
+  synthetic constructor •() → self::B1
+    : super core::Object::•()
+    ;
+  abstract method m(self::D1 d1) → void;
+}
+abstract class B2 extends core::Object {
+  synthetic constructor •() → self::B2
+    : super core::Object::•()
+    ;
+  abstract method m(self::D2 d2) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47013c.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47013c.dart.weak.outline.expect
new file mode 100644
index 0000000..cf839b8
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart.weak.outline.expect
@@ -0,0 +1,34 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class D1 extends core::Object {
+  synthetic constructor •() → self::D1
+    ;
+}
+class D2 extends core::Object {
+  synthetic constructor •() → self::D2
+    ;
+}
+class D extends core::Object implements self::D1, self::D2 {
+  synthetic constructor •() → self::D
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  method m(covariant-by-declaration self::D d) → void
+    ;
+}
+abstract class B1 extends core::Object {
+  synthetic constructor •() → self::B1
+    ;
+  abstract method m(self::D1 d1) → void;
+}
+abstract class B2 extends core::Object {
+  synthetic constructor •() → self::B2
+    ;
+  abstract method m(self::D2 d2) → void;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47013c.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47013c.dart.weak.transformed.expect
new file mode 100644
index 0000000..e4ef550
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013c.dart.weak.transformed.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class D1 extends core::Object {
+  synthetic constructor •() → self::D1
+    : super core::Object::•()
+    ;
+}
+class D2 extends core::Object {
+  synthetic constructor •() → self::D2
+    : super core::Object::•()
+    ;
+}
+class D extends core::Object implements self::D1, self::D2 {
+  synthetic constructor •() → self::D
+    : super core::Object::•()
+    ;
+}
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(covariant-by-declaration self::D d) → void {}
+}
+abstract class B1 extends core::Object {
+  synthetic constructor •() → self::B1
+    : super core::Object::•()
+    ;
+  abstract method m(self::D1 d1) → void;
+}
+abstract class B2 extends core::Object {
+  synthetic constructor •() → self::B2
+    : super core::Object::•()
+    ;
+  abstract method m(self::D2 d2) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47013d.dart b/pkg/front_end/testcases/general/issue47013d.dart
new file mode 100644
index 0000000..dd8a651
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart
@@ -0,0 +1,28 @@
+// 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.
+
+class A {
+  void m(num n, int i) {}
+}
+
+class B extends A {
+  void m(covariant int i, covariant num n);
+}
+
+main() {
+  B b = B();
+  throws(() => b.m(1.5, 0));
+  A a = b;
+  throws(() => a.m(1, 1.5));
+}
+
+throws(void Function() f) {
+  try {
+    f();
+  } catch (e) {
+    print(e);
+    return;
+  }
+  throw 'Exception expected';
+}
diff --git a/pkg/front_end/testcases/general/issue47013d.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47013d.dart.textual_outline.expect
new file mode 100644
index 0000000..737e999
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+class A {
+  void m(num n, int i) {}
+}
+
+class B extends A {
+  void m(covariant int i, covariant num n);
+}
+
+main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue47013d.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47013d.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..737e999
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart.textual_outline_modelled.expect
@@ -0,0 +1,10 @@
+class A {
+  void m(num n, int i) {}
+}
+
+class B extends A {
+  void m(covariant int i, covariant num n);
+}
+
+main() {}
+throws(void Function() f) {}
diff --git a/pkg/front_end/testcases/general/issue47013d.dart.weak.expect b/pkg/front_end/testcases/general/issue47013d.dart.weak.expect
new file mode 100644
index 0000000..7039795
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart.weak.expect
@@ -0,0 +1,48 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47013d.dart:15:20: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+//   throws(() => b.m(1.5, 0));
+//                    ^
+//
+// pkg/front_end/testcases/general/issue47013d.dart:17:23: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+//   throws(() => a.m(1, 1.5));
+//                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::num n, core::int i) → void {}
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i, covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(i, n as core::int);
+}
+static method main() → dynamic {
+  self::B b = new self::B::•();
+  self::throws(() → void => b.{self::B::m}(invalid-expression "pkg/front_end/testcases/general/issue47013d.dart:15:20: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  throws(() => b.m(1.5, 0));
+                   ^" in 1.5 as{TypeError,ForNonNullableByDefault} core::int, 0){(core::int, core::num) → void});
+  self::A a = b;
+  self::throws(() → void => a.{self::A::m}(1, invalid-expression "pkg/front_end/testcases/general/issue47013d.dart:17:23: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  throws(() => a.m(1, 1.5));
+                      ^" in 1.5 as{TypeError,ForNonNullableByDefault} core::int){(core::num, core::int) → void});
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47013d.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47013d.dart.weak.outline.expect
new file mode 100644
index 0000000..f310569
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart.weak.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
+    ;
+  method m(core::num n, core::int i) → void
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i, covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(i, n as core::int);
+}
+static method main() → dynamic
+  ;
+static method throws(() → void f) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47013d.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47013d.dart.weak.transformed.expect
new file mode 100644
index 0000000..7039795
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47013d.dart.weak.transformed.expect
@@ -0,0 +1,48 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47013d.dart:15:20: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+//   throws(() => b.m(1.5, 0));
+//                    ^
+//
+// pkg/front_end/testcases/general/issue47013d.dart:17:23: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+//   throws(() => a.m(1, 1.5));
+//                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method m(core::num n, core::int i) → void {}
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  forwarding-stub forwarding-semi-stub method m(covariant-by-declaration core::int i, covariant-by-declaration core::num n) → void
+    return super.{self::A::m}(i, n as core::int);
+}
+static method main() → dynamic {
+  self::B b = new self::B::•();
+  self::throws(() → void => b.{self::B::m}(invalid-expression "pkg/front_end/testcases/general/issue47013d.dart:15:20: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  throws(() => b.m(1.5, 0));
+                   ^" in 1.5 as{TypeError,ForNonNullableByDefault} core::int, 0){(core::int, core::num) → void});
+  self::A a = b;
+  self::throws(() → void => a.{self::A::m}(1, invalid-expression "pkg/front_end/testcases/general/issue47013d.dart:17:23: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  throws(() => a.m(1, 1.5));
+                      ^" in 1.5 as{TypeError,ForNonNullableByDefault} core::int){(core::num, core::int) → void});
+}
+static method throws(() → void f) → dynamic {
+  try {
+    f(){() → void};
+  }
+  on core::Object catch(final core::Object e) {
+    core::print(e);
+    return;
+  }
+  throw "Exception expected";
+}
diff --git a/pkg/front_end/testcases/general/issue47057.dart b/pkg/front_end/testcases/general/issue47057.dart
new file mode 100644
index 0000000..8d5b88d
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart
@@ -0,0 +1,15 @@
+// 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.
+
+import 'dart:async';
+
+Future<int> foo<X extends Object?>(X x) async {
+  if (x is Future<int>) {
+    return x;
+  } else {
+    throw 42;
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47057.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47057.dart.textual_outline.expect
new file mode 100644
index 0000000..af27955
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+import 'dart:async';
+
+Future<int> foo<X extends Object?>(X x) async {}
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47057.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47057.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..af27955
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+import 'dart:async';
+
+Future<int> foo<X extends Object?>(X x) async {}
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47057.dart.weak.expect b/pkg/front_end/testcases/general/issue47057.dart.weak.expect
new file mode 100644
index 0000000..abd22ad
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+static method foo<X extends core::Object?>(self::foo::X% x) → asy::Future<core::int> async {
+  if(x is{ForNonNullableByDefault} asy::Future<core::int>) {
+    return x{self::foo::X% & asy::Future<core::int> /* '%' & '!' = '!' */};
+  }
+  else {
+    throw 42;
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47057.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47057.dart.weak.outline.expect
new file mode 100644
index 0000000..e803dbe
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart.weak.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+static method foo<X extends core::Object?>(self::foo::X% x) → asy::Future<core::int> async 
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47057.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47057.dart.weak.transformed.expect
new file mode 100644
index 0000000..e2413bc
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47057.dart.weak.transformed.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+static method foo<X extends core::Object?>(self::foo::X% x) → asy::Future<core::int> /* originally async */ {
+  final asy::_Future<core::int> :async_future = new asy::_Future::•<core::int>();
+  core::bool* :is_sync = false;
+  FutureOr<core::int>? :return_value;
+  (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:
+      {
+        if(x is{ForNonNullableByDefault} asy::Future<core::int>) {
+          :return_value = x{self::foo::X% & asy::Future<core::int> /* '%' & '!' = '!' */};
+          break #L1;
+        }
+        else {
+          throw 42;
+        }
+      }
+      asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync);
+    }
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_op(){() → dynamic};
+  :is_sync = true;
+  return :async_future;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47072.dart b/pkg/front_end/testcases/general/issue47072.dart
new file mode 100644
index 0000000..1875508
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart
@@ -0,0 +1,30 @@
+// 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.
+
+class A {}
+
+class B extends A {}
+
+class C {
+  // The parameter `b` is not covariant-by-declaration as seen from here.
+  void f(B b) {}
+}
+
+abstract class I {
+  // If `I` is a superinterface of any class,
+  // the parameter of its `f` is covariant-by-declaration.
+  void f(covariant A a);
+}
+
+class D extends C implements I {} // OK.
+
+void main() {
+  I i = D();
+  try {
+    i.f(A()); // Dynamic type error.
+  } catch (_) {
+    return;
+  }
+  throw 'Missing type error';
+}
diff --git a/pkg/front_end/testcases/general/issue47072.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47072.dart.textual_outline.expect
new file mode 100644
index 0000000..1762d4d
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart.textual_outline.expect
@@ -0,0 +1,15 @@
+class A {}
+
+class B extends A {}
+
+class C {
+  void f(B b) {}
+}
+
+abstract class I {
+  void f(covariant A a);
+}
+
+class D extends C implements I {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue47072.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47072.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a509637
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart.textual_outline_modelled.expect
@@ -0,0 +1,15 @@
+abstract class I {
+  void f(covariant A a);
+}
+
+class A {}
+
+class B extends A {}
+
+class C {
+  void f(B b) {}
+}
+
+class D extends C implements I {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue47072.dart.weak.expect b/pkg/front_end/testcases/general/issue47072.dart.weak.expect
new file mode 100644
index 0000000..54bf6d2
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart.weak.expect
@@ -0,0 +1,43 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  method f(self::B b) → void {}
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+  abstract method f(covariant-by-declaration self::A a) → void;
+}
+class D extends self::C implements self::I {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  forwarding-stub method f(covariant-by-declaration self::A a) → void
+    return super.{self::C::f}(a as self::B);
+}
+static method main() → void {
+  self::I i = new self::D::•();
+  try {
+    i.{self::I::f}(new self::A::•()){(self::A) → void};
+  }
+  on core::Object catch(final core::Object _) {
+    return;
+  }
+  throw "Missing type error";
+}
diff --git a/pkg/front_end/testcases/general/issue47072.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47072.dart.weak.outline.expect
new file mode 100644
index 0000000..03fb90e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart.weak.outline.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    ;
+  method f(self::B b) → void
+    ;
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    ;
+  abstract method f(covariant-by-declaration self::A a) → void;
+}
+class D extends self::C implements self::I {
+  synthetic constructor •() → self::D
+    ;
+  forwarding-stub method f(covariant-by-declaration self::A a) → void
+    return super.{self::C::f}(a as self::B);
+}
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue47072.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47072.dart.weak.transformed.expect
new file mode 100644
index 0000000..54bf6d2
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47072.dart.weak.transformed.expect
@@ -0,0 +1,43 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  method f(self::B b) → void {}
+}
+abstract class I extends core::Object {
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+  abstract method f(covariant-by-declaration self::A a) → void;
+}
+class D extends self::C implements self::I {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  forwarding-stub method f(covariant-by-declaration self::A a) → void
+    return super.{self::C::f}(a as self::B);
+}
+static method main() → void {
+  self::I i = new self::D::•();
+  try {
+    i.{self::I::f}(new self::A::•()){(self::A) → void};
+  }
+  on core::Object catch(final core::Object _) {
+    return;
+  }
+  throw "Missing type error";
+}
diff --git a/pkg/front_end/testcases/general/issue47223a.dart b/pkg/front_end/testcases/general/issue47223a.dart
new file mode 100644
index 0000000..2191ad1
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart
@@ -0,0 +1,9 @@
+// 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.
+
+void test() {
+  (throw "some value") ?? "some other value";
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47223a.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47223a.dart.textual_outline.expect
new file mode 100644
index 0000000..31c91a2
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+void test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47223a.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47223a.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4742c78
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.expect
new file mode 100644
index 0000000..1640c03
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null.
+//   (throw "some value") ?? "some other value";
+//    ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → void {
+  let final Never #t1 = throw "some value" in #t1 == null ?{core::String} "some other value" : #t1;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.outline.expect
new file mode 100644
index 0000000..d7d3d2f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test() → void
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect
new file mode 100644
index 0000000..1640c03
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null.
+//   (throw "some value") ?? "some other value";
+//    ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → void {
+  let final Never #t1 = throw "some value" in #t1 == null ?{core::String} "some other value" : #t1;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47223b.dart b/pkg/front_end/testcases/general/issue47223b.dart
new file mode 100644
index 0000000..8528113
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart
@@ -0,0 +1,9 @@
+// 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.
+
+void test() {
+  (throw "some value").foo ??= "foo";
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47223b.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue47223b.dart.textual_outline.expect
new file mode 100644
index 0000000..31c91a2
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+void test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/issue47223b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue47223b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4742c78
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.expect
new file mode 100644
index 0000000..13e925e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null.
+//   (throw "some value").foo ??= "foo";
+//                        ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → void {
+  let final Never #t1 = throw "some value" in #t1{Never}.foo == null ?{core::String} #t1{Never}.foo = "foo" : null;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.outline.expect
new file mode 100644
index 0000000..d7d3d2f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test() → void
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect
new file mode 100644
index 0000000..13e925e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null.
+//   (throw "some value").foo ??= "foo";
+//                        ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → void {
+  let final Never #t1 = throw "some value" in #t1{Never}.foo == null ?{core::String} #t1{Never}.foo = "foo" : null;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart b/pkg/front_end/testcases/general/issue_47008_01.dart
new file mode 100644
index 0000000..7980b2e
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart
@@ -0,0 +1,11 @@
+main() {
+  int b = 1;
+  int c = 2;
+  int d = 3;
+  int e = 4;
+  a(b < c, d < e, 1 >> (2));
+}
+
+void a(bool x, bool y, int z) {
+  print("$x $y $z");
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline.expect
new file mode 100644
index 0000000..c8a6141
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, int z) {}
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..c8a6141
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, int z) {}
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart.weak.expect b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.expect
new file mode 100644
index 0000000..383dfab
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.expect
@@ -0,0 +1,14 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, 1.{core::int::>>}(2){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::int z) → void {
+  core::print("${x} ${y} ${z}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.outline.expect
new file mode 100644
index 0000000..35353cd
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic
+  ;
+static method a(core::bool x, core::bool y, core::int z) → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue_47008_01.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.transformed.expect
new file mode 100644
index 0000000..54bfd70
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_01.dart.weak.transformed.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, 1.{core::int::>>}(2){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::int z) → void {
+  core::print("${x} ${y} ${z}");
+}
+
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue_47008_01.dart:6:21 -> IntConstant(0)
+Extra constant evaluation: evaluated: 13, effectively constant: 1
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart b/pkg/front_end/testcases/general/issue_47008_02.dart
new file mode 100644
index 0000000..996590a
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart
@@ -0,0 +1,13 @@
+main() {
+  int b = 1;
+  int c = 2;
+  int d = 3;
+  int e = 4;
+  int f = 5;
+  int g = 6;
+  a(b < c, d < e, f < g, 1 >>> (2));
+}
+
+void a(bool x, bool y, bool z1, int z2) {
+  print("$x $y $z1 $z2");
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline.expect
new file mode 100644
index 0000000..3f2b123
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, bool z1, int z2) {}
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3f2b123
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, bool z1, int z2) {}
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart.weak.expect b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.expect
new file mode 100644
index 0000000..d448313
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int f = 5;
+  core::int g = 6;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, f.{core::num::<}(g){(core::num) → core::bool}, 1.{core::int::>>>}(2){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void {
+  core::print("${x} ${y} ${z1} ${z2}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.outline.expect
new file mode 100644
index 0000000..b349da9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic
+  ;
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue_47008_02.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.transformed.expect
new file mode 100644
index 0000000..bc7f96a
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47008_02.dart.weak.transformed.expect
@@ -0,0 +1,21 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int f = 5;
+  core::int g = 6;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, f.{core::num::<}(g){(core::num) → core::bool}, 1.{core::int::>>>}(2){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void {
+  core::print("${x} ${y} ${z1} ${z2}");
+}
+
+
+Extra constant evaluation status:
+Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue_47008_02.dart:8:28 -> IntConstant(0)
+Extra constant evaluation: evaluated: 17, effectively constant: 1
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart b/pkg/front_end/testcases/general/issue_47009_01.dart
new file mode 100644
index 0000000..127b5fb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart
@@ -0,0 +1,10 @@
+main() {
+  int b = 1;
+  int c = 2;
+  int as = 3;
+  a(b < c, as > (1));
+}
+
+void a(bool x, bool y) {
+  print("$x $y");
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline.expect
new file mode 100644
index 0000000..8c1c1ad
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..8c1c1ad
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart.weak.expect b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.expect
new file mode 100644
index 0000000..a9de674
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int as = 3;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, as.{core::num::>}(1){(core::num) → core::bool});
+}
+static method a(core::bool x, core::bool y) → void {
+  core::print("${x} ${y}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.outline.expect
new file mode 100644
index 0000000..1e4d67b
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic
+  ;
+static method a(core::bool x, core::bool y) → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue_47009_01.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.transformed.expect
new file mode 100644
index 0000000..a9de674
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_01.dart.weak.transformed.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int as = 3;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, as.{core::num::>}(1){(core::num) → core::bool});
+}
+static method a(core::bool x, core::bool y) → void {
+  core::print("${x} ${y}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart b/pkg/front_end/testcases/general/issue_47009_02.dart
new file mode 100644
index 0000000..fc8dd12
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart
@@ -0,0 +1,12 @@
+main() {
+  int b = 1;
+  int c = 2;
+  int d = 3;
+  int e = 4;
+  int as = 5;
+  a(b < c, d < e, as >> (1));
+}
+
+void a(bool x, bool y, int z) {
+  print("$x $y $z");
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline.expect
new file mode 100644
index 0000000..c8a6141
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, int z) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..c8a6141
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, int z) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart.weak.expect b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.expect
new file mode 100644
index 0000000..c5218bb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int as = 5;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, as.{core::int::>>}(1){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::int z) → void {
+  core::print("${x} ${y} ${z}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.outline.expect
new file mode 100644
index 0000000..35353cd
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic
+  ;
+static method a(core::bool x, core::bool y, core::int z) → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue_47009_02.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.transformed.expect
new file mode 100644
index 0000000..c5218bb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_02.dart.weak.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int as = 5;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, as.{core::int::>>}(1){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::int z) → void {
+  core::print("${x} ${y} ${z}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart b/pkg/front_end/testcases/general/issue_47009_03.dart
new file mode 100644
index 0000000..50afad9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart
@@ -0,0 +1,14 @@
+main() {
+  int b = 1;
+  int c = 2;
+  int d = 3;
+  int e = 4;
+  int f = 5;
+  int g = 6;
+  int as = 7;
+  a(b < c, d < e, f < g, as >>> (1));
+}
+
+void a(bool x, bool y, bool z1, int z2) {
+  print("$x $y $z1 $z2");
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline.expect
new file mode 100644
index 0000000..3f2b123
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, bool z1, int z2) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3f2b123
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void a(bool x, bool y, bool z1, int z2) {}
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart.weak.expect b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.expect
new file mode 100644
index 0000000..1d366c4
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int f = 5;
+  core::int g = 6;
+  core::int as = 7;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, f.{core::num::<}(g){(core::num) → core::bool}, as.{core::int::>>>}(1){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void {
+  core::print("${x} ${y} ${z1} ${z2}");
+}
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.outline.expect
new file mode 100644
index 0000000..b349da9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic
+  ;
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue_47009_03.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.transformed.expect
new file mode 100644
index 0000000..1d366c4
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_47009_03.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int b = 1;
+  core::int c = 2;
+  core::int d = 3;
+  core::int e = 4;
+  core::int f = 5;
+  core::int g = 6;
+  core::int as = 7;
+  self::a(b.{core::num::<}(c){(core::num) → core::bool}, d.{core::num::<}(e){(core::num) → core::bool}, f.{core::num::<}(g){(core::num) → core::bool}, as.{core::int::>>>}(1){(core::int) → core::int});
+}
+static method a(core::bool x, core::bool y, core::bool z1, core::int z2) → void {
+  core::print("${x} ${y} ${z1} ${z2}");
+}
diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.weak.expect b/pkg/front_end/testcases/general/metadata_enum.dart.weak.expect
index 16f3460..a1967bf 100644
--- a/pkg/front_end/testcases/general/metadata_enum.dart.weak.expect
+++ b/pkg/front_end/testcases/general/metadata_enum.dart.weak.expect
@@ -3,18 +3,18 @@
 import "dart:core" as core;
 
 @#C1
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C11;
   static const field self::E* E1 = #C4;
   static const field self::E* E2 = #C7;
   static const field self::E* E3 = #C10;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -31,13 +31,13 @@
 constants  {
   #C1 = null
   #C2 = 0
-  #C3 = "E.E1"
+  #C3 = "E1"
   #C4 = self::E {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "E.E2"
+  #C6 = "E2"
   #C7 = self::E {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "E.E3"
+  #C9 = "E3"
   #C10 = self::E {index:#C8, _name:#C9}
   #C11 = <self::E*>[#C4, #C7, #C10]
 }
@@ -46,4 +46,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///metadata_enum.dart:
 - E. (from org-dartlang-testcase:///metadata_enum.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.weak.outline.expect b/pkg/front_end/testcases/general/metadata_enum.dart.weak.outline.expect
index 44f4d21..09a1c26 100644
--- a/pkg/front_end/testcases/general/metadata_enum.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/metadata_enum.dart.weak.outline.expect
@@ -3,18 +3,18 @@
 import "dart:core" as core;
 
 @self::a
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = const <self::E*>[self::E::E1, self::E::E2, self::E::E3];
-  static const field self::E* E1 = const self::E::•(0, "E.E1");
-  static const field self::E* E2 = const self::E::•(1, "E.E2");
-  static const field self::E* E3 = const self::E::•(2, "E.E3");
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  static const field self::E* E1 = const self::E::•(0, "E1");
+  static const field self::E* E2 = const self::E::•(1, "E2");
+  static const field self::E* E3 = const self::E::•(2, "E3");
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -32,8 +32,8 @@
 
 Extra constant evaluation status:
 Evaluated: StaticGet @ org-dartlang-testcase:///metadata_enum.dart:7:2 -> NullConstant(null)
-Evaluated: ListLiteral @ org-dartlang-testcase:///metadata_enum.dart:8:6 -> ListConstant(const <E*>[const E{E.index: 0, E._name: "E.E1"}, const E{E.index: 1, E._name: "E.E2"}, const E{E.index: 2, E._name: "E.E3"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:10 -> InstanceConstant(const E{E.index: 0, E._name: "E.E1"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:14 -> InstanceConstant(const E{E.index: 1, E._name: "E.E2"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:18 -> InstanceConstant(const E{E.index: 2, E._name: "E.E3"})
-Extra constant evaluation: evaluated: 9, effectively constant: 5
+Evaluated: ListLiteral @ org-dartlang-testcase:///metadata_enum.dart:8:6 -> ListConstant(const <E*>[const E{_Enum.index: 0, _Enum._name: "E1"}, const E{_Enum.index: 1, _Enum._name: "E2"}, const E{_Enum.index: 2, _Enum._name: "E3"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "E1"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:14 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "E2"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:18 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "E3"})
+Extra constant evaluation: evaluated: 10, effectively constant: 5
diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.weak.transformed.expect b/pkg/front_end/testcases/general/metadata_enum.dart.weak.transformed.expect
index 16f3460..a1967bf 100644
--- a/pkg/front_end/testcases/general/metadata_enum.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/metadata_enum.dart.weak.transformed.expect
@@ -3,18 +3,18 @@
 import "dart:core" as core;
 
 @#C1
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C11;
   static const field self::E* E1 = #C4;
   static const field self::E* E2 = #C7;
   static const field self::E* E3 = #C10;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -31,13 +31,13 @@
 constants  {
   #C1 = null
   #C2 = 0
-  #C3 = "E.E1"
+  #C3 = "E1"
   #C4 = self::E {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "E.E2"
+  #C6 = "E2"
   #C7 = self::E {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "E.E3"
+  #C9 = "E3"
   #C10 = self::E {index:#C8, _name:#C9}
   #C11 = <self::E*>[#C4, #C7, #C10]
 }
@@ -46,4 +46,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///metadata_enum.dart:
 - E. (from org-dartlang-testcase:///metadata_enum.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.expect
index b5abc6f..a99c84b 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl Y extends self::A::X>(self::A::f::Y y) → void {}
+  method f<covariant-by-class Y extends self::A::X>(self::A::f::Y y) → void {}
 }
 static method expectThrows(() → void f) → dynamic {
   try {
@@ -20,6 +20,6 @@
 static method main() → dynamic {
   self::A<core::num> a = new self::A::•<core::int>();
   self::expectThrows(() → void {
-    <Y extends core::num>(Y) → void f = a.{self::A::f}{<generic-covariant-impl Y extends core::num>(Y) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} <generic-covariant-impl Y extends core::num>(Y) → void;
+    <Y extends core::num>(Y) → void f = a.{self::A::f}{<covariant-by-class Y extends core::num>(Y) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} <covariant-by-class Y extends core::num>(Y) → void;
   });
 }
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.outline.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.outline.expect
index 18ac6fe..4e04afa 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::num> extends core::Object {
   synthetic constructor •() → self::A<self::A::X>
     ;
-  method f<generic-covariant-impl Y extends self::A::X>(self::A::f::Y y) → void
+  method f<covariant-by-class Y extends self::A::X>(self::A::f::Y y) → void
     ;
 }
 static method expectThrows(() → void f) → dynamic
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.transformed.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.transformed.expect
index b5abc6f..a99c84b 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl Y extends self::A::X>(self::A::f::Y y) → void {}
+  method f<covariant-by-class Y extends self::A::X>(self::A::f::Y y) → void {}
 }
 static method expectThrows(() → void f) → dynamic {
   try {
@@ -20,6 +20,6 @@
 static method main() → dynamic {
   self::A<core::num> a = new self::A::•<core::int>();
   self::expectThrows(() → void {
-    <Y extends core::num>(Y) → void f = a.{self::A::f}{<generic-covariant-impl Y extends core::num>(Y) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} <generic-covariant-impl Y extends core::num>(Y) → void;
+    <Y extends core::num>(Y) → void f = a.{self::A::f}{<covariant-by-class Y extends core::num>(Y) → void} as{TypeError,CovarianceCheck,ForNonNullableByDefault} <covariant-by-class Y extends core::num>(Y) → void;
   });
 }
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.expect
index 9be07d6..090dbcd 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl Y extends self::A::X*>(self::A::f::Y* y) → void {}
+  method f<covariant-by-class Y extends self::A::X*>(self::A::f::Y* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 }
 static method main() → dynamic {
   self::A<core::num*>* a = new self::A::•<core::int*>();
-  <Y extends core::num*>(Y*) →* void f = a.{self::A::f}{<generic-covariant-impl Y extends core::num*>(Y*) →* void};
+  <Y extends core::num*>(Y*) →* void f = a.{self::A::f}{<covariant-by-class Y extends core::num*>(Y*) →* void};
   self::expectThrows(() → Null {
     f<core::double*>(3.14){(core::double*) →* void};
   });
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.outline.expect
index 50b76a4..c6b80d2 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::num*> extends core::Object {
   synthetic constructor •() → self::A<self::A::X*>*
     ;
-  method f<generic-covariant-impl Y extends self::A::X*>(self::A::f::Y* y) → void
+  method f<covariant-by-class Y extends self::A::X*>(self::A::f::Y* y) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.transformed.expect
index 9be07d6..090dbcd 100644
--- a/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/method_tearoff_covariant_generic_type_check_opt_out.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl Y extends self::A::X*>(self::A::f::Y* y) → void {}
+  method f<covariant-by-class Y extends self::A::X*>(self::A::f::Y* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 }
 static method main() → dynamic {
   self::A<core::num*>* a = new self::A::•<core::int*>();
-  <Y extends core::num*>(Y*) →* void f = a.{self::A::f}{<generic-covariant-impl Y extends core::num*>(Y*) →* void};
+  <Y extends core::num*>(Y*) →* void f = a.{self::A::f}{<covariant-by-class Y extends core::num*>(Y*) →* void};
   self::expectThrows(() → Null {
     f<core::double*>(3.14){(core::double*) →* void};
   });
diff --git a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.expect b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.expect
index eaf50de..503a71e 100644
--- a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::M1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b) → dynamic {}
+  method method(covariant-by-declaration core::int* a, core::int* b) → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::M2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b) → dynamic {}
+  method method(core::int* a, covariant-by-declaration core::int* b) → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -45,7 +45,7 @@
   const synthetic constructor •() → self::_C&Object&M1*
     : super core::Object::•()
     ;
-  mixin-super-stub method method(covariant core::int* a, core::int* b) → dynamic
+  mixin-super-stub method method(covariant-by-declaration core::int* a, core::int* b) → dynamic
     return super.{self::M1::method}(a, b);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -62,7 +62,7 @@
   const synthetic constructor •() → self::_C&Object&M1&M2*
     : super self::_C&Object&M1::•()
     ;
-  forwarding-stub method method(covariant core::int* a, covariant core::int* b) → dynamic
+  forwarding-stub method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b) → dynamic
     return super.{self::M2::method}(a, b);
 }
 class C extends self::_C&Object&M1&M2 {
@@ -74,9 +74,9 @@
   synthetic constructor •() → self::Direct*
     : super core::Object::•()
     ;
-  method positional(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
-  method optional([covariant core::int* a = #C1, core::int* b = #C1, covariant core::int* c = #C1, core::int* d = #C1]) → void {}
-  method named({covariant core::int* a = #C1, core::int* b = #C1, covariant core::int* c = #C1, core::int* d = #C1}) → void {}
+  method positional(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
+  method optional([covariant-by-declaration core::int* a = #C1, core::int* b = #C1, covariant-by-declaration core::int* c = #C1, core::int* d = #C1]) → void {}
+  method named({covariant-by-declaration core::int* a = #C1, core::int* b = #C1, covariant-by-declaration core::int* c = #C1, core::int* d = #C1}) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -97,7 +97,7 @@
   synthetic constructor •() → self::Override1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -113,19 +113,19 @@
   synthetic constructor •() → self::Override2*
     : super self::Override1::•()
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3*
     : super self::Override2::•()
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -141,7 +141,7 @@
   synthetic constructor •() → self::Implement2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -157,7 +157,7 @@
   synthetic constructor •() → self::Implement3*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -173,7 +173,7 @@
   synthetic constructor •() → self::Implement4*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -189,7 +189,7 @@
   synthetic constructor •() → self::Implement5*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -205,7 +205,7 @@
   synthetic constructor •() → self::Interface1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -221,7 +221,7 @@
   synthetic constructor •() → self::Interface2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -237,7 +237,7 @@
   synthetic constructor •() → self::Mixin1*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -253,7 +253,7 @@
   synthetic constructor •() → self::Mixin2*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, core::int* c, covariant core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, core::int* c, covariant-by-declaration core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -269,7 +269,7 @@
   synthetic constructor •() → self::Superclass*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant core::int* e) → void {}
+  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant-by-declaration core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -285,21 +285,21 @@
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1*
     : super self::Superclass::•()
     ;
-  forwarding-stub method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin1::method}(a, b, c, d, e);
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 = self::_Mixed&Superclass&Mixin1 with self::Mixin2 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2*
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  forwarding-stub method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed*
     : super self::_Mixed&Superclass&Mixin1&Mixin2::•()
     ;
-  forwarding-stub method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void {
diff --git a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
index 222ba3a..cb1a866 100644
--- a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.outline.expect
@@ -12,7 +12,7 @@
 class M1 extends core::Object {
   synthetic constructor •() → self::M1*
     ;
-  method method(covariant core::int* a, core::int* b) → dynamic
+  method method(covariant-by-declaration core::int* a, core::int* b) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -28,7 +28,7 @@
 class M2 extends core::Object {
   synthetic constructor •() → self::M2*
     ;
-  method method(core::int* a, covariant core::int* b) → dynamic
+  method method(core::int* a, covariant-by-declaration core::int* b) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -45,7 +45,7 @@
   const synthetic constructor •() → self::_C&Object&M1*
     : super core::Object::•()
     ;
-  mixin-super-stub method method(covariant core::int* a, core::int* b) → dynamic
+  mixin-super-stub method method(covariant-by-declaration core::int* a, core::int* b) → dynamic
     return super.{self::M1::method}(a, b);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -62,7 +62,7 @@
   const synthetic constructor •() → self::_C&Object&M1&M2*
     : super self::_C&Object&M1::•()
     ;
-  forwarding-stub method method(covariant core::int* a, covariant core::int* b) → dynamic
+  forwarding-stub method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b) → dynamic
     return super.{self::M2::method}(a, b);
 }
 class C extends self::_C&Object&M1&M2 {
@@ -72,11 +72,11 @@
 class Direct extends core::Object {
   synthetic constructor •() → self::Direct*
     ;
-  method positional(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void
+  method positional(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void
     ;
-  method optional([covariant core::int* a, core::int* b, covariant core::int* c, core::int* d]) → void
+  method optional([covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d]) → void
     ;
-  method named({covariant core::int* a, core::int* b, covariant core::int* c, core::int* d}) → void
+  method named({covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d}) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -96,7 +96,7 @@
 class Override1 extends core::Object {
   synthetic constructor •() → self::Override1*
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -112,19 +112,19 @@
 class Override2 extends self::Override1 {
   synthetic constructor •() → self::Override2*
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void
     ;
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3*
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void
     ;
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1*
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -140,7 +140,7 @@
 class Implement2 extends core::Object {
   synthetic constructor •() → self::Implement2*
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -156,7 +156,7 @@
 class Implement3 extends core::Object {
   synthetic constructor •() → self::Implement3*
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -172,7 +172,7 @@
 class Implement4 extends core::Object implements self::Implement3 {
   synthetic constructor •() → self::Implement4*
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, core::int* e) → void
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -188,7 +188,7 @@
 class Implement5 extends core::Object implements self::Implement1, self::Implement2, self::Implement4 {
   synthetic constructor •() → self::Implement5*
     ;
-  method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -204,7 +204,7 @@
 class Interface1 extends core::Object {
   synthetic constructor •() → self::Interface1*
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -220,7 +220,7 @@
 class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2*
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -236,7 +236,7 @@
 class Mixin1 extends core::Object {
   synthetic constructor •() → self::Mixin1*
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -252,7 +252,7 @@
 class Mixin2 extends core::Object {
   synthetic constructor •() → self::Mixin2*
     ;
-  method method(core::int* a, core::int* b, core::int* c, covariant core::int* d, core::int* e) → void
+  method method(core::int* a, core::int* b, core::int* c, covariant-by-declaration core::int* d, core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -268,7 +268,7 @@
 class Superclass extends core::Object {
   synthetic constructor •() → self::Superclass*
     ;
-  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant core::int* e) → void
+  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant-by-declaration core::int* e) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -285,20 +285,20 @@
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1*
     : super self::Superclass::•()
     ;
-  forwarding-stub method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin1::method}(a, b, c, d, e);
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 = self::_Mixed&Superclass&Mixin1 with self::Mixin2 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2*
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  forwarding-stub method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed*
     ;
-  forwarding-stub method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void
diff --git a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.transformed.expect
index 00fb601..29fba4a 100644
--- a/pkg/front_end/testcases/general/mixin_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::M1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b) → dynamic {}
+  method method(covariant-by-declaration core::int* a, core::int* b) → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::M2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b) → dynamic {}
+  method method(core::int* a, covariant-by-declaration core::int* b) → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -45,7 +45,7 @@
   const synthetic constructor •() → self::_C&Object&M1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b) → dynamic {}
+  method method(covariant-by-declaration core::int* a, core::int* b) → dynamic {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -61,7 +61,7 @@
   const synthetic constructor •() → self::_C&Object&M1&M2*
     : super self::_C&Object&M1::•()
     ;
-  method method(covariant core::int* a, covariant core::int* b) → dynamic {}
+  method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b) → dynamic {}
 }
 class C extends self::_C&Object&M1&M2 {
   synthetic constructor •() → self::C*
@@ -72,9 +72,9 @@
   synthetic constructor •() → self::Direct*
     : super core::Object::•()
     ;
-  method positional(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
-  method optional([covariant core::int* a = #C1, core::int* b = #C1, covariant core::int* c = #C1, core::int* d = #C1]) → void {}
-  method named({covariant core::int* a = #C1, core::int* b = #C1, covariant core::int* c = #C1, core::int* d = #C1}) → void {}
+  method positional(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
+  method optional([covariant-by-declaration core::int* a = #C1, core::int* b = #C1, covariant-by-declaration core::int* c = #C1, core::int* d = #C1]) → void {}
+  method named({covariant-by-declaration core::int* a = #C1, core::int* b = #C1, covariant-by-declaration core::int* c = #C1, core::int* d = #C1}) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -95,7 +95,7 @@
   synthetic constructor •() → self::Override1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -111,19 +111,19 @@
   synthetic constructor •() → self::Override2*
     : super self::Override1::•()
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3*
     : super self::Override2::•()
     ;
-  method method(covariant core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -139,7 +139,7 @@
   synthetic constructor •() → self::Implement2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -155,7 +155,7 @@
   synthetic constructor •() → self::Implement3*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -171,7 +171,7 @@
   synthetic constructor •() → self::Implement4*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -187,7 +187,7 @@
   synthetic constructor •() → self::Implement5*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -203,7 +203,7 @@
   synthetic constructor •() → self::Interface1*
     : super core::Object::•()
     ;
-  method method(covariant core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(covariant-by-declaration core::int* a, core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -219,7 +219,7 @@
   synthetic constructor •() → self::Interface2*
     : super core::Object::•()
     ;
-  method method(core::int* a, covariant core::int* b, core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, covariant-by-declaration core::int* b, core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -235,7 +235,7 @@
   synthetic constructor •() → self::Mixin1*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -251,7 +251,7 @@
   synthetic constructor •() → self::Mixin2*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, core::int* c, covariant core::int* d, core::int* e) → void {}
+  method method(core::int* a, core::int* b, core::int* c, covariant-by-declaration core::int* d, core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -267,7 +267,7 @@
   synthetic constructor •() → self::Superclass*
     : super core::Object::•()
     ;
-  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant core::int* e) → void {}
+  method method(core::int* a, core::int* b, core::int* c, core::int* d, covariant-by-declaration core::int* e) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -283,19 +283,19 @@
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1*
     : super self::Superclass::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, core::int* d, covariant core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, core::int* d, covariant-by-declaration core::int* e) → void {}
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 extends self::_Mixed&Superclass&Mixin1 implements self::Mixin2 /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2*
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  method method(core::int* a, core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void {}
+  method method(core::int* a, core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void {}
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed*
     : super self::_Mixed&Superclass&Mixin1&Mixin2::•()
     ;
-  forwarding-stub method method(covariant core::int* a, covariant core::int* b, covariant core::int* c, covariant core::int* d, covariant core::int* e) → void
+  forwarding-stub method method(covariant-by-declaration core::int* a, covariant-by-declaration core::int* b, covariant-by-declaration core::int* c, covariant-by-declaration core::int* d, covariant-by-declaration core::int* e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void {
diff --git a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.expect b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.expect
index f97e4ab..8a65e36 100644
--- a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num* argument1, core::num* argument2) → core::String*
     return "Superclass";
-  method method3(core::num* argument1, covariant core::int* argument2) → core::String*
+  method method3(core::num* argument1, covariant-by-declaration core::int* argument2) → core::String*
     return "Superclass";
-  method method4(core::num* argument1, covariant core::num* argument2) → core::String*
+  method method4(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     return "Superclass";
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -31,11 +31,11 @@
     ;
   method method1(core::num* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     return "Mixin";
   method method3(core::num* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method4(covariant core::int* argument1, core::int* argument2) → core::String*
+  method method4(covariant-by-declaration core::int* argument1, core::int* argument2) → core::String*
     return "Mixin";
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -54,11 +54,11 @@
     ;
   mixin-super-stub method method1(core::num* argument1, core::num* argument2) → core::String*
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  mixin-super-stub method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num* argument1, covariant core::num* argument2) → core::String*
+  forwarding-stub method method3(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int* argument1, covariant core::int* argument2) → core::String*
+  forwarding-stub method method4(covariant-by-declaration core::int* argument1, covariant-by-declaration core::int* argument2) → core::String*
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.outline.expect b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.outline.expect
index 01e76d1..64d87c4 100644
--- a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.outline.expect
@@ -9,9 +9,9 @@
     ;
   method method2(core::num* argument1, core::num* argument2) → core::String*
     ;
-  method method3(core::num* argument1, covariant core::int* argument2) → core::String*
+  method method3(core::num* argument1, covariant-by-declaration core::int* argument2) → core::String*
     ;
-  method method4(core::num* argument1, covariant core::num* argument2) → core::String*
+  method method4(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -29,11 +29,11 @@
     ;
   method method1(core::num* argument1, core::num* argument2) → core::String*
     ;
-  method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     ;
   method method3(core::num* argument1, core::num* argument2) → core::String*
     ;
-  method method4(covariant core::int* argument1, core::int* argument2) → core::String*
+  method method4(covariant-by-declaration core::int* argument1, core::int* argument2) → core::String*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -52,11 +52,11 @@
     ;
   mixin-super-stub method method1(core::num* argument1, core::num* argument2) → core::String*
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  mixin-super-stub method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num* argument1, covariant core::num* argument2) → core::String*
+  forwarding-stub method method3(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int* argument1, covariant core::int* argument2) → core::String*
+  forwarding-stub method method4(covariant-by-declaration core::int* argument1, covariant-by-declaration core::int* argument2) → core::String*
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.transformed.expect
index 9dafbb8..11ed4b8 100644
--- a/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/mixin_covariant2.dart.weak.transformed.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num* argument1, core::num* argument2) → core::String*
     return "Superclass";
-  method method3(core::num* argument1, covariant core::int* argument2) → core::String*
+  method method3(core::num* argument1, covariant-by-declaration core::int* argument2) → core::String*
     return "Superclass";
-  method method4(core::num* argument1, covariant core::num* argument2) → core::String*
+  method method4(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     return "Superclass";
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -31,11 +31,11 @@
     ;
   method method1(core::num* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     return "Mixin";
   method method3(core::num* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method4(covariant core::int* argument1, core::int* argument2) → core::String*
+  method method4(covariant-by-declaration core::int* argument1, core::int* argument2) → core::String*
     return "Mixin";
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -54,11 +54,11 @@
     ;
   method method1(core::num* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method2(covariant core::int* argument1, core::num* argument2) → core::String*
+  method method2(covariant-by-declaration core::int* argument1, core::num* argument2) → core::String*
     return "Mixin";
-  method method3(core::num* argument1, covariant core::num* argument2) → core::String*
+  method method3(core::num* argument1, covariant-by-declaration core::num* argument2) → core::String*
     return "Mixin";
-  method method4(covariant core::int* argument1, covariant core::int* argument2) → core::String*
+  method method4(covariant-by-declaration core::int* argument1, covariant-by-declaration core::int* argument2) → core::String*
     return "Mixin";
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.expect b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.expect
index 3587556..df2967e 100644
--- a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.expect
+++ b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.expect
@@ -18,11 +18,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends self::A*> extends core::Object {
-  generic-covariant-impl field self::C::T* _field = null;
+  covariant-by-class field self::C::T* _field = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::T* x) → dynamic {
+  method foo(covariant-by-class self::C::T* x) → dynamic {
     this.{self::C::_field} = x;
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -47,9 +47,9 @@
     ;
   mixin-super-stub get _field() → self::B*
     return super.{self::C::_field};
-  mixin-super-stub set _field(generic-covariant-impl self::B* value) → void
+  mixin-super-stub set _field(covariant-by-class self::B* value) → void
     return super.{self::C::_field} = value;
-  mixin-super-stub method foo(generic-covariant-impl self::B* x) → dynamic
+  mixin-super-stub method foo(covariant-by-class self::B* x) → dynamic
     return super.{self::C::foo}(x);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.outline.expect b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.outline.expect
index 8b4326c..dec07dd 100644
--- a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.outline.expect
@@ -17,10 +17,10 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends self::A*> extends core::Object {
-  generic-covariant-impl field self::C::T* _field;
+  covariant-by-class field self::C::T* _field;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method foo(generic-covariant-impl self::C::T* x) → dynamic
+  method foo(covariant-by-class self::C::T* x) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -43,9 +43,9 @@
     ;
   mixin-super-stub get _field() → self::B*
     return super.{self::C::_field};
-  mixin-super-stub set _field(generic-covariant-impl self::B* value) → void
+  mixin-super-stub set _field(covariant-by-class self::B* value) → void
     return super.{self::C::_field} = value;
-  mixin-super-stub method foo(generic-covariant-impl self::B* x) → dynamic
+  mixin-super-stub method foo(covariant-by-class self::B* x) → dynamic
     return super.{self::C::foo}(x);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.transformed.expect b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.transformed.expect
index 408bf4c..bfba41a 100644
--- a/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/mixin_inherited_setter_for_mixed_in_field.dart.weak.transformed.expect
@@ -18,11 +18,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends self::A*> extends core::Object {
-  generic-covariant-impl field self::C::T* _field = null;
+  covariant-by-class field self::C::T* _field = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::T* x) → dynamic {
+  method foo(covariant-by-class self::C::T* x) → dynamic {
     this.{self::C::_field} = x;
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -42,11 +42,11 @@
     ;
 }
 abstract class _Foo&Object&C extends core::Object implements self::C<self::B*> /*isAnonymousMixin,isEliminatedMixin*/  {
-  generic-covariant-impl field self::B* _field = null;
+  covariant-by-class field self::B* _field = null;
   synthetic constructor •() → self::_Foo&Object&C*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::B* x) → dynamic {
+  method foo(covariant-by-class self::B* x) → dynamic {
     this.{self::C::_field} = x;
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.expect
index e2b0f2d..2fd6b9d 100644
--- a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.expect
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.expect
@@ -53,6 +53,6 @@
   #C1 = #org-dartlang-testcase:///no_such_method_forwarder.dart::_foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo
 }
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.outline.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.outline.expect
index 9be8c51..3f9946a 100644
--- a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.outline.expect
@@ -47,9 +47,9 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:6:8 -> SymbolConstant(#_foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:11:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:11:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:11:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:11:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_forwarder.dart:11:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 16, effectively constant: 8
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.transformed.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.transformed.expect
index 5ef478d..e545ab0 100644
--- a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.weak.transformed.expect
@@ -80,6 +80,6 @@
   #C1 = #org-dartlang-testcase:///no_such_method_forwarder.dart::_foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo
 }
diff --git a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.expect b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.expect
index 6728bd2..180ea5a 100644
--- a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.expect
@@ -56,6 +56,6 @@
   #C1 = #org-dartlang-testcase:///no_such_method_private_setter.dart::_x
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///no_such_method_private_setter.dart::_x=
 }
diff --git a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.outline.expect b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.outline.expect
index d5c3d92..882f03b 100644
--- a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.outline.expect
@@ -53,8 +53,8 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> SymbolConstant(#_x)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> SymbolConstant(#_x=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method_private_setter_lib.dart:8:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 19, effectively constant: 7
diff --git a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.transformed.expect
index 79287b9..bc8c75f 100644
--- a/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/no_such_method_private_setter.dart.weak.transformed.expect
@@ -56,6 +56,6 @@
   #C1 = #org-dartlang-testcase:///no_such_method_private_setter.dart::_x
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///no_such_method_private_setter.dart::_x=
 }
diff --git a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.expect b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.expect
index 5e6241d..5f06498 100644
--- a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.expect
+++ b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.expect
@@ -3,21 +3,21 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* field1;
-  generic-covariant-impl field () →* self::C::T* field2;
+  covariant-by-class field self::C::T* field1;
+  covariant-by-class field () →* self::C::T* field2;
   field (self::C::T*) →* void field3;
-  generic-covariant-impl field (self::C::T*) →* self::C::T* field4;
-  generic-covariant-impl field () →* () →* self::C::T* field5;
+  covariant-by-class field (self::C::T*) →* self::C::T* field4;
+  covariant-by-class field () →* () →* self::C::T* field5;
   field (() →* self::C::T*) →* void field6;
-  generic-covariant-impl field (() →* self::C::T*) →* self::C::T* field7;
-  generic-covariant-impl field ((self::C::T*) →* void) →* void field8;
-  generic-covariant-impl field ((self::C::T*) →* void) →* self::C::T* field9;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* void field10;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>() →* S* field12;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* void field13;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* S* field14;
-  generic-covariant-impl field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
+  covariant-by-class field (() →* self::C::T*) →* self::C::T* field7;
+  covariant-by-class field ((self::C::T*) →* void) →* void field8;
+  covariant-by-class field ((self::C::T*) →* void) →* self::C::T* field9;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* void field10;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
+  covariant-by-class field <S extends self::C::T* = dynamic>() →* S* field12;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* void field13;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* S* field14;
+  covariant-by-class field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
   constructor •(self::C::T* field1) → self::C<self::C::T*>*
     : self::C::field1 = field1, self::C::field2 = () → self::C::T* => field1, self::C::field3 = (self::C::T* t) → Null {}, self::C::field4 = (self::C::T* t) → self::C::T* => t, self::C::field5 = () → () →* self::C::T* => () → self::C::T* => field1, self::C::field6 = (() →* self::C::T* f) → Null {}, self::C::field7 = (() →* self::C::T* f) → self::C::T* => field1, self::C::field8 = ((self::C::T*) →* void f) → Null {}, self::C::field9 = ((self::C::T*) →* void f) → self::C::T* => field1, self::C::field10 = ((self::C::T*) →* self::C::T* f) → Null {}, self::C::field11 = ((self::C::T*) →* self::C::T* f) → self::C::T* => field1, self::C::field12 = <S extends self::C::T*>() → Null => null, self::C::field13 = <S extends self::C::T*>(S* s) → Null {}, self::C::field14 = <S extends self::C::T*>(S* s) → S* => s, self::C::field15 = (<S extends self::C::T*>() →* S* f) → Null {}, super core::Object::•()
     ;
@@ -51,94 +51,94 @@
     return this.{self::C::field14}{<S extends self::C::T* = dynamic>(S*) →* S*};
   get getter15() → (<S extends self::C::T* = dynamic>() →* S*) →* void
     return this.{self::C::field15}{(<S extends self::C::T* = dynamic>() →* S*) →* void};
-  set setter1(generic-covariant-impl self::C::T* value) → void {
+  set setter1(covariant-by-class self::C::T* value) → void {
     this.{self::C::field1} = value;
   }
-  set setter2(generic-covariant-impl () →* self::C::T* value) → void {
+  set setter2(covariant-by-class () →* self::C::T* value) → void {
     this.{self::C::field2} = value;
   }
   set setter3((self::C::T*) →* void value) → void {
     this.{self::C::field3} = value;
   }
-  set setter4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void {
+  set setter4(covariant-by-class (self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field4} = value;
   }
-  set setter5(generic-covariant-impl () →* () →* self::C::T* value) → void {
+  set setter5(covariant-by-class () →* () →* self::C::T* value) → void {
     this.{self::C::field5} = value;
   }
   set setter6((() →* self::C::T*) →* void value) → void {
     this.{self::C::field6} = value;
   }
-  set setter7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void {
+  set setter7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field7} = value;
   }
-  set setter8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void {
+  set setter8(covariant-by-class ((self::C::T*) →* void) →* void value) → void {
     this.{self::C::field8} = value;
   }
-  set setter9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void {
+  set setter9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void {
     this.{self::C::field9} = value;
   }
-  set setter10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void {
+  set setter10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void {
     this.{self::C::field10} = value;
   }
-  set setter11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
+  set setter11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field11} = value;
   }
-  set setter12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void {
+  set setter12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void {
     this.{self::C::field12} = value;
   }
-  set setter13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void {
+  set setter13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void {
     this.{self::C::field13} = value;
   }
-  set setter14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
+  set setter14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
     this.{self::C::field14} = value;
   }
-  set setter15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
+  set setter15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
     this.{self::C::field15} = value;
   }
-  method method1(generic-covariant-impl self::C::T* value) → void {
+  method method1(covariant-by-class self::C::T* value) → void {
     this.{self::C::field1} = value;
   }
-  method method2(generic-covariant-impl () →* self::C::T* value) → void {
+  method method2(covariant-by-class () →* self::C::T* value) → void {
     this.{self::C::field2} = value;
   }
   method method3((self::C::T*) →* void value) → void {
     this.{self::C::field3} = value;
   }
-  method method4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void {
+  method method4(covariant-by-class (self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field4} = value;
   }
-  method method5(generic-covariant-impl () →* () →* self::C::T* value) → void {
+  method method5(covariant-by-class () →* () →* self::C::T* value) → void {
     this.{self::C::field5} = value;
   }
   method method6((() →* self::C::T*) →* void value) → void {
     this.{self::C::field6} = value;
   }
-  method method7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void {
+  method method7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field7} = value;
   }
-  method method8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void {
+  method method8(covariant-by-class ((self::C::T*) →* void) →* void value) → void {
     this.{self::C::field8} = value;
   }
-  method method9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void {
+  method method9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void {
     this.{self::C::field9} = value;
   }
-  method method10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void {
+  method method10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void {
     this.{self::C::field10} = value;
   }
-  method method11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
+  method method11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field11} = value;
   }
-  method method12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void {
+  method method12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void {
     this.{self::C::field12} = value;
   }
-  method method13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void {
+  method method13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void {
     this.{self::C::field13} = value;
   }
-  method method14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
+  method method14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
     this.{self::C::field14} = value;
   }
-  method method15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
+  method method15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
     this.{self::C::field15} = value;
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.outline.expect b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.outline.expect
index 8663996..0280a26 100644
--- a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.outline.expect
@@ -3,21 +3,21 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* field1;
-  generic-covariant-impl field () →* self::C::T* field2;
+  covariant-by-class field self::C::T* field1;
+  covariant-by-class field () →* self::C::T* field2;
   field (self::C::T*) →* void field3;
-  generic-covariant-impl field (self::C::T*) →* self::C::T* field4;
-  generic-covariant-impl field () →* () →* self::C::T* field5;
+  covariant-by-class field (self::C::T*) →* self::C::T* field4;
+  covariant-by-class field () →* () →* self::C::T* field5;
   field (() →* self::C::T*) →* void field6;
-  generic-covariant-impl field (() →* self::C::T*) →* self::C::T* field7;
-  generic-covariant-impl field ((self::C::T*) →* void) →* void field8;
-  generic-covariant-impl field ((self::C::T*) →* void) →* self::C::T* field9;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* void field10;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>() →* S* field12;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* void field13;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* S* field14;
-  generic-covariant-impl field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
+  covariant-by-class field (() →* self::C::T*) →* self::C::T* field7;
+  covariant-by-class field ((self::C::T*) →* void) →* void field8;
+  covariant-by-class field ((self::C::T*) →* void) →* self::C::T* field9;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* void field10;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
+  covariant-by-class field <S extends self::C::T* = dynamic>() →* S* field12;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* void field13;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* S* field14;
+  covariant-by-class field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
   constructor •(self::C::T* field1) → self::C<self::C::T*>*
     ;
   get getter1() → self::C::T*
@@ -50,65 +50,65 @@
     ;
   get getter15() → (<S extends self::C::T* = dynamic>() →* S*) →* void
     ;
-  set setter1(generic-covariant-impl self::C::T* value) → void
+  set setter1(covariant-by-class self::C::T* value) → void
     ;
-  set setter2(generic-covariant-impl () →* self::C::T* value) → void
+  set setter2(covariant-by-class () →* self::C::T* value) → void
     ;
   set setter3((self::C::T*) →* void value) → void
     ;
-  set setter4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void
+  set setter4(covariant-by-class (self::C::T*) →* self::C::T* value) → void
     ;
-  set setter5(generic-covariant-impl () →* () →* self::C::T* value) → void
+  set setter5(covariant-by-class () →* () →* self::C::T* value) → void
     ;
   set setter6((() →* self::C::T*) →* void value) → void
     ;
-  set setter7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void
+  set setter7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void
     ;
-  set setter8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void
+  set setter8(covariant-by-class ((self::C::T*) →* void) →* void value) → void
     ;
-  set setter9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void
+  set setter9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void
     ;
-  set setter10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void
+  set setter10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void
     ;
-  set setter11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void
+  set setter11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void
     ;
-  set setter12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void
+  set setter12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void
     ;
-  set setter13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void
+  set setter13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void
     ;
-  set setter14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void
+  set setter14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void
     ;
-  set setter15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void
+  set setter15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void
     ;
-  method method1(generic-covariant-impl self::C::T* value) → void
+  method method1(covariant-by-class self::C::T* value) → void
     ;
-  method method2(generic-covariant-impl () →* self::C::T* value) → void
+  method method2(covariant-by-class () →* self::C::T* value) → void
     ;
   method method3((self::C::T*) →* void value) → void
     ;
-  method method4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void
+  method method4(covariant-by-class (self::C::T*) →* self::C::T* value) → void
     ;
-  method method5(generic-covariant-impl () →* () →* self::C::T* value) → void
+  method method5(covariant-by-class () →* () →* self::C::T* value) → void
     ;
   method method6((() →* self::C::T*) →* void value) → void
     ;
-  method method7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void
+  method method7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void
     ;
-  method method8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void
+  method method8(covariant-by-class ((self::C::T*) →* void) →* void value) → void
     ;
-  method method9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void
+  method method9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void
     ;
-  method method10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void
+  method method10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void
     ;
-  method method11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void
+  method method11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void
     ;
-  method method12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void
+  method method12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void
     ;
-  method method13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void
+  method method13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void
     ;
-  method method14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void
+  method method14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void
     ;
-  method method15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void
+  method method15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.transformed.expect b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.transformed.expect
index 5e6241d..5f06498 100644
--- a/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/non_covariant_checks.dart.weak.transformed.expect
@@ -3,21 +3,21 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* field1;
-  generic-covariant-impl field () →* self::C::T* field2;
+  covariant-by-class field self::C::T* field1;
+  covariant-by-class field () →* self::C::T* field2;
   field (self::C::T*) →* void field3;
-  generic-covariant-impl field (self::C::T*) →* self::C::T* field4;
-  generic-covariant-impl field () →* () →* self::C::T* field5;
+  covariant-by-class field (self::C::T*) →* self::C::T* field4;
+  covariant-by-class field () →* () →* self::C::T* field5;
   field (() →* self::C::T*) →* void field6;
-  generic-covariant-impl field (() →* self::C::T*) →* self::C::T* field7;
-  generic-covariant-impl field ((self::C::T*) →* void) →* void field8;
-  generic-covariant-impl field ((self::C::T*) →* void) →* self::C::T* field9;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* void field10;
-  generic-covariant-impl field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>() →* S* field12;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* void field13;
-  generic-covariant-impl field <S extends self::C::T* = dynamic>(S*) →* S* field14;
-  generic-covariant-impl field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
+  covariant-by-class field (() →* self::C::T*) →* self::C::T* field7;
+  covariant-by-class field ((self::C::T*) →* void) →* void field8;
+  covariant-by-class field ((self::C::T*) →* void) →* self::C::T* field9;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* void field10;
+  covariant-by-class field ((self::C::T*) →* self::C::T*) →* self::C::T* field11;
+  covariant-by-class field <S extends self::C::T* = dynamic>() →* S* field12;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* void field13;
+  covariant-by-class field <S extends self::C::T* = dynamic>(S*) →* S* field14;
+  covariant-by-class field (<S extends self::C::T* = dynamic>() →* S*) →* void field15;
   constructor •(self::C::T* field1) → self::C<self::C::T*>*
     : self::C::field1 = field1, self::C::field2 = () → self::C::T* => field1, self::C::field3 = (self::C::T* t) → Null {}, self::C::field4 = (self::C::T* t) → self::C::T* => t, self::C::field5 = () → () →* self::C::T* => () → self::C::T* => field1, self::C::field6 = (() →* self::C::T* f) → Null {}, self::C::field7 = (() →* self::C::T* f) → self::C::T* => field1, self::C::field8 = ((self::C::T*) →* void f) → Null {}, self::C::field9 = ((self::C::T*) →* void f) → self::C::T* => field1, self::C::field10 = ((self::C::T*) →* self::C::T* f) → Null {}, self::C::field11 = ((self::C::T*) →* self::C::T* f) → self::C::T* => field1, self::C::field12 = <S extends self::C::T*>() → Null => null, self::C::field13 = <S extends self::C::T*>(S* s) → Null {}, self::C::field14 = <S extends self::C::T*>(S* s) → S* => s, self::C::field15 = (<S extends self::C::T*>() →* S* f) → Null {}, super core::Object::•()
     ;
@@ -51,94 +51,94 @@
     return this.{self::C::field14}{<S extends self::C::T* = dynamic>(S*) →* S*};
   get getter15() → (<S extends self::C::T* = dynamic>() →* S*) →* void
     return this.{self::C::field15}{(<S extends self::C::T* = dynamic>() →* S*) →* void};
-  set setter1(generic-covariant-impl self::C::T* value) → void {
+  set setter1(covariant-by-class self::C::T* value) → void {
     this.{self::C::field1} = value;
   }
-  set setter2(generic-covariant-impl () →* self::C::T* value) → void {
+  set setter2(covariant-by-class () →* self::C::T* value) → void {
     this.{self::C::field2} = value;
   }
   set setter3((self::C::T*) →* void value) → void {
     this.{self::C::field3} = value;
   }
-  set setter4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void {
+  set setter4(covariant-by-class (self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field4} = value;
   }
-  set setter5(generic-covariant-impl () →* () →* self::C::T* value) → void {
+  set setter5(covariant-by-class () →* () →* self::C::T* value) → void {
     this.{self::C::field5} = value;
   }
   set setter6((() →* self::C::T*) →* void value) → void {
     this.{self::C::field6} = value;
   }
-  set setter7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void {
+  set setter7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field7} = value;
   }
-  set setter8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void {
+  set setter8(covariant-by-class ((self::C::T*) →* void) →* void value) → void {
     this.{self::C::field8} = value;
   }
-  set setter9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void {
+  set setter9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void {
     this.{self::C::field9} = value;
   }
-  set setter10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void {
+  set setter10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void {
     this.{self::C::field10} = value;
   }
-  set setter11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
+  set setter11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field11} = value;
   }
-  set setter12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void {
+  set setter12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void {
     this.{self::C::field12} = value;
   }
-  set setter13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void {
+  set setter13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void {
     this.{self::C::field13} = value;
   }
-  set setter14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
+  set setter14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
     this.{self::C::field14} = value;
   }
-  set setter15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
+  set setter15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
     this.{self::C::field15} = value;
   }
-  method method1(generic-covariant-impl self::C::T* value) → void {
+  method method1(covariant-by-class self::C::T* value) → void {
     this.{self::C::field1} = value;
   }
-  method method2(generic-covariant-impl () →* self::C::T* value) → void {
+  method method2(covariant-by-class () →* self::C::T* value) → void {
     this.{self::C::field2} = value;
   }
   method method3((self::C::T*) →* void value) → void {
     this.{self::C::field3} = value;
   }
-  method method4(generic-covariant-impl (self::C::T*) →* self::C::T* value) → void {
+  method method4(covariant-by-class (self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field4} = value;
   }
-  method method5(generic-covariant-impl () →* () →* self::C::T* value) → void {
+  method method5(covariant-by-class () →* () →* self::C::T* value) → void {
     this.{self::C::field5} = value;
   }
   method method6((() →* self::C::T*) →* void value) → void {
     this.{self::C::field6} = value;
   }
-  method method7(generic-covariant-impl (() →* self::C::T*) →* self::C::T* value) → void {
+  method method7(covariant-by-class (() →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field7} = value;
   }
-  method method8(generic-covariant-impl ((self::C::T*) →* void) →* void value) → void {
+  method method8(covariant-by-class ((self::C::T*) →* void) →* void value) → void {
     this.{self::C::field8} = value;
   }
-  method method9(generic-covariant-impl ((self::C::T*) →* void) →* self::C::T* value) → void {
+  method method9(covariant-by-class ((self::C::T*) →* void) →* self::C::T* value) → void {
     this.{self::C::field9} = value;
   }
-  method method10(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* void value) → void {
+  method method10(covariant-by-class ((self::C::T*) →* self::C::T*) →* void value) → void {
     this.{self::C::field10} = value;
   }
-  method method11(generic-covariant-impl ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
+  method method11(covariant-by-class ((self::C::T*) →* self::C::T*) →* self::C::T* value) → void {
     this.{self::C::field11} = value;
   }
-  method method12(generic-covariant-impl <S extends self::C::T* = dynamic>() →* S* value) → void {
+  method method12(covariant-by-class <S extends self::C::T* = dynamic>() →* S* value) → void {
     this.{self::C::field12} = value;
   }
-  method method13(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* void value) → void {
+  method method13(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* void value) → void {
     this.{self::C::field13} = value;
   }
-  method method14(generic-covariant-impl <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
+  method method14(covariant-by-class <S extends self::C::T* = dynamic>(S*) →* S* value) → void {
     this.{self::C::field14} = value;
   }
-  method method15(generic-covariant-impl (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
+  method method15(covariant-by-class (<S extends self::C::T* = dynamic>() →* S*) →* void value) → void {
     this.{self::C::field15} = value;
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.expect b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.expect
index 7f2d6c50..ac4c6e4 100644
--- a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.expect
+++ b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.expect
@@ -19,10 +19,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 abstract class D2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → self::D2*
@@ -38,10 +38,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 class D3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → self::D3*
@@ -59,14 +59,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 class D4 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → self::D4*
@@ -84,14 +84,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {}
 
@@ -103,10 +103,10 @@
   synthetic constructor •() → nsm::A<nsm::A::T*>*
     : super core::Object::•()
     ;
-  abstract method _method1(core::int* a, core::int* b, generic-covariant-impl nsm::A::T* c, generic-covariant-impl nsm::A::T* d) → void;
-  abstract method _method2({core::int* a = #C1, core::int* b = #C1, generic-covariant-impl nsm::A::T* c = #C1, generic-covariant-impl nsm::A::T* d = #C1}) → void;
-  abstract method _method3(core::int* a, generic-covariant-impl nsm::A::T* b) → void;
-  abstract method _method4({core::int* a = #C1, generic-covariant-impl nsm::A::T* b = #C1}) → void;
+  abstract method _method1(core::int* a, core::int* b, covariant-by-class nsm::A::T* c, covariant-by-class nsm::A::T* d) → void;
+  abstract method _method2({core::int* a = #C1, core::int* b = #C1, covariant-by-class nsm::A::T* c = #C1, covariant-by-class nsm::A::T* d = #C1}) → void;
+  abstract method _method3(core::int* a, covariant-by-class nsm::A::T* b) → void;
+  abstract method _method4({core::int* a = #C1, covariant-by-class nsm::A::T* b = #C1}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -122,10 +122,10 @@
   synthetic constructor •() → nsm::B*
     : super core::Object::•()
     ;
-  abstract method _method1(core::int* x, covariant core::int* y, core::int* z, covariant core::int* w) → void;
-  abstract method _method2({core::int* a = #C1, covariant core::int* b = #C1, core::int* c = #C1, covariant core::int* d = #C1}) → void;
-  abstract method _method3(covariant core::int* x, core::int* y) → void;
-  abstract method _method4({covariant core::int* a = #C1, core::int* b = #C1}) → void;
+  abstract method _method1(core::int* x, covariant-by-declaration core::int* y, core::int* z, covariant-by-declaration core::int* w) → void;
+  abstract method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, core::int* c = #C1, covariant-by-declaration core::int* d = #C1}) → void;
+  abstract method _method3(covariant-by-declaration core::int* x, core::int* y) → void;
+  abstract method _method4({covariant-by-declaration core::int* a = #C1, core::int* b = #C1}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -151,10 +151,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 abstract class C2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → nsm::C2*
@@ -170,10 +170,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 class C3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → nsm::C3*
@@ -191,14 +191,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 class C4 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → nsm::C4*
@@ -216,14 +216,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 
 constants  {
@@ -231,9 +231,9 @@
   #C2 = core::_Override {}
   #C3 = #org-dartlang-testcase:///nsm_covariance.dart::_method1
   #C4 = <core::Type*>[]
-  #C5 = <dynamic>[]
-  #C6 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C5}
-  #C7 = #org-dartlang-testcase:///nsm_covariance.dart::_method2
+  #C5 = <core::Symbol*, dynamic>{)
+  #C6 = #org-dartlang-testcase:///nsm_covariance.dart::_method2
+  #C7 = <dynamic>[]
   #C8 = #a
   #C9 = #b
   #C10 = #c
diff --git a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
index e07accc..6352cee 100644
--- a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.outline.expect
@@ -18,10 +18,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void;
 }
 abstract class D2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → self::D2*
@@ -36,10 +36,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void;
 }
 class D3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → self::D3*
@@ -56,13 +56,13 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
     return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void
+  no-such-method-forwarder method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void
     return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method2, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b, #c: c, #d: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
     return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void
     return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method4, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b}))){(core::Invocation*) →* dynamic};
 }
 class D4 extends core::Object implements nsm::B, nsm::A<core::int*> {
@@ -80,13 +80,13 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
     return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void
+  no-such-method-forwarder method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void
     return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method2, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b, #c: c, #d: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
     return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void
     return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method4, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b}))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic
@@ -99,10 +99,10 @@
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → nsm::A<nsm::A::T*>*
     ;
-  abstract method _method1(core::int* a, core::int* b, generic-covariant-impl nsm::A::T* c, generic-covariant-impl nsm::A::T* d) → void;
-  abstract method _method2({core::int* a, core::int* b, generic-covariant-impl nsm::A::T* c, generic-covariant-impl nsm::A::T* d}) → void;
-  abstract method _method3(core::int* a, generic-covariant-impl nsm::A::T* b) → void;
-  abstract method _method4({core::int* a, generic-covariant-impl nsm::A::T* b}) → void;
+  abstract method _method1(core::int* a, core::int* b, covariant-by-class nsm::A::T* c, covariant-by-class nsm::A::T* d) → void;
+  abstract method _method2({core::int* a, core::int* b, covariant-by-class nsm::A::T* c, covariant-by-class nsm::A::T* d}) → void;
+  abstract method _method3(core::int* a, covariant-by-class nsm::A::T* b) → void;
+  abstract method _method4({core::int* a, covariant-by-class nsm::A::T* b}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -117,10 +117,10 @@
 abstract class B extends core::Object {
   synthetic constructor •() → nsm::B*
     ;
-  abstract method _method1(core::int* x, covariant core::int* y, core::int* z, covariant core::int* w) → void;
-  abstract method _method2({core::int* a, covariant core::int* b, core::int* c, covariant core::int* d}) → void;
-  abstract method _method3(covariant core::int* x, core::int* y) → void;
-  abstract method _method4({covariant core::int* a, core::int* b}) → void;
+  abstract method _method1(core::int* x, covariant-by-declaration core::int* y, core::int* z, covariant-by-declaration core::int* w) → void;
+  abstract method _method2({core::int* a, covariant-by-declaration core::int* b, core::int* c, covariant-by-declaration core::int* d}) → void;
+  abstract method _method3(covariant-by-declaration core::int* x, core::int* y) → void;
+  abstract method _method4({covariant-by-declaration core::int* a, core::int* b}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -145,10 +145,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void;
 }
 abstract class C2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → nsm::C2*
@@ -163,10 +163,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void;
 }
 class C3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → nsm::C3*
@@ -183,13 +183,13 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
     return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[a, b, c, d]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void
+  no-such-method-forwarder method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void
     return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method2, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b, #c: c, #d: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
     return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[a, b]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void
     return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#_method4, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b}))){(core::Invocation*) →* dynamic};
 }
 class C4 extends core::Object implements nsm::B, nsm::A<core::int*> {
@@ -207,13 +207,13 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
     return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method1, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x, y, z, w]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d}) → void
+  no-such-method-forwarder method _method2({core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d}) → void
     return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method2, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b, #c: c, #d: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
     return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method3, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x, y]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a, generic-covariant-impl core::int* b}) → void
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a, covariant-by-class core::int* b}) → void
     return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#_method4, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#a: a, #b: b}))){(core::Invocation*) →* dynamic};
 }
 
@@ -222,7 +222,7 @@
 Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:14:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method1)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method2)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <dynamic>[])
@@ -232,7 +232,7 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#d)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method3)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> SymbolConstant(#_method4)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:13:7 -> ListConstant(const <dynamic>[])
@@ -241,7 +241,7 @@
 Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance.dart:19:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method1)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method2)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <dynamic>[])
@@ -251,7 +251,7 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#d)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method3)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> SymbolConstant(#_method4)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance.dart:18:7 -> ListConstant(const <dynamic>[])
@@ -260,7 +260,7 @@
 Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance_lib.dart:24:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#_method1)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#_method2)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <dynamic>[])
@@ -270,7 +270,7 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#d)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#_method3)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> SymbolConstant(#_method4)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:23:7 -> ListConstant(const <dynamic>[])
@@ -279,7 +279,7 @@
 Evaluated: StaticGet @ org-dartlang-testcase:///nsm_covariance_lib.dart:29:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> SymbolConstant(#_method1)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> SymbolConstant(#_method2)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <dynamic>[])
@@ -289,7 +289,7 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> SymbolConstant(#d)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> SymbolConstant(#_method3)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> SymbolConstant(#_method4)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_covariance_lib.dart:28:7 -> ListConstant(const <dynamic>[])
diff --git a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.transformed.expect b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.transformed.expect
index e66febb..60a0535 100644
--- a/pkg/front_end/testcases/general/nsm_covariance.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/nsm_covariance.dart.weak.transformed.expect
@@ -19,10 +19,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 abstract class D2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → self::D2*
@@ -38,10 +38,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 class D3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → self::D3*
@@ -59,14 +59,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(a, b, c, d)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(a, b)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(a, b, c, d)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(a, b)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{self::D3::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 class D4 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → self::D4*
@@ -84,14 +84,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(x, y, z, w)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(x, y)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C3, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(x, y, z, w)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(x, y)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{self::D4::noSuchMethod}(new core::_InvocationMirror::_withType(#C13, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {}
 
@@ -103,10 +103,10 @@
   synthetic constructor •() → nsm::A<nsm::A::T*>*
     : super core::Object::•()
     ;
-  abstract method _method1(core::int* a, core::int* b, generic-covariant-impl nsm::A::T* c, generic-covariant-impl nsm::A::T* d) → void;
-  abstract method _method2({core::int* a = #C1, core::int* b = #C1, generic-covariant-impl nsm::A::T* c = #C1, generic-covariant-impl nsm::A::T* d = #C1}) → void;
-  abstract method _method3(core::int* a, generic-covariant-impl nsm::A::T* b) → void;
-  abstract method _method4({core::int* a = #C1, generic-covariant-impl nsm::A::T* b = #C1}) → void;
+  abstract method _method1(core::int* a, core::int* b, covariant-by-class nsm::A::T* c, covariant-by-class nsm::A::T* d) → void;
+  abstract method _method2({core::int* a = #C1, core::int* b = #C1, covariant-by-class nsm::A::T* c = #C1, covariant-by-class nsm::A::T* d = #C1}) → void;
+  abstract method _method3(core::int* a, covariant-by-class nsm::A::T* b) → void;
+  abstract method _method4({core::int* a = #C1, covariant-by-class nsm::A::T* b = #C1}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -122,10 +122,10 @@
   synthetic constructor •() → nsm::B*
     : super core::Object::•()
     ;
-  abstract method _method1(core::int* x, covariant core::int* y, core::int* z, covariant core::int* w) → void;
-  abstract method _method2({core::int* a = #C1, covariant core::int* b = #C1, core::int* c = #C1, covariant core::int* d = #C1}) → void;
-  abstract method _method3(covariant core::int* x, core::int* y) → void;
-  abstract method _method4({covariant core::int* a = #C1, core::int* b = #C1}) → void;
+  abstract method _method1(core::int* x, covariant-by-declaration core::int* y, core::int* z, covariant-by-declaration core::int* w) → void;
+  abstract method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, core::int* c = #C1, covariant-by-declaration core::int* d = #C1}) → void;
+  abstract method _method3(covariant-by-declaration core::int* x, core::int* y) → void;
+  abstract method _method4({covariant-by-declaration core::int* a = #C1, core::int* b = #C1}) → void;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -151,10 +151,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 abstract class C2 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → nsm::C2*
@@ -170,10 +170,10 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void;
-  abstract forwarding-stub method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void;
-  abstract forwarding-stub method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void;
-  abstract forwarding-stub method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void;
+  abstract forwarding-stub method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void;
+  abstract forwarding-stub method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void;
+  abstract forwarding-stub method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void;
+  abstract forwarding-stub method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void;
 }
 class C3 extends core::Object implements nsm::A<core::int*>, nsm::B {
   synthetic constructor •() → nsm::C3*
@@ -191,14 +191,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* a, covariant core::int* b, generic-covariant-impl core::int* c, covariant generic-covariant-impl core::int* d) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(a, b, c, d)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* a, generic-covariant-impl core::int* b) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(a, b)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* a, covariant-by-declaration core::int* b, covariant-by-class core::int* c, covariant-by-declaration covariant-by-class core::int* d) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(a, b, c, d)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* a, covariant-by-class core::int* b) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(a, b)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{nsm::C3::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 class C4 extends core::Object implements nsm::B, nsm::A<core::int*> {
   synthetic constructor •() → nsm::C4*
@@ -216,14 +216,14 @@
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  no-such-method-forwarder method _method1(core::int* x, covariant core::int* y, generic-covariant-impl core::int* z, covariant generic-covariant-impl core::int* w) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(x, y, z, w)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method2({core::int* a = #C1, covariant core::int* b = #C1, generic-covariant-impl core::int* c = #C1, covariant generic-covariant-impl core::int* d = #C1}) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method3(covariant core::int* x, generic-covariant-impl core::int* y) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(x, y)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder method _method4({covariant core::int* a = #C1, generic-covariant-impl core::int* b = #C1}) → void
-    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method1(core::int* x, covariant-by-declaration core::int* y, covariant-by-class core::int* z, covariant-by-declaration covariant-by-class core::int* w) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C14, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal4<dynamic>(x, y, z, w)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method2({core::int* a = #C1, covariant-by-declaration core::int* b = #C1, covariant-by-class core::int* c = #C1, covariant-by-declaration covariant-by-class core::int* d = #C1}) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C15, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b, #C10: c, #C11: d}))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method3(covariant-by-declaration core::int* x, covariant-by-class core::int* y) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C16, 0, #C4, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal2<dynamic>(x, y)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder method _method4({covariant-by-declaration core::int* a = #C1, covariant-by-class core::int* b = #C1}) → void
+    return this.{nsm::C4::noSuchMethod}(new core::_InvocationMirror::_withType(#C17, 0, #C4, #C7, core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: a, #C9: b}))){(core::Invocation*) →* dynamic};
 }
 
 constants  {
@@ -231,9 +231,9 @@
   #C2 = core::_Override {}
   #C3 = #org-dartlang-testcase:///nsm_covariance.dart::_method1
   #C4 = <core::Type*>[]
-  #C5 = <dynamic>[]
-  #C6 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C5}
-  #C7 = #org-dartlang-testcase:///nsm_covariance.dart::_method2
+  #C5 = <core::Symbol*, dynamic>{)
+  #C6 = #org-dartlang-testcase:///nsm_covariance.dart::_method2
+  #C7 = <dynamic>[]
   #C8 = #a
   #C9 = #b
   #C10 = #c
diff --git a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.expect b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.expect
index bafec9d..7426716 100644
--- a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.expect
+++ b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.expect
@@ -9,11 +9,11 @@
     ;
 }
 class Class<E extends self::Element?> extends core::Object {
-  generic-covariant-impl field self::Class::E? element;
+  covariant-by-class field self::Class::E? element;
   constructor •(self::Class::E? element) → self::Class<self::Class::E%>
     : self::Class::element = element, super core::Object::•()
     ;
-  method setElement(generic-covariant-impl self::Class::E? element) → void {
+  method setElement(covariant-by-class self::Class::E? element) → void {
     if(!(this.{self::Class::element}{self::Class::E?} =={core::Object::==}{(core::Object) → core::bool} element)) {
       this.{self::Class::element} = element;
       core::Set<self::Element> elements = col::LinkedHashSet::•<self::Element>();
diff --git a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.outline.expect b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.outline.expect
index b66e3a9..a03631c 100644
--- a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.outline.expect
@@ -7,10 +7,10 @@
     ;
 }
 class Class<E extends self::Element?> extends core::Object {
-  generic-covariant-impl field self::Class::E? element;
+  covariant-by-class field self::Class::E? element;
   constructor •(self::Class::E? element) → self::Class<self::Class::E%>
     ;
-  method setElement(generic-covariant-impl self::Class::E? element) → void
+  method setElement(covariant-by-class self::Class::E? element) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect
index 89db16d..3580a9b 100644
--- a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect
@@ -9,11 +9,11 @@
     ;
 }
 class Class<E extends self::Element?> extends core::Object {
-  generic-covariant-impl field self::Class::E? element;
+  covariant-by-class field self::Class::E? element;
   constructor •(self::Class::E? element) → self::Class<self::Class::E%>
     : self::Class::element = element, super core::Object::•()
     ;
-  method setElement(generic-covariant-impl self::Class::E? element) → void {
+  method setElement(covariant-by-class self::Class::E? element) → void {
     if(!(this.{self::Class::element}{self::Class::E?} =={core::Object::==}{(core::Object) → core::bool} element)) {
       this.{self::Class::element} = element;
       core::Set<self::Element> elements = new col::_CompactLinkedHashSet::•<self::Element>();
diff --git a/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.expect b/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.expect
index 47a92fc..14fa421 100644
--- a/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.expect
+++ b/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.expect
@@ -48,12 +48,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  set x1(covariant self::A* value) → void {}
+  set x1(covariant-by-declaration self::A* value) → void {}
   set x2(self::A* value) → void {}
-  set x3(covariant self::A* value) → void {}
+  set x3(covariant-by-declaration self::A* value) → void {}
   set x4(self::A* value) → void {}
-  set x5(covariant self::A* value) → void {}
-  set x6(covariant self::B* value) → void {}
+  set x5(covariant-by-declaration self::A* value) → void {}
+  set x6(covariant-by-declaration self::B* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -69,11 +69,11 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  set x1(covariant self::B* value) → void {}
-  set x2(covariant self::B* value) → void {}
-  set x3(covariant self::B* value) → void {}
+  set x1(covariant-by-declaration self::B* value) → void {}
+  set x2(covariant-by-declaration self::B* value) → void {}
+  set x3(covariant-by-declaration self::B* value) → void {}
   set x4(self::B* value) → void {}
-  set x5(covariant core::String* value) → void {}
-  set x6(covariant self::A* value) → void {}
+  set x5(covariant-by-declaration core::String* value) → void {}
+  set x6(covariant-by-declaration self::A* value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.outline.expect b/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.outline.expect
index 1012ac6..504c4ce 100644
--- a/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/override_check_accessor_with_covariant_modifier.dart.weak.outline.expect
@@ -45,17 +45,17 @@
 class C extends core::Object {
   synthetic constructor •() → self::C*
     ;
-  set x1(covariant self::A* value) → void
+  set x1(covariant-by-declaration self::A* value) → void
     ;
   set x2(self::A* value) → void
     ;
-  set x3(covariant self::A* value) → void
+  set x3(covariant-by-declaration self::A* value) → void
     ;
   set x4(self::A* value) → void
     ;
-  set x5(covariant self::A* value) → void
+  set x5(covariant-by-declaration self::A* value) → void
     ;
-  set x6(covariant self::B* value) → void
+  set x6(covariant-by-declaration self::B* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -71,17 +71,17 @@
 class D extends self::C {
   synthetic constructor •() → self::D*
     ;
-  set x1(covariant self::B* value) → void
+  set x1(covariant-by-declaration self::B* value) → void
     ;
-  set x2(covariant self::B* value) → void
+  set x2(covariant-by-declaration self::B* value) → void
     ;
-  set x3(covariant self::B* value) → void
+  set x3(covariant-by-declaration self::B* value) → void
     ;
   set x4(self::B* value) → void
     ;
-  set x5(covariant core::String* value) → void
+  set x5(covariant-by-declaration core::String* value) → void
     ;
-  set x6(covariant self::A* value) → void
+  set x6(covariant-by-declaration self::A* value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.expect b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.expect
index 65a02b5..54a4764 100644
--- a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.expect
+++ b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  method f<U extends core::Object* = dynamic>(generic-covariant-impl core::Map<self::A::T*, self::A::f::U*>* m) → void {}
+  method f<U extends core::Object* = dynamic>(covariant-by-class core::Map<self::A::T*, self::A::f::U*>* m) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,6 +22,6 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  method f<V extends core::Object* = dynamic>(generic-covariant-impl core::Map<core::String*, self::B::f::V*>* m) → void {}
+  method f<V extends core::Object* = dynamic>(covariant-by-class core::Map<core::String*, self::B::f::V*>* m) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.outline.expect b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.outline.expect
index b90d84e..cf3b6b2 100644
--- a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T*>*
     ;
-  method f<U extends core::Object* = dynamic>(generic-covariant-impl core::Map<self::A::T*, self::A::f::U*>* m) → void
+  method f<U extends core::Object* = dynamic>(covariant-by-class core::Map<self::A::T*, self::A::f::U*>* m) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -21,7 +21,7 @@
 class B extends self::A<core::String*> {
   synthetic constructor •() → self::B*
     ;
-  method f<V extends core::Object* = dynamic>(generic-covariant-impl core::Map<core::String*, self::B::f::V*>* m) → void
+  method f<V extends core::Object* = dynamic>(covariant-by-class core::Map<core::String*, self::B::f::V*>* m) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.transformed.expect b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.transformed.expect
index 65a02b5..54a4764 100644
--- a/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/override_check_two_substitutions.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  method f<U extends core::Object* = dynamic>(generic-covariant-impl core::Map<self::A::T*, self::A::f::U*>* m) → void {}
+  method f<U extends core::Object* = dynamic>(covariant-by-class core::Map<self::A::T*, self::A::f::U*>* m) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,6 +22,6 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  method f<V extends core::Object* = dynamic>(generic-covariant-impl core::Map<core::String*, self::B::f::V*>* m) → void {}
+  method f<V extends core::Object* = dynamic>(covariant-by-class core::Map<core::String*, self::B::f::V*>* m) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.expect b/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.expect
index 737d41c..ceabd22 100644
--- a/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.expect
+++ b/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.expect
@@ -48,12 +48,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  method f1(covariant self::A* x) → void {}
+  method f1(covariant-by-declaration self::A* x) → void {}
   method f2(self::A* x) → void {}
-  method f3(covariant self::A* x) → void {}
+  method f3(covariant-by-declaration self::A* x) → void {}
   method f4(self::A* x) → void {}
-  method f5(covariant self::A* x) → void {}
-  method f6(covariant self::B* x) → void {}
+  method f5(covariant-by-declaration self::A* x) → void {}
+  method f6(covariant-by-declaration self::B* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -69,11 +69,11 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  method f1(covariant self::B* x) → void {}
-  method f2(covariant self::B* x) → void {}
-  method f3(covariant self::B* x) → void {}
+  method f1(covariant-by-declaration self::B* x) → void {}
+  method f2(covariant-by-declaration self::B* x) → void {}
+  method f3(covariant-by-declaration self::B* x) → void {}
   method f4(self::B* x) → void {}
-  method f5(covariant core::String* x) → void {}
-  method f6(covariant self::A* x) → void {}
+  method f5(covariant-by-declaration core::String* x) → void {}
+  method f6(covariant-by-declaration self::A* x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.outline.expect b/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.outline.expect
index 5efc80c..4d18123 100644
--- a/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/override_check_with_covariant_modifier.dart.weak.outline.expect
@@ -45,17 +45,17 @@
 class C extends core::Object {
   synthetic constructor •() → self::C*
     ;
-  method f1(covariant self::A* x) → void
+  method f1(covariant-by-declaration self::A* x) → void
     ;
   method f2(self::A* x) → void
     ;
-  method f3(covariant self::A* x) → void
+  method f3(covariant-by-declaration self::A* x) → void
     ;
   method f4(self::A* x) → void
     ;
-  method f5(covariant self::A* x) → void
+  method f5(covariant-by-declaration self::A* x) → void
     ;
-  method f6(covariant self::B* x) → void
+  method f6(covariant-by-declaration self::B* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -71,17 +71,17 @@
 class D extends self::C {
   synthetic constructor •() → self::D*
     ;
-  method f1(covariant self::B* x) → void
+  method f1(covariant-by-declaration self::B* x) → void
     ;
-  method f2(covariant self::B* x) → void
+  method f2(covariant-by-declaration self::B* x) → void
     ;
-  method f3(covariant self::B* x) → void
+  method f3(covariant-by-declaration self::B* x) → void
     ;
   method f4(self::B* x) → void
     ;
-  method f5(covariant core::String* x) → void
+  method f5(covariant-by-declaration core::String* x) → void
     ;
-  method f6(covariant self::A* x) → void
+  method f6(covariant-by-declaration self::A* x) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.expect b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.expect
index 4ada913..ca1fea0 100644
--- a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.expect
+++ b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.expect
@@ -59,5 +59,5 @@
   #C1 = #org-dartlang-testcase:///private_method_tearoff.dart::_f
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.outline.expect b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.outline.expect
index 6cb829a..384c64d 100644
--- a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.outline.expect
@@ -56,5 +56,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///private_method_tearoff_lib.dart:8:8 -> SymbolConstant(#_f)
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_method_tearoff_lib.dart:8:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_method_tearoff_lib.dart:8:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///private_method_tearoff_lib.dart:8:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///private_method_tearoff_lib.dart:8:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.transformed.expect b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.transformed.expect
index 4ada913..ca1fea0 100644
--- a/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/private_method_tearoff.dart.weak.transformed.expect
@@ -59,5 +59,5 @@
   #C1 = #org-dartlang-testcase:///private_method_tearoff.dart::_f
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/promoted_access.dart.weak.expect b/pkg/front_end/testcases/general/promoted_access.dart.weak.expect
index 5baecb1..7439751 100644
--- a/pkg/front_end/testcases/general/promoted_access.dart.weak.expect
+++ b/pkg/front_end/testcases/general/promoted_access.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::T* o) → dynamic {
+  method method(covariant-by-class self::Class::T* o) → dynamic {
     if(o is self::Class<dynamic>*) {
       o{self::Class::T* & self::Class<dynamic>* /* '*' & '*' = '*' */}.{self::Class::method}(null){(dynamic) →* dynamic};
     }
diff --git a/pkg/front_end/testcases/general/promoted_access.dart.weak.outline.expect b/pkg/front_end/testcases/general/promoted_access.dart.weak.outline.expect
index 0b52249..c14fd6b 100644
--- a/pkg/front_end/testcases/general/promoted_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/promoted_access.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Class<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::T*>*
     ;
-  method method(generic-covariant-impl self::Class::T* o) → dynamic
+  method method(covariant-by-class self::Class::T* o) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/promoted_access.dart.weak.transformed.expect b/pkg/front_end/testcases/general/promoted_access.dart.weak.transformed.expect
index 5baecb1..7439751 100644
--- a/pkg/front_end/testcases/general/promoted_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/promoted_access.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::T*>*
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::T* o) → dynamic {
+  method method(covariant-by-class self::Class::T* o) → dynamic {
     if(o is self::Class<dynamic>*) {
       o{self::Class::T* & self::Class<dynamic>* /* '*' & '*' = '*' */}.{self::Class::method}(null){(dynamic) →* dynamic};
     }
diff --git a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.expect b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.expect
index f2aaee2..e5a7448 100644
--- a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.expect
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_X<self::A::T*>* x;
+  covariant-by-class field self::_X<self::A::T*>* x;
   constructor •(self::_X<self::A::T*>* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.outline.expect
index aed68b9..55c2b59 100644
--- a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.outline.expect
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_X<self::A::T*>* x;
+  covariant-by-class field self::_X<self::A::T*>* x;
   constructor •(self::_X<self::A::T*>* x) → self::A<self::A::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.transformed.expect
index f2aaee2..e5a7448 100644
--- a/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/redirecting_factory_const_inference.dart.weak.transformed.expect
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::_X<self::A::T*>* x;
+  covariant-by-class field self::_X<self::A::T*>* x;
   constructor •(self::_X<self::A::T*>* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.expect
index 6324f0a..a539f39 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Foo<T extends self::X*> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor fromX(self::X* _init) → self::Foo<self::Foo::T*>*
     : this self::Foo::_internal(x: _init as{TypeError} self::Foo::T*)
     ;
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
index b816f4d..9c7ccb9 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.outline.expect
@@ -17,7 +17,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Foo<T extends self::X*> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor fromX(self::X* _init) → self::Foo<self::Foo::T*>*
     ;
   constructor fromT(self::Foo::T* _init) → self::Foo<self::Foo::T*>*
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.transformed.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.transformed.expect
index 6324f0a..a539f39 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_assignable_test.dart.weak.transformed.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Foo<T extends self::X*> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor fromX(self::X* _init) → self::Foo<self::Foo::T*>*
     : this self::Foo::_internal(x: _init as{TypeError} self::Foo::T*)
     ;
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.expect
index 0375d90..6c401a6 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor from(core::String* _init) → self::Foo<self::Foo::T*>*
     : this self::Foo::_internal(x: invalid-expression "pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart:12:46: Error: The argument type 'String' can't be assigned to the parameter type 'T'.
   Foo.from(String _init) : this._internal(x: _init);
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
index 4702554..1126f00 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor from(core::String* _init) → self::Foo<self::Foo::T*>*
     ;
   constructor _internal({self::Foo::T* x}) → self::Foo<self::Foo::T*>*
diff --git a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.transformed.expect b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.transformed.expect
index 0375d90..6c401a6 100644
--- a/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Foo::T* x;
+  covariant-by-class field self::Foo::T* x;
   constructor from(core::String* _init) → self::Foo<self::Foo::T*>*
     : this self::Foo::_internal(x: invalid-expression "pkg/front_end/testcases/general/redirecting_initializer_arguments_test.dart:12:46: Error: The argument type 'String' can't be assigned to the parameter type 'T'.
   Foo.from(String _init) : this._internal(x: _init);
diff --git a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.expect b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.expect
index e1e3ce5..7131789 100644
--- a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.expect
+++ b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.expect
@@ -31,14 +31,14 @@
     : super core::Iterable::•()
     ;
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::C::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::Object*) →* self::C::map::T* toElement) → core::Iterable<self::C::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::C::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::Object*) →* core::Iterable<self::C::expand::T*>* toElements) → core::Iterable<self::C::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::Object*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::C::fold::T* initialValue, (self::C::fold::T*, core::Object*) →* self::C::fold::T* combine) → self::C::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::Object*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -52,9 +52,9 @@
   abstract member-signature method takeWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::Object*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::Object*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.outline.expect b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.outline.expect
index 43d09ff..3c5b61f 100644
--- a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.outline.expect
@@ -23,14 +23,14 @@
   synthetic constructor •() → self::C*
     ;
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::C::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::Object*) →* self::C::map::T* toElement) → core::Iterable<self::C::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::C::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::Object*) →* core::Iterable<self::C::expand::T*>* toElements) → core::Iterable<self::C::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::Object*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::C::fold::T* initialValue, (self::C::fold::T*, core::Object*) →* self::C::fold::T* combine) → self::C::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::Object*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator]) → core::String*; -> core::Iterable::join
@@ -44,9 +44,9 @@
   abstract member-signature method takeWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::Object*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse}) → core::Object*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse}) → core::Object*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse}) → core::Object*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse}) → core::Object*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse}) → core::Object*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse}) → core::Object*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::Object*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.transformed.expect b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.transformed.expect
index e1e3ce5..7131789 100644
--- a/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/sdk_diagnostic.dart.weak.transformed.expect
@@ -31,14 +31,14 @@
     : super core::Iterable::•()
     ;
   abstract member-signature method cast<R extends core::Object* = dynamic>() → core::Iterable<self::C::cast::R*>*; -> core::Iterable::cast
-  abstract member-signature method followedBy(generic-covariant-impl core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
+  abstract member-signature method followedBy(covariant-by-class core::Iterable<core::Object*>* other) → core::Iterable<core::Object*>*; -> core::Iterable::followedBy
   abstract member-signature method map<T extends core::Object* = dynamic>((core::Object*) →* self::C::map::T* toElement) → core::Iterable<self::C::map::T*>*; -> core::Iterable::map
   abstract member-signature method where((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::where
   abstract member-signature method whereType<T extends core::Object* = dynamic>() → core::Iterable<self::C::whereType::T*>*; -> core::Iterable::whereType
   abstract member-signature method expand<T extends core::Object* = dynamic>((core::Object*) →* core::Iterable<self::C::expand::T*>* toElements) → core::Iterable<self::C::expand::T*>*; -> core::Iterable::expand
   abstract member-signature method contains(core::Object* element) → core::bool*; -> core::Iterable::contains
   abstract member-signature method forEach((core::Object*) →* void action) → void; -> core::Iterable::forEach
-  abstract member-signature method reduce(generic-covariant-impl (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
+  abstract member-signature method reduce(covariant-by-class (core::Object*, core::Object*) →* core::Object* combine) → core::Object*; -> core::Iterable::reduce
   abstract member-signature method fold<T extends core::Object* = dynamic>(self::C::fold::T* initialValue, (self::C::fold::T*, core::Object*) →* self::C::fold::T* combine) → self::C::fold::T*; -> core::Iterable::fold
   abstract member-signature method every((core::Object*) →* core::bool* test) → core::bool*; -> core::Iterable::every
   abstract member-signature method join([core::String* separator = #C1]) → core::String*; -> core::Iterable::join
@@ -52,9 +52,9 @@
   abstract member-signature method takeWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::takeWhile
   abstract member-signature method skip(core::int* count) → core::Iterable<core::Object*>*; -> core::Iterable::skip
   abstract member-signature method skipWhile((core::Object*) →* core::bool* test) → core::Iterable<core::Object*>*; -> core::Iterable::skipWhile
-  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::firstWhere
-  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::lastWhere
-  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {generic-covariant-impl () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::singleWhere
+  abstract member-signature method firstWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::firstWhere
+  abstract member-signature method lastWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::lastWhere
+  abstract member-signature method singleWhere((core::Object*) →* core::bool* test, {covariant-by-class () →* core::Object* orElse = #C3}) → core::Object*; -> core::Iterable::singleWhere
   abstract member-signature method elementAt(core::int* index) → core::Object*; -> core::Iterable::elementAt
   abstract member-signature method toString() → core::String*; -> core::Iterable::toString
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/general/super_nsm.dart.weak.expect b/pkg/front_end/testcases/general/super_nsm.dart.weak.expect
index 949ce24..671d437 100644
--- a/pkg/front_end/testcases/general/super_nsm.dart.weak.expect
+++ b/pkg/front_end/testcases/general/super_nsm.dart.weak.expect
@@ -55,5 +55,5 @@
   #C1 = #interfaceMethod
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/super_nsm.dart.weak.outline.expect b/pkg/front_end/testcases/general/super_nsm.dart.weak.outline.expect
index 8b77ef2..436dba3 100644
--- a/pkg/front_end/testcases/general/super_nsm.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/super_nsm.dart.weak.outline.expect
@@ -50,5 +50,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///super_nsm.dart:6:3 -> SymbolConstant(#interfaceMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///super_nsm.dart:6:3 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///super_nsm.dart:6:3 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///super_nsm.dart:6:3 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///super_nsm.dart:6:3 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 9, effectively constant: 4
diff --git a/pkg/front_end/testcases/general/super_nsm.dart.weak.transformed.expect b/pkg/front_end/testcases/general/super_nsm.dart.weak.transformed.expect
index 949ce24..671d437 100644
--- a/pkg/front_end/testcases/general/super_nsm.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/super_nsm.dart.weak.transformed.expect
@@ -55,5 +55,5 @@
   #C1 = #interfaceMethod
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.expect b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.expect
index be8f096..9153148 100644
--- a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.expect
@@ -29,14 +29,14 @@
   synthetic constructor •() → self::Class*
     : super self::SuperClass::•()
     ;
-  forwarding-stub forwarding-semi-stub set setter(covariant core::int* o) → void
+  forwarding-stub forwarding-semi-stub set setter(covariant-by-declaration core::int* o) → void
     return super.{self::SuperClass::setter} = o;
 }
 class SubClass extends self::Class {
   synthetic constructor •() → self::SubClass*
     : super self::Class::•()
     ;
-  set setter(covariant core::int* o) → void {
+  set setter(covariant-by-declaration core::int* o) → void {
     super.{self::Class::setter} = invalid-expression "pkg/front_end/testcases/general/super_set_covariant.dart:18:24: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
     super.setter = '\$o';
                        ^" in "${o}" as{TypeError} core::int*;
diff --git a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.outline.expect
index 550fdb5..7500961 100644
--- a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.outline.expect
@@ -21,13 +21,13 @@
 abstract class Class extends self::SuperClass {
   synthetic constructor •() → self::Class*
     ;
-  forwarding-stub forwarding-semi-stub set setter(covariant core::int* o) → void
+  forwarding-stub forwarding-semi-stub set setter(covariant-by-declaration core::int* o) → void
     return super.{self::SuperClass::setter} = o;
 }
 class SubClass extends self::Class {
   synthetic constructor •() → self::SubClass*
     ;
-  set setter(covariant core::int* o) → void
+  set setter(covariant-by-declaration core::int* o) → void
     ;
 }
 static method test() → dynamic
diff --git a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.transformed.expect
index be8f096..9153148 100644
--- a/pkg/front_end/testcases/general/super_set_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/super_set_covariant.dart.weak.transformed.expect
@@ -29,14 +29,14 @@
   synthetic constructor •() → self::Class*
     : super self::SuperClass::•()
     ;
-  forwarding-stub forwarding-semi-stub set setter(covariant core::int* o) → void
+  forwarding-stub forwarding-semi-stub set setter(covariant-by-declaration core::int* o) → void
     return super.{self::SuperClass::setter} = o;
 }
 class SubClass extends self::Class {
   synthetic constructor •() → self::SubClass*
     : super self::Class::•()
     ;
-  set setter(covariant core::int* o) → void {
+  set setter(covariant-by-declaration core::int* o) → void {
     super.{self::Class::setter} = invalid-expression "pkg/front_end/testcases/general/super_set_covariant.dart:18:24: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
     super.setter = '\$o';
                        ^" in "${o}" as{TypeError} core::int*;
diff --git a/pkg/front_end/testcases/general/this_field_call.dart.weak.expect b/pkg/front_end/testcases/general/this_field_call.dart.weak.expect
index 4acba29..1156174 100644
--- a/pkg/front_end/testcases/general/this_field_call.dart.weak.expect
+++ b/pkg/front_end/testcases/general/this_field_call.dart.weak.expect
@@ -7,7 +7,7 @@
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     : self::A::f = f, super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     return let final self::A::T* #t1 = x in this.{self::A::f}{(self::A::T*) →* void}(#t1){(self::A::T*) →* void};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/this_field_call.dart.weak.outline.expect b/pkg/front_end/testcases/general/this_field_call.dart.weak.outline.expect
index 7e7c14b..5ef3cd8 100644
--- a/pkg/front_end/testcases/general/this_field_call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/this_field_call.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   field (self::A::T*) →* void f;
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/this_field_call.dart.weak.transformed.expect b/pkg/front_end/testcases/general/this_field_call.dart.weak.transformed.expect
index 4acba29..1156174 100644
--- a/pkg/front_end/testcases/general/this_field_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/this_field_call.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     : self::A::f = f, super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     return let final self::A::T* #t1 = x in this.{self::A::f}{(self::A::T*) →* void}(#t1){(self::A::T*) →* void};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.expect b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.expect
index 6b52872..cb0d959 100644
--- a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.expect
+++ b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.expect
@@ -156,7 +156,7 @@
       return null;
     function foo6Prime() → core::List<invalid-type>*
       return null;
-    invalid-type foo7 = (invalid-type y) → invalid-type => y;
+    (invalid-type) →* void foo7 = (invalid-type y) → invalid-type => y;
     (core::List<invalid-type>*) →* void foo7Prime = (core::List<invalid-type>* y) → core::List<invalid-type>* => y;
   }
   static method foo8() → () →* invalid-type {
diff --git a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.transformed.expect b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.transformed.expect
index 6b52872..cb0d959 100644
--- a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_class.dart.weak.transformed.expect
@@ -156,7 +156,7 @@
       return null;
     function foo6Prime() → core::List<invalid-type>*
       return null;
-    invalid-type foo7 = (invalid-type y) → invalid-type => y;
+    (invalid-type) →* void foo7 = (invalid-type y) → invalid-type => y;
     (core::List<invalid-type>*) →* void foo7Prime = (core::List<invalid-type>* y) → core::List<invalid-type>* => y;
   }
   static method foo8() → () →* invalid-type {
diff --git a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.expect b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.expect
index e6c02fb..d4e95b2 100644
--- a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.expect
+++ b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.expect
@@ -174,7 +174,7 @@
     return null;
   function foo6Prime() → core::List<invalid-type>*
     return null;
-  invalid-type foo7 = (invalid-type y) → invalid-type => y;
+  (invalid-type) →* void foo7 = (invalid-type y) → invalid-type => y;
   (core::List<invalid-type>*) →* void foo7Prime = (core::List<invalid-type>* y) → core::List<invalid-type>* => y;
 }
 static method Foo|foo8() → () →* invalid-type {
diff --git a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.transformed.expect b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.transformed.expect
index e6c02fb..d4e95b2 100644
--- a/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/type_parameter_usage_in_static_method_in_extension.dart.weak.transformed.expect
@@ -174,7 +174,7 @@
     return null;
   function foo6Prime() → core::List<invalid-type>*
     return null;
-  invalid-type foo7 = (invalid-type y) → invalid-type => y;
+  (invalid-type) →* void foo7 = (invalid-type y) → invalid-type => y;
   (core::List<invalid-type>*) →* void foo7Prime = (core::List<invalid-type>* y) → core::List<invalid-type>* => y;
 }
 static method Foo|foo8() → () →* invalid-type {
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.expect
index 9c945b5..c281ff0 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.expect
@@ -11,8 +11,8 @@
 import "dart:core" as core;
 
 class DynamicClass<T extends dynamic, S extends self::DynamicClass::T* = dynamic> extends core::Object {
-  generic-covariant-impl field self::DynamicClass::T* field1;
-  generic-covariant-impl field self::DynamicClass::T* field2;
+  covariant-by-class field self::DynamicClass::T* field1;
+  covariant-by-class field self::DynamicClass::T* field2;
   constructor •(self::DynamicClass::T* field1, self::DynamicClass::T* field2) → self::DynamicClass<self::DynamicClass::T*, self::DynamicClass::S*>*
     : self::DynamicClass::field1 = field1, self::DynamicClass::field2 = field2, super core::Object::•()
     ;
@@ -30,8 +30,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class NumClass<T extends core::num*, S extends self::NumClass::T* = core::num*> extends core::Object {
-  generic-covariant-impl field self::NumClass::T* field1;
-  generic-covariant-impl field self::NumClass::S* field2;
+  covariant-by-class field self::NumClass::T* field1;
+  covariant-by-class field self::NumClass::S* field2;
   constructor •(self::NumClass::T* field1, self::NumClass::S* field2) → self::NumClass<self::NumClass::T*, self::NumClass::S*>*
     : self::NumClass::field1 = field1, self::NumClass::field2 = field2, super core::Object::•()
     ;
@@ -54,12 +54,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 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*> 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;
+  covariant-by-class field self::Class::X0* field0 = null;
+  covariant-by-class field self::Class::X1* field1 = null;
+  covariant-by-class field self::Class::X2* field2 = null;
+  covariant-by-class field self::Class::X3* field3 = null;
+  covariant-by-class field self::Class::X4* field4 = null;
+  covariant-by-class 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::•()
     ;
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.outline.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.outline.expect
index b02e918..adae324 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class DynamicClass<T extends dynamic, S extends self::DynamicClass::T* = dynamic> extends core::Object {
-  generic-covariant-impl field self::DynamicClass::T* field1;
-  generic-covariant-impl field self::DynamicClass::T* field2;
+  covariant-by-class field self::DynamicClass::T* field1;
+  covariant-by-class field self::DynamicClass::T* field2;
   constructor •(self::DynamicClass::T* field1, self::DynamicClass::T* field2) → self::DynamicClass<self::DynamicClass::T*, self::DynamicClass::S*>*
     ;
   method method() → dynamic
@@ -21,8 +21,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class NumClass<T extends core::num*, S extends self::NumClass::T* = core::num*> extends core::Object {
-  generic-covariant-impl field self::NumClass::T* field1;
-  generic-covariant-impl field self::NumClass::S* field2;
+  covariant-by-class field self::NumClass::T* field1;
+  covariant-by-class field self::NumClass::S* field2;
   constructor •(self::NumClass::T* field1, self::NumClass::S* field2) → self::NumClass<self::NumClass::T*, self::NumClass::S*>*
     ;
   method method1() → core::num*
@@ -41,12 +41,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 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*> 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;
+  covariant-by-class field self::Class::X0* field0;
+  covariant-by-class field self::Class::X1* field1;
+  covariant-by-class field self::Class::X2* field2;
+  covariant-by-class field self::Class::X3* field3;
+  covariant-by-class field self::Class::X4* field4;
+  covariant-by-class 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
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.transformed.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.transformed.expect
index ec59314..05cc13b 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.weak.transformed.expect
@@ -11,8 +11,8 @@
 import "dart:core" as core;
 
 class DynamicClass<T extends dynamic, S extends self::DynamicClass::T* = dynamic> extends core::Object {
-  generic-covariant-impl field self::DynamicClass::T* field1;
-  generic-covariant-impl field self::DynamicClass::T* field2;
+  covariant-by-class field self::DynamicClass::T* field1;
+  covariant-by-class field self::DynamicClass::T* field2;
   constructor •(self::DynamicClass::T* field1, self::DynamicClass::T* field2) → self::DynamicClass<self::DynamicClass::T*, self::DynamicClass::S*>*
     : self::DynamicClass::field1 = field1, self::DynamicClass::field2 = field2, super core::Object::•()
     ;
@@ -30,8 +30,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class NumClass<T extends core::num*, S extends self::NumClass::T* = core::num*> extends core::Object {
-  generic-covariant-impl field self::NumClass::T* field1;
-  generic-covariant-impl field self::NumClass::S* field2;
+  covariant-by-class field self::NumClass::T* field1;
+  covariant-by-class field self::NumClass::S* field2;
   constructor •(self::NumClass::T* field1, self::NumClass::S* field2) → self::NumClass<self::NumClass::T*, self::NumClass::S*>*
     : self::NumClass::field1 = field1, self::NumClass::field2 = field2, super core::Object::•()
     ;
@@ -54,12 +54,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 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*> 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;
+  covariant-by-class field self::Class::X0* field0 = null;
+  covariant-by-class field self::Class::X1* field1 = null;
+  covariant-by-class field self::Class::X2* field2 = null;
+  covariant-by-class field self::Class::X3* field3 = null;
+  covariant-by-class field self::Class::X4* field4 = null;
+  covariant-by-class 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::•()
     ;
diff --git a/pkg/front_end/testcases/general/typedef.dart.weak.expect b/pkg/front_end/testcases/general/typedef.dart.weak.expect
index 77eee56..2b36abf 100644
--- a/pkg/front_end/testcases/general/typedef.dart.weak.expect
+++ b/pkg/front_end/testcases/general/typedef.dart.weak.expect
@@ -6,9 +6,9 @@
 typedef _UnaryFunction = (dynamic) →* dynamic;
 typedef _BinaryFunction = (dynamic, dynamic) →* dynamic;
 static method main() → dynamic {
-  core::print((#C1) is () →* dynamic);
-  core::print((#C1) is (dynamic) →* dynamic);
-  core::print((#C1) is (dynamic, dynamic) →* dynamic);
+  core::print(#C1 is () →* dynamic);
+  core::print(#C1 is (dynamic) →* dynamic);
+  core::print(#C1 is (dynamic, dynamic) →* dynamic);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
index 2bbbce2..9f48e47 100644
--- a/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
@@ -6,9 +6,9 @@
 typedef _UnaryFunction = (dynamic) →* dynamic;
 typedef _BinaryFunction = (dynamic, dynamic) →* dynamic;
 static method main() → dynamic {
-  core::print((#C1) is () →* dynamic);
-  core::print((#C1) is (dynamic) →* dynamic);
-  core::print((#C1) is (dynamic, dynamic) →* dynamic);
+  core::print(#C1 is () →* dynamic);
+  core::print(#C1 is (dynamic) →* dynamic);
+  core::print(#C1 is (dynamic, dynamic) →* dynamic);
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.expect b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.expect
index 017b651..47d6412f 100644
--- a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.expect
+++ b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.expect
@@ -28,7 +28,7 @@
     ;
 }
 class D<P extends core::Object* = dynamic, Q extends core::Object* = dynamic> extends self::C<core::int*, self::D::Q*, self::D::P*> {
-  generic-covariant-impl field core::Map<self::D::P*, self::D::Q*>* foo;
+  covariant-by-class field core::Map<self::D::P*, self::D::Q*>* foo;
   constructor •(dynamic tt) → self::D<self::D::P*, self::D::Q*>*
     : self::D::foo = tt as{TypeError,ForDynamic} core::Map<self::D::P*, self::D::Q*>*, super self::C::•()
     ;
@@ -58,7 +58,7 @@
 class E<P extends core::String*> extends core::Object {
   static factory •<P extends core::String*>() → self::E<self::E::•::P*>*
     return null;
-  method foo6<generic-covariant-impl T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void {}
+  method foo6<covariant-by-class T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -74,8 +74,8 @@
   synthetic constructor •() → self::F<self::F::T*>*
     : super core::Object::•()
     ;
-  abstract method foo7<generic-covariant-impl Q extends self::F::T*>(self::F::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
-  abstract method foo8<generic-covariant-impl Q extends self::F::T*>(self::F::foo8::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
+  abstract method foo7<covariant-by-class Q extends self::F::T*>(self::F::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
+  abstract method foo8<covariant-by-class Q extends self::F::T*>(self::F::foo8::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -91,7 +91,7 @@
   synthetic constructor •() → self::G<self::G::T*>*
     : super core::Object::•()
     ;
-  method foo7<generic-covariant-impl Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, generic-covariant-impl self::G::T* c) → void {}
+  method foo7<covariant-by-class Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, covariant-by-class self::G::T* c) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -107,9 +107,9 @@
   synthetic constructor •() → self::H<self::H::T*>*
     : super self::G::•()
     ;
-  method foo8<generic-covariant-impl Q extends self::H::T*>(self::H::foo8::Q* a, covariant core::int* b, generic-covariant-impl self::H::T* c) → void {}
-  forwarding-stub method foo7<generic-covariant-impl Q extends self::H::T*>(self::H::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::H::T* c) → void
-    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b, c);
+  method foo8<covariant-by-class Q extends self::H::T*>(self::H::foo8::Q* a, covariant-by-declaration core::int* b, covariant-by-class self::H::T* c) → void {}
+  forwarding-stub method foo7<covariant-by-class Q extends self::H::T*>(self::H::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::H::T* c) → void
+    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b as core::int*, c);
 }
 static field core::List<core::Iterable<dynamic>*>* globalVar;
 static method foo1(dynamic x) → dynamic {
diff --git a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.outline.expect b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.outline.expect
index 679e7c3..1f5d785 100644
--- a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.outline.expect
@@ -25,7 +25,7 @@
     ;
 }
 class D<P extends core::Object* = dynamic, Q extends core::Object* = dynamic> extends self::C<core::int*, self::D::Q*, self::D::P*> {
-  generic-covariant-impl field core::Map<self::D::P*, self::D::Q*>* foo;
+  covariant-by-class field core::Map<self::D::P*, self::D::Q*>* foo;
   constructor •(dynamic tt) → self::D<self::D::P*, self::D::Q*>*
     ;
   method foo2(dynamic y) → dynamic
@@ -38,7 +38,7 @@
 class E<P extends core::String*> extends core::Object {
   static factory •<P extends core::String*>() → self::E<self::E::•::P*>*
     ;
-  method foo6<generic-covariant-impl T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void
+  method foo6<covariant-by-class T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -54,8 +54,8 @@
 abstract class F<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::F<self::F::T*>*
     ;
-  abstract method foo7<generic-covariant-impl Q extends self::F::T*>(self::F::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
-  abstract method foo8<generic-covariant-impl Q extends self::F::T*>(self::F::foo8::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
+  abstract method foo7<covariant-by-class Q extends self::F::T*>(self::F::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
+  abstract method foo8<covariant-by-class Q extends self::F::T*>(self::F::foo8::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -70,7 +70,7 @@
 class G<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::G<self::G::T*>*
     ;
-  method foo7<generic-covariant-impl Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, generic-covariant-impl self::G::T* c) → void
+  method foo7<covariant-by-class Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, covariant-by-class self::G::T* c) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -86,10 +86,10 @@
 class H<T extends core::Object* = dynamic> extends self::G<self::H::T*> implements self::F<self::H::T*> {
   synthetic constructor •() → self::H<self::H::T*>*
     ;
-  method foo8<generic-covariant-impl Q extends self::H::T*>(self::H::foo8::Q* a, covariant core::int* b, generic-covariant-impl self::H::T* c) → void
+  method foo8<covariant-by-class Q extends self::H::T*>(self::H::foo8::Q* a, covariant-by-declaration core::int* b, covariant-by-class self::H::T* c) → void
     ;
-  forwarding-stub method foo7<generic-covariant-impl Q extends self::H::T*>(self::H::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::H::T* c) → void
-    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b, c);
+  forwarding-stub method foo7<covariant-by-class Q extends self::H::T*>(self::H::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::H::T* c) → void
+    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b as core::int*, c);
 }
 static field core::List<core::Iterable<dynamic>*>* globalVar;
 static method foo1(dynamic x) → dynamic
diff --git a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.transformed.expect b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.transformed.expect
index ace3959..96a4931 100644
--- a/pkg/front_end/testcases/general/vm_type_ops.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/vm_type_ops.dart.weak.transformed.expect
@@ -28,7 +28,7 @@
     ;
 }
 class D<P extends core::Object* = dynamic, Q extends core::Object* = dynamic> extends self::C<core::int*, self::D::Q*, self::D::P*> {
-  generic-covariant-impl field core::Map<self::D::P*, self::D::Q*>* foo;
+  covariant-by-class field core::Map<self::D::P*, self::D::Q*>* foo;
   constructor •(dynamic tt) → self::D<self::D::P*, self::D::Q*>*
     : self::D::foo = tt as{TypeError,ForDynamic} core::Map<self::D::P*, self::D::Q*>*, super self::C::•()
     ;
@@ -58,7 +58,7 @@
 class E<P extends core::String*> extends core::Object {
   static factory •<P extends core::String*>() → self::E<self::E::•::P*>*
     return null;
-  method foo6<generic-covariant-impl T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void {}
+  method foo6<covariant-by-class T extends self::E::P*, U extends core::List<self::E::foo6::T*>* = core::List<self::E::P*>*>(core::Map<self::E::foo6::T*, self::E::foo6::U*>* map) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -74,8 +74,8 @@
   synthetic constructor •() → self::F<self::F::T*>*
     : super core::Object::•()
     ;
-  abstract method foo7<generic-covariant-impl Q extends self::F::T*>(self::F::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
-  abstract method foo8<generic-covariant-impl Q extends self::F::T*>(self::F::foo8::Q* a, covariant core::num* b, generic-covariant-impl self::F::T* c) → void;
+  abstract method foo7<covariant-by-class Q extends self::F::T*>(self::F::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
+  abstract method foo8<covariant-by-class Q extends self::F::T*>(self::F::foo8::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::F::T* c) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -91,7 +91,7 @@
   synthetic constructor •() → self::G<self::G::T*>*
     : super core::Object::•()
     ;
-  method foo7<generic-covariant-impl Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, generic-covariant-impl self::G::T* c) → void {}
+  method foo7<covariant-by-class Q extends self::G::T*>(self::G::foo7::Q* a, core::int* b, covariant-by-class self::G::T* c) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -107,9 +107,9 @@
   synthetic constructor •() → self::H<self::H::T*>*
     : super self::G::•()
     ;
-  method foo8<generic-covariant-impl Q extends self::H::T*>(self::H::foo8::Q* a, covariant core::int* b, generic-covariant-impl self::H::T* c) → void {}
-  forwarding-stub method foo7<generic-covariant-impl Q extends self::H::T*>(self::H::foo7::Q* a, covariant core::num* b, generic-covariant-impl self::H::T* c) → void
-    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b, c);
+  method foo8<covariant-by-class Q extends self::H::T*>(self::H::foo8::Q* a, covariant-by-declaration core::int* b, covariant-by-class self::H::T* c) → void {}
+  forwarding-stub method foo7<covariant-by-class Q extends self::H::T*>(self::H::foo7::Q* a, covariant-by-declaration core::num* b, covariant-by-class self::H::T* c) → void
+    return super.{self::G::foo7}<self::H::foo7::Q*>(a, b as core::int*, c);
 }
 static field core::List<core::Iterable<dynamic>*>* globalVar;
 static method foo1(dynamic x) → dynamic {
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.expect b/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.expect
index 2acc3f1..aa18aac 100644
--- a/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.expect
@@ -7,8 +7,8 @@
 
 static const field con::B* crossModule = #C3;
 static method main() → dynamic {
-  self::expect(2.71, (#C3).{con::A::d}{core::double*});
-  self::expect("default", (#C3).{con::A::s}{core::String*});
+  self::expect(2.71, #C3.{con::A::d}{core::double*});
+  self::expect("default", #C3.{con::A::s}{core::String*});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
diff --git a/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.transformed.expect
index 2acc3f1..aa18aac 100644
--- a/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/issue43538/main.dart.weak.transformed.expect
@@ -7,8 +7,8 @@
 
 static const field con::B* crossModule = #C3;
 static method main() → dynamic {
-  self::expect(2.71, (#C3).{con::A::d}{core::double*});
-  self::expect("default", (#C3).{con::A::s}{core::String*});
+  self::expect(2.71, #C3.{con::A::d}{core::double*});
+  self::expect("default", #C3.{con::A::s}{core::String*});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object*) →* core::bool*} actual))
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.expect
index a45bc9f..68cbb20 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → stu::Qux*
     : super core::Object::•()
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void {}
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -43,13 +43,13 @@
   synthetic constructor •() → stu::Baz*
     : super stu::Qux::•()
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void {}
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     : super stu::Baz::•()
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.outline.expect
index c556a30..b35d702 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class Qux extends core::Object implements stu2::EventFileA {
   synthetic constructor •() → stu::Qux*
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -41,13 +41,13 @@
 abstract class Baz extends stu::Qux {
   synthetic constructor •() → stu::Baz*
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void
     ;
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.transformed.expect
index a45bc9f..68cbb20 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → stu::Qux*
     : super core::Object::•()
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void {}
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -43,13 +43,13 @@
   synthetic constructor •() → stu::Baz*
     : super stu::Qux::•()
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void {}
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     : super stu::Baz::•()
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.expect
index a45bc9f..68cbb20 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → stu::Qux*
     : super core::Object::•()
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void {}
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -43,13 +43,13 @@
   synthetic constructor •() → stu::Baz*
     : super stu::Qux::•()
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void {}
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     : super stu::Baz::•()
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.outline.expect
index c556a30..b35d702 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class Qux extends core::Object implements stu2::EventFileA {
   synthetic constructor •() → stu::Qux*
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -41,13 +41,13 @@
 abstract class Baz extends stu::Qux {
   synthetic constructor •() → stu::Baz*
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void
     ;
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.transformed.expect
index a45bc9f..68cbb20 100644
--- a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → stu::Qux*
     : super core::Object::•()
     ;
-  method handleEvent(covariant stu2::EvenFileB* entry) → void {}
+  method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -43,13 +43,13 @@
   synthetic constructor •() → stu::Baz*
     : super stu::Qux::•()
     ;
-  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+  method handleEvent(covariant-by-declaration stu::EvenFileBPrime* entry) → void {}
 }
 abstract class Foo extends stu::Baz implements stu::Qux {
   synthetic constructor •() → stu::Foo*
     : super stu::Baz::•()
     ;
-  abstract member-signature method handleEvent(covariant stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
+  abstract member-signature method handleEvent(covariant-by-declaration stu2::EvenFileB* entry) → void; -> stu::Qux::handleEvent
 }
 
 library;
diff --git a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.expect b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.expect
index 5469618..c46c847 100644
--- a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.expect
+++ b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.expect
@@ -7,7 +7,7 @@
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     : self::A::f = f, super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     return let final self::A::T* #t1 = x in this.{self::A::f}(#t1){(self::A::T*) →* void};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.outline.expect b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.outline.expect
index 7e7c14b..5ef3cd8 100644
--- a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   field (self::A::T*) →* void f;
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.transformed.expect b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.transformed.expect
index 5469618..c46c847 100644
--- a/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/implicit_getter_calls/this_field_call.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
   constructor •((self::A::T*) →* void f) → self::A<self::A::T*>*
     : self::A::f = f, super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::A::T* x) → dynamic
+  method foo(covariant-by-class self::A::T* x) → dynamic
     return let final self::A::T* #t1 = x in this.{self::A::f}(#t1){(self::A::T*) →* void};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/incremental.status b/pkg/front_end/testcases/incremental.status
index 1c24c9e..f0401a1 100644
--- a/pkg/front_end/testcases/incremental.status
+++ b/pkg/front_end/testcases/incremental.status
@@ -6,3 +6,5 @@
 
 # http://dartbug.com/41812#issuecomment-684825703
 #strongmode_mixins_2: Crash
+
+changing_modules_16: Crash
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental/changing_modules_14.yaml b/pkg/front_end/testcases/incremental/changing_modules_14.yaml
new file mode 100644
index 0000000..641accf
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/changing_modules_14.yaml
@@ -0,0 +1,59 @@
+# 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.md file.
+
+# Compile an application with modules compiled as outlines with constants.
+# When compiling the "real" library (as non-outline) constant evaluation
+# goes into more modules than in just the outline version.
+
+type: newworld
+# Set to DDC for compiling modules as outline.
+target: DDC
+modules:
+  moduleC:
+    moduleC/lib.dart: |
+      const constC = ['value_c'];
+    moduleC/.packages: |
+      moduleC:.
+  moduleB:
+    moduleB/lib.dart: |
+      import "package:moduleC/lib.dart";
+      const constB = ['value_b', constC];
+    moduleB/.packages: |
+      moduleB:.
+      moduleC:../moduleC
+worlds:
+  - entry: main.dart
+    fromComponent: true
+    sources:
+      main.dart: |
+        import 'package:moduleB/lib.dart';
+        import 'lib.dart';
+        const constA = ['value_a', constB];
+        const constLib = constFromLib;
+      lib.dart: |
+        const constFromLib = 42;
+      .packages: |
+        moduleB:moduleB
+        moduleC:moduleC
+    modules:
+      - moduleB
+      - moduleC
+    expectedLibraryCount: 4
+    neededDillLibraries:
+      # Because the modules are complied as outlines they haven't had constants
+      # evaluated. As this is fully compiled it does evaluate constants and thus
+      # goes into both B and C.
+      # We do not mark "lib.dart" though as it is not loaded from dill.
+      - package:moduleB/lib.dart
+      - package:moduleC/lib.dart
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Field constA
+        - Field constLib
+      org-dartlang-test:///lib.dart:
+        - Field constFromLib
+      package:moduleB/lib.dart:
+        - Field constB
+      package:moduleC/lib.dart:
+        - Field constC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_14.yaml.world.1.expect b/pkg/front_end/testcases/incremental/changing_modules_14.yaml.world.1.expect
new file mode 100644
index 0000000..ac9e649
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/changing_modules_14.yaml.world.1.expect
@@ -0,0 +1,32 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  static const field dart.core::int constFromLib = #C1;
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "package:moduleB/lib.dart";
+  import "org-dartlang-test:///lib.dart";
+
+  static const field dart.core::List<dart.core::Object> constA = #C7;
+  static const field dart.core::int constLib = #C1;
+}
+library from "package:moduleB/lib.dart" as lib2 {
+
+  import "package:moduleC/lib.dart";
+
+  static const field dart.core::List<dart.core::Object*>* constB = const <dart.core::Object*>["value_b", lib3::constC];
+}
+library from "package:moduleC/lib.dart" as lib3 {
+
+  static const field dart.core::List<dart.core::String*>* constC = const <dart.core::String*>["value_c"];
+}
+constants  {
+  #C1 = 42.0
+  #C2 = "value_a"
+  #C3 = "value_b"
+  #C4 = "value_c"
+  #C5 = <dart.core::String*>[#C4]
+  #C6 = <dart.core::Object*>[#C3, #C5]
+  #C7 = <dart.core::Object*>[#C2, #C6]
+}
diff --git a/pkg/front_end/testcases/incremental/changing_modules_15.yaml b/pkg/front_end/testcases/incremental/changing_modules_15.yaml
new file mode 100644
index 0000000..d0753b8
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/changing_modules_15.yaml
@@ -0,0 +1,51 @@
+# 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.md file.
+
+# Compile an application with modules compiled as outlines with constants.
+# When compiling the "real" library (as non-outline) constant evaluation
+# goes into more modules than in just the outline version.
+
+type: newworld
+# Set to DDC for compiling modules as outline.
+target: DDC
+modules:
+  moduleC:
+    moduleC/lib.dart: |
+      const constC = true;
+    moduleC/.packages: |
+      moduleC:.
+  moduleB:
+    moduleB/lib.dart: |
+      import "package:moduleC/lib.dart";
+      const constB = false || constC;
+    moduleB/.packages: |
+      moduleB:.
+      moduleC:../moduleC
+worlds:
+  - entry: main.dart
+    fromComponent: true
+    sources:
+      main.dart: |
+        import 'package:moduleB/lib.dart';
+        const constA = true && constB;
+      .packages: |
+        moduleB:moduleB
+        moduleC:moduleC
+    modules:
+      - moduleB
+      - moduleC
+    expectedLibraryCount: 3
+    neededDillLibraries:
+      # Because the modules are complied as outlines they haven't had constants
+      # evaluated. As this is fully compiled it does evaluate constants and thus
+      # goes into both B and C.
+      - package:moduleB/lib.dart
+      - package:moduleC/lib.dart
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Field constA
+      package:moduleB/lib.dart:
+        - Field constB
+      package:moduleC/lib.dart:
+        - Field constC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_15.yaml.world.1.expect b/pkg/front_end/testcases/incremental/changing_modules_15.yaml.world.1.expect
new file mode 100644
index 0000000..c7ef4da
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/changing_modules_15.yaml.world.1.expect
@@ -0,0 +1,20 @@
+main = <No Member>;
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "package:moduleB/lib.dart";
+
+  static const field dart.core::bool constA = #C1;
+}
+library from "package:moduleB/lib.dart" as lib {
+
+  import "package:moduleC/lib.dart";
+
+  static const field dart.core::bool* constB = false || lib2::constC;
+}
+library from "package:moduleC/lib.dart" as lib2 {
+
+  static const field dart.core::bool* constC = true;
+}
+constants  {
+  #C1 = true
+}
diff --git a/pkg/front_end/testcases/incremental/changing_modules_16.yaml b/pkg/front_end/testcases/incremental/changing_modules_16.yaml
new file mode 100644
index 0000000..69ad3b9
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/changing_modules_16.yaml
@@ -0,0 +1,49 @@
+# 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.md file.
+
+# Reproduction of https://github.com/dart-lang/sdk/issues/47176
+# Compile an application with modules where one module has imported another
+# module with too many slashes. Now try to import it correctly.
+# This is essentially equivalent to not loading a needed component.
+
+type: newworld
+target: DDC
+modules:
+  moduleA:
+    moduleA/x/lib.dart: |
+      void foo() { }
+    moduleA/.packages: |
+      moduleA:.
+  moduleB:
+    moduleB/x/lib.dart: |
+      // Mind the double-slash! (on Windows this could probably also be a change
+      // in case (e.g 'lib' vs 'Lib')).
+      import 'package:moduleA/x//lib.dart';
+      void bar() { }
+    moduleB/.packages: |
+      moduleA:../moduleA
+      moduleB:.
+worlds:
+  - entry: main.dart
+    fromComponent: true
+    sources:
+      main.dart: |
+        import 'package:moduleB/x/lib.dart';
+        main() {
+          bar();
+        }
+      .packages: |
+        moduleA:moduleA
+        moduleB:moduleB
+    modules:
+      - moduleA
+      - moduleB
+    expectedLibraryCount: 3
+    neededDillLibraries:
+      - package:module/x/lib.dart
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:module/lib.dart:
+        - Procedure foo
diff --git a/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.1.expect b/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.1.expect
index 98a923f..c6642dc 100644
--- a/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.1.expect
@@ -1,26 +1,21 @@
 main = main::main;
 library from "org-dartlang-test:///lib.dart" as lib {
 
-  static const field dart.core::Set<dart.core::String*>* bar = #C6;
+  static const field dart.core::Set<dart.core::String*>* bar = #C3;
 }
 library from "org-dartlang-test:///main.dart" as main {
 
   import "org-dartlang-test:///lib.dart";
 
-  static const field dart.core::Set<dart.core::String*>* foo = #C9;
+  static const field dart.core::Set<dart.core::String*>* foo = #C4;
   static method main() → dynamic {
-    dart.core::print(#C9);
-    dart.core::print(#C6);
+    dart.core::print(#C4);
+    dart.core::print(#C3);
   }
 }
 constants  {
   #C1 = "hello"
-  #C2 = null
-  #C3 = "world"
-  #C4 = <dynamic>[#C1, #C2, #C3, #C2]
-  #C5 = dart.core::_ImmutableMap<dart.core::String*, Null> {_kvPairs:#C4}
-  #C6 = dart.collection::_UnmodifiableSet<dart.core::String*> {_map:#C5}
-  #C7 = <dynamic>[]
-  #C8 = dart.core::_ImmutableMap<dart.core::String*, Null> {_kvPairs:#C7}
-  #C9 = dart.collection::_UnmodifiableSet<dart.core::String*> {_map:#C8}
+  #C2 = "world"
+  #C3 = <dart.core::String*>{#C1, #C2}
+  #C4 = <dart.core::String*>{}
 }
diff --git a/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.2.expect b/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.2.expect
index 3e1ca84..e7dc08e 100644
--- a/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/constant_set_literal.yaml.world.2.expect
@@ -1,25 +1,20 @@
 main = main::main;
 library from "org-dartlang-test:///lib.dart" as lib {
 
-  static const field dart.core::Set<dart.core::int*>* bar = #C5;
+  static const field dart.core::Set<dart.core::int*>* bar = #C2;
 }
 library from "org-dartlang-test:///main.dart" as main {
 
   import "org-dartlang-test:///lib.dart";
 
-  static const field dart.core::Set<dart.core::String*>* foo = #C8;
+  static const field dart.core::Set<dart.core::String*>* foo = #C3;
   static method main() → dynamic {
-    dart.core::print(#C8);
-    dart.core::print(#C5);
+    dart.core::print(#C3);
+    dart.core::print(#C2);
   }
 }
 constants  {
   #C1 = 42
-  #C2 = null
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = dart.core::_ImmutableMap<dart.core::int*, Null> {_kvPairs:#C3}
-  #C5 = dart.collection::_UnmodifiableSet<dart.core::int*> {_map:#C4}
-  #C6 = <dynamic>[]
-  #C7 = dart.core::_ImmutableMap<dart.core::String*, Null> {_kvPairs:#C6}
-  #C8 = dart.collection::_UnmodifiableSet<dart.core::String*> {_map:#C7}
+  #C2 = <dart.core::int*>{#C1}
+  #C3 = <dart.core::String*>{}
 }
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
index 98cc56f..9ecd41a 100644
--- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
@@ -13,13 +13,13 @@
       ;
     @#C7
     get yy() → dart.core::int
-      return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C7
     set yy(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C11
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -38,13 +38,13 @@
     get xx() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set xx(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C11
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
index 98cc56f..9ecd41a 100644
--- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
@@ -13,13 +13,13 @@
       ;
     @#C7
     get yy() → dart.core::int
-      return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C7
     set yy(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C11
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -38,13 +38,13 @@
     get xx() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set xx(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C11
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
index 19019c9..e06b9d6 100644
--- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
@@ -32,13 +32,13 @@
     get yy() → str::Y
       return new str::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set yy(str::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   class Y extends dart.ffi::Struct {
     synthetic constructor •() → str::Y
@@ -51,7 +51,7 @@
     external set zz(invalid-type #externalFieldValue) → void;
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
index 19019c9..e06b9d6 100644
--- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
@@ -32,13 +32,13 @@
     get yy() → str::Y
       return new str::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set yy(str::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   class Y extends dart.ffi::Struct {
     synthetic constructor •() → str::Y
@@ -51,7 +51,7 @@
     external set zz(invalid-type #externalFieldValue) → void;
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/dart2js_late.yaml b/pkg/front_end/testcases/incremental/dart2js_late.yaml
index c596da3..9473131 100644
--- a/pkg/front_end/testcases/incremental/dart2js_late.yaml
+++ b/pkg/front_end/testcases/incremental/dart2js_late.yaml
@@ -23,7 +23,6 @@
 
   - entry: late_statics.dart
     worldType: updated
-    errors: true # (currently?) dart2js changes the interface and doesn't have the setter anymore. dartbug.com/45854
     expectInitializeFromDill: false
     invalidate:
       - late_statics.dart
diff --git a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
index d186e96..09dadea 100644
--- a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
@@ -4,12 +4,16 @@
   import "org-dartlang-test:///late_statics_lib.dart" as lib;
 
   static method testUninitializedNonFinalTopLevelField() → void {
-    dart.core::print(lat2::a.{_late_helper::_Cell::readField}<dart.core::int>(){() → dart.core::int});
-    lat2::a.{_late_helper::_Cell::value} = 42;
-    dart.core::print(lat2::a.{_late_helper::_Cell::readField}<dart.core::int>(){() → dart.core::int});
+    dart.core::print(lat2::a);
+    lat2::a = 42;
+    dart.core::print(lat2::a);
   }
 }
 library from "org-dartlang-test:///late_statics_lib.dart" as lat2 {
 
-  static final field _late_helper::_Cell a = new _late_helper::_Cell::named("a");
+  static final field _late_helper::_Cell _#a = new _late_helper::_Cell::named("a");
+  static get a() → dart.core::int
+    return lat2::_#a.{_late_helper::_Cell::readField}<dart.core::int>(){() → dart.core::int};
+  static set a(dart.core::int value) → void
+    return lat2::_#a.{_late_helper::_Cell::value} = value;
 }
diff --git a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
index e6cc8ab..09dadea 100644
--- a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
@@ -1,22 +1,19 @@
 main = <No Member>;
 library from "org-dartlang-test:///late_statics.dart" as lat {
-//
-// Problems in library:
-//
-// org-dartlang-test:///late_statics.dart:4:7: Error: Setter not found: 'a'.
-//   lib.a = 42;
-//       ^
-//
 
   import "org-dartlang-test:///late_statics_lib.dart" as lib;
 
   static method testUninitializedNonFinalTopLevelField() → void {
     dart.core::print(lat2::a);
-    invalid-expression "org-dartlang-test:///late_statics.dart:4:7: Error: Setter not found: 'a'.\n  lib.a = 42;\n      ^";
+    lat2::a = 42;
     dart.core::print(lat2::a);
   }
 }
 library from "org-dartlang-test:///late_statics_lib.dart" as lat2 {
 
-  static final field _late_helper::_Cell a = new _late_helper::_Cell::named("a");
+  static final field _late_helper::_Cell _#a = new _late_helper::_Cell::named("a");
+  static get a() → dart.core::int
+    return lat2::_#a.{_late_helper::_Cell::readField}<dart.core::int>(){() → dart.core::int};
+  static set a(dart.core::int value) → void
+    return lat2::_#a.{_late_helper::_Cell::value} = value;
 }
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
index 5efe877..7f32b12 100644
--- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
@@ -24,21 +24,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
index c4bbfa3..17f1531 100644
--- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
@@ -24,21 +24,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
index 257f48a..583ebfd 100644
--- a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
@@ -24,21 +24,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.1.expect b/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.1.expect
index 15ee75b..4ae1498 100644
--- a/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.1.expect
@@ -5,7 +5,7 @@
 
   abstract class AfterLayoutMixin<T extends fra::StatefulWidget*> extends fra::State<aft::AfterLayoutMixin::T*> /*isMixinDeclaration*/  {
     abstract member-signature get _widget() → aft::AfterLayoutMixin::T*; -> fra::State::_widget
-    abstract member-signature set _widget(generic-covariant-impl aft::AfterLayoutMixin::T* value) → void; -> fra::State::_widget
+    abstract member-signature set _widget(covariant-by-class aft::AfterLayoutMixin::T* value) → void; -> fra::State::_widget
     abstract member-signature method toString() → dart.core::String*; -> fra::_State&Object&Diagnosticable::toString
     abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
     abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
@@ -28,7 +28,7 @@
       return super.{fra::Diagnosticable::toString}();
   }
   abstract class State<T extends fra::StatefulWidget> extends fra::_State&Object&Diagnosticable {
-    generic-covariant-impl field fra::State::T? _widget = null;
+    covariant-by-class field fra::State::T? _widget = null;
     synthetic constructor •() → fra::State<fra::State::T>
       : super fra::_State&Object&Diagnosticable::•()
       ;
@@ -76,7 +76,7 @@
       : super fra::State::•()
       ;
     abstract member-signature get _widget() → main::HotReloadIssue*; -> fra::State::_widget
-    abstract member-signature set _widget(generic-covariant-impl main::HotReloadIssue* value) → void; -> fra::State::_widget
+    abstract member-signature set _widget(covariant-by-class main::HotReloadIssue* value) → void; -> fra::State::_widget
     abstract member-signature method toString() → dart.core::String*; -> fra::_State&Object&Diagnosticable::toString
     abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
     abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
diff --git a/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.2.expect b/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.2.expect
index 4ba21fd..cd64084 100644
--- a/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/flutter_issue_66122.yaml.world.2.expect
@@ -5,7 +5,7 @@
 
   abstract class AfterLayoutMixin<T extends fra::StatefulWidget*> extends fra::State<aft::AfterLayoutMixin::T*> /*isMixinDeclaration*/  {
     abstract member-signature get _widget() → aft::AfterLayoutMixin::T*; -> fra::State::_widget
-    abstract member-signature set _widget(generic-covariant-impl aft::AfterLayoutMixin::T* value) → void; -> fra::State::_widget
+    abstract member-signature set _widget(covariant-by-class aft::AfterLayoutMixin::T* value) → void; -> fra::State::_widget
     abstract member-signature method toString() → dart.core::String*; -> fra::_State&Object&Diagnosticable::toString
     abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
     abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
@@ -28,7 +28,7 @@
       return super.{fra::Diagnosticable::toString}();
   }
   abstract class State<T extends fra::StatefulWidget> extends fra::_State&Object&Diagnosticable {
-    generic-covariant-impl field fra::State::T? _widget = null;
+    covariant-by-class field fra::State::T? _widget = null;
     synthetic constructor •() → fra::State<fra::State::T>
       : super fra::_State&Object&Diagnosticable::•()
       ;
@@ -76,7 +76,7 @@
       : super fra::State::•()
       ;
     abstract member-signature get _widget() → main::HotReloadIssue*; -> fra::State::_widget
-    abstract member-signature set _widget(generic-covariant-impl main::HotReloadIssue* value) → void; -> fra::State::_widget
+    abstract member-signature set _widget(covariant-by-class main::HotReloadIssue* value) → void; -> fra::State::_widget
     abstract member-signature method toString() → dart.core::String*; -> fra::Diagnosticable::toString
     abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
     abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
diff --git a/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.1.expect b/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.1.expect
index 2c5d2fd..d8273a9 100644
--- a/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.1.expect
@@ -41,7 +41,7 @@
     synthetic constructor •() → lib::Baz*
       : super dart.core::Object::•()
       ;
-    method hello(covariant lib::FooEntry* entry) → void {}
+    method hello(covariant-by-declaration lib::FooEntry* entry) → void {}
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -59,13 +59,13 @@
     synthetic constructor •() → lib::Qux*
       : super lib::Baz::•()
       ;
-    method hello(covariant lib::BarEntry* entry) → void {}
+    method hello(covariant-by-declaration lib::BarEntry* entry) → void {}
   }
   abstract class _Quux&Qux&MyMixin extends lib::Qux implements lib::MyMixin /*isAnonymousMixin,isEliminatedMixin*/  {
     synthetic constructor •() → lib::_Quux&Qux&MyMixin*
       : super lib::Qux::•()
       ;
-    abstract member-signature method hello(covariant lib::FooEntry* entry) → void; -> lib::Baz::hello
+    abstract member-signature method hello(covariant-by-declaration lib::FooEntry* entry) → void; -> lib::Baz::hello
   }
   class Quux extends lib::_Quux&Qux&MyMixin {
     synthetic constructor •() → lib::Quux*
diff --git a/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.2.expect b/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.2.expect
index 8d427f03..65c8b9e 100644
--- a/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/flutter_mixin_failure_1.yaml.world.2.expect
@@ -41,7 +41,7 @@
     synthetic constructor •() → lib::Baz*
       : super dart.core::Object::•()
       ;
-    method hello(covariant lib::FooEntry* entry) → void {}
+    method hello(covariant-by-declaration lib::FooEntry* entry) → void {}
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -59,13 +59,13 @@
     synthetic constructor •() → lib::Qux*
       : super lib::Baz::•()
       ;
-    method hello(covariant lib::BarEntry* entry) → void {}
+    method hello(covariant-by-declaration lib::BarEntry* entry) → void {}
   }
   abstract class _Quux&Qux&MyMixin extends lib::Qux implements lib::MyMixin /*isAnonymousMixin,isEliminatedMixin*/  {
     synthetic constructor •() → lib::_Quux&Qux&MyMixin*
       : super lib::Qux::•()
       ;
-    abstract member-signature method hello(covariant lib::FooEntry* entry) → void; -> lib::Baz::hello
+    abstract member-signature method hello(covariant-by-declaration lib::FooEntry* entry) → void; -> lib::Baz::hello
   }
   class Quux extends lib::_Quux&Qux&MyMixin {
     synthetic constructor •() → lib::Quux*
diff --git a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect
index 516a77e..3456d148 100644
--- a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect
@@ -12,27 +12,27 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get a1() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a1(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get a2() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a2(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get a3() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a3(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get blah() → a::NestedStruct
       return new a::NestedStruct::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set blah(a::NestedStruct #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   @#C24
   class NestedStruct extends dart.ffi::Struct {
@@ -43,20 +43,20 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get n1() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n1(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get n2() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n2(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get n3() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n3(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///b.dart" as b {
@@ -77,13 +77,13 @@
     get b1() → a::StructA
       return new a::StructA::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set b1(a::StructA #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   static method periodic() → void {
     dart.core::print(b::StructB::#sizeOf);
diff --git a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect
index 516a77e..3456d148 100644
--- a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect
@@ -12,27 +12,27 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get a1() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a1(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get a2() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a2(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get a3() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set a3(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get blah() → a::NestedStruct
       return new a::NestedStruct::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set blah(a::NestedStruct #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   @#C24
   class NestedStruct extends dart.ffi::Struct {
@@ -43,20 +43,20 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get n1() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n1(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get n2() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n2(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get n3() → dart.ffi::Pointer<dart.ffi::Void>
-      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::Void>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set n3(dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///b.dart" as b {
@@ -77,13 +77,13 @@
     get b1() → a::StructA
       return new a::StructA::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set b1(a::StructA #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
   static method periodic() → void {
     dart.core::print(b::StructB::#sizeOf);
diff --git a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.1.expect b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.1.expect
index 9ba33da..c0afa98 100644
--- a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.1.expect
@@ -13,7 +13,7 @@
     synthetic constructor •() → mai2::SuperClass*
       : super dart.core::Object::•()
       ;
-    method method(covariant dart.core::int* i) → void {}
+    method method(covariant-by-declaration dart.core::int* i) → void {}
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -45,7 +45,7 @@
     synthetic constructor •() → mai2::_Class&SuperClass&Mixin*
       : super mai2::SuperClass::•()
       ;
-    forwarding-stub method method(covariant dart.core::num* i) → void
+    forwarding-stub method method(covariant-by-declaration dart.core::num* i) → void
       return super.{mai2::Mixin::method}(i);
   }
   class Class extends mai2::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.2.expect b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.2.expect
index 19afe72..533b853 100644
--- a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.2.expect
@@ -14,7 +14,7 @@
     synthetic constructor •() → mai2::SuperClass*
       : super dart.core::Object::•()
       ;
-    method method(covariant dart.core::int* i) → void {}
+    method method(covariant-by-declaration dart.core::int* i) → void {}
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -46,7 +46,7 @@
     synthetic constructor •() → mai2::_Class&SuperClass&Mixin*
       : super mai2::SuperClass::•()
       ;
-    forwarding-stub method method(covariant dart.core::num* i) → void
+    forwarding-stub method method(covariant-by-declaration dart.core::num* i) → void
       return super.{mai2::Mixin::method}(i);
   }
   class Class extends mai2::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.3.expect b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.3.expect
index 9ba33da..c0afa98 100644
--- a/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/mixin_application_declares.yaml.world.3.expect
@@ -13,7 +13,7 @@
     synthetic constructor •() → mai2::SuperClass*
       : super dart.core::Object::•()
       ;
-    method method(covariant dart.core::int* i) → void {}
+    method method(covariant-by-declaration dart.core::int* i) → void {}
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -45,7 +45,7 @@
     synthetic constructor •() → mai2::_Class&SuperClass&Mixin*
       : super mai2::SuperClass::•()
       ;
-    forwarding-stub method method(covariant dart.core::num* i) → void
+    forwarding-stub method method(covariant-by-declaration dart.core::num* i) → void
       return super.{mai2::Mixin::method}(i);
   }
   class Class extends mai2::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.1.expect
index 36909df..7dd08b9 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.1.expect
@@ -5,7 +5,7 @@
     synthetic constructor •() → lib1::A<lib1::A::T*>*
       : super dart.core::Object::•()
       ;
-    method foo(generic-covariant-impl lib1::A::T* t) → dynamic {
+    method foo(covariant-by-class lib1::A::T* t) → dynamic {
       dart.core::print("foo T ${t}");
     }
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
@@ -46,7 +46,7 @@
     synthetic constructor •() → main::C*
       : super lib1::B::•()
       ;
-    forwarding-stub method foo(generic-covariant-impl dart.core::int* t) → dynamic
+    forwarding-stub method foo(covariant-by-class dart.core::int* t) → dynamic
       return super.{lib1::B::foo}(t);
   }
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.2.expect
index ad37dd1..4096374 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_15.yaml.world.2.expect
@@ -5,7 +5,7 @@
     synthetic constructor •() → lib1::A<lib1::A::T*>*
       : super dart.core::Object::•()
       ;
-    method foo(generic-covariant-impl lib1::A::T* t) → dynamic {
+    method foo(covariant-by-class lib1::A::T* t) → dynamic {
       dart.core::print("foo T ${t}");
     }
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
@@ -46,7 +46,7 @@
     synthetic constructor •() → main::C*
       : super lib1::B::•()
       ;
-    forwarding-stub method foo(generic-covariant-impl dart.core::int* t) → dynamic
+    forwarding-stub method foo(covariant-by-class dart.core::int* t) → dynamic
       return super.{lib1::B::foo}(t);
   }
   static method main() → dynamic {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.1.expect
index 9c81633..6f8c60d 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.1.expect
@@ -71,7 +71,7 @@
   #C1 = #getter
   #C2 = <dart.core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = dart.core::_ImmutableMap<dart.core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <dart.core::Symbol*, dynamic>{)
   #C5 = #method
   #C6 = #setter=
   #C7 = #field
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.2.expect
index b2fcdc2..546d558 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_16.yaml.world.2.expect
@@ -71,7 +71,7 @@
   #C1 = #getter
   #C2 = <dart.core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = dart.core::_ImmutableMap<dart.core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <dart.core::Symbol*, dynamic>{)
   #C5 = #method
   #C6 = #setter=
   #C7 = #field
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect
index f919f21..8d83ce0 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect
@@ -30,19 +30,19 @@
     abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
   }
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C14;
     static const field main::CompilationStrategy* direct = #C4;
     static const field main::CompilationStrategy* toKernel = #C7;
     static const field main::CompilationStrategy* toData = #C10;
     static const field main::CompilationStrategy* fromData = #C13;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -63,16 +63,16 @@
 constants  {
   #C1 = dart.core::_Override {}
   #C2 = 0
-  #C3 = "CompilationStrategy.direct"
+  #C3 = "direct"
   #C4 = main::CompilationStrategy {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "CompilationStrategy.toKernel"
+  #C6 = "toKernel"
   #C7 = main::CompilationStrategy {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "CompilationStrategy.toData"
+  #C9 = "toData"
   #C10 = main::CompilationStrategy {index:#C8, _name:#C9}
   #C11 = 3
-  #C12 = "CompilationStrategy.fromData"
+  #C12 = "fromData"
   #C13 = main::CompilationStrategy {index:#C11, _name:#C12}
   #C14 = <main::CompilationStrategy*>[#C4, #C7, #C10, #C13]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect
index 0b4afaf..fb4d5d2 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect
@@ -30,19 +30,19 @@
     abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
   }
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C14;
     static const field main::CompilationStrategy* direct = #C4;
     static const field main::CompilationStrategy* toKernel = #C7;
     static const field main::CompilationStrategy* toData = #C10;
     static const field main::CompilationStrategy* fromData = #C13;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -63,16 +63,16 @@
 constants  {
   #C1 = dart.core::_Override {}
   #C2 = 0
-  #C3 = "CompilationStrategy.direct"
+  #C3 = "direct"
   #C4 = main::CompilationStrategy {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "CompilationStrategy.toKernel"
+  #C6 = "toKernel"
   #C7 = main::CompilationStrategy {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "CompilationStrategy.toData"
+  #C9 = "toData"
   #C10 = main::CompilationStrategy {index:#C8, _name:#C9}
   #C11 = 3
-  #C12 = "CompilationStrategy.fromData"
+  #C12 = "fromData"
   #C13 = main::CompilationStrategy {index:#C11, _name:#C12}
   #C14 = <main::CompilationStrategy*>[#C4, #C7, #C10, #C13]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
index e32d117..985ec21 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
@@ -10,13 +10,13 @@
     abstract member-signature get length() → dart.core::int*; -> dart.core::List::length
     abstract member-signature set length(dart.core::int* newLength) → void; -> dart.core::List::length
     abstract member-signature operator [](dart.core::int* index) → dart.core::int*; -> dart.core::List::[]
-    abstract member-signature operator []=(dart.core::int* index, generic-covariant-impl dart.core::int* value) → void; -> dart.core::List::[]=
+    abstract member-signature operator []=(dart.core::int* index, covariant-by-class dart.core::int* value) → void; -> dart.core::List::[]=
     get /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first() → dart.core::int* {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       return this.{dart.core::List::[]}(0){(dart.core::int) → dart.core::int*};
     }
-    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first(generic-covariant-impl dart.core::int* value) → void {
+    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first(covariant-by-class dart.core::int* value) → void {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       this.{dart.core::List::[]=}(0, value){(dart.core::int, dart.core::int*) → void};
@@ -26,7 +26,7 @@
         throw dart._internal::IterableElementError::noElement();
       return this.{dart.core::List::[]}(this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}){(dart.core::int) → dart.core::int*};
     }
-    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last(generic-covariant-impl dart.core::int* value) → void {
+    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last(covariant-by-class dart.core::int* value) → void {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       this.{dart.core::List::[]=}(this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}, value){(dart.core::int, dart.core::int*) → void};
@@ -35,7 +35,7 @@
       return new dart._internal::ListIterator::•<dart.core::int*>(this);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ elementAt(dart.core::int index) → dart.core::int*
       return this.{dart.core::List::[]}(index){(dart.core::int) → dart.core::int*};
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ followedBy(generic-covariant-impl dart.core::Iterable<dart.core::int*> other) → dart.core::Iterable<dart.core::int*>
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ followedBy(covariant-by-class dart.core::Iterable<dart.core::int*> other) → dart.core::Iterable<dart.core::int*>
       return dart._internal::FollowedByIterable::firstEfficient<dart.core::int*>(this, other);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ forEach((dart.core::int*) → void action) → void {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
@@ -91,7 +91,7 @@
       }
       return false;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ firstWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ firstWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       for (dart.core::int i = 0; i.{dart.core::num::<}(length){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
         dart.core::int* element = this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int*};
@@ -105,7 +105,7 @@
         return orElse{() → dart.core::int*}(){() → dart.core::int*};
       throw dart._internal::IterableElementError::noElement();
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       for (dart.core::int i = length.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}; i.{dart.core::num::>=}(0){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}) {
         dart.core::int* element = this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int*};
@@ -119,7 +119,7 @@
         return orElse{() → dart.core::int*}(){() → dart.core::int*};
       throw dart._internal::IterableElementError::noElement();
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ singleWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ singleWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       late dart.core::int* match;
       dart.core::bool matchFound = false;
@@ -158,7 +158,7 @@
       return new dart._internal::MappedListIterable::•<dart.core::int*, main::_WithListMixin&Object&ListMixin::map::T%>(this, f);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ expand<T extends dart.core::Object? = dynamic>((dart.core::int*) → dart.core::Iterable<main::_WithListMixin&Object&ListMixin::expand::T%> f) → dart.core::Iterable<main::_WithListMixin&Object&ListMixin::expand::T%>
       return new dart._internal::ExpandIterable::•<dart.core::int*, main::_WithListMixin&Object&ListMixin::expand::T%>(this, f);
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reduce(generic-covariant-impl (dart.core::int*, dart.core::int*) → dart.core::int* combine) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reduce(covariant-by-class (dart.core::int*, dart.core::int*) → dart.core::int* combine) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       if(length =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
@@ -209,10 +209,10 @@
       }
       return result;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ add(generic-covariant-impl dart.core::int* element) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ add(covariant-by-class dart.core::int* element) → void {
       this.{dart.core::List::[]=}(let final dart.core::int #t2 = this.{dart.core::List::length}{dart.core::int} in let final dart.core::int #t3 = this.{dart.core::List::length} = #t2.{dart.core::num::+}(1){(dart.core::num) → dart.core::int} in #t2, element){(dart.core::int, dart.core::int*) → void};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ addAll(generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ addAll(covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       dart.core::int i = this.{dart.core::List::length}{dart.core::int};
       {
         dart.core::Iterator<dart.core::int*> :sync-for-iterator = iterable.{dart.core::Iterable::iterator}{dart.core::Iterator<dart.core::int*>};
@@ -301,7 +301,7 @@
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ asMap() → dart.core::Map<dart.core::int, dart.core::int*> {
       return new dart._internal::ListMapView::•<dart.core::int*>(this);
     }
-    operator /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ +(generic-covariant-impl dart.core::List<dart.core::int*> other) → dart.core::List<dart.core::int*>
+    operator /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ +(covariant-by-class dart.core::List<dart.core::int*> other) → dart.core::List<dart.core::int*>
       return block {
         final dart.core::List<dart.core::int*> #t5 = dart.core::List::of<dart.core::int*>(this);
         #t5.{dart.core::List::addAll}{Invariant}(other){(dart.core::Iterable<dart.core::int*>) → void};
@@ -324,14 +324,14 @@
         this.{dart.collection::ListMixin::_closeGap}(start, end){(dart.core::int, dart.core::int) → void};
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fillRange(dart.core::int start, dart.core::int end, [generic-covariant-impl dart.core::int? fill = #C2]) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fillRange(dart.core::int start, dart.core::int end, [covariant-by-class dart.core::int? fill = #C2]) → void {
       dart.core::int* value = let dart.core::int? #t6 = fill in #t6 == null ?{dart.core::int*} #t6 : #t6{dart.core::int*};
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       for (dart.core::int i = start; i.{dart.core::num::<}(end){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
         this.{dart.core::List::[]=}(i, value){(dart.core::int, dart.core::int*) → void};
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setRange(dart.core::int start, dart.core::int end, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable, [dart.core::int skipCount = #C7]) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setRange(dart.core::int start, dart.core::int end, covariant-by-class dart.core::Iterable<dart.core::int*> iterable, [dart.core::int skipCount = #C7]) → void {
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       dart.core::int length = end.{dart.core::num::-}(start){(dart.core::num) → dart.core::int};
       if(length =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
@@ -361,7 +361,7 @@
         }
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ replaceRange(dart.core::int start, dart.core::int end, generic-covariant-impl dart.core::Iterable<dart.core::int*> newContents) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ replaceRange(dart.core::int start, dart.core::int end, covariant-by-class dart.core::Iterable<dart.core::int*> newContents) → void {
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       if(start =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} this.{dart.core::List::length}{dart.core::int}) {
         this.{dart.collection::ListMixin::addAll}(newContents){(dart.core::Iterable<dart.core::int*>) → void};
@@ -411,7 +411,7 @@
           this.{dart.collection::ListMixin::setRange}(start, insertEnd, newContents){(dart.core::int, dart.core::int, dart.core::Iterable<dart.core::int*>, [dart.core::int]) → void};
         }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexOf(generic-covariant-impl dart.core::Object? element, [dart.core::int start = #C7]) → dart.core::int {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexOf(covariant-by-class dart.core::Object? element, [dart.core::int start = #C7]) → dart.core::int {
       if(start.{dart.core::num::<}(0){(dart.core::num) → dart.core::bool})
         start = 0;
       for (dart.core::int i = start; i.{dart.core::num::<}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
@@ -429,7 +429,7 @@
       }
       return 1.{dart.core::int::unary-}(){() → dart.core::int};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexOf(generic-covariant-impl dart.core::Object? element, [dart.core::int? start = #C2]) → dart.core::int {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexOf(covariant-by-class dart.core::Object? element, [dart.core::int? start = #C2]) → dart.core::int {
       if(start == null || start{dart.core::int}.{dart.core::num::>=}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool})
         start = this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int};
       if(start{dart.core::int} == null)
@@ -451,7 +451,7 @@
       }
       return 1.{dart.core::int::unary-}(){() → dart.core::int};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, generic-covariant-impl dart.core::int* element) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, covariant-by-class dart.core::int* element) → void {
       dart._internal::checkNotNullable<dart.core::int>(index, "index");
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       dart.core::RangeError::checkValueInInterval(index, 0, length, "index");
@@ -466,7 +466,7 @@
       this.{dart.collection::ListMixin::_closeGap}(index, index.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}){(dart.core::int, dart.core::int) → void};
       return result;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insertAll(dart.core::int index, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insertAll(dart.core::int index, covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       dart.core::RangeError::checkValueInInterval(index, 0, this.{dart.core::List::length}{dart.core::int}, "index");
       if(index =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} this.{dart.core::List::length}{dart.core::int}) {
         this.{dart.collection::ListMixin::addAll}(iterable){(dart.core::Iterable<dart.core::int*>) → void};
@@ -493,7 +493,7 @@
       }
       this.{dart.collection::ListMixin::setAll}(index, iterable){(dart.core::int, dart.core::Iterable<dart.core::int*>) → void};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setAll(dart.core::int index, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setAll(dart.core::int index, covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       if(iterable is{ForNonNullableByDefault} dart.core::List<dynamic>) {
         this.{dart.collection::ListMixin::setRange}(index, index.{dart.core::num::+}(iterable.{dart.core::Iterable::length}{dart.core::int}){(dart.core::num) → dart.core::int}, iterable){(dart.core::int, dart.core::int, dart.core::Iterable<dart.core::int*>, [dart.core::int]) → void};
       }
@@ -533,7 +533,7 @@
       ;
     operator [](dart.core::int* index) → dart.core::int*
       return index;
-    operator []=(dart.core::int* index, generic-covariant-impl dart.core::int* value) → void
+    operator []=(dart.core::int* index, covariant-by-class dart.core::int* value) → void
       return null;
   }
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
index e32d117..985ec21 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
@@ -10,13 +10,13 @@
     abstract member-signature get length() → dart.core::int*; -> dart.core::List::length
     abstract member-signature set length(dart.core::int* newLength) → void; -> dart.core::List::length
     abstract member-signature operator [](dart.core::int* index) → dart.core::int*; -> dart.core::List::[]
-    abstract member-signature operator []=(dart.core::int* index, generic-covariant-impl dart.core::int* value) → void; -> dart.core::List::[]=
+    abstract member-signature operator []=(dart.core::int* index, covariant-by-class dart.core::int* value) → void; -> dart.core::List::[]=
     get /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first() → dart.core::int* {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       return this.{dart.core::List::[]}(0){(dart.core::int) → dart.core::int*};
     }
-    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first(generic-covariant-impl dart.core::int* value) → void {
+    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first(covariant-by-class dart.core::int* value) → void {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       this.{dart.core::List::[]=}(0, value){(dart.core::int, dart.core::int*) → void};
@@ -26,7 +26,7 @@
         throw dart._internal::IterableElementError::noElement();
       return this.{dart.core::List::[]}(this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}){(dart.core::int) → dart.core::int*};
     }
-    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last(generic-covariant-impl dart.core::int* value) → void {
+    set /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last(covariant-by-class dart.core::int* value) → void {
       if(this.{dart.core::List::length}{dart.core::int} =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
       this.{dart.core::List::[]=}(this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}, value){(dart.core::int, dart.core::int*) → void};
@@ -35,7 +35,7 @@
       return new dart._internal::ListIterator::•<dart.core::int*>(this);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ elementAt(dart.core::int index) → dart.core::int*
       return this.{dart.core::List::[]}(index){(dart.core::int) → dart.core::int*};
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ followedBy(generic-covariant-impl dart.core::Iterable<dart.core::int*> other) → dart.core::Iterable<dart.core::int*>
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ followedBy(covariant-by-class dart.core::Iterable<dart.core::int*> other) → dart.core::Iterable<dart.core::int*>
       return dart._internal::FollowedByIterable::firstEfficient<dart.core::int*>(this, other);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ forEach((dart.core::int*) → void action) → void {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
@@ -91,7 +91,7 @@
       }
       return false;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ firstWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ firstWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       for (dart.core::int i = 0; i.{dart.core::num::<}(length){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
         dart.core::int* element = this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int*};
@@ -105,7 +105,7 @@
         return orElse{() → dart.core::int*}(){() → dart.core::int*};
       throw dart._internal::IterableElementError::noElement();
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       for (dart.core::int i = length.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}; i.{dart.core::num::>=}(0){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::-}(1){(dart.core::num) → dart.core::int}) {
         dart.core::int* element = this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int*};
@@ -119,7 +119,7 @@
         return orElse{() → dart.core::int*}(){() → dart.core::int*};
       throw dart._internal::IterableElementError::noElement();
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ singleWhere((dart.core::int*) → dart.core::bool test, {generic-covariant-impl () →? dart.core::int* orElse = #C2}) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ singleWhere((dart.core::int*) → dart.core::bool test, {covariant-by-class () →? dart.core::int* orElse = #C2}) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       late dart.core::int* match;
       dart.core::bool matchFound = false;
@@ -158,7 +158,7 @@
       return new dart._internal::MappedListIterable::•<dart.core::int*, main::_WithListMixin&Object&ListMixin::map::T%>(this, f);
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ expand<T extends dart.core::Object? = dynamic>((dart.core::int*) → dart.core::Iterable<main::_WithListMixin&Object&ListMixin::expand::T%> f) → dart.core::Iterable<main::_WithListMixin&Object&ListMixin::expand::T%>
       return new dart._internal::ExpandIterable::•<dart.core::int*, main::_WithListMixin&Object&ListMixin::expand::T%>(this, f);
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reduce(generic-covariant-impl (dart.core::int*, dart.core::int*) → dart.core::int* combine) → dart.core::int* {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reduce(covariant-by-class (dart.core::int*, dart.core::int*) → dart.core::int* combine) → dart.core::int* {
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       if(length =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
         throw dart._internal::IterableElementError::noElement();
@@ -209,10 +209,10 @@
       }
       return result;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ add(generic-covariant-impl dart.core::int* element) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ add(covariant-by-class dart.core::int* element) → void {
       this.{dart.core::List::[]=}(let final dart.core::int #t2 = this.{dart.core::List::length}{dart.core::int} in let final dart.core::int #t3 = this.{dart.core::List::length} = #t2.{dart.core::num::+}(1){(dart.core::num) → dart.core::int} in #t2, element){(dart.core::int, dart.core::int*) → void};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ addAll(generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ addAll(covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       dart.core::int i = this.{dart.core::List::length}{dart.core::int};
       {
         dart.core::Iterator<dart.core::int*> :sync-for-iterator = iterable.{dart.core::Iterable::iterator}{dart.core::Iterator<dart.core::int*>};
@@ -301,7 +301,7 @@
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ asMap() → dart.core::Map<dart.core::int, dart.core::int*> {
       return new dart._internal::ListMapView::•<dart.core::int*>(this);
     }
-    operator /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ +(generic-covariant-impl dart.core::List<dart.core::int*> other) → dart.core::List<dart.core::int*>
+    operator /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ +(covariant-by-class dart.core::List<dart.core::int*> other) → dart.core::List<dart.core::int*>
       return block {
         final dart.core::List<dart.core::int*> #t5 = dart.core::List::of<dart.core::int*>(this);
         #t5.{dart.core::List::addAll}{Invariant}(other){(dart.core::Iterable<dart.core::int*>) → void};
@@ -324,14 +324,14 @@
         this.{dart.collection::ListMixin::_closeGap}(start, end){(dart.core::int, dart.core::int) → void};
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fillRange(dart.core::int start, dart.core::int end, [generic-covariant-impl dart.core::int? fill = #C2]) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fillRange(dart.core::int start, dart.core::int end, [covariant-by-class dart.core::int? fill = #C2]) → void {
       dart.core::int* value = let dart.core::int? #t6 = fill in #t6 == null ?{dart.core::int*} #t6 : #t6{dart.core::int*};
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       for (dart.core::int i = start; i.{dart.core::num::<}(end){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
         this.{dart.core::List::[]=}(i, value){(dart.core::int, dart.core::int*) → void};
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setRange(dart.core::int start, dart.core::int end, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable, [dart.core::int skipCount = #C7]) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setRange(dart.core::int start, dart.core::int end, covariant-by-class dart.core::Iterable<dart.core::int*> iterable, [dart.core::int skipCount = #C7]) → void {
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       dart.core::int length = end.{dart.core::num::-}(start){(dart.core::num) → dart.core::int};
       if(length =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} 0)
@@ -361,7 +361,7 @@
         }
       }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ replaceRange(dart.core::int start, dart.core::int end, generic-covariant-impl dart.core::Iterable<dart.core::int*> newContents) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ replaceRange(dart.core::int start, dart.core::int end, covariant-by-class dart.core::Iterable<dart.core::int*> newContents) → void {
       dart.core::RangeError::checkValidRange(start, end, this.{dart.core::List::length}{dart.core::int});
       if(start =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} this.{dart.core::List::length}{dart.core::int}) {
         this.{dart.collection::ListMixin::addAll}(newContents){(dart.core::Iterable<dart.core::int*>) → void};
@@ -411,7 +411,7 @@
           this.{dart.collection::ListMixin::setRange}(start, insertEnd, newContents){(dart.core::int, dart.core::int, dart.core::Iterable<dart.core::int*>, [dart.core::int]) → void};
         }
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexOf(generic-covariant-impl dart.core::Object? element, [dart.core::int start = #C7]) → dart.core::int {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexOf(covariant-by-class dart.core::Object? element, [dart.core::int start = #C7]) → dart.core::int {
       if(start.{dart.core::num::<}(0){(dart.core::num) → dart.core::bool})
         start = 0;
       for (dart.core::int i = start; i.{dart.core::num::<}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) {
@@ -429,7 +429,7 @@
       }
       return 1.{dart.core::int::unary-}(){() → dart.core::int};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexOf(generic-covariant-impl dart.core::Object? element, [dart.core::int? start = #C2]) → dart.core::int {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexOf(covariant-by-class dart.core::Object? element, [dart.core::int? start = #C2]) → dart.core::int {
       if(start == null || start{dart.core::int}.{dart.core::num::>=}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool})
         start = this.{dart.core::List::length}{dart.core::int}.{dart.core::num::-}(1){(dart.core::num) → dart.core::int};
       if(start{dart.core::int} == null)
@@ -451,7 +451,7 @@
       }
       return 1.{dart.core::int::unary-}(){() → dart.core::int};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, generic-covariant-impl dart.core::int* element) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, covariant-by-class dart.core::int* element) → void {
       dart._internal::checkNotNullable<dart.core::int>(index, "index");
       dart.core::int length = this.{dart.core::List::length}{dart.core::int};
       dart.core::RangeError::checkValueInInterval(index, 0, length, "index");
@@ -466,7 +466,7 @@
       this.{dart.collection::ListMixin::_closeGap}(index, index.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}){(dart.core::int, dart.core::int) → void};
       return result;
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insertAll(dart.core::int index, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insertAll(dart.core::int index, covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       dart.core::RangeError::checkValueInInterval(index, 0, this.{dart.core::List::length}{dart.core::int}, "index");
       if(index =={dart.core::num::==}{(dart.core::Object) → dart.core::bool} this.{dart.core::List::length}{dart.core::int}) {
         this.{dart.collection::ListMixin::addAll}(iterable){(dart.core::Iterable<dart.core::int*>) → void};
@@ -493,7 +493,7 @@
       }
       this.{dart.collection::ListMixin::setAll}(index, iterable){(dart.core::int, dart.core::Iterable<dart.core::int*>) → void};
     }
-    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setAll(dart.core::int index, generic-covariant-impl dart.core::Iterable<dart.core::int*> iterable) → void {
+    method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setAll(dart.core::int index, covariant-by-class dart.core::Iterable<dart.core::int*> iterable) → void {
       if(iterable is{ForNonNullableByDefault} dart.core::List<dynamic>) {
         this.{dart.collection::ListMixin::setRange}(index, index.{dart.core::num::+}(iterable.{dart.core::Iterable::length}{dart.core::int}){(dart.core::num) → dart.core::int}, iterable){(dart.core::int, dart.core::int, dart.core::Iterable<dart.core::int*>, [dart.core::int]) → void};
       }
@@ -533,7 +533,7 @@
       ;
     operator [](dart.core::int* index) → dart.core::int*
       return index;
-    operator []=(dart.core::int* index, generic-covariant-impl dart.core::int* value) → void
+    operator []=(dart.core::int* index, covariant-by-class dart.core::int* value) → void
       return null;
   }
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
index 5efe877..7f32b12 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
@@ -24,21 +24,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
index a21321e..ea6646e 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
@@ -24,21 +24,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
index ae7eb63..127f040 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
@@ -25,21 +25,21 @@
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
     @#C8
     get x() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set x(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     @#C8
     get y() → dart.core::double*
-      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     set y(dart.core::double* #v) → void
-      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
+      return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
     get next() → dart.ffi::Pointer<lib::Coordinate*>*
-      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
     @#C16
     static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
-      return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
index aed934d..e53139b 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C13
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C13
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -50,26 +50,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
index 4c4686b..c5fa703 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C11
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C11
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -50,26 +50,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
index aed934d..e53139b 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C13
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C13
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -50,26 +50,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
index 4c4686b..c5fa703 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C11
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C11
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -50,26 +50,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
index 5954673..f15273b 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C13
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C13
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///lib2.dart" as lib2 {
@@ -190,26 +190,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C18
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
index c390f66..0b32258 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
       ;
     @#C8
     get y1() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y1(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C11
     get y3() → dart.core::int
-      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C11
     set y3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C8
     get y2() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set y2(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///lib2.dart" as lib2 {
@@ -190,26 +190,26 @@
     get x1() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x1(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     get x2() → lib::Y
       return new lib::Y::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set x2(lib::Y #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     get x3() → dart.core::int
-      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C8
     set x3(dart.core::int #externalFieldValue) → void
-      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
+      return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
     @#C19
     static get #sizeOf() → dart.core::int*
-      return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect
index ec42b23..9a2c561 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect
@@ -37,19 +37,19 @@
     abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
   }
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C14;
     static const field main::CompilationStrategy* direct = #C4;
     static const field main::CompilationStrategy* toKernel = #C7;
     static const field main::CompilationStrategy* toData = #C10;
     static const field main::CompilationStrategy* fromData = #C13;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -70,16 +70,16 @@
 constants  {
   #C1 = dart.core::_Override {}
   #C2 = 0
-  #C3 = "CompilationStrategy.direct"
+  #C3 = "direct"
   #C4 = main::CompilationStrategy {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "CompilationStrategy.toKernel"
+  #C6 = "toKernel"
   #C7 = main::CompilationStrategy {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "CompilationStrategy.toData"
+  #C9 = "toData"
   #C10 = main::CompilationStrategy {index:#C8, _name:#C9}
   #C11 = 3
-  #C12 = "CompilationStrategy.fromData"
+  #C12 = "fromData"
   #C13 = main::CompilationStrategy {index:#C11, _name:#C12}
   #C14 = <main::CompilationStrategy*>[#C4, #C7, #C10, #C13]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect
index 4b4156c..f7c5aab 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect
@@ -37,19 +37,19 @@
     abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
   }
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C14;
     static const field main::CompilationStrategy* direct = #C4;
     static const field main::CompilationStrategy* toKernel = #C7;
     static const field main::CompilationStrategy* toData = #C10;
     static const field main::CompilationStrategy* fromData = #C13;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -70,16 +70,16 @@
 constants  {
   #C1 = dart.core::_Override {}
   #C2 = 0
-  #C3 = "CompilationStrategy.direct"
+  #C3 = "direct"
   #C4 = main::CompilationStrategy {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "CompilationStrategy.toKernel"
+  #C6 = "toKernel"
   #C7 = main::CompilationStrategy {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "CompilationStrategy.toData"
+  #C9 = "toData"
   #C10 = main::CompilationStrategy {index:#C8, _name:#C9}
   #C11 = 3
-  #C12 = "CompilationStrategy.fromData"
+  #C12 = "fromData"
   #C13 = main::CompilationStrategy {index:#C11, _name:#C12}
   #C14 = <main::CompilationStrategy*>[#C4, #C7, #C10, #C13]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect
index de577dd..8d5b971 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect
@@ -30,19 +30,19 @@
     abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
     abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
   }
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C14;
     static const field main::CompilationStrategy* direct = #C4;
     static const field main::CompilationStrategy* toKernel = #C7;
     static const field main::CompilationStrategy* toData = #C10;
     static const field main::CompilationStrategy* fromData = #C13;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -63,16 +63,16 @@
 constants  {
   #C1 = dart.core::_Override {}
   #C2 = 0
-  #C3 = "CompilationStrategy.direct"
+  #C3 = "direct"
   #C4 = main::CompilationStrategy {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "CompilationStrategy.toKernel"
+  #C6 = "toKernel"
   #C7 = main::CompilationStrategy {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "CompilationStrategy.toData"
+  #C9 = "toData"
   #C10 = main::CompilationStrategy {index:#C8, _name:#C9}
   #C11 = 3
-  #C12 = "CompilationStrategy.fromData"
+  #C12 = "fromData"
   #C13 = main::CompilationStrategy {index:#C11, _name:#C12}
   #C14 = <main::CompilationStrategy*>[#C4, #C7, #C10, #C13]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect
index 73cad31..a3acf52 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect
@@ -42,9 +42,7 @@
     }
   }
   @#C1
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C15;
     @#C1
     static const field main::CompilationStrategy* direct = #C5;
@@ -54,11 +52,13 @@
     static const field main::CompilationStrategy* toData = #C11;
     @#C1
     static const field main::CompilationStrategy* fromData = #C14;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -82,16 +82,16 @@
   #C1 = "hello"
   #C2 = dart.core::_Override {}
   #C3 = 0
-  #C4 = "CompilationStrategy.direct"
+  #C4 = "direct"
   #C5 = main::CompilationStrategy {index:#C3, _name:#C4}
   #C6 = 1
-  #C7 = "CompilationStrategy.toKernel"
+  #C7 = "toKernel"
   #C8 = main::CompilationStrategy {index:#C6, _name:#C7}
   #C9 = 2
-  #C10 = "CompilationStrategy.toData"
+  #C10 = "toData"
   #C11 = main::CompilationStrategy {index:#C9, _name:#C10}
   #C12 = 3
-  #C13 = "CompilationStrategy.fromData"
+  #C13 = "fromData"
   #C14 = main::CompilationStrategy {index:#C12, _name:#C13}
   #C15 = <main::CompilationStrategy*>[#C5, #C8, #C11, #C14]
 }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect
index 73cad31..a3acf52 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect
@@ -42,9 +42,7 @@
     }
   }
   @#C1
-  class CompilationStrategy extends dart.core::Object implements dart.core::Enum /*isEnum*/  {
-    final field dart.core::int* index;
-    final field dart.core::String* _name;
+  class CompilationStrategy extends dart.core::_Enum /*isEnum*/  {
     static const field dart.core::List<main::CompilationStrategy*>* values = #C15;
     @#C1
     static const field main::CompilationStrategy* direct = #C5;
@@ -54,11 +52,13 @@
     static const field main::CompilationStrategy* toData = #C11;
     @#C1
     static const field main::CompilationStrategy* fromData = #C14;
-    const constructor •(dart.core::int* index, dart.core::String* _name) → main::CompilationStrategy*
-      : main::CompilationStrategy::index = index, main::CompilationStrategy::_name = _name, super dart.core::Object::•()
+    const constructor •(dart.core::int* index, dart.core::String* name) → main::CompilationStrategy*
+      : super dart.core::_Enum::•(index, name)
       ;
     method toString() → dart.core::String*
-      return this.{main::CompilationStrategy::_name}{dart.core::String*};
+      return "CompilationStrategy.${this.{dart.core::_Enum::_name}{dart.core::String}}";
+    abstract member-signature get index() → dart.core::int*; -> dart.core::_Enum::index
+    abstract member-signature get _name() → dart.core::String*; -> dart.core::_Enum::_name
     abstract member-signature get _identityHashCode() → dart.core::int*; -> dart.core::Object::_identityHashCode
     abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*; -> dart.core::Object::_instanceOf
     abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*; -> dart.core::Object::_simpleInstanceOf
@@ -82,16 +82,16 @@
   #C1 = "hello"
   #C2 = dart.core::_Override {}
   #C3 = 0
-  #C4 = "CompilationStrategy.direct"
+  #C4 = "direct"
   #C5 = main::CompilationStrategy {index:#C3, _name:#C4}
   #C6 = 1
-  #C7 = "CompilationStrategy.toKernel"
+  #C7 = "toKernel"
   #C8 = main::CompilationStrategy {index:#C6, _name:#C7}
   #C9 = 2
-  #C10 = "CompilationStrategy.toData"
+  #C10 = "toData"
   #C11 = main::CompilationStrategy {index:#C9, _name:#C10}
   #C12 = 3
-  #C13 = "CompilationStrategy.fromData"
+  #C13 = "fromData"
   #C14 = main::CompilationStrategy {index:#C12, _name:#C13}
   #C15 = <main::CompilationStrategy*>[#C5, #C8, #C11, #C14]
 }
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
index c74d240..ef8614b 100644
--- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
@@ -12,14 +12,14 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
-      return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set lpVtbl(dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
       return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::IntPtrPointer|get#value(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}));
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -38,13 +38,13 @@
     get xx() → lib::COMObject
       return new lib::COMObject::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set xx(lib::COMObject #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
index c74d240..ef8614b 100644
--- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
@@ -12,14 +12,14 @@
       : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
       ;
     get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
-      return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
+      return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
     set lpVtbl(dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
-      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
+      return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
     get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
       return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::IntPtrPointer|get#value(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}));
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 library from "org-dartlang-test:///main.dart" as main {
@@ -38,13 +38,13 @@
     get xx() → lib::COMObject
       return new lib::COMObject::#fromTypedDataBase( block {
         dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
-        dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
-      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
+        dart.core::int #offset = #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
     set xx(lib::COMObject #externalFieldValue) → void
-      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
+      return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
     @#C10
     static get #sizeOf() → dart.core::int*
-      return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+      return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
   }
 }
 constants  {
diff --git a/pkg/front_end/testcases/incremental/regress_46706.yaml b/pkg/front_end/testcases/incremental/regress_46706.yaml
new file mode 100644
index 0000000..3d5be72
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706.yaml
@@ -0,0 +1,38 @@
+# 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.md file.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    errors: true
+    sources:
+      main.dart: |
+        import 'lib.dart';
+        part 'part.dart';
+        void main() {}
+      part.dart: |
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        import 'part.dart';
+        import 'part.dart';
+        import 'part.dart';
+        void libMethod() {
+          partMethod();
+        }
+    expectedLibraryCount: 2
+  - entry: main.dart
+    invalidate:
+      - lib.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+        part 'part.dart';
+        void main() {}
+      part.dart: |
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        void libMethod() {}
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/regress_46706.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46706.yaml.world.1.expect
new file mode 100644
index 0000000..9d57f2f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706.yaml.world.1.expect
@@ -0,0 +1,37 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib.dart:1:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+// org-dartlang-test:///lib.dart:2:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+// org-dartlang-test:///lib.dart:3:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+
+  import "org-dartlang-test:///main.dart";
+  import "org-dartlang-test:///main.dart";
+  import "org-dartlang-test:///main.dart";
+
+  static method libMethod() → void {
+    main::partMethod();
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart";
+
+  part part.dart;
+  static method main() → void {}
+  static method /* from org-dartlang-test:///part.dart */ partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46706.yaml.world.2.expect
new file mode 100644
index 0000000..0c51b9c
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706.yaml.world.2.expect
@@ -0,0 +1,13 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  static method libMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart";
+
+  part part.dart;
+  static method main() → void {}
+  static method /* from org-dartlang-test:///part.dart */ partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime.yaml b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml
new file mode 100644
index 0000000..80c029a
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml
@@ -0,0 +1,41 @@
+# 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.md file.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    errors: true
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        part 'part.dart';
+        void main() {
+          lib.partMethod();
+        }
+      part.dart: |
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        export 'part.dart';
+        export 'part.dart';
+        export 'part.dart';
+        void libMethod() {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    invalidate:
+      - lib.dart
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        part 'part.dart';
+        void main() {
+          lib.partMethod();
+        }
+      part.dart: |
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        void libMethod() {}
+        void partMethod() {}
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.1.expect
new file mode 100644
index 0000000..b971e1b
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.1.expect
@@ -0,0 +1,39 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib.dart:1:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+// org-dartlang-test:///lib.dart:2:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+// org-dartlang-test:///lib.dart:3:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+additionalExports = (main::main,
+  main::partMethod)
+
+  export "org-dartlang-test:///main.dart";
+  export "org-dartlang-test:///main.dart";
+  export "org-dartlang-test:///main.dart";
+
+  static method libMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  part part.dart;
+  static method main() → void {
+    main::partMethod();
+  }
+  static method /* from org-dartlang-test:///part.dart */ partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.2.expect
new file mode 100644
index 0000000..fafd095
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime.yaml.world.2.expect
@@ -0,0 +1,16 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  static method libMethod() → void {}
+  static method partMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  part part.dart;
+  static method main() → void {
+    lib::partMethod();
+  }
+  static method /* from org-dartlang-test:///part.dart */ partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml
new file mode 100644
index 0000000..868016e
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml
@@ -0,0 +1,32 @@
+# 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.md file.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    errors: true
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        void main() {}
+      part.dart: |
+        // Notice that main.dart didn't claim this as a part!
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        import 'part.dart';
+        import 'part.dart';
+        import 'part.dart';
+        void libMethod() {}
+    expectedLibraryCount: 3
+  - entry: main.dart
+    invalidate:
+      - lib.dart
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        void main() {}
+      lib.dart: |
+        void libMethod() {}
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.1.expect
new file mode 100644
index 0000000..bf95242
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.1.expect
@@ -0,0 +1,45 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib.dart:1:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+// org-dartlang-test:///lib.dart:2:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+// org-dartlang-test:///lib.dart:3:1: Error: Can't import 'org-dartlang-test:///part.dart', because it has a 'part of' declaration.
+// Try removing the 'part of' declaration, or using 'org-dartlang-test:///part.dart' as a part.
+// import 'part.dart';
+// ^
+//
+
+  import "org-dartlang-test:///part.dart";
+  import "org-dartlang-test:///part.dart";
+  import "org-dartlang-test:///part.dart";
+
+  static method libMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  static method main() → void {}
+}
+library from "org-dartlang-test:///part.dart" as part {
+//
+// Problems in library:
+//
+// org-dartlang-test:///part.dart:1:1: Error: This part doesn't have a containing library.
+// Try removing the 'part of' declaration.
+// // Notice that main.dart didn't claim this as a part!
+// ^
+//
+
+  static method partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.2.expect
new file mode 100644
index 0000000..b4dd167
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_2.yaml.world.2.expect
@@ -0,0 +1,11 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  static method libMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  static method main() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml
new file mode 100644
index 0000000..9bf8612
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml
@@ -0,0 +1,37 @@
+# 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.md file.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    errors: true
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        void main() {
+          lib.partMethod();
+        }
+      part.dart: |
+        // Notice that main.dart didn't claim this as a part!
+        part of "main.dart";
+        void partMethod() {}
+      lib.dart: |
+        export 'part.dart';
+        export 'part.dart';
+        export 'part.dart';
+        void libMethod() {}
+    expectedLibraryCount: 3
+  - entry: main.dart
+    invalidate:
+      - lib.dart
+    sources:
+      main.dart: |
+        import 'lib.dart' as lib;
+        void main() {
+          lib.partMethod();
+        }
+      lib.dart: |
+        void libMethod() {}
+        void partMethod() {}
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.1.expect
new file mode 100644
index 0000000..c2db276
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.1.expect
@@ -0,0 +1,48 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib.dart:1:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+// org-dartlang-test:///lib.dart:2:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+// org-dartlang-test:///lib.dart:3:1: Error: Can't export this file because it contains a 'part of' declaration.
+// export 'part.dart';
+// ^^^^^^
+// org-dartlang-test:///part.dart: Context: This is the file that can't be exported.
+//
+additionalExports = (part::partMethod)
+
+  export "org-dartlang-test:///part.dart";
+  export "org-dartlang-test:///part.dart";
+  export "org-dartlang-test:///part.dart";
+
+  static method libMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  static method main() → void {
+    part::partMethod();
+  }
+}
+library from "org-dartlang-test:///part.dart" as part {
+//
+// Problems in library:
+//
+// org-dartlang-test:///part.dart:1:1: Error: This part doesn't have a containing library.
+// Try removing the 'part of' declaration.
+// // Notice that main.dart didn't claim this as a part!
+// ^
+//
+
+  static method partMethod() → void {}
+}
diff --git a/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.2.expect
new file mode 100644
index 0000000..7818b5b
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/regress_46706_prime_3.yaml.world.2.expect
@@ -0,0 +1,14 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  static method libMethod() → void {}
+  static method partMethod() → void {}
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart" as lib;
+
+  static method main() → void {
+    lib::partMethod();
+  }
+}
diff --git a/pkg/front_end/testcases/inference/async_await.dart.weak.expect b/pkg/front_end/testcases/inference/async_await.dart.weak.expect
index 3505342..3d172fc 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.weak.expect
@@ -23,7 +23,7 @@
   abstract member-signature method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<core::int*>*; -> asy::Future::catchError
   abstract member-signature method whenComplete(() →* FutureOr<void>* action) → asy::Future<core::int*>*; -> asy::Future::whenComplete
   abstract member-signature method asStream() → asy::Stream<core::int*>*; -> asy::Future::asStream
-  abstract member-signature method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<core::int*>* onTimeout = #C1}) → asy::Future<core::int*>*; -> asy::Future::timeout
+  abstract member-signature method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<core::int*>* onTimeout = #C1}) → asy::Future<core::int*>*; -> asy::Future::timeout
 }
 static method test() → void async {
   core::int* x0;
diff --git a/pkg/front_end/testcases/inference/async_await.dart.weak.outline.expect b/pkg/front_end/testcases/inference/async_await.dart.weak.outline.expect
index f148d78..e82fc2c 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.weak.outline.expect
@@ -22,7 +22,7 @@
   abstract member-signature method catchError(core::Function* onError, {(core::Object*) →* core::bool* test}) → asy::Future<core::int*>*; -> asy::Future::catchError
   abstract member-signature method whenComplete(() →* FutureOr<void>* action) → asy::Future<core::int*>*; -> asy::Future::whenComplete
   abstract member-signature method asStream() → asy::Stream<core::int*>*; -> asy::Future::asStream
-  abstract member-signature method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<core::int*>* onTimeout}) → asy::Future<core::int*>*; -> asy::Future::timeout
+  abstract member-signature method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<core::int*>* onTimeout}) → asy::Future<core::int*>*; -> asy::Future::timeout
 }
 static method test() → void async 
   ;
diff --git a/pkg/front_end/testcases/inference/async_await.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/async_await.dart.weak.transformed.expect
index d27df25..919ede4 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.weak.transformed.expect
@@ -24,7 +24,7 @@
   abstract member-signature method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<core::int*>*; -> asy::Future::catchError
   abstract member-signature method whenComplete(() →* FutureOr<void>* action) → asy::Future<core::int*>*; -> asy::Future::whenComplete
   abstract member-signature method asStream() → asy::Stream<core::int*>*; -> asy::Future::asStream
-  abstract member-signature method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<core::int*>* onTimeout = #C1}) → asy::Future<core::int*>*; -> asy::Future::timeout
+  abstract member-signature method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<core::int*>* onTimeout = #C1}) → asy::Future<core::int*>*; -> asy::Future::timeout
 }
 static method test() → void /* originally async */ {
   final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>();
diff --git a/pkg/front_end/testcases/inference/bug30624.dart b/pkg/front_end/testcases/inference/bug30624.dart
index c074277..341d1e5 100644
--- a/pkg/front_end/testcases/inference/bug30624.dart
+++ b/pkg/front_end/testcases/inference/bug30624.dart
@@ -9,21 +9,21 @@
 
 class C<E> {
   void barA([int cmp(E a, E b)]) {
-    /*@ typeArgs=C::E* */ foo(this, cmp /*@target=Object.==*/ ?? _default);
+    /*@ typeArgs=C::E* */ foo(this, cmp  ?? _default);
   }
 
   void barB([int cmp(E a, E b)]) {
     /*@ typeArgs=C::E* */ foo(
-        this, cmp /*@target=Object.==*/ ?? (_default as int Function(E, E)));
+        this, cmp  ?? (_default as int Function(E, E)));
   }
 
   void barC([int cmp(E a, E b)]) {
     int Function(E, E) v = _default;
-    /*@ typeArgs=C::E* */ foo(this, cmp /*@target=Object.==*/ ?? v);
+    /*@ typeArgs=C::E* */ foo(this, cmp  ?? v);
   }
 
   void barD([int cmp(E a, E b)]) {
-    foo<E>(this, cmp /*@target=Object.==*/ ?? _default);
+    foo<E>(this, cmp  ?? _default);
   }
 
   void barE([int cmp(E a, E b)]) {
diff --git a/pkg/front_end/testcases/inference/bug30624.dart.weak.expect b/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
index d66aab0b..630409a 100644
--- a/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
@@ -10,7 +10,7 @@
     self::foo<self::C::E*>(this, let final (self::C::E*, self::C::E*) →* core::int* #t1 = cmp in #t1 == null ?{(self::C::E*, self::C::E*) →* core::int*} #C2 : #t1);
   }
   method barB([(self::C::E*, self::C::E*) →* core::int* cmp = #C1]) → void {
-    self::foo<self::C::E*>(this, let final (self::C::E*, self::C::E*) →* core::int* #t2 = cmp in #t2 == null ?{(self::C::E*, self::C::E*) →* core::int*} (#C2) as (self::C::E*, self::C::E*) →* core::int* : #t2);
+    self::foo<self::C::E*>(this, let final (self::C::E*, self::C::E*) →* core::int* #t2 = cmp in #t2 == null ?{(self::C::E*, self::C::E*) →* core::int*} #C2 as (self::C::E*, self::C::E*) →* core::int* : #t2);
   }
   method barC([(self::C::E*, self::C::E*) →* core::int* cmp = #C1]) → void {
     (self::C::E*, self::C::E*) →* core::int* v = #C2;
diff --git a/pkg/front_end/testcases/inference/bug32291.dart b/pkg/front_end/testcases/inference/bug32291.dart
index c71cdb6..782a12c 100644
--- a/pkg/front_end/testcases/inference/bug32291.dart
+++ b/pkg/front_end/testcases/inference/bug32291.dart
@@ -12,7 +12,7 @@
   var /*@ type=Iterable<List<String*>*>* */ i1 =
       l. /*@target=Iterable.map*/ /*@ typeArgs=List<String*>* */ map(
           /*@ returnType=List<String*>* */ (/*@ type=List<String*>* */ ll) =>
-              ll /*@target=List.==*/ ?? /*@ typeArgs=String* */ []);
+              ll ?? /*@ typeArgs=String* */ []);
   var /*@ type=Iterable<int*>* */ i2 =
       i1. /*@target=Iterable.map*/ /*@ typeArgs=int* */ map(
           /*@ returnType=int* */ (List<String> l) =>
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.expect
index 4b28fa6..36688cc 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P*>*
     : super core::Object::•()
     ;
-  method call([generic-covariant-impl self::ActionDispatcher::P* value = #C1]) → void {}
+  method call([covariant-by-class self::ActionDispatcher::P* value = #C1]) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
index e16e799..79e8640 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class ActionDispatcher<P extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P*>*
     ;
-  method call([generic-covariant-impl self::ActionDispatcher::P* value]) → void
+  method call([covariant-by-class self::ActionDispatcher::P* value]) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.transformed.expect
index 4b28fa6..36688cc 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P*>*
     : super core::Object::•()
     ;
-  method call([generic-covariant-impl self::ActionDispatcher::P* value = #C1]) → void {}
+  method call([covariant-by-class self::ActionDispatcher::P* value = #C1]) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.expect
index fb5b0b4..1797fc0 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.outline.expect
index 64cfd71..887879c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.transformed.expect
index fb5b0b4..1797fc0 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.expect
index 92bc857..32c7a0d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor _() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.outline.expect
index 61a4ffe..6553bf2 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor _() → self::C<self::C::T*>*
     ;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.transformed.expect
index 92bc857..32c7a0d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor _() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.expect
index 36785af..ba0e34d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A<self::A::T*>* f = new self::A::•<self::A::T*>();
+  covariant-by-class field self::A<self::A::T*>* f = new self::A::•<self::A::T*>();
   constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.outline.expect
index 70adc28..72615ce 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A<self::A::T*>* f;
+  covariant-by-class field self::A<self::A::T*>* f;
   constructor •() → self::A<self::A::T*>*
     ;
   static factory factory<T extends core::Object* = dynamic>() → self::A<self::A::factory::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.transformed.expect
index 36785af..ba0e34d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A<self::A::T*>* f = new self::A::•<self::A::T*>();
+  covariant-by-class field self::A<self::A::T*>* f = new self::A::•<self::A::T*>();
   constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.expect
index a4ae7f6..adf0647 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor named(core::List<self::C::T*>* t) → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.outline.expect
index 21710da..20b7987 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor named(core::List<self::C::T*>* t) → self::C<self::C::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.transformed.expect
index d74aad4..dda1a71 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor named(core::List<self::C::T*>* t) → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.expect
index 5fb66da..c030443 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.outline.expect
index 87cc4a8..42a6d2b 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •() → self::C<self::C::T*>*
     ;
   static factory named<T extends core::Object* = dynamic>(self::C::named::T* t) → self::C<self::C::named::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.transformed.expect
index 5fb66da..c030443 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t = null;
+  covariant-by-class field self::C::T* t = null;
   constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.expect
index 048cb94..b9202f7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.outline.expect
index cb1c5d9..0424549 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     ;
   constructor named(core::List<self::C::T*>* t) → self::C<self::C::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.transformed.expect
index 832cd3f..f41db2a 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.expect
index e347a7d..ec2714c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return new self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor •(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.outline.expect
index 1056c97..a882ba7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return new self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor •(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.transformed.expect
index e347a7d..ec2714c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return new self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor •(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.expect
index 2f9257b..cf8581d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor _(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.outline.expect
index 6eaaeb2..f2e7522 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor _(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     ;
   static factory •<T extends core::Object* = dynamic>(self::CImpl::•::T* t) → self::CImpl<self::CImpl::•::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.transformed.expect
index 2f9257b..cf8581d 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 abstract class C<T extends core::Object* = dynamic> extends core::Object {
   static final field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T*;
-  abstract set t(generic-covariant-impl self::C::T* x) → void;
+  abstract set t(covariant-by-class self::C::T* x) → void;
   static factory •<T extends core::Object* = dynamic>(self::C::•::T* t) → self::C<self::C::•::T*>*
     return self::CImpl::•<self::C::•::T*>(t);
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -20,7 +20,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class CImpl<T extends core::Object* = dynamic> extends core::Object implements self::C<self::CImpl::T*> {
-  generic-covariant-impl field self::CImpl::T* t;
+  covariant-by-class field self::CImpl::T* t;
   constructor _(self::CImpl::T* t) → self::CImpl<self::CImpl::T*>*
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.expect
index 4793404..5ef8772 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.expect
@@ -39,8 +39,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Pair<T extends self::Cloneable<self::Pair::T*>* = self::Cloneable<dynamic>*, U extends self::Cloneable<self::Pair::U*>* = self::Cloneable<dynamic>*> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.outline.expect
index fd4e681..e628b1f 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.outline.expect
@@ -17,8 +17,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Pair<T extends self::Cloneable<self::Pair::T*>* = self::Cloneable<dynamic>*, U extends self::Cloneable<self::Pair::U*>* = self::Cloneable<dynamic>*> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     ;
   constructor _() → self::Pair<self::Pair::T*, self::Pair::U*>*
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.transformed.expect
index 4793404..5ef8772 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.weak.transformed.expect
@@ -39,8 +39,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class Pair<T extends self::Cloneable<self::Pair::T*>* = self::Cloneable<dynamic>*, U extends self::Cloneable<self::Pair::U*>* = self::Cloneable<dynamic>*> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.expect
index 2fddef8..f36fcca 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object* = dynamic, U extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.outline.expect
index 600f065..cc30784 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object* = dynamic, U extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     ;
   get reversed() → self::Pair<self::Pair::U*, self::Pair::T*>*
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.transformed.expect
index 2fddef8..f36fcca 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.weak.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object* = dynamic, U extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::Pair::T* t;
-  generic-covariant-impl field self::Pair::U* u;
+  covariant-by-class field self::Pair::T* t;
+  covariant-by-class field self::Pair::U* u;
   constructor •(self::Pair::T* t, self::Pair::U* u) → self::Pair<self::Pair::T*, self::Pair::U*>*
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.expect b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.expect
index 012a172..9ecd2a9 100644
--- a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.expect
@@ -4,7 +4,7 @@
 
 typedef Function2<contravariant S extends core::Object* = dynamic, T extends core::Object* = dynamic> = (S*) →* T*;
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field (self::A::T*) →* self::A::T* x;
+  covariant-by-class field (self::A::T*) →* self::A::T* x;
   constructor •((self::A::T*) →* self::A::T* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.outline.expect
index a35ee68..a40472f 100644
--- a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.outline.expect
@@ -4,7 +4,7 @@
 
 typedef Function2<contravariant S extends core::Object* = dynamic, T extends core::Object* = dynamic> = (S*) →* T*;
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field (self::A::T*) →* self::A::T* x;
+  covariant-by-class field (self::A::T*) →* self::A::T* x;
   constructor •((self::A::T*) →* self::A::T* x) → self::A<self::A::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.transformed.expect
index 541ab60..d687121 100644
--- a/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/downward_inference_miscellaneous.dart.weak.transformed.expect
@@ -4,7 +4,7 @@
 
 typedef Function2<contravariant S extends core::Object* = dynamic, T extends core::Object* = dynamic> = (S*) →* T*;
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field (self::A::T*) →* self::A::T* x;
+  covariant-by-class field (self::A::T*) →* self::A::T* x;
   constructor •((self::A::T*) →* self::A::T* x) → self::A<self::A::T*>*
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.expect
index 0887aa4..e2d0f6d 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.expect
@@ -16,9 +16,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -39,9 +39,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.outline.expect
index 9f2d3d5..8b72842 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.outline.expect
@@ -16,9 +16,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -39,9 +39,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.transformed.expect
index 58aee22..acaf1c5 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.weak.transformed.expect
@@ -17,9 +17,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -40,9 +40,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.expect
index f92f047..ef65173 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.expect
@@ -122,8 +122,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::S* x;
-  generic-covariant-impl field self::A::T* y;
+  covariant-by-class field self::A::S* x;
+  covariant-by-class field self::A::T* y;
   constructor •(self::A::S* x, self::A::T* y) → self::A<self::A::S*, self::A::T*>*
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
index 96e5702..6b90f7f 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::S* x;
-  generic-covariant-impl field self::A::T* y;
+  covariant-by-class field self::A::S* x;
+  covariant-by-class field self::A::T* y;
   constructor •(self::A::S* x, self::A::T* y) → self::A<self::A::S*, self::A::T*>*
     ;
   constructor named(self::A::S* x, self::A::T* y) → self::A<self::A::S*, self::A::T*>*
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.transformed.expect
index 4e5791d..82fa878 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.weak.transformed.expect
@@ -122,8 +122,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object* = dynamic, T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::S* x;
-  generic-covariant-impl field self::A::T* y;
+  covariant-by-class field self::A::S* x;
+  covariant-by-class field self::A::T* y;
   constructor •(self::A::S* x, self::A::T* y) → self::A<self::A::S*, self::A::T*>*
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.expect b/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.expect
index 2126542..ab58333 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.expect
@@ -75,7 +75,7 @@
 import self as self;
 import "dart:core" as core;
 
-static method foo([core::Map<core::int*, core::String*>* m1 = #C4, core::Map<core::int*, core::String*>* m2 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart:12:79: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+static method foo([core::Map<core::int*, core::String*>* m1 = #C3, core::Map<core::int*, core::String*>* m2 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart:12:79: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
       /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE,error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/ \"hello\":
                                                                               ^"]) → void {}
 static method test() → void {
@@ -157,6 +157,5 @@
 constants  {
   #C1 = 1
   #C2 = "hello"
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C3}
+  #C3 = <core::int*, core::String*>{#C1:#C2)
 }
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.transformed.expect
index 2126542..ab58333 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart.weak.transformed.expect
@@ -75,7 +75,7 @@
 import self as self;
 import "dart:core" as core;
 
-static method foo([core::Map<core::int*, core::String*>* m1 = #C4, core::Map<core::int*, core::String*>* m2 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart:12:79: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+static method foo([core::Map<core::int*, core::String*>* m1 = #C3, core::Map<core::int*, core::String*>* m2 = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_on_map_literals.dart:12:79: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
       /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE,error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/ \"hello\":
                                                                               ^"]) → void {}
 static method test() → void {
@@ -157,6 +157,5 @@
 constants  {
   #C1 = 1
   #C2 = "hello"
-  #C3 = <dynamic>[#C1, #C2]
-  #C4 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C3}
+  #C3 = <core::int*, core::String*>{#C1:#C2)
 }
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.expect
index 6c7b42a..5951999 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.expect
@@ -43,9 +43,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -66,9 +66,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.outline.expect
index fa0d3a1..b893e24 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.outline.expect
@@ -16,9 +16,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -39,9 +39,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.transformed.expect
index da9eb92..2c8befb 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.weak.transformed.expect
@@ -43,9 +43,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -66,9 +66,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/future_then.dart.weak.expect b/pkg/front_end/testcases/inference/future_then.dart.weak.expect
index 43b73f6..3472083 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
index 29a6f55..1e5bf1d 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then.dart.weak.transformed.expect
index fb0fe5f..ab96b76 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_2.dart.weak.expect
index 251ec40..caba7e5 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
index 36ab6a8..65c689a 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_2.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_2.dart.weak.transformed.expect
index 4713e78..bffba5e 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_3.dart.weak.expect
index 7eca3d0..1efc406 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
index e35da6b..dec6dfa 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_3.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_3.dart.weak.transformed.expect
index 525da31..37463d1 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_4.dart.weak.expect
index 37e0e62..eaff2a5 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
index 5908716..716cde4 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_4.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_4.dart.weak.transformed.expect
index 2f0c903..90f1db4 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_5.dart.weak.expect
index 1917e07..955cbb3 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
index b699b6c..b9060d8 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_5.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_5.dart.weak.transformed.expect
index c03423b..39baeba 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_6.dart.weak.expect
index fa683c126..438bfac 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
index d9c4871..f7c82fa 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_6.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_6.dart.weak.transformed.expect
index ab76385..6a2855eb 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -214,9 +214,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.expect
index 484270e..816b3ee 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
index cfacce7..3a661d0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.transformed.expect
index 2c0fd45..204dbee 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.expect
index 5052927..11b74949 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
index 7eb99be..68bc085 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_2.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.transformed.expect
index ada0903..608046f 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.expect
index 01ac303..11b63b1 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
index 3b812af..bb3f357 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_3.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.transformed.expect
index 057adde..e32c9fb 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.expect
index 9f0633d..cc3ada3 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
index 2d775ff..c9869bc 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_4.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.transformed.expect
index fd4b819..02b3b6b 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.expect
index 41958f4..83acf25 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
index 3026114..c2dff99 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_5.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.transformed.expect
index 6e05707..e0176fc 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.expect
index 8446ce804..0c2809d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
index cd341f3..4bf3e0c 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_conditional_6.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.transformed.expect
index 1968cbf..9fb5822 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -113,9 +113,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart b/pkg/front_end/testcases/inference/future_then_ifNull.dart
index e3927d5..5b67f07 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart
@@ -18,20 +18,18 @@
   MyFuture<int> f;
   Future<int> t1 = f. /*@ typeArgs=int* */ /*@target=MyFuture.then*/ then(
       /*@ returnType=Future<int*>* */ (/*@ type=int* */ x) async =>
-          x /*@target=num.==*/ ?? await new Future<int>.value(3));
+          x ?? await new Future<int>.value(3));
   Future<int> t2 = f. /*@ typeArgs=int* */ /*@target=MyFuture.then*/ then(
       /*@returnType=FutureOr<int*>**/ (/*@ type=int* */ x) async {
-    return /*info:DOWN_CAST_COMPOSITE*/ await x /*@target=num.==*/ ??
-        new Future<int>.value(3);
+    return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future<int>.value(3);
   });
   Future<int> t5 = f. /*@ typeArgs=int* */ /*@target=MyFuture.then*/ then(
       /*error:INVALID_CAST_FUNCTION_EXPR*/
       /*@ returnType=FutureOr<int*>* */ (/*@ type=int* */ x) =>
-          x /*@target=num.==*/ ?? new Future<int>.value(3));
+          x ?? new Future<int>.value(3));
   Future<int> t6 = f. /*@ typeArgs=int* */ /*@target=MyFuture.then*/ then(
       /*@ returnType=FutureOr<int*>* */ (/*@ type=int* */ x) {
-    return /*info:DOWN_CAST_COMPOSITE*/ x /*@target=num.==*/ ??
-        new Future<int>.value(3);
+    return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future<int>.value(3);
   });
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.expect
index da7400e..39e82e2 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -51,9 +51,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
index ffd3fdd..3719c43 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_ifNull.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.transformed.expect
index 077bfa1..bf8be62 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.weak.transformed.expect
@@ -27,10 +27,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -114,9 +114,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.expect
index b63576e..ac37ff3 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.expect
@@ -35,10 +35,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
index 64672a6..0838a5b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.transformed.expect
index 8b4ba4e..2303412 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.weak.transformed.expect
@@ -35,10 +35,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void {
@@ -59,9 +59,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.expect
index 0804da7..e071ff7 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.expect
@@ -34,10 +34,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void {
@@ -57,9 +57,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
index cc0154e..244190b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void
@@ -44,11 +44,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_2.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.transformed.expect
index 88d7620..085b108 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.weak.transformed.expect
@@ -34,10 +34,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method main() → void {
@@ -57,9 +57,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.expect
index 4fe0984..c45ca17 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.expect
@@ -34,10 +34,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -58,9 +58,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
index 0108d81..0096c45 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void
@@ -46,11 +46,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_then_upwards_3.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.transformed.expect
index 9fc4067..9c5d495 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.weak.transformed.expect
@@ -34,10 +34,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method test() → void {
@@ -58,9 +58,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.expect
index aacd7bb..dcdc4a1 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* async {
@@ -49,9 +49,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
index 2a73d70..45d1408 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* async 
@@ -48,11 +48,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.transformed.expect
index 57fa2ef..2dc93c6 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.weak.transformed.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* /* originally async */ {
@@ -122,9 +122,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.expect
index dbfb2e6..1c0791d 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* async {
@@ -49,9 +49,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
index 547c415..6e0c9a1 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* async 
@@ -48,11 +48,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_async_conditional_2.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.transformed.expect
index 64fb6a3..e56689e 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.weak.transformed.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static method g1(core::bool* x) → asy::Future<core::int*>* /* originally async */ {
@@ -122,9 +122,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.expect
index 93b6668..ccef45f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.expect
@@ -33,10 +33,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -58,9 +58,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
index 2a918af..53ccca1 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -49,11 +49,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.transformed.expect
index ad8c05c..3145f91 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.weak.transformed.expect
@@ -33,10 +33,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -106,9 +106,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.expect
index 10efb8a..09bd9c2 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -49,9 +49,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
index cf32cfb..f4f33bc 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -49,11 +49,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_2.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.transformed.expect
index d88b25c..0bdd40c 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.weak.transformed.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field self::MyFuture<dynamic>* f;
@@ -97,9 +97,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.expect
index f9bf75b..36b2fa5 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.expect
@@ -33,10 +33,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -58,9 +58,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
index e4e19d0..cd98612 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -49,11 +49,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_3.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.transformed.expect
index 0aabd95..925b980 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.weak.transformed.expect
@@ -33,10 +33,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -106,9 +106,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.expect
index 4ab8890..5ecc3e7 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::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}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -49,9 +49,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
index 7a5d3d7..57e4893 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.outline.expect
@@ -29,7 +29,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -49,11 +49,11 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> SymbolConstant(#test)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> SymbolConstant(#whenComplete)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> SymbolConstant(#asStream)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> SymbolConstant(#timeout)
 Evaluated: ListLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///future_union_downwards_4.dart:10:7 -> SymbolConstant(#onTimeout)
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.transformed.expect
index efad60a..e0915b4 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.weak.transformed.expect
@@ -26,10 +26,10 @@
   no-such-method-forwarder method catchError(core::Function* onError, {(core::Object*) →* core::bool* test = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method whenComplete(() →* FutureOr<void>* action) → asy::Future<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
   no-such-method-forwarder method asStream() → asy::Stream<self::MyFuture::T*>*
-    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
-  no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
+    return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, #C8, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Stream<self::MyFuture::T*>*;
+  no-such-method-forwarder method timeout(core::Duration* timeLimit, {covariant-by-class () →* FutureOr<self::MyFuture::T*>* onTimeout = #C1}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onTimeout}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
 static field asy::Future<dynamic>* f;
@@ -97,9 +97,9 @@
   #C3 = <core::Type*>[]
   #C4 = #test
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #asStream
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #asStream
+  #C8 = <dynamic>[]
   #C9 = #timeout
   #C10 = #onTimeout
 }
diff --git a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
index 94fc7a3..421c4af 100644
--- a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
@@ -6,7 +6,7 @@
   return null;
 static method main() → dynamic {
   core::String* x = self::f<core::int*, core::String*>(42);
-  core::String* y = (#C1)<core::int*, core::String*>(42){(core::int*) →* core::String*};
+  core::String* y = #C1<core::int*, core::String*>(42){(core::int*) →* core::String*};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
index 94fc7a3..421c4af 100644
--- a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   return null;
 static method main() → dynamic {
   core::String* x = self::f<core::int*, core::String*>(42);
-  core::String* y = (#C1)<core::int*, core::String*>(42){(core::int*) →* core::String*};
+  core::String* y = #C1<core::int*, core::String*>(42){(core::int*) →* core::String*};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.expect
index fc573b1..3871d0a 100644
--- a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.expect
@@ -15,7 +15,7 @@
   synthetic constructor •() → self::Foo<self::Foo::T*>*
     : super core::Object::•()
     ;
-  method method<generic-covariant-impl U extends self::Foo::T*>(self::Foo::method::U* u) → self::Foo::method::U*
+  method method<covariant-by-class U extends self::Foo::T*>(self::Foo::method::U* u) → self::Foo::method::U*
     return u;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.outline.expect b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.outline.expect
index 981c3c1..0542c0b 100644
--- a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Foo<T extends core::Pattern*> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::T*>*
     ;
-  method method<generic-covariant-impl U extends self::Foo::T*>(self::Foo::method::U* u) → self::Foo::method::U*
+  method method<covariant-by-class U extends self::Foo::T*>(self::Foo::method::U* u) → self::Foo::method::U*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
index 1474987..937b216 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
@@ -113,15 +113,15 @@
   self::takeDDN(#C3);
   self::takeIIO(#C2);
   self::takeDDO(#C3);
-  self::takeOOI((#C5) as{TypeError} (core::Object*, core::Object*) →* core::int*);
+  self::takeOOI(#C5 as{TypeError} (core::Object*, core::Object*) →* core::int*);
   self::takeIDI(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:28:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
       /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
-                                                                        ^" in (#C4) as{TypeError} (core::double*, core::int*) →* core::int*);
+                                                                        ^" in #C4 as{TypeError} (core::double*, core::int*) →* core::int*);
   self::takeDID(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:30:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
       /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
-                                                                        ^" in (#C4) as{TypeError} (core::int*, core::double*) →* core::double*);
-  self::takeOON((#C5) as{TypeError} (core::Object*, core::Object*) →* core::num*);
-  self::takeOOO((#C5) as{TypeError} (core::Object*, core::Object*) →* core::num*);
+                                                                        ^" in #C4 as{TypeError} (core::int*, core::double*) →* core::double*);
+  self::takeOON(#C5 as{TypeError} (core::Object*, core::Object*) →* core::num*);
+  self::takeOOO(#C5 as{TypeError} (core::Object*, core::Object*) →* core::num*);
   self::takeIII(#C7);
   self::takeDDD(#C8);
   self::takeNNN(#C9);
@@ -131,15 +131,15 @@
   self::takeDDN(#C8);
   self::takeIIO(#C7);
   self::takeDDO(#C8);
-  self::takeOOI((#C10) as{TypeError} (core::Object*, core::Object*) →* core::int*);
+  self::takeOOI(#C10 as{TypeError} (core::Object*, core::Object*) →* core::int*);
   self::takeIDI(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:46:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
   takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
-                                                                       ^" in (#C9) as{TypeError} (core::double*, core::int*) →* core::int*);
+                                                                       ^" in #C9 as{TypeError} (core::double*, core::int*) →* core::int*);
   self::takeDID(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:47:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
   takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
-                                                                       ^" in (#C9) as{TypeError} (core::int*, core::double*) →* core::double*);
-  self::takeOON((#C10) as{TypeError} (core::Object*, core::Object*) →* core::num*);
-  self::takeOOO((#C10) as{TypeError} (core::Object*, core::Object*) →* core::num*);
+                                                                       ^" in #C9 as{TypeError} (core::int*, core::double*) →* core::double*);
+  self::takeOON(#C10 as{TypeError} (core::Object*, core::Object*) →* core::num*);
+  self::takeOOO(#C10 as{TypeError} (core::Object*, core::Object*) →* core::num*);
   self::takeIII(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::int*>);
   self::takeDDD(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::double*>);
   self::takeNNN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>);
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
index 1474987..937b216 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
@@ -113,15 +113,15 @@
   self::takeDDN(#C3);
   self::takeIIO(#C2);
   self::takeDDO(#C3);
-  self::takeOOI((#C5) as{TypeError} (core::Object*, core::Object*) →* core::int*);
+  self::takeOOI(#C5 as{TypeError} (core::Object*, core::Object*) →* core::int*);
   self::takeIDI(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:28:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
       /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
-                                                                        ^" in (#C4) as{TypeError} (core::double*, core::int*) →* core::int*);
+                                                                        ^" in #C4 as{TypeError} (core::double*, core::int*) →* core::int*);
   self::takeDID(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:30:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
       /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
-                                                                        ^" in (#C4) as{TypeError} (core::int*, core::double*) →* core::double*);
-  self::takeOON((#C5) as{TypeError} (core::Object*, core::Object*) →* core::num*);
-  self::takeOOO((#C5) as{TypeError} (core::Object*, core::Object*) →* core::num*);
+                                                                        ^" in #C4 as{TypeError} (core::int*, core::double*) →* core::double*);
+  self::takeOON(#C5 as{TypeError} (core::Object*, core::Object*) →* core::num*);
+  self::takeOOO(#C5 as{TypeError} (core::Object*, core::Object*) →* core::num*);
   self::takeIII(#C7);
   self::takeDDD(#C8);
   self::takeNNN(#C9);
@@ -131,15 +131,15 @@
   self::takeDDN(#C8);
   self::takeIIO(#C7);
   self::takeDDO(#C8);
-  self::takeOOI((#C10) as{TypeError} (core::Object*, core::Object*) →* core::int*);
+  self::takeOOI(#C10 as{TypeError} (core::Object*, core::Object*) →* core::int*);
   self::takeIDI(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:46:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
   takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
-                                                                       ^" in (#C9) as{TypeError} (core::double*, core::int*) →* core::int*);
+                                                                       ^" in #C9 as{TypeError} (core::double*, core::int*) →* core::int*);
   self::takeDID(invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:47:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
   takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
-                                                                       ^" in (#C9) as{TypeError} (core::int*, core::double*) →* core::double*);
-  self::takeOON((#C10) as{TypeError} (core::Object*, core::Object*) →* core::num*);
-  self::takeOOO((#C10) as{TypeError} (core::Object*, core::Object*) →* core::num*);
+                                                                       ^" in #C9 as{TypeError} (core::int*, core::double*) →* core::double*);
+  self::takeOON(#C10 as{TypeError} (core::Object*, core::Object*) →* core::num*);
+  self::takeOOO(#C10 as{TypeError} (core::Object*, core::Object*) →* core::num*);
   self::takeIII(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::int*>);
   self::takeDDD(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::double*>);
   self::takeNNN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>);
diff --git a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart
index bcc3b3f..ea24047 100644
--- a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart
+++ b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart
@@ -7,8 +7,7 @@
 
 abstract class C<E> {
   void sort([int compare(E a, E b)]) {
-    /*@ typeArgs=C::E* */ sort2(
-        this, compare /*@target=Object.==*/ ?? _compareAny);
+    /*@ typeArgs=C::E* */ sort2(this, compare ?? _compareAny);
   }
 
   static int _compareAny(a, b) {
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_implicit_this.dart b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this.dart
index 51b65c1..c8f9c85 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_implicit_this.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this.dart
@@ -25,7 +25,7 @@
     /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
 
     /*@target=Test.member*/ /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -46,7 +46,7 @@
         /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 = /*@target=Test.member*/ /*@target=Test.member*/
-        member /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+        member  ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = /*@target=Test.member*/ /*@target=Test.member*/
         member /*@target=B.+*/ +=
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart
index 9de089d..7892af4 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart
@@ -16,7 +16,7 @@
     var /*@ type=int* */ v1 = /*@target=Test1.t*/ t = getInt();
 
     var /*@ type=int* */ v4 = /*@target=Test1.t*/ /*@target=Test1.t*/ t
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=int* */ v7 = /*@target=Test1.t*/ /*@target=Test1.t*/ t
         /*@target=num.+*/ += getInt();
@@ -41,13 +41,13 @@
     var /*@ type=double* */ v3 = /*@target=Test2.t*/ t = getDouble();
 
     var /*@ type=num* */ v4 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
         /*@target=num.+*/ += getInt();
@@ -74,7 +74,7 @@
     var /*@ type=double* */ v3 = /*@target=Test3.t*/ t = getDouble();
 
     var /*@ type=double* */ v6 = /*@target=Test3.t*/ /*@target=Test3.t*/ t
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = /*@target=Test3.t*/ /*@target=Test3.t*/ t
         /*@target=double.+*/ += getInt();
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_index_full.dart b/pkg/front_end/testcases/inference/infer_assign_to_index_full.dart
index b1840b1..f72d8ca 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_index_full.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_index_full.dart
@@ -31,7 +31,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=B* */ f();
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [/*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/
+        
         ??= /*@ typeArgs=B* */ f();
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [/*@ typeArgs=Index* */ f()]
@@ -56,7 +56,7 @@
 
     var /*@ type=B* */ v2 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/
+        
         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_index_super.dart b/pkg/front_end/testcases/inference/infer_assign_to_index_super.dart
index 4685ee6..f9e36a6 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_index_super.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_index_super.dart
@@ -31,7 +31,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=B* */ f();
 
     super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
-            /*@ typeArgs=Index* */ f()] /*@target=A.==*/
+            /*@ typeArgs=Index* */ f()] 
         ??= /*@ typeArgs=B* */ f();
 
     super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
@@ -56,7 +56,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 = super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
-            /*@ typeArgs=Index* */ f()] /*@target=A.==*/
+            /*@ typeArgs=Index* */ f()] 
         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_index_this.dart b/pkg/front_end/testcases/inference/infer_assign_to_index_this.dart
index 469bb25..d42816b 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_index_this.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_index_this.dart
@@ -29,7 +29,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=B* */ f();
 
     this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
-            /*@ typeArgs=Index* */ f()] /*@target=A.==*/
+            /*@ typeArgs=Index* */ f()] 
         ??= /*@ typeArgs=B* */ f();
 
     this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
@@ -54,7 +54,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 = this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
-            /*@ typeArgs=Index* */ f()] /*@target=A.==*/
+            /*@ typeArgs=Index* */ f()] 
         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v4 = this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_local.dart b/pkg/front_end/testcases/inference/infer_assign_to_local.dart
index 8123404..56ebaa0 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_local.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_local.dart
@@ -22,7 +22,7 @@
   B local;
   local = /*@ typeArgs=B* */ f();
 
-  local /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  local  ??= /*@ typeArgs=B* */ f();
 
   local /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -37,7 +37,7 @@
   var /*@ type=B* */ v1 = local = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      local /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      local  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 = local /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_local_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_local_upwards.dart
index 8dc2a3e..282340c 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_local_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_local_upwards.dart
@@ -12,7 +12,7 @@
 void test1(int t) {
   var /*@ type=int* */ v1 = t = getInt();
 
-  var /*@ type=int* */ v4 = t /*@target=num.==*/ ??= getInt();
+  var /*@ type=int* */ v4 = t  ??= getInt();
 
   var /*@ type=int* */ v7 = t /*@target=num.+*/ += getInt();
 
@@ -29,11 +29,11 @@
 
   var /*@ type=double* */ v3 = t = getDouble();
 
-  var /*@ type=num* */ v4 = t /*@target=num.==*/ ??= getInt();
+  var /*@ type=num* */ v4 = t  ??= getInt();
 
-  var /*@ type=num* */ v5 = t /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = t  ??= getNum();
 
-  var /*@ type=num* */ v6 = t /*@target=num.==*/ ??= getDouble();
+  var /*@ type=num* */ v6 = t  ??= getDouble();
 
   var /*@ type=num* */ v7 = t /*@target=num.+*/ += getInt();
 
@@ -50,7 +50,7 @@
 void test3(double t) {
   var /*@ type=double* */ v3 = t = getDouble();
 
-  var /*@ type=double* */ v6 = t /*@target=num.==*/ ??= getDouble();
+  var /*@ type=double* */ v6 = t  ??= getDouble();
 
   var /*@ type=double* */ v7 = t /*@target=double.+*/ += getInt();
 
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_full.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_full.dart
index c112d9c..24d478e 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_full.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_full.dart
@@ -24,7 +24,7 @@
   static void test(Test t) {
     t. /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
     /*@ type=Test* */ /*@target=Test.member*/ t. /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
     /*@ type=Test* */ t. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
     /*@ type=Test* */ t. /*@target=Test.member*/ /*@target=Test.member*/ member
@@ -40,7 +40,7 @@
     var /*@ type=B* */ v2 =
         /*@ type=Test* */ /*@target=Test.member*/ t
                 . /*@target=Test.member*/ member
-            /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+             ??= /*@ typeArgs=B* */ f();
     var /*@ type=A* */ v3 =
         /*@ type=Test* */ t
                 . /*@target=Test.member*/ /*@target=Test.member*/ member
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware.dart
index a41c144..f810644 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware.dart
@@ -22,62 +22,62 @@
   B member;
 
   static void test(Test t) {
-    /*@ type=Test* */ /*@target=Test.==*/ t?. /*@target=Test.member*/
+    /*@ type=Test* */  t?. /*@target=Test.member*/
         member = /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t
+     t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t
+     t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
-    /*@target=Test.==*/ t
+     t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.**/ *= /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t
+     t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.&*/ &= /*@ typeArgs=A* */ f();
 
-    /*@target=B.-*/ -- /*@target=Test.==*/ t
+    /*@target=B.-*/ --  t
         ?. /*@target=Test.member*/ /*@target=Test.member*/ member;
 
-    /*@target=Test.==*/ t
+     t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.-*/ --;
 
     var /*@ type=B* */ v1 =
-        /*@ type=Test* */ /*@target=Test.==*/ t?. /*@target=Test.member*/
+        /*@ type=Test* */  t?. /*@target=Test.member*/
             member = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
-            /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+             ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
     var /*@ type=B* */ v4 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.**/ *= /*@ typeArgs=B* */ f();
 
     var /*@ type=C* */ v5 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.&*/ &= /*@ typeArgs=A* */ f();
 
     var /*@ type=B* */ v6 =
-        /*@target=B.-*/ -- /*@target=Test.==*/ t
+        /*@target=B.-*/ --  t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member;
 
     var /*@ type=B* */ v7 =
-        /*@target=Test.==*/ t
+         t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.-*/ --;
   }
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart
index ad284c2..82e2b7c 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart
@@ -13,24 +13,24 @@
   int prop;
 
   static void test(Test1 t) {
-    var /*@ type=int* */ v1 = /*@ type=Test1* */ /*@target=Test1.==*/ t
+    var /*@ type=int* */ v1 = /*@ type=Test1* */  t
         ?. /*@target=Test1.prop*/ prop = getInt();
 
     var /*@ type=int* */ v4 =
-        /*@target=Test1.==*/ t
+         t
                 ?. /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=int* */ v7 =
-        /*@target=Test1.==*/ t
+         t
                 ?. /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
             /*@target=num.+*/ += getInt();
 
-    var /*@ type=int* */ v10 = /*@target=num.+*/ ++ /*@target=Test1.==*/ t
+    var /*@ type=int* */ v10 = /*@target=num.+*/ ++  t
         ?. /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop;
 
     var /*@ type=int* */ v11 =
-        /*@target=Test1.==*/ t
+         t
             ?. /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
         /*@target=num.+*/ ++;
   }
@@ -40,49 +40,49 @@
   num prop;
 
   static void test(Test2 t) {
-    var /*@ type=int* */ v1 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=int* */ v1 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getInt();
 
-    var /*@ type=num* */ v2 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=num* */ v2 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getNum();
 
-    var /*@ type=double* */ v3 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=double* */ v3 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getDouble();
 
     var /*@ type=num* */ v4 =
-        /*@target=Test2.==*/ t
+         t
                 ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
-        /*@target=Test2.==*/ t
+         t
                 ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
-    var /*@ type=num* */ v6 = /*@target=Test2.==*/ t
+    var /*@ type=num* */ v6 =  t
             ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 =
-        /*@target=Test2.==*/ t
+         t
                 ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
             /*@target=num.+*/ += getInt();
 
     var /*@ type=num* */ v8 =
-        /*@target=Test2.==*/ t
+         t
                 ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
             /*@target=num.+*/ += getNum();
 
     var /*@ type=num* */ v9 =
-        /*@target=Test2.==*/ t
+         t
                 ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
             /*@target=num.+*/ += getDouble();
 
-    var /*@ type=num* */ v10 = /*@target=num.+*/ ++ /*@target=Test2.==*/ t
+    var /*@ type=num* */ v10 = /*@target=num.+*/ ++  t
         ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop;
 
     var /*@ type=num* */ v11 =
-        /*@target=Test2.==*/ t
+         t
             ?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
         /*@target=num.+*/ ++;
   }
@@ -93,35 +93,35 @@
 
   static void test3(Test3 t) {
     var /*@ type=double* */ v3 =
-        /*@ type=Test3* */ /*@target=Test3.==*/ t
+        /*@ type=Test3* */  t
             ?. /*@target=Test3.prop*/ prop = getDouble();
 
     var /*@ type=double* */ v6 =
-        /*@target=Test3.==*/ t?.
+         t?.
                 /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=double* */ v7 =
-        /*@target=Test3.==*/ t
+         t
                 ?. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
             /*@target=double.+*/ += getInt();
 
     var /*@ type=double* */ v8 =
-        /*@target=Test3.==*/ t
+         t
                 ?. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
             /*@target=double.+*/ += getNum();
 
     var /*@ type=double* */ v9 =
-        /*@target=Test3.==*/ t?.
+         t?.
                 /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
             /*@target=double.+*/ += getDouble();
 
     var /*@ type=double* */ v10 = /*@target=double.+*/ ++
-        /*@target=Test3.==*/ t
+         t
             ?. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop;
 
     var /*@ type=double* */ v11 =
-        /*@target=Test3.==*/ t
+         t
             ?. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
         /*@target=double.+*/ ++;
   }
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_super.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_super.dart
index e626518..1c94bce 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_super.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_super.dart
@@ -27,7 +27,7 @@
     super.member = /*@ typeArgs=B* */ f();
 
     super. /*@target=Base.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     super. /*@target=Base.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -46,7 +46,7 @@
     var /*@ type=B* */ v1 = super.member = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 = super. /*@target=Base.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = super. /*@target=Base.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart
index 5bb229f..b7a994d 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart
@@ -20,7 +20,7 @@
     var /*@ type=int* */ v1 = super.intProp = getInt();
 
     var /*@ type=int* */ v4 = super. /*@target=Base.intProp*/ intProp
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=int* */ v7 = super. /*@target=Base.intProp*/ intProp
         /*@target=num.+*/ += getInt();
@@ -43,13 +43,13 @@
     var /*@ type=double* */ v3 = super.numProp = getDouble();
 
     var /*@ type=num* */ v4 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = super. /*@target=Base.numProp*/ numProp
         /*@target=num.+*/ += getInt();
@@ -77,7 +77,7 @@
     var /*@ type=double* */ v3 = super.doubleProp = getDouble();
 
     var /*@ type=double* */ v6 = super. /*@target=Base.doubleProp*/ doubleProp
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = super. /*@target=Base.doubleProp*/ doubleProp
         /*@target=double.+*/ += getInt();
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart
index 26d84f6..541e475 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart
@@ -16,7 +16,7 @@
     var /*@ type=int* */ v1 = t. /*@target=Test1.prop*/ prop = getInt();
     var /*@ type=int* */ v4 = /*@ type=Test1* */ /*@target=Test1.prop*/ t
             . /*@target=Test1.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
     var /*@ type=int* */ v7 =
         /*@ type=Test1* */ t. /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
             /*@target=num.+*/ += getInt();
@@ -37,13 +37,13 @@
     var /*@ type=double* */ v3 = t. /*@target=Test2.prop*/ prop = getDouble();
     var /*@ type=num* */ v4 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
     var /*@ type=num* */ v5 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
     var /*@ type=num* */ v6 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
     var /*@ type=num* */ v7 =
         /*@ type=Test2* */ t. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
             /*@target=num.+*/ += getInt();
@@ -68,7 +68,7 @@
     var /*@ type=double* */ v3 = t. /*@target=Test3.prop*/ prop = getDouble();
     var /*@ type=double* */ v6 =
         /*@ type=Test3* */ /*@target=Test3.prop*/ t. /*@target=Test3.prop*/
-            prop /*@target=num.==*/ ??= getDouble();
+            prop  ??= getDouble();
     var /*@ type=double* */ v7 =
         /*@ type=Test3* */ t. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
             /*@target=double.+*/ += getInt();
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_static.dart b/pkg/front_end/testcases/inference/infer_assign_to_static.dart
index 1f4c19b..c09b270 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_static.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_static.dart
@@ -25,7 +25,7 @@
 void test_topLevelVariable() {
   topLevelVariable = /*@ typeArgs=B* */ f();
 
-  topLevelVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  topLevelVariable  ??= /*@ typeArgs=B* */ f();
 
   topLevelVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -40,7 +40,7 @@
   var /*@ type=B* */ v1 = topLevelVariable = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      topLevelVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      topLevelVariable  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 =
       topLevelVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -60,7 +60,7 @@
 void test_staticVariable() {
   B.staticVariable = /*@ typeArgs=B* */ f();
 
-  B.staticVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  B.staticVariable  ??= /*@ typeArgs=B* */ f();
 
   B.staticVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -75,7 +75,7 @@
   var /*@ type=B* */ v1 = B.staticVariable = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      B.staticVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      B.staticVariable  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 =
       B.staticVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_static_upwards.dart b/pkg/front_end/testcases/inference/infer_assign_to_static_upwards.dart
index 157f454..22ed9e5 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_static_upwards.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_static_upwards.dart
@@ -16,7 +16,7 @@
 void test1() {
   var /*@ type=int* */ v1 = topLevelInt = getInt();
 
-  var /*@ type=int* */ v4 = topLevelInt /*@target=num.==*/ ??= getInt();
+  var /*@ type=int* */ v4 = topLevelInt  ??= getInt();
 
   var /*@ type=int* */ v7 = topLevelInt /*@target=num.+*/ += getInt();
 
@@ -33,11 +33,11 @@
 
   var /*@ type=double* */ v3 = topLevelNum = getDouble();
 
-  var /*@ type=num* */ v4 = topLevelNum /*@target=num.==*/ ??= getInt();
+  var /*@ type=num* */ v4 = topLevelNum  ??= getInt();
 
-  var /*@ type=num* */ v5 = topLevelNum /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = topLevelNum  ??= getNum();
 
-  var /*@ type=num* */ v6 = topLevelNum /*@target=num.==*/ ??= getDouble();
+  var /*@ type=num* */ v6 = topLevelNum  ??= getDouble();
 
   var /*@ type=num* */ v7 = topLevelNum /*@target=num.+*/ += getInt();
 
@@ -55,7 +55,7 @@
   var /*@ type=double* */ v3 = topLevelDouble = getDouble();
 
   var /*@ type=double* */ v6 =
-      topLevelDouble /*@target=num.==*/ ??= getDouble();
+      topLevelDouble  ??= getDouble();
 
   var /*@ type=double* */ v7 = topLevelDouble /*@target=double.+*/ += getInt();
 
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.expect
index 9529eaa..7b26ea1 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* z = null;
+  covariant-by-class field core::List<self::A::T*>* z = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T*>*;
-  abstract set y(generic-covariant-impl core::List<self::A::T*>* value) → void;
+  abstract set y(covariant-by-class core::List<self::A::T*>* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,8 +22,8 @@
 }
 class B extends self::A<core::int*> {
   field core::List<core::int*>* x = null;
-  generic-covariant-impl field core::List<core::int*>* y = null;
-  generic-covariant-impl field core::List<core::int*>* z = null;
+  covariant-by-class field core::List<core::int*>* y = null;
+  covariant-by-class field core::List<core::int*>* z = null;
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.outline.expect
index 9867698..b7a1c61 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.outline.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* z;
+  covariant-by-class field core::List<self::A::T*>* z;
   synthetic constructor •() → self::A<self::A::T*>*
     ;
   abstract get x() → core::List<self::A::T*>*;
-  abstract set y(generic-covariant-impl core::List<self::A::T*>* value) → void;
+  abstract set y(covariant-by-class core::List<self::A::T*>* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -21,8 +21,8 @@
 }
 class B extends self::A<core::int*> {
   field core::List<core::int*>* x;
-  generic-covariant-impl field core::List<core::int*>* y;
-  generic-covariant-impl field core::List<core::int*>* z;
+  covariant-by-class field core::List<core::int*>* y;
+  covariant-by-class field core::List<core::int*>* z;
   synthetic constructor •() → self::B*
     ;
 }
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.transformed.expect
index 9529eaa..7b26ea1 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.weak.transformed.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* z = null;
+  covariant-by-class field core::List<self::A::T*>* z = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T*>*;
-  abstract set y(generic-covariant-impl core::List<self::A::T*>* value) → void;
+  abstract set y(covariant-by-class core::List<self::A::T*>* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,8 +22,8 @@
 }
 class B extends self::A<core::int*> {
   field core::List<core::int*>* x = null;
-  generic-covariant-impl field core::List<core::int*>* y = null;
-  generic-covariant-impl field core::List<core::int*>* z = null;
+  covariant-by-class field core::List<core::int*>* y = null;
+  covariant-by-class field core::List<core::int*>* z = null;
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.expect b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.expect
index 6755b95..91d941e 100644
--- a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::X* field = null;
+  covariant-by-class field self::A::X* field = null;
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
@@ -23,7 +23,7 @@
     : super core::Object::•()
     ;
   abstract get field() → self::B::Y*;
-  abstract set field(generic-covariant-impl self::B::Y* value) → void;
+  abstract set field(covariant-by-class self::B::Y* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -40,7 +40,7 @@
     : super core::Object::•()
     ;
   abstract get field() → core::int*;
-  abstract set field(generic-covariant-impl core::int* value) → void;
+  abstract set field(covariant-by-class core::int* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.outline.expect
index 05d693d..cc52187 100644
--- a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::X* field;
+  covariant-by-class field self::A::X* field;
   synthetic constructor •() → self::A<self::A::X*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -21,7 +21,7 @@
   synthetic constructor •() → self::B<self::B::Y*>*
     ;
   abstract get field() → self::B::Y*;
-  abstract set field(generic-covariant-impl self::B::Y* value) → void;
+  abstract set field(covariant-by-class self::B::Y* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -37,7 +37,7 @@
   synthetic constructor •() → self::C*
     ;
   abstract get field() → core::int*;
-  abstract set field(generic-covariant-impl core::int* value) → void;
+  abstract set field(covariant-by-class core::int* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.transformed.expect
index 6755b95..91d941e 100644
--- a/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_generic_field_types.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::X* field = null;
+  covariant-by-class field self::A::X* field = null;
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
@@ -23,7 +23,7 @@
     : super core::Object::•()
     ;
   abstract get field() → self::B::Y*;
-  abstract set field(generic-covariant-impl self::B::Y* value) → void;
+  abstract set field(covariant-by-class self::B::Y* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -40,7 +40,7 @@
     : super core::Object::•()
     ;
   abstract get field() → core::int*;
-  abstract set field(generic-covariant-impl core::int* value) → void;
+  abstract set field(covariant-by-class core::int* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.expect
index ce66d87..4e199e1 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T* x = null;
+  covariant-by-class field self::A::T* x = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
@@ -26,7 +26,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B<E extends core::Object* = dynamic> extends self::A<self::B::E*> {
-  generic-covariant-impl field self::B::E* y = null;
+  covariant-by-class field self::B::E* y = null;
   synthetic constructor •() → self::B<self::B::E*>*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.outline.expect
index 580534d..6bff580 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T* x;
+  covariant-by-class field self::A::T* x;
   synthetic constructor •() → self::A<self::A::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B<E extends core::Object* = dynamic> extends self::A<self::B::E*> {
-  generic-covariant-impl field self::B::E* y;
+  covariant-by-class field self::B::E* y;
   synthetic constructor •() → self::B<self::B::E*>*
     ;
   get x() → self::B::E*
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.transformed.expect
index ce66d87..4e199e1 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T* x = null;
+  covariant-by-class field self::A::T* x = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
@@ -26,7 +26,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B<E extends core::Object* = dynamic> extends self::A<self::B::E*> {
-  generic-covariant-impl field self::B::E* y = null;
+  covariant-by-class field self::B::E* y = null;
   synthetic constructor •() → self::B<self::B::E*>*
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.expect
index 4e36d34..680de12 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.expect
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → void {
+  method foo(covariant-by-class self::Bar::T* t) → void {
     for (core::String* i in t) {
       core::int* x = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart:15:44: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
       int x = /*error:INVALID_ASSIGNMENT*/ i;
@@ -73,7 +73,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → void {
+  method foo(covariant-by-class self::Baz::S* t) → void {
     for (self::Baz::T* i in t) {
       core::int* x = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart:23:44: Error: A value of type 'T' can't be assigned to a variable of type 'int'.
       int x = /*error:INVALID_ASSIGNMENT*/ i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.outline.expect
index a8d39ff..aafbf7f 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.outline.expect
@@ -20,7 +20,7 @@
 class Bar<T extends core::Iterable<core::String*>*> extends core::Object {
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → void
+  method foo(covariant-by-class self::Bar::T* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -36,7 +36,7 @@
 class Baz<T extends core::Object* = dynamic, E extends core::Iterable<self::Baz::T*>* = core::Iterable<dynamic>*, S extends self::Baz::E* = core::Iterable<dynamic>*> extends core::Object {
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → void
+  method foo(covariant-by-class self::Baz::S* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.transformed.expect
index d522cdb..06b4abd 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.weak.transformed.expect
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → void {
+  method foo(covariant-by-class self::Bar::T* t) → void {
     {
       core::Iterator<core::String*>* :sync-for-iterator = t.{core::Iterable::iterator}{core::Iterator<core::String*>*};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) {
@@ -79,7 +79,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → void {
+  method foo(covariant-by-class self::Baz::S* t) → void {
     {
       core::Iterator<self::Baz::T*>* :sync-for-iterator = t.{core::Iterable::iterator}{core::Iterator<self::Baz::T*>*};
       for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.expect
index 5a5abe3..c16146f 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.expect
@@ -54,7 +54,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → dynamic async {
+  method foo(covariant-by-class self::Bar::T* t) → dynamic async {
     await for (core::String* i in t) {
       core::int* x = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart:17:44: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
       int x = /*error:INVALID_ASSIGNMENT*/ i;
@@ -76,7 +76,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → dynamic async {
+  method foo(covariant-by-class self::Baz::S* t) → dynamic async {
     await for (self::Baz::T* i in t) {
       core::int* x = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart:25:44: Error: A value of type 'T' can't be assigned to a variable of type 'int'.
       int x = /*error:INVALID_ASSIGNMENT*/ i;
@@ -106,9 +106,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -129,9 +129,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.outline.expect
index 3b83fec..ad06471 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.outline.expect
@@ -23,7 +23,7 @@
 class Bar<T extends asy::Stream<core::String*>*> extends core::Object {
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → dynamic async 
+  method foo(covariant-by-class self::Bar::T* t) → dynamic async 
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -39,7 +39,7 @@
 class Baz<T extends core::Object* = dynamic, E extends asy::Stream<self::Baz::T*>* = asy::Stream<dynamic>*, S extends self::Baz::E* = asy::Stream<dynamic>*> extends core::Object {
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → dynamic async 
+  method foo(covariant-by-class self::Baz::S* t) → dynamic async 
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -63,9 +63,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -86,9 +86,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.transformed.expect
index ecf46cd..fef5b28 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.weak.transformed.expect
@@ -55,7 +55,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → dynamic /* originally async */ {
+  method foo(covariant-by-class self::Bar::T* t) → dynamic /* originally async */ {
     final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>();
     core::bool* :is_sync = false;
     FutureOr<dynamic>* :return_value;
@@ -124,7 +124,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → dynamic /* originally async */ {
+  method foo(covariant-by-class self::Baz::S* t) → dynamic /* originally async */ {
     final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>();
     core::bool* :is_sync = false;
     FutureOr<dynamic>* :return_value;
@@ -201,9 +201,9 @@
   abstract member-signature method asyncExpand<E extends core::Object* = dynamic>((self::MyStream::T*) →* asy::Stream<self::MyStream::asyncExpand::E*>* convert) → asy::Stream<self::MyStream::asyncExpand::E*>*; -> asy::Stream::asyncExpand
   abstract member-signature method handleError(core::Function* onError, {(dynamic) →* core::bool* test = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::handleError
   abstract member-signature method expand<S extends core::Object* = dynamic>((self::MyStream::T*) →* core::Iterable<self::MyStream::expand::S*>* convert) → asy::Stream<self::MyStream::expand::S*>*; -> asy::Stream::expand
-  abstract member-signature method pipe(generic-covariant-impl asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
-  abstract member-signature method transform<S extends core::Object* = dynamic>(generic-covariant-impl asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
-  abstract member-signature method reduce(generic-covariant-impl (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
+  abstract member-signature method pipe(covariant-by-class asy::StreamConsumer<self::MyStream::T*>* streamConsumer) → asy::Future<dynamic>*; -> asy::Stream::pipe
+  abstract member-signature method transform<S extends core::Object* = dynamic>(covariant-by-class asy::StreamTransformer<self::MyStream::T*, self::MyStream::transform::S*>* streamTransformer) → asy::Stream<self::MyStream::transform::S*>*; -> asy::Stream::transform
+  abstract member-signature method reduce(covariant-by-class (self::MyStream::T*, self::MyStream::T*) →* self::MyStream::T* combine) → asy::Future<self::MyStream::T*>*; -> asy::Stream::reduce
   abstract member-signature method fold<S extends core::Object* = dynamic>(self::MyStream::fold::S* initialValue, (self::MyStream::fold::S*, self::MyStream::T*) →* self::MyStream::fold::S* combine) → asy::Future<self::MyStream::fold::S*>*; -> asy::Stream::fold
   abstract member-signature method join([core::String* separator = #C2]) → asy::Future<core::String*>*; -> asy::Stream::join
   abstract member-signature method contains(core::Object* needle) → asy::Future<core::bool*>*; -> asy::Stream::contains
@@ -224,9 +224,9 @@
   abstract member-signature get first() → asy::Future<self::MyStream::T*>*; -> asy::Stream::first
   abstract member-signature get last() → asy::Future<self::MyStream::T*>*; -> asy::Stream::last
   abstract member-signature get single() → asy::Future<self::MyStream::T*>*; -> asy::Stream::single
-  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
-  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
-  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {generic-covariant-impl () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
+  abstract member-signature method firstWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::firstWhere
+  abstract member-signature method lastWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::lastWhere
+  abstract member-signature method singleWhere((self::MyStream::T*) →* core::bool* test, {covariant-by-class () →* self::MyStream::T* orElse = #C1}) → asy::Future<self::MyStream::T*>*; -> asy::Stream::singleWhere
   abstract member-signature method elementAt(core::int* index) → asy::Future<self::MyStream::T*>*; -> asy::Stream::elementAt
   abstract member-signature method timeout(core::Duration* timeLimit, {(asy::EventSink<self::MyStream::T*>*) →* void onTimeout = #C1}) → asy::Stream<self::MyStream::T*>*; -> asy::Stream::timeout
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.expect
index 84bd9ed..5f1e09a 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C4;
   static const field self::E* v1 = #C3;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.v1"
+  #C2 = "v1"
   #C3 = self::E {index:#C1, _name:#C2}
   #C4 = <self::E*>[#C3]
 }
@@ -38,4 +38,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///inferred_type_is_enum.dart:
 - E. (from org-dartlang-testcase:///inferred_type_is_enum.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.outline.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.outline.expect
index 0f72ee9..ef3d712 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.outline.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = const <self::E*>[self::E::v1];
-  static const field self::E* v1 = const self::E::•(0, "E.v1");
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  static const field self::E* v1 = const self::E::•(0, "v1");
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -28,6 +28,6 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:6 -> ListConstant(const <E*>[const E{E.index: 0, E._name: "E.v1"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:10 -> InstanceConstant(const E{E.index: 0, E._name: "E.v1"})
-Extra constant evaluation: evaluated: 6, effectively constant: 2
+Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:6 -> ListConstant(const <E*>[const E{_Enum.index: 0, _Enum._name: "v1"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "v1"})
+Extra constant evaluation: evaluated: 7, effectively constant: 2
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.transformed.expect
index 84bd9ed..5f1e09a 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.weak.transformed.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C4;
   static const field self::E* v1 = #C3;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.v1"
+  #C2 = "v1"
   #C3 = self::E {index:#C1, _name:#C2}
   #C4 = <self::E*>[#C3]
 }
@@ -38,4 +38,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///inferred_type_is_enum.dart:
 - E. (from org-dartlang-testcase:///inferred_type_is_enum.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.expect
index 827859e..624054f 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C4;
   static const field self::E* v1 = #C3;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.v1"
+  #C2 = "v1"
   #C3 = self::E {index:#C1, _name:#C2}
   #C4 = <self::E*>[#C3]
 }
@@ -38,4 +38,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///inferred_type_is_enum_values.dart:
 - E. (from org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.outline.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.outline.expect
index f462cb1..553e8da 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.outline.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = const <self::E*>[self::E::v1];
-  static const field self::E* v1 = const self::E::•(0, "E.v1");
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  static const field self::E* v1 = const self::E::•(0, "v1");
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -28,6 +28,6 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6 -> ListConstant(const <E*>[const E{E.index: 0, E._name: "E.v1"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:10 -> InstanceConstant(const E{E.index: 0, E._name: "E.v1"})
-Extra constant evaluation: evaluated: 6, effectively constant: 2
+Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6 -> ListConstant(const <E*>[const E{_Enum.index: 0, _Enum._name: "v1"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "v1"})
+Extra constant evaluation: evaluated: 7, effectively constant: 2
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.transformed.expect
index 827859e..624054f 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.weak.transformed.expect
@@ -2,16 +2,16 @@
 import self as self;
 import "dart:core" as core;
 
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self::E*>* values = #C4;
   static const field self::E* v1 = #C3;
-  const constructor •(core::int* index, core::String* _name) → self::E*
-    : self::E::index = index, self::E::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::E*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::E::_name}{core::String*};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -29,7 +29,7 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.v1"
+  #C2 = "v1"
   #C3 = self::E {index:#C1, _name:#C2}
   #C4 = <self::E*>[#C3]
 }
@@ -38,4 +38,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///inferred_type_is_enum_values.dart:
 - E. (from org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.expect b/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.expect
index b339db5d..86594e9 100644
--- a/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.expect
@@ -20,6 +20,6 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 static method test(self::C<core::String*>* c) → void {
-  (core::int*) →* (core::String*) →* void tearoff = c.{self::C::f}{<U extends core::Object* = dynamic>(U*) →* (core::String*) →* void} as{TypeError,CovarianceCheck} <U extends core::Object* = dynamic>(U*) →* (core::String*) →* void<core::int*>;
+  (core::int*) →* (core::String*) →* void tearoff = (c.{self::C::f}{<U extends core::Object* = dynamic>(U*) →* (core::String*) →* void} as{TypeError,CovarianceCheck} <U extends core::Object* = dynamic>(U*) →* (core::String*) →* void)<core::int*>;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.transformed.expect
index b339db5d..86594e9 100644
--- a/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/instantiate_tearoff_after_contravariance_check.dart.weak.transformed.expect
@@ -20,6 +20,6 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 static method test(self::C<core::String*>* c) → void {
-  (core::int*) →* (core::String*) →* void tearoff = c.{self::C::f}{<U extends core::Object* = dynamic>(U*) →* (core::String*) →* void} as{TypeError,CovarianceCheck} <U extends core::Object* = dynamic>(U*) →* (core::String*) →* void<core::int*>;
+  (core::int*) →* (core::String*) →* void tearoff = (c.{self::C::f}{<U extends core::Object* = dynamic>(U*) →* (core::String*) →* void} as{TypeError,CovarianceCheck} <U extends core::Object* = dynamic>(U*) →* (core::String*) →* void)<core::int*>;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.expect
index 11470da..908eca7 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.outline.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.outline.expect
index c009c03..7285233 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.transformed.expect
index 11470da..908eca7 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* t;
+  covariant-by-class field self::C::T* t;
   constructor •(self::C::T* t) → self::C<self::C::T*>*
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/null_aware_method_invocation.dart b/pkg/front_end/testcases/inference/null_aware_method_invocation.dart
index c1906ab..2d019d6 100644
--- a/pkg/front_end/testcases/inference/null_aware_method_invocation.dart
+++ b/pkg/front_end/testcases/inference/null_aware_method_invocation.dart
@@ -10,9 +10,8 @@
 }
 
 g(C c) {
-  var /*@ type=int* */ x = /*@ type=C* */ /*@target=C.==*/ c
-      ?. /*@target=C.f*/ f();
-  /*@ type=C* */ /*@target=C.==*/ c?. /*@target=C.f*/ f();
+  var /*@ type=int* */ x = /*@ type=C* */ c?. /*@target=C.f*/ f();
+  /*@ type=C* */ c?. /*@target=C.f*/ f();
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/null_aware_property_get.dart b/pkg/front_end/testcases/inference/null_aware_property_get.dart
index bc20ea3..3d2edef 100644
--- a/pkg/front_end/testcases/inference/null_aware_property_get.dart
+++ b/pkg/front_end/testcases/inference/null_aware_property_get.dart
@@ -10,9 +10,8 @@
 }
 
 void f(C c) {
-  var /*@ type=int* */ x = /*@ type=C* */ /*@target=C.==*/ c
-      ?. /*@target=C.x*/ x;
-  /*@ type=C* */ /*@target=C.==*/ c?. /*@target=C.x*/ x;
+  var /*@ type=int* */ x = /*@ type=C* */ c?. /*@target=C.x*/ x;
+  /*@ type=C* */ c?. /*@target=C.x*/ x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/null_coalescing_operator.dart b/pkg/front_end/testcases/inference/null_coalescing_operator.dart
index f68c07f..8ce2e52 100644
--- a/pkg/front_end/testcases/inference/null_coalescing_operator.dart
+++ b/pkg/front_end/testcases/inference/null_coalescing_operator.dart
@@ -7,7 +7,6 @@
 
 main() {
   List<int> x;
-  var /*@ type=List<int*>* */ y =
-      x /*@target=List.==*/ ?? /*@ typeArgs=int* */ [];
+  var /*@ type=List<int*>* */ y = x ?? /*@ typeArgs=int* */ [];
   List<int> z = y;
 }
diff --git a/pkg/front_end/testcases/inference/null_coalescing_operator_2.dart b/pkg/front_end/testcases/inference/null_coalescing_operator_2.dart
index a6dfbb3..f84a4e4 100644
--- a/pkg/front_end/testcases/inference/null_coalescing_operator_2.dart
+++ b/pkg/front_end/testcases/inference/null_coalescing_operator_2.dart
@@ -7,5 +7,5 @@
 
 main() {
   List<int> x;
-  List<num> y = x /*@target=List.==*/ ?? /*@ typeArgs=num* */ [];
+  List<num> y = x ?? /*@ typeArgs=num* */ [];
 }
diff --git a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.expect b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.expect
index 07b39aa..4e88a92 100644
--- a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  abstract method foo({generic-covariant-impl core::Iterable<self::A::X*>* x = #C1}) → void;
+  abstract method foo({covariant-by-class core::Iterable<self::A::X*>* x = #C1}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::B<self::B::Y*>*
     : super core::Object::•()
     ;
-  method foo({generic-covariant-impl core::Iterable<self::B::Y*>* x = #C1}) → void {}
+  method foo({covariant-by-class core::Iterable<self::B::Y*>* x = #C1}) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
index a09301d..ab7f834 100644
--- a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class A<X extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X*>*
     ;
-  abstract method foo({generic-covariant-impl core::Iterable<self::A::X*>* x}) → void;
+  abstract method foo({covariant-by-class core::Iterable<self::A::X*>* x}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -20,7 +20,7 @@
 class B<Y extends core::Object* = dynamic> extends core::Object implements self::A<self::B::Y*> {
   synthetic constructor •() → self::B<self::B::Y*>*
     ;
-  method foo({generic-covariant-impl core::Iterable<self::B::Y*>* x}) → void
+  method foo({covariant-by-class core::Iterable<self::B::Y*>* x}) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.transformed.expect
index 07b39aa..4e88a92 100644
--- a/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/override_inference_with_type_parameters.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
-  abstract method foo({generic-covariant-impl core::Iterable<self::A::X*>* x = #C1}) → void;
+  abstract method foo({covariant-by-class core::Iterable<self::A::X*>* x = #C1}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::B<self::B::Y*>*
     : super core::Object::•()
     ;
-  method foo({generic-covariant-impl core::Iterable<self::B::Y*>* x = #C1}) → void {}
+  method foo({covariant-by-class core::Iterable<self::B::Y*>* x = #C1}) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/property_set.dart.weak.expect b/pkg/front_end/testcases/inference/property_set.dart.weak.expect
index 286b94e..c2feed8 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.weak.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* x = null;
+  covariant-by-class field core::List<self::A::T*>* x = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  set y(generic-covariant-impl core::List<self::A::T*>* value) → void {}
+  set y(covariant-by-class core::List<self::A::T*>* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/property_set.dart.weak.outline.expect b/pkg/front_end/testcases/inference/property_set.dart.weak.outline.expect
index 78494f0..d3de504 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.weak.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* x;
+  covariant-by-class field core::List<self::A::T*>* x;
   synthetic constructor •() → self::A<self::A::T*>*
     ;
-  set y(generic-covariant-impl core::List<self::A::T*>* value) → void
+  set y(covariant-by-class core::List<self::A::T*>* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/property_set.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/property_set.dart.weak.transformed.expect
index 29bdd38..851362e 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.weak.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::T*>* x = null;
+  covariant-by-class field core::List<self::A::T*>* x = null;
   synthetic constructor •() → self::A<self::A::T*>*
     : super core::Object::•()
     ;
-  set y(generic-covariant-impl core::List<self::A::T*>* value) → void {}
+  set y(covariant-by-class core::List<self::A::T*>* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.expect
index c4b9a8c..a3cae75 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.outline.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.outline.expect
index f6a0aba..da27d89 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a;
+  covariant-by-class field self::C::T* a;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
   method op(core::double* b) → void
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.transformed.expect
index c4b9a8c..a3cae75 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.expect
index 23ed30d..24e9591 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.outline.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.outline.expect
index 5781f2e..3c6642c 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a;
+  covariant-by-class field self::C::T* a;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
   method op(core::int* b) → void
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.transformed.expect
index 23ed30d..24e9591 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.expect
index 591ea9e..88143e7 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method op(generic-covariant-impl self::C::T* b) → void {
+  method op(covariant-by-class self::C::T* b) → void {
     self::C::T* r1 = this.{self::C::a}{self::C::T*}.{core::num::+}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     self::C::T* r2 = this.{self::C::a}{self::C::T*}.{core::num::-}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     self::C::T* r3 = this.{self::C::a}{self::C::T*}.{core::num::*}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
   }
-  method opEq(generic-covariant-impl self::C::T* b) → void {
+  method opEq(covariant-by-class self::C::T* b) → void {
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::+}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::-}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::*}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.outline.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.outline.expect
index 8b713df..d31dffe 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.outline.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a;
+  covariant-by-class field self::C::T* a;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method op(generic-covariant-impl self::C::T* b) → void
+  method op(covariant-by-class self::C::T* b) → void
     ;
-  method opEq(generic-covariant-impl self::C::T* b) → void
+  method opEq(covariant-by-class self::C::T* b) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.transformed.expect
index 591ea9e..88143e7 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.weak.transformed.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num*> extends core::Object {
-  generic-covariant-impl field self::C::T* a = null;
+  covariant-by-class field self::C::T* a = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method op(generic-covariant-impl self::C::T* b) → void {
+  method op(covariant-by-class self::C::T* b) → void {
     self::C::T* r1 = this.{self::C::a}{self::C::T*}.{core::num::+}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     self::C::T* r2 = this.{self::C::a}{self::C::T*}.{core::num::-}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     self::C::T* r3 = this.{self::C::a}{self::C::T*}.{core::num::*}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
   }
-  method opEq(generic-covariant-impl self::C::T* b) → void {
+  method opEq(covariant-by-class self::C::T* b) → void {
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::+}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::-}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
     this.{self::C::a} = this.{self::C::a}{self::C::T*}.{core::num::*}(b){(core::num*) →* core::num*} as{TypeError} self::C::T*;
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.expect
index c8eced6..e59a920 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator []=(generic-covariant-impl core::Map<core::int*, self::B::T*>* x, generic-covariant-impl core::List<self::B::T*>* y) → void {}
+  operator []=(covariant-by-class core::Map<core::int*, self::B::T*>* x, covariant-by-class core::List<self::B::T*>* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  operator []=(generic-covariant-impl core::Object* x, generic-covariant-impl core::Object* y) → void {}
+  operator []=(covariant-by-class core::Object* x, covariant-by-class core::Object* y) → void {}
   method h() → void {
     super.{self::B::[]=}(self::f<core::Map<core::int*, asy::Future<self::C::U*>*>*>(), self::f<core::List<asy::Future<self::C::U*>*>*>());
   }
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.outline.expect
index 3d1911d..0dcfd55 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.outline.expect
@@ -8,7 +8,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  operator []=(generic-covariant-impl core::Map<core::int*, self::B::T*>* x, generic-covariant-impl core::List<self::B::T*>* y) → void
+  operator []=(covariant-by-class core::Map<core::int*, self::B::T*>* x, covariant-by-class core::List<self::B::T*>* y) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -24,7 +24,7 @@
 class C<U extends core::Object* = dynamic> extends self::B<asy::Future<self::C::U*>*> {
   synthetic constructor •() → self::C<self::C::U*>*
     ;
-  operator []=(generic-covariant-impl core::Object* x, generic-covariant-impl core::Object* y) → void
+  operator []=(covariant-by-class core::Object* x, covariant-by-class core::Object* y) → void
     ;
   method h() → void
     ;
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.transformed.expect
index c8eced6..e59a920 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.weak.transformed.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator []=(generic-covariant-impl core::Map<core::int*, self::B::T*>* x, generic-covariant-impl core::List<self::B::T*>* y) → void {}
+  operator []=(covariant-by-class core::Map<core::int*, self::B::T*>* x, covariant-by-class core::List<self::B::T*>* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  operator []=(generic-covariant-impl core::Object* x, generic-covariant-impl core::Object* y) → void {}
+  operator []=(covariant-by-class core::Object* x, covariant-by-class core::Object* y) → void {}
   method h() → void {
     super.{self::B::[]=}(self::f<core::Map<core::int*, asy::Future<self::C::U*>*>*>(), self::f<core::List<asy::Future<self::C::U*>*>*>());
   }
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.expect
index f291bcb..940c20e 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.expect
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method g(generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  method g(covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -46,7 +46,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  method g(generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  method g(covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     return null;
   method h() → void {
     self::D<asy::Future<self::C::U*>*>* x = super.{self::B::g}(self::f<self::E<asy::Future<self::C::U*>*>*>());
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.outline.expect
index 81bca255..d0fbc6d 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.outline.expect
@@ -26,7 +26,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  method g(generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  method g(covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -42,7 +42,7 @@
 class C<U extends core::Object* = dynamic> extends self::B<asy::Future<self::C::U*>*> {
   synthetic constructor •() → self::C<self::C::U*>*
     ;
-  method g(generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  method g(covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     ;
   method h() → void
     ;
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.transformed.expect
index f291bcb..940c20e 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.weak.transformed.expect
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method g(generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  method g(covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -46,7 +46,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  method g(generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  method g(covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     return null;
   method h() → void {
     self::D<asy::Future<self::C::U*>*>* x = super.{self::B::g}(self::f<self::E<asy::Future<self::C::U*>*>*>());
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.expect
index 9e8abb6..752cdaf 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.expect
@@ -26,7 +26,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x = null;
+  covariant-by-class field self::D<self::B::T*>* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -47,7 +47,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     return null;
-  set x(generic-covariant-impl core::Object* x) → void {}
+  set x(covariant-by-class core::Object* x) → void {}
   method g() → void {
     self::D<asy::Future<self::C::U*>*>* y = super.{self::B::x};
   }
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.outline.expect
index fad8b86..94018b3 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.outline.expect
@@ -24,7 +24,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x;
+  covariant-by-class field self::D<self::B::T*>* x;
   synthetic constructor •() → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -43,7 +43,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     ;
-  set x(generic-covariant-impl core::Object* x) → void
+  set x(covariant-by-class core::Object* x) → void
     ;
   method g() → void
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.transformed.expect
index 9e8abb6..752cdaf 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x = null;
+  covariant-by-class field self::D<self::B::T*>* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -47,7 +47,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     return null;
-  set x(generic-covariant-impl core::Object* x) → void {}
+  set x(covariant-by-class core::Object* x) → void {}
   method g() → void {
     self::D<asy::Future<self::C::U*>*>* y = super.{self::B::x};
   }
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.expect
index 95a3a94..2b490e3 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.expect
@@ -26,7 +26,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x = null;
+  covariant-by-class field self::D<self::B::T*>* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -47,7 +47,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     return null;
-  set x(generic-covariant-impl core::Object* x) → void {}
+  set x(covariant-by-class core::Object* x) → void {}
   method g() → void {
     super.{self::B::x} = self::f<self::D<asy::Future<self::C::U*>*>*>();
   }
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.outline.expect
index 38e2b7d..b8d091c 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.outline.expect
@@ -24,7 +24,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x;
+  covariant-by-class field self::D<self::B::T*>* x;
   synthetic constructor •() → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -43,7 +43,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     ;
-  set x(generic-covariant-impl core::Object* x) → void
+  set x(covariant-by-class core::Object* x) → void
     ;
   method g() → void
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.transformed.expect
index 95a3a94..2b490e3 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
     ;
 }
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::D<self::B::T*>* x = null;
+  covariant-by-class field self::D<self::B::T*>* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -47,7 +47,7 @@
     ;
   get x() → self::E<asy::Future<self::C::U*>*>*
     return null;
-  set x(generic-covariant-impl core::Object* x) → void {}
+  set x(covariant-by-class core::Object* x) → void {}
   method g() → void {
     super.{self::B::x} = self::f<self::D<asy::Future<self::C::U*>*>*>();
   }
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
index a3935bb..14f27fa 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
@@ -10,7 +10,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
index 50db1f8..ede8dae 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
index a621378..cf406c1 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<dynamic>* v = (#C1)<dynamic>(() → core::int* {
+static field core::List<dynamic>* v = #C1<dynamic>(() → core::int* {
   return 1;
 }){(() →* dynamic) →* core::List<dynamic>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
index 1da0ab0..4bb6315 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<dynamic>* v = (#C1)<dynamic>(() → core::int* {
+static field core::List<dynamic>* v = #C1<dynamic>(() → core::int* {
   return 1;
 }){(() →* dynamic) →* core::List<dynamic>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
index ec6dd58..1d604ce 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
@@ -10,7 +10,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
index 7deb475..621f372 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
index ccba70a..26fdda1 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
index e9a5c4e..2f8644bb 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
index fc22443..7def91f 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+  core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
     return 1;
   }){(() →* core::int*) →* core::List<core::int*>*};
 }
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
index e7778dd..a1dbf35 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+  core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
     return 1;
   }){(() →* core::int*) →* core::List<core::int*>*};
 }
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
index 432c8a0a..d720962 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::double* v = (#C1)(() → core::int* {
+  core::double* v = #C1(() → core::int* {
     return 1;
   }){(dynamic) →* core::double*};
 }
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
index 432c8a0a..d720962 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::double* v = (#C1)(() → core::int* {
+  core::double* v = #C1(() → core::int* {
     return 1;
   }){(dynamic) →* core::double*};
 }
diff --git a/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.expect b/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.expect
index beb0961..388292d 100644
--- a/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.expect
@@ -20,11 +20,11 @@
   get v6() → core::List<(self::Foo::T*) →* self::Foo::T*>*
     return #C6;
   get v7() → core::Map<self::Foo::T*, self::Foo::T*>*
-    return #C8;
+    return #C7;
   get v8() → core::Map<(self::Foo::T*) →* self::Foo::T*, self::Foo::T*>*
-    return #C9;
+    return #C8;
   get v9() → core::Map<self::Foo::T*, (self::Foo::T*) →* self::Foo::T*>*
-    return #C10;
+    return #C9;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -60,10 +60,9 @@
   #C4 = self::Bar<((Null) →* core::Object*) →* Null> {}
   #C5 = <Null>[]
   #C6 = <(core::Object*) →* Null>[]
-  #C7 = <dynamic>[]
-  #C8 = core::_ImmutableMap<Null, Null> {_kvPairs:#C7}
-  #C9 = core::_ImmutableMap<(core::Object*) →* Null, Null> {_kvPairs:#C7}
-  #C10 = core::_ImmutableMap<Null, (core::Object*) →* Null> {_kvPairs:#C7}
+  #C7 = <Null, Null>{)
+  #C8 = <(core::Object*) →* Null, Null>{)
+  #C9 = <Null, (core::Object*) →* Null>{)
 }
 
 
diff --git a/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.transformed.expect
index beb0961..388292d 100644
--- a/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/const_invocation.dart.weak.transformed.expect
@@ -20,11 +20,11 @@
   get v6() → core::List<(self::Foo::T*) →* self::Foo::T*>*
     return #C6;
   get v7() → core::Map<self::Foo::T*, self::Foo::T*>*
-    return #C8;
+    return #C7;
   get v8() → core::Map<(self::Foo::T*) →* self::Foo::T*, self::Foo::T*>*
-    return #C9;
+    return #C8;
   get v9() → core::Map<self::Foo::T*, (self::Foo::T*) →* self::Foo::T*>*
-    return #C10;
+    return #C9;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -60,10 +60,9 @@
   #C4 = self::Bar<((Null) →* core::Object*) →* Null> {}
   #C5 = <Null>[]
   #C6 = <(core::Object*) →* Null>[]
-  #C7 = <dynamic>[]
-  #C8 = core::_ImmutableMap<Null, Null> {_kvPairs:#C7}
-  #C9 = core::_ImmutableMap<(core::Object*) →* Null, Null> {_kvPairs:#C7}
-  #C10 = core::_ImmutableMap<Null, (core::Object*) →* Null> {_kvPairs:#C7}
+  #C7 = <Null, Null>{)
+  #C8 = <(core::Object*) →* Null, Null>{)
+  #C9 = <Null, (core::Object*) →* Null>{)
 }
 
 
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this.dart
index 22d5c37..ff8a546 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this.dart
@@ -25,7 +25,7 @@
     /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
 
     /*@target=Test.member*/ /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -47,7 +47,7 @@
 
     var /*@ type=B* */ v2 = /*@target=Test.member*/ /*@target=Test.member*/
         member
-            /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+             ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 =
         /*@target=Test.member*/ /*@target=Test.member*/ member
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this_upwards.dart
index c4cdedf..422d372 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_implicit_this_upwards.dart
@@ -18,10 +18,10 @@
     var /*@ type=num* */ v2 = /*@target=Test1.t*/ t = getNum();
 
     var /*@ type=int* */ v4 = /*@target=Test1.t*/ /*@target=Test1.t*/ t
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = /*@target=Test1.t*/ /*@target=Test1.t*/ t
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=int* */ v7 = /*@target=Test1.t*/ /*@target=Test1.t*/ t
         /*@target=num.+*/ += getInt();
@@ -49,13 +49,13 @@
     var /*@ type=double* */ v3 = /*@target=Test2.t*/ t = getDouble();
 
     var /*@ type=num* */ v4 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = /*@target=Test2.t*/ /*@target=Test2.t*/ t
         /*@target=num.+*/ += getInt();
@@ -84,10 +84,10 @@
     var /*@ type=double* */ v3 = /*@target=Test3.t*/ t = getDouble();
 
     var /*@ type=num* */ v5 = /*@target=Test3.t*/ /*@target=Test3.t*/ t
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v6 = /*@target=Test3.t*/ /*@target=Test3.t*/ t
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = /*@target=Test3.t*/ /*@target=Test3.t*/ t
         /*@target=double.+*/ += getInt();
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_full.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_full.dart
index cd0681b..39a70e4 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_full.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_full.dart
@@ -32,7 +32,7 @@
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [/*@ typeArgs=Index* */ f()]
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -57,7 +57,7 @@
 
     var /*@ type=B* */ v2 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_set_vs_get.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_set_vs_get.dart
index 5cd412f..e4108f8 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_set_vs_get.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_set_vs_get.dart
@@ -38,7 +38,7 @@
         /*@ typeArgs=Index* */ f()] = /*@ typeArgs=A* */ f();
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [/*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=A* */ f();
+         ??= /*@ typeArgs=A* */ f();
 
     t /*@target=Test.[]*/ /*@target=Test.[]=*/ [/*@ typeArgs=Index* */ f()]
         /*@target=B.+*/ += /*@ typeArgs=E* */ f();
@@ -54,7 +54,7 @@
 
     var /*@ type=A* */ v2 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=A* */ f();
+         ??= /*@ typeArgs=A* */ f();
 
     var /*@ type=D* */ v3 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super.dart
index 8817a4a..89b4f0a 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super.dart
@@ -32,7 +32,7 @@
 
     super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
             /*@ typeArgs=Index* */ f()]
@@ -57,7 +57,7 @@
 
     var /*@ type=B* */ v2 = super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = super /*@target=Base.[]*/ /*@target=Base.[]=*/ [
             /*@ typeArgs=Index* */ f()]
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart
index 2caca66..afa9f53 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart
@@ -25,11 +25,11 @@
 
     var /*@ type=int* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=int* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -57,15 +57,15 @@
 
     var /*@ type=int* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=num* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=int* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -95,11 +95,11 @@
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=num* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=int* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -129,11 +129,11 @@
 
     var /*@ type=num* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=num* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -161,15 +161,15 @@
 
     var /*@ type=num* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=num* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=num* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -199,11 +199,11 @@
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=num* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=num* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -233,11 +233,11 @@
 
     var /*@ type=num* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=double* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -265,15 +265,15 @@
 
     var /*@ type=num* */ v4 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getInt();
+             ??= getInt();
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=double* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=double* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
@@ -303,11 +303,11 @@
 
     var /*@ type=num* */ v5 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getNum();
+             ??= getNum();
 
     var /*@ type=double* */ v6 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
     var /*@ type=double* */ v7 =
         super /*@target=Base.[]*/ /*@target=Base.[]=*/ ['x']
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.expect
index bae6ac3..92e9469 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.expect
@@ -39,10 +39,10 @@
     ;
   operator [](core::String* s) → self::Base::T*
     return this.{self::Base::getValue}(s){(core::String*) →* self::Base::T*};
-  operator []=(core::String* s, generic-covariant-impl self::Base::U* v) → void
+  operator []=(core::String* s, covariant-by-class self::Base::U* v) → void
     return this.{self::Base::setValue}(s, v){(core::String*, self::Base::U*) →* void};
   abstract method getValue(core::String* s) → self::Base::T*;
-  abstract method setValue(core::String* s, generic-covariant-impl self::Base::U* v) → void;
+  abstract method setValue(core::String* s, covariant-by-class self::Base::U* v) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.outline.expect
index 66eb461..95eeab9 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.weak.outline.expect
@@ -7,10 +7,10 @@
     ;
   operator [](core::String* s) → self::Base::T*
     ;
-  operator []=(core::String* s, generic-covariant-impl self::Base::U* v) → void
+  operator []=(core::String* s, covariant-by-class self::Base::U* v) → void
     ;
   abstract method getValue(core::String* s) → self::Base::T*;
-  abstract method setValue(core::String* s, generic-covariant-impl self::Base::U* v) → void;
+  abstract method setValue(core::String* s, covariant-by-class self::Base::U* v) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this.dart
index 8684930..e0b9ec5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this.dart
@@ -30,7 +30,7 @@
 
     this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
@@ -55,7 +55,7 @@
 
     var /*@ type=B* */ v2 = this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = this /*@target=Test.[]*/ /*@target=Test.[]=*/ [
             /*@ typeArgs=Index* */ f()]
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart
index f9e34c4..f6d9aab 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart
@@ -20,11 +20,11 @@
 
     var /*@ type=int* */ v4 = this
             /*@target=Test1.[]*/ /*@target=Test1.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test1.[]*/ /*@target=Test1.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=int* */ v7 = this
             /*@target=Test1.[]*/ /*@target=Test1.[]=*/ ['x']
@@ -56,15 +56,15 @@
 
     var /*@ type=int* */ v4 = this
             /*@target=Test2.[]*/ /*@target=Test2.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test2.[]*/ /*@target=Test2.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = this
             /*@target=Test2.[]*/ /*@target=Test2.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=int* */ v7 = this
             /*@target=Test2.[]*/ /*@target=Test2.[]=*/ ['x']
@@ -98,11 +98,11 @@
 
     var /*@ type=num* */ v5 = this
             /*@target=Test3.[]*/ /*@target=Test3.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = this
             /*@target=Test3.[]*/ /*@target=Test3.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=int* */ v7 = this
             /*@target=Test3.[]*/ /*@target=Test3.[]=*/ ['x']
@@ -136,11 +136,11 @@
 
     var /*@ type=num* */ v4 = this
             /*@target=Test4.[]*/ /*@target=Test4.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test4.[]*/ /*@target=Test4.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v7 = this
             /*@target=Test4.[]*/ /*@target=Test4.[]=*/ ['x']
@@ -172,15 +172,15 @@
 
     var /*@ type=num* */ v4 = this
             /*@target=Test5.[]*/ /*@target=Test5.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test5.[]*/ /*@target=Test5.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = this
             /*@target=Test5.[]*/ /*@target=Test5.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = this
             /*@target=Test5.[]*/ /*@target=Test5.[]=*/ ['x']
@@ -214,11 +214,11 @@
 
     var /*@ type=num* */ v5 = this
             /*@target=Test6.[]*/ /*@target=Test6.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = this
             /*@target=Test6.[]*/ /*@target=Test6.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = this
             /*@target=Test6.[]*/ /*@target=Test6.[]=*/ ['x']
@@ -253,11 +253,11 @@
 
     var /*@ type=num* */ v4 = this
             /*@target=Test7.[]*/ /*@target=Test7.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test7.[]*/ /*@target=Test7.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v7 = this
             /*@target=Test7.[]*/ /*@target=Test7.[]=*/ ['x']
@@ -291,15 +291,15 @@
 
     var /*@ type=num* */ v4 = this
             /*@target=Test8.[]*/ /*@target=Test8.[]=*/ ['x']
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = this
             /*@target=Test8.[]*/ /*@target=Test8.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v6 = this
             /*@target=Test8.[]*/ /*@target=Test8.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = this
             /*@target=Test8.[]*/ /*@target=Test8.[]=*/ ['x']
@@ -334,11 +334,11 @@
 
     var /*@ type=num* */ v5 = this
             /*@target=Test9.[]*/ /*@target=Test9.[]=*/ ['x']
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v6 = this
             /*@target=Test9.[]*/ /*@target=Test9.[]=*/ ['x']
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = this
             /*@target=Test9.[]*/ /*@target=Test9.[]=*/ ['x']
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart
index caebb26..7980f3f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart
@@ -20,10 +20,10 @@
   var /*@ type=num* */ v2 = t /*@target=Test.[]=*/ ['x'] = getNum();
 
   var /*@ type=int* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=int* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -48,13 +48,13 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=int* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=num* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=int* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -81,10 +81,10 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=num* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=int* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -111,10 +111,10 @@
   var /*@ type=num* */ v2 = t /*@target=Test.[]=*/ ['x'] = getNum();
 
   var /*@ type=num* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=num* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -139,13 +139,13 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=num* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=num* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=num* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -172,10 +172,10 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=num* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=num* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=num.+*/ +=
@@ -202,10 +202,10 @@
   var /*@ type=num* */ v2 = t /*@target=Test.[]=*/ ['x'] = getNum();
 
   var /*@ type=num* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=double* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=double.+*/ +=
@@ -231,13 +231,13 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=num* */ v4 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getInt();
+       ??= getInt();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=double* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=double* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=double.+*/ +=
@@ -265,10 +265,10 @@
   var /*@ type=double* */ v3 = t /*@target=Test.[]=*/ ['x'] = getDouble();
 
   var /*@ type=num* */ v5 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getNum();
+       ??= getNum();
 
   var /*@ type=double* */ v6 = t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x']
-      /*@target=num.==*/ ??= getDouble();
+       ??= getDouble();
 
   var /*@ type=double* */ v7 =
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=double.+*/ +=
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.expect
index 3b91dc5..895c644 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.expect
@@ -38,7 +38,7 @@
     : super core::Object::•()
     ;
   abstract operator [](core::String* s) → self::Test::T*;
-  abstract operator []=(core::String* s, generic-covariant-impl self::Test::U* v) → void;
+  abstract operator []=(core::String* s, covariant-by-class self::Test::U* v) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.outline.expect
index 1ab0c92..56cb2b5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Test<self::Test::T*, self::Test::U*>*
     ;
   abstract operator [](core::String* s) → self::Test::T*;
-  abstract operator []=(core::String* s, generic-covariant-impl self::Test::U* v) → void;
+  abstract operator []=(core::String* s, covariant-by-class self::Test::U* v) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_local.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_local.dart
index 17b741e..d6b952a 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_local.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_local.dart
@@ -22,7 +22,7 @@
   B local;
   local = /*@ typeArgs=B* */ f();
 
-  local /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  local  ??= /*@ typeArgs=B* */ f();
 
   local /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -37,7 +37,7 @@
   var /*@ type=B* */ v1 = local = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      local /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      local  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 = local
       /*@target=B.+*/ += /*@ typeArgs=C* */ f();
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_local_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_local_upwards.dart
index 52101cc..6a3242d 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_local_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_local_upwards.dart
@@ -14,9 +14,9 @@
 
   var /*@ type=num* */ v2 = t = getNum();
 
-  var /*@ type=int* */ v4 = t /*@target=num.==*/ ??= getInt();
+  var /*@ type=int* */ v4 = t ??= getInt();
 
-  var /*@ type=num* */ v5 = t /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = t ??= getNum();
 
   var /*@ type=int* */ v7 = t /*@target=num.+*/ += getInt();
 
@@ -35,11 +35,11 @@
 
   var /*@ type=double* */ v3 = t = getDouble();
 
-  var /*@ type=num* */ v4 = t /*@target=num.==*/ ??= getInt();
+  var /*@ type=num* */ v4 = t ??= getInt();
 
-  var /*@ type=num* */ v5 = t /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = t ??= getNum();
 
-  var /*@ type=num* */ v6 = t /*@target=num.==*/ ??= getDouble();
+  var /*@ type=num* */ v6 = t ??= getDouble();
 
   var /*@ type=num* */ v7 = t /*@target=num.+*/ += getInt();
 
@@ -58,9 +58,9 @@
 
   var /*@ type=double* */ v3 = t = getDouble();
 
-  var /*@ type=num* */ v5 = t /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = t ??= getNum();
 
-  var /*@ type=double* */ v6 = t /*@target=num.==*/ ??= getDouble();
+  var /*@ type=double* */ v6 = t ??= getDouble();
 
   var /*@ type=double* */ v7 = t /*@target=double.+*/ += getInt();
 
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_full.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_full.dart
index c112d9c..24d478e 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_full.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_full.dart
@@ -24,7 +24,7 @@
   static void test(Test t) {
     t. /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
     /*@ type=Test* */ /*@target=Test.member*/ t. /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
     /*@ type=Test* */ t. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
     /*@ type=Test* */ t. /*@target=Test.member*/ /*@target=Test.member*/ member
@@ -40,7 +40,7 @@
     var /*@ type=B* */ v2 =
         /*@ type=Test* */ /*@target=Test.member*/ t
                 . /*@target=Test.member*/ member
-            /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+             ??= /*@ typeArgs=B* */ f();
     var /*@ type=A* */ v3 =
         /*@ type=Test* */ t
                 . /*@target=Test.member*/ /*@target=Test.member*/ member
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware.dart
index 5719c09..0905ef9 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware.dart
@@ -22,60 +22,60 @@
   B member;
 
   static void test(Test t) {
-    /*@ type=Test* */ /*@target=Test.==*/ t
+    /*@ type=Test* */  t
         ?. /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t?.
+     t?.
             /*@target=Test.member*/ /*@target=Test.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t?.
+     t?.
             /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
-    /*@target=Test.==*/ t?.
+     t?.
             /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.**/ *= /*@ typeArgs=B* */ f();
 
-    /*@target=Test.==*/ t?.
+     t?.
             /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.&*/ &= /*@ typeArgs=A* */ f();
 
-    /*@target=B.-*/ -- /*@target=Test.==*/ t?.
+    /*@target=B.-*/ --  t?.
         /*@target=Test.member*/ /*@target=Test.member*/ member;
 
-    /*@target=Test.==*/ t?.
+     t?.
             /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.-*/ --;
 
     var /*@ type=B* */ v1 =
-        /*@ type=Test* */ /*@target=Test.==*/ t
+        /*@ type=Test* */  t
             ?. /*@target=Test.member*/ member = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
-            /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+             ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
     var /*@ type=B* */ v4 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.**/ *= /*@ typeArgs=B* */ f();
 
     var /*@ type=C* */ v5 =
-        /*@target=Test.==*/ t
+         t
                 ?. /*@target=Test.member*/ /*@target=Test.member*/ member
             /*@target=B.&*/ &= /*@ typeArgs=A* */ f();
 
-    var /*@ type=B* */ v6 = /*@target=B.-*/ -- /*@target=Test.==*/ t
+    var /*@ type=B* */ v6 = /*@target=B.-*/ --  t
         ?. /*@target=Test.member*/ /*@target=Test.member*/ member;
 
-    var /*@ type=B* */ v7 = /*@target=Test.==*/ t
+    var /*@ type=B* */ v7 =  t
             ?. /*@target=Test.member*/ /*@target=Test.member*/ member
         /*@target=B.-*/ --;
   }
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart
index b72b887..692f54f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart
@@ -13,33 +13,33 @@
   int prop;
 
   static void test(Test1 t) {
-    var /*@ type=int* */ v1 = /*@ type=Test1* */ /*@target=Test1.==*/ t
+    var /*@ type=int* */ v1 = /*@ type=Test1* */  t
         ?. /*@target=Test1.prop*/ prop = getInt();
 
-    var /*@ type=num* */ v2 = /*@ type=Test1* */ /*@target=Test1.==*/ t
+    var /*@ type=num* */ v2 = /*@ type=Test1* */  t
         ?. /*@target=Test1.prop*/ prop = getNum();
 
-    var /*@ type=int* */ v4 = /*@target=Test1.==*/ t?.
+    var /*@ type=int* */ v4 =  t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
-    var /*@ type=num* */ v5 = /*@target=Test1.==*/ t?.
+    var /*@ type=num* */ v5 =  t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
-    var /*@ type=int* */ v7 = /*@target=Test1.==*/ t?.
+    var /*@ type=int* */ v7 =  t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
         /*@target=num.+*/ += getInt();
 
-    var /*@ type=num* */ v8 = /*@target=Test1.==*/ t?.
+    var /*@ type=num* */ v8 =  t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
         /*@target=num.+*/ += getNum();
 
     var /*@ type=int* */ v10 = /*@target=num.+*/ ++
-        /*@target=Test1.==*/ t?.
+         t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop;
 
-    var /*@ type=int* */ v11 = /*@target=Test1.==*/ t?.
+    var /*@ type=int* */ v11 =  t?.
             /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
         /*@target=num.+*/ ++;
   }
@@ -49,43 +49,43 @@
   num prop;
 
   static void test(Test2 t) {
-    var /*@ type=int* */ v1 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=int* */ v1 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getInt();
 
-    var /*@ type=num* */ v2 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=num* */ v2 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getNum();
 
-    var /*@ type=double* */ v3 = /*@ type=Test2* */ /*@target=Test2.==*/ t
+    var /*@ type=double* */ v3 = /*@ type=Test2* */  t
         ?. /*@target=Test2.prop*/ prop = getDouble();
 
-    var /*@ type=num* */ v4 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v4 =  t?.
             /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
-    var /*@ type=num* */ v5 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v5 =  t?.
             /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
-    var /*@ type=num* */ v6 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v6 =  t?.
             /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
-    var /*@ type=num* */ v7 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v7 =  t?.
             /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
         /*@target=num.+*/ += getInt();
 
-    var /*@ type=num* */ v8 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v8 =  t?.
             /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
         /*@target=num.+*/ += getNum();
 
-    var /*@ type=num* */ v9 = /*@target=Test2.==*/ t?.
+    var /*@ type=num* */ v9 =  t?.
         /*@target=Test2.prop*/ /*@target=Test2.prop*/
         prop /*@target=num.+*/ += getDouble();
 
-    var /*@ type=num* */ v10 = /*@target=num.+*/ ++ /*@target=Test2.==*/
+    var /*@ type=num* */ v10 = /*@target=num.+*/ ++ 
         t?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop;
 
-    var /*@ type=num* */ v11 = /*@target=Test2.==*/
+    var /*@ type=num* */ v11 = 
         t?. /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
         /*@target=num.+*/ ++;
   }
@@ -95,39 +95,39 @@
   double prop;
 
   static void test3(Test3 t) {
-    var /*@ type=num* */ v2 = /*@ type=Test3* */ /*@target=Test3.==*/ t
+    var /*@ type=num* */ v2 = /*@ type=Test3* */  t
         ?. /*@target=Test3.prop*/ prop = getNum();
 
-    var /*@ type=double* */ v3 = /*@ type=Test3* */ /*@target=Test3.==*/ t
+    var /*@ type=double* */ v3 = /*@ type=Test3* */  t
         ?. /*@target=Test3.prop*/ prop = getDouble();
 
-    var /*@ type=num* */ v5 = /*@target=Test3.==*/ t?.
+    var /*@ type=num* */ v5 =  t?.
             /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v6 =
-        /*@target=Test3.==*/ t?.
+         t?.
                 /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
-            /*@target=num.==*/ ??= getDouble();
+             ??= getDouble();
 
-    var /*@ type=double* */ v7 = /*@target=Test3.==*/ t?.
+    var /*@ type=double* */ v7 =  t?.
             /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
         /*@target=double.+*/ += getInt();
 
-    var /*@ type=double* */ v8 = /*@target=Test3.==*/ t?.
+    var /*@ type=double* */ v8 =  t?.
             /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
         /*@target=double.+*/ += getNum();
 
     var /*@ type=double* */ v9 =
-        /*@target=Test3.==*/ t?.
+         t?.
                 /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
             /*@target=double.+*/ += getDouble();
 
     var /*@ type=double* */ v10 = /*@target=double.+*/ ++
-        /*@target=Test3.==*/ t?.
+         t?.
             /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop;
 
-    var /*@ type=double* */ v11 = /*@target=Test3.==*/
+    var /*@ type=double* */ v11 = 
         t?. /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
         /*@target=double.+*/ ++;
   }
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_super.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_super.dart
index 48ef55d..00881df 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_super.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_super.dart
@@ -27,7 +27,7 @@
     super.member = /*@ typeArgs=B* */ f();
 
     super. /*@target=Base.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     super. /*@target=Base.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -46,7 +46,7 @@
     var /*@ type=B* */ v1 = super.member = /*@ typeArgs=B* */ f();
 
     var /*@ type=B* */ v2 = super. /*@target=Base.member*/ member
-        /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+         ??= /*@ typeArgs=B* */ f();
 
     var /*@ type=A* */ v3 = super. /*@target=Base.member*/ member
         /*@target=B.+*/ += /*@ typeArgs=C* */ f();
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_super_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_super_upwards.dart
index c04c80e..fb14b71 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_super_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_super_upwards.dart
@@ -22,10 +22,10 @@
     var /*@ type=num* */ v2 = super.intProp = getNum();
 
     var /*@ type=int* */ v4 = super. /*@target=Base.intProp*/ intProp
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = super. /*@target=Base.intProp*/ intProp
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=int* */ v7 = super. /*@target=Base.intProp*/ intProp
         /*@target=num.+*/ += getInt();
@@ -51,13 +51,13 @@
     var /*@ type=double* */ v3 = super.numProp = getDouble();
 
     var /*@ type=num* */ v4 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
 
     var /*@ type=num* */ v5 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=num* */ v6 = super. /*@target=Base.numProp*/ numProp
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=num* */ v7 = super. /*@target=Base.numProp*/ numProp
         /*@target=num.+*/ += getInt();
@@ -84,10 +84,10 @@
     var /*@ type=double* */ v3 = super.doubleProp = getDouble();
 
     var /*@ type=num* */ v5 = super. /*@target=Base.doubleProp*/ doubleProp
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
 
     var /*@ type=double* */ v6 = super. /*@target=Base.doubleProp*/ doubleProp
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
 
     var /*@ type=double* */ v7 = super
         . /*@target=Base.doubleProp*/
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_upwards.dart
index e7d6d4b..e3c79e3 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_upwards.dart
@@ -17,10 +17,10 @@
     var /*@ type=num* */ v2 = t. /*@target=Test1.prop*/ prop = getNum();
     var /*@ type=int* */ v4 = /*@ type=Test1* */ /*@target=Test1.prop*/ t
             . /*@target=Test1.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
     var /*@ type=num* */ v5 = /*@ type=Test1* */ /*@target=Test1.prop*/ t
             . /*@target=Test1.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
     var /*@ type=int* */ v7 = /*@ type=Test1* */ t
             . /*@target=Test1.prop*/ /*@target=Test1.prop*/ prop
         /*@target=num.+*/ += getInt();
@@ -45,13 +45,13 @@
     var /*@ type=double* */ v3 = t. /*@target=Test2.prop*/ prop = getDouble();
     var /*@ type=num* */ v4 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getInt();
+         ??= getInt();
     var /*@ type=num* */ v5 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
     var /*@ type=num* */ v6 = /*@ type=Test2* */ /*@target=Test2.prop*/ t
             . /*@target=Test2.prop*/ prop
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
     var /*@ type=num* */ v7 = /*@ type=Test2* */ t
             . /*@target=Test2.prop*/ /*@target=Test2.prop*/ prop
         /*@target=num.+*/ += getInt();
@@ -78,10 +78,10 @@
     var /*@ type=double* */ v3 = t. /*@target=Test3.prop*/ prop = getDouble();
     var /*@ type=num* */ v5 = /*@ type=Test3* */ /*@target=Test3.prop*/ t
             . /*@target=Test3.prop*/ prop
-        /*@target=num.==*/ ??= getNum();
+         ??= getNum();
     var /*@ type=double* */ v6 = /*@ type=Test3* */ /*@target=Test3.prop*/ t
             . /*@target=Test3.prop*/ prop
-        /*@target=num.==*/ ??= getDouble();
+         ??= getDouble();
     var /*@ type=double* */ v7 = /*@ type=Test3* */ t
             . /*@target=Test3.prop*/ /*@target=Test3.prop*/ prop
         /*@target=double.+*/ += getInt();
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_static.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_static.dart
index 1f4c19b..c09b270 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_static.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_static.dart
@@ -25,7 +25,7 @@
 void test_topLevelVariable() {
   topLevelVariable = /*@ typeArgs=B* */ f();
 
-  topLevelVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  topLevelVariable  ??= /*@ typeArgs=B* */ f();
 
   topLevelVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -40,7 +40,7 @@
   var /*@ type=B* */ v1 = topLevelVariable = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      topLevelVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      topLevelVariable  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 =
       topLevelVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
@@ -60,7 +60,7 @@
 void test_staticVariable() {
   B.staticVariable = /*@ typeArgs=B* */ f();
 
-  B.staticVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+  B.staticVariable  ??= /*@ typeArgs=B* */ f();
 
   B.staticVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
 
@@ -75,7 +75,7 @@
   var /*@ type=B* */ v1 = B.staticVariable = /*@ typeArgs=B* */ f();
 
   var /*@ type=B* */ v2 =
-      B.staticVariable /*@target=A.==*/ ??= /*@ typeArgs=B* */ f();
+      B.staticVariable  ??= /*@ typeArgs=B* */ f();
 
   var /*@ type=A* */ v3 =
       B.staticVariable /*@target=B.+*/ += /*@ typeArgs=C* */ f();
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_static_upwards.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_static_upwards.dart
index 4b22632..237f648 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_static_upwards.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_static_upwards.dart
@@ -18,9 +18,9 @@
 
   var /*@ type=num* */ v2 = topLevelInt = getNum();
 
-  var /*@ type=int* */ v4 = topLevelInt /*@target=num.==*/ ??= getInt();
+  var /*@ type=int* */ v4 = topLevelInt  ??= getInt();
 
-  var /*@ type=num* */ v5 = topLevelInt /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = topLevelInt  ??= getNum();
 
   var /*@ type=int* */ v7 = topLevelInt /*@target=num.+*/ += getInt();
 
@@ -39,11 +39,11 @@
 
   var /*@ type=double* */ v3 = topLevelNum = getDouble();
 
-  var /*@ type=num* */ v4 = topLevelNum /*@target=num.==*/ ??= getInt();
+  var /*@ type=num* */ v4 = topLevelNum  ??= getInt();
 
-  var /*@ type=num* */ v5 = topLevelNum /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = topLevelNum  ??= getNum();
 
-  var /*@ type=num* */ v6 = topLevelNum /*@target=num.==*/ ??= getDouble();
+  var /*@ type=num* */ v6 = topLevelNum  ??= getDouble();
 
   var /*@ type=num* */ v7 = topLevelNum /*@target=num.+*/ += getInt();
 
@@ -62,10 +62,10 @@
 
   var /*@ type=double* */ v3 = topLevelDouble = getDouble();
 
-  var /*@ type=num* */ v5 = topLevelDouble /*@target=num.==*/ ??= getNum();
+  var /*@ type=num* */ v5 = topLevelDouble  ??= getNum();
 
   var /*@ type=double* */ v6 =
-      topLevelDouble /*@target=num.==*/ ??= getDouble();
+      topLevelDouble  ??= getDouble();
 
   var /*@ type=double* */ v7 = topLevelDouble /*@target=double.+*/ += getInt();
 
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
index 7478374..22e5ba7 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
@@ -21,6 +21,6 @@
 var a = new A();
 var x = a. /*@target=A.b*/ b. /*@target=B.c*/ c;
 var y = a. /*@ type=B* */ /*@target=A.b*/ /*@target=B.c*/ b. /*@target=B.c*/ c
-    /*@target=C.==*/ ??= new D();
+     ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.expect b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.expect
index 7934529..ea950c6 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.expect
@@ -40,12 +40,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.outline.expect b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.outline.expect
index 8899b99..da2cfcc 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.outline.expect
@@ -38,12 +38,12 @@
 class C extends core::Object {
   synthetic constructor •() → self::C*
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.transformed.expect
index 7934529..ea950c6 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.weak.transformed.expect
@@ -40,12 +40,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
index c7d7e2b..89d50fb 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
@@ -20,6 +20,6 @@
 var a = new A();
 var x = a. /*@target=A.b*/ b. /*@target=B.c*/ c;
 var y = a. /*@ type=B* */ /*@target=A.b*/ /*@target=B.c*/ b
-    . /*@target=B.c*/ c /*@target=C.==*/ ??= new D();
+    . /*@target=B.c*/ c ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.expect
index 07d3dfd..b174194 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.expect
@@ -38,12 +38,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.outline.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.outline.expect
index 1ad86f8..06be72a 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.outline.expect
@@ -35,12 +35,12 @@
 class C extends core::Object {
   synthetic constructor •() → self::C*
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.transformed.expect
index 07d3dfd..b174194 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.weak.transformed.expect
@@ -38,12 +38,12 @@
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
   abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
   abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
+  abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
   abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
diff --git a/pkg/front_end/testcases/inference_new/null_aware_property_get.dart b/pkg/front_end/testcases/inference_new/null_aware_property_get.dart
index 9722b96..1aeaa68 100644
--- a/pkg/front_end/testcases/inference_new/null_aware_property_get.dart
+++ b/pkg/front_end/testcases/inference_new/null_aware_property_get.dart
@@ -11,6 +11,5 @@
 
 main() {
   Class c;
-  num Function() f = /*@target=Class.==*/ /*@type=Class**/ c
-      ?. /*@target=Class.method*/ method;
+  num Function() f = /*@type=Class**/ c?. /*@target=Class.method*/ method;
 }
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.expect
index 91a7c07..b2841e6 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.expect
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator [](generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  operator [](covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -46,7 +46,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  operator [](generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  operator [](covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     return null;
   method h() → void {
     self::D<asy::Future<self::C::U*>*>* x = super.{self::B::[]}(self::f<self::E<asy::Future<self::C::U*>*>*>());
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.outline.expect
index 190da32..968cab6 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.outline.expect
@@ -26,7 +26,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  operator [](generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  operator [](covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -42,7 +42,7 @@
 class C<U extends core::Object* = dynamic> extends self::B<asy::Future<self::C::U*>*> {
   synthetic constructor •() → self::C<self::C::U*>*
     ;
-  operator [](generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  operator [](covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     ;
   method h() → void
     ;
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.transformed.expect
index 91a7c07..b2841e6 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.weak.transformed.expect
@@ -29,7 +29,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator [](generic-covariant-impl self::E<self::B::T*>* x) → self::D<self::B::T*>*
+  operator [](covariant-by-class self::E<self::B::T*>* x) → self::D<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -46,7 +46,7 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super self::B::•()
     ;
-  operator [](generic-covariant-impl core::Object* x) → self::E<asy::Future<self::C::U*>*>*
+  operator [](covariant-by-class core::Object* x) → self::E<asy::Future<self::C::U*>*>*
     return null;
   method h() → void {
     self::D<asy::Future<self::C::U*>*>* x = super.{self::B::[]}(self::f<self::E<asy::Future<self::C::U*>*>*>());
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
index ccba70a..26fdda1 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
index e9a5c4e..2f8644bb 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
index ccba70a..26fdda1 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
index e9a5c4e..2f8644bb 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-static field core::List<core::int*>* v = (#C1)<core::int*>(() → core::int* {
+static field core::List<core::int*>* v = #C1<core::int*>(() → core::int* {
   return 1;
 }){(() →* core::int*) →* core::List<core::int*>*};
 static method f<T extends core::Object* = dynamic>(() →* self::f::T* g) → core::List<self::f::T*>*
diff --git a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
index 42ba9e8..78c816d 100644
--- a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.strong.expect
@@ -26,7 +26,7 @@
     this.{self::A::_#A#invariantField} = #t2;
   get covariantField() → core::num
     return let final core::num? #t3 = this.{self::A::_#A#covariantField}{core::num?} in #t3 == null ?{core::num} throw new _in::LateError::fieldNI("covariantField") : #t3{core::num};
-  set covariantField(covariant core::num #t4) → void
+  set covariantField(covariant-by-declaration core::num #t4) → void
     this.{self::A::_#A#covariantField} = #t4;
 }
 abstract class B extends core::Object implements self::A {
@@ -36,7 +36,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -45,15 +45,15 @@
   abstract get invariantField() → core::int;
   set invariantField(core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void {}
+  set invariantField(covariant-by-declaration core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
index 57c3e7c..c2ac0b9 100644
--- a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.expect
@@ -30,7 +30,7 @@
   }
   get covariantField() → core::num
     return this.{self::A::_#A#covariantField#isSet}{core::bool} ?{core::num} let final core::num? #t3 = this.{self::A::_#A#covariantField}{core::num?} in #t3{core::num} : throw new _in::LateError::fieldNI("covariantField");
-  set covariantField(covariant core::num #t4) → void {
+  set covariantField(covariant-by-declaration core::num #t4) → void {
     this.{self::A::_#A#covariantField#isSet} = true;
     this.{self::A::_#A#covariantField} = #t4;
   }
@@ -42,7 +42,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -51,15 +51,15 @@
   abstract get invariantField() → core::int;
   set invariantField(core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void {}
+  set invariantField(covariant-by-declaration core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.outline.expect
index 3d8fe4d..9bc19d0 100644
--- a/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/covariant_late_field.dart.weak.outline.expect
@@ -23,7 +23,7 @@
   get invariantField() → core::num;
   set invariantField(core::num #t1) → void;
   get covariantField() → core::num;
-  set covariantField(covariant core::num #t2) → void;
+  set covariantField(covariant-by-declaration core::num #t2) → void;
 }
 abstract class B extends core::Object implements self::A {
   synthetic constructor •() → self::B
@@ -31,7 +31,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -40,17 +40,17 @@
   set invariantField(core::int value) → void
     ;
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void
+  set covariantField(covariant-by-declaration core::int value) → void
     ;
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void
+  set invariantField(covariant-by-declaration core::int value) → void
     ;
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void
+  set covariantField(covariant-by-declaration core::int value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
index f161d74..0231470 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.expect
@@ -56,7 +56,7 @@
   }
   get property6() → core::int
     return let final core::int? #t4 = this.{self::A::_#A#property6}{core::int?} in #t4 == null ?{core::int} throw new _in::LateError::fieldNI("property6") : #t4{core::int};
-  set property6(covariant core::int #t5) → void
+  set property6(covariant-by-declaration core::int #t5) → void
     this.{self::A::_#A#property6} = #t5;
 }
 abstract class B1 extends core::Object {
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
index f161d74..0231470 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.strong.transformed.expect
@@ -56,7 +56,7 @@
   }
   get property6() → core::int
     return let final core::int? #t4 = this.{self::A::_#A#property6}{core::int?} in #t4 == null ?{core::int} throw new _in::LateError::fieldNI("property6") : #t4{core::int};
-  set property6(covariant core::int #t5) → void
+  set property6(covariant-by-declaration core::int #t5) → void
     this.{self::A::_#A#property6} = #t5;
 }
 abstract class B1 extends core::Object {
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
index 6a04d36..12210ba 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.expect
@@ -60,7 +60,7 @@
   }
   get property6() → core::int
     return this.{self::A::_#A#property6#isSet}{core::bool} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6}{core::int?} in #t4{core::int} : throw new _in::LateError::fieldNI("property6");
-  set property6(covariant core::int #t5) → void {
+  set property6(covariant-by-declaration core::int #t5) → void {
     this.{self::A::_#A#property6#isSet} = true;
     this.{self::A::_#A#property6} = #t5;
   }
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.outline.expect
index 672ef21..85eb6cb 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.outline.expect
@@ -49,7 +49,7 @@
   get property5() → core::int?;
   set property5(core::int? #t2) → void;
   get property6() → core::int;
-  set property6(covariant core::int #t3) → void;
+  set property6(covariant-by-declaration core::int #t3) → void;
 }
 abstract class B1 extends core::Object {
   field core::int? _#B1#property4;
diff --git a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
index 6a04d36..12210ba 100644
--- a/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/getter_vs_setter_type.dart.weak.transformed.expect
@@ -60,7 +60,7 @@
   }
   get property6() → core::int
     return this.{self::A::_#A#property6#isSet}{core::bool} ?{core::int} let final core::int? #t4 = this.{self::A::_#A#property6}{core::int?} in #t4{core::int} : throw new _in::LateError::fieldNI("property6");
-  set property6(covariant core::int #t5) → void {
+  set property6(covariant-by-declaration core::int #t5) → void {
     this.{self::A::_#A#property6#isSet} = true;
     this.{self::A::_#A#property6} = #t5;
   }
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
index d676a26..e8923f9 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.expect
@@ -8,7 +8,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     lowered self::A::T? #value;
     lowered core::bool #value#isSet = false;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
index d676a26..e8923f9 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     lowered self::A::T? #value;
     lowered core::bool #value#isSet = false;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
index d676a26..e8923f9 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.expect
@@ -8,7 +8,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     lowered self::A::T? #value;
     lowered core::bool #value#isSet = false;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.outline.expect
index f2c5efd..10e855d 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic
+  method bar(covariant-by-class self::A::T% value) → dynamic
     ;
   method foo() → dynamic
     ;
diff --git a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
index d676a26..e8923f9 100644
--- a/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40601.dart.weak.transformed.expect
@@ -8,7 +8,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     lowered self::A::T? #value;
     lowered core::bool #value#isSet = false;
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
index d9d0eaa..ccb488e 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.expect
@@ -10,7 +10,7 @@
     ;
   get x() → core::int
     return let final core::int? #t1 = this.{self::C::_#C#x}{core::int?} in #t1 == null ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
-  set x(covariant core::int #t2) → void
+  set x(covariant-by-declaration core::int #t2) → void
     if(this.{self::C::_#C#x}{core::int?} == null)
       this.{self::C::_#C#x} = #t2;
     else
@@ -20,7 +20,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
index d9d0eaa..ccb488e 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
     ;
   get x() → core::int
     return let final core::int? #t1 = this.{self::C::_#C#x}{core::int?} in #t1 == null ?{core::int} throw new _in::LateError::fieldNI("x") : #t1{core::int};
-  set x(covariant core::int #t2) → void
+  set x(covariant-by-declaration core::int #t2) → void
     if(this.{self::C::_#C#x}{core::int?} == null)
       this.{self::C::_#C#x} = #t2;
     else
@@ -20,7 +20,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
index 5807cfc..a37d11f 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.expect
@@ -11,7 +11,7 @@
     ;
   get x() → core::int
     return this.{self::C::_#C#x#isSet}{core::bool} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x}{core::int?} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
-  set x(covariant core::int #t2) → void
+  set x(covariant-by-declaration core::int #t2) → void
     if(this.{self::C::_#C#x#isSet}{core::bool})
       throw new _in::LateError::fieldAI("x");
     else {
@@ -23,7 +23,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.outline.expect
index 3eeb3af..b50e707 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.outline.expect
@@ -8,12 +8,12 @@
   synthetic constructor •() → self::C
     ;
   get x() → core::int;
-  set x(covariant core::int #t1) → void;
+  set x(covariant-by-declaration core::int #t1) → void;
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     ;
-  set x(covariant core::num value) → void
+  set x(covariant-by-declaration core::num value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
index 5807cfc..a37d11f 100644
--- a/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue40805.dart.weak.transformed.expect
@@ -11,7 +11,7 @@
     ;
   get x() → core::int
     return this.{self::C::_#C#x#isSet}{core::bool} ?{core::int} let final core::int? #t1 = this.{self::C::_#C#x}{core::int?} in #t1{core::int} : throw new _in::LateError::fieldNI("x");
-  set x(covariant core::int #t2) → void
+  set x(covariant-by-declaration core::int #t2) → void
     if(this.{self::C::_#C#x#isSet}{core::bool})
       throw new _in::LateError::fieldAI("x");
     else {
@@ -23,7 +23,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
index f4a96a9..de82c1f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
@@ -44,6 +44,6 @@
   #C1 = #org-dartlang-testcase:///issue41436c.dart::_#A#x
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///issue41436c.dart::_#A#x=
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
index 2a07753..3487b8a 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
@@ -44,6 +44,6 @@
   #C1 = #org-dartlang-testcase:///issue41436c.dart::_#A#x
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///issue41436c.dart::_#A#x=
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
index 963d836..105770f 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
@@ -51,7 +51,7 @@
   #C1 = #org-dartlang-testcase:///issue41436c.dart::_#A#x#isSet
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///issue41436c.dart::_#A#x
   #C6 = #org-dartlang-testcase:///issue41436c.dart::_#A#x#isSet=
   #C7 = #org-dartlang-testcase:///issue41436c.dart::_#A#x=
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.outline.expect
index 4f3a9d5..d7ce4ef 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.outline.expect
@@ -43,15 +43,15 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> SymbolConstant(#_#A#x#isSet)
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> SymbolConstant(#_#A#x)
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> SymbolConstant(#_#A#x#isSet=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> SymbolConstant(#_#A#x=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///issue41436c_lib.dart:6:12 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 38, effectively constant: 14
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
index 3f54bd2..d06c920 100644
--- a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
@@ -51,7 +51,7 @@
   #C1 = #org-dartlang-testcase:///issue41436c.dart::_#A#x#isSet
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///issue41436c.dart::_#A#x
   #C6 = #org-dartlang-testcase:///issue41436c.dart::_#A#x#isSet=
   #C7 = #org-dartlang-testcase:///issue41436c.dart::_#A#x=
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
index c0a69a4..16c8e79 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.expect
@@ -4,26 +4,26 @@
 import "dart:_internal" as _in;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _#A#x = null;
+  covariant-by-class field self::A::T? _#A#x = null;
   field core::bool _#A#x#isSet = false;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
   get x() → self::A::T%
     return this.{self::A::_#A#x#isSet}{core::bool} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x}{self::A::T?} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
-  set x(generic-covariant-impl self::A::T% #t2) → void {
+  set x(covariant-by-class self::A::T% #t2) → void {
     this.{self::A::_#A#x#isSet} = true;
     this.{self::A::_#A#x} = #t2;
   }
 }
 class B<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T? _y = null;
+  covariant-by-class field self::B::T? _y = null;
   synthetic constructor •() → self::B<self::B::T%>
     : super core::Object::•()
     ;
   get y() → self::B::T?
     return this.{self::B::_y}{self::B::T?};
-  set y(generic-covariant-impl self::B::T? val) → void {
+  set y(covariant-by-class self::B::T? val) → void {
     this.{self::B::_y} = val;
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
index c0a69a4..16c8e79 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.strong.transformed.expect
@@ -4,26 +4,26 @@
 import "dart:_internal" as _in;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _#A#x = null;
+  covariant-by-class field self::A::T? _#A#x = null;
   field core::bool _#A#x#isSet = false;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
   get x() → self::A::T%
     return this.{self::A::_#A#x#isSet}{core::bool} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x}{self::A::T?} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
-  set x(generic-covariant-impl self::A::T% #t2) → void {
+  set x(covariant-by-class self::A::T% #t2) → void {
     this.{self::A::_#A#x#isSet} = true;
     this.{self::A::_#A#x} = #t2;
   }
 }
 class B<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T? _y = null;
+  covariant-by-class field self::B::T? _y = null;
   synthetic constructor •() → self::B<self::B::T%>
     : super core::Object::•()
     ;
   get y() → self::B::T?
     return this.{self::B::_y}{self::B::T?};
-  set y(generic-covariant-impl self::B::T? val) → void {
+  set y(covariant-by-class self::B::T? val) → void {
     this.{self::B::_y} = val;
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
index c0a69a4..16c8e79 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.expect
@@ -4,26 +4,26 @@
 import "dart:_internal" as _in;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _#A#x = null;
+  covariant-by-class field self::A::T? _#A#x = null;
   field core::bool _#A#x#isSet = false;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
   get x() → self::A::T%
     return this.{self::A::_#A#x#isSet}{core::bool} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x}{self::A::T?} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
-  set x(generic-covariant-impl self::A::T% #t2) → void {
+  set x(covariant-by-class self::A::T% #t2) → void {
     this.{self::A::_#A#x#isSet} = true;
     this.{self::A::_#A#x} = #t2;
   }
 }
 class B<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T? _y = null;
+  covariant-by-class field self::B::T? _y = null;
   synthetic constructor •() → self::B<self::B::T%>
     : super core::Object::•()
     ;
   get y() → self::B::T?
     return this.{self::B::_y}{self::B::T?};
-  set y(generic-covariant-impl self::B::T? val) → void {
+  set y(covariant-by-class self::B::T? val) → void {
     this.{self::B::_y} = val;
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.outline.expect
index 9abba16..e556e89 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.outline.expect
@@ -3,20 +3,20 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _#A#x;
+  covariant-by-class field self::A::T? _#A#x;
   field core::bool _#A#x#isSet;
   synthetic constructor •() → self::A<self::A::T%>
     ;
   get x() → self::A::T%;
-  set x(generic-covariant-impl self::A::T% #t1) → void;
+  set x(covariant-by-class self::A::T% #t1) → void;
 }
 class B<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T? _y;
+  covariant-by-class field self::B::T? _y;
   synthetic constructor •() → self::B<self::B::T%>
     ;
   get y() → self::B::T?
     ;
-  set y(generic-covariant-impl self::B::T? val) → void
+  set y(covariant-by-class self::B::T? val) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
index c0a69a4..16c8e79 100644
--- a/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/issue42407.dart.weak.transformed.expect
@@ -4,26 +4,26 @@
 import "dart:_internal" as _in;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _#A#x = null;
+  covariant-by-class field self::A::T? _#A#x = null;
   field core::bool _#A#x#isSet = false;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
   get x() → self::A::T%
     return this.{self::A::_#A#x#isSet}{core::bool} ?{self::A::T%} let final self::A::T? #t1 = this.{self::A::_#A#x}{self::A::T?} in #t1{self::A::T%} : throw new _in::LateError::fieldNI("x");
-  set x(generic-covariant-impl self::A::T% #t2) → void {
+  set x(covariant-by-class self::A::T% #t2) → void {
     this.{self::A::_#A#x#isSet} = true;
     this.{self::A::_#A#x} = #t2;
   }
 }
 class B<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T? _y = null;
+  covariant-by-class field self::B::T? _y = null;
   synthetic constructor •() → self::B<self::B::T%>
     : super core::Object::•()
     ;
   get y() → self::B::T?
     return this.{self::B::_y}{self::B::T?};
-  set y(generic-covariant-impl self::B::T? val) → void {
+  set y(covariant-by-class self::B::T? val) → void {
     this.{self::B::_y} = val;
   }
 }
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
index 924fb03..9500bf5 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.expect
@@ -41,7 +41,7 @@
   get covariantInstanceField() → core::num
     return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField}{core::num?} in #t7 == null ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t7{core::num};
   @#C1
-  set covariantInstanceField(covariant core::num #t8) → void
+  set covariantInstanceField(covariant-by-declaration core::num #t8) → void
     this.{self::A::_#A#covariantInstanceField} = #t8;
   @#C1
   static get staticField() → core::int
@@ -92,7 +92,7 @@
   get covariantInstanceField() → core::num
     return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField}{core::num?} in #t21 == null ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t21{core::num};
   @#C1
-  set covariantInstanceField(covariant core::num #t22) → void
+  set covariantInstanceField(covariant-by-declaration core::num #t22) → void
     this.{self::B::_#B#covariantInstanceField} = #t22;
   @#C1
   static get staticField() → core::int
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
index 4ec55b0..5c3dc32 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.strong.transformed.expect
@@ -41,7 +41,7 @@
   get covariantInstanceField() → core::num
     return let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField}{core::num?} in #t7 == null ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t7{core::num};
   @#C1
-  set covariantInstanceField(covariant core::num #t8) → void
+  set covariantInstanceField(covariant-by-declaration core::num #t8) → void
     this.{self::A::_#A#covariantInstanceField} = #t8;
   @#C1
   static get staticField() → core::int
@@ -92,7 +92,7 @@
   get covariantInstanceField() → core::num
     return let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField}{core::num?} in #t21 == null ?{core::num} throw new _in::LateError::fieldNI("covariantInstanceField") : #t21{core::num};
   @#C1
-  set covariantInstanceField(covariant core::num #t22) → void
+  set covariantInstanceField(covariant-by-declaration core::num #t22) → void
     this.{self::B::_#B#covariantInstanceField} = #t22;
   @#C1
   static get staticField() → core::int
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
index 6e971c0..784ff0c 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.expect
@@ -60,7 +60,7 @@
   get covariantInstanceField() → core::num
     return this.{self::A::_#A#covariantInstanceField#isSet}{core::bool} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField}{core::num?} in #t7{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
   @#C1
-  set covariantInstanceField(covariant core::num #t8) → void {
+  set covariantInstanceField(covariant-by-declaration core::num #t8) → void {
     this.{self::A::_#A#covariantInstanceField#isSet} = true;
     this.{self::A::_#A#covariantInstanceField} = #t8;
   }
@@ -144,7 +144,7 @@
   get covariantInstanceField() → core::num
     return this.{self::B::_#B#covariantInstanceField#isSet}{core::bool} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField}{core::num?} in #t21{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
   @#C1
-  set covariantInstanceField(covariant core::num #t22) → void {
+  set covariantInstanceField(covariant-by-declaration core::num #t22) → void {
     this.{self::B::_#B#covariantInstanceField#isSet} = true;
     this.{self::B::_#B#covariantInstanceField} = #t22;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.outline.expect
index bbd8a08..282fc21 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.outline.expect
@@ -37,7 +37,7 @@
   @self::Annotation::•()
   get covariantInstanceField() → core::num;
   @self::Annotation::•()
-  set covariantInstanceField(covariant core::num #t3) → void;
+  set covariantInstanceField(covariant-by-declaration core::num #t3) → void;
   @self::Annotation::•()
   static get staticField() → core::int;
   @self::Annotation::•()
@@ -77,7 +77,7 @@
   @self::Annotation::•()
   get covariantInstanceField() → core::num;
   @self::Annotation::•()
-  set covariantInstanceField(covariant core::num #t8) → void;
+  set covariantInstanceField(covariant-by-declaration core::num #t8) → void;
   @self::Annotation::•()
   static get staticField() → core::int;
   @self::Annotation::•()
diff --git a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
index 6e971c0..784ff0c 100644
--- a/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_annotations.dart.weak.transformed.expect
@@ -60,7 +60,7 @@
   get covariantInstanceField() → core::num
     return this.{self::A::_#A#covariantInstanceField#isSet}{core::bool} ?{core::num} let final core::num? #t7 = this.{self::A::_#A#covariantInstanceField}{core::num?} in #t7{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
   @#C1
-  set covariantInstanceField(covariant core::num #t8) → void {
+  set covariantInstanceField(covariant-by-declaration core::num #t8) → void {
     this.{self::A::_#A#covariantInstanceField#isSet} = true;
     this.{self::A::_#A#covariantInstanceField} = #t8;
   }
@@ -144,7 +144,7 @@
   get covariantInstanceField() → core::num
     return this.{self::B::_#B#covariantInstanceField#isSet}{core::bool} ?{core::num} let final core::num? #t21 = this.{self::B::_#B#covariantInstanceField}{core::num?} in #t21{core::num} : throw new _in::LateError::fieldNI("covariantInstanceField");
   @#C1
-  set covariantInstanceField(covariant core::num #t22) → void {
+  set covariantInstanceField(covariant-by-declaration core::num #t22) → void {
     this.{self::B::_#B#covariantInstanceField#isSet} = true;
     this.{self::B::_#B#covariantInstanceField} = #t22;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.expect
index 3b5ec2f..7d0e4e3 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.expect
@@ -7,9 +7,9 @@
   static field core::int? _#lateStaticField2 = null;
   field core::int? _#Class#lateInstanceField = null;
   final field self::Class::T% field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField1 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField1 = null;
   field core::bool _#Class#lateGenericField1#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField2 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField2 = null;
   field core::bool _#Class#lateGenericField2#isSet = false;
   constructor •(self::Class::T% field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -38,7 +38,7 @@
     }
     return let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericField1}{self::Class::T?} in #t7{self::Class::T%};
   }
-  set lateGenericField1(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericField1(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericField1#isSet} = true;
     this.{self::Class::_#Class#lateGenericField1} = #t8;
   }
@@ -49,11 +49,11 @@
     }
     return let final self::Class::T? #t9 = this.{self::Class::_#Class#lateGenericField2}{self::Class::T?} in #t9{self::Class::T%};
   }
-  set lateGenericField2(generic-covariant-impl self::Class::T% #t10) → void {
+  set lateGenericField2(covariant-by-class self::Class::T% #t10) → void {
     this.{self::Class::_#Class#lateGenericField2#isSet} = true;
     this.{self::Class::_#Class#lateGenericField2} = #t10;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.transformed.expect
index 3b5ec2f..7d0e4e3 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.strong.transformed.expect
@@ -7,9 +7,9 @@
   static field core::int? _#lateStaticField2 = null;
   field core::int? _#Class#lateInstanceField = null;
   final field self::Class::T% field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField1 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField1 = null;
   field core::bool _#Class#lateGenericField1#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField2 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField2 = null;
   field core::bool _#Class#lateGenericField2#isSet = false;
   constructor •(self::Class::T% field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -38,7 +38,7 @@
     }
     return let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericField1}{self::Class::T?} in #t7{self::Class::T%};
   }
-  set lateGenericField1(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericField1(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericField1#isSet} = true;
     this.{self::Class::_#Class#lateGenericField1} = #t8;
   }
@@ -49,11 +49,11 @@
     }
     return let final self::Class::T? #t9 = this.{self::Class::_#Class#lateGenericField2}{self::Class::T?} in #t9{self::Class::T%};
   }
-  set lateGenericField2(generic-covariant-impl self::Class::T% #t10) → void {
+  set lateGenericField2(covariant-by-class self::Class::T% #t10) → void {
     this.{self::Class::_#Class#lateGenericField2#isSet} = true;
     this.{self::Class::_#Class#lateGenericField2} = #t10;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.expect
index 59acf34..8d1c620 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.expect
@@ -10,9 +10,9 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T% field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField1 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField1 = null;
   field core::bool _#Class#lateGenericField1#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField2 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField2 = null;
   field core::bool _#Class#lateGenericField2#isSet = false;
   constructor •(self::Class::T% field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -62,7 +62,7 @@
     }
     return let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericField1}{self::Class::T?} in #t7{self::Class::T%};
   }
-  set lateGenericField1(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericField1(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericField1#isSet} = true;
     this.{self::Class::_#Class#lateGenericField1} = #t8;
   }
@@ -73,11 +73,11 @@
     }
     return let final self::Class::T? #t9 = this.{self::Class::_#Class#lateGenericField2}{self::Class::T?} in #t9{self::Class::T%};
   }
-  set lateGenericField2(generic-covariant-impl self::Class::T% #t10) → void {
+  set lateGenericField2(covariant-by-class self::Class::T% #t10) → void {
     this.{self::Class::_#Class#lateGenericField2#isSet} = true;
     this.{self::Class::_#Class#lateGenericField2} = #t10;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.outline.expect
index b3aa1b5..c20e857 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.outline.expect
@@ -10,9 +10,9 @@
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
   final field self::Class::T% field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField1;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField1;
   field core::bool _#Class#lateGenericField1#isSet;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField2;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField2;
   field core::bool _#Class#lateGenericField2#isSet;
   constructor •(self::Class::T% field) → self::Class<self::Class::T%>
     ;
@@ -25,10 +25,10 @@
   get lateInstanceField() → core::int;
   set lateInstanceField(core::int #t3) → void;
   get lateGenericField1() → self::Class::T%;
-  set lateGenericField1(generic-covariant-impl self::Class::T% #t4) → void;
+  set lateGenericField1(covariant-by-class self::Class::T% #t4) → void;
   get lateGenericField2() → self::Class::T%;
-  set lateGenericField2(generic-covariant-impl self::Class::T% #t5) → void;
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic
+  set lateGenericField2(covariant-by-class self::Class::T% #t5) → void;
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic
     ;
 }
 extension Extension<T extends core::Object? = dynamic> on self::Class<T%> {
diff --git a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.transformed.expect
index 59acf34..8d1c620 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_with_initializer.dart.weak.transformed.expect
@@ -10,9 +10,9 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T% field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField1 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField1 = null;
   field core::bool _#Class#lateGenericField1#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericField2 = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericField2 = null;
   field core::bool _#Class#lateGenericField2#isSet = false;
   constructor •(self::Class::T% field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -62,7 +62,7 @@
     }
     return let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericField1}{self::Class::T?} in #t7{self::Class::T%};
   }
-  set lateGenericField1(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericField1(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericField1#isSet} = true;
     this.{self::Class::_#Class#lateGenericField1} = #t8;
   }
@@ -73,11 +73,11 @@
     }
     return let final self::Class::T? #t9 = this.{self::Class::_#Class#lateGenericField2}{self::Class::T?} in #t9{self::Class::T%};
   }
-  set lateGenericField2(generic-covariant-impl self::Class::T% #t10) → void {
+  set lateGenericField2(covariant-by-class self::Class::T% #t10) → void {
     this.{self::Class::_#Class#lateGenericField2#isSet} = true;
     this.{self::Class::_#Class#lateGenericField2} = #t10;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
index 1b8458c..1483023 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.expect
@@ -7,7 +7,7 @@
   static field core::int? _#lateStaticField1 = null;
   static field core::int? _#lateStaticField2 = null;
   field core::int? _#Class#lateInstanceField = null;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -31,11 +31,11 @@
     this.{self::Class::_#Class#lateInstanceField} = #t6;
   get lateGenericInstanceField() → self::Class::T%
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int => this.{self::Class::lateInstanceField}{core::int}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
index 1b8458c..1483023 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
   static field core::int? _#lateStaticField1 = null;
   static field core::int? _#lateStaticField2 = null;
   field core::int? _#Class#lateInstanceField = null;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -31,11 +31,11 @@
     this.{self::Class::_#Class#lateInstanceField} = #t6;
   get lateGenericInstanceField() → self::Class::T%
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int => this.{self::Class::lateInstanceField}{core::int}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
index 03d2906..9734ddb 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T%
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int => this.{self::Class::lateInstanceField}{core::int}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.outline.expect
index e298e3a..b3cc2e8 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.outline.expect
@@ -9,7 +9,7 @@
   static field core::bool _#lateStaticField2#isSet;
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField;
   field core::bool _#Class#lateGenericInstanceField#isSet;
   synthetic constructor •() → self::Class<self::Class::T%>
     ;
@@ -22,8 +22,8 @@
   get lateInstanceField() → core::int;
   set lateInstanceField(core::int #t3) → void;
   get lateGenericInstanceField() → self::Class::T%;
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t4) → void;
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic
+  set lateGenericInstanceField(covariant-by-class self::Class::T% #t4) → void;
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic
     ;
 }
 extension Extension<T extends core::Object? = dynamic> on self::Class<T%> {
diff --git a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
index 03d2906..9734ddb 100644
--- a/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_field_without_initializer.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T%
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T%} let final self::Class::T? #t7 = this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} in #t7{self::Class::T%} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T% #t8) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T% #t8) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t8;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int => this.{self::Class::lateInstanceField}{core::int}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int});
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
index 3b2e679..7ca8dab 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.expect
@@ -27,7 +27,7 @@
   static field core::int? _#lateStaticField2 = null;
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
-  generic-covariant-impl field self::Class::T? lateGenericFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericFieldInit = null;
   final field self::Class::T% field;
   field self::Class::T? _#Class#lateGenericField = null;
   field core::bool _#Class#lateGenericField#isSet = false;
@@ -54,7 +54,7 @@
   }
   get lateInstanceField() → core::int
     return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField}{core::int?} in #t7 == null ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16){(core::int) → core::int} in this.{self::Class::_#Class#lateInstanceField}{core::int?} == null ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateError::fieldADI("lateInstanceField") : #t7{core::int};
-  method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
+  method initLateGenericField(covariant-by-class self::Class::T% value) → self::Class::T% {
     return this.{self::Class::lateGenericFieldInit} = value;
   }
   get lateGenericField() → self::Class::T% {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
index 3b2e679..7ca8dab 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.strong.transformed.expect
@@ -27,7 +27,7 @@
   static field core::int? _#lateStaticField2 = null;
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
-  generic-covariant-impl field self::Class::T? lateGenericFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericFieldInit = null;
   final field self::Class::T% field;
   field self::Class::T? _#Class#lateGenericField = null;
   field core::bool _#Class#lateGenericField#isSet = false;
@@ -54,7 +54,7 @@
   }
   get lateInstanceField() → core::int
     return let final core::int? #t7 = this.{self::Class::_#Class#lateInstanceField}{core::int?} in #t7 == null ?{core::int} let final core::int #t8 = this.{self::Class::initLateInstanceField}(16){(core::int) → core::int} in this.{self::Class::_#Class#lateInstanceField}{core::int?} == null ?{core::int} this.{self::Class::_#Class#lateInstanceField} = #t8 : throw new _in::LateError::fieldADI("lateInstanceField") : #t7{core::int};
-  method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
+  method initLateGenericField(covariant-by-class self::Class::T% value) → self::Class::T% {
     return this.{self::Class::lateGenericFieldInit} = value;
   }
   get lateGenericField() → self::Class::T% {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
index 25277e8..35715d5 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.expect
@@ -38,7 +38,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericFieldInit = null;
   final field self::Class::T% field;
   field self::Class::T? _#Class#lateGenericField = null;
   field core::bool _#Class#lateGenericField#isSet = false;
@@ -89,7 +89,7 @@
     }
     return let final core::int? #t8 = this.{self::Class::_#Class#lateInstanceField}{core::int?} in #t8{core::int};
   }
-  method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
+  method initLateGenericField(covariant-by-class self::Class::T% value) → self::Class::T% {
     return this.{self::Class::lateGenericFieldInit} = value;
   }
   get lateGenericField() → self::Class::T% {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.outline.expect
index f6ad987..5fb1e54 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.outline.expect
@@ -26,7 +26,7 @@
   field core::int? lateInstanceFieldInit;
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
-  generic-covariant-impl field self::Class::T? lateGenericFieldInit;
+  covariant-by-class field self::Class::T? lateGenericFieldInit;
   final field self::Class::T% field;
   field self::Class::T? _#Class#lateGenericField;
   field core::bool _#Class#lateGenericField#isSet;
@@ -43,7 +43,7 @@
   method initLateInstanceField(core::int value) → core::int
     ;
   get lateInstanceField() → core::int;
-  method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T%
+  method initLateGenericField(covariant-by-class self::Class::T% value) → self::Class::T%
     ;
   get lateGenericField() → self::Class::T%;
   method instanceMethod() → dynamic
diff --git a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
index 25277e8..35715d5 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_field_with_initializer.dart.weak.transformed.expect
@@ -38,7 +38,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericFieldInit = null;
   final field self::Class::T% field;
   field self::Class::T? _#Class#lateGenericField = null;
   field core::bool _#Class#lateGenericField#isSet = false;
@@ -89,7 +89,7 @@
     }
     return let final core::int? #t8 = this.{self::Class::_#Class#lateInstanceField}{core::int?} in #t8{core::int};
   }
-  method initLateGenericField(generic-covariant-impl self::Class::T% value) → self::Class::T% {
+  method initLateGenericField(covariant-by-class self::Class::T% value) → self::Class::T% {
     return this.{self::Class::lateGenericFieldInit} = value;
   }
   get lateGenericField() → self::Class::T% {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
index ef40a1e..0b29db8 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.expect
@@ -13,7 +13,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericInstanceFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericInstanceFieldInit = null;
   final field self::Class::T? field;
   field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
@@ -64,7 +64,7 @@
     }
     return this.{self::Class::_#Class#lateInstanceField}{core::int?};
   }
-  method initLateGenericInstanceField(generic-covariant-impl self::Class::T? value) → self::Class::T? {
+  method initLateGenericInstanceField(covariant-by-class self::Class::T? value) → self::Class::T? {
     return this.{self::Class::lateGenericInstanceFieldInit} = value;
   }
   get lateGenericInstanceField() → self::Class::T? {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
index ef40a1e..0b29db8 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericInstanceFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericInstanceFieldInit = null;
   final field self::Class::T? field;
   field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
@@ -64,7 +64,7 @@
     }
     return this.{self::Class::_#Class#lateInstanceField}{core::int?};
   }
-  method initLateGenericInstanceField(generic-covariant-impl self::Class::T? value) → self::Class::T? {
+  method initLateGenericInstanceField(covariant-by-class self::Class::T? value) → self::Class::T? {
     return this.{self::Class::lateGenericInstanceFieldInit} = value;
   }
   get lateGenericInstanceField() → self::Class::T? {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
index ef40a1e..0b29db8 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.expect
@@ -13,7 +13,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericInstanceFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericInstanceFieldInit = null;
   final field self::Class::T? field;
   field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
@@ -64,7 +64,7 @@
     }
     return this.{self::Class::_#Class#lateInstanceField}{core::int?};
   }
-  method initLateGenericInstanceField(generic-covariant-impl self::Class::T? value) → self::Class::T? {
+  method initLateGenericInstanceField(covariant-by-class self::Class::T? value) → self::Class::T? {
     return this.{self::Class::lateGenericInstanceFieldInit} = value;
   }
   get lateGenericInstanceField() → self::Class::T? {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.outline.expect
index 159d80f..bce12d5 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.outline.expect
@@ -12,7 +12,7 @@
   field core::int? lateInstanceFieldInit;
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
-  generic-covariant-impl field self::Class::T? lateGenericInstanceFieldInit;
+  covariant-by-class field self::Class::T? lateGenericInstanceFieldInit;
   final field self::Class::T? field;
   field self::Class::T? _#Class#lateGenericInstanceField;
   field core::bool _#Class#lateGenericInstanceField#isSet;
@@ -29,7 +29,7 @@
   method initLateInstanceField(core::int value) → core::int?
     ;
   get lateInstanceField() → core::int?;
-  method initLateGenericInstanceField(generic-covariant-impl self::Class::T? value) → self::Class::T?
+  method initLateGenericInstanceField(covariant-by-class self::Class::T? value) → self::Class::T?
     ;
   get lateGenericInstanceField() → self::Class::T?;
   method instanceMethod() → dynamic
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
index ef40a1e..0b29db8 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_with_initializer.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
   field core::int? lateInstanceFieldInit = null;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? lateGenericInstanceFieldInit = null;
+  covariant-by-class field self::Class::T? lateGenericInstanceFieldInit = null;
   final field self::Class::T? field;
   field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
@@ -64,7 +64,7 @@
     }
     return this.{self::Class::_#Class#lateInstanceField}{core::int?};
   }
-  method initLateGenericInstanceField(generic-covariant-impl self::Class::T? value) → self::Class::T? {
+  method initLateGenericInstanceField(covariant-by-class self::Class::T? value) → self::Class::T? {
     return this.{self::Class::lateGenericInstanceFieldInit} = value;
   }
   get lateGenericInstanceField() → self::Class::T? {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
index 5cf1101..ce6ed76 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.expect
@@ -57,7 +57,7 @@
       this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
       this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
     }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
index 5cf1101..ce6ed76 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.strong.transformed.expect
@@ -57,7 +57,7 @@
       this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
       this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
     }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
index 5cf1101..ce6ed76 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.expect
@@ -57,7 +57,7 @@
       this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
       this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
     }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.outline.expect
index 802698c..86a7e1c 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.outline.expect
@@ -23,7 +23,7 @@
   set lateInstanceField(core::int? #t3) → void;
   get lateGenericInstanceField() → self::Class::T?;
   set lateGenericInstanceField(self::Class::T? #t4) → void;
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic
     ;
 }
 extension Extension<T extends core::Object? = dynamic> on self::Class<T%> {
diff --git a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
index 5cf1101..ce6ed76 100644
--- a/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_final_nullable_field_without_initializer.dart.weak.transformed.expect
@@ -57,7 +57,7 @@
       this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
       this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
     }
-  method instanceMethod(generic-covariant-impl self::Class::T% value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T% value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
index 514f607..c7f8179 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.expect
@@ -10,11 +10,11 @@
   field core::bool _#C#field1#isSet = false;
   field FutureOr<dynamic>? _#C#field2 = null;
   field core::bool _#C#field2#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T%>? _#C#field3 = null;
+  covariant-by-class field FutureOr<self::C::T%>? _#C#field3 = null;
   field core::bool _#C#field3#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field4 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field4 = null;
   field core::bool _#C#field4#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field5 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field5 = null;
   field core::bool _#C#field5#isSet = false;
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
@@ -33,19 +33,19 @@
   }
   get field3() → FutureOr<self::C::T%>
     return this.{self::C::_#C#field3#isSet}{core::bool} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3}{FutureOr<self::C::T%>?} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
-  set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
+  set field3(covariant-by-class FutureOr<self::C::T%>#t4) → void {
     this.{self::C::_#C#field3#isSet} = true;
     this.{self::C::_#C#field3} = #t4;
   }
   get field4() → FutureOr<self::C::T?>
     return this.{self::C::_#C#field4#isSet}{core::bool} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field4");
-  set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
+  set field4(covariant-by-class FutureOr<self::C::T?>#t5) → void {
     this.{self::C::_#C#field4#isSet} = true;
     this.{self::C::_#C#field4} = #t5;
   }
   get field5() → FutureOr<self::C::T?>?
     return this.{self::C::_#C#field5#isSet}{core::bool} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field5");
-  set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
+  set field5(covariant-by-class FutureOr<self::C::T?>? #t6) → void {
     this.{self::C::_#C#field5#isSet} = true;
     this.{self::C::_#C#field5} = #t6;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
index 514f607..c7f8179 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.strong.transformed.expect
@@ -10,11 +10,11 @@
   field core::bool _#C#field1#isSet = false;
   field FutureOr<dynamic>? _#C#field2 = null;
   field core::bool _#C#field2#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T%>? _#C#field3 = null;
+  covariant-by-class field FutureOr<self::C::T%>? _#C#field3 = null;
   field core::bool _#C#field3#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field4 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field4 = null;
   field core::bool _#C#field4#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field5 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field5 = null;
   field core::bool _#C#field5#isSet = false;
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
@@ -33,19 +33,19 @@
   }
   get field3() → FutureOr<self::C::T%>
     return this.{self::C::_#C#field3#isSet}{core::bool} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3}{FutureOr<self::C::T%>?} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
-  set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
+  set field3(covariant-by-class FutureOr<self::C::T%>#t4) → void {
     this.{self::C::_#C#field3#isSet} = true;
     this.{self::C::_#C#field3} = #t4;
   }
   get field4() → FutureOr<self::C::T?>
     return this.{self::C::_#C#field4#isSet}{core::bool} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field4");
-  set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
+  set field4(covariant-by-class FutureOr<self::C::T?>#t5) → void {
     this.{self::C::_#C#field4#isSet} = true;
     this.{self::C::_#C#field4} = #t5;
   }
   get field5() → FutureOr<self::C::T?>?
     return this.{self::C::_#C#field5#isSet}{core::bool} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field5");
-  set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
+  set field5(covariant-by-class FutureOr<self::C::T?>? #t6) → void {
     this.{self::C::_#C#field5#isSet} = true;
     this.{self::C::_#C#field5} = #t6;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
index 6e2e07e..b358ead 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.expect
@@ -10,11 +10,11 @@
   field core::bool _#C#field1#isSet = false;
   field FutureOr<dynamic>? _#C#field2 = null;
   field core::bool _#C#field2#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T%>? _#C#field3 = null;
+  covariant-by-class field FutureOr<self::C::T%>? _#C#field3 = null;
   field core::bool _#C#field3#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field4 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field4 = null;
   field core::bool _#C#field4#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field5 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field5 = null;
   field core::bool _#C#field5#isSet = false;
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
@@ -33,19 +33,19 @@
   }
   get field3() → FutureOr<self::C::T%>
     return this.{self::C::_#C#field3#isSet}{core::bool} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3}{FutureOr<self::C::T%>?} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
-  set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
+  set field3(covariant-by-class FutureOr<self::C::T%>#t4) → void {
     this.{self::C::_#C#field3#isSet} = true;
     this.{self::C::_#C#field3} = #t4;
   }
   get field4() → FutureOr<self::C::T?>
     return this.{self::C::_#C#field4#isSet}{core::bool} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field4");
-  set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
+  set field4(covariant-by-class FutureOr<self::C::T?>#t5) → void {
     this.{self::C::_#C#field4#isSet} = true;
     this.{self::C::_#C#field4} = #t5;
   }
   get field5() → FutureOr<self::C::T?>?
     return this.{self::C::_#C#field5#isSet}{core::bool} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field5");
-  set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
+  set field5(covariant-by-class FutureOr<self::C::T?>? #t6) → void {
     this.{self::C::_#C#field5#isSet} = true;
     this.{self::C::_#C#field5} = #t6;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.outline.expect
index 14dcaea..6c197d9 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.outline.expect
@@ -9,11 +9,11 @@
   field core::bool _#C#field1#isSet;
   field FutureOr<dynamic>? _#C#field2;
   field core::bool _#C#field2#isSet;
-  generic-covariant-impl field FutureOr<self::C::T%>? _#C#field3;
+  covariant-by-class field FutureOr<self::C::T%>? _#C#field3;
   field core::bool _#C#field3#isSet;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field4;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field4;
   field core::bool _#C#field4#isSet;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field5;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field5;
   field core::bool _#C#field5#isSet;
   synthetic constructor •() → self::C<self::C::T%>
     ;
@@ -22,11 +22,11 @@
   get field2() → FutureOr<dynamic>?;
   set field2(FutureOr<dynamic>? #t2) → void;
   get field3() → FutureOr<self::C::T%>;
-  set field3(generic-covariant-impl FutureOr<self::C::T%>#t3) → void;
+  set field3(covariant-by-class FutureOr<self::C::T%>#t3) → void;
   get field4() → FutureOr<self::C::T?>;
-  set field4(generic-covariant-impl FutureOr<self::C::T?>#t4) → void;
+  set field4(covariant-by-class FutureOr<self::C::T?>#t4) → void;
   get field5() → FutureOr<self::C::T?>?;
-  set field5(generic-covariant-impl FutureOr<self::C::T?>? #t5) → void;
+  set field5(covariant-by-class FutureOr<self::C::T?>? #t5) → void;
   method method() → dynamic
     ;
 }
diff --git a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
index 6e2e07e..b358ead 100644
--- a/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_future_or.dart.weak.transformed.expect
@@ -10,11 +10,11 @@
   field core::bool _#C#field1#isSet = false;
   field FutureOr<dynamic>? _#C#field2 = null;
   field core::bool _#C#field2#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T%>? _#C#field3 = null;
+  covariant-by-class field FutureOr<self::C::T%>? _#C#field3 = null;
   field core::bool _#C#field3#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field4 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field4 = null;
   field core::bool _#C#field4#isSet = false;
-  generic-covariant-impl field FutureOr<self::C::T?>? _#C#field5 = null;
+  covariant-by-class field FutureOr<self::C::T?>? _#C#field5 = null;
   field core::bool _#C#field5#isSet = false;
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
@@ -33,19 +33,19 @@
   }
   get field3() → FutureOr<self::C::T%>
     return this.{self::C::_#C#field3#isSet}{core::bool} ?{FutureOr<self::C::T%>} let final FutureOr<self::C::T%>? #t3 = this.{self::C::_#C#field3}{FutureOr<self::C::T%>?} in #t3{FutureOr<self::C::T%>} : throw new _in::LateError::fieldNI("field3");
-  set field3(generic-covariant-impl FutureOr<self::C::T%>#t4) → void {
+  set field3(covariant-by-class FutureOr<self::C::T%>#t4) → void {
     this.{self::C::_#C#field3#isSet} = true;
     this.{self::C::_#C#field3} = #t4;
   }
   get field4() → FutureOr<self::C::T?>
     return this.{self::C::_#C#field4#isSet}{core::bool} ?{FutureOr<self::C::T?>} this.{self::C::_#C#field4}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field4");
-  set field4(generic-covariant-impl FutureOr<self::C::T?>#t5) → void {
+  set field4(covariant-by-class FutureOr<self::C::T?>#t5) → void {
     this.{self::C::_#C#field4#isSet} = true;
     this.{self::C::_#C#field4} = #t5;
   }
   get field5() → FutureOr<self::C::T?>?
     return this.{self::C::_#C#field5#isSet}{core::bool} ?{FutureOr<self::C::T?>?} this.{self::C::_#C#field5}{FutureOr<self::C::T?>?} : throw new _in::LateError::fieldNI("field5");
-  set field5(generic-covariant-impl FutureOr<self::C::T?>? #t6) → void {
+  set field5(covariant-by-class FutureOr<self::C::T?>? #t6) → void {
     this.{self::C::_#C#field5#isSet} = true;
     this.{self::C::_#C#field5} = #t6;
   }
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.expect
index 09301ad..a743497 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.expect
@@ -10,7 +10,7 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T? field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   constructor •(self::Class::T? field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -68,11 +68,11 @@
     }
     return this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?};
   }
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.transformed.expect
index 09301ad..a743497 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T? field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   constructor •(self::Class::T? field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -68,11 +68,11 @@
     }
     return this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?};
   }
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.expect
index 09301ad..a743497 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.expect
@@ -10,7 +10,7 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T? field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   constructor •(self::Class::T? field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -68,11 +68,11 @@
     }
     return this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?};
   }
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.outline.expect
index 995658d..bf54c39 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.outline.expect
@@ -10,7 +10,7 @@
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
   final field self::Class::T? field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField;
   field core::bool _#Class#lateGenericInstanceField#isSet;
   constructor •(self::Class::T? field) → self::Class<self::Class::T%>
     ;
@@ -31,8 +31,8 @@
   method lateGenericInstanceFieldInit() → self::Class::T?
     ;
   get lateGenericInstanceField() → self::Class::T?;
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void;
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void;
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic
     ;
 }
 extension Extension<T extends core::Object? = dynamic> on self::Class<T%> {
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.transformed.expect
index 09301ad..a743497 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_with_initializer.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
   final field self::Class::T? field;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   constructor •(self::Class::T? field) → self::Class<self::Class::T%>
     : self::Class::field = field, super core::Object::•()
@@ -68,11 +68,11 @@
     }
     return this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?};
   }
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
     this.{self::Class::lateInstanceField} = 17;
     self::expect(17, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
index b129514..91ed9ea 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T?
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
index b129514..91ed9ea 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T?
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
index b129514..91ed9ea 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T?
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.outline.expect
index b36f1a2..f234077 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.outline.expect
@@ -9,7 +9,7 @@
   static field core::bool _#lateStaticField2#isSet;
   field core::int? _#Class#lateInstanceField;
   field core::bool _#Class#lateInstanceField#isSet;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField;
   field core::bool _#Class#lateGenericInstanceField#isSet;
   synthetic constructor •() → self::Class<self::Class::T%>
     ;
@@ -22,8 +22,8 @@
   get lateInstanceField() → core::int?;
   set lateInstanceField(core::int? #t3) → void;
   get lateGenericInstanceField() → self::Class::T?;
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void;
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void;
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic
     ;
 }
 extension Extension<T extends core::Object? = dynamic> on self::Class<T%> {
diff --git a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
index b129514..91ed9ea 100644
--- a/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/late_nullable_field_without_initializer.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
   static field core::bool _#lateStaticField2#isSet = false;
   field core::int? _#Class#lateInstanceField = null;
   field core::bool _#Class#lateInstanceField#isSet = false;
-  generic-covariant-impl field self::Class::T? _#Class#lateGenericInstanceField = null;
+  covariant-by-class field self::Class::T? _#Class#lateGenericInstanceField = null;
   field core::bool _#Class#lateGenericInstanceField#isSet = false;
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
@@ -40,11 +40,11 @@
   }
   get lateGenericInstanceField() → self::Class::T?
     return this.{self::Class::_#Class#lateGenericInstanceField#isSet}{core::bool} ?{self::Class::T?} this.{self::Class::_#Class#lateGenericInstanceField}{self::Class::T?} : throw new _in::LateError::fieldNI("lateGenericInstanceField");
-  set lateGenericInstanceField(generic-covariant-impl self::Class::T? #t4) → void {
+  set lateGenericInstanceField(covariant-by-class self::Class::T? #t4) → void {
     this.{self::Class::_#Class#lateGenericInstanceField#isSet} = true;
     this.{self::Class::_#Class#lateGenericInstanceField} = #t4;
   }
-  method instanceMethod(generic-covariant-impl self::Class::T? value) → dynamic {
+  method instanceMethod(covariant-by-class self::Class::T? value) → dynamic {
     self::throws(() → core::int? => this.{self::Class::lateInstanceField}{core::int?}, "Read value from uninitialized Class.lateInstanceField");
     this.{self::Class::lateInstanceField} = 16;
     self::expect(16, this.{self::Class::lateInstanceField}{core::int?});
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
index 83082ba..3df87d0 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
@@ -46,7 +46,7 @@
   field core::int? _#Class#instanceField = null;
   field dynamic _#Class#finalInstanceField = null;
   field core::bool _#Class#finalInstanceField#isSet = false;
-  generic-covariant-impl field non::Class::T? _#Class#instanceTypeVariable = null;
+  covariant-by-class field non::Class::T? _#Class#instanceTypeVariable = null;
   field non::Class::T? _#Class#finalInstanceTypeVariable = null;
   static field core::int? _#staticField = null;
   static field dynamic _#staticFinalField = null;
@@ -69,7 +69,7 @@
     }
   get instanceTypeVariable() → non::Class::T
     return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable}{non::Class::T?} in #t4 == null ?{non::Class::T} throw new _in::LateError::fieldNI("instanceTypeVariable") : #t4{non::Class::T};
-  set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
+  set instanceTypeVariable(covariant-by-class non::Class::T #t5) → void
     this.{non::Class::_#Class#instanceTypeVariable} = #t5;
   get finalInstanceTypeVariable() → non::Class::T
     return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable}{non::Class::T?} in #t6 == null ?{non::Class::T} throw new _in::LateError::fieldNI("finalInstanceTypeVariable") : #t6{non::Class::T};
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
index 83082ba..3df87d0 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
@@ -46,7 +46,7 @@
   field core::int? _#Class#instanceField = null;
   field dynamic _#Class#finalInstanceField = null;
   field core::bool _#Class#finalInstanceField#isSet = false;
-  generic-covariant-impl field non::Class::T? _#Class#instanceTypeVariable = null;
+  covariant-by-class field non::Class::T? _#Class#instanceTypeVariable = null;
   field non::Class::T? _#Class#finalInstanceTypeVariable = null;
   static field core::int? _#staticField = null;
   static field dynamic _#staticFinalField = null;
@@ -69,7 +69,7 @@
     }
   get instanceTypeVariable() → non::Class::T
     return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable}{non::Class::T?} in #t4 == null ?{non::Class::T} throw new _in::LateError::fieldNI("instanceTypeVariable") : #t4{non::Class::T};
-  set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
+  set instanceTypeVariable(covariant-by-class non::Class::T #t5) → void
     this.{non::Class::_#Class#instanceTypeVariable} = #t5;
   get finalInstanceTypeVariable() → non::Class::T
     return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable}{non::Class::T?} in #t6 == null ?{non::Class::T} throw new _in::LateError::fieldNI("finalInstanceTypeVariable") : #t6{non::Class::T};
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
index 18d4aaa..86913df 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.expect
@@ -40,7 +40,7 @@
   field core::bool _#Class#instanceField#isSet = false;
   field dynamic _#Class#finalInstanceField = null;
   field core::bool _#Class#finalInstanceField#isSet = false;
-  generic-covariant-impl field non::Class::T? _#Class#instanceTypeVariable = null;
+  covariant-by-class field non::Class::T? _#Class#instanceTypeVariable = null;
   field core::bool _#Class#instanceTypeVariable#isSet = false;
   field non::Class::T? _#Class#finalInstanceTypeVariable = null;
   field core::bool _#Class#finalInstanceTypeVariable#isSet = false;
@@ -68,7 +68,7 @@
     }
   get instanceTypeVariable() → non::Class::T
     return this.{non::Class::_#Class#instanceTypeVariable#isSet}{core::bool} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable}{non::Class::T?} in #t4{non::Class::T} : throw new _in::LateError::fieldNI("instanceTypeVariable");
-  set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void {
+  set instanceTypeVariable(covariant-by-class non::Class::T #t5) → void {
     this.{non::Class::_#Class#instanceTypeVariable#isSet} = true;
     this.{non::Class::_#Class#instanceTypeVariable} = #t5;
   }
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.outline.expect
index 1c5d975..22fc18d 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.outline.expect
@@ -15,7 +15,7 @@
   field core::bool _#Class#instanceField#isSet;
   field dynamic _#Class#finalInstanceField;
   field core::bool _#Class#finalInstanceField#isSet;
-  generic-covariant-impl field self2::Class::T? _#Class#instanceTypeVariable;
+  covariant-by-class field self2::Class::T? _#Class#instanceTypeVariable;
   field core::bool _#Class#instanceTypeVariable#isSet;
   field self2::Class::T? _#Class#finalInstanceTypeVariable;
   field core::bool _#Class#finalInstanceTypeVariable#isSet;
@@ -30,7 +30,7 @@
   get finalInstanceField() → dynamic;
   set finalInstanceField(dynamic #t2) → void;
   get instanceTypeVariable() → self2::Class::T;
-  set instanceTypeVariable(generic-covariant-impl self2::Class::T #t3) → void;
+  set instanceTypeVariable(covariant-by-class self2::Class::T #t3) → void;
   get finalInstanceTypeVariable() → self2::Class::T;
   set finalInstanceTypeVariable(self2::Class::T #t4) → void;
   static get staticField() → core::int;
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
index 18d4aaa..86913df 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.weak.transformed.expect
@@ -40,7 +40,7 @@
   field core::bool _#Class#instanceField#isSet = false;
   field dynamic _#Class#finalInstanceField = null;
   field core::bool _#Class#finalInstanceField#isSet = false;
-  generic-covariant-impl field non::Class::T? _#Class#instanceTypeVariable = null;
+  covariant-by-class field non::Class::T? _#Class#instanceTypeVariable = null;
   field core::bool _#Class#instanceTypeVariable#isSet = false;
   field non::Class::T? _#Class#finalInstanceTypeVariable = null;
   field core::bool _#Class#finalInstanceTypeVariable#isSet = false;
@@ -68,7 +68,7 @@
     }
   get instanceTypeVariable() → non::Class::T
     return this.{non::Class::_#Class#instanceTypeVariable#isSet}{core::bool} ?{non::Class::T} let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable}{non::Class::T?} in #t4{non::Class::T} : throw new _in::LateError::fieldNI("instanceTypeVariable");
-  set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void {
+  set instanceTypeVariable(covariant-by-class non::Class::T #t5) → void {
     this.{non::Class::_#Class#instanceTypeVariable#isSet} = true;
     this.{non::Class::_#Class#instanceTypeVariable} = #t5;
   }
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
index a4118b8..ce1c9c6 100644
--- a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.expect
@@ -208,12 +208,12 @@
   external set externalInstanceField1(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField1() → core::int;
   external get externalCovariantInstanceField1() → core::num;
-  external set externalCovariantInstanceField1(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField1(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalInstanceField2() → core::int;
   external set externalInstanceField2(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField2() → core::int;
   external get externalCovariantInstanceField2() → core::num;
-  external set externalCovariantInstanceField2(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField2(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalLateInstanceField() → core::int;
   external set externalLateInstanceField(core::int #externalFieldValue) → void;
 }
@@ -224,7 +224,7 @@
   external set externalInstanceField(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField() → core::int;
   external get externalCovariantInstanceField() → core::num;
-  external set externalCovariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 extension Extension on self::A {
   get extensionInstanceField = get self::Extension|extensionInstanceField;
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
index a4118b8..ce1c9c6 100644
--- 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
@@ -208,12 +208,12 @@
   external set externalInstanceField1(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField1() → core::int;
   external get externalCovariantInstanceField1() → core::num;
-  external set externalCovariantInstanceField1(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField1(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalInstanceField2() → core::int;
   external set externalInstanceField2(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField2() → core::int;
   external get externalCovariantInstanceField2() → core::num;
-  external set externalCovariantInstanceField2(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField2(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalLateInstanceField() → core::int;
   external set externalLateInstanceField(core::int #externalFieldValue) → void;
 }
@@ -224,7 +224,7 @@
   external set externalInstanceField(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField() → core::int;
   external get externalCovariantInstanceField() → core::num;
-  external set externalCovariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 extension Extension on self::A {
   get extensionInstanceField = get self::Extension|extensionInstanceField;
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
index a4118b8..ce1c9c6 100644
--- a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.expect
@@ -208,12 +208,12 @@
   external set externalInstanceField1(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField1() → core::int;
   external get externalCovariantInstanceField1() → core::num;
-  external set externalCovariantInstanceField1(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField1(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalInstanceField2() → core::int;
   external set externalInstanceField2(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField2() → core::int;
   external get externalCovariantInstanceField2() → core::num;
-  external set externalCovariantInstanceField2(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField2(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalLateInstanceField() → core::int;
   external set externalLateInstanceField(core::int #externalFieldValue) → void;
 }
@@ -224,7 +224,7 @@
   external set externalInstanceField(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField() → core::int;
   external get externalCovariantInstanceField() → core::num;
-  external set externalCovariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 extension Extension on self::A {
   get extensionInstanceField = get self::Extension|extensionInstanceField;
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.outline.expect
index 799f3a0..04ad619 100644
--- a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.outline.expect
@@ -176,12 +176,12 @@
   external set externalInstanceField1(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField1() → core::int;
   external get externalCovariantInstanceField1() → core::num;
-  external set externalCovariantInstanceField1(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField1(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalInstanceField2() → core::int;
   external set externalInstanceField2(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField2() → core::int;
   external get externalCovariantInstanceField2() → core::num;
-  external set externalCovariantInstanceField2(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField2(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalLateInstanceField() → core::int;
   external set externalLateInstanceField(core::int #externalFieldValue) → void;
 }
@@ -192,7 +192,7 @@
   external set externalInstanceField(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField() → core::int;
   external get externalCovariantInstanceField() → core::num;
-  external set externalCovariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 extension Extension on self::A {
   get extensionInstanceField = get self::Extension|extensionInstanceField;
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
index a4118b8..ce1c9c6 100644
--- 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
@@ -208,12 +208,12 @@
   external set externalInstanceField1(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField1() → core::int;
   external get externalCovariantInstanceField1() → core::num;
-  external set externalCovariantInstanceField1(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField1(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalInstanceField2() → core::int;
   external set externalInstanceField2(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField2() → core::int;
   external get externalCovariantInstanceField2() → core::num;
-  external set externalCovariantInstanceField2(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField2(covariant-by-declaration core::num #externalFieldValue) → void;
   external get externalLateInstanceField() → core::int;
   external set externalLateInstanceField(core::int #externalFieldValue) → void;
 }
@@ -224,7 +224,7 @@
   external set externalInstanceField(core::int #externalFieldValue) → void;
   external get externalFinalInstanceField() → core::int;
   external get externalCovariantInstanceField() → core::num;
-  external set externalCovariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set externalCovariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 extension Extension on self::A {
   get extensionInstanceField = get self::Extension|extensionInstanceField;
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect
index 3e5529f..f9cfd21 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect
@@ -10,13 +10,13 @@
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 abstract class B extends core::Object /*isMixinDeclaration*/  {
   abstract get instanceField() → core::int;
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → 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
index 3e5529f..f9cfd21 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.transformed.expect
@@ -10,13 +10,13 @@
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 abstract class B extends core::Object /*isMixinDeclaration*/  {
   abstract get instanceField() → core::int;
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect
index 3e5529f..f9cfd21 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect
@@ -10,13 +10,13 @@
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 abstract class B extends core::Object /*isMixinDeclaration*/  {
   abstract get instanceField() → core::int;
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.outline.expect
index ff6c1e2..9184b1b 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.outline.expect
@@ -9,14 +9,14 @@
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 abstract class B extends core::Object /*isMixinDeclaration*/  {
   abstract get instanceField() → core::int;
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → 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
index 3e5529f..f9cfd21 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.transformed.expect
@@ -10,13 +10,13 @@
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 abstract class B extends core::Object /*isMixinDeclaration*/  {
   abstract get instanceField() → core::int;
   abstract set instanceField(core::int #externalFieldValue) → void;
   abstract get finalInstanceField() → core::int;
   abstract get covariantInstanceField() → core::num;
-  abstract set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  abstract set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → 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
index c91e11c..efa8606 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.expect
@@ -15,8 +15,8 @@
   abstract get fi() → core::int;
   abstract get fx() → dynamic;
   abstract get cn() → core::num;
-  abstract set cn(covariant core::num #externalFieldValue) → void;
+  abstract set cn(covariant-by-declaration core::num #externalFieldValue) → void;
   abstract get cx() → dynamic;
-  abstract set cx(covariant dynamic #externalFieldValue) → void;
+  abstract set cx(covariant-by-declaration dynamic #externalFieldValue) → 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
index c91e11c..efa8606 100644
--- 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
@@ -15,8 +15,8 @@
   abstract get fi() → core::int;
   abstract get fx() → dynamic;
   abstract get cn() → core::num;
-  abstract set cn(covariant core::num #externalFieldValue) → void;
+  abstract set cn(covariant-by-declaration core::num #externalFieldValue) → void;
   abstract get cx() → dynamic;
-  abstract set cx(covariant dynamic #externalFieldValue) → void;
+  abstract set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 static method main() → dynamic {}
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
index c91e11c..efa8606 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.expect
@@ -15,8 +15,8 @@
   abstract get fi() → core::int;
   abstract get fx() → dynamic;
   abstract get cn() → core::num;
-  abstract set cn(covariant core::num #externalFieldValue) → void;
+  abstract set cn(covariant-by-declaration core::num #externalFieldValue) → void;
   abstract get cx() → dynamic;
-  abstract set cx(covariant dynamic #externalFieldValue) → void;
+  abstract set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.outline.expect
index 21e1617..7126528 100644
--- a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.outline.expect
@@ -14,9 +14,9 @@
   abstract get fi() → core::int;
   abstract get fx() → dynamic;
   abstract get cn() → core::num;
-  abstract set cn(covariant core::num #externalFieldValue) → void;
+  abstract set cn(covariant-by-declaration core::num #externalFieldValue) → void;
   abstract get cx() → dynamic;
-  abstract set cx(covariant dynamic #externalFieldValue) → void;
+  abstract set cx(covariant-by-declaration dynamic #externalFieldValue) → 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
index c91e11c..efa8606 100644
--- 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
@@ -15,8 +15,8 @@
   abstract get fi() → core::int;
   abstract get fx() → dynamic;
   abstract get cn() → core::num;
-  abstract set cn(covariant core::num #externalFieldValue) → void;
+  abstract set cn(covariant-by-declaration core::num #externalFieldValue) → void;
   abstract get cx() → dynamic;
-  abstract set cx(covariant dynamic #externalFieldValue) → void;
+  abstract set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.expect b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.expect
index f8a2ab8..e981e5c 100644
--- a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::E%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::E% e) → void {
+  method method(covariant-by-class self::Class::E% e) → void {
     e = self::id<self::Class::E%>(e);
     e = self::id<self::Class::E%>(e);
     if(!(e == null)) {
diff --git a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.transformed.expect
index f8a2ab8..e981e5c 100644
--- a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::E%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::E% e) → void {
+  method method(covariant-by-class self::Class::E% e) → void {
     e = self::id<self::Class::E%>(e);
     e = self::id<self::Class::E%>(e);
     if(!(e == null)) {
diff --git a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.expect b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.expect
index f8a2ab8..e981e5c 100644
--- a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::E%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::E% e) → void {
+  method method(covariant-by-class self::Class::E% e) → void {
     e = self::id<self::Class::E%>(e);
     e = self::id<self::Class::E%>(e);
     if(!(e == null)) {
diff --git a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.outline.expect
index 2602561..e77d2e9 100644
--- a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Class<E extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::E%>
     ;
-  method method(generic-covariant-impl self::Class::E% e) → void
+  method method(covariant-by-class self::Class::E% e) → void
     ;
 }
 static method id<T extends core::Object? = dynamic>(self::id::T% t) → self::id::T%
diff --git a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.transformed.expect
index f8a2ab8..e981e5c 100644
--- a/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/assign_type_variable.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Class<self::Class::E%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Class::E% e) → void {
+  method method(covariant-by-class self::Class::E% e) → void {
     e = self::id<self::Class::E%>(e);
     e = self::id<self::Class::E%>(e);
     if(!(e == null)) {
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.strong.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.strong.expect
index 34958ef..4e4e563 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.strong.expect
@@ -13,24 +13,24 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 class C extends self::A implements self::B {
   synthetic constructor •() → self::C
     : super self::A::•()
     ;
-  forwarding-stub method method1({required covariant core::int a = #C1}) → void
+  forwarding-stub method method1({required covariant-by-declaration core::int a = #C1}) → void
     return super.{self::A::method1}(a: a);
-  forwarding-stub method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void
+  forwarding-stub method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void
     return super.{self::A::method2}(a: a, b: b);
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.strong.transformed.expect
index 34958ef..4e4e563 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.strong.transformed.expect
@@ -13,24 +13,24 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 class C extends self::A implements self::B {
   synthetic constructor •() → self::C
     : super self::A::•()
     ;
-  forwarding-stub method method1({required covariant core::int a = #C1}) → void
+  forwarding-stub method method1({required covariant-by-declaration core::int a = #C1}) → void
     return super.{self::A::method1}(a: a);
-  forwarding-stub method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void
+  forwarding-stub method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void
     return super.{self::A::method2}(a: a, b: b);
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.expect
index 34958ef..4e4e563 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.expect
@@ -13,24 +13,24 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 class C extends self::A implements self::B {
   synthetic constructor •() → self::C
     : super self::A::•()
     ;
-  forwarding-stub method method1({required covariant core::int a = #C1}) → void
+  forwarding-stub method method1({required covariant-by-declaration core::int a = #C1}) → void
     return super.{self::A::method1}(a: a);
-  forwarding-stub method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void
+  forwarding-stub method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void
     return super.{self::A::method2}(a: a, b: b);
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
index f39bdf2..1b3a496 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.outline.expect
@@ -13,25 +13,25 @@
 class B extends core::Object {
   synthetic constructor •() → self::B
     ;
-  method method1({required covariant core::int a}) → void
+  method method1({required covariant-by-declaration core::int a}) → void
     ;
-  method method2({covariant core::int? a, required core::int b}) → void
+  method method2({covariant-by-declaration core::int? a, required core::int b}) → void
     ;
 }
 class C extends self::A implements self::B {
   synthetic constructor •() → self::C
     ;
-  forwarding-stub method method1({required covariant core::int a}) → void
+  forwarding-stub method method1({required covariant-by-declaration core::int a}) → void
     return super.{self::A::method1}(a: a);
-  forwarding-stub method method2({covariant core::int? a, required core::int b}) → void
+  forwarding-stub method method2({covariant-by-declaration core::int? a, required core::int b}) → void
     return super.{self::A::method2}(a: a, b: b);
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     ;
-  method method1({required covariant core::int a}) → void
+  method method1({required covariant-by-declaration core::int a}) → void
     ;
-  method method2({covariant core::int? a, required core::int b}) → void
+  method method2({covariant-by-declaration core::int? a, required core::int b}) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.transformed.expect
index 34958ef..4e4e563 100644
--- a/pkg/front_end/testcases/nnbd/combined_required.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/combined_required.dart.weak.transformed.expect
@@ -13,24 +13,24 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 class C extends self::A implements self::B {
   synthetic constructor •() → self::C
     : super self::A::•()
     ;
-  forwarding-stub method method1({required covariant core::int a = #C1}) → void
+  forwarding-stub method method1({required covariant-by-declaration core::int a = #C1}) → void
     return super.{self::A::method1}(a: a);
-  forwarding-stub method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void
+  forwarding-stub method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void
     return super.{self::A::method2}(a: a, b: b);
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  method method1({required covariant core::int a = #C1}) → void {}
-  method method2({covariant core::int? a = #C1, required core::int b = #C1}) → void {}
+  method method1({required covariant-by-declaration core::int a = #C1}) → void {}
+  method method2({covariant-by-declaration core::int? a = #C1, required core::int b = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect b/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
index 1cece20..b7bd658 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
@@ -66,25 +66,25 @@
   return new self::C::•();
 static method main() → dynamic {
   self::expect(true, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C2);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(false, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
   self::expect(false, #C2);
-  self::expect((#C7) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C7 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(false, #C2);
-  self::expect((#C8) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C8 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C9) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C9 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C10) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C10 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(true, #C1);
-  self::expect((#C11) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C11 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
index 55a7036..3ad9691 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
@@ -66,25 +66,25 @@
   return new self::C::•();
 static method main() → dynamic {
   self::expect(true, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C2);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(false, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
   self::expect(false, #C2);
-  self::expect((#C7) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C7 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(false, #C2);
-  self::expect((#C8) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C8 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C9) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C9 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C2);
-  self::expect((#C10) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C10 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(true, #C1);
-  self::expect((#C11) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C11 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect b/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
index dcba0f8..81ac3c3 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
@@ -66,25 +66,25 @@
   return new self::C::•();
 static method main() → dynamic {
   self::expect(true, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(false, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
   self::expect(false, #C2);
-  self::expect((#C7) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C7 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(false, #C2);
-  self::expect((#C8) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C8 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C9) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C9 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C10) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C10 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
   self::expect(true, #C1);
-  self::expect((#C11) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C11 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
index eda5d9f..8fb3219 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
@@ -66,25 +66,25 @@
   return new self::C::•();
 static method main() → dynamic {
   self::expect(true, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C5) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C5 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({required i: core::int}) → core::int, #C1);
   self::expect(true, #C1);
-  self::expect((#C6) is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
+  self::expect(#C6 is{ForNonNullableByDefault} ({i: core::int}) → core::int, #C1);
   self::expect(false, #C2);
-  self::expect((#C5) is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
+  self::expect(#C5 is{ForNonNullableByDefault} ({required i1: core::int, required i10: core::int, required i11: core::int, required i12: core::int, required i13: core::int, required i14: core::int, required i15: core::int, required i16: core::int, required i17: core::int, required i18: core::int, required i19: core::int, required i2: core::int, required i20: core::int, required i21: core::int, required i22: core::int, required i23: core::int, required i24: core::int, required i25: core::int, required i26: core::int, required i27: core::int, required i28: core::int, required i29: core::int, required i3: core::int, required i30: core::int, required i31: core::int, required i32: core::int, required i33: core::int, required i34: core::int, required i35: core::int, required i36: core::int, required i37: core::int, required i38: core::int, required i39: core::int, required i4: core::int, required i40: core::int, required i41: core::int, required i42: core::int, required i43: core::int, required i44: core::int, required i45: core::int, required i46: core::int, required i47: core::int, required i48: core::int, required i49: core::int, required i5: core::int, required i50: core::int, required i51: core::int, required i52: core::int, required i53: core::int, required i54: core::int, required i55: core::int, required i56: core::int, required i57: core::int, required i58: core::int, required i59: core::int, required i6: core::int, required i60: core::int, required i61: core::int, required i62: core::int, required i63: core::int, required i64: core::int, required i65: core::int, required i66: core::int, required i67: core::int, required i68: core::int, required i69: core::int, required i7: core::int, required i70: core::int, required i8: core::int, required i9: core::int}) → core::int, #C2);
   self::expect(false, #C2);
-  self::expect((#C7) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C7 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(false, #C2);
-  self::expect((#C8) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
+  self::expect(#C8 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C2);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C9) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C9 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
   self::expect(!self::inStrongMode, #C1);
-  self::expect((#C10) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C10 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
   self::expect(true, #C1);
-  self::expect((#C11) is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
+  self::expect(#C11 is{ForNonNullableByDefault} (core::int, self::B, core::Map<core::int, core::num>, dynamic, {required ob: self::B, required obool: core::bool, required ol: core::List<core::num>, required ox: dynamic}) → self::B, #C1);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
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
index b3142fc..a50f6c7 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
@@ -40,7 +40,7 @@
 static method main() → dynamic {
   self::expect(42, #C1);
   self::expect(42, #C1);
-  self::expect(42, (#C3).{self::Class::y}{core::int});
+  self::expect(42, #C3.{self::Class::y}{core::int});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
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
index b3142fc..a50f6c7 100644
--- 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
@@ -40,7 +40,7 @@
 static method main() → dynamic {
   self::expect(42, #C1);
   self::expect(42, #C1);
-  self::expect(42, (#C3).{self::Class::y}{core::int});
+  self::expect(42, #C3.{self::Class::y}{core::int});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
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
index b3142fc..a50f6c7 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
@@ -40,7 +40,7 @@
 static method main() → dynamic {
   self::expect(42, #C1);
   self::expect(42, #C1);
-  self::expect(42, (#C3).{self::Class::y}{core::int});
+  self::expect(42, #C3.{self::Class::y}{core::int});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
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
index b3142fc..a50f6c7 100644
--- 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
@@ -40,7 +40,7 @@
 static method main() → dynamic {
   self::expect(42, #C1);
   self::expect(42, #C1);
-  self::expect(42, (#C3).{self::Class::y}{core::int});
+  self::expect(42, #C3.{self::Class::y}{core::int});
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.expect b/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.expect
index 390e1a9..b2e1d39 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.expect
@@ -19,7 +19,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -59,21 +59,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.transformed.expect
index d3fccea..c43182d 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_is.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -59,21 +59,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.expect b/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.expect
index d14ab66..94f3fa4 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.expect
@@ -19,7 +19,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -59,21 +59,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.transformed.expect
index fc6a3ef..556eb4b 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_is.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -59,21 +59,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
   if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.strong.expect b/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
index 70ed240..5ea885d 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
@@ -13,22 +13,22 @@
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
-static const field core::bool objectTypeLiteralIdentical = #C16;
-static const field core::bool partialInstantiationIdentical = #C16;
-static const field core::bool instanceIdentical = #C16;
-static const field core::bool functionTypeLiteralIdentical = #C16;
-static const field core::bool genericFunctionTypeLiteralIdentical = #C16;
-static const field core::bool listLiteralIdentical = #C16;
-static const field core::bool setLiteralIdentical = #C16;
-static const field core::bool mapLiteralIdentical = #C16;
-static const field core::bool listConcatenationIdentical = #C16;
-static const field core::bool setConcatenationIdentical = #C16;
-static const field core::bool mapConcatenationIdentical = #C16;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
+static const field core::bool objectTypeLiteralIdentical = #C12;
+static const field core::bool partialInstantiationIdentical = #C12;
+static const field core::bool instanceIdentical = #C12;
+static const field core::bool functionTypeLiteralIdentical = #C12;
+static const field core::bool genericFunctionTypeLiteralIdentical = #C12;
+static const field core::bool listLiteralIdentical = #C12;
+static const field core::bool setLiteralIdentical = #C12;
+static const field core::bool mapLiteralIdentical = #C12;
+static const field core::bool listConcatenationIdentical = #C12;
+static const field core::bool setConcatenationIdentical = #C12;
+static const field core::bool mapConcatenationIdentical = #C12;
 static method main() → dynamic {
   self::test(#C1, #C1);
   self::test(#C3, #C3);
@@ -36,22 +36,22 @@
   self::test(#C6, #C6);
   self::test(#C7, #C7);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -73,17 +73,17 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C17;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C13;
 static const field (core::int) → core::int partialInstantiation = #C3;
 static const field con::Class<core::int> instance = #C5;
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
 static method id<T extends core::Object? = dynamic>(con::id::T% t) → con::id::T%
   return t;
 
@@ -96,15 +96,11 @@
   #C6 = TypeLiteralConstant((dynamic) → dynamic)
   #C7 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → T%)
   #C8 = <core::int>[#C4]
-  #C9 = null
-  #C10 = <dynamic>[#C4, #C9]
-  #C11 = core::_ImmutableMap<core::int, Null> {_kvPairs:#C10}
-  #C12 = col::_UnmodifiableSet<core::int> {_map:#C11}
-  #C13 = "foo"
-  #C14 = <dynamic>[#C4, #C13]
-  #C15 = core::_ImmutableMap<core::int, core::String> {_kvPairs:#C14}
-  #C16 = true
-  #C17 = static-tearoff core::identical
+  #C9 = <core::int>{#C4}
+  #C10 = "foo"
+  #C11 = <core::int, core::String>{#C4:#C10)
+  #C12 = true
+  #C13 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
index 70ed240..5ea885d 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
@@ -13,22 +13,22 @@
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
-static const field core::bool objectTypeLiteralIdentical = #C16;
-static const field core::bool partialInstantiationIdentical = #C16;
-static const field core::bool instanceIdentical = #C16;
-static const field core::bool functionTypeLiteralIdentical = #C16;
-static const field core::bool genericFunctionTypeLiteralIdentical = #C16;
-static const field core::bool listLiteralIdentical = #C16;
-static const field core::bool setLiteralIdentical = #C16;
-static const field core::bool mapLiteralIdentical = #C16;
-static const field core::bool listConcatenationIdentical = #C16;
-static const field core::bool setConcatenationIdentical = #C16;
-static const field core::bool mapConcatenationIdentical = #C16;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
+static const field core::bool objectTypeLiteralIdentical = #C12;
+static const field core::bool partialInstantiationIdentical = #C12;
+static const field core::bool instanceIdentical = #C12;
+static const field core::bool functionTypeLiteralIdentical = #C12;
+static const field core::bool genericFunctionTypeLiteralIdentical = #C12;
+static const field core::bool listLiteralIdentical = #C12;
+static const field core::bool setLiteralIdentical = #C12;
+static const field core::bool mapLiteralIdentical = #C12;
+static const field core::bool listConcatenationIdentical = #C12;
+static const field core::bool setConcatenationIdentical = #C12;
+static const field core::bool mapConcatenationIdentical = #C12;
 static method main() → dynamic {
   self::test(#C1, #C1);
   self::test(#C3, #C3);
@@ -36,22 +36,22 @@
   self::test(#C6, #C6);
   self::test(#C7, #C7);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -73,17 +73,17 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C17;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C13;
 static const field (core::int) → core::int partialInstantiation = #C3;
 static const field con::Class<core::int> instance = #C5;
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
 static method id<T extends core::Object? = dynamic>(con::id::T% t) → con::id::T%
   return t;
 
@@ -96,15 +96,11 @@
   #C6 = TypeLiteralConstant((dynamic) → dynamic)
   #C7 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T%) → T%)
   #C8 = <core::int>[#C4]
-  #C9 = null
-  #C10 = <dynamic>[#C4, #C9]
-  #C11 = core::_ImmutableMap<core::int, Null> {_kvPairs:#C10}
-  #C12 = col::_UnmodifiableSet<core::int> {_map:#C11}
-  #C13 = "foo"
-  #C14 = <dynamic>[#C4, #C13]
-  #C15 = core::_ImmutableMap<core::int, core::String> {_kvPairs:#C14}
-  #C16 = true
-  #C17 = static-tearoff core::identical
+  #C9 = <core::int>{#C4}
+  #C10 = "foo"
+  #C11 = <core::int, core::String>{#C4:#C10)
+  #C12 = true
+  #C13 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.weak.expect b/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
index b26ca6d..17a63c7 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
@@ -13,22 +13,22 @@
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
-static const field core::bool objectTypeLiteralIdentical = #C16;
-static const field core::bool partialInstantiationIdentical = #C16;
-static const field core::bool instanceIdentical = #C16;
-static const field core::bool functionTypeLiteralIdentical = #C16;
-static const field core::bool genericFunctionTypeLiteralIdentical = #C16;
-static const field core::bool listLiteralIdentical = #C16;
-static const field core::bool setLiteralIdentical = #C16;
-static const field core::bool mapLiteralIdentical = #C16;
-static const field core::bool listConcatenationIdentical = #C16;
-static const field core::bool setConcatenationIdentical = #C16;
-static const field core::bool mapConcatenationIdentical = #C16;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
+static const field core::bool objectTypeLiteralIdentical = #C12;
+static const field core::bool partialInstantiationIdentical = #C12;
+static const field core::bool instanceIdentical = #C12;
+static const field core::bool functionTypeLiteralIdentical = #C12;
+static const field core::bool genericFunctionTypeLiteralIdentical = #C12;
+static const field core::bool listLiteralIdentical = #C12;
+static const field core::bool setLiteralIdentical = #C12;
+static const field core::bool mapLiteralIdentical = #C12;
+static const field core::bool listConcatenationIdentical = #C12;
+static const field core::bool setConcatenationIdentical = #C12;
+static const field core::bool mapConcatenationIdentical = #C12;
 static method main() → dynamic {
   self::test(#C1, #C1);
   self::test(#C3, #C3);
@@ -36,22 +36,22 @@
   self::test(#C6, #C6);
   self::test(#C7, #C7);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -73,17 +73,17 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C17;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C13;
 static const field (core::int) → core::int partialInstantiation = #C3;
 static const field con::Class<core::int> instance = #C5;
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
 static method id<T extends core::Object? = dynamic>(con::id::T% t) → con::id::T%
   return t;
 
@@ -96,15 +96,11 @@
   #C6 = TypeLiteralConstant((dynamic) →* dynamic)
   #C7 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* T*)
   #C8 = <core::int*>[#C4]
-  #C9 = null
-  #C10 = <dynamic>[#C4, #C9]
-  #C11 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C10}
-  #C12 = col::_UnmodifiableSet<core::int*> {_map:#C11}
-  #C13 = "foo"
-  #C14 = <dynamic>[#C4, #C13]
-  #C15 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C14}
-  #C16 = true
-  #C17 = static-tearoff core::identical
+  #C9 = <core::int*>{#C4}
+  #C10 = "foo"
+  #C11 = <core::int*, core::String*>{#C4:#C10)
+  #C12 = true
+  #C13 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/constants.dart.weak.outline.expect
index 1d425f6..5c642d9 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.weak.outline.expect
@@ -69,11 +69,11 @@
 Evaluated: TypeLiteral @ org-dartlang-testcase:///constants.dart:13:29 -> TypeLiteralConstant(dynamic Function(dynamic)*)
 Evaluated: TypeLiteral @ org-dartlang-testcase:///constants.dart:14:36 -> TypeLiteralConstant(T* Function<T>(T*)*)
 Evaluated: ListLiteral @ org-dartlang-testcase:///constants.dart:15:26 -> ListConstant(const <int*>[0])
-Evaluated: SetLiteral @ org-dartlang-testcase:///constants.dart:16:25 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapLiteral @ org-dartlang-testcase:///constants.dart:17:33 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetLiteral @ org-dartlang-testcase:///constants.dart:16:25 -> SetConstant(const <int*>{0})
+Evaluated: MapLiteral @ org-dartlang-testcase:///constants.dart:17:33 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: ListConcatenation @ org-dartlang-testcase:///constants.dart:18:32 -> ListConstant(const <int*>[0])
-Evaluated: SetConcatenation @ org-dartlang-testcase:///constants.dart:19:31 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapConcatenation @ org-dartlang-testcase:///constants.dart:20:7 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///constants.dart:19:31 -> SetConstant(const <int*>{0})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///constants.dart:20:7 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:23:5 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:25:5 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:26:27 -> BoolConstant(true)
@@ -92,9 +92,9 @@
 Evaluated: TypeLiteral @ org-dartlang-testcase:///constants_lib.dart:20:29 -> TypeLiteralConstant(dynamic Function(dynamic)*)
 Evaluated: TypeLiteral @ org-dartlang-testcase:///constants_lib.dart:21:36 -> TypeLiteralConstant(T* Function<T>(T*)*)
 Evaluated: ListLiteral @ org-dartlang-testcase:///constants_lib.dart:22:26 -> ListConstant(const <int*>[0])
-Evaluated: SetLiteral @ org-dartlang-testcase:///constants_lib.dart:23:25 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapLiteral @ org-dartlang-testcase:///constants_lib.dart:24:33 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetLiteral @ org-dartlang-testcase:///constants_lib.dart:23:25 -> SetConstant(const <int*>{0})
+Evaluated: MapLiteral @ org-dartlang-testcase:///constants_lib.dart:24:33 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: ListConcatenation @ org-dartlang-testcase:///constants_lib.dart:25:32 -> ListConstant(const <int*>[0])
-Evaluated: SetConcatenation @ org-dartlang-testcase:///constants_lib.dart:26:31 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapConcatenation @ org-dartlang-testcase:///constants_lib.dart:27:7 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///constants_lib.dart:26:31 -> SetConstant(const <int*>{0})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///constants_lib.dart:27:7 -> MapConstant(const <int*, String*>{0: "foo"})
 Extra constant evaluation: evaluated: 35, effectively constant: 34
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
index b26ca6d..17a63c7 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
@@ -13,22 +13,22 @@
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
-static const field core::bool objectTypeLiteralIdentical = #C16;
-static const field core::bool partialInstantiationIdentical = #C16;
-static const field core::bool instanceIdentical = #C16;
-static const field core::bool functionTypeLiteralIdentical = #C16;
-static const field core::bool genericFunctionTypeLiteralIdentical = #C16;
-static const field core::bool listLiteralIdentical = #C16;
-static const field core::bool setLiteralIdentical = #C16;
-static const field core::bool mapLiteralIdentical = #C16;
-static const field core::bool listConcatenationIdentical = #C16;
-static const field core::bool setConcatenationIdentical = #C16;
-static const field core::bool mapConcatenationIdentical = #C16;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
+static const field core::bool objectTypeLiteralIdentical = #C12;
+static const field core::bool partialInstantiationIdentical = #C12;
+static const field core::bool instanceIdentical = #C12;
+static const field core::bool functionTypeLiteralIdentical = #C12;
+static const field core::bool genericFunctionTypeLiteralIdentical = #C12;
+static const field core::bool listLiteralIdentical = #C12;
+static const field core::bool setLiteralIdentical = #C12;
+static const field core::bool mapLiteralIdentical = #C12;
+static const field core::bool listConcatenationIdentical = #C12;
+static const field core::bool setConcatenationIdentical = #C12;
+static const field core::bool mapConcatenationIdentical = #C12;
 static method main() → dynamic {
   self::test(#C1, #C1);
   self::test(#C3, #C3);
@@ -36,22 +36,22 @@
   self::test(#C6, #C6);
   self::test(#C7, #C7);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
   self::test(#C8, #C8);
-  self::test(#C12, #C12);
-  self::test(#C15, #C15);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
-  self::test(true, #C16);
+  self::test(#C9, #C9);
+  self::test(#C11, #C11);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
+  self::test(true, #C12);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -73,17 +73,17 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C17;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C13;
 static const field (core::int) → core::int partialInstantiation = #C3;
 static const field con::Class<core::int> instance = #C5;
 static const field core::Type functionTypeLiteral = #C6;
 static const field core::Type genericFunctionTypeLiteral = #C7;
 static const field core::List<core::int> listLiteral = #C8;
-static const field core::Set<core::int> setLiteral = #C12;
-static const field core::Map<core::int, core::String> mapLiteral = #C15;
+static const field core::Set<core::int> setLiteral = #C9;
+static const field core::Map<core::int, core::String> mapLiteral = #C11;
 static const field core::List<core::int> listConcatenation = #C8;
-static const field core::Set<core::int> setConcatenation = #C12;
-static const field core::Map<core::int, core::String> mapConcatenation = #C15;
+static const field core::Set<core::int> setConcatenation = #C9;
+static const field core::Map<core::int, core::String> mapConcatenation = #C11;
 static method id<T extends core::Object? = dynamic>(con::id::T% t) → con::id::T%
   return t;
 
@@ -96,15 +96,11 @@
   #C6 = TypeLiteralConstant((dynamic) →* dynamic)
   #C7 = TypeLiteralConstant(<T extends core::Object? = dynamic>(T*) →* T*)
   #C8 = <core::int*>[#C4]
-  #C9 = null
-  #C10 = <dynamic>[#C4, #C9]
-  #C11 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C10}
-  #C12 = col::_UnmodifiableSet<core::int*> {_map:#C11}
-  #C13 = "foo"
-  #C14 = <dynamic>[#C4, #C13]
-  #C15 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C14}
-  #C16 = true
-  #C17 = static-tearoff core::identical
+  #C9 = <core::int*>{#C4}
+  #C10 = "foo"
+  #C11 = <core::int*, core::String*>{#C4:#C10)
+  #C12 = true
+  #C13 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.expect b/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.expect
index 23b6d19..ac2d469 100644
--- a/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.expect
@@ -273,21 +273,21 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T%> other) → core::bool
     return true;
 }
 class D extends self::C<core::int> {
diff --git a/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.transformed.expect
index 23b6d19..ac2d469 100644
--- a/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_equals.dart.strong.transformed.expect
@@ -273,21 +273,21 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T%> other) → core::bool
     return true;
 }
 class D extends self::C<core::int> {
diff --git a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.expect b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.expect
index 23b6d19..ac2d469 100644
--- a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.expect
@@ -273,21 +273,21 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T%> other) → core::bool
     return true;
 }
 class D extends self::C<core::int> {
diff --git a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.outline.expect
index 7ead045..7d5b0a9 100644
--- a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.outline.expect
@@ -5,19 +5,19 @@
 class A extends core::Object {
   synthetic constructor •() → self::A
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     ;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     ;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T%> other) → core::bool
     ;
 }
 class D extends self::C<core::int> {
diff --git a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.transformed.expect
index 23b6d19..ac2d469 100644
--- a/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_equals.dart.weak.transformed.expect
@@ -273,21 +273,21 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
-  operator ==(covariant self::A other) → core::bool
+  operator ==(covariant-by-declaration self::A other) → core::bool
     return true;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T%> other) → core::bool
     return true;
 }
 class D extends self::C<core::int> {
diff --git a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.strong.expect b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.strong.expect
index f8620c0..2aecfe1 100644
--- a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.strong.expect
@@ -15,7 +15,7 @@
 
 class A extends core::Object {
   late field core::num invariantField;
-  late covariant field core::num covariantField;
+  late covariant-by-declaration field core::num covariantField;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
@@ -27,7 +27,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -36,15 +36,15 @@
   abstract get invariantField() → core::int;
   set invariantField(core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void {}
+  set invariantField(covariant-by-declaration core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.expect b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.expect
index f8620c0..2aecfe1 100644
--- a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.expect
@@ -15,7 +15,7 @@
 
 class A extends core::Object {
   late field core::num invariantField;
-  late covariant field core::num covariantField;
+  late covariant-by-declaration field core::num covariantField;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
@@ -27,7 +27,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -36,15 +36,15 @@
   abstract get invariantField() → core::int;
   set invariantField(core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void {}
+  set invariantField(covariant-by-declaration core::int value) → void {}
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void {}
+  set covariantField(covariant-by-declaration core::int value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.outline.expect
index 68a5f71e..02e8d02 100644
--- a/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_late_field.dart.weak.outline.expect
@@ -15,7 +15,7 @@
 
 class A extends core::Object {
   late field core::num invariantField;
-  late covariant field core::num covariantField;
+  late covariant-by-declaration field core::num covariantField;
   synthetic constructor •() → self::A
     ;
 }
@@ -25,7 +25,7 @@
   abstract get invariantField() → core::num;
   abstract set invariantField(core::num value) → void;
   abstract get covariantField() → core::num;
-  abstract set covariantField(covariant core::num value) → void;
+  abstract set covariantField(covariant-by-declaration core::num value) → void;
 }
 abstract class C extends core::Object implements self::A {
   synthetic constructor •() → self::C
@@ -34,17 +34,17 @@
   set invariantField(core::int value) → void
     ;
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void
+  set covariantField(covariant-by-declaration core::int value) → void
     ;
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     ;
   abstract get invariantField() → core::int;
-  set invariantField(covariant core::int value) → void
+  set invariantField(covariant-by-declaration core::int value) → void
     ;
   abstract get covariantField() → core::int;
-  set covariantField(covariant core::int value) → void
+  set covariantField(covariant-by-declaration core::int value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.expect b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.expect
index 85ec816..692e181 100644
--- a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.expect
@@ -12,25 +12,25 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method method(covariant core::num a) → void;
+  abstract method method(covariant-by-declaration core::num a) → void;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class D1 extends core::Object implements self::A, self::B, self::C {
   synthetic constructor •() → self::D1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D2 extends core::Object implements self::A, self::B {
   synthetic constructor •() → self::D2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D3 extends core::Object implements self::B, self::C {
   synthetic constructor •() → self::D3
@@ -41,13 +41,13 @@
   synthetic constructor •() → self::D4
     : super core::Object::•()
     ;
-  abstract member-signature method method(covariant core::num a) → void; -> self::B::method
+  abstract member-signature method method(covariant-by-declaration core::num a) → void; -> self::B::method
 }
 abstract class D5 extends core::Object implements self::A, self::C {
   synthetic constructor •() → self::D5
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class E extends core::Object {
   synthetic constructor •() → self::E
@@ -59,18 +59,18 @@
   synthetic constructor •() → self::F
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class G1 extends core::Object implements self::E, self::F {
   synthetic constructor •() → self::G1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 abstract class G2 extends core::Object implements self::F, self::E {
   synthetic constructor •() → self::G2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.transformed.expect
index 85ec816..692e181 100644
--- a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.strong.transformed.expect
@@ -12,25 +12,25 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method method(covariant core::num a) → void;
+  abstract method method(covariant-by-declaration core::num a) → void;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class D1 extends core::Object implements self::A, self::B, self::C {
   synthetic constructor •() → self::D1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D2 extends core::Object implements self::A, self::B {
   synthetic constructor •() → self::D2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D3 extends core::Object implements self::B, self::C {
   synthetic constructor •() → self::D3
@@ -41,13 +41,13 @@
   synthetic constructor •() → self::D4
     : super core::Object::•()
     ;
-  abstract member-signature method method(covariant core::num a) → void; -> self::B::method
+  abstract member-signature method method(covariant-by-declaration core::num a) → void; -> self::B::method
 }
 abstract class D5 extends core::Object implements self::A, self::C {
   synthetic constructor •() → self::D5
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class E extends core::Object {
   synthetic constructor •() → self::E
@@ -59,18 +59,18 @@
   synthetic constructor •() → self::F
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class G1 extends core::Object implements self::E, self::F {
   synthetic constructor •() → self::G1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 abstract class G2 extends core::Object implements self::F, self::E {
   synthetic constructor •() → self::G2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.expect b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.expect
index 85ec816..692e181 100644
--- a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.expect
@@ -12,25 +12,25 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method method(covariant core::num a) → void;
+  abstract method method(covariant-by-declaration core::num a) → void;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class D1 extends core::Object implements self::A, self::B, self::C {
   synthetic constructor •() → self::D1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D2 extends core::Object implements self::A, self::B {
   synthetic constructor •() → self::D2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D3 extends core::Object implements self::B, self::C {
   synthetic constructor •() → self::D3
@@ -41,13 +41,13 @@
   synthetic constructor •() → self::D4
     : super core::Object::•()
     ;
-  abstract member-signature method method(covariant core::num a) → void; -> self::B::method
+  abstract member-signature method method(covariant-by-declaration core::num a) → void; -> self::B::method
 }
 abstract class D5 extends core::Object implements self::A, self::C {
   synthetic constructor •() → self::D5
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class E extends core::Object {
   synthetic constructor •() → self::E
@@ -59,18 +59,18 @@
   synthetic constructor •() → self::F
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class G1 extends core::Object implements self::E, self::F {
   synthetic constructor •() → self::G1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 abstract class G2 extends core::Object implements self::F, self::E {
   synthetic constructor •() → self::G2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.outline.expect
index 9504dc6..6b6539e 100644
--- a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.outline.expect
@@ -10,22 +10,22 @@
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     ;
-  abstract method method(covariant core::num a) → void;
+  abstract method method(covariant-by-declaration core::num a) → void;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class D1 extends core::Object implements self::A, self::B, self::C {
   synthetic constructor •() → self::D1
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D2 extends core::Object implements self::A, self::B {
   synthetic constructor •() → self::D2
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D3 extends core::Object implements self::B, self::C {
   synthetic constructor •() → self::D3
@@ -34,12 +34,12 @@
 abstract class D4 extends core::Object implements self::C, self::B {
   synthetic constructor •() → self::D4
     ;
-  abstract member-signature method method(covariant core::num a) → void; -> self::B::method
+  abstract member-signature method method(covariant-by-declaration core::num a) → void; -> self::B::method
 }
 abstract class D5 extends core::Object implements self::A, self::C {
   synthetic constructor •() → self::D5
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class E extends core::Object {
   synthetic constructor •() → self::E
@@ -49,17 +49,17 @@
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class G1 extends core::Object implements self::E, self::F {
   synthetic constructor •() → self::G1
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 abstract class G2 extends core::Object implements self::F, self::E {
   synthetic constructor •() → self::G2
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.transformed.expect
index 85ec816..692e181 100644
--- a/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/covariant_nnbd_top_merge.dart.weak.transformed.expect
@@ -12,25 +12,25 @@
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method method(covariant core::num a) → void;
+  abstract method method(covariant-by-declaration core::num a) → void;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class D1 extends core::Object implements self::A, self::B, self::C {
   synthetic constructor •() → self::D1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D2 extends core::Object implements self::A, self::B {
   synthetic constructor •() → self::D2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class D3 extends core::Object implements self::B, self::C {
   synthetic constructor •() → self::D3
@@ -41,13 +41,13 @@
   synthetic constructor •() → self::D4
     : super core::Object::•()
     ;
-  abstract member-signature method method(covariant core::num a) → void; -> self::B::method
+  abstract member-signature method method(covariant-by-declaration core::num a) → void; -> self::B::method
 }
 abstract class D5 extends core::Object implements self::A, self::C {
   synthetic constructor •() → self::D5
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant dynamic a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration dynamic a) → void;
 }
 abstract class E extends core::Object {
   synthetic constructor •() → self::E
@@ -59,18 +59,18 @@
   synthetic constructor •() → self::F
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int a) → void;
+  abstract method method(covariant-by-declaration core::int a) → void;
 }
 abstract class G1 extends core::Object implements self::E, self::F {
   synthetic constructor •() → self::G1
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 abstract class G2 extends core::Object implements self::F, self::E {
   synthetic constructor •() → self::G2
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num a) → void;
+  abstract forwarding-stub method method(covariant-by-declaration core::num a) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.expect b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.expect
index db466d1..677a9bb 100644
--- a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.expect
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.transformed.expect
index db466d1..677a9bb 100644
--- a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.expect b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.expect
index db466d1..677a9bb 100644
--- a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.expect
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.outline.expect
index f29c5b8..4176cbdf 100644
--- a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class A<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T%>
     ;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic
+  method bar(covariant-by-class self::A::T% value) → dynamic
     ;
   method barInt(core::int value) → dynamic
     ;
diff --git a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.transformed.expect
index db466d1..677a9bb 100644
--- a/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/definitely_unassigned_late_local_variables.dart.weak.transformed.expect
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.expect b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.expect
index 07e7856..cf250c2 100644
--- a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.expect
@@ -57,7 +57,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class>(self::test2::T t2) → dynamic {
-  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} (#C1)) {
+  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} #C1) {
     self::SubClass subClass = invalid-expression "pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart:26:28: Error: A value of type 'T' can't be assigned to a variable of type 'SubClass'.
  - 'SubClass' is from 'pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart'.
     SubClass subClass = t2.method2();
diff --git a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.transformed.expect
index 88447ae..3c8dff6 100644
--- a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.strong.transformed.expect
@@ -57,7 +57,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class>(self::test2::T t2) → dynamic {
-  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} (#C1)) {
+  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} #C1) {
     self::SubClass subClass = invalid-expression "pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart:26:28: Error: A value of type 'T' can't be assigned to a variable of type 'SubClass'.
  - 'SubClass' is from 'pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart'.
     SubClass subClass = t2.method2();
diff --git a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.expect b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.expect
index d58abf1..beb5bfc 100644
--- a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.expect
@@ -57,7 +57,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class>(self::test2::T t2) → dynamic {
-  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} (#C1)) {
+  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} #C1) {
     self::SubClass subClass = invalid-expression "pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart:26:28: Error: A value of type 'T' can't be assigned to a variable of type 'SubClass'.
  - 'SubClass' is from 'pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart'.
     SubClass subClass = t2.method2();
diff --git a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.transformed.expect
index b18bd22..b676aa4 100644
--- a/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart.weak.transformed.expect
@@ -57,7 +57,7 @@
   return new self::Class::•();
 }
 static method test2<T extends self::Class>(self::test2::T t2) → dynamic {
-  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} (#C1)) {
+  if(self::test2::T =={core::Type::==}{(core::Object) → core::bool} #C1) {
     self::SubClass subClass = invalid-expression "pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart:26:28: Error: A value of type 'T' can't be assigned to a variable of type 'SubClass'.
  - 'SubClass' is from 'pkg/front_end/testcases/nnbd/extension_type_variable_bound.dart'.
     SubClass subClass = t2.method2();
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
index 5d4f518..ec21f8d 100644
--- a/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.expect
@@ -101,9 +101,9 @@
   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;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
@@ -113,9 +113,9 @@
 external static get finalTopLevelField() → core::int;
 external static get constField() → core::int;
 external static set constField(core::int #externalFieldValue) → void;
-external static get Extension|extensionInstanceField() → core::int;
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 external static get Extension|extensionStaticField() → core::int;
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 external static get Extension|finalExtensionStaticField() → core::int;
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
index 5d4f518..ec21f8d 100644
--- 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
@@ -101,9 +101,9 @@
   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;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
@@ -113,9 +113,9 @@
 external static get finalTopLevelField() → core::int;
 external static get constField() → core::int;
 external static set constField(core::int #externalFieldValue) → void;
-external static get Extension|extensionInstanceField() → core::int;
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 external static get Extension|extensionStaticField() → core::int;
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 external static get Extension|finalExtensionStaticField() → core::int;
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
index 5d4f518..ec21f8d 100644
--- a/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.expect
@@ -101,9 +101,9 @@
   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;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
@@ -113,9 +113,9 @@
 external static get finalTopLevelField() → core::int;
 external static get constField() → core::int;
 external static set constField(core::int #externalFieldValue) → void;
-external static get Extension|extensionInstanceField() → core::int;
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 external static get Extension|extensionStaticField() → core::int;
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 external static get Extension|finalExtensionStaticField() → core::int;
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.outline.expect
index d92b2fe..994b1f9 100644
--- a/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.outline.expect
@@ -21,9 +21,9 @@
   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;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
@@ -33,9 +33,9 @@
 external static get finalTopLevelField() → core::int;
 external static get constField() → core::int;
 external static set constField(core::int #externalFieldValue) → void;
-external static get Extension|extensionInstanceField() → core::int;
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 external static get Extension|extensionStaticField() → core::int;
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 external static get Extension|finalExtensionStaticField() → core::int;
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
index 5d4f518..ec21f8d 100644
--- 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
@@ -101,9 +101,9 @@
   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;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
@@ -113,9 +113,9 @@
 external static get finalTopLevelField() → core::int;
 external static get constField() → core::int;
 external static set constField(core::int #externalFieldValue) → void;
-external static get Extension|extensionInstanceField() → core::int;
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 external static get Extension|extensionStaticField() → core::int;
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 external static get Extension|finalExtensionStaticField() → core::int;
diff --git a/pkg/front_end/testcases/nnbd/external_fields.dart.strong.expect b/pkg/front_end/testcases/nnbd/external_fields.dart.strong.expect
index 660d848..9ca288c 100644
--- a/pkg/front_end/testcases/nnbd/external_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields.dart.strong.expect
@@ -20,7 +20,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -31,7 +31,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -46,7 +46,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -57,7 +57,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -70,23 +70,23 @@
   external set instanceField(core::int #externalFieldValue) → void;
   external get finalInstanceField() → core::int;
   external get covariantInstanceField() → core::num;
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   external get untypedInstanceField() → dynamic;
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 extension Extension on self::A {
-  get extensionInstanceField = get self::Extension|extensionInstanceField;
-  set extensionInstanceField = set self::Extension|extensionInstanceField;
-  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
-  get untypedExtensionInstanceField = get self::Extension|untypedExtensionInstanceField;
-  set untypedExtensionInstanceField = set self::Extension|untypedExtensionInstanceField;
-  get untypedFinalExtensionInstanceField = get self::Extension|untypedFinalExtensionInstanceField;
+  get untypedExtensionInstanceField = self::Extension|get#untypedExtensionInstanceField;
+  set untypedExtensionInstanceField = self::Extension|set#untypedExtensionInstanceField;
+  get untypedFinalExtensionInstanceField = self::Extension|get#untypedFinalExtensionInstanceField;
   static get untypedExtensionStaticField = get self::Extension|untypedExtensionStaticField;
   static set untypedExtensionStaticField = set self::Extension|untypedExtensionStaticField;
   static get untypedFinalExtensionStaticField = get self::Extension|untypedFinalExtensionStaticField;
@@ -101,20 +101,20 @@
 external static set untypedTopLevelField(dynamic #externalFieldValue) → void;
 external static get untypedFinalTopLevelField() → dynamic;
 @#C1
-external static get Extension|extensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
 @#C1
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
 @#C1
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 @#C1
 external static get Extension|extensionStaticField() → core::int;
 @#C1
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 @#C1
 external static get Extension|finalExtensionStaticField() → core::int;
-external static get Extension|untypedExtensionInstanceField() → dynamic;
-external static set Extension|untypedExtensionInstanceField(dynamic #externalFieldValue) → void;
-external static get Extension|untypedFinalExtensionInstanceField() → dynamic;
+external static method Extension|get#untypedExtensionInstanceField(self::A #this) → dynamic;
+external static method Extension|set#untypedExtensionInstanceField(self::A #this, dynamic #externalFieldValue) → void;
+external static method Extension|get#untypedFinalExtensionInstanceField(self::A #this) → dynamic;
 external static get Extension|untypedExtensionStaticField() → dynamic;
 external static set Extension|untypedExtensionStaticField(dynamic #externalFieldValue) → void;
 external static get Extension|untypedFinalExtensionStaticField() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/external_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/external_fields.dart.strong.transformed.expect
index 660d848..9ca288c 100644
--- a/pkg/front_end/testcases/nnbd/external_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields.dart.strong.transformed.expect
@@ -20,7 +20,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -31,7 +31,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -46,7 +46,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -57,7 +57,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -70,23 +70,23 @@
   external set instanceField(core::int #externalFieldValue) → void;
   external get finalInstanceField() → core::int;
   external get covariantInstanceField() → core::num;
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   external get untypedInstanceField() → dynamic;
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 extension Extension on self::A {
-  get extensionInstanceField = get self::Extension|extensionInstanceField;
-  set extensionInstanceField = set self::Extension|extensionInstanceField;
-  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
-  get untypedExtensionInstanceField = get self::Extension|untypedExtensionInstanceField;
-  set untypedExtensionInstanceField = set self::Extension|untypedExtensionInstanceField;
-  get untypedFinalExtensionInstanceField = get self::Extension|untypedFinalExtensionInstanceField;
+  get untypedExtensionInstanceField = self::Extension|get#untypedExtensionInstanceField;
+  set untypedExtensionInstanceField = self::Extension|set#untypedExtensionInstanceField;
+  get untypedFinalExtensionInstanceField = self::Extension|get#untypedFinalExtensionInstanceField;
   static get untypedExtensionStaticField = get self::Extension|untypedExtensionStaticField;
   static set untypedExtensionStaticField = set self::Extension|untypedExtensionStaticField;
   static get untypedFinalExtensionStaticField = get self::Extension|untypedFinalExtensionStaticField;
@@ -101,20 +101,20 @@
 external static set untypedTopLevelField(dynamic #externalFieldValue) → void;
 external static get untypedFinalTopLevelField() → dynamic;
 @#C1
-external static get Extension|extensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
 @#C1
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
 @#C1
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 @#C1
 external static get Extension|extensionStaticField() → core::int;
 @#C1
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 @#C1
 external static get Extension|finalExtensionStaticField() → core::int;
-external static get Extension|untypedExtensionInstanceField() → dynamic;
-external static set Extension|untypedExtensionInstanceField(dynamic #externalFieldValue) → void;
-external static get Extension|untypedFinalExtensionInstanceField() → dynamic;
+external static method Extension|get#untypedExtensionInstanceField(self::A #this) → dynamic;
+external static method Extension|set#untypedExtensionInstanceField(self::A #this, dynamic #externalFieldValue) → void;
+external static method Extension|get#untypedFinalExtensionInstanceField(self::A #this) → dynamic;
 external static get Extension|untypedExtensionStaticField() → dynamic;
 external static set Extension|untypedExtensionStaticField(dynamic #externalFieldValue) → void;
 external static get Extension|untypedFinalExtensionStaticField() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.expect b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.expect
index 660d848..9ca288c 100644
--- a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.expect
@@ -20,7 +20,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -31,7 +31,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -46,7 +46,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -57,7 +57,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -70,23 +70,23 @@
   external set instanceField(core::int #externalFieldValue) → void;
   external get finalInstanceField() → core::int;
   external get covariantInstanceField() → core::num;
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   external get untypedInstanceField() → dynamic;
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 extension Extension on self::A {
-  get extensionInstanceField = get self::Extension|extensionInstanceField;
-  set extensionInstanceField = set self::Extension|extensionInstanceField;
-  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
-  get untypedExtensionInstanceField = get self::Extension|untypedExtensionInstanceField;
-  set untypedExtensionInstanceField = set self::Extension|untypedExtensionInstanceField;
-  get untypedFinalExtensionInstanceField = get self::Extension|untypedFinalExtensionInstanceField;
+  get untypedExtensionInstanceField = self::Extension|get#untypedExtensionInstanceField;
+  set untypedExtensionInstanceField = self::Extension|set#untypedExtensionInstanceField;
+  get untypedFinalExtensionInstanceField = self::Extension|get#untypedFinalExtensionInstanceField;
   static get untypedExtensionStaticField = get self::Extension|untypedExtensionStaticField;
   static set untypedExtensionStaticField = set self::Extension|untypedExtensionStaticField;
   static get untypedFinalExtensionStaticField = get self::Extension|untypedFinalExtensionStaticField;
@@ -101,20 +101,20 @@
 external static set untypedTopLevelField(dynamic #externalFieldValue) → void;
 external static get untypedFinalTopLevelField() → dynamic;
 @#C1
-external static get Extension|extensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
 @#C1
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
 @#C1
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 @#C1
 external static get Extension|extensionStaticField() → core::int;
 @#C1
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 @#C1
 external static get Extension|finalExtensionStaticField() → core::int;
-external static get Extension|untypedExtensionInstanceField() → dynamic;
-external static set Extension|untypedExtensionInstanceField(dynamic #externalFieldValue) → void;
-external static get Extension|untypedFinalExtensionInstanceField() → dynamic;
+external static method Extension|get#untypedExtensionInstanceField(self::A #this) → dynamic;
+external static method Extension|set#untypedExtensionInstanceField(self::A #this, dynamic #externalFieldValue) → void;
+external static method Extension|get#untypedFinalExtensionInstanceField(self::A #this) → dynamic;
 external static get Extension|untypedExtensionStaticField() → dynamic;
 external static set Extension|untypedExtensionStaticField(dynamic #externalFieldValue) → void;
 external static get Extension|untypedFinalExtensionStaticField() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.outline.expect
index 99614fc..25ee845 100644
--- a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.outline.expect
@@ -19,7 +19,7 @@
   @self::Annotation::•()
   external get covariantInstanceField() → core::num;
   @self::Annotation::•()
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @self::Annotation::•()
   external static get staticField() → core::int;
   @self::Annotation::•()
@@ -30,7 +30,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -45,7 +45,7 @@
   @self::Annotation::•()
   external get covariantInstanceField() → core::num;
   @self::Annotation::•()
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @self::Annotation::•()
   external static get staticField() → core::int;
   @self::Annotation::•()
@@ -56,7 +56,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -68,23 +68,23 @@
   external set instanceField(core::int #externalFieldValue) → void;
   external get finalInstanceField() → core::int;
   external get covariantInstanceField() → core::num;
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   external get untypedInstanceField() → dynamic;
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 extension Extension on self::A {
-  get extensionInstanceField = get self::Extension|extensionInstanceField;
-  set extensionInstanceField = set self::Extension|extensionInstanceField;
-  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
-  get untypedExtensionInstanceField = get self::Extension|untypedExtensionInstanceField;
-  set untypedExtensionInstanceField = set self::Extension|untypedExtensionInstanceField;
-  get untypedFinalExtensionInstanceField = get self::Extension|untypedFinalExtensionInstanceField;
+  get untypedExtensionInstanceField = self::Extension|get#untypedExtensionInstanceField;
+  set untypedExtensionInstanceField = self::Extension|set#untypedExtensionInstanceField;
+  get untypedFinalExtensionInstanceField = self::Extension|get#untypedFinalExtensionInstanceField;
   static get untypedExtensionStaticField = get self::Extension|untypedExtensionStaticField;
   static set untypedExtensionStaticField = set self::Extension|untypedExtensionStaticField;
   static get untypedFinalExtensionStaticField = get self::Extension|untypedFinalExtensionStaticField;
@@ -99,20 +99,20 @@
 external static set untypedTopLevelField(dynamic #externalFieldValue) → void;
 external static get untypedFinalTopLevelField() → dynamic;
 @self::Annotation::•()
-external static get Extension|extensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
 @self::Annotation::•()
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
 @self::Annotation::•()
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 @self::Annotation::•()
 external static get Extension|extensionStaticField() → core::int;
 @self::Annotation::•()
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 @self::Annotation::•()
 external static get Extension|finalExtensionStaticField() → core::int;
-external static get Extension|untypedExtensionInstanceField() → dynamic;
-external static set Extension|untypedExtensionInstanceField(dynamic #externalFieldValue) → void;
-external static get Extension|untypedFinalExtensionInstanceField() → dynamic;
+external static method Extension|get#untypedExtensionInstanceField(self::A #this) → dynamic;
+external static method Extension|set#untypedExtensionInstanceField(self::A #this, dynamic #externalFieldValue) → void;
+external static method Extension|get#untypedFinalExtensionInstanceField(self::A #this) → dynamic;
 external static get Extension|untypedExtensionStaticField() → dynamic;
 external static set Extension|untypedExtensionStaticField(dynamic #externalFieldValue) → void;
 external static get Extension|untypedFinalExtensionStaticField() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.transformed.expect
index 660d848..9ca288c 100644
--- a/pkg/front_end/testcases/nnbd/external_fields.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields.dart.weak.transformed.expect
@@ -20,7 +20,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -31,7 +31,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -46,7 +46,7 @@
   @#C1
   external get covariantInstanceField() → core::num;
   @#C1
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   @#C1
   external static get staticField() → core::int;
   @#C1
@@ -57,7 +57,7 @@
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get untypedStaticField() → dynamic;
   external static set untypedStaticField(dynamic #externalFieldValue) → void;
   external static get untypedFinalStaticField() → dynamic;
@@ -70,23 +70,23 @@
   external set instanceField(core::int #externalFieldValue) → void;
   external get finalInstanceField() → core::int;
   external get covariantInstanceField() → core::num;
-  external set covariantInstanceField(covariant core::num #externalFieldValue) → void;
+  external set covariantInstanceField(covariant-by-declaration core::num #externalFieldValue) → void;
   external get untypedInstanceField() → dynamic;
   external set untypedInstanceField(dynamic #externalFieldValue) → void;
   external get untypedFinalInstanceField() → dynamic;
   external get untypedCovariantInstanceField() → dynamic;
-  external set untypedCovariantInstanceField(covariant dynamic #externalFieldValue) → void;
+  external set untypedCovariantInstanceField(covariant-by-declaration dynamic #externalFieldValue) → void;
 }
 extension Extension on self::A {
-  get extensionInstanceField = get self::Extension|extensionInstanceField;
-  set extensionInstanceField = set self::Extension|extensionInstanceField;
-  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  get extensionInstanceField = self::Extension|get#extensionInstanceField;
+  set extensionInstanceField = self::Extension|set#extensionInstanceField;
+  get finalExtensionInstanceField = self::Extension|get#finalExtensionInstanceField;
   static get extensionStaticField = get self::Extension|extensionStaticField;
   static set extensionStaticField = set self::Extension|extensionStaticField;
   static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
-  get untypedExtensionInstanceField = get self::Extension|untypedExtensionInstanceField;
-  set untypedExtensionInstanceField = set self::Extension|untypedExtensionInstanceField;
-  get untypedFinalExtensionInstanceField = get self::Extension|untypedFinalExtensionInstanceField;
+  get untypedExtensionInstanceField = self::Extension|get#untypedExtensionInstanceField;
+  set untypedExtensionInstanceField = self::Extension|set#untypedExtensionInstanceField;
+  get untypedFinalExtensionInstanceField = self::Extension|get#untypedFinalExtensionInstanceField;
   static get untypedExtensionStaticField = get self::Extension|untypedExtensionStaticField;
   static set untypedExtensionStaticField = set self::Extension|untypedExtensionStaticField;
   static get untypedFinalExtensionStaticField = get self::Extension|untypedFinalExtensionStaticField;
@@ -101,20 +101,20 @@
 external static set untypedTopLevelField(dynamic #externalFieldValue) → void;
 external static get untypedFinalTopLevelField() → dynamic;
 @#C1
-external static get Extension|extensionInstanceField() → core::int;
+external static method Extension|get#extensionInstanceField(self::A #this) → core::int;
 @#C1
-external static set Extension|extensionInstanceField(core::int #externalFieldValue) → void;
+external static method Extension|set#extensionInstanceField(self::A #this, core::int #externalFieldValue) → void;
 @#C1
-external static get Extension|finalExtensionInstanceField() → core::int;
+external static method Extension|get#finalExtensionInstanceField(self::A #this) → core::int;
 @#C1
 external static get Extension|extensionStaticField() → core::int;
 @#C1
 external static set Extension|extensionStaticField(core::int #externalFieldValue) → void;
 @#C1
 external static get Extension|finalExtensionStaticField() → core::int;
-external static get Extension|untypedExtensionInstanceField() → dynamic;
-external static set Extension|untypedExtensionInstanceField(dynamic #externalFieldValue) → void;
-external static get Extension|untypedFinalExtensionInstanceField() → dynamic;
+external static method Extension|get#untypedExtensionInstanceField(self::A #this) → dynamic;
+external static method Extension|set#untypedExtensionInstanceField(self::A #this, dynamic #externalFieldValue) → void;
+external static method Extension|get#untypedFinalExtensionInstanceField(self::A #this) → dynamic;
 external static get Extension|untypedExtensionStaticField() → dynamic;
 external static set Extension|untypedExtensionStaticField(dynamic #externalFieldValue) → void;
 external static get Extension|untypedFinalExtensionStaticField() → 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
index f39a6bb..d5e1933 100644
--- a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.expect
@@ -9,7 +9,7 @@
   external get i1() → core::int;
   external set i1(core::int #externalFieldValue) → void;
   external get cx() → dynamic;
-  external set cx(covariant dynamic #externalFieldValue) → void;
+  external set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get s1() → core::int;
   external static set s1(core::int #externalFieldValue) → void;
   external static get fx() → 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
index f39a6bb..d5e1933 100644
--- 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
@@ -9,7 +9,7 @@
   external get i1() → core::int;
   external set i1(core::int #externalFieldValue) → void;
   external get cx() → dynamic;
-  external set cx(covariant dynamic #externalFieldValue) → void;
+  external set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get s1() → core::int;
   external static set s1(core::int #externalFieldValue) → void;
   external static get fx() → dynamic;
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
index f39a6bb..d5e1933 100644
--- a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.expect
@@ -9,7 +9,7 @@
   external get i1() → core::int;
   external set i1(core::int #externalFieldValue) → void;
   external get cx() → dynamic;
-  external set cx(covariant dynamic #externalFieldValue) → void;
+  external set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get s1() → core::int;
   external static set s1(core::int #externalFieldValue) → void;
   external static get fx() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.outline.expect
index bdaf36f..d358d7c 100644
--- a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.outline.expect
@@ -8,7 +8,7 @@
   external get i1() → core::int;
   external set i1(core::int #externalFieldValue) → void;
   external get cx() → dynamic;
-  external set cx(covariant dynamic #externalFieldValue) → void;
+  external set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get s1() → core::int;
   external static set s1(core::int #externalFieldValue) → void;
   external static get fx() → 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
index f39a6bb..d5e1933 100644
--- 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
@@ -9,7 +9,7 @@
   external get i1() → core::int;
   external set i1(core::int #externalFieldValue) → void;
   external get cx() → dynamic;
-  external set cx(covariant dynamic #externalFieldValue) → void;
+  external set cx(covariant-by-declaration dynamic #externalFieldValue) → void;
   external static get s1() → core::int;
   external static set s1(core::int #externalFieldValue) → void;
   external static get fx() → dynamic;
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
index 218baf4..1f2d2a4 100644
--- a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
@@ -13,20 +13,20 @@
     ;
   @#C8
   get x() → core::double
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C8
   set x(core::double #externalFieldValue) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
   @#C8
   get y() → core::double
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C8
   set y(core::double #externalFieldValue) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
   get next() → ffi::Pointer<self::Coordinate>
-    return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
+    return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
   set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
-    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
+    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
   static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
     return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
       #t1.{self::Coordinate::x} = x;
@@ -36,7 +36,7 @@
   }
   @#C16
   static get #sizeOf() → core::int*
-    return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
index 218baf4..1f2d2a4 100644
--- a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
@@ -13,20 +13,20 @@
     ;
   @#C8
   get x() → core::double
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C8
   set x(core::double #externalFieldValue) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
   @#C8
   get y() → core::double
-    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C8
   set y(core::double #externalFieldValue) → void
-    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
+    return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
   get next() → ffi::Pointer<self::Coordinate>
-    return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
+    return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
   set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
-    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
+    return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
   static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
     return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
       #t1.{self::Coordinate::x} = x;
@@ -36,7 +36,7 @@
   }
   @#C16
   static get #sizeOf() → core::int*
-    return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
index 434c3ba..1513405 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
@@ -20,14 +20,14 @@
   get a0() → ffi::Array<ffi::Uint8>
     return new ffi::Array::_<ffi::Uint8>( block {
       core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
-      core::int #offset = (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
-    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
+      core::int #offset = #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
   @#C9
   set a0(ffi::Array<ffi::Uint8> #externalFieldValue) → void
-    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C15
   static get #sizeOf() → core::int*
-    return (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
index e69f765..ce41031 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
@@ -20,14 +20,14 @@
   get a0() → ffi::Array<ffi::Uint8>
     return new ffi::Array::_<ffi::Uint8>( block {
       core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
-      core::int #offset = (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
-    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
+      core::int #offset = #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
   @#C9
   set a0(ffi::Array<ffi::Uint8> #externalFieldValue) → void
-    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C15
   static get #sizeOf() → core::int*
-    return (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.expect
index a4505cf3..0dd2727 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.expect
@@ -20,7 +20,7 @@
   final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
   final ffi::Array<ffi::Array<ffi::Uint8>> subArray = ffi::ArrayArray|[]<ffi::Array<ffi::Uint8>>(array, 0);
   ffi::ArrayArray|[]=<ffi::Array<ffi::Uint8>>(array, 1, subArray);
-  (#C4).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
+  #C4.{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
index ca13a1b..1648007 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
@@ -20,17 +20,17 @@
   get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
     return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
       core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
-      core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
-    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
+      core::int #offset = #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
   @#C10
   set a0(ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
-    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C16
   static get #sizeOf() → core::int*
-    return (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {
-  final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
+  final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = #C17.{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
   final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
   final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
   final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
@@ -52,7 +52,7 @@
     core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
     core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
   } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}{core::Object}, #offset, subArray.{ffi::Array::_typedDataBase}{core::Object}, #C11, #elementSize);
-  (#C17).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
+  #C17.{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.expect
index 3139773..8c3d96b 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.expect
@@ -20,7 +20,7 @@
   final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
   final ffi::Array<ffi::Array<ffi::Uint8>> subArray = ffi::ArrayArray|[]<ffi::Array<ffi::Uint8>>(array, 0);
   ffi::ArrayArray|[]=<ffi::Array<ffi::Uint8>>(array, 1, subArray);
-  (#C4).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
+  #C4.{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
index 9adff37..ca6f28b 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
@@ -20,17 +20,17 @@
   get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
     return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
       core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
-      core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
-    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
+      core::int #offset = #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
   @#C10
   set a0(ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
-    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
+    return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
   @#C16
   static get #sizeOf() → core::int*
-    return (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
 }
 static method main() → dynamic {
-  final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
+  final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = #C17.{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
   final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
   final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
   final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
@@ -52,7 +52,7 @@
     core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
     core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
   } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}{core::Object}, #offset, subArray.{ffi::Array::_typedDataBase}{core::Object}, #C11, #elementSize);
-  (#C17).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
+  #C17.{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.expect b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.expect
index 73b1e1c..5ed98d4 100644
--- a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.expect
@@ -4,7 +4,7 @@
 import "dart:async" as asy;
 
 abstract class TestMixin<R extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async {
+  method test(covariant-by-class asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async {
     final self::TestMixin::R% response = await fetch;
     self::TestMixin::T% result;
     if(response is{ForNonNullableByDefault} self::Response<dynamic>) {
@@ -46,7 +46,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class1 extends self::_Class1&Object&TestMixin {
@@ -62,7 +62,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class2 extends self::_Class2&Object&TestMixin {
diff --git a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.transformed.expect
index 601dda0..4d55755 100644
--- a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.strong.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:_internal" as _in;
 
 abstract class TestMixin<R extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> /* originally async */ {
     final asy::_Future<self::TestMixin::T%> :async_future = new asy::_Future::•<self::TestMixin::T%>();
     core::bool* :is_sync = false;
     FutureOr<self::TestMixin::T%>? :return_value;
@@ -73,7 +73,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
     final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>();
     core::bool* :is_sync = false;
     FutureOr<core::String>? :return_value;
@@ -132,7 +132,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
     final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>();
     core::bool* :is_sync = false;
     FutureOr<core::String>? :return_value;
diff --git a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.expect b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.expect
index 73b1e1c..5ed98d4 100644
--- a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.expect
@@ -4,7 +4,7 @@
 import "dart:async" as asy;
 
 abstract class TestMixin<R extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async {
+  method test(covariant-by-class asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async {
     final self::TestMixin::R% response = await fetch;
     self::TestMixin::T% result;
     if(response is{ForNonNullableByDefault} self::Response<dynamic>) {
@@ -46,7 +46,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class1 extends self::_Class1&Object&TestMixin {
@@ -62,7 +62,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class2 extends self::_Class2&Object&TestMixin {
diff --git a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.outline.expect
index 0b3f427..dbc7e1d 100644
--- a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.outline.expect
@@ -4,7 +4,7 @@
 import "dart:async" as asy;
 
 abstract class TestMixin<R extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async 
+  method test(covariant-by-class asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> async 
     ;
 }
 class PagingResponse<T extends core::Object? = dynamic> extends core::Object {
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class1 extends self::_Class1&Object&TestMixin {
@@ -39,7 +39,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin
     : super core::Object::•()
     ;
-  mixin-super-stub method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
+  mixin-super-stub method test(covariant-by-class asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String>
     return super.{self::TestMixin::test}(fetch);
 }
 class Class2 extends self::_Class2&Object&TestMixin {
diff --git a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.transformed.expect
index 601dda0..4d55755 100644
--- a/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/flutter_issue64155.dart.weak.transformed.expect
@@ -5,7 +5,7 @@
 import "dart:_internal" as _in;
 
 abstract class TestMixin<R extends core::Object? = dynamic, T extends core::Object? = dynamic> extends core::Object /*isMixinDeclaration*/  {
-  method test(generic-covariant-impl asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::TestMixin::R%> fetch) → asy::Future<self::TestMixin::T%> /* originally async */ {
     final asy::_Future<self::TestMixin::T%> :async_future = new asy::_Future::•<self::TestMixin::T%>();
     core::bool* :is_sync = false;
     FutureOr<self::TestMixin::T%>? :return_value;
@@ -73,7 +73,7 @@
   const synthetic constructor •() → self::_Class1&Object&TestMixin
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::Response<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
     final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>();
     core::bool* :is_sync = false;
     FutureOr<core::String>? :return_value;
@@ -132,7 +132,7 @@
   const synthetic constructor •() → self::_Class2&Object&TestMixin
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
+  method test(covariant-by-class asy::Future<self::PagingResponse<core::String>> fetch) → asy::Future<core::String> /* originally async */ {
     final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>();
     core::bool* :is_sync = false;
     FutureOr<core::String>? :return_value;
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect
index e114f63..ffeac59 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect
@@ -5,8 +5,8 @@
 import "org-dartlang-testcase:///from_agnostic_lib.dart";
 
 static const field core::bool c1 = #C1;
-static const field core::Map<core::List<core::int?>, core::int> c2 = #C7;
-static const field core::Set<core::List<core::int?>> c3 = #C11;
+static const field core::Map<core::List<core::int?>, core::int> c2 = #C6;
+static const field core::Set<core::List<core::int?>> c3 = #C7;
 static const field core::List<core::int> c4 = #C2;
 static const field core::List<core::int?> c5 = #C4;
 static method main() → dynamic {
@@ -27,10 +27,6 @@
   #C3 = 0
   #C4 = <core::int?>[]
   #C5 = 1
-  #C6 = <dynamic>[#C2, #C3, #C4, #C5]
-  #C7 = core::_ImmutableMap<core::List<core::int?>, core::int> {_kvPairs:#C6}
-  #C8 = null
-  #C9 = <dynamic>[#C2, #C8, #C4, #C8]
-  #C10 = core::_ImmutableMap<core::List<core::int?>, Null> {_kvPairs:#C9}
-  #C11 = col::_UnmodifiableSet<core::List<core::int?>> {_map:#C10}
+  #C6 = <core::List<core::int?>, core::int>{#C2:#C3, #C4:#C5)
+  #C7 = <core::List<core::int?>>{#C2, #C4}
 }
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect
index e114f63..ffeac59 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect
@@ -5,8 +5,8 @@
 import "org-dartlang-testcase:///from_agnostic_lib.dart";
 
 static const field core::bool c1 = #C1;
-static const field core::Map<core::List<core::int?>, core::int> c2 = #C7;
-static const field core::Set<core::List<core::int?>> c3 = #C11;
+static const field core::Map<core::List<core::int?>, core::int> c2 = #C6;
+static const field core::Set<core::List<core::int?>> c3 = #C7;
 static const field core::List<core::int> c4 = #C2;
 static const field core::List<core::int?> c5 = #C4;
 static method main() → dynamic {
@@ -27,10 +27,6 @@
   #C3 = 0
   #C4 = <core::int?>[]
   #C5 = 1
-  #C6 = <dynamic>[#C2, #C3, #C4, #C5]
-  #C7 = core::_ImmutableMap<core::List<core::int?>, core::int> {_kvPairs:#C6}
-  #C8 = null
-  #C9 = <dynamic>[#C2, #C8, #C4, #C8]
-  #C10 = core::_ImmutableMap<core::List<core::int?>, Null> {_kvPairs:#C9}
-  #C11 = col::_UnmodifiableSet<core::List<core::int?>> {_map:#C10}
+  #C6 = <core::List<core::int?>, core::int>{#C2:#C3, #C4:#C5)
+  #C7 = <core::List<core::int?>>{#C2, #C4}
 }
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
index f526302..0c2cc88 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
@@ -5,8 +5,8 @@
 import "org-dartlang-testcase:///from_agnostic_lib.dart";
 
 static const field core::bool c1 = #C1;
-static const field core::Map<core::List<core::int?>, core::int> c2 = #C7;
-static const field core::Set<core::List<core::int?>> c3 = #C11;
+static const field core::Map<core::List<core::int?>, core::int> c2 = #C6;
+static const field core::Set<core::List<core::int?>> c3 = #C7;
 static const field core::List<core::int> c4 = #C2;
 static const field core::List<core::int?> c5 = #C4;
 static method main() → dynamic {
@@ -18,7 +18,7 @@
 import self as self2;
 import "dart:core" as core;
 
-static const field core::List<core::int> a = #C12;
+static const field core::List<core::int> a = #C8;
 static const field core::List<core::int?> b = #C4;
 
 constants  {
@@ -27,11 +27,7 @@
   #C3 = 0
   #C4 = <core::int?>[]
   #C5 = 1
-  #C6 = <dynamic>[#C2, #C3, #C4, #C5]
-  #C7 = core::_ImmutableMap<core::List<core::int?>*, core::int*> {_kvPairs:#C6}
-  #C8 = null
-  #C9 = <dynamic>[#C2, #C8, #C4, #C8]
-  #C10 = core::_ImmutableMap<core::List<core::int?>*, Null> {_kvPairs:#C9}
-  #C11 = col::_UnmodifiableSet<core::List<core::int?>*> {_map:#C10}
-  #C12 = <core::int>[]
+  #C6 = <core::List<core::int?>*, core::int*>{#C2:#C3, #C4:#C5)
+  #C7 = <core::List<core::int?>*>{#C2, #C4}
+  #C8 = <core::int>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.outline.expect
index afae808..6d9444e 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.outline.expect
@@ -27,8 +27,8 @@
 
 Extra constant evaluation status:
 Evaluated: StaticInvocation @ org-dartlang-testcase:///from_agnostic.dart:7:12 -> BoolConstant(false)
-Evaluated: MapLiteral @ org-dartlang-testcase:///from_agnostic.dart:8:12 -> InstanceConstant(const _ImmutableMap<List<int?>*, int*>{_ImmutableMap._kvPairs: const <dynamic>[const <int*>[], 0, const <int?>[], 1]})
-Evaluated: SetLiteral @ org-dartlang-testcase:///from_agnostic.dart:9:12 -> InstanceConstant(const _UnmodifiableSet<List<int?>*>{_UnmodifiableSet._map: const _ImmutableMap<List<int?>*, Null>{_ImmutableMap._kvPairs: const <dynamic>[const <int*>[], null, const <int?>[], null]}})
+Evaluated: MapLiteral @ org-dartlang-testcase:///from_agnostic.dart:8:12 -> MapConstant(const <List<int?>*, int*>{const <int*>[]: 0, const <int?>[]: 1})
+Evaluated: SetLiteral @ org-dartlang-testcase:///from_agnostic.dart:9:12 -> SetConstant(const <List<int?>*>{const <int*>[], const <int?>[]})
 Evaluated: StaticGet @ org-dartlang-testcase:///from_agnostic.dart:10:12 -> ListConstant(const <int*>[])
 Evaluated: StaticGet @ org-dartlang-testcase:///from_agnostic.dart:11:12 -> ListConstant(const <int?>[])
 Extra constant evaluation: evaluated: 5, effectively constant: 5
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
index f526302..0c2cc88 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
@@ -5,8 +5,8 @@
 import "org-dartlang-testcase:///from_agnostic_lib.dart";
 
 static const field core::bool c1 = #C1;
-static const field core::Map<core::List<core::int?>, core::int> c2 = #C7;
-static const field core::Set<core::List<core::int?>> c3 = #C11;
+static const field core::Map<core::List<core::int?>, core::int> c2 = #C6;
+static const field core::Set<core::List<core::int?>> c3 = #C7;
 static const field core::List<core::int> c4 = #C2;
 static const field core::List<core::int?> c5 = #C4;
 static method main() → dynamic {
@@ -18,7 +18,7 @@
 import self as self2;
 import "dart:core" as core;
 
-static const field core::List<core::int> a = #C12;
+static const field core::List<core::int> a = #C8;
 static const field core::List<core::int?> b = #C4;
 
 constants  {
@@ -27,11 +27,7 @@
   #C3 = 0
   #C4 = <core::int?>[]
   #C5 = 1
-  #C6 = <dynamic>[#C2, #C3, #C4, #C5]
-  #C7 = core::_ImmutableMap<core::List<core::int?>*, core::int*> {_kvPairs:#C6}
-  #C8 = null
-  #C9 = <dynamic>[#C2, #C8, #C4, #C8]
-  #C10 = core::_ImmutableMap<core::List<core::int?>*, Null> {_kvPairs:#C9}
-  #C11 = col::_UnmodifiableSet<core::List<core::int?>*> {_map:#C10}
-  #C12 = <core::int>[]
+  #C6 = <core::List<core::int?>*, core::int*>{#C2:#C3, #C4:#C5)
+  #C7 = <core::List<core::int?>*>{#C2, #C4}
+  #C8 = <core::int>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect
index 7a49cf6..c796a15 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.strong.expect
@@ -118,7 +118,7 @@
 abstract class A extends core::Object {
   field core::int property4 = 0;
   field core::int property5 = 0;
-  covariant field core::num property6 = 0;
+  covariant-by-declaration field core::num property6 = 0;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect
index 7a49cf6..c796a15 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.expect
@@ -118,7 +118,7 @@
 abstract class A extends core::Object {
   field core::int property4 = 0;
   field core::int property5 = 0;
-  covariant field core::num property6 = 0;
+  covariant-by-declaration field core::num property6 = 0;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.outline.expect
index a05e6c9..db68d58 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type.dart.weak.outline.expect
@@ -106,7 +106,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int property5;
-  covariant field core::num property6;
+  covariant-by-declaration field core::num property6;
   synthetic constructor •() → self::A
     ;
   abstract get property1() → core::int;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect
index 4d7c28b..6234f7f 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.expect
@@ -30,7 +30,7 @@
 abstract class A extends core::Object {
   late field core::int property4;
   late field core::int? property5;
-  late covariant field core::int property6;
+  late covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect
index 4d7c28b..6234f7f 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.strong.transformed.expect
@@ -30,7 +30,7 @@
 abstract class A extends core::Object {
   late field core::int property4;
   late field core::int? property5;
-  late covariant field core::int property6;
+  late covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect
index 4d7c28b..6234f7f 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.expect
@@ -30,7 +30,7 @@
 abstract class A extends core::Object {
   late field core::int property4;
   late field core::int? property5;
-  late covariant field core::int property6;
+  late covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.outline.expect
index 40bce371..9cdde6e 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.outline.expect
@@ -30,7 +30,7 @@
 abstract class A extends core::Object {
   late field core::int property4;
   late field core::int? property5;
-  late covariant field core::int property6;
+  late covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect
index 4d7c28b..6234f7f 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_late.dart.weak.transformed.expect
@@ -30,7 +30,7 @@
 abstract class A extends core::Object {
   late field core::int property4;
   late field core::int? property5;
-  late covariant field core::int property6;
+  late covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect
index 1f876ab..1f17578 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.expect
@@ -122,7 +122,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int? property5;
-  covariant field core::int property6;
+  covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect
index 1f876ab..1f17578 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.strong.transformed.expect
@@ -122,7 +122,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int? property5;
-  covariant field core::int property6;
+  covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect
index 1f876ab..1f17578 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.expect
@@ -122,7 +122,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int? property5;
-  covariant field core::int property6;
+  covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.outline.expect
index adb8072..e438379 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.outline.expect
@@ -106,7 +106,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int? property5;
-  covariant field core::int property6;
+  covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     ;
   abstract get property1() → core::int;
diff --git a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect
index 1f876ab..1f17578 100644
--- a/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/getter_vs_setter_type_nnbd.dart.weak.transformed.expect
@@ -122,7 +122,7 @@
 abstract class A extends core::Object {
   field core::int property4;
   field core::int? property5;
-  covariant field core::int property6;
+  covariant-by-declaration field core::int property6;
   constructor •(core::int property4, core::int? property5, core::int property6) → self::A
     : self::A::property4 = property4, self::A::property5 = property5, self::A::property6 = property6, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.expect b/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.expect
index bbe06cb..d29fed9 100644
--- a/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.expect
@@ -6,13 +6,13 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -24,13 +24,13 @@
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class E extends core::Object implements self::B {
   synthetic constructor •() → self::E
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
@@ -48,30 +48,30 @@
   synthetic constructor •() → self::H
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class I extends core::Object implements self::D {
   synthetic constructor •() → self::I
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class J extends core::Object implements self::H {
   synthetic constructor •() → self::J
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 abstract class K extends core::Object implements self::I, self::E, self::G {
   synthetic constructor •() → self::K
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class L extends core::Object implements self::K {
   synthetic constructor •() → self::L
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.transformed.expect
index bbe06cb..d29fed9 100644
--- a/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/infer_method_types.dart.strong.transformed.expect
@@ -6,13 +6,13 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -24,13 +24,13 @@
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class E extends core::Object implements self::B {
   synthetic constructor •() → self::E
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
@@ -48,30 +48,30 @@
   synthetic constructor •() → self::H
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class I extends core::Object implements self::D {
   synthetic constructor •() → self::I
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class J extends core::Object implements self::H {
   synthetic constructor •() → self::J
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 abstract class K extends core::Object implements self::I, self::E, self::G {
   synthetic constructor •() → self::K
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class L extends core::Object implements self::K {
   synthetic constructor •() → self::L
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.expect b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.expect
index bbe06cb..d29fed9 100644
--- a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.expect
@@ -6,13 +6,13 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -24,13 +24,13 @@
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class E extends core::Object implements self::B {
   synthetic constructor •() → self::E
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
@@ -48,30 +48,30 @@
   synthetic constructor •() → self::H
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class I extends core::Object implements self::D {
   synthetic constructor •() → self::I
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class J extends core::Object implements self::H {
   synthetic constructor •() → self::J
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 abstract class K extends core::Object implements self::I, self::E, self::G {
   synthetic constructor •() → self::K
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class L extends core::Object implements self::K {
   synthetic constructor •() → self::L
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.outline.expect
index 37ff6de..7cdf10b 100644
--- a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.outline.expect
@@ -5,12 +5,12 @@
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -20,12 +20,12 @@
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class E extends core::Object implements self::B {
   synthetic constructor •() → self::E
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
@@ -40,27 +40,27 @@
 abstract class H extends core::Object implements self::D, self::E, self::F, self::C {
   synthetic constructor •() → self::H
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class I extends core::Object implements self::D {
   synthetic constructor •() → self::I
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class J extends core::Object implements self::H {
   synthetic constructor •() → self::J
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 abstract class K extends core::Object implements self::I, self::E, self::G {
   synthetic constructor •() → self::K
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class L extends core::Object implements self::K {
   synthetic constructor •() → self::L
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.transformed.expect
index bbe06cb..d29fed9 100644
--- a/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/infer_method_types.dart.weak.transformed.expect
@@ -6,13 +6,13 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -24,13 +24,13 @@
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class E extends core::Object implements self::B {
   synthetic constructor •() → self::E
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → dynamic;
+  abstract method m(covariant-by-declaration core::num a) → dynamic;
 }
 abstract class F extends core::Object {
   synthetic constructor •() → self::F
@@ -48,30 +48,30 @@
   synthetic constructor •() → self::H
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class I extends core::Object implements self::D {
   synthetic constructor •() → self::I
     : super core::Object::•()
     ;
-  abstract method m(covariant core::int a) → core::Object?;
+  abstract method m(covariant-by-declaration core::int a) → core::Object?;
 }
 abstract class J extends core::Object implements self::H {
   synthetic constructor •() → self::J
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 abstract class K extends core::Object implements self::I, self::E, self::G {
   synthetic constructor •() → self::K
     : super core::Object::•()
     ;
-  abstract member-signature method m(covariant core::num a) → core::Object?; -> self::E::m
+  abstract member-signature method m(covariant-by-declaration core::num a) → core::Object?; -> self::E::m
 }
 abstract class L extends core::Object implements self::K {
   synthetic constructor •() → self::L
     : super core::Object::•()
     ;
-  abstract method m(covariant core::num a) → core::Object?;
+  abstract method m(covariant-by-declaration core::num a) → core::Object?;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.expect b/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.expect
index aade648..9723009 100644
--- a/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → self::Foo<self::Foo::T%>
     : super core::Object::•()
     ;
-  method doPromotionsToNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B?) {
       self::Foo::T% bar = t{self::Foo::T% & self::B? /* '%' & '?' = '%' */};
       if(t{self::Foo::T% & self::B? /* '%' & '?' = '%' */} is{ForNonNullableByDefault} self::C?) {
@@ -29,7 +29,7 @@
       }
     }
   }
-  method doPromotionsToNonNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNonNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B) {
       self::Foo::T% bar = t{self::Foo::T% & self::B /* '%' & '!' = '!' */};
       if(t{self::Foo::T% & self::B /* '%' & '!' = '!' */} is{ForNonNullableByDefault} self::C) {
diff --git a/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.transformed.expect
index aade648..9723009 100644
--- a/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/intersection_types.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → self::Foo<self::Foo::T%>
     : super core::Object::•()
     ;
-  method doPromotionsToNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B?) {
       self::Foo::T% bar = t{self::Foo::T% & self::B? /* '%' & '?' = '%' */};
       if(t{self::Foo::T% & self::B? /* '%' & '?' = '%' */} is{ForNonNullableByDefault} self::C?) {
@@ -29,7 +29,7 @@
       }
     }
   }
-  method doPromotionsToNonNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNonNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B) {
       self::Foo::T% bar = t{self::Foo::T% & self::B /* '%' & '!' = '!' */};
       if(t{self::Foo::T% & self::B /* '%' & '!' = '!' */} is{ForNonNullableByDefault} self::C) {
diff --git a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.expect b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.expect
index aade648..9723009 100644
--- a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → self::Foo<self::Foo::T%>
     : super core::Object::•()
     ;
-  method doPromotionsToNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B?) {
       self::Foo::T% bar = t{self::Foo::T% & self::B? /* '%' & '?' = '%' */};
       if(t{self::Foo::T% & self::B? /* '%' & '?' = '%' */} is{ForNonNullableByDefault} self::C?) {
@@ -29,7 +29,7 @@
       }
     }
   }
-  method doPromotionsToNonNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNonNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B) {
       self::Foo::T% bar = t{self::Foo::T% & self::B /* '%' & '!' = '!' */};
       if(t{self::Foo::T% & self::B /* '%' & '!' = '!' */} is{ForNonNullableByDefault} self::C) {
diff --git a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.outline.expect
index 748d6bc..3b88639 100644
--- a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.outline.expect
@@ -17,9 +17,9 @@
 class Foo<T extends self::A?> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::T%>
     ;
-  method doPromotionsToNullable(generic-covariant-impl self::Foo::T% t) → dynamic
+  method doPromotionsToNullable(covariant-by-class self::Foo::T% t) → dynamic
     ;
-  method doPromotionsToNonNullable(generic-covariant-impl self::Foo::T% t) → dynamic
+  method doPromotionsToNonNullable(covariant-by-class self::Foo::T% t) → dynamic
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.transformed.expect
index aade648..9723009 100644
--- a/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/intersection_types.dart.weak.transformed.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → self::Foo<self::Foo::T%>
     : super core::Object::•()
     ;
-  method doPromotionsToNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B?) {
       self::Foo::T% bar = t{self::Foo::T% & self::B? /* '%' & '?' = '%' */};
       if(t{self::Foo::T% & self::B? /* '%' & '?' = '%' */} is{ForNonNullableByDefault} self::C?) {
@@ -29,7 +29,7 @@
       }
     }
   }
-  method doPromotionsToNonNullable(generic-covariant-impl self::Foo::T% t) → dynamic {
+  method doPromotionsToNonNullable(covariant-by-class self::Foo::T% t) → dynamic {
     if(t is{ForNonNullableByDefault} self::B) {
       self::Foo::T% bar = t{self::Foo::T% & self::B /* '%' & '!' = '!' */};
       if(t{self::Foo::T% & self::B /* '%' & '!' = '!' */} is{ForNonNullableByDefault} self::C) {
diff --git a/pkg/front_end/testcases/nnbd/issue40134.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue40134.dart.strong.expect
index c313dbe..4f69681 100644
--- a/pkg/front_end/testcases/nnbd/issue40134.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue40134.dart.strong.expect
@@ -8,7 +8,7 @@
     ;
   get t() → core::Type
     return self::GenericMethodBounds::T%;
-  method foo<generic-covariant-impl E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
+  method foo<covariant-by-class E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::foo::E%>();
   method bar<E extends (self::GenericMethodBounds::T%) → void>() → self::GenericMethodBounds<self::GenericMethodBounds::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::bar::E>();
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::GenericMethodBoundsDerived
     : super self::GenericMethodBounds::•()
     ;
-  method foo<generic-covariant-impl E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
+  method foo<covariant-by-class E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::foo::E>();
   method bar<E extends (core::num) → void>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::bar::E>();
diff --git a/pkg/front_end/testcases/nnbd/issue40134.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue40134.dart.strong.transformed.expect
index c313dbe..4f69681 100644
--- a/pkg/front_end/testcases/nnbd/issue40134.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40134.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
     ;
   get t() → core::Type
     return self::GenericMethodBounds::T%;
-  method foo<generic-covariant-impl E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
+  method foo<covariant-by-class E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::foo::E%>();
   method bar<E extends (self::GenericMethodBounds::T%) → void>() → self::GenericMethodBounds<self::GenericMethodBounds::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::bar::E>();
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::GenericMethodBoundsDerived
     : super self::GenericMethodBounds::•()
     ;
-  method foo<generic-covariant-impl E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
+  method foo<covariant-by-class E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::foo::E>();
   method bar<E extends (core::num) → void>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::bar::E>();
diff --git a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.expect
index c313dbe..4f69681 100644
--- a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.expect
@@ -8,7 +8,7 @@
     ;
   get t() → core::Type
     return self::GenericMethodBounds::T%;
-  method foo<generic-covariant-impl E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
+  method foo<covariant-by-class E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::foo::E%>();
   method bar<E extends (self::GenericMethodBounds::T%) → void>() → self::GenericMethodBounds<self::GenericMethodBounds::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::bar::E>();
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::GenericMethodBoundsDerived
     : super self::GenericMethodBounds::•()
     ;
-  method foo<generic-covariant-impl E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
+  method foo<covariant-by-class E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::foo::E>();
   method bar<E extends (core::num) → void>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::bar::E>();
diff --git a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.outline.expect
index 6c29f77..c3d583d 100644
--- a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.outline.expect
@@ -7,7 +7,7 @@
     ;
   get t() → core::Type
     ;
-  method foo<generic-covariant-impl E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
+  method foo<covariant-by-class E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
     ;
   method bar<E extends (self::GenericMethodBounds::T%) → void>() → self::GenericMethodBounds<self::GenericMethodBounds::bar::E>
     ;
@@ -15,7 +15,7 @@
 class GenericMethodBoundsDerived extends self::GenericMethodBounds<core::num> {
   synthetic constructor •() → self::GenericMethodBoundsDerived
     ;
-  method foo<generic-covariant-impl E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
+  method foo<covariant-by-class E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
     ;
   method bar<E extends (core::num) → void>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::bar::E>
     ;
diff --git a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.transformed.expect
index c313dbe..4f69681 100644
--- a/pkg/front_end/testcases/nnbd/issue40134.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40134.dart.weak.transformed.expect
@@ -8,7 +8,7 @@
     ;
   get t() → core::Type
     return self::GenericMethodBounds::T%;
-  method foo<generic-covariant-impl E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
+  method foo<covariant-by-class E extends self::GenericMethodBounds::T%>() → self::GenericMethodBounds<self::GenericMethodBounds::foo::E%>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::foo::E%>();
   method bar<E extends (self::GenericMethodBounds::T%) → void>() → self::GenericMethodBounds<self::GenericMethodBounds::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBounds::bar::E>();
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::GenericMethodBoundsDerived
     : super self::GenericMethodBounds::•()
     ;
-  method foo<generic-covariant-impl E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
+  method foo<covariant-by-class E extends core::num>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::foo::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::foo::E>();
   method bar<E extends (core::num) → void>() → self::GenericMethodBounds<self::GenericMethodBoundsDerived::bar::E>
     return new self::GenericMethodBounds::•<self::GenericMethodBoundsDerived::bar::E>();
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.strong.expect
index bcbb04c..90f9674 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.strong.expect
@@ -9,14 +9,14 @@
   synthetic constructor •() → self::B<self::B::Y%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl FutureOr<self::B::Y%>y) → dynamic {}
+  method bar(covariant-by-class FutureOr<self::B::Y%>y) → dynamic {}
 }
 class A<X extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
+  covariant-by-class final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
   synthetic constructor •() → self::A<self::A::X%>
     : super core::Object::•()
     ;
-  method foo([generic-covariant-impl FutureOr<self::A::X%>? x = #C1]) → dynamic {
+  method foo([covariant-by-class FutureOr<self::A::X%>? x = #C1]) → dynamic {
     if(x is{ForNonNullableByDefault} asy::Future<self::A::X%>) {
       this.{self::A::b}{self::B<self::A::X%>}.{self::B::bar}(x{asy::Future<self::A::X%>} as{ForNonNullableByDefault} FutureOr<self::A::X%>){(FutureOr<self::A::X%>) → dynamic};
     }
@@ -26,14 +26,14 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::C::T%>>(generic-covariant-impl FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
+  method baz<covariant-by-class X extends FutureOr<self::C::T%>>(covariant-by-class FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
     return x;
 }
 class D<T extends core::Object? = dynamic> extends self::C<self::D::T%> {
   synthetic constructor •() → self::D<self::D::T%>
     : super self::C::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::D::T%>>(generic-covariant-impl FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
+  method baz<covariant-by-class X extends FutureOr<self::D::T%>>(covariant-by-class FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
     return x;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.strong.transformed.expect
index c9d1a5a..6d7b2b4 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.strong.transformed.expect
@@ -9,14 +9,14 @@
   synthetic constructor •() → self::B<self::B::Y%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl FutureOr<self::B::Y%>y) → dynamic {}
+  method bar(covariant-by-class FutureOr<self::B::Y%>y) → dynamic {}
 }
 class A<X extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
+  covariant-by-class final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
   synthetic constructor •() → self::A<self::A::X%>
     : super core::Object::•()
     ;
-  method foo([generic-covariant-impl FutureOr<self::A::X%>? x = #C1]) → dynamic {
+  method foo([covariant-by-class FutureOr<self::A::X%>? x = #C1]) → dynamic {
     if(x is{ForNonNullableByDefault} asy::Future<self::A::X%>) {
       this.{self::A::b}{self::B<self::A::X%>}.{self::B::bar}(x{asy::Future<self::A::X%>}){(FutureOr<self::A::X%>) → dynamic};
     }
@@ -26,14 +26,14 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::C::T%>>(generic-covariant-impl FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
+  method baz<covariant-by-class X extends FutureOr<self::C::T%>>(covariant-by-class FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
     return x;
 }
 class D<T extends core::Object? = dynamic> extends self::C<self::D::T%> {
   synthetic constructor •() → self::D<self::D::T%>
     : super self::C::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::D::T%>>(generic-covariant-impl FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
+  method baz<covariant-by-class X extends FutureOr<self::D::T%>>(covariant-by-class FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
     return x;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.expect
index bcbb04c..90f9674 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.expect
@@ -9,14 +9,14 @@
   synthetic constructor •() → self::B<self::B::Y%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl FutureOr<self::B::Y%>y) → dynamic {}
+  method bar(covariant-by-class FutureOr<self::B::Y%>y) → dynamic {}
 }
 class A<X extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
+  covariant-by-class final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
   synthetic constructor •() → self::A<self::A::X%>
     : super core::Object::•()
     ;
-  method foo([generic-covariant-impl FutureOr<self::A::X%>? x = #C1]) → dynamic {
+  method foo([covariant-by-class FutureOr<self::A::X%>? x = #C1]) → dynamic {
     if(x is{ForNonNullableByDefault} asy::Future<self::A::X%>) {
       this.{self::A::b}{self::B<self::A::X%>}.{self::B::bar}(x{asy::Future<self::A::X%>} as{ForNonNullableByDefault} FutureOr<self::A::X%>){(FutureOr<self::A::X%>) → dynamic};
     }
@@ -26,14 +26,14 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::C::T%>>(generic-covariant-impl FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
+  method baz<covariant-by-class X extends FutureOr<self::C::T%>>(covariant-by-class FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
     return x;
 }
 class D<T extends core::Object? = dynamic> extends self::C<self::D::T%> {
   synthetic constructor •() → self::D<self::D::T%>
     : super self::C::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::D::T%>>(generic-covariant-impl FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
+  method baz<covariant-by-class X extends FutureOr<self::D::T%>>(covariant-by-class FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
     return x;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
index 90d1660..36bd369 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.outline.expect
@@ -7,26 +7,26 @@
 class B<Y extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::Y%>
     ;
-  method bar(generic-covariant-impl FutureOr<self::B::Y%>y) → dynamic
+  method bar(covariant-by-class FutureOr<self::B::Y%>y) → dynamic
     ;
 }
 class A<X extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl final field self::B<self::A::X%> b;
+  covariant-by-class final field self::B<self::A::X%> b;
   synthetic constructor •() → self::A<self::A::X%>
     ;
-  method foo([generic-covariant-impl FutureOr<self::A::X%>? x]) → dynamic
+  method foo([covariant-by-class FutureOr<self::A::X%>? x]) → dynamic
     ;
 }
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::C::T%>>(generic-covariant-impl FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
+  method baz<covariant-by-class X extends FutureOr<self::C::T%>>(covariant-by-class FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
     ;
 }
 class D<T extends core::Object? = dynamic> extends self::C<self::D::T%> {
   synthetic constructor •() → self::D<self::D::T%>
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::D::T%>>(generic-covariant-impl FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
+  method baz<covariant-by-class X extends FutureOr<self::D::T%>>(covariant-by-class FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.transformed.expect
index c9d1a5a..6d7b2b4 100644
--- a/pkg/front_end/testcases/nnbd/issue40600.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40600.dart.weak.transformed.expect
@@ -9,14 +9,14 @@
   synthetic constructor •() → self::B<self::B::Y%>
     : super core::Object::•()
     ;
-  method bar(generic-covariant-impl FutureOr<self::B::Y%>y) → dynamic {}
+  method bar(covariant-by-class FutureOr<self::B::Y%>y) → dynamic {}
 }
 class A<X extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
+  covariant-by-class final field self::B<self::A::X%> b = new self::B::•<self::A::X%>();
   synthetic constructor •() → self::A<self::A::X%>
     : super core::Object::•()
     ;
-  method foo([generic-covariant-impl FutureOr<self::A::X%>? x = #C1]) → dynamic {
+  method foo([covariant-by-class FutureOr<self::A::X%>? x = #C1]) → dynamic {
     if(x is{ForNonNullableByDefault} asy::Future<self::A::X%>) {
       this.{self::A::b}{self::B<self::A::X%>}.{self::B::bar}(x{asy::Future<self::A::X%>}){(FutureOr<self::A::X%>) → dynamic};
     }
@@ -26,14 +26,14 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::C::T%>>(generic-covariant-impl FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
+  method baz<covariant-by-class X extends FutureOr<self::C::T%>>(covariant-by-class FutureOr<self::C::T%>x) → FutureOr<self::C::T%>
     return x;
 }
 class D<T extends core::Object? = dynamic> extends self::C<self::D::T%> {
   synthetic constructor •() → self::D<self::D::T%>
     : super self::C::•()
     ;
-  method baz<generic-covariant-impl X extends FutureOr<self::D::T%>>(generic-covariant-impl FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
+  method baz<covariant-by-class X extends FutureOr<self::D::T%>>(covariant-by-class FutureOr<self::D::T%>x) → FutureOr<self::D::T%>
     return x;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue40601.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue40601.dart.strong.expect
index 5a7fa88..8fd86fa 100644
--- a/pkg/front_end/testcases/nnbd/issue40601.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue40601.dart.strong.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
     () → dynamic result = () → dynamic => this.{self::A::bar}(value){(self::A::T%) → dynamic};
diff --git a/pkg/front_end/testcases/nnbd/issue40601.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue40601.dart.strong.transformed.expect
index 5a7fa88..8fd86fa 100644
--- a/pkg/front_end/testcases/nnbd/issue40601.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40601.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
     () → dynamic result = () → dynamic => this.{self::A::bar}(value){(self::A::T%) → dynamic};
diff --git a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.expect
index 5a7fa88..8fd86fa 100644
--- a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
     () → dynamic result = () → dynamic => this.{self::A::bar}(value){(self::A::T%) → dynamic};
diff --git a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.outline.expect
index f2c5efd..10e855d 100644
--- a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic
+  method bar(covariant-by-class self::A::T% value) → dynamic
     ;
   method foo() → dynamic
     ;
diff --git a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.transformed.expect
index 5a7fa88..8fd86fa 100644
--- a/pkg/front_end/testcases/nnbd/issue40601.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40601.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
     () → dynamic result = () → dynamic => this.{self::A::bar}(value){(self::A::T%) → dynamic};
diff --git a/pkg/front_end/testcases/nnbd/issue40805.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue40805.dart.strong.expect
index e876287..0eacd23 100644
--- a/pkg/front_end/testcases/nnbd/issue40805.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue40805.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  late covariant final [setter] field core::int x;
+  late covariant-by-declaration final [setter] field core::int x;
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/issue40805.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue40805.dart.strong.transformed.expect
index e876287..0eacd23 100644
--- a/pkg/front_end/testcases/nnbd/issue40805.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40805.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  late covariant final [setter] field core::int x;
+  late covariant-by-declaration final [setter] field core::int x;
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.expect
index e876287..0eacd23 100644
--- a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  late covariant final [setter] field core::int x;
+  late covariant-by-declaration final [setter] field core::int x;
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.outline.expect
index 260c576..7b1ec1d 100644
--- a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.outline.expect
@@ -3,14 +3,14 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  late covariant final [setter] field core::int x;
+  late covariant-by-declaration final [setter] field core::int x;
   synthetic constructor •() → self::C
     ;
 }
 class D extends self::C {
   synthetic constructor •() → self::D
     ;
-  set x(covariant core::num value) → void
+  set x(covariant-by-declaration core::num value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.transformed.expect
index e876287..0eacd23 100644
--- a/pkg/front_end/testcases/nnbd/issue40805.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue40805.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C extends core::Object {
-  late covariant final [setter] field core::int x;
+  late covariant-by-declaration final [setter] field core::int x;
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::D
     : super self::C::•()
     ;
-  set x(covariant core::num value) → void {
+  set x(covariant-by-declaration core::num value) → void {
     super.{self::C::x} = value.{core::num::toInt}(){() → core::int};
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
index 2f21afd..d7f0e7d 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
@@ -23,8 +23,8 @@
 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%) → dynamic field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  covariant-by-class field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  covariant-by-class 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 6a230ed..5a264b1 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect
@@ -24,8 +24,8 @@
 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%) → dynamic field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  covariant-by-class field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  covariant-by-class 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.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
index 2f21afd..d7f0e7d 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
@@ -23,8 +23,8 @@
 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%) → dynamic field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  covariant-by-class field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  covariant-by-class 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.outline.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.outline.expect
index 97c9f60..65855eb 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.outline.expect
@@ -7,8 +7,8 @@
 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%) → dynamic field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  covariant-by-class field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  covariant-by-class 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%>
     ;
 }
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 6a230ed..5a264b1 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect
@@ -24,8 +24,8 @@
 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%) → dynamic field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  covariant-by-class field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  covariant-by-class 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/issue42546.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect
index 8c2a328..8563b46 100644
--- a/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect
@@ -29,13 +29,13 @@
   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}))){(core::Invocation) → 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 */ 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))){(core::Invocation) → 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(#C8, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} 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>(#C6))){(core::Invocation) → 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, {covariant-by-class () →? 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(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: onTimeout}))){(core::Invocation) → 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 */ 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}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 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>{#C10: onError}))){(core::Invocation) → dynamic} 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))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C3, #C12, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → dynamic} 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 = 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>>>'.
@@ -56,11 +56,11 @@
   #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
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #timeout
+  #C8 = #onTimeout
+  #C9 = #then
+  #C10 = #onError
+  #C11 = #asStream
+  #C12 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.transformed.expect
index 204fd46..b810299 100644
--- a/pkg/front_end/testcases/nnbd/issue42546.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.transformed.expect
@@ -29,13 +29,13 @@
   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>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation) → 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 */ 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>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation) → 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(#C8, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} 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>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → 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, {covariant-by-class () →? 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(#C7, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: onTimeout}))){(core::Invocation) → 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 */ 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::_GrowableList::_literal1<core::Type*>(self::Divergent::then::R%)), core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onValue)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C11: onError}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, core::List::unmodifiable<core::Type*>(core::_GrowableList::_literal1<core::Type*>(self::Divergent::then::R%)), core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onValue)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onError}))){(core::Invocation) → dynamic} 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))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C3, #C12, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
 }
 static method test() → dynamic /* originally async */ {
   final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
@@ -105,11 +105,11 @@
   #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
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #timeout
+  #C8 = #onTimeout
+  #C9 = #then
+  #C10 = #onError
+  #C11 = #asStream
+  #C12 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect
index 8c2a328..8563b46 100644
--- a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect
@@ -29,13 +29,13 @@
   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}))){(core::Invocation) → 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 */ 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))){(core::Invocation) → 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(#C8, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} 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>(#C6))){(core::Invocation) → 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, {covariant-by-class () →? 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(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: onTimeout}))){(core::Invocation) → 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 */ 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}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 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>{#C10: onError}))){(core::Invocation) → dynamic} 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))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C3, #C12, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → dynamic} 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 = 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>>>'.
@@ -56,11 +56,11 @@
   #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
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #timeout
+  #C8 = #onTimeout
+  #C9 = #then
+  #C10 = #onError
+  #C11 = #asStream
+  #C12 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.outline.expect
index dd671d9..d87cbdc 100644
--- a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.outline.expect
@@ -14,7 +14,7 @@
     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}))){(core::Invocation) → 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 */ 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>{}))){(core::Invocation) → 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}) → 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, {covariant-by-class () →? FutureOr<self::Divergent<self::Divergent<self::Divergent::T%>>>onTimeout}) → 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}))){(core::Invocation) → 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 */ then<R extends core::Object? = dynamic>((self::Divergent<self::Divergent<self::Divergent::T%>>) → FutureOr<self::Divergent::then::R%>onValue, {core::Function? onError}) → 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}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
@@ -28,19 +28,19 @@
 
 
 Extra constant evaluation status:
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:639:13 -> SymbolConstant(#catchError)
-Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:639:13 -> ListConstant(const <Type*>[])
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:639:13 -> SymbolConstant(#test)
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:675:13 -> SymbolConstant(#whenComplete)
-Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:675:13 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:675:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:698:13 -> SymbolConstant(#timeout)
-Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:698:13 -> ListConstant(const <Type*>[])
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:698:13 -> SymbolConstant(#onTimeout)
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:602:13 -> SymbolConstant(#then)
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:602:13 -> SymbolConstant(#onError)
-Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:684:13 -> SymbolConstant(#asStream)
-Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:684:13 -> ListConstant(const <Type*>[])
-Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:684:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:684:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:717:13 -> SymbolConstant(#catchError)
+Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:717:13 -> ListConstant(const <Type*>[])
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:717:13 -> SymbolConstant(#test)
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:753:13 -> SymbolConstant(#whenComplete)
+Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:753:13 -> ListConstant(const <Type*>[])
+Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:753:13 -> MapConstant(const <Symbol*, dynamic>{})
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:776:13 -> SymbolConstant(#timeout)
+Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:776:13 -> ListConstant(const <Type*>[])
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:776:13 -> SymbolConstant(#onTimeout)
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:680:13 -> SymbolConstant(#then)
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:680:13 -> SymbolConstant(#onError)
+Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:762:13 -> SymbolConstant(#asStream)
+Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:762:13 -> ListConstant(const <Type*>[])
+Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:762:13 -> ListConstant(const <dynamic>[])
+Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/async/future.dart:762:13 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 61, effectively constant: 15
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.transformed.expect
index 204fd46..b810299 100644
--- a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.transformed.expect
@@ -29,13 +29,13 @@
   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>(core::_GrowableList::_literal1<dynamic>(onError)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))){(core::Invocation) → 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 */ 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>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation) → 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(#C8, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} 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>(core::_GrowableList::_literal1<dynamic>(action)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → 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, {covariant-by-class () →? 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(#C7, 0, #C3, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(timeLimit)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: onTimeout}))){(core::Invocation) → 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 */ 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::_GrowableList::_literal1<core::Type*>(self::Divergent::then::R%)), core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onValue)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C11: onError}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C9, 0, core::List::unmodifiable<core::Type*>(core::_GrowableList::_literal1<core::Type*>(self::Divergent::then::R%)), core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(onValue)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C10: onError}))){(core::Invocation) → dynamic} 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))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C11, 0, #C3, #C12, core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
 }
 static method test() → dynamic /* originally async */ {
   final asy::_Future<dynamic> :async_future = new asy::_Future::•<dynamic>();
@@ -105,11 +105,11 @@
   #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
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #timeout
+  #C8 = #onTimeout
+  #C9 = #then
+  #C10 = #onError
+  #C11 = #asStream
+  #C12 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect
index b7191c8..1717f29 100644
--- a/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect
@@ -9,9 +9,9 @@
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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;
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect
index b7191c8..1717f29 100644
--- a/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect
@@ -9,9 +9,9 @@
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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;
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.outline.expect
index 7475e9f..f1a33e9 100644
--- a/pkg/front_end/testcases/nnbd/issue42603.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.outline.expect
@@ -9,9 +9,9 @@
 // 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:26:17: Context: This is the overridden method ('==').
-//   bool operator ==(Object other) native "Object_equals";
-//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:29:26: Context: This is the overridden method ('==').
+//   external bool operator ==(Object other);
+//                          ^
 //
 // 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;
diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.expect
index e41afed..2815e55 100644
--- a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::C<self::C::X%, self::C::Y>
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
+  method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic {
     core::Set<core::Object?> v = block {
       final core::Set<core::Object?> #t1 = col::LinkedHashSet::•<core::Object?>();
       #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool};
diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect
index ba81fbc..bccc51e 100644
--- a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::C<self::C::X%, self::C::Y>
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
+  method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic {
     core::Set<core::Object?> v = block {
       final core::Set<core::Object?> #t1 = new col::_CompactLinkedHashSet::•<core::Object?>();
       #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool};
diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.expect
index e41afed..2815e55 100644
--- a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::C<self::C::X%, self::C::Y>
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
+  method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic {
     core::Set<core::Object?> v = block {
       final core::Set<core::Object?> #t1 = col::LinkedHashSet::•<core::Object?>();
       #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool};
diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.outline.expect
index dfdf23f..83e321d 100644
--- a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y>
     ;
-  method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic
+  method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic
     ;
 }
 static method assertRightSubtype(dynamic x) → dynamic
diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect
index ba81fbc..bccc51e 100644
--- a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::C<self::C::X%, self::C::Y>
     : super core::Object::•()
     ;
-  method test(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y? y) → dynamic {
+  method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic {
     core::Set<core::Object?> v = block {
       final core::Set<core::Object?> #t1 = new col::_CompactLinkedHashSet::•<core::Object?>();
       #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool};
diff --git a/pkg/front_end/testcases/nnbd/issue43536.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43536.dart.strong.expect
index acf5d78..fc2321b 100644
--- a/pkg/front_end/testcases/nnbd/issue43536.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue43536.dart.strong.expect
@@ -6,10 +6,10 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
+  method foo<covariant-by-class E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
     core::List<self::C::foo::E%> variable = this.{self::C::method}<self::C::foo::E%>(list){(core::List<self::C::foo::E%>) → core::List<self::C::foo::E%>};
   }
-  method method<generic-covariant-impl F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
+  method method<covariant-by-class F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
     return list;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue43536.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43536.dart.strong.transformed.expect
index acf5d78..fc2321b 100644
--- a/pkg/front_end/testcases/nnbd/issue43536.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43536.dart.strong.transformed.expect
@@ -6,10 +6,10 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
+  method foo<covariant-by-class E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
     core::List<self::C::foo::E%> variable = this.{self::C::method}<self::C::foo::E%>(list){(core::List<self::C::foo::E%>) → core::List<self::C::foo::E%>};
   }
-  method method<generic-covariant-impl F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
+  method method<covariant-by-class F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
     return list;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.expect
index acf5d78..fc2321b 100644
--- a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.expect
@@ -6,10 +6,10 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
+  method foo<covariant-by-class E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
     core::List<self::C::foo::E%> variable = this.{self::C::method}<self::C::foo::E%>(list){(core::List<self::C::foo::E%>) → core::List<self::C::foo::E%>};
   }
-  method method<generic-covariant-impl F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
+  method method<covariant-by-class F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
     return list;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.outline.expect
index db3198e..206da0f 100644
--- a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.outline.expect
@@ -5,9 +5,9 @@
 class C<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%>
     ;
-  method foo<generic-covariant-impl E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic
+  method foo<covariant-by-class E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic
     ;
-  method method<generic-covariant-impl F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
+  method method<covariant-by-class F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.transformed.expect
index acf5d78..fc2321b 100644
--- a/pkg/front_end/testcases/nnbd/issue43536.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43536.dart.weak.transformed.expect
@@ -6,10 +6,10 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-  method foo<generic-covariant-impl E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
+  method foo<covariant-by-class E extends self::C::T%>(core::List<self::C::foo::E%> list) → dynamic {
     core::List<self::C::foo::E%> variable = this.{self::C::method}<self::C::foo::E%>(list){(core::List<self::C::foo::E%>) → core::List<self::C::foo::E%>};
   }
-  method method<generic-covariant-impl F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
+  method method<covariant-by-class F extends self::C::T%>(core::List<self::C::method::F%> list) → core::List<self::C::method::F%>
     return list;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect
index afe7f3b..2ed0f16 100644
--- a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.expect
@@ -11,11 +11,11 @@
 import "dart:core" as core;
 
 class C<X extends self::C<self::C::X%, self::C::X%>? = self::C<dynamic, dynamic>?, Y extends self::C<self::C::Y%, self::C::Y%>? = self::C<dynamic, dynamic>?> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%, self::C::Y%>
     : self::C::x = x, super core::Object::•()
     ;
-  method m(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → core::Object {
+  method m(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → core::Object {
     self::C<core::Object?, core::Object?>? z = self::b ?{self::C<core::Object?, core::Object?>?} x : y;
     if(z == null)
       throw 0;
diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect
index a5b697a..74a0b64 100644
--- a/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.strong.transformed.expect
@@ -11,11 +11,11 @@
 import "dart:core" as core;
 
 class C<X extends self::C<self::C::X%, self::C::X%>? = self::C<dynamic, dynamic>?, Y extends self::C<self::C::Y%, self::C::Y%>? = self::C<dynamic, dynamic>?> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%, self::C::Y%>
     : self::C::x = x, super core::Object::•()
     ;
-  method m(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → core::Object {
+  method m(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → core::Object {
     self::C<core::Object?, core::Object?>? z = self::b ?{self::C<core::Object?, core::Object?>?} x : y;
     if(z == null)
       throw 0;
diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.expect
index afe7f3b..2ed0f16 100644
--- a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.expect
@@ -11,11 +11,11 @@
 import "dart:core" as core;
 
 class C<X extends self::C<self::C::X%, self::C::X%>? = self::C<dynamic, dynamic>?, Y extends self::C<self::C::Y%, self::C::Y%>? = self::C<dynamic, dynamic>?> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%, self::C::Y%>
     : self::C::x = x, super core::Object::•()
     ;
-  method m(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → core::Object {
+  method m(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → core::Object {
     self::C<core::Object?, core::Object?>? z = self::b ?{self::C<core::Object?, core::Object?>?} x : y;
     if(z == null)
       throw 0;
diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.outline.expect
index be98ef0..c78b89c 100644
--- a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class C<X extends self::C<self::C::X%, self::C::X%>? = self::C<dynamic, dynamic>?, Y extends self::C<self::C::Y%, self::C::Y%>? = self::C<dynamic, dynamic>?> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%, self::C::Y%>
     ;
-  method m(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → core::Object
+  method m(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → core::Object
     ;
 }
 static field core::bool b;
diff --git a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.transformed.expect
index e53c5e2..cbf66ab 100644
--- a/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716a.dart.weak.transformed.expect
@@ -11,11 +11,11 @@
 import "dart:core" as core;
 
 class C<X extends self::C<self::C::X%, self::C::X%>? = self::C<dynamic, dynamic>?, Y extends self::C<self::C::Y%, self::C::Y%>? = self::C<dynamic, dynamic>?> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%, self::C::Y%>
     : self::C::x = x, super core::Object::•()
     ;
-  method m(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → core::Object {
+  method m(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → core::Object {
     self::C<core::Object?, core::Object?>? z = self::b ?{self::C<core::Object?, core::Object?>?} x : y;
     if(z == null)
       throw 0;
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
index 78b0b34..98741d8 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<X extends (self::C::X%) →? void = (Never) →? void> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%>
     : self::C::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
index 78b0b34..98741d8 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<X extends (self::C::X%) →? void = (Never) →? void> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%>
     : self::C::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
index 78b0b34..98741d8 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<X extends (self::C::X%) →? void = (Never) →? void> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%>
     : self::C::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.outline.expect
index 3b44433..fbb7cb5 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<X extends (self::C::X%) →? void = (Never) →? void> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%>
     ;
   method m() → void
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
index 78b0b34..98741d8 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
@@ -10,7 +10,7 @@
 import "dart:core" as core;
 
 class C<X extends (self::C::X%) →? void = (Never) →? void> extends core::Object {
-  generic-covariant-impl field self::C::X% x;
+  covariant-by-class field self::C::X% x;
   constructor •(self::C::X% x) → self::C<self::C::X%>
     : self::C::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.expect b/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.expect
index 9ffcc4a..aa91968 100644
--- a/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S>
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S x) → void {
+  method test1(covariant-by-class self::Foo::S x) → void {
     (self::Foo::S) → self::Foo::S f = self::Test|get#test<self::Foo::S>(x);
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.transformed.expect
index 9ffcc4a..aa91968 100644
--- a/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/language_issue1182.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S>
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S x) → void {
+  method test1(covariant-by-class self::Foo::S x) → void {
     (self::Foo::S) → self::Foo::S f = self::Test|get#test<self::Foo::S>(x);
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.expect b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.expect
index 9ffcc4a..aa91968 100644
--- a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S>
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S x) → void {
+  method test1(covariant-by-class self::Foo::S x) → void {
     (self::Foo::S) → self::Foo::S f = self::Test|get#test<self::Foo::S>(x);
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.outline.expect
index 1df50f2..1431569 100644
--- a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Foo<S extends core::num> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::S>
     ;
-  method test1(generic-covariant-impl self::Foo::S x) → void
+  method test1(covariant-by-class self::Foo::S x) → void
     ;
 }
 extension Test<T extends core::Object? = dynamic> on T% {
diff --git a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.transformed.expect
index 9ffcc4a..aa91968 100644
--- a/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/language_issue1182.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Foo<self::Foo::S>
     : super core::Object::•()
     ;
-  method test1(generic-covariant-impl self::Foo::S x) → void {
+  method test1(covariant-by-class self::Foo::S x) → void {
     (self::Foo::S) → self::Foo::S f = self::Test|get#test<self::Foo::S>(x);
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.expect b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.expect
index 19a1ec4..ecbc399 100644
--- a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.expect
@@ -70,8 +70,8 @@
     ;
 }
 class B<X extends core::Object?, Y extends core::Object> extends core::Object {
-  generic-covariant-impl field self::B::X% fieldOfB;
-  generic-covariant-impl field self::B::Y fieldOfB2;
+  covariant-by-class field self::B::X% fieldOfB;
+  covariant-by-class field self::B::Y fieldOfB2;
   constructor foo() → self::B<self::B::X%, self::B::Y>
     : self::B::fieldOfB2 = null, self::B::fieldOfB = null, super core::Object::•()
     ;
@@ -84,22 +84,22 @@
   field core::int fieldOfM = null;
 }
 abstract class N<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
-  generic-covariant-impl field self::N::X% fieldOfN = null;
-  generic-covariant-impl field self::N::Y fieldOfN2 = null;
+  covariant-by-class field self::N::X% fieldOfN = null;
+  covariant-by-class field self::N::Y fieldOfN2 = null;
 }
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   static field core::int? staticFieldOfX = null;
   static field core::int staticFieldOfXInitialized = 42;
-  generic-covariant-impl field self::C::X? fieldOfX = null;
+  covariant-by-class field self::C::X? fieldOfX = null;
   field core::int? fieldOfX2 = null;
   field dynamic fieldOfX3 = null;
   field Null fieldOfX4 = null;
   field () →? core::int fieldOfX5 = null;
-  generic-covariant-impl field self::C::Y? fieldOfX6 = null;
+  covariant-by-class field self::C::Y? fieldOfX6 = null;
   late static field core::int lateStaticFieldOfC;
   late field core::int fieldOfC7;
-  late generic-covariant-impl field self::C::X% fieldOfC8;
-  late generic-covariant-impl field self::C::Y fieldOfC9;
+  late covariant-by-class field self::C::X% fieldOfC8;
+  late covariant-by-class field self::C::Y fieldOfC9;
   field core::int fieldOfC10;
   constructor foo(core::int fieldOfC10) → self::C<self::C::X%, self::C::Y>
     : self::C::fieldOfC10 = fieldOfC10, super core::Object::•()
@@ -111,16 +111,16 @@
 abstract class L<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
   static field core::int? staticFieldOfL = null;
   static field core::int staticFieldOfLInitialized = 42;
-  generic-covariant-impl field self::L::X? fieldOfL = null;
+  covariant-by-class field self::L::X? fieldOfL = null;
   field core::int? fieldOfL2 = null;
   field dynamic fieldOfL3 = null;
   field Null fieldOfL4 = null;
   field () →? core::int fieldOfL5 = null;
-  generic-covariant-impl field self::L::Y? fieldOfL6 = null;
+  covariant-by-class field self::L::Y? fieldOfL6 = null;
   late static field core::int lateStaticFieldOfM;
   late field core::int fieldOfM7;
-  late generic-covariant-impl field self::L::X% fieldOfM8;
-  late generic-covariant-impl field self::L::Y fieldOfM9;
+  late covariant-by-class field self::L::X% fieldOfM8;
+  late covariant-by-class field self::L::Y fieldOfM9;
 }
 extension P on self::Foo {
   static field staticFieldOfE = self::P|staticFieldOfE;
diff --git a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.transformed.expect
index 19a1ec4..ecbc399 100644
--- a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.strong.transformed.expect
@@ -70,8 +70,8 @@
     ;
 }
 class B<X extends core::Object?, Y extends core::Object> extends core::Object {
-  generic-covariant-impl field self::B::X% fieldOfB;
-  generic-covariant-impl field self::B::Y fieldOfB2;
+  covariant-by-class field self::B::X% fieldOfB;
+  covariant-by-class field self::B::Y fieldOfB2;
   constructor foo() → self::B<self::B::X%, self::B::Y>
     : self::B::fieldOfB2 = null, self::B::fieldOfB = null, super core::Object::•()
     ;
@@ -84,22 +84,22 @@
   field core::int fieldOfM = null;
 }
 abstract class N<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
-  generic-covariant-impl field self::N::X% fieldOfN = null;
-  generic-covariant-impl field self::N::Y fieldOfN2 = null;
+  covariant-by-class field self::N::X% fieldOfN = null;
+  covariant-by-class field self::N::Y fieldOfN2 = null;
 }
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   static field core::int? staticFieldOfX = null;
   static field core::int staticFieldOfXInitialized = 42;
-  generic-covariant-impl field self::C::X? fieldOfX = null;
+  covariant-by-class field self::C::X? fieldOfX = null;
   field core::int? fieldOfX2 = null;
   field dynamic fieldOfX3 = null;
   field Null fieldOfX4 = null;
   field () →? core::int fieldOfX5 = null;
-  generic-covariant-impl field self::C::Y? fieldOfX6 = null;
+  covariant-by-class field self::C::Y? fieldOfX6 = null;
   late static field core::int lateStaticFieldOfC;
   late field core::int fieldOfC7;
-  late generic-covariant-impl field self::C::X% fieldOfC8;
-  late generic-covariant-impl field self::C::Y fieldOfC9;
+  late covariant-by-class field self::C::X% fieldOfC8;
+  late covariant-by-class field self::C::Y fieldOfC9;
   field core::int fieldOfC10;
   constructor foo(core::int fieldOfC10) → self::C<self::C::X%, self::C::Y>
     : self::C::fieldOfC10 = fieldOfC10, super core::Object::•()
@@ -111,16 +111,16 @@
 abstract class L<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
   static field core::int? staticFieldOfL = null;
   static field core::int staticFieldOfLInitialized = 42;
-  generic-covariant-impl field self::L::X? fieldOfL = null;
+  covariant-by-class field self::L::X? fieldOfL = null;
   field core::int? fieldOfL2 = null;
   field dynamic fieldOfL3 = null;
   field Null fieldOfL4 = null;
   field () →? core::int fieldOfL5 = null;
-  generic-covariant-impl field self::L::Y? fieldOfL6 = null;
+  covariant-by-class field self::L::Y? fieldOfL6 = null;
   late static field core::int lateStaticFieldOfM;
   late field core::int fieldOfM7;
-  late generic-covariant-impl field self::L::X% fieldOfM8;
-  late generic-covariant-impl field self::L::Y fieldOfM9;
+  late covariant-by-class field self::L::X% fieldOfM8;
+  late covariant-by-class field self::L::Y fieldOfM9;
 }
 extension P on self::Foo {
   static field staticFieldOfE = self::P|staticFieldOfE;
diff --git a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.expect b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.expect
index 19a1ec4..ecbc399 100644
--- a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.expect
@@ -70,8 +70,8 @@
     ;
 }
 class B<X extends core::Object?, Y extends core::Object> extends core::Object {
-  generic-covariant-impl field self::B::X% fieldOfB;
-  generic-covariant-impl field self::B::Y fieldOfB2;
+  covariant-by-class field self::B::X% fieldOfB;
+  covariant-by-class field self::B::Y fieldOfB2;
   constructor foo() → self::B<self::B::X%, self::B::Y>
     : self::B::fieldOfB2 = null, self::B::fieldOfB = null, super core::Object::•()
     ;
@@ -84,22 +84,22 @@
   field core::int fieldOfM = null;
 }
 abstract class N<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
-  generic-covariant-impl field self::N::X% fieldOfN = null;
-  generic-covariant-impl field self::N::Y fieldOfN2 = null;
+  covariant-by-class field self::N::X% fieldOfN = null;
+  covariant-by-class field self::N::Y fieldOfN2 = null;
 }
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   static field core::int? staticFieldOfX = null;
   static field core::int staticFieldOfXInitialized = 42;
-  generic-covariant-impl field self::C::X? fieldOfX = null;
+  covariant-by-class field self::C::X? fieldOfX = null;
   field core::int? fieldOfX2 = null;
   field dynamic fieldOfX3 = null;
   field Null fieldOfX4 = null;
   field () →? core::int fieldOfX5 = null;
-  generic-covariant-impl field self::C::Y? fieldOfX6 = null;
+  covariant-by-class field self::C::Y? fieldOfX6 = null;
   late static field core::int lateStaticFieldOfC;
   late field core::int fieldOfC7;
-  late generic-covariant-impl field self::C::X% fieldOfC8;
-  late generic-covariant-impl field self::C::Y fieldOfC9;
+  late covariant-by-class field self::C::X% fieldOfC8;
+  late covariant-by-class field self::C::Y fieldOfC9;
   field core::int fieldOfC10;
   constructor foo(core::int fieldOfC10) → self::C<self::C::X%, self::C::Y>
     : self::C::fieldOfC10 = fieldOfC10, super core::Object::•()
@@ -111,16 +111,16 @@
 abstract class L<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
   static field core::int? staticFieldOfL = null;
   static field core::int staticFieldOfLInitialized = 42;
-  generic-covariant-impl field self::L::X? fieldOfL = null;
+  covariant-by-class field self::L::X? fieldOfL = null;
   field core::int? fieldOfL2 = null;
   field dynamic fieldOfL3 = null;
   field Null fieldOfL4 = null;
   field () →? core::int fieldOfL5 = null;
-  generic-covariant-impl field self::L::Y? fieldOfL6 = null;
+  covariant-by-class field self::L::Y? fieldOfL6 = null;
   late static field core::int lateStaticFieldOfM;
   late field core::int fieldOfM7;
-  late generic-covariant-impl field self::L::X% fieldOfM8;
-  late generic-covariant-impl field self::L::Y fieldOfM9;
+  late covariant-by-class field self::L::X% fieldOfM8;
+  late covariant-by-class field self::L::Y fieldOfM9;
 }
 extension P on self::Foo {
   static field staticFieldOfE = self::P|staticFieldOfE;
diff --git a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.outline.expect
index 750e00652..d840616 100644
--- a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.outline.expect
@@ -34,8 +34,8 @@
     ;
 }
 class B<X extends core::Object?, Y extends core::Object> extends core::Object {
-  generic-covariant-impl field self::B::X% fieldOfB;
-  generic-covariant-impl field self::B::Y fieldOfB2;
+  covariant-by-class field self::B::X% fieldOfB;
+  covariant-by-class field self::B::Y fieldOfB2;
   constructor foo() → self::B<self::B::X%, self::B::Y>
     ;
   constructor bar(self::B::X% fieldOfB, self::B::Y fieldOfB2) → self::B<self::B::X%, self::B::Y>
@@ -46,22 +46,22 @@
   field core::int fieldOfM;
 }
 abstract class N<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
-  generic-covariant-impl field self::N::X% fieldOfN;
-  generic-covariant-impl field self::N::Y fieldOfN2;
+  covariant-by-class field self::N::X% fieldOfN;
+  covariant-by-class field self::N::Y fieldOfN2;
 }
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   static field core::int? staticFieldOfX;
   static field core::int staticFieldOfXInitialized;
-  generic-covariant-impl field self::C::X? fieldOfX;
+  covariant-by-class field self::C::X? fieldOfX;
   field core::int? fieldOfX2;
   field dynamic fieldOfX3;
   field Null fieldOfX4;
   field () →? core::int fieldOfX5;
-  generic-covariant-impl field self::C::Y? fieldOfX6;
+  covariant-by-class field self::C::Y? fieldOfX6;
   late static field core::int lateStaticFieldOfC;
   late field core::int fieldOfC7;
-  late generic-covariant-impl field self::C::X% fieldOfC8;
-  late generic-covariant-impl field self::C::Y fieldOfC9;
+  late covariant-by-class field self::C::X% fieldOfC8;
+  late covariant-by-class field self::C::Y fieldOfC9;
   field core::int fieldOfC10;
   constructor foo(core::int fieldOfC10) → self::C<self::C::X%, self::C::Y>
     ;
@@ -71,16 +71,16 @@
 abstract class L<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
   static field core::int? staticFieldOfL;
   static field core::int staticFieldOfLInitialized;
-  generic-covariant-impl field self::L::X? fieldOfL;
+  covariant-by-class field self::L::X? fieldOfL;
   field core::int? fieldOfL2;
   field dynamic fieldOfL3;
   field Null fieldOfL4;
   field () →? core::int fieldOfL5;
-  generic-covariant-impl field self::L::Y? fieldOfL6;
+  covariant-by-class field self::L::Y? fieldOfL6;
   late static field core::int lateStaticFieldOfM;
   late field core::int fieldOfM7;
-  late generic-covariant-impl field self::L::X% fieldOfM8;
-  late generic-covariant-impl field self::L::Y fieldOfM9;
+  late covariant-by-class field self::L::X% fieldOfM8;
+  late covariant-by-class field self::L::Y fieldOfM9;
 }
 extension P on self::Foo {
   static field staticFieldOfE = self::P|staticFieldOfE;
diff --git a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.transformed.expect
index 19a1ec4..ecbc399 100644
--- a/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/non_nullable_field_initialization.dart.weak.transformed.expect
@@ -70,8 +70,8 @@
     ;
 }
 class B<X extends core::Object?, Y extends core::Object> extends core::Object {
-  generic-covariant-impl field self::B::X% fieldOfB;
-  generic-covariant-impl field self::B::Y fieldOfB2;
+  covariant-by-class field self::B::X% fieldOfB;
+  covariant-by-class field self::B::Y fieldOfB2;
   constructor foo() → self::B<self::B::X%, self::B::Y>
     : self::B::fieldOfB2 = null, self::B::fieldOfB = null, super core::Object::•()
     ;
@@ -84,22 +84,22 @@
   field core::int fieldOfM = null;
 }
 abstract class N<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
-  generic-covariant-impl field self::N::X% fieldOfN = null;
-  generic-covariant-impl field self::N::Y fieldOfN2 = null;
+  covariant-by-class field self::N::X% fieldOfN = null;
+  covariant-by-class field self::N::Y fieldOfN2 = null;
 }
 class C<X extends core::Object?, Y extends core::Object> extends core::Object {
   static field core::int? staticFieldOfX = null;
   static field core::int staticFieldOfXInitialized = 42;
-  generic-covariant-impl field self::C::X? fieldOfX = null;
+  covariant-by-class field self::C::X? fieldOfX = null;
   field core::int? fieldOfX2 = null;
   field dynamic fieldOfX3 = null;
   field Null fieldOfX4 = null;
   field () →? core::int fieldOfX5 = null;
-  generic-covariant-impl field self::C::Y? fieldOfX6 = null;
+  covariant-by-class field self::C::Y? fieldOfX6 = null;
   late static field core::int lateStaticFieldOfC;
   late field core::int fieldOfC7;
-  late generic-covariant-impl field self::C::X% fieldOfC8;
-  late generic-covariant-impl field self::C::Y fieldOfC9;
+  late covariant-by-class field self::C::X% fieldOfC8;
+  late covariant-by-class field self::C::Y fieldOfC9;
   field core::int fieldOfC10;
   constructor foo(core::int fieldOfC10) → self::C<self::C::X%, self::C::Y>
     : self::C::fieldOfC10 = fieldOfC10, super core::Object::•()
@@ -111,16 +111,16 @@
 abstract class L<X extends core::Object?, Y extends core::Object> extends core::Object /*isMixinDeclaration*/  {
   static field core::int? staticFieldOfL = null;
   static field core::int staticFieldOfLInitialized = 42;
-  generic-covariant-impl field self::L::X? fieldOfL = null;
+  covariant-by-class field self::L::X? fieldOfL = null;
   field core::int? fieldOfL2 = null;
   field dynamic fieldOfL3 = null;
   field Null fieldOfL4 = null;
   field () →? core::int fieldOfL5 = null;
-  generic-covariant-impl field self::L::Y? fieldOfL6 = null;
+  covariant-by-class field self::L::Y? fieldOfL6 = null;
   late static field core::int lateStaticFieldOfM;
   late field core::int fieldOfM7;
-  late generic-covariant-impl field self::L::X% fieldOfM8;
-  late generic-covariant-impl field self::L::Y fieldOfM9;
+  late covariant-by-class field self::L::X% fieldOfM8;
+  late covariant-by-class field self::L::Y fieldOfM9;
 }
 extension P on self::Foo {
   static field staticFieldOfE = self::P|staticFieldOfE;
diff --git a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.expect b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.expect
index 9cb92de..682b905 100644
--- a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.transformed.expect
index 9cb92de..682b905 100644
--- a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.expect b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.expect
index 9cb92de..682b905 100644
--- a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.outline.expect
index ec447de..c018408 100644
--- a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T%>
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic
+  method bar(covariant-by-class self::A::T% value) → dynamic
     ;
   method barInt(core::int value) → dynamic
     ;
diff --git a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.transformed.expect
index 9cb92de..682b905 100644
--- a/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/not_definitely_unassigned_late_local_variables.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract method baz() → self::A::T%;
-  method bar(generic-covariant-impl self::A::T% value) → dynamic {}
+  method bar(covariant-by-class self::A::T% value) → dynamic {}
   method barInt(core::int value) → dynamic {}
   method foo() → dynamic {
     late self::A::T% value;
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.expect
index f2c396a..59d5c75 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.expect
@@ -62,9 +62,9 @@
     : super core::Object::•()
     ;
   abstract get runtimeType() → self::CustomType;
-  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String
+  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant-by-declaration self::CustomInvocation invocation) → core::String
     return super.{core::Object::noSuchMethod}(invocation);
-  forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool
+  forwarding-stub forwarding-semi-stub operator ==(covariant-by-declaration self::Class o) → core::bool
     return super.{core::Object::==}(o);
   abstract method toString({core::Object o = #C1}) → core::String;
 }
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.transformed.expect
index f2c396a..59d5c75 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.strong.transformed.expect
@@ -62,9 +62,9 @@
     : super core::Object::•()
     ;
   abstract get runtimeType() → self::CustomType;
-  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String
+  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant-by-declaration self::CustomInvocation invocation) → core::String
     return super.{core::Object::noSuchMethod}(invocation);
-  forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool
+  forwarding-stub forwarding-semi-stub operator ==(covariant-by-declaration self::Class o) → core::bool
     return super.{core::Object::==}(o);
   abstract method toString({core::Object o = #C1}) → core::String;
 }
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.expect
index f2c396a..59d5c75 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.expect
@@ -62,9 +62,9 @@
     : super core::Object::•()
     ;
   abstract get runtimeType() → self::CustomType;
-  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String
+  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant-by-declaration self::CustomInvocation invocation) → core::String
     return super.{core::Object::noSuchMethod}(invocation);
-  forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool
+  forwarding-stub forwarding-semi-stub operator ==(covariant-by-declaration self::Class o) → core::bool
     return super.{core::Object::==}(o);
   abstract method toString({core::Object o = #C1}) → core::String;
 }
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
index f472974..b00ea1e 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.outline.expect
@@ -16,9 +16,9 @@
   synthetic constructor •() → self::Class
     ;
   abstract get runtimeType() → self::CustomType;
-  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String
+  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant-by-declaration self::CustomInvocation invocation) → core::String
     return super.{core::Object::noSuchMethod}(invocation);
-  forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool
+  forwarding-stub forwarding-semi-stub operator ==(covariant-by-declaration self::Class o) → core::bool
     return super.{core::Object::==}(o);
   abstract method toString({core::Object o}) → core::String;
 }
diff --git a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.transformed.expect
index f2c396a..59d5c75 100644
--- a/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/nullable_object_access.dart.weak.transformed.expect
@@ -62,9 +62,9 @@
     : super core::Object::•()
     ;
   abstract get runtimeType() → self::CustomType;
-  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant self::CustomInvocation invocation) → core::String
+  forwarding-stub forwarding-semi-stub method noSuchMethod(covariant-by-declaration self::CustomInvocation invocation) → core::String
     return super.{core::Object::noSuchMethod}(invocation);
-  forwarding-stub forwarding-semi-stub operator ==(covariant self::Class o) → core::bool
+  forwarding-stub forwarding-semi-stub operator ==(covariant-by-declaration self::Class o) → core::bool
     return super.{core::Object::==}(o);
   abstract method toString({core::Object o = #C1}) → core::String;
 }
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.strong.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.strong.expect
index ae3903b..83ec6a1 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.strong.expect
@@ -152,8 +152,8 @@
   abstract method method2b(dynamic x) → void;
   abstract method method3a<AT3a extends core::Object? = dynamic>(self::A::method3a::AT3a% x) → void;
   abstract method method3b<AT3b extends core::Object? = dynamic>(self::A::method3b::AT3b% x) → void;
-  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, generic-covariant-impl self::A::AT% y) → void;
-  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, generic-covariant-impl self::A::AT% y) → void;
+  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, covariant-by-class self::A::AT% y) → void;
+  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
   abstract method method5a(core::int x, core::num y) → void;
   abstract method method5b(core::int x, core::num y) → void;
   abstract method method6a({core::int x = #C1, core::num y = #C1}) → void;
@@ -199,8 +199,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<BT3a extends core::Object? = dynamic>(self::B::method3a::BT3a% x) → void;
   abstract method method3b<BT3b extends core::Object? = dynamic>(self::B::method3b::BT3b% x) → void;
-  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, generic-covariant-impl self::B::BT% y) → void;
-  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, generic-covariant-impl self::B::BT% y) → void;
+  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, covariant-by-class self::B::BT% y) → void;
+  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
   abstract method method5a(core::num x, core::int y) → void;
   abstract method method5b(core::num x, core::int y) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
@@ -257,8 +257,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
   abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y = #C1]) → void;
-  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, generic-covariant-impl core::num y) → void;
-  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, generic-covariant-impl core::num y, [dynamic z = #C1]) → void;
+  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
+  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z = #C1]) → void;
   abstract method method5a(invalid-type x, invalid-type y) → void;
   abstract method method5b(core::num x, core::num y, [invalid-type z = #C1]) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.strong.transformed.expect
index ae3903b..83ec6a1 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.strong.transformed.expect
@@ -152,8 +152,8 @@
   abstract method method2b(dynamic x) → void;
   abstract method method3a<AT3a extends core::Object? = dynamic>(self::A::method3a::AT3a% x) → void;
   abstract method method3b<AT3b extends core::Object? = dynamic>(self::A::method3b::AT3b% x) → void;
-  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, generic-covariant-impl self::A::AT% y) → void;
-  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, generic-covariant-impl self::A::AT% y) → void;
+  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, covariant-by-class self::A::AT% y) → void;
+  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
   abstract method method5a(core::int x, core::num y) → void;
   abstract method method5b(core::int x, core::num y) → void;
   abstract method method6a({core::int x = #C1, core::num y = #C1}) → void;
@@ -199,8 +199,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<BT3a extends core::Object? = dynamic>(self::B::method3a::BT3a% x) → void;
   abstract method method3b<BT3b extends core::Object? = dynamic>(self::B::method3b::BT3b% x) → void;
-  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, generic-covariant-impl self::B::BT% y) → void;
-  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, generic-covariant-impl self::B::BT% y) → void;
+  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, covariant-by-class self::B::BT% y) → void;
+  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
   abstract method method5a(core::num x, core::int y) → void;
   abstract method method5b(core::num x, core::int y) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
@@ -257,8 +257,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
   abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y = #C1]) → void;
-  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, generic-covariant-impl core::num y) → void;
-  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, generic-covariant-impl core::num y, [dynamic z = #C1]) → void;
+  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
+  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z = #C1]) → void;
   abstract method method5a(invalid-type x, invalid-type y) → void;
   abstract method method5b(core::num x, core::num y, [invalid-type z = #C1]) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.expect
index ae3903b..83ec6a1 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.expect
@@ -152,8 +152,8 @@
   abstract method method2b(dynamic x) → void;
   abstract method method3a<AT3a extends core::Object? = dynamic>(self::A::method3a::AT3a% x) → void;
   abstract method method3b<AT3b extends core::Object? = dynamic>(self::A::method3b::AT3b% x) → void;
-  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, generic-covariant-impl self::A::AT% y) → void;
-  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, generic-covariant-impl self::A::AT% y) → void;
+  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, covariant-by-class self::A::AT% y) → void;
+  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
   abstract method method5a(core::int x, core::num y) → void;
   abstract method method5b(core::int x, core::num y) → void;
   abstract method method6a({core::int x = #C1, core::num y = #C1}) → void;
@@ -199,8 +199,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<BT3a extends core::Object? = dynamic>(self::B::method3a::BT3a% x) → void;
   abstract method method3b<BT3b extends core::Object? = dynamic>(self::B::method3b::BT3b% x) → void;
-  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, generic-covariant-impl self::B::BT% y) → void;
-  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, generic-covariant-impl self::B::BT% y) → void;
+  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, covariant-by-class self::B::BT% y) → void;
+  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
   abstract method method5a(core::num x, core::int y) → void;
   abstract method method5b(core::num x, core::int y) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
@@ -257,8 +257,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
   abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y = #C1]) → void;
-  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, generic-covariant-impl core::num y) → void;
-  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, generic-covariant-impl core::num y, [dynamic z = #C1]) → void;
+  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
+  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z = #C1]) → void;
   abstract method method5a(invalid-type x, invalid-type y) → void;
   abstract method method5b(core::num x, core::num y, [invalid-type z = #C1]) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
index 1599471..1dcea19 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.outline.expect
@@ -151,8 +151,8 @@
   abstract method method2b(dynamic x) → void;
   abstract method method3a<AT3a extends core::Object? = dynamic>(self::A::method3a::AT3a% x) → void;
   abstract method method3b<AT3b extends core::Object? = dynamic>(self::A::method3b::AT3b% x) → void;
-  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, generic-covariant-impl self::A::AT% y) → void;
-  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, generic-covariant-impl self::A::AT% y) → void;
+  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, covariant-by-class self::A::AT% y) → void;
+  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
   abstract method method5a(core::int x, core::num y) → void;
   abstract method method5b(core::int x, core::num y) → void;
   abstract method method6a({core::int x, core::num y}) → void;
@@ -198,8 +198,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<BT3a extends core::Object? = dynamic>(self::B::method3a::BT3a% x) → void;
   abstract method method3b<BT3b extends core::Object? = dynamic>(self::B::method3b::BT3b% x) → void;
-  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, generic-covariant-impl self::B::BT% y) → void;
-  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, generic-covariant-impl self::B::BT% y) → void;
+  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, covariant-by-class self::B::BT% y) → void;
+  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
   abstract method method5a(core::num x, core::int y) → void;
   abstract method method5b(core::num x, core::int y) → void;
   abstract method method6a({core::Object x, core::num y}) → void;
@@ -255,8 +255,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
   abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y]) → void;
-  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, generic-covariant-impl core::num y) → void;
-  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, generic-covariant-impl core::num y, [dynamic z]) → void;
+  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
+  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z]) → void;
   abstract method method5a(invalid-type x, invalid-type y) → void;
   abstract method method5b(core::num x, core::num y, [invalid-type z]) → void;
   abstract method method6a({core::Object x, core::num y}) → void;
diff --git a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.transformed.expect
index ae3903b..83ec6a1 100644
--- a/pkg/front_end/testcases/nnbd/override_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/override_inference.dart.weak.transformed.expect
@@ -152,8 +152,8 @@
   abstract method method2b(dynamic x) → void;
   abstract method method3a<AT3a extends core::Object? = dynamic>(self::A::method3a::AT3a% x) → void;
   abstract method method3b<AT3b extends core::Object? = dynamic>(self::A::method3b::AT3b% x) → void;
-  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, generic-covariant-impl self::A::AT% y) → void;
-  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, generic-covariant-impl self::A::AT% y) → void;
+  abstract method method4a<AT4a extends core::Object? = dynamic>(self::A::method4a::AT4a% x, covariant-by-class self::A::AT% y) → void;
+  abstract method method4b<AT4b extends core::Object? = dynamic>(self::A::method4b::AT4b% x, covariant-by-class self::A::AT% y) → void;
   abstract method method5a(core::int x, core::num y) → void;
   abstract method method5b(core::int x, core::num y) → void;
   abstract method method6a({core::int x = #C1, core::num y = #C1}) → void;
@@ -199,8 +199,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<BT3a extends core::Object? = dynamic>(self::B::method3a::BT3a% x) → void;
   abstract method method3b<BT3b extends core::Object? = dynamic>(self::B::method3b::BT3b% x) → void;
-  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, generic-covariant-impl self::B::BT% y) → void;
-  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, generic-covariant-impl self::B::BT% y) → void;
+  abstract method method4a<BT4a extends core::Object? = dynamic>(self::B::method4a::BT4a% x, covariant-by-class self::B::BT% y) → void;
+  abstract method method4b<BT4b extends core::Object? = dynamic>(self::B::method4b::BT4b% x, covariant-by-class self::B::BT% y) → void;
   abstract method method5a(core::num x, core::int y) → void;
   abstract method method5b(core::num x, core::int y) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
@@ -257,8 +257,8 @@
   abstract method method2b(core::Object? x) → void;
   abstract method method3a<CT3a extends core::Object? = dynamic>(self::C::method3a::CT3a% x) → void;
   abstract method method3b<CT3b extends core::Object? = dynamic>(self::C::method3b::CT3b% x, [dynamic y = #C1]) → void;
-  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, generic-covariant-impl core::num y) → void;
-  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, generic-covariant-impl core::num y, [dynamic z = #C1]) → void;
+  abstract method method4a<CT4a extends core::Object? = dynamic>(self::C::method4a::CT4a% x, covariant-by-class core::num y) → void;
+  abstract method method4b<CT4b extends core::Object? = dynamic>(self::C::method4b::CT4b% x, covariant-by-class core::num y, [dynamic z = #C1]) → void;
   abstract method method5a(invalid-type x, invalid-type y) → void;
   abstract method method5b(core::num x, core::num y, [invalid-type z = #C1]) → void;
   abstract method method6a({core::Object x = #C1, core::num y = #C1}) → void;
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
index e4d23f5..3fe3e9d 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
@@ -146,7 +146,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field self::ClassWithBound::T field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
index e4d23f5..3fe3e9d 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
@@ -146,7 +146,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field self::ClassWithBound::T field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
index 8c2aa2a..c410aaa 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
@@ -138,7 +138,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field self::ClassWithBound::T field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
index 8c2aa2a..c410aaa 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
@@ -138,7 +138,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field self::ClassWithBound::T field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value as{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
index f4b8262..7045d9b 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
@@ -11,7 +11,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field core::bool field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
index f4b8262..7045d9b 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
@@ -11,7 +11,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field core::bool field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
index 3391fa7..c7c169f 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
@@ -11,7 +11,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field core::bool field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
index 3391fa7..c7c169f 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
@@ -11,7 +11,7 @@
 class ClassWithBound<T extends core::num> extends core::Object /*hasConstConstructor*/  {
   final field core::bool field;
   const constructor •() → self::ClassWithBound<self::ClassWithBound::T>
-    : self::ClassWithBound::field = (#C1) is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
+    : self::ClassWithBound::field = #C1 is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
     ;
   const constructor withValue(dynamic value) → self::ClassWithBound<self::ClassWithBound::T>
     : self::ClassWithBound::field = value is{ForNonNullableByDefault} self::ClassWithBound::T, super core::Object::•()
diff --git a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.expect
index a39f6c2..f8836ef 100644
--- a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.expect
@@ -30,11 +30,11 @@
   late field core::int? lz;
   field core::int lv;
   field core::int lu;
-  generic-covariant-impl field self::A::T% lt = null;
-  generic-covariant-impl field self::A::T? ls = null;
-  late generic-covariant-impl field self::A::T% lr;
-  generic-covariant-impl field self::A::T% lp;
-  generic-covariant-impl field self::A::T% lq;
+  covariant-by-class field self::A::T% lt = null;
+  covariant-by-class field self::A::T? ls = null;
+  late covariant-by-class field self::A::T% lr;
+  covariant-by-class field self::A::T% lp;
+  covariant-by-class field self::A::T% lq;
   constructor •(core::int lv, self::A::T% lp, self::A::T% t) → self::A<self::A::T%>
     : self::A::lv = lv, self::A::lp = lp, self::A::lu = 42, self::A::lq = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.transformed.expect
index a39f6c2..f8836ef 100644
--- a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.strong.transformed.expect
@@ -30,11 +30,11 @@
   late field core::int? lz;
   field core::int lv;
   field core::int lu;
-  generic-covariant-impl field self::A::T% lt = null;
-  generic-covariant-impl field self::A::T? ls = null;
-  late generic-covariant-impl field self::A::T% lr;
-  generic-covariant-impl field self::A::T% lp;
-  generic-covariant-impl field self::A::T% lq;
+  covariant-by-class field self::A::T% lt = null;
+  covariant-by-class field self::A::T? ls = null;
+  late covariant-by-class field self::A::T% lr;
+  covariant-by-class field self::A::T% lp;
+  covariant-by-class field self::A::T% lq;
   constructor •(core::int lv, self::A::T% lp, self::A::T% t) → self::A<self::A::T%>
     : self::A::lv = lv, self::A::lp = lp, self::A::lu = 42, self::A::lq = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.expect
index a39f6c2..f8836ef 100644
--- a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.expect
@@ -30,11 +30,11 @@
   late field core::int? lz;
   field core::int lv;
   field core::int lu;
-  generic-covariant-impl field self::A::T% lt = null;
-  generic-covariant-impl field self::A::T? ls = null;
-  late generic-covariant-impl field self::A::T% lr;
-  generic-covariant-impl field self::A::T% lp;
-  generic-covariant-impl field self::A::T% lq;
+  covariant-by-class field self::A::T% lt = null;
+  covariant-by-class field self::A::T? ls = null;
+  late covariant-by-class field self::A::T% lr;
+  covariant-by-class field self::A::T% lp;
+  covariant-by-class field self::A::T% lq;
   constructor •(core::int lv, self::A::T% lp, self::A::T% t) → self::A<self::A::T%>
     : self::A::lv = lv, self::A::lp = lp, self::A::lu = 42, self::A::lq = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.outline.expect
index 088b4c8..1b2c0f3 100644
--- a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.outline.expect
@@ -22,11 +22,11 @@
   late field core::int? lz;
   field core::int lv;
   field core::int lu;
-  generic-covariant-impl field self::A::T% lt;
-  generic-covariant-impl field self::A::T? ls;
-  late generic-covariant-impl field self::A::T% lr;
-  generic-covariant-impl field self::A::T% lp;
-  generic-covariant-impl field self::A::T% lq;
+  covariant-by-class field self::A::T% lt;
+  covariant-by-class field self::A::T? ls;
+  late covariant-by-class field self::A::T% lr;
+  covariant-by-class field self::A::T% lp;
+  covariant-by-class field self::A::T% lq;
   constructor •(core::int lv, self::A::T% lp, self::A::T% t) → self::A<self::A::T%>
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.transformed.expect
index a39f6c2..f8836ef 100644
--- a/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart.weak.transformed.expect
@@ -30,11 +30,11 @@
   late field core::int? lz;
   field core::int lv;
   field core::int lu;
-  generic-covariant-impl field self::A::T% lt = null;
-  generic-covariant-impl field self::A::T? ls = null;
-  late generic-covariant-impl field self::A::T% lr;
-  generic-covariant-impl field self::A::T% lp;
-  generic-covariant-impl field self::A::T% lq;
+  covariant-by-class field self::A::T% lt = null;
+  covariant-by-class field self::A::T? ls = null;
+  late covariant-by-class field self::A::T% lr;
+  covariant-by-class field self::A::T% lp;
+  covariant-by-class field self::A::T% lq;
   constructor •(core::int lv, self::A::T% lp, self::A::T% t) → self::A<self::A::T%>
     : self::A::lv = lv, self::A::lp = lp, self::A::lu = 42, self::A::lq = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect
index 987bcb5..42b09ab8 100644
--- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect
@@ -129,8 +129,8 @@
   synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
     : super core::Object::•()
     ;
-  abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
-  abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
+  abstract operator [](covariant-by-class self::Map::K% index) → self::Map::V%;
+  abstract operator []=(covariant-by-class self::Map::K% index, covariant-by-class self::Map::V% value) → void;
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect
index 987bcb5..42b09ab8 100644
--- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect
@@ -129,8 +129,8 @@
   synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
     : super core::Object::•()
     ;
-  abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
-  abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
+  abstract operator [](covariant-by-class self::Map::K% index) → self::Map::V%;
+  abstract operator []=(covariant-by-class self::Map::K% index, covariant-by-class self::Map::V% value) → void;
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect
index 987bcb5..42b09ab8 100644
--- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect
@@ -129,8 +129,8 @@
   synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
     : super core::Object::•()
     ;
-  abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
-  abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
+  abstract operator [](covariant-by-class self::Map::K% index) → self::Map::V%;
+  abstract operator []=(covariant-by-class self::Map::K% index, covariant-by-class self::Map::V% value) → void;
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.outline.expect
index f44d475..6748594 100644
--- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.outline.expect
@@ -5,8 +5,8 @@
 abstract class Map<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
     ;
-  abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
-  abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
+  abstract operator [](covariant-by-class self::Map::K% index) → self::Map::V%;
+  abstract operator []=(covariant-by-class self::Map::K% index, covariant-by-class self::Map::V% value) → void;
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect
index 987bcb5..42b09ab8 100644
--- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect
@@ -129,8 +129,8 @@
   synthetic constructor •() → self::Map<self::Map::K%, self::Map::V%>
     : super core::Object::•()
     ;
-  abstract operator [](generic-covariant-impl self::Map::K% index) → self::Map::V%;
-  abstract operator []=(generic-covariant-impl self::Map::K% index, generic-covariant-impl self::Map::V% value) → void;
+  abstract operator [](covariant-by-class self::Map::K% index) → self::Map::V%;
+  abstract operator []=(covariant-by-class self::Map::K% index, covariant-by-class self::Map::V% value) → void;
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.expect
index bac2c56..1062bac 100644
--- a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _current = null;
+  covariant-by-class field self::A::T? _current = null;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.transformed.expect
index 11d4db7..1c842e3 100644
--- a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.strong.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _current = null;
+  covariant-by-class field self::A::T? _current = null;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.expect
index bac2c56..1062bac 100644
--- a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _current = null;
+  covariant-by-class field self::A::T? _current = null;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.outline.expect
index 82c894b..460f50d 100644
--- a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _current;
+  covariant-by-class field self::A::T? _current;
   synthetic constructor •() → self::A<self::A::T%>
     ;
   get current() → self::A::T%
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.transformed.expect
index 85eb6b6..9a16943 100644
--- a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::A::T? _current = null;
+  covariant-by-class field self::A::T? _current = null;
   synthetic constructor •() → self::A<self::A::T%>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd/required.dart.strong.expect b/pkg/front_end/testcases/nnbd/required.dart.strong.expect
index dfe4abf..ccce283 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.strong.expect
@@ -59,7 +59,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant final core::int d = #C2}) → dynamic {}
+  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant-by-declaration final core::int d = #C2}) → dynamic {}
 }
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
diff --git a/pkg/front_end/testcases/nnbd/required.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/required.dart.strong.transformed.expect
index dfe4abf..ccce283 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.strong.transformed.expect
@@ -59,7 +59,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant final core::int d = #C2}) → dynamic {}
+  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant-by-declaration final core::int d = #C2}) → dynamic {}
 }
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
diff --git a/pkg/front_end/testcases/nnbd/required.dart.weak.expect b/pkg/front_end/testcases/nnbd/required.dart.weak.expect
index dfe4abf..ccce283 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.weak.expect
@@ -59,7 +59,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant final core::int d = #C2}) → dynamic {}
+  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant-by-declaration final core::int d = #C2}) → dynamic {}
 }
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
diff --git a/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
index f5a1db6..c961e36 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.weak.outline.expect
@@ -15,7 +15,7 @@
 class Class extends core::Object {
   synthetic constructor •() → self::Class
     ;
-  method method({core::int a = 42, required core::int b, required final core::int c, required covariant final core::int d}) → dynamic
+  method method({core::int a = 42, required core::int b, required final core::int c, required covariant-by-declaration final core::int d}) → dynamic
     ;
 }
 abstract class A extends core::Object {
diff --git a/pkg/front_end/testcases/nnbd/required.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/required.dart.weak.transformed.expect
index dfe4abf..ccce283 100644
--- a/pkg/front_end/testcases/nnbd/required.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/required.dart.weak.transformed.expect
@@ -59,7 +59,7 @@
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant final core::int d = #C2}) → dynamic {}
+  method method({core::int a = #C1, required core::int b = #C2, required final core::int c = #C2, required covariant-by-declaration final core::int d = #C2}) → dynamic {}
 }
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
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 a6d8695..79d95f1 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect
@@ -58,17 +58,15 @@
 
 import "dart:async";
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum a = #C3;
   static const field self::Enum b = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method returnImplicit() → core::String {
   core::print("foo");
@@ -223,10 +221,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.a"
+  #C2 = "a"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.b"
+  #C5 = "b"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum>[#C3, #C6]
 }
@@ -235,4 +233,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///return_null.dart:
 - Enum. (from org-dartlang-testcase:///return_null.dart:43:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
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 027a6aa..d7034897 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
@@ -58,17 +58,15 @@
 
 import "dart:async";
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum a = #C3;
   static const field self::Enum b = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method returnImplicit() → core::String {
   core::print("foo");
@@ -621,10 +619,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.a"
+  #C2 = "a"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.b"
+  #C5 = "b"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum>[#C3, #C6]
 }
@@ -633,4 +631,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///return_null.dart:
 - Enum. (from org-dartlang-testcase:///return_null.dart:43:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
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 cb0d622..8c3d6c3 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect
@@ -59,17 +59,15 @@
 
 import "dart:async";
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum a = #C3;
   static const field self::Enum b = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method returnImplicit() → core::String {
   core::print("foo");
@@ -230,10 +228,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.a"
+  #C2 = "a"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.b"
+  #C5 = "b"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum*>[#C3, #C6]
 }
@@ -242,4 +240,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///return_null.dart:
 - Enum. (from org-dartlang-testcase:///return_null.dart:43:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/return_null.dart.weak.outline.expect
index 29d9ba1..39ab74e 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.weak.outline.expect
@@ -5,17 +5,15 @@
 
 import "dart:async";
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = const <self::Enum>[self::Enum::a, self::Enum::b];
-  static const field self::Enum a = const self::Enum::•(0, "Enum.a");
-  static const field self::Enum b = const self::Enum::•(1, "Enum.b");
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  static const field self::Enum a = const self::Enum::•(0, "a");
+  static const field self::Enum b = const self::Enum::•(1, "b");
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method returnImplicit() → core::String
   ;
@@ -52,7 +50,7 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///return_null.dart:43:6 -> ListConstant(const <Enum*>[const Enum{Enum.index: 0, Enum._name: "Enum.a"}, const Enum{Enum.index: 1, Enum._name: "Enum.b"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:13 -> InstanceConstant(const Enum{Enum.index: 0, Enum._name: "Enum.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:16 -> InstanceConstant(const Enum{Enum.index: 1, Enum._name: "Enum.b"})
-Extra constant evaluation: evaluated: 7, effectively constant: 3
+Evaluated: ListLiteral @ org-dartlang-testcase:///return_null.dart:43:6 -> ListConstant(const <Enum*>[const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:16 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "b"})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
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 96616e8..7f20e82 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
@@ -59,17 +59,15 @@
 
 import "dart:async";
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum a = #C3;
   static const field self::Enum b = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method returnImplicit() → core::String {
   core::print("foo");
@@ -628,10 +626,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.a"
+  #C2 = "a"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.b"
+  #C5 = "b"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum*>[#C3, #C6]
 }
@@ -640,4 +638,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///return_null.dart:
 - Enum. (from org-dartlang-testcase:///return_null.dart:43:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.expect b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.expect
index 7dda588..b06ed29 100644
--- a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::S>
     : super core::Object::•()
     ;
-  method hest<generic-covariant-impl X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
+  method hest<covariant-by-class X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
     return null;
-  method fisk<generic-covariant-impl X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
+  method fisk<covariant-by-class X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
     return null;
   method mus<X extends core::Object?, Y extends core::List<self::A::mus::X%> = core::List<core::Object?>, Z extends core::List<self::A::mus::X?> = core::List<core::Object?>>() → dynamic
     return null;
diff --git a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.transformed.expect
index 7dda588..b06ed29 100644
--- a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.strong.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::S>
     : super core::Object::•()
     ;
-  method hest<generic-covariant-impl X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
+  method hest<covariant-by-class X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
     return null;
-  method fisk<generic-covariant-impl X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
+  method fisk<covariant-by-class X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
     return null;
   method mus<X extends core::Object?, Y extends core::List<self::A::mus::X%> = core::List<core::Object?>, Z extends core::List<self::A::mus::X?> = core::List<core::Object?>>() → dynamic
     return null;
diff --git a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.expect b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.expect
index 7dda588..b06ed29 100644
--- a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::S>
     : super core::Object::•()
     ;
-  method hest<generic-covariant-impl X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
+  method hest<covariant-by-class X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
     return null;
-  method fisk<generic-covariant-impl X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
+  method fisk<covariant-by-class X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
     return null;
   method mus<X extends core::Object?, Y extends core::List<self::A::mus::X%> = core::List<core::Object?>, Z extends core::List<self::A::mus::X?> = core::List<core::Object?>>() → dynamic
     return null;
diff --git a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.outline.expect
index 091ebb6..a422ecf 100644
--- a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.outline.expect
@@ -5,9 +5,9 @@
 class A<T extends core::Object?, S extends core::Object> extends core::Object {
   synthetic constructor •() → self::A<self::A::T%, self::A::S>
     ;
-  method hest<generic-covariant-impl X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
+  method hest<covariant-by-class X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
     ;
-  method fisk<generic-covariant-impl X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
+  method fisk<covariant-by-class X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
     ;
   method mus<X extends core::Object?, Y extends core::List<self::A::mus::X%> = core::List<core::Object?>, Z extends core::List<self::A::mus::X?> = core::List<core::Object?>>() → dynamic
     ;
diff --git a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.transformed.expect
index 7dda588..b06ed29 100644
--- a/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/substitution_in_inference.dart.weak.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::S>
     : super core::Object::•()
     ;
-  method hest<generic-covariant-impl X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
+  method hest<covariant-by-class X extends self::A::T%, Y extends core::List<self::A::hest::X%> = core::List<self::A::T%>, Z extends core::List<self::A::hest::X?> = core::List<self::A::T?>>() → dynamic
     return null;
-  method fisk<generic-covariant-impl X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
+  method fisk<covariant-by-class X extends self::A::S, Y extends core::List<self::A::fisk::X> = core::List<self::A::S>, Z extends core::List<self::A::fisk::X?> = core::List<self::A::S?>>() → dynamic
     return null;
   method mus<X extends core::Object?, Y extends core::List<self::A::mus::X%> = core::List<core::Object?>, Z extends core::List<self::A::mus::X?> = core::List<core::Object?>>() → dynamic
     return null;
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect
index 199a6cb..c152a0b 100644
--- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect
@@ -9,17 +9,15 @@
 import self as self;
 import "dart:core" as core;
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum e1 = #C3;
   static const field self::Enum e2 = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method method1(self::Enum? e) → core::int {
   switch(e) {
@@ -102,10 +100,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.e1"
+  #C2 = "e1"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.e2"
+  #C5 = "e2"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum>[#C3, #C6]
   #C8 = null
@@ -115,4 +113,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///switch_nullable_enum.dart:
 - Enum. (from org-dartlang-testcase:///switch_nullable_enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect
index 199a6cb..c152a0b 100644
--- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect
@@ -9,17 +9,15 @@
 import self as self;
 import "dart:core" as core;
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum e1 = #C3;
   static const field self::Enum e2 = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method method1(self::Enum? e) → core::int {
   switch(e) {
@@ -102,10 +100,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.e1"
+  #C2 = "e1"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.e2"
+  #C5 = "e2"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum>[#C3, #C6]
   #C8 = null
@@ -115,4 +113,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///switch_nullable_enum.dart:
 - Enum. (from org-dartlang-testcase:///switch_nullable_enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect
index f73e2a7..da9cc12 100644
--- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect
@@ -10,17 +10,15 @@
 import "dart:core" as core;
 import "dart:_internal" as _in;
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum e1 = #C3;
   static const field self::Enum e2 = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method method1(self::Enum? e) → core::int {
   switch(e) {
@@ -106,10 +104,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.e1"
+  #C2 = "e1"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.e2"
+  #C5 = "e2"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum*>[#C3, #C6]
   #C8 = null
@@ -119,4 +117,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///switch_nullable_enum.dart:
 - Enum. (from org-dartlang-testcase:///switch_nullable_enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.outline.expect
index ed400bb..0c365ed 100644
--- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.outline.expect
@@ -2,17 +2,15 @@
 import self as self;
 import "dart:core" as core;
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = const <self::Enum>[self::Enum::e1, self::Enum::e2];
-  static const field self::Enum e1 = const self::Enum::•(0, "Enum.e1");
-  static const field self::Enum e2 = const self::Enum::•(1, "Enum.e2");
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  static const field self::Enum e1 = const self::Enum::•(0, "e1");
+  static const field self::Enum e2 = const self::Enum::•(1, "e2");
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method method1(self::Enum? e) → core::int
   ;
@@ -31,7 +29,7 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///switch_nullable_enum.dart:5:6 -> ListConstant(const <Enum*>[const Enum{Enum.index: 0, Enum._name: "Enum.e1"}, const Enum{Enum.index: 1, Enum._name: "Enum.e2"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:5:13 -> InstanceConstant(const Enum{Enum.index: 0, Enum._name: "Enum.e1"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:5:17 -> InstanceConstant(const Enum{Enum.index: 1, Enum._name: "Enum.e2"})
-Extra constant evaluation: evaluated: 7, effectively constant: 3
+Evaluated: ListLiteral @ org-dartlang-testcase:///switch_nullable_enum.dart:5:6 -> ListConstant(const <Enum*>[const Enum{_Enum.index: 0, _Enum._name: "e1"}, const Enum{_Enum.index: 1, _Enum._name: "e2"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:5:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "e1"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:5:17 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "e2"})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect
index f73e2a7..da9cc12 100644
--- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect
@@ -10,17 +10,15 @@
 import "dart:core" as core;
 import "dart:_internal" as _in;
 
-class Enum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class Enum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Enum> values = #C7;
   static const field self::Enum e1 = #C3;
   static const field self::Enum e2 = #C6;
-  const constructor •(core::int index, core::String _name) → self::Enum
-    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::Enum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::Enum::_name}{core::String};
+    return "Enum.${this.{core::_Enum::_name}{core::String}}";
 }
 static method method1(self::Enum? e) → core::int {
   switch(e) {
@@ -106,10 +104,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Enum.e1"
+  #C2 = "e1"
   #C3 = self::Enum {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Enum.e2"
+  #C5 = "e2"
   #C6 = self::Enum {index:#C4, _name:#C5}
   #C7 = <self::Enum*>[#C3, #C6]
   #C8 = null
@@ -119,4 +117,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///switch_nullable_enum.dart:
 - Enum. (from org-dartlang-testcase:///switch_nullable_enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.expect b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.expect
index 9f2387d..bc5e887 100644
--- a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.expect
@@ -17,19 +17,19 @@
   synthetic constructor •() → self::B<self::B::X, self::B::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::B::X x, generic-covariant-impl self::B::Y% y) → dynamic {}
+  method foo(covariant-by-class self::B::X x, covariant-by-class self::B::Y% y) → dynamic {}
 }
 class C<X extends core::List<self::C::Y%>? = core::List<dynamic>?, Y extends core::List<self::C::X%>? = core::List<dynamic>?> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → dynamic {}
+  method foo(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → dynamic {}
 }
 class D<X extends self::D::Y% = dynamic, Y extends self::D::Z% = dynamic, Z extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::X%, self::D::Y%, self::D::Z%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::D::X% x, generic-covariant-impl self::D::Y% y, generic-covariant-impl self::D::Z% z) → dynamic {}
+  method foo(covariant-by-class self::D::X% x, covariant-by-class self::D::Y% y, covariant-by-class self::D::Z% z) → dynamic {}
 }
 static method never() → Never
   return throw "Never";
diff --git a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.transformed.expect
index 9f2387d..bc5e887 100644
--- a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.strong.transformed.expect
@@ -17,19 +17,19 @@
   synthetic constructor •() → self::B<self::B::X, self::B::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::B::X x, generic-covariant-impl self::B::Y% y) → dynamic {}
+  method foo(covariant-by-class self::B::X x, covariant-by-class self::B::Y% y) → dynamic {}
 }
 class C<X extends core::List<self::C::Y%>? = core::List<dynamic>?, Y extends core::List<self::C::X%>? = core::List<dynamic>?> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → dynamic {}
+  method foo(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → dynamic {}
 }
 class D<X extends self::D::Y% = dynamic, Y extends self::D::Z% = dynamic, Z extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::X%, self::D::Y%, self::D::Z%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::D::X% x, generic-covariant-impl self::D::Y% y, generic-covariant-impl self::D::Z% z) → dynamic {}
+  method foo(covariant-by-class self::D::X% x, covariant-by-class self::D::Y% y, covariant-by-class self::D::Z% z) → dynamic {}
 }
 static method never() → Never
   return throw "Never";
diff --git a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.expect b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.expect
index 5992af3..220ce86 100644
--- a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.expect
@@ -18,19 +18,19 @@
   synthetic constructor •() → self::B<self::B::X, self::B::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::B::X x, generic-covariant-impl self::B::Y% y) → dynamic {}
+  method foo(covariant-by-class self::B::X x, covariant-by-class self::B::Y% y) → dynamic {}
 }
 class C<X extends core::List<self::C::Y%>? = core::List<dynamic>?, Y extends core::List<self::C::X%>? = core::List<dynamic>?> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → dynamic {}
+  method foo(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → dynamic {}
 }
 class D<X extends self::D::Y% = dynamic, Y extends self::D::Z% = dynamic, Z extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::X%, self::D::Y%, self::D::Z%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::D::X% x, generic-covariant-impl self::D::Y% y, generic-covariant-impl self::D::Z% z) → dynamic {}
+  method foo(covariant-by-class self::D::X% x, covariant-by-class self::D::Y% y, covariant-by-class self::D::Z% z) → dynamic {}
 }
 static method never() → Never
   return throw "Never";
diff --git a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.outline.expect
index e50ba48..2d034c8 100644
--- a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.outline.expect
@@ -15,19 +15,19 @@
 class B<X extends core::List<self::B::Y%> = core::List<core::Object?>, Y extends core::Object?> extends core::Object {
   synthetic constructor •() → self::B<self::B::X, self::B::Y%>
     ;
-  method foo(generic-covariant-impl self::B::X x, generic-covariant-impl self::B::Y% y) → dynamic
+  method foo(covariant-by-class self::B::X x, covariant-by-class self::B::Y% y) → dynamic
     ;
 }
 class C<X extends core::List<self::C::Y%>? = core::List<dynamic>?, Y extends core::List<self::C::X%>? = core::List<dynamic>?> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y%>
     ;
-  method foo(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → dynamic
+  method foo(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → dynamic
     ;
 }
 class D<X extends self::D::Y% = dynamic, Y extends self::D::Z% = dynamic, Z extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::X%, self::D::Y%, self::D::Z%>
     ;
-  method foo(generic-covariant-impl self::D::X% x, generic-covariant-impl self::D::Y% y, generic-covariant-impl self::D::Z% z) → dynamic
+  method foo(covariant-by-class self::D::X% x, covariant-by-class self::D::Y% y, covariant-by-class self::D::Z% z) → dynamic
     ;
 }
 static method never() → Never
diff --git a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.transformed.expect
index 5992af3..220ce86 100644
--- a/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/type_parameter_types.dart.weak.transformed.expect
@@ -18,19 +18,19 @@
   synthetic constructor •() → self::B<self::B::X, self::B::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::B::X x, generic-covariant-impl self::B::Y% y) → dynamic {}
+  method foo(covariant-by-class self::B::X x, covariant-by-class self::B::Y% y) → dynamic {}
 }
 class C<X extends core::List<self::C::Y%>? = core::List<dynamic>?, Y extends core::List<self::C::X%>? = core::List<dynamic>?> extends core::Object {
   synthetic constructor •() → self::C<self::C::X%, self::C::Y%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::C::X% x, generic-covariant-impl self::C::Y% y) → dynamic {}
+  method foo(covariant-by-class self::C::X% x, covariant-by-class self::C::Y% y) → dynamic {}
 }
 class D<X extends self::D::Y% = dynamic, Y extends self::D::Z% = dynamic, Z extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::X%, self::D::Y%, self::D::Z%>
     : super core::Object::•()
     ;
-  method foo(generic-covariant-impl self::D::X% x, generic-covariant-impl self::D::Y% y, generic-covariant-impl self::D::Z% z) → dynamic {}
+  method foo(covariant-by-class self::D::X% x, covariant-by-class self::D::Y% y, covariant-by-class self::D::Z% z) → dynamic {}
 }
 static method never() → Never
   return throw "Never";
diff --git a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
index b684e03a..001ca03 100644
--- a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
@@ -5,9 +5,9 @@
 import "org-dartlang-testcase:///const_is_lib.dart";
 
 static method main() → dynamic {
-  self::expect(true, (#C1) is{ForNonNullableByDefault} <T extends core::Object?>() → void);
+  self::expect(true, #C1 is{ForNonNullableByDefault} <T extends core::Object?>() → void);
   self::expect(true, #C2);
-  self::expect(true, (#C3) is{ForNonNullableByDefault} <T extends Never = dynamic>() → void);
+  self::expect(true, #C3 is{ForNonNullableByDefault} <T extends Never = dynamic>() → void);
   self::expect(true, #C2);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
diff --git a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
index 37ae0a7..8a2bdff 100644
--- a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
@@ -5,9 +5,9 @@
 import "org-dartlang-testcase:///const_is_lib.dart";
 
 static method main() → dynamic {
-  self::expect(true, (#C1) is{ForNonNullableByDefault} <T extends core::Object?>() → void);
+  self::expect(true, #C1 is{ForNonNullableByDefault} <T extends core::Object?>() → void);
   self::expect(true, #C2);
-  self::expect(true, (#C3) is{ForNonNullableByDefault} <T extends Never = dynamic>() → void);
+  self::expect(true, #C3 is{ForNonNullableByDefault} <T extends Never = dynamic>() → void);
   self::expect(true, #C2);
 }
 static method expect(dynamic expected, dynamic actual) → dynamic {
diff --git a/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.expect
index 991d33b..69b11ec 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.expect
@@ -21,7 +21,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -61,21 +61,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
   con::test();
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
@@ -104,14 +104,14 @@
 static method test() → dynamic {
   self::expect(null is core::int*, #C3, "null is int (opt-out)");
   self::expect(null is Null, #C2, "null is Null");
-  self::expect(new self::Class::constructor1<core::int*>(null).{self::Class::field}{core::bool*}, (#C4).{self::Class::field}{core::bool*}, "Class<int>.constructor1(null).field (opt-out)");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor1(null).field (opt-out)");
-  self::expect(new self::Class::constructor2<core::int*>(null).{self::Class::field}{core::bool*}, (#C7).{self::Class::field}{core::bool*}, "Class<int>.constructor2(null).field (opt-out)");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor2(null).field (opt-out)");
-  self::expect(new self::Class::constructor3<core::int*>(null).{self::Class::field}{core::bool*}, (#C4).{self::Class::field}{core::bool*}, "Class<int>.constructor3(null).field (opt-out)");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool*}, (#C10).{self::Class::field}{core::bool*}, "Class<Null>.constructor3(null).field (opt-out)");
-  self::expect(new self::Class::constructor4<core::int*>(null).{self::Class::field}{core::bool*}, (#C7).{self::Class::field}{core::bool*}, "Class<int>.constructor4(null).field (opt-out)");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor4(null).field (opt-out)");
+  self::expect(new self::Class::constructor1<core::int*>(null).{self::Class::field}{core::bool*}, #C4.{self::Class::field}{core::bool*}, "Class<int>.constructor1(null).field (opt-out)");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor1(null).field (opt-out)");
+  self::expect(new self::Class::constructor2<core::int*>(null).{self::Class::field}{core::bool*}, #C7.{self::Class::field}{core::bool*}, "Class<int>.constructor2(null).field (opt-out)");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor2(null).field (opt-out)");
+  self::expect(new self::Class::constructor3<core::int*>(null).{self::Class::field}{core::bool*}, #C4.{self::Class::field}{core::bool*}, "Class<int>.constructor3(null).field (opt-out)");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool*}, #C10.{self::Class::field}{core::bool*}, "Class<Null>.constructor3(null).field (opt-out)");
+  self::expect(new self::Class::constructor4<core::int*>(null).{self::Class::field}{core::bool*}, #C7.{self::Class::field}{core::bool*}, "Class<int>.constructor4(null).field (opt-out)");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor4(null).field (opt-out)");
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.transformed.expect
index 10a3c61..78c4958 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constant_null_is.dart.weak.transformed.expect
@@ -21,7 +21,7 @@
     : self::Class::field = value is{ForNonNullableByDefault} self::Class<self::Class::T%>?, super core::Object::•()
     ;
 }
-static final field core::bool isWeakMode = (#C1) is{ForNonNullableByDefault} core::List<core::Object>;
+static final field core::bool isWeakMode = #C1 is{ForNonNullableByDefault} core::List<core::Object>;
 static const field core::bool c0 = #C2;
 static const field core::bool c1 = #C3;
 static const field core::bool c2 = #C2;
@@ -61,21 +61,21 @@
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>, #C3, "null is FutureOr<Never>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never?>, #C2, "null is FutureOr<Never?>");
   self::expect(null is{ForNonNullableByDefault} FutureOr<Never>?, #C2, "null is FutureOr<Never>?");
-  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
+  self::expect(new self::Class::constructor1<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor1(null).field");
   self::expect(true, new self::Class::constructor1<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor1(null).field");
-  self::expect(self::isWeakMode, (#C5).{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
-  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
+  self::expect(self::isWeakMode, #C5.{self::Class::field}{core::bool}, "const Class<List<int>>.constructor1(<Null>[null]).field");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor1(null).field");
+  self::expect(new self::Class::constructor2<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor2(null).field");
   self::expect(true, new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, "new Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
-  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, (#C4).{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, (#C9).{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, (#C10).{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
-  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, (#C7).{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, (#C8).{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, (#C6).{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
+  self::expect(new self::Class::constructor2<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor2(null).field");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor2(null).field");
+  self::expect(new self::Class::constructor3<core::int>(null).{self::Class::field}{core::bool}, #C4.{self::Class::field}{core::bool}, "Class<int>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<core::int?>(null).{self::Class::field}{core::bool}, #C9.{self::Class::field}{core::bool}, "Class<int?>.constructor3(null).field");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool}, #C10.{self::Class::field}{core::bool}, "Class<Null>.constructor3(null).field");
+  self::expect(new self::Class::constructor4<core::int>(null).{self::Class::field}{core::bool}, #C7.{self::Class::field}{core::bool}, "Class<int>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<core::int?>(null).{self::Class::field}{core::bool}, #C8.{self::Class::field}{core::bool}, "Class<int?>.constructor4(null).field");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool}, #C6.{self::Class::field}{core::bool}, "Class<Null>.constructor4(null).field");
   con::test();
 }
 static method expect(dynamic expected, dynamic actual, core::String message) → dynamic {
@@ -104,14 +104,14 @@
 static method test() → dynamic {
   self::expect(null is core::int*, #C3, "null is int (opt-out)");
   self::expect(null is Null, #C2, "null is Null");
-  self::expect(new self::Class::constructor1<core::int*>(null).{self::Class::field}{core::bool*}, (#C4).{self::Class::field}{core::bool*}, "Class<int>.constructor1(null).field (opt-out)");
-  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor1(null).field (opt-out)");
-  self::expect(new self::Class::constructor2<core::int*>(null).{self::Class::field}{core::bool*}, (#C7).{self::Class::field}{core::bool*}, "Class<int>.constructor2(null).field (opt-out)");
-  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor2(null).field (opt-out)");
-  self::expect(new self::Class::constructor3<core::int*>(null).{self::Class::field}{core::bool*}, (#C4).{self::Class::field}{core::bool*}, "Class<int>.constructor3(null).field (opt-out)");
-  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool*}, (#C10).{self::Class::field}{core::bool*}, "Class<Null>.constructor3(null).field (opt-out)");
-  self::expect(new self::Class::constructor4<core::int*>(null).{self::Class::field}{core::bool*}, (#C7).{self::Class::field}{core::bool*}, "Class<int>.constructor4(null).field (opt-out)");
-  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool*}, (#C6).{self::Class::field}{core::bool*}, "Class<Null>.constructor4(null).field (opt-out)");
+  self::expect(new self::Class::constructor1<core::int*>(null).{self::Class::field}{core::bool*}, #C4.{self::Class::field}{core::bool*}, "Class<int>.constructor1(null).field (opt-out)");
+  self::expect(new self::Class::constructor1<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor1(null).field (opt-out)");
+  self::expect(new self::Class::constructor2<core::int*>(null).{self::Class::field}{core::bool*}, #C7.{self::Class::field}{core::bool*}, "Class<int>.constructor2(null).field (opt-out)");
+  self::expect(new self::Class::constructor2<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor2(null).field (opt-out)");
+  self::expect(new self::Class::constructor3<core::int*>(null).{self::Class::field}{core::bool*}, #C4.{self::Class::field}{core::bool*}, "Class<int>.constructor3(null).field (opt-out)");
+  self::expect(new self::Class::constructor3<Null>(null).{self::Class::field}{core::bool*}, #C10.{self::Class::field}{core::bool*}, "Class<Null>.constructor3(null).field (opt-out)");
+  self::expect(new self::Class::constructor4<core::int*>(null).{self::Class::field}{core::bool*}, #C7.{self::Class::field}{core::bool*}, "Class<int>.constructor4(null).field (opt-out)");
+  self::expect(new self::Class::constructor4<Null>(null).{self::Class::field}{core::bool*}, #C6.{self::Class::field}{core::bool*}, "Class<Null>.constructor4(null).field (opt-out)");
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
index fc18272..b504950 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
@@ -8,36 +8,36 @@
 static const field (core::int) → core::int partialInstantiation = #C2;
 static const field con::Class<core::int> instance = #C4;
 static const field core::List<core::int> listLiteral = #C5;
-static const field core::Set<core::int> setLiteral = #C9;
-static const field core::Map<core::int, core::String> mapLiteral = #C12;
+static const field core::Set<core::int> setLiteral = #C6;
+static const field core::Map<core::int, core::String> mapLiteral = #C8;
 static const field core::List<core::int> listConcatenation = #C5;
-static const field core::Set<core::int> setConcatenation = #C9;
-static const field core::Map<core::int, core::String> mapConcatenation = #C12;
-static const field core::bool partialInstantiationIdentical = #C13;
-static const field core::bool instanceIdentical = #C13;
-static const field core::bool listLiteralIdentical = #C13;
-static const field core::bool setLiteralIdentical = #C13;
-static const field core::bool mapLiteralIdentical = #C13;
-static const field core::bool listConcatenationIdentical = #C13;
-static const field core::bool setConcatenationIdentical = #C13;
-static const field core::bool mapConcatenationIdentical = #C13;
+static const field core::Set<core::int> setConcatenation = #C6;
+static const field core::Map<core::int, core::String> mapConcatenation = #C8;
+static const field core::bool partialInstantiationIdentical = #C9;
+static const field core::bool instanceIdentical = #C9;
+static const field core::bool listLiteralIdentical = #C9;
+static const field core::bool setLiteralIdentical = #C9;
+static const field core::bool mapLiteralIdentical = #C9;
+static const field core::bool listConcatenationIdentical = #C9;
+static const field core::bool setConcatenationIdentical = #C9;
+static const field core::bool mapConcatenationIdentical = #C9;
 static method main() → dynamic {
   self::test(#C2, #C2);
   self::test(#C4, #C4);
   self::test(#C5, #C5);
-  self::test(#C9, #C9);
-  self::test(#C12, #C12);
+  self::test(#C6, #C6);
+  self::test(#C8, #C8);
   self::test(#C5, #C5);
-  self::test(#C9, #C9);
-  self::test(#C12, #C12);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
+  self::test(#C6, #C6);
+  self::test(#C8, #C8);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -68,15 +68,15 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-static const field (core::Object*, core::Object*) →* core::bool* c2 = #C14;
+static const field (core::Object*, core::Object*) →* core::bool* c2 = #C10;
 static const field (core::int*) →* core::int* partialInstantiation = #C2;
 static const field con::Class<core::int*>* instance = #C4;
 static const field core::List<core::int*>* listLiteral = #C5;
-static const field core::Set<core::int*>* setLiteral = #C9;
-static const field core::Map<core::int*, core::String*>* mapLiteral = #C12;
+static const field core::Set<core::int*>* setLiteral = #C6;
+static const field core::Map<core::int*, core::String*>* mapLiteral = #C8;
 static const field core::List<core::int*>* listConcatenation = #C5;
-static const field core::Set<core::int*>* setConcatenation = #C9;
-static const field core::Map<core::int*, core::String*>* mapConcatenation = #C12;
+static const field core::Set<core::int*>* setConcatenation = #C6;
+static const field core::Map<core::int*, core::String*>* mapConcatenation = #C8;
 static method id<T extends core::Object* = dynamic>(con::id::T* t) → con::id::T*
   return t;
 
@@ -86,15 +86,11 @@
   #C3 = 0
   #C4 = con::Class<core::int*> {field:#C3}
   #C5 = <core::int*>[#C3]
-  #C6 = null
-  #C7 = <dynamic>[#C3, #C6]
-  #C8 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C7}
-  #C9 = col::_UnmodifiableSet<core::int*> {_map:#C8}
-  #C10 = "foo"
-  #C11 = <dynamic>[#C3, #C10]
-  #C12 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C11}
-  #C13 = true
-  #C14 = static-tearoff core::identical
+  #C6 = <core::int*>{#C3}
+  #C7 = "foo"
+  #C8 = <core::int*, core::String*>{#C3:#C7)
+  #C9 = true
+  #C10 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.outline.expect
index 6e8783d..9db53e6 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.outline.expect
@@ -65,11 +65,11 @@
 Evaluated: Instantiation @ org-dartlang-testcase:///constants.dart:7:52 -> InstantiationConstant(id<int*>)
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///constants.dart:8:24 -> InstanceConstant(const Class<int*>{Class.field: 0})
 Evaluated: ListLiteral @ org-dartlang-testcase:///constants.dart:9:26 -> ListConstant(const <int*>[0])
-Evaluated: SetLiteral @ org-dartlang-testcase:///constants.dart:10:25 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapLiteral @ org-dartlang-testcase:///constants.dart:11:33 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetLiteral @ org-dartlang-testcase:///constants.dart:10:25 -> SetConstant(const <int*>{0})
+Evaluated: MapLiteral @ org-dartlang-testcase:///constants.dart:11:33 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: ListConcatenation @ org-dartlang-testcase:///constants.dart:12:32 -> ListConstant(const <int*>[0])
-Evaluated: SetConcatenation @ org-dartlang-testcase:///constants.dart:13:31 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapConcatenation @ org-dartlang-testcase:///constants.dart:14:7 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///constants.dart:13:31 -> SetConstant(const <int*>{0})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///constants.dart:14:7 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:17:5 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:18:27 -> BoolConstant(true)
 Evaluated: StaticInvocation @ org-dartlang-testcase:///constants.dart:19:30 -> BoolConstant(true)
@@ -82,9 +82,9 @@
 Evaluated: Instantiation @ org-dartlang-testcase:///constants_lib.dart:19:48 -> InstantiationConstant(id<int*>)
 Evaluated: ConstructorInvocation @ org-dartlang-testcase:///constants_lib.dart:20:24 -> InstanceConstant(const Class<int*>{Class.field: 0})
 Evaluated: ListLiteral @ org-dartlang-testcase:///constants_lib.dart:21:26 -> ListConstant(const <int*>[0])
-Evaluated: SetLiteral @ org-dartlang-testcase:///constants_lib.dart:22:25 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapLiteral @ org-dartlang-testcase:///constants_lib.dart:23:33 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetLiteral @ org-dartlang-testcase:///constants_lib.dart:22:25 -> SetConstant(const <int*>{0})
+Evaluated: MapLiteral @ org-dartlang-testcase:///constants_lib.dart:23:33 -> MapConstant(const <int*, String*>{0: "foo"})
 Evaluated: ListConcatenation @ org-dartlang-testcase:///constants_lib.dart:24:32 -> ListConstant(const <int*>[0])
-Evaluated: SetConcatenation @ org-dartlang-testcase:///constants_lib.dart:25:31 -> InstanceConstant(const _UnmodifiableSet<int*>{_UnmodifiableSet._map: const _ImmutableMap<int*, Null>{_ImmutableMap._kvPairs: const <dynamic>[0, null]}})
-Evaluated: MapConcatenation @ org-dartlang-testcase:///constants_lib.dart:26:7 -> InstanceConstant(const _ImmutableMap<int*, String*>{_ImmutableMap._kvPairs: const <dynamic>[0, "foo"]})
+Evaluated: SetConcatenation @ org-dartlang-testcase:///constants_lib.dart:25:31 -> SetConstant(const <int*>{0})
+Evaluated: MapConcatenation @ org-dartlang-testcase:///constants_lib.dart:26:7 -> MapConstant(const <int*, String*>{0: "foo"})
 Extra constant evaluation: evaluated: 26, effectively constant: 25
diff --git a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
index fc18272..b504950 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
@@ -8,36 +8,36 @@
 static const field (core::int) → core::int partialInstantiation = #C2;
 static const field con::Class<core::int> instance = #C4;
 static const field core::List<core::int> listLiteral = #C5;
-static const field core::Set<core::int> setLiteral = #C9;
-static const field core::Map<core::int, core::String> mapLiteral = #C12;
+static const field core::Set<core::int> setLiteral = #C6;
+static const field core::Map<core::int, core::String> mapLiteral = #C8;
 static const field core::List<core::int> listConcatenation = #C5;
-static const field core::Set<core::int> setConcatenation = #C9;
-static const field core::Map<core::int, core::String> mapConcatenation = #C12;
-static const field core::bool partialInstantiationIdentical = #C13;
-static const field core::bool instanceIdentical = #C13;
-static const field core::bool listLiteralIdentical = #C13;
-static const field core::bool setLiteralIdentical = #C13;
-static const field core::bool mapLiteralIdentical = #C13;
-static const field core::bool listConcatenationIdentical = #C13;
-static const field core::bool setConcatenationIdentical = #C13;
-static const field core::bool mapConcatenationIdentical = #C13;
+static const field core::Set<core::int> setConcatenation = #C6;
+static const field core::Map<core::int, core::String> mapConcatenation = #C8;
+static const field core::bool partialInstantiationIdentical = #C9;
+static const field core::bool instanceIdentical = #C9;
+static const field core::bool listLiteralIdentical = #C9;
+static const field core::bool setLiteralIdentical = #C9;
+static const field core::bool mapLiteralIdentical = #C9;
+static const field core::bool listConcatenationIdentical = #C9;
+static const field core::bool setConcatenationIdentical = #C9;
+static const field core::bool mapConcatenationIdentical = #C9;
 static method main() → dynamic {
   self::test(#C2, #C2);
   self::test(#C4, #C4);
   self::test(#C5, #C5);
-  self::test(#C9, #C9);
-  self::test(#C12, #C12);
+  self::test(#C6, #C6);
+  self::test(#C8, #C8);
   self::test(#C5, #C5);
-  self::test(#C9, #C9);
-  self::test(#C12, #C12);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
-  self::test(true, #C13);
+  self::test(#C6, #C6);
+  self::test(#C8, #C8);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
+  self::test(true, #C9);
 }
 static method test(dynamic expected, dynamic actual) → dynamic {
   core::print("test(${expected}, ${actual})");
@@ -68,15 +68,15 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
-static const field (core::Object*, core::Object*) →* core::bool* c2 = #C14;
+static const field (core::Object*, core::Object*) →* core::bool* c2 = #C10;
 static const field (core::int*) →* core::int* partialInstantiation = #C2;
 static const field con::Class<core::int*>* instance = #C4;
 static const field core::List<core::int*>* listLiteral = #C5;
-static const field core::Set<core::int*>* setLiteral = #C9;
-static const field core::Map<core::int*, core::String*>* mapLiteral = #C12;
+static const field core::Set<core::int*>* setLiteral = #C6;
+static const field core::Map<core::int*, core::String*>* mapLiteral = #C8;
 static const field core::List<core::int*>* listConcatenation = #C5;
-static const field core::Set<core::int*>* setConcatenation = #C9;
-static const field core::Map<core::int*, core::String*>* mapConcatenation = #C12;
+static const field core::Set<core::int*>* setConcatenation = #C6;
+static const field core::Map<core::int*, core::String*>* mapConcatenation = #C8;
 static method id<T extends core::Object* = dynamic>(con::id::T* t) → con::id::T*
   return t;
 
@@ -86,15 +86,11 @@
   #C3 = 0
   #C4 = con::Class<core::int*> {field:#C3}
   #C5 = <core::int*>[#C3]
-  #C6 = null
-  #C7 = <dynamic>[#C3, #C6]
-  #C8 = core::_ImmutableMap<core::int*, Null> {_kvPairs:#C7}
-  #C9 = col::_UnmodifiableSet<core::int*> {_map:#C8}
-  #C10 = "foo"
-  #C11 = <dynamic>[#C3, #C10]
-  #C12 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C11}
-  #C13 = true
-  #C14 = static-tearoff core::identical
+  #C6 = <core::int*>{#C3}
+  #C7 = "foo"
+  #C8 = <core::int*, core::String*>{#C3:#C7)
+  #C9 = true
+  #C10 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.expect
index 433878f..a18752a 100644
--- a/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::_SubClass&Class&Mixin*
     : super cov::Class::•()
     ;
-  abstract member-signature method covariant(covariant cov::Class* cls) → void; -> cov::Class::covariant
+  abstract member-signature method covariant(covariant-by-declaration cov::Class* cls) → void; -> cov::Class::covariant
   abstract member-signature method invariant(cov::Class* cls) → void; -> cov::Class::invariant
   abstract member-signature method contravariant(cov::Class* cls) → void; -> cov::Class::contravariant
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -40,7 +40,7 @@
   synthetic constructor •() → self::SubClass*
     : super self::_SubClass&Class&Mixin::•()
     ;
-  method covariant(covariant self::SubClass* cls) → void {}
+  method covariant(covariant-by-declaration self::SubClass* cls) → void {}
   method invariant(self::SubClass* cls) → void {}
   method contravariant(core::Object* cls) → void {}
 }
@@ -56,7 +56,7 @@
   synthetic constructor •() → cov::Class
     : super core::Object::•()
     ;
-  abstract method covariant(covariant cov::Class cls) → void;
+  abstract method covariant(covariant-by-declaration cov::Class cls) → void;
   abstract method invariant(cov::Class cls) → void;
   abstract method contravariant(cov::Class cls) → void;
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.outline.expect
index a3f4752..5004c96 100644
--- a/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/covariant_from_opt_in.dart.weak.outline.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::_SubClass&Class&Mixin*
     : super cov::Class::•()
     ;
-  abstract member-signature method covariant(covariant cov::Class* cls) → void; -> cov::Class::covariant
+  abstract member-signature method covariant(covariant-by-declaration cov::Class* cls) → void; -> cov::Class::covariant
   abstract member-signature method invariant(cov::Class* cls) → void; -> cov::Class::invariant
   abstract member-signature method contravariant(cov::Class* cls) → void; -> cov::Class::contravariant
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -39,7 +39,7 @@
 class SubClass extends self::_SubClass&Class&Mixin {
   synthetic constructor •() → self::SubClass*
     ;
-  method covariant(covariant self::SubClass* cls) → void
+  method covariant(covariant-by-declaration self::SubClass* cls) → void
     ;
   method invariant(self::SubClass* cls) → void
     ;
@@ -58,7 +58,7 @@
 abstract class Class extends core::Object {
   synthetic constructor •() → cov::Class
     ;
-  abstract method covariant(covariant cov::Class cls) → void;
+  abstract method covariant(covariant-by-declaration cov::Class cls) → void;
   abstract method invariant(cov::Class cls) → void;
   abstract method contravariant(cov::Class cls) → void;
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.expect
index e60d718..a86bf71 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.expect
@@ -15,8 +15,8 @@
   synthetic constructor •() → self::Interface
     : super core::Object::•()
     ;
-  method extendedConcreteMixedInAbstractImplementedMethod(covariant core::num i) → void {}
-  method extendedConcreteMixedInConcreteImplementedMethod(covariant core::num i) → void {}
+  method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::num i) → void {}
+  method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::num i) → void {}
 }
 abstract class Mixin extends core::Object /*isMixinDeclaration*/  {
   abstract method extendedConcreteMixedInAbstractMethod() → void;
@@ -31,9 +31,9 @@
   abstract mixin-stub method extendedConcreteMixedInAbstractMethod() → void; -> self::Mixin::extendedConcreteMixedInAbstractMethod
   mixin-super-stub method extendedConcreteMixedInConcreteMethod() → void
     return super.{self::Mixin::extendedConcreteMixedInConcreteMethod}();
-  forwarding-stub method extendedConcreteMixedInAbstractImplementedMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteMixedInAbstractImplementedMethod}(i);
-  forwarding-stub method extendedConcreteMixedInConcreteImplementedMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::int i) → void
     return super.{self::Mixin::extendedConcreteMixedInConcreteImplementedMethod}(i);
 }
 class Sub extends self::Class {
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.outline.expect
index 8a768bf..9e88134 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.outline.expect
@@ -17,9 +17,9 @@
 class Interface extends core::Object {
   synthetic constructor •() → self::Interface
     ;
-  method extendedConcreteMixedInAbstractImplementedMethod(covariant core::num i) → void
+  method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::num i) → void
     ;
-  method extendedConcreteMixedInConcreteImplementedMethod(covariant core::num i) → void
+  method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::num i) → void
     ;
 }
 abstract class Mixin extends core::Object /*isMixinDeclaration*/  {
@@ -37,9 +37,9 @@
   abstract mixin-stub method extendedConcreteMixedInAbstractMethod() → void; -> self::Mixin::extendedConcreteMixedInAbstractMethod
   mixin-super-stub method extendedConcreteMixedInConcreteMethod() → void
     return super.{self::Mixin::extendedConcreteMixedInConcreteMethod}();
-  forwarding-stub method extendedConcreteMixedInAbstractImplementedMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteMixedInAbstractImplementedMethod}(i);
-  forwarding-stub method extendedConcreteMixedInConcreteImplementedMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::int i) → void
     return super.{self::Mixin::extendedConcreteMixedInConcreteImplementedMethod}(i);
 }
 class Sub extends self::Class {
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.transformed.expect
index 5af8040..1dd4d41 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/abstract_mixin.dart.weak.transformed.expect
@@ -15,8 +15,8 @@
   synthetic constructor •() → self::Interface
     : super core::Object::•()
     ;
-  method extendedConcreteMixedInAbstractImplementedMethod(covariant core::num i) → void {}
-  method extendedConcreteMixedInConcreteImplementedMethod(covariant core::num i) → void {}
+  method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::num i) → void {}
+  method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::num i) → void {}
 }
 abstract class Mixin extends core::Object /*isMixinDeclaration*/  {
   abstract method extendedConcreteMixedInAbstractMethod() → void;
@@ -30,8 +30,9 @@
     ;
   abstract method extendedConcreteMixedInAbstractMethod() → void;
   method extendedConcreteMixedInConcreteMethod() → void {}
-  abstract method extendedConcreteMixedInAbstractImplementedMethod(covariant core::int i) → void;
-  method extendedConcreteMixedInConcreteImplementedMethod(covariant core::int i) → void {}
+  method extendedConcreteMixedInAbstractImplementedMethod(covariant-by-declaration core::int i) → void
+    return super.{self::Super::extendedConcreteMixedInAbstractImplementedMethod}(i);
+  method extendedConcreteMixedInConcreteImplementedMethod(covariant-by-declaration core::int i) → void {}
 }
 class Sub extends self::Class {
   synthetic constructor •() → self::Sub
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.expect
index 17fd9e4..2e8e69d 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.expect
@@ -6,26 +6,26 @@
   synthetic constructor •() → self::M1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b) → dynamic {}
+  method method(covariant-by-declaration core::int a, core::int b) → dynamic {}
 }
 class M2 extends core::Object {
   synthetic constructor •() → self::M2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b) → dynamic {}
+  method method(core::int a, covariant-by-declaration core::int b) → dynamic {}
 }
 abstract class _C&Object&M1 = core::Object with self::M1 /*isAnonymousMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
-  mixin-super-stub method method(covariant core::int a, core::int b) → dynamic
+  mixin-super-stub method method(covariant-by-declaration core::int a, core::int b) → dynamic
     return super.{self::M1::method}(a, b);
 }
 abstract class _C&Object&M1&M2 = self::_C&Object&M1 with self::M2 /*isAnonymousMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
-  forwarding-stub method method(covariant core::int a, covariant core::int b) → dynamic
+  forwarding-stub method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b) → dynamic
     return super.{self::M2::method}(a, b);
 }
 class C extends self::_C&Object&M1&M2 {
@@ -37,9 +37,9 @@
   synthetic constructor •() → self::Direct
     : super core::Object::•()
     ;
-  method positional(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
-  method optional([covariant core::int a = #C1, core::int b = #C1, covariant core::int c = #C1, core::int d = #C1]) → void {}
-  method named({covariant core::int a = #C1, core::int b = #C1, covariant core::int c = #C1, core::int d = #C1}) → void {}
+  method positional(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
+  method optional([covariant-by-declaration core::int a = #C1, core::int b = #C1, covariant-by-declaration core::int c = #C1, core::int d = #C1]) → void {}
+  method named({covariant-by-declaration core::int a = #C1, core::int b = #C1, covariant-by-declaration core::int c = #C1, core::int d = #C1}) → void {}
 }
 class Inherited extends self::Direct {
   synthetic constructor •() → self::Inherited
@@ -50,99 +50,99 @@
   synthetic constructor •() → self::Override1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Override2 extends self::Override1 {
   synthetic constructor •() → self::Override2
     : super self::Override1::•()
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3
     : super self::Override2::•()
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Implement2 extends core::Object {
   synthetic constructor •() → self::Implement2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Implement3 extends core::Object {
   synthetic constructor •() → self::Implement3
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Implement4 extends core::Object implements self::Implement3 {
   synthetic constructor •() → self::Implement4
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, covariant core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, core::int e) → void {}
 }
 class Implement5 extends core::Object implements self::Implement1, self::Implement2, self::Implement4 {
   synthetic constructor •() → self::Implement5
     : super core::Object::•()
     ;
-  method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void {}
+  method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void {}
 }
 class Interface1 extends core::Object {
   synthetic constructor •() → self::Interface1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Mixin1 extends core::Object {
   synthetic constructor •() → self::Mixin1
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Mixin2 extends core::Object {
   synthetic constructor •() → self::Mixin2
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, core::int c, covariant core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, core::int c, covariant-by-declaration core::int d, core::int e) → void {}
 }
 class Superclass extends core::Object {
   synthetic constructor •() → self::Superclass
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, core::int c, core::int d, covariant core::int e) → void {}
+  method method(core::int a, core::int b, core::int c, core::int d, covariant-by-declaration core::int e) → void {}
 }
 abstract class _Mixed&Superclass&Mixin1 = self::Superclass with self::Mixin1 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1
     : super self::Superclass::•()
     ;
-  forwarding-stub method method(core::int a, core::int b, covariant core::int c, core::int d, covariant core::int e) → void
+  forwarding-stub method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin1::method}(a, b, c, d, e);
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 = self::_Mixed&Superclass&Mixin1 with self::Mixin2 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  forwarding-stub method method(core::int a, core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  forwarding-stub method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed
     : super self::_Mixed&Superclass&Mixin1&Mixin2::•()
     ;
-  forwarding-stub method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  forwarding-stub method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.outline.expect
index ac23e5b..cd1db8f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.outline.expect
@@ -5,27 +5,27 @@
 class M1 extends core::Object {
   synthetic constructor •() → self::M1
     ;
-  method method(covariant core::int a, core::int b) → dynamic
+  method method(covariant-by-declaration core::int a, core::int b) → dynamic
     ;
 }
 class M2 extends core::Object {
   synthetic constructor •() → self::M2
     ;
-  method method(core::int a, covariant core::int b) → dynamic
+  method method(core::int a, covariant-by-declaration core::int b) → dynamic
     ;
 }
 abstract class _C&Object&M1 = core::Object with self::M1 /*isAnonymousMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
-  mixin-super-stub method method(covariant core::int a, core::int b) → dynamic
+  mixin-super-stub method method(covariant-by-declaration core::int a, core::int b) → dynamic
     return super.{self::M1::method}(a, b);
 }
 abstract class _C&Object&M1&M2 = self::_C&Object&M1 with self::M2 /*isAnonymousMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
-  forwarding-stub method method(covariant core::int a, covariant core::int b) → dynamic
+  forwarding-stub method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b) → dynamic
     return super.{self::M2::method}(a, b);
 }
 class C extends self::_C&Object&M1&M2 {
@@ -35,11 +35,11 @@
 class Direct extends core::Object {
   synthetic constructor •() → self::Direct
     ;
-  method positional(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void
+  method positional(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void
     ;
-  method optional([covariant core::int a = 0, core::int b = 0, covariant core::int c = 0, core::int d = 0]) → void
+  method optional([covariant-by-declaration core::int a = 0, core::int b = 0, covariant-by-declaration core::int c = 0, core::int d = 0]) → void
     ;
-  method named({covariant core::int a = 0, core::int b = 0, covariant core::int c = 0, core::int d = 0}) → void
+  method named({covariant-by-declaration core::int a = 0, core::int b = 0, covariant-by-declaration core::int c = 0, core::int d = 0}) → void
     ;
 }
 class Inherited extends self::Direct {
@@ -49,99 +49,99 @@
 class Override1 extends core::Object {
   synthetic constructor •() → self::Override1
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void
     ;
 }
 class Override2 extends self::Override1 {
   synthetic constructor •() → self::Override2
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void
     ;
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void
     ;
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void
     ;
 }
 class Implement2 extends core::Object {
   synthetic constructor •() → self::Implement2
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void
     ;
 }
 class Implement3 extends core::Object {
   synthetic constructor •() → self::Implement3
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void
     ;
 }
 class Implement4 extends core::Object implements self::Implement3 {
   synthetic constructor •() → self::Implement4
     ;
-  method method(core::int a, core::int b, covariant core::int c, covariant core::int d, core::int e) → void
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, core::int e) → void
     ;
 }
 class Implement5 extends core::Object implements self::Implement1, self::Implement2, self::Implement4 {
   synthetic constructor •() → self::Implement5
     ;
-  method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     ;
 }
 class Interface1 extends core::Object {
   synthetic constructor •() → self::Interface1
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void
     ;
 }
 class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void
     ;
 }
 class Mixin1 extends core::Object {
   synthetic constructor •() → self::Mixin1
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void
     ;
 }
 class Mixin2 extends core::Object {
   synthetic constructor •() → self::Mixin2
     ;
-  method method(core::int a, core::int b, core::int c, covariant core::int d, core::int e) → void
+  method method(core::int a, core::int b, core::int c, covariant-by-declaration core::int d, core::int e) → void
     ;
 }
 class Superclass extends core::Object {
   synthetic constructor •() → self::Superclass
     ;
-  method method(core::int a, core::int b, core::int c, core::int d, covariant core::int e) → void
+  method method(core::int a, core::int b, core::int c, core::int d, covariant-by-declaration core::int e) → void
     ;
 }
 abstract class _Mixed&Superclass&Mixin1 = self::Superclass with self::Mixin1 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1
     : super self::Superclass::•()
     ;
-  forwarding-stub method method(core::int a, core::int b, covariant core::int c, core::int d, covariant core::int e) → void
+  forwarding-stub method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin1::method}(a, b, c, d, e);
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 = self::_Mixed&Superclass&Mixin1 with self::Mixin2 /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  forwarding-stub method method(core::int a, core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  forwarding-stub method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed
     ;
-  forwarding-stub method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  forwarding-stub method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.transformed.expect
index 62abc3c..56bff8d 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariance.dart.weak.transformed.expect
@@ -6,25 +6,25 @@
   synthetic constructor •() → self::M1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b) → dynamic {}
+  method method(covariant-by-declaration core::int a, core::int b) → dynamic {}
 }
 class M2 extends core::Object {
   synthetic constructor •() → self::M2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b) → dynamic {}
+  method method(core::int a, covariant-by-declaration core::int b) → dynamic {}
 }
 abstract class _C&Object&M1 extends core::Object implements self::M1 /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b) → dynamic {}
+  method method(covariant-by-declaration core::int a, core::int b) → dynamic {}
 }
 abstract class _C&Object&M1&M2 extends self::_C&Object&M1 implements self::M2 /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
   const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
-  method method(covariant core::int a, covariant core::int b) → dynamic {}
+  method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b) → dynamic {}
 }
 class C extends self::_C&Object&M1&M2 {
   synthetic constructor •() → self::C
@@ -35,9 +35,9 @@
   synthetic constructor •() → self::Direct
     : super core::Object::•()
     ;
-  method positional(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
-  method optional([covariant core::int a = #C1, core::int b = #C1, covariant core::int c = #C1, core::int d = #C1]) → void {}
-  method named({covariant core::int a = #C1, core::int b = #C1, covariant core::int c = #C1, core::int d = #C1}) → void {}
+  method positional(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
+  method optional([covariant-by-declaration core::int a = #C1, core::int b = #C1, covariant-by-declaration core::int c = #C1, core::int d = #C1]) → void {}
+  method named({covariant-by-declaration core::int a = #C1, core::int b = #C1, covariant-by-declaration core::int c = #C1, core::int d = #C1}) → void {}
 }
 class Inherited extends self::Direct {
   synthetic constructor •() → self::Inherited
@@ -48,97 +48,97 @@
   synthetic constructor •() → self::Override1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Override2 extends self::Override1 {
   synthetic constructor •() → self::Override2
     : super self::Override1::•()
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Override3 extends self::Override2 {
   synthetic constructor •() → self::Override3
     : super self::Override2::•()
     ;
-  method method(covariant core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 abstract class Implement1 extends core::Object {
   synthetic constructor •() → self::Implement1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Implement2 extends core::Object {
   synthetic constructor •() → self::Implement2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Implement3 extends core::Object {
   synthetic constructor •() → self::Implement3
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Implement4 extends core::Object implements self::Implement3 {
   synthetic constructor •() → self::Implement4
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, covariant core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, core::int e) → void {}
 }
 class Implement5 extends core::Object implements self::Implement1, self::Implement2, self::Implement4 {
   synthetic constructor •() → self::Implement5
     : super core::Object::•()
     ;
-  method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void {}
+  method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void {}
 }
 class Interface1 extends core::Object {
   synthetic constructor •() → self::Interface1
     : super core::Object::•()
     ;
-  method method(covariant core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(covariant-by-declaration core::int a, core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Interface2 extends core::Object {
   synthetic constructor •() → self::Interface2
     : super core::Object::•()
     ;
-  method method(core::int a, covariant core::int b, core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, covariant-by-declaration core::int b, core::int c, core::int d, core::int e) → void {}
 }
 class Mixin1 extends core::Object {
   synthetic constructor •() → self::Mixin1
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, core::int e) → void {}
 }
 class Mixin2 extends core::Object {
   synthetic constructor •() → self::Mixin2
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, core::int c, covariant core::int d, core::int e) → void {}
+  method method(core::int a, core::int b, core::int c, covariant-by-declaration core::int d, core::int e) → void {}
 }
 class Superclass extends core::Object {
   synthetic constructor •() → self::Superclass
     : super core::Object::•()
     ;
-  method method(core::int a, core::int b, core::int c, core::int d, covariant core::int e) → void {}
+  method method(core::int a, core::int b, core::int c, core::int d, covariant-by-declaration core::int e) → void {}
 }
 abstract class _Mixed&Superclass&Mixin1 extends self::Superclass implements self::Mixin1 /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1
     : super self::Superclass::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, core::int d, covariant core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, core::int d, covariant-by-declaration core::int e) → void {}
 }
 abstract class _Mixed&Superclass&Mixin1&Mixin2 extends self::_Mixed&Superclass&Mixin1 implements self::Mixin2 /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → self::_Mixed&Superclass&Mixin1&Mixin2
     : super self::_Mixed&Superclass&Mixin1::•()
     ;
-  method method(core::int a, core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void {}
+  method method(core::int a, core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void {}
 }
 class Mixed extends self::_Mixed&Superclass&Mixin1&Mixin2 implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::Mixed
     : super self::_Mixed&Superclass&Mixin1&Mixin2::•()
     ;
-  forwarding-stub method method(covariant core::int a, covariant core::int b, covariant core::int c, covariant core::int d, covariant core::int e) → void
+  forwarding-stub method method(covariant-by-declaration core::int a, covariant-by-declaration core::int b, covariant-by-declaration core::int c, covariant-by-declaration core::int d, covariant-by-declaration core::int e) → void
     return super.{self::Mixin2::method}(a, b, c, d, e);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.expect
index 7ffa395..42a0eb1 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -22,14 +22,14 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.outline.expect
index 971fdd2..078914c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class A extends core::Object {
   synthetic constructor •() → self::A*
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -20,13 +20,13 @@
 class B extends self::A {
   synthetic constructor •() → self::B*
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     ;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.transformed.expect
index 7ffa395..42a0eb1 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/covariant_equals.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -22,14 +22,14 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-  operator ==(covariant self::A* other) → core::bool*
+  operator ==(covariant-by-declaration self::A* other) → core::bool*
     return true;
 }
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::C<self::C::T*>* other) → core::bool*
+  operator ==(covariant-by-declaration covariant-by-class self::C<self::C::T*>* other) → core::bool*
     return true;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.expect
index fe7b938..be2afd3 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.expect
@@ -109,15 +109,15 @@
   field core::num field1 = 0;
   field core::num field2 = 0;
   field core::num field3 = 0;
-  covariant field core::num field4 = 0;
-  covariant field core::int field5 = 0;
+  covariant-by-declaration field core::num field4 = 0;
+  covariant-by-declaration field core::int field5 = 0;
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
 }
 class Interface extends core::Object {
-  covariant field core::int field1 = 0;
-  covariant field core::int field2 = 0;
+  covariant-by-declaration field core::int field1 = 0;
+  covariant-by-declaration field core::int field2 = 0;
   field core::int field4 = 0;
   field core::int field5 = 0;
   synthetic constructor •() → self::Interface
@@ -129,16 +129,16 @@
     : super self::Super::•()
     ;
   abstract get field1() → core::int;
-  forwarding-stub forwarding-semi-stub set field1(covariant core::int #externalFieldValue) → void
+  forwarding-stub forwarding-semi-stub set field1(covariant-by-declaration core::int #externalFieldValue) → void
     return super.{self::Super::field1} = #externalFieldValue;
   abstract get field2() → core::String;
-  forwarding-stub forwarding-semi-stub set field2(covariant core::String #externalFieldValue) → void
-    return super.{self::Super::field2} = #externalFieldValue;
+  forwarding-stub forwarding-semi-stub set field2(covariant-by-declaration core::String #externalFieldValue) → void
+    return super.{self::Super::field2} = #externalFieldValue as core::num;
   abstract get field3() → core::int;
   abstract set field3(core::int #externalFieldValue) → void;
   abstract get field4() → core::int;
-  abstract set field4(covariant core::int #externalFieldValue) → void;
+  abstract set field4(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get field5() → core::num;
-  abstract set field5(covariant core::num #externalFieldValue) → void;
+  abstract set field5(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.outline.expect
index e668a41..ca4fea2 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_field.dart.weak.outline.expect
@@ -109,14 +109,14 @@
   field core::num field1;
   field core::num field2;
   field core::num field3;
-  covariant field core::num field4;
-  covariant field core::int field5;
+  covariant-by-declaration field core::num field4;
+  covariant-by-declaration field core::int field5;
   synthetic constructor •() → self::Super
     ;
 }
 class Interface extends core::Object {
-  covariant field core::int field1;
-  covariant field core::int field2;
+  covariant-by-declaration field core::int field1;
+  covariant-by-declaration field core::int field2;
   field core::int field4;
   field core::int field5;
   synthetic constructor •() → self::Interface
@@ -126,17 +126,17 @@
   synthetic constructor •() → self::Class
     ;
   abstract get field1() → core::int;
-  forwarding-stub forwarding-semi-stub set field1(covariant core::int #externalFieldValue) → void
+  forwarding-stub forwarding-semi-stub set field1(covariant-by-declaration core::int #externalFieldValue) → void
     return super.{self::Super::field1} = #externalFieldValue;
   abstract get field2() → core::String;
-  forwarding-stub forwarding-semi-stub set field2(covariant core::String #externalFieldValue) → void
-    return super.{self::Super::field2} = #externalFieldValue;
+  forwarding-stub forwarding-semi-stub set field2(covariant-by-declaration core::String #externalFieldValue) → void
+    return super.{self::Super::field2} = #externalFieldValue as core::num;
   abstract get field3() → core::int;
   abstract set field3(core::int #externalFieldValue) → void;
   abstract get field4() → core::int;
-  abstract set field4(covariant core::int #externalFieldValue) → void;
+  abstract set field4(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get field5() → core::num;
-  abstract set field5(covariant core::num #externalFieldValue) → void;
+  abstract set field5(covariant-by-declaration core::num #externalFieldValue) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.expect
index e46c242..e670210f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.expect
@@ -47,15 +47,15 @@
   method method1(core::num n) → void {}
   method method2(core::num n) → void {}
   method method3(core::num n) → void {}
-  method method4(covariant core::num i) → void {}
-  method method5(covariant core::int i) → void {}
+  method method4(covariant-by-declaration core::num i) → void {}
+  method method5(covariant-by-declaration core::int i) → void {}
 }
 class Interface extends core::Object {
   synthetic constructor •() → self::Interface
     : super core::Object::•()
     ;
-  method method1(covariant core::int i) → void {}
-  method method2(covariant core::int i) → void {}
+  method method1(covariant-by-declaration core::int i) → void {}
+  method method2(covariant-by-declaration core::int i) → void {}
   method method4(core::int i) → void {}
   method method5(core::int i) → void {}
 }
@@ -63,12 +63,12 @@
   synthetic constructor •() → self::Class
     : super self::Super::•()
     ;
-  forwarding-stub forwarding-semi-stub method method1(covariant core::int i) → void
+  forwarding-stub forwarding-semi-stub method method1(covariant-by-declaration core::int i) → void
     return super.{self::Super::method1}(i);
-  forwarding-stub forwarding-semi-stub method method2(covariant core::String i) → void
-    return super.{self::Super::method2}(i);
+  forwarding-stub forwarding-semi-stub method method2(covariant-by-declaration core::String i) → void
+    return super.{self::Super::method2}(i as core::num);
   abstract method method3(core::int i) → void;
-  abstract method method4(covariant core::int i) → void;
-  abstract method method5(covariant core::num n) → void;
+  abstract method method4(covariant-by-declaration core::int i) → void;
+  abstract method method5(covariant-by-declaration core::num n) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.outline.expect
index 4b37dd3..dc87ebf 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_method.dart.weak.outline.expect
@@ -49,17 +49,17 @@
     ;
   method method3(core::num n) → void
     ;
-  method method4(covariant core::num i) → void
+  method method4(covariant-by-declaration core::num i) → void
     ;
-  method method5(covariant core::int i) → void
+  method method5(covariant-by-declaration core::int i) → void
     ;
 }
 class Interface extends core::Object {
   synthetic constructor •() → self::Interface
     ;
-  method method1(covariant core::int i) → void
+  method method1(covariant-by-declaration core::int i) → void
     ;
-  method method2(covariant core::int i) → void
+  method method2(covariant-by-declaration core::int i) → void
     ;
   method method4(core::int i) → void
     ;
@@ -69,13 +69,13 @@
 class Class extends self::Super implements self::Interface {
   synthetic constructor •() → self::Class
     ;
-  forwarding-stub forwarding-semi-stub method method1(covariant core::int i) → void
+  forwarding-stub forwarding-semi-stub method method1(covariant-by-declaration core::int i) → void
     return super.{self::Super::method1}(i);
-  forwarding-stub forwarding-semi-stub method method2(covariant core::String i) → void
-    return super.{self::Super::method2}(i);
+  forwarding-stub forwarding-semi-stub method method2(covariant-by-declaration core::String i) → void
+    return super.{self::Super::method2}(i as core::num);
   abstract method method3(core::int i) → void;
-  abstract method method4(covariant core::int i) → void;
-  abstract method method5(covariant core::num n) → void;
+  abstract method method4(covariant-by-declaration core::int i) → void;
+  abstract method method5(covariant-by-declaration core::num n) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.expect
index a95406c..f6fdb96 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.expect
@@ -47,15 +47,15 @@
   set setter1(core::num n) → void {}
   set setter2(core::num n) → void {}
   set setter3(core::num n) → void {}
-  set setter4(covariant core::num i) → void {}
-  set setter5(covariant core::int i) → void {}
+  set setter4(covariant-by-declaration core::num i) → void {}
+  set setter5(covariant-by-declaration core::int i) → void {}
 }
 class Interface extends core::Object {
   synthetic constructor •() → self::Interface
     : super core::Object::•()
     ;
-  set setter1(covariant core::int i) → void {}
-  set setter2(covariant core::int i) → void {}
+  set setter1(covariant-by-declaration core::int i) → void {}
+  set setter2(covariant-by-declaration core::int i) → void {}
   set setter4(core::int i) → void {}
   set setter5(core::int i) → void {}
 }
@@ -63,12 +63,12 @@
   synthetic constructor •() → self::Class
     : super self::Super::•()
     ;
-  forwarding-stub forwarding-semi-stub set setter1(covariant core::int i) → void
+  forwarding-stub forwarding-semi-stub set setter1(covariant-by-declaration core::int i) → void
     return super.{self::Super::setter1} = i;
-  forwarding-stub forwarding-semi-stub set setter2(covariant core::String i) → void
-    return super.{self::Super::setter2} = i;
+  forwarding-stub forwarding-semi-stub set setter2(covariant-by-declaration core::String i) → void
+    return super.{self::Super::setter2} = i as core::num;
   abstract set setter3(core::int i) → void;
-  abstract set setter4(covariant core::int i) → void;
-  abstract set setter5(covariant core::num n) → void;
+  abstract set setter4(covariant-by-declaration core::int i) → void;
+  abstract set setter5(covariant-by-declaration core::num n) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.outline.expect
index af837e6..1ac459f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_semi_stub_setter.dart.weak.outline.expect
@@ -49,17 +49,17 @@
     ;
   set setter3(core::num n) → void
     ;
-  set setter4(covariant core::num i) → void
+  set setter4(covariant-by-declaration core::num i) → void
     ;
-  set setter5(covariant core::int i) → void
+  set setter5(covariant-by-declaration core::int i) → void
     ;
 }
 class Interface extends core::Object {
   synthetic constructor •() → self::Interface
     ;
-  set setter1(covariant core::int i) → void
+  set setter1(covariant-by-declaration core::int i) → void
     ;
-  set setter2(covariant core::int i) → void
+  set setter2(covariant-by-declaration core::int i) → void
     ;
   set setter4(core::int i) → void
     ;
@@ -69,13 +69,13 @@
 class Class extends self::Super implements self::Interface {
   synthetic constructor •() → self::Class
     ;
-  forwarding-stub forwarding-semi-stub set setter1(covariant core::int i) → void
+  forwarding-stub forwarding-semi-stub set setter1(covariant-by-declaration core::int i) → void
     return super.{self::Super::setter1} = i;
-  forwarding-stub forwarding-semi-stub set setter2(covariant core::String i) → void
-    return super.{self::Super::setter2} = i;
+  forwarding-stub forwarding-semi-stub set setter2(covariant-by-declaration core::String i) → void
+    return super.{self::Super::setter2} = i as core::num;
   abstract set setter3(core::int i) → void;
-  abstract set setter4(covariant core::int i) → void;
-  abstract set setter5(covariant core::num n) → void;
+  abstract set setter4(covariant-by-declaration core::int i) → void;
+  abstract set setter5(covariant-by-declaration core::num n) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.expect
index bb5cf3f..a15a8cc 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Super<self::Super::T%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Super::T% t) → void {}
+  method method(covariant-by-class self::Super::T% t) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → self::Mixin
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::Class
     : super self::Super::•()
     ;
-  forwarding-stub method method(generic-covariant-impl core::int t) → void
+  forwarding-stub method method(covariant-by-class core::int t) → void
     return super.{self::Mixin::method}(t);
 }
 class Subclass extends self::Class {
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.outline.expect
index 035eb65..3e78979 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Super<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::Super<self::Super::T%>
     ;
-  method method(generic-covariant-impl self::Super::T% t) → void
+  method method(covariant-by-class self::Super::T% t) → void
     ;
 }
 class Mixin extends core::Object {
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::Class
     : super self::Super::•()
     ;
-  forwarding-stub method method(generic-covariant-impl core::int t) → void
+  forwarding-stub method method(covariant-by-class core::int t) → void
     return super.{self::Mixin::method}(t);
 }
 class Subclass extends self::Class {
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.transformed.expect
index 88c7f59..5236cd2 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stub_call.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Super<self::Super::T%>
     : super core::Object::•()
     ;
-  method method(generic-covariant-impl self::Super::T% t) → void {}
+  method method(covariant-by-class self::Super::T% t) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → self::Mixin
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::Class
     : super self::Super::•()
     ;
-  method method(generic-covariant-impl core::int t) → void {}
+  method method(covariant-by-class core::int t) → void {}
 }
 class Subclass extends self::Class {
   synthetic constructor •() → self::Subclass
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.expect
index e9fa156..16ebb44 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.expect
@@ -122,25 +122,25 @@
 import "dart:core" as core;
 
 abstract class Super extends core::Object {
-  covariant field core::int extendedConcreteCovariantField = 0;
-  covariant field core::int extendedConcreteCovariantImplementedField = 0;
+  covariant-by-declaration field core::int extendedConcreteCovariantField = 0;
+  covariant-by-declaration field core::int extendedConcreteCovariantImplementedField = 0;
   field core::int extendedConcreteImplementedCovariantField = 0;
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
   abstract get extendedAbstractCovariantField() → core::int;
-  abstract set extendedAbstractCovariantField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractCovariantImplementedField() → core::int;
-  abstract set extendedAbstractCovariantImplementedField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantImplementedField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractImplementedCovariantField() → core::int;
   abstract set extendedAbstractImplementedCovariantField(core::int #externalFieldValue) → void;
 }
 class Interface1 extends core::Object {
   field core::int extendedConcreteCovariantImplementedField = 0;
   field core::int extendedAbstractCovariantImplementedField = 0;
-  covariant field core::int extendedConcreteImplementedCovariantField = 0;
-  covariant field core::int extendedAbstractImplementedCovariantField = 0;
-  covariant field core::int implementsMultipleCovariantField1 = 0;
+  covariant-by-declaration field core::int extendedConcreteImplementedCovariantField = 0;
+  covariant-by-declaration field core::int extendedAbstractImplementedCovariantField = 0;
+  covariant-by-declaration field core::int implementsMultipleCovariantField1 = 0;
   field core::int implementsMultipleCovariantField2 = 0;
   synthetic constructor •() → self::Interface1
     : super core::Object::•()
@@ -148,7 +148,7 @@
 }
 class Interface2 extends core::Object {
   field core::int implementsMultipleCovariantField1 = 0;
-  covariant field core::int implementsMultipleCovariantField2 = 0;
+  covariant-by-declaration field core::int implementsMultipleCovariantField2 = 0;
   synthetic constructor •() → self::Interface2
     : super core::Object::•()
     ;
@@ -157,10 +157,10 @@
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -171,9 +171,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.outline.expect
index 9c30a70..c09bd68 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.outline.expect
@@ -122,41 +122,41 @@
 import "dart:core" as core;
 
 abstract class Super extends core::Object {
-  covariant field core::int extendedConcreteCovariantField;
-  covariant field core::int extendedConcreteCovariantImplementedField;
+  covariant-by-declaration field core::int extendedConcreteCovariantField;
+  covariant-by-declaration field core::int extendedConcreteCovariantImplementedField;
   field core::int extendedConcreteImplementedCovariantField;
   synthetic constructor •() → self::Super
     ;
   abstract get extendedAbstractCovariantField() → core::int;
-  abstract set extendedAbstractCovariantField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractCovariantImplementedField() → core::int;
-  abstract set extendedAbstractCovariantImplementedField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantImplementedField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractImplementedCovariantField() → core::int;
   abstract set extendedAbstractImplementedCovariantField(core::int #externalFieldValue) → void;
 }
 class Interface1 extends core::Object {
   field core::int extendedConcreteCovariantImplementedField;
   field core::int extendedAbstractCovariantImplementedField;
-  covariant field core::int extendedConcreteImplementedCovariantField;
-  covariant field core::int extendedAbstractImplementedCovariantField;
-  covariant field core::int implementsMultipleCovariantField1;
+  covariant-by-declaration field core::int extendedConcreteImplementedCovariantField;
+  covariant-by-declaration field core::int extendedAbstractImplementedCovariantField;
+  covariant-by-declaration field core::int implementsMultipleCovariantField1;
   field core::int implementsMultipleCovariantField2;
   synthetic constructor •() → self::Interface1
     ;
 }
 class Interface2 extends core::Object {
   field core::int implementsMultipleCovariantField1;
-  covariant field core::int implementsMultipleCovariantField2;
+  covariant-by-declaration field core::int implementsMultipleCovariantField2;
   synthetic constructor •() → self::Interface2
     ;
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -165,10 +165,10 @@
 class ConcreteClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::ConcreteClass
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.transformed.expect
index e9fa156..16ebb44 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_field.dart.weak.transformed.expect
@@ -122,25 +122,25 @@
 import "dart:core" as core;
 
 abstract class Super extends core::Object {
-  covariant field core::int extendedConcreteCovariantField = 0;
-  covariant field core::int extendedConcreteCovariantImplementedField = 0;
+  covariant-by-declaration field core::int extendedConcreteCovariantField = 0;
+  covariant-by-declaration field core::int extendedConcreteCovariantImplementedField = 0;
   field core::int extendedConcreteImplementedCovariantField = 0;
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
   abstract get extendedAbstractCovariantField() → core::int;
-  abstract set extendedAbstractCovariantField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractCovariantImplementedField() → core::int;
-  abstract set extendedAbstractCovariantImplementedField(covariant core::int #externalFieldValue) → void;
+  abstract set extendedAbstractCovariantImplementedField(covariant-by-declaration core::int #externalFieldValue) → void;
   abstract get extendedAbstractImplementedCovariantField() → core::int;
   abstract set extendedAbstractImplementedCovariantField(core::int #externalFieldValue) → void;
 }
 class Interface1 extends core::Object {
   field core::int extendedConcreteCovariantImplementedField = 0;
   field core::int extendedAbstractCovariantImplementedField = 0;
-  covariant field core::int extendedConcreteImplementedCovariantField = 0;
-  covariant field core::int extendedAbstractImplementedCovariantField = 0;
-  covariant field core::int implementsMultipleCovariantField1 = 0;
+  covariant-by-declaration field core::int extendedConcreteImplementedCovariantField = 0;
+  covariant-by-declaration field core::int extendedAbstractImplementedCovariantField = 0;
+  covariant-by-declaration field core::int implementsMultipleCovariantField1 = 0;
   field core::int implementsMultipleCovariantField2 = 0;
   synthetic constructor •() → self::Interface1
     : super core::Object::•()
@@ -148,7 +148,7 @@
 }
 class Interface2 extends core::Object {
   field core::int implementsMultipleCovariantField1 = 0;
-  covariant field core::int implementsMultipleCovariantField2 = 0;
+  covariant-by-declaration field core::int implementsMultipleCovariantField2 = 0;
   synthetic constructor •() → self::Interface2
     : super core::Object::•()
     ;
@@ -157,10 +157,10 @@
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -171,9 +171,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantField(covariant core::int value) → void
+  forwarding-stub set extendedConcreteImplementedCovariantField(covariant-by-declaration core::int value) → void
     return super.{self::Super::extendedConcreteImplementedCovariantField} = value;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant core::int #externalFieldValue) → void;
-  abstract forwarding-stub set implementsMultipleCovariantField2(covariant core::int value) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantField(covariant-by-declaration core::int #externalFieldValue) → void;
+  abstract forwarding-stub set implementsMultipleCovariantField2(covariant-by-declaration core::int value) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.expect
index e15c8ba..c62e3f2 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.expect
@@ -101,10 +101,10 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  method extendedConcreteCovariantMethod(covariant core::int i) → void {}
-  abstract method extendedAbstractCovariantMethod(covariant core::int i) → void;
-  method extendedConcreteCovariantImplementedMethod(covariant core::int i) → void {}
-  abstract method extendedAbstractCovariantImplementedMethod(covariant core::int i) → void;
+  method extendedConcreteCovariantMethod(covariant-by-declaration core::int i) → void {}
+  abstract method extendedAbstractCovariantMethod(covariant-by-declaration core::int i) → void;
+  method extendedConcreteCovariantImplementedMethod(covariant-by-declaration core::int i) → void {}
+  abstract method extendedAbstractCovariantImplementedMethod(covariant-by-declaration core::int i) → void;
   method extendedConcreteImplementedCovariantMethod(core::int i) → void {}
   abstract method extendedAbstractImplementedCovariantMethod(core::int i) → void;
 }
@@ -114,9 +114,9 @@
     ;
   method extendedConcreteCovariantImplementedMethod(core::int i) → void {}
   method extendedAbstractCovariantImplementedMethod(core::int i) → void {}
-  method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void {}
-  method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void {}
-  method implementsMultipleCovariantMethod1(covariant core::int i) → void {}
+  method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void {}
+  method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void {}
+  method implementsMultipleCovariantMethod1(covariant-by-declaration core::int i) → void {}
   method implementsMultipleCovariantMethod2(core::int i) → void {}
 }
 class Interface2 extends core::Object {
@@ -124,16 +124,16 @@
     : super core::Object::•()
     ;
   method implementsMultipleCovariantMethod1(core::int i) → void {}
-  method implementsMultipleCovariantMethod2(covariant core::int i) → void {}
+  method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void {}
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -144,9 +144,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.outline.expect
index 78bd6c1..009a47a 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.outline.expect
@@ -100,12 +100,12 @@
 abstract class Super extends core::Object {
   synthetic constructor •() → self::Super
     ;
-  method extendedConcreteCovariantMethod(covariant core::int i) → void
+  method extendedConcreteCovariantMethod(covariant-by-declaration core::int i) → void
     ;
-  abstract method extendedAbstractCovariantMethod(covariant core::int i) → void;
-  method extendedConcreteCovariantImplementedMethod(covariant core::int i) → void
+  abstract method extendedAbstractCovariantMethod(covariant-by-declaration core::int i) → void;
+  method extendedConcreteCovariantImplementedMethod(covariant-by-declaration core::int i) → void
     ;
-  abstract method extendedAbstractCovariantImplementedMethod(covariant core::int i) → void;
+  abstract method extendedAbstractCovariantImplementedMethod(covariant-by-declaration core::int i) → void;
   method extendedConcreteImplementedCovariantMethod(core::int i) → void
     ;
   abstract method extendedAbstractImplementedCovariantMethod(core::int i) → void;
@@ -117,11 +117,11 @@
     ;
   method extendedAbstractCovariantImplementedMethod(core::int i) → void
     ;
-  method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     ;
-  method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void
+  method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     ;
-  method implementsMultipleCovariantMethod1(covariant core::int i) → void
+  method implementsMultipleCovariantMethod1(covariant-by-declaration core::int i) → void
     ;
   method implementsMultipleCovariantMethod2(core::int i) → void
     ;
@@ -131,16 +131,16 @@
     ;
   method implementsMultipleCovariantMethod1(core::int i) → void
     ;
-  method implementsMultipleCovariantMethod2(covariant core::int i) → void
+  method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void
     ;
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -149,10 +149,10 @@
 class ConcreteClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::ConcreteClass
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.transformed.expect
index e15c8ba..c62e3f2 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_method.dart.weak.transformed.expect
@@ -101,10 +101,10 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  method extendedConcreteCovariantMethod(covariant core::int i) → void {}
-  abstract method extendedAbstractCovariantMethod(covariant core::int i) → void;
-  method extendedConcreteCovariantImplementedMethod(covariant core::int i) → void {}
-  abstract method extendedAbstractCovariantImplementedMethod(covariant core::int i) → void;
+  method extendedConcreteCovariantMethod(covariant-by-declaration core::int i) → void {}
+  abstract method extendedAbstractCovariantMethod(covariant-by-declaration core::int i) → void;
+  method extendedConcreteCovariantImplementedMethod(covariant-by-declaration core::int i) → void {}
+  abstract method extendedAbstractCovariantImplementedMethod(covariant-by-declaration core::int i) → void;
   method extendedConcreteImplementedCovariantMethod(core::int i) → void {}
   abstract method extendedAbstractImplementedCovariantMethod(core::int i) → void;
 }
@@ -114,9 +114,9 @@
     ;
   method extendedConcreteCovariantImplementedMethod(core::int i) → void {}
   method extendedAbstractCovariantImplementedMethod(core::int i) → void {}
-  method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void {}
-  method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void {}
-  method implementsMultipleCovariantMethod1(covariant core::int i) → void {}
+  method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void {}
+  method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void {}
+  method implementsMultipleCovariantMethod1(covariant-by-declaration core::int i) → void {}
   method implementsMultipleCovariantMethod2(core::int i) → void {}
 }
 class Interface2 extends core::Object {
@@ -124,16 +124,16 @@
     : super core::Object::•()
     ;
   method implementsMultipleCovariantMethod1(core::int i) → void {}
-  method implementsMultipleCovariantMethod2(covariant core::int i) → void {}
+  method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void {}
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -144,9 +144,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant core::int i) → void
+  forwarding-stub method extendedConcreteImplementedCovariantMethod(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantMethod}(i);
-  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant core::int i) → void;
-  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant core::int i) → void;
+  abstract forwarding-stub method extendedAbstractImplementedCovariantMethod(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub method implementsMultipleCovariantMethod2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.expect
index bb95986..ac74f0f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.expect
@@ -101,10 +101,10 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  set extendedConcreteCovariantSetter(covariant core::int i) → void {}
-  abstract set extendedAbstractCovariantSetter(covariant core::int i) → void;
-  set extendedConcreteCovariantImplementedSetter(covariant core::int i) → void {}
-  abstract set extendedAbstractCovariantImplementedSetter(covariant core::int i) → void;
+  set extendedConcreteCovariantSetter(covariant-by-declaration core::int i) → void {}
+  abstract set extendedAbstractCovariantSetter(covariant-by-declaration core::int i) → void;
+  set extendedConcreteCovariantImplementedSetter(covariant-by-declaration core::int i) → void {}
+  abstract set extendedAbstractCovariantImplementedSetter(covariant-by-declaration core::int i) → void;
   set extendedConcreteImplementedCovariantSetter(core::int i) → void {}
   abstract set extendedAbstractImplementedCovariantSetter(core::int i) → void;
 }
@@ -114,9 +114,9 @@
     ;
   set extendedConcreteCovariantImplementedSetter(core::int i) → void {}
   set extendedAbstractCovariantImplementedSetter(core::int i) → void {}
-  set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void {}
-  set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void {}
-  set implementsMultipleCovariantSetter1(covariant core::int i) → void {}
+  set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void {}
+  set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void {}
+  set implementsMultipleCovariantSetter1(covariant-by-declaration core::int i) → void {}
   set implementsMultipleCovariantSetter2(core::int i) → void {}
 }
 class Interface2 extends core::Object {
@@ -124,16 +124,16 @@
     : super core::Object::•()
     ;
   set implementsMultipleCovariantSetter1(core::int i) → void {}
-  set implementsMultipleCovariantSetter2(covariant core::int i) → void {}
+  set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void {}
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -144,9 +144,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.outline.expect
index 07387a9..22bb84b 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.outline.expect
@@ -100,12 +100,12 @@
 abstract class Super extends core::Object {
   synthetic constructor •() → self::Super
     ;
-  set extendedConcreteCovariantSetter(covariant core::int i) → void
+  set extendedConcreteCovariantSetter(covariant-by-declaration core::int i) → void
     ;
-  abstract set extendedAbstractCovariantSetter(covariant core::int i) → void;
-  set extendedConcreteCovariantImplementedSetter(covariant core::int i) → void
+  abstract set extendedAbstractCovariantSetter(covariant-by-declaration core::int i) → void;
+  set extendedConcreteCovariantImplementedSetter(covariant-by-declaration core::int i) → void
     ;
-  abstract set extendedAbstractCovariantImplementedSetter(covariant core::int i) → void;
+  abstract set extendedAbstractCovariantImplementedSetter(covariant-by-declaration core::int i) → void;
   set extendedConcreteImplementedCovariantSetter(core::int i) → void
     ;
   abstract set extendedAbstractImplementedCovariantSetter(core::int i) → void;
@@ -117,11 +117,11 @@
     ;
   set extendedAbstractCovariantImplementedSetter(core::int i) → void
     ;
-  set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     ;
-  set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void
+  set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     ;
-  set implementsMultipleCovariantSetter1(covariant core::int i) → void
+  set implementsMultipleCovariantSetter1(covariant-by-declaration core::int i) → void
     ;
   set implementsMultipleCovariantSetter2(core::int i) → void
     ;
@@ -131,16 +131,16 @@
     ;
   set implementsMultipleCovariantSetter1(core::int i) → void
     ;
-  set implementsMultipleCovariantSetter2(covariant core::int i) → void
+  set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void
     ;
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -149,10 +149,10 @@
 class ConcreteClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::ConcreteClass
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.transformed.expect
index bb95986..ac74f0f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/forwarding_stubs_setter.dart.weak.transformed.expect
@@ -101,10 +101,10 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  set extendedConcreteCovariantSetter(covariant core::int i) → void {}
-  abstract set extendedAbstractCovariantSetter(covariant core::int i) → void;
-  set extendedConcreteCovariantImplementedSetter(covariant core::int i) → void {}
-  abstract set extendedAbstractCovariantImplementedSetter(covariant core::int i) → void;
+  set extendedConcreteCovariantSetter(covariant-by-declaration core::int i) → void {}
+  abstract set extendedAbstractCovariantSetter(covariant-by-declaration core::int i) → void;
+  set extendedConcreteCovariantImplementedSetter(covariant-by-declaration core::int i) → void {}
+  abstract set extendedAbstractCovariantImplementedSetter(covariant-by-declaration core::int i) → void;
   set extendedConcreteImplementedCovariantSetter(core::int i) → void {}
   abstract set extendedAbstractImplementedCovariantSetter(core::int i) → void;
 }
@@ -114,9 +114,9 @@
     ;
   set extendedConcreteCovariantImplementedSetter(core::int i) → void {}
   set extendedAbstractCovariantImplementedSetter(core::int i) → void {}
-  set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void {}
-  set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void {}
-  set implementsMultipleCovariantSetter1(covariant core::int i) → void {}
+  set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void {}
+  set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void {}
+  set implementsMultipleCovariantSetter1(covariant-by-declaration core::int i) → void {}
   set implementsMultipleCovariantSetter2(core::int i) → void {}
 }
 class Interface2 extends core::Object {
@@ -124,16 +124,16 @@
     : super core::Object::•()
     ;
   set implementsMultipleCovariantSetter1(core::int i) → void {}
-  set implementsMultipleCovariantSetter2(covariant core::int i) → void {}
+  set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void {}
 }
 abstract class AbstractClass extends self::Super implements self::Interface1, self::Interface2 {
   synthetic constructor •() → self::AbstractClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 class ConcreteSub extends self::AbstractClass {
   synthetic constructor •() → self::ConcreteSub
@@ -144,9 +144,9 @@
   synthetic constructor •() → self::ConcreteClass
     : super self::Super::•()
     ;
-  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant core::int i) → void
+  forwarding-stub set extendedConcreteImplementedCovariantSetter(covariant-by-declaration core::int i) → void
     return super.{self::Super::extendedConcreteImplementedCovariantSetter} = i;
-  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant core::int i) → void;
-  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant core::int i) → void;
+  abstract forwarding-stub set extendedAbstractImplementedCovariantSetter(covariant-by-declaration core::int i) → void;
+  abstract forwarding-stub set implementsMultipleCovariantSetter2(covariant-by-declaration core::int i) → void;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.expect
index 1604316..eeb8541 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.expect
@@ -260,6 +260,6 @@
   #C2 = #mixedInMethod
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #extendedMethod
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.outline.expect
index a127912..645b335 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.outline.expect
@@ -248,19 +248,19 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> SymbolConstant(#mixedInMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:20:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> SymbolConstant(#extendedMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:19:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:49:4 -> InstanceConstant(const _Override{})
 Evaluated: StaticGet @ org-dartlang-testcase:///inherited_implements.dart:59:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> SymbolConstant(#extendedMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:64:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> SymbolConstant(#mixedInMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///inherited_implements.dart:65:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 45, effectively constant: 20
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.transformed.expect
index b9dfa96..f0de54f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/inherited_implements.dart.weak.transformed.expect
@@ -260,6 +260,6 @@
   #C2 = #mixedInMethod
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #extendedMethod
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.expect
index 73a2b06..980d6fe 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.expect
@@ -197,6 +197,6 @@
   #C1 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateGetter
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateSetter=
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.outline.expect
index 1ec283b..e5c1602 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.outline.expect
@@ -145,6 +145,6 @@
   #C1 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateGetter
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateSetter=
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.transformed.expect
index f9dd954..be4c652 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/mixin_from_dill/main.dart.weak.transformed.expect
@@ -197,6 +197,6 @@
   #C1 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateGetter
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #org-dartlang-testcase:///opt_in_lib2.dart::_privateSetter=
 }
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.expect
index 7914b57..524ceff 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.expect
@@ -361,7 +361,7 @@
   #C2 = #getter
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #field
   #C7 = #method
   #C8 = #finalField
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.outline.expect
index 87ecfb3..bb3b265 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.outline.expect
@@ -333,114 +333,114 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> SymbolConstant(#getter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> SymbolConstant(#finalField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> SymbolConstant(#setter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> SymbolConstant(#getter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> SymbolConstant(#finalField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> SymbolConstant(#setter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: StaticGet @ org-dartlang-testcase:///no_such_method.dart:38:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> SymbolConstant(#getter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> SymbolConstant(#finalField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> SymbolConstant(#setter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> SymbolConstant(#getter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> SymbolConstant(#finalField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> SymbolConstant(#setter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: StaticGet @ org-dartlang-testcase:///no_such_method.dart:57:4 -> InstanceConstant(const _Override{})
 Evaluated: StaticGet @ org-dartlang-testcase:///no_such_method.dart:70:4 -> InstanceConstant(const _Override{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> SymbolConstant(#getter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:6:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> SymbolConstant(#finalField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:10:13 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> SymbolConstant(#setter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> SymbolConstant(#field=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_such_method.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 283, effectively constant: 114
diff --git a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.transformed.expect
index c4bae58..c8f6ab8 100644
--- a/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/hierarchy/no_such_method.dart.weak.transformed.expect
@@ -365,7 +365,7 @@
   #C2 = #getter
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #field
   #C7 = #method
   #C8 = #finalField
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.expect
index facc484..7e095fc 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.expect
@@ -56,7 +56,7 @@
   constructor •(iss::Iterable::E% element) → iss::Iterable<iss::Iterable::E%>
     : iss::Iterable::element = element, super core::Object::•()
     ;
-  method singleWhere((iss::Iterable::E%) → core::bool test, {generic-covariant-impl () →? iss::Iterable::E% orElse = #C1}) → iss::Iterable::E% {
+  method singleWhere((iss::Iterable::E%) → core::bool test, {covariant-by-class () →? iss::Iterable::E% orElse = #C1}) → iss::Iterable::E% {
     if(test(this.{iss::Iterable::element}{iss::Iterable::E%}){(iss::Iterable::E%) → core::bool}) {
       return this.{iss::Iterable::element}{iss::Iterable::E%};
     }
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
index 3e3f2f4..8ed2bcc 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.outline.expect
@@ -46,7 +46,7 @@
   final field iss::Iterable::E% element;
   constructor •(iss::Iterable::E% element) → iss::Iterable<iss::Iterable::E%>
     ;
-  method singleWhere((iss::Iterable::E%) → core::bool test, {generic-covariant-impl () →? iss::Iterable::E% orElse}) → iss::Iterable::E%
+  method singleWhere((iss::Iterable::E%) → core::bool test, {covariant-by-class () →? iss::Iterable::E% orElse}) → iss::Iterable::E%
     ;
 }
 static method foo(() → iss::Map<core::String, core::String> f) → void
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.transformed.expect
index facc484..7e095fc 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41180.dart.weak.transformed.expect
@@ -56,7 +56,7 @@
   constructor •(iss::Iterable::E% element) → iss::Iterable<iss::Iterable::E%>
     : iss::Iterable::element = element, super core::Object::•()
     ;
-  method singleWhere((iss::Iterable::E%) → core::bool test, {generic-covariant-impl () →? iss::Iterable::E% orElse = #C1}) → iss::Iterable::E% {
+  method singleWhere((iss::Iterable::E%) → core::bool test, {covariant-by-class () →? iss::Iterable::E% orElse = #C1}) → iss::Iterable::E% {
     if(test(this.{iss::Iterable::element}{iss::Iterable::E%}){(iss::Iterable::E%) → core::bool}) {
       return this.{iss::Iterable::element}{iss::Iterable::E%};
     }
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.expect
index 0be0d4c..45aac72 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.expect
@@ -2,13 +2,13 @@
 import self as self;
 import "dart:core" as core;
 
-static final field core::bool isLegacySubtyping1a = (#C1) is{ForNonNullableByDefault} core::List<core::int>;
+static final field core::bool isLegacySubtyping1a = #C1 is{ForNonNullableByDefault} core::List<core::int>;
 static const field core::bool isLegacySubtyping1b = #C2;
-static final field core::bool isLegacySubtyping2a = (#C3) is{ForNonNullableByDefault} core::List<core::int>;
+static final field core::bool isLegacySubtyping2a = #C3 is{ForNonNullableByDefault} core::List<core::int>;
 static const field core::bool isLegacySubtyping2b = #C2;
-static final field core::List<core::int> assertLegacySubtyping1a = (#C1) as{ForNonNullableByDefault} core::List<core::int>;
+static final field core::List<core::int> assertLegacySubtyping1a = #C1 as{ForNonNullableByDefault} core::List<core::int>;
 static const field core::List<core::int> assertLegacySubtyping1b = #C1;
-static final field core::List<core::int> assertLegacySubtyping2a = (#C3) as{ForNonNullableByDefault} core::List<core::int>;
+static final field core::List<core::int> assertLegacySubtyping2a = #C3 as{ForNonNullableByDefault} core::List<core::int>;
 static const field core::List<core::int> assertLegacySubtyping2b = #C3;
 static method main() → void {
   self::expect(self::isLegacySubtyping1a, #C2);
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.transformed.expect
index e7f1882..611eeac 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41657.dart.weak.transformed.expect
@@ -2,9 +2,9 @@
 import self as self;
 import "dart:core" as core;
 
-static final field core::bool isLegacySubtyping1a = (#C1) is{ForNonNullableByDefault} core::List<core::int>;
+static final field core::bool isLegacySubtyping1a = #C1 is{ForNonNullableByDefault} core::List<core::int>;
 static const field core::bool isLegacySubtyping1b = #C2;
-static final field core::bool isLegacySubtyping2a = (#C3) is{ForNonNullableByDefault} core::List<core::int>;
+static final field core::bool isLegacySubtyping2a = #C3 is{ForNonNullableByDefault} core::List<core::int>;
 static const field core::bool isLegacySubtyping2b = #C2;
 static final field core::List<core::int> assertLegacySubtyping1a = #C1;
 static const field core::List<core::int> assertLegacySubtyping1b = #C1;
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
index 3376fa8..9f4f0a5 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
@@ -7,7 +7,7 @@
 
 static method main() → void {
   iss::E|m(iss::f());
-  iss::E|m((#C1)(){() →* core::int*});
+  iss::E|m(#C1(){() →* core::int*});
   iss::E|m(iss::p);
   iss::Class<dynamic>* c = new iss::Class::•<dynamic>();
   iss::E|m(c.{iss::Class::f}(){() →* core::int*});
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
index 3376fa8..9f4f0a5 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
 
 static method main() → void {
   iss::E|m(iss::f());
-  iss::E|m((#C1)(){() →* core::int*});
+  iss::E|m(#C1(){() →* core::int*});
   iss::E|m(iss::p);
   iss::Class<dynamic>* c = new iss::Class::•<dynamic>();
   iss::E|m(c.{iss::Class::f}(){() →* core::int*});
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect
index b315eec..b9925e3 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -55,7 +55,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/  {
@@ -94,7 +94,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -110,7 +110,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2, core::num* b = #C2]) → dynamic;
 }
 static method main() → dynamic {}
 
@@ -128,7 +128,7 @@
   synthetic constructor •() → mai::Interface2
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = #C1}) → core::String
@@ -138,7 +138,7 @@
   synthetic constructor •() → mai::D
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -167,13 +167,13 @@
   synthetic constructor •() → mai::C4
     : super core::Object::•()
     ;
-  abstract method method2([covariant core::String a = #C2]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     : super mai::C3::•()
     ;
-  abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
index 8754194..794d06d 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.outline.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -54,7 +54,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/  {
@@ -92,7 +92,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -107,7 +107,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a, core::num* b]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a, core::num* b]) → dynamic;
 }
 static method main() → dynamic
   ;
@@ -124,7 +124,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → mai::Interface2
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = #C1}) → core::String
@@ -133,7 +133,7 @@
 abstract class D extends core::Object implements mai::Interface, mai::Interface2 {
   synthetic constructor •() → mai::D
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -157,12 +157,12 @@
 abstract class C4 extends core::Object {
   synthetic constructor •() → mai::C4
     ;
-  abstract method method2([covariant core::String a]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     ;
-  abstract forwarding-stub method method2([covariant core::String a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect
index f366369..1755648 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -55,7 +55,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A extends core::Object implements mai::A /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
@@ -94,7 +94,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -110,7 +110,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2, core::num* b = #C2]) → dynamic;
 }
 static method main() → dynamic {}
 
@@ -128,7 +128,7 @@
   synthetic constructor •() → mai::Interface2
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = #C1}) → core::String
@@ -138,7 +138,7 @@
   synthetic constructor •() → mai::D
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -167,13 +167,13 @@
   synthetic constructor •() → mai::C4
     : super core::Object::•()
     ;
-  abstract method method2([covariant core::String a = #C2]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     : super mai::C3::•()
     ;
-  abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.expect
index f9f739d..76b963e 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -55,7 +55,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/  {
@@ -94,7 +94,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -110,7 +110,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2, core::num* b = #C2]) → dynamic;
 }
 static method main() → dynamic {}
 
@@ -128,7 +128,7 @@
   synthetic constructor •() → mai::Interface2
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = #C1}) → core::String
@@ -138,7 +138,7 @@
   synthetic constructor •() → mai::D
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -167,13 +167,13 @@
   synthetic constructor •() → mai::C4
     : super core::Object::•()
     ;
-  abstract method method2([covariant core::String a = #C2]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     : super mai::C3::•()
     ;
-  abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
index 52ca0c6..4e1eec5 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.outline.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -54,7 +54,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A = core::Object with mai::A /*isAnonymousMixin,hasConstConstructor*/  {
@@ -92,7 +92,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -107,7 +107,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a, core::num* b]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a, core::num* b]) → dynamic;
 }
 static method main() → dynamic
   ;
@@ -124,7 +124,7 @@
 abstract class Interface2 extends core::Object {
   synthetic constructor •() → mai::Interface2
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = "hello"}) → core::String
@@ -133,7 +133,7 @@
 abstract class D extends core::Object implements mai::Interface, mai::Interface2 {
   synthetic constructor •() → mai::D
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -157,12 +157,12 @@
 abstract class C4 extends core::Object {
   synthetic constructor •() → mai::C4
     ;
-  abstract method method2([covariant core::String a]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     ;
-  abstract forwarding-stub method method2([covariant core::String a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.transformed.expect
index 2645eb5..c979ec6 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue43988/main.no_link.dart.weak.transformed.expect
@@ -26,7 +26,7 @@
   const synthetic constructor •() → self::_E1&Object&A&D*
     : super self::_E1&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E1&Object&A::method}(i, s: s);
 }
 class E1 extends self::_E1&Object&A&D {
@@ -55,7 +55,7 @@
   const synthetic constructor •() → self::E2*
     : super self::_E2&Object&A::•()
     ;
-  forwarding-stub method method(covariant core::num* i, {core::String* s = #C1}) → core::String*
+  forwarding-stub method method(covariant-by-declaration core::num* i, {core::String* s = #C1}) → core::String*
     return super.{self::_E2&Object&A::method}(i, s: s);
 }
 abstract class _E3&Object&A extends core::Object implements mai::A /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/  {
@@ -94,7 +94,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a]) → dynamic;
 }
 abstract class C8 extends mai::C5 implements mai::C7 {
   synthetic constructor •() → self::C8*
@@ -110,7 +110,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-  abstract forwarding-stub method method2([covariant core::String* a = #C2, core::num* b = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String* a = #C2, core::num* b = #C2]) → dynamic;
 }
 static method main() → dynamic {}
 
@@ -128,7 +128,7 @@
   synthetic constructor •() → mai::Interface2
     : super core::Object::•()
     ;
-  abstract method method(covariant core::int i) → core::String;
+  abstract method method(covariant-by-declaration core::int i) → core::String;
 }
 abstract class A extends core::Object implements mai::Interface /*isMixinDeclaration*/  {
   method method(core::num i, {core::String s = #C1}) → core::String
@@ -138,7 +138,7 @@
   synthetic constructor •() → mai::D
     : super core::Object::•()
     ;
-  abstract forwarding-stub method method(covariant core::num i) → core::String;
+  abstract forwarding-stub method method(covariant-by-declaration core::num i) → core::String;
 }
 abstract class F extends core::Object implements mai::Interface {
   synthetic constructor •() → mai::F
@@ -167,13 +167,13 @@
   synthetic constructor •() → mai::C4
     : super core::Object::•()
     ;
-  abstract method method2([covariant core::String a = #C2]) → dynamic;
+  abstract method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C5 extends mai::C3 implements mai::C4 {
   synthetic constructor •() → mai::C5
     : super mai::C3::•()
     ;
-  abstract forwarding-stub method method2([covariant core::String a = #C2]) → dynamic;
+  abstract forwarding-stub method method2([covariant-by-declaration core::String a = #C2]) → dynamic;
 }
 abstract class C7 extends core::Object {
   synthetic constructor •() → mai::C7
diff --git a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.expect
index 3d387ff..a8b5e14 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.expect
@@ -79,7 +79,7 @@
     return false;
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
-  generic-covariant-impl field mai::RenderObjectWithChildMixin::ChildType? _child = null;
+  covariant-by-class field mai::RenderObjectWithChildMixin::ChildType? _child = null;
   get child() → mai::RenderObjectWithChildMixin::ChildType?
     return this.{mai::RenderObjectWithChildMixin::_child}{mai::RenderObjectWithChildMixin::ChildType?};
 }
@@ -95,7 +95,7 @@
   }
 }
 abstract class _RenderProxyBox&RenderBox&RenderObjectWithChildMixin extends mai::RenderBox implements mai::RenderObjectWithChildMixin<mai::RenderBox> /*isAnonymousMixin,isEliminatedMixin*/  {
-  generic-covariant-impl field mai::RenderBox? _child = null;
+  covariant-by-class field mai::RenderBox? _child = null;
   synthetic constructor •() → mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin
     : super mai::RenderBox::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
index 9cec757..c282428 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.outline.expect
@@ -70,7 +70,7 @@
     ;
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
-  generic-covariant-impl field mai::RenderObjectWithChildMixin::ChildType? _child;
+  covariant-by-class field mai::RenderObjectWithChildMixin::ChildType? _child;
   get child() → mai::RenderObjectWithChildMixin::ChildType?
     ;
 }
@@ -84,7 +84,7 @@
     ;
 }
 abstract class _RenderProxyBox&RenderBox&RenderObjectWithChildMixin extends mai::RenderBox implements mai::RenderObjectWithChildMixin<mai::RenderBox> /*isAnonymousMixin,isEliminatedMixin*/  {
-  generic-covariant-impl field mai::RenderBox? _child;
+  covariant-by-class field mai::RenderBox? _child;
   synthetic constructor •() → mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin
     : super mai::RenderBox::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.transformed.expect
index 03d4e82..04fe3fa 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mixin_from_dill2/main.dart.weak.transformed.expect
@@ -81,7 +81,7 @@
     return false;
 }
 abstract class RenderObjectWithChildMixin<ChildType extends mai::RenderObject> extends mai::RenderObject /*isMixinDeclaration*/  {
-  generic-covariant-impl field mai::RenderObjectWithChildMixin::ChildType? _child = null;
+  covariant-by-class field mai::RenderObjectWithChildMixin::ChildType? _child = null;
   get child() → mai::RenderObjectWithChildMixin::ChildType?
     return this.{mai::RenderObjectWithChildMixin::_child}{mai::RenderObjectWithChildMixin::ChildType?};
 }
@@ -97,7 +97,7 @@
   }
 }
 abstract class _RenderProxyBox&RenderBox&RenderObjectWithChildMixin extends mai::RenderBox implements mai::RenderObjectWithChildMixin<mai::RenderBox> /*isAnonymousMixin,isEliminatedMixin*/  {
-  generic-covariant-impl field mai::RenderBox? _child = null;
+  covariant-by-class field mai::RenderBox? _child = null;
   synthetic constructor •() → mai::_RenderProxyBox&RenderBox&RenderObjectWithChildMixin
     : super mai::RenderBox::•()
     ;
diff --git a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
index ffde2b7..740dfc6 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.expect
@@ -86,7 +86,7 @@
   #C1 = #date
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #date=
   #C6 = #expires
   #C7 = #expires=
diff --git a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.outline.expect
index 4e5f43d..4ba2007 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.outline.expect
@@ -86,72 +86,72 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#date)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#date=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#expires)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#expires=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#ifModifiedSince)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#ifModifiedSince=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#host)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#host=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#port)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#port=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#contentType)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#contentType=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#contentLength)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#contentLength=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#persistentConnection)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#persistentConnection=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#chunkedTransferEncoding)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#chunkedTransferEncoding=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#value)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#add)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#preserveHeaderCase)
@@ -160,18 +160,18 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#preserveHeaderCase)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#remove)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#removeAll)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#forEach)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> SymbolConstant(#noFolding)
 Evaluated: ListLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///mock_http_headers.dart:13:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-sdk:///sdk/lib/_http/http.dart:782:8 -> SymbolConstant(#clear)
 Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/_http/http.dart:782:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-sdk:///sdk/lib/_http/http.dart:782:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/_http/http.dart:782:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-sdk:///sdk/lib/_http/http.dart:782:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 268, effectively constant: 91
diff --git a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
index a1fdb15..e753783 100644
--- a/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/mock_http_headers.dart.weak.transformed.expect
@@ -86,7 +86,7 @@
   #C1 = #date
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #date=
   #C6 = #expires
   #C7 = #expires=
diff --git a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.expect
index 64a13f8..1d47863 100644
--- a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.expect
@@ -9,13 +9,13 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  method method({required covariant core::int named = #C1}) → void {}
+  method method({required covariant-by-declaration core::int named = #C1}) → void {}
 }
 abstract class _Class&Super&Mixin = self::Super with req::Mixin /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Class&Super&Mixin
     : super self::Super::•()
     ;
-  forwarding-stub method /*isLegacy*/ method({covariant core::int* named = #C1}) → void
+  forwarding-stub method /*isLegacy*/ method({covariant-by-declaration core::int* named = #C1}) → void
     return super.{req::Mixin::method}(named: named);
   abstract member-signature operator /*isLegacy*/ ==(dynamic other) → core::bool*; -> core::Object::==
 }
@@ -28,7 +28,7 @@
   synthetic constructor •() → self::SubClass
     : super self::Class::•()
     ;
-  method method({required covariant core::int named = #C1}) → void {}
+  method method({required covariant-by-declaration core::int named = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
index 2e76a53..1e8de64 100644
--- a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.outline.expect
@@ -8,14 +8,14 @@
 class Super extends core::Object {
   synthetic constructor •() → self::Super
     ;
-  method method({required covariant core::int named}) → void
+  method method({required covariant-by-declaration core::int named}) → void
     ;
 }
 abstract class _Class&Super&Mixin = self::Super with req::Mixin /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_Class&Super&Mixin
     : super self::Super::•()
     ;
-  forwarding-stub method /*isLegacy*/ method({covariant core::int* named}) → void
+  forwarding-stub method /*isLegacy*/ method({covariant-by-declaration core::int* named}) → void
     return super.{req::Mixin::method}(named: named);
   abstract member-signature operator /*isLegacy*/ ==(dynamic other) → core::bool*; -> core::Object::==
 }
@@ -26,7 +26,7 @@
 class SubClass extends self::Class {
   synthetic constructor •() → self::SubClass
     ;
-  method method({required covariant core::int named}) → void
+  method method({required covariant-by-declaration core::int named}) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.transformed.expect
index 548c807..aa7a7ec 100644
--- a/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/required_parameter_mixed_from_opt_out.dart.weak.transformed.expect
@@ -9,13 +9,13 @@
   synthetic constructor •() → self::Super
     : super core::Object::•()
     ;
-  method method({required covariant core::int named = #C1}) → void {}
+  method method({required covariant-by-declaration core::int named = #C1}) → void {}
 }
 abstract class _Class&Super&Mixin extends self::Super implements req::Mixin /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → self::_Class&Super&Mixin
     : super self::Super::•()
     ;
-  method /*isLegacy, from org-dartlang-testcase:///required_parameter_mixed_from_opt_out_lib.dart */ method({covariant core::int* named = #C1}) → void {}
+  method /*isLegacy, from org-dartlang-testcase:///required_parameter_mixed_from_opt_out_lib.dart */ method({covariant-by-declaration core::int* named = #C1}) → void {}
   abstract member-signature operator /*isLegacy*/ ==(dynamic other) → core::bool*; -> core::Object::==
 }
 class Class extends self::_Class&Super&Mixin {
@@ -27,7 +27,7 @@
   synthetic constructor •() → self::SubClass
     : super self::Class::•()
     ;
-  method method({required covariant core::int named = #C1}) → void {}
+  method method({required covariant-by-declaration core::int named = #C1}) → void {}
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect
index 184f291..726b3b6 100644
--- a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::C<self::C::T%, self::C::S%, self::C::U%>
     : super core::Object::•()
     ;
-  method promoteNullable(generic-covariant-impl self::C::T? t) → void {
+  method promoteNullable(covariant-by-class self::C::T? t) → void {
     if(t is{ForNonNullableByDefault} core::int) {
       t{self::C::T? & core::int /* '?' & '!' = '!' */};
     }
@@ -17,7 +17,7 @@
       t{self::C::T? & core::int? /* '?' & '?' = '?' */};
     }
   }
-  method nullableAsUndetermined(generic-covariant-impl self::C::S? s) → void {
+  method nullableAsUndetermined(covariant-by-class self::C::S? s) → void {
     s as{ForNonNullableByDefault} self::C::U%;
   }
 }
@@ -40,7 +40,7 @@
   synthetic constructor •() → typ::D<typ::D::T*>*
     : super core::Object::•()
     ;
-  method promoteLegacy(generic-covariant-impl typ::D::T* t) → void {
+  method promoteLegacy(covariant-by-class typ::D::T* t) → void {
     if(t is core::int*) {
       let final typ::D::T* & core::int* /* '*' & '*' = '*' */ #t1 = t{typ::D::T* & core::int* /* '*' & '*' = '*' */} in #t1 == null ?{core::bool*} null : #t1.{core::int::isEven}{core::bool*};
     }
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.outline.expect
index ef4392a..11e222c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.outline.expect
@@ -7,9 +7,9 @@
 class C<T extends core::num?, S extends core::Object? = dynamic, U extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T%, self::C::S%, self::C::U%>
     ;
-  method promoteNullable(generic-covariant-impl self::C::T? t) → void
+  method promoteNullable(covariant-by-class self::C::T? t) → void
     ;
-  method nullableAsUndetermined(generic-covariant-impl self::C::S? s) → void
+  method nullableAsUndetermined(covariant-by-class self::C::S? s) → void
     ;
 }
 static method main() → dynamic
@@ -22,7 +22,7 @@
 class D<T extends core::num*> extends core::Object {
   synthetic constructor •() → self2::D<self2::D::T*>*
     ;
-  method promoteLegacy(generic-covariant-impl self2::D::T* t) → void
+  method promoteLegacy(covariant-by-class self2::D::T* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect
index 184f291..726b3b6 100644
--- a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::C<self::C::T%, self::C::S%, self::C::U%>
     : super core::Object::•()
     ;
-  method promoteNullable(generic-covariant-impl self::C::T? t) → void {
+  method promoteNullable(covariant-by-class self::C::T? t) → void {
     if(t is{ForNonNullableByDefault} core::int) {
       t{self::C::T? & core::int /* '?' & '!' = '!' */};
     }
@@ -17,7 +17,7 @@
       t{self::C::T? & core::int? /* '?' & '?' = '?' */};
     }
   }
-  method nullableAsUndetermined(generic-covariant-impl self::C::S? s) → void {
+  method nullableAsUndetermined(covariant-by-class self::C::S? s) → void {
     s as{ForNonNullableByDefault} self::C::U%;
   }
 }
@@ -40,7 +40,7 @@
   synthetic constructor •() → typ::D<typ::D::T*>*
     : super core::Object::•()
     ;
-  method promoteLegacy(generic-covariant-impl typ::D::T* t) → void {
+  method promoteLegacy(covariant-by-class typ::D::T* t) → void {
     if(t is core::int*) {
       let final typ::D::T* & core::int* /* '*' & '*' = '*' */ #t1 = t{typ::D::T* & core::int* /* '*' & '*' = '*' */} in #t1 == null ?{core::bool*} null : #t1.{core::int::isEven}{core::bool*};
     }
diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect
index ead85b1..5076108 100644
--- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect
@@ -428,17 +428,15 @@
     : uns::OptInClass6b::field = field, super core::Object::•()
     ;
 }
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<uns::E> values = #C8;
   static const field uns::E e1 = #C3;
   static const field uns::E e2 = #C6;
-  const constructor •(core::int index, core::String _name) → uns::E
-    : uns::E::index = index, uns::E::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → uns::E
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{uns::E::_name}{core::String};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
 }
 extension OptInExtension on uns::OptInClass1 {
   operator [] = uns::OptInExtension|[];
@@ -611,10 +609,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.e1"
+  #C2 = "e1"
   #C3 = uns::E {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "E.e2"
+  #C5 = "e2"
   #C6 = uns::E {index:#C4, _name:#C5}
   #C7 = null
   #C8 = <uns::E*>[#C3, #C6]
@@ -624,4 +622,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///unsound_checks_lib.dart:
 - E. (from org-dartlang-testcase:///unsound_checks_lib.dart:145:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.outline.expect
index 2a7d4ca..f33df52 100644
--- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.outline.expect
@@ -201,17 +201,15 @@
   constructor •(core::int field) → self2::OptInClass6b
     ;
 }
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<self2::E> values = const <self2::E>[self2::E::e1, self2::E::e2];
-  static const field self2::E e1 = const self2::E::•(0, "E.e1");
-  static const field self2::E e2 = const self2::E::•(1, "E.e2");
-  const constructor •(core::int index, core::String _name) → self2::E
-    : self2::E::index = index, self2::E::_name = _name, super core::Object::•()
+  static const field self2::E e1 = const self2::E::•(0, "e1");
+  static const field self2::E e2 = const self2::E::•(1, "e2");
+  const constructor •(core::int index, core::String name) → self2::E
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self2::E::_name}{core::String};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
 }
 extension OptInExtension on self2::OptInClass1 {
   operator [] = self2::OptInExtension|[];
@@ -296,7 +294,7 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///unsound_checks_lib.dart:145:6 -> ListConstant(const <E*>[const E{E.index: 0, E._name: "E.e1"}, const E{E.index: 1, E._name: "E.e2"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///unsound_checks_lib.dart:145:10 -> InstanceConstant(const E{E.index: 0, E._name: "E.e1"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///unsound_checks_lib.dart:145:14 -> InstanceConstant(const E{E.index: 1, E._name: "E.e2"})
-Extra constant evaluation: evaluated: 7, effectively constant: 3
+Evaluated: ListLiteral @ org-dartlang-testcase:///unsound_checks_lib.dart:145:6 -> ListConstant(const <E*>[const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///unsound_checks_lib.dart:145:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///unsound_checks_lib.dart:145:14 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "e2"})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect
index ede6557..e968e87e 100644
--- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect
@@ -428,17 +428,15 @@
     : uns::OptInClass6b::field = field, super core::Object::•()
     ;
 }
-class E extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class E extends core::_Enum /*isEnum*/  {
   static const field core::List<uns::E> values = #C8;
   static const field uns::E e1 = #C3;
   static const field uns::E e2 = #C6;
-  const constructor •(core::int index, core::String _name) → uns::E
-    : uns::E::index = index, uns::E::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → uns::E
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{uns::E::_name}{core::String};
+    return "E.${this.{core::_Enum::_name}{core::String}}";
 }
 extension OptInExtension on uns::OptInClass1 {
   operator [] = uns::OptInExtension|[];
@@ -611,10 +609,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "E.e1"
+  #C2 = "e1"
   #C3 = uns::E {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "E.e2"
+  #C5 = "e2"
   #C6 = uns::E {index:#C4, _name:#C5}
   #C7 = null
   #C8 = <uns::E*>[#C3, #C6]
@@ -639,10 +637,11 @@
 Evaluated: VariableGet @ org-dartlang-testcase:///unsound_checks_lib.dart:39:56 -> IntConstant(42)
 Evaluated: VariableGet @ org-dartlang-testcase:///unsound_checks_lib.dart:134:5 -> IntConstant(0)
 Evaluated: VariableGet @ org-dartlang-testcase:///unsound_checks_lib.dart:134:5 -> IntConstant(0)
-Extra constant evaluation: evaluated: 719, effectively constant: 18
+Extra constant evaluation: evaluated: 720, effectively constant: 18
 
 
 Constructor coverage from constants:
 org-dartlang-testcase:///unsound_checks_lib.dart:
 - E. (from org-dartlang-testcase:///unsound_checks_lib.dart:145:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.expect
index 7f113e8..8a70236 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.expect
@@ -61,6 +61,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.outline.expect
index 7186093..155b834 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.outline.expect
@@ -50,8 +50,8 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field.dart:18:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 19, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.transformed.expect
index df2d4d7..b0155f6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.weak.transformed.expect
@@ -61,6 +61,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.expect
index 61e3a07..c5739de 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.expect
@@ -80,6 +80,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.outline.expect
index 2893e4f..7bead7e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.outline.expect
@@ -69,8 +69,8 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_arent_mixed_in.dart:12:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 21, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.transformed.expect
index 3e76d00..b013048 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.weak.transformed.expect
@@ -82,6 +82,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.expect
index 6a99e7d..49adc6d 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.expect
@@ -41,7 +41,7 @@
     : super self::B::•()
     ;
   no-such-method-forwarder set foo(core::int* value) → void
-    return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D*
@@ -65,7 +65,7 @@
     : super self::D::•()
     ;
   no-such-method-forwarder get foo() → core::int*
-    return this.{self::D::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::int*;
+    return this.{self::D::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 1, #C2, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::int*;
 }
 static method expectTypeError(() →* dynamic callback) → void {
   try {
@@ -85,7 +85,7 @@
 constants  {
   #C1 = #foo=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = #foo
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = #foo
+  #C5 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.outline.expect
index 1dc0f42..90f26d3 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.outline.expect
@@ -72,9 +72,9 @@
 Extra constant evaluation status:
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_one_defined.dart:17:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 19, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.transformed.expect
index c260566..c864fe9 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.weak.transformed.expect
@@ -41,7 +41,7 @@
     : super self::B::•()
     ;
   no-such-method-forwarder set foo(core::int* value) → void
-    return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(value)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(value)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 abstract class D extends core::Object implements self::A {
   synthetic constructor •() → self::D*
@@ -65,7 +65,7 @@
     : super self::D::•()
     ;
   no-such-method-forwarder get foo() → core::int*
-    return this.{self::D::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::int*;
+    return this.{self::D::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 1, #C2, #C5, core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::int*;
 }
 static method expectTypeError(() →* dynamic callback) → void {
   try {
@@ -85,7 +85,7 @@
 constants  {
   #C1 = #foo=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = #foo
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = #foo
+  #C5 = <dynamic>[]
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.expect
index bd14f88..aa77c05 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::X*>* foo = null;
+  covariant-by-class field core::List<self::A::X*>* foo = null;
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   no-such-method-forwarder get foo() → core::List<core::int*>*
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::List<core::int*>*;
-  no-such-method-forwarder set foo(generic-covariant-impl core::List<core::int*>* value) → void
+  no-such-method-forwarder set foo(covariant-by-class core::List<core::int*>* value) → void
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
 }
 static method expectTypeError(() →* dynamic callback) → void {
@@ -56,6 +56,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.outline.expect
index 34e2e03..630a250 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::X*>* foo;
+  covariant-by-class field core::List<self::A::X*>* foo;
   synthetic constructor •() → self::A<self::A::X*>*
     ;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   no-such-method-forwarder get foo() → core::List<core::int*>*
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 1, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::List<core::int*>*;
-  no-such-method-forwarder set foo(generic-covariant-impl core::List<core::int*>* value) → void
+  no-such-method-forwarder set foo(covariant-by-class core::List<core::int*>* value) → void
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
 }
 static method expectTypeError(() →* dynamic callback) → void
@@ -46,8 +46,8 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_accessors_from_field_with_substitution.dart:18:11 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 19, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.transformed.expect
index f79ed2b..dd3926e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field core::List<self::A::X*>* foo = null;
+  covariant-by-class field core::List<self::A::X*>* foo = null;
   synthetic constructor •() → self::A<self::A::X*>*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   no-such-method-forwarder get foo() → core::List<core::int*>*
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::List<core::int*>*;
-  no-such-method-forwarder set foo(generic-covariant-impl core::List<core::int*>* value) → void
+  no-such-method-forwarder set foo(covariant-by-class core::List<core::int*>* value) → void
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(value)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
 }
 static method expectTypeError(() →* dynamic callback) → void {
@@ -56,6 +56,6 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.expect
index f520300..06dbd87 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.expect
@@ -48,5 +48,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.outline.expect
index 63fd5b6..d735754 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.outline.expect
@@ -46,5 +46,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_interface_nsm_inherited.dart:16:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_interface_nsm_inherited.dart:16:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_interface_nsm_inherited.dart:16:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_interface_nsm_inherited.dart:16:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_interface_nsm_inherited.dart:16:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.transformed.expect
index f520300..06dbd87 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_interface_nsm_inherited.dart.weak.transformed.expect
@@ -48,5 +48,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.expect
index dc49492..a135817 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.expect
@@ -7,9 +7,9 @@
     : super core::Object::•()
     ;
   no-such-method-forwarder set push(core::int* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::int* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder set float(covariant-by-declaration core::int* x) → void
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
   method noSuchMethod(core::Invocation* i) → dynamic
     return core::print("${this.{self::Base::runtimeType}{core::Type*}}: ${i.{core::Invocation::positionalArguments}{core::List<dynamic>*}.{core::List::[]}(0){(core::int*) →* dynamic}}");
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -32,9 +32,9 @@
     : super self::Base::•()
     ;
   no-such-method-forwarder set push(core::num* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::num* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder set float(covariant-by-declaration core::num* x) → void
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {
   core::List<self::Base*>* list = <self::Base*>[new self::Me::•(), new self::You::•()];
@@ -65,7 +65,6 @@
 constants  {
   #C1 = #push=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = #float=
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = #float=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.outline.expect
index f455c15..0bfffe0 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.outline.expect
@@ -7,7 +7,7 @@
     ;
   no-such-method-forwarder set push(core::int* x) → void
     return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#push=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::int* x) → void
+  no-such-method-forwarder set float(covariant-by-declaration core::int* x) → void
     return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#float=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
   method noSuchMethod(core::Invocation* i) → dynamic
     ;
@@ -30,7 +30,7 @@
     ;
   no-such-method-forwarder set push(core::num* x) → void
     return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#push=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::num* x) → void
+  no-such-method-forwarder set float(covariant-by-declaration core::num* x) → void
     return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#float=, 2, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic
@@ -40,14 +40,14 @@
 Extra constant evaluation status:
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:8:7 -> SymbolConstant(#push=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:8:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:8:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:8:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:9:7 -> SymbolConstant(#float=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:9:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:9:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:9:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:16:7 -> SymbolConstant(#push=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:16:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:16:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:16:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:17:7 -> SymbolConstant(#float=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:17:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:17:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_abstract_different_type.dart:17:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 40, effectively constant: 12
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.transformed.expect
index 8560742..6307698 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_abstract_different_type.dart.weak.transformed.expect
@@ -7,9 +7,9 @@
     : super core::Object::•()
     ;
   no-such-method-forwarder set push(core::int* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::int* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder set float(covariant-by-declaration core::int* x) → void
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
   method noSuchMethod(core::Invocation* i) → dynamic
     return core::print("${this.{self::Base::runtimeType}{core::Type*}}: ${i.{core::Invocation::positionalArguments}{core::List<dynamic>*}.{core::List::[]}(0){(core::int*) →* dynamic}}");
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -32,9 +32,9 @@
     : super self::Base::•()
     ;
   no-such-method-forwarder set push(core::num* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
-  no-such-method-forwarder set float(covariant core::num* x) → void
-    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
+  no-such-method-forwarder set float(covariant-by-declaration core::num* x) → void
+    return this.{self::Base::noSuchMethod}(new core::_InvocationMirror::_withType(#C4, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {
   core::List<self::Base*>* list = core::_GrowableList::_literal2<self::Base*>(new self::Me::•(), new self::You::•());
@@ -71,7 +71,6 @@
 constants  {
   #C1 = #push=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = #float=
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = #float=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.expect
index 0cf425b..819fb97 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.expect
@@ -37,7 +37,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   no-such-method-forwarder method eatFood(core::String* food) → core::bool*
-    return this.{self::MockCat::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+    return this.{self::MockCat::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 class MockCat2 extends self::MockCat {
   synthetic constructor •() → self::MockCat2*
@@ -49,21 +49,21 @@
   synthetic constructor •() → self::MockCat3*
     : super self::MockCat2::•()
     ;
-  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C5}) → core::bool*
-    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C6: amount}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C4}) → core::bool*
+    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C5: amount}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 class MockCat4 extends self::MockCat2 implements self::HungryCat {
   synthetic constructor •() → self::MockCat4*
     : super self::MockCat2::•()
     ;
-  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C5, core::double* yetAnother = #C5}) → core::bool*
-    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C6: amount, #C7: yetAnother}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C4, core::double* yetAnother = #C4}) → core::bool*
+    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[food]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C5: amount, #C6: yetAnother}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 abstract class HungryCat extends core::Object {
   synthetic constructor •() → self::HungryCat*
     : super core::Object::•()
     ;
-  abstract method eatFood(core::String* food, {core::double* amount = #C5, core::double* yetAnother = #C5}) → core::bool*;
+  abstract method eatFood(core::String* food, {core::double* amount = #C4, core::double* yetAnother = #C4}) → core::bool*;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -80,9 +80,8 @@
 constants  {
   #C1 = #eatFood
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = null
-  #C6 = #amount
-  #C7 = #yetAnother
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = null
+  #C5 = #amount
+  #C6 = #yetAnother
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
index 70cdbd7..d7affcd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.outline.expect
@@ -74,7 +74,7 @@
 Extra constant evaluation status:
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:8:8 -> SymbolConstant(#eatFood)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:8:8 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:8:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:8:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:23:8 -> SymbolConstant(#eatFood)
 Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:23:8 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///abstract_override_with_different_signature.dart:23:8 -> SymbolConstant(#amount)
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.transformed.expect
index 708efab..04f0e46 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_override_with_different_signature.dart.weak.transformed.expect
@@ -37,7 +37,7 @@
   abstract member-signature method toString() → core::String*; -> core::Object::toString
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
   no-such-method-forwarder method eatFood(core::String* food) → core::bool*
-    return this.{self::MockCat::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+    return this.{self::MockCat::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 class MockCat2 extends self::MockCat {
   synthetic constructor •() → self::MockCat2*
@@ -49,21 +49,21 @@
   synthetic constructor •() → self::MockCat3*
     : super self::MockCat2::•()
     ;
-  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C5}) → core::bool*
-    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C6: amount}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C4}) → core::bool*
+    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C5: amount}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 class MockCat4 extends self::MockCat2 implements self::HungryCat {
   synthetic constructor •() → self::MockCat4*
     : super self::MockCat2::•()
     ;
-  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C5, core::double* yetAnother = #C5}) → core::bool*
-    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C6: amount, #C7: yetAnother}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
+  no-such-method-forwarder method eatFood(core::String* food, {core::double* amount = #C4, core::double* yetAnother = #C4}) → core::bool*
+    return this.{self::MockCat2::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(food)), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C5: amount, #C6: yetAnother}))){(core::Invocation*) →* dynamic} as{TypeError,ForDynamic} core::bool*;
 }
 abstract class HungryCat extends core::Object {
   synthetic constructor •() → self::HungryCat*
     : super core::Object::•()
     ;
-  abstract method eatFood(core::String* food, {core::double* amount = #C5, core::double* yetAnother = #C5}) → core::bool*;
+  abstract method eatFood(core::String* food, {core::double* amount = #C4, core::double* yetAnother = #C4}) → core::bool*;
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -80,9 +80,8 @@
 constants  {
   #C1 = #eatFood
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
-  #C5 = null
-  #C6 = #amount
-  #C7 = #yetAnother
+  #C3 = <core::Symbol*, dynamic>{)
+  #C4 = null
+  #C5 = #amount
+  #C6 = #yetAnother
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.expect
index 5ca82cf..701d4d2 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.expect
@@ -70,5 +70,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.outline.expect
index d512245..ada8b9c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.outline.expect
@@ -69,5 +69,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///concrete_method_over_forwarder_in_mixin_application.dart:10:3 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///concrete_method_over_forwarder_in_mixin_application.dart:10:3 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///concrete_method_over_forwarder_in_mixin_application.dart:10:3 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///concrete_method_over_forwarder_in_mixin_application.dart:10:3 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///concrete_method_over_forwarder_in_mixin_application.dart:10:3 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 11, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.transformed.expect
index a104017..84b3825 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.weak.transformed.expect
@@ -70,5 +70,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.expect
index daa0b7e..bde35bd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.expect
@@ -7,11 +7,11 @@
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation* i) → dynamic {
-    if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C1)) {
+    if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C1) {
       return i.{core::Invocation::namedArguments}{core::Map<core::Symbol*, dynamic>*}.{core::Map::[]}(#C2){(core::Object*) →* dynamic};
     }
     else
-      if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C3)) {
+      if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C3) {
         return i.{core::Invocation::positionalArguments}{core::List<dynamic>*}.{core::List::[]}(0){(core::int*) →* dynamic};
       }
     return null;
@@ -56,5 +56,5 @@
   #C5 = 42
   #C6 = <core::Type*>[]
   #C7 = <dynamic>[]
-  #C8 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C7}
+  #C8 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.outline.expect
index 8b928ae..846c39a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.outline.expect
@@ -38,5 +38,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///default_argument_values.dart:21:10 -> SymbolConstant(#bar)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///default_argument_values.dart:22:7 -> SymbolConstant(#hest)
 Evaluated: ListLiteral @ org-dartlang-testcase:///default_argument_values.dart:22:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///default_argument_values.dart:22:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///default_argument_values.dart:22:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 22, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.transformed.expect
index 8ad93c0..5f876af 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/default_argument_values.dart.weak.transformed.expect
@@ -7,11 +7,11 @@
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation* i) → dynamic {
-    if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C1)) {
+    if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C1) {
       return i.{core::Invocation::namedArguments}{core::Map<core::Symbol*, dynamic>*}.{core::Map::[]}(#C2){(core::Object*) →* dynamic};
     }
     else
-      if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} (#C3)) {
+      if(i.{core::Invocation::memberName}{core::Symbol*} =={core::Symbol::==}{(core::Object*) →* core::bool*} #C3) {
         return i.{core::Invocation::positionalArguments}{core::List<dynamic>*}.{core::List::[]}(0){(core::int*) →* dynamic};
       }
     return null;
@@ -56,5 +56,5 @@
   #C5 = 42
   #C6 = <core::Type*>[]
   #C7 = <dynamic>[]
-  #C8 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C7}
+  #C8 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.expect
index 3633d99..d8b80bb 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.expect
@@ -58,5 +58,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.outline.expect
index 84fb848..6ceff7c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.outline.expect
@@ -57,5 +57,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///duplicated_abstract_method.dart:10:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_abstract_method.dart:10:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_abstract_method.dart:10:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///duplicated_abstract_method.dart:10:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///duplicated_abstract_method.dart:10:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.transformed.expect
index 3633d99..d8b80bb 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.weak.transformed.expect
@@ -58,5 +58,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.expect
index d34e31b..9966f87 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.expect
@@ -110,7 +110,7 @@
   #C2 = #bar
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #baz
   #C7 = #y
   #C8 = #z
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
index 094b3e6..595f2f9 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.outline.expect
@@ -106,30 +106,30 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:12:11 -> SymbolConstant(#bar)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:12:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:12:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:12:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:12:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:13:8 -> SymbolConstant(#baz)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:13:8 -> ListConstant(const <Type*>[])
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:13:8 -> SymbolConstant(#y)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:13:8 -> SymbolConstant(#z)
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:11:12 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:11:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:11:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation.dart:11:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:7:11 -> SymbolConstant(#_privateGetter)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:7:11 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:7:11 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:7:11 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:7:11 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> SymbolConstant(#_privateField)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:9:8 -> SymbolConstant(#_privateMethod)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:9:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:9:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:9:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:9:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:8:12 -> SymbolConstant(#_privateSetter=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:8:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:8:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:8:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> SymbolConstant(#_privateField=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarder_propagation_lib.dart:6:7 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 79, effectively constant: 29
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.transformed.expect
index a9d34c1..184900a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarder_propagation.dart.weak.transformed.expect
@@ -110,7 +110,7 @@
   #C2 = #bar
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #baz
   #C7 = #y
   #C8 = #z
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.expect
index d1335fe..ae8492b 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.expect
@@ -65,5 +65,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.outline.expect
index 50e7958..59617d9 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.outline.expect
@@ -64,9 +64,9 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///forwarders_not_assumed_from_mixin.dart:10:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 18, effectively constant: 8
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.transformed.expect
index 34cb10d..3500cab 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.weak.transformed.expect
@@ -65,5 +65,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.expect
index c296d8d..fc7e726 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.expect
@@ -48,5 +48,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.outline.expect
index a80f440..ee28386 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.outline.expect
@@ -47,5 +47,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///interface_with_concrete.dart:16:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_concrete.dart:16:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_concrete.dart:16:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_concrete.dart:16:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_concrete.dart:16:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.transformed.expect
index c296d8d..fc7e726 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_concrete.dart.weak.transformed.expect
@@ -48,5 +48,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.expect
index 11b038f..6d19094 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.expect
@@ -88,5 +88,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.outline.expect
index 1e32f6d..a3f5875 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.outline.expect
@@ -86,13 +86,13 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///interface_with_nsm.dart:15:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 28, effectively constant: 12
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.transformed.expect
index f59813d..2f2d023 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.weak.transformed.expect
@@ -88,5 +88,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.expect
index dabbcd8..8c67697 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.expect
@@ -82,6 +82,6 @@
   #C1 = #bar
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.outline.expect
index fd16e8c42..18495ea 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.outline.expect
@@ -83,8 +83,8 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:17:12 -> SymbolConstant(#bar)
 Evaluated: ListLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:17:12 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:17:12 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:17:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:17:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:16:12 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:16:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:16:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///multiple_abstract_setters.dart:16:12 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 19, effectively constant: 7
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.transformed.expect
index 6b924bd..b44b511 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/multiple_abstract_setters.dart.weak.transformed.expect
@@ -82,6 +82,6 @@
   #C1 = #bar
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo=
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.expect
index 70c94e6..d2fa4dd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.expect
@@ -32,5 +32,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.outline.expect
index 19eb325..3a87a23 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.outline.expect
@@ -32,5 +32,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes.dart:13:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes.dart:13:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes.dart:13:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes.dart:13:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes.dart:13:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.transformed.expect
index 70c94e6..d2fa4dd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes.dart.weak.transformed.expect
@@ -32,5 +32,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.expect
index 3d97e3b..c2f527e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.expect
@@ -42,5 +42,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.outline.expect
index dfa0b76..d402380 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.outline.expect
@@ -40,5 +40,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes_chain.dart:14:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes_chain.dart:14:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes_chain.dart:14:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes_chain.dart:14:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///no_forwarders_for_abstract_classes_chain.dart:14:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.transformed.expect
index 3d97e3b..c2f527e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/no_forwarders_for_abstract_classes_chain.dart.weak.transformed.expect
@@ -42,5 +42,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.expect
index 10936ab..fadd73d 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.expect
@@ -23,13 +23,12 @@
     : super self::M::•()
     ;
   no-such-method-forwarder method call(core::String* s) → void
-    return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(<dynamic>[s]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = #call
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.outline.expect
index 568adcd..7d0e3bc 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.outline.expect
@@ -30,5 +30,5 @@
 Extra constant evaluation status:
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_inherited.dart:13:8 -> SymbolConstant(#call)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_inherited.dart:13:8 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_inherited.dart:13:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_inherited.dart:13:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 10, effectively constant: 3
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.transformed.expect
index 1562403..2d67bde 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_inherited.dart.weak.transformed.expect
@@ -23,13 +23,12 @@
     : super self::M::•()
     ;
   no-such-method-forwarder method call(core::String* s) → void
-    return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(s)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = #call
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.expect
index 6c574dd..a59d331 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.expect
@@ -48,5 +48,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.outline.expect
index 7e408bc..e712ddfd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.outline.expect
@@ -47,5 +47,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///nsm_mixed_in.dart:15:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_mixed_in.dart:15:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///nsm_mixed_in.dart:15:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_mixed_in.dart:15:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///nsm_mixed_in.dart:15:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 10, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.transformed.expect
index 2b5bfe3..cb0867c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.weak.transformed.expect
@@ -49,5 +49,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.expect
index fe2544d..00429c3 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.expect
@@ -65,5 +65,5 @@
   #C1 = #org-dartlang-testcase:///private.dart::_hest
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.outline.expect
index 0808248..f92373e 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.outline.expect
@@ -64,9 +64,9 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> SymbolConstant(#_hest)
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> SymbolConstant(#_hest)
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///private_module.dart:11:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 16, effectively constant: 8
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.transformed.expect
index fe2544d..00429c3 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.weak.transformed.expect
@@ -65,5 +65,5 @@
   #C1 = #org-dartlang-testcase:///private.dart::_hest
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.expect
index ed53431..3a2ae93 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.expect
@@ -33,5 +33,5 @@
   #C1 = #org-dartlang-testcase:///private_same.dart::_foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.outline.expect
index 0dd40c8..29e4137 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.outline.expect
@@ -33,5 +33,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///private_same.dart:10:8 -> SymbolConstant(#_foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_same.dart:10:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///private_same.dart:10:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///private_same.dart:10:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///private_same.dart:10:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.transformed.expect
index ed53431..3a2ae93 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private_same.dart.weak.transformed.expect
@@ -33,5 +33,5 @@
   #C1 = #org-dartlang-testcase:///private_same.dart::_foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.expect
index 864895d..51c933a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.expect
@@ -27,5 +27,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.outline.expect
index 98fba7e..e2c2872 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.outline.expect
@@ -27,5 +27,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///same.dart:14:8 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///same.dart:14:8 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///same.dart:14:8 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///same.dart:14:8 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///same.dart:14:8 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.transformed.expect
index 864895d..51c933a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/same.dart.weak.transformed.expect
@@ -27,5 +27,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.expect
index 938f3bd..8a8122f 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.expect
@@ -18,7 +18,7 @@
     ;
   method foo(core::int* x) → void {}
   no-such-method-forwarder set foo(core::int* x) → void
-    return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(<dynamic>[x]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
   method noSuchMethod(core::Invocation* i) → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -36,6 +36,5 @@
 constants  {
   #C1 = #foo=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.outline.expect
index 5bae423..c7f32f0 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.outline.expect
@@ -38,5 +38,5 @@
 Extra constant evaluation status:
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///setter_not_shadowed_by_method.dart:12:12 -> SymbolConstant(#foo=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///setter_not_shadowed_by_method.dart:12:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///setter_not_shadowed_by_method.dart:12:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///setter_not_shadowed_by_method.dart:12:12 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 10, effectively constant: 3
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.transformed.expect
index 20c7622..a9f095f 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.weak.transformed.expect
@@ -18,7 +18,7 @@
     ;
   method foo(core::int* x) → void {}
   no-such-method-forwarder set foo(core::int* x) → void
-    return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation*) →* dynamic};
+    return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 2, #C2, core::List::unmodifiable<dynamic>(core::_GrowableList::_literal1<dynamic>(x)), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))){(core::Invocation*) →* dynamic};
   method noSuchMethod(core::Invocation* i) → dynamic
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -36,6 +36,5 @@
 constants  {
   #C1 = #foo=
   #C2 = <core::Type*>[]
-  #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C3 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.expect
index 24d4686..8314ecf 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.expect
@@ -64,5 +64,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.outline.expect
index ca3cde3..037de6a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.outline.expect
@@ -62,5 +62,5 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///subst_on_forwarder.dart:10:5 -> SymbolConstant(#foo)
 Evaluated: ListLiteral @ org-dartlang-testcase:///subst_on_forwarder.dart:10:5 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///subst_on_forwarder.dart:10:5 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///subst_on_forwarder.dart:10:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///subst_on_forwarder.dart:10:5 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 11, effectively constant: 4
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.transformed.expect
index d830d60..cc8da4c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.weak.transformed.expect
@@ -65,5 +65,5 @@
   #C1 = #foo
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
 }
diff --git a/pkg/front_end/testcases/none/equals.dart.strong.expect b/pkg/front_end/testcases/none/equals.dart.strong.expect
index 4aec504..48c8140 100644
--- a/pkg/front_end/testcases/none/equals.dart.strong.expect
+++ b/pkg/front_end/testcases/none/equals.dart.strong.expect
@@ -121,7 +121,7 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::Class<self::Class::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::Class<self::Class::T%> other) → core::bool
     return true;
   method method(dynamic o) → dynamic {}
 }
@@ -207,8 +207,8 @@
   null != nonNullableClass.method();
                                  ^" in nonNullableClass.{self::Class::method}{<inapplicable>}.(){() → invalid-type} == null);
   core::print("EqualsNull (constant null)");
-  (#C1) == null;
-  !((#C1) == null);
+  #C1 == null;
+  !(#C1 == null);
   nonNullableObject == null;
   !(nonNullableObject == null);
   nonNullableObject == null;
@@ -221,24 +221,24 @@
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass == nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nonNullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:135:23: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass != nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nonNullableClass == null;
   !(nonNullableClass == null);
   nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:139:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass == nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:140:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass != nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nullableClass == null;
   !(nullableClass == null);
   dyn == null;
diff --git a/pkg/front_end/testcases/none/equals.dart.strong.transformed.expect b/pkg/front_end/testcases/none/equals.dart.strong.transformed.expect
index 6c3c0a7..b78c256 100644
--- a/pkg/front_end/testcases/none/equals.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/equals.dart.strong.transformed.expect
@@ -121,7 +121,7 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::Class<self::Class::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::Class<self::Class::T%> other) → core::bool
     return true;
   method method(dynamic o) → dynamic {}
 }
@@ -207,8 +207,8 @@
   null != nonNullableClass.method();
                                  ^" in nonNullableClass.{self::Class::method}{<inapplicable>}.(){() → invalid-type} == null);
   core::print("EqualsNull (constant null)");
-  (#C1) == null;
-  !((#C1) == null);
+  #C1 == null;
+  !(#C1 == null);
   nonNullableObject == null;
   !(nonNullableObject == null);
   nonNullableObject == null;
@@ -221,24 +221,24 @@
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass == nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nonNullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:135:23: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass != nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nonNullableClass == null;
   !(nonNullableClass == null);
   nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:139:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass == nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:140:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass != nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nullableClass == null;
   !(nullableClass == null);
   dyn == null;
diff --git a/pkg/front_end/testcases/none/equals.dart.weak.expect b/pkg/front_end/testcases/none/equals.dart.weak.expect
index fa1f1e0..7950f55 100644
--- a/pkg/front_end/testcases/none/equals.dart.weak.expect
+++ b/pkg/front_end/testcases/none/equals.dart.weak.expect
@@ -122,7 +122,7 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::Class<self::Class::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::Class<self::Class::T%> other) → core::bool
     return true;
   method method(dynamic o) → dynamic {}
 }
@@ -208,8 +208,8 @@
   null != nonNullableClass.method();
                                  ^" in nonNullableClass.{self::Class::method}{<inapplicable>}.(){() → invalid-type} == null);
   core::print("EqualsNull (constant null)");
-  (#C1) == null;
-  !((#C1) == null);
+  #C1 == null;
+  !(#C1 == null);
   nonNullableObject == null;
   !(nonNullableObject == null);
   nonNullableObject == null;
@@ -222,24 +222,24 @@
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass == nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nonNullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:135:23: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass != nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nonNullableClass == null;
   !(nonNullableClass == null);
   nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:139:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass == nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:140:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass != nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nullableClass == null;
   !(nullableClass == null);
   dyn == null;
diff --git a/pkg/front_end/testcases/none/equals.dart.weak.outline.expect b/pkg/front_end/testcases/none/equals.dart.weak.outline.expect
index 911e7cd..9d054c2 100644
--- a/pkg/front_end/testcases/none/equals.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/equals.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class Class<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::T%>
     ;
-  operator ==(covariant generic-covariant-impl self::Class<self::Class::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::Class<self::Class::T%> other) → core::bool
     ;
   method method(dynamic o) → dynamic
     ;
diff --git a/pkg/front_end/testcases/none/equals.dart.weak.transformed.expect b/pkg/front_end/testcases/none/equals.dart.weak.transformed.expect
index c28a57aa..0a4bf9a 100644
--- a/pkg/front_end/testcases/none/equals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/equals.dart.weak.transformed.expect
@@ -122,7 +122,7 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator ==(covariant generic-covariant-impl self::Class<self::Class::T%> other) → core::bool
+  operator ==(covariant-by-declaration covariant-by-class self::Class<self::Class::T%> other) → core::bool
     return true;
   method method(dynamic o) → dynamic {}
 }
@@ -208,8 +208,8 @@
   null != nonNullableClass.method();
                                  ^" in nonNullableClass.{self::Class::method}{<inapplicable>}.(){() → invalid-type} == null);
   core::print("EqualsNull (constant null)");
-  (#C1) == null;
-  !((#C1) == null);
+  #C1 == null;
+  !(#C1 == null);
   nonNullableObject == null;
   !(nonNullableObject == null);
   nonNullableObject == null;
@@ -222,24 +222,24 @@
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass == nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nonNullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:135:23: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nonNullableClass != nullValue;
-                      ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                      ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nonNullableClass == null;
   !(nonNullableClass == null);
   nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:139:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass == nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?;
   !(nullableClass =={self::Class::==}{(self::Class<core::String>) → core::bool} invalid-expression "pkg/front_end/testcases/none/equals.dart:140:20: Error: The argument type 'Object?' can't be assigned to the parameter type 'Class<String>?'.
  - 'Object' is from 'dart:core'.
  - 'Class' is from 'pkg/front_end/testcases/none/equals.dart'.
   nullableClass != nullValue;
-                   ^" in (#C1) as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
+                   ^" in #C1 as{TypeError,ForNonNullableByDefault} self::Class<core::String>?);
   nullableClass == null;
   !(nullableClass == null);
   dyn == null;
diff --git a/pkg/front_end/testcases/none/method_invocation.dart.strong.expect b/pkg/front_end/testcases/none/method_invocation.dart.strong.expect
index be70e1c..78a320a 100644
--- a/pkg/front_end/testcases/none/method_invocation.dart.strong.expect
+++ b/pkg/front_end/testcases/none/method_invocation.dart.strong.expect
@@ -111,7 +111,7 @@
     return 0.5;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   field core::Function nonNullableFunctionField;
   field core::Function? nullableFunctionField = null;
   field () → void nonNullableFunctionTypedField;
diff --git a/pkg/front_end/testcases/none/method_invocation.dart.strong.transformed.expect b/pkg/front_end/testcases/none/method_invocation.dart.strong.transformed.expect
index 4493594..0d8be8a 100644
--- a/pkg/front_end/testcases/none/method_invocation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/method_invocation.dart.strong.transformed.expect
@@ -111,7 +111,7 @@
     return 0.5;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   field core::Function nonNullableFunctionField;
   field core::Function? nullableFunctionField = null;
   field () → void nonNullableFunctionTypedField;
diff --git a/pkg/front_end/testcases/none/method_invocation.dart.weak.expect b/pkg/front_end/testcases/none/method_invocation.dart.weak.expect
index faa00f4..b20ca89 100644
--- a/pkg/front_end/testcases/none/method_invocation.dart.weak.expect
+++ b/pkg/front_end/testcases/none/method_invocation.dart.weak.expect
@@ -112,7 +112,7 @@
     return 0.5;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   field core::Function nonNullableFunctionField;
   field core::Function? nullableFunctionField = null;
   field () → void nonNullableFunctionTypedField;
diff --git a/pkg/front_end/testcases/none/method_invocation.dart.weak.outline.expect b/pkg/front_end/testcases/none/method_invocation.dart.weak.outline.expect
index 7358160..69ce7d0 100644
--- a/pkg/front_end/testcases/none/method_invocation.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/method_invocation.dart.weak.outline.expect
@@ -9,7 +9,7 @@
     ;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   field core::Function nonNullableFunctionField;
   field core::Function? nullableFunctionField;
   field () → void nonNullableFunctionTypedField;
diff --git a/pkg/front_end/testcases/none/method_invocation.dart.weak.transformed.expect b/pkg/front_end/testcases/none/method_invocation.dart.weak.transformed.expect
index 7908441..4681584 100644
--- a/pkg/front_end/testcases/none/method_invocation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/method_invocation.dart.weak.transformed.expect
@@ -112,7 +112,7 @@
     return 0.5;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   field core::Function nonNullableFunctionField;
   field core::Function? nullableFunctionField = null;
   field () → void nonNullableFunctionTypedField;
diff --git a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.expect b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.expect
index 940de1e..e88db74 100644
--- a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.expect
+++ b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → mai::SuperClass
     : super core::Object::•()
     ;
-  method method(covariant core::int i) → void {}
+  method method(covariant-by-declaration core::int i) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → mai::Mixin
@@ -33,7 +33,7 @@
   synthetic constructor •() → mai::_Class&SuperClass&Mixin
     : super mai::SuperClass::•()
     ;
-  forwarding-stub method method(covariant core::num i) → void
+  forwarding-stub method method(covariant-by-declaration core::num i) → void
     return super.{mai::Mixin::method}(i);
 }
 class Class extends mai::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.transformed.expect b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.transformed.expect
index 940de1e..e88db74 100644
--- a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → mai::SuperClass
     : super core::Object::•()
     ;
-  method method(covariant core::int i) → void {}
+  method method(covariant-by-declaration core::int i) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → mai::Mixin
@@ -33,7 +33,7 @@
   synthetic constructor •() → mai::_Class&SuperClass&Mixin
     : super mai::SuperClass::•()
     ;
-  forwarding-stub method method(covariant core::num i) → void
+  forwarding-stub method method(covariant-by-declaration core::num i) → void
     return super.{mai::Mixin::method}(i);
 }
 class Class extends mai::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.expect b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.expect
index 940de1e..e88db74 100644
--- a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.expect
+++ b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → mai::SuperClass
     : super core::Object::•()
     ;
-  method method(covariant core::int i) → void {}
+  method method(covariant-by-declaration core::int i) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → mai::Mixin
@@ -33,7 +33,7 @@
   synthetic constructor •() → mai::_Class&SuperClass&Mixin
     : super mai::SuperClass::•()
     ;
-  forwarding-stub method method(covariant core::num i) → void
+  forwarding-stub method method(covariant-by-declaration core::num i) → void
     return super.{mai::Mixin::method}(i);
 }
 class Class extends mai::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.outline.expect b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.outline.expect
index b6f679a..8a68721 100644
--- a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.outline.expect
@@ -18,7 +18,7 @@
 class SuperClass extends core::Object {
   synthetic constructor •() → mai::SuperClass
     ;
-  method method(covariant core::int i) → void
+  method method(covariant-by-declaration core::int i) → void
     ;
 }
 class Mixin extends core::Object {
@@ -31,7 +31,7 @@
   synthetic constructor •() → mai::_Class&SuperClass&Mixin
     : super mai::SuperClass::•()
     ;
-  forwarding-stub method method(covariant core::num i) → void
+  forwarding-stub method method(covariant-by-declaration core::num i) → void
     return super.{mai::Mixin::method}(i);
 }
 class Class extends mai::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.transformed.expect b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.transformed.expect
index 940de1e..e88db74 100644
--- a/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/mixin_application_declares/main.dart.weak.transformed.expect
@@ -21,7 +21,7 @@
   synthetic constructor •() → mai::SuperClass
     : super core::Object::•()
     ;
-  method method(covariant core::int i) → void {}
+  method method(covariant-by-declaration core::int i) → void {}
 }
 class Mixin extends core::Object {
   synthetic constructor •() → mai::Mixin
@@ -33,7 +33,7 @@
   synthetic constructor •() → mai::_Class&SuperClass&Mixin
     : super mai::SuperClass::•()
     ;
-  forwarding-stub method method(covariant core::num i) → void
+  forwarding-stub method method(covariant-by-declaration core::num i) → void
     return super.{mai::Mixin::method}(i);
 }
 class Class extends mai::_Class&SuperClass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_covariant.dart.strong.expect b/pkg/front_end/testcases/none/mixin_covariant.dart.strong.expect
index 81796a7..ebd8305 100644
--- a/pkg/front_end/testcases/none/mixin_covariant.dart.strong.expect
+++ b/pkg/front_end/testcases/none/mixin_covariant.dart.strong.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num argument1, core::num argument2) → core::String
     return "Superclass";
-  method method3(core::num argument1, covariant core::int argument2) → core::String
+  method method3(core::num argument1, covariant-by-declaration core::int argument2) → core::String
     return "Superclass";
-  method method4(core::num argument1, covariant core::num argument2) → core::String
+  method method4(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return "Superclass";
 }
 class Mixin extends core::Object {
@@ -21,11 +21,11 @@
     ;
   method method1(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method2(covariant core::int argument1, core::num argument2) → core::String
+  method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return "Mixin";
   method method3(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method4(covariant core::int argument1, core::int argument2) → core::String
+  method method4(covariant-by-declaration core::int argument1, core::int argument2) → core::String
     return "Mixin";
 }
 abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/  {
@@ -34,11 +34,11 @@
     ;
   mixin-super-stub method method1(core::num argument1, core::num argument2) → core::String
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int argument1, core::num argument2) → core::String
+  mixin-super-stub method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num argument1, covariant core::num argument2) → core::String
+  forwarding-stub method method3(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int argument1, covariant core::int argument2) → core::String
+  forwarding-stub method method4(covariant-by-declaration core::int argument1, covariant-by-declaration core::int argument2) → core::String
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_covariant.dart.strong.transformed.expect b/pkg/front_end/testcases/none/mixin_covariant.dart.strong.transformed.expect
index 81796a7..ebd8305 100644
--- a/pkg/front_end/testcases/none/mixin_covariant.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/mixin_covariant.dart.strong.transformed.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num argument1, core::num argument2) → core::String
     return "Superclass";
-  method method3(core::num argument1, covariant core::int argument2) → core::String
+  method method3(core::num argument1, covariant-by-declaration core::int argument2) → core::String
     return "Superclass";
-  method method4(core::num argument1, covariant core::num argument2) → core::String
+  method method4(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return "Superclass";
 }
 class Mixin extends core::Object {
@@ -21,11 +21,11 @@
     ;
   method method1(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method2(covariant core::int argument1, core::num argument2) → core::String
+  method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return "Mixin";
   method method3(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method4(covariant core::int argument1, core::int argument2) → core::String
+  method method4(covariant-by-declaration core::int argument1, core::int argument2) → core::String
     return "Mixin";
 }
 abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/  {
@@ -34,11 +34,11 @@
     ;
   mixin-super-stub method method1(core::num argument1, core::num argument2) → core::String
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int argument1, core::num argument2) → core::String
+  mixin-super-stub method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num argument1, covariant core::num argument2) → core::String
+  forwarding-stub method method3(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int argument1, covariant core::int argument2) → core::String
+  forwarding-stub method method4(covariant-by-declaration core::int argument1, covariant-by-declaration core::int argument2) → core::String
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.expect b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.expect
index 81796a7..ebd8305 100644
--- a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num argument1, core::num argument2) → core::String
     return "Superclass";
-  method method3(core::num argument1, covariant core::int argument2) → core::String
+  method method3(core::num argument1, covariant-by-declaration core::int argument2) → core::String
     return "Superclass";
-  method method4(core::num argument1, covariant core::num argument2) → core::String
+  method method4(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return "Superclass";
 }
 class Mixin extends core::Object {
@@ -21,11 +21,11 @@
     ;
   method method1(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method2(covariant core::int argument1, core::num argument2) → core::String
+  method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return "Mixin";
   method method3(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method4(covariant core::int argument1, core::int argument2) → core::String
+  method method4(covariant-by-declaration core::int argument1, core::int argument2) → core::String
     return "Mixin";
 }
 abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/  {
@@ -34,11 +34,11 @@
     ;
   mixin-super-stub method method1(core::num argument1, core::num argument2) → core::String
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int argument1, core::num argument2) → core::String
+  mixin-super-stub method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num argument1, covariant core::num argument2) → core::String
+  forwarding-stub method method3(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int argument1, covariant core::int argument2) → core::String
+  forwarding-stub method method4(covariant-by-declaration core::int argument1, covariant-by-declaration core::int argument2) → core::String
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.outline.expect
index d858827..a2ed6ce 100644
--- a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.outline.expect
@@ -9,9 +9,9 @@
     ;
   method method2(core::num argument1, core::num argument2) → core::String
     ;
-  method method3(core::num argument1, covariant core::int argument2) → core::String
+  method method3(core::num argument1, covariant-by-declaration core::int argument2) → core::String
     ;
-  method method4(core::num argument1, covariant core::num argument2) → core::String
+  method method4(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     ;
 }
 class Mixin extends core::Object {
@@ -19,11 +19,11 @@
     ;
   method method1(core::num argument1, core::num argument2) → core::String
     ;
-  method method2(covariant core::int argument1, core::num argument2) → core::String
+  method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     ;
   method method3(core::num argument1, core::num argument2) → core::String
     ;
-  method method4(covariant core::int argument1, core::int argument2) → core::String
+  method method4(covariant-by-declaration core::int argument1, core::int argument2) → core::String
     ;
 }
 abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/  {
@@ -32,11 +32,11 @@
     ;
   mixin-super-stub method method1(core::num argument1, core::num argument2) → core::String
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int argument1, core::num argument2) → core::String
+  mixin-super-stub method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num argument1, covariant core::num argument2) → core::String
+  forwarding-stub method method3(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int argument1, covariant core::int argument2) → core::String
+  forwarding-stub method method4(covariant-by-declaration core::int argument1, covariant-by-declaration core::int argument2) → core::String
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.transformed.expect
index 81796a7..ebd8305 100644
--- a/pkg/front_end/testcases/none/mixin_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/mixin_covariant.dart.weak.transformed.expect
@@ -10,9 +10,9 @@
     return "Superclass";
   method method2(core::num argument1, core::num argument2) → core::String
     return "Superclass";
-  method method3(core::num argument1, covariant core::int argument2) → core::String
+  method method3(core::num argument1, covariant-by-declaration core::int argument2) → core::String
     return "Superclass";
-  method method4(core::num argument1, covariant core::num argument2) → core::String
+  method method4(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return "Superclass";
 }
 class Mixin extends core::Object {
@@ -21,11 +21,11 @@
     ;
   method method1(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method2(covariant core::int argument1, core::num argument2) → core::String
+  method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return "Mixin";
   method method3(core::num argument1, core::num argument2) → core::String
     return "Mixin";
-  method method4(covariant core::int argument1, core::int argument2) → core::String
+  method method4(covariant-by-declaration core::int argument1, core::int argument2) → core::String
     return "Mixin";
 }
 abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/  {
@@ -34,11 +34,11 @@
     ;
   mixin-super-stub method method1(core::num argument1, core::num argument2) → core::String
     return super.{self::Mixin::method1}(argument1, argument2);
-  mixin-super-stub method method2(covariant core::int argument1, core::num argument2) → core::String
+  mixin-super-stub method method2(covariant-by-declaration core::int argument1, core::num argument2) → core::String
     return super.{self::Mixin::method2}(argument1, argument2);
-  forwarding-stub method method3(core::num argument1, covariant core::num argument2) → core::String
+  forwarding-stub method method3(core::num argument1, covariant-by-declaration core::num argument2) → core::String
     return super.{self::Mixin::method3}(argument1, argument2);
-  forwarding-stub method method4(covariant core::int argument1, covariant core::int argument2) → core::String
+  forwarding-stub method method4(covariant-by-declaration core::int argument1, covariant-by-declaration core::int argument2) → core::String
     return super.{self::Mixin::method4}(argument1, argument2);
 }
 class Class extends self::_Class&Superclass&Mixin {
diff --git a/pkg/front_end/testcases/none/operator.dart.strong.expect b/pkg/front_end/testcases/none/operator.dart.strong.expect
index 670534d..a272988 100644
--- a/pkg/front_end/testcases/none/operator.dart.strong.expect
+++ b/pkg/front_end/testcases/none/operator.dart.strong.expect
@@ -47,13 +47,13 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
+  operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
     return other;
   operator unary-() → self::Class<self::Class::T%>
     return this;
   operator [](core::int index) → self::Class<self::Class::T%>
     return this;
-  operator []=(core::int index, generic-covariant-impl self::Class<self::Class::T%> value) → void {}
+  operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void {}
   method method(core::double o) → core::int
     return 42;
 }
diff --git a/pkg/front_end/testcases/none/operator.dart.strong.transformed.expect b/pkg/front_end/testcases/none/operator.dart.strong.transformed.expect
index 8e6c707..657d373 100644
--- a/pkg/front_end/testcases/none/operator.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/operator.dart.strong.transformed.expect
@@ -47,13 +47,13 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
+  operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
     return other;
   operator unary-() → self::Class<self::Class::T%>
     return this;
   operator [](core::int index) → self::Class<self::Class::T%>
     return this;
-  operator []=(core::int index, generic-covariant-impl self::Class<self::Class::T%> value) → void {}
+  operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void {}
   method method(core::double o) → core::int
     return 42;
 }
diff --git a/pkg/front_end/testcases/none/operator.dart.weak.expect b/pkg/front_end/testcases/none/operator.dart.weak.expect
index 712a616..4de73e4 100644
--- a/pkg/front_end/testcases/none/operator.dart.weak.expect
+++ b/pkg/front_end/testcases/none/operator.dart.weak.expect
@@ -48,13 +48,13 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
+  operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
     return other;
   operator unary-() → self::Class<self::Class::T%>
     return this;
   operator [](core::int index) → self::Class<self::Class::T%>
     return this;
-  operator []=(core::int index, generic-covariant-impl self::Class<self::Class::T%> value) → void {}
+  operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void {}
   method method(core::double o) → core::int
     return 42;
 }
diff --git a/pkg/front_end/testcases/none/operator.dart.weak.outline.expect b/pkg/front_end/testcases/none/operator.dart.weak.outline.expect
index b105389..12e40df 100644
--- a/pkg/front_end/testcases/none/operator.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/operator.dart.weak.outline.expect
@@ -5,13 +5,13 @@
 class Class<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::Class<self::Class::T%>
     ;
-  operator +(generic-covariant-impl self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
+  operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
     ;
   operator unary-() → self::Class<self::Class::T%>
     ;
   operator [](core::int index) → self::Class<self::Class::T%>
     ;
-  operator []=(core::int index, generic-covariant-impl self::Class<self::Class::T%> value) → void
+  operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void
     ;
   method method(core::double o) → core::int
     ;
diff --git a/pkg/front_end/testcases/none/operator.dart.weak.transformed.expect b/pkg/front_end/testcases/none/operator.dart.weak.transformed.expect
index 059550b..0614059 100644
--- a/pkg/front_end/testcases/none/operator.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/operator.dart.weak.transformed.expect
@@ -48,13 +48,13 @@
   synthetic constructor •() → self::Class<self::Class::T%>
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
+  operator +(covariant-by-class self::Class<self::Class::T%> other) → self::Class<self::Class::T%>
     return other;
   operator unary-() → self::Class<self::Class::T%>
     return this;
   operator [](core::int index) → self::Class<self::Class::T%>
     return this;
-  operator []=(core::int index, generic-covariant-impl self::Class<self::Class::T%> value) → void {}
+  operator []=(core::int index, covariant-by-class self::Class<self::Class::T%> value) → void {}
   method method(core::double o) → core::int
     return 42;
 }
diff --git a/pkg/front_end/testcases/none/property_get.dart.strong.expect b/pkg/front_end/testcases/none/property_get.dart.strong.expect
index 4f2e9fa..e4aa752 100644
--- a/pkg/front_end/testcases/none/property_get.dart.strong.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.strong.expect
@@ -47,7 +47,7 @@
     return 0;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   constructor •(self::Class2::T% field) → self::Class2<self::Class2::T%>
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/none/property_get.dart.strong.transformed.expect b/pkg/front_end/testcases/none/property_get.dart.strong.transformed.expect
index 4f2e9fa..e4aa752 100644
--- a/pkg/front_end/testcases/none/property_get.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.strong.transformed.expect
@@ -47,7 +47,7 @@
     return 0;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   constructor •(self::Class2::T% field) → self::Class2<self::Class2::T%>
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/none/property_get.dart.weak.expect b/pkg/front_end/testcases/none/property_get.dart.weak.expect
index 95f436b..20f72b6 100644
--- a/pkg/front_end/testcases/none/property_get.dart.weak.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.weak.expect
@@ -48,7 +48,7 @@
     return 0;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   constructor •(self::Class2::T% field) → self::Class2<self::Class2::T%>
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/none/property_get.dart.weak.outline.expect b/pkg/front_end/testcases/none/property_get.dart.weak.outline.expect
index fcd26f0..8a24ed3 100644
--- a/pkg/front_end/testcases/none/property_get.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.weak.outline.expect
@@ -13,7 +13,7 @@
     ;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   constructor •(self::Class2::T% field) → self::Class2<self::Class2::T%>
     ;
   method call() → core::int
diff --git a/pkg/front_end/testcases/none/property_get.dart.weak.transformed.expect b/pkg/front_end/testcases/none/property_get.dart.weak.transformed.expect
index 95f436b..20f72b6 100644
--- a/pkg/front_end/testcases/none/property_get.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.weak.transformed.expect
@@ -48,7 +48,7 @@
     return 0;
 }
 class Class2<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field self::Class2::T% field;
+  covariant-by-class field self::Class2::T% field;
   constructor •(self::Class2::T% field) → self::Class2<self::Class2::T%>
     : self::Class2::field = field, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index 428a77b..d331e38 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -4,7 +4,10 @@
 
 const_functions/const_functions_const_factory: VerificationError
 constructor_tearoffs/lowering/invalid_redirect: VerificationError
+extension_types/access_setter_as_getter: ExpectationFileMismatchSerialized # Expected.
+extension_types/call_not_get: ExpectationFileMismatchSerialized # Expected.
 extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
+extension_types/show_and_run_ceil: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple: ExpectationFileMismatchSerialized
 extension_types/simple_getter_resolution: ExpectationFileMismatchSerialized
 extension_types/simple_method_resolution: ExpectationFileMismatchSerialized
diff --git a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.expect b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.expect
index 7ff9ec5..ada899d 100644
--- a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.expect
@@ -16,7 +16,7 @@
   invalid-expression "pkg/front_end/testcases/rasta/constant_get_and_invoke.dart:8:4: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   c();
-   ^" in (#C1){<unresolved>}.call();
+   ^" in #C1{<unresolved>}.call();
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.transformed.expect
index 7ff9ec5..ada899d 100644
--- a/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/constant_get_and_invoke.dart.weak.transformed.expect
@@ -16,7 +16,7 @@
   invalid-expression "pkg/front_end/testcases/rasta/constant_get_and_invoke.dart:8:4: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   c();
-   ^" in (#C1){<unresolved>}.call();
+   ^" in #C1{<unresolved>}.call();
 }
 
 constants  {
diff --git a/pkg/front_end/testcases/rasta/enum.dart.weak.expect b/pkg/front_end/testcases/rasta/enum.dart.weak.expect
index 99090fe..71a6850 100644
--- a/pkg/front_end/testcases/rasta/enum.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/enum.dart.weak.expect
@@ -2,17 +2,17 @@
 import self as self;
 import "dart:core" as core;
 
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = #C7;
   static const field self::Foo* ec1 = #C3;
   static const field self::Foo* ec2 = #C6;
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -27,10 +27,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Foo.ec1"
+  #C2 = "ec1"
   #C3 = self::Foo {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Foo.ec2"
+  #C5 = "ec2"
   #C6 = self::Foo {index:#C4, _name:#C5}
   #C7 = <self::Foo*>[#C3, #C6]
 }
@@ -39,4 +39,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - Foo. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/rasta/enum.dart.weak.outline.expect b/pkg/front_end/testcases/rasta/enum.dart.weak.outline.expect
index 3d39d28..ce9532d 100644
--- a/pkg/front_end/testcases/rasta/enum.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/rasta/enum.dart.weak.outline.expect
@@ -2,17 +2,17 @@
 import self as self;
 import "dart:core" as core;
 
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = const <self::Foo*>[self::Foo::ec1, self::Foo::ec2];
-  static const field self::Foo* ec1 = const self::Foo::•(0, "Foo.ec1");
-  static const field self::Foo* ec2 = const self::Foo::•(1, "Foo.ec2");
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  static const field self::Foo* ec1 = const self::Foo::•(0, "ec1");
+  static const field self::Foo* ec2 = const self::Foo::•(1, "ec2");
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -28,7 +28,7 @@
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const <Foo*>[const Foo{Foo.index: 0, Foo._name: "Foo.ec1"}, const Foo{Foo.index: 1, Foo._name: "Foo.ec2"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const Foo{Foo.index: 0, Foo._name: "Foo.ec1"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const Foo{Foo.index: 1, Foo._name: "Foo.ec2"})
-Extra constant evaluation: evaluated: 7, effectively constant: 3
+Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const <Foo*>[const Foo{_Enum.index: 0, _Enum._name: "ec1"}, const Foo{_Enum.index: 1, _Enum._name: "ec2"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "ec1"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "ec2"})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
diff --git a/pkg/front_end/testcases/rasta/enum.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/enum.dart.weak.transformed.expect
index 99090fe..71a6850 100644
--- a/pkg/front_end/testcases/rasta/enum.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/enum.dart.weak.transformed.expect
@@ -2,17 +2,17 @@
 import self as self;
 import "dart:core" as core;
 
-class Foo extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int* index;
-  final field core::String* _name;
+class Foo extends core::_Enum /*isEnum*/  {
   static const field core::List<self::Foo*>* values = #C7;
   static const field self::Foo* ec1 = #C3;
   static const field self::Foo* ec2 = #C6;
-  const constructor •(core::int* index, core::String* _name) → self::Foo*
-    : self::Foo::index = index, self::Foo::_name = _name, super core::Object::•()
+  const constructor •(core::int* index, core::String* name) → self::Foo*
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String*
-    return this.{self::Foo::_name}{core::String*};
+    return "Foo.${this.{core::_Enum::_name}{core::String}}";
+  abstract member-signature get index() → core::int*; -> core::_Enum::index
+  abstract member-signature get _name() → core::String*; -> core::_Enum::_name
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -27,10 +27,10 @@
 
 constants  {
   #C1 = 0
-  #C2 = "Foo.ec1"
+  #C2 = "ec1"
   #C3 = self::Foo {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "Foo.ec2"
+  #C5 = "ec2"
   #C6 = self::Foo {index:#C4, _name:#C5}
   #C7 = <self::Foo*>[#C3, #C6]
 }
@@ -39,4 +39,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - Foo. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/rasta/issue_000032.dart.weak.expect b/pkg/front_end/testcases/rasta/issue_000032.dart.weak.expect
index 2849f6d..a34f230 100644
--- a/pkg/front_end/testcases/rasta/issue_000032.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/issue_000032.dart.weak.expect
@@ -53,7 +53,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   C<
-   ^" in (#C1){<unresolved>}.<(invalid-expression "pkg/front_end/testcases/rasta/issue_000032.dart:11:1: Error: This couldn't be parsed.
+   ^" in #C1{<unresolved>}.<(invalid-expression "pkg/front_end/testcases/rasta/issue_000032.dart:11:1: Error: This couldn't be parsed.
 }
 ^");
 }
diff --git a/pkg/front_end/testcases/rasta/issue_000032.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/issue_000032.dart.weak.transformed.expect
index 2849f6d..a34f230 100644
--- a/pkg/front_end/testcases/rasta/issue_000032.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000032.dart.weak.transformed.expect
@@ -53,7 +53,7 @@
  - 'Type' is from 'dart:core'.
 Try correcting the operator to an existing operator, or defining a '<' operator.
   C<
-   ^" in (#C1){<unresolved>}.<(invalid-expression "pkg/front_end/testcases/rasta/issue_000032.dart:11:1: Error: This couldn't be parsed.
+   ^" in #C1{<unresolved>}.<(invalid-expression "pkg/front_end/testcases/rasta/issue_000032.dart:11:1: Error: This couldn't be parsed.
 }
 ^");
 }
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.expect
index 18d9024..a5f9ac1 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U*>* {
     return this.{self::A::field}{core::List<self::A::U*>*};
   }
-  set setter(generic-covariant-impl self::A::S* s) → void {}
+  set setter(covariant-by-class self::A::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.outline.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.outline.expect
index 9e77b8e..5dae040 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.outline.expect
@@ -17,7 +17,7 @@
     ;
   get getter() → core::List<self::A::U*>*
     ;
-  set setter(generic-covariant-impl self::A::S* s) → void
+  set setter(covariant-by-class self::A::S* s) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.transformed.expect
index 9534f31..9cfd4c4 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.weak.transformed.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U*>* {
     return this.{self::A::field}{core::List<self::A::U*>*};
   }
-  set setter(generic-covariant-impl self::A::S* s) → void {}
+  set setter(covariant-by-class self::A::S* s) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/rasta/mixin_library.dart.weak.expect b/pkg/front_end/testcases/rasta/mixin_library.dart.weak.expect
index bca934b..e6d1af6 100644
--- a/pkg/front_end/testcases/rasta/mixin_library.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/mixin_library.dart.weak.expect
@@ -13,13 +13,13 @@
   field dynamic x = self::f();
   field dynamic y = null;
   field dynamic z = null;
-  generic-covariant-impl field self::Mixin::T* t = null;
+  covariant-by-class field self::Mixin::T* t = null;
   synthetic constructor •() → self::Mixin<self::Mixin::T*>*
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo(){dynamic}.+(self::f());
-  method g(generic-covariant-impl self::Mixin::T* a) → self::Mixin::T*
+  method g(covariant-by-class self::Mixin::T* a) → self::Mixin::T*
     return null;
   method h() → dynamic
     return self::V();
diff --git a/pkg/front_end/testcases/rasta/mixin_library.dart.weak.outline.expect b/pkg/front_end/testcases/rasta/mixin_library.dart.weak.outline.expect
index f69d1f3..4eb68b3 100644
--- a/pkg/front_end/testcases/rasta/mixin_library.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/rasta/mixin_library.dart.weak.outline.expect
@@ -6,12 +6,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  generic-covariant-impl field self::Mixin::T* t;
+  covariant-by-class field self::Mixin::T* t;
   synthetic constructor •() → self::Mixin<self::Mixin::T*>*
     ;
   method foo() → dynamic
     ;
-  method g(generic-covariant-impl self::Mixin::T* a) → self::Mixin::T*
+  method g(covariant-by-class self::Mixin::T* a) → self::Mixin::T*
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.expect b/pkg/front_end/testcases/rasta/static.dart.weak.expect
index 245d8d6..3be7b62 100644
--- a/pkg/front_end/testcases/rasta/static.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.weak.expect
@@ -257,11 +257,11 @@
     invalid-expression "pkg/front_end/testcases/rasta/static.dart:53:23: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticConstant();
-                      ^" in (#C1){<unresolved>}.call();
+                      ^" in #C1{<unresolved>}.call();
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:54:27: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     use(Foo.staticConstant());
-                          ^" in (#C1){<unresolved>}.call());
+                          ^" in #C1{<unresolved>}.call());
     invalid-expression "pkg/front_end/testcases/rasta/static.dart:55:20: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticField();
@@ -302,7 +302,7 @@
             ^^^^^^^^^^^^");
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
+    #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant ??= 87;
         ^^^^^^^^^^^^^^" : null;
     self::use(let final core::int* #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
@@ -310,7 +310,7 @@
             ^^^^^^^^^^^^^^" : #t11);
     self::Foo::staticField == null ?{core::int*} self::Foo::staticField = 87 : null;
     self::use(let final core::int* #t12 = self::Foo::staticField in #t12 == null ?{core::int*} self::Foo::staticField = 87 : #t12);
-    (#C2) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
+    #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction ??= 87;
         ^^^^^^^^^^^^^^" : null;
     self::use(let final () →* dynamic #t13 = #C2 in #t13 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
index 831077b..4938d46 100644
--- a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
@@ -257,11 +257,11 @@
     invalid-expression "pkg/front_end/testcases/rasta/static.dart:53:23: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticConstant();
-                      ^" in (#C1){<unresolved>}.call();
+                      ^" in #C1{<unresolved>}.call();
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:54:27: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     use(Foo.staticConstant());
-                          ^" in (#C1){<unresolved>}.call());
+                          ^" in #C1{<unresolved>}.call());
     invalid-expression "pkg/front_end/testcases/rasta/static.dart:55:20: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticField();
@@ -302,7 +302,7 @@
             ^^^^^^^^^^^^");
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
+    #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant ??= 87;
         ^^^^^^^^^^^^^^" : null;
     self::use(let final core::int* #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
@@ -310,7 +310,7 @@
             ^^^^^^^^^^^^^^" : #t11);
     self::Foo::staticField == null ?{core::int*} self::Foo::staticField = 87 : null;
     self::use(let final core::int* #t12 = self::Foo::staticField in #t12 == null ?{core::int*} self::Foo::staticField = 87 : #t12);
-    (#C2) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
+    #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction ??= 87;
         ^^^^^^^^^^^^^^" : null;
     self::use(let final () →* dynamic #t13 = #C2 in #t13 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.weak.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.weak.expect
index 0c41919..0327051 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.weak.expect
@@ -42,11 +42,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → self::_C&Super&Mixin::V*
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl self::_C&Super&Mixin::V* value) → void
+  mixin-super-stub set t(covariant-by-class self::_C&Super&Mixin::V* value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl self::_C&Super&Mixin::V* a) → self::_C&Super&Mixin::V*
+  mixin-super-stub method g(covariant-by-class self::_C&Super&Mixin::V* a) → self::_C&Super&Mixin::V*
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -80,11 +80,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → dynamic
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl dynamic value) → void
+  mixin-super-stub set t(covariant-by-class dynamic value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl dynamic a) → dynamic
+  mixin-super-stub method g(covariant-by-class dynamic a) → dynamic
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -118,11 +118,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → self::C2::V*
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl self::C2::V* value) → void
+  mixin-super-stub set t(covariant-by-class self::C2::V* value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl self::C2::V* a) → self::C2::V*
+  mixin-super-stub method g(covariant-by-class self::C2::V* a) → self::C2::V*
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -151,11 +151,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → dynamic
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl dynamic value) → void
+  mixin-super-stub set t(covariant-by-class dynamic value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl dynamic a) → dynamic
+  mixin-super-stub method g(covariant-by-class dynamic a) → dynamic
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -186,13 +186,13 @@
   field dynamic x = mix::f();
   field dynamic y = null;
   field dynamic z = null;
-  generic-covariant-impl field mix::Mixin::T* t = null;
+  covariant-by-class field mix::Mixin::T* t = null;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T*>*
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo(){dynamic}.+(mix::f());
-  method g(generic-covariant-impl mix::Mixin::T* a) → mix::Mixin::T*
+  method g(covariant-by-class mix::Mixin::T* a) → mix::Mixin::T*
     return null;
   method h() → dynamic
     return mix::V();
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.weak.outline.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.weak.outline.expect
index 81ef6ef..c1b58e7 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.weak.outline.expect
@@ -41,11 +41,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → self::_C&Super&Mixin::V*
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl self::_C&Super&Mixin::V* value) → void
+  mixin-super-stub set t(covariant-by-class self::_C&Super&Mixin::V* value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl self::_C&Super&Mixin::V* a) → self::_C&Super&Mixin::V*
+  mixin-super-stub method g(covariant-by-class self::_C&Super&Mixin::V* a) → self::_C&Super&Mixin::V*
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -78,11 +78,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → dynamic
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl dynamic value) → void
+  mixin-super-stub set t(covariant-by-class dynamic value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl dynamic a) → dynamic
+  mixin-super-stub method g(covariant-by-class dynamic a) → dynamic
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -115,11 +115,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → self::C2::V*
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl self::C2::V* value) → void
+  mixin-super-stub set t(covariant-by-class self::C2::V* value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl self::C2::V* a) → self::C2::V*
+  mixin-super-stub method g(covariant-by-class self::C2::V* a) → self::C2::V*
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -148,11 +148,11 @@
     return super.{mix::Mixin::z} = value;
   mixin-super-stub get t() → dynamic
     return super.{mix::Mixin::t};
-  mixin-super-stub set t(generic-covariant-impl dynamic value) → void
+  mixin-super-stub set t(covariant-by-class dynamic value) → void
     return super.{mix::Mixin::t} = value;
   mixin-super-stub method foo() → dynamic
     return super.{mix::Mixin::foo}();
-  mixin-super-stub method g(generic-covariant-impl dynamic a) → dynamic
+  mixin-super-stub method g(covariant-by-class dynamic a) → dynamic
     return super.{mix::Mixin::g}(a);
   mixin-super-stub method h() → dynamic
     return super.{mix::Mixin::h}();
@@ -174,12 +174,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  generic-covariant-impl field mix::Mixin::T* t;
+  covariant-by-class field mix::Mixin::T* t;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T*>*
     ;
   method foo() → dynamic
     ;
-  method g(generic-covariant-impl mix::Mixin::T* a) → mix::Mixin::T*
+  method g(covariant-by-class mix::Mixin::T* a) → mix::Mixin::T*
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect b/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect
index b3cd230..de13441 100644
--- a/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect
@@ -439,13 +439,13 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:72:11: Error: Can't assign to a type literal.
     use(--Func);
           ^^^^");
-    (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:74:5: Error: Can't assign to a type literal.
+    #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:74:5: Error: Can't assign to a type literal.
     C ??= 42;
     ^" : null;
     self::use(let final core::Type* #t1 = #C1 in #t1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:75:9: Error: Can't assign to a type literal.
     use(C ??= 42);
         ^" : #t1);
-    (#C2) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:76:5: Error: Can't assign to a type literal.
+    #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:76:5: Error: Can't assign to a type literal.
     dynamic ??= 42;
     ^^^^^^^" : null;
     self::use(let final core::Type* #t2 = #C2 in #t2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:77:9: Error: Can't assign to a type literal.
@@ -457,7 +457,7 @@
     self::use(let final core::Type* #t3 = self::C::T* in #t3 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:79:9: Error: Can't assign to a type literal.
     use(T ??= 42);
         ^" : #t3);
-    (#C3) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:80:5: Error: Can't assign to a type literal.
+    #C3 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:80:5: Error: Can't assign to a type literal.
     Func ??= 42;
     ^^^^" : null;
     self::use(let final core::Type* #t4 = #C3 in #t4 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:81:9: Error: Can't assign to a type literal.
diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect
index 2d68132..6d33972 100644
--- a/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect
@@ -439,13 +439,13 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:72:11: Error: Can't assign to a type literal.
     use(--Func);
           ^^^^");
-    (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:74:5: Error: Can't assign to a type literal.
+    #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:74:5: Error: Can't assign to a type literal.
     C ??= 42;
     ^" : null;
     self::use(let final core::Type* #t1 = #C1 in #t1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:75:9: Error: Can't assign to a type literal.
     use(C ??= 42);
         ^" : #t1);
-    (#C2) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:76:5: Error: Can't assign to a type literal.
+    #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:76:5: Error: Can't assign to a type literal.
     dynamic ??= 42;
     ^^^^^^^" : null;
     self::use(let final core::Type* #t2 = #C2 in #t2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:77:9: Error: Can't assign to a type literal.
@@ -457,7 +457,7 @@
     self::use(let final core::Type* #t3 = self::C::T* in #t3 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:79:9: Error: Can't assign to a type literal.
     use(T ??= 42);
         ^" : #t3);
-    (#C3) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:80:5: Error: Can't assign to a type literal.
+    #C3 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:80:5: Error: Can't assign to a type literal.
     Func ??= 42;
     ^^^^" : null;
     self::use(let final core::Type* #t4 = #C3 in #t4 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/type_literals.dart:81:9: Error: Can't assign to a type literal.
diff --git a/pkg/front_end/testcases/rasta/typedef.dart.weak.expect b/pkg/front_end/testcases/rasta/typedef.dart.weak.expect
index 3020e18..72932b9 100644
--- a/pkg/front_end/testcases/rasta/typedef.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/typedef.dart.weak.expect
@@ -23,7 +23,7 @@
   invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:9:3: Error: Can't assign to a type literal.
   Foo = null;
   ^^^";
-  (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:10:3: Error: Can't assign to a type literal.
+  #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:10:3: Error: Can't assign to a type literal.
   Foo ??= null;
   ^^^" : null;
   invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:11:3: Error: Couldn't find constructor 'Foo'.
diff --git a/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect
index fa1d089..aaaf1fc 100644
--- a/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect
@@ -23,7 +23,7 @@
   invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:9:3: Error: Can't assign to a type literal.
   Foo = null;
   ^^^";
-  (#C1) == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:10:3: Error: Can't assign to a type literal.
+  #C1 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:10:3: Error: Can't assign to a type literal.
   Foo ??= null;
   ^^^" : null;
   invalid-expression "pkg/front_end/testcases/rasta/typedef.dart:11:3: Error: Couldn't find constructor 'Foo'.
diff --git a/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect b/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
index 450ca19..a893a8d 100644
--- a/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::print((#C1) is () →* dynamic);
+  core::print(#C1 is () →* dynamic);
   core::print((<T extends core::Object* = dynamic>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
   core::print((<T extends core::num*>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
   core::print((<T extends core::Comparable<T*>* = core::Comparable<dynamic>*>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
diff --git a/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
index 34ce0c6..e1b75c5 100644
--- a/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::print((#C1) is () →* dynamic);
+  core::print(#C1 is () →* dynamic);
   core::print((<T extends core::Object* = dynamic>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
   core::print((<T extends core::num*>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
   core::print((<T extends core::Comparable<T*>* = core::Comparable<dynamic>*>(T* x) → T* => x).{core::Object::runtimeType}{core::Type*});
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
index 67d25ff..cb1b2fd 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
@@ -147,10 +147,10 @@
   c3.{self::C::toString}(){() →* core::String*};
   self::C<core::String*>* c4 = new self::C::bar<core::String*>();
   c4.{self::C::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C2).{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C2.{self::D::toString}(){() →* core::String*};
   iss::E<core::int*>* e1 = new iss::E::bar<core::int*>();
   e1.{iss::E::toString}(){() →* core::String*};
   iss::E<dynamic>* e2 = new iss::E::bar<dynamic>();
@@ -159,10 +159,10 @@
   e3.{iss::E::toString}(){() →* core::String*};
   iss::E<core::String*>* e4 = new iss::E::bar<core::String*>();
   e4.{iss::E::toString}(){() →* core::String*};
-  (#C3).{iss::F::toString}(){() →* core::String*};
-  (#C4).{iss::F::toString}(){() →* core::String*};
-  (#C3).{iss::F::toString}(){() →* core::String*};
-  (#C5).{iss::F::toString}(){() →* core::String*};
+  #C3.{iss::F::toString}(){() →* core::String*};
+  #C4.{iss::F::toString}(){() →* core::String*};
+  #C3.{iss::F::toString}(){() →* core::String*};
+  #C5.{iss::F::toString}(){() →* core::String*};
 }
 
 library;
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
index 67d25ff..cb1b2fd 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
@@ -147,10 +147,10 @@
   c3.{self::C::toString}(){() →* core::String*};
   self::C<core::String*>* c4 = new self::C::bar<core::String*>();
   c4.{self::C::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C1).{self::D::toString}(){() →* core::String*};
-  (#C2).{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C1.{self::D::toString}(){() →* core::String*};
+  #C2.{self::D::toString}(){() →* core::String*};
   iss::E<core::int*>* e1 = new iss::E::bar<core::int*>();
   e1.{iss::E::toString}(){() →* core::String*};
   iss::E<dynamic>* e2 = new iss::E::bar<dynamic>();
@@ -159,10 +159,10 @@
   e3.{iss::E::toString}(){() →* core::String*};
   iss::E<core::String*>* e4 = new iss::E::bar<core::String*>();
   e4.{iss::E::toString}(){() →* core::String*};
-  (#C3).{iss::F::toString}(){() →* core::String*};
-  (#C4).{iss::F::toString}(){() →* core::String*};
-  (#C3).{iss::F::toString}(){() →* core::String*};
-  (#C5).{iss::F::toString}(){() →* core::String*};
+  #C3.{iss::F::toString}(){() →* core::String*};
+  #C4.{iss::F::toString}(){() →* core::String*};
+  #C3.{iss::F::toString}(){() →* core::String*};
+  #C5.{iss::F::toString}(){() →* core::String*};
 }
 
 library;
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.expect
index 888b0a2..d641b1f 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* value) → void {
+  method f(covariant-by-class self::C::T* value) → void {
     let final self::C::T* #t1 = value in this.{self::C::y}{(self::C::T*) →* void}(#t1){(self::C::T*) →* void};
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.outline.expect
index d8bc83f..84a11c2 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.outline.expect
@@ -7,7 +7,7 @@
   field (self::C::T*) →* void y;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f(generic-covariant-impl self::C::T* value) → void
+  method f(covariant-by-class self::C::T* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.transformed.expect
index b58547d..66836cf 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.weak.transformed.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* value) → void {
+  method f(covariant-by-class self::C::T* value) → void {
     let final self::C::T* #t1 = value in this.{self::C::y}{(self::C::T*) →* void}(#t1){(self::C::T*) →* void};
   }
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.expect
index 2d633a8..23d142c 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.expect
@@ -19,8 +19,8 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void {}
-  method g1<generic-covariant-impl U extends self::C::T*>() → void {
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void {}
+  method g1<covariant-by-class U extends self::C::T*>() → void {
     this.{self::C::f}<self::C::g1::U*>(invalid-expression "pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:11:15: Error: The argument type 'double' can't be assigned to the parameter type 'U'.
     this.f<U>(1.5);
               ^" in 1.5 as{TypeError} Never){(self::C::g1::U*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.outline.expect
index 133cc4d..a4e9eee9 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.outline.expect
@@ -5,9 +5,9 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void
     ;
-  method g1<generic-covariant-impl U extends self::C::T*>() → void
+  method g1<covariant-by-class U extends self::C::T*>() → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.transformed.expect
index 2d633a8..23d142c 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.weak.transformed.expect
@@ -19,8 +19,8 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void {}
-  method g1<generic-covariant-impl U extends self::C::T*>() → void {
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void {}
+  method g1<covariant-by-class U extends self::C::T*>() → void {
     this.{self::C::f}<self::C::g1::U*>(invalid-expression "pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart:11:15: Error: The argument type 'double' can't be assigned to the parameter type 'U'.
     this.f<U>(1.5);
               ^" in 1.5 as{TypeError} Never){(self::C::g1::U*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.expect
index 416b83b..2794c16 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* x) → void {}
+  method f(covariant-by-class self::C::T* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.outline.expect
index aeef163..1c58939 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f(generic-covariant-impl self::C::T* x) → void
+  method f(covariant-by-class self::C::T* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.transformed.expect
index 416b83b..2794c16 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* x) → void {}
+  method f(covariant-by-class self::C::T* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.expect
index 4cc02bb..41147c6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl core::List<self::C::T*>* x) → void {}
-  method f2(generic-covariant-impl () →* self::C::T* callback) → void {}
-  method f3(generic-covariant-impl (self::C::T*) →* self::C::T* callback) → void {}
+  method f1(covariant-by-class core::List<self::C::T*>* x) → void {}
+  method f2(covariant-by-class () →* self::C::T* callback) → void {}
+  method f3(covariant-by-class (self::C::T*) →* self::C::T* callback) → void {}
   method f4((self::C::T*) →* void callback) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.outline.expect
index 679102f..1482d6b 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.outline.expect
@@ -5,11 +5,11 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f1(generic-covariant-impl core::List<self::C::T*>* x) → void
+  method f1(covariant-by-class core::List<self::C::T*>* x) → void
     ;
-  method f2(generic-covariant-impl () →* self::C::T* callback) → void
+  method f2(covariant-by-class () →* self::C::T* callback) → void
     ;
-  method f3(generic-covariant-impl (self::C::T*) →* self::C::T* callback) → void
+  method f3(covariant-by-class (self::C::T*) →* self::C::T* callback) → void
     ;
   method f4((self::C::T*) →* void callback) → void
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.transformed.expect
index 4cc02bb..41147c6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.weak.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl core::List<self::C::T*>* x) → void {}
-  method f2(generic-covariant-impl () →* self::C::T* callback) → void {}
-  method f3(generic-covariant-impl (self::C::T*) →* self::C::T* callback) → void {}
+  method f1(covariant-by-class core::List<self::C::T*>* x) → void {}
+  method f2(covariant-by-class () →* self::C::T* callback) → void {}
+  method f3(covariant-by-class (self::C::T*) →* self::C::T* callback) → void {}
   method f4((self::C::T*) →* void callback) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.expect
index b2163ff..b492a06 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f1(generic-covariant-impl self::I::T* x) → void;
-  abstract method f2(generic-covariant-impl self::I::T* x) → void;
+  abstract method f1(covariant-by-class self::I::T* x) → void;
+  abstract method f2(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl core::int* x) → void {}
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::C::U* y = #C1]) → void {}
+  method f1(covariant-by-class core::int* x) → void {}
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::C::U* y = #C1]) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -40,8 +40,8 @@
   synthetic constructor •() → self::D<self::D::U*>*
     : super self::C::•()
     ;
-  method f1(generic-covariant-impl core::int* x) → void {}
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::D::U* y = #C1]) → void {}
+  method f1(covariant-by-class core::int* x) → void {}
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::D::U* y = #C1]) → void {}
 }
 static method g1(self::C<core::num*>* c) → void {
   c.{self::C::f1}(1){(core::int*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
index 6e019d6..d5ecfdf 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.outline.expect
@@ -5,8 +5,8 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f1(generic-covariant-impl self::I::T* x) → void;
-  abstract method f2(generic-covariant-impl self::I::T* x) → void;
+  abstract method f1(covariant-by-class self::I::T* x) → void;
+  abstract method f2(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -21,9 +21,9 @@
 class C<U extends core::Object* = dynamic> extends core::Object implements self::I<core::int*> {
   synthetic constructor •() → self::C<self::C::U*>*
     ;
-  method f1(generic-covariant-impl core::int* x) → void
+  method f1(covariant-by-class core::int* x) → void
     ;
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::C::U* y]) → void
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::C::U* y]) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -39,9 +39,9 @@
 class D<U extends core::Object* = dynamic> extends self::C<self::D::U*> {
   synthetic constructor •() → self::D<self::D::U*>*
     ;
-  method f1(generic-covariant-impl core::int* x) → void
+  method f1(covariant-by-class core::int* x) → void
     ;
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::D::U* y]) → void
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::D::U* y]) → void
     ;
 }
 static method g1(self::C<core::num*>* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.transformed.expect
index b2163ff..b492a06 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.weak.transformed.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f1(generic-covariant-impl self::I::T* x) → void;
-  abstract method f2(generic-covariant-impl self::I::T* x) → void;
+  abstract method f1(covariant-by-class self::I::T* x) → void;
+  abstract method f2(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::C<self::C::U*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl core::int* x) → void {}
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::C::U* y = #C1]) → void {}
+  method f1(covariant-by-class core::int* x) → void {}
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::C::U* y = #C1]) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -40,8 +40,8 @@
   synthetic constructor •() → self::D<self::D::U*>*
     : super self::C::•()
     ;
-  method f1(generic-covariant-impl core::int* x) → void {}
-  method f2(generic-covariant-impl core::int* x, [generic-covariant-impl self::D::U* y = #C1]) → void {}
+  method f1(covariant-by-class core::int* x) → void {}
+  method f2(covariant-by-class core::int* x, [covariant-by-class self::D::U* y = #C1]) → void {}
 }
 static method g1(self::C<core::num*>* c) → void {
   c.{self::C::f1}(1){(core::int*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.expect
index ae3c830..c7a7694 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -54,7 +54,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::M::f}(x);
 }
 static method g1(self::C* c) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.outline.expect
index 6a35bff..9ebe44f 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::M::f}(x);
 }
 static method g1(self::C* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.transformed.expect
index a88ae80..224bd67 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -54,7 +54,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  method f(generic-covariant-impl core::int* x) → void {}
+  method f(covariant-by-class core::int* x) → void {}
 }
 static method g1(self::C* c) → void {
   c.{self::C::f}(1){(core::int*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.expect
index 5cda4e0..5e85a90 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.outline.expect
index 8452be1..fc3b403 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,7 +36,7 @@
 class C extends self::B implements self::I<core::int*> {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.transformed.expect
index 5cda4e0..5e85a90 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.expect
index b2395d9..e69ba31 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.outline.expect
index f38ca9d..75621ad 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.transformed.expect
index eb463e7..8aae2e5 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -53,7 +53,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x) → void
+  forwarding-stub method f(covariant-by-class core::int* x) → void
     return super.{self::B::f}(x);
 }
 static method g1(self::C* c) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.expect
index 05ac14b..a63dac3 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void {}
-  method f2(generic-covariant-impl core::List<self::C::T*>* x) → self::C::T*
+  method f1(covariant-by-class self::C::T* x) → void {}
+  method f2(covariant-by-class core::List<self::C::T*>* x) → self::C::T*
     return x.{core::Iterable::first}{self::C::T*};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.outline.expect
index a478cb7..5ba10bb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.outline.expect
@@ -7,9 +7,9 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void
+  method f1(covariant-by-class self::C::T* x) → void
     ;
-  method f2(generic-covariant-impl core::List<self::C::T*>* x) → self::C::T*
+  method f2(covariant-by-class core::List<self::C::T*>* x) → self::C::T*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.transformed.expect
index 05ac14b..a63dac3 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.weak.transformed.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void {}
-  method f2(generic-covariant-impl core::List<self::C::T*>* x) → self::C::T*
+  method f1(covariant-by-class self::C::T* x) → void {}
+  method f2(covariant-by-class core::List<self::C::T*>* x) → self::C::T*
     return x.{core::Iterable::first}{self::C::T*};
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.expect
index e05a2b1..bf44b39 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.expect
@@ -23,13 +23,13 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  method f(covariant core::int* x) → void {}
+  method f(covariant-by-declaration core::int* x) → void {}
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  method f(covariant core::int* x) → void {}
+  method f(covariant-by-declaration core::int* x) → void {}
 }
 static method g1(self::C* c) → void {
   c.{self::C::f}(1.5){(core::num*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.outline.expect
index 0936397..24552c4 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.outline.expect
@@ -22,13 +22,13 @@
 class D extends self::C {
   synthetic constructor •() → self::D*
     ;
-  method f(covariant core::int* x) → void
+  method f(covariant-by-declaration core::int* x) → void
     ;
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     ;
-  method f(covariant core::int* x) → void
+  method f(covariant-by-declaration core::int* x) → void
     ;
 }
 static method g1(self::C* c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.transformed.expect
index e05a2b1..bf44b39 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart.weak.transformed.expect
@@ -23,13 +23,13 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  method f(covariant core::int* x) → void {}
+  method f(covariant-by-declaration core::int* x) → void {}
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  method f(covariant core::int* x) → void {}
+  method f(covariant-by-declaration core::int* x) → void {}
 }
 static method g1(self::C* c) → void {
   c.{self::C::f}(1.5){(core::num*) →* void};
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.expect
index c702cdc..210c2cb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.outline.expect
index e5a5a6c..359e402 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x;
+  covariant-by-declaration field core::int* x;
   synthetic constructor •() → self::D*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -33,7 +33,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x;
+  covariant-by-declaration field core::int* x;
   synthetic constructor •() → self::E*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.transformed.expect
index c702cdc..210c2cb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -35,7 +35,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.expect
index de4fbf1a..2e274f6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -40,7 +40,7 @@
     ;
   get x() → core::int*
     return 0;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.outline.expect
index 990357b..64b3fce 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x;
+  covariant-by-declaration field core::int* x;
   synthetic constructor •() → self::D*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -37,7 +37,7 @@
     ;
   get x() → core::int*
     ;
-  set x(covariant core::int* value) → void
+  set x(covariant-by-declaration core::int* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.transformed.expect
index de4fbf1a..2e274f6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -40,7 +40,7 @@
     ;
   get x() → core::int*
     return 0;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.expect
index fe87ed1..3f5f3e4 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.expect
@@ -22,12 +22,12 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.outline.expect
index 809c222..3d21253 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.outline.expect
@@ -21,13 +21,13 @@
 class D extends self::C {
   synthetic constructor •() → self::D*
     ;
-  set x(covariant core::int* value) → void
+  set x(covariant-by-declaration core::int* value) → void
     ;
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     ;
-  set x(covariant core::int* value) → void
+  set x(covariant-by-declaration core::int* value) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.transformed.expect
index fe87ed1..3f5f3e4 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart.weak.transformed.expect
@@ -22,12 +22,12 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 class E extends self::D {
   synthetic constructor •() → self::E*
     : super self::D::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.expect
index 1aad0c3..8c69a30 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.expect
@@ -22,10 +22,10 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.outline.expect
index 312098e..28be2c8 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.outline.expect
@@ -21,11 +21,11 @@
 class D extends self::C {
   synthetic constructor •() → self::D*
     ;
-  set x(covariant core::int* value) → void
+  set x(covariant-by-declaration core::int* value) → void
     ;
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x;
+  covariant-by-declaration field core::int* x;
   synthetic constructor •() → self::E*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.transformed.expect
index 1aad0c3..8c69a30 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.weak.transformed.expect
@@ -22,10 +22,10 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  set x(covariant core::int* value) → void {}
+  set x(covariant-by-declaration core::int* value) → void {}
 }
 class E extends core::Object implements self::D {
-  covariant field core::int* x = null;
+  covariant-by-declaration field core::int* x = null;
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.expect
index 9bd7fc3..dee3331 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.expect
@@ -4,12 +4,12 @@
 
 typedef F<contravariant T extends core::Object* = dynamic> = (T*) →* void;
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* x = null;
+  covariant-by-class field self::C::T* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  set y(generic-covariant-impl self::C::T* value) → void {}
-  method f(generic-covariant-impl self::C::T* value) → void {
+  set y(covariant-by-class self::C::T* value) → void {}
+  method f(covariant-by-class self::C::T* value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.outline.expect
index f14fb1d..c431be4 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.outline.expect
@@ -4,12 +4,12 @@
 
 typedef F<contravariant T extends core::Object* = dynamic> = (T*) →* void;
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* x;
+  covariant-by-class field self::C::T* x;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  set y(generic-covariant-impl self::C::T* value) → void
+  set y(covariant-by-class self::C::T* value) → void
     ;
-  method f(generic-covariant-impl self::C::T* value) → void
+  method f(covariant-by-class self::C::T* value) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.transformed.expect
index 9bd7fc3..dee3331 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.weak.transformed.expect
@@ -4,12 +4,12 @@
 
 typedef F<contravariant T extends core::Object* = dynamic> = (T*) →* void;
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* x = null;
+  covariant-by-class field self::C::T* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  set y(generic-covariant-impl self::C::T* value) → void {}
-  method f(generic-covariant-impl self::C::T* value) → void {
+  set y(covariant-by-class self::C::T* value) → void {}
+  method f(covariant-by-class self::C::T* value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.expect
index bb26705..3d1a3dc 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void {}
+  method f1(covariant-by-class self::C::T* x) → void {}
   method f2(core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -23,7 +23,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  method f1(covariant generic-covariant-impl core::int* x) → void {}
+  method f1(covariant-by-declaration covariant-by-class core::int* x) → void {}
 }
 static method g1(dynamic d) → void {
   d{dynamic}.f1(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.outline.expect
index 14fcda1..a2c2b89 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void
+  method f1(covariant-by-class self::C::T* x) → void
     ;
   method f2(core::int* x) → void
     ;
@@ -23,7 +23,7 @@
 class D extends self::C<core::num*> {
   synthetic constructor •() → self::D*
     ;
-  method f1(covariant generic-covariant-impl core::int* x) → void
+  method f1(covariant-by-declaration covariant-by-class core::int* x) → void
     ;
 }
 static method g1(dynamic d) → void
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.transformed.expect
index bb26705..3d1a3dc 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f1(generic-covariant-impl self::C::T* x) → void {}
+  method f1(covariant-by-class self::C::T* x) → void {}
   method f2(core::int* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -23,7 +23,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  method f1(covariant generic-covariant-impl core::int* x) → void {}
+  method f1(covariant-by-declaration covariant-by-class core::int* x) → void {}
 }
 static method g1(dynamic d) → void {
   d{dynamic}.f1(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.expect
index 3093b2a..bbd989a 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void {}
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.outline.expect
index d66d1485..8d50179 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.transformed.expect
index 3093b2a..bbd989a 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f<generic-covariant-impl U extends self::C::T*>(self::C::f::U* x) → void {}
+  method f<covariant-by-class U extends self::C::T*>(self::C::f::U* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.expect
index 26e36fb..e0143ec 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
+  covariant-by-class field self::B::T* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  forwarding-stub set x(generic-covariant-impl core::num* value) → void
+  forwarding-stub set x(covariant-by-class core::num* value) → void
     return super.{self::C::x} = value;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.outline.expect
index bbdac51..17eb717 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x;
+  covariant-by-class field self::B::T* x;
   synthetic constructor •() → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -35,7 +35,7 @@
 class D extends self::C implements self::B<core::num*> {
   synthetic constructor •() → self::D*
     ;
-  forwarding-stub set x(generic-covariant-impl core::num* value) → void
+  forwarding-stub set x(covariant-by-class core::num* value) → void
     return super.{self::C::x} = value;
 }
 static method main() → void
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.transformed.expect
index 26e36fb..e0143ec 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
+  covariant-by-class field self::B::T* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  forwarding-stub set x(generic-covariant-impl core::num* value) → void
+  forwarding-stub set x(covariant-by-class core::num* value) → void
     return super.{self::C::x} = value;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.expect
index 6c001e5..672eea9 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.expect
@@ -33,8 +33,8 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f([generic-covariant-impl self::I::T* x = #C3]) → void;
-  abstract method g({generic-covariant-impl self::I::T* x = #C3}) → void;
+  abstract method f([covariant-by-class self::I::T* x = #C3]) → void;
+  abstract method g({covariant-by-class self::I::T* x = #C3}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -50,9 +50,9 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f([generic-covariant-impl core::num* x = #C1]) → void
+  forwarding-stub method f([covariant-by-class core::num* x = #C1]) → void
     return super.{self::B::f}(x);
-  forwarding-stub method g({generic-covariant-impl core::num* x = #C2}) → void
+  forwarding-stub method g({covariant-by-class core::num* x = #C2}) → void
     return super.{self::B::g}(x: x);
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
index 2c58bdb..2528b84 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.outline.expect
@@ -26,8 +26,8 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f([generic-covariant-impl self::I::T* x]) → void;
-  abstract method g({generic-covariant-impl self::I::T* x}) → void;
+  abstract method f([covariant-by-class self::I::T* x]) → void;
+  abstract method g({covariant-by-class self::I::T* x}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -42,9 +42,9 @@
 class C extends self::B implements self::I<core::num*> {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f([generic-covariant-impl core::num* x]) → void
+  forwarding-stub method f([covariant-by-class core::num* x]) → void
     return super.{self::B::f}(x);
-  forwarding-stub method g({generic-covariant-impl core::num* x}) → void
+  forwarding-stub method g({covariant-by-class core::num* x}) → void
     return super.{self::B::g}(x: x);
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.transformed.expect
index 6c001e5..672eea9 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.weak.transformed.expect
@@ -33,8 +33,8 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f([generic-covariant-impl self::I::T* x = #C3]) → void;
-  abstract method g({generic-covariant-impl self::I::T* x = #C3}) → void;
+  abstract method f([covariant-by-class self::I::T* x = #C3]) → void;
+  abstract method g({covariant-by-class self::I::T* x = #C3}) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -50,9 +50,9 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f([generic-covariant-impl core::num* x = #C1]) → void
+  forwarding-stub method f([covariant-by-class core::num* x = #C1]) → void
     return super.{self::B::f}(x);
-  forwarding-stub method g({generic-covariant-impl core::num* x = #C2}) → void
+  forwarding-stub method g({covariant-by-class core::num* x = #C2}) → void
     return super.{self::B::g}(x: x);
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.expect
index c84b5a4..76facc74 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::int* y) → void
+  forwarding-stub method f(covariant-by-class core::int* x, core::int* y) → void
     return super.{self::B::f}(x, y);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.outline.expect
index 2296905..15a57c7 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,7 +36,7 @@
 class C extends self::B implements self::I<core::int*> {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::int* y) → void
+  forwarding-stub method f(covariant-by-class core::int* x, core::int* y) → void
     return super.{self::B::f}(x, y);
 }
 static method main() → void
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.transformed.expect
index c84b5a4..76facc74 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::int* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::int* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::int* y) → void
+  forwarding-stub method f(covariant-by-class core::int* x, core::int* y) → void
     return super.{self::B::f}(x, y);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.expect
index 17ba3f2..2fc5b5a 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* y = null;
+  covariant-by-class field self::C::T* y = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  set x(generic-covariant-impl self::C::T* t) → void {}
+  set x(covariant-by-class self::C::T* t) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -20,8 +20,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C<core::num*> {
-  generic-covariant-impl field core::num* x = null;
-  generic-covariant-impl field core::num* y = null;
+  covariant-by-class field core::num* x = null;
+  covariant-by-class field core::num* y = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -40,10 +40,10 @@
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
-  set x(generic-covariant-impl core::num* t) → void {}
+  set x(covariant-by-class core::num* t) → void {}
   get y() → core::num*
     return null;
-  set y(generic-covariant-impl core::num* t) → void {}
+  set y(covariant-by-class core::num* t) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.outline.expect
index cf87cc9..e8177bf 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* y;
+  covariant-by-class field self::C::T* y;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  set x(generic-covariant-impl self::C::T* t) → void
+  set x(covariant-by-class self::C::T* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -20,8 +20,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C<core::num*> {
-  generic-covariant-impl field core::num* x;
-  generic-covariant-impl field core::num* y;
+  covariant-by-class field core::num* x;
+  covariant-by-class field core::num* y;
   synthetic constructor •() → self::D*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -38,11 +38,11 @@
 class E extends core::Object implements self::C<core::num*> {
   synthetic constructor •() → self::E*
     ;
-  set x(generic-covariant-impl core::num* t) → void
+  set x(covariant-by-class core::num* t) → void
     ;
   get y() → core::num*
     ;
-  set y(generic-covariant-impl core::num* t) → void
+  set y(covariant-by-class core::num* t) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.transformed.expect
index 17ba3f2..2fc5b5a 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.weak.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::C::T* y = null;
+  covariant-by-class field self::C::T* y = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  set x(generic-covariant-impl self::C::T* t) → void {}
+  set x(covariant-by-class self::C::T* t) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -20,8 +20,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class D extends core::Object implements self::C<core::num*> {
-  generic-covariant-impl field core::num* x = null;
-  generic-covariant-impl field core::num* y = null;
+  covariant-by-class field core::num* x = null;
+  covariant-by-class field core::num* y = null;
   synthetic constructor •() → self::D*
     : super core::Object::•()
     ;
@@ -40,10 +40,10 @@
   synthetic constructor •() → self::E*
     : super core::Object::•()
     ;
-  set x(generic-covariant-impl core::num* t) → void {}
+  set x(covariant-by-class core::num* t) → void {}
   get y() → core::num*
     return null;
-  set y(generic-covariant-impl core::num* t) → void {}
+  set y(covariant-by-class core::num* t) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.expect
index 373de83..3e9000d 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  abstract set x(covariant core::Object* value) → void;
+  abstract set x(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -19,11 +19,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object implements self::A {
-  covariant field core::Object* x = null;
+  covariant-by-declaration field core::Object* x = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-  method f(covariant core::Object* x) → void {}
+  method f(covariant-by-declaration core::Object* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,11 +36,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends core::Object* = dynamic> extends core::Object implements self::B {
-  covariant generic-covariant-impl field self::C::T* x = null;
+  covariant-by-declaration covariant-by-class field self::C::T* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(covariant generic-covariant-impl self::C::T* x) → void {}
+  method f(covariant-by-declaration covariant-by-class self::C::T* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.outline.expect
index df71989..50fbaa0 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 abstract class A extends core::Object {
   synthetic constructor •() → self::A*
     ;
-  abstract set x(covariant core::Object* value) → void;
+  abstract set x(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -18,10 +18,10 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object implements self::A {
-  covariant field core::Object* x;
+  covariant-by-declaration field core::Object* x;
   synthetic constructor •() → self::B*
     ;
-  method f(covariant core::Object* x) → void
+  method f(covariant-by-declaration core::Object* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -35,10 +35,10 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends core::Object* = dynamic> extends core::Object implements self::B {
-  covariant generic-covariant-impl field self::C::T* x;
+  covariant-by-declaration covariant-by-class field self::C::T* x;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f(covariant generic-covariant-impl self::C::T* x) → void
+  method f(covariant-by-declaration covariant-by-class self::C::T* x) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.transformed.expect
index 373de83..3e9000d 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-  abstract set x(covariant core::Object* value) → void;
+  abstract set x(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -19,11 +19,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class B extends core::Object implements self::A {
-  covariant field core::Object* x = null;
+  covariant-by-declaration field core::Object* x = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-  method f(covariant core::Object* x) → void {}
+  method f(covariant-by-declaration core::Object* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,11 +36,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C<T extends core::Object* = dynamic> extends core::Object implements self::B {
-  covariant generic-covariant-impl field self::C::T* x = null;
+  covariant-by-declaration covariant-by-class field self::C::T* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(covariant generic-covariant-impl self::C::T* x) → void {}
+  method f(covariant-by-declaration covariant-by-class self::C::T* x) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.expect
index e097cfc..761e51b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub forwarding-semi-stub method f(generic-covariant-impl core::num* x) → void
+  forwarding-stub forwarding-semi-stub method f(covariant-by-class core::num* x) → void
     return super.{self::B::f}(x);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.outline.expect
index 3126586..0bf24b3 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,7 +36,7 @@
 class C extends self::B implements self::I<core::num*> {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub forwarding-semi-stub method f(generic-covariant-impl core::num* x) → void
+  forwarding-stub forwarding-semi-stub method f(covariant-by-class core::num* x) → void
     return super.{self::B::f}(x);
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.transformed.expect
index e097cfc..761e51b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x) → void;
+  abstract method f(covariant-by-class self::I::T* x) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub forwarding-semi-stub method f(generic-covariant-impl core::num* x) → void
+  forwarding-stub forwarding-semi-stub method f(covariant-by-class core::num* x) → void
     return super.{self::B::f}(x);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.expect
index 76ccf53..1efedac 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* x) → void {}
-  method g1(generic-covariant-impl self::C::T* x) → void {
+  method f(covariant-by-class self::C::T* x) → void {}
+  method g1(covariant-by-class self::C::T* x) → void {
     this.{self::C::f}(x){(self::C::T*) →* void};
   }
-  method g2(generic-covariant-impl self::C::T* x) → void {
+  method g2(covariant-by-class self::C::T* x) → void {
     this.{self::C::f}(x){(self::C::T*) →* void};
   }
-  method g3(generic-covariant-impl self::C<self::C::T*>* c, generic-covariant-impl self::C::T* x) → void {
+  method g3(covariant-by-class self::C<self::C::T*>* c, covariant-by-class self::C::T* x) → void {
     c.{self::C::f}(x){(self::C::T*) →* void};
   }
   method g4() → (self::C::T*) →* dynamic
@@ -39,7 +39,7 @@
   synthetic constructor •() → self::E*
     : super self::C::•()
     ;
-  method f(covariant generic-covariant-impl core::int* x) → void {}
+  method f(covariant-by-declaration covariant-by-class core::int* x) → void {}
 }
 static method test() → dynamic {
   (core::Object*) →* dynamic x = (new self::D::•().{self::C::g4}(){() →* (core::int*) →* dynamic} as{TypeError,CovarianceCheck} (core::int*) →* dynamic) as (core::Object*) →* dynamic;
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.outline.expect
index d4639d8..92a85fa 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.outline.expect
@@ -6,13 +6,13 @@
 class C<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T*>*
     ;
-  method f(generic-covariant-impl self::C::T* x) → void
+  method f(covariant-by-class self::C::T* x) → void
     ;
-  method g1(generic-covariant-impl self::C::T* x) → void
+  method g1(covariant-by-class self::C::T* x) → void
     ;
-  method g2(generic-covariant-impl self::C::T* x) → void
+  method g2(covariant-by-class self::C::T* x) → void
     ;
-  method g3(generic-covariant-impl self::C<self::C::T*>* c, generic-covariant-impl self::C::T* x) → void
+  method g3(covariant-by-class self::C<self::C::T*>* c, covariant-by-class self::C::T* x) → void
     ;
   method g4() → (self::C::T*) →* dynamic
     ;
@@ -34,7 +34,7 @@
 class E extends self::C<core::num*> {
   synthetic constructor •() → self::E*
     ;
-  method f(covariant generic-covariant-impl core::int* x) → void
+  method f(covariant-by-declaration covariant-by-class core::int* x) → void
     ;
 }
 static method test() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.transformed.expect
index 76ccf53..1efedac 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.weak.transformed.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::C::T* x) → void {}
-  method g1(generic-covariant-impl self::C::T* x) → void {
+  method f(covariant-by-class self::C::T* x) → void {}
+  method g1(covariant-by-class self::C::T* x) → void {
     this.{self::C::f}(x){(self::C::T*) →* void};
   }
-  method g2(generic-covariant-impl self::C::T* x) → void {
+  method g2(covariant-by-class self::C::T* x) → void {
     this.{self::C::f}(x){(self::C::T*) →* void};
   }
-  method g3(generic-covariant-impl self::C<self::C::T*>* c, generic-covariant-impl self::C::T* x) → void {
+  method g3(covariant-by-class self::C<self::C::T*>* c, covariant-by-class self::C::T* x) → void {
     c.{self::C::f}(x){(self::C::T*) →* void};
   }
   method g4() → (self::C::T*) →* dynamic
@@ -39,7 +39,7 @@
   synthetic constructor •() → self::E*
     : super self::C::•()
     ;
-  method f(covariant generic-covariant-impl core::int* x) → void {}
+  method f(covariant-by-declaration covariant-by-class core::int* x) → void {}
 }
 static method test() → dynamic {
   (core::Object*) →* dynamic x = (new self::D::•().{self::C::g4}(){() →* (core::int*) →* dynamic} as{TypeError,CovarianceCheck} (core::int*) →* dynamic) as (core::Object*) →* dynamic;
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.expect
index 5ce91ef..c730f2f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.expect
@@ -30,7 +30,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.outline.expect
index b463ae2..9a52a7e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.transformed.expect
index 5ce91ef..c730f2f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.weak.transformed.expect
@@ -30,7 +30,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.expect
index 5360289..3769315 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.outline.expect
index 9f6e2e0..d74cdc8 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.transformed.expect
index 88a3640..6e2827f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  operator +(generic-covariant-impl self::B<self::B::T*>* other) → self::B<self::B::T*>*
+  operator +(covariant-by-class self::B<self::B::T*>* other) → self::B<self::B::T*>*
     return null;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.expect
index bbbc3fe..80e45ff 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::B::T* x) → void {}
-  method g({generic-covariant-impl self::B::T* x = #C1}) → void {}
-  method h<generic-covariant-impl U extends self::B::T*>() → void {}
+  method f(covariant-by-class self::B::T* x) → void {}
+  method g({covariant-by-class self::B::T* x = #C1}) → void {}
+  method h<covariant-by-class U extends self::B::T*>() → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
index 2ebc576..06e1b40 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.outline.expect
@@ -5,11 +5,11 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  method f(generic-covariant-impl self::B::T* x) → void
+  method f(covariant-by-class self::B::T* x) → void
     ;
-  method g({generic-covariant-impl self::B::T* x}) → void
+  method g({covariant-by-class self::B::T* x}) → void
     ;
-  method h<generic-covariant-impl U extends self::B::T*>() → void
+  method h<covariant-by-class U extends self::B::T*>() → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.transformed.expect
index bbbc3fe..80e45ff 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.weak.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::B::T* x) → void {}
-  method g({generic-covariant-impl self::B::T* x = #C1}) → void {}
-  method h<generic-covariant-impl U extends self::B::T*>() → void {}
+  method f(covariant-by-class self::B::T* x) → void {}
+  method g({covariant-by-class self::B::T* x = #C1}) → void {}
+  method h<covariant-by-class U extends self::B::T*>() → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.expect
index 7e27729..985b00d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
+  covariant-by-class field self::B::T* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.outline.expect
index 318dc69..07175fc 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x;
+  covariant-by-class field self::B::T* x;
   synthetic constructor •() → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.transformed.expect
index 7e27729..985b00d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.weak.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
+  covariant-by-class field self::B::T* x = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.expect
index ef3d7b6..ec01d37 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.expect
@@ -16,7 +16,7 @@
 import "dart:core" as core;
 
 class B extends core::Object {
-  covariant field core::num* x = null;
+  covariant-by-declaration field core::num* x = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  forwarding-stub set x(covariant core::num* value) → void
-    return super.{self::C::x} = value;
+  forwarding-stub set x(covariant-by-declaration core::num* value) → void
+    return super.{self::C::x} = value as core::int*;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.outline.expect
index 4b93548..64b0707 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.outline.expect
@@ -16,7 +16,7 @@
 import "dart:core" as core;
 
 class B extends core::Object {
-  covariant field core::num* x;
+  covariant-by-declaration field core::num* x;
   synthetic constructor •() → self::B*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -48,8 +48,8 @@
 class D extends self::C implements self::B {
   synthetic constructor •() → self::D*
     ;
-  forwarding-stub set x(covariant core::num* value) → void
-    return super.{self::C::x} = value;
+  forwarding-stub set x(covariant-by-declaration core::num* value) → void
+    return super.{self::C::x} = value as core::int*;
 }
 static method main() → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.transformed.expect
index ef3d7b6..ec01d37 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart.weak.transformed.expect
@@ -16,7 +16,7 @@
 import "dart:core" as core;
 
 class B extends core::Object {
-  covariant field core::num* x = null;
+  covariant-by-declaration field core::num* x = null;
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
@@ -51,7 +51,7 @@
   synthetic constructor •() → self::D*
     : super self::C::•()
     ;
-  forwarding-stub set x(covariant core::num* value) → void
-    return super.{self::C::x} = value;
+  forwarding-stub set x(covariant-by-declaration core::num* value) → void
+    return super.{self::C::x} = value as core::int*;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.expect
index 2d34ef1..7bfe030 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
-  generic-covariant-impl field self::B::T* y = null;
+  covariant-by-class field self::B::T* x = null;
+  covariant-by-class field self::B::T* y = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -20,12 +20,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class C<T extends core::Object* = dynamic> extends core::Object implements self::B<core::num*> {
-  generic-covariant-impl field core::num* x = null;
+  covariant-by-class field core::num* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
   abstract get y() → core::num*;
-  abstract set y(generic-covariant-impl core::num* value) → void;
+  abstract set y(covariant-by-class core::num* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,12 +38,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class D<T extends core::Object* = dynamic> extends core::Object implements self::B<self::D::T*> {
-  generic-covariant-impl field self::D::T* x = null;
+  covariant-by-class field self::D::T* x = null;
   synthetic constructor •() → self::D<self::D::T*>*
     : super core::Object::•()
     ;
   abstract get y() → self::D::T*;
-  abstract set y(generic-covariant-impl self::D::T* value) → void;
+  abstract set y(covariant-by-class self::D::T* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.outline.expect
index 6433000..6e07a6c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x;
-  generic-covariant-impl field self::B::T* y;
+  covariant-by-class field self::B::T* x;
+  covariant-by-class field self::B::T* y;
   synthetic constructor •() → self::B<self::B::T*>*
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
@@ -19,11 +19,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class C<T extends core::Object* = dynamic> extends core::Object implements self::B<core::num*> {
-  generic-covariant-impl field core::num* x;
+  covariant-by-class field core::num* x;
   synthetic constructor •() → self::C<self::C::T*>*
     ;
   abstract get y() → core::num*;
-  abstract set y(generic-covariant-impl core::num* value) → void;
+  abstract set y(covariant-by-class core::num* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,11 +36,11 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class D<T extends core::Object* = dynamic> extends core::Object implements self::B<self::D::T*> {
-  generic-covariant-impl field self::D::T* x;
+  covariant-by-class field self::D::T* x;
   synthetic constructor •() → self::D<self::D::T*>*
     ;
   abstract get y() → self::D::T*;
-  abstract set y(generic-covariant-impl self::D::T* value) → void;
+  abstract set y(covariant-by-class self::D::T* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.transformed.expect
index 2d34ef1..7bfe030 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.weak.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object* = dynamic> extends core::Object {
-  generic-covariant-impl field self::B::T* x = null;
-  generic-covariant-impl field self::B::T* y = null;
+  covariant-by-class field self::B::T* x = null;
+  covariant-by-class field self::B::T* y = null;
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
@@ -20,12 +20,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class C<T extends core::Object* = dynamic> extends core::Object implements self::B<core::num*> {
-  generic-covariant-impl field core::num* x = null;
+  covariant-by-class field core::num* x = null;
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
   abstract get y() → core::num*;
-  abstract set y(generic-covariant-impl core::num* value) → void;
+  abstract set y(covariant-by-class core::num* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,12 +38,12 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 abstract class D<T extends core::Object* = dynamic> extends core::Object implements self::B<self::D::T*> {
-  generic-covariant-impl field self::D::T* x = null;
+  covariant-by-class field self::D::T* x = null;
   synthetic constructor •() → self::D<self::D::T*>*
     : super core::Object::•()
     ;
   abstract get y() → self::D::T*;
-  abstract set y(generic-covariant-impl self::D::T* value) → void;
+  abstract set y(covariant-by-class self::D::T* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.expect
index df39d8e..99c30ab 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.expect
@@ -48,9 +48,9 @@
     : super core::Object::•()
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -85,11 +85,11 @@
     ;
   mixin-super-stub get x() → core::int*
     return super.{self::M::x};
-  forwarding-stub set x(generic-covariant-impl core::int* value) → void
+  forwarding-stub set x(covariant-by-class core::int* value) → void
     return super.{self::M::x} = value;
   mixin-super-stub get y() → core::int*
     return super.{self::M::y};
-  forwarding-stub set y(covariant core::int* value) → void
+  forwarding-stub set y(covariant-by-declaration core::int* value) → void
     return super.{self::M::y} = value;
 }
 static method expectTypeError(() →* void callback) → void {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.outline.expect
index b6f1dad..637dc58 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.outline.expect
@@ -42,9 +42,9 @@
   synthetic constructor •() → self::I<self::I::T*>*
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -78,11 +78,11 @@
     ;
   mixin-super-stub get x() → core::int*
     return super.{self::M::x};
-  forwarding-stub set x(generic-covariant-impl core::int* value) → void
+  forwarding-stub set x(covariant-by-class core::int* value) → void
     return super.{self::M::x} = value;
   mixin-super-stub get y() → core::int*
     return super.{self::M::y};
-  forwarding-stub set y(covariant core::int* value) → void
+  forwarding-stub set y(covariant-by-declaration core::int* value) → void
     return super.{self::M::y} = value;
 }
 static method expectTypeError(() →* void callback) → void
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.transformed.expect
index a92205f..b49f3d7 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.weak.transformed.expect
@@ -48,9 +48,9 @@
     : super core::Object::•()
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -80,8 +80,8 @@
   abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
 }
 class C extends self::B implements self::I<core::int*>, self::M /*isEliminatedMixin*/  {
-  generic-covariant-impl field core::int* x = null;
-  covariant field core::int* y = null;
+  covariant-by-class field core::int* x = null;
+  covariant-by-declaration field core::int* y = null;
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.expect
index a4f4dfe..83a8031 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.expect
@@ -49,9 +49,9 @@
     : super core::Object::•()
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -94,11 +94,11 @@
     ;
   mixin-super-stub get x() → core::int*
     return super.{self::M::x};
-  forwarding-stub set x(generic-covariant-impl core::int* value) → void
+  forwarding-stub set x(covariant-by-class core::int* value) → void
     return super.{self::M::x} = value;
   mixin-super-stub get y() → core::int*
     return super.{self::M::y};
-  forwarding-stub set y(covariant core::int* value) → void
+  forwarding-stub set y(covariant-by-declaration core::int* value) → void
     return super.{self::M::y} = value;
 }
 static method expectTypeError(() →* void callback) → void {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.outline.expect
index 3582fa0..349493c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.outline.expect
@@ -43,9 +43,9 @@
   synthetic constructor •() → self::I<self::I::T*>*
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -85,11 +85,11 @@
     ;
   mixin-super-stub get x() → core::int*
     return super.{self::M::x};
-  forwarding-stub set x(generic-covariant-impl core::int* value) → void
+  forwarding-stub set x(covariant-by-class core::int* value) → void
     return super.{self::M::x} = value;
   mixin-super-stub get y() → core::int*
     return super.{self::M::y};
-  forwarding-stub set y(covariant core::int* value) → void
+  forwarding-stub set y(covariant-by-declaration core::int* value) → void
     return super.{self::M::y} = value;
 }
 static method expectTypeError(() →* void callback) → void
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.transformed.expect
index e429a2c..894f787 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.weak.transformed.expect
@@ -49,9 +49,9 @@
     : super core::Object::•()
     ;
   abstract get x() → self::I::T*;
-  abstract set x(generic-covariant-impl self::I::T* value) → void;
+  abstract set x(covariant-by-class self::I::T* value) → void;
   abstract get y() → core::Object*;
-  abstract set y(covariant core::Object* value) → void;
+  abstract set y(covariant-by-declaration core::Object* value) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -94,12 +94,12 @@
     ;
   get x() → core::int*
     return 1;
-  set x(generic-covariant-impl core::int* value) → void {
+  set x(covariant-by-class core::int* value) → void {
     self::expect(value, 2);
   }
   get y() → core::int*
     return 3;
-  set y(covariant core::int* value) → void {
+  set y(covariant-by-declaration core::int* value) → void {
     self::expect(value, 4);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.expect
index 2dac682..0fc6d13 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.expect
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::I*
     : super core::Object::•()
     ;
-  abstract method f(covariant core::Object* x) → core::int*;
+  abstract method f(covariant-by-declaration core::Object* x) → core::int*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -41,8 +41,8 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(covariant core::Object* x) → core::int*
-    return super.{self::B::f}(x);
+  forwarding-stub method f(covariant-by-declaration core::Object* x) → core::int*
+    return super.{self::B::f}(x as core::int*);
 }
 static method expectTypeError(() →* void callback) → void {
   try {
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.outline.expect
index 99e0d16..7b52144 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I extends core::Object {
   synthetic constructor •() → self::I*
     ;
-  abstract method f(covariant core::Object* x) → core::int*;
+  abstract method f(covariant-by-declaration core::Object* x) → core::int*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,8 +36,8 @@
 class C extends self::B implements self::I {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f(covariant core::Object* x) → core::int*
-    return super.{self::B::f}(x);
+  forwarding-stub method f(covariant-by-declaration core::Object* x) → core::int*
+    return super.{self::B::f}(x as core::int*);
 }
 static method expectTypeError(() →* void callback) → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.transformed.expect
index 2dac682..0fc6d13 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart.weak.transformed.expect
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::I*
     : super core::Object::•()
     ;
-  abstract method f(covariant core::Object* x) → core::int*;
+  abstract method f(covariant-by-declaration core::Object* x) → core::int*;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -41,8 +41,8 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(covariant core::Object* x) → core::int*
-    return super.{self::B::f}(x);
+  forwarding-stub method f(covariant-by-declaration core::Object* x) → core::int*
+    return super.{self::B::f}(x as core::int*);
 }
 static method expectTypeError(() →* void callback) → void {
   try {
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.expect
index 4dc5053..9aacb53 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::Object* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.outline.expect
index d61d15b..97cd268 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T*>*
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::Object* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,8 +36,8 @@
 abstract class C extends self::B implements self::I<core::int*> {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.transformed.expect
index 4dc5053..9aacb53 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I<self::I::T*>*
     : super core::Object::•()
     ;
-  abstract method f(generic-covariant-impl self::I::T* x, core::Object* y) → void;
+  abstract method f(covariant-by-class self::I::T* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.expect
index ecf0024..f0e4b8e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::B::T* x, core::int* y) → void {}
+  method f(covariant-by-class self::B::T* x, core::int* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,6 +38,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  abstract forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.outline.expect
index c73bcd2..6ea1a07 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class B<T extends core::Object* = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T*>*
     ;
-  method f(generic-covariant-impl self::B::T* x, core::int* y) → void
+  method f(covariant-by-class self::B::T* x, core::int* y) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -36,7 +36,7 @@
 abstract class C extends self::B<core::int*> implements self::I {
   synthetic constructor •() → self::C*
     ;
-  abstract forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void;
 }
 static method main() → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.transformed.expect
index ecf0024..f0e4b8e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super core::Object::•()
     ;
-  method f(generic-covariant-impl self::B::T* x, core::int* y) → void {}
+  method f(covariant-by-class self::B::T* x, core::int* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,6 +38,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  abstract forwarding-stub method f(generic-covariant-impl core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-class core::int* x, core::Object* y) → void;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.expect
index 916ff08..8f7a060 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I*
     : super core::Object::•()
     ;
-  abstract method f(covariant core::int* x, core::Object* y) → void;
+  abstract method f(covariant-by-declaration core::int* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(covariant core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.outline.expect
index e502022..b2910572 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.outline.expect
@@ -21,7 +21,7 @@
 abstract class I extends core::Object {
   synthetic constructor •() → self::I*
     ;
-  abstract method f(covariant core::int* x, core::Object* y) → void;
+  abstract method f(covariant-by-declaration core::int* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -36,8 +36,8 @@
 abstract class C extends self::B implements self::I {
   synthetic constructor •() → self::C*
     ;
-  forwarding-stub method f(covariant core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.transformed.expect
index 916ff08..8f7a060 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::I*
     : super core::Object::•()
     ;
-  abstract method f(covariant core::int* x, core::Object* y) → void;
+  abstract method f(covariant-by-declaration core::int* x, core::Object* y) → void;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,7 +38,7 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  forwarding-stub method f(covariant core::int* x, core::Object* y) → void
-    return super.{self::B::f}(x, y);
+  forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void
+    return super.{self::B::f}(x, y as core::int*);
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.expect
index 35ff920..d4b9b44 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-  method f(covariant core::int* x, core::int* y) → void {}
+  method f(covariant-by-declaration core::int* x, core::int* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,6 +38,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  abstract forwarding-stub method f(covariant core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.outline.expect
index 129a442..156233f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.outline.expect
@@ -5,7 +5,7 @@
 class B extends core::Object {
   synthetic constructor •() → self::B*
     ;
-  method f(covariant core::int* x, core::int* y) → void
+  method f(covariant-by-declaration core::int* x, core::int* y) → void
     ;
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
@@ -36,7 +36,7 @@
 abstract class C extends self::B implements self::I {
   synthetic constructor •() → self::C*
     ;
-  abstract forwarding-stub method f(covariant core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void;
 }
 static method main() → void
   ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.transformed.expect
index 35ff920..d4b9b44 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-  method f(covariant core::int* x, core::int* y) → void {}
+  method f(covariant-by-declaration core::int* x, core::int* y) → void {}
   abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
   abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
@@ -38,6 +38,6 @@
   synthetic constructor •() → self::C*
     : super self::B::•()
     ;
-  abstract forwarding-stub method f(covariant core::int* x, core::Object* y) → void;
+  abstract forwarding-stub method f(covariant-by-declaration core::int* x, core::Object* y) → void;
 }
 static method main() → void {}
diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect
index 6d82f2d..0a517eb 100644
--- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect
+++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect
@@ -2,26 +2,24 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class A extends core::_Enum /*isEnum*/  {
   static const field core::List<self::A> values = #C7;
   static const field self::A a = #C3;
   static const field self::A b = #C6;
-  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::A
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::A::_name}{core::String};
+    return "A.${this.{core::_Enum::_name}{core::String}}";
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = 0
-  #C2 = "A.a"
+  #C2 = "a"
   #C3 = self::A {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "A.b"
+  #C5 = "b"
   #C6 = self::A {index:#C4, _name:#C5}
   #C7 = <self::A>[#C3, #C6]
 }
@@ -30,4 +28,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - A. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect
index 6d82f2d..0a517eb 100644
--- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect
@@ -2,26 +2,24 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class A extends core::_Enum /*isEnum*/  {
   static const field core::List<self::A> values = #C7;
   static const field self::A a = #C3;
   static const field self::A b = #C6;
-  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::A
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::A::_name}{core::String};
+    return "A.${this.{core::_Enum::_name}{core::String}}";
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = 0
-  #C2 = "A.a"
+  #C2 = "a"
   #C3 = self::A {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "A.b"
+  #C5 = "b"
   #C6 = self::A {index:#C4, _name:#C5}
   #C7 = <self::A>[#C3, #C6]
 }
@@ -30,4 +28,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - A. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.expect
index 7609699..4d0ac34 100644
--- a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.expect
+++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.expect
@@ -2,26 +2,24 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class A extends core::_Enum /*isEnum*/  {
   static const field core::List<self::A> values = #C7;
   static const field self::A a = #C3;
   static const field self::A b = #C6;
-  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::A
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::A::_name}{core::String};
+    return "A.${this.{core::_Enum::_name}{core::String}}";
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = 0
-  #C2 = "A.a"
+  #C2 = "a"
   #C3 = self::A {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "A.b"
+  #C5 = "b"
   #C6 = self::A {index:#C4, _name:#C5}
   #C7 = <self::A*>[#C3, #C6]
 }
@@ -30,4 +28,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - A. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.outline.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.outline.expect
index 23e0446..a811664 100644
--- a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.outline.expect
@@ -2,24 +2,22 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class A extends core::_Enum /*isEnum*/  {
   static const field core::List<self::A> values = const <self::A>[self::A::a, self::A::b];
-  static const field self::A a = const self::A::•(0, "A.a");
-  static const field self::A b = const self::A::•(1, "A.b");
-  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
+  static const field self::A a = const self::A::•(0, "a");
+  static const field self::A b = const self::A::•(1, "b");
+  const constructor •(core::int index, core::String name) → self::A
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::A::_name}{core::String};
+    return "A.${this.{core::_Enum::_name}{core::String}}";
 }
 static method main() → dynamic
   ;
 
 
 Extra constant evaluation status:
-Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const <A*>[const A{A.index: 0, A._name: "A.a"}, const A{A.index: 1, A._name: "A.b"}])
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const A{A.index: 0, A._name: "A.a"})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const A{A.index: 1, A._name: "A.b"})
-Extra constant evaluation: evaluated: 7, effectively constant: 3
+Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const <A*>[const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}])
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const A{_Enum.index: 0, _Enum._name: "a"})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const A{_Enum.index: 1, _Enum._name: "b"})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.transformed.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.transformed.expect
index 7609699..4d0ac34 100644
--- a/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.weak.transformed.expect
@@ -2,26 +2,24 @@
 import self as self;
 import "dart:core" as core;
 
-class A extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class A extends core::_Enum /*isEnum*/  {
   static const field core::List<self::A> values = #C7;
   static const field self::A a = #C3;
   static const field self::A b = #C6;
-  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::A
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::A::_name}{core::String};
+    return "A.${this.{core::_Enum::_name}{core::String}}";
 }
 static method main() → dynamic {}
 
 constants  {
   #C1 = 0
-  #C2 = "A.a"
+  #C2 = "a"
   #C3 = self::A {index:#C1, _name:#C2}
   #C4 = 1
-  #C5 = "A.b"
+  #C5 = "b"
   #C6 = self::A {index:#C4, _name:#C5}
   #C7 = <self::A*>[#C3, #C6]
 }
@@ -30,4 +28,5 @@
 Constructor coverage from constants:
 org-dartlang-testcase:///enum.dart:
 - A. (from org-dartlang-testcase:///enum.dart:5:6)
+- _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart:76:9)
 - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 47b80dd..6b92aed 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -7,11 +7,15 @@
 # strong-mode enabled.
 
 dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
+dart2js/late_from_dill/main: SemiFuzzFailure # dartbug.com/45854, see also https://dart-review.googlesource.com/c/sdk/+/213768
 
 constructor_tearoffs/call_instantiation: TypeCheckError
 constructor_tearoffs/lowering/invalid_redirect: VerificationError
+extension_types/access_setter_as_getter: ExpectationFileMismatchSerialized # Expected.
+extension_types/call_not_get: ExpectationFileMismatchSerialized # Expected.
 extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
 extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
+extension_types/show_and_run_ceil: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_getter_resolution: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_method_resolution: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 9093936..6eff171 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -8,8 +8,11 @@
 
 constructor_tearoffs/call_instantiation: TypeCheckError
 constructor_tearoffs/lowering/invalid_redirect: VerificationError
+extension_types/access_setter_as_getter: ExpectationFileMismatchSerialized # Expected.
+extension_types/call_not_get: ExpectationFileMismatchSerialized # Expected.
 extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
 extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
+extension_types/show_and_run_ceil: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_getter_resolution: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_method_resolution: ExpectationFileMismatchSerialized # Expected.
@@ -69,7 +72,6 @@
 general/error_recovery/issue_39958_04: RuntimeError
 general/error_recovery/yield_not_in_generator: RuntimeError
 general/expressions: RuntimeError
-general/external_import: RuntimeError
 general/getter_vs_setter_type: TypeCheckError
 general/incomplete_field_formal_parameter: RuntimeError
 general/infer_field_from_multiple: TypeCheckError
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index c24938e..076e9ed 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -23,14 +23,24 @@
 const_functions/const_functions_const_ctor: FormatterCrash
 const_functions/const_functions_const_ctor_error: FormatterCrash
 const_functions/const_functions_const_factory: FormatterCrash
+constructor_tearoffs/issue46133: FormatterCrash
 constructor_tearoffs/issue47075: FormatterCrash
 dart2js/late_fields: FormatterCrash
 dart2js/late_statics: FormatterCrash
+extension_types/basic_show: FormatterCrash
+extension_types/call_not_get: FormatterCrash
+extension_types/keyword_in_show_hide_element: FormatterCrash
+extension_types/show_and_run_ceil: FormatterCrash
+extension_types/show_hide_all_kinds: FormatterCrash
 extension_types/simple_getter_resolution: FormatterCrash
 extension_types/simple_method_resolution: FormatterCrash
 extension_types/simple_operator_resolution: FormatterCrash
 extension_types/simple_setter_resolution: FormatterCrash
+extension_types/simple_show_and_hide: FormatterCrash
 extension_types/simple_show_hide: FormatterCrash
+extension_types/simple_show_hide_conflicts: FormatterCrash
+extension_types/various_hide_elements: FormatterCrash
+extension_types/various_show_elements: FormatterCrash
 extensions/extension_constructor: FormatterCrash
 extensions/extension_field_with_type_parameter_usage: FormatterCrash
 extensions/issue38600: FormatterCrash
diff --git a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.expect b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.expect
index e7ce2ad..5153118 100644
--- a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.expect
+++ b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
     : super core::Object::•()
     ;
-  method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void {}
+  method method(self::A::T% t, (self::A::U%) → void u, covariant-by-class self::A::V% v) → void {}
   method method2(self::A::T% x, [self::A::T? y = #C1]) → void {}
   set x(self::A::T% t) → void {}
   get mapContra() → core::Map<self::A::U%, self::Contravariant<self::A::V%>>
@@ -52,7 +52,7 @@
   synthetic constructor •() → self::D<self::D::T%>
     : super core::Object::•()
     ;
-  abstract method method(generic-covariant-impl self::D::T% x) → core::int;
+  abstract method method(covariant-by-class self::D::T% x) → core::int;
 }
 class E<invariant T extends core::Object? = dynamic> extends core::Object {
   final field (self::E::T%) → void f;
@@ -68,7 +68,7 @@
   constructor •((self::F::T%) → void f) → self::F<self::F::T%>
     : super self::E::•(f)
     ;
-  forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
+  forwarding-stub method method(covariant-by-class self::F::T% x) → core::int
     return super.{self::E::method}(x);
 }
 class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
@@ -121,7 +121,7 @@
   #C2 = #x
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #method
   #C7 = #y=
   #C8 = #x=
diff --git a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
index ae0d389..cd364ee 100644
--- a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.outline.expect
@@ -16,7 +16,7 @@
   final field (self::A::T%) →? void field;
   synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
     ;
-  method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void
+  method method(self::A::T% t, (self::A::U%) → void u, covariant-by-class self::A::V% v) → void
     ;
   method method2(self::A::T% x, [self::A::T? y]) → void
     ;
@@ -52,7 +52,7 @@
 abstract class D<T extends core::Object? = dynamic> extends core::Object {
   synthetic constructor •() → self::D<self::D::T%>
     ;
-  abstract method method(generic-covariant-impl self::D::T% x) → core::int;
+  abstract method method(covariant-by-class self::D::T% x) → core::int;
 }
 class E<invariant T extends core::Object? = dynamic> extends core::Object {
   final field (self::E::T%) → void f;
@@ -64,7 +64,7 @@
 class F<invariant T extends core::Object? = dynamic> extends self::E<self::F::T%> implements self::D<self::F::T%> {
   constructor •((self::F::T%) → void f) → self::F<self::F::T%>
     ;
-  forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
+  forwarding-stub method method(covariant-by-class self::F::T% x) → core::int
     return super.{self::E::method}(x);
 }
 class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
@@ -91,14 +91,14 @@
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> SymbolConstant(#x)
 Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <Type*>[])
 Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <dynamic>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> SymbolConstant(#method)
 Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:23:5 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> SymbolConstant(#y=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:24:12 -> MapConstant(const <Symbol*, dynamic>{})
 Evaluated: SymbolLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> SymbolConstant(#x=)
 Evaluated: ListLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> ListConstant(const <Type*>[])
-Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> InstanceConstant(const _ImmutableMap<Symbol*, dynamic>{_ImmutableMap._kvPairs: const <dynamic>[]})
+Evaluated: MapLiteral @ org-dartlang-testcase:///generic_covariance_sound_variance.dart:22:6 -> MapConstant(const <Symbol*, dynamic>{})
 Extra constant evaluation: evaluated: 42, effectively constant: 13
diff --git a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.transformed.expect b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.transformed.expect
index 5346fee6..663effd 100644
--- a/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/variance/generic_covariance_sound_variance.dart.weak.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::A<self::A::T%, self::A::U%, self::A::V%>
     : super core::Object::•()
     ;
-  method method(self::A::T% t, (self::A::U%) → void u, generic-covariant-impl self::A::V% v) → void {}
+  method method(self::A::T% t, (self::A::U%) → void u, covariant-by-class self::A::V% v) → void {}
   method method2(self::A::T% x, [self::A::T? y = #C1]) → void {}
   set x(self::A::T% t) → void {}
   get mapContra() → core::Map<self::A::U%, self::Contravariant<self::A::V%>>
@@ -52,7 +52,7 @@
   synthetic constructor •() → self::D<self::D::T%>
     : super core::Object::•()
     ;
-  abstract method method(generic-covariant-impl self::D::T% x) → core::int;
+  abstract method method(covariant-by-class self::D::T% x) → core::int;
 }
 class E<invariant T extends core::Object? = dynamic> extends core::Object {
   final field (self::E::T%) → void f;
@@ -68,7 +68,7 @@
   constructor •((self::F::T%) → void f) → self::F<self::F::T%>
     : super self::E::•(f)
     ;
-  forwarding-stub method method(generic-covariant-impl self::F::T% x) → core::int
+  forwarding-stub method method(covariant-by-class self::F::T% x) → core::int
     return super.{self::E::method}(x);
 }
 class NoSuchMethod<invariant T extends core::Object? = dynamic> extends core::Object implements self::B<self::NoSuchMethod::T%> {
@@ -121,7 +121,7 @@
   #C2 = #x
   #C3 = <core::Type*>[]
   #C4 = <dynamic>[]
-  #C5 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C4}
+  #C5 = <core::Symbol*, dynamic>{)
   #C6 = #method
   #C7 = #y=
   #C8 = #x=
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 15062a3..fe8d64f 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -10,11 +10,15 @@
 general/error_recovery/issue_39058.crash: SemiFuzzFailure
 regress/utf_16_le_content.crash: SemiFuzzCrash
 dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
+dart2js/late_from_dill/main: SemiFuzzFailure # dartbug.com/45854, see also https://dart-review.googlesource.com/c/sdk/+/213768
 
 constructor_tearoffs/call_instantiation: TypeCheckError
 constructor_tearoffs/lowering/invalid_redirect: VerificationError
+extension_types/access_setter_as_getter: ExpectationFileMismatchSerialized # Expected.
+extension_types/call_not_get: ExpectationFileMismatchSerialized # Expected.
 extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
 extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
+extension_types/show_and_run_ceil: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_getter_resolution: ExpectationFileMismatchSerialized # Expected.
 extension_types/simple_method_resolution: ExpectationFileMismatchSerialized # Expected.
@@ -74,7 +78,6 @@
 general/error_recovery/issue_39958_04: RuntimeError
 general/error_recovery/yield_not_in_generator: RuntimeError
 general/expressions: RuntimeError
-general/external_import: RuntimeError # The native extension to import doesn't exist. This is ok.
 general/getter_vs_setter_type: TypeCheckError
 general/incomplete_field_formal_parameter: RuntimeError
 general/infer_field_from_multiple: TypeCheckError
diff --git a/pkg/front_end/tool/_fasta/abcompile.dart b/pkg/front_end/tool/_fasta/abcompile.dart
index 26ad63a..2978ee2 100644
--- a/pkg/front_end/tool/_fasta/abcompile.dart
+++ b/pkg/front_end/tool/_fasta/abcompile.dart
@@ -18,7 +18,7 @@
 /// by alternately launching the compile application in this directory
 /// and the compile application location in the repo specified by "bRoot"
 /// via -DbRoot=/absolute/path/to/other/sdk/repo
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   print(args);
   if (bRootPath == null) {
     print('Expected -DbRoot=/absolute/path/to/other/sdk/repo');
diff --git a/pkg/front_end/tool/_fasta/entry_points.dart b/pkg/front_end/tool/_fasta/entry_points.dart
index af225d7..2aa92c9 100644
--- a/pkg/front_end/tool/_fasta/entry_points.dart
+++ b/pkg/front_end/tool/_fasta/entry_points.dart
@@ -86,7 +86,7 @@
   }
 }
 
-void outlineEntryPoint(List<String> arguments) async {
+Future<void> outlineEntryPoint(List<String> arguments) async {
   installAdditionalTargets();
 
   for (int i = 0; i < iterations; i++) {
@@ -97,7 +97,7 @@
   }
 }
 
-void depsEntryPoint(List<String> arguments) async {
+Future<void> depsEntryPoint(List<String> arguments) async {
   installAdditionalTargets();
 
   for (int i = 0; i < iterations; i++) {
@@ -108,7 +108,7 @@
   }
 }
 
-void compilePlatformEntryPoint(List<String> arguments) async {
+Future<void> compilePlatformEntryPoint(List<String> arguments) async {
   installAdditionalTargets();
   for (int i = 0; i < iterations; i++) {
     if (i > 0) {
@@ -118,7 +118,7 @@
   }
 }
 
-void batchEntryPoint(List<String> arguments) {
+Future<void> batchEntryPoint(List<String> arguments) {
   installAdditionalTargets();
   return new BatchCompiler(
           stdin.transform(utf8.decoder).transform(new LineSplitter()))
@@ -136,7 +136,7 @@
 
   BatchCompiler(this.lines);
 
-  void run() async {
+  Future<void> run() async {
     await for (String line in lines) {
       try {
         if (await batchCompileArguments(
@@ -156,7 +156,7 @@
     }
   }
 
-  Future<bool> batchCompileArguments(List<String> arguments) async {
+  Future<bool> batchCompileArguments(List<String> arguments) {
     return runProtectedFromAbort<bool>(
         () => withGlobalOptions<bool>("compile", arguments, true,
             (CompilerContext c, _) => batchCompileImpl(c)),
@@ -207,7 +207,7 @@
   }
 }
 
-void incrementalEntryPoint(List<String> arguments) async {
+Future<void> incrementalEntryPoint(List<String> arguments) async {
   installAdditionalTargets();
   await withGlobalOptions("incremental", arguments, true,
       (CompilerContext c, _) {
@@ -289,7 +289,7 @@
       CompilerContext.recordDependency(platform);
     }
     kernelTarget.setEntryPoints(c.options.inputs);
-    await dillTarget.buildOutlines();
+    dillTarget.buildOutlines();
     await kernelTarget.loader.buildOutlines();
 
     Uri? dFile;
@@ -328,7 +328,7 @@
     }
 
     kernelTarget.setEntryPoints(c.options.inputs);
-    await dillTarget.buildOutlines();
+    dillTarget.buildOutlines();
     var outline = await kernelTarget.buildOutlines();
     if (c.options.debugDump && output != null) {
       printComponentText(outline,
@@ -448,7 +448,7 @@
   }
 }
 
-Future<List<Uri>> computeHostDependencies(Uri hostPlatform) async {
+Future<List<Uri>> computeHostDependencies(Uri hostPlatform) {
   // Returns a list of source files that make up the Fasta compiler (the files
   // the Dart VM reads to run Fasta). Until Fasta is self-hosting (in strong
   // mode), this is only an approximation, albeit accurate.  Once Fasta is
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 97bf6d8..55d233a 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -96,7 +96,7 @@
     }
     Map<dynamic, dynamic>? map = description;
     if (map == null) {
-      throw "No 'template:' in key $name.";
+      throw "No 'problemMessage:' in key $name.";
     }
     var index = map['index'];
     if (index != null) {
@@ -121,8 +121,8 @@
         }
       }
     }
-    Template template = compileTemplate(name, index, map['template'],
-        map['tip'], map['analyzerCode'], map['severity']);
+    Template template = compileTemplate(name, index, map['problemMessage'],
+        map['correctionMessage'], map['analyzerCode'], map['severity']);
     if (template.isShared) {
       sharedMessages.writeln(template.text);
     } else {
@@ -164,17 +164,17 @@
   Template(this.text, {this.isShared}) : assert(isShared != null);
 }
 
-Template compileTemplate(String name, int? index, String? template, String? tip,
-    Object? analyzerCode, String? severity) {
-  if (template == null) {
-    print('Error: missing template for message: $name');
+Template compileTemplate(String name, int? index, String? problemMessage,
+    String? correctionMessage, Object? analyzerCode, String? severity) {
+  if (problemMessage == null) {
+    print('Error: missing problemMessage for message: $name');
     exitCode = 1;
     return new Template('', isShared: true);
   }
   // Remove trailing whitespace. This is necessary for templates defined with
   // `|` (verbatim) as they always contain a trailing newline that we don't
   // want.
-  template = template.trimRight();
+  problemMessage = problemMessage.trimRight();
   const String ignoreNotNull = "// ignore: unnecessary_null_comparison";
   var parameters = new Set<String>();
   var conversions = new Set<String>();
@@ -190,8 +190,8 @@
     canBeShared = false;
   }
 
-  for (Match match
-      in placeholderPattern.allMatches("$template\n${tip ?? ''}")) {
+  for (Match match in placeholderPattern
+      .allMatches("$problemMessage\n${correctionMessage ?? ''}")) {
     String name = match[1]!;
     String? padding = match[2];
     String? fractionDigits = match[3];
@@ -429,11 +429,11 @@
 
   if (parameters.isEmpty && conversions.isEmpty && arguments.isEmpty) {
     // ignore: unnecessary_null_comparison
-    if (template != null) {
-      codeArguments.add('message: r"""$template"""');
+    if (problemMessage != null) {
+      codeArguments.add('message: r"""$problemMessage"""');
     }
-    if (tip != null) {
-      codeArguments.add('tip: r"""$tip"""');
+    if (correctionMessage != null) {
+      codeArguments.add('tip: r"""$correctionMessage"""');
     }
 
     return new Template("""
@@ -448,23 +448,23 @@
 
   List<String> templateArguments = <String>[];
   // ignore: unnecessary_null_comparison
-  if (template != null) {
-    templateArguments.add('messageTemplate: r"""$template"""');
+  if (problemMessage != null) {
+    templateArguments.add('messageTemplate: r"""$problemMessage"""');
   }
-  if (tip != null) {
-    templateArguments.add('tipTemplate: r"""$tip"""');
+  if (correctionMessage != null) {
+    templateArguments.add('tipTemplate: r"""$correctionMessage"""');
   }
 
   templateArguments.add("withArguments: _withArguments$name");
 
   List<String> messageArguments = <String>[];
-  String message = interpolate(template);
+  String message = interpolate(problemMessage);
   if (hasLabeler) {
     message += " + labeler.originMessages";
   }
   messageArguments.add("message: ${message}");
-  if (tip != null) {
-    messageArguments.add("tip: ${interpolate(tip)}");
+  if (correctionMessage != null) {
+    messageArguments.add("tip: ${interpolate(correctionMessage)}");
   }
   messageArguments.add("arguments: { ${arguments.join(', ')} }");
 
diff --git a/pkg/front_end/tool/_fasta/log_analyzer.dart b/pkg/front_end/tool/_fasta/log_analyzer.dart
index 1fdbc7a..430b50b 100644
--- a/pkg/front_end/tool/_fasta/log_analyzer.dart
+++ b/pkg/front_end/tool/_fasta/log_analyzer.dart
@@ -8,7 +8,7 @@
 
 import 'package:testing/src/run_tests.dart' show CommandLine;
 
-void main(List<String> arguments) async {
+Future<void> main(List<String> arguments) async {
   CommandLine cl = CommandLine.parse(arguments);
   Set<String> fields = cl.commaSeparated("--fields=");
   if (fields.isEmpty) {
diff --git a/pkg/front_end/tool/_fasta/log_collector.dart b/pkg/front_end/tool/_fasta/log_collector.dart
index 3b0c717..c82af8f 100644
--- a/pkg/front_end/tool/_fasta/log_collector.dart
+++ b/pkg/front_end/tool/_fasta/log_collector.dart
@@ -30,7 +30,7 @@
   print("${request.uri}: $message");
 }
 
-void collectLog(DateTime time, HttpRequest request) async {
+Future<void> collectLog(DateTime time, HttpRequest request) async {
   String json = await request.cast<List<int>>().transform(utf8.decoder).join();
   var data;
   try {
@@ -81,7 +81,7 @@
 """);
 }
 
-void main(List<String> arguments) async {
+Future<void> main(List<String> arguments) async {
   RawReceivePort keepAlive = new RawReceivePort();
   Uri uri;
   if (arguments.length == 1) {
@@ -104,7 +104,7 @@
       badRequest(request, HttpStatus.notFound, "Not found.");
       continue;
     }
-    collectLog(new DateTime.now(), request);
+    await collectLog(new DateTime.now(), request);
   }
   keepAlive.close();
 }
diff --git a/pkg/front_end/tool/ast_model.dart b/pkg/front_end/tool/ast_model.dart
index 2e4d7f2..834aa12 100644
--- a/pkg/front_end/tool/ast_model.dart
+++ b/pkg/front_end/tool/ast_model.dart
@@ -2,19 +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:_fe_analyzer_shared/src/messages/diagnostic_message.dart';
 import 'package:front_end/src/api_prototype/front_end.dart';
-import 'package:front_end/src/api_prototype/kernel_generator.dart';
-import 'package:front_end/src/api_prototype/terminal_color_support.dart';
 import 'package:front_end/src/api_unstable/ddc.dart';
 import 'package:front_end/src/compute_platform_binaries_location.dart';
-import 'package:front_end/src/fasta/kernel/kernel_api.dart';
 import 'package:front_end/src/kernel_generator_impl.dart';
 import 'package:kernel/ast.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/src/printer.dart';
 import 'package:kernel/target/targets.dart';
+import 'package:kernel/type_algebra.dart';
 import 'package:kernel/type_environment.dart';
 import 'package:vm/target/vm.dart';
 
@@ -118,7 +115,7 @@
     'typeParameters': FieldRule(isDeclaration: true),
   },
   'Field': {
-    'reference': FieldRule(name: 'getterReference'),
+    'reference': FieldRule(name: 'fieldReference'),
   },
   'TypeParameter': {
     '_variance': FieldRule(name: 'variance'),
diff --git a/pkg/front_end/tool/dart_doctest_impl.dart b/pkg/front_end/tool/dart_doctest_impl.dart
index 92316dc..37f4d7a 100644
--- a/pkg/front_end/tool/dart_doctest_impl.dart
+++ b/pkg/front_end/tool/dart_doctest_impl.dart
@@ -26,8 +26,6 @@
 import 'package:_fe_analyzer_shared/src/scanner/utf8_bytes_scanner.dart'
     show Utf8BytesScanner;
 
-import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token;
-
 import 'package:front_end/src/api_prototype/compiler_options.dart';
 import 'package:front_end/src/api_prototype/file_system.dart';
 import 'package:front_end/src/api_prototype/memory_file_system.dart';
@@ -836,16 +834,16 @@
           in libraryBuilder.library.dependencies) {
         if (!dependency.isImport) continue;
 
-        List<Combinator>? combinators;
+        List<CombinatorBuilder>? combinators;
 
         for (kernel.Combinator combinator in dependency.combinators) {
-          combinators ??= <Combinator>[];
+          combinators ??= <CombinatorBuilder>[];
 
           combinators.add(combinator.isShow
-              ? new Combinator.show(combinator.names, combinator.fileOffset,
-                  libraryBuilder.fileUri)
-              : new Combinator.hide(combinator.names, combinator.fileOffset,
-                  libraryBuilder.fileUri));
+              ? new CombinatorBuilder.show(combinator.names,
+                  combinator.fileOffset, libraryBuilder.fileUri)
+              : new CombinatorBuilder.hide(combinator.names,
+                  combinator.fileOffset, libraryBuilder.fileUri));
         }
 
         dartDocTestLibrary.addImport(
@@ -885,7 +883,7 @@
       Uri fileUri,
       Uri? packageUri,
       LanguageVersion packageLanguageVersion,
-      SourceLibraryBuilder origin,
+      SourceLibraryBuilder? origin,
       kernel.Library? referencesFrom,
       bool? referenceIsPartOwner) {
     if (uri == DocTestIncrementalCompiler.dartDocTestUri) {
diff --git a/pkg/front_end/tool/fasta_perf.dart b/pkg/front_end/tool/fasta_perf.dart
index 6a04071..b9b02a3 100644
--- a/pkg/front_end/tool/fasta_perf.dart
+++ b/pkg/front_end/tool/fasta_perf.dart
@@ -43,7 +43,7 @@
 
   await setup(entryUri);
 
-  Map<Uri, List<int>> files = await scanReachableFiles(entryUri);
+  Map<Uri, List<int>> files = scanReachableFiles(entryUri);
   var handlers = {
     'scan': () async => scanFiles(files),
     // TODO(sigmund): enable when we can run the ast-builder standalone.
@@ -113,7 +113,7 @@
 
 /// Load and scans all files we need to process: files reachable from the
 /// entrypoint and all core libraries automatically included by the VM.
-Future<Map<Uri, List<int>>> scanReachableFiles(Uri entryUri) async {
+Map<Uri, List<int>> scanReachableFiles(Uri entryUri) {
   var files = <Uri, List<int>>{};
   var loadTimer = new Stopwatch()..start();
   scanTimer = new Stopwatch();
@@ -134,7 +134,7 @@
     Uri.parse('dart:typed_data'),
   ];
   for (var entry in entrypoints) {
-    await collectSources(entry, files);
+    collectSources(entry, files);
   }
   loadTimer.stop();
 
@@ -151,7 +151,7 @@
 }
 
 /// Add to [files] all sources reachable from [start].
-Future<Null> collectSources(Uri start, Map<Uri, List<int>> files) async {
+void collectSources(Uri start, Map<Uri, List<int>> files) {
   void helper(Uri uri) {
     uri = uriResolver.translate(uri) ?? uri;
     // ignore: unnecessary_null_comparison
@@ -221,7 +221,7 @@
     {bool compileSdk: true}) async {
   // TODO(sigmund): this is here only to compute the input size,
   // we should extract the input size from the frontend instead.
-  await scanReachableFiles(entryUri);
+  scanReachableFiles(entryUri);
 
   var timer = new Stopwatch()..start();
   var options = new CompilerOptions()
diff --git a/pkg/front_end/tool/fasta_perf_test.dart b/pkg/front_end/tool/fasta_perf_test.dart
index 1671627..1d561b8 100644
--- a/pkg/front_end/tool/fasta_perf_test.dart
+++ b/pkg/front_end/tool/fasta_perf_test.dart
@@ -9,7 +9,7 @@
 import 'dart:io' show Platform;
 import 'fasta_perf.dart' as m show main;
 
-void main() async {
+Future<void> main() async {
   var benchIds = [
     'scan',
     'kernel_gen_e2e',
diff --git a/pkg/front_end/tool/generate_ast_coverage.dart b/pkg/front_end/tool/generate_ast_coverage.dart
index 516d5e1..d3a299b 100644
--- a/pkg/front_end/tool/generate_ast_coverage.dart
+++ b/pkg/front_end/tool/generate_ast_coverage.dart
@@ -13,7 +13,7 @@
   return repoDir.resolve('pkg/kernel/lib/src/coverage.dart');
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Uri output = args.isEmpty
       ? computeCoverageUri(Uri.base)
       : new File(args[0]).absolute.uri;
diff --git a/pkg/front_end/tool/generate_ast_equivalence.dart b/pkg/front_end/tool/generate_ast_equivalence.dart
index 5a0c02b..beea310 100644
--- a/pkg/front_end/tool/generate_ast_equivalence.dart
+++ b/pkg/front_end/tool/generate_ast_equivalence.dart
@@ -11,7 +11,7 @@
   return repoDir.resolve('pkg/kernel/lib/src/equivalence.dart');
 }
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Uri output = args.isEmpty
       ? computeEquivalenceUri(Uri.base)
       : new File(args[0]).absolute.uri;
diff --git a/pkg/front_end/tool/incremental_perf_test.dart b/pkg/front_end/tool/incremental_perf_test.dart
index d24c01a..1be785ef 100644
--- a/pkg/front_end/tool/incremental_perf_test.dart
+++ b/pkg/front_end/tool/incremental_perf_test.dart
@@ -9,7 +9,7 @@
     show computePlatformBinariesLocation;
 import 'incremental_perf.dart' as m show main;
 
-void main() async {
+Future<void> main() async {
   var sdkOutline = computePlatformBinariesLocation(forceBuildDir: true).resolve(
       // TODO(sigmund): switch to `vm_outline.dill` (issue #29881).
       "vm_platform_strong.dill");
diff --git a/pkg/front_end/tool/perf.dart b/pkg/front_end/tool/perf.dart
index bd751cb..be32427 100644
--- a/pkg/front_end/tool/perf.dart
+++ b/pkg/front_end/tool/perf.dart
@@ -28,7 +28,6 @@
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:path/path.dart' as path;
 
@@ -42,7 +41,7 @@
   var bench = args[0];
   var entryUri = Uri.base.resolve(args[1]);
 
-  await setup(path.fromUri(entryUri));
+  setup(path.fromUri(entryUri));
 
   Set<Source> files = scanReachableFiles(entryUri);
   var handlers = {
@@ -197,7 +196,7 @@
 
 /// Sets up analyzer to be able to load and resolve app, packages, and sdk
 /// sources.
-Future setup(String path) async {
+void setup(String path) {
   var provider = PhysicalResourceProvider.INSTANCE;
 
   var packages = findPackagesFrom(
diff --git a/pkg/front_end/tool/perf_test.dart b/pkg/front_end/tool/perf_test.dart
index 495c9fb..6667553 100644
--- a/pkg/front_end/tool/perf_test.dart
+++ b/pkg/front_end/tool/perf_test.dart
@@ -7,7 +7,7 @@
 import 'dart:io' show Platform;
 import 'perf.dart' as m;
 
-void main() async {
+Future<void> main() async {
   var benchIds = ['scan', 'parse'];
   var inputFile =
       Platform.script.resolve('../lib/src/api_prototype/file_system.dart').path;
diff --git a/pkg/front_end/tool/smoke_test_quick.dart b/pkg/front_end/tool/smoke_test_quick.dart
index b6d94f8..12b77c3 100644
--- a/pkg/front_end/tool/smoke_test_quick.dart
+++ b/pkg/front_end/tool/smoke_test_quick.dart
@@ -10,7 +10,7 @@
 
 String get dartVm => Platform.executable;
 
-void main(List<String> args) async {
+Future<void> main(List<String> args) async {
   Stopwatch stopwatch = new Stopwatch()..start();
   List<Future> futures = <Future>[];
   futures.add(run("pkg/front_end/test/explicit_creation_git_test.dart",
diff --git a/pkg/front_end/tool/update_all.dart b/pkg/front_end/tool/update_all.dart
index e32686e..bffcf9f 100644
--- a/pkg/front_end/tool/update_all.dart
+++ b/pkg/front_end/tool/update_all.dart
@@ -23,7 +23,7 @@
   'pkg/front_end/test/static_types/static_type_test.dart',
 ];
 
-void main() async {
+Future<void> main() async {
   // Update all tests based on expectation files.
   await expectations.main(const <String>[]);
 
diff --git a/pkg/frontend_server/lib/compute_kernel.dart b/pkg/frontend_server/lib/compute_kernel.dart
index b6c5616..a75573e 100644
--- a/pkg/frontend_server/lib/compute_kernel.dart
+++ b/pkg/frontend_server/lib/compute_kernel.dart
@@ -240,7 +240,7 @@
         verbose: verbose,
         nnbdMode: nnbdMode);
   } else {
-    state = await fe.initializeCompiler(
+    state = fe.initializeCompiler(
         // TODO(sigmund): pass an old state once we can make use of it.
         null,
         toUri(parsedArgs['dart-sdk-summary']),
diff --git a/pkg/frontend_server/lib/frontend_server.dart b/pkg/frontend_server/lib/frontend_server.dart
index 29589fc..9545afb 100644
--- a/pkg/frontend_server/lib/frontend_server.dart
+++ b/pkg/frontend_server/lib/frontend_server.dart
@@ -274,6 +274,7 @@
       List<String> typeDefinitions,
       String libraryUri,
       String klass,
+      String method,
       bool isStatic);
 
   /// Compiles [expression] in [libraryUri] at [line]:[column] to JavaScript
@@ -806,11 +807,12 @@
       List<String> typeDefinitions,
       String libraryUri,
       String klass,
+      String method,
       bool isStatic) async {
     final String boundaryKey = Uuid().generateV4();
     _outputStream.writeln('result $boundaryKey');
-    Procedure procedure = await _generator.compileExpression(
-        expression, definitions, typeDefinitions, libraryUri, klass, isStatic);
+    Procedure procedure = await _generator.compileExpression(expression,
+        definitions, typeDefinitions, libraryUri, klass, method, isStatic);
     if (procedure != null) {
       Component component = createExpressionEvaluationComponent(procedure);
       final IOSink sink = File(_kernelBinaryFilename).openWrite();
@@ -1091,6 +1093,7 @@
   List<String> typeDefs = <String>[];
   String library;
   String klass;
+  String method;
   bool isStatic;
 }
 
@@ -1231,6 +1234,7 @@
               compileExpressionRequest.typeDefs,
               compileExpressionRequest.library,
               compileExpressionRequest.klass,
+              compileExpressionRequest.method,
               compileExpressionRequest.isStatic);
         } else {
           compiler
diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart
index 8205380..a586bf7 100644
--- a/pkg/frontend_server/test/frontend_server_test.dart
+++ b/pkg/frontend_server/test/frontend_server_test.dart
@@ -2327,6 +2327,116 @@
       expect(count, 3);
     });
 
+    test('compiled Javascript includes web library environment defines',
+        () async {
+      var file = File('${tempDir.path}/foo.dart')..createSync();
+      file.writeAsStringSync(
+          "main() {print(const bool.fromEnvironment('dart.library.html'));}\n");
+      var package_config =
+          File('${tempDir.path}/.dart_tool/package_config.json')
+            ..createSync(recursive: true)
+            ..writeAsStringSync('''
+  {
+    "configVersion": 2,
+    "packages": [
+      {
+        "name": "hello",
+        "rootUri": "../",
+        "packageUri": "./"
+      }
+    ]
+  }
+  ''');
+
+      var library = 'package:hello/foo.dart';
+      var module = 'packages/hello/foo.dart';
+
+      var dillFile = File('${tempDir.path}/foo.dart.dill');
+      var sourceFile = File('${dillFile.path}.sources');
+      var manifestFile = File('${dillFile.path}.json');
+      var sourceMapsFile = File('${dillFile.path}.map');
+
+      expect(dillFile.existsSync(), false);
+
+      final List<String> args = <String>[
+        '--sdk-root=${sdkRoot.toFilePath()}',
+        '--incremental',
+        '--platform=${ddcPlatformKernel.path}',
+        '--output-dill=${dillFile.path}',
+        '--target=dartdevc',
+        '--packages=${package_config.path}',
+      ];
+
+      final StreamController<List<int>> streamController =
+          StreamController<List<int>>();
+      final StreamController<List<int>> stdoutStreamController =
+          StreamController<List<int>>();
+      final IOSink ioSink = IOSink(stdoutStreamController.sink);
+      StreamController<Result> receivedResults = StreamController<Result>();
+      final outputParser = OutputParser(receivedResults);
+      stdoutStreamController.stream
+          .transform(utf8.decoder)
+          .transform(const LineSplitter())
+          .listen(outputParser.listener);
+
+      Future<int> result =
+          starter(args, input: streamController.stream, output: ioSink);
+      streamController.add('compile $library\n'.codeUnits);
+      int count = 0;
+      receivedResults.stream.listen((Result compiledResult) {
+        CompilationResult result =
+            CompilationResult.parse(compiledResult.status);
+        if (count == 0) {
+          // Request to 'compile', which results in full JavaScript.
+          expect(result.errorsCount, equals(0));
+          expect(sourceFile.existsSync(), equals(true));
+          expect(manifestFile.existsSync(), equals(true));
+          expect(sourceMapsFile.existsSync(), equals(true));
+          expect(result.filename, dillFile.path);
+
+          var compiledOutput = sourceFile.readAsStringSync();
+          // The constant environment variable should be inlined as a boolean
+          // literal.
+          expect(compiledOutput, contains('print(true);'));
+
+          streamController.add('accept\n'.codeUnits);
+
+          // 'compile-expression-to-js <boundarykey>
+          // libraryUri
+          // line
+          // column
+          // jsModules (one k-v pair per line)
+          // ...
+          // <boundarykey>
+          // jsFrameValues (one k-v pair per line)
+          // ...
+          // <boundarykey>
+          // moduleName
+          // expression
+          outputParser.expectSources = false;
+          streamController.add('compile-expression-to-js abc\n'
+                  '$library\n2\n1\nabc\nabc\n$module\n'
+                  'const bool.fromEnvironment("dart.library.html")\n'
+              .codeUnits);
+          count += 1;
+        } else {
+          expect(count, 1);
+          // Second request is to 'compile-expression-to-js' that should
+          // result in a literal `true` .
+          expect(result.errorsCount, 0);
+          var resultFile = File(result.filename);
+          // The constant environment variable should be inlined as a boolean
+          // literal.
+          expect(resultFile.readAsStringSync(), contains('return true;'));
+          outputParser.expectSources = false;
+          count += 1;
+          streamController.add('quit\n'.codeUnits);
+        }
+      });
+      expect(await result, 0);
+      expect(count, 2);
+    });
+
     test('mixed compile expression commands with web target', () async {
       var file = File('${tempDir.path}/foo.dart')..createSync();
       file.writeAsStringSync("main() {\n\n}\n");
diff --git a/pkg/kernel/bin/split.dart b/pkg/kernel/bin/split.dart
index 90f1028..149f28e 100755
--- a/pkg/kernel/bin/split.dart
+++ b/pkg/kernel/bin/split.dart
@@ -8,7 +8,6 @@
 
 import 'package:kernel/ast.dart';
 import 'package:kernel/binary/ast_to_binary.dart';
-import 'package:kernel/kernel.dart';
 import 'package:kernel/src/tool/command_line_util.dart';
 
 void usage() {
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index bf0cb40..8c4fccf 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -147,7 +147,7 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 70;
+  UInt32 formatVersion = 73;
   Byte[10] shortSdkHash;
   List<String> problemsAsJson; // Described in problems.md.
   Library[] libraries;
@@ -346,6 +346,20 @@
   Byte flags (isExtensionTypeDeclaration);
   List<TypeParameter> typeParameters;
   DartType onType;
+  Option<ExtensionTypeShowHideClause> showHideClause;
+}
+
+type ExtensionTypeShowHideClause {
+  List<DartType> shownSupertypes;
+  List<CanonicalNameReference> shownMembers;
+  List<CanonicalNameReference> shownGetters;
+  List<CanonicalNameReference> shownSetters;
+  List<CanonicalNameReference> shownOperators;
+  List<DartType> hiddenSupertypes;
+  List<CanonicalNameReference> hiddenMembers;
+  List<CanonicalNameReference> hiddenGetters;
+  List<CanonicalNameReference> hiddenSetters;
+  List<CanonicalNameReference> hiddenOperators;
   List<ExtensionMemberDescriptor> members;
 }
 
@@ -362,14 +376,15 @@
 
 type Field extends Member {
   Byte tag = 4;
+  CanonicalNameReference canonicalNameField;
   CanonicalNameReference canonicalNameGetter;
   CanonicalNameReference canonicalNameSetter;
   // An absolute path URI to the .dart file from which the field was created.
   UriReference fileUri;
   FileOffset fileOffset;
   FileOffset fileEndOffset;
-  UInt flags (isFinal, isConst, isStatic, isCovariant,
-                isGenericCovariantImpl, isLate, isExtensionMember,
+  UInt flags (isFinal, isConst, isStatic, isCovariantByDeclaration,
+                isCovariantByClass, isLate, isExtensionMember,
                 isNonNullableByDefault, isInternalImplementation);
   Name name;
   List<Expression> annotations;
@@ -1377,8 +1392,8 @@
 
   List<Expression> annotations;
 
-  Byte flags (isFinal, isConst, isFieldFormal, isCovariant,
-              isGenericCovariantImpl, isLate, isRequired, isLowered);
+  Byte flags (isFinal, isConst, isInitializingFormal, isCovariantByDeclaration,
+              isCovariantByClass, isLate, isRequired, isLowered);
   // For named parameters, this is the parameter name.
   // For other variables, the name is cosmetic, may be empty,
   // and is not necessarily unique.
@@ -1501,7 +1516,7 @@
 
 type TypeParameter {
   // Note: there is no tag on TypeParameter
-  Byte flags (isGenericCovariantImpl);
+  Byte flags (isCovariantByClass);
   List<Expression> annotations;
   Byte variance; // Index into the Variance enum above
   StringReference name; // Cosmetic, may be empty, not unique.
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 2ebf049..ee30a76 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -64,7 +64,6 @@
 ///
 library kernel.ast;
 
-import 'dart:core';
 import 'dart:collection' show ListBase;
 import 'dart:convert' show utf8;
 
@@ -80,6 +79,7 @@
 import 'transformations/flags.dart';
 import 'text/ast_to_text.dart' as astToText;
 import 'core_types.dart';
+import 'class_hierarchy.dart';
 import 'type_algebra.dart';
 import 'type_environment.dart';
 import 'src/assumptions.dart';
@@ -216,11 +216,7 @@
 
   NamedNode(Reference? reference)
       : this.reference = reference ?? new Reference() {
-    if (this is Field) {
-      (this as Field).getterReference.node = this;
-    } else {
-      this.reference.node = this;
-    }
+    this.reference.node = this;
   }
 
   /// This is an advanced feature.
@@ -493,7 +489,10 @@
     }
     for (int i = 0; i < fields.length; ++i) {
       Field field = fields[i];
-      canonicalName.getChildFromField(field).bindTo(field.getterReference);
+      canonicalName.getChildFromField(field).bindTo(field.fieldReference);
+      canonicalName
+          .getChildFromFieldGetter(field)
+          .bindTo(field.getterReference);
       if (field.hasSetter) {
         canonicalName
             .getChildFromFieldSetter(field)
@@ -1262,7 +1261,10 @@
     if (!dirty) return;
     for (int i = 0; i < fields.length; ++i) {
       Field member = fields[i];
-      canonicalName.getChildFromField(member).bindTo(member.getterReference);
+      canonicalName.getChildFromField(member).bindTo(member.fieldReference);
+      canonicalName
+          .getChildFromFieldGetter(member)
+          .bindTo(member.getterReference);
       if (member.hasSetter) {
         canonicalName
             .getChildFromFieldSetter(member)
@@ -1530,8 +1532,16 @@
   ///   class A {}
   ///   extension B on A {}
   ///
+  /// The 'on clause' appears also in the experimental feature 'extension
+  /// types' as a part of an extension type declaration, for example:
+  ///
+  ///   class A {}
+  ///   extension type B on A {}
   late DartType onType;
 
+  /// The 'show' and 'hide' clauses of an extension type declaration.
+  ExtensionTypeShowHideClause? showHideClause;
+
   /// The members declared by the extension.
   ///
   /// The members are converted into top-level members and only accessible
@@ -1599,6 +1609,10 @@
   void visitChildren(Visitor v) {
     visitList(typeParameters, v);
     onType.accept(v);
+    if (showHideClause != null) {
+      visitList(showHideClause!.shownSupertypes, v);
+      visitList(showHideClause!.hiddenSupertypes, v);
+    }
   }
 
   @override
@@ -1609,6 +1623,10 @@
     if (onType != null) {
       onType = v.visitDartType(onType);
     }
+    if (showHideClause != null) {
+      v.transformSupertypeList(showHideClause!.shownSupertypes);
+      v.transformSupertypeList(showHideClause!.hiddenSupertypes);
+    }
   }
 
   @override
@@ -1619,6 +1637,10 @@
     if (onType != null) {
       onType = v.visitDartType(onType, cannotRemoveSentinel);
     }
+    if (showHideClause != null) {
+      v.transformSupertypeList(showHideClause!.shownSupertypes);
+      v.transformSupertypeList(showHideClause!.hiddenSupertypes);
+    }
   }
 
   @override
@@ -1653,7 +1675,7 @@
   /// The name of the extension member.
   ///
   /// The name of the generated top-level member is mangled to ensure
-  /// uniqueness. This name is used to lookup an extension method the
+  /// uniqueness. This name is used to lookup an extension method in the
   /// extension itself.
   Name name;
 
@@ -1706,6 +1728,180 @@
   }
 }
 
+enum CallSiteAccessKind {
+  methodInvocation,
+  getterInvocation,
+  setterInvocation,
+  operatorInvocation,
+}
+
+/// Elements of the 'show' and 'hide' clauses of an extension type declaration.
+class ExtensionTypeShowHideClause {
+  /// The types in the 'show clause' of the extension type declaration.
+  ///
+  /// For instance A, B in:
+  ///
+  ///   class A {}
+  ///   class B {}
+  ///   class C extends B implements A {}
+  ///   extension type E on C show B, A {}
+  final List<Supertype> shownSupertypes = <Supertype>[];
+
+  /// The methods in the 'show clause' of the extension type declaration.
+  ///
+  /// For instance foo in
+  ///
+  ///   class A {
+  ///     void foo() {}
+  ///   }
+  ///   extension type E on A show foo {}
+  final List<Reference> shownMethods = <Reference>[];
+
+  /// The getters in the 'show clause' of the extension type declaration.
+  ///
+  /// For instance foo, bar, baz in
+  ///
+  ///   class A {
+  ///     void foo() {}
+  ///     int? bar;
+  ///     int get baz => 42;
+  ///   }
+  ///   extension type E on A show get foo, get bar, get baz {}
+  final List<Reference> shownGetters = <Reference>[];
+
+  /// The setters in the 'show clause' of the extension type declaration.
+  ///
+  /// For instance foo, bar in
+  ///
+  ///   class A {
+  ///     int? foo;
+  ///     void set bar(int value) {}
+  ///   }
+  ///   extension type E on A show set foo, set bar {}
+  final List<Reference> shownSetters = <Reference>[];
+
+  /// The operators in the 'show clause' of the extension type declaration.
+  ///
+  /// For instance +, * in
+  ///
+  ///   class A {
+  ///     A operator+(A other) => other;
+  ///     A operator*(A other) => this;
+  ///   }
+  ///   extension type E on A show operator +, operator * {}
+  final List<Reference> shownOperators = <Reference>[];
+
+  /// The types in the 'hide clause' of the extension type declaration.
+  ///
+  /// For instance A, B in:
+  ///
+  ///   class A {}
+  ///   class B {}
+  ///   class C extends B implements A {}
+  ///   extension E on C hide A, B {}
+  final List<Supertype> hiddenSupertypes = <Supertype>[];
+
+  /// The methods in the 'hide clause' of the extension type declaration.
+  ///
+  /// For instance foo in
+  ///
+  ///   class A {
+  ///     void foo() {}
+  ///   }
+  ///   extension type E on A hide foo {}
+  final List<Reference> hiddenMethods = <Reference>[];
+
+  /// The getters in the 'hide clause' of the extension type declaration.
+  ///
+  /// For instance foo, bar, baz in
+  ///
+  ///   class A {
+  ///     void foo() {}
+  ///     int? bar;
+  ///     int get baz => 42;
+  ///   }
+  ///   extension type E on A hide get foo, get bar, get baz {}
+  final List<Reference> hiddenGetters = <Reference>[];
+
+  /// The setters in the 'hide clause' of the extension type declaration.
+  ///
+  /// For instance foo, bar in
+  ///
+  ///   class A {
+  ///     int? foo;
+  ///     void set bar(int value) {}
+  ///   }
+  ///   extension type E on A hide set foo, set bar {}
+  final List<Reference> hiddenSetters = <Reference>[];
+
+  /// The operators in the 'hide clause' of the extension type declaration.
+  ///
+  /// For instance +, * in
+  ///
+  ///   class A {
+  ///     A operator+(A other) => other;
+  ///     A operator*(A other) => this;
+  ///   }
+  ///   extension type E on A hide operator +, operator * {}
+  final List<Reference> hiddenOperators = <Reference>[];
+
+  Reference? findShownReference(Name name,
+      CallSiteAccessKind callSiteAccessKind, ClassHierarchy hierarchy) {
+    List<Reference> shownReferences;
+    List<Reference> hiddenReferences;
+    switch (callSiteAccessKind) {
+      case CallSiteAccessKind.getterInvocation:
+        shownReferences = shownGetters;
+        hiddenReferences = hiddenGetters;
+        break;
+      case CallSiteAccessKind.setterInvocation:
+        shownReferences = shownSetters;
+        hiddenReferences = hiddenSetters;
+        break;
+      case CallSiteAccessKind.methodInvocation:
+        shownReferences = shownMethods;
+        hiddenReferences = hiddenMethods;
+        break;
+      case CallSiteAccessKind.operatorInvocation:
+        shownReferences = shownOperators;
+        hiddenReferences = hiddenOperators;
+        break;
+    }
+
+    Reference? reference = _findMember(
+        name, shownReferences, shownSupertypes, hierarchy, callSiteAccessKind);
+    if (reference != null &&
+        _findMember(name, hiddenReferences, hiddenSupertypes, hierarchy,
+                callSiteAccessKind) ==
+            null) {
+      return reference;
+    }
+
+    return null;
+  }
+
+  Reference? _findMember(
+      Name name,
+      List<Reference> references,
+      List<Supertype> interfaces,
+      ClassHierarchy hierarchy,
+      CallSiteAccessKind callSiteAccessKind) {
+    for (Reference reference in references) {
+      if (reference.asMember.name == name) {
+        return reference;
+      }
+    }
+    for (Supertype interface in interfaces) {
+      Member? member = hierarchy.getInterfaceMember(interface.classNode, name,
+          setter: callSiteAccessKind == CallSiteAccessKind.setterInvocation);
+      if (member != null) {
+        return member.reference;
+      }
+    }
+    return null;
+  }
+}
+
 // ------------------------------------------------------------------------
 //                            MEMBERS
 // ------------------------------------------------------------------------
@@ -1855,32 +2051,50 @@
   DartType type; // Not null. Defaults to DynamicType.
   int flags = 0;
   Expression? initializer; // May be null.
+
+  /// Reference used for reading from this field.
+  ///
+  /// This should be used as the target in [StaticGet], [InstanceGet], and
+  /// [SuperPropertyGet].
+  final Reference getterReference;
+
+  /// Reference used for writing to this field.
+  ///
+  /// This should be used as the target in [StaticSet], [InstanceSet], and
+  /// [SuperPropertySet].
   final Reference? setterReference;
 
   @override
   @Deprecated("Use the specific getterReference/setterReference instead")
   Reference get reference => super.reference;
 
-  Reference get getterReference => super.reference;
+  /// Reference used for initializing this field.
+  ///
+  /// This should be used as the target in [FieldInitializer] and as the key
+  /// in the field values of [InstanceConstant].
+  Reference get fieldReference => super.reference;
 
   Field.mutable(Name name,
       {this.type: const DynamicType(),
       this.initializer,
-      bool isCovariant: false,
+      bool isCovariantByDeclaration: false,
       bool isFinal: false,
       bool isStatic: false,
       bool isLate: false,
       int transformerFlags: 0,
       required Uri fileUri,
+      Reference? fieldReference,
       Reference? getterReference,
       Reference? setterReference})
-      : this.setterReference = setterReference ?? new Reference(),
-        super(name, fileUri, getterReference) {
+      : this.getterReference = getterReference ?? new Reference(),
+        this.setterReference = setterReference ?? new Reference(),
+        super(name, fileUri, fieldReference) {
+    this.getterReference.node = this;
     this.setterReference!.node = this;
     // ignore: unnecessary_null_comparison
     assert(type != null);
     initializer?.parent = this;
-    this.isCovariant = isCovariant;
+    this.isCovariantByDeclaration = isCovariantByDeclaration;
     this.isFinal = isFinal;
     this.isStatic = isStatic;
     this.isLate = isLate;
@@ -1890,20 +2104,23 @@
   Field.immutable(Name name,
       {this.type: const DynamicType(),
       this.initializer,
-      bool isCovariant: false,
+      bool isCovariantByDeclaration: false,
       bool isFinal: false,
       bool isConst: false,
       bool isStatic: false,
       bool isLate: false,
       int transformerFlags: 0,
       required Uri fileUri,
+      Reference? fieldReference,
       Reference? getterReference})
-      : this.setterReference = null,
-        super(name, fileUri, getterReference) {
+      : this.getterReference = getterReference ?? new Reference(),
+        this.setterReference = null,
+        super(name, fileUri, fieldReference) {
+    this.getterReference.node = this;
     // ignore: unnecessary_null_comparison
     assert(type != null);
     initializer?.parent = this;
-    this.isCovariant = isCovariant;
+    this.isCovariantByDeclaration = isCovariantByDeclaration;
     this.isFinal = isFinal;
     this.isConst = isConst;
     this.isStatic = isStatic;
@@ -1913,7 +2130,8 @@
 
   @override
   void _relinkNode() {
-    super._relinkNode();
+    this.fieldReference.node = this;
+    this.getterReference.node = this;
     if (hasSetter) {
       this.setterReference!.node = this;
     }
@@ -1923,14 +2141,14 @@
   static const int FlagConst = 1 << 1;
   static const int FlagStatic = 1 << 2;
   static const int FlagCovariant = 1 << 3;
-  static const int FlagGenericCovariantImpl = 1 << 4;
+  static const int FlagCovariantByClass = 1 << 4;
   static const int FlagLate = 1 << 5;
   static const int FlagExtensionMember = 1 << 6;
   static const int FlagNonNullableByDefault = 1 << 7;
   static const int FlagInternalImplementation = 1 << 8;
 
   /// Whether the field is declared with the `covariant` keyword.
-  bool get isCovariant => flags & FlagCovariant != 0;
+  bool get isCovariantByDeclaration => flags & FlagCovariant != 0;
 
   bool get isFinal => flags & FlagFinal != 0;
 
@@ -1947,7 +2165,7 @@
   ///
   /// When `true`, runtime checks may need to be performed; see
   /// [DispatchCategory] for details.
-  bool get isGenericCovariantImpl => flags & FlagGenericCovariantImpl != 0;
+  bool get isCovariantByClass => flags & FlagCovariantByClass != 0;
 
   /// Whether the field is declared with the `late` keyword.
   bool get isLate => flags & FlagLate != 0;
@@ -1959,7 +2177,7 @@
   // lowering.
   bool get isInternalImplementation => flags & FlagInternalImplementation != 0;
 
-  void set isCovariant(bool value) {
+  void set isCovariantByDeclaration(bool value) {
     flags = value ? (flags | FlagCovariant) : (flags & ~FlagCovariant);
   }
 
@@ -1980,10 +2198,10 @@
         value ? (flags | FlagExtensionMember) : (flags & ~FlagExtensionMember);
   }
 
-  void set isGenericCovariantImpl(bool value) {
+  void set isCovariantByClass(bool value) {
     flags = value
-        ? (flags | FlagGenericCovariantImpl)
-        : (flags & ~FlagGenericCovariantImpl);
+        ? (flags | FlagCovariantByClass)
+        : (flags & ~FlagCovariantByClass);
   }
 
   void set isLate(bool value) {
@@ -2074,7 +2292,7 @@
 
   @override
   void toTextInternal(AstPrinter printer) {
-    printer.writeMemberName(getterReference);
+    printer.writeMemberName(fieldReference);
   }
 }
 
@@ -2397,8 +2615,8 @@
   /// The stub target is `null`.
   Regular,
 
-  /// An abstract procedure inserted to add `isCovariant` and
-  /// `isGenericCovariantImpl` to parameters for a set of overridden members.
+  /// An abstract procedure inserted to add `isCovariantByDeclaration` and
+  /// `isCovariantByClass` to parameters for a set of overridden members.
   ///
   /// The stub is inserted when not all of the overridden members agree on
   /// the covariance flags. For instance:
@@ -2423,8 +2641,8 @@
   /// The stub target is one of the overridden members.
   AbstractForwardingStub,
 
-  /// A concrete procedure inserted to add `isCovariant` and
-  /// `isGenericCovariantImpl` checks to parameters before calling the
+  /// A concrete procedure inserted to add `isCovariantByDeclaration` and
+  /// `isCovariantByClass` checks to parameters before calling the
   /// overridden member in the superclass.
   ///
   /// The stub is inserted when not all of the overridden members agree on
@@ -2968,10 +3186,7 @@
   Expression value;
 
   FieldInitializer(Field field, Expression value)
-      : this.byReference(
-            // getterReference is used since this refers to the field itself
-            field.getterReference,
-            value);
+      : this.byReference(field.fieldReference, value);
 
   FieldInitializer.byReference(this.fieldReference, this.value) {
     value.parent = this;
@@ -2980,7 +3195,7 @@
   Field get field => fieldReference.asField;
 
   void set field(Field field) {
-    fieldReference = field.getterReference;
+    fieldReference = field.fieldReference;
   }
 
   @override
@@ -9927,8 +10142,8 @@
       int flags: -1,
       bool isFinal: false,
       bool isConst: false,
-      bool isFieldFormal: false,
-      bool isCovariant: false,
+      bool isInitializingFormal: false,
+      bool isCovariantByDeclaration: false,
       bool isLate: false,
       bool isRequired: false,
       bool isLowered: false}) {
@@ -9940,8 +10155,8 @@
     } else {
       this.isFinal = isFinal;
       this.isConst = isConst;
-      this.isFieldFormal = isFieldFormal;
-      this.isCovariant = isCovariant;
+      this.isInitializingFormal = isInitializingFormal;
+      this.isCovariantByDeclaration = isCovariantByDeclaration;
       this.isLate = isLate;
       this.isRequired = isRequired;
       this.isLowered = isLowered;
@@ -9952,7 +10167,7 @@
   VariableDeclaration.forValue(this.initializer,
       {bool isFinal: true,
       bool isConst: false,
-      bool isFieldFormal: false,
+      bool isInitializingFormal: false,
       bool isLate: false,
       bool isRequired: false,
       bool isLowered: false,
@@ -9962,7 +10177,7 @@
     initializer?.parent = this;
     this.isFinal = isFinal;
     this.isConst = isConst;
-    this.isFieldFormal = isFieldFormal;
+    this.isInitializingFormal = isInitializingFormal;
     this.isLate = isLate;
     this.isRequired = isRequired;
     this.isLowered = isLowered;
@@ -9970,9 +10185,9 @@
 
   static const int FlagFinal = 1 << 0; // Must match serialized bit positions.
   static const int FlagConst = 1 << 1;
-  static const int FlagFieldFormal = 1 << 2;
-  static const int FlagCovariant = 1 << 3;
-  static const int FlagGenericCovariantImpl = 1 << 4;
+  static const int FlagInitializingFormal = 1 << 2;
+  static const int FlagCovariantByDeclaration = 1 << 3;
+  static const int FlagCovariantByClass = 1 << 4;
   static const int FlagLate = 1 << 5;
   static const int FlagRequired = 1 << 6;
   static const int FlagLowered = 1 << 7;
@@ -9981,12 +10196,13 @@
   bool get isConst => flags & FlagConst != 0;
 
   /// Whether the parameter is declared with the `covariant` keyword.
-  bool get isCovariant => flags & FlagCovariant != 0;
+  // TODO(johnniwinther): Rename to isCovariantByDeclaration
+  bool get isCovariantByDeclaration => flags & FlagCovariantByDeclaration != 0;
 
-  /// Whether the variable is declared as a field formal parameter of
+  /// Whether the variable is declared as an initializing formal parameter of
   /// a constructor.
   @informative
-  bool get isFieldFormal => flags & FlagFieldFormal != 0;
+  bool get isInitializingFormal => flags & FlagInitializingFormal != 0;
 
   /// If this [VariableDeclaration] is a parameter of a method, indicates
   /// whether the method implementation needs to contain a runtime type check to
@@ -9994,7 +10210,8 @@
   ///
   /// When `true`, runtime checks may need to be performed; see
   /// [DispatchCategory] for details.
-  bool get isGenericCovariantImpl => flags & FlagGenericCovariantImpl != 0;
+  // TODO(johnniwinther): Rename to isCovariantByClass
+  bool get isCovariantByClass => flags & FlagCovariantByClass != 0;
 
   /// Whether the variable is declared with the `late` keyword.
   ///
@@ -10039,19 +10256,23 @@
     flags = value ? (flags | FlagConst) : (flags & ~FlagConst);
   }
 
-  void set isCovariant(bool value) {
-    flags = value ? (flags | FlagCovariant) : (flags & ~FlagCovariant);
+  void set isCovariantByDeclaration(bool value) {
+    flags = value
+        ? (flags | FlagCovariantByDeclaration)
+        : (flags & ~FlagCovariantByDeclaration);
   }
 
   @informative
-  void set isFieldFormal(bool value) {
-    flags = value ? (flags | FlagFieldFormal) : (flags & ~FlagFieldFormal);
+  void set isInitializingFormal(bool value) {
+    flags = value
+        ? (flags | FlagInitializingFormal)
+        : (flags & ~FlagInitializingFormal);
   }
 
-  void set isGenericCovariantImpl(bool value) {
+  void set isCovariantByClass(bool value) {
     flags = value
-        ? (flags | FlagGenericCovariantImpl)
-        : (flags & ~FlagGenericCovariantImpl);
+        ? (flags | FlagCovariantByClass)
+        : (flags & ~FlagCovariantByClass);
   }
 
   void set isLate(bool value) {
@@ -12031,7 +12252,7 @@
         defaultType = defaultType ?? unsetDefaultTypeSentinel;
 
   // Must match serialized bit positions.
-  static const int FlagGenericCovariantImpl = 1 << 0;
+  static const int FlagCovariantByClass = 1 << 0;
 
   /// If this [TypeParameter] is a type parameter of a generic method, indicates
   /// whether the method implementation needs to contain a runtime type check to
@@ -12039,12 +12260,12 @@
   ///
   /// When `true`, runtime checks may need to be performed; see
   /// [DispatchCategory] for details.
-  bool get isGenericCovariantImpl => flags & FlagGenericCovariantImpl != 0;
+  bool get isCovariantByClass => flags & FlagCovariantByClass != 0;
 
-  void set isGenericCovariantImpl(bool value) {
+  void set isCovariantByClass(bool value) {
     flags = value
-        ? (flags | FlagGenericCovariantImpl)
-        : (flags & ~FlagGenericCovariantImpl);
+        ? (flags | FlagCovariantByClass)
+        : (flags & ~FlagCovariantByClass);
   }
 
   @override
@@ -14053,6 +14274,11 @@
 /// polymorphism. See https://dart-review.googlesource.com/c/sdk/+/185828.
 final List<String> emptyListOfString = List.filled(0, '', growable: false);
 
+/// Almost const <Reference>[], but not const in an attempt to avoid
+/// polymorphism. See https://dart-review.googlesource.com/c/sdk/+/185828.
+final List<Reference> emptyListOfReference =
+    List.filled(0, Reference(), growable: false);
+
 /// Almost const <Typedef>[], but not const in an attempt to avoid
 /// polymorphism. See https://dart-review.googlesource.com/c/sdk/+/185828.
 final List<Typedef> emptyListOfTypedef =
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index d53d7de..12c33df 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -529,6 +529,17 @@
         growable: useGrowableLists);
   }
 
+  List<Reference> readNonNullReferenceList(List<Reference> result) {
+    int length = readUInt30();
+    if (!useGrowableLists && length == 0) {
+      return emptyListOfReference;
+    }
+    for (int i = 0; i < length; ++i) {
+      result.add(readNonNullMemberReference());
+    }
+    return result;
+  }
+
   String? readStringOrNullIfEmpty() {
     String string = readStringReference();
     return string.isEmpty ? null : string;
@@ -1448,6 +1459,22 @@
 
     readAndPushTypeParameterList(node.typeParameters, node);
     DartType onType = readDartType();
+
+    if (readAndCheckOptionTag()) {
+      ExtensionTypeShowHideClause showHideClause =
+          node.showHideClause = new ExtensionTypeShowHideClause();
+      readSupertypeList(showHideClause.shownSupertypes);
+      readNonNullReferenceList(showHideClause.shownMethods);
+      readNonNullReferenceList(showHideClause.shownGetters);
+      readNonNullReferenceList(showHideClause.shownSetters);
+      readNonNullReferenceList(showHideClause.shownOperators);
+      readSupertypeList(showHideClause.hiddenSupertypes);
+      readNonNullReferenceList(showHideClause.hiddenMethods);
+      readNonNullReferenceList(showHideClause.hiddenGetters);
+      readNonNullReferenceList(showHideClause.hiddenSetters);
+      readNonNullReferenceList(showHideClause.hiddenOperators);
+    }
+
     typeParameterStack.length = 0;
 
     node.name = name;
@@ -1551,11 +1578,13 @@
   Field readField() {
     int tag = readByte();
     assert(tag == Tag.Field);
+    CanonicalName fieldCanonicalName = readNonNullCanonicalNameReference();
+    Reference fieldReference = fieldCanonicalName.reference;
     CanonicalName getterCanonicalName = readNonNullCanonicalNameReference();
     Reference getterReference = getterCanonicalName.reference;
     CanonicalName? setterCanonicalName = readNullableCanonicalNameReference();
     Reference? setterReference = setterCanonicalName?.reference;
-    Field? node = getterReference.node as Field?;
+    Field? node = fieldReference.node as Field?;
     if (alwaysCreateNewNamedNodes) {
       node = null;
     }
@@ -1567,12 +1596,15 @@
     if (node == null) {
       if (setterReference != null) {
         node = new Field.mutable(name,
+            fieldReference: fieldReference,
             getterReference: getterReference,
             setterReference: setterReference,
             fileUri: fileUri);
       } else {
         node = new Field.immutable(name,
-            getterReference: getterReference, fileUri: fileUri);
+            fieldReference: fieldReference,
+            getterReference: getterReference,
+            fileUri: fileUri);
       }
     }
     List<Expression> annotations = readAnnotationList(node);
@@ -2918,15 +2950,22 @@
     return readAndCheckOptionTag() ? readSupertype() : null;
   }
 
-  List<Supertype> readSupertypeList() {
+  List<Supertype> readSupertypeList([List<Supertype>? result]) {
     int length = readUInt30();
     if (!useGrowableLists && length == 0) {
       // When lists don't have to be growable anyway, we might as well use an
       // almost constant one for the empty list.
       return emptyListOfSupertype;
     }
-    return new List<Supertype>.generate(length, (_) => readSupertype(),
-        growable: useGrowableLists);
+    if (result != null) {
+      for (int i = 0; i < length; ++i) {
+        result.add(readSupertype());
+      }
+      return result;
+    } else {
+      return new List<Supertype>.generate(length, (_) => readSupertype(),
+          growable: useGrowableLists);
+    }
   }
 
   List<DartType> readDartTypeList() {
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index a295640..a6d04bd 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1126,7 +1126,7 @@
     writeOffset(node.fileOffset);
     writeByte(node.flags);
     writeAnnotationList(node.annotations);
-    writeLibraryReference(node.targetLibrary, allowNull: true);
+    writeLibraryReference(node.targetLibrary, allowNull: false);
     writeStringReference(node.name ?? '');
     writeNodeList(node.combinators);
   }
@@ -1326,6 +1326,24 @@
 
   @override
   void visitField(Field node) {
+    CanonicalName? fieldCanonicalName = node.fieldReference.canonicalName;
+    if (fieldCanonicalName == null) {
+      throw new ArgumentError('Missing canonical name for $node');
+    }
+    String? fieldOrphancy = node.fieldReference.getOrphancyDescription(node);
+    if (fieldOrphancy != null) {
+      throw new ArgumentError('Trying to serialize orphaned field reference.\n'
+          '${fieldOrphancy}');
+    }
+    fieldOrphancy =
+        fieldCanonicalName.getOrphancyDescription(node, node.fieldReference);
+    if (fieldOrphancy != null) {
+      throw new ArgumentError(
+          'Trying to serialize orphaned field canonical name.\n'
+          '(${node.runtimeType}:${node.hashCode})\n'
+          '${fieldOrphancy}');
+    }
+
     CanonicalName? getterCanonicalName = node.getterReference.canonicalName;
     if (getterCanonicalName == null) {
       throw new ArgumentError('Missing canonical name for $node');
@@ -1367,6 +1385,7 @@
     }
     enterScope(memberScope: true);
     writeByte(Tag.Field);
+    writeNonNullCanonicalNameReference(fieldCanonicalName);
     writeNonNullCanonicalNameReference(getterCanonicalName);
     writeNullAllowedCanonicalNameReference(setterCanonicalName);
     writeUriReference(node.fileUri);
@@ -2451,6 +2470,24 @@
     enterScope(typeParameters: node.typeParameters);
     writeNodeList(node.typeParameters);
     writeDartType(node.onType);
+
+    ExtensionTypeShowHideClause? showHideClause = node.showHideClause;
+    if (showHideClause == null) {
+      writeByte(Tag.Nothing);
+    } else {
+      writeByte(Tag.Something);
+      writeNodeList(showHideClause.shownSupertypes);
+      writeList(showHideClause.shownMethods, writeNonNullReference);
+      writeList(showHideClause.shownGetters, writeNonNullReference);
+      writeList(showHideClause.shownSetters, writeNonNullReference);
+      writeList(showHideClause.shownOperators, writeNonNullReference);
+      writeNodeList(showHideClause.hiddenSupertypes);
+      writeList(showHideClause.hiddenMethods, writeNonNullReference);
+      writeList(showHideClause.hiddenGetters, writeNonNullReference);
+      writeList(showHideClause.hiddenSetters, writeNonNullReference);
+      writeList(showHideClause.hiddenOperators, writeNonNullReference);
+    }
+
     leaveScope(typeParameters: node.typeParameters);
 
     final int len = node.members.length;
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index f9a62ce..8fb7add 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -176,7 +176,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 = 70;
+  static const int BinaryFormatVersion = 73;
 }
 
 abstract class ConstantTag {
diff --git a/pkg/kernel/lib/canonical_name.dart b/pkg/kernel/lib/canonical_name.dart
index bd151c1..651c2d6 100644
--- a/pkg/kernel/lib/canonical_name.dart
+++ b/pkg/kernel/lib/canonical_name.dart
@@ -30,7 +30,12 @@
 ///         "@constructors"
 ///         Qualified name
 ///
-///      Field or the implicit getter of a field:
+///      Field:
+///         Canonical name of enclosing class or library
+///         "@fields"
+///         Qualified name
+///
+///      Implicit getter of a field:
 ///         Canonical name of enclosing class or library
 ///         "@getters"
 ///         Qualified name
@@ -137,6 +142,10 @@
   }
 
   CanonicalName getChildFromField(Field field) {
+    return getChild(fieldsName).getChildFromQualifiedName(field.name);
+  }
+
+  CanonicalName getChildFromFieldGetter(Field field) {
     return getChild(gettersName).getChildFromQualifiedName(field.name);
   }
 
@@ -156,6 +165,10 @@
   }
 
   CanonicalName getChildFromFieldWithName(Name name) {
+    return getChild(fieldsName).getChildFromQualifiedName(name);
+  }
+
+  CanonicalName getChildFromFieldGetterWithName(Name name) {
     return getChild(gettersName).getChildFromQualifiedName(name);
   }
 
@@ -339,6 +352,10 @@
   /// within a library or a class.
   static const String methodsName = '@methods';
 
+  /// Symbolic name used for the [CanonicalName] node that holds all fields
+  /// within a library or class.
+  static const String fieldsName = '@fields';
+
   /// Symbolic name used for the [CanonicalName] node that holds all getters and
   /// readable fields within a library or class.
   static const String gettersName = '@getters';
@@ -355,6 +372,7 @@
     constructorsName,
     factoriesName,
     methodsName,
+    fieldsName,
     gettersName,
     settersName,
     typedefsName,
@@ -513,12 +531,15 @@
   bool get isConsistent {
     NamedNode? node = _node;
     if (node != null) {
-      if (node.reference != this &&
-          (node is! Field || node.setterReference != this)) {
-        // The reference of a [NamedNode] must point to this reference, or
-        // if the node is a [Field] the setter reference must point to this
-        // reference.
-        return false;
+      if (node is Field) {
+        // The field, getter or setter reference of the [Field] must point to
+        // this reference.
+        return node.fieldReference == this ||
+            node.getterReference == this ||
+            node.setterReference == this;
+      } else {
+        // The reference of the [NamedNode] must point to this reference.
+        return node.reference == this;
       }
     }
     if (canonicalName != null && canonicalName!._reference != this) {
@@ -529,12 +550,16 @@
 
   String getInconsistency() {
     StringBuffer sb = new StringBuffer();
-    sb.write('Reference ${this} (${hashCode}):');
+    sb.write('Reference ${toStringInternal()} (${hashCode}):');
     NamedNode? node = _node;
     if (node != null) {
       if (node is Field) {
-        if (node.getterReference != this && node.setterReference != this) {
+        if (node.fieldReference != this &&
+            node.getterReference != this &&
+            node.setterReference != this) {
           sb.write(' _node=${node} (${node.runtimeType}:${node.hashCode})');
+          sb.write(' _node.fieldReference='
+              '${node.fieldReference} (${node.fieldReference.hashCode})');
           sb.write(' _node.getterReference='
               '${node.getterReference} (${node.getterReference.hashCode})');
           sb.write(' _node.setterReference='
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index fec13cc..a407a13 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -903,8 +903,8 @@
     return result;
   }
 
-  Field cloneField(
-      Field node, Reference? getterReference, Reference? setterReference) {
+  Field cloneField(Field node, Reference? fieldReference,
+      Reference? getterReference, Reference? setterReference) {
     final Uri? activeFileUriSaved = _activeFileUri;
     _activeFileUri = node.fileUri;
 
@@ -915,6 +915,7 @@
           initializer: cloneOptional(node.initializer),
           transformerFlags: node.transformerFlags,
           fileUri: node.fileUri,
+          fieldReference: fieldReference,
           getterReference: getterReference,
           setterReference: setterReference);
     } else {
@@ -927,6 +928,7 @@
           initializer: cloneOptional(node.initializer),
           transformerFlags: node.transformerFlags,
           fileUri: node.fileUri,
+          fieldReference: fieldReference,
           getterReference: getterReference);
     }
     result
diff --git a/pkg/kernel/lib/external_name.dart b/pkg/kernel/lib/external_name.dart
index f491275..c93f975 100644
--- a/pkg/kernel/lib/external_name.dart
+++ b/pkg/kernel/lib/external_name.dart
@@ -5,22 +5,30 @@
 library kernel.external_name;
 
 import 'ast.dart';
+import 'core_types.dart';
 
 /// Returns external (native) name of given [Member].
-String? getExternalName(Member procedure) {
+String? getExternalName(CoreTypes coreTypes, Member procedure) {
   // Native procedures are marked as external and have an annotation,
   // which looks like this:
   //
+  //    @pragma("vm:external-name", "<name-of-native>")
+  //    external Object foo(arg0, ...);
+  //
+  // Previously the following encoding was used, which is still supported
+  // until all users are migrated away from it:
+  //
   //    import 'dart:_internal' as internal;
   //
   //    @internal.ExternalName("<name-of-native>")
   //    external Object foo(arg0, ...);
   //
+
   if (!procedure.isExternal) {
     return null;
   }
   for (final Expression annotation in procedure.annotations) {
-    final String? value = _getExternalNameValue(annotation);
+    final String? value = _getExternalNameValue(coreTypes, annotation);
     if (value != null) {
       return value;
     }
@@ -28,28 +36,25 @@
   return null;
 }
 
-/// Returns native extension URIs for given [library].
-List<String> getNativeExtensionUris(Library library) {
-  final List<String> uris = <String>[];
-  for (Expression annotation in library.annotations) {
-    final String? value = _getExternalNameValue(annotation);
-    if (value != null) {
-      uris.add(value);
-    }
-  }
-  return uris;
-}
-
-String? _getExternalNameValue(Expression annotation) {
-  if (annotation is ConstructorInvocation) {
-    if (_isExternalName(annotation.target.enclosingClass)) {
-      return (annotation.arguments.positional.single as StringLiteral).value;
-    }
-  } else if (annotation is ConstantExpression) {
+String? _getExternalNameValue(CoreTypes coreTypes, Expression annotation) {
+  if (annotation is ConstantExpression) {
     final Constant constant = annotation.constant;
     if (constant is InstanceConstant) {
       if (_isExternalName(constant.classNode)) {
         return (constant.fieldValues.values.single as StringConstant).value;
+      } else if (_isPragma(constant.classNode)) {
+        final String pragmaName =
+            (constant.fieldValues[coreTypes.pragmaName.fieldReference]
+                    as StringConstant)
+                .value;
+        final Constant? pragmaOptionsValue =
+            constant.fieldValues[coreTypes.pragmaOptions.fieldReference];
+        final String? pragmaOptions = pragmaOptionsValue is StringConstant
+            ? pragmaOptionsValue.value
+            : null;
+        if (pragmaName == _externalNamePragma && pragmaOptions != null) {
+          return pragmaOptions;
+        }
       }
     }
   }
@@ -59,3 +64,9 @@
 bool _isExternalName(Class klass) =>
     klass.name == 'ExternalName' &&
     klass.enclosingLibrary.importUri.toString() == 'dart:_internal';
+
+bool _isPragma(Class klass) =>
+    klass.name == 'pragma' &&
+    klass.enclosingLibrary.importUri.toString() == 'dart:core';
+
+const String _externalNamePragma = 'vm:external-name';
diff --git a/pkg/kernel/lib/naive_type_checker.dart b/pkg/kernel/lib/naive_type_checker.dart
index 7470718..0f86d1c 100644
--- a/pkg/kernel/lib/naive_type_checker.dart
+++ b/pkg/kernel/lib/naive_type_checker.dart
@@ -75,11 +75,13 @@
       if (isSetter) {
         final DartType ownType = setterType(host, ownMember);
         final DartType superType = setterType(host, superMember);
-        final bool isCovariant = ownMember is Field
-            ? ownMember.isCovariant
-            : ownMember.function!.positionalParameters[0].isCovariant;
-        if (!_isValidParameterOverride(isCovariant, ownType, superType)) {
-          if (isCovariant) {
+        final bool isCovariantByDeclaration = ownMember is Field
+            ? ownMember.isCovariantByDeclaration
+            : ownMember
+                .function!.positionalParameters[0].isCovariantByDeclaration;
+        if (!_isValidParameterOverride(
+            isCovariantByDeclaration, ownType, superType)) {
+          if (isCovariantByDeclaration) {
             return failures.reportInvalidOverride(ownMember, superMember, '''
 ${ownType} is neither a subtype nor supertype of ${superType}
 ''');
@@ -198,7 +200,7 @@
       final VariableDeclaration superParameter =
           superFunction.positionalParameters[i];
       if (!_isValidParameterOverride(
-          ownParameter.isCovariant,
+          ownParameter.isCovariantByDeclaration,
           ownSubstitution.substituteType(ownParameter.type),
           superSubstitution.substituteType(superParameter.type))) {
         return '''
@@ -227,7 +229,7 @@
       }
 
       if (!_isValidParameterOverride(
-          ownParameter.isCovariant,
+          ownParameter.isCovariantByDeclaration,
           ownSubstitution.substituteType(ownParameter.type),
           superSubstitution.substituteType(superParameter.type))) {
         return '''
@@ -244,11 +246,11 @@
   /// Checks whether parameter with [ownParameterType] type is a valid override
   /// for parameter with [superParameterType] type taking into account its
   /// covariance and applying type parameter [substitution] if necessary.
-  bool _isValidParameterOverride(bool isCovariant, DartType ownParameterType,
-      DartType superParameterType) {
+  bool _isValidParameterOverride(bool isCovariantByDeclaration,
+      DartType ownParameterType, DartType superParameterType) {
     if (_isSubtypeOf(superParameterType, ownParameterType)) {
       return true;
-    } else if (isCovariant &&
+    } else if (isCovariantByDeclaration &&
         _isSubtypeOf(ownParameterType, superParameterType)) {
       return true;
     } else {
diff --git a/pkg/kernel/lib/reference_from_index.dart b/pkg/kernel/lib/reference_from_index.dart
index 1c93f7c..6182a4b 100644
--- a/pkg/kernel/lib/reference_from_index.dart
+++ b/pkg/kernel/lib/reference_from_index.dart
@@ -31,9 +31,11 @@
 }
 
 abstract class IndexedContainer {
+  final Map<Name, Reference> _fieldReferences = new Map<Name, Reference>();
   final Map<Name, Reference> _getterReferences = new Map<Name, Reference>();
   final Map<Name, Reference> _setterReferences = new Map<Name, Reference>();
 
+  Reference? lookupFieldReference(Name name) => _fieldReferences[name];
   Reference? lookupGetterReference(Name name) => _getterReferences[name];
   Reference? lookupSetterReference(Name name) => _setterReferences[name];
 
@@ -63,6 +65,8 @@
     for (int i = 0; i < fields.length; i++) {
       Field field = fields[i];
       Name name = field.name;
+      assert(_fieldReferences[name] == null);
+      _fieldReferences[name] = field.fieldReference;
       assert(_getterReferences[name] == null);
       _getterReferences[name] = field.getterReference;
       if (field.hasSetter) {
diff --git a/pkg/kernel/lib/src/equivalence.dart b/pkg/kernel/lib/src/equivalence.dart
index a8edddb..4a163b9 100644
--- a/pkg/kernel/lib/src/equivalence.dart
+++ b/pkg/kernel/lib/src/equivalence.dart
@@ -1516,6 +1516,49 @@
     return result;
   }
 
+  bool checkExtensionTypeShowHideClause(EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause? node, Object? other) {
+    if (identical(node, other)) return true;
+    if (node is! ExtensionTypeShowHideClause) return false;
+    if (other is! ExtensionTypeShowHideClause) return false;
+    bool result = true;
+    if (!checkExtensionTypeShowHideClause_shownSupertypes(
+        visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_shownMethods(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_shownGetters(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_shownSetters(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_shownOperators(
+        visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_hiddenSupertypes(
+        visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_hiddenMethods(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_hiddenGetters(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_hiddenSetters(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    if (!checkExtensionTypeShowHideClause_hiddenOperators(
+        visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
+    return result;
+  }
+
   bool checkExtensionMemberDescriptor(EquivalenceVisitor visitor,
       ExtensionMemberDescriptor? node, Object? other) {
     if (identical(node, other)) return true;
@@ -1559,6 +1602,9 @@
     if (!checkExtension_onType(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
+    if (!checkExtension_showHideClause(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
     if (!checkExtension_members(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
@@ -1596,6 +1642,9 @@
     if (!checkField_initializer(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
+    if (!checkField_getterReference(visitor, node, other)) {
+      result = visitor.resultOnInequivalence;
+    }
     if (!checkField_setterReference(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
@@ -1614,7 +1663,7 @@
     if (!checkField_transformerFlags(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
-    if (!checkField_getterReference(visitor, node, other)) {
+    if (!checkField_fieldReference(visitor, node, other)) {
       result = visitor.resultOnInequivalence;
     }
     if (!checkField_fileOffset(visitor, node, other)) {
@@ -4723,6 +4772,87 @@
     return visitor.checkNodes(node.onType, other.onType, 'onType');
   }
 
+  bool checkExtensionTypeShowHideClause_shownSupertypes(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.shownSupertypes, other.shownSupertypes,
+        visitor.checkNodes, 'shownSupertypes');
+  }
+
+  bool checkExtensionTypeShowHideClause_shownMethods(EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node, ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.shownMethods, other.shownMethods,
+        visitor.checkReferences, 'shownMethods');
+  }
+
+  bool checkExtensionTypeShowHideClause_shownGetters(EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node, ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.shownGetters, other.shownGetters,
+        visitor.checkReferences, 'shownGetters');
+  }
+
+  bool checkExtensionTypeShowHideClause_shownSetters(EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node, ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.shownSetters, other.shownSetters,
+        visitor.checkReferences, 'shownSetters');
+  }
+
+  bool checkExtensionTypeShowHideClause_shownOperators(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.shownOperators, other.shownOperators,
+        visitor.checkReferences, 'shownOperators');
+  }
+
+  bool checkExtensionTypeShowHideClause_hiddenSupertypes(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.hiddenSupertypes, other.hiddenSupertypes,
+        visitor.checkNodes, 'hiddenSupertypes');
+  }
+
+  bool checkExtensionTypeShowHideClause_hiddenMethods(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.hiddenMethods, other.hiddenMethods,
+        visitor.checkReferences, 'hiddenMethods');
+  }
+
+  bool checkExtensionTypeShowHideClause_hiddenGetters(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.hiddenGetters, other.hiddenGetters,
+        visitor.checkReferences, 'hiddenGetters');
+  }
+
+  bool checkExtensionTypeShowHideClause_hiddenSetters(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.hiddenSetters, other.hiddenSetters,
+        visitor.checkReferences, 'hiddenSetters');
+  }
+
+  bool checkExtensionTypeShowHideClause_hiddenOperators(
+      EquivalenceVisitor visitor,
+      ExtensionTypeShowHideClause node,
+      ExtensionTypeShowHideClause other) {
+    return visitor.checkLists(node.hiddenOperators, other.hiddenOperators,
+        visitor.checkReferences, 'hiddenOperators');
+  }
+
+  bool checkExtension_showHideClause(
+      EquivalenceVisitor visitor, Extension node, Extension other) {
+    'showHideClause';
+    return checkExtensionTypeShowHideClause(
+        visitor, node.showHideClause, other.showHideClause);
+  }
+
   bool checkExtensionMemberDescriptor_name(EquivalenceVisitor visitor,
       ExtensionMemberDescriptor node, ExtensionMemberDescriptor other) {
     return visitor.checkNodes(node.name, other.name, 'name');
@@ -4788,6 +4918,12 @@
         node.initializer, other.initializer, 'initializer');
   }
 
+  bool checkField_getterReference(
+      EquivalenceVisitor visitor, Field node, Field other) {
+    return visitor.checkReferences(
+        node.getterReference, other.getterReference, 'getterReference');
+  }
+
   bool checkField_setterReference(
       EquivalenceVisitor visitor, Field node, Field other) {
     return visitor.checkReferences(
@@ -4844,10 +4980,10 @@
     return checkMember_transformerFlags(visitor, node, other);
   }
 
-  bool checkField_getterReference(
+  bool checkField_fieldReference(
       EquivalenceVisitor visitor, Field node, Field other) {
     return visitor.checkReferences(
-        node.getterReference, other.getterReference, 'getterReference');
+        node.fieldReference, other.fieldReference, 'fieldReference');
   }
 
   bool checkMember_fileOffset(
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 479f222..1cb1b2c 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -112,6 +112,10 @@
   /// Number semantics to use for this backend.
   NumberSemantics get numberSemantics => NumberSemantics.vm;
 
+  /// If true, all constants are inlined. Otherwise [shouldInlineConstant] is
+  /// called to determine whether a constant expression should be inlined.
+  bool get alwaysInlineConstants => true;
+
   /// Inline control of constant variables. The given constant expression
   /// is the initializer of a [Field] or [VariableDeclaration] node.
   /// If this method returns `true`, the variable will be inlined at all
@@ -119,7 +123,11 @@
   /// 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;
+  ///
+  /// This is only called if [alwaysInlineConstants] is `true`.
+  bool shouldInlineConstant(ConstantExpression initializer) =>
+      throw new UnsupportedError(
+          'Per-value constant inlining is not supported');
 
   /// Whether this target supports unevaluated constants.
   ///
@@ -438,12 +446,14 @@
 
   Class? concreteMapLiteralClass(CoreTypes coreTypes) => null;
   Class? concreteConstMapLiteralClass(CoreTypes coreTypes) => null;
+  Class? concreteSetLiteralClass(CoreTypes coreTypes) => null;
+  Class? concreteConstSetLiteralClass(CoreTypes coreTypes) => null;
 
   Class? concreteIntLiteralClass(CoreTypes coreTypes, int value) => null;
   Class? concreteDoubleLiteralClass(CoreTypes coreTypes, double value) => null;
   Class? concreteStringLiteralClass(CoreTypes coreTypes, String value) => null;
 
-  ConstantsBackend constantsBackend(CoreTypes coreTypes);
+  ConstantsBackend get constantsBackend;
 }
 
 class NoneConstantsBackend extends ConstantsBackend {
@@ -515,7 +525,7 @@
   }
 
   @override
-  ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
+  ConstantsBackend get constantsBackend =>
       // TODO(johnniwinther): Should this vary with the use case?
       const NoneConstantsBackend(supportsUnevaluatedConstants: true);
 }
@@ -761,9 +771,7 @@
   }
 
   @override
-  ConstantsBackend constantsBackend(CoreTypes coreTypes) {
-    return _target.constantsBackend(coreTypes);
-  }
+  ConstantsBackend get constantsBackend => _target.constantsBackend;
 
   @override
   bool enableNative(Uri uri) {
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 5485bdc..faf9eaa 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1123,8 +1123,8 @@
     writeIndentation();
     writeModifier(node.isLate, 'late');
     writeModifier(node.isStatic, 'static');
-    writeModifier(node.isCovariant, 'covariant');
-    writeModifier(node.isGenericCovariantImpl, 'generic-covariant-impl');
+    writeModifier(node.isCovariantByDeclaration, 'covariant-by-declaration');
+    writeModifier(node.isCovariantByClass, 'covariant-by-class');
     writeModifier(node.isFinal, 'final');
     writeModifier(node.isConst, 'const');
     // Only show implicit getter/setter modifiers in cases where they are
@@ -1351,10 +1351,67 @@
     writeTypeParameterList(node.typeParameters);
     writeSpaced('on');
     writeType(node.onType);
+
+    ExtensionTypeShowHideClause? showHideClause = node.showHideClause;
+    if (showHideClause != null) {
+      // 'Show' clause elements.
+      if (showHideClause.shownSupertypes.isNotEmpty) {
+        writeSpaced('show-types');
+        writeList(showHideClause.shownSupertypes, visitSupertype);
+      }
+      if (showHideClause.shownMethods.isNotEmpty) {
+        writeSpaced('show-methods');
+        writeList(
+            showHideClause.shownMethods, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.shownGetters.isNotEmpty) {
+        writeSpaced('show-getters');
+        writeList(
+            showHideClause.shownGetters, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.shownSetters.isNotEmpty) {
+        writeSpaced('show-setters');
+        writeList(
+            showHideClause.shownSetters, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.shownOperators.isNotEmpty) {
+        writeSpaced('show-operators');
+        writeList(
+            showHideClause.shownOperators, writeMemberReferenceFromReference);
+      }
+
+      // 'Hide' clause elements.
+      if (showHideClause.hiddenSupertypes.isNotEmpty) {
+        writeSpaced('hide-types');
+        writeList(showHideClause.hiddenSupertypes, visitSupertype);
+      }
+      if (showHideClause.hiddenMethods.isNotEmpty) {
+        writeSpaced('hide-methods');
+        writeList(
+            showHideClause.hiddenMethods, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.hiddenGetters.isNotEmpty) {
+        writeSpaced('hide-getters');
+        writeList(
+            showHideClause.hiddenGetters, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.hiddenSetters.isNotEmpty) {
+        writeSpaced('hide-setters');
+        writeList(
+            showHideClause.hiddenSetters, writeMemberReferenceFromReference);
+      }
+      if (showHideClause.hiddenOperators.isNotEmpty) {
+        writeSpaced('hide-operators');
+        writeList(
+            showHideClause.hiddenOperators, writeMemberReferenceFromReference);
+      }
+    }
+
     String endLineString = ' {';
     if (node.enclosingLibrary.fileUri != node.fileUri) {
       endLineString += ' // from ${node.fileUri}';
     }
+
     endLine(endLineString);
     ++indentation;
     node.members.forEach((ExtensionMemberDescriptor descriptor) {
@@ -1884,7 +1941,7 @@
 
   @override
   void visitInstantiation(Instantiation node) {
-    writeExpression(node.expression);
+    writeExpression(node.expression, Precedence.TYPE_LITERAL);
     writeSymbol('<');
     writeList(node.typeArguments, writeType);
     writeSymbol('>');
@@ -2404,8 +2461,8 @@
     writeModifier(node.isLowered, 'lowered');
     writeModifier(node.isLate, 'late');
     writeModifier(node.isRequired, 'required');
-    writeModifier(node.isCovariant, 'covariant');
-    writeModifier(node.isGenericCovariantImpl, 'generic-covariant-impl');
+    writeModifier(node.isCovariantByDeclaration, 'covariant-by-declaration');
+    writeModifier(node.isCovariantByClass, 'covariant-by-class');
     writeModifier(node.isFinal, 'final');
     writeModifier(node.isConst, 'const');
     // ignore: unnecessary_null_comparison
@@ -2623,7 +2680,7 @@
 
   @override
   void visitTypeParameter(TypeParameter node) {
-    writeModifier(node.isGenericCovariantImpl, 'generic-covariant-impl');
+    writeModifier(node.isCovariantByClass, 'covariant-by-class');
     writeAnnotationList(node.annotations, separateLines: false);
     if (node.variance != Variance.covariant) {
       writeWord(const <String>[
@@ -3090,7 +3147,7 @@
   int visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) => EXPRESSION;
 
   @override
-  int visitConstantExpression(ConstantExpression node) => EXPRESSION;
+  int visitConstantExpression(ConstantExpression node) => PRIMARY;
 
   @override
   int visitDynamicSet(DynamicSet node) => EXPRESSION;
diff --git a/pkg/kernel/lib/text/debug_printer.dart b/pkg/kernel/lib/text/debug_printer.dart
index d42442e..bfa85a7 100644
--- a/pkg/kernel/lib/text/debug_printer.dart
+++ b/pkg/kernel/lib/text/debug_printer.dart
@@ -85,7 +85,7 @@
       'name': '${node.name ?? '--unnamed--'}',
       'isFinal': '${node.isFinal}',
       'isConst': '${node.isConst}',
-      'isFieldFormal': '${node.isFieldFormal}'
+      'isInitializingFormal': '${node.isInitializingFormal}'
     });
     node.visitChildren(this);
     closeNode();
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
index 0f6e9f5..3c00de0 100644
--- a/pkg/kernel/lib/text/text_serializer.dart
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -1211,9 +1211,9 @@
 const Map<int, String> variableDeclarationFlagToName = const {
   VariableDeclaration.FlagFinal: "final",
   VariableDeclaration.FlagConst: "const",
-  VariableDeclaration.FlagFieldFormal: "field-formal",
-  VariableDeclaration.FlagCovariant: "covariant",
-  VariableDeclaration.FlagGenericCovariantImpl: "generic-covariant-impl",
+  VariableDeclaration.FlagInitializingFormal: "field-formal",
+  VariableDeclaration.FlagCovariantByDeclaration: "covariant",
+  VariableDeclaration.FlagCovariantByClass: "generic-covariant-impl",
   VariableDeclaration.FlagLate: "late",
   VariableDeclaration.FlagRequired: "required",
   VariableDeclaration.FlagLowered: "lowered",
@@ -1980,7 +1980,7 @@
   Field.FlagConst: "const",
   Field.FlagStatic: "static",
   Field.FlagCovariant: "covariant",
-  Field.FlagGenericCovariantImpl: "generic-covariant-impl",
+  Field.FlagCovariantByClass: "generic-covariant-impl",
   Field.FlagLate: "late",
   Field.FlagExtensionMember: "extension-member",
   Field.FlagNonNullableByDefault: "non-nullable-by-default",
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 621d51e..acca81a 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -529,19 +529,7 @@
     final R = continuationRewriter;
     var shouldName = seenAwait;
     var type = expr.getStaticType(_staticTypeContext);
-    Expression result = new VariableGet(asyncResult);
-    if (type is! DynamicType) {
-      int fileOffset = expr.operand.fileOffset;
-      if (fileOffset == TreeNode.noOffset) {
-        fileOffset = expr.fileOffset;
-      }
-      assert(fileOffset != TreeNode.noOffset);
-      result = new StaticInvocation(
-          continuationRewriter.helper.unsafeCast,
-          new Arguments(<Expression>[result], types: <DartType>[type])
-            ..fileOffset = fileOffset)
-        ..fileOffset = fileOffset;
-    }
+    Expression result = unsafeCastVariableGet(asyncResult, type);
 
     // The statements are in reverse order, so name the result first if
     // necessary and then add the two other statements in reverse.
diff --git a/pkg/kernel/lib/transformations/empty.dart b/pkg/kernel/lib/transformations/empty.dart
index 4d7ccff..66ab05c 100644
--- a/pkg/kernel/lib/transformations/empty.dart
+++ b/pkg/kernel/lib/transformations/empty.dart
@@ -5,7 +5,6 @@
 library kernel.transformations.empty;
 
 import '../ast.dart';
-import '../kernel.dart';
 
 Component transformComponent(Component component) {
   new EmptyTransformer().visitComponent(component);
diff --git a/pkg/kernel/lib/transformations/mixin_full_resolution.dart b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
index d293799..fee2089 100644
--- a/pkg/kernel/lib/transformations/mixin_full_resolution.dart
+++ b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
@@ -120,6 +120,8 @@
       }
 
       for (var field in class_.mixin.fields) {
+        Reference? fieldReference =
+            indexedClass?.lookupFieldReference(field.name);
         Reference? getterReference =
             indexedClass?.lookupGetterReference(field.name);
         Reference? setterReference =
@@ -132,21 +134,23 @@
           setterReference = setters[field.name]?.reference;
           setterReference?.canonicalName?.unbind();
         }
-        Field clone =
-            cloner.cloneField(field, getterReference, setterReference);
+        Field clone = cloner.cloneField(
+            field, fieldReference, getterReference, setterReference);
         Procedure? setter = setters[field.name];
         if (setter != null) {
           setters.remove(field.name);
           VariableDeclaration parameter =
               setter.function.positionalParameters.first;
-          clone.isCovariant = parameter.isCovariant;
-          clone.isGenericCovariantImpl = parameter.isGenericCovariantImpl;
+          clone.isCovariantByDeclaration = parameter.isCovariantByDeclaration;
+          clone.isCovariantByClass = parameter.isCovariantByClass;
         }
         nonSetters.remove(field.name);
         class_.addField(clone);
       }
       class_.procedures.clear();
-      class_.procedures..addAll(nonSetters.values)..addAll(setters.values);
+      class_.procedures
+        ..addAll(nonSetters.values)
+        ..addAll(setters.values);
     }
 
     // Existing procedures in the class should only be forwarding stubs.
@@ -190,6 +194,17 @@
             // and don't add several procedures with the same name to the class.
             continue outer;
           }
+          if (procedure.isAbstract &&
+              (originalProcedure.stubKind ==
+                      ProcedureStubKind.ConcreteForwardingStub ||
+                  originalProcedure.stubKind ==
+                      ProcedureStubKind.ConcreteMixinStub)) {
+            // Don't replace concrete stubs with abstract methods.
+            originalProcedure.stubKind = ProcedureStubKind.Regular;
+            originalProcedure.stubTarget = null;
+            continue outer;
+          }
+
           originalIndex = i;
           break;
         }
@@ -212,10 +227,10 @@
         // TODO(kernel team): The named parameters are not sorted,
         // this might not be correct.
         for (int j = 0; j < src.namedParameters.length; ++j) {
-          dst.namedParameters[j].isCovariant =
-              src.namedParameters[j].isCovariant;
-          dst.namedParameters[j].isGenericCovariantImpl =
-              src.namedParameters[j].isGenericCovariantImpl;
+          dst.namedParameters[j].isCovariantByDeclaration =
+              src.namedParameters[j].isCovariantByDeclaration;
+          dst.namedParameters[j].isCovariantByClass =
+              src.namedParameters[j].isCovariantByClass;
         }
 
         class_.procedures[originalIndex] = clone;
diff --git a/pkg/kernel/lib/transformations/scanner.dart b/pkg/kernel/lib/transformations/scanner.dart
index ec75cbd..9148fa7 100644
--- a/pkg/kernel/lib/transformations/scanner.dart
+++ b/pkg/kernel/lib/transformations/scanner.dart
@@ -5,7 +5,6 @@
 library kernel.transformations.scanner;
 
 import '../ast.dart';
-import '../kernel.dart';
 
 abstract class Scanner<X extends TreeNode?, Y extends TreeNode?> {
   final Scanner<Y, TreeNode?>? next;
diff --git a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
index cc4d1387..318b720 100644
--- a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
+++ b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
@@ -352,9 +352,12 @@
         type:
             new InterfaceType(_locationClass, clazz.enclosingLibrary.nullable),
         isFinal: true,
-        getterReference: clazz.reference.canonicalName
+        fieldReference: clazz.reference.canonicalName
             ?.getChildFromFieldWithName(fieldName)
             .reference,
+        getterReference: clazz.reference.canonicalName
+            ?.getChildFromFieldGetterWithName(fieldName)
+            .reference,
         fileUri: clazz.fileUri);
     clazz.addField(locationField);
 
diff --git a/pkg/kernel/lib/transformations/value_class.dart b/pkg/kernel/lib/transformations/value_class.dart
index cbb27dc..2a96ffd 100644
--- a/pkg/kernel/lib/transformations/value_class.dart
+++ b/pkg/kernel/lib/transformations/value_class.dart
@@ -7,7 +7,6 @@
 import 'package:kernel/type_environment.dart';
 
 import '../ast.dart';
-import '../kernel.dart';
 import '../core_types.dart' show CoreTypes;
 import '../class_hierarchy.dart' show ClassHierarchy;
 import './scanner.dart';
diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart
index 6b22016..5320daf 100644
--- a/pkg/kernel/lib/type_environment.dart
+++ b/pkg/kernel/lib/type_environment.dart
@@ -102,8 +102,7 @@
       List<DartType>? futureArguments =
           getTypeArgumentsAsInstanceOf(resolved, coreTypes.futureClass);
       if (futureArguments != null) {
-        return _withDeclaredNullability(
-            futureArguments.single, t.declaredNullability);
+        return _withDeclaredNullability(futureArguments.single, t.nullability);
       }
     }
 
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index ec9a9aa..051bc3a 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -8,9 +8,12 @@
 import 'transformations/flags.dart';
 import 'type_environment.dart' show StatefulStaticTypeContext, TypeEnvironment;
 
-void verifyComponent(Component component, {bool? isOutline, bool? afterConst}) {
+void verifyComponent(Component component,
+    {bool? isOutline, bool? afterConst, bool constantsAreAlwaysInlined: true}) {
   VerifyingVisitor.check(component,
-      isOutline: isOutline, afterConst: afterConst);
+      isOutline: isOutline,
+      afterConst: afterConst,
+      constantsAreAlwaysInlined: constantsAreAlwaysInlined);
 }
 
 class VerificationError {
@@ -67,6 +70,9 @@
   /// a verification error for anything that should have been removed by it.
   final bool afterConst;
 
+  /// If true, constant fields and local variables are expected to be inlined.
+  final bool constantsAreAlwaysInlined;
+
   AsyncMarker currentAsyncMarker = AsyncMarker.Sync;
 
   bool inCatchBlock = false;
@@ -88,12 +94,20 @@
   TreeNode? get currentClassOrExtensionOrMember =>
       currentMember ?? currentClass ?? currentExtension;
 
-  static void check(Component component, {bool? isOutline, bool? afterConst}) {
-    component.accept(
-        new VerifyingVisitor(isOutline: isOutline, afterConst: afterConst));
+  static void check(Component component,
+      {bool? isOutline,
+      bool? afterConst,
+      required bool constantsAreAlwaysInlined}) {
+    component.accept(new VerifyingVisitor(
+        isOutline: isOutline,
+        afterConst: afterConst,
+        constantsAreAlwaysInlined: constantsAreAlwaysInlined));
   }
 
-  VerifyingVisitor({bool? isOutline, bool? afterConst})
+  VerifyingVisitor(
+      {bool? isOutline,
+      bool? afterConst,
+      required this.constantsAreAlwaysInlined})
       : isOutline = isOutline ?? false,
         afterConst = afterConst ?? !(isOutline ?? false);
 
@@ -577,10 +591,12 @@
     declareVariable(node);
     if (afterConst && node.isConst) {
       Expression? initializer = node.initializer;
-      if (!(initializer is InvalidExpression ||
-          initializer is ConstantExpression &&
-              initializer.constant is UnevaluatedConstant)) {
-        problem(node, "Constant VariableDeclaration");
+      if (constantsAreAlwaysInlined) {
+        if (!(initializer is InvalidExpression ||
+            initializer is ConstantExpression &&
+                initializer.constant is UnevaluatedConstant)) {
+          problem(node, "Constant VariableDeclaration");
+        }
       }
     }
   }
@@ -589,7 +605,7 @@
   void visitVariableGet(VariableGet node) {
     checkVariableInScope(node.variable, node);
     visitChildren(node);
-    if (afterConst && node.variable.isConst) {
+    if (constantsAreAlwaysInlined && afterConst && node.variable.isConst) {
       problem(node, "VariableGet of const variable '${node.variable}'.");
     }
   }
@@ -621,7 +637,10 @@
     if (node.target.isInstanceMember) {
       problem(node, "StaticGet of '${node.target}' that's an instance member.");
     }
-    if (afterConst && node.target is Field && node.target.isConst) {
+    if (constantsAreAlwaysInlined &&
+        afterConst &&
+        node.target is Field &&
+        node.target.isConst) {
       problem(node, "StaticGet of const field '${node.target}'.");
     }
   }
diff --git a/pkg/kernel/lib/vm/constants_native_effects.dart b/pkg/kernel/lib/vm/constants_native_effects.dart
deleted file mode 100644
index 911f2cc..0000000
--- a/pkg/kernel/lib/vm/constants_native_effects.dart
+++ /dev/null
@@ -1,117 +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.
-
-library vm.constants_native_effects;
-
-import '../ast.dart';
-import '../target/targets.dart';
-import '../core_types.dart';
-
-class VmConstantsBackend extends ConstantsBackend {
-  final Class immutableMapClass;
-  final Class unmodifiableSetClass;
-  final Field unmodifiableSetMap;
-
-  VmConstantsBackend._(this.immutableMapClass, this.unmodifiableSetMap,
-      this.unmodifiableSetClass);
-
-  /// If [defines] is not `null` it will be used for handling
-  /// `const {bool,...}.fromEnvironment()` otherwise the current VM's values
-  /// will be used.
-  factory VmConstantsBackend(CoreTypes coreTypes) {
-    final Library coreLibrary = coreTypes.coreLibrary;
-    final Class immutableMapClass = coreLibrary.classes
-        .firstWhere((Class klass) => klass.name == '_ImmutableMap');
-    // ignore: unnecessary_null_comparison
-    assert(immutableMapClass != null);
-    Field unmodifiableSetMap =
-        coreTypes.index.getField('dart:collection', '_UnmodifiableSet', '_map');
-
-    return new VmConstantsBackend._(immutableMapClass, unmodifiableSetMap,
-        unmodifiableSetMap.enclosingClass!);
-  }
-
-  @override
-  Constant lowerMapConstant(MapConstant constant) {
-    // The _ImmutableMap class is implemented via one field pointing to a list
-    // of key/value pairs -- see runtime/lib/immutable_map.dart!
-    final List<Constant> kvListPairs =
-        new List<Constant>.generate(2 * constant.entries.length, (int i) {
-      final int index = i ~/ 2;
-      final ConstantMapEntry entry = constant.entries[index];
-      return i % 2 == 0 ? entry.key : entry.value;
-    });
-    // This is a bit fishy, since we merge the key and the value type by
-    // putting both into the same list.
-    final ListConstant kvListConstant =
-        new ListConstant(const DynamicType(), kvListPairs);
-    assert(immutableMapClass.fields.length == 1);
-    final Field kvPairListField = immutableMapClass.fields[0];
-    return new InstanceConstant(immutableMapClass.reference, <DartType>[
-      constant.keyType,
-      constant.valueType,
-    ], <Reference, Constant>{
-      // We use getterReference as we refer to the field itself.
-      kvPairListField.getterReference: kvListConstant,
-    });
-  }
-
-  @override
-  bool isLoweredMapConstant(Constant constant) {
-    return constant is InstanceConstant &&
-        constant.classNode == immutableMapClass;
-  }
-
-  @override
-  void forEachLoweredMapConstantEntry(
-      Constant constant, void Function(Constant key, Constant value) f) {
-    assert(isLoweredMapConstant(constant));
-    final InstanceConstant instance = constant as InstanceConstant;
-    assert(immutableMapClass.fields.length == 1);
-    final Field kvPairListField = immutableMapClass.fields[0];
-    final ListConstant kvListConstant =
-        instance.fieldValues[kvPairListField.getterReference] as ListConstant;
-    assert(kvListConstant.entries.length % 2 == 0);
-    for (int index = 0; index < kvListConstant.entries.length; index += 2) {
-      f(kvListConstant.entries[index], kvListConstant.entries[index + 1]);
-    }
-  }
-
-  @override
-  Constant lowerSetConstant(SetConstant constant) {
-    final DartType elementType = constant.typeArgument;
-    final List<Constant> entries = constant.entries;
-    final List<ConstantMapEntry> mapEntries =
-        new List<ConstantMapEntry>.generate(entries.length, (int index) {
-      return new ConstantMapEntry(entries[index], new NullConstant());
-    });
-    Constant map = lowerMapConstant(
-        new MapConstant(elementType, const NullType(), mapEntries));
-    return new InstanceConstant(unmodifiableSetClass.reference, [elementType],
-        <Reference, Constant>{unmodifiableSetMap.getterReference: map});
-  }
-
-  @override
-  bool isLoweredSetConstant(Constant constant) {
-    if (constant is InstanceConstant &&
-        constant.classNode == unmodifiableSetClass) {
-      InstanceConstant instance = constant;
-      return isLoweredMapConstant(
-          instance.fieldValues[unmodifiableSetMap.getterReference]!);
-    }
-    return false;
-  }
-
-  @override
-  void forEachLoweredSetConstantElement(
-      Constant constant, void Function(Constant element) f) {
-    assert(isLoweredSetConstant(constant));
-    final InstanceConstant instance = constant as InstanceConstant;
-    final Constant mapConstant =
-        instance.fieldValues[unmodifiableSetMap.getterReference]!;
-    forEachLoweredMapConstantEntry(mapConstant, (Constant key, Constant value) {
-      f(key);
-    });
-  }
-}
diff --git a/pkg/kernel/test/clone_test.dart b/pkg/kernel/test/clone_test.dart
index 2a8cfb6..5501551 100644
--- a/pkg/kernel/test/clone_test.dart
+++ b/pkg/kernel/test/clone_test.dart
@@ -96,7 +96,7 @@
   void testFields(Iterable<Field> fields) {
     testMembers<Field>(
         fields,
-        (cloner, field) => cloner.cloneField(field, null, null),
+        (cloner, field) => cloner.cloneField(field, null, null, null),
         (field) => "${field.runtimeType}(${field.name}):"
             "${field.initializer}");
   }
@@ -198,6 +198,8 @@
   bool checkField(EquivalenceVisitor visitor, Field? node, Object? other) {
     if (node is Field && other is Field) {
       assumeClonedReferences(
+          visitor, node, node.fieldReference, other, other.fieldReference);
+      assumeClonedReferences(
           visitor, node, node.getterReference, other, other.getterReference);
       assumeClonedReferences(
           visitor, node, node.setterReference, other, other.setterReference);
diff --git a/pkg/meta/README.md b/pkg/meta/README.md
index 9df903f..81fae76 100644
--- a/pkg/meta/README.md
+++ b/pkg/meta/README.md
@@ -30,5 +30,5 @@
 See the [LICENSE][license] file.
 
 [issues]: https://github.com/dart-lang/sdk/issues
-[license]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/LICENSE
+[license]: https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/LICENSE
 [list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
diff --git a/pkg/meta/pubspec.yaml b/pkg/meta/pubspec.yaml
index d4d36da..2e3c238 100644
--- a/pkg/meta/pubspec.yaml
+++ b/pkg/meta/pubspec.yaml
@@ -1,7 +1,7 @@
 name: meta
 # Note, because version `2.0.0` was mistakenly released, the next major version must be `3.x.y`.
 version: 1.7.1-dev
-homepage: https://github.com/dart-lang/sdk/tree/master/pkg/meta
+homepage: https://github.com/dart-lang/sdk/tree/main/pkg/meta
 description: >-
  Annotations that developers can use to express the intentions that otherwise
  can't be deduced by statically analyzing the source code. These annotations
diff --git a/pkg/native_stack_traces/CHANGELOG.md b/pkg/native_stack_traces/CHANGELOG.md
index 7c60f28..7a0f2b5 100644
--- a/pkg/native_stack_traces/CHANGELOG.md
+++ b/pkg/native_stack_traces/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## 0.4.4
+
+- Added handling of dynamic tables for testing.
+
 ## 0.4.3
 
 - Exported some more of the ELF utilities for use in Dart tests.
diff --git a/pkg/native_stack_traces/lib/elf.dart b/pkg/native_stack_traces/lib/elf.dart
index 3b1624b..3316655 100644
--- a/pkg/native_stack_traces/lib/elf.dart
+++ b/pkg/native_stack_traces/lib/elf.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.
 
-export 'src/elf.dart' show Elf, Section, Symbol;
+export 'src/elf.dart' show DynamicTable, DynamicTableTag, Elf, Section, Symbol;
 export 'src/constants.dart'
     show
         isolateDataSymbolName,
diff --git a/pkg/native_stack_traces/lib/src/elf.dart b/pkg/native_stack_traces/lib/src/elf.dart
index 548b5ac..268d5d80 100644
--- a/pkg/native_stack_traces/lib/src/elf.dart
+++ b/pkg/native_stack_traces/lib/src/elf.dart
@@ -214,7 +214,10 @@
   static const _ELFDATA2MSB = 0x02;
 
   void writeToStringBuffer(StringBuffer buffer) {
-    buffer..write('Format is ')..write(wordSize * 8)..write(' bits');
+    buffer
+      ..write('Format is ')
+      ..write(wordSize * 8)
+      ..write(' bits');
     switch (endian) {
       case Endian.little:
         buffer..writeln(' and little-endian');
@@ -342,6 +345,15 @@
   int get length => _entries.length;
   ProgramHeaderEntry operator [](int index) => _entries[index];
 
+  ProgramHeaderEntry? loadSegmentFor(int address) {
+    for (final entry in _entries) {
+      if (entry.vaddr <= address && address <= entry.vaddr + entry.memsz) {
+        return entry;
+      }
+    }
+    return null;
+  }
+
   static ProgramHeader fromReader(Reader reader, ElfHeader header) {
     final programReader = reader.refocusedCopy(
         header.programHeaderOffset, header.programHeaderSize);
@@ -352,7 +364,10 @@
 
   void writeToStringBuffer(StringBuffer buffer) {
     for (var i = 0; i < length; i++) {
-      if (i != 0) buffer..writeln()..writeln();
+      if (i != 0)
+        buffer
+          ..writeln()
+          ..writeln();
       buffer
         ..write('Entry ')
         ..write(i)
@@ -422,6 +437,17 @@
   static const _SHT_NOBITS = 8;
   static const _SHT_DYNSYM = 11;
 
+  // sh_flags constants from ELF specification.
+  static const _SHF_WRITE = 0x1;
+  static const _SHF_ALLOC = 0x2;
+  static const _SHF_EXECINSTR = 0x4;
+
+  bool get isWritable => flags & _SHF_WRITE != 0;
+  bool get isAllocated => flags & _SHF_ALLOC != 0;
+  bool get isExecutable => flags & _SHF_EXECINSTR != 0;
+
+  bool get hasBits => type != _SHT_NOBITS;
+
   void setName(StringTable nameTable) {
     name = nameTable[nameIndex]!;
   }
@@ -495,7 +521,10 @@
 
   void writeToStringBuffer(StringBuffer buffer) {
     for (var i = 0; i < entries.length; i++) {
-      if (i != 0) buffer..writeln()..writeln();
+      if (i != 0)
+        buffer
+          ..writeln()
+          ..writeln();
       buffer
         ..write('Entry ')
         ..write(i)
@@ -536,6 +565,8 @@
         return SymbolTable.fromReader(reader, entry);
       case SectionHeaderEntry._SHT_NOTE:
         return Note.fromReader(reader, entry);
+      case SectionHeaderEntry._SHT_DYNAMIC:
+        return DynamicTable.fromReader(reader, entry);
       default:
         return Section._(entry);
     }
@@ -713,7 +744,10 @@
   SymbolVisibility get visibility => SymbolVisibility.values[other & 0x03];
 
   void writeToStringBuffer(StringBuffer buffer) {
-    buffer..write('"')..write(name)..write('" =>');
+    buffer
+      ..write('"')
+      ..write(name)
+      ..write('" =>');
     switch (bind) {
       case SymbolBinding.STB_GLOBAL:
         buffer..write(' a global');
@@ -794,6 +828,109 @@
   }
 }
 
+/// Represents d_tag constants from ELF specification.
+enum DynamicTableTag {
+  DT_NULL,
+  DT_NEEDED,
+  DT_PLTRELSZ,
+  DT_PLTGOT,
+  DT_HASH,
+  DT_STRTAB,
+  DT_SYMTAB,
+  DT_RELA,
+  DT_RELASZ,
+  DT_RELAENT,
+  DT_STRSZ,
+  DT_SYMENT,
+  // Later d_tag values are not currently used in Dart ELF files.
+}
+
+/// The dynamic table, which contains entries pointing to various relocated
+/// addresses.
+class DynamicTable extends Section {
+  // We don't use DynamicTableTag for the key so that we can handle ELF files
+  // that may use unknown (to us) tags.
+  final Map<int, int> _entries;
+  final _wordSize;
+
+  DynamicTable._(SectionHeaderEntry entry, this._entries, this._wordSize)
+      : super._(entry);
+
+  static DynamicTable fromReader(Reader reader, SectionHeaderEntry entry) {
+    final sectionReader = reader.refocusedCopy(entry.offset, entry.size);
+    final entries = <int, int>{};
+    while (true) {
+      // Each entry is a tag and a value, both native word sized.
+      final tag = _readElfNative(sectionReader);
+      final value = _readElfNative(sectionReader);
+      // A DT_NULL entry signfies the end of entries.
+      if (tag == DynamicTableTag.DT_NULL.index) break;
+      entries[tag] = value;
+    }
+    return DynamicTable._(entry, entries, sectionReader.wordSize);
+  }
+
+  int? operator [](DynamicTableTag tag) => _entries[tag.index];
+  bool containsKey(DynamicTableTag tag) => _entries.containsKey(tag.index);
+
+  // To avoid depending on EnumName.name from 2.15.
+  static const _tagStrings = {
+    DynamicTableTag.DT_NULL: 'DT_NULL',
+    DynamicTableTag.DT_NEEDED: 'DT_NEEDED',
+    DynamicTableTag.DT_PLTRELSZ: 'DT_PLTRELSZ',
+    DynamicTableTag.DT_PLTGOT: 'DT_PLTGOT',
+    DynamicTableTag.DT_HASH: 'DT_HASH',
+    DynamicTableTag.DT_STRTAB: 'DT_STRTAB',
+    DynamicTableTag.DT_SYMTAB: 'DT_SYMTAB',
+    DynamicTableTag.DT_RELA: 'DT_RELA',
+    DynamicTableTag.DT_RELASZ: 'DT_RELASZ',
+    DynamicTableTag.DT_STRSZ: 'DT_STRSZ',
+    DynamicTableTag.DT_SYMENT: 'DT_SYMENT',
+  };
+  static final _maxTagStringLength = (_tagStrings.values.toList()
+        ..sort((s1, s2) => s2.length - s1.length))
+      .first
+      .length;
+
+  @override
+  void writeToStringBuffer(StringBuffer buffer) {
+    buffer
+      ..write('Section "')
+      ..write(headerEntry.name)
+      ..writeln('" is a dynamic table:');
+    for (var kv in _entries.entries) {
+      buffer.write(' ');
+      if (kv.key < DynamicTableTag.values.length) {
+        final tag = DynamicTableTag.values[kv.key];
+        buffer
+          ..write(_tagStrings[tag]?.padRight(_maxTagStringLength))
+          ..write(' => ');
+        switch (tag) {
+          // These are relocated addresses.
+          case DynamicTableTag.DT_HASH:
+          case DynamicTableTag.DT_PLTGOT:
+          case DynamicTableTag.DT_SYMTAB:
+          case DynamicTableTag.DT_STRTAB:
+          case DynamicTableTag.DT_RELA:
+            buffer
+              ..write('0x')
+              ..writeln(paddedHex(kv.value, _wordSize));
+            break;
+          // Other entries are just values or offsets.
+          default:
+            buffer.writeln(kv.value);
+        }
+      } else {
+        buffer
+          ..write("Unknown tag ")
+          ..write(kv.key)
+          ..write(' => ')
+          ..writeln(kv.value);
+      }
+    }
+  }
+}
+
 /// Information parsed from an Executable and Linking Format (ELF) file.
 class Elf {
   final ElfHeader _header;
@@ -819,6 +956,21 @@
   Iterable<Section> namedSections(String name) =>
       _sectionsByName[name] ?? <Section>[];
 
+  /// Checks that the contents of a given section have valid addresses when the
+  /// file contents for the corresponding segment is loaded into memory.
+  ///
+  /// Returns false for sections that are not allocated or where the address
+  /// does not correspond to file contents (i.e., NOBITS sections).
+  bool sectionHasValidSegmentAddresses(Section section) {
+    final headerEntry = section.headerEntry;
+    if (!headerEntry.isAllocated || !headerEntry.hasBits) return false;
+    final segment = _programHeader.loadSegmentFor(headerEntry.addr);
+    if (segment == null) return false;
+    return (headerEntry.addr < (segment.vaddr + segment.filesz)) &&
+        (headerEntry.addr + headerEntry.size) <=
+            (segment.vaddr + segment.filesz);
+  }
+
   /// Lookup of a dynamic symbol by name.
   ///
   /// Returns -1 if there is no dynamic symbol that matches [name].
diff --git a/pkg/native_stack_traces/pubspec.yaml b/pkg/native_stack_traces/pubspec.yaml
index bdf1f94..7dbc3b2 100644
--- a/pkg/native_stack_traces/pubspec.yaml
+++ b/pkg/native_stack_traces/pubspec.yaml
@@ -1,6 +1,6 @@
 name: native_stack_traces
 description: Utilities for working with non-symbolic stack traces.
-version: 0.4.3
+version: 0.4.4
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/native_stack_traces
 
diff --git a/pkg/nnbd_migration/lib/fix_reason_target.dart b/pkg/nnbd_migration/lib/fix_reason_target.dart
index 9f9c91c..c9c876b 100644
--- a/pkg/nnbd_migration/lib/fix_reason_target.dart
+++ b/pkg/nnbd_migration/lib/fix_reason_target.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/utilities_general.dart';
-
 /// Data structure representing a part of a type.  When a fix has multiple
 /// reasons (due to a complex type having different nullabilities at different
 /// locations), this data structure allows us to tell which part of the type
@@ -53,7 +51,7 @@
       : super(inner);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash3(2, inner.hashCode, name.hashCode);
+  int get hashCode => Object.hash(2, inner.hashCode, name.hashCode);
 
   @override
   bool operator ==(Object other) =>
@@ -82,7 +80,7 @@
       : super(inner);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash3(1, inner.hashCode, index);
+  int get hashCode => Object.hash(1, inner.hashCode, index);
 
   @override
   bool operator ==(Object other) =>
@@ -100,7 +98,7 @@
   _FixReasonTarget_ReturnType(FixReasonTarget inner) : super(inner);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash2(3, inner.hashCode);
+  int get hashCode => Object.hash(3, inner.hashCode);
 
   @override
   bool operator ==(Object other) =>
@@ -133,7 +131,7 @@
       : super(inner);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash3(5, inner.hashCode, index);
+  int get hashCode => Object.hash(5, inner.hashCode, index);
 
   @override
   bool operator ==(Object other) =>
@@ -164,7 +162,7 @@
   _FixReasonTarget_YieldedType(FixReasonTarget inner) : super(inner);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash2(4, inner.hashCode);
+  int get hashCode => Object.hash(4, inner.hashCode);
 
   @override
   bool operator ==(Object other) =>
diff --git a/pkg/nnbd_migration/lib/instrumentation.dart b/pkg/nnbd_migration/lib/instrumentation.dart
index c2700c1..1038d97 100644
--- a/pkg/nnbd_migration/lib/instrumentation.dart
+++ b/pkg/nnbd_migration/lib/instrumentation.dart
@@ -249,6 +249,7 @@
   dynamicAssignment,
   enumValue,
   expressionChecks,
+  externalDynamic,
   fieldFormalParameter,
   fieldNotInitialized,
   forEachVariable,
diff --git a/pkg/nnbd_migration/lib/nnbd_migration.dart b/pkg/nnbd_migration/lib/nnbd_migration.dart
index aaa17c7..a780bfa 100644
--- a/pkg/nnbd_migration/lib/nnbd_migration.dart
+++ b/pkg/nnbd_migration/lib/nnbd_migration.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:nnbd_migration/instrumentation.dart';
 import 'package:nnbd_migration/src/nullability_migration_impl.dart';
@@ -125,7 +124,8 @@
   /// Informative message: there is no valid migration for `null` in a
   /// non-nullable context.
   static const noValidMigrationForNull = NullabilityFixDescription._(
-      appliedMessage: 'No valid migration for `null` in a non-nullable context',
+      appliedMessage: 'No valid migration for expression with type `Null` in '
+          'a non-nullable context',
       kind: NullabilityFixKind.noValidMigrationForNull);
 
   /// Informative message: a null-aware access won't be necessary in strong
@@ -254,12 +254,7 @@
       {required this.appliedMessage, required this.kind});
 
   @override
-  int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, appliedMessage.hashCode);
-    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
+  int get hashCode => Object.hash(appliedMessage, kind);
 
   @override
   bool operator ==(Object other) =>
diff --git a/pkg/nnbd_migration/lib/src/edge_builder.dart b/pkg/nnbd_migration/lib/src/edge_builder.dart
index 62cd9a3..e3e703b 100644
--- a/pkg/nnbd_migration/lib/src/edge_builder.dart
+++ b/pkg/nnbd_migration/lib/src/edge_builder.dart
@@ -221,7 +221,7 @@
   /// initializer in the constructor declaration.
   Set<FieldElement?>? _fieldsNotInitializedByConstructor;
 
-  /// Current nesting depth of [visitTypeName]
+  /// Current nesting depth of [visitNamedType]
   int _typeNameNesting = 0;
 
   final Set<PromotableElement> _lateHintedLocals = {};
@@ -489,9 +489,12 @@
   @override
   DecoratedType visitAwaitExpression(AwaitExpression node) {
     var expressionType = _dispatch(node.expression)!;
-    // TODO(paulberry) Handle subclasses of Future.
-    if (expressionType.type!.isDartAsyncFuture ||
-        expressionType.type!.isDartAsyncFutureOr) {
+    var type = expressionType.type!;
+    if (_typeSystem.isSubtypeOf(type, typeProvider.futureDynamicType)) {
+      expressionType = _decoratedClassHierarchy!
+          .asInstanceOf(expressionType, typeProvider.futureElement)
+          .typeArguments[0]!;
+    } else if (type.isDartAsyncFutureOr) {
       expressionType = expressionType.typeArguments[0]!;
     }
     return expressionType;
@@ -678,7 +681,7 @@
 
   @override
   DecoratedType? visitClassTypeAlias(ClassTypeAlias node) {
-    _dispatch(node.superclass);
+    _dispatch(node.superclass2);
     _dispatch(node.implementsClause);
     _dispatch(node.withClause);
     var classElement = node.declaredElement!;
@@ -772,7 +775,7 @@
   DecoratedType? visitConstructorDeclaration(ConstructorDeclaration node) {
     _fieldsNotInitializedByConstructor =
         _fieldsNotInitializedAtDeclaration!.toSet();
-    _dispatch(node.redirectedConstructor?.type.typeArguments);
+    _dispatch(node.redirectedConstructor?.type2.typeArguments);
     _handleExecutableDeclaration(
         node,
         node.declaredElement!,
@@ -1178,7 +1181,7 @@
     var typeParameters = callee.enclosingElement.typeParameters;
     Iterable<DartType?> typeArgumentTypes;
     List<DecoratedType> decoratedTypeArguments;
-    var typeArguments = node.constructorName.type.typeArguments;
+    var typeArguments = node.constructorName.type2.typeArguments;
     late List<EdgeOrigin> parameterEdgeOrigins;
     var target =
         NullabilityNodeTarget.text('constructed type').withCodeRef(node);
@@ -1409,6 +1412,82 @@
   }
 
   @override
+  DecoratedType? visitNamedType(NamedType node) {
+    try {
+      _typeNameNesting++;
+      var typeArguments = node.typeArguments?.arguments;
+      var element = node.name.staticElement;
+      if (element is TypeAliasElement) {
+        var aliasedElement =
+            element.aliasedElement as GenericFunctionTypeElement;
+        final typedefType = _variables!.decoratedElementType(aliasedElement);
+        final typeNameType = _variables!.decoratedTypeAnnotation(source, node);
+
+        Map<TypeParameterElement, DecoratedType> substitutions;
+        if (node.typeArguments == null) {
+          // TODO(mfairhurst): substitute instantiations to bounds
+          substitutions = {};
+        } else {
+          substitutions =
+              Map<TypeParameterElement, DecoratedType>.fromIterables(
+                  element.typeParameters,
+                  node.typeArguments!.arguments.map(
+                      (t) => _variables!.decoratedTypeAnnotation(source, t)));
+        }
+
+        final decoratedType = typedefType.substitute(substitutions);
+        final origin = TypedefReferenceOrigin(source, node);
+        _linkDecoratedTypeParameters(decoratedType, typeNameType, origin,
+            isUnion: true);
+        _linkDecoratedTypes(
+            decoratedType.returnType!, typeNameType.returnType, origin,
+            isUnion: true);
+      } else if (element is TypeParameterizedElement) {
+        if (typeArguments == null) {
+          var instantiatedType =
+              _variables!.decoratedTypeAnnotation(source, node);
+          var origin = InstantiateToBoundsOrigin(source, node);
+          for (int i = 0; i < instantiatedType.typeArguments.length; i++) {
+            _linkDecoratedTypes(
+                instantiatedType.typeArguments[i]!,
+                _variables!
+                    .decoratedTypeParameterBound(element.typeParameters[i]),
+                origin,
+                isUnion: false);
+          }
+        } else {
+          for (int i = 0; i < typeArguments.length; i++) {
+            DecoratedType? bound;
+            bound = _variables!
+                .decoratedTypeParameterBound(element.typeParameters[i]);
+            assert(bound != null);
+            var argumentType =
+                _variables!.decoratedTypeAnnotation(source, typeArguments[i]);
+            _checkAssignment(
+                TypeParameterInstantiationOrigin(source, typeArguments[i]),
+                FixReasonTarget.root,
+                source: argumentType,
+                destination: bound!,
+                hard: true);
+          }
+        }
+      }
+      node.visitChildren(this);
+      // If the type name is followed by a `/*!*/` comment, it is considered to
+      // apply to the type and not to the "as" expression.  In order to prevent
+      // a future call to _handleNullCheck from interpreting it as applying to
+      // the "as" expression, we need to store the `/*!*/` comment in
+      // _nullCheckHints.
+      var token = node.endToken;
+      _nullCheckHints[token] = getPostfixHint(token);
+      namedTypeVisited(node); // Note this has been visited to TypeNameTracker.
+      return null;
+    } finally {
+      _typeNameNesting--;
+    }
+  }
+
+  @override
   DecoratedType? visitNamespaceDirective(NamespaceDirective node) {
     // skip directives, but not their metadata
     _dispatchList(node.metadata);
@@ -1862,84 +1941,6 @@
   }
 
   @override
-  DecoratedType? visitTypeName(TypeName typeName) {
-    try {
-      _typeNameNesting++;
-      var typeArguments = typeName.typeArguments?.arguments;
-      var element = typeName.name.staticElement;
-      if (element is TypeAliasElement) {
-        var aliasedElement =
-            element.aliasedElement as GenericFunctionTypeElement;
-        final typedefType = _variables!.decoratedElementType(aliasedElement);
-        final typeNameType =
-            _variables!.decoratedTypeAnnotation(source, typeName);
-
-        Map<TypeParameterElement, DecoratedType> substitutions;
-        if (typeName.typeArguments == null) {
-          // TODO(mfairhurst): substitute instantiations to bounds
-          substitutions = {};
-        } else {
-          substitutions =
-              Map<TypeParameterElement, DecoratedType>.fromIterables(
-                  element.typeParameters,
-                  typeName.typeArguments!.arguments.map(
-                      (t) => _variables!.decoratedTypeAnnotation(source, t)));
-        }
-
-        final decoratedType = typedefType.substitute(substitutions);
-        final origin = TypedefReferenceOrigin(source, typeName);
-        _linkDecoratedTypeParameters(decoratedType, typeNameType, origin,
-            isUnion: true);
-        _linkDecoratedTypes(
-            decoratedType.returnType!, typeNameType.returnType, origin,
-            isUnion: true);
-      } else if (element is TypeParameterizedElement) {
-        if (typeArguments == null) {
-          var instantiatedType =
-              _variables!.decoratedTypeAnnotation(source, typeName);
-          var origin = InstantiateToBoundsOrigin(source, typeName);
-          for (int i = 0; i < instantiatedType.typeArguments.length; i++) {
-            _linkDecoratedTypes(
-                instantiatedType.typeArguments[i]!,
-                _variables!
-                    .decoratedTypeParameterBound(element.typeParameters[i]),
-                origin,
-                isUnion: false);
-          }
-        } else {
-          for (int i = 0; i < typeArguments.length; i++) {
-            DecoratedType? bound;
-            bound = _variables!
-                .decoratedTypeParameterBound(element.typeParameters[i]);
-            assert(bound != null);
-            var argumentType =
-                _variables!.decoratedTypeAnnotation(source, typeArguments[i]);
-            _checkAssignment(
-                TypeParameterInstantiationOrigin(source, typeArguments[i]),
-                FixReasonTarget.root,
-                source: argumentType,
-                destination: bound!,
-                hard: true);
-          }
-        }
-      }
-      typeName.visitChildren(this);
-      // If the type name is followed by a `/*!*/` comment, it is considered to
-      // apply to the type and not to the "as" expression.  In order to prevent
-      // a future call to _handleNullCheck from interpreting it as applying to
-      // the "as" expression, we need to store the `/*!*/` comment in
-      // _nullCheckHints.
-      var token = typeName.endToken;
-      _nullCheckHints[token] = getPostfixHint(token);
-      typeNameVisited(
-          typeName); // Note this has been visited to TypeNameTracker.
-      return null;
-    } finally {
-      _typeNameNesting--;
-    }
-  }
-
-  @override
   DecoratedType? visitVariableDeclarationList(VariableDeclarationList node) {
     var parent = node.parent;
     bool isTopLevel =
@@ -2529,7 +2530,7 @@
     var callee = redirectedConstructor.staticElement!.declaration;
     var redirectedClass = callee.enclosingElement;
     var calleeType = _variables!.decoratedElementType(callee);
-    var typeArguments = redirectedConstructor.type.typeArguments;
+    var typeArguments = redirectedConstructor.type2.typeArguments;
     var typeArgumentTypes =
         typeArguments?.arguments.map((t) => t.type).toList();
     _handleInvocationArguments(
diff --git a/pkg/nnbd_migration/lib/src/edge_origin.dart b/pkg/nnbd_migration/lib/src/edge_origin.dart
index 91bb299..58ffe89 100644
--- a/pkg/nnbd_migration/lib/src/edge_origin.dart
+++ b/pkg/nnbd_migration/lib/src/edge_origin.dart
@@ -194,6 +194,18 @@
   EdgeOriginKind get kind => EdgeOriginKind.enumValue;
 }
 
+/// Edge origin resulting from an explicit or implicit `dynamic` type annotation
+/// appearing in an external declaration.
+class ExternalDynamicOrigin extends EdgeOrigin {
+  ExternalDynamicOrigin(Source? source, AstNode node) : super(source, node);
+
+  @override
+  String get description => 'dynamic type in external declaration';
+
+  @override
+  EdgeOriginKind get kind => EdgeOriginKind.externalDynamic;
+}
+
 /// Edge origin resulting from the relationship between a field formal parameter
 /// and the corresponding field.
 class FieldFormalParameterOrigin extends EdgeOrigin {
@@ -384,7 +396,7 @@
 /// this class is used for the edge connecting the type of x's type parameter
 /// with the type bound in the declaration of C.
 class InstantiateToBoundsOrigin extends EdgeOrigin {
-  InstantiateToBoundsOrigin(Source? source, TypeName node)
+  InstantiateToBoundsOrigin(Source? source, NamedType node)
       : super(source, node);
 
   @override
@@ -671,7 +683,7 @@
 /// unioned with references to the nodes referring to source code. The origin of
 /// those union edges will be [TypedefReferenceOrigin].
 class TypedefReferenceOrigin extends EdgeOrigin {
-  TypedefReferenceOrigin(Source? source, TypeName node) : super(source, node);
+  TypedefReferenceOrigin(Source? source, NamedType node) : super(source, node);
 
   @override
   String get description => 'reference to typedef';
diff --git a/pkg/nnbd_migration/lib/src/edit_plan.dart b/pkg/nnbd_migration/lib/src/edit_plan.dart
index f271dcf..76d2703 100644
--- a/pkg/nnbd_migration/lib/src/edit_plan.dart
+++ b/pkg/nnbd_migration/lib/src/edit_plan.dart
@@ -15,7 +15,6 @@
 import 'package:nnbd_migration/fix_reason_target.dart';
 import 'package:nnbd_migration/instrumentation.dart';
 import 'package:nnbd_migration/nnbd_migration.dart';
-import 'package:nnbd_migration/src/utilities/hint_utils.dart';
 
 Map<int?, List<AtomicEdit>>? _removeCode(
     int offset, int end, _RemovalStyle removalStyle, AtomicEditInfo? info) {
diff --git a/pkg/nnbd_migration/lib/src/fix_aggregator.dart b/pkg/nnbd_migration/lib/src/fix_aggregator.dart
index ddf1bb4..ddb14d6 100644
--- a/pkg/nnbd_migration/lib/src/fix_aggregator.dart
+++ b/pkg/nnbd_migration/lib/src/fix_aggregator.dart
@@ -1459,6 +1459,9 @@
       NodeChangeForMethodInvocation();
 
   @override
+  NodeChange visitNamedType(NamedType node) => NodeChangeForTypeAnnotation();
+
+  @override
   NodeChange visitNode(AstNode node) =>
       throw StateError('Unexpected node type: ${node.runtimeType}');
 
@@ -1493,9 +1496,6 @@
   }
 
   @override
-  NodeChange visitTypeName(TypeName node) => NodeChangeForTypeAnnotation();
-
-  @override
   NodeChange visitVariableDeclarationList(VariableDeclarationList node) =>
       NodeChangeForVariableDeclarationList();
 }
diff --git a/pkg/nnbd_migration/lib/src/fix_builder.dart b/pkg/nnbd_migration/lib/src/fix_builder.dart
index bcfdef6..7524133 100644
--- a/pkg/nnbd_migration/lib/src/fix_builder.dart
+++ b/pkg/nnbd_migration/lib/src/fix_builder.dart
@@ -35,7 +35,6 @@
 import 'package:nnbd_migration/src/edit_plan.dart';
 import 'package:nnbd_migration/src/fix_aggregator.dart';
 import 'package:nnbd_migration/src/nullability_node.dart';
-import 'package:nnbd_migration/src/utilities/hint_utils.dart';
 import 'package:nnbd_migration/src/utilities/permissive_mode.dart';
 import 'package:nnbd_migration/src/utilities/resolution_utils.dart';
 import 'package:nnbd_migration/src/utilities/where_or_null_transformer.dart';
@@ -186,11 +185,6 @@
     var inheritanceManager = InheritanceManager3();
     // TODO(paulberry): is it a bad idea to throw away errors?
     var errorListener = AnalysisErrorListener.NULL_LISTENER;
-    // TODO(paulberry): once the feature is no longer experimental, change the
-    // way we enable it in the resolver.
-    // ignore: invalid_use_of_visible_for_testing_member
-    var featureSet = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
     _resolver = ResolverVisitorForMigration(
         inheritanceManager,
         definingLibrary,
@@ -198,7 +192,10 @@
         typeProvider,
         errorListener,
         _typeSystem,
-        featureSet,
+        FeatureSet.fromEnableFlags2(
+          sdkLanguageVersion: Feature.non_nullable.releaseVersion!,
+          flags: [],
+        ),
         migrationResolutionHooks);
   }
 
@@ -638,7 +635,7 @@
     var resultType =
         _fixBuilder!._typeSystem.promoteToNonNull(type as TypeImpl);
     _flowAnalysis!.nonNullAssert_end(node);
-    return node is NullLiteral && hint == null
+    return type.isDartCoreNull && hint == null
         ? NoValidMigrationChange(resultType)
         : NullCheckChange(resultType, hint: hint);
   }
@@ -1226,7 +1223,7 @@
   }
 
   @override
-  void visitTypeName(TypeName node) {
+  void visitNamedType(NamedType node) {
     var decoratedType = _fixBuilder._variables!
         .decoratedTypeAnnotation(_fixBuilder.source, node);
     if (!typeIsNonNullableByContext(node)) {
@@ -1236,7 +1233,7 @@
     }
     (node as TypeNameImpl).type =
         _fixBuilder._variables!.toFinalType(decoratedType);
-    super.visitTypeName(node);
+    super.visitNamedType(node);
   }
 
   void _addRequiredKeyword(DefaultFormalParameter parameter,
diff --git a/pkg/nnbd_migration/lib/src/front_end/migration_info.dart b/pkg/nnbd_migration/lib/src/front_end/migration_info.dart
index bef2c3a..02ea5e1 100644
--- a/pkg/nnbd_migration/lib/src/front_end/migration_info.dart
+++ b/pkg/nnbd_migration/lib/src/front_end/migration_info.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:collection/collection.dart';
 import 'package:crypto/crypto.dart';
@@ -143,7 +142,7 @@
       : super(offset, line, length);
 
   @override
-  int get hashCode => JenkinsSmiHash.hash3(filePath.hashCode, offset, length);
+  int get hashCode => Object.hash(filePath.hashCode, offset, length);
 
   @override
   bool operator ==(Object other) {
diff --git a/pkg/nnbd_migration/lib/src/front_end/migration_summary.dart b/pkg/nnbd_migration/lib/src/front_end/migration_summary.dart
index 90adae8..4e6da6b 100644
--- a/pkg/nnbd_migration/lib/src/front_end/migration_summary.dart
+++ b/pkg/nnbd_migration/lib/src/front_end/migration_summary.dart
@@ -8,7 +8,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:nnbd_migration/nnbd_migration.dart';
 import 'package:nnbd_migration/src/edit_plan.dart';
-import 'package:nnbd_migration/src/utilities/hint_utils.dart';
 
 /// Class with the capability of writing out a machine-readable summary of
 /// migration results.
diff --git a/pkg/nnbd_migration/lib/src/node_builder.dart b/pkg/nnbd_migration/lib/src/node_builder.dart
index 05cb79d..653d36b 100644
--- a/pkg/nnbd_migration/lib/src/node_builder.dart
+++ b/pkg/nnbd_migration/lib/src/node_builder.dart
@@ -67,6 +67,10 @@
 
   final TypeProvider _typeProvider;
 
+  /// Indicates whether the declaration currently being visited is marked
+  /// `external`.
+  bool _visitingExternalDeclaration = false;
+
   NodeBuilder(this._variables, this.source, this.listener, this._graph,
       this._typeProvider, this._getLineInfo,
       {this.instrumentation});
@@ -131,7 +135,7 @@
     node.nativeClause?.accept(this);
     node.members.accept(this);
     var classElement = node.declaredElement!;
-    _handleSupertypeClauses(node, classElement, node.extendsClause?.superclass,
+    _handleSupertypeClauses(node, classElement, node.extendsClause?.superclass2,
         node.withClause, node.implementsClause, null);
     var constructors = classElement.constructors;
     if (constructors.length == 1) {
@@ -157,7 +161,7 @@
     node.name.accept(this);
     node.typeParameters?.accept(this);
     var classElement = node.declaredElement!;
-    _handleSupertypeClauses(node, classElement, node.superclass,
+    _handleSupertypeClauses(node, classElement, node.superclass2,
         node.withClause, node.implementsClause, null);
     for (var constructorElement in classElement.constructors) {
       assert(constructorElement.isSynthetic);
@@ -196,14 +200,15 @@
         node.parameters,
         node.initializers,
         node.body,
-        node.redirectedConstructor);
+        node.redirectedConstructor,
+        isExternal: node.externalKeyword != null);
     return null;
   }
 
   @override
   DecoratedType? visitConstructorName(ConstructorName node) {
     _pushNullabilityNodeTarget(NullabilityNodeTarget.text('constructed type'),
-        () => node.type.accept(this));
+        () => node.type2.accept(this));
     node.name?.accept(this);
     return null;
   }
@@ -340,14 +345,16 @@
         node.functionExpression.parameters,
         null,
         node.functionExpression.body,
-        null);
+        null,
+        isExternal: node.externalKeyword != null);
     return null;
   }
 
   @override
   DecoratedType? visitFunctionExpression(FunctionExpression node) {
     _handleExecutableDeclaration(node, node.declaredElement!, null, null,
-        node.typeParameters, node.parameters, null, node.body, null);
+        node.typeParameters, node.parameters, null, node.body, null,
+        isExternal: false);
     return null;
   }
 
@@ -456,7 +463,8 @@
         node.parameters,
         null,
         node.body,
-        null);
+        null,
+        isExternal: node.externalKeyword != null);
     if (declaredElement is PropertyAccessorElement) {
       // Store a decorated type for the synthetic field so that in case we try
       // to access it later we won't crash (this could happen due to errors in
@@ -499,6 +507,12 @@
   }
 
   @override
+  DecoratedType visitNamedType(NamedType node) {
+    namedTypeVisited(node); // Note this has been visited to NamedTypeTracker.
+    return visitTypeAnnotation(node);
+  }
+
+  @override
   DecoratedType? visitSetOrMapLiteral(SetOrMapLiteral node) {
     var typeArguments = node.typeArguments;
     if (typeArguments != null) {
@@ -531,6 +545,10 @@
       var nullabilityNode = NullabilityNode.forTypeAnnotation(target);
       var decoratedType = DecoratedType(type, nullabilityNode);
       _variables!.recordDecoratedTypeAnnotation(source, node, decoratedType);
+      if (_visitingExternalDeclaration) {
+        _graph.makeNullableUnion(
+            nullabilityNode, ExternalDynamicOrigin(source, node));
+      }
       return decoratedType;
     }
     var typeArguments = const <DecoratedType>[];
@@ -539,7 +557,7 @@
     Map<String, DecoratedType?> namedParameters =
         const <String, DecoratedType>{};
     if (type is InterfaceType && type.element.typeParameters.isNotEmpty) {
-      if (node is TypeName) {
+      if (node is NamedType) {
         if (node.typeArguments == null) {
           int index = 0;
           typeArguments = type.typeArguments
@@ -601,7 +619,7 @@
     }
     DecoratedType decoratedType;
     if (type is FunctionType && node is! GenericFunctionType) {
-      (node as TypeName).typeArguments?.accept(this);
+      (node as NamedType).typeArguments?.accept(this);
       // node is a reference to a typedef.  Treat it like an inferred type (we
       // synthesize new nodes for it).  These nodes will be unioned with the
       // typedef nodes by the edge builder.
@@ -620,12 +638,6 @@
   }
 
   @override
-  DecoratedType visitTypeName(TypeName node) {
-    typeNameVisited(node); // Note this has been visited to TypeNameTracker.
-    return visitTypeAnnotation(node);
-  }
-
-  @override
   DecoratedType? visitTypeParameter(TypeParameter node) {
     var element = node.declaredElement!;
     var bound = node.bound;
@@ -708,49 +720,62 @@
       FormalParameterList? parameters,
       NodeList<ConstructorInitializer>? initializers,
       FunctionBody body,
-      ConstructorName? redirectedConstructor) {
+      ConstructorName? redirectedConstructor,
+      {required bool isExternal}) {
     metadata?.accept(this);
-    var functionType = declaredElement.type;
-    DecoratedType? decoratedReturnType;
-    var target = NullabilityNodeTarget.element(declaredElement, _getLineInfo);
-    if (returnType != null) {
-      _pushNullabilityNodeTarget(target.returnType(), () {
-        decoratedReturnType = returnType.accept(this);
-      });
-    } else if (declaredElement is ConstructorElement) {
-      // Constructors have no explicit return type annotation, so use the
-      // implicit return type.
-      decoratedReturnType = _createDecoratedTypeForClass(
-          declaredElement.enclosingElement, parameters!.parent);
-      instrumentation?.implicitReturnType(source, node, decoratedReturnType);
-    } else {
-      // Inferred return type.
-      decoratedReturnType = DecoratedType.forImplicitType(
-          _typeProvider, functionType.returnType, _graph, target);
-      instrumentation?.implicitReturnType(source, node, decoratedReturnType);
-    }
-    var previousPositionalParameters = _positionalParameters;
-    var previousNamedParameters = _namedParameters;
-    _positionalParameters = [];
-    _namedParameters = {};
-    DecoratedType decoratedFunctionType;
+    var previouslyVisitingExternalDeclaration = _visitingExternalDeclaration;
     try {
-      typeParameters?.accept(this);
-      _pushNullabilityNodeTarget(target, () => parameters?.accept(this));
-      redirectedConstructor?.accept(this);
-      initializers?.accept(this);
-      decoratedFunctionType = DecoratedType(functionType, _graph.never,
-          returnType: decoratedReturnType,
-          positionalParameters: _positionalParameters,
-          namedParameters: _namedParameters);
-      body.accept(this);
+      if (isExternal) {
+        _visitingExternalDeclaration = true;
+      }
+      var functionType = declaredElement.type;
+      DecoratedType? decoratedReturnType;
+      var target = NullabilityNodeTarget.element(declaredElement, _getLineInfo);
+      if (returnType != null) {
+        _pushNullabilityNodeTarget(target.returnType(), () {
+          decoratedReturnType = returnType.accept(this);
+        });
+      } else if (declaredElement is ConstructorElement) {
+        // Constructors have no explicit return type annotation, so use the
+        // implicit return type.
+        decoratedReturnType = _createDecoratedTypeForClass(
+            declaredElement.enclosingElement, parameters!.parent);
+        instrumentation?.implicitReturnType(source, node, decoratedReturnType);
+      } else {
+        // Inferred return type.
+        decoratedReturnType = DecoratedType.forImplicitType(
+            _typeProvider, functionType.returnType, _graph, target);
+        instrumentation?.implicitReturnType(source, node, decoratedReturnType);
+        if (isExternal && functionType.returnType.isDynamic) {
+          _graph.makeNullableUnion(
+              decoratedReturnType.node!, ExternalDynamicOrigin(source, node));
+        }
+      }
+      var previousPositionalParameters = _positionalParameters;
+      var previousNamedParameters = _namedParameters;
+      _positionalParameters = [];
+      _namedParameters = {};
+      DecoratedType decoratedFunctionType;
+      try {
+        typeParameters?.accept(this);
+        _pushNullabilityNodeTarget(target, () => parameters?.accept(this));
+        redirectedConstructor?.accept(this);
+        initializers?.accept(this);
+        decoratedFunctionType = DecoratedType(functionType, _graph.never,
+            returnType: decoratedReturnType,
+            positionalParameters: _positionalParameters,
+            namedParameters: _namedParameters);
+        body.accept(this);
+      } finally {
+        _positionalParameters = previousPositionalParameters;
+        _namedParameters = previousNamedParameters;
+      }
+      _variables!
+          .recordDecoratedElementType(declaredElement, decoratedFunctionType);
+      return decoratedFunctionType;
     } finally {
-      _positionalParameters = previousPositionalParameters;
-      _namedParameters = previousNamedParameters;
+      _visitingExternalDeclaration = previouslyVisitingExternalDeclaration;
     }
-    _variables!
-        .recordDecoratedElementType(declaredElement, decoratedFunctionType);
-    return decoratedFunctionType;
   }
 
   DecoratedType? _handleFormalParameter(
@@ -768,6 +793,10 @@
       } else {
         decoratedType = DecoratedType.forImplicitType(
             _typeProvider, declaredElement.type, _graph, target);
+        if (_visitingExternalDeclaration) {
+          _graph.makeNullableUnion(
+              decoratedType.node!, ExternalDynamicOrigin(source, node));
+        }
         instrumentation?.implicitType(source, node, decoratedType);
       }
     } else {
@@ -776,6 +805,10 @@
         decoratedReturnType = DecoratedType.forImplicitType(_typeProvider,
             DynamicTypeImpl.instance, _graph, target.returnType());
         instrumentation?.implicitReturnType(source, node, decoratedReturnType);
+        if (_visitingExternalDeclaration) {
+          _graph.makeNullableUnion(
+              decoratedReturnType.node!, ExternalDynamicOrigin(source, node));
+        }
       } else {
         decoratedReturnType = type.accept(this);
       }
@@ -864,20 +897,20 @@
   void _handleSupertypeClauses(
       NamedCompilationUnitMember astNode,
       ClassElement declaredElement,
-      TypeName? superclass,
+      NamedType? superclass,
       WithClause? withClause,
       ImplementsClause? implementsClause,
       OnClause? onClause) {
-    var supertypes = <TypeName?>[];
+    var supertypes = <NamedType?>[];
     supertypes.add(superclass);
     if (withClause != null) {
-      supertypes.addAll(withClause.mixinTypes);
+      supertypes.addAll(withClause.mixinTypes2);
     }
     if (implementsClause != null) {
-      supertypes.addAll(implementsClause.interfaces);
+      supertypes.addAll(implementsClause.interfaces2);
     }
     if (onClause != null) {
-      supertypes.addAll(onClause.superclassConstraints);
+      supertypes.addAll(onClause.superclassConstraints2);
     }
     var decoratedSupertypes = <ClassElement, DecoratedType?>{};
     _pushNullabilityNodeTarget(
diff --git a/pkg/nnbd_migration/lib/src/utilities/completeness_tracker.dart b/pkg/nnbd_migration/lib/src/utilities/completeness_tracker.dart
index 520fda8..d43b180 100644
--- a/pkg/nnbd_migration/lib/src/utilities/completeness_tracker.dart
+++ b/pkg/nnbd_migration/lib/src/utilities/completeness_tracker.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:nnbd_migration/src/utilities/permissive_mode.dart';
 import 'package:nnbd_migration/src/utilities/annotation_tracker.dart';
-import 'package:nnbd_migration/src/utilities/type_name_tracker.dart';
+import 'package:nnbd_migration/src/utilities/named_type_tracker.dart';
+import 'package:nnbd_migration/src/utilities/permissive_mode.dart';
 
 /// Mixin that verifies (via assertion checks) that a visitor visits a
 /// compilation unit to "completeness" -- currently tracks Annotations and
@@ -15,13 +15,7 @@
 /// disabled.
 mixin CompletenessTracker<T> on AstVisitor<T>, PermissiveModeVisitor<T> {
   AnnotationTracker? _annotationTracker;
-  TypeNameTracker? _typeNameTracker;
-
-  @override
-  T? visitAnnotation(Annotation node) {
-    annotationVisited(node);
-    return super.visitAnnotation(node);
-  }
+  NamedTypeTracker? _namedTypeTracker;
 
   void annotationVisited(Annotation node) {
     assert(() {
@@ -30,34 +24,40 @@
     }());
   }
 
-  void typeNameVisited(TypeName node) {
+  void namedTypeVisited(NamedType node) {
     assert(() {
-      _typeNameTracker!.nodeVisited(node);
+      _namedTypeTracker!.nodeVisited(node);
       return true;
     }());
   }
 
   @override
+  T? visitAnnotation(Annotation node) {
+    annotationVisited(node);
+    return super.visitAnnotation(node);
+  }
+
+  @override
   T? visitCompilationUnit(CompilationUnit node) {
     T? result;
     reportExceptionsIfPermissive(node, () {
       assert(() {
         assert(_annotationTracker == null);
-        assert(_typeNameTracker == null);
+        assert(_namedTypeTracker == null);
         _annotationTracker = AnnotationTracker()..visitCompilationUnit(node);
-        _typeNameTracker = TypeNameTracker()..visitCompilationUnit(node);
+        _namedTypeTracker = NamedTypeTracker()..visitCompilationUnit(node);
         return true;
       }());
       try {
         result = super.visitCompilationUnit(node);
         assert(() {
           _annotationTracker!.finalize();
-          _typeNameTracker!.finalize();
+          _namedTypeTracker!.finalize();
           return true;
         }());
       } finally {
         _annotationTracker = null;
-        _typeNameTracker = null;
+        _namedTypeTracker = null;
       }
     });
     return result;
diff --git a/pkg/nnbd_migration/lib/src/utilities/named_type_tracker.dart b/pkg/nnbd_migration/lib/src/utilities/named_type_tracker.dart
new file mode 100644
index 0000000..5c2e296
--- /dev/null
+++ b/pkg/nnbd_migration/lib/src/utilities/named_type_tracker.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/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+
+/// A simple class to find all [NamedType]s and track if they all get visited.
+class NamedTypeTracker extends RecursiveAstVisitor<void> {
+  final Set<NamedType> _nodes = {};
+
+  void finalize() {
+    assert(_nodes.isEmpty, 'Annotation nodes not visited: $_nodes');
+  }
+
+  void nodeVisited(NamedType node) {
+    if (_isTrueNamedType(node) && !_nodes.remove(node)) {
+      throw StateError('Visited unexpected type name $node');
+    }
+  }
+
+  @override
+  void visitNamedType(NamedType node) {
+    if (_isTrueNamedType(node)) {
+      _nodes.add(node);
+    }
+    super.visitNamedType(node);
+  }
+
+  bool _isTrueNamedType(NamedType node) {
+    final parent = node.parent;
+    if (parent is ConstructorName) {
+      // We only need to visit C in `new C()`, just `int` in `new C<int>()`.
+      return parent.type2 != node;
+    }
+
+    return true;
+  }
+}
diff --git a/pkg/nnbd_migration/lib/src/utilities/type_name_tracker.dart b/pkg/nnbd_migration/lib/src/utilities/type_name_tracker.dart
deleted file mode 100644
index 67a1817..0000000
--- a/pkg/nnbd_migration/lib/src/utilities/type_name_tracker.dart
+++ /dev/null
@@ -1,39 +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/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-
-/// A simple class to find all [TypeName]s and track if they all get visited.
-class TypeNameTracker extends RecursiveAstVisitor<void> {
-  final Set<TypeName> _nodes = {};
-
-  bool _isTrueTypeName(TypeName node) {
-    final parent = node.parent;
-    if (parent is ConstructorName) {
-      // We only need to visit C in `new C()`, just `int` in `new C<int>()`.
-      return parent.type != node;
-    }
-
-    return true;
-  }
-
-  @override
-  void visitTypeName(TypeName node) {
-    if (_isTrueTypeName(node)) {
-      _nodes.add(node);
-    }
-    super.visitTypeName(node);
-  }
-
-  void nodeVisited(TypeName node) {
-    if (_isTrueTypeName(node) && !_nodes.remove(node)) {
-      throw StateError('Visited unexpected type name $node');
-    }
-  }
-
-  void finalize() {
-    assert(_nodes.isEmpty, 'Annotation nodes not visited: $_nodes');
-  }
-}
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
index 18fffd3..6d8ac9d 100644
--- a/pkg/nnbd_migration/pubspec.yaml
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -4,7 +4,7 @@
 publish_to: none
 
 environment:
-  sdk: '>=2.12.0 <3.0.0'
+  sdk: '>=2.14.0 <3.0.0'
 
 dependencies:
   _fe_analyzer_shared:
diff --git a/pkg/nnbd_migration/test/already_migrated_code_decorator_test.dart b/pkg/nnbd_migration/test/already_migrated_code_decorator_test.dart
index d89b551..abc2788 100644
--- a/pkg/nnbd_migration/test/already_migrated_code_decorator_test.dart
+++ b/pkg/nnbd_migration/test/already_migrated_code_decorator_test.dart
@@ -6,7 +6,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/source/line_info.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/nnbd_migration/test/api_test.dart b/pkg/nnbd_migration/test/api_test.dart
index 5307de5..a13964d 100644
--- a/pkg/nnbd_migration/test/api_test.dart
+++ b/pkg/nnbd_migration/test/api_test.dart
@@ -1601,6 +1601,26 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_custom_future() async {
+    var content = '''
+class CustomFuture<T> implements Future<T> {
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+f(CustomFuture<List<int>> x) async => (await x).first;
+''';
+    var expected = '''
+class CustomFuture<T> implements Future<T> {
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+f(CustomFuture<List<int>> x) async => (await x).first;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_data_flow_assignment_field() async {
     var content = '''
 class C {
@@ -3290,6 +3310,114 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_external_constructor() async {
+    var content = '''
+class C {
+  external C(dynamic Function(dynamic) callback);
+  static Object g(Object Function(Object) callback) => C(callback);
+}
+''';
+    var expected = '''
+class C {
+  external C(dynamic Function(dynamic) callback);
+  static Object g(Object Function(Object?) callback) => C(callback);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_function() async {
+    var content = '''
+external dynamic f();
+Object g() => f();
+''';
+    var expected = '''
+external dynamic f();
+Object? g() => f();
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_function_implicit_return() async {
+    var content = '''
+external f();
+Object g() => f();
+''';
+    var expected = '''
+external f();
+Object? g() => f();
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_function_implicit_variance() async {
+    var content = '''
+external void f(callback(x));
+void g(Object Function(Object) callback) => f(callback);
+''';
+    var expected = '''
+external void f(callback(x));
+void g(Object Function(Object?) callback) => f(callback);
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_function_implicit_variance_complex() async {
+    var content = '''
+external void f(callback(x()));
+void g(Object Function(Object Function()) callback) => f(callback);
+''';
+    var expected = '''
+external void f(callback(x()));
+void g(Object Function(Object? Function()) callback) => f(callback);
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_function_variance() async {
+    var content = '''
+external void f(dynamic Function(dynamic) callback);
+void g(Object Function(Object) callback) => f(callback);
+''';
+    var expected = '''
+external void f(dynamic Function(dynamic) callback);
+void g(Object Function(Object?) callback) => f(callback);
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_method() async {
+    var content = '''
+class C {
+  external dynamic f();
+  Object g() => f();
+}
+''';
+    var expected = '''
+class C {
+  external dynamic f();
+  Object? g() => f();
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_external_method_implicit() async {
+    var content = '''
+class C {
+  external f();
+  Object g() => f();
+}
+''';
+    var expected = '''
+class C {
+  external f();
+  Object? g() => f();
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_field_final_uninitalized_used() async {
     var content = '''
 class C {
@@ -6726,6 +6854,24 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_null_typed_expression_wiithout_valid_migration() async {
+    var content = '''
+void f(int/*!*/ x) {}
+void g() {
+  f(h());
+}
+Null h() => null;
+''';
+    var expected = '''
+void f(int x) {}
+void g() {
+  f(h());
+}
+Null h() => null;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_nullable_use_of_typedef() async {
     var content = '''
 typedef F<T> = int Function(T);
diff --git a/pkg/nnbd_migration/test/edge_builder_test.dart b/pkg/nnbd_migration/test/edge_builder_test.dart
index 901468a..76db62c 100644
--- a/pkg/nnbd_migration/test/edge_builder_test.dart
+++ b/pkg/nnbd_migration/test/edge_builder_test.dart
@@ -8108,7 +8108,7 @@
 void f(Point<int> x) {}
 ''');
     var pointClass =
-        findNode.typeName('Point').name.staticElement as ClassElement;
+        findNode.namedType('Point').name.staticElement as ClassElement;
     var pointBound =
         variables!.decoratedTypeParameterBound(pointClass.typeParameters[0])!;
     _assertType(pointBound.type!, 'num');
diff --git a/pkg/nnbd_migration/test/fix_aggregator_test.dart b/pkg/nnbd_migration/test/fix_aggregator_test.dart
index 27a9571..f32f6be 100644
--- a/pkg/nnbd_migration/test/fix_aggregator_test.dart
+++ b/pkg/nnbd_migration/test/fix_aggregator_test.dart
@@ -1187,7 +1187,7 @@
 
   Future<void> test_makeNullable() async {
     await analyze('f(int x) {}');
-    var typeName = findNode.typeName('int');
+    var typeName = findNode.namedType('int');
     var previewInfo = run({
       typeName: NodeChangeForTypeAnnotation()
         ..recordNullability(
@@ -1217,7 +1217,7 @@
 
   Future<void> test_noChangeToTypeAnnotation() async {
     await analyze('int x = 0;');
-    var typeName = findNode.typeName('int');
+    var typeName = findNode.namedType('int');
     var previewInfo = run({
       typeName: NodeChangeForTypeAnnotation()
         ..recordNullability(
@@ -1233,7 +1233,7 @@
 
   Future<void> test_noInfoForTypeAnnotation() async {
     await analyze('int x = 0;');
-    var typeName = findNode.typeName('int');
+    var typeName = findNode.namedType('int');
     var previewInfo = run({typeName: NodeChangeForTypeAnnotation()});
     expect(previewInfo, null);
   }
diff --git a/pkg/nnbd_migration/test/fix_builder_test.dart b/pkg/nnbd_migration/test/fix_builder_test.dart
index 74fa1a8..76c2bca 100644
--- a/pkg/nnbd_migration/test/fix_builder_test.dart
+++ b/pkg/nnbd_migration/test/fix_builder_test.dart
@@ -1327,7 +1327,7 @@
 int _f({int/*?*/ x}) => 1;
 ''');
     visitAll(
-        changes: {findNode.typeName('int/*?*/ x'): isMakeNullableDueToHint});
+        changes: {findNode.namedType('int/*?*/ x'): isMakeNullableDueToHint});
   }
 
   Future<void>
@@ -1367,7 +1367,7 @@
 ''');
     visitAll(changes: {
       findNode.annotation('required'): isRequiredAnnotationToRequiredKeyword,
-      findNode.typeName('int'): isMakeNullableDueToHint,
+      findNode.namedType('int'): isMakeNullableDueToHint,
     });
   }
 
@@ -1594,7 +1594,7 @@
 }
 void _g(int/*?*/ x) {}
 ''');
-    var intTypeAnnotation = findNode.typeName('int)');
+    var intTypeAnnotation = findNode.namedType('int)');
     var genericFunctionTypeAnnotation =
         findNode.genericFunctionType('Function(int)');
     visitTypeAnnotation(genericFunctionTypeAnnotation, 'void Function(int?)',
@@ -1608,7 +1608,7 @@
 }
 int/*?*/ _g() => null;
 ''');
-    var intTypeAnnotation = findNode.typeName('int Function');
+    var intTypeAnnotation = findNode.namedType('int Function');
     var genericFunctionTypeAnnotation =
         findNode.genericFunctionType('Function');
     visitTypeAnnotation(genericFunctionTypeAnnotation, 'int? Function()',
@@ -2307,6 +2307,22 @@
         changes: {findNode.simple('x &&'): isNullCheck});
   }
 
+  Future<void> test_nullExpression_noValidMigration() async {
+    await analyze('''
+int/*!*/ f() => g();
+Null g() => null;
+''');
+    var invocation = findNode.methodInvocation('g();');
+    // Note: in spite of the fact that we leave the method invocation alone, we
+    // analyze it as though it has type `Never`, because it's in a context where
+    // `null` doesn't work.
+    visitSubexpression(invocation, 'Never', changes: {
+      invocation: isNodeChangeForExpression.havingNoValidMigrationWithInfo(
+          isInfo(NullabilityFixDescription.noValidMigrationForNull,
+              {FixReasonTarget.root: TypeMatcher<NullabilityEdge>()}))
+    });
+  }
+
   Future<void> test_nullLiteral() async {
     await analyze('''
 f() => null;
diff --git a/pkg/scrape/example/superclass_parameters.dart b/pkg/scrape/example/superclass_parameters.dart
new file mode 100644
index 0000000..de5923e
--- /dev/null
+++ b/pkg/scrape/example/superclass_parameters.dart
@@ -0,0 +1,317 @@
+// 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.
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:scrape/scrape.dart';
+
+enum ArgumentMatch {
+  noArguments,
+  none,
+  all,
+  some,
+  prefix,
+  suffix,
+  middle,
+  noncontiguous
+}
+
+extension on ArgumentMatch {
+  String get description {
+    switch (this) {
+      case ArgumentMatch.noArguments:
+        return 'No arguments to match';
+      case ArgumentMatch.none:
+        return 'Matched none';
+      case ArgumentMatch.all:
+        return 'Matched all';
+      case ArgumentMatch.some:
+        return 'Matched some';
+      case ArgumentMatch.prefix:
+        return 'Matched prefix';
+      case ArgumentMatch.suffix:
+        return 'Matched suffix';
+      case ArgumentMatch.middle:
+        return 'Matched middle';
+      case ArgumentMatch.noncontiguous:
+        return 'Matched noncontiguous';
+    }
+  }
+}
+
+void main(List<String> arguments) {
+  Scrape()
+    ..addHistogram('Potential use')
+    ..addHistogram('Individual arguments')
+    ..addHistogram('Named arguments')
+    ..addHistogram('Positional arguments')
+    ..addHistogram('Argument pattern')
+    ..addHistogram('Append super args')
+    ..addHistogram('Prepend super args')
+    ..addHistogram('Insert super args')
+    ..addHistogram('Do not merge super args')
+    ..addHistogram('No explicit super(), call unnamed')
+    ..addHistogram('No explicit super(), call same name')
+    ..addVisitor(() => SuperclassParameterVisitor())
+    ..runCommandLine(arguments);
+}
+
+class SuperclassParameterVisitor extends ScrapeVisitor {
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    // Whether the constructor might benefit from the feature at all.
+    var initializer = _findSuper(node);
+    if (initializer == null) {
+      record('Potential use', 'No: No initializer');
+      return;
+    }
+
+    if (initializer.argumentList.arguments.isEmpty) {
+      record('Potential use', 'No: Empty super() argument list');
+      return;
+    }
+
+    record('Potential use', 'Yes');
+
+    // If we get here, we have a superclass constructor call with arguments.
+    // See if any of them could use the feature.
+    var positionalParamNames = node.parameters.parameters
+        .where((param) => param.isPositional)
+        .map((param) => param.identifier!.name)
+        .toList();
+
+    var namedParamNames = node.parameters.parameters
+        .where((param) => param.isNamed)
+        .map((param) => param.identifier!.name)
+        .toSet();
+
+    var matchedNamedArguments = 0;
+    var unmatchedNamedArguments = 0;
+
+    var lastPositionalParam = -1;
+    var matchedIndexes = <int>[];
+    var unmatchedPositionalArguments = 0;
+    var positionalArgCount = 0;
+    for (var i = 0; i < initializer.argumentList.arguments.length; i++) {
+      var argument = initializer.argumentList.arguments[i];
+
+      if (argument is NamedExpression) {
+        var expression = argument.expression;
+        if (expression is! SimpleIdentifier) {
+          record('Individual arguments',
+              'Named argument expression is not identifier');
+          unmatchedNamedArguments++;
+        } else if (argument.name.label.name != expression.name) {
+          record('Individual arguments',
+              'Named argument name does not match expression name');
+          unmatchedNamedArguments++;
+        } else if (!namedParamNames.contains(expression.name)) {
+          record('Individual arguments',
+              'Named argument does not match a parameter');
+          unmatchedNamedArguments++;
+        } else {
+          record('Individual arguments', 'Argument matches a parameter');
+          matchedNamedArguments++;
+        }
+      } else {
+        positionalArgCount++;
+        if (argument is! SimpleIdentifier) {
+          record('Individual arguments',
+              'Positional argument expression is not identifier');
+          unmatchedPositionalArguments++;
+        } else {
+          // Start searching after the last matched positional parameter because
+          // we don't allow reordering them. If two arguments are out of order,
+          // that doesn't mean we can't use "super." at all, just that we can
+          // only use it for *one* of those arguments.
+          var index =
+              positionalParamNames.indexOf(argument.name, lastPositionalParam);
+          if (index == -1) {
+            record('Individual arguments',
+                'Positional argument does not match a parameter');
+          } else {
+            record('Individual arguments', 'Argument matches a parameter');
+            lastPositionalParam = index;
+            matchedIndexes.add(i);
+          }
+        }
+      }
+    }
+
+    // Characterize the positional argument list.
+    ArgumentMatch positionalMatch;
+    if (unmatchedPositionalArguments == 0) {
+      if (matchedIndexes.isEmpty) {
+        positionalMatch = ArgumentMatch.noArguments;
+      } else {
+        positionalMatch = ArgumentMatch.all;
+      }
+    } else if (matchedIndexes.isEmpty) {
+      positionalMatch = ArgumentMatch.none;
+    } else {
+      // If there is any unmatched argument before a matched one, then the
+      // matched arguments are not all at the beginning.
+      var matchedArePrefix = true;
+      for (var i = 1; i < positionalArgCount; i++) {
+        if (!matchedIndexes.contains(i - 1) && matchedIndexes.contains(i)) {
+          matchedArePrefix = false;
+          break;
+        }
+      }
+
+      // If there is any unmatched argument after a matched one, then the
+      // matched arguments are not all at the end.
+      var matchedAreSuffix = true;
+      for (var i = 0; i < positionalArgCount - 1; i++) {
+        if (!matchedIndexes.contains(i + 1) && matchedIndexes.contains(i)) {
+          matchedAreSuffix = false;
+          break;
+        }
+      }
+
+      // If any index between the first and last matched arg is not matched,
+      // then the arguments are not contiguous.
+      var matchedAreContiguous = true;
+      if (matchedIndexes.isNotEmpty) {
+        for (var i = matchedIndexes.first; i <= matchedIndexes.last; i++) {
+          if (!matchedIndexes.contains(i)) {
+            matchedAreContiguous = false;
+            break;
+          }
+        }
+      }
+
+      if (!matchedAreContiguous) {
+        positionalMatch = ArgumentMatch.noncontiguous;
+      } else if (matchedArePrefix) {
+        positionalMatch = ArgumentMatch.prefix;
+      } else if (matchedAreSuffix) {
+        positionalMatch = ArgumentMatch.suffix;
+      } else {
+        positionalMatch = ArgumentMatch.middle;
+      }
+    }
+
+    record('Positional arguments', positionalMatch.description);
+
+    // Characterize the named argument list.
+    ArgumentMatch namedMatch;
+    if (matchedNamedArguments == 0) {
+      if (unmatchedNamedArguments == 0) {
+        namedMatch = ArgumentMatch.noArguments;
+      } else {
+        namedMatch = ArgumentMatch.none;
+      }
+    } else {
+      if (unmatchedNamedArguments == 0) {
+        namedMatch = ArgumentMatch.all;
+      } else {
+        namedMatch = ArgumentMatch.some;
+      }
+    }
+
+    record('Named arguments', namedMatch.description);
+
+    var pattern = [
+      for (var i = 0; i < positionalArgCount; i++)
+        matchedIndexes.contains(i) ? 's' : '_',
+      for (var i = 0; i < matchedNamedArguments; i++) ':s',
+      for (var i = 0; i < unmatchedNamedArguments; i++) ':_',
+    ].join(',');
+    record('Argument pattern', '($pattern)');
+
+    // If none of the arguments could be 'super.', then none of the proposals
+    // apply.
+    if (matchedIndexes.isEmpty && matchedNamedArguments == 0) return;
+
+    var append = true;
+    var prepend = true;
+    var insert = true;
+    var noMerge = true;
+    var allParams = true;
+
+    switch (positionalMatch) {
+      case ArgumentMatch.noArguments:
+      case ArgumentMatch.all:
+        // OK.
+        break;
+
+      case ArgumentMatch.none:
+        allParams = false;
+        break;
+
+      case ArgumentMatch.some:
+        throw Exception('Should not get some for positional args.');
+
+      case ArgumentMatch.prefix:
+        append = false;
+        noMerge = false;
+        allParams = false;
+        break;
+
+      case ArgumentMatch.suffix:
+        prepend = false;
+        noMerge = false;
+        allParams = false;
+        break;
+
+      case ArgumentMatch.middle:
+        append = false;
+        prepend = false;
+        noMerge = false;
+        allParams = false;
+        break;
+
+      case ArgumentMatch.noncontiguous:
+        append = false;
+        prepend = false;
+        insert = false;
+        noMerge = false;
+        allParams = false;
+        break;
+    }
+
+    switch (namedMatch) {
+      case ArgumentMatch.noArguments:
+      case ArgumentMatch.all:
+        // OK.
+        break;
+
+      case ArgumentMatch.none:
+      case ArgumentMatch.some:
+        allParams = false;
+        break;
+
+      default:
+        throw Exception('Unexpected match.');
+    }
+
+    record('Append super args', append ? 'Yes' : 'No');
+    record('Prepend super args', prepend ? 'Yes' : 'No');
+    record('Insert super args', insert ? 'Yes' : 'No');
+    record('Do not merge super args', noMerge ? 'Yes' : 'No');
+
+    var subName = _constructorName(node.name);
+    var superName = _constructorName(initializer.constructorName);
+
+    record('No explicit super(), call same name',
+        (allParams && superName == subName) ? 'Yes' : 'No');
+
+    record('No explicit super(), call unnamed',
+        (allParams && superName == '(unnamed)') ? 'Yes' : 'No');
+  }
+
+  String _constructorName(SimpleIdentifier? name) {
+    if (name == null) return '(unnamed)';
+    return name.name;
+  }
+
+  SuperConstructorInvocation? _findSuper(ConstructorDeclaration node) {
+    for (var initializer in node.initializers) {
+      if (initializer is SuperConstructorInvocation) {
+        return initializer;
+      }
+    }
+
+    return null;
+  }
+}
diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml
index 98d68d6..2ceeac0 100644
--- a/pkg/telemetry/pubspec.yaml
+++ b/pkg/telemetry/pubspec.yaml
@@ -7,12 +7,12 @@
   sdk: '>=2.12.0 <3.0.0'
 
 dependencies:
-  http: ^0.12.0
+  http: ^0.13.0
   meta:
     path: ../meta
   path: ^1.4.0
   stack_trace: ^1.7.0
-  usage: ^3.2.0+1
+  usage: ^4.0.0
 
 dev_dependencies:
   test: ^1.0.0
diff --git a/pkg/test_runner/bin/compare_results.dart b/pkg/test_runner/bin/compare_results.dart
new file mode 100755
index 0000000..39eb614
--- /dev/null
+++ b/pkg/test_runner/bin/compare_results.dart
@@ -0,0 +1,331 @@
+#!/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.
+
+// Compare the old and new test results and list tests that pass the filters.
+// The output contains additional details in the verbose mode. There is a human
+// readable mode that explains the results and how they changed.
+
+// @dart = 2.9
+
+import 'dart:collection';
+import 'dart:io';
+
+import 'package:args/args.dart';
+import 'package:test_runner/bot_results.dart';
+
+class Event {
+  final Result before;
+  final Result after;
+
+  Event(this.before, this.after);
+
+  bool get isNew => before == null;
+  bool get isNewPassing => before == null && after.matches;
+  bool get isNewFailing => before == null && !after.matches;
+  bool get changed => !unchanged;
+  bool get unchanged =>
+      before != null &&
+      before.outcome == after.outcome &&
+      before.expectation == after.expectation;
+  bool get remainedPassing => before.matches && after.matches;
+  bool get remainedFailing => !before.matches && !after.matches;
+  bool get flaked => after.flaked;
+  bool get fixed => !before.matches && after.matches;
+  bool get broke => before.matches && !after.matches;
+
+  String get description {
+    if (isNewPassing) {
+      return "is new and succeeded";
+    } else if (isNewFailing) {
+      return "is new and failed";
+    } else if (remainedPassing) {
+      return "succeeded again";
+    } else if (remainedFailing) {
+      return "failed again";
+    } else if (fixed) {
+      return "was fixed";
+    } else if (broke) {
+      return "broke";
+    } else {
+      throw Exception("Unreachable");
+    }
+  }
+}
+
+class Options {
+  Options(this._options);
+
+  final ArgResults _options;
+
+  bool get changed => _options["changed"] as bool;
+  int get count => _options["count"] is String
+      ? int.parse(_options["count"] as String)
+      : null;
+  String get flakinessData => _options["flakiness-data"] as String;
+  bool get help => _options["help"] as bool;
+  bool get human => _options["human"] as bool;
+  bool get judgement => _options["judgement"] as bool;
+  String get logs => _options["logs"] as String;
+  bool get logsOnly => _options["logs-only"] as bool;
+  Iterable<String> get statusFilter => ["passing", "flaky", "failing"]
+      .where((option) => _options[option] as bool);
+  bool get unchanged => _options["unchanged"] as bool;
+  bool get verbose => _options["verbose"] as bool;
+  List<String> get rest => _options.rest;
+}
+
+bool firstSection = true;
+
+bool search(
+    String description,
+    String searchForStatus,
+    List<Event> events,
+    Options options,
+    Map<String, Map<String, dynamic>> logs,
+    List<String> logSection) {
+  var judgement = false;
+  var beganSection = false;
+  var count = options.count;
+  final configurations =
+      events.map((event) => event.after.configuration).toSet();
+  for (final event in events) {
+    if (searchForStatus == "passing" &&
+        (event.after.flaked || !event.after.matches)) {
+      continue;
+    }
+    if (searchForStatus == "flaky" && !event.after.flaked) {
+      continue;
+    }
+    if (searchForStatus == "failing" &&
+        (event.after.flaked || event.after.matches)) {
+      continue;
+    }
+    if (options.unchanged && !event.unchanged) continue;
+    if (options.changed && !event.changed) continue;
+    if (!beganSection) {
+      if (options.human && !options.logsOnly) {
+        if (!firstSection) {
+          print("");
+        }
+        firstSection = false;
+        print("$description\n");
+      }
+    }
+    beganSection = true;
+    final before = event.before;
+    final after = event.after;
+    // The --flaky option is used to get a list of tests to deflake within a
+    // single named configuration. Therefore we can't right now always emit
+    // the configuration name, so only do it if there's more than one in the
+    // results being compared (that won't happen during deflaking.
+    final name =
+        configurations.length == 1 ? event.after.name : event.after.key;
+    if (!after.flaked && !after.matches) {
+      judgement = true;
+    }
+    if (count != null) {
+      if (--count <= 0) {
+        if (options.human) {
+          print("(And more)");
+        }
+        break;
+      }
+    }
+    String output;
+    if (options.verbose) {
+      if (options.human) {
+        final expect = after.matches ? "" : ", expected ${after.expectation}";
+        if (before == null || before.outcome == after.outcome) {
+          output = "$name ${event.description} "
+              "(${event.after.outcome}$expect)";
+        } else {
+          output = "$name ${event.description} "
+              "(${event.before?.outcome} -> ${event.after.outcome}$expect)";
+        }
+      } else {
+        output = "$name ${before?.outcome} ${after.outcome} "
+            "${before?.expectation} ${after.expectation} "
+            "${before?.matches} ${after.matches} "
+            "${before?.flaked} ${after.flaked}";
+      }
+    } else {
+      output = name;
+    }
+    final log = logs[event.after.key];
+    final bar = '=' * (output.length + 2);
+    if (log != null) {
+      logSection?.add("\n\n/$bar\\\n| $output |\n\\$bar/\n\n${log["log"]}");
+    }
+    if (!options.logsOnly) {
+      print(output);
+    }
+  }
+
+  return judgement;
+}
+
+main(List<String> args) async {
+  final parser = ArgParser();
+  parser.addFlag("changed",
+      abbr: 'c',
+      negatable: false,
+      help: "Show only tests that changed results.");
+  parser.addOption("count",
+      abbr: "C",
+      help: "Upper limit on how many tests to report in each section");
+  parser.addFlag("failing",
+      abbr: 'f', negatable: false, help: "Show failing tests.");
+  parser.addOption("flakiness-data",
+      abbr: 'd', help: "File containing flakiness data");
+  parser.addFlag("judgement",
+      abbr: 'j',
+      negatable: false,
+      help: "Exit 1 only if any of the filtered results failed.");
+  parser.addFlag("flaky",
+      abbr: 'F', negatable: false, help: "Show flaky tests.");
+  parser.addFlag("help", help: "Show the program usage.", negatable: false);
+  parser.addFlag("human", abbr: "h", negatable: false);
+  parser.addFlag("passing",
+      abbr: 'p', negatable: false, help: "Show passing tests.");
+  parser.addFlag("unchanged",
+      abbr: 'u',
+      negatable: false,
+      help: "Show only tests with unchanged results.");
+  parser.addFlag("verbose",
+      abbr: "v",
+      help: "Show the old and new result for each test",
+      negatable: false);
+  parser.addOption("logs",
+      abbr: "l", help: "Path to file holding logs of failing and flaky tests.");
+  parser.addFlag("logs-only",
+      help: "Only print logs of failing and flaky tests, no other output",
+      negatable: false);
+
+  final options = Options(parser.parse(args));
+  if (options.help) {
+    print("""
+Usage: compare_results.dart [OPTION]... BEFORE AFTER
+Compare the old and new test results and list tests that pass the filters.
+All tests are listed if no filters are given.
+
+The options are as follows:
+
+${parser.usage}""");
+    return;
+  }
+
+  if (options.changed && options.unchanged) {
+    print(
+        "error: The options --changed and --unchanged are mutually exclusive");
+    exitCode = 2;
+    return;
+  }
+
+  final parameters = options.rest;
+  if (parameters.length != 2) {
+    print("error: Expected two parameters "
+        "(results before, results after)");
+    exitCode = 2;
+    return;
+  }
+
+  // Load the input and the flakiness data if specified.
+  final before = await loadResultsMap(parameters[0]);
+  final after = await loadResultsMap(parameters[1]);
+  final logs = options.logs == null
+      ? <String, Map<String, dynamic>>{}
+      : await loadResultsMap(options.logs);
+  final flakinessData = options.flakinessData != null
+      ? await loadResultsMap(options.flakinessData)
+      : <String, Map<String, dynamic>>{};
+
+  // The names of every test that has a data point in the new data set.
+  final names = SplayTreeSet<String>.from(after.keys);
+
+  final events = <Event>[];
+  for (final name in names) {
+    final mapBefore = before[name];
+    final mapAfter = after[name];
+    final resultBefore = mapBefore != null
+        ? Result.fromMap(mapBefore, flakinessData[name])
+        : null;
+    final resultAfter = Result.fromMap(mapAfter, flakinessData[name]);
+    final event = Event(resultBefore, resultAfter);
+    events.add(event);
+  }
+
+  final filterDescriptions = {
+    "passing": {
+      "unchanged": "continued to pass",
+      "changed": "began passing",
+      null: "passed",
+    },
+    "flaky": {
+      "unchanged": "are known to flake but didn't",
+      "changed": "flaked",
+      null: "are known to flake",
+    },
+    "failing": {
+      "unchanged": "continued to fail",
+      "changed": "began failing",
+      null: "failed",
+    },
+    "any": {
+      "unchanged": "had the same result",
+      "changed": "changed result",
+      null: "ran",
+    },
+  };
+
+  final searchForStatuses = options.statusFilter;
+
+  // Report tests matching the filters.
+  final logSection = <String>[];
+  var judgement = false;
+  for (final searchForStatus
+      in searchForStatuses.isNotEmpty ? searchForStatuses : <String>["any"]) {
+    final searchForChanged = options.unchanged
+        ? "unchanged"
+        : options.changed
+            ? "changed"
+            : null;
+    final aboutStatus = filterDescriptions[searchForStatus][searchForChanged];
+    final sectionHeader = "The following tests $aboutStatus:";
+    final logSectionArg =
+        searchForStatus == "failing" || searchForStatus == "flaky"
+            ? logSection
+            : null;
+    final possibleJudgement = search(
+        sectionHeader, searchForStatus, events, options, logs, logSectionArg);
+    if (searchForStatus == null || searchForStatus == "failing") {
+      judgement = possibleJudgement;
+    }
+  }
+
+  if (logSection.isNotEmpty) {
+    print(logSection.join());
+  }
+  // Exit 1 only if --judgement and any test failed.
+  if (options.judgement) {
+    if (options.human && !options.logsOnly && !firstSection) {
+      print("");
+    }
+    var oldNew = options.unchanged
+        ? "old "
+        : options.changed
+            ? "new "
+            : "";
+    if (judgement) {
+      if (options.human && !options.logsOnly) {
+        print("There were ${oldNew}test failures.");
+      }
+      exitCode = 1;
+    } else {
+      if (options.human && !options.logsOnly) {
+        print("No ${oldNew}test failures were found.");
+      }
+    }
+  }
+}
diff --git a/pkg/test_runner/lib/src/browser_controller.dart b/pkg/test_runner/lib/src/browser_controller.dart
index 02289f4..2920dc1 100644
--- a/pkg/test_runner/lib/src/browser_controller.dart
+++ b/pkg/test_runner/lib/src/browser_controller.dart
@@ -4,7 +4,6 @@
 
 import 'dart:async';
 import 'dart:convert';
-import 'dart:core';
 import 'dart:io';
 import 'dart:math';
 
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index 0a4ddd9..cb968a9 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -725,7 +725,12 @@
         tempDir, arguments, environmentOverrides));
 
     commands.add(
-        computeDartBootstrapCommand(tempDir, arguments, environmentOverrides));
+        computeGenSnapshotCommand(tempDir, arguments, environmentOverrides));
+
+    if (arguments.contains('--print-flow-graph-optimized')) {
+      commands.add(
+          computeILCompareCommand(tempDir, arguments, environmentOverrides));
+    }
 
     if (!_configuration.keepGeneratedFiles) {
       commands.add(computeRemoveKernelFileCommand(
@@ -777,7 +782,7 @@
         alwaysCompile: !_useSdk);
   }
 
-  Command computeDartBootstrapCommand(String tempDir, List<String> arguments,
+  Command computeGenSnapshotCommand(String tempDir, List<String> arguments,
       Map<String, String> environmentOverrides) {
     var buildDir = _configuration.buildDirectory;
     var exec = _configuration.genSnapshotPath;
@@ -821,6 +826,8 @@
       // The SIMARM precompiler assumes support for integer division, but the
       // Qemu arm cpus do not support integer division.
       if (_configuration.useQemu) '--no-use-integer-division',
+      if (arguments.contains('--print-flow-graph-optimized'))
+        '--redirect-isolate-log-to=$tempDir/out.il',
       ..._replaceDartFiles(arguments, tempKernelFile(tempDir)),
     ];
 
@@ -829,6 +836,21 @@
         alwaysCompile: !_useSdk);
   }
 
+  Command computeILCompareCommand(String tempDir, List<String> arguments,
+      Map<String, String> environmentOverrides) {
+    var pkgVmDir = Platform.script.resolve('../../../pkg/vm').toFilePath();
+    var compareIl = '$pkgVmDir/tool/compare_il$shellScriptExtension';
+
+    var args = [
+      arguments.firstWhere((arg) => arg.endsWith('_il_test.dart')),
+      '$tempDir/out.il',
+    ];
+
+    return CompilationCommand('compare_il', tempDir, bootstrapDependencies(),
+        compareIl, args, environmentOverrides,
+        alwaysCompile: !_useSdk);
+  }
+
   static const String ndkPath = "third_party/android_tools/ndk";
   String get abiTriple => _isArm || _isArmX64
       ? "arm-linux-androideabi"
@@ -943,6 +965,10 @@
   List<String> computeCompilerArguments(
       TestFile testFile, List<String> vmOptions, List<String> args) {
     return [
+      if (testFile.ilMatches.isNotEmpty) ...[
+        '--print-flow-graph-optimized',
+        '--print-flow-graph-filter=${testFile.ilMatches.join(',')}'
+      ],
       if (_enableAsserts) '--enable_asserts',
       ...filterVmOptions(vmOptions),
       ...testFile.sharedOptions,
diff --git a/pkg/test_runner/lib/src/configuration.dart b/pkg/test_runner/lib/src/configuration.dart
index 12af614..bf842a4 100644
--- a/pkg/test_runner/lib/src/configuration.dart
+++ b/pkg/test_runner/lib/src/configuration.dart
@@ -412,9 +412,10 @@
             architecture == Architecture.x64 ||
             architecture == Architecture.arm ||
             architecture == Architecture.arm_x64 ||
-            architecture == Architecture.arm64)) {
+            architecture == Architecture.arm64 ||
+            architecture == Architecture.arm64c)) {
       print("Warning: Android only supports the following "
-          "architectures: ia32/x64/arm/arm64/arm_x64.");
+          "architectures: ia32/x64/arm/arm64/arm64c/arm_x64.");
       isValid = false;
     }
 
diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart
index 3df3675..ae9b857 100644
--- a/pkg/test_runner/lib/src/options.dart
+++ b/pkg/test_runner/lib/src/options.dart
@@ -90,6 +90,11 @@
 
 /// Parses command line arguments and produces a test runner configuration.
 class OptionsParser {
+  /// Allows tests to specify a custom test matrix.
+  final String _testMatrixFile;
+
+  OptionsParser([this._testMatrixFile = 'tools/bots/test_matrix.json']);
+
   static final List<_Option> _options = [
     _Option('mode', 'Mode in which to run the tests.',
         abbr: 'm', values: ['all', ...Mode.names]),
@@ -799,14 +804,15 @@
 
       if (configuration.validate()) {
         result.add(configuration);
+      } else if (namedConfiguration != null) {
+        _fail('The named configuration "$namedConfiguration" is invalid.');
       }
     }
 
     var namedConfigurationOption = data["named_configuration"] as String;
     if (namedConfigurationOption != null) {
       var namedConfigurations = namedConfigurationOption.split(',');
-      var testMatrixFile = "tools/bots/test_matrix.json";
-      var testMatrix = TestMatrix.fromPath(testMatrixFile);
+      var testMatrix = TestMatrix.fromPath(_testMatrixFile);
       for (var namedConfiguration in namedConfigurations) {
         var configuration = testMatrix.configurations.singleWhere(
             (c) => c.name == namedConfiguration,
@@ -820,7 +826,7 @@
               ' The following configurations are available:\n'
               '  * ${names.join('\n  * ')}');
         }
-        addConfiguration(configuration);
+        addConfiguration(configuration, namedConfiguration);
       }
       return result;
     }
diff --git a/pkg/test_runner/lib/src/test_file.dart b/pkg/test_runner/lib/src/test_file.dart
index 76faa68..8b61d68 100644
--- a/pkg/test_runner/lib/src/test_file.dart
+++ b/pkg/test_runner/lib/src/test_file.dart
@@ -211,6 +211,11 @@
       throw FormatException('Unknown feature "$name" in test $filePath');
     });
 
+    var ilMatches = filePath.endsWith('_il_test.dart')
+        ? _parseStringOption(filePath, contents, r'MatchIL\[AOT\]',
+            allowMultiple: true)
+        : const <String>[];
+
     // VM options.
     var vmOptions = <List<String>>[];
     var matches = _vmOptionsRegExp.allMatches(contents);
@@ -335,7 +340,8 @@
         vmOptions: vmOptions,
         sharedObjects: sharedObjects,
         otherResources: otherResources,
-        experiments: experiments);
+        experiments: experiments,
+        ilMatches: ilMatches);
   }
 
   /// A special fake test file for representing a VM unit test written in C++.
@@ -357,6 +363,7 @@
         sharedObjects = [],
         otherResources = [],
         experiments = [],
+        ilMatches = [],
         super(null, null, []);
 
   TestFile._(Path suiteDirectory, Path path, List<StaticError> expectedErrors,
@@ -376,7 +383,8 @@
       this.vmOptions,
       this.sharedObjects,
       this.otherResources,
-      this.experiments})
+      this.experiments,
+      this.ilMatches = const <String>[]})
       : super(suiteDirectory, path, expectedErrors) {
     assert(!isMultitest || dartOptions.isEmpty);
   }
@@ -403,6 +411,9 @@
   /// requirements, the test is implicitly skipped.
   final List<Feature> requirements;
 
+  /// List of functions which will have their IL verified (in AOT mode).
+  final List<String> ilMatches;
+
   final List<String> sharedOptions;
   final List<String> dartOptions;
   final List<String> dart2jsOptions;
@@ -482,6 +493,7 @@
   String get packages => _origin.packages;
 
   List<Feature> get requirements => _origin.requirements;
+  List<String> get ilMatches => _origin.ilMatches;
   List<String> get dart2jsOptions => _origin.dart2jsOptions;
   List<String> get dartOptions => _origin.dartOptions;
   List<String> get ddcOptions => _origin.ddcOptions;
diff --git a/pkg/test_runner/lib/src/test_suite.dart b/pkg/test_runner/lib/src/test_suite.dart
index 9a2dd15..f926645 100644
--- a/pkg/test_runner/lib/src/test_suite.dart
+++ b/pkg/test_runner/lib/src/test_suite.dart
@@ -336,6 +336,7 @@
       if (expectations.contains(Expectation.crash)) '--suppress-core-dump',
       if (configuration.experiments.isNotEmpty)
         '--enable-experiment=${configuration.experiments.join(",")}',
+      if (configuration.nnbdMode == NnbdMode.strong) '--sound-null-safety',
       ...configuration.standardOptions,
       ...configuration.vmOptions,
       test.name
diff --git a/pkg/test_runner/test/compare_results/compare_results_test.dart b/pkg/test_runner/test/compare_results/compare_results_test.dart
new file mode 100644
index 0000000..414ac6f
--- /dev/null
+++ b/pkg/test_runner/test/compare_results/compare_results_test.dart
@@ -0,0 +1,205 @@
+// 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 that compare results works as expected.
+
+// @dart = 2.9
+
+import 'package:expect/expect.dart';
+import 'package:test_runner/bot_results.dart';
+import '../../bin/compare_results.dart';
+
+void main() {
+  testEvent();
+}
+
+void testEvent() {
+  var passingResult = _result();
+  var sameResult = Event(passingResult, passingResult);
+  _expectEvent(sameResult,
+      isNew: false,
+      isNewPassing: false,
+      isNewFailing: false,
+      changed: false,
+      unchanged: true,
+      remainedPassing: true,
+      remainedFailing: false,
+      fixed: false,
+      broke: false,
+      description: 'succeeded again');
+
+  var failingResult =
+      _result(matches: false, outcome: 'Fail', previousOutcome: 'Fail');
+  var sameFailingResult = Event(failingResult, failingResult);
+  _expectEvent(sameFailingResult,
+      isNew: false,
+      isNewPassing: false,
+      isNewFailing: false,
+      changed: false,
+      unchanged: true,
+      remainedPassing: false,
+      remainedFailing: true,
+      fixed: false,
+      broke: false,
+      description: 'failed again');
+
+  var regression = Event(passingResult, failingResult);
+  _expectEvent(regression,
+      isNew: false,
+      isNewPassing: false,
+      isNewFailing: false,
+      changed: true,
+      unchanged: false,
+      remainedPassing: false,
+      remainedFailing: false,
+      fixed: false,
+      broke: true,
+      description: 'broke');
+
+  var differentFailingResult =
+      _result(matches: false, outcome: 'Error', previousOutcome: 'Error');
+  var differentFailure = Event(failingResult, differentFailingResult);
+  _expectEvent(differentFailure,
+      isNew: false,
+      isNewPassing: false,
+      isNewFailing: false,
+      changed: true,
+      unchanged: false,
+      remainedPassing: false,
+      remainedFailing: true,
+      fixed: false,
+      broke: false,
+      description: 'failed again');
+
+  var fixed = Event(failingResult, passingResult);
+  _expectEvent(fixed,
+      isNew: false,
+      isNewPassing: false,
+      isNewFailing: false,
+      changed: true,
+      unchanged: false,
+      remainedPassing: false,
+      remainedFailing: false,
+      fixed: true,
+      broke: false,
+      description: 'was fixed');
+
+  var newPass = Event(null, passingResult);
+  _expectEvent(newPass,
+      isNew: true,
+      isNewPassing: true,
+      isNewFailing: false,
+      changed: true,
+      unchanged: false,
+      description: 'is new and succeeded');
+
+  var newFailure = Event(null, failingResult);
+  _expectEvent(newFailure,
+      isNew: true,
+      isNewPassing: false,
+      isNewFailing: true,
+      changed: true,
+      unchanged: false,
+      description: 'is new and failed');
+
+  var flakyResult = _result(flaked: true);
+  var becameFlaky = Event(passingResult, flakyResult);
+  _expectEvent(becameFlaky, flaked: true);
+
+  var noLongerFlaky = Event(flakyResult, passingResult);
+  _expectEvent(noLongerFlaky, flaked: false);
+
+  var failingExpectedToFailResult = _result(
+      matches: true,
+      outcome: 'Fail',
+      previousOutcome: 'Fail',
+      expectation: 'Fail');
+  var nowMeetingExpectation = Event(failingResult, failingExpectedToFailResult);
+  _expectEvent(nowMeetingExpectation,
+      changed: true,
+      unchanged: false,
+      remainedPassing: false,
+      remainedFailing: false,
+      broke: false,
+      description: 'was fixed');
+
+  var passingExpectedToFailResult = _result(
+      matches: false,
+      outcome: 'Pass',
+      previousOutcome: 'Pass',
+      expectation: 'Fail');
+  var noLongerMeetingExpectation =
+      Event(passingResult, passingExpectedToFailResult);
+  _expectEvent(noLongerMeetingExpectation,
+      changed: true,
+      unchanged: false,
+      remainedPassing: false,
+      remainedFailing: false,
+      broke: true,
+      description: 'broke');
+}
+
+void _expectEvent(Event actual,
+    {bool isNew,
+    bool isNewPassing,
+    bool isNewFailing,
+    bool changed,
+    bool unchanged,
+    bool remainedPassing,
+    bool remainedFailing,
+    bool flaked,
+    bool fixed,
+    bool broke,
+    String description}) {
+  if (isNew != null) {
+    Expect.equals(isNew, actual.isNew, 'isNew mismatch');
+  }
+  if (isNewPassing != null) {
+    Expect.equals(isNewPassing, actual.isNewPassing, 'isNewPassing mismatch');
+  }
+  if (isNewFailing != null) {
+    Expect.equals(isNewFailing, actual.isNewFailing, 'isNewFailing mismatch');
+  }
+  if (changed != null) {
+    Expect.equals(changed, actual.changed, 'changed mismatch');
+  }
+  if (unchanged != null) {
+    Expect.equals(unchanged, actual.unchanged, 'unchanged mismatch');
+  }
+  if (remainedPassing != null) {
+    Expect.equals(
+        remainedPassing, actual.remainedPassing, 'remainedPassing mismatch');
+  }
+  if (remainedFailing != null) {
+    Expect.equals(
+        remainedFailing, actual.remainedFailing, 'remainedFailing mismatch');
+  }
+  if (flaked != null) {
+    Expect.equals(flaked, actual.flaked, 'flaked mismatch');
+  }
+  if (fixed != null) {
+    Expect.equals(fixed, actual.fixed, 'fixed mismatch');
+  }
+  if (broke != null) {
+    Expect.equals(broke, actual.broke, 'broke mismatch');
+  }
+  if (description != null) {
+    Expect.equals(description, actual.description, 'description mismatch');
+  }
+}
+
+Result _result(
+    {String configuration = 'config',
+    String expectation = 'Pass',
+    bool matches = true,
+    String name = 'test1',
+    String outcome = 'Pass',
+    bool changed = false,
+    String commitHash = 'abcdabcd',
+    bool flaked = false,
+    bool isFlaky = false,
+    String previousOutcome = 'Pass'}) {
+  return Result(configuration, name, outcome, expectation, matches, changed,
+      commitHash, isFlaky, previousOutcome, flaked);
+}
diff --git a/pkg/test_runner/test/options_test.dart b/pkg/test_runner/test/options_test.dart
index cf1b98e..147c3e1 100644
--- a/pkg/test_runner/test/options_test.dart
+++ b/pkg/test_runner/test/options_test.dart
@@ -28,6 +28,10 @@
 
   var configuration = parseConfiguration(['--nnbd=weak']);
   Expect.equals(NnbdMode.weak, configuration.nnbdMode);
+
+  // Filter invalid configurations when not passing a named configuration.
+  configurations = parseConfigurations(['--arch=simarm', '--system=android']);
+  Expect.isEmpty(configurations);
 }
 
 void testValidation() {
@@ -48,6 +52,10 @@
   // Don't allow multiple.
   expectValidationError(['--nnbd=weak,strong'],
       'Only a single value is allowed for option "--nnbd".');
+
+  // Don't allow invalid named configurations.
+  expectValidationError(['-ninvalid-vm-android-simarm'],
+      'The named configuration "invalid-vm-android-simarm" is invalid.');
 }
 
 TestConfiguration parseConfiguration(List<String> arguments) {
@@ -57,7 +65,7 @@
 }
 
 List<TestConfiguration> parseConfigurations(List<String> arguments) {
-  var parser = OptionsParser();
+  var parser = OptionsParser('pkg/test_runner/test/test_matrix.json');
   var configurations = parser.parse(arguments);
 
   // By default, without an explicit selector, you get two configurations, one
@@ -70,7 +78,7 @@
 
 void expectValidationError(List<String> arguments, String error) {
   try {
-    OptionsParser().parse(arguments);
+    OptionsParser('pkg/test_runner/test/test_matrix.json').parse(arguments);
     Expect.fail('Should have thrown an exception, but did not.');
   } on OptionParseException catch (exception) {
     Expect.equals(error, exception.message);
diff --git a/pkg/test_runner/test/test_matrix.json b/pkg/test_runner/test/test_matrix.json
new file mode 100644
index 0000000..778f215
--- /dev/null
+++ b/pkg/test_runner/test/test_matrix.json
@@ -0,0 +1,5 @@
+{
+  "configurations": {
+    "invalid-vm-android-simarm": {}
+  }
+}
\ No newline at end of file
diff --git a/pkg/vm/bin/compare_il.dart b/pkg/vm/bin/compare_il.dart
new file mode 100644
index 0000000..9d9febd
--- /dev/null
+++ b/pkg/vm/bin/compare_il.dart
@@ -0,0 +1,189 @@
+// 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.
+
+// This is a helper script which performs IL matching for AOT IL tests.
+// See runtime/docs/infra/il_tests.md for more information.
+
+import 'dart:io';
+
+void main(List<String> args) {
+  if (args.length != 2) {
+    throw 'Usage: compare_il <*_il_test.dart> <output.il>';
+  }
+
+  final testFile = args[0];
+  final ilFile = args[1];
+
+  final graphs = _extractGraphs(ilFile);
+
+  final expectations = _extractExpectations(testFile);
+
+  for (var expectation in expectations.entries) {
+    // Find a graph for this expectation. We expect that function names are
+    // unique enough to identify a specific graph.
+    final graph =
+        graphs.entries.singleWhere((e) => e.key.contains(expectation.key));
+
+    // Extract the list of opcodes, ignoring irrelevant things like
+    // ParallelMove.
+    final gotOpcodesIgnoringMoves = graph.value
+        .where((instr) => instr.opcode != 'ParallelMove')
+        .map((instr) => instr.opcode)
+        .toList();
+
+    // Check that expectations are the prefix of gotOpcodesIgnoringMoves.
+    print('Matching ${graph.key}');
+    for (var i = 0; i < expectation.value.length; i++) {
+      final gotOpcode = gotOpcodesIgnoringMoves[i];
+      final expectedOpcode = expectation.value[i];
+      if (gotOpcode != expectedOpcode) {
+        throw 'Failed to match graph of ${graph.key} to '
+            'expectations for ${expectation.key} at instruction ${i}: '
+            'got ${gotOpcode} expected ${expectedOpcode}';
+      }
+    }
+    print('... ok');
+  }
+
+  exit(0); // Success.
+}
+
+// IL instruction extracted from flow graph dump.
+class Instruction {
+  final String raw;
+
+  Instruction(this.raw);
+
+  String get opcode {
+    final match = instructionPattern.firstMatch(raw)!;
+    final op = match.namedGroup('opcode')!;
+    final blockType = match.namedGroup('block_type');
+
+    // Handle blocks which look like "B%d[%s]".
+    if (blockType != null) {
+      return blockTypes[blockType]!;
+    }
+
+    // Handle parallel moves specially.
+    if (op.startsWith('ParallelMove')) {
+      return 'ParallelMove';
+    }
+
+    // Handle branches.
+    if (op.startsWith(branchIfPrefix)) {
+      return 'Branch(${op.substring(branchIfPrefix.length)})';
+    }
+
+    // Normal instruction.
+    return op;
+  }
+
+  @override
+  String toString() => 'Instruction($opcode)';
+
+  static final instructionPattern = RegExp(
+      r'^\s*\d+:\s+(v\d+ <- )?(?<opcode>[^:[(]+(?<block_type>\[[\w ]+\])?)');
+
+  static const blockTypes = {
+    '[join]': 'JoinEntry',
+    '[target]': 'TargetEntry',
+    '[graph]': 'GraphEntry',
+    '[function entry]': 'FunctionEntry'
+  };
+
+  static const branchIfPrefix = 'Branch if ';
+}
+
+Map<String, List<Instruction>> _extractGraphs(String ilFile) {
+  final graphs = <String, List<Instruction>>{};
+
+  final reader = LineReader(ilFile);
+
+  var instructions = <Instruction>[];
+  while (reader.hasMore) {
+    if (reader.testNext('*** BEGIN CFG')) {
+      reader.next(); // Skip phase name.
+      final functionName = reader.next();
+      while (!reader.testNext('*** END CFG')) {
+        var curr = reader.next();
+
+        // If instruction line ends with '{' search for a matching '}' (it will
+        // be on its own line).
+        if (curr.endsWith('{')) {
+          do {
+            curr += '\n' + reader.current;
+          } while (reader.next() != '}');
+        }
+
+        instructions.add(Instruction(curr));
+      }
+
+      graphs[functionName] = instructions;
+      instructions = <Instruction>[];
+    } else {
+      reader.next();
+    }
+  }
+
+  return graphs;
+}
+
+Map<String, List<String>> _extractExpectations(String testFile) {
+  final expectations = <String, List<String>>{};
+
+  final reader = LineReader(testFile);
+
+  final matchILPattern = RegExp(r'^// MatchIL\[AOT\]=(?<value>.*)$');
+  final matcherPattern = RegExp(r'^// __ (?<value>.*)$');
+
+  var matchers = <String>[];
+  while (reader.hasMore) {
+    var functionName = reader.matchNext(matchILPattern);
+    if (functionName != null) {
+      // Read comment block which follows `// MatchIL[AOT]=...`.
+      while (reader.hasMore && reader.current.startsWith('//')) {
+        final match = matcherPattern.firstMatch(reader.next());
+        if (match != null) {
+          matchers.add(match.namedGroup('value')!);
+        }
+      }
+      expectations[functionName] = matchers;
+      matchers = <String>[];
+    } else {
+      reader.next();
+    }
+  }
+
+  return expectations;
+}
+
+class LineReader {
+  final List<String> lines;
+  int lineno = 0;
+
+  LineReader(String path) : lines = File(path).readAsLinesSync();
+
+  String get current => lines[lineno];
+
+  bool get hasMore => lineno < lines.length;
+
+  String next() {
+    final curr = current;
+    lineno++;
+    return curr;
+  }
+
+  bool testNext(String expected) {
+    if (current == expected) {
+      next();
+      return true;
+    }
+    return false;
+  }
+
+  String? matchNext(RegExp pattern) {
+    final m = pattern.firstMatch(current);
+    return m?.namedGroup('value');
+  }
+}
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index e3a221e..8854910 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -501,12 +501,13 @@
   final List<String> typeDefinitions = request[6].cast<String>();
   final String libraryUri = request[7];
   final String? klass = request[8];
-  final bool isStatic = request[9];
-  final List<List<int>> dillData = request[10].cast<List<int>>();
-  final int blobLoadCount = request[11];
-  final bool enableAsserts = request[12];
+  final String? method = request[9];
+  final bool isStatic = request[10];
+  final List<List<int>> dillData = request[11].cast<List<int>>();
+  final int blobLoadCount = request[12];
+  final bool enableAsserts = request[13];
   final List<String>? experimentalFlags =
-      request[13] != null ? request[13].cast<String>() : null;
+      request[14] != null ? request[14].cast<String>() : null;
 
   IncrementalCompilerWrapper? compiler = isolateCompilers[isolateGroupId];
 
@@ -618,7 +619,13 @@
   CompilationResult result;
   try {
     Procedure? procedure = await compiler.generator!.compileExpression(
-        expression, definitions, typeDefinitions, libraryUri, klass, isStatic);
+        expression,
+        definitions,
+        typeDefinitions,
+        libraryUri,
+        klass,
+        method,
+        isStatic);
 
     if (procedure == null) {
       port.send(
diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart
index a8d3271..3ad1270 100644
--- a/pkg/vm/lib/incremental_compiler.dart
+++ b/pkg/vm/lib/incremental_compiler.dart
@@ -188,11 +188,14 @@
       List<String> typeDefinitions,
       String libraryUri,
       String? klass,
+      String? method,
       bool isStatic) {
     Map<String, DartType> completeDefinitions = {};
-    for (String name in definitions) {
-      if (!isLegalIdentifier(name)) continue;
-      completeDefinitions[name] = new DynamicType();
+    for (int i = 0; i < definitions.length; i++) {
+      String name = definitions[i];
+      if (isLegalIdentifier(name) || (i == 0 && isExtensionThisName(name))) {
+        completeDefinitions[name] = new DynamicType();
+      }
     }
 
     List<TypeParameter> typeParameters = [];
@@ -204,6 +207,7 @@
     Uri library = Uri.parse(libraryUri);
 
     return _generator.compileExpression(expression, completeDefinitions,
-        typeParameters, kDebugProcedureName, library, klass, isStatic);
+        typeParameters, kDebugProcedureName, library,
+        className: klass, methodName: method, isStatic: isStatic);
   }
 }
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 5847891..b788180 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -14,8 +14,6 @@
 import 'package:kernel/transformations/continuation.dart' as transformAsync
     show transformLibraries, transformProcedure;
 import 'package:kernel/type_environment.dart';
-import 'package:kernel/vm/constants_native_effects.dart'
-    show VmConstantsBackend;
 
 import '../transformations/call_site_annotator.dart' as callSiteAnnotator;
 import '../transformations/lowering.dart' as lowering
@@ -34,8 +32,10 @@
 
   Class? _growableList;
   Class? _immutableList;
+  Class? _internalImmutableLinkedHashMap;
+  Class? _internalImmutableLinkedHashSet;
   Class? _internalLinkedHashMap;
-  Class? _immutableMap;
+  Class? _internalLinkedHashSet;
   Class? _oneByteString;
   Class? _twoByteString;
   Class? _smi;
@@ -439,8 +439,20 @@
 
   @override
   Class concreteConstMapLiteralClass(CoreTypes coreTypes) {
-    return _immutableMap ??=
-        coreTypes.index.getClass('dart:core', '_ImmutableMap');
+    return _internalImmutableLinkedHashMap ??= coreTypes.index
+        .getClass('dart:collection', '_InternalImmutableLinkedHashMap');
+  }
+
+  @override
+  Class concreteSetLiteralClass(CoreTypes coreTypes) {
+    return _internalLinkedHashSet ??=
+        coreTypes.index.getClass('dart:collection', '_CompactLinkedHashSet');
+  }
+
+  @override
+  Class concreteConstSetLiteralClass(CoreTypes coreTypes) {
+    return _internalImmutableLinkedHashSet ??= coreTypes.index
+        .getClass('dart:collection', '_CompactImmutableLinkedHashSet');
   }
 
   @override
@@ -476,8 +488,7 @@
   }
 
   @override
-  ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      new VmConstantsBackend(coreTypes);
+  ConstantsBackend get constantsBackend => const ConstantsBackend();
 
   @override
   Map<String, String> updateEnvironmentDefines(Map<String, String> map) {
diff --git a/pkg/vm/lib/transformations/call_site_annotator.dart b/pkg/vm/lib/transformations/call_site_annotator.dart
index 691ba84..e0267ca 100644
--- a/pkg/vm/lib/transformations/call_site_annotator.dart
+++ b/pkg/vm/lib/transformations/call_site_annotator.dart
@@ -110,7 +110,7 @@
   /// Return [true] if the given list of [VariableDeclaration] contains
   /// any annotated with generic-covariant-impl.
   static bool containsGenericCovariantImpl(List<VariableDeclaration> decls) =>
-      decls.any((p) => p.isGenericCovariantImpl);
+      decls.any((p) => p.isCovariantByClass);
 
   /// Returns [true] if the given [member] has any parameters annotated with
   /// generic-covariant-impl attribute.
@@ -120,7 +120,7 @@
               member.function.positionalParameters) ||
           containsGenericCovariantImpl(member.function.namedParameters);
     } else if (member is Field) {
-      return member.isGenericCovariantImpl;
+      return member.isCovariantByClass;
     }
 
     return false;
diff --git a/pkg/vm/lib/transformations/ffi.dart b/pkg/vm/lib/transformations/ffi.dart
index 88edf51..25e2ac8 100644
--- a/pkg/vm/lib/transformations/ffi.dart
+++ b/pkg/vm/lib/transformations/ffi.dart
@@ -234,6 +234,8 @@
   final Class compoundClass;
   final Class structClass;
   final Class unionClass;
+  final Class ffiNativeClass;
+  final Class nativeFieldWrapperClass;
   final Class ffiStructLayoutClass;
   final Field ffiStructLayoutTypesField;
   final Field ffiStructLayoutPackingField;
@@ -286,6 +288,12 @@
   final Procedure allocationTearoff;
   final Procedure asFunctionTearoff;
   final Procedure lookupFunctionTearoff;
+  final Procedure getNativeFieldFunction;
+  final Procedure reachabilityFenceFunction;
+
+  late final DartType nativeFieldWrapperClassType;
+  late final DartType voidType;
+  late final DartType pointerType;
 
   /// Classes corresponding to [NativeType], indexed by [NativeType].
   final List<Class> nativeTypesClasses;
@@ -297,7 +305,7 @@
 
   FfiTransformer(this.index, this.coreTypes, this.hierarchy,
       this.diagnosticReporter, this.referenceFromIndex)
-      : env = new TypeEnvironment(coreTypes, hierarchy),
+      : env = TypeEnvironment(coreTypes, hierarchy),
         objectClass = coreTypes.objectClass,
         intClass = coreTypes.intClass,
         doubleClass = coreTypes.doubleClass,
@@ -346,6 +354,9 @@
         compoundClass = index.getClass('dart:ffi', '_Compound'),
         structClass = index.getClass('dart:ffi', 'Struct'),
         unionClass = index.getClass('dart:ffi', 'Union'),
+        ffiNativeClass = index.getClass('dart:ffi', 'FfiNative'),
+        nativeFieldWrapperClass =
+            index.getClass('dart:nativewrappers', 'NativeFieldWrapperClass1'),
         ffiStructLayoutClass = index.getClass('dart:ffi', '_FfiStructLayout'),
         ffiStructLayoutTypesField =
             index.getField('dart:ffi', '_FfiStructLayout', 'fieldTypes'),
@@ -455,7 +466,18 @@
         lookupFunctionTearoff = index.getProcedure(
             'dart:ffi',
             'DynamicLibraryExtension',
-            LibraryIndex.tearoffPrefix + 'lookupFunction');
+            LibraryIndex.tearoffPrefix + 'lookupFunction'),
+        getNativeFieldFunction = index.getTopLevelProcedure(
+            'dart:nativewrappers', '_getNativeField'),
+        reachabilityFenceFunction =
+            index.getTopLevelProcedure('dart:_internal', 'reachabilityFence') {
+    nativeFieldWrapperClassType =
+        nativeFieldWrapperClass.getThisType(coreTypes, Nullability.nonNullable);
+    voidType = nativeTypesClasses[NativeType.kVoid.index]
+        .getThisType(coreTypes, Nullability.nonNullable);
+    pointerType =
+        InterfaceType(pointerClass, Nullability.nonNullable, [voidType]);
+  }
 
   @override
   TreeNode visitLibrary(Library node) {
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index 2238251..b0aa9a5 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -69,9 +69,14 @@
     DiagnosticReporter diagnosticReporter,
     ReferenceFromIndex? referenceFromIndex,
     ChangedStructureNotifier? changedStructureNotifier) {
-  final LibraryIndex index = LibraryIndex(component,
-      const ["dart:core", "dart:ffi", "dart:_internal", "dart:typed_data"]);
-  if (!index.containsLibrary("dart:ffi")) {
+  final LibraryIndex index = LibraryIndex(component, const [
+    'dart:core',
+    'dart:ffi',
+    'dart:_internal',
+    'dart:typed_data',
+    'dart:nativewrappers'
+  ]);
+  if (!index.containsLibrary('dart:ffi')) {
     // TODO: This check doesn't make sense: "dart:ffi" is always loaded/created
     // for the VM target.
     // If dart:ffi is not loaded, do not do the transformation.
@@ -691,9 +696,9 @@
         final constant = annotation.constant;
         if (constant is InstanceConstant &&
             constant.classNode == pragmaClass &&
-            constant.fieldValues[pragmaName.getterReference] ==
+            constant.fieldValues[pragmaName.fieldReference] ==
                 StringConstant(vmFfiStructFields)) {
-          return constant.fieldValues[pragmaOptions.getterReference]
+          return constant.fieldValues[pragmaOptions.fieldReference]
               as InstanceConstant?;
         }
       }
@@ -703,7 +708,7 @@
 
   Set<Class> _compoundAnnotatedDependencies(InstanceConstant layoutConstant) {
     final fieldTypes = layoutConstant
-        .fieldValues[ffiStructLayoutTypesField.getterReference] as ListConstant;
+        .fieldValues[ffiStructLayoutTypesField.fieldReference] as ListConstant;
     final result = <Class>{};
     for (final fieldType in fieldTypes.entries) {
       if (fieldType is TypeLiteralConstant) {
@@ -721,7 +726,7 @@
   CompoundNativeTypeCfe _compoundAnnotatedNativeTypeCfe(Class compoundClass) {
     final layoutConstant = _compoundAnnotatedFields(compoundClass)!;
     final fieldTypes = layoutConstant
-        .fieldValues[ffiStructLayoutTypesField.getterReference] as ListConstant;
+        .fieldValues[ffiStructLayoutTypesField.fieldReference] as ListConstant;
     final members = <NativeTypeCfe>[];
     for (final fieldType in fieldTypes.entries) {
       if (fieldType is TypeLiteralConstant) {
@@ -729,14 +734,14 @@
         members
             .add(NativeTypeCfe(this, dartType, compoundCache: compoundCache));
       } else if (fieldType is InstanceConstant) {
-        final singleElementConstant = fieldType
-                .fieldValues[ffiInlineArrayElementTypeField.getterReference]
-            as TypeLiteralConstant;
+        final singleElementConstant =
+            fieldType.fieldValues[ffiInlineArrayElementTypeField.fieldReference]
+                as TypeLiteralConstant;
         final singleElementType = NativeTypeCfe(
             this, singleElementConstant.type,
             compoundCache: compoundCache);
         final arrayLengthConstant =
-            fieldType.fieldValues[ffiInlineArrayLengthField.getterReference]
+            fieldType.fieldValues[ffiInlineArrayLengthField.fieldReference]
                 as IntConstant;
         final arrayLength = arrayLengthConstant.value;
         members.add(ArrayNativeTypeCfe(singleElementType, arrayLength));
@@ -744,7 +749,7 @@
     }
     if (compoundClass.superclass == structClass) {
       final packingConstant = layoutConstant
-          .fieldValues[ffiStructLayoutPackingField.getterReference];
+          .fieldValues[ffiStructLayoutPackingField.fieldReference];
       if (packingConstant is IntConstant) {
         return StructNativeTypeCfe(compoundClass, members,
             packing: packingConstant.value);
@@ -762,12 +767,12 @@
 
     node.addAnnotation(ConstantExpression(
         InstanceConstant(pragmaClass.reference, [], {
-          pragmaName.getterReference: StringConstant(vmFfiStructFields),
-          pragmaOptions.getterReference:
+          pragmaName.fieldReference: StringConstant(vmFfiStructFields),
+          pragmaOptions.fieldReference:
               InstanceConstant(ffiStructLayoutClass.reference, [], {
-            ffiStructLayoutTypesField.getterReference: ListConstant(
+            ffiStructLayoutTypesField.fieldReference: ListConstant(
                 InterfaceType(typeClass, Nullability.nonNullable), constants),
-            ffiStructLayoutPackingField.getterReference:
+            ffiStructLayoutPackingField.fieldReference:
                 packing == null ? NullConstant() : IntConstant(packing)
           })
         }),
@@ -845,8 +850,8 @@
       ..isNonNullableByDefault = true
       ..addAnnotation(ConstantExpression(
           InstanceConstant(pragmaClass.reference, /*type_arguments=*/ [], {
-        pragmaName.getterReference: StringConstant("vm:prefer-inline"),
-        pragmaOptions.getterReference: NullConstant(),
+        pragmaName.fieldReference: StringConstant("vm:prefer-inline"),
+        pragmaOptions.fieldReference: NullConstant(),
       })));
 
     compound.addProcedure(getter);
@@ -882,7 +887,7 @@
 
   List<int> _arraySize(InstanceConstant constant) {
     final dimensions =
-        constant.fieldValues[arraySizeDimensionsField.getterReference];
+        constant.fieldValues[arraySizeDimensionsField.fieldReference];
     if (dimensions != null) {
       if (dimensions is ListConstant) {
         final result = dimensions.entries
@@ -900,7 +905,7 @@
       arraySizeDimension5Field
     ];
     final result = dimensionFields
-        .map((f) => constant.fieldValues[f.getterReference])
+        .map((f) => constant.fieldValues[f.fieldReference])
         .whereType<IntConstant>()
         .map((c) => c.value)
         .toList();
@@ -1409,9 +1414,9 @@
   @override
   Constant generateConstant(FfiTransformer transformer) =>
       InstanceConstant(transformer.ffiInlineArrayClass.reference, [], {
-        transformer.ffiInlineArrayElementTypeField.getterReference:
+        transformer.ffiInlineArrayElementTypeField.fieldReference:
             singleElementType.generateConstant(transformer),
-        transformer.ffiInlineArrayLengthField.getterReference:
+        transformer.ffiInlineArrayLengthField.fieldReference:
             IntConstant(dimensionsFlattened)
       });
 
diff --git a/pkg/vm/lib/transformations/ffi_native.dart b/pkg/vm/lib/transformations/ffi_native.dart
index ff405f8..0752ed2 100644
--- a/pkg/vm/lib/transformations/ffi_native.dart
+++ b/pkg/vm/lib/transformations/ffi_native.dart
@@ -94,30 +94,34 @@
     assert(currentLibrary != null);
     final params = node.function.positionalParameters;
     final functionName = annotationConst
-        .fieldValues[ffiNativeNameField.getterReference] as StringConstant;
+        .fieldValues[ffiNativeNameField.fieldReference] as StringConstant;
     final isLeaf = annotationConst
-        .fieldValues[ffiNativeIsLeafField.getterReference] as BoolConstant;
+        .fieldValues[ffiNativeIsLeafField.fieldReference] as BoolConstant;
 
     // double Function(double)
     final DartType dartType =
         node.function.computeThisFunctionType(Nullability.nonNullable);
     // Double Function(Double)
-    final nativeType = annotationConst.typeArguments[0];
+    final nativeType = annotationConst.typeArguments[0] as FunctionType;
     // InterfaceType(NativeFunction<Double Function(Double)>*)
     final DartType nativeInterfaceType =
         InterfaceType(nativeFunctionClass, Nullability.legacy, [nativeType]);
 
+    // Derive number of arguments from the native function signature.
+    final args_n = nativeType.positionalParameters.length;
+
     // TODO(dartbug.com/31579): Add `..fileOffset`s once we can handle these in
     // patch files.
 
-    // _ffi_resolver('dart:math', 'Math_sqrt')
+    // _ffi_resolver('dart:math', 'Math_sqrt', 1)
     final resolverInvocation = FunctionInvocation(
         FunctionAccessKind.FunctionType,
         StaticGet(resolverField),
         Arguments([
           ConstantExpression(
               StringConstant(currentLibrary!.importUri.toString())),
-          ConstantExpression(functionName)
+          ConstantExpression(functionName),
+          ConstantExpression(IntConstant(args_n)),
         ]),
         functionType: resolverField.type as FunctionType);
 
@@ -151,7 +155,7 @@
       parent.addField(funcPtrField);
     } else {
       throw 'Unexpected parent of @FfiNative function. '
-        'Expected Class or Library, but found ${parent}.';
+          'Expected Class or Library, but found ${parent}.';
     }
 
     // _@FfiNative__square_root(x)
diff --git a/pkg/vm/lib/transformations/ffi_use_sites.dart b/pkg/vm/lib/transformations/ffi_use_sites.dart
index 49281ed..a90f1ec 100644
--- a/pkg/vm/lib/transformations/ffi_use_sites.dart
+++ b/pkg/vm/lib/transformations/ffi_use_sites.dart
@@ -43,8 +43,8 @@
     List<Library> libraries,
     DiagnosticReporter diagnosticReporter,
     ReferenceFromIndex? referenceFromIndex) {
-  final index = new LibraryIndex(
-      component, ["dart:ffi", "dart:_internal", "dart:typed_data"]);
+  final index = LibraryIndex(component,
+      ["dart:ffi", "dart:_internal", "dart:typed_data", "dart:nativewrappers"]);
   if (!index.containsLibrary("dart:ffi")) {
     // TODO: This check doesn't make sense: "dart:ffi" is always loaded/created
     // for the VM target.
@@ -77,7 +77,7 @@
       DiagnosticReporter diagnosticReporter,
       ReferenceFromIndex? referenceFromIndex)
       : super(index, coreTypes, hierarchy, diagnosticReporter,
-            referenceFromIndex) {}
+            referenceFromIndex);
 
   @override
   TreeNode visitLibrary(Library node) {
@@ -131,6 +131,20 @@
     return result;
   }
 
+  InstanceConstant? _tryGetFfiNativeAnnotation(Member node) {
+    for (final Expression annotation in node.annotations) {
+      if (annotation is ConstantExpression) {
+        if (annotation.constant is InstanceConstant) {
+          final instConst = annotation.constant as InstanceConstant;
+          if (instConst.classNode == ffiNativeClass) {
+            return instConst;
+          }
+        }
+      }
+    }
+    return null;
+  }
+
   @override
   visitStaticInvocation(StaticInvocation node) {
     super.visitStaticInvocation(node);
@@ -352,6 +366,88 @@
                   .substituteType(allocateFunctionType
                       .withoutTypeParameters) as FunctionType);
         }
+      } else if (target is Procedure) {
+        // FfiNative calls that pass objects extending NativeFieldWrapperClass1
+        // (NFWC1) should be passed as Pointer instead so we don't have the
+        // overhead of converting Handles.
+        // If we find an NFWC1 object being passed to an FfiNative signature
+        // taking a Pointer, we automatically wrap the argument in a call to
+        // `Pointer.fromAddress(_getNativeField(obj))`.
+        // Example:
+        //   passAsPointer(ClassWithNativeField());
+        // Becomes, roughly:
+        //   #t0 = PointerClassWithNativeField();
+        //   passAsPointer(Pointer.fromAddress(_getNativeField(#t0)));
+        //   reachabilityFence(#t0);
+        final ffiNativeAnn = _tryGetFfiNativeAnnotation(target);
+        if (ffiNativeAnn != null) {
+          final DartType ffiSignature = ffiNativeAnn.typeArguments[0];
+          if (ffiSignature is FunctionType) {
+            final List<DartType> ffiParams = ffiSignature.positionalParameters;
+            final List<VariableDeclaration> dartParams =
+                target.function.positionalParameters;
+
+            List<VariableDeclaration> tmpsArgs = [];
+            List<Expression> callArgs = [];
+            final origArgs = node.arguments.positional;
+            for (int i = 0; i < origArgs.length; i++) {
+              if (env.isSubtypeOf(
+                      dartParams[i].type,
+                      nativeFieldWrapperClassType,
+                      SubtypeCheckMode.ignoringNullabilities) &&
+                  env.isSubtypeOf(ffiParams[i], pointerType,
+                      SubtypeCheckMode.ignoringNullabilities)) {
+                // final NativeFieldWrapperClass1 #t1 = MyNFWC1();.
+                final tmpPtr = VariableDeclaration('',
+                    initializer: origArgs[i],
+                    type: nativeFieldWrapperClassType,
+                    isFinal: true);
+                tmpsArgs.add(tmpPtr);
+
+                // Pointer.fromAddress(_getNativeField(#t1)).
+                final ptr = StaticInvocation(
+                    fromAddressInternal,
+                    Arguments([
+                      StaticInvocation(getNativeFieldFunction,
+                          Arguments([VariableGet(tmpPtr)]))
+                    ], types: [
+                      voidType
+                    ]));
+                callArgs.add(ptr);
+
+                continue;
+              }
+              // Note: We also evaluate, and assign temporaries for, non-wrapped
+              // arguments as we need to preserve the original evaluation order.
+              final tmpArg = VariableDeclaration('',
+                  initializer: origArgs[i], isFinal: true);
+              tmpsArgs.add(tmpArg);
+              callArgs.add(VariableGet(tmpArg));
+            }
+
+            final targetCall = StaticInvocation(target, Arguments(callArgs));
+
+            // {
+            //   T #t0;
+            //   final NativeFieldWrapperClass1 #t1 = MyNFWC1();
+            //   #t0 = foo(Pointer.fromAddress(_getNativeField(#t1)));
+            //   reachabilityFence(#t1);
+            // } => #t0
+            final tmpResult =
+                VariableDeclaration('', type: target.function.returnType);
+            return BlockExpression(
+              Block([
+                tmpResult,
+                ...tmpsArgs,
+                ExpressionStatement(VariableSet(tmpResult, targetCall)),
+                for (final ta in tmpsArgs)
+                  ExpressionStatement(StaticInvocation(
+                      reachabilityFenceFunction, Arguments([VariableGet(ta)])))
+              ]),
+              VariableGet(tmpResult),
+            );
+          }
+        }
       }
     } on _FfiStaticTypeError {
       // It's OK to swallow the exception because the diagnostics issued will
@@ -713,6 +809,22 @@
     return pointerType is InterfaceType ? pointerType.typeArguments[0] : null;
   }
 
+  // Replaces all NativeFieldWrapperClass1 parameters with Pointer.
+  FunctionType _pointerizeFunctionType(FunctionType dartType) {
+    List<DartType> parameters = [];
+    for (final parameter in dartType.positionalParameters) {
+      if (parameter is InterfaceType) {
+        if (env.isSubtypeOf(parameter, nativeFieldWrapperClassType,
+            SubtypeCheckMode.ignoringNullabilities)) {
+          parameters.add(pointerType);
+          continue;
+        }
+      }
+      parameters.add(parameter);
+    }
+    return FunctionType(parameters, dartType.returnType, dartType.nullability);
+  }
+
   void _ensureNativeTypeToDartType(
       DartType nativeType, DartType dartType, Expression node,
       {bool allowHandle: false}) {
@@ -725,6 +837,15 @@
         SubtypeCheckMode.ignoringNullabilities)) {
       return;
     }
+    // We do automatic argument conversion from NativeFieldWrapperClass1 to
+    // Pointer, so we specifically allow for NFWC1 to be passed as Pointer.
+    if (dartType is FunctionType) {
+      final ptrDartType = _pointerizeFunctionType(dartType);
+      if (env.isSubtypeOf(correspondingDartType, ptrDartType,
+          SubtypeCheckMode.ignoringNullabilities)) {
+        return;
+      }
+    }
     diagnosticReporter.report(
         templateFfiTypeMismatch.withArguments(dartType, correspondingDartType,
             nativeType, currentLibrary.isNonNullableByDefault),
diff --git a/pkg/vm/lib/transformations/pragma.dart b/pkg/vm/lib/transformations/pragma.dart
index dfac713..2fabcf4 100644
--- a/pkg/vm/lib/transformations/pragma.dart
+++ b/pkg/vm/lib/transformations/pragma.dart
@@ -78,7 +78,7 @@
 
     String pragmaName;
     Constant? name =
-        pragmaConstant.fieldValues[coreTypes.pragmaName.getterReference];
+        pragmaConstant.fieldValues[coreTypes.pragmaName.fieldReference];
     if (name is StringConstant) {
       pragmaName = name.value;
     } else {
@@ -86,7 +86,7 @@
     }
 
     Constant options =
-        pragmaConstant.fieldValues[coreTypes.pragmaOptions.getterReference]!;
+        pragmaConstant.fieldValues[coreTypes.pragmaOptions.fieldReference]!;
 
     switch (pragmaName) {
       case kEntryPointPragmaName:
diff --git a/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart b/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart
index 55f9d52..e25ce12 100644
--- a/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart
+++ b/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart
@@ -4,7 +4,6 @@
 
 import 'package:kernel/ast.dart';
 import 'package:kernel/core_types.dart';
-import 'dart:core';
 
 import 'package:vm/transformations/specializer/factory_specializer.dart';
 
diff --git a/pkg/vm/lib/transformations/type_flow/analysis.dart b/pkg/vm/lib/transformations/type_flow/analysis.dart
index 75eff47..625616f 100644
--- a/pkg/vm/lib/transformations/type_flow/analysis.dart
+++ b/pkg/vm/lib/transformations/type_flow/analysis.dart
@@ -195,12 +195,12 @@
     final function = selector.member.function;
     if (function != null) {
       typeChecksNeeded =
-          function.typeParameters.any((t) => t.isGenericCovariantImpl);
+          function.typeParameters.any((t) => t.isCovariantByClass);
     } else {
       Field field = selector.member as Field;
       if (selector.callKind == CallKind.PropertySet) {
         // TODO(dartbug.com/40615): Use TFA results to improve this criterion.
-        typeChecksNeeded = field.isGenericCovariantImpl;
+        typeChecksNeeded = field.isCovariantByClass;
       }
     }
   }
@@ -1008,11 +1008,12 @@
       target = typeFlowAnalysis.hierarchyCache.hierarchy.getDispatchTarget(
           classNode, selector.name,
           setter: selector.isSetter);
-      if (target != null) {
-        _dispatchTargets[selector] = target;
-      }
+      target ??= _DispatchableInvocation.kNoSuchMethodMarker;
+      _dispatchTargets[selector] = target;
     }
-    return target;
+    return identical(target, _DispatchableInvocation.kNoSuchMethodMarker)
+        ? null
+        : target;
   }
 
   String dump() => "$this {supers: $supertypes}";
@@ -1499,7 +1500,7 @@
     _FieldValue? fieldValue = _fieldValues[field];
     if (fieldValue == null) {
       Summary? typeGuardSummary = null;
-      if (field.isGenericCovariantImpl) {
+      if (field.isCovariantByClass) {
         typeGuardSummary = summaryCollector.createSummary(field,
             fieldSummaryType: FieldSummaryType.kFieldGuard);
       }
diff --git a/pkg/vm/lib/transformations/type_flow/protobuf_handler.dart b/pkg/vm/lib/transformations/type_flow/protobuf_handler.dart
index c0175a4..ffc4b1e 100644
--- a/pkg/vm/lib/transformations/type_flow/protobuf_handler.dart
+++ b/pkg/vm/lib/transformations/type_flow/protobuf_handler.dart
@@ -116,7 +116,7 @@
         if (constant is InstanceConstant &&
             constant.classReference == _tagNumberClass.reference) {
           if (messageClass._usedTags.add((constant
-                  .fieldValues[_tagNumberField.getterReference] as IntConstant)
+                  .fieldValues[_tagNumberField.fieldReference] as IntConstant)
               .value)) {
             _invalidatedClasses.add(messageClass);
           }
diff --git a/pkg/vm/lib/transformations/type_flow/signature_shaking.dart b/pkg/vm/lib/transformations/type_flow/signature_shaking.dart
index 5ae2e16..7ec6ff9 100644
--- a/pkg/vm/lib/transformations/type_flow/signature_shaking.dart
+++ b/pkg/vm/lib/transformations/type_flow/signature_shaking.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/core_types.dart';
 import 'package:kernel/external_name.dart';
 import 'package:kernel/type_environment.dart';
 
@@ -189,7 +190,7 @@
     // Covariant parameters have implicit type checks, which count as reads.
     // When run in weak mode with null assertions enabled, parameters with
     // non-nullable types have implicit null checks, which count as reads.
-    if ((param.isCovariant || param.isGenericCovariantImpl) ||
+    if ((param.isCovariantByDeclaration || param.isCovariantByClass) ||
         (!shaker.typeFlowAnalysis.target.flags.enableNullSafety &&
             param.type.nullability == Nullability.nonNullable &&
             (type == null || type is NullableType))) {
@@ -200,6 +201,7 @@
 
 class _Collect extends RecursiveVisitor {
   final SignatureShaker shaker;
+  final CoreTypes coreTypes;
 
   /// Parameters of the current function.
   final Map<VariableDeclaration, _ParameterInfo> localParameters = {};
@@ -209,7 +211,8 @@
   /// via [_ParameterInfo.useDependencies] and not marked as read immediately.
   final Set<VariableGet> useDependencies = {};
 
-  _Collect(this.shaker);
+  _Collect(this.shaker)
+      : coreTypes = shaker.typeFlowAnalysis.environment.coreTypes;
 
   void enterFunction(Member member) {
     final _ProcedureInfo? info = shaker._infoForMember(member);
@@ -233,7 +236,7 @@
         shaker.typeFlowAnalysis.nativeCodeOracle
             .isMemberReferencedFromNativeCode(member) ||
         shaker.typeFlowAnalysis.nativeCodeOracle.isRecognized(member) ||
-        getExternalName(member) != null ||
+        getExternalName(coreTypes, member) != null ||
         member.name.text == '==') {
       info.eligible = false;
     }
diff --git a/pkg/vm/lib/transformations/type_flow/summary.dart b/pkg/vm/lib/transformations/type_flow/summary.dart
index fb18cec..72b0b68 100644
--- a/pkg/vm/lib/transformations/type_flow/summary.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary.dart
@@ -546,7 +546,7 @@
 
   TypeCheck(this.arg, this.type, this.node, this.staticType, this.kind)
       : isTestedOnlyOnCheckedEntryPoint =
-            node is VariableDeclaration && !node.isCovariant;
+            node is VariableDeclaration && !node.isCovariantByDeclaration;
 
   @override
   void accept(StatementVisitor visitor) => visitor.visitTypeCheck(this);
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index de63cee..952eefe 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -801,7 +801,7 @@
   }
 
   bool _useTypeCheckForParameter(VariableDeclaration decl) {
-    return decl.isCovariant || decl.isGenericCovariantImpl;
+    return decl.isCovariantByDeclaration || decl.isCovariantByClass;
   }
 
   Args<Type> rawArguments(Selector selector) {
@@ -1584,6 +1584,21 @@
   }
 
   @override
+  TypeExpr visitSetLiteral(SetLiteral node) {
+    for (var expression in node.expressions) {
+      _visit(expression);
+    }
+    Class? concreteClass =
+        target.concreteSetLiteralClass(_environment.coreTypes);
+    if (concreteClass != null) {
+      return _translator.instantiateConcreteType(
+          _entryPointsListener.addAllocatedClass(concreteClass),
+          [node.typeArgument]);
+    }
+    return _staticType(node);
+  }
+
+  @override
   TypeExpr visitInstanceInvocation(InstanceInvocation node) {
     final receiverNode = node.receiver;
     final receiver = _visit(receiverNode);
@@ -2443,11 +2458,6 @@
   }
 
   @override
-  Type visitMapConstant(MapConstant node) {
-    throw 'The kernel2kernel constants transformation desugars const maps!';
-  }
-
-  @override
   Type visitListConstant(ListConstant constant) {
     for (final Constant entry in constant.entries) {
       typeFor(entry);
@@ -2466,6 +2476,43 @@
   }
 
   @override
+  Type visitMapConstant(MapConstant constant) {
+    for (final entry in constant.entries) {
+      typeFor(entry.key);
+      typeFor(entry.value);
+    }
+    final Class? concreteClass = summaryCollector.target
+        .concreteConstMapLiteralClass(summaryCollector._environment.coreTypes);
+    if (concreteClass != null) {
+      return new ConcreteType(
+          summaryCollector._entryPointsListener
+              .addAllocatedClass(concreteClass)
+              .cls,
+          null,
+          constant);
+    }
+    return _getStaticType(constant);
+  }
+
+  @override
+  Type visitSetConstant(SetConstant constant) {
+    for (final entry in constant.entries) {
+      typeFor(entry);
+    }
+    final Class? concreteClass = summaryCollector.target
+        .concreteConstSetLiteralClass(summaryCollector._environment.coreTypes);
+    if (concreteClass != null) {
+      return new ConcreteType(
+          summaryCollector._entryPointsListener
+              .addAllocatedClass(concreteClass)
+              .cls,
+          null,
+          constant);
+    }
+    return _getStaticType(constant);
+  }
+
+  @override
   Type visitInstanceConstant(InstanceConstant constant) {
     final resultClass = summaryCollector._entryPointsListener
         .addAllocatedClass(constant.classNode);
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index 5634a76..1868a4d 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -880,8 +880,8 @@
     if (isSetter) {
       final isAbstract = !shaker.isFieldSetterReachable(field);
       final parameter = new VariableDeclaration('value', type: field.type)
-        ..isCovariant = field.isCovariant
-        ..isGenericCovariantImpl = field.isGenericCovariantImpl
+        ..isCovariantByDeclaration = field.isCovariantByDeclaration
+        ..isCovariantByClass = field.isCovariantByClass
         ..fileOffset = field.fileOffset;
       accessor = new Procedure(
           field.name,
@@ -1397,9 +1397,8 @@
       return _makeUnreachableCall([]);
     } else {
       if (!shaker.isMemberBodyReachable(node.target)) {
-        // Annotations could contain references to constant fields.
-        assert((node.target is Field) && (node.target as Field).isConst);
-        shaker.addUsedMember(node.target);
+        throw '${node.runtimeType} "$node" uses unreachable member '
+            '${node.target} at ${node.location}';
       }
       return node;
     }
@@ -1435,9 +1434,8 @@
       return _makeUnreachableCall(_flattenArguments(node.arguments));
     } else {
       if (!shaker.isMemberBodyReachable(node.target)) {
-        // Annotations could contain references to const constructors.
-        assert(node.isConst);
-        shaker.addUsedMember(node.target);
+        throw '${node.runtimeType} "$node" uses unreachable member '
+            '${node.target} at ${node.location}';
       }
       return node;
     }
@@ -1759,6 +1757,11 @@
       // write a dangling reference to the deleted member.
       if (node is Field) {
         assert(
+            node.fieldReference.node == node,
+            "Trying to remove canonical name from field reference on $node "
+            "which has been repurposed for ${node.fieldReference.node}.");
+        node.fieldReference.canonicalName?.unbind();
+        assert(
             node.getterReference.node == node,
             "Trying to remove canonical name from getter reference on $node "
             "which has been repurposed for ${node.getterReference.node}.");
@@ -1906,6 +1909,13 @@
   visitDoubleConstant(DoubleConstant constant) {}
 
   @override
+  visitSetConstant(SetConstant constant) {
+    for (final entry in constant.entries) {
+      analyzeConstant(entry);
+    }
+  }
+
+  @override
   visitStringConstant(StringConstant constant) {}
 
   @override
@@ -1914,8 +1924,11 @@
   }
 
   @override
-  visitMapConstant(MapConstant node) {
-    throw 'The kernel2kernel constants transformation desugars const maps!';
+  visitMapConstant(MapConstant constant) {
+    for (final entry in constant.entries) {
+      analyzeConstant(entry.key);
+      analyzeConstant(entry.value);
+    }
   }
 
   @override
diff --git a/pkg/vm/lib/transformations/type_flow/unboxing_info.dart b/pkg/vm/lib/transformations/type_flow/unboxing_info.dart
index 682cf58..bda15ba9 100644
--- a/pkg/vm/lib/transformations/type_flow/unboxing_info.dart
+++ b/pkg/vm/lib/transformations/type_flow/unboxing_info.dart
@@ -205,5 +205,5 @@
         _nativeCodeOracle.hasDisableUnboxedParameters(member);
   }
 
-  bool _isNative(Member member) => getExternalName(member) != null;
+  bool _isNative(Member member) => getExternalName(_coreTypes, member) != null;
 }
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
index 700a506..b24cb9e 100644
--- a/pkg/vm/test/incremental_compiler_test.dart
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -112,14 +112,14 @@
       await compiler.compile();
       compiler.accept();
       {
-        Procedure? procedure = await compiler.compileExpression(
-            'main', <String>[], <String>[], main.uri.toString(), null, true);
+        Procedure? procedure = await compiler.compileExpression('main',
+            <String>[], <String>[], main.uri.toString(), null, null, true);
         expect(procedure, isNotNull);
         expect(errorsReported, equals(0));
       }
       {
-        Procedure? procedure = await compiler.compileExpression(
-            'main1', <String>[], <String>[], main.uri.toString(), null, true);
+        Procedure? procedure = await compiler.compileExpression('main1',
+            <String>[], <String>[], main.uri.toString(), null, null, true);
         expect(procedure, isNotNull);
         expect(errorsReported, equals(1));
         errorsReported = 0;
@@ -1024,8 +1024,8 @@
       }
       compiler.accept();
       {
-        Procedure? procedure = await compiler.compileExpression(
-            'a', <String>[], <String>[], 'package:foo/bar.dart', 'A', true);
+        Procedure? procedure = await compiler.compileExpression('a', <String>[],
+            <String>[], 'package:foo/bar.dart', 'A', null, true);
         expect(procedure, isNotNull);
       }
 
@@ -1039,15 +1039,15 @@
       }
       await compiler.reject();
       {
-        Procedure? procedure = await compiler.compileExpression(
-            'a', <String>[], <String>[], 'package:foo/bar.dart', 'A', true);
+        Procedure? procedure = await compiler.compileExpression('a', <String>[],
+            <String>[], 'package:foo/bar.dart', 'A', null, true);
         expect(procedure, isNotNull);
       }
     });
 
-    /// This test basicaly verifies that components `relink` method is correctly
-    /// called when rejecting (i.e. logically going back in time to before a
-    /// rejected compilation).
+    /// This test basically verifies that components `relink` method is
+    /// correctly called when rejecting (i.e. logically going back in time to
+    /// before a rejected compilation).
     test('check links after reject', () async {
       final Uri fooUri = Uri.file('${mytest.path}/foo.dart');
       new File.fromUri(fooUri).writeAsStringSync("""
@@ -1088,7 +1088,7 @@
       compiler.accept();
       {
         final Procedure procedure = (await compiler.compileExpression(
-            'a', <String>[], <String>[], barUri.toString(), 'A', true))!;
+            'a', <String>[], <String>[], barUri.toString(), 'A', null, true))!;
         // Verify that the expression only has links to the only bar we know
         // about.
         final LibraryReferenceCollector lrc = new LibraryReferenceCollector();
@@ -1133,7 +1133,7 @@
       }
       {
         final Procedure procedure = (await compiler.compileExpression(
-            'a', <String>[], <String>[], barUri.toString(), 'A', true))!;
+            'a', <String>[], <String>[], barUri.toString(), 'A', null, true))!;
         // Verify that the expression only has links to the original bar.
         final LibraryReferenceCollector lrc = new LibraryReferenceCollector();
         procedure.accept(lrc);
diff --git a/pkg/vm/test/modular_kernel_plus_aot_test.dart b/pkg/vm/test/modular_kernel_plus_aot_test.dart
index c853b01..090a08d 100644
--- a/pkg/vm/test/modular_kernel_plus_aot_test.dart
+++ b/pkg/vm/test/modular_kernel_plus_aot_test.dart
@@ -83,7 +83,7 @@
     Uri outputFile,
     List<Uri> sources,
     List<Uri> additionalDills) async {
-  final state = await fe.initializeCompiler(
+  final state = fe.initializeCompiler(
       null,
       sdkSummary,
       librariesFile,
diff --git a/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect b/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect
index 37d5226..29c959a 100644
--- a/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect
+++ b/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect
@@ -19,18 +19,16 @@
   method toString() → core::String
     return "I am a Foo";
 }
-class FooEnum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class FooEnum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::FooEnum> values = #C11;
   static const field self::FooEnum A = #C4;
   static const field self::FooEnum B = #C7;
   static const field self::FooEnum C = #C10;
-  const constructor •(core::int index, core::String _name) → self::FooEnum
-    : self::FooEnum::index = index, self::FooEnum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::FooEnum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::FooEnum::_name}{core::String};
+    return "FooEnum.${this.{core::_Enum::_name}{core::String}}";
 }
 class Keep extends core::Object {
   synthetic constructor •() → self::Keep
@@ -48,18 +46,18 @@
   final self::IFoo foo = new self::Foo::•();
   core::print(foo.{self::IFoo::toString}(){() → core::String});
   core::print(new self::Keep::•().{self::Keep::toString}(){() → core::String});
-  core::print((#C7).{self::FooEnum::toString}(){() → core::String});
+  core::print(#C7.{self::FooEnum::toString}(){() → core::String});
 }
 constants  {
   #C1 = core::_Override {}
   #C2 = 0
-  #C3 = "FooEnum.A"
+  #C3 = "A"
   #C4 = self::FooEnum {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "FooEnum.B"
+  #C6 = "B"
   #C7 = self::FooEnum {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "FooEnum.C"
+  #C9 = "C"
   #C10 = self::FooEnum {index:#C8, _name:#C9}
   #C11 = <self::FooEnum*>[#C4, #C7, #C10]
   #C12 = "flutter:keep-to-string"
diff --git a/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect b/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect
index d5bbdbf..dca5efb 100644
--- a/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect
+++ b/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect
@@ -19,18 +19,16 @@
   method toString() → core::String
     return super.toString();
 }
-class FooEnum extends core::Object implements core::Enum /*isEnum*/  {
-  final field core::int index;
-  final field core::String _name;
+class FooEnum extends core::_Enum /*isEnum*/  {
   static const field core::List<self::FooEnum> values = #C11;
   static const field self::FooEnum A = #C4;
   static const field self::FooEnum B = #C7;
   static const field self::FooEnum C = #C10;
-  const constructor •(core::int index, core::String _name) → self::FooEnum
-    : self::FooEnum::index = index, self::FooEnum::_name = _name, super core::Object::•()
+  const constructor •(core::int index, core::String name) → self::FooEnum
+    : super core::_Enum::•(index, name)
     ;
   method toString() → core::String
-    return this.{self::FooEnum::_name}{core::String};
+    return "FooEnum.${this.{core::_Enum::_name}{core::String}}";
 }
 class Keep extends core::Object {
   synthetic constructor •() → self::Keep
@@ -48,18 +46,18 @@
   final self::IFoo foo = new self::Foo::•();
   core::print(foo.{self::IFoo::toString}(){() → core::String});
   core::print(new self::Keep::•().{self::Keep::toString}(){() → core::String});
-  core::print((#C7).{self::FooEnum::toString}(){() → core::String});
+  core::print(#C7.{self::FooEnum::toString}(){() → core::String});
 }
 constants  {
   #C1 = core::_Override {}
   #C2 = 0
-  #C3 = "FooEnum.A"
+  #C3 = "A"
   #C4 = self::FooEnum {index:#C2, _name:#C3}
   #C5 = 1
-  #C6 = "FooEnum.B"
+  #C6 = "B"
   #C7 = self::FooEnum {index:#C5, _name:#C6}
   #C8 = 2
-  #C9 = "FooEnum.C"
+  #C9 = "C"
   #C10 = self::FooEnum {index:#C8, _name:#C9}
   #C11 = <self::FooEnum*>[#C4, #C7, #C10]
   #C12 = "flutter:keep-to-string"
diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect
index 80bbada..23f3ef4 100644
--- a/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect
@@ -17,24 +17,22 @@
 ------------ TestEnum. ------------
 %this = _Parameter #0 [_T (#lib::TestEnum)+]
 %index = _Parameter #1 [_T (dart.core::int)+?]
-%_name = _Parameter #2 [_T (dart.core::String)+?]
-t3 = _Call direct set [#lib::TestEnum.index] (%this, %index)
-t4 = _Call direct set [#lib::TestEnum._name] (%this, %_name)
-t5 = _Call direct [dart.core::Object.] (%this)
+%name = _Parameter #2 [_T (dart.core::String)+?]
+t3 = _Call direct [dart.core::_Enum.] (%this, %index, %name)
 RESULT: _T {}?
 ------------ TestEnum.toString ------------
 %this = _Parameter #0 [_T (#lib::TestEnum)+]
-t1* = _Call virtual get [#lib::TestEnum._name] (%this)
-RESULT: t1
+t1 = _Call virtual get [dart.core::_Enum._name] (%this)
+RESULT: _T (dart.core::String)+
 ------------ TestEnum.values ------------
 
-RESULT: _T (dart.core::_ImmutableList, const <#lib::TestEnum*>[const #lib::TestEnum{#lib::TestEnum.index: 0, #lib::TestEnum._name: "TestEnum.v1"}, const #lib::TestEnum{#lib::TestEnum.index: 1, #lib::TestEnum._name: "TestEnum.v2"}])
+RESULT: _T (dart.core::_ImmutableList, const <#lib::TestEnum*>[const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}, const #lib::TestEnum{dart.core::_Enum.index: 1, dart.core::_Enum._name: "v2"}])
 ------------ TestEnum.v1 ------------
 
-RESULT: _T (#lib::TestEnum, const #lib::TestEnum{#lib::TestEnum.index: 0, #lib::TestEnum._name: "TestEnum.v1"})
+RESULT: _T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"})
 ------------ TestEnum.v2 ------------
 
-RESULT: _T (#lib::TestEnum, const #lib::TestEnum{#lib::TestEnum.index: 1, #lib::TestEnum._name: "TestEnum.v2"})
+RESULT: _T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 1, dart.core::_Enum._name: "v2"})
 ------------ foo ------------
 %x = _Parameter #0 [_T ANY?]
 RESULT: _T {}?
@@ -129,8 +127,8 @@
 RESULT: _T {}?
 ------------ if9 ------------
 %x = _Parameter #0 [_T (#lib::TestEnum)+?]
-t1* = _Call [dart.core::Object.==] (%x, _T (#lib::TestEnum, const #lib::TestEnum{#lib::TestEnum.index: 0, #lib::TestEnum._name: "TestEnum.v1"}))
-t2 = _Call direct [#lib::foo] (_T (#lib::TestEnum, const #lib::TestEnum{#lib::TestEnum.index: 0, #lib::TestEnum._name: "TestEnum.v1"}))
+t1* = _Call [dart.core::Object.==] (%x, _T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}))
+t2 = _Call direct [#lib::foo] (_T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}))
 RESULT: _T {}?
 ------------ conditional1 ------------
 %cond1 = _Parameter #0 [_T (dart.core::bool)+?]
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 0a0c97a..9ff69a2 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
@@ -17,7 +17,7 @@
   for (core::int i = 1; ; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1){(core::num) → core::int}) {
     if([@vm.inferred-type.metadata=dart.core::bool] self::isPrime(i))
       counter = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] counter.{core::num::+}(1){(core::num) → core::int};
-    if([@vm.inferred-type.metadata=dart.core::bool] counter =={core::num::==}{(core::Object) → core::bool} (#C1)) {
+    if([@vm.inferred-type.metadata=dart.core::bool] counter =={core::num::==}{(core::Object) → core::bool} #C1) {
       return i;
     }
   }
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 c42f78c..ce9c0b3 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
@@ -8,9 +8,9 @@
     ;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → dynamic
     return new self::D::•<self::C::T%>();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method id1([@vm.inferred-type.metadata=#lib::Y (skip check)] generic-covariant-impl self::C::T% x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method id1([@vm.inferred-type.metadata=#lib::Y (skip check)] covariant-by-class self::C::T% x) → dynamic
     return x;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method id2([@vm.inferred-type.metadata=#lib::Z] generic-covariant-impl self::C::T% x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method id2([@vm.inferred-type.metadata=#lib::Z] covariant-by-class self::C::T% x) → dynamic
     return x;
 }
 class D<T extends core::Object? = dynamic> extends core::Object {
@@ -57,9 +57,9 @@
   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] [@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
+[@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)] covariant-by-class 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
+[@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)] covariant-by-class self::K<self::I<self::C2::T%>> x) → dynamic
     return x;
 }
 static method main() → dynamic {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart
new file mode 100644
index 0000000..88695c5
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart
@@ -0,0 +1,33 @@
+// 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.
+
+// This test verifies correct type assignment of type to const maps.
+
+enum _AttributeName {
+  name,
+  sibling,
+}
+
+const _attributeNames = <int, _AttributeName>{
+  0x01: _AttributeName.sibling,
+  0x03: _AttributeName.name,
+};
+
+class _Attribute {
+  final _AttributeName name;
+
+  // This should not be thrown away by TFA.
+  _Attribute._(this.name);
+
+  static _Attribute fromReader(int nameInt) {
+    final name = _attributeNames[nameInt]!;
+    return _Attribute._(name);
+  }
+}
+
+void main() {
+  final result = _Attribute.fromReader(1);
+
+  print(result);
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect
new file mode 100644
index 0000000..6c1795f
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect
@@ -0,0 +1,31 @@
+library #lib /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class _AttributeName extends core::_Enum /*isEnum*/  {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method toString() → core::String
+    return "_AttributeName.${[@vm.direct-call.metadata=dart.core::_Enum._name] this.{core::_Enum::_name}{core::String}}";
+}
+class _Attribute extends core::Object {
+  constructor _() → self::_Attribute
+    : super core::Object::•()
+    ;
+  static method fromReader() → self::_Attribute {
+    final self::_AttributeName name = [@vm.direct-call.metadata=dart.collection::_InternalImmutableLinkedHashMap.[]] [@vm.inferred-type.metadata=#lib::_AttributeName? (skip check)] #C8.{core::Map::[]}(#C1){(core::Object?) → self::_AttributeName?}!;
+    return new self::_Attribute::_();
+  }
+}
+static method main() → void {
+  final self::_Attribute result = [@vm.inferred-type.metadata=#lib::_Attribute] self::_Attribute::fromReader();
+  core::print(result);
+}
+constants  {
+  #C1 = 1
+  #C2 = "sibling"
+  #C3 = self::_AttributeName {index:#C1, _name:#C2}
+  #C4 = 3
+  #C5 = 0
+  #C6 = "name"
+  #C7 = self::_AttributeName {index:#C5, _name:#C6}
+  #C8 = <core::int*, self::_AttributeName*>{#C1:#C3, #C4:#C7)
+}
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 685989f..234148e 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
@@ -11,11 +11,9 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:2,getterSelectorId:3]  method getBar() → core::String
     return "bar";
 }
-class B extends core::Object implements core::Enum /*isEnum*/  {
-[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4] [@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,getterSelectorId:5]  final field core::String _name;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7]  method toString() → core::String
-    return [@vm.direct-call.metadata=#lib::B._name] [@vm.inferred-type.metadata=dart.core::_OneByteString (value: "B.b2")] this.{self::B::_name}{core::String};
+class B extends core::_Enum /*isEnum*/  {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  method toString() → core::String
+    return "B.${[@vm.direct-call.metadata=dart.core::_Enum._name] this.{core::_Enum::_name}{core::String}}";
 }
 static method test0() → void {
   core::print(#C1);
@@ -65,7 +63,7 @@
   #C4 = 3.14
   #C5 = "bazz"
   #C6 = 1
-  #C7 = "B.b2"
+  #C7 = "b2"
   #C8 = self::B {index:#C6, _name:#C7}
   #C9 = 2
   #C10 = 3
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart
new file mode 100644
index 0000000..e0771ee
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart
@@ -0,0 +1,36 @@
+// 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.
+
+// This test verifies correct type assignment of type to const sets.
+
+enum _AttributeName {
+  name,
+  sibling,
+}
+
+const _attributeNames = <int>{
+  0x00,
+  0x01,
+};
+
+class _Attribute {
+  final _AttributeName name;
+
+  // This should not be thrown away by TFA.
+  _Attribute._(this.name);
+
+  static _Attribute fromReader(int nameInt) {
+    final name = _attributeNames.contains(nameInt);
+
+    // This should not be transformed into
+    // "Attempt to execute code removed by Dart AOT compiler".
+    return _Attribute._(_AttributeName.values[nameInt]);
+  }
+}
+
+void main() {
+  final result = _Attribute.fromReader(1);
+
+  print(result);
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect
new file mode 100644
index 0000000..f345b4b
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect
@@ -0,0 +1,31 @@
+library #lib /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class _AttributeName extends core::_Enum /*isEnum*/  {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method toString() → core::String
+    return "_AttributeName.${[@vm.direct-call.metadata=dart.core::_Enum._name] this.{core::_Enum::_name}{core::String}}";
+}
+class _Attribute extends core::Object {
+  constructor _() → self::_Attribute
+    : super core::Object::•()
+    ;
+  static method fromReader() → self::_Attribute {
+    final core::bool name = [@vm.direct-call.metadata=dart.collection::_CompactImmutableLinkedHashSet.contains] [@vm.inferred-type.metadata=!? (skip check)] #C3.{core::Set::contains}(#C2){(core::Object?) → core::bool};
+    return let final self::_AttributeName #t1 = #C8.{core::List::[]}(#C2){(core::int) → self::_AttributeName} in new self::_Attribute::_();
+  }
+}
+static method main() → void {
+  final self::_Attribute result = [@vm.inferred-type.metadata=#lib::_Attribute] self::_Attribute::fromReader();
+  core::print(result);
+}
+constants  {
+  #C1 = 0
+  #C2 = 1
+  #C3 = <core::int*>{#C1, #C2}
+  #C4 = "name"
+  #C5 = self::_AttributeName {index:#C1, _name:#C4}
+  #C6 = "sibling"
+  #C7 = self::_AttributeName {index:#C2, _name:#C6}
+  #C8 = <self::_AttributeName*>[#C5, #C7]
+}
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 67ffa52..94fe35e 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
@@ -49,7 +49,7 @@
   [@vm.direct-call.metadata=#lib::C.foo] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}(){() → core::int};
 }
 static method callerE1() → void {
-  [@vm.direct-call.metadata=dart.core::_StringBase.toString] [@vm.inferred-type.metadata=!? (skip check) (receiver not int)](#C1).{core::Object::toString}(){() → core::String};
+  [@vm.direct-call.metadata=dart.core::_StringBase.toString] [@vm.inferred-type.metadata=!? (skip check) (receiver not int)] #C1.{core::Object::toString}(){() → core::String};
 }
 static method callerE2([@vm.inferred-type.metadata=#lib::E?] dynamic x) → void {
   [@vm.inferred-type.metadata=!? (receiver not int)] x.{core::Object::toString}(){() → core::String};
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart
index 602299f..1311d36 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart
@@ -9,4 +9,4 @@
   if (list.isNotEmpty) {
     new Class().method(null as dynamic);
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart.expect
index 0e15b41..8ddda11 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.dart.expect
@@ -16,13 +16,12 @@
 import self as self;
 import "dart:core" as core;
 
-abstract class Enum extends core::Object implements core::Enum {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3267]  abstract get /*isLegacy*/ index() → core::int;
+abstract class Enum extends core::_Enum {
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3268,getterSelectorId:3269]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
-    return [@vm.inferred-type.metadata=!] e.{self::Enum::index}{core::int};
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3261,getterSelectorId:3262]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
+    return [@vm.inferred-type.metadata=!] e.{core::_Enum::index}{core::int};
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.lib.dart b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.lib.dart
index 951e2e9..e5600e4 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.lib.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/enum_from_lib_used_as_type.lib.dart
@@ -6,4 +6,4 @@
 
 class Class {
   int method(Enum e) => e.index;
-}
\ No newline at end of file
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/enum_used_as_type.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/enum_used_as_type.dart.expect
index 34740ea..cf39874 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/enum_used_as_type.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/enum_used_as_type.dart.expect
@@ -3,15 +3,14 @@
 import "dart:core" as core;
 import "dart:_internal" as _in;
 
-abstract class Enum extends core::Object implements core::Enum {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]  abstract get /*isLegacy*/ index() → core::int;
+abstract class Enum extends core::_Enum {
 }
 class Class extends core::Object {
   synthetic constructor •() → self::Class
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:2,getterSelectorId:3]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
-    return [@vm.inferred-type.metadata=!] e.{self::Enum::index}{core::int};
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
+    return [@vm.inferred-type.metadata=!] e.{core::_Enum::index}{core::int};
 }
 static method main() → dynamic {
   core::List<dynamic> list = [@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::•<dynamic>(0);
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
index 9086aa75..f449731 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
@@ -42,8 +42,8 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]  get nested() → self::Struct12
     return new self::Struct12::#fromTypedDataBase( block {
       core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object};
-      core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
-    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer?] ffi::_fromAddress<self::Struct12>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int?] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.direct-call.metadata=dart.typed_data::_ByteBuffer.asUint8List] [@vm.inferred-type.metadata=dart.typed_data::_Uint8ArrayView (skip check)] [@vm.inferred-type.metadata=dart.typed_data::_ByteBuffer] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C15).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
+      core::int #offset = #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+    } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer?] ffi::_fromAddress<self::Struct12>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int?] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.direct-call.metadata=dart.typed_data::_ByteBuffer.asUint8List] [@vm.inferred-type.metadata=dart.typed_data::_Uint8ArrayView (skip check)] [@vm.inferred-type.metadata=dart.typed_data::_ByteBuffer] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
 }
 @#C6
 class Struct12 extends ffi::Struct {
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 a0447e5..cd99b4d 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect
@@ -9,16 +9,16 @@
   synthetic constructor •() → self::C<self::C::T%>
     : super core::Object::•()
     ;
-[@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 {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method test3r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>> (skip check)] generic-covariant-impl self::C<asy::Future<self::C::T%>> x) → void {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method test4r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>> (skip check)] generic-covariant-impl self::C<FutureOr<self::C::T%>> x) → void {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  method test5r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?>] generic-covariant-impl self::C<asy::Future<self::C::T%>> x) → void {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  method test6r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?> (skip check)] generic-covariant-impl self::C<FutureOr<self::C::T%>> x) → void {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  method test7r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?>] generic-covariant-impl self::C<self::C::T%> x) → void {}
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method test8r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>>] generic-covariant-impl self::C<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)] covariant-by-class 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)] covariant-by-class 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)] covariant-by-class 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)] covariant-by-class self::C<FutureOr<self::C::T%>> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method test3r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>> (skip check)] covariant-by-class self::C<asy::Future<self::C::T%>> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method test4r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>> (skip check)] covariant-by-class self::C<FutureOr<self::C::T%>> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  method test5r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?>] covariant-by-class self::C<asy::Future<self::C::T%>> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  method test6r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?> (skip check)] covariant-by-class self::C<FutureOr<self::C::T%>> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  method test7r([@vm.inferred-type.metadata=#lib::C<FutureOr<dart.core::int>?>] covariant-by-class self::C<self::C::T%> x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method test8r([@vm.inferred-type.metadata=#lib::C<dart.async::Future<dart.core::int>>] covariant-by-class self::C<self::C::T%> x) → void {}
 }
 static method main() → dynamic {
   dynamic c = new self::C::•<core::int>();
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 657e7ba..1212909 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
@@ -138,7 +138,7 @@
   #C1 = #bar
   #C2 = <core::Type*>[]
   #C3 = <dynamic>[]
-  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C4 = <core::Symbol*, dynamic>{)
   #C5 = #foo
   #C6 = #bazz
   #C7 = null
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
index 57eda05..97683a2 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
@@ -23,13 +23,13 @@
   }
 }
 abstract class B extends core::Object {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract method method2(covariant dynamic arg) → void;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract method method2(covariant-by-declaration dynamic arg) → void;
 }
 class C extends core::Object implements self::B {
   synthetic constructor •() → self::C
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method method2(covariant self::T0 t0) → void {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method method2(covariant-by-declaration self::T0 t0) → void {
     [@vm.direct-call.metadata=#lib::T2.foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}(){() → void};
   }
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart.expect
index 9578649..ba58887 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/pragmas.dart.expect
@@ -16,9 +16,9 @@
   synthetic constructor •() → self::Foo
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C12
   method bar() → void {
-    @#C17
+    @#C16
     function bazz() → void {}
     bazz(){() → void};
   }
@@ -37,11 +37,10 @@
   #C8 = self::B {y:#C7}
   #C9 = 4
   #C10 = "hey"
-  #C11 = <dynamic>[#C6, #C8, #C9, #C10]
-  #C12 = core::_ImmutableMap<core::int*, core::Object*> {_kvPairs:#C11}
-  #C13 = core::pragma {name:#C5, options:#C12}
-  #C14 = "test3"
-  #C15 = 12
-  #C16 = self::C {z:#C15}
-  #C17 = core::pragma {name:#C14, options:#C16}
+  #C11 = <core::int*, core::Object*>{#C6:#C8, #C9:#C10)
+  #C12 = core::pragma {name:#C5, options:#C11}
+  #C13 = "test3"
+  #C14 = 12
+  #C15 = self::C {z:#C14}
+  #C16 = core::pragma {name:#C13, options:#C15}
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/compile_protos.sh b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/compile_protos.sh
index 8031891..d4f6355 100755
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/compile_protos.sh
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/compile_protos.sh
@@ -16,4 +16,4 @@
 protoc --dart_out=$GENERATED_DIR -I$DIR/protos $DIR/protos/*.proto
 rm $GENERATED_DIR/*.pbenum.dart $GENERATED_DIR/*.pbjson.dart $GENERATED_DIR/*.pbserver.dart
 
-dartfmt -w $DIR/lib/generated
+dart format $DIR/lib/generated
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 55a1b78..a2ce7a5 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
@@ -35,14 +35,14 @@
 import "package:protobuf/protobuf.dart" as $pb;
 
 class FooKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "FooKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, (#C1) ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>((#C1) ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, (#C1) ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, (#C1) ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t1;
   constructor _() → self::FooKeep
@@ -80,8 +80,8 @@
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.clearField] [@vm.inferred-type.metadata=dart.core::Null? (skip check) (value: null)] this.{pro::GeneratedMessage::clearField}(){(core::int) → void};
 }
 class BarKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "BarKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "BarKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t2;
@@ -104,7 +104,7 @@
   }
 }
 class HasKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "HasKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "HasKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t3;
@@ -118,7 +118,7 @@
     return new self::HasKeep::_();
 }
 class ClearKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "ClearKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ClearKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t4;
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 9dd85ff..a36af4a 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
@@ -28,14 +28,14 @@
 import "package:protobuf/protobuf.dart" as $pb;
 
 class FooKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "FooKeep", createEmptyInstance: #C2) in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, (#C1) ?{core::String} "" : "barKeep", "barKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep", createEmptyInstance: #C2) in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>((#C1) ?{core::String} "" : "mapKeep", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, (#C1) ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, (#C1) ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t1;
   constructor _() → self::FooKeep
@@ -67,8 +67,8 @@
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.clearField] [@vm.inferred-type.metadata=dart.core::Null? (skip check) (value: null)] this.{pro::GeneratedMessage::clearField}(){(core::int) → void};
 }
 class BarKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "BarKeep", createEmptyInstance: #C3) in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::a}<core::int>(1, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "BarKeep", createEmptyInstance: #C3) in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t3;
@@ -85,7 +85,7 @@
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(0){(core::int) → core::int};
 }
 class HasKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "HasKeep", createEmptyInstance: #C4) in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "HasKeep", createEmptyInstance: #C4) in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t4;
@@ -99,7 +99,7 @@
     return new self::HasKeep::_();
 }
 class ClearKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t5 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "ClearKeep", createEmptyInstance: #C5) in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t5 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ClearKeep", createEmptyInstance: #C5) in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t5;
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 f925ae6..73b0430 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
@@ -42,14 +42,14 @@
 import "package:protobuf/protobuf.dart" as $pb;
 
 class FooKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "FooKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, (#C1) ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(3, (#C1) ?{core::String} "" : "mapKeep", "FooKeep.MapKeepEntry", "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::ZopDrop>(4, (#C1) ?{core::String} "" : "mapDrop", "FooKeep.MapDropEntry", "mapDrop", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, (#C1) ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, (#C1) ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, (#C1) ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(3, #C1 ?{core::String} "" : "mapKeep", "FooKeep.MapKeepEntry", "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::ZopDrop>(4, #C1 ?{core::String} "" : "mapDrop", "FooKeep.MapDropEntry", "mapDrop", #C3){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C5){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t1;
   constructor _() → self::FooKeep
@@ -86,9 +86,9 @@
   }
 }
 class BarKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "BarKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, (#C1) ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(2, (#C1) ?{core::String} "" : "bDrop", "bDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "BarKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep", "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(2, #C1 ?{core::String} "" : "bDrop", "bDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t2;
   constructor _() → self::BarKeep
@@ -111,7 +111,7 @@
   }
 }
 class HasKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "HasKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "HasKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t3;
@@ -127,7 +127,7 @@
     return new self::HasKeep::_();
 }
 class ClearKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "ClearKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ClearKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t4;
@@ -143,8 +143,8 @@
     return new self::ClearKeep::_();
 }
 class ZopDrop extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t5 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "ZopDrop") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::a}<core::int>(1, (#C1) ?{core::String} "" : "aDrop", "aDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t5 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ZopDrop") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aDrop", "aDrop"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t5.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t5;
   constructor _() → self::ZopDrop
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 0071356..c046050 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
@@ -38,14 +38,14 @@
 import "package:protobuf/protobuf.dart" as $pb;
 
 class FooKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "FooKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, (#C1) ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "FooKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::BarKeep>(1, #C1 ?{core::String} "" : "barKeep", "barKeep", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::BarKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>((#C1) ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.m] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::m}<core::String, self::BarKeep>(#C1 ?{core::String} "" : "mapKeep", #C2){(core::int, core::String, {defaultEnumValue: pro::ProtobufEnum?, entryClassName: core::String?, enumValues: core::List<pro::ProtobufEnum>?, keyFieldType: core::int?, packageName: pro::PackageName, protoName: core::String?, valueCreator: () →? pro::GeneratedMessage, valueFieldType: core::int?, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, (#C1) ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, (#C1) ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::a}<core::int>(5, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::HasKeep>(6, #C1 ?{core::String} "" : "hasKeep", "hasKeep", #C3){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::HasKeep}) → void};
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::aOM}<self::ClearKeep>(7, #C1 ?{core::String} "" : "clearKeep", "clearKeep", #C4){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::ClearKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t1;
   constructor _() → self::FooKeep
@@ -83,8 +83,8 @@
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.clearField] [@vm.inferred-type.metadata=dart.core::Null? (skip check) (value: null)] this.{pro::GeneratedMessage::clearField}(){(core::int) → void};
 }
 class BarKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "BarKeep") in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, (#C1) ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "BarKeep") in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.a] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::a}<core::int>(1, #C1 ?{core::String} "" : "aKeep"){(core::int, core::String, core::int, {defaultOrMaker: dynamic, enumValues: core::List<pro::ProtobufEnum>?, protoName: core::String?, subBuilder: () →? pro::GeneratedMessage, valueOf: (core::int) →? pro::ProtobufEnum?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t2;
@@ -107,7 +107,7 @@
   }
 }
 class HasKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "HasKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t3 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "HasKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t3.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t3;
@@ -121,7 +121,7 @@
     return new self::HasKeep::_();
 }
 class ClearKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "ClearKeep") in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t4 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "ClearKeep") in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.add] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::add}<Null>(0, null, null, null, null, null, null){(core::int, core::String, core::int?, dynamic, () →? pro::GeneratedMessage, (core::int) →? pro::ProtobufEnum?, core::List<pro::ProtobufEnum>?, {protoName: core::String?}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t4.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t4;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
index 63e55db..b188464 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
@@ -20,7 +20,7 @@
 import "package:protobuf/protobuf.dart" as $pb;
 
 class AKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "AKeep", #C2) in block {
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t1 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "AKeep", #C2) in block {
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t1.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t1;
   constructor _() → self::AKeep
@@ -33,8 +33,8 @@
     return new self::AKeep::_();
 }
 class NameManglingKeep extends pro::GeneratedMessage {
-[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•((#C1) ?{core::String} "" : "NameManglingKeep", #C6) in block {
-    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::aOM}<self::AKeep>((#C1) ?{core::String} "" : "clone", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::AKeep}) → void};
+[@vm.inferred-type.metadata=protobuf::BuilderInfo?]  static final field pro::BuilderInfo _i = let final pro::BuilderInfo #t2 = new pro::BuilderInfo::•(#C1 ?{core::String} "" : "NameManglingKeep", #C6) in block {
+    [@vm.direct-call.metadata=protobuf::BuilderInfo.aOM] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::aOM}<self::AKeep>(#C1 ?{core::String} "" : "clone", #C2){(core::int, core::String, {protoName: core::String?, subBuilder: () →? self::AKeep}) → void};
     [@vm.direct-call.metadata=protobuf::BuilderInfo.hasRequiredFields] [@vm.inferred-type.metadata=!? (skip check)] #t2.{pro::BuilderInfo::hasRequiredFields} = false;
   } =>#t2;
   constructor _() → self::NameManglingKeep
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart.expect
index 162174d..69b1559 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class _SplayTreeNode<Node extends self::_SplayTreeNode<self::_SplayTreeNode::Node> = self::_SplayTreeNode<dynamic>> extends core::Object {
-[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  generic-covariant-impl field self::_SplayTreeNode::Node? left = null;
+[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  covariant-by-class field self::_SplayTreeNode::Node? left = null;
   constructor •() → self::_SplayTreeNode<self::_SplayTreeNode::Node>
     : super core::Object::•()
     ;
@@ -17,7 +17,7 @@
   synthetic constructor •() → self::_SplayTree<self::_SplayTree::Node>
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method add(generic-covariant-impl self::_SplayTree::Node n) → dynamic {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method add(covariant-by-class self::_SplayTree::Node n) → dynamic {
     self::_SplayTree::Node? root = [@vm.direct-call.metadata=#lib::SplayTreeMap._root] [@vm.inferred-type.metadata=#lib::_SplayTreeMapNode<dynamic>] this.{self::_SplayTree::_root}{self::_SplayTree::Node?};
     ;
     core::print([@vm.direct-call.metadata=#lib::_SplayTreeNode.left] [@vm.inferred-type.metadata=dart.core::Null? (value: null)] root{self::_SplayTree::Node}.{self::_SplayTreeNode::left}{self::_SplayTree::Node?});
@@ -25,7 +25,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:5]  abstract get /*isLegacy*/ _root() → self::_SplayTree::Node?;
 }
 class SplayTreeMap<V extends core::Object? = dynamic> extends self::_SplayTree<self::_SplayTreeMapNode<self::SplayTreeMap::V%>> {
-[@vm.inferred-type.metadata=#lib::_SplayTreeMapNode<dynamic>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:5]  generic-covariant-impl field self::_SplayTreeMapNode<self::SplayTreeMap::V%>? _root;
+[@vm.inferred-type.metadata=#lib::_SplayTreeMapNode<dynamic>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:5]  covariant-by-class field self::_SplayTreeMapNode<self::SplayTreeMap::V%>? _root;
   synthetic constructor •() → self::SplayTreeMap<self::SplayTreeMap::V%>
     : self::SplayTreeMap::_root = new self::_SplayTreeMapNode::•<self::SplayTreeMap::V%>(), super self::_SplayTree::•()
     ;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart.expect
index 6ca7b29..30a35dc 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:core" as core;
 
-abstract class A extends core::Object implements core::Enum {
+abstract class A extends core::_Enum {
 }
 abstract class B extends core::Object {
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  abstract method foo() → void;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart.expect
index 37b6a68..4c3106f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart.expect
@@ -19,9 +19,9 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ catchError(core::Function onError) → asy::Future<self::B::T%>
     return [@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=! (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, core::List::unmodifiable<dynamic>([@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::_literal1<dynamic>(onError)), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C3: #C4}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::B::T%>;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → FutureOr<void>action) → asy::Future<self::B::T%>
-    return [@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=! (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, core::List::unmodifiable<dynamic>([@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::_literal1<dynamic>(action)), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::B::T%>;
+    return [@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=! (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, core::List::unmodifiable<dynamic>([@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::_literal1<dynamic>(action)), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C6))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::B::T%>;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ then<R extends core::Object? = dynamic>((self::B::T%) → FutureOr<self::B::then::R%>onValue, {core::Function? onError = #C4}) → asy::Future<self::B::then::R%>
-    return [@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=! (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, core::List::unmodifiable<core::Type*>([@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::Type*>] core::_GrowableList::_literal1<core::Type*>(self::B::then::R%)), core::List::unmodifiable<dynamic>([@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::_literal1<dynamic>(onValue)), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onError}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::B::then::R%>;
+    return [@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=! (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, core::List::unmodifiable<core::Type*>([@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::Type*>] core::_GrowableList::_literal1<core::Type*>(self::B::then::R%)), core::List::unmodifiable<dynamic>([@vm.inferred-type.metadata=dart.core::_GrowableList<dynamic>] core::_GrowableList::_literal1<dynamic>(onValue)), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C8: onError}))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::B::then::R%>;
 }
 static method createB<T extends core::Object? = dynamic>() → self::B<dynamic>
   return new self::B::•<self::createB::T%>();
@@ -34,8 +34,7 @@
   #C3 = #test
   #C4 = null
   #C5 = #whenComplete
-  #C6 = <dynamic>[]
-  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
-  #C8 = #then
-  #C9 = #onError
+  #C6 = <core::Symbol*, dynamic>{)
+  #C7 = #then
+  #C8 = #onError
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart
index 1abc669..e995a89 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart
@@ -37,4 +37,4 @@
   if (list.isNotEmpty) {
     new ConstClass().method(null as dynamic);
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart.expect
index 1f84d00..64e1bc1 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.dart.expect
@@ -6,21 +6,19 @@
 
 import "file:pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.lib.dart";
 
-abstract class UnusedEnum extends core::Object implements core::Enum {
+abstract class UnusedEnum extends core::_Enum {
 }
-class UsedEnum extends core::Object implements core::Enum /*isEnum*/  {
-[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] [@vm.unboxing-info.metadata=()->i]  final field core::int index;
-[@vm.inferred-type.metadata=dart.core::_OneByteString (value: "UsedEnum.usedValue")] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:2]  final field core::String _name;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method toString() → core::String
-    return [@vm.direct-call.metadata=#lib::UsedEnum._name] [@vm.inferred-type.metadata=dart.core::_OneByteString (value: "UsedEnum.usedValue")] this.{self::UsedEnum::_name}{core::String};
+class UsedEnum extends core::_Enum /*isEnum*/  {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method toString() → core::String
+    return "UsedEnum.${[@vm.direct-call.metadata=dart.core::_Enum._name] this.{core::_Enum::_name}{core::String}}";
 }
 abstract class UnusedInterface extends core::Object {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract get /*isLegacy*/ usedInterfaceField() → core::int?;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract set /*isLegacy*/ usedInterfaceField(core::int? value) → void;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  abstract get /*isLegacy*/ usedInterfaceField() → core::int?;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  abstract set /*isLegacy*/ usedInterfaceField(core::int? value) → void;
 }
 class UsedClass extends core::Object implements self::UnusedInterface {
-[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  field core::int? usedField = null;
-[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field core::int? usedInterfaceField = null;
+[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field core::int? usedField = null;
+[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  field core::int? usedInterfaceField = null;
   synthetic constructor •() → self::UsedClass
     : super core::Object::•()
     ;
@@ -40,20 +38,19 @@
 }
 constants  {
   #C1 = 1
-  #C2 = "UsedEnum.usedValue"
+  #C2 = "usedValue"
   #C3 = self::UsedEnum {index:#C1, _name:#C2}
 }
 library tree_shake_enum_from_lib.lib.dart /*isNonNullableByDefault*/;
 import self as self;
 import "dart:core" as core;
 
-abstract class ConstEnum extends core::Object implements core::Enum {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3273]  abstract get /*isLegacy*/ index() → core::int;
+abstract class ConstEnum extends core::_Enum {
 }
 class ConstClass extends core::Object {
   synthetic constructor •() → self::ConstClass
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3274,getterSelectorId:3275]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::ConstEnum e) → core::int
-    return [@vm.inferred-type.metadata=!] e.{self::ConstEnum::index}{core::int};
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3265,getterSelectorId:3266]  method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::ConstEnum e) → core::int
+    return [@vm.inferred-type.metadata=!] e.{core::_Enum::index}{core::int};
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.lib.dart b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.lib.dart
index af82d68..bc873dc 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.lib.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tree_shake_enum_from_lib.lib.dart
@@ -6,4 +6,4 @@
 
 class ConstClass {
   int method(ConstEnum e) => e.index;
-}
\ No newline at end of file
+}
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 7ac9fc8..b9f5060 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
@@ -15,7 +15,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method testT1() → dynamic
     return _in::unsafeCast<self::B::T%>(#C1);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method testT2negative() → dynamic
-    return (#C2) as{ForNonNullableByDefault} self::B::T%;
+    return #C2 as{ForNonNullableByDefault} self::B::T%;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method testT3() → dynamic
     return _in::unsafeCast<self::B::T%>(#C2);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=()->i]  method testNullableT1() → dynamic
@@ -26,7 +26,7 @@
 [@vm.unboxing-info.metadata=()->i]static method testInt1() → dynamic
   return _in::unsafeCast<core::int>(#C1);
 static method testInt2negative() → dynamic
-  return (#C2) as{ForNonNullableByDefault} core::int;
+  return #C2 as{ForNonNullableByDefault} core::int;
 [@vm.unboxing-info.metadata=()->i]static method testNullableInt1() → dynamic
   return _in::unsafeCast<core::int?>(#C1);
 static method testNullableInt2() → dynamic
@@ -42,7 +42,7 @@
 static method testAOfNum2negative([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) → dynamic
   return x as{ForNonNullableByDefault} self::A<core::num>;
 static method testAOfNum3negative() → dynamic
-  return (#C2) as{ForNonNullableByDefault} self::A<core::num>;
+  return #C2 as{ForNonNullableByDefault} self::A<core::num>;
 static method testAOfNullableNum([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) → dynamic
   return _in::unsafeCast<self::A<core::num?>>(x);
 static method testNullableAOfNum() → dynamic
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 057cfe3..3310998 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
@@ -16,13 +16,13 @@
     ;
 }
 abstract class C<T extends core::Object? = dynamic> extends core::Object {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1]  abstract set /*isLegacy*/ bar(generic-covariant-impl self::C::T? value) → void;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1]  abstract set /*isLegacy*/ bar(covariant-by-class self::C::T? value) → void;
 }
 class D extends core::Object implements self::C<core::int> {
   synthetic constructor •() → self::D
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1]  set /*isLegacy*/ bar(generic-covariant-impl core::int? value) → void;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1]  set /*isLegacy*/ bar(covariant-by-class 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:2] [@vm.unboxing-info.metadata=()->i]  abstract get /*isLegacy*/ bar() → core::int;
diff --git a/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect b/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect
index 4bf2ed9..566d6a0 100644
--- a/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect
+++ b/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect
@@ -21,7 +21,7 @@
   }
 }
 static method testAndConditions() → void {
-  if((#C1) && self::foo()!) {
+  if(#C1 && self::foo()!) {
     core::print("1_yes");
   }
 }
@@ -29,7 +29,7 @@
   {
     core::print("1_yes");
   }
-  if((#C2) || self::foo()!) {
+  if(#C2 || self::foo()!) {
     core::print("2_yes");
   }
   {
diff --git a/pkg/vm/tool/compare_il b/pkg/vm/tool/compare_il
new file mode 100755
index 0000000..65ad55e
--- /dev/null
+++ b/pkg/vm/tool/compare_il
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# 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.
+
+# Script for comparing IL generated from IL tests.
+
+set -e
+
+function follow_links() {
+  file="$1"
+  while [ -h "$file" ]; do
+    # On Mac OS, readlink -f doesn't work.
+    file="$(readlink "$file")"
+  done
+  echo "$file"
+}
+
+# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
+PROG_NAME="$(follow_links "$BASH_SOURCE")"
+
+# Handle the case where dart-sdk/bin has been symlinked to.
+CUR_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
+
+SDK_DIR="$CUR_DIR/../../.."
+
+# TODO(kustermann): For windows as well as for hosts running on arm, our
+# checked-in dart binaries must be adjusted.
+if [[ `uname` == 'Darwin' ]]; then
+  DART="$SDK_DIR/tools/sdks/dart-sdk/bin/dart"
+else
+  DART="$SDK_DIR/tools/sdks/dart-sdk/bin/dart"
+fi
+
+exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/compare_il.dart" $@
diff --git a/pkg/vm/tool/compare_il.bat b/pkg/vm/tool/compare_il.bat
new file mode 100644
index 0000000..009aca7
--- /dev/null
+++ b/pkg/vm/tool/compare_il.bat
@@ -0,0 +1,17 @@
+@echo off
+REM Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+REM Script for comparing IL generated from IL tests.
+
+set SCRIPTPATH=%~dp0
+
+REM Does the path have a trailing slash? If so, remove it.
+if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
+
+set SDK_DIR=%SCRIPTPATH%/../../../
+
+set DART=%SDK_DIR%/tools/sdks/dart-sdk/bin/dart.exe
+
+"%DART%" %DART_VM_OPTIONS% "%SDK_DIR%/pkg/vm/bin/compare_il.dart" %*
diff --git a/pkg/vm/tool/gen_kernel b/pkg/vm/tool/gen_kernel
index d0494c7..71f4f8a 100755
--- a/pkg/vm/tool/gen_kernel
+++ b/pkg/vm/tool/gen_kernel
@@ -29,10 +29,8 @@
 # checked-in dart binaries must be adjusted.
 if [[ `uname` == 'Darwin' ]]; then
   DART="$SDK_DIR/tools/sdks/dart-sdk/bin/dart"
-  OUT_DIR="$SDK_DIR/xcodebuild"
 else
   DART="$SDK_DIR/tools/sdks/dart-sdk/bin/dart"
-  OUT_DIR="$SDK_DIR/out"
 fi
 
 exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
diff --git a/pkg/vm_service/README.md b/pkg/vm_service/README.md
index 11194fd..6c47181 100644
--- a/pkg/vm_service/README.md
+++ b/pkg/vm_service/README.md
@@ -7,11 +7,11 @@
 ## Usage
 
 See the
-[example](https://github.com/dart-lang/sdk/blob/master/pkg/vm_service/example/vm_service_tester.dart)
+[example](https://github.com/dart-lang/sdk/blob/main/pkg/vm_service/example/vm_service_tester.dart)
 for a simple use of the library's API.
 
 The VM Service Protocol spec can be found at
-[github.com/dart-lang/sdk/runtime/vm/service/service.md](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md).
+[github.com/dart-lang/sdk/runtime/vm/service/service.md](https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md).
 
 ## Features and bugs
 
diff --git a/pkg/vm_service/test/cpu_samples_stream_test.dart b/pkg/vm_service/test/cpu_samples_stream_test.dart
index 8ef6ff6..27e0d5d 100644
--- a/pkg/vm_service/test/cpu_samples_stream_test.dart
+++ b/pkg/vm_service/test/cpu_samples_stream_test.dart
@@ -8,7 +8,6 @@
 // import 'package:test/test.dart';
 import 'package:vm_service/vm_service.dart';
 
-import 'common/service_test_common.dart';
 import 'common/test_helper.dart';
 
 fib(int n) {
diff --git a/pkg/vm_service/test/get_http_profile_test.dart b/pkg/vm_service/test/get_http_profile_test.dart
index b111440..d812476 100644
--- a/pkg/vm_service/test/get_http_profile_test.dart
+++ b/pkg/vm_service/test/get_http_profile_test.dart
@@ -106,6 +106,7 @@
   for (int i = 0; i < 10; ++i) {
     final future = executeWithRandomDelay(() async {
       final r = await client.getUrl(randomlyAddRequestParams(address));
+      r.headers.add('cookie-eater', 'Cookie-Monster !');
       final response = await r.close();
       await response.drain();
     });
@@ -287,6 +288,24 @@
 Future<void> hasValidHttpPUTs(HttpProfile profile) =>
     hasValidHttpRequests(profile, 'PUT');
 
+void hasDefaultRequestHeaders(HttpProfile profile) {
+  for(final request in profile.requests) {
+    if(!request.request!.hasError) {
+      expect(request.request?.headers['host'], isNotNull);
+      expect(request.request?.headers['user-agent'], isNotNull);
+    }
+  }
+}
+
+void hasCustomRequestHeaders(HttpProfile profile) {
+  var requests = profile.requests.where((e) => e.method == "GET").toList();
+  for(final request in requests) {
+    if(!request.request!.hasError) {
+      expect(request.request?.headers['cookie-eater'], isNotNull);
+    }
+  }
+}
+
 var tests = <IsolateTest>[
   (VmService service, IsolateRef isolateRef) async {
     vmService = service;
@@ -303,6 +322,8 @@
     await hasValidHttpPATCHs(httpProfile);
     await hasValidHttpPOSTs(httpProfile);
     await hasValidHttpPUTs(httpProfile);
+    hasDefaultRequestHeaders(httpProfile);
+    hasCustomRequestHeaders(httpProfile);
   },
 ];
 
diff --git a/pkg/vm_service/tool/generate.dart b/pkg/vm_service/tool/generate.dart
index b9ef51f..79d74eb 100644
--- a/pkg/vm_service/tool/generate.dart
+++ b/pkg/vm_service/tool/generate.dart
@@ -46,9 +46,9 @@
   dart.api.parse(nodes);
   dart.api.generate(generator);
   outputFile.writeAsStringSync(generator.toString());
-  ProcessResult result = Process.runSync('dartfmt', ['-w', outDirPath]);
+  ProcessResult result = Process.runSync('dart', ['format', outDirPath]);
   if (result.exitCode != 0) {
-    print('dartfmt: ${result.stdout}\n${result.stderr}');
+    print('dart format: ${result.stdout}\n${result.stderr}');
     throw result.exitCode;
   }
 
@@ -103,9 +103,9 @@
   dart.api.parse(nodes);
   dart.api.generateAsserts(generator);
   outputFile.writeAsStringSync(generator.toString());
-  ProcessResult result = Process.runSync('dartfmt', ['-w', outDirPath]);
+  ProcessResult result = Process.runSync('dart', ['format', outDirPath]);
   if (result.exitCode != 0) {
-    print('dartfmt: ${result.stdout}\n${result.stderr}');
+    print('dart format: ${result.stdout}\n${result.stderr}');
     throw result.exitCode;
   }
 
diff --git a/runtime/bin/dartdev_isolate.cc b/runtime/bin/dartdev_isolate.cc
index 62701b7..0f75c8e 100644
--- a/runtime/bin/dartdev_isolate.cc
+++ b/runtime/bin/dartdev_isolate.cc
@@ -26,7 +26,7 @@
       Dart_CloseNativePort(send_port_id);                                      \
     }                                                                          \
     Dart_ExitScope();                                                          \
-    Dart_ExitIsolate();                                                        \
+    Dart_ShutdownIsolate();                                                    \
     return;                                                                    \
   }
 
@@ -237,7 +237,7 @@
     ProcessError("Unable to find 'main' in root library 'dartdev'",
                  kErrorExitCode);
     Dart_ExitScope();
-    Dart_ExitIsolate();
+    Dart_ShutdownIsolate();
     return;
   }
 
diff --git a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
index adcdc07..a705710 100644
--- a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
+++ b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
@@ -1094,12 +1094,78 @@
   return x;
 }
 
-static void* FfiNativeResolver(const char* name) {
-  if (strcmp(name, "ReturnIntPtr") == 0) {
+intptr_t PassAsHandle(Dart_Handle handle) {
+  intptr_t result = 0;
+  ENSURE(!Dart_IsError(Dart_GetNativeInstanceField(handle, 0, &result)));
+  return result;
+}
+
+intptr_t PassAsPointer(void* ptr) {
+  return reinterpret_cast<intptr_t>(ptr);
+}
+
+intptr_t PassAsPointerAndValue(void* ptr, intptr_t value) {
+  return reinterpret_cast<intptr_t>(value);
+}
+
+intptr_t PassAsValueAndPointer(intptr_t value, void* ptr) {
+  return reinterpret_cast<intptr_t>(value);
+}
+
+intptr_t* AllocateResource(intptr_t value) {
+  return new intptr_t(value);
+}
+
+void DeleteResource(intptr_t* resource) {
+  delete resource;
+}
+
+intptr_t GetResourceValue(intptr_t* resource) {
+  return *resource;
+}
+
+void DummyResourceFinalizer(void* isolate_peer, void* peer) {
+  *reinterpret_cast<intptr_t*>(peer) = 0;
+}
+
+void SetResourceFinalizer(Dart_Handle handle, intptr_t* resource) {
+  Dart_NewFinalizableHandle(handle, resource, sizeof(Dart_FinalizableHandle),
+                            DummyResourceFinalizer);
+}
+
+static void* FfiNativeResolver(const char* name, uintptr_t args_n) {
+  if (strcmp(name, "Dart_SetNativeInstanceField") == 0 && args_n == 3) {
+    return reinterpret_cast<void*>(Dart_SetNativeInstanceField);
+  }
+  if (strcmp(name, "IsThreadInGenerated") == 0 && args_n == 0) {
+    return reinterpret_cast<void*>(IsThreadInGenerated);
+  }
+  if (strcmp(name, "ReturnIntPtr") == 0 && args_n == 1) {
     return reinterpret_cast<void*>(ReturnIntPtr);
   }
-  if (strcmp(name, "IsThreadInGenerated") == 0) {
-    return reinterpret_cast<void*>(IsThreadInGenerated);
+  if (strcmp(name, "PassAsHandle") == 0 && args_n == 1) {
+    return reinterpret_cast<void*>(PassAsHandle);
+  }
+  if (strcmp(name, "PassAsPointer") == 0 && args_n == 1) {
+    return reinterpret_cast<void*>(PassAsPointer);
+  }
+  if (strcmp(name, "PassAsPointerAndValue") == 0 && args_n == 2) {
+    return reinterpret_cast<void*>(PassAsPointerAndValue);
+  }
+  if (strcmp(name, "PassAsValueAndPointer") == 0 && args_n == 2) {
+    return reinterpret_cast<void*>(PassAsValueAndPointer);
+  }
+  if (strcmp(name, "AllocateResource") == 0 && args_n == 1) {
+    return reinterpret_cast<void*>(AllocateResource);
+  }
+  if (strcmp(name, "DeleteResource") == 0 && args_n == 1) {
+    return reinterpret_cast<void*>(DeleteResource);
+  }
+  if (strcmp(name, "GetResourceValue") == 0 && args_n == 1) {
+    return reinterpret_cast<void*>(GetResourceValue);
+  }
+  if (strcmp(name, "SetResourceFinalizer") == 0 && args_n == 2) {
+    return reinterpret_cast<void*>(SetResourceFinalizer);
   }
   // This should be unreachable in tests.
   ENSURE(false);
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index d3ca835..64f1715 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -538,7 +538,7 @@
   CHECK_RESULT(result);
 
   int vm_service_server_port = INVALID_VM_SERVICE_SERVER_PORT;
-  if (Options::disable_dart_dev()) {
+  if (Options::disable_dart_dev() || Options::disable_dds()) {
     vm_service_server_port = Options::vm_service_server_port();
   } else if (Options::vm_service_server_port() !=
              INVALID_VM_SERVICE_SERVER_PORT) {
@@ -549,12 +549,14 @@
   // the following scenarios:
   // - The DartDev CLI is disabled (CLI isolate starts DDS) and VM service is
   //   enabled.
+  // - DDS is disabled.
   // TODO(bkonyi): do we want to tie DevTools / DDS to the CLI in the long run?
-  bool wait_for_dds_to_advertise_service = !Options::disable_dart_dev();
+  bool wait_for_dds_to_advertise_service =
+      !(Options::disable_dart_dev() || Options::disable_dds());
   // Load embedder specific bits and return.
   if (!VmService::Setup(
-          Options::disable_dart_dev() ? Options::vm_service_server_ip()
-                                      : DEFAULT_VM_SERVICE_SERVER_IP,
+          !wait_for_dds_to_advertise_service ? Options::vm_service_server_ip()
+                                             : DEFAULT_VM_SERVICE_SERVER_IP,
           vm_service_server_port, Options::vm_service_dev_mode(),
           Options::vm_service_auth_disabled(),
           Options::vm_write_service_info_filename(), Options::trace_loading(),
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index 44386ec..e213e70 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -454,6 +454,11 @@
       } else if (IsOption(argv[i], "no-serve-devtools")) {
         serve_devtools = false;
         skipVmOption = true;
+      } else if (IsOption(argv[i], "dds")) {
+        // This flag is set by default in dartdev, so we ignore it. --no-dds is
+        // a VM flag as disabling DDS changes how we configure the VM service,
+        // so we don't need to handle that case here.
+        skipVmOption = true;
       }
       if (!skipVmOption) {
         temp_vm_options.AddArgument(argv[i]);
@@ -623,7 +628,8 @@
       if (!run_command && strcmp(argv[i - 1], "run") == 0) {
         run_command = true;
       }
-      if (!Options::disable_dart_dev() && enable_vm_service_ && run_command) {
+      if (!Options::disable_dart_dev() && !Options::disable_dds() &&
+          enable_vm_service_ && run_command) {
         const char* dds_format_str = "--launch-dds=%s\\:%d";
         size_t size =
             snprintf(nullptr, 0, dds_format_str, vm_service_server_ip(),
diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h
index 66e6fde..e1daacf 100644
--- a/runtime/bin/main_options.h
+++ b/runtime/bin/main_options.h
@@ -44,6 +44,7 @@
   V(suppress_core_dump, suppress_core_dump)                                    \
   V(enable_service_port_fallback, enable_service_port_fallback)                \
   V(disable_dart_dev, disable_dart_dev)                                        \
+  V(no_dds, disable_dds)                                                       \
   V(long_ssl_cert_evaluation, long_ssl_cert_evaluation)                        \
   V(bypass_trusting_system_roots, bypass_trusting_system_roots)                \
   V(delayed_filewatch_callback, delayed_filewatch_callback)                    \
diff --git a/runtime/docs/gc.md b/runtime/docs/gc.md
index 1daea96..dc35cb5 100644
--- a/runtime/docs/gc.md
+++ b/runtime/docs/gc.md
@@ -1,6 +1,6 @@
 # Garbage Collection
 
-The Dart VM has a generational garbage collector with two generations. The new generation is collected by a parallel, stop-the-world semispace [scavenger](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/scavenger.h). The old generation is collected by concurrent-[mark](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/marker.h)-concurrent-[sweep](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/sweeper.h) or by concurrent-mark-parallel-[compact](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/compactor.h).
+The Dart VM has a generational garbage collector with two generations. The new generation is collected by a parallel, stop-the-world semispace [scavenger](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/scavenger.h). The old generation is collected by concurrent-[mark](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/marker.h)-concurrent-[sweep](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/sweeper.h) or by concurrent-mark-parallel-[compact](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/compactor.h).
 
 ## Object representation
 
@@ -37,7 +37,7 @@
 
 Any non-GC thread or task that can allocate, read or write to the heap is called a "mutator" (because it can mutate the object graph).
 
-Some phases of GC require that the heap is not being used by a mutator; we call these "[safepoint](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/safepoint.h) operations". Examples of safepoint operations include marking roots at the beginning of concurrent marking and the entirety of a scavenge.
+Some phases of GC require that the heap is not being used by a mutator; we call these "[safepoint](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/safepoint.h) operations". Examples of safepoint operations include marking roots at the beginning of concurrent marking and the entirety of a scavenge.
 
 To perform these operations, all mutators need to temporarily stop accessing the heap; we say that these mutators have reached a "safepoint". A mutator that has reached a safepoint will not resume accessing the heap (leave the safepoint) until the safepoint operation is complete. In addition to not accessing the heap, a mutator at a safepoint must not hold any pointers into the heap unless these pointers can be visited by the GC. For code in the VM runtime, this last property means holding only handles and no ObjectPtr nor UntaggedObject. Examples of places that might enter a safepoint include allocations, stack overflow checks, and transitions between compiled code and the runtime and native code.
 
@@ -59,7 +59,7 @@
 
 During the marking phase, the collector visits each of the root pointers. If the target object is an old-space object and its mark bit is clear, the mark bit is set and the target added to the marking stack (grey set). The collector then removes and visits objects in the marking stack, marking more old-space objects and adding them to the marking stack, until the marking stack is empty. At this point, all reachable objects have their mark bits set and all unreachable objects have their mark bits clear.
 
-During the sweeping phase, the collector visits each old-space object. If the mark bit is clear, the object's memory is added to a [free list](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/freelist.h) to be used for future allocations. Otherwise the object's mark bit is cleared. If every object on some page is unreachable, the page is released to the OS.
+During the sweeping phase, the collector visits each old-space object. If the mark bit is clear, the object's memory is added to a [free list](https://github.com/dart-lang/sdk/blob/main/runtime/vm/heap/freelist.h) to be used for future allocations. Otherwise the object's mark bit is cleared. If every object on some page is unreachable, the page is released to the OS.
 
 ### New-Space as Roots
 
diff --git a/runtime/docs/index.md b/runtime/docs/index.md
index e446544..4a63f9e 100644
--- a/runtime/docs/index.md
+++ b/runtime/docs/index.md
@@ -266,7 +266,7 @@
 ![Snapshots](images/snapshot-with-code.png)
 
 !!! sourcecode "Source to read"
-    @{runtime/vm/clustered_snapshot.cc} handles serialization and deserialization of snapshots. A family of API functions `Dart_CreateXyzSnapshot[AsAssembly]` are responsible for writing out snapshots of the heap (e.g. @{Dart_CreateAppJITSnapshotAsBlobs} and @{Dart_CreateAppAOTSnapshotAsAssembly}). On the other hand @{Dart_CreateIsolateGroup} optionally takes snapshot data to start an isolate from.
+    @{runtime/vm/app_snapshot.cc} handles serialization and deserialization of snapshots. A family of API functions `Dart_CreateXyzSnapshot[AsAssembly]` are responsible for writing out snapshots of the heap (e.g. @{Dart_CreateAppJITSnapshotAsBlobs} and @{Dart_CreateAppAOTSnapshotAsAssembly}). On the other hand @{Dart_CreateIsolateGroup} optionally takes snapshot data to start an isolate from.
 
 ### Running from AppJIT snapshots
 
@@ -376,7 +376,7 @@
 
 ![AOT IC: dictionary](images/aot-ic-dictionary.png)
 
-[what-is-kernel]: https://github.com/dart-lang/sdk/blob/master/pkg/kernel/README.md
+[what-is-kernel]: https://github.com/dart-lang/sdk/blob/main/pkg/kernel/README.md
 [pkg-front_end]: https://github.com/dart-lang/sdk/tree/master/pkg/front_end
 
 ## Runtime System
@@ -390,4 +390,4 @@
 ## TODO
 
 1. Document the difference between CoreJIT and AppJIT snapshots.
-2. Document that switchable calls are used in the unoptimized code as well.
\ No newline at end of file
+2. Document that switchable calls are used in the unoptimized code as well.
diff --git a/runtime/docs/infra/il_tests.md b/runtime/docs/infra/il_tests.md
new file mode 100644
index 0000000..8400b6e
--- /dev/null
+++ b/runtime/docs/infra/il_tests.md
@@ -0,0 +1,86 @@
+# Writing IL tests for AOT compiler
+
+Usually optimized IL strongly depends on TFA results and which makes it
+difficult to test certain AOT optimizations through `run_vm_tests`.
+
+In such cases you can attempt to write an IL test instead. In these tests
+test runner will run full AOT pipeline (TFA + `gen_snapshot`), will instruct
+`gen_snapshot` to dump flow graphs of specific methods and then run
+`pkg/vm/tool/compare_il` helper script to compare expectations. Here is how you
+create an IL test.
+
+IL tests are placed in files ending with `_il_test.dart`.
+
+Each IL test should contain one or more _IL matching blocks_, which have the
+following format:
+
+```dart
+// MatchIL[AOT]=functionName
+//   comment
+// __ op
+//   comment
+// __ op
+// __ op
+// __ op
+```
+
+Each section starts with a `// MatchIL[AOT]=functionName` line which contains
+the name (or a substring of a name) of the function for which IL should be
+matched.
+
+`// MatchIL[AOT]=...` line is followed by some number of comment lines `//`,
+where lines starting with `// __ ` specify _an instruction matcher_ and the rest
+are ignored (they just act as normal comments).
+
+`gen_snapshot` will be instructed (via `--print-flow-graph-optimized` and
+`--print-flow-graph-filter=functionName,...` flags) to dump IL for all
+functions names specified in IL matching blocks.
+
+After that `pkg/vm/tool/compare_il` script will be used to compare the dumps
+to actual expectations: by checking that dumped flow graph starts with the
+expected sequence of commands (ignoring some instructions like `ParallelMove`).
+
+## Example
+
+```dart
+// MatchIL[AOT]=factorial
+// __ GraphEntry
+// __ FunctionEntry
+// __ CheckStackOverflow
+// __ Branch(EqualityCompare)
+@pragma('vm:never-inline')
+int factorial(int value) => value == 1 ? value : value * factorial(value - 1);
+```
+
+This test specifies that the graph for `factorial` should start with a sequence
+`GraphEntry`, `FunctionEntry`, `CheckStackOverflow`, `Branch(EqualityCompare)`.
+
+If the graph has a different shape the test will fail, e.g. given the graph
+
+```
+*** BEGIN CFG
+After AllocateRegisters
+==== file:///.../src/dart/sdk/runtime/tests/vm/dart/aot_prefer_equality_comparison_il_test.dart_::_factorial (RegularFunction)
+  0: B0[graph]:0 {
+      v3 <- Constant(#1) [1, 1] T{_Smi}
+      v19 <- UnboxedConstant(#1 int64) T{_Smi}
+}
+  2: B1[function entry]:2 {
+      v2 <- Parameter(0) [-9223372036854775808, 9223372036854775807] T{int}
+}
+  4:     CheckStackOverflow:8(stack=0, loop=0)
+  5:     ParallelMove rcx <- S+2
+  6:     v17 <- BoxInt64(v2) [-9223372036854775808, 9223372036854775807] T{int}
+  7:     ParallelMove rax <- rax
+  8:     Branch if StrictCompare(===, v17 T{int}, v3) T{bool} goto (3, 4)
+```
+
+we will get:
+
+```
+Unhandled exception:
+Failed to match graph of ==== file:///.../src/dart/sdk/runtime/tests/vm/dart/aot_prefer_equality_comparison_il_test.dart_::_factorial (RegularFunction) to expectations for factorial at instruction 3: got BoxInt64 expected Branch(EqualityCompare)
+#0      main (file:///.../src/dart/sdk/pkg/vm/bin/compare_il.dart:37:9)
+#1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:285:32)
+#2      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:187:12)
+```
diff --git a/runtime/docs/pragmas.md b/runtime/docs/pragmas.md
index 0211a75..589699c 100644
--- a/runtime/docs/pragmas.md
+++ b/runtime/docs/pragmas.md
@@ -10,6 +10,7 @@
 | `vm:never-inline` | [Never inline a function or method](compiler/pragmas_recognized_by_compiler.md#requesting-a-function-never-be-inlined) |
 | `vm:prefer-inline` | [Inline a function or method when possible](compiler/pragmas_recognized_by_compiler.md#requesting-a-function-be-inlined) |
 | `vm:notify-debugger-on-exception` | Marks a function that catches exceptions, making the VM treat any caught exception as if they were uncaught. This can be used to notify an attached debugger during debugging, without pausing the app during regular execution. |
+| `vm:external-name` | Allows to specify an external (native) name for an `external` function. This name is used to lookup native implementation via native resolver associated with the current library through embedding APIs. This is a replacement for legacy VM specific `native "name"` syntax. |
 
 ## Unsafe pragmas for general use
 
diff --git a/runtime/docs/types.md b/runtime/docs/types.md
index a14ba1b..181debf 100644
--- a/runtime/docs/types.md
+++ b/runtime/docs/types.md
@@ -1,6 +1,6 @@
 # Representation of Types
 
-The Dart VM keeps track of the runtime type of Dart objects (also called *instances*) allocated in the heap by storing information in the objects themselves.  Heap objects contain a header and zero or more fields that can point to further objects.  Small integer objects (*Smi*) are not allocated as separate instances in the heap, but appear as immediate fields of instances. They are identified by their least significant bit being zero, as opposed to tagged object pointers whose least significant bit is one.  Refer to the document [gc.md](https://github.com/dart-lang/sdk/blob/master/runtime/docs/gc.md) for a description of objects and tagged object pointers.
+The Dart VM keeps track of the runtime type of Dart objects (also called *instances*) allocated in the heap by storing information in the objects themselves.  Heap objects contain a header and zero or more fields that can point to further objects.  Small integer objects (*Smi*) are not allocated as separate instances in the heap, but appear as immediate fields of instances. They are identified by their least significant bit being zero, as opposed to tagged object pointers whose least significant bit is one.  Refer to the document [gc.md](https://github.com/dart-lang/sdk/blob/main/runtime/docs/gc.md) for a description of objects and tagged object pointers.
 
 ## Runtime Type of an Instance
 
@@ -27,7 +27,7 @@
 
 ## AbstractType
 
-The VM declares the class `AbstractType` as a placeholder to store a concrete type. The following classes extend `AbstractType`: `Type`, `FunctionType`, `TypeParameter`, and `TypeRef`. The latter one, `TypeRef` is used to break cycles in recursive type graphs. More on it later. `AbstractType` declares several virtual methods that may be overridden by concrete types. See its declaration in [object.h](https://github.com/dart-lang/sdk/blob/master/runtime/vm/object.h).
+The VM declares the class `AbstractType` as a placeholder to store a concrete type. The following classes extend `AbstractType`: `Type`, `FunctionType`, `TypeParameter`, and `TypeRef`. The latter one, `TypeRef` is used to break cycles in recursive type graphs. More on it later. `AbstractType` declares several virtual methods that may be overridden by concrete types. See its declaration in [object.h](https://github.com/dart-lang/sdk/blob/main/runtime/vm/object.h).
 
 ## TypeArguments
 
@@ -145,7 +145,7 @@
 D<D<D<T>>>: D[D<D<D<D<T>>>>, D<D<T>>]
 ...
 ```
-The representation is divergent and therefore not possible. The VM detects non-contractive types (search for `ClassFinalizer::CheckRecursiveType` in the [class finalizer](https://github.com/dart-lang/sdk/blob/master/runtime/vm/class_finalizer.cc)) and reports an error. These non-contractive types make no sense in real programs and rejecting them is not an issue at all.
+The representation is divergent and therefore not possible. The VM detects non-contractive types (search for `ClassFinalizer::CheckRecursiveType` in the [class finalizer](https://github.com/dart-lang/sdk/blob/main/runtime/vm/class_finalizer.cc)) and reports an error. These non-contractive types make no sense in real programs and rejecting them is not an issue at all.
 
 ## Compile Time Type
 
@@ -216,7 +216,7 @@
 
 ## Finalization
 
-Types read from kernel files (produced by the Common Front End) need finalization before being used in the VM runtime. Finalization consists in flattening type argument vectors and in assigning indices to type parameters. A generic type provided by CFE will always have as many type arguments as the number of type parameters declared by the type’s class. As explained above, type arguments get prepended to the type argument vector, so that the vector can be used unchanged in any super class of the type’s class. This is done by methods of the [class finalizer](https://github.com/dart-lang/sdk/blob/master/runtime/vm/class_finalizer.h) called `ExpandAndFinalizeTypeArguments` and `FillAndFinalizeTypeArguments`.
+Types read from kernel files (produced by the Common Front End) need finalization before being used in the VM runtime. Finalization consists in flattening type argument vectors and in assigning indices to type parameters. A generic type provided by CFE will always have as many type arguments as the number of type parameters declared by the type’s class. As explained above, type arguments get prepended to the type argument vector, so that the vector can be used unchanged in any super class of the type’s class. This is done by methods of the [class finalizer](https://github.com/dart-lang/sdk/blob/main/runtime/vm/class_finalizer.h) called `ExpandAndFinalizeTypeArguments` and `FillAndFinalizeTypeArguments`.
 
 The index of function type parameters can be assigned immediately upon loading of the type parameter from the kernel file. This is possible because enclosing generic functions are always loaded prior to inner generic functions. Therefore the number of type parameters declared in the  enclosing scope is known. The picture is more complicated with class type parameters. Classes can reference each other and a clear order is not defined in the kernel file. Clusters of classes must be fully loaded before type arguments can be flattened, which in turn determines the indices of class type parameters.
 
@@ -226,7 +226,7 @@
 
 The VM keeps global tables of canonical types and type arguments. Canonicalizing a type or a type argument vector consists in a table look up using a hash code to find a candidate, and then comparing the type with the candidate using the `IsEquivalent` method mentioned above (passing `kind = kCanonical`).
 
-It is therefore imperative that two canonically equal types share the same hash code. `TypeRef` objects pose a problem in this regard. Namely, the hash of a `TypeRef` node cannot depend on the hash of the referenced type graph, otherwise, the hash code would depend on the location in the cycle where hash computation started and ended. Instead, the hash of a `TypeRef` node can only depend on information obtainable by “peeking” at the referenced type node, but not at the whole referenced type graph. See the comments in the [implementation](https://github.com/dart-lang/sdk/blob/master/runtime/vm/object.cc) of `TypeRef::Hash()` for details.
+It is therefore imperative that two canonically equal types share the same hash code. `TypeRef` objects pose a problem in this regard. Namely, the hash of a `TypeRef` node cannot depend on the hash of the referenced type graph, otherwise, the hash code would depend on the location in the cycle where hash computation started and ended. Instead, the hash of a `TypeRef` node can only depend on information obtainable by “peeking” at the referenced type node, but not at the whole referenced type graph. See the comments in the [implementation](https://github.com/dart-lang/sdk/blob/main/runtime/vm/object.cc) of `TypeRef::Hash()` for details.
 
 ## Cached Instantiations of TypeArguments
 
@@ -249,5 +249,5 @@
 
 ## Nullability of TypeArguments
 
-The previous section ignores an important point, namely, sharing is only allowed if the nullability of each type argument in the instantiator is not modified by the instantiation. If the new instance was allocated with `A<S?, T>()` instead, it would only work if the first type argument in the instantiator is nullable, otherwise, its nullability would change from legacy or non-nullable to nullable. This check cannot be performed at compile time and performing it at run time undermines the benefits of the optimization. However, whether the nullability will remain unchanged for each type argument in the vector can be computed quickly for the whole vector with a simple integer operation. Each type argument vector is assigned a nullability value reflecting the nullability of each one of its type arguments. Since two bits are required per type argument, there is a maximal vector length allowed to apply this optimization. For a more detailed explanation, search for `kNullabilityBitsPerType` in the [source](https://github.com/dart-lang/sdk/blob/master/runtime/vm/object.h) and read the comments.
+The previous section ignores an important point, namely, sharing is only allowed if the nullability of each type argument in the instantiator is not modified by the instantiation. If the new instance was allocated with `A<S?, T>()` instead, it would only work if the first type argument in the instantiator is nullable, otherwise, its nullability would change from legacy or non-nullable to nullable. This check cannot be performed at compile time and performing it at run time undermines the benefits of the optimization. However, whether the nullability will remain unchanged for each type argument in the vector can be computed quickly for the whole vector with a simple integer operation. Each type argument vector is assigned a nullability value reflecting the nullability of each one of its type arguments. Since two bits are required per type argument, there is a maximal vector length allowed to apply this optimization. For a more detailed explanation, search for `kNullabilityBitsPerType` in the [source](https://github.com/dart-lang/sdk/blob/main/runtime/vm/object.h) and read the comments.
 
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 861a87f..02c28b2 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -3046,7 +3046,7 @@
  *
  * See Dart_SetFfiNativeResolver.
  */
-typedef void* (*Dart_FfiNativeResolver)(const char* name);
+typedef void* (*Dart_FfiNativeResolver)(const char* name, uintptr_t args_n);
 
 /*
  * ===========
@@ -3450,17 +3450,6 @@
                            intptr_t kernel_buffer_size);
 
 /**
- * Returns a flattened list of pairs. The first element in each pair is the
- * importing library and and the second element is the imported library for each
- * import in the isolate of a library whose URI's scheme is [scheme].
- *
- * Requires there to be a current isolate.
- *
- * \return A handle to a list of flattened pairs of importer-importee.
- */
-DART_EXPORT Dart_Handle Dart_GetImportsOfScheme(Dart_Handle scheme);
-
-/**
  * Indicates that all outstanding load requests have been satisfied.
  * This finalizes all the new classes loaded and optionally completes
  * deferred library futures.
diff --git a/runtime/lib/ffi.cc b/runtime/lib/ffi.cc
index cc4a6ff..239f758 100644
--- a/runtime/lib/ffi.cc
+++ b/runtime/lib/ffi.cc
@@ -276,7 +276,9 @@
 }
 
 // FFI native C function pointer resolver.
-static intptr_t FfiResolve(Dart_Handle lib_url, Dart_Handle name) {
+static intptr_t FfiResolve(Dart_Handle lib_url,
+                           Dart_Handle name,
+                           uintptr_t args_n) {
   DARTSCOPE(Thread::Current());
 
   const String& lib_url_str = Api::UnwrapStringHandle(T->zone(), lib_url);
@@ -296,7 +298,7 @@
     Exceptions::ThrowArgumentError(error);
   }
 
-  auto* f = resolver(function_name.ToCString());
+  auto* f = resolver(function_name.ToCString(), args_n);
   if (f == nullptr) {
     const String& error = String::Handle(String::NewFormatted(
         "Couldn't resolve function: '%s'.", function_name.ToCString()));
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index 5dfb8b8..0515336 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -272,38 +272,37 @@
   return obj.ptr();
 }
 
-DEFINE_NATIVE_ENTRY(SendPortImpl_sendAndExitInternal_, 0, 2) {
-  GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
-  if (!PortMap::IsReceiverInThisIsolateGroup(port.Id(), isolate->group())) {
-    const auto& error =
-        String::Handle(String::New("sendAndExit is only supported across "
-                                   "isolates spawned via spawnFunction."));
-    Exceptions::ThrowArgumentError(error);
-    UNREACHABLE();
-  }
+DEFINE_NATIVE_ENTRY(Isolate_exit_, 0, 2) {
+  GET_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
+  if (!port.IsNull()) {
+    GET_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(1));
+    if (!PortMap::IsReceiverInThisIsolateGroup(port.Id(), isolate->group())) {
+      const auto& error =
+          String::Handle(String::New("exit with final message is only allowed "
+                                     "for isolates in one isolate group."));
+      Exceptions::ThrowArgumentError(error);
+      UNREACHABLE();
+    }
 
-  GET_NON_NULL_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(1));
-
-  Object& validated_result = Object::Handle(zone);
-  const Object& msg_obj = Object::Handle(zone, obj.ptr());
-  validated_result = ValidateMessageObject(zone, isolate, msg_obj);
-  // msg_array = [
-  //     <message>,
-  //     <collection-lib-objects-to-rehash>,
-  //     <core-lib-objects-to-rehash>,
-  // ]
-  const Array& msg_array = Array::Handle(zone, Array::New(3));
-  msg_array.SetAt(0, msg_obj);
-  if (validated_result.IsUnhandledException()) {
-    Exceptions::PropagateError(Error::Cast(validated_result));
-    UNREACHABLE();
+    Object& validated_result = Object::Handle(zone);
+    const Object& msg_obj = Object::Handle(zone, obj.ptr());
+    validated_result = ValidateMessageObject(zone, isolate, msg_obj);
+    // msg_array = [
+    //     <message>,
+    //     <collection-lib-objects-to-rehash>,
+    //     <core-lib-objects-to-rehash>,
+    // ]
+    const Array& msg_array = Array::Handle(zone, Array::New(3));
+    msg_array.SetAt(0, msg_obj);
+    if (validated_result.IsUnhandledException()) {
+      Exceptions::PropagateError(Error::Cast(validated_result));
+      UNREACHABLE();
+    }
+    PersistentHandle* handle =
+        isolate->group()->api_state()->AllocatePersistentHandle();
+    handle->set_ptr(msg_array);
+    isolate->bequeath(std::unique_ptr<Bequest>(new Bequest(handle, port.Id())));
   }
-  PersistentHandle* handle =
-      isolate->group()->api_state()->AllocatePersistentHandle();
-  handle->set_ptr(msg_array);
-  isolate->bequeath(std::unique_ptr<Bequest>(new Bequest(handle, port.Id())));
-  // TODO(aam): Ensure there are no dart api calls after this point as we want
-  // to ensure that validated message won't get tampered with.
   Isolate::KillIfExists(isolate, Isolate::LibMsgId::kKillMsg);
   // Drain interrupts before running so any IMMEDIATE operations on the current
   // isolate happen synchronously.
@@ -655,7 +654,7 @@
     parent_isolate_ = nullptr;
 
     if (isolate == nullptr) {
-      FailedSpawn(error);
+      FailedSpawn(error, /*has_current_isolate=*/false);
       free(error);
       return;
     }
@@ -681,7 +680,7 @@
     parent_isolate_ = nullptr;
 
     if (isolate == nullptr) {
-      FailedSpawn(error, false);
+      FailedSpawn(error, /*has_current_isolate=*/false);
       free(error);
       return;
     }
@@ -854,7 +853,7 @@
     if (has_current_isolate) {
       ASSERT(IsolateGroup::Current() == state_->isolate_group());
       state_ = nullptr;
-    } else {
+    } else if (state_->isolate_group() != nullptr) {
       ASSERT(IsolateGroup::Current() == nullptr);
       const bool kBypassSafepoint = false;
       const bool result = Thread::EnterIsolateGroupAsHelper(
@@ -862,6 +861,10 @@
       ASSERT(result);
       state_ = nullptr;
       Thread::ExitIsolateGroupAsHelper(kBypassSafepoint);
+    } else {
+      // The state won't need a current isolate group, because it belongs to a
+      // [Isolate.spawnUri] call.
+      state_ = nullptr;
     }
   }
 
diff --git a/runtime/observatory/lib/src/models/objects/library.dart b/runtime/observatory/lib/src/models/objects/library.dart
index b02a97d..dfb3f84 100644
--- a/runtime/observatory/lib/src/models/objects/library.dart
+++ b/runtime/observatory/lib/src/models/objects/library.dart
@@ -41,5 +41,5 @@
   LibraryRef get target;
 
   /// [optional]
-  String get prefix;
+  String? get prefix;
 }
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index df4a4cd..9878a02 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -2479,7 +2479,7 @@
 class LibraryDependency implements M.LibraryDependency {
   final bool isImport;
   final bool isDeferred;
-  final String prefix;
+  final String? prefix;
   final Library target;
 
   bool get isExport => !isImport;
diff --git a/runtime/observatory/tests/service/break_on_dart_colon_test.dart b/runtime/observatory/tests/service/break_on_dart_colon_test.dart
new file mode 100644
index 0000000..f9b4908
--- /dev/null
+++ b/runtime/observatory/tests/service/break_on_dart_colon_test.dart
@@ -0,0 +1,47 @@
+// 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.
+// VMOptions=--verbose_debug
+
+import 'dart:developer';
+
+import 'package:observatory/service_io.dart';
+
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+// Line in core/print.dart
+const int LINE_A = 10;
+
+testMain() {
+  debugger();
+  print('1');
+  print('2');
+  print('3');
+  print('Done');
+}
+
+IsolateTest expectHitBreakpoint(String uri, int line) {
+  return (Isolate isolate) async {
+    final bpt = await isolate.addBreakpointByScriptUri(uri, line);
+    await resumeIsolate(isolate);
+    await hasStoppedAtBreakpoint(isolate);
+    await stoppedAtLine(line)(isolate);
+    await isolate.removeBreakpoint(bpt);
+  };
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+
+  // Dart libraries are not debuggable by default
+  markDartColonLibrariesDebuggable,
+
+  expectHitBreakpoint('org-dartlang-sdk:///sdk/lib/core/print.dart', LINE_A),
+  expectHitBreakpoint('dart:core/print.dart', LINE_A),
+  expectHitBreakpoint('/core/print.dart', LINE_A),
+
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory/tests/service/breakpoint_on_simple_conditions_test.dart b/runtime/observatory/tests/service/breakpoint_on_simple_conditions_test.dart
new file mode 100644
index 0000000..c8ab6c3
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_on_simple_conditions_test.dart
@@ -0,0 +1,55 @@
+// 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.
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE_A = 15;
+const int LINE_B = 20;
+const int LINE_C = 24;
+const int LINE_D = 28;
+
+testMain() {
+  bool foo = false;
+  if (foo) { // LINE_A
+    print('1');
+  }
+
+  const bar = false;
+  if (bar) { // LINE_B
+    print('2');
+  }
+
+  while (foo) { // LINE_C
+    print('3');
+  }
+
+  while (bar) { // LINE_D
+    print('4');
+  }
+}
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtLine(LINE_A),
+  setBreakpointAtLine(LINE_B),
+  setBreakpointAtLine(LINE_C),
+  setBreakpointAtLine(LINE_D),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_B),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_C),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_D),
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests,
+    testeeConcurrent: testMain, pause_on_start: true);
diff --git a/runtime/observatory/tests/service/constructor_tear_off_test.dart b/runtime/observatory/tests/service/constructor_tear_off_test.dart
new file mode 100644
index 0000000..672a1a1
--- /dev/null
+++ b/runtime/observatory/tests/service/constructor_tear_off_test.dart
@@ -0,0 +1,72 @@
+// 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.
+
+// @dart=2.15
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+import 'package:observatory/service_common.dart';
+import 'package:test/test.dart';
+
+import 'test_helper.dart';
+
+class Foo {
+  Foo();
+  Foo.named();
+}
+
+class Generic<T> {
+  Generic();
+}
+
+@pragma('vm:entry-point')
+Function getNamedConstructorTearoff() => Foo.named;
+
+@pragma('vm:entry-point')
+Function getDefaultConstructorTearoff() => Foo.new;
+
+@pragma('vm:entry-point')
+Function getGenericConstructorTearoff() => Generic<int>.new;
+
+Future<void> invokeConstructorTearoff(
+  Isolate isolate,
+  String name,
+  String expectedType,
+) async {
+  final lib = await isolate.rootLibrary.load() as Library;
+  final tearoff = await isolate.invokeRpc('invoke', {
+    'targetId': lib.id,
+    'selector': name,
+    'argumentIds': [],
+  });
+  final result = await isolate.invokeRpc('invoke', {
+    'targetId': tearoff.id,
+    'selector': 'call',
+    'argumentIds': [],
+  }) as Instance;
+  expect(result.clazz!.name, expectedType);
+}
+
+final tests = <IsolateTest>[
+  (Isolate isolate) => invokeConstructorTearoff(
+        isolate,
+        'getNamedConstructorTearoff',
+        'Foo',
+      ),
+  (Isolate isolate) => invokeConstructorTearoff(
+        isolate,
+        'getDefaultConstructorTearoff',
+        'Foo',
+      ),
+  (Isolate isolate) => invokeConstructorTearoff(
+        isolate,
+        'getGenericConstructorTearoff',
+        'Generic',
+      ),
+];
+
+void main(List<String> args) => runIsolateTests(
+      args,
+      tests,
+    );
diff --git a/runtime/observatory/tests/service/evaluate_in_extension_method_test.dart b/runtime/observatory/tests/service/evaluate_in_extension_method_test.dart
new file mode 100644
index 0000000..540b1f3
--- /dev/null
+++ b/runtime/observatory/tests/service/evaluate_in_extension_method_test.dart
@@ -0,0 +1,53 @@
+// 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.
+
+import 'dart:developer';
+import 'package:observatory/models.dart' show InstanceKind;
+import 'package:observatory/service_io.dart';
+import 'package:test/test.dart';
+
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+extension Foo on String {
+  int parseInt(int x) {
+    debugger();
+    return foo();
+  }
+
+  int foo() => 42;
+}
+
+void testFunction() {
+  print("10".parseInt(21));
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+  (Isolate isolate) async {
+    Instance result;
+    result = await isolate.evalFrame(0, 'x') as Instance;
+    expect(result.valueAsString, equals('21'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result = await isolate.evalFrame(0, 'this') as Instance;
+    expect(result.valueAsString, equals('10'));
+    expect(result.kind, equals(InstanceKind.string));
+
+    result = await isolate.evalFrame(0, 'foo()') as Instance;
+    expect(result.valueAsString, equals('42'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result = await isolate.evalFrame(0, 'foo() + x') as Instance;
+    expect(result.valueAsString, equals('63'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result =
+        await isolate.evalFrame(0, 'foo() + x + int.parse(this)') as Instance;
+    expect(result.valueAsString, equals('73'));
+    expect(result.kind, equals(InstanceKind.int));
+  },
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
diff --git a/runtime/observatory/tests/service/object_graph_vm_test.dart b/runtime/observatory/tests/service/object_graph_vm_test.dart
index 8a8e7ec..5ab5fe9 100644
--- a/runtime/observatory/tests/service/object_graph_vm_test.dart
+++ b/runtime/observatory/tests/service/object_graph_vm_test.dart
@@ -90,7 +90,9 @@
       int internalSum = 0;
       int externalSum = 0;
       for (SnapshotObject instance in klass.instances) {
-        if (instance == graph.root || instance.klass.name.contains("Isolate")) {
+        if (instance == graph.root ||
+            instance.klass.name.contains("Isolate") ||
+            instance.klass.name.contains("Read-Only Pages")) {
           // The root and fake root subdivisions have 0 self size.
           expect(instance.internalSize, greaterThanOrEqualTo(0));
           expect(instance.externalSize, greaterThanOrEqualTo(0));
@@ -122,7 +124,9 @@
     int internalSum = 0;
     int externalSum = 0;
     for (SnapshotObject instance in graph.objects) {
-      if (instance == graph.root || instance.klass.name.contains("Isolate")) {
+      if (instance == graph.root ||
+          instance.klass.name.contains("Isolate") ||
+          instance.klass.name.contains("Read-Only Pages")) {
         // The root and fake root subdivisions have 0 self size.
         expect(instance.internalSize, greaterThanOrEqualTo(0));
         expect(instance.externalSize, greaterThanOrEqualTo(0));
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index c6e2222..af626d9 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -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.
 
+complex_reload_test: Skip # http://dartbug.com/47130
 valid_source_locations_test: Pass, Slow
 
 [ $compiler == app_jitk ]
 add_breakpoint_rpc_kernel_test: SkipByDesign # No incremental compiler available.
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 break_on_activation_test: SkipByDesign # No incremental compiler available.
-complex_reload_test: RuntimeError
 debugger_inspect_test: SkipByDesign # No incremental compiler available.
 debugger_location_second_test: SkipByDesign # No script sources available.
 eval_internal_class_test: SkipByDesign # No incremental compiler available.
@@ -47,6 +47,7 @@
 bad_reload_test: SkipByDesign # Hot reload is disabled in AOT mode.
 break_on_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_async_function_test: SkipByDesign # Debugger is disabled in AOT mode.
+break_on_dart_colon_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_default_constructor_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_function_child_isolate_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_function_many_child_isolates_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -61,6 +62,7 @@
 breakpoint_on_if_null_2_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_on_if_null_3_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_on_if_null_4_test: SkipByDesign # Debugger is disabled in AOT mode.
+breakpoint_on_simple_conditions_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_partfile_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_two_args_checked_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoints_with_mixin_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -95,6 +97,7 @@
 evaluate_function_type_parameters_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_async_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_async_star_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
+evaluate_in_extension_method_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_frame_rpc_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_frame_with_scope_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_sync_star_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -210,9 +213,6 @@
 [ $arch == ia32 && $compiler == dartk ]
 valid_source_locations_test: Skip # Issue 34736, too slow.
 
-[ $arch != simarm && $arch != simarm64 && $arch != simarm64c && $compiler == dartk ]
-complex_reload_test: RuntimeError
-
 [ $compiler == app_jitk && $system == linux ]
 get_vm_timeline_rpc_test: Skip # Timeout.
 
@@ -278,7 +278,6 @@
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 break_on_activation_test: RuntimeError # Issue #34736
 breakpoint_in_package_parts_class_file_uri_test: RuntimeError # Issue #34736
-complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 dds_log_history_size_gigantic_test: SkipSlow # Involves hundreds of thousands of log messages
 debugger_inspect_test: RuntimeError, Timeout # Issue #34736
 eval_internal_class_test: RuntimeError # Issue #34736
diff --git a/runtime/observatory/tool/ensure_dartfmt.sh b/runtime/observatory/tool/ensure_dartfmt.sh
index 6aa50e9..0579deb 100755
--- a/runtime/observatory/tool/ensure_dartfmt.sh
+++ b/runtime/observatory/tool/ensure_dartfmt.sh
@@ -3,13 +3,13 @@
 dart_files=$(find lib web -name "*.dart")
 [ -z "$dart_files" ] && exit 0
 
-unformatted=$(dartfmt -n $dart_files)
+unformatted=$(dart format -o none $dart_files)
 [ -z "$unformatted" ] && exit 0
 
-# Some files are not dartfmt'd. Print message and fail.
-echo >&2 "dart files must be formatted with dartfmt. Please run:"
+# Some files are not dart formatted. Print message and fail.
+echo >&2 "dart files must be formatted with dart format. Please run:"
 for fn in $unformatted; do
-  echo >&2 "  dartfmt -w $PWD/$fn"
+  echo >&2 "  dart format $PWD/$fn"
 done
 
 exit 1
diff --git a/runtime/observatory_2/pubspec.yaml b/runtime/observatory_2/pubspec.yaml
index efd6952..253ce60 100644
--- a/runtime/observatory_2/pubspec.yaml
+++ b/runtime/observatory_2/pubspec.yaml
@@ -1,6 +1,6 @@
 name: observatory
 environment:
-  sdk: '>=2.2.2 <3.0.0'
+  sdk: '>=2.6.0 <3.0.0'
 
 dependencies:
   usage: 'any'
diff --git a/runtime/observatory_2/tests/service_2/break_on_dart_colon_test.dart b/runtime/observatory_2/tests/service_2/break_on_dart_colon_test.dart
new file mode 100644
index 0000000..e0d400c3
--- /dev/null
+++ b/runtime/observatory_2/tests/service_2/break_on_dart_colon_test.dart
@@ -0,0 +1,47 @@
+// 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.
+// VMOptions=--verbose_debug
+
+import 'dart:developer';
+
+import 'package:observatory_2/service_io.dart';
+
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+// Line in core/print.dart
+const int LINE_A = 10;
+
+testMain() {
+  debugger();
+  print('1');
+  print('2');
+  print('3');
+  print('Done');
+}
+
+IsolateTest expectHitBreakpoint(String uri, int line) {
+  return (Isolate isolate) async {
+    final bpt = await isolate.addBreakpointByScriptUri(uri, line);
+    await resumeIsolate(isolate);
+    await hasStoppedAtBreakpoint(isolate);
+    await stoppedAtLine(line)(isolate);
+    await isolate.removeBreakpoint(bpt);
+  };
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+
+  // Dart libraries are not debuggable by default
+  markDartColonLibrariesDebuggable,
+
+  expectHitBreakpoint('org-dartlang-sdk:///sdk/lib/core/print.dart', LINE_A),
+  expectHitBreakpoint('dart:core/print.dart', LINE_A),
+  expectHitBreakpoint('/core/print.dart', LINE_A),
+
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory_2/tests/service_2/breakpoint_on_simple_conditions_test.dart b/runtime/observatory_2/tests/service_2/breakpoint_on_simple_conditions_test.dart
new file mode 100644
index 0000000..c8ab6c3
--- /dev/null
+++ b/runtime/observatory_2/tests/service_2/breakpoint_on_simple_conditions_test.dart
@@ -0,0 +1,55 @@
+// 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.
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE_A = 15;
+const int LINE_B = 20;
+const int LINE_C = 24;
+const int LINE_D = 28;
+
+testMain() {
+  bool foo = false;
+  if (foo) { // LINE_A
+    print('1');
+  }
+
+  const bar = false;
+  if (bar) { // LINE_B
+    print('2');
+  }
+
+  while (foo) { // LINE_C
+    print('3');
+  }
+
+  while (bar) { // LINE_D
+    print('4');
+  }
+}
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtLine(LINE_A),
+  setBreakpointAtLine(LINE_B),
+  setBreakpointAtLine(LINE_C),
+  setBreakpointAtLine(LINE_D),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_B),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_C),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_D),
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests,
+    testeeConcurrent: testMain, pause_on_start: true);
diff --git a/runtime/observatory_2/tests/service_2/evaluate_in_extension_method_test.dart b/runtime/observatory_2/tests/service_2/evaluate_in_extension_method_test.dart
new file mode 100644
index 0000000..5a45748
--- /dev/null
+++ b/runtime/observatory_2/tests/service_2/evaluate_in_extension_method_test.dart
@@ -0,0 +1,53 @@
+// 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.
+
+import 'dart:developer';
+import 'package:observatory_2/models.dart' show InstanceKind;
+import 'package:observatory_2/service_io.dart';
+import 'package:test/test.dart';
+
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+extension Foo on String {
+  int parseInt(int x) {
+    debugger();
+    return foo();
+  }
+
+  int foo() => 42;
+}
+
+void testFunction() {
+  print("10".parseInt(21));
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+  (Isolate isolate) async {
+    Instance result;
+    result = await isolate.evalFrame(0, 'x') as Instance;
+    expect(result.valueAsString, equals('21'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result = await isolate.evalFrame(0, 'this') as Instance;
+    expect(result.valueAsString, equals('10'));
+    expect(result.kind, equals(InstanceKind.string));
+
+    result = await isolate.evalFrame(0, 'foo()') as Instance;
+    expect(result.valueAsString, equals('42'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result = await isolate.evalFrame(0, 'foo() + x') as Instance;
+    expect(result.valueAsString, equals('63'));
+    expect(result.kind, equals(InstanceKind.int));
+
+    result =
+        await isolate.evalFrame(0, 'foo() + x + int.parse(this)') as Instance;
+    expect(result.valueAsString, equals('73'));
+    expect(result.kind, equals(InstanceKind.int));
+  },
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
diff --git a/runtime/observatory_2/tests/service_2/object_graph_vm_test.dart b/runtime/observatory_2/tests/service_2/object_graph_vm_test.dart
index 81be62e..6e35ba2 100644
--- a/runtime/observatory_2/tests/service_2/object_graph_vm_test.dart
+++ b/runtime/observatory_2/tests/service_2/object_graph_vm_test.dart
@@ -90,7 +90,9 @@
       int internalSum = 0;
       int externalSum = 0;
       for (SnapshotObject instance in klass.instances) {
-        if (instance == graph.root || instance.klass.name.contains("Isolate")) {
+        if (instance == graph.root ||
+            instance.klass.name.contains("Isolate") ||
+            instance.klass.name.contains("Read-Only Pages")) {
           // The root and fake root subdivisions have 0 self size.
           expect(instance.internalSize, greaterThanOrEqualTo(0));
           expect(instance.externalSize, greaterThanOrEqualTo(0));
@@ -122,7 +124,9 @@
     int internalSum = 0;
     int externalSum = 0;
     for (SnapshotObject instance in graph.objects) {
-      if (instance == graph.root || instance.klass.name.contains("Isolate")) {
+      if (instance == graph.root ||
+          instance.klass.name.contains("Isolate") ||
+          instance.klass.name.contains("Read-Only Pages")) {
         // The root and fake root subdivisions have 0 self size.
         expect(instance.internalSize, greaterThanOrEqualTo(0));
         expect(instance.externalSize, greaterThanOrEqualTo(0));
diff --git a/runtime/observatory_2/tests/service_2/service_2_kernel.status b/runtime/observatory_2/tests/service_2/service_2_kernel.status
index 83eb2d1..322b922 100644
--- a/runtime/observatory_2/tests/service_2/service_2_kernel.status
+++ b/runtime/observatory_2/tests/service_2/service_2_kernel.status
@@ -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.
 
+complex_reload_test: Skip # http://dartbug.com/47130
 valid_source_locations_test: Pass, Slow
 
 [ $compiler == app_jitk ]
 add_breakpoint_rpc_kernel_test: SkipByDesign # No incremental compiler available.
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 break_on_activation_test: SkipByDesign # No incremental compiler available.
-complex_reload_test: RuntimeError
 debugger_inspect_test: SkipByDesign # No incremental compiler available.
 debugger_location_second_test: SkipByDesign # No script sources available.
 eval_internal_class_test: SkipByDesign # No incremental compiler available.
@@ -47,6 +47,7 @@
 bad_reload_test: SkipByDesign # Hot reload is disabled in AOT mode.
 break_on_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_async_function_test: SkipByDesign # Debugger is disabled in AOT mode.
+break_on_dart_colon_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_default_constructor_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_function_child_isolate_test: SkipByDesign # Debugger is disabled in AOT mode.
 break_on_function_many_child_isolates_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -61,6 +62,7 @@
 breakpoint_on_if_null_2_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_on_if_null_3_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_on_if_null_4_test: SkipByDesign # Debugger is disabled in AOT mode.
+breakpoint_on_simple_conditions_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_partfile_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoint_two_args_checked_test: SkipByDesign # Debugger is disabled in AOT mode.
 breakpoints_with_mixin_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -95,6 +97,7 @@
 evaluate_function_type_parameters_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_async_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_async_star_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
+evaluate_in_extension_method_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_frame_rpc_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_frame_with_scope_test: SkipByDesign # Debugger is disabled in AOT mode.
 evaluate_in_sync_star_activation_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -210,9 +213,6 @@
 [ $arch == ia32 && $compiler == dartk ]
 valid_source_locations_test: Skip # Issue 34736, too slow.
 
-[ $arch != simarm && $arch != simarm64 && $arch != simarm64c && $compiler == dartk ]
-complex_reload_test: RuntimeError
-
 [ $compiler == app_jitk && $system == linux ]
 get_vm_timeline_rpc_test: Skip # Timeout.
 
@@ -278,7 +278,6 @@
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 break_on_activation_test: RuntimeError # Issue #34736
 breakpoint_in_package_parts_class_file_uri_test: RuntimeError # Issue #34736
-complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 dds_log_history_size_gigantic_test: SkipSlow # Involves hundreds of thousands of log messages
 debugger_inspect_test: RuntimeError, Timeout # Issue #34736
 eval_internal_class_test: RuntimeError # Issue #34736
diff --git a/runtime/observatory_2/tool/ensure_dartfmt.sh b/runtime/observatory_2/tool/ensure_dartfmt.sh
index 6aa50e9..0579deb 100755
--- a/runtime/observatory_2/tool/ensure_dartfmt.sh
+++ b/runtime/observatory_2/tool/ensure_dartfmt.sh
@@ -3,13 +3,13 @@
 dart_files=$(find lib web -name "*.dart")
 [ -z "$dart_files" ] && exit 0
 
-unformatted=$(dartfmt -n $dart_files)
+unformatted=$(dart format -o none $dart_files)
 [ -z "$unformatted" ] && exit 0
 
-# Some files are not dartfmt'd. Print message and fail.
-echo >&2 "dart files must be formatted with dartfmt. Please run:"
+# Some files are not dart formatted. Print message and fail.
+echo >&2 "dart files must be formatted with dart format. Please run:"
 for fn in $unformatted; do
-  echo >&2 "  dartfmt -w $PWD/$fn"
+  echo >&2 "  dart format $PWD/$fn"
 done
 
 exit 1
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index ed20219..7d69548 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -356,9 +356,13 @@
 
 // Determine whether we will be using the simulator.
 #if defined(TARGET_ARCH_IA32)
-// No simulator used.
+#if !defined(HOST_ARCH_IA32)
+#define USING_SIMULATOR 1
+#endif
 #elif defined(TARGET_ARCH_X64)
-// No simulator used.
+#if !defined(HOST_ARCH_X64)
+#define USING_SIMULATOR 1
+#endif
 #elif defined(TARGET_ARCH_ARM)
 #if !defined(HOST_ARCH_ARM)
 #define TARGET_HOST_MISMATCH 1
diff --git a/runtime/tests/concurrency/generate_stress_test.dart b/runtime/tests/concurrency/generate_stress_test.dart
index 3870ef2..a22bc34 100644
--- a/runtime/tests/concurrency/generate_stress_test.dart
+++ b/runtime/tests/concurrency/generate_stress_test.dart
@@ -17,7 +17,7 @@
 final Map testMap = json.decode(File(stressTestListJson).readAsStringSync());
 final testFiles = testMap['non-nnbd'].cast<String>();
 final testFilesNnbd = testMap['nnbd'].cast<String>();
-final dartfmt = 'tools/sdks/dart-sdk/bin/dartfmt';
+final dart = 'tools/sdks/dart-sdk/bin/dart';
 
 main(List<String> args) async {
   File(generatedNnbdTest)
@@ -188,7 +188,7 @@
 
 Future<String> format(String generatedSource) async {
   try {
-    final result = await Process.start(dartfmt, []);
+    final result = await Process.start(dart, ['format']);
     result.stdin.writeln(generatedSource);
 
     final results = await Future.wait([
@@ -200,13 +200,14 @@
 
     final exitCode = results[3] as int;
     if (exitCode != 0) {
-      print('Note: Failed to format source code. Dartfmt exited non-0.');
+      print('Note: Failed to format source code. Dart format exited non-0.');
       return generatedSource;
     }
     final stdout = results[1] as String;
     final stderr = results[2] as String;
     if (stderr.trim().length != 0) {
-      print('Note: Failed to format source code. Dartfmt had stderr: $stderr');
+      print('Note: Failed to format source code. Dart format had stderr: '
+          '$stderr');
       return generatedSource;
     }
     return stdout;
diff --git a/runtime/tests/vm/dart/aot_prefer_equality_comparison_il_test.dart b/runtime/tests/vm/dart/aot_prefer_equality_comparison_il_test.dart
new file mode 100644
index 0000000..9baf000
--- /dev/null
+++ b/runtime/tests/vm/dart/aot_prefer_equality_comparison_il_test.dart
@@ -0,0 +1,18 @@
+// 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 that we emit EqualityCompare rather than StrictCompare+BoxInt64
+// when comparing non-nullable integer to a Smi.
+
+// MatchIL[AOT]=factorial
+// __ GraphEntry
+// __ FunctionEntry
+// __ CheckStackOverflow
+// __ Branch(EqualityCompare)
+@pragma('vm:never-inline')
+int factorial(int value) => value == 1 ? value : value * factorial(value - 1);
+
+void main() {
+  print(factorial(4));
+}
diff --git a/runtime/tests/vm/dart/isolates/internal.dart b/runtime/tests/vm/dart/isolates/internal.dart
deleted file mode 100644
index ec854b0..0000000
--- a/runtime/tests/vm/dart/isolates/internal.dart
+++ /dev/null
@@ -1,14 +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:io';
-import 'dart:isolate';
-import 'dart:async';
-import 'dart:_internal' as dart_internal;
-
-extension SendPortSendAndExit on SendPort {
-  void sendAndExit(var message) {
-    dart_internal.sendAndExit(this, message);
-  }
-}
diff --git a/runtime/tests/vm/dart/isolates/ring_gc_sendAndExit_test.dart b/runtime/tests/vm/dart/isolates/ring_gc_sendAndExit_test.dart
index 74b6820..a50d9e8 100644
--- a/runtime/tests/vm/dart/isolates/ring_gc_sendAndExit_test.dart
+++ b/runtime/tests/vm/dart/isolates/ring_gc_sendAndExit_test.dart
@@ -24,7 +24,7 @@
   final ring = await Ring.create(numIsolates);
 
   // Let each node produce a tree, send it to it's neighbour and let it return
-  // the one it received (via sendAndExit).
+  // the one it received (via Isolate.exit).
   final results = await ring.runAndClose((int id) => Worker(id));
   Expect.equals(numIsolates, results.length);
 
diff --git a/runtime/tests/vm/dart/isolates/test_utils.dart b/runtime/tests/vm/dart/isolates/test_utils.dart
index 7c5da81..3268cc1 100644
--- a/runtime/tests/vm/dart/isolates/test_utils.dart
+++ b/runtime/tests/vm/dart/isolates/test_utils.dart
@@ -6,8 +6,6 @@
 import 'dart:io';
 import 'dart:isolate';
 
-import 'internal.dart';
-
 export '../../../../../benchmarks/IsolateFibonacci/dart/IsolateFibonacci.dart'
   show fibonacciRecursive;
 
@@ -102,7 +100,7 @@
         case Command.kRunAndClose:
           final RingElement re = args[1];
           final SendPort nextNeighbor = args[2];
-          port.sendAndExit(await re.run(nextNeighbor, siData));
+          Isolate.exit(port, await re.run(nextNeighbor, siData));
           break;
         case Command.kClose:
           port.send('done');
diff --git a/runtime/tests/vm/dart/sendandexit_test.dart b/runtime/tests/vm/dart/sendandexit_test.dart
index 58e02c6..235a3c2 100644
--- a/runtime/tests/vm/dart/sendandexit_test.dart
+++ b/runtime/tests/vm/dart/sendandexit_test.dart
@@ -4,9 +4,8 @@
 //
 // VMOptions=--enable-isolate-groups
 //
-// Validates functionality of sendAndExit.
+// Validates functionality of Isolate.exit().
 
-import 'dart:_internal' show sendAndExit;
 import 'dart:async';
 import 'dart:isolate';
 import 'dart:nativewrappers';
@@ -27,7 +26,7 @@
 verifyCantSendAnonymousClosure() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, () {}),
+      () => Isolate.exit(receivePort.sendPort, () {}),
       (e) =>
           e.toString() ==
           'Invalid argument: "Illegal argument in isolate message : '
@@ -40,7 +39,7 @@
 verifyCantSendNative() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, NativeWrapperClass()),
+      () => Isolate.exit(receivePort.sendPort, NativeWrapperClass()),
       (e) => e.toString().startsWith('Invalid argument: '
           '"Illegal argument in isolate message : '
           '(object extends NativeWrapper'));
@@ -50,7 +49,7 @@
 verifyCantSendReceivePort() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, receivePort),
+      () => Isolate.exit(receivePort.sendPort, receivePort),
       // closure is encountered first before we reach ReceivePort instance
       (e) => e.toString().startsWith(
           'Invalid argument: "Illegal argument in isolate message : '
@@ -62,7 +61,7 @@
   final receivePort = ReceivePort();
   final regexp = RegExp("");
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, regexp),
+      () => Isolate.exit(receivePort.sendPort, regexp),
       (e) =>
           e.toString() ==
           'Invalid argument: '
@@ -73,7 +72,7 @@
 add(a, b) => a + b;
 
 worker(SendPort sendPort) async {
-  sendAndExit(sendPort, add);
+  Isolate.exit(sendPort, add);
 }
 
 verifyCanSendStaticMethod() async {
diff --git a/runtime/tests/vm/dart/splay_ephemeron_test.dart b/runtime/tests/vm/dart/splay_ephemeron_test.dart
new file mode 100644
index 0000000..329d6d5
--- /dev/null
+++ b/runtime/tests/vm/dart/splay_ephemeron_test.dart
@@ -0,0 +1,352 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test is a copy of the Splay benchmark that is run with a variety of
+// different GC options. It makes for a good GC stress test because it
+// continuously makes small changes to a large, long-lived data structure,
+// stressing lots of combinations of references between new-gen and old-gen
+// objects, and between marked and unmarked objects.
+// The ephemeron variant of this test replaces the direct child pointers in the
+// tree with Expandos to stress the handling of WeakProperties/ephemerons.
+
+// VMOptions=
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--scavenger_tasks=0
+// VMOptions=--scavenger_tasks=1
+// VMOptions=--scavenger_tasks=2
+// VMOptions=--scavenger_tasks=3
+// VMOptions=--verify_before_gc
+// VMOptions=--verify_after_gc
+// VMOptions=--verify_before_gc --verify_after_gc
+// VMOptions=--verify_store_buffer
+// VMOptions=--stress_write_barrier_elimination
+// VMOptions=--old_gen_heap_size=150
+
+import "dart:math";
+import 'package:benchmark_harness/benchmark_harness.dart';
+
+void main() {
+  Splay.main();
+}
+
+class Splay extends BenchmarkBase {
+  const Splay() : super("Splay");
+
+  // Configuration.
+  static final int kTreeSize = 8000;
+  static final int kTreeModifications = 80;
+  static final int kTreePayloadDepth = 5;
+
+  static SplayTree? tree;
+
+  static Random rnd = new Random(12345);
+
+  // Insert new node with a unique key.
+  static num insertNewNode() {
+    num key;
+    final localTree = tree!;
+    do {
+      key = rnd.nextDouble();
+    } while (localTree.find(key) != null);
+    Payload payload = Payload.generate(kTreePayloadDepth, key.toString());
+    localTree.insert(key, payload);
+    return key;
+  }
+
+  static void mysetup() {
+    tree = new SplayTree();
+    for (int i = 0; i < kTreeSize; i++) insertNewNode();
+  }
+
+  static void tearDown() {
+    // Allow the garbage collector to reclaim the memory
+    // used by the splay tree no matter how we exit the
+    // tear down function.
+    List<num> keys = tree!.exportKeys();
+    tree = null;
+
+    // Verify that the splay tree has the right size.
+    int length = keys.length;
+    if (length != kTreeSize) throw new Error("Splay tree has wrong size");
+
+    // Verify that the splay tree has sorted, unique keys.
+    for (int i = 0; i < length - 1; i++) {
+      if (keys[i] >= keys[i + 1]) throw new Error("Splay tree not sorted");
+    }
+  }
+
+  void warmup() {
+    exercise();
+  }
+
+  void exercise() {
+    // Replace a few nodes in the splay tree.
+    final localTree = tree!;
+    for (int i = 0; i < kTreeModifications; i++) {
+      num key = insertNewNode();
+      Node? greatest = localTree.findGreatestLessThan(key);
+      if (greatest == null) {
+        localTree.remove(key);
+      } else {
+        localTree.remove(greatest.key);
+      }
+    }
+  }
+
+  static void main() {
+    mysetup();
+    new Splay().report();
+    tearDown();
+  }
+}
+
+
+class Leaf {
+  Leaf(String tag) :
+    string = "String for key $tag in leaf node",
+    array = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
+  {}
+  String string;
+  List<num> array;
+}
+
+
+class Payload {
+  Payload(left, right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  // This ordering of fields is delibrate: one key is visited before the expando
+  // and one after.
+  final leftKey = new Object();
+  final expando = new Expando();
+  final rightKey = new Object();
+
+  get left => expando[leftKey];
+  set left(value) => expando[leftKey] = value;
+  get right => expando[rightKey];
+  set right(value) => expando[rightKey] = value;
+
+  static generate(depth, tag) {
+    if (depth == 0) return new Leaf(tag);
+    return new Payload(generate(depth - 1, tag),
+                       generate(depth - 1, tag));
+  }
+}
+
+class Error implements Exception {
+  const Error(this.message);
+  final String message;
+}
+
+
+/**
+ * A splay tree is a self-balancing binary search tree with the additional
+ * property that recently accessed elements are quick to access again.
+ * It performs basic operations such as insertion, look-up and removal
+ * in O(log(n)) amortized time.
+ */
+class SplayTree {
+  SplayTree();
+
+  /**
+   * Inserts a node into the tree with the specified [key] and value if
+   * the tree does not already contain a node with the specified key. If
+   * the value is inserted, it becomes the root of the tree.
+   */
+  void insert(num key, value) {
+    if (isEmpty) {
+      root = new Node(key, value);
+      return;
+    }
+    // Splay on the key to move the last node on the search path for
+    // the key to the root of the tree.
+    splay(key);
+    if (root!.key == key) return;
+    Node node = new Node(key, value);
+    if (key > root!.key) {
+      node.left = root;
+      node.right = root!.right;
+      root!.right = null;
+    } else {
+      node.right = root;
+      node.left = root!.left;
+      root!.left = null;
+    }
+    root = node;
+  }
+
+  /**
+   * Removes a node with the specified key from the tree if the tree
+   * contains a node with this key. The removed node is returned. If
+   * [key] is not found, an exception is thrown.
+   */
+  Node remove(num key) {
+    if (isEmpty) throw new Error('Key not found: $key');
+    splay(key);
+    if (root!.key != key) throw new Error('Key not found: $key');
+    Node removed = root!;
+    if (root!.left == null) {
+      root = root!.right;
+    } else {
+      Node? right = root!.right;
+      root = root!.left;
+      // Splay to make sure that the new root has an empty right child.
+      splay(key);
+      // Insert the original right child as the right child of the new
+      // root.
+      root!.right = right;
+    }
+    return removed;
+  }
+
+  /**
+   * Returns the node having the specified [key] or null if the tree doesn't
+   * contain a node with the specified [key].
+   */
+  Node? find(num key) {
+    if (isEmpty) return null;
+    splay(key);
+    return root!.key == key ? root : null;
+  }
+
+  /**
+   * Returns the Node having the maximum key value.
+   */
+  Node? findMax([Node? start]) {
+    if (isEmpty) return null;
+    Node current = null == start ? root! : start;
+    while (current.right != null) current = current.right!;
+    return current;
+  }
+
+  /**
+   * Returns the Node having the maximum key value that
+   * is less than the specified [key].
+   */
+  Node? findGreatestLessThan(num key) {
+    if (isEmpty) return null;
+    // Splay on the key to move the node with the given key or the last
+    // node on the search path to the top of the tree.
+    splay(key);
+    // Now the result is either the root node or the greatest node in
+    // the left subtree.
+    if (root!.key < key) return root;
+    if (root!.left != null) return findMax(root!.left);
+    return null;
+  }
+
+  /**
+   * Perform the splay operation for the given key. Moves the node with
+   * the given key to the top of the tree.  If no node has the given
+   * key, the last node on the search path is moved to the top of the
+   * tree. This is the simplified top-down splaying algorithm from:
+   * "Self-adjusting Binary Search Trees" by Sleator and Tarjan
+   */
+  void splay(num key) {
+    if (isEmpty) return;
+    // Create a dummy node.  The use of the dummy node is a bit
+    // counter-intuitive: The right child of the dummy node will hold
+    // the L tree of the algorithm.  The left child of the dummy node
+    // will hold the R tree of the algorithm.  Using a dummy node, left
+    // and right will always be nodes and we avoid special cases.
+    final Node dummy = new Node(0, null);
+    Node left = dummy;
+    Node right = dummy;
+    Node current = root!;
+    while (true) {
+      if (key < current.key) {
+        if (current.left == null) break;
+        if (key < current.left!.key) {
+          // Rotate right.
+          Node tmp = current.left!;
+          current.left = tmp.right;
+          tmp.right = current;
+          current = tmp;
+          if (current.left == null) break;
+        }
+        // Link right.
+        right.left = current;
+        right = current;
+        current = current.left!;
+      } else if (key > current.key) {
+        if (current.right == null) break;
+        if (key > current.right!.key) {
+          // Rotate left.
+          Node tmp = current.right!;
+          current.right = tmp.left;
+          tmp.left = current;
+          current = tmp;
+          if (current.right == null) break;
+        }
+        // Link left.
+        left.right = current;
+        left = current;
+        current = current.right!;
+      } else {
+        break;
+      }
+    }
+    // Assemble.
+    left.right = current.left;
+    right.left = current.right;
+    current.left = dummy.right;
+    current.right = dummy.left;
+    root = current;
+  }
+
+  /**
+   * Returns a list with all the keys of the tree.
+   */
+  List<num> exportKeys() {
+    List<num> result = [];
+    if (!isEmpty) root!.traverse((Node node) => result.add(node.key));
+    return result;
+  }
+
+  // Tells whether the tree is empty.
+  bool get isEmpty => null == root;
+
+  // Pointer to the root node of the tree.
+  Node? root;
+}
+
+
+class Node {
+  Node(this.key, this.value);
+  final num key;
+  final Object? value;
+
+  // This ordering of fields is delibrate: one key is visited before the expando
+  // and one after.
+  final leftKey = new Object();
+  final expando = new Expando<Node>();
+  final rightKey = new Object();
+
+  Node? get left => expando[leftKey];
+  set left(Node? value) => expando[leftKey] = value;
+  Node? get right => expando[rightKey];
+  set right(Node? value) => expando[rightKey] = value;
+
+  /**
+   * Performs an ordered traversal of the subtree starting here.
+   */
+  void traverse(void f(Node n)) {
+    Node? current = this;
+    while (current != null) {
+      Node? left = current.left;
+      if (left != null) left.traverse(f);
+      f(current);
+      current = current.right;
+    }
+  }
+}
diff --git a/runtime/tests/vm/dart/splay_test.dart b/runtime/tests/vm/dart/splay_test.dart
index 47b4ccc..7e974a1 100644
--- a/runtime/tests/vm/dart/splay_test.dart
+++ b/runtime/tests/vm/dart/splay_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.
 
-// This benchmark is based on a JavaScript log processing module used
-// by the V8 profiler to generate execution time profiles for runs of
-// JavaScript applications, and it effectively measures how fast the
-// JavaScript engine is at allocating nodes and reclaiming the memory
-// used for old nodes. Because of the way splay trees work, the engine
-// also has to deal with a lot of changes to the large tree object
-// graph.
+// This test is a copy of the Splay benchmark that is run with a variety of
+// different GC options. It makes for a good GC stress test because it
+// continuously makes small changes to a large, long-lived data structure,
+// stressing lots of combinations of references between new-gen and old-gen
+// objects, and between marked and unmarked objects.
 
 // VMOptions=
 // VMOptions=--no_concurrent_mark --no_concurrent_sweep
diff --git a/runtime/tests/vm/dart/use_save_debugging_info_flag_test.dart b/runtime/tests/vm/dart/use_save_debugging_info_flag_test.dart
index 091087d..2bd55a2 100644
--- a/runtime/tests/vm/dart/use_save_debugging_info_flag_test.dart
+++ b/runtime/tests/vm/dart/use_save_debugging_info_flag_test.dart
@@ -13,6 +13,7 @@
 import "dart:typed_data";
 
 import 'package:expect/expect.dart';
+import 'package:native_stack_traces/elf.dart';
 import 'package:native_stack_traces/native_stack_traces.dart';
 import 'package:path/path.dart' as path;
 
@@ -63,6 +64,7 @@
       '--elf=$scriptWholeSnapshot',
       scriptDill,
     ]);
+    checkElf(scriptWholeSnapshot);
 
     final scriptStrippedOnlySnapshot = path.join(tempDir, 'stripped_only.so');
     await run(genSnapshot, <String>[
@@ -72,6 +74,7 @@
       '--strip',
       scriptDill,
     ]);
+    checkElf(scriptStrippedOnlySnapshot);
 
     final scriptStrippedSnapshot = path.join(tempDir, 'stripped.so');
     final scriptDebuggingInfo = path.join(tempDir, 'debug.so');
@@ -83,6 +86,8 @@
       '--save-debugging-info=$scriptDebuggingInfo',
       scriptDill,
     ]);
+    checkElf(scriptStrippedSnapshot);
+    checkElf(scriptDebuggingInfo);
 
     // Run the resulting scripts, saving the stack traces.
     final wholeTrace = await runError(aotRuntime, <String>[
@@ -184,3 +189,46 @@
     }
   }
 }
+
+void checkElf(String filename) {
+  print("Checking ELF file $filename:");
+  final elf = Elf.fromFile(filename);
+  Expect.isNotNull(elf);
+  final dynamic = elf!.namedSections(".dynamic").single as DynamicTable;
+
+  // Check the dynamic string table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_STRTAB), "no string table entry");
+  final dynstr = elf.namedSections(".dynstr").single;
+  print(".dynstr address = ${dynamic[DynamicTableTag.DT_STRTAB]}");
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(dynstr),
+      "string table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_STRTAB], dynstr.headerEntry.addr);
+  Expect.isTrue(dynamic.containsKey(DynamicTableTag.DT_STRSZ),
+      "no string table size entry");
+  print(".dynstr size = ${dynamic[DynamicTableTag.DT_STRSZ]}");
+  Expect.equals(dynamic[DynamicTableTag.DT_STRSZ], dynstr.headerEntry.size);
+
+  // Check the dynamic symbol table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_SYMTAB), "no symbol table entry");
+  print(".dynsym address = ${dynamic[DynamicTableTag.DT_SYMTAB]}");
+  final dynsym = elf.namedSections(".dynsym").single;
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(dynsym),
+      "string table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_SYMTAB], dynsym.headerEntry.addr);
+  Expect.isTrue(dynamic.containsKey(DynamicTableTag.DT_SYMENT),
+      "no symbol table entry size entry");
+  print(".dynsym entry size = ${dynamic[DynamicTableTag.DT_SYMENT]}");
+  Expect.equals(
+      dynamic[DynamicTableTag.DT_SYMENT], dynsym.headerEntry.entrySize);
+
+  // Check the hash table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_HASH), "no hash table entry");
+  print(".hash address = ${dynamic[DynamicTableTag.DT_HASH]}");
+  final hash = elf.namedSections(".hash").single;
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(hash),
+      "hash table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_HASH], hash.headerEntry.addr);
+}
diff --git a/runtime/tests/vm/dart_2/aot_prefer_equality_comparison_il_test.dart b/runtime/tests/vm/dart_2/aot_prefer_equality_comparison_il_test.dart
new file mode 100644
index 0000000..9baf000
--- /dev/null
+++ b/runtime/tests/vm/dart_2/aot_prefer_equality_comparison_il_test.dart
@@ -0,0 +1,18 @@
+// 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 that we emit EqualityCompare rather than StrictCompare+BoxInt64
+// when comparing non-nullable integer to a Smi.
+
+// MatchIL[AOT]=factorial
+// __ GraphEntry
+// __ FunctionEntry
+// __ CheckStackOverflow
+// __ Branch(EqualityCompare)
+@pragma('vm:never-inline')
+int factorial(int value) => value == 1 ? value : value * factorial(value - 1);
+
+void main() {
+  print(factorial(4));
+}
diff --git a/runtime/tests/vm/dart_2/isolates/internal.dart b/runtime/tests/vm/dart_2/isolates/internal.dart
deleted file mode 100644
index 1742a43..0000000
--- a/runtime/tests/vm/dart_2/isolates/internal.dart
+++ /dev/null
@@ -1,16 +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.
-
-// @dart = 2.9
-
-import 'dart:io';
-import 'dart:isolate';
-import 'dart:async';
-import 'dart:_internal' as dart_internal;
-
-extension SendPortSendAndExit on SendPort {
-  void sendAndExit(var message) {
-    dart_internal.sendAndExit(this, message);
-  }
-}
diff --git a/runtime/tests/vm/dart_2/isolates/ring_gc_sendAndExit_test.dart b/runtime/tests/vm/dart_2/isolates/ring_gc_sendAndExit_test.dart
index 56b636c..2c7011c 100644
--- a/runtime/tests/vm/dart_2/isolates/ring_gc_sendAndExit_test.dart
+++ b/runtime/tests/vm/dart_2/isolates/ring_gc_sendAndExit_test.dart
@@ -26,7 +26,7 @@
   final ring = await Ring.create(numIsolates);
 
   // Let each node produce a tree, send it to it's neighbour and let it return
-  // the one it received (via sendAndExit).
+  // the one it received (via Isolate.exit()).
   final results = await ring.runAndClose((int id) => Worker(id));
   Expect.equals(numIsolates, results.length);
 
diff --git a/runtime/tests/vm/dart_2/isolates/test_utils.dart b/runtime/tests/vm/dart_2/isolates/test_utils.dart
index 0c93f3d..a57bb41 100644
--- a/runtime/tests/vm/dart_2/isolates/test_utils.dart
+++ b/runtime/tests/vm/dart_2/isolates/test_utils.dart
@@ -8,8 +8,6 @@
 import 'dart:io';
 import 'dart:isolate';
 
-import 'internal.dart';
-
 export '../../../../../benchmarks/IsolateFibonacci/dart2/IsolateFibonacci.dart'
   show fibonacciRecursive;
 
@@ -104,7 +102,7 @@
         case Command.kRunAndClose:
           final RingElement re = args[1];
           final SendPort nextNeighbor = args[2];
-          port.sendAndExit(await re.run(nextNeighbor, siData));
+          Isolate.exit(port, await re.run(nextNeighbor, siData));
           break;
         case Command.kClose:
           port.send('done');
diff --git a/runtime/tests/vm/dart_2/sendandexit_test.dart b/runtime/tests/vm/dart_2/sendandexit_test.dart
index f64b1ee..3ee64fe 100644
--- a/runtime/tests/vm/dart_2/sendandexit_test.dart
+++ b/runtime/tests/vm/dart_2/sendandexit_test.dart
@@ -4,11 +4,10 @@
 //
 // VMOptions=--enable-isolate-groups
 //
-// Validates functionality of sendAndExit.
+// Validates functionality of Isolate.exit().
 
 // @dart = 2.9
 
-import 'dart:_internal' show sendAndExit;
 import 'dart:async';
 import 'dart:isolate';
 import 'dart:nativewrappers';
@@ -29,7 +28,7 @@
 verifyCantSendAnonymousClosure() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, () {}),
+      () => Isolate.exit(receivePort.sendPort, () {}),
       (e) =>
           e.toString() ==
           'Invalid argument: "Illegal argument in isolate message : '
@@ -42,7 +41,7 @@
 verifyCantSendNative() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, NativeWrapperClass()),
+      () => Isolate.exit(receivePort.sendPort, NativeWrapperClass()),
       (e) => e.toString().startsWith('Invalid argument: '
           '"Illegal argument in isolate message : '
           '(object extends NativeWrapper'));
@@ -52,7 +51,7 @@
 verifyCantSendReceivePort() async {
   final receivePort = ReceivePort();
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, receivePort),
+      () => Isolate.exit(receivePort.sendPort, receivePort),
       // closure is encountered first before we reach ReceivePort instance
       (e) => e.toString().startsWith(
           'Invalid argument: "Illegal argument in isolate message : '
@@ -64,7 +63,7 @@
   final receivePort = ReceivePort();
   final regexp = RegExp("");
   Expect.throws(
-      () => sendAndExit(receivePort.sendPort, regexp),
+      () => Isolate.exit(receivePort.sendPort, regexp),
       (e) =>
           e.toString() ==
           'Invalid argument: '
@@ -75,7 +74,7 @@
 add(a, b) => a + b;
 
 worker(SendPort sendPort) async {
-  sendAndExit(sendPort, add);
+  Isolate.exit(sendPort, add);
 }
 
 verifyCanSendStaticMethod() async {
diff --git a/runtime/tests/vm/dart_2/splay_ephemeron_test.dart b/runtime/tests/vm/dart_2/splay_ephemeron_test.dart
new file mode 100644
index 0000000..7ab290a
--- /dev/null
+++ b/runtime/tests/vm/dart_2/splay_ephemeron_test.dart
@@ -0,0 +1,351 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test is a copy of the Splay benchmark that is run with a variety of
+// different GC options. It makes for a good GC stress test because it
+// continuously makes small changes to a large, long-lived data structure,
+// stressing lots of combinations of references between new-gen and old-gen
+// objects, and between marked and unmarked objects.
+// The ephemeron variant of this test replaces the direct child pointers in the
+// tree with Expandos to stress the handling of WeakProperties/ephemerons.
+
+// This file is copied into another directory and the default opt out scheme of
+// CFE using the pattern 'vm/dart_2' doesn't work, so opt it out explicitly.
+// @dart=2.9
+
+// VMOptions=
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--scavenger_tasks=0
+// VMOptions=--scavenger_tasks=1
+// VMOptions=--scavenger_tasks=2
+// VMOptions=--scavenger_tasks=3
+// VMOptions=--verify_before_gc
+// VMOptions=--verify_after_gc
+// VMOptions=--verify_before_gc --verify_after_gc
+// VMOptions=--verify_store_buffer
+// VMOptions=--stress_write_barrier_elimination
+// VMOptions=--old_gen_heap_size=150
+
+import "dart:math";
+import 'package:benchmark_harness/benchmark_harness.dart';
+
+void main() {
+  Splay.main();
+}
+
+class Splay extends BenchmarkBase {
+  const Splay() : super("Splay");
+
+  // Configuration.
+  static final int kTreeSize = 8000;
+  static final int kTreeModifications = 80;
+  static final int kTreePayloadDepth = 5;
+
+  static SplayTree tree;
+
+  static Random rnd = new Random(12345);
+
+  // Insert new node with a unique key.
+  static num insertNewNode() {
+    num key;
+    do {
+      key = rnd.nextDouble();
+    } while (tree.find(key) != null);
+    Payload payload = Payload.generate(kTreePayloadDepth, key.toString());
+    tree.insert(key, payload);
+    return key;
+  }
+
+  static void mysetup() {
+    tree = new SplayTree();
+    for (int i = 0; i < kTreeSize; i++) insertNewNode();
+  }
+
+  static void tearDown() {
+    // Allow the garbage collector to reclaim the memory
+    // used by the splay tree no matter how we exit the
+    // tear down function.
+    List<num> keys = tree.exportKeys();
+    tree = null;
+
+    // Verify that the splay tree has the right size.
+    int length = keys.length;
+    if (length != kTreeSize) throw new Error("Splay tree has wrong size");
+
+    // Verify that the splay tree has sorted, unique keys.
+    for (int i = 0; i < length - 1; i++) {
+      if (keys[i] >= keys[i + 1]) throw new Error("Splay tree not sorted");
+    }
+  }
+
+  void warmup() {
+    exercise();
+  }
+
+  void exercise() {
+    // Replace a few nodes in the splay tree.
+    for (int i = 0; i < kTreeModifications; i++) {
+      num key = insertNewNode();
+      Node greatest = tree.findGreatestLessThan(key);
+      if (greatest == null) tree.remove(key);
+      else tree.remove(greatest.key);
+    }
+  }
+
+  static void main() {
+    mysetup();
+    new Splay().report();
+    tearDown();
+  }
+}
+
+
+class Leaf {
+  Leaf(String tag) {
+    string = "String for key $tag in leaf node";
+    array = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ];
+  }
+  String string;
+  List<num> array;
+}
+
+
+class Payload {
+  Payload(left, right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  // This ordering of fields is delibrate: one key is visited before the expando
+  // and one after.
+  final leftKey = new Object();
+  final expando = new Expando();
+  final rightKey = new Object();
+
+  get left => expando[leftKey];
+  set left(value) => expando[leftKey] = value;
+  get right => expando[rightKey];
+  set right(value) => expando[rightKey] = value;
+
+  static generate(depth, tag) {
+    if (depth == 0) return new Leaf(tag);
+    return new Payload(generate(depth - 1, tag),
+                       generate(depth - 1, tag));
+  }
+}
+
+class Error implements Exception {
+  const Error(this.message);
+  final String message;
+}
+
+
+/**
+ * A splay tree is a self-balancing binary search tree with the additional
+ * property that recently accessed elements are quick to access again.
+ * It performs basic operations such as insertion, look-up and removal
+ * in O(log(n)) amortized time.
+ */
+class SplayTree {
+  SplayTree();
+
+  /**
+   * Inserts a node into the tree with the specified [key] and value if
+   * the tree does not already contain a node with the specified key. If
+   * the value is inserted, it becomes the root of the tree.
+   */
+  void insert(num key, value) {
+    if (isEmpty) {
+      root = new Node(key, value);
+      return;
+    }
+    // Splay on the key to move the last node on the search path for
+    // the key to the root of the tree.
+    splay(key);
+    if (root.key == key) return;
+    Node node = new Node(key, value);
+    if (key > root.key) {
+      node.left = root;
+      node.right = root.right;
+      root.right = null;
+    } else {
+      node.right = root;
+      node.left = root.left;
+      root.left = null;
+    }
+    root = node;
+  }
+
+  /**
+   * Removes a node with the specified key from the tree if the tree
+   * contains a node with this key. The removed node is returned. If
+   * [key] is not found, an exception is thrown.
+   */
+  Node remove(num key) {
+    if (isEmpty) throw new Error('Key not found: $key');
+    splay(key);
+    if (root.key != key) throw new Error('Key not found: $key');
+    Node removed = root;
+    if (root.left == null) {
+      root = root.right;
+    } else {
+      Node right = root.right;
+      root = root.left;
+      // Splay to make sure that the new root has an empty right child.
+      splay(key);
+      // Insert the original right child as the right child of the new
+      // root.
+      root.right = right;
+    }
+    return removed;
+  }
+
+  /**
+   * Returns the node having the specified [key] or null if the tree doesn't
+   * contain a node with the specified [key].
+   */
+  Node find(num key) {
+    if (isEmpty) return null;
+    splay(key);
+    return root.key == key ? root : null;
+  }
+
+  /**
+   * Returns the Node having the maximum key value.
+   */
+  Node findMax([Node start]) {
+    if (isEmpty) return null;
+    Node current = null == start ? root : start;
+    while (current.right != null) current = current.right;
+    return current;
+  }
+
+  /**
+   * Returns the Node having the maximum key value that
+   * is less than the specified [key].
+   */
+  Node findGreatestLessThan(num key) {
+    if (isEmpty) return null;
+    // Splay on the key to move the node with the given key or the last
+    // node on the search path to the top of the tree.
+    splay(key);
+    // Now the result is either the root node or the greatest node in
+    // the left subtree.
+    if (root.key < key) return root;
+    if (root.left != null) return findMax(root.left);
+    return null;
+  }
+
+  /**
+   * Perform the splay operation for the given key. Moves the node with
+   * the given key to the top of the tree.  If no node has the given
+   * key, the last node on the search path is moved to the top of the
+   * tree. This is the simplified top-down splaying algorithm from:
+   * "Self-adjusting Binary Search Trees" by Sleator and Tarjan
+   */
+  void splay(num key) {
+    if (isEmpty) return;
+    // Create a dummy node.  The use of the dummy node is a bit
+    // counter-intuitive: The right child of the dummy node will hold
+    // the L tree of the algorithm.  The left child of the dummy node
+    // will hold the R tree of the algorithm.  Using a dummy node, left
+    // and right will always be nodes and we avoid special cases.
+    final Node dummy = new Node(null, null);
+    Node left = dummy;
+    Node right = dummy;
+    Node current = root;
+    while (true) {
+      if (key < current.key) {
+        if (current.left == null) break;
+        if (key < current.left.key) {
+          // Rotate right.
+          Node tmp = current.left;
+          current.left = tmp.right;
+          tmp.right = current;
+          current = tmp;
+          if (current.left == null) break;
+        }
+        // Link right.
+        right.left = current;
+        right = current;
+        current = current.left;
+      } else if (key > current.key) {
+        if (current.right == null) break;
+        if (key > current.right.key) {
+          // Rotate left.
+          Node tmp = current.right;
+          current.right = tmp.left;
+          tmp.left = current;
+          current = tmp;
+          if (current.right == null) break;
+        }
+        // Link left.
+        left.right = current;
+        left = current;
+        current = current.right;
+      } else {
+        break;
+      }
+    }
+    // Assemble.
+    left.right = current.left;
+    right.left = current.right;
+    current.left = dummy.right;
+    current.right = dummy.left;
+    root = current;
+  }
+
+  /**
+   * Returns a list with all the keys of the tree.
+   */
+  List<num> exportKeys() {
+    List<num> result = [];
+    if (!isEmpty) root.traverse((Node node) => result.add(node.key));
+    return result;
+  }
+
+  // Tells whether the tree is empty.
+  bool get isEmpty => null == root;
+
+  // Pointer to the root node of the tree.
+  Node root;
+}
+
+
+class Node {
+  Node(this.key, this.value);
+  final num key;
+  final Object value;
+
+  // This ordering of fields is delibrate: one key is visited before the expando
+  // and one after.
+  final leftKey = new Object();
+  final expando = new Expando<Node>();
+  final rightKey = new Object();
+
+  Node get left => expando[leftKey];
+  set left(Node value) => expando[leftKey] = value;
+  Node get right => expando[rightKey];
+  set right(Node value) => expando[rightKey] = value;
+
+  /**
+   * Performs an ordered traversal of the subtree starting here.
+   */
+  void traverse(void f(Node n)) {
+    Node current = this;
+    while (current != null) {
+      Node left = current.left;
+      if (left != null) left.traverse(f);
+      f(current);
+      current = current.right;
+    }
+  }
+}
diff --git a/runtime/tests/vm/dart_2/splay_test.dart b/runtime/tests/vm/dart_2/splay_test.dart
index 06a2951..a793419 100644
--- a/runtime/tests/vm/dart_2/splay_test.dart
+++ b/runtime/tests/vm/dart_2/splay_test.dart
@@ -2,14 +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.
 
-// This benchmark is based on a JavaScript log processing module used
-// by the V8 profiler to generate execution time profiles for runs of
-// JavaScript applications, and it effectively measures how fast the
-// JavaScript engine is at allocating nodes and reclaiming the memory
-// used for old nodes. Because of the way splay trees work, the engine
-// also has to deal with a lot of changes to the large tree object
-// graph.
-//
+// This test is a copy of the Splay benchmark that is run with a variety of
+// different GC options. It makes for a good GC stress test because it
+// continuously makes small changes to a large, long-lived data structure,
+// stressing lots of combinations of references between new-gen and old-gen
+// objects, and between marked and unmarked objects.
+
 // This file is copied into another directory and the default opt out scheme of
 // CFE using the pattern 'vm/dart_2' doesn't work, so opt it out explicitly.
 // @dart=2.9
diff --git a/runtime/tests/vm/dart_2/use_save_debugging_info_flag_test.dart b/runtime/tests/vm/dart_2/use_save_debugging_info_flag_test.dart
index cc8f9b4..db548f4 100644
--- a/runtime/tests/vm/dart_2/use_save_debugging_info_flag_test.dart
+++ b/runtime/tests/vm/dart_2/use_save_debugging_info_flag_test.dart
@@ -15,6 +15,7 @@
 import "dart:typed_data";
 
 import 'package:expect/expect.dart';
+import 'package:native_stack_traces/elf.dart';
 import 'package:native_stack_traces/native_stack_traces.dart';
 import 'package:path/path.dart' as path;
 
@@ -65,6 +66,7 @@
       '--elf=$scriptWholeSnapshot',
       scriptDill,
     ]);
+    checkElf(scriptWholeSnapshot);
 
     final scriptStrippedOnlySnapshot = path.join(tempDir, 'stripped_only.so');
     await run(genSnapshot, <String>[
@@ -74,6 +76,7 @@
       '--strip',
       scriptDill,
     ]);
+    checkElf(scriptStrippedOnlySnapshot);
 
     final scriptStrippedSnapshot = path.join(tempDir, 'stripped.so');
     final scriptDebuggingInfo = path.join(tempDir, 'debug.so');
@@ -85,6 +88,8 @@
       '--save-debugging-info=$scriptDebuggingInfo',
       scriptDill,
     ]);
+    checkElf(scriptStrippedSnapshot);
+    checkElf(scriptDebuggingInfo);
 
     // Run the resulting scripts, saving the stack traces.
     final wholeTrace = await runError(aotRuntime, <String>[
@@ -186,3 +191,46 @@
     }
   }
 }
+
+void checkElf(String filename) {
+  print("Checking ELF file $filename:");
+  final elf = Elf.fromFile(filename);
+  Expect.isNotNull(elf);
+  final dynamic = elf.namedSections(".dynamic").single as DynamicTable;
+
+  // Check the dynamic string table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_STRTAB), "no string table entry");
+  final dynstr = elf.namedSections(".dynstr").single;
+  print(".dynstr address = ${dynamic[DynamicTableTag.DT_STRTAB]}");
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(dynstr),
+      "string table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_STRTAB], dynstr.headerEntry.addr);
+  Expect.isTrue(dynamic.containsKey(DynamicTableTag.DT_STRSZ),
+      "no string table size entry");
+  print(".dynstr size = ${dynamic[DynamicTableTag.DT_STRSZ]}");
+  Expect.equals(dynamic[DynamicTableTag.DT_STRSZ], dynstr.headerEntry.size);
+
+  // Check the dynamic symbol table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_SYMTAB), "no symbol table entry");
+  print(".dynsym address = ${dynamic[DynamicTableTag.DT_SYMTAB]}");
+  final dynsym = elf.namedSections(".dynsym").single;
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(dynsym),
+      "string table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_SYMTAB], dynsym.headerEntry.addr);
+  Expect.isTrue(dynamic.containsKey(DynamicTableTag.DT_SYMENT),
+      "no symbol table entry size entry");
+  print(".dynsym entry size = ${dynamic[DynamicTableTag.DT_SYMENT]}");
+  Expect.equals(
+      dynamic[DynamicTableTag.DT_SYMENT], dynsym.headerEntry.entrySize);
+
+  // Check the hash table information.
+  Expect.isTrue(
+      dynamic.containsKey(DynamicTableTag.DT_HASH), "no hash table entry");
+  print(".hash address = ${dynamic[DynamicTableTag.DT_HASH]}");
+  final hash = elf.namedSections(".hash").single;
+  Expect.isTrue(elf.sectionHasValidSegmentAddresses(hash),
+      "hash table addresses are invalid");
+  Expect.equals(dynamic[DynamicTableTag.DT_HASH], hash.headerEntry.addr);
+}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 3ca14d8..8de67b8 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -67,10 +67,14 @@
 dart/regress_40462_test: SkipSlow
 dart/regress_40753_test: Skip # This test crashes on the bot, but not locally, and infrastructure repeatly fails to locate its coredump.
 dart/trigger_gc_in_native_test: Skip # This test crashes on the bot, but not locally, and infrastructure repeatly fails to locate its coredump.
+dart/use_strip_flag_test: Pass, Slow # This test can take a longer time to complete.
+dart/v8_snapshot_profile_writer_test: SkipSlow
 dart_2/appjit_cha_deopt_test: SkipSlow
 dart_2/regress_40462_test: SkipSlow
 dart_2/regress_40753_test: Skip # This test crashes on the bot, but not locally, and infrastructure repeatly fails to locate its coredump.
 dart_2/trigger_gc_in_native_test: Skip # This test crashes on the bot, but not locally, and infrastructure repeatly fails to locate its coredump.
+dart_2/use_strip_flag_test: Pass, Slow # This test can take a longer time to complete.
+dart_2/v8_snapshot_profile_writer_test: SkipSlow
 
 [ $compiler == app_jitk ]
 dart/snapshot_version_test: RuntimeError
@@ -313,6 +317,8 @@
 # up with the real Dart stack trace and hence we don't get correct
 # symbol names.
 [ $arch == simarm || $arch == simarm64 || $arch == simarm64c ]
+cc/DartAPI_NativeFieldAccess: Skip # Test uses dart:ffi which is not supported on simulators.
+cc/DartAPI_NativeFieldAccess_Throws: Skip # Test uses dart:ffi which is not supported on simulators.
 cc/Dart_SetFfiNativeResolver: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
 cc/Dart_SetFfiNativeResolver_DoesNotResolve: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
 cc/Dart_SetFfiNativeResolver_MissingResolver: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
diff --git a/runtime/tools/compiler_layering_check.py b/runtime/tools/compiler_layering_check.py
index 06d73d9..e8c955a 100755
--- a/runtime/tools/compiler_layering_check.py
+++ b/runtime/tools/compiler_layering_check.py
@@ -10,7 +10,6 @@
 # Currently it only checks that core runtime headers RUNTIME_LAYER_HEADERS
 # are not included into any sources listed in SHOULD_NOT_DEPEND_ON_RUNTIME.
 
-import glob
 import os
 import re
 import sys
@@ -107,7 +106,7 @@
     def ExtractIncludes(self, file):
         """Extract the list of includes from the given file."""
         deps = set()
-        with open(os.path.join(self.root, file)) as file:
+        with open(os.path.join(self.root, file), encoding='utf-8') as file:
             for line in file:
                 if line.startswith('namespace dart {'):
                     break
diff --git a/runtime/tools/dartfuzz/dartfuzz.dart b/runtime/tools/dartfuzz/dartfuzz.dart
index c2e2d6c..a62e235 100644
--- a/runtime/tools/dartfuzz/dartfuzz.dart
+++ b/runtime/tools/dartfuzz/dartfuzz.dart
@@ -14,7 +14,7 @@
 // Version of DartFuzz. Increase this each time changes are made
 // to preserve the property that a given version of DartFuzz yields
 // the same fuzzed program for a deterministic random seed.
-const String version = '1.92';
+const String version = '1.93';
 
 // Restriction on statements and expressions.
 const int stmtDepth = 1;
@@ -550,6 +550,8 @@
     emitBraceWrapped(() => tryBody());
     emit(' on OutOfMemoryError ');
     emitBraceWrapped(() => emitLn('exit($oomExitCode);', newline: false));
+    emit(' on StackOverflowError ');
+    emitBraceWrapped(() => emitLn('exit($oomExitCode);', newline: false));
     emit(' catch (e, st) ');
     emitBraceWrapped(catchBody);
     if (finallyBody != null) {
@@ -1391,6 +1393,8 @@
     emitBraceWrapped(emitStatementsClosure);
     emit(' on OutOfMemoryError ');
     emitBraceWrapped(() => emitLn('exit($oomExitCode);', newline: false));
+    emit(' on StackOverflowError ');
+    emitBraceWrapped(() => emitLn('exit($oomExitCode);', newline: false));
     emit(' catch (exception, stackTrace) ', newline: false);
     emitBraceWrapped(emitStatementsClosure);
     if (coinFlip()) {
diff --git a/runtime/tools/dartfuzz/dartfuzz_test.dart b/runtime/tools/dartfuzz/dartfuzz_test.dart
index fb826ff..7ba2f79 100644
--- a/runtime/tools/dartfuzz/dartfuzz_test.dart
+++ b/runtime/tools/dartfuzz/dartfuzz_test.dart
@@ -356,8 +356,7 @@
       }
       // Report every 10 minutes.
       if ((current_time - report_time) > (10 * 60 * 1000)) {
-        print(
-            '\n$isolate: busy @$numTests ${current_time - start_time} seconds....');
+        print('\n$isolate: busy @$numTests ${current_time - start_time}ms....');
         report_time = current_time;
       }
     }
diff --git a/runtime/tools/dartfuzz/gen_type_table.dart b/runtime/tools/dartfuzz/gen_type_table.dart
index 0f2599a..6bd642e 100644
--- a/runtime/tools/dartfuzz/gen_type_table.dart
+++ b/runtime/tools/dartfuzz/gen_type_table.dart
@@ -8,7 +8,7 @@
 //   dart gen_type_table.dart > dartfuzz_type_table.dart
 //
 // Reformat:
-//   tools/sdks/dart-sdk/bin/dartfmt -w \
+//   tools/sdks/dart-sdk/bin/dart format \
 //   runtime/tools/dartfuzz/dartfuzz_type_table.dart
 //
 // Then send out modified dartfuzz_type_table.dart for review together
diff --git a/runtime/tools/embedder_layering_check.py b/runtime/tools/embedder_layering_check.py
index 775040e..5e564d1 100644
--- a/runtime/tools/embedder_layering_check.py
+++ b/runtime/tools/embedder_layering_check.py
@@ -7,7 +7,6 @@
 # Simple tool for verifying that sources from the standalone embedder do not
 # directly include sources from the VM or vice versa.
 
-import glob
 import os
 import re
 import sys
@@ -28,7 +27,7 @@
 
 def CheckFile(sdk_root, path):
     includes = set()
-    with open(os.path.join(sdk_root, path)) as file:
+    with open(os.path.join(sdk_root, path), encoding='utf-8') as file:
         for line in file:
             m = INCLUDE_DIRECTIVE_RE.match(line)
             if m is not None:
diff --git a/runtime/tools/ffi/sdk_lib_ffi_generator.dart b/runtime/tools/ffi/sdk_lib_ffi_generator.dart
index 4b926b5..3b68036 100644
--- a/runtime/tools/ffi/sdk_lib_ffi_generator.dart
+++ b/runtime/tools/ffi/sdk_lib_ffi_generator.dart
@@ -51,7 +51,7 @@
 
   final fullPath = path.resolve(fileName).path;
   File(fullPath).writeAsStringSync(buffer.toString());
-  final fmtResult = Process.runSync(dartfmtPath().path, ["-w", fullPath]);
+  final fmtResult = Process.runSync(dartPath().path, ["format", fullPath]);
   if (fmtResult.exitCode != 0) {
     throw Exception(
         "Formatting failed:\n${fmtResult.stdout}\n${fmtResult.stderr}\n");
@@ -326,10 +326,10 @@
   return parser;
 }
 
-Uri dartfmtPath() {
-  // TODO(dacoharkes): Use "../../../tools/sdks/dart-sdk/bin/dartfmt" when the
+Uri dartPath() {
+  // TODO(dacoharkes): Use "../../../tools/sdks/dart-sdk/bin/dart" when the
   // pinned fully supports extension methods.
-  return Uri.parse("dartfmt");
+  return Uri.parse("dart");
 }
 
 class Config {
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
new file mode 100644
index 0000000..1d74f0a
--- /dev/null
+++ b/runtime/vm/app_snapshot.cc
@@ -0,0 +1,8411 @@
+// 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.
+
+#include <memory>
+#include <utility>
+
+#include "vm/app_snapshot.h"
+
+#include "platform/assert.h"
+#include "vm/bootstrap.h"
+#include "vm/bss_relocs.h"
+#include "vm/canonical_tables.h"
+#include "vm/class_id.h"
+#include "vm/code_observers.h"
+#include "vm/compiler/api/print_filter.h"
+#include "vm/compiler/assembler/disassembler.h"
+#include "vm/dart.h"
+#include "vm/dart_entry.h"
+#include "vm/dispatch_table.h"
+#include "vm/flag_list.h"
+#include "vm/growable_array.h"
+#include "vm/heap/heap.h"
+#include "vm/image_snapshot.h"
+#include "vm/native_entry.h"
+#include "vm/object.h"
+#include "vm/object_store.h"
+#include "vm/program_visitor.h"
+#include "vm/stub_code.h"
+#include "vm/symbols.h"
+#include "vm/timeline.h"
+#include "vm/v8_snapshot_writer.h"
+#include "vm/version.h"
+#include "vm/zone_text_buffer.h"
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+#include "vm/compiler/backend/code_statistics.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/relocation.h"
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+namespace dart {
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+DEFINE_FLAG(bool,
+            print_cluster_information,
+            false,
+            "Print information about clusters written to snapshot");
+#endif
+
+#if defined(DART_PRECOMPILER)
+DEFINE_FLAG(charp,
+            write_v8_snapshot_profile_to,
+            NULL,
+            "Write a snapshot profile in V8 format to a file.");
+#endif  // defined(DART_PRECOMPILER)
+
+namespace {
+// StorageTrait for HashTable which allows to create hash tables backed by
+// zone memory. Used to compute cluster order for canonical clusters.
+struct GrowableArrayStorageTraits {
+  class Array : public ZoneAllocated {
+   public:
+    explicit Array(Zone* zone, intptr_t length)
+        : length_(length), array_(zone->Alloc<ObjectPtr>(length)) {}
+
+    intptr_t Length() const { return length_; }
+    void SetAt(intptr_t index, const Object& value) const {
+      array_[index] = value.ptr();
+    }
+    ObjectPtr At(intptr_t index) const { return array_[index]; }
+
+   private:
+    intptr_t length_ = 0;
+    ObjectPtr* array_ = nullptr;
+    DISALLOW_COPY_AND_ASSIGN(Array);
+  };
+
+  using ArrayPtr = Array*;
+  class ArrayHandle : public ZoneAllocated {
+   public:
+    explicit ArrayHandle(ArrayPtr ptr) : ptr_(ptr) {}
+    ArrayHandle() {}
+
+    void SetFrom(const ArrayHandle& other) { ptr_ = other.ptr_; }
+    void Clear() { ptr_ = nullptr; }
+    bool IsNull() const { return ptr_ == nullptr; }
+    ArrayPtr ptr() { return ptr_; }
+
+    intptr_t Length() const { return ptr_->Length(); }
+    void SetAt(intptr_t index, const Object& value) const {
+      ptr_->SetAt(index, value);
+    }
+    ObjectPtr At(intptr_t index) const { return ptr_->At(index); }
+
+   private:
+    ArrayPtr ptr_ = nullptr;
+    DISALLOW_COPY_AND_ASSIGN(ArrayHandle);
+  };
+
+  static ArrayHandle& PtrToHandle(ArrayPtr ptr) {
+    return *new ArrayHandle(ptr);
+  }
+
+  static void SetHandle(ArrayHandle& dst, const ArrayHandle& src) {  // NOLINT
+    dst.SetFrom(src);
+  }
+
+  static void ClearHandle(ArrayHandle& dst) {  // NOLINT
+    dst.Clear();
+  }
+
+  static ArrayPtr New(Zone* zone, intptr_t length, Heap::Space space) {
+    return new (zone) Array(zone, length);
+  }
+
+  static bool IsImmutable(const ArrayHandle& handle) { return false; }
+
+  static ObjectPtr At(ArrayHandle* array, intptr_t index) {
+    return array->At(index);
+  }
+
+  static void SetAt(ArrayHandle* array, intptr_t index, const Object& value) {
+    array->SetAt(index, value);
+  }
+};
+}  // namespace
+
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+
+static void RelocateCodeObjects(
+    bool is_vm,
+    GrowableArray<CodePtr>* code_objects,
+    GrowableArray<ImageWriterCommand>* image_writer_commands) {
+  auto thread = Thread::Current();
+  auto isolate_group =
+      is_vm ? Dart::vm_isolate()->group() : thread->isolate_group();
+
+  WritableCodePages writable_code_pages(thread, isolate_group);
+  CodeRelocator::Relocate(thread, code_objects, image_writer_commands, is_vm);
+}
+
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+
+void Deserializer::InitializeHeader(ObjectPtr raw,
+                                    intptr_t class_id,
+                                    intptr_t size,
+                                    bool is_canonical) {
+  ASSERT(Utils::IsAligned(size, kObjectAlignment));
+  uword tags = 0;
+  tags = UntaggedObject::ClassIdTag::update(class_id, tags);
+  tags = UntaggedObject::SizeTag::update(size, tags);
+  tags = UntaggedObject::CanonicalBit::update(is_canonical, tags);
+  tags = UntaggedObject::OldBit::update(true, tags);
+  tags = UntaggedObject::OldAndNotMarkedBit::update(true, tags);
+  tags = UntaggedObject::OldAndNotRememberedBit::update(true, tags);
+  tags = UntaggedObject::NewBit::update(false, tags);
+  raw->untag()->tags_ = tags;
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+void SerializationCluster::WriteAndMeasureAlloc(Serializer* serializer) {
+  intptr_t start_size = serializer->bytes_written();
+  intptr_t start_data = serializer->GetDataSize();
+  intptr_t start_objects = serializer->next_ref_index();
+  uint64_t cid_and_canonical =
+      (static_cast<uint64_t>(cid_) << 1) | (is_canonical() ? 0x1 : 0x0);
+  serializer->Write<uint64_t>(cid_and_canonical);
+  WriteAlloc(serializer);
+  intptr_t stop_size = serializer->bytes_written();
+  intptr_t stop_data = serializer->GetDataSize();
+  intptr_t stop_objects = serializer->next_ref_index();
+  if (FLAG_print_cluster_information) {
+    OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "), ", start_size,
+                 stop_size - start_size);
+    OS::PrintErr("Data 0x%" Pp " (%" Pd "): ", start_data,
+                 stop_data - start_data);
+    OS::PrintErr("Alloc %s (%" Pd ")\n", name(), stop_objects - start_objects);
+  }
+  size_ += (stop_size - start_size) + (stop_data - start_data);
+  num_objects_ += (stop_objects - start_objects);
+  if (target_instance_size_ != kSizeVaries) {
+    target_memory_size_ += num_objects_ * target_instance_size_;
+  }
+}
+
+void SerializationCluster::WriteAndMeasureFill(Serializer* serializer) {
+  intptr_t start = serializer->bytes_written();
+  WriteFill(serializer);
+  intptr_t stop = serializer->bytes_written();
+  if (FLAG_print_cluster_information) {
+    OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "): Fill %s\n", start, stop - start,
+                 name());
+  }
+  size_ += (stop - start);
+}
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+DART_NOINLINE
+void DeserializationCluster::ReadAllocFixedSize(Deserializer* d,
+                                                intptr_t instance_size) {
+  start_index_ = d->next_index();
+  PageSpace* old_space = d->heap()->old_space();
+  intptr_t count = d->ReadUnsigned();
+  for (intptr_t i = 0; i < count; i++) {
+    d->AssignRef(old_space->AllocateSnapshot(instance_size));
+  }
+  stop_index_ = d->next_index();
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+static UnboxedFieldBitmap CalculateTargetUnboxedFieldsBitmap(
+    Serializer* s,
+    intptr_t class_id) {
+  const auto unboxed_fields_bitmap_host =
+      s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(class_id);
+
+  UnboxedFieldBitmap unboxed_fields_bitmap;
+  if (unboxed_fields_bitmap_host.IsEmpty() ||
+      kWordSize == compiler::target::kWordSize) {
+    unboxed_fields_bitmap = unboxed_fields_bitmap_host;
+  } else {
+    ASSERT(kWordSize == 8 && compiler::target::kWordSize == 4);
+    // A new bitmap is built if the word sizes in the target and
+    // host are different
+    unboxed_fields_bitmap.Reset();
+    intptr_t target_i = 0, host_i = 0;
+
+    while (host_i < UnboxedFieldBitmap::Length()) {
+      // Each unboxed field has constant length, therefore the number of
+      // words used by it should double when compiling from 64-bit to 32-bit.
+      if (unboxed_fields_bitmap_host.Get(host_i++)) {
+        unboxed_fields_bitmap.Set(target_i++);
+        unboxed_fields_bitmap.Set(target_i++);
+      } else {
+        // For object pointers, the field is always one word length
+        target_i++;
+      }
+    }
+  }
+
+  return unboxed_fields_bitmap;
+}
+
+class ClassSerializationCluster : public SerializationCluster {
+ public:
+  explicit ClassSerializationCluster(intptr_t num_cids)
+      : SerializationCluster("Class",
+                             kClassCid,
+                             compiler::target::Class::InstanceSize()),
+        predefined_(kNumPredefinedCids),
+        objects_(num_cids) {}
+  ~ClassSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ClassPtr cls = Class::RawCast(object);
+    intptr_t class_id = cls->untag()->id_;
+
+    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
+      // them.
+      predefined_.Add(cls);
+    } else {
+      objects_.Add(cls);
+    }
+
+    PushFromTo(cls);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    intptr_t count = predefined_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ClassPtr cls = predefined_[i];
+      s->AssignRef(cls);
+      AutoTraceObject(cls);
+      intptr_t class_id = cls->untag()->id_;
+      s->WriteCid(class_id);
+    }
+    count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ClassPtr cls = objects_[i];
+      s->AssignRef(cls);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    intptr_t count = predefined_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WriteClass(s, predefined_[i]);
+    }
+    count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WriteClass(s, objects_[i]);
+    }
+  }
+
+ private:
+  void WriteClass(Serializer* s, ClassPtr cls) {
+    AutoTraceObjectName(cls, cls->untag()->name());
+    WriteFromTo(cls);
+    intptr_t class_id = cls->untag()->id_;
+    if (class_id == kIllegalCid) {
+      s->UnexpectedObject(cls, "Class with illegal cid");
+    }
+    s->WriteCid(class_id);
+    if (s->kind() == Snapshot::kFullCore &&
+        RequireCanonicalTypeErasureOfConstants(cls)) {
+      s->UnexpectedObject(cls, "Class with non mode agnostic constants");
+    }
+    if (s->kind() != Snapshot::kFullAOT) {
+      s->Write<uint32_t>(cls->untag()->kernel_offset_);
+    }
+    s->Write<int32_t>(Class::target_instance_size_in_words(cls));
+    s->Write<int32_t>(Class::target_next_field_offset_in_words(cls));
+    s->Write<int32_t>(Class::target_type_arguments_field_offset_in_words(cls));
+    s->Write<int16_t>(cls->untag()->num_type_arguments_);
+    s->Write<uint16_t>(cls->untag()->num_native_fields_);
+    if (s->kind() != Snapshot::kFullAOT) {
+      s->WriteTokenPosition(cls->untag()->token_pos_);
+      s->WriteTokenPosition(cls->untag()->end_token_pos_);
+    }
+    s->Write<uint32_t>(cls->untag()->state_bits_);
+
+    // In AOT, the bitmap of unboxed fields should also be serialized
+    if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
+      s->WriteUnsigned64(
+          CalculateTargetUnboxedFieldsBitmap(s, class_id).Value());
+    }
+  }
+
+  GrowableArray<ClassPtr> predefined_;
+  GrowableArray<ClassPtr> objects_;
+
+  bool RequireCanonicalTypeErasureOfConstants(ClassPtr cls) {
+    // Do not generate a core snapshot containing constants that would require
+    // a canonical erasure of their types if loaded in an isolate running in
+    // unsound nullability mode.
+    if (cls->untag()->host_type_arguments_field_offset_in_words_ ==
+            Class::kNoTypeArguments ||
+        cls->untag()->constants() == Array::null()) {
+      return false;
+    }
+    Zone* zone = Thread::Current()->zone();
+    const Class& clazz = Class::Handle(zone, cls);
+    return clazz.RequireCanonicalTypeErasureOfConstants(zone);
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ClassDeserializationCluster : public DeserializationCluster {
+ public:
+  ClassDeserializationCluster() : DeserializationCluster("Class") {}
+  ~ClassDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    predefined_start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    intptr_t count = d->ReadUnsigned();
+    ClassTable* table = d->isolate_group()->class_table();
+    for (intptr_t i = 0; i < count; i++) {
+      intptr_t class_id = d->ReadCid();
+      ASSERT(table->HasValidClassAt(class_id));
+      ClassPtr cls = table->At(class_id);
+      ASSERT(cls != nullptr);
+      d->AssignRef(cls);
+    }
+    predefined_stop_index_ = d->next_index();
+
+    start_index_ = d->next_index();
+    count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      d->AssignRef(old_space->AllocateSnapshot(Class::InstanceSize()));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ClassTable* table = d->isolate_group()->class_table();
+
+    for (intptr_t id = predefined_start_index_; id < predefined_stop_index_;
+         id++) {
+      ClassPtr cls = static_cast<ClassPtr>(d->Ref(id));
+      ReadFromTo(cls);
+      intptr_t class_id = d->ReadCid();
+      cls->untag()->id_ = class_id;
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      if (d->kind() != Snapshot::kFullAOT) {
+        cls->untag()->kernel_offset_ = d->Read<uint32_t>();
+      }
+#endif
+      if (!IsInternalVMdefinedClassId(class_id)) {
+        cls->untag()->host_instance_size_in_words_ = d->Read<int32_t>();
+        cls->untag()->host_next_field_offset_in_words_ = d->Read<int32_t>();
+#if defined(DART_PRECOMPILER)
+        // Only one pair is serialized. The target field only exists when
+        // DART_PRECOMPILER is defined
+        cls->untag()->target_instance_size_in_words_ =
+            cls->untag()->host_instance_size_in_words_;
+        cls->untag()->target_next_field_offset_in_words_ =
+            cls->untag()->host_next_field_offset_in_words_;
+#endif  // defined(DART_PRECOMPILER)
+      } else {
+        d->Read<int32_t>();  // Skip.
+        d->Read<int32_t>();  // Skip.
+      }
+      cls->untag()->host_type_arguments_field_offset_in_words_ =
+          d->Read<int32_t>();
+#if defined(DART_PRECOMPILER)
+      cls->untag()->target_type_arguments_field_offset_in_words_ =
+          cls->untag()->host_type_arguments_field_offset_in_words_;
+#endif  // defined(DART_PRECOMPILER)
+      cls->untag()->num_type_arguments_ = d->Read<int16_t>();
+      cls->untag()->num_native_fields_ = d->Read<uint16_t>();
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      ASSERT(d->kind() != Snapshot::kFullAOT);
+      cls->untag()->token_pos_ = d->ReadTokenPosition();
+      cls->untag()->end_token_pos_ = d->ReadTokenPosition();
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+      cls->untag()->state_bits_ = d->Read<uint32_t>();
+
+      if (FLAG_precompiled_mode) {
+        d->ReadUnsigned64();  // Skip unboxed fields bitmap.
+      }
+    }
+
+    auto shared_class_table = d->isolate_group()->shared_class_table();
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ClassPtr cls = static_cast<ClassPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(cls, kClassCid, Class::InstanceSize());
+      ReadFromTo(cls);
+
+      intptr_t class_id = d->ReadCid();
+      ASSERT(class_id >= kNumPredefinedCids);
+      cls->untag()->id_ = class_id;
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      if (d->kind() != Snapshot::kFullAOT) {
+        cls->untag()->kernel_offset_ = d->Read<uint32_t>();
+      }
+#endif
+      cls->untag()->host_instance_size_in_words_ = d->Read<int32_t>();
+      cls->untag()->host_next_field_offset_in_words_ = d->Read<int32_t>();
+      cls->untag()->host_type_arguments_field_offset_in_words_ =
+          d->Read<int32_t>();
+#if defined(DART_PRECOMPILER)
+      cls->untag()->target_instance_size_in_words_ =
+          cls->untag()->host_instance_size_in_words_;
+      cls->untag()->target_next_field_offset_in_words_ =
+          cls->untag()->host_next_field_offset_in_words_;
+      cls->untag()->target_type_arguments_field_offset_in_words_ =
+          cls->untag()->host_type_arguments_field_offset_in_words_;
+#endif  // defined(DART_PRECOMPILER)
+      cls->untag()->num_type_arguments_ = d->Read<int16_t>();
+      cls->untag()->num_native_fields_ = d->Read<uint16_t>();
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      ASSERT(d->kind() != Snapshot::kFullAOT);
+      cls->untag()->token_pos_ = d->ReadTokenPosition();
+      cls->untag()->end_token_pos_ = d->ReadTokenPosition();
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+      cls->untag()->state_bits_ = d->Read<uint32_t>();
+
+      table->AllocateIndex(class_id);
+      table->SetAt(class_id, cls);
+
+      if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
+        const UnboxedFieldBitmap unboxed_fields_map(d->ReadUnsigned64());
+        shared_class_table->SetUnboxedFieldsMapAt(class_id, unboxed_fields_map);
+      }
+    }
+  }
+
+ private:
+  intptr_t predefined_start_index_;
+  intptr_t predefined_stop_index_;
+};
+
+// Super classes for writing out clusters which contain objects grouped into
+// a canonical set (e.g. String, Type, TypeArguments, etc).
+// To save space in the snapshot we avoid writing such canonical sets
+// explicitly as Array objects into the snapshot and instead utilize a different
+// encoding: objects in a cluster representing a canonical set are sorted
+// to appear in the same order they appear in the Array representing the set,
+// and we additionaly write out array of values describing gaps between objects.
+//
+// In some situations not all canonical objects of the some type need to
+// be added to the resulting canonical set because they are cached in some
+// special way (see Type::Canonicalize as an example, which caches declaration
+// types in a special way). In this case subclass can set
+// kAllCanonicalObjectsAreIncludedIntoSet to |false| and override
+// IsInCanonicalSet filter.
+#if !defined(DART_PRECOMPILED_RUNTIME)
+template <typename SetType,
+          typename HandleType,
+          typename PointerType,
+          bool kAllCanonicalObjectsAreIncludedIntoSet = true>
+class CanonicalSetSerializationCluster : public SerializationCluster {
+ protected:
+  CanonicalSetSerializationCluster(intptr_t cid,
+                                   bool is_canonical,
+                                   bool represents_canonical_set,
+                                   const char* name,
+                                   intptr_t target_instance_size = 0)
+      : SerializationCluster(name, cid, target_instance_size, is_canonical),
+        represents_canonical_set_(represents_canonical_set) {}
+
+  virtual bool IsInCanonicalSet(Serializer* s, PointerType ptr) {
+    // Must override this function if kAllCanonicalObjectsAreIncludedIntoSet
+    // is set to |false|.
+    ASSERT(kAllCanonicalObjectsAreIncludedIntoSet);
+    return true;
+  }
+
+  void ReorderObjects(Serializer* s) {
+    if (!represents_canonical_set_) {
+      return;
+    }
+
+    // Sort objects before writing them out so that they appear in the same
+    // order as they would appear in a CanonicalStringSet.
+    using ZoneCanonicalSet =
+        HashTable<typename SetType::Traits, 0, 0, GrowableArrayStorageTraits>;
+
+    // Compute required capacity for the hashtable (to avoid overallocating).
+    intptr_t required_capacity = 0;
+    for (auto ptr : objects_) {
+      if (kAllCanonicalObjectsAreIncludedIntoSet || IsInCanonicalSet(s, ptr)) {
+        required_capacity++;
+      }
+    }
+    // Over-allocate capacity so a few inserts can happen at startup without
+    // causing a rehash.
+    const intptr_t kSpareCapacity = 32;
+    required_capacity = static_cast<intptr_t>(
+        static_cast<double>(required_capacity + kSpareCapacity) /
+        HashTables::kMaxLoadFactor);
+
+    intptr_t num_occupied = 0;
+
+    // Build canonical set out of objects that should belong to it.
+    // Objects that don't belong to it are copied to the prefix of objects_.
+    ZoneCanonicalSet table(
+        s->zone(), HashTables::New<ZoneCanonicalSet>(required_capacity));
+    HandleType& element = HandleType::Handle(s->zone());
+    for (auto ptr : objects_) {
+      if (kAllCanonicalObjectsAreIncludedIntoSet || IsInCanonicalSet(s, ptr)) {
+        element ^= ptr;
+        intptr_t entry = -1;
+        const bool present = table.FindKeyOrDeletedOrUnused(element, &entry);
+        if (!present) {
+          table.InsertKey(entry, element);
+        } else {
+          // Two recursive types with different topology (and hashes)
+          // may be equal.
+          ASSERT(element.IsRecursive());
+          objects_[num_occupied++] = ptr;
+        }
+      } else {
+        objects_[num_occupied++] = ptr;
+      }
+    }
+
+    const auto prefix_length = num_occupied;
+
+    // Compute objects_ order and gaps based on canonical set layout.
+    auto& arr = table.Release();
+    intptr_t last_occupied = ZoneCanonicalSet::kFirstKeyIndex - 1;
+    for (intptr_t i = ZoneCanonicalSet::kFirstKeyIndex, length = arr.Length();
+         i < length; i++) {
+      ObjectPtr v = arr.At(i);
+      ASSERT(v != ZoneCanonicalSet::DeletedMarker().ptr());
+      if (v != ZoneCanonicalSet::UnusedMarker().ptr()) {
+        const intptr_t unused_run_length = (i - 1) - last_occupied;
+        gaps_.Add(unused_run_length);
+        objects_[num_occupied++] = static_cast<PointerType>(v);
+        last_occupied = i;
+      }
+    }
+    ASSERT(num_occupied == objects_.length());
+    ASSERT(prefix_length == (objects_.length() - gaps_.length()));
+    table_length_ = arr.Length();
+  }
+
+  void WriteCanonicalSetLayout(Serializer* s) {
+    if (represents_canonical_set_) {
+      s->WriteUnsigned(table_length_);
+      s->WriteUnsigned(objects_.length() - gaps_.length());
+      for (auto gap : gaps_) {
+        s->WriteUnsigned(gap);
+      }
+      target_memory_size_ +=
+          compiler::target::Array::InstanceSize(table_length_);
+    }
+  }
+
+  GrowableArray<PointerType> objects_;
+
+ private:
+  const bool represents_canonical_set_;
+  GrowableArray<intptr_t> gaps_;
+  intptr_t table_length_ = 0;
+};
+#endif
+
+template <typename SetType, bool kAllCanonicalObjectsAreIncludedIntoSet = true>
+class CanonicalSetDeserializationCluster : public DeserializationCluster {
+ public:
+  CanonicalSetDeserializationCluster(bool is_canonical,
+                                     bool is_root_unit,
+                                     const char* name)
+      : DeserializationCluster(name, is_canonical),
+        is_root_unit_(is_root_unit),
+        table_(Array::Handle()) {}
+
+  void BuildCanonicalSetFromLayout(Deserializer* d) {
+    if (!is_root_unit_ || !is_canonical()) {
+      return;
+    }
+
+    const auto table_length = d->ReadUnsigned();
+    first_element_ = d->ReadUnsigned();
+    const intptr_t count = stop_index_ - (start_index_ + first_element_);
+    auto table = StartDeserialization(d, table_length, count);
+    for (intptr_t i = start_index_ + first_element_; i < stop_index_; i++) {
+      table.FillGap(d->ReadUnsigned());
+      table.WriteElement(d, d->Ref(i));
+    }
+    table_ = table.Finish();
+  }
+
+ protected:
+  const bool is_root_unit_;
+  intptr_t first_element_;
+  Array& table_;
+
+  void VerifyCanonicalSet(Deserializer* d,
+                          const Array& refs,
+                          const Array& current_table) {
+#if defined(DEBUG)
+    // First check that we are not overwriting a table and loosing information.
+    if (!current_table.IsNull()) {
+      SetType current_set(d->zone(), current_table.ptr());
+      ASSERT(current_set.NumOccupied() == 0);
+      current_set.Release();
+    }
+
+    // Now check that manually created table behaves correctly as a canonical
+    // set.
+    SetType canonical_set(d->zone(), table_.ptr());
+    Object& key = Object::Handle();
+    for (intptr_t i = start_index_ + first_element_; i < stop_index_; i++) {
+      key = refs.At(i);
+      ASSERT(canonical_set.GetOrNull(key) != Object::null());
+    }
+    canonical_set.Release();
+#endif  // defined(DEBUG)
+  }
+
+ private:
+  struct DeserializationFinger {
+    ArrayPtr table;
+    intptr_t current_index;
+    ObjectPtr gap_element;
+
+    void FillGap(int length) {
+      for (intptr_t j = 0; j < length; j++) {
+        table->untag()->data()[current_index + j] = gap_element;
+      }
+      current_index += length;
+    }
+
+    void WriteElement(Deserializer* d, ObjectPtr object) {
+      table->untag()->data()[current_index++] = object;
+    }
+
+    ArrayPtr Finish() {
+      if (table != Array::null()) {
+        FillGap(Smi::Value(table->untag()->length()) - current_index);
+      }
+      auto result = table;
+      table = Array::null();
+      return result;
+    }
+  };
+
+  static DeserializationFinger StartDeserialization(Deserializer* d,
+                                                    intptr_t length,
+                                                    intptr_t count) {
+    const intptr_t instance_size = Array::InstanceSize(length);
+    ArrayPtr table = static_cast<ArrayPtr>(
+        d->heap()->old_space()->AllocateSnapshot(instance_size));
+    Deserializer::InitializeHeader(table, kArrayCid, instance_size);
+    table->untag()->type_arguments_ = TypeArguments::null();
+    table->untag()->length_ = CompressedSmiPtr(Smi::New(length));
+    for (intptr_t i = 0; i < SetType::kFirstKeyIndex; i++) {
+      table->untag()->data()[i] = Smi::New(0);
+    }
+    table->untag()->data()[SetType::kOccupiedEntriesIndex] = Smi::New(count);
+    return {table, SetType::kFirstKeyIndex, SetType::UnusedMarker().ptr()};
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypeParametersSerializationCluster : public SerializationCluster {
+ public:
+  TypeParametersSerializationCluster()
+      : SerializationCluster("TypeParameters",
+                             kTypeParametersCid,
+                             compiler::target::TypeParameters::InstanceSize()) {
+  }
+  ~TypeParametersSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypeParametersPtr type_params = TypeParameters::RawCast(object);
+    objects_.Add(type_params);
+    PushFromTo(type_params);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      TypeParametersPtr type_params = objects_[i];
+      s->AssignRef(type_params);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      TypeParametersPtr type_params = objects_[i];
+      AutoTraceObject(type_params);
+      WriteFromTo(type_params);
+    }
+  }
+
+ private:
+  GrowableArray<TypeParametersPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypeParametersDeserializationCluster : public DeserializationCluster {
+ public:
+  TypeParametersDeserializationCluster()
+      : DeserializationCluster("TypeParameters") {}
+  ~TypeParametersDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, TypeParameters::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypeParametersPtr type_params =
+          static_cast<TypeParametersPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(type_params, kTypeParametersCid,
+                                     TypeParameters::InstanceSize());
+      ReadFromTo(type_params);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypeArgumentsSerializationCluster
+    : public CanonicalSetSerializationCluster<CanonicalTypeArgumentsSet,
+                                              TypeArguments,
+                                              TypeArgumentsPtr> {
+ public:
+  TypeArgumentsSerializationCluster(bool is_canonical,
+                                    bool represents_canonical_set)
+      : CanonicalSetSerializationCluster(kTypeArgumentsCid,
+                                         is_canonical,
+                                         represents_canonical_set,
+                                         "TypeArguments") {}
+  ~TypeArgumentsSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypeArgumentsPtr type_args = TypeArguments::RawCast(object);
+    objects_.Add(type_args);
+
+    s->Push(type_args->untag()->instantiations());
+    const intptr_t length = Smi::Value(type_args->untag()->length());
+    for (intptr_t i = 0; i < length; i++) {
+      s->Push(type_args->untag()->element(i));
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+    for (intptr_t i = 0; i < count; i++) {
+      TypeArgumentsPtr type_args = objects_[i];
+      s->AssignRef(type_args);
+      AutoTraceObject(type_args);
+      const intptr_t length = Smi::Value(type_args->untag()->length());
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::TypeArguments::InstanceSize(length);
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      TypeArgumentsPtr type_args = objects_[i];
+      AutoTraceObject(type_args);
+      const intptr_t length = Smi::Value(type_args->untag()->length());
+      s->WriteUnsigned(length);
+      intptr_t hash = Smi::Value(type_args->untag()->hash());
+      s->Write<int32_t>(hash);
+      const intptr_t nullability =
+          Smi::Value(type_args->untag()->nullability());
+      s->WriteUnsigned(nullability);
+      WriteField(type_args, instantiations());
+      for (intptr_t j = 0; j < length; j++) {
+        s->WriteElementRef(type_args->untag()->element(j), j);
+      }
+    }
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypeArgumentsDeserializationCluster
+    : public CanonicalSetDeserializationCluster<CanonicalTypeArgumentsSet> {
+ public:
+  explicit TypeArgumentsDeserializationCluster(bool is_canonical,
+                                               bool is_root_unit)
+      : CanonicalSetDeserializationCluster(is_canonical,
+                                           is_root_unit,
+                                           "TypeArguments") {}
+  ~TypeArgumentsDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(TypeArguments::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+    BuildCanonicalSetFromLayout(d);
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypeArgumentsPtr type_args = static_cast<TypeArgumentsPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(type_args, kTypeArgumentsCid,
+                                     TypeArguments::InstanceSize(length),
+                                     primary && is_canonical());
+      type_args->untag()->length_ = Smi::New(length);
+      type_args->untag()->hash_ = Smi::New(d->Read<int32_t>());
+      type_args->untag()->nullability_ = Smi::New(d->ReadUnsigned());
+      type_args->untag()->instantiations_ = static_cast<ArrayPtr>(d->ReadRef());
+      for (intptr_t j = 0; j < length; j++) {
+        type_args->untag()->types()[j] =
+            static_cast<AbstractTypePtr>(d->ReadRef());
+      }
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(
+          d, refs, Array::Handle(object_store->canonical_type_arguments()));
+      object_store->set_canonical_type_arguments(table_);
+    } else if (!primary && is_canonical()) {
+      TypeArguments& type_arg = TypeArguments::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        type_arg ^= refs.At(i);
+        type_arg = type_arg.Canonicalize(d->thread(), nullptr);
+        refs.SetAt(i, type_arg);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class PatchClassSerializationCluster : public SerializationCluster {
+ public:
+  PatchClassSerializationCluster()
+      : SerializationCluster("PatchClass",
+                             kPatchClassCid,
+                             compiler::target::PatchClass::InstanceSize()) {}
+  ~PatchClassSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    PatchClassPtr cls = PatchClass::RawCast(object);
+    objects_.Add(cls);
+    PushFromTo(cls);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      PatchClassPtr cls = objects_[i];
+      s->AssignRef(cls);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      PatchClassPtr cls = objects_[i];
+      AutoTraceObject(cls);
+      WriteFromTo(cls);
+      if (s->kind() != Snapshot::kFullAOT) {
+        s->Write<int32_t>(cls->untag()->library_kernel_offset_);
+      }
+    }
+  }
+
+ private:
+  GrowableArray<PatchClassPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class PatchClassDeserializationCluster : public DeserializationCluster {
+ public:
+  PatchClassDeserializationCluster() : DeserializationCluster("PatchClass") {}
+  ~PatchClassDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, PatchClass::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      PatchClassPtr cls = static_cast<PatchClassPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(cls, kPatchClassCid,
+                                     PatchClass::InstanceSize());
+      ReadFromTo(cls);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      if (d->kind() != Snapshot::kFullAOT) {
+        cls->untag()->library_kernel_offset_ = d->Read<int32_t>();
+      }
+#endif
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class FunctionSerializationCluster : public SerializationCluster {
+ public:
+  FunctionSerializationCluster()
+      : SerializationCluster("Function",
+                             kFunctionCid,
+                             compiler::target::Function::InstanceSize()) {}
+  ~FunctionSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    Snapshot::Kind kind = s->kind();
+    FunctionPtr func = Function::RawCast(object);
+    objects_.Add(func);
+
+    PushFromTo(func);
+    if (kind == Snapshot::kFullAOT) {
+      s->Push(func->untag()->code());
+    } else if (kind == Snapshot::kFullJIT) {
+      NOT_IN_PRECOMPILED(s->Push(func->untag()->unoptimized_code()));
+      s->Push(func->untag()->code());
+      s->Push(func->untag()->ic_data_array());
+    }
+    if (kind != Snapshot::kFullAOT) {
+      NOT_IN_PRECOMPILED(s->Push(func->untag()->positional_parameter_names()));
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      FunctionPtr func = objects_[i];
+      s->AssignRef(func);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    Snapshot::Kind kind = s->kind();
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      FunctionPtr func = objects_[i];
+      AutoTraceObjectName(func, MakeDisambiguatedFunctionName(s, func));
+      WriteFromTo(func);
+      if (kind == Snapshot::kFullAOT) {
+        WriteCompressedField(func, code);
+      } else if (s->kind() == Snapshot::kFullJIT) {
+        NOT_IN_PRECOMPILED(WriteCompressedField(func, unoptimized_code));
+        WriteCompressedField(func, code);
+        WriteCompressedField(func, ic_data_array);
+      }
+
+      if (kind != Snapshot::kFullAOT) {
+        NOT_IN_PRECOMPILED(
+            WriteCompressedField(func, positional_parameter_names));
+        s->WriteTokenPosition(func->untag()->token_pos_);
+        s->WriteTokenPosition(func->untag()->end_token_pos_);
+        s->Write<uint32_t>(func->untag()->kernel_offset_);
+      }
+
+      s->Write<uint32_t>(func->untag()->packed_fields_);
+      s->Write<uint32_t>(func->untag()->kind_tag_);
+    }
+  }
+
+  static const char* MakeDisambiguatedFunctionName(Serializer* s,
+                                                   FunctionPtr f) {
+    if (s->profile_writer() == nullptr) {
+      return nullptr;
+    }
+
+    REUSABLE_FUNCTION_HANDLESCOPE(s->thread());
+    Function& fun = reused_function_handle.Handle();
+    fun = f;
+    ZoneTextBuffer printer(s->thread()->zone());
+    fun.PrintName(NameFormattingParams::DisambiguatedUnqualified(
+                      Object::NameVisibility::kInternalName),
+                  &printer);
+    return printer.buffer();
+  }
+
+ private:
+  GrowableArray<FunctionPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class FunctionDeserializationCluster : public DeserializationCluster {
+ public:
+  FunctionDeserializationCluster() : DeserializationCluster("Function") {}
+  ~FunctionDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Function::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    Snapshot::Kind kind = d->kind();
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      FunctionPtr func = static_cast<FunctionPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(func, kFunctionCid,
+                                     Function::InstanceSize());
+      ReadFromTo(func);
+
+#if defined(DEBUG)
+      func->untag()->entry_point_ = 0;
+      func->untag()->unchecked_entry_point_ = 0;
+#endif
+
+      if (kind == Snapshot::kFullAOT) {
+        const intptr_t code_index = d->ReadUnsigned();
+        CodePtr code = static_cast<CodePtr>(d->Ref(code_index));
+        func->untag()->code_ = code;
+        if (Code::IsUnknownDartCode(code)) {
+          const uword entry_point = d->instructions_table().EntryPointAt(
+              code_index - d->code_start_index());
+          func->untag()->entry_point_ = entry_point;
+          func->untag()->unchecked_entry_point_ = entry_point;
+        }
+      } else if (kind == Snapshot::kFullJIT) {
+        NOT_IN_PRECOMPILED(func->untag()->unoptimized_code_ =
+                               static_cast<CodePtr>(d->ReadRef()));
+        func->untag()->code_ = static_cast<CodePtr>(d->ReadRef());
+        func->untag()->ic_data_array_ = static_cast<ArrayPtr>(d->ReadRef());
+      }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      if (kind != Snapshot::kFullAOT) {
+        func->untag()->positional_parameter_names_ =
+            static_cast<ArrayPtr>(d->ReadRef());
+        func->untag()->token_pos_ = d->ReadTokenPosition();
+        func->untag()->end_token_pos_ = d->ReadTokenPosition();
+        func->untag()->kernel_offset_ = d->Read<uint32_t>();
+      }
+      func->untag()->unboxed_parameters_info_.Reset();
+#endif
+      func->untag()->packed_fields_ = d->Read<uint32_t>();
+      func->untag()->kind_tag_ = d->Read<uint32_t>();
+      if (kind == Snapshot::kFullAOT) {
+        // Omit fields used to support de/reoptimization.
+      } else {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        func->untag()->usage_counter_ = 0;
+        func->untag()->optimized_instruction_count_ = 0;
+        func->untag()->optimized_call_site_count_ = 0;
+        func->untag()->deoptimization_counter_ = 0;
+        func->untag()->state_bits_ = 0;
+        func->untag()->inlining_depth_ = 0;
+#endif
+      }
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (d->kind() == Snapshot::kFullAOT) {
+      Function& func = Function::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        func ^= refs.At(i);
+        auto const code = func.ptr()->untag()->code();
+        ASSERT(code->IsCode());
+        if (!Code::IsUnknownDartCode(code)) {
+          uword entry_point = code->untag()->entry_point_;
+          ASSERT(entry_point != 0);
+          func.ptr()->untag()->entry_point_ = entry_point;
+          uword unchecked_entry_point = code->untag()->unchecked_entry_point_;
+          ASSERT(unchecked_entry_point != 0);
+          func.ptr()->untag()->unchecked_entry_point_ = unchecked_entry_point;
+        }
+      }
+    } else if (d->kind() == Snapshot::kFullJIT) {
+      Function& func = Function::Handle(d->zone());
+      Code& code = Code::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        func ^= refs.At(i);
+        code = func.CurrentCode();
+        if (func.HasCode() && !code.IsDisabled()) {
+          func.SetInstructionsSafe(code);  // Set entrypoint.
+          func.SetWasCompiled(true);
+        } else {
+          func.ClearCodeSafe();  // Set code and entrypoint to lazy compile stub
+        }
+      }
+    } else {
+      Function& func = Function::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        func ^= refs.At(i);
+        func.ClearCodeSafe();  // Set code and entrypoint to lazy compile stub.
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ClosureDataSerializationCluster : public SerializationCluster {
+ public:
+  ClosureDataSerializationCluster()
+      : SerializationCluster("ClosureData",
+                             kClosureDataCid,
+                             compiler::target::ClosureData::InstanceSize()) {}
+  ~ClosureDataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ClosureDataPtr data = ClosureData::RawCast(object);
+    objects_.Add(data);
+
+    if (s->kind() != Snapshot::kFullAOT) {
+      s->Push(data->untag()->context_scope());
+    }
+    s->Push(data->untag()->parent_function());
+    s->Push(data->untag()->closure());
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ClosureDataPtr data = objects_[i];
+      s->AssignRef(data);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ClosureDataPtr data = objects_[i];
+      AutoTraceObject(data);
+      if (s->kind() != Snapshot::kFullAOT) {
+        WriteCompressedField(data, context_scope);
+      }
+      WriteCompressedField(data, parent_function);
+      WriteCompressedField(data, closure);
+      s->WriteUnsigned(
+          static_cast<intptr_t>(data->untag()->default_type_arguments_kind_));
+    }
+  }
+
+ private:
+  GrowableArray<ClosureDataPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ClosureDataDeserializationCluster : public DeserializationCluster {
+ public:
+  ClosureDataDeserializationCluster() : DeserializationCluster("ClosureData") {}
+  ~ClosureDataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, ClosureData::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ClosureDataPtr data = static_cast<ClosureDataPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(data, kClosureDataCid,
+                                     ClosureData::InstanceSize());
+      if (d->kind() == Snapshot::kFullAOT) {
+        data->untag()->context_scope_ = ContextScope::null();
+      } else {
+        data->untag()->context_scope_ =
+            static_cast<ContextScopePtr>(d->ReadRef());
+      }
+      data->untag()->parent_function_ = static_cast<FunctionPtr>(d->ReadRef());
+      data->untag()->closure_ = static_cast<ClosurePtr>(d->ReadRef());
+      data->untag()->default_type_arguments_kind_ =
+          static_cast<ClosureData::DefaultTypeArgumentsKind>(d->ReadUnsigned());
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class FfiTrampolineDataSerializationCluster : public SerializationCluster {
+ public:
+  FfiTrampolineDataSerializationCluster()
+      : SerializationCluster(
+            "FfiTrampolineData",
+            kFfiTrampolineDataCid,
+            compiler::target::FfiTrampolineData::InstanceSize()) {}
+  ~FfiTrampolineDataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    FfiTrampolineDataPtr data = FfiTrampolineData::RawCast(object);
+    objects_.Add(data);
+    PushFromTo(data);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      s->AssignRef(objects_[i]);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      FfiTrampolineDataPtr const data = objects_[i];
+      AutoTraceObject(data);
+      WriteFromTo(data);
+
+      if (s->kind() == Snapshot::kFullAOT) {
+        s->WriteUnsigned(data->untag()->callback_id_);
+      } else {
+        // FFI callbacks can only be written to AOT snapshots.
+        ASSERT(data->untag()->callback_target() == Object::null());
+      }
+    }
+  }
+
+ private:
+  GrowableArray<FfiTrampolineDataPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class FfiTrampolineDataDeserializationCluster : public DeserializationCluster {
+ public:
+  FfiTrampolineDataDeserializationCluster()
+      : DeserializationCluster("FfiTrampolineData") {}
+  ~FfiTrampolineDataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, FfiTrampolineData::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      FfiTrampolineDataPtr data = static_cast<FfiTrampolineDataPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(data, kFfiTrampolineDataCid,
+                                     FfiTrampolineData::InstanceSize());
+      ReadFromTo(data);
+      data->untag()->callback_id_ =
+          d->kind() == Snapshot::kFullAOT ? d->ReadUnsigned() : 0;
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class FieldSerializationCluster : public SerializationCluster {
+ public:
+  FieldSerializationCluster()
+      : SerializationCluster("Field",
+                             kFieldCid,
+                             compiler::target::Field::InstanceSize()) {}
+  ~FieldSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    FieldPtr field = Field::RawCast(object);
+    objects_.Add(field);
+
+    Snapshot::Kind kind = s->kind();
+
+    s->Push(field->untag()->name());
+    s->Push(field->untag()->owner());
+    s->Push(field->untag()->type());
+    // Write out the initializer function
+    s->Push(field->untag()->initializer_function());
+
+    if (kind != Snapshot::kFullAOT) {
+      s->Push(field->untag()->guarded_list_length());
+    }
+    if (kind == Snapshot::kFullJIT) {
+      s->Push(field->untag()->dependent_code());
+    }
+    // Write out either the initial static value or field offset.
+    if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
+      const intptr_t field_id =
+          Smi::Value(field->untag()->host_offset_or_field_id());
+      s->Push(s->initial_field_table()->At(field_id));
+    } else {
+      s->Push(Smi::New(Field::TargetOffsetOf(field)));
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      FieldPtr field = objects_[i];
+      s->AssignRef(field);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    Snapshot::Kind kind = s->kind();
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      FieldPtr field = objects_[i];
+      AutoTraceObjectName(field, field->untag()->name());
+
+      WriteCompressedField(field, name);
+      WriteCompressedField(field, owner);
+      WriteCompressedField(field, type);
+      // Write out the initializer function and initial value if not in AOT.
+      WriteCompressedField(field, initializer_function);
+      if (kind != Snapshot::kFullAOT) {
+        WriteCompressedField(field, guarded_list_length);
+      }
+      if (kind == Snapshot::kFullJIT) {
+        WriteCompressedField(field, dependent_code);
+      }
+
+      if (kind != Snapshot::kFullAOT) {
+        s->WriteTokenPosition(field->untag()->token_pos_);
+        s->WriteTokenPosition(field->untag()->end_token_pos_);
+        s->WriteCid(field->untag()->guarded_cid_);
+        s->WriteCid(field->untag()->is_nullable_);
+        s->Write<int8_t>(field->untag()->static_type_exactness_state_);
+        s->Write<uint32_t>(field->untag()->kernel_offset_);
+      }
+      s->Write<uint16_t>(field->untag()->kind_bits_);
+
+      // Write out either the initial static value or field offset.
+      if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
+        const intptr_t field_id =
+            Smi::Value(field->untag()->host_offset_or_field_id());
+        WriteFieldValue("static value", s->initial_field_table()->At(field_id));
+        s->WriteUnsigned(field_id);
+      } else {
+        WriteFieldValue("offset", Smi::New(Field::TargetOffsetOf(field)));
+      }
+    }
+  }
+
+ private:
+  GrowableArray<FieldPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class FieldDeserializationCluster : public DeserializationCluster {
+ public:
+  FieldDeserializationCluster() : DeserializationCluster("Field") {}
+  ~FieldDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Field::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    Snapshot::Kind kind = d->kind();
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      FieldPtr field = static_cast<FieldPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(field, kFieldCid, Field::InstanceSize());
+      ReadFromTo(field);
+      if (kind != Snapshot::kFullAOT) {
+        field->untag()->guarded_list_length_ =
+            static_cast<SmiPtr>(d->ReadRef());
+      }
+      if (kind == Snapshot::kFullJIT) {
+        field->untag()->dependent_code_ = static_cast<ArrayPtr>(d->ReadRef());
+      }
+      if (kind != Snapshot::kFullAOT) {
+        field->untag()->token_pos_ = d->ReadTokenPosition();
+        field->untag()->end_token_pos_ = d->ReadTokenPosition();
+        field->untag()->guarded_cid_ = d->ReadCid();
+        field->untag()->is_nullable_ = d->ReadCid();
+        const int8_t static_type_exactness_state = d->Read<int8_t>();
+#if defined(TARGET_ARCH_X64)
+        field->untag()->static_type_exactness_state_ =
+            static_type_exactness_state;
+#else
+        // We might produce core snapshots using X64 VM and then consume
+        // them in IA32 or ARM VM. In which case we need to simply ignore
+        // static type exactness state written into snapshot because non-X64
+        // builds don't have this feature enabled.
+        // TODO(dartbug.com/34170) Support other architectures.
+        USE(static_type_exactness_state);
+        field->untag()->static_type_exactness_state_ =
+            StaticTypeExactnessState::NotTracking().Encode();
+#endif  // defined(TARGET_ARCH_X64)
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        field->untag()->kernel_offset_ = d->Read<uint32_t>();
+#endif
+      }
+      field->untag()->kind_bits_ = d->Read<uint16_t>();
+
+      ObjectPtr value_or_offset = d->ReadRef();
+      if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
+        const intptr_t field_id = d->ReadUnsigned();
+        d->initial_field_table()->SetAt(
+            field_id, static_cast<InstancePtr>(value_or_offset));
+        field->untag()->host_offset_or_field_id_ = Smi::New(field_id);
+      } else {
+        field->untag()->host_offset_or_field_id_ =
+            Smi::RawCast(value_or_offset);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        field->untag()->target_offset_ =
+            Smi::Value(field->untag()->host_offset_or_field_id());
+#endif  //  !defined(DART_PRECOMPILED_RUNTIME)
+      }
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    Field& field = Field::Handle(d->zone());
+    if (!IsolateGroup::Current()->use_field_guards()) {
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        field ^= refs.At(i);
+        field.set_guarded_cid_unsafe(kDynamicCid);
+        field.set_is_nullable_unsafe(true);
+        field.set_guarded_list_length_unsafe(Field::kNoFixedLength);
+        field.set_guarded_list_length_in_object_offset_unsafe(
+            Field::kUnknownLengthOffset);
+        field.set_static_type_exactness_state_unsafe(
+            StaticTypeExactnessState::NotTracking());
+      }
+    } else {
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        field ^= refs.At(i);
+        field.InitializeGuardedListLengthInObjectOffset(/*unsafe=*/true);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ScriptSerializationCluster : public SerializationCluster {
+ public:
+  ScriptSerializationCluster()
+      : SerializationCluster("Script",
+                             kScriptCid,
+                             compiler::target::Script::InstanceSize()) {}
+  ~ScriptSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ScriptPtr script = Script::RawCast(object);
+    objects_.Add(script);
+    PushFromTo(script);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ScriptPtr script = objects_[i];
+      s->AssignRef(script);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ScriptPtr script = objects_[i];
+      AutoTraceObjectName(script, script->untag()->url());
+      WriteFromTo(script);
+      if (s->kind() != Snapshot::kFullAOT) {
+        // Clear out the max position cache in snapshots to ensure no
+        // differences in the snapshot due to triggering caching vs. not.
+        int32_t written_flags =
+            UntaggedScript::CachedMaxPositionBitField::update(
+                0, script->untag()->flags_and_max_position_);
+        written_flags = UntaggedScript::HasCachedMaxPositionBit::update(
+            false, written_flags);
+        s->Write<int32_t>(written_flags);
+      }
+      s->Write<int32_t>(script->untag()->kernel_script_index_);
+    }
+  }
+
+ private:
+  GrowableArray<ScriptPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ScriptDeserializationCluster : public DeserializationCluster {
+ public:
+  ScriptDeserializationCluster() : DeserializationCluster("Script") {}
+  ~ScriptDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Script::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ScriptPtr script = static_cast<ScriptPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(script, kScriptCid,
+                                     Script::InstanceSize());
+      ReadFromTo(script);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      script->untag()->flags_and_max_position_ = d->Read<int32_t>();
+#endif
+      script->untag()->kernel_script_index_ = d->Read<int32_t>();
+      script->untag()->load_timestamp_ = 0;
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LibrarySerializationCluster : public SerializationCluster {
+ public:
+  LibrarySerializationCluster()
+      : SerializationCluster("Library",
+                             kLibraryCid,
+                             compiler::target::Library::InstanceSize()) {}
+  ~LibrarySerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LibraryPtr lib = Library::RawCast(object);
+    objects_.Add(lib);
+    PushFromTo(lib);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LibraryPtr lib = objects_[i];
+      s->AssignRef(lib);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LibraryPtr lib = objects_[i];
+      AutoTraceObjectName(lib, lib->untag()->url());
+      WriteFromTo(lib);
+      s->Write<int32_t>(lib->untag()->index_);
+      s->Write<uint16_t>(lib->untag()->num_imports_);
+      s->Write<int8_t>(lib->untag()->load_state_);
+      s->Write<uint8_t>(lib->untag()->flags_);
+      if (s->kind() != Snapshot::kFullAOT) {
+        s->Write<uint32_t>(lib->untag()->kernel_offset_);
+      }
+    }
+  }
+
+ private:
+  GrowableArray<LibraryPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LibraryDeserializationCluster : public DeserializationCluster {
+ public:
+  LibraryDeserializationCluster() : DeserializationCluster("Library") {}
+  ~LibraryDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Library::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LibraryPtr lib = static_cast<LibraryPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(lib, kLibraryCid, Library::InstanceSize());
+      ReadFromTo(lib);
+      lib->untag()->native_entry_resolver_ = NULL;
+      lib->untag()->native_entry_symbol_resolver_ = NULL;
+      lib->untag()->index_ = d->Read<int32_t>();
+      lib->untag()->num_imports_ = d->Read<uint16_t>();
+      lib->untag()->load_state_ = d->Read<int8_t>();
+      lib->untag()->flags_ =
+          UntaggedLibrary::InFullSnapshotBit::update(true, d->Read<uint8_t>());
+#if !defined(DART_PRECOMPILED_RUNTIME)
+      if (d->kind() != Snapshot::kFullAOT) {
+        lib->untag()->kernel_offset_ = d->Read<uint32_t>();
+      }
+#endif
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class NamespaceSerializationCluster : public SerializationCluster {
+ public:
+  NamespaceSerializationCluster()
+      : SerializationCluster("Namespace",
+                             kNamespaceCid,
+                             compiler::target::Namespace::InstanceSize()) {}
+  ~NamespaceSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    NamespacePtr ns = Namespace::RawCast(object);
+    objects_.Add(ns);
+    PushFromTo(ns);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      NamespacePtr ns = objects_[i];
+      s->AssignRef(ns);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      NamespacePtr ns = objects_[i];
+      AutoTraceObject(ns);
+      WriteFromTo(ns);
+    }
+  }
+
+ private:
+  GrowableArray<NamespacePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class NamespaceDeserializationCluster : public DeserializationCluster {
+ public:
+  NamespaceDeserializationCluster() : DeserializationCluster("Namespace") {}
+  ~NamespaceDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Namespace::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      NamespacePtr ns = static_cast<NamespacePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(ns, kNamespaceCid,
+                                     Namespace::InstanceSize());
+      ReadFromTo(ns);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+// KernelProgramInfo objects are not written into a full AOT snapshot.
+class KernelProgramInfoSerializationCluster : public SerializationCluster {
+ public:
+  KernelProgramInfoSerializationCluster()
+      : SerializationCluster(
+            "KernelProgramInfo",
+            kKernelProgramInfoCid,
+            compiler::target::KernelProgramInfo::InstanceSize()) {}
+  ~KernelProgramInfoSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    KernelProgramInfoPtr info = KernelProgramInfo::RawCast(object);
+    objects_.Add(info);
+    PushFromTo(info);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      KernelProgramInfoPtr info = objects_[i];
+      s->AssignRef(info);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      KernelProgramInfoPtr info = objects_[i];
+      AutoTraceObject(info);
+      WriteFromTo(info);
+      s->Write<uint32_t>(info->untag()->kernel_binary_version_);
+    }
+  }
+
+ private:
+  GrowableArray<KernelProgramInfoPtr> objects_;
+};
+
+// Since KernelProgramInfo objects are not written into full AOT snapshots,
+// one will never need to read them from a full AOT snapshot.
+class KernelProgramInfoDeserializationCluster : public DeserializationCluster {
+ public:
+  KernelProgramInfoDeserializationCluster()
+      : DeserializationCluster("KernelProgramInfo") {}
+  ~KernelProgramInfoDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, KernelProgramInfo::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      KernelProgramInfoPtr info = static_cast<KernelProgramInfoPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(info, kKernelProgramInfoCid,
+                                     KernelProgramInfo::InstanceSize());
+      ReadFromTo(info);
+      info->untag()->kernel_binary_version_ = d->Read<uint32_t>();
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    Array& array = Array::Handle(d->zone());
+    KernelProgramInfo& info = KernelProgramInfo::Handle(d->zone());
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      info ^= refs.At(id);
+      array = HashTables::New<UnorderedHashMap<SmiTraits>>(16, Heap::kOld);
+      info.set_libraries_cache(array);
+      array = HashTables::New<UnorderedHashMap<SmiTraits>>(16, Heap::kOld);
+      info.set_classes_cache(array);
+    }
+  }
+};
+
+class CodeSerializationCluster : public SerializationCluster {
+ public:
+  explicit CodeSerializationCluster(Heap* heap)
+      : SerializationCluster("Code", kCodeCid), array_(Array::Handle()) {}
+  ~CodeSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    CodePtr code = Code::RawCast(object);
+
+    const bool is_deferred = !s->InCurrentLoadingUnitOrRoot(code);
+    if (is_deferred) {
+      s->RecordDeferredCode(code);
+    } else {
+      objects_.Add(code);
+    }
+
+    // Even if this code object is itself deferred we still need to scan
+    // the pool for references to other code objects (which might reside
+    // in the current loading unit).
+    ObjectPoolPtr pool = code->untag()->object_pool_;
+    if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
+      TracePool(s, pool, /*only_code=*/is_deferred);
+    } else {
+      if (s->InCurrentLoadingUnitOrRoot(pool)) {
+        s->Push(pool);
+      } else {
+        TracePool(s, pool, /*only_code=*/true);
+      }
+    }
+
+    if (s->kind() == Snapshot::kFullJIT) {
+      s->Push(code->untag()->deopt_info_array_);
+      s->Push(code->untag()->static_calls_target_table_);
+    } else if (s->kind() == Snapshot::kFullAOT) {
+#if defined(DART_PRECOMPILER)
+      auto const calls_array = code->untag()->static_calls_target_table_;
+      if (calls_array != Array::null()) {
+        // Some Code entries in the static calls target table may only be
+        // accessible via here, so push the Code objects.
+        array_ = calls_array;
+        for (auto entry : StaticCallsTable(array_)) {
+          auto kind = Code::KindField::decode(
+              Smi::Value(entry.Get<Code::kSCallTableKindAndOffset>()));
+          switch (kind) {
+            case Code::kCallViaCode:
+              // Code object in the pool.
+              continue;
+            case Code::kPcRelativeTTSCall:
+              // TTS will be reachable through type object which itself is
+              // in the pool.
+              continue;
+            case Code::kPcRelativeCall:
+            case Code::kPcRelativeTailCall:
+              auto destination = entry.Get<Code::kSCallTableCodeOrTypeTarget>();
+              ASSERT(destination->IsHeapObject() && destination->IsCode());
+              s->Push(destination);
+          }
+        }
+      }
+#else
+      UNREACHABLE();
+#endif
+    }
+
+    if (s->InCurrentLoadingUnitOrRoot(code->untag()->compressed_stackmaps_)) {
+      s->Push(code->untag()->compressed_stackmaps_);
+    }
+
+    if (Code::IsDiscarded(code)) {
+      ASSERT(s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
+             FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
+      // Only object pool and static call table entries and the compressed
+      // stack maps should be pushed.
+      return;
+    }
+
+    s->Push(code->untag()->owner_);
+    s->Push(code->untag()->exception_handlers_);
+    s->Push(code->untag()->pc_descriptors_);
+    s->Push(code->untag()->catch_entry_);
+    if (!FLAG_precompiled_mode || !FLAG_dwarf_stack_traces_mode) {
+      s->Push(code->untag()->inlined_id_to_function_);
+      if (s->InCurrentLoadingUnitOrRoot(code->untag()->code_source_map_)) {
+        s->Push(code->untag()->code_source_map_);
+      }
+    }
+#if !defined(PRODUCT)
+    s->Push(code->untag()->return_address_metadata_);
+    if (FLAG_code_comments) {
+      s->Push(code->untag()->comments_);
+    }
+#endif
+  }
+
+  void TracePool(Serializer* s, ObjectPoolPtr pool, bool only_code) {
+    if (pool == ObjectPool::null()) {
+      return;
+    }
+
+    const intptr_t length = pool->untag()->length_;
+    uint8_t* entry_bits = pool->untag()->entry_bits();
+    for (intptr_t i = 0; i < length; i++) {
+      auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+      if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+        const ObjectPtr target = pool->untag()->data()[i].raw_obj_;
+        if (!only_code || target->IsCode()) {
+          s->Push(target);
+        }
+      }
+    }
+  }
+
+  struct CodeOrderInfo {
+    CodePtr code;
+    intptr_t order;
+    intptr_t original_index;
+  };
+
+  // We sort code objects in such a way that code objects with the same
+  // instructions are grouped together. To make sorting more stable between
+  // similar programs we also sort them further by their original indices -
+  // this helps to stabilize output of --print-instructions-sizes-to which uses
+  // the name of the first code object (among those pointing to the same
+  // instruction objects).
+  static int CompareCodeOrderInfo(CodeOrderInfo const* a,
+                                  CodeOrderInfo const* b) {
+    if (a->order < b->order) return -1;
+    if (a->order > b->order) return 1;
+    if (a->original_index < b->original_index) return -1;
+    if (a->original_index > b->original_index) return 1;
+    return 0;
+  }
+
+  static void Insert(GrowableArray<CodeOrderInfo>* order_list,
+                     IntMap<intptr_t>* order_map,
+                     CodePtr code,
+                     intptr_t original_index) {
+    InstructionsPtr instr = code->untag()->instructions_;
+    intptr_t key = static_cast<intptr_t>(instr);
+    intptr_t order;
+    if (order_map->HasKey(key)) {
+      order = order_map->Lookup(key);
+    } else {
+      order = order_list->length() + 1;
+      order_map->Insert(key, order);
+    }
+    CodeOrderInfo info;
+    info.code = code;
+    info.order = order;
+    info.original_index = original_index;
+    order_list->Add(info);
+  }
+
+  static void Sort(GrowableArray<CodePtr>* codes) {
+    GrowableArray<CodeOrderInfo> order_list;
+    IntMap<intptr_t> order_map;
+    for (intptr_t i = 0; i < codes->length(); i++) {
+      Insert(&order_list, &order_map, (*codes)[i], i);
+    }
+    order_list.Sort(CompareCodeOrderInfo);
+    ASSERT(order_list.length() == codes->length());
+    for (intptr_t i = 0; i < order_list.length(); i++) {
+      (*codes)[i] = order_list[i].code;
+    }
+  }
+
+  static void Sort(GrowableArray<Code*>* codes) {
+    GrowableArray<CodeOrderInfo> order_list;
+    IntMap<intptr_t> order_map;
+    for (intptr_t i = 0; i < codes->length(); i++) {
+      Insert(&order_list, &order_map, (*codes)[i]->ptr(), i);
+    }
+    order_list.Sort(CompareCodeOrderInfo);
+    ASSERT(order_list.length() == codes->length());
+    for (intptr_t i = 0; i < order_list.length(); i++) {
+      *(*codes)[i] = order_list[i].code;
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      WriteAlloc(s, objects_[i]);
+    }
+    const intptr_t deferred_count = deferred_objects_.length();
+    s->WriteUnsigned(deferred_count);
+    for (intptr_t i = 0; i < deferred_count; i++) {
+      WriteAlloc(s, deferred_objects_[i]);
+    }
+  }
+
+  void WriteAlloc(Serializer* s, CodePtr code) {
+    s->AssignRef(code);
+    AutoTraceObjectName(code, MakeDisambiguatedCodeName(s, code));
+    const int32_t state_bits = code->untag()->state_bits_;
+    s->Write<int32_t>(state_bits);
+    if (!Code::DiscardedBit::decode(state_bits)) {
+      target_memory_size_ += compiler::target::Code::InstanceSize(0);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    Snapshot::Kind kind = s->kind();
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      CodePtr code = objects_[i];
+      WriteFill(s, kind, code, false);
+    }
+    const intptr_t deferred_count = deferred_objects_.length();
+    for (intptr_t i = 0; i < deferred_count; i++) {
+      CodePtr code = deferred_objects_[i];
+      WriteFill(s, kind, code, true);
+    }
+  }
+
+  void WriteFill(Serializer* s,
+                 Snapshot::Kind kind,
+                 CodePtr code,
+                 bool deferred) {
+    AutoTraceObjectName(code, MakeDisambiguatedCodeName(s, code));
+
+    intptr_t pointer_offsets_length =
+        Code::PtrOffBits::decode(code->untag()->state_bits_);
+    if (pointer_offsets_length != 0) {
+      FATAL("Cannot serialize code with embedded pointers");
+    }
+    if (kind == Snapshot::kFullAOT && Code::IsDisabled(code)) {
+      // Disabled code is fatal in AOT since we cannot recompile.
+      s->UnexpectedObject(code, "Disabled code");
+    }
+
+    s->WriteInstructions(code->untag()->instructions_,
+                         code->untag()->unchecked_offset_, code, deferred);
+    if (kind == Snapshot::kFullJIT) {
+      // TODO(rmacnak): Fix references to disabled code before serializing.
+      // For now, we may write the FixCallersTarget or equivalent stub. This
+      // will cause a fixup if this code is called.
+      const uint32_t active_unchecked_offset =
+          code->untag()->unchecked_entry_point_ - code->untag()->entry_point_;
+      s->WriteInstructions(code->untag()->active_instructions_,
+                           active_unchecked_offset, code, deferred);
+    }
+
+#if defined(DART_PRECOMPILER)
+    if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+      // If we are writing V8 snapshot profile then attribute references going
+      // through the object pool and static calls to the code object itself.
+      if (kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
+          code->untag()->object_pool_ != ObjectPool::null()) {
+        ObjectPoolPtr pool = code->untag()->object_pool_;
+        // Non-empty per-code object pools should not be reachable in this mode.
+        ASSERT(!s->HasRef(pool) || pool == Object::empty_object_pool().ptr());
+        s->CreateArtificialNodeIfNeeded(pool);
+        s->AttributePropertyRef(pool, "object_pool_");
+      }
+      if (kind != Snapshot::kFullJIT &&
+          code->untag()->static_calls_target_table_ != Array::null()) {
+        auto const table = code->untag()->static_calls_target_table_;
+        // Non-empty static call target tables shouldn't be reachable in this
+        // mode.
+        ASSERT(!s->HasRef(table) || table == Object::empty_array().ptr());
+        s->CreateArtificialNodeIfNeeded(table);
+        s->AttributePropertyRef(table, "static_calls_target_table_");
+      }
+    }
+#endif  // defined(DART_PRECOMPILER)
+
+    if (Code::IsDiscarded(code)) {
+      // Only write instructions, compressed stackmaps and state bits
+      // for the discarded Code objects.
+      ASSERT(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
+             FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
+#if defined(DART_PRECOMPILER)
+      if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+        // Keep the owner as a (possibly artificial) node for snapshot analysis.
+        const auto& owner = code->untag()->owner_;
+        s->CreateArtificialNodeIfNeeded(owner);
+        s->AttributePropertyRef(owner, "owner_");
+      }
+#endif
+
+      return;
+    }
+
+    // No need to write object pool out if we are producing full AOT
+    // snapshot with bare instructions.
+    if (!(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
+      if (s->InCurrentLoadingUnitOrRoot(code->untag()->object_pool_)) {
+        WriteField(code, object_pool_);
+      } else {
+        WriteFieldValue(object_pool_, ObjectPool::null());
+      }
+    }
+    WriteField(code, owner_);
+    WriteField(code, exception_handlers_);
+    WriteField(code, pc_descriptors_);
+    WriteField(code, catch_entry_);
+    if (s->InCurrentLoadingUnitOrRoot(code->untag()->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_);
+      if (s->InCurrentLoadingUnitOrRoot(code->untag()->code_source_map_)) {
+        WriteField(code, code_source_map_);
+      } else {
+        WriteFieldValue(code_source_map_, CodeSourceMap::null());
+      }
+    }
+    if (kind == Snapshot::kFullJIT) {
+      WriteField(code, deopt_info_array_);
+      WriteField(code, static_calls_target_table_);
+    }
+
+#if !defined(PRODUCT)
+    WriteField(code, return_address_metadata_);
+    if (FLAG_code_comments) {
+      WriteField(code, comments_);
+    }
+#endif
+  }
+
+  GrowableArray<CodePtr>* objects() { return &objects_; }
+  GrowableArray<CodePtr>* deferred_objects() { return &deferred_objects_; }
+
+  static const char* MakeDisambiguatedCodeName(Serializer* s, CodePtr c) {
+    if (s->profile_writer() == nullptr) {
+      return nullptr;
+    }
+
+    REUSABLE_CODE_HANDLESCOPE(s->thread());
+    Code& code = reused_code_handle.Handle();
+    code = c;
+    return code.QualifiedName(
+        NameFormattingParams::DisambiguatedWithoutClassName(
+            Object::NameVisibility::kInternalName));
+  }
+
+ private:
+  GrowableArray<CodePtr> objects_;
+  GrowableArray<CodePtr> deferred_objects_;
+  Array& array_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class CodeDeserializationCluster : public DeserializationCluster {
+ public:
+  CodeDeserializationCluster() : DeserializationCluster("Code") {}
+  ~CodeDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    PageSpace* old_space = d->heap()->old_space();
+    start_index_ = d->next_index();
+    d->set_code_start_index(start_index_);
+    const intptr_t count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      ReadAllocOneCode(d, old_space);
+    }
+    stop_index_ = d->next_index();
+    deferred_start_index_ = d->next_index();
+    const intptr_t deferred_count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < deferred_count; i++) {
+      ReadAllocOneCode(d, old_space);
+    }
+    deferred_stop_index_ = d->next_index();
+  }
+
+  void ReadAllocOneCode(Deserializer* d, PageSpace* old_space) {
+    const int32_t state_bits = d->Read<int32_t>();
+    if (Code::DiscardedBit::decode(state_bits)) {
+      ASSERT(StubCode::HasBeenInitialized());
+      d->AssignRef(StubCode::UnknownDartCode().ptr());
+    } else {
+      auto code = static_cast<CodePtr>(
+          old_space->AllocateSnapshot(Code::InstanceSize(0)));
+      d->AssignRef(code);
+      code->untag()->state_bits_ = state_bits;
+    }
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ReadFill(d, id, false);
+    }
+    for (intptr_t id = deferred_start_index_; id < deferred_stop_index_; id++) {
+      ReadFill(d, id, true);
+    }
+  }
+
+  void ReadFill(Deserializer* d, intptr_t id, bool deferred) {
+    auto const code = static_cast<CodePtr>(d->Ref(id));
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+    if (Code::IsUnknownDartCode(code)) {
+      d->ReadInstructions(code, deferred, /*discarded=*/true);
+      return;
+    }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+    Deserializer::InitializeHeader(code, kCodeCid, Code::InstanceSize(0));
+    ASSERT(!Code::IsDiscarded(code));
+
+    d->ReadInstructions(code, deferred, /*discarded=*/false);
+
+    // There would be a single global pool if this is a full AOT snapshot
+    // with bare instructions.
+    if (!(d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
+      code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
+    } else {
+      code->untag()->object_pool_ = ObjectPool::null();
+    }
+    code->untag()->owner_ = d->ReadRef();
+    code->untag()->exception_handlers_ =
+        static_cast<ExceptionHandlersPtr>(d->ReadRef());
+    code->untag()->pc_descriptors_ =
+        static_cast<PcDescriptorsPtr>(d->ReadRef());
+    code->untag()->catch_entry_ = d->ReadRef();
+    code->untag()->compressed_stackmaps_ =
+        static_cast<CompressedStackMapsPtr>(d->ReadRef());
+    code->untag()->inlined_id_to_function_ =
+        static_cast<ArrayPtr>(d->ReadRef());
+    code->untag()->code_source_map_ =
+        static_cast<CodeSourceMapPtr>(d->ReadRef());
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    if (d->kind() == Snapshot::kFullJIT) {
+      code->untag()->deopt_info_array_ = static_cast<ArrayPtr>(d->ReadRef());
+      code->untag()->static_calls_target_table_ =
+          static_cast<ArrayPtr>(d->ReadRef());
+    }
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+#if !defined(PRODUCT)
+    code->untag()->return_address_metadata_ = d->ReadRef();
+    code->untag()->var_descriptors_ = LocalVarDescriptors::null();
+    code->untag()->comments_ = FLAG_code_comments
+                                   ? static_cast<ArrayPtr>(d->ReadRef())
+                                   : Array::null();
+    code->untag()->compile_timestamp_ = 0;
+#endif
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    d->EndInstructions();
+
+#if !defined(PRODUCT)
+    if (!CodeObservers::AreActive() && !FLAG_support_disassembler) return;
+#endif
+    Code& code = Code::Handle(d->zone());
+#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
+    Object& owner = Object::Handle(d->zone());
+#endif
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      code ^= refs.At(id);
+#if !defined(DART_PRECOMPILED_RUNTIME) && !defined(PRODUCT)
+      if (CodeObservers::AreActive()) {
+        Code::NotifyCodeObservers(code, code.is_optimized());
+      }
+#endif
+#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
+      owner = code.owner();
+      if (owner.IsFunction()) {
+        if ((FLAG_disassemble ||
+             (code.is_optimized() && FLAG_disassemble_optimized)) &&
+            compiler::PrintFilter::ShouldPrint(Function::Cast(owner))) {
+          Disassembler::DisassembleCode(Function::Cast(owner), code,
+                                        code.is_optimized());
+        }
+      } else if (FLAG_disassemble_stubs) {
+        Disassembler::DisassembleStub(code.Name(), code);
+      }
+#endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
+    }
+  }
+
+ private:
+  intptr_t deferred_start_index_;
+  intptr_t deferred_stop_index_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ObjectPoolSerializationCluster : public SerializationCluster {
+ public:
+  ObjectPoolSerializationCluster()
+      : SerializationCluster("ObjectPool", kObjectPoolCid) {}
+  ~ObjectPoolSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ObjectPoolPtr pool = ObjectPool::RawCast(object);
+    objects_.Add(pool);
+
+    if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
+      // Treat pool as weak.
+    } else {
+      const intptr_t length = pool->untag()->length_;
+      uint8_t* entry_bits = pool->untag()->entry_bits();
+      for (intptr_t i = 0; i < length; i++) {
+        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+        if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+          s->Push(pool->untag()->data()[i].raw_obj_);
+        }
+      }
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ObjectPoolPtr pool = objects_[i];
+      s->AssignRef(pool);
+      AutoTraceObject(pool);
+      const intptr_t length = pool->untag()->length_;
+      s->WriteUnsigned(length);
+      target_memory_size_ += compiler::target::ObjectPool::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    bool weak = s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions;
+
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ObjectPoolPtr pool = objects_[i];
+      AutoTraceObject(pool);
+      const intptr_t length = pool->untag()->length_;
+      s->WriteUnsigned(length);
+      uint8_t* entry_bits = pool->untag()->entry_bits();
+      for (intptr_t j = 0; j < length; j++) {
+        s->Write<uint8_t>(entry_bits[j]);
+        UntaggedObjectPool::Entry& entry = pool->untag()->data()[j];
+        switch (ObjectPool::TypeBits::decode(entry_bits[j])) {
+          case ObjectPool::EntryType::kTaggedObject: {
+            if ((entry.raw_obj_ == StubCode::CallNoScopeNative().ptr()) ||
+                (entry.raw_obj_ == StubCode::CallAutoScopeNative().ptr())) {
+              // Natives can run while precompiling, becoming linked and
+              // switching their stub. Reset to the initial stub used for
+              // lazy-linking.
+              s->WriteElementRef(StubCode::CallBootstrapNative().ptr(), j);
+              break;
+            }
+            if (weak && !s->HasRef(entry.raw_obj_)) {
+              // Any value will do, but null has the shortest id.
+              s->WriteElementRef(Object::null(), j);
+            } else {
+              s->WriteElementRef(entry.raw_obj_, j);
+            }
+            break;
+          }
+          case ObjectPool::EntryType::kImmediate: {
+            s->Write<intptr_t>(entry.raw_value_);
+            break;
+          }
+          case ObjectPool::EntryType::kNativeFunction:
+          case ObjectPool::EntryType::kNativeFunctionWrapper: {
+            // Write nothing. Will initialize with the lazy link entry.
+            break;
+          }
+          default:
+            UNREACHABLE();
+        }
+      }
+    }
+  }
+
+ private:
+  GrowableArray<ObjectPoolPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ObjectPoolDeserializationCluster : public DeserializationCluster {
+ public:
+  ObjectPoolDeserializationCluster() : DeserializationCluster("ObjectPool") {}
+  ~ObjectPoolDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(ObjectPool::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    fill_position_ = d->position();
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      const intptr_t length = d->ReadUnsigned();
+      ObjectPoolPtr pool = static_cast<ObjectPoolPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(pool, kObjectPoolCid,
+                                     ObjectPool::InstanceSize(length));
+      pool->untag()->length_ = length;
+      for (intptr_t j = 0; j < length; j++) {
+        const uint8_t entry_bits = d->Read<uint8_t>();
+        pool->untag()->entry_bits()[j] = entry_bits;
+        UntaggedObjectPool::Entry& entry = pool->untag()->data()[j];
+        switch (ObjectPool::TypeBits::decode(entry_bits)) {
+          case ObjectPool::EntryType::kTaggedObject:
+            entry.raw_obj_ = d->ReadRef();
+            break;
+          case ObjectPool::EntryType::kImmediate:
+            entry.raw_value_ = d->Read<intptr_t>();
+            break;
+          case ObjectPool::EntryType::kNativeFunction: {
+            // Read nothing. Initialize with the lazy link entry.
+            uword new_entry = NativeEntry::LinkNativeCallEntry();
+            entry.raw_value_ = static_cast<intptr_t>(new_entry);
+            break;
+          }
+          default:
+            UNREACHABLE();
+        }
+      }
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (d->is_non_root_unit()) {
+      // If this is a non-root unit, some pool entries that should be canonical
+      // may have been replaced be with other objects during canonicalization.
+
+      intptr_t restore_position = d->position();
+      d->set_position(fill_position_);
+
+      auto Z = d->zone();
+      ObjectPool& pool = ObjectPool::Handle(Z);
+      Object& entry = Object::Handle(Z);
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        pool ^= refs.At(id);
+        const intptr_t length = d->ReadUnsigned();
+        for (intptr_t j = 0; j < length; j++) {
+          const uint8_t entry_bits = d->Read<uint8_t>();
+          switch (ObjectPool::TypeBits::decode(entry_bits)) {
+            case ObjectPool::EntryType::kTaggedObject:
+              entry = refs.At(d->ReadUnsigned());
+              pool.SetObjectAt(j, entry);
+              break;
+            case ObjectPool::EntryType::kImmediate:
+              d->Read<intptr_t>();
+              break;
+            case ObjectPool::EntryType::kNativeFunction: {
+              // Read nothing.
+              break;
+            }
+            default:
+              UNREACHABLE();
+          }
+        }
+      }
+
+      d->set_position(restore_position);
+    }
+  }
+
+ private:
+  intptr_t fill_position_ = 0;
+};
+
+#if defined(DART_PRECOMPILER)
+class WeakSerializationReferenceSerializationCluster
+    : public SerializationCluster {
+ public:
+  WeakSerializationReferenceSerializationCluster()
+      : SerializationCluster(
+            "WeakSerializationReference",
+            compiler::target::WeakSerializationReference::InstanceSize()) {}
+  ~WeakSerializationReferenceSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ASSERT(s->kind() == Snapshot::kFullAOT);
+    objects_.Add(WeakSerializationReference::RawCast(object));
+  }
+
+  void RetraceEphemerons(Serializer* s) {
+    for (intptr_t i = 0; i < objects_.length(); i++) {
+      WeakSerializationReferencePtr weak = objects_[i];
+      if (!s->IsReachable(weak->untag()->target())) {
+        s->Push(weak->untag()->replacement());
+      }
+    }
+  }
+
+  intptr_t Count(Serializer* s) { return objects_.length(); }
+
+  void CreateArtificialTargetNodesIfNeeded(Serializer* s) {
+    for (intptr_t i = 0; i < objects_.length(); i++) {
+      WeakSerializationReferencePtr weak = objects_[i];
+      s->CreateArtificialNodeIfNeeded(weak->untag()->target());
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    UNREACHABLE();  // No WSRs are serialized, and so this cluster is not added.
+  }
+
+  void WriteFill(Serializer* s) {
+    UNREACHABLE();  // No WSRs are serialized, and so this cluster is not added.
+  }
+
+ private:
+  GrowableArray<WeakSerializationReferencePtr> objects_;
+};
+#endif
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class PcDescriptorsSerializationCluster : public SerializationCluster {
+ public:
+  PcDescriptorsSerializationCluster()
+      : SerializationCluster("PcDescriptors", kPcDescriptorsCid) {}
+  ~PcDescriptorsSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    PcDescriptorsPtr desc = PcDescriptors::RawCast(object);
+    objects_.Add(desc);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      PcDescriptorsPtr desc = objects_[i];
+      s->AssignRef(desc);
+      AutoTraceObject(desc);
+      const intptr_t length = desc->untag()->length_;
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::PcDescriptors::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      PcDescriptorsPtr desc = objects_[i];
+      AutoTraceObject(desc);
+      const intptr_t length = desc->untag()->length_;
+      s->WriteUnsigned(length);
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(desc->untag()->data());
+      s->WriteBytes(cdata, length);
+    }
+  }
+
+ private:
+  GrowableArray<PcDescriptorsPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class PcDescriptorsDeserializationCluster : public DeserializationCluster {
+ public:
+  PcDescriptorsDeserializationCluster()
+      : DeserializationCluster("PcDescriptors") {}
+  ~PcDescriptorsDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(PcDescriptors::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      const intptr_t length = d->ReadUnsigned();
+      PcDescriptorsPtr desc = static_cast<PcDescriptorsPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(desc, kPcDescriptorsCid,
+                                     PcDescriptors::InstanceSize(length));
+      desc->untag()->length_ = length;
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(desc->untag()->data());
+      d->ReadBytes(cdata, length);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class CodeSourceMapSerializationCluster : public SerializationCluster {
+ public:
+  CodeSourceMapSerializationCluster()
+      : SerializationCluster("CodeSourceMap", kCodeSourceMapCid) {}
+  ~CodeSourceMapSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    CodeSourceMapPtr map = CodeSourceMap::RawCast(object);
+    objects_.Add(map);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      CodeSourceMapPtr map = objects_[i];
+      s->AssignRef(map);
+      AutoTraceObject(map);
+      const intptr_t length = map->untag()->length_;
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::PcDescriptors::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      CodeSourceMapPtr map = objects_[i];
+      AutoTraceObject(map);
+      const intptr_t length = map->untag()->length_;
+      s->WriteUnsigned(length);
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
+      s->WriteBytes(cdata, length);
+    }
+  }
+
+ private:
+  GrowableArray<CodeSourceMapPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class CodeSourceMapDeserializationCluster : public DeserializationCluster {
+ public:
+  CodeSourceMapDeserializationCluster()
+      : DeserializationCluster("CodeSourceMap") {}
+  ~CodeSourceMapDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(CodeSourceMap::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      const intptr_t length = d->ReadUnsigned();
+      CodeSourceMapPtr map = static_cast<CodeSourceMapPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(map, kPcDescriptorsCid,
+                                     CodeSourceMap::InstanceSize(length));
+      map->untag()->length_ = length;
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
+      d->ReadBytes(cdata, length);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class CompressedStackMapsSerializationCluster : public SerializationCluster {
+ public:
+  CompressedStackMapsSerializationCluster()
+      : SerializationCluster("CompressedStackMaps", kCompressedStackMapsCid) {}
+  ~CompressedStackMapsSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    CompressedStackMapsPtr desc = CompressedStackMaps::RawCast(object);
+    objects_.Add(desc);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      CompressedStackMapsPtr map = objects_[i];
+      s->AssignRef(map);
+      AutoTraceObject(map);
+      const intptr_t length = UntaggedCompressedStackMaps::SizeField::decode(
+          map->untag()->flags_and_size_);
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::CompressedStackMaps::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      CompressedStackMapsPtr map = objects_[i];
+      AutoTraceObject(map);
+      s->WriteUnsigned(map->untag()->flags_and_size_);
+      const intptr_t length = UntaggedCompressedStackMaps::SizeField::decode(
+          map->untag()->flags_and_size_);
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
+      s->WriteBytes(cdata, length);
+    }
+  }
+
+ private:
+  GrowableArray<CompressedStackMapsPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class CompressedStackMapsDeserializationCluster
+    : public DeserializationCluster {
+ public:
+  CompressedStackMapsDeserializationCluster()
+      : DeserializationCluster("CompressedStackMaps") {}
+  ~CompressedStackMapsDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(old_space->AllocateSnapshot(
+          CompressedStackMaps::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      const intptr_t flags_and_size = d->ReadUnsigned();
+      const intptr_t length =
+          UntaggedCompressedStackMaps::SizeField::decode(flags_and_size);
+      CompressedStackMapsPtr map =
+          static_cast<CompressedStackMapsPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(map, kCompressedStackMapsCid,
+                                     CompressedStackMaps::InstanceSize(length));
+      map->untag()->flags_and_size_ = flags_and_size;
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
+      d->ReadBytes(cdata, length);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME) && !defined(DART_COMPRESSED_POINTERS)
+// PcDescriptor, CompressedStackMaps, OneByteString, TwoByteString
+class RODataSerializationCluster
+    : public CanonicalSetSerializationCluster<CanonicalStringSet,
+                                              String,
+                                              ObjectPtr> {
+ public:
+  RODataSerializationCluster(Zone* zone,
+                             const char* type,
+                             intptr_t cid,
+                             bool is_canonical)
+      : CanonicalSetSerializationCluster(
+            cid,
+            is_canonical,
+            is_canonical && IsStringClassId(cid),
+            ImageWriter::TagObjectTypeAsReadOnly(zone, type)),
+        zone_(zone),
+        cid_(cid),
+        type_(type) {}
+  ~RODataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    // A string's hash must already be computed when we write it because it
+    // will be loaded into read-only memory. Extra bytes due to allocation
+    // rounding need to be deterministically set for reliable deduplication in
+    // shared images.
+    if (object->untag()->InVMIsolateHeap() ||
+        s->heap()->old_space()->IsObjectFromImagePages(object)) {
+      // This object is already read-only.
+    } else {
+      Object::FinalizeReadOnlyObject(object);
+    }
+
+    objects_.Add(object);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const bool is_string_cluster = IsStringClassId(cid_);
+
+    intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+
+    uint32_t running_offset = 0;
+    for (intptr_t i = 0; i < count; i++) {
+      ObjectPtr object = objects_[i];
+      s->AssignRef(object);
+      const StringPtr name =
+          is_string_cluster ? String::RawCast(object) : nullptr;
+      Serializer::WritingObjectScope scope(s, type_, object, name);
+      uint32_t offset = s->GetDataOffset(object);
+      s->TraceDataOffset(offset);
+      ASSERT(Utils::IsAligned(
+          offset, compiler::target::ObjectAlignment::kObjectAlignment));
+      ASSERT(offset > running_offset);
+      s->WriteUnsigned((offset - running_offset) >>
+                       compiler::target::ObjectAlignment::kObjectAlignmentLog2);
+      running_offset = offset;
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    // No-op.
+  }
+
+ private:
+  Zone* zone_;
+  const intptr_t cid_;
+  const char* const type_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME && !DART_COMPRESSED_POINTERS
+
+#if !defined(DART_COMPRESSED_POINTERS)
+class RODataDeserializationCluster
+    : public CanonicalSetDeserializationCluster<CanonicalStringSet> {
+ public:
+  explicit RODataDeserializationCluster(bool is_canonical,
+                                        bool is_root_unit,
+                                        intptr_t cid)
+      : CanonicalSetDeserializationCluster(is_canonical,
+                                           is_root_unit,
+                                           "ROData"),
+        cid_(cid) {}
+  ~RODataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    intptr_t count = d->ReadUnsigned();
+    uint32_t running_offset = 0;
+    for (intptr_t i = 0; i < count; i++) {
+      running_offset += d->ReadUnsigned() << kObjectAlignmentLog2;
+      ObjectPtr object = d->GetObjectAt(running_offset);
+      d->AssignRef(object);
+    }
+    stop_index_ = d->next_index();
+    if (cid_ == kStringCid) {
+      BuildCanonicalSetFromLayout(d);
+    }
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    // No-op.
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(d, refs, Array::Handle(object_store->symbol_table()));
+      object_store->set_symbol_table(table_);
+      if (d->isolate_group() == Dart::vm_isolate_group()) {
+        Symbols::InitFromSnapshot(d->isolate_group());
+      }
+    } else if (!primary && is_canonical()) {
+      FATAL("Cannot recanonicalize RO objects.");
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+#endif  // !DART_COMPRESSED_POINTERS
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ExceptionHandlersSerializationCluster : public SerializationCluster {
+ public:
+  ExceptionHandlersSerializationCluster()
+      : SerializationCluster("ExceptionHandlers", kExceptionHandlersCid) {}
+  ~ExceptionHandlersSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ExceptionHandlersPtr handlers = ExceptionHandlers::RawCast(object);
+    objects_.Add(handlers);
+
+    s->Push(handlers->untag()->handled_types_data());
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ExceptionHandlersPtr handlers = objects_[i];
+      s->AssignRef(handlers);
+      AutoTraceObject(handlers);
+      const intptr_t length = handlers->untag()->num_entries_;
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::ExceptionHandlers::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ExceptionHandlersPtr handlers = objects_[i];
+      AutoTraceObject(handlers);
+      const intptr_t length = handlers->untag()->num_entries_;
+      s->WriteUnsigned(length);
+      WriteCompressedField(handlers, handled_types_data);
+      for (intptr_t j = 0; j < length; j++) {
+        const ExceptionHandlerInfo& info = handlers->untag()->data()[j];
+        s->Write<uint32_t>(info.handler_pc_offset);
+        s->Write<int16_t>(info.outer_try_index);
+        s->Write<int8_t>(info.needs_stacktrace);
+        s->Write<int8_t>(info.has_catch_all);
+        s->Write<int8_t>(info.is_generated);
+      }
+    }
+  }
+
+ private:
+  GrowableArray<ExceptionHandlersPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ExceptionHandlersDeserializationCluster : public DeserializationCluster {
+ public:
+  ExceptionHandlersDeserializationCluster()
+      : DeserializationCluster("ExceptionHandlers") {}
+  ~ExceptionHandlersDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(ExceptionHandlers::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ExceptionHandlersPtr handlers =
+          static_cast<ExceptionHandlersPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(handlers, kExceptionHandlersCid,
+                                     ExceptionHandlers::InstanceSize(length));
+      handlers->untag()->num_entries_ = length;
+      handlers->untag()->handled_types_data_ =
+          static_cast<ArrayPtr>(d->ReadRef());
+      for (intptr_t j = 0; j < length; j++) {
+        ExceptionHandlerInfo& info = handlers->untag()->data()[j];
+        info.handler_pc_offset = d->Read<uint32_t>();
+        info.outer_try_index = d->Read<int16_t>();
+        info.needs_stacktrace = d->Read<int8_t>();
+        info.has_catch_all = d->Read<int8_t>();
+        info.is_generated = d->Read<int8_t>();
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ContextSerializationCluster : public SerializationCluster {
+ public:
+  ContextSerializationCluster()
+      : SerializationCluster("Context", kContextCid) {}
+  ~ContextSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ContextPtr context = Context::RawCast(object);
+    objects_.Add(context);
+
+    s->Push(context->untag()->parent());
+    const intptr_t length = context->untag()->num_variables_;
+    for (intptr_t i = 0; i < length; i++) {
+      s->Push(context->untag()->element(i));
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ContextPtr context = objects_[i];
+      s->AssignRef(context);
+      AutoTraceObject(context);
+      const intptr_t length = context->untag()->num_variables_;
+      s->WriteUnsigned(length);
+      target_memory_size_ += compiler::target::Context::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ContextPtr context = objects_[i];
+      AutoTraceObject(context);
+      const intptr_t length = context->untag()->num_variables_;
+      s->WriteUnsigned(length);
+      WriteField(context, parent());
+      for (intptr_t j = 0; j < length; j++) {
+        s->WriteElementRef(context->untag()->element(j), j);
+      }
+    }
+  }
+
+ private:
+  GrowableArray<ContextPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ContextDeserializationCluster : public DeserializationCluster {
+ public:
+  ContextDeserializationCluster() : DeserializationCluster("Context") {}
+  ~ContextDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(old_space->AllocateSnapshot(Context::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ContextPtr context = static_cast<ContextPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(context, kContextCid,
+                                     Context::InstanceSize(length));
+      context->untag()->num_variables_ = length;
+      context->untag()->parent_ = static_cast<ContextPtr>(d->ReadRef());
+      for (intptr_t j = 0; j < length; j++) {
+        context->untag()->data()[j] = d->ReadRef();
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ContextScopeSerializationCluster : public SerializationCluster {
+ public:
+  ContextScopeSerializationCluster()
+      : SerializationCluster("ContextScope", kContextScopeCid) {}
+  ~ContextScopeSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ContextScopePtr scope = ContextScope::RawCast(object);
+    objects_.Add(scope);
+
+    const intptr_t length = scope->untag()->num_variables_;
+    PushFromTo(scope, length);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ContextScopePtr scope = objects_[i];
+      s->AssignRef(scope);
+      AutoTraceObject(scope);
+      const intptr_t length = scope->untag()->num_variables_;
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::ContextScope::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ContextScopePtr scope = objects_[i];
+      AutoTraceObject(scope);
+      const intptr_t length = scope->untag()->num_variables_;
+      s->WriteUnsigned(length);
+      s->Write<bool>(scope->untag()->is_implicit_);
+      WriteFromTo(scope, length);
+    }
+  }
+
+ private:
+  GrowableArray<ContextScopePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ContextScopeDeserializationCluster : public DeserializationCluster {
+ public:
+  ContextScopeDeserializationCluster()
+      : DeserializationCluster("ContextScope") {}
+  ~ContextScopeDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(
+          old_space->AllocateSnapshot(ContextScope::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ContextScopePtr scope = static_cast<ContextScopePtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(scope, kContextScopeCid,
+                                     ContextScope::InstanceSize(length));
+      scope->untag()->num_variables_ = length;
+      scope->untag()->is_implicit_ = d->Read<bool>();
+      ReadFromTo(scope, length);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class UnlinkedCallSerializationCluster : public SerializationCluster {
+ public:
+  UnlinkedCallSerializationCluster()
+      : SerializationCluster("UnlinkedCall",
+                             kUnlinkedCallCid,
+                             compiler::target::UnlinkedCall::InstanceSize()) {}
+  ~UnlinkedCallSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    UnlinkedCallPtr unlinked = UnlinkedCall::RawCast(object);
+    objects_.Add(unlinked);
+    PushFromTo(unlinked);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      UnlinkedCallPtr unlinked = objects_[i];
+      s->AssignRef(unlinked);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      UnlinkedCallPtr unlinked = objects_[i];
+      AutoTraceObjectName(unlinked, unlinked->untag()->target_name_);
+      WriteFromTo(unlinked);
+      s->Write<bool>(unlinked->untag()->can_patch_to_monomorphic_);
+    }
+  }
+
+ private:
+  GrowableArray<UnlinkedCallPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class UnlinkedCallDeserializationCluster : public DeserializationCluster {
+ public:
+  UnlinkedCallDeserializationCluster()
+      : DeserializationCluster("UnlinkedCall") {}
+  ~UnlinkedCallDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, UnlinkedCall::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      UnlinkedCallPtr unlinked = static_cast<UnlinkedCallPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(unlinked, kUnlinkedCallCid,
+                                     UnlinkedCall::InstanceSize());
+      ReadFromTo(unlinked);
+      unlinked->untag()->can_patch_to_monomorphic_ = d->Read<bool>();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ICDataSerializationCluster : public SerializationCluster {
+ public:
+  ICDataSerializationCluster()
+      : SerializationCluster("ICData",
+                             kICDataCid,
+                             compiler::target::ICData::InstanceSize()) {}
+  ~ICDataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ICDataPtr ic = ICData::RawCast(object);
+    objects_.Add(ic);
+    PushFromTo(ic);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ICDataPtr ic = objects_[i];
+      s->AssignRef(ic);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    Snapshot::Kind kind = s->kind();
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ICDataPtr ic = objects_[i];
+      AutoTraceObjectName(ic, ic->untag()->target_name_);
+      WriteFromTo(ic);
+      if (kind != Snapshot::kFullAOT) {
+        NOT_IN_PRECOMPILED(s->Write<int32_t>(ic->untag()->deopt_id_));
+      }
+      s->Write<uint32_t>(ic->untag()->state_bits_);
+    }
+  }
+
+ private:
+  GrowableArray<ICDataPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ICDataDeserializationCluster : public DeserializationCluster {
+ public:
+  ICDataDeserializationCluster() : DeserializationCluster("ICData") {}
+  ~ICDataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, ICData::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ICDataPtr ic = static_cast<ICDataPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(ic, kICDataCid, ICData::InstanceSize());
+      ReadFromTo(ic);
+      NOT_IN_PRECOMPILED(ic->untag()->deopt_id_ = d->Read<int32_t>());
+      ic->untag()->state_bits_ = d->Read<int32_t>();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class MegamorphicCacheSerializationCluster : public SerializationCluster {
+ public:
+  MegamorphicCacheSerializationCluster()
+      : SerializationCluster(
+            "MegamorphicCache",
+            kMegamorphicCacheCid,
+            compiler::target::MegamorphicCache::InstanceSize()) {}
+  ~MegamorphicCacheSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    MegamorphicCachePtr cache = MegamorphicCache::RawCast(object);
+    objects_.Add(cache);
+    PushFromTo(cache);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      MegamorphicCachePtr cache = objects_[i];
+      s->AssignRef(cache);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      MegamorphicCachePtr cache = objects_[i];
+      AutoTraceObjectName(cache, cache->untag()->target_name_);
+      WriteFromTo(cache);
+      s->Write<int32_t>(cache->untag()->filled_entry_count_);
+    }
+  }
+
+ private:
+  GrowableArray<MegamorphicCachePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class MegamorphicCacheDeserializationCluster : public DeserializationCluster {
+ public:
+  MegamorphicCacheDeserializationCluster()
+      : DeserializationCluster("MegamorphicCache") {}
+  ~MegamorphicCacheDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, MegamorphicCache::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      MegamorphicCachePtr cache = static_cast<MegamorphicCachePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(cache, kMegamorphicCacheCid,
+                                     MegamorphicCache::InstanceSize());
+      ReadFromTo(cache);
+      cache->untag()->filled_entry_count_ = d->Read<int32_t>();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class SubtypeTestCacheSerializationCluster : public SerializationCluster {
+ public:
+  SubtypeTestCacheSerializationCluster()
+      : SerializationCluster(
+            "SubtypeTestCache",
+            kSubtypeTestCacheCid,
+            compiler::target::SubtypeTestCache::InstanceSize()) {}
+  ~SubtypeTestCacheSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    SubtypeTestCachePtr cache = SubtypeTestCache::RawCast(object);
+    objects_.Add(cache);
+    s->Push(cache->untag()->cache_);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      SubtypeTestCachePtr cache = objects_[i];
+      s->AssignRef(cache);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      SubtypeTestCachePtr cache = objects_[i];
+      AutoTraceObject(cache);
+      WriteField(cache, cache_);
+    }
+  }
+
+ private:
+  GrowableArray<SubtypeTestCachePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class SubtypeTestCacheDeserializationCluster : public DeserializationCluster {
+ public:
+  SubtypeTestCacheDeserializationCluster()
+      : DeserializationCluster("SubtypeTestCache") {}
+  ~SubtypeTestCacheDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, SubtypeTestCache::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      SubtypeTestCachePtr cache = static_cast<SubtypeTestCachePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(cache, kSubtypeTestCacheCid,
+                                     SubtypeTestCache::InstanceSize());
+      cache->untag()->cache_ = static_cast<ArrayPtr>(d->ReadRef());
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LoadingUnitSerializationCluster : public SerializationCluster {
+ public:
+  LoadingUnitSerializationCluster()
+      : SerializationCluster("LoadingUnit",
+                             kLoadingUnitCid,
+                             compiler::target::LoadingUnit::InstanceSize()) {}
+  ~LoadingUnitSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LoadingUnitPtr unit = LoadingUnit::RawCast(object);
+    objects_.Add(unit);
+    s->Push(unit->untag()->parent());
+  }
+
+  void WriteAlloc(Serializer* s) {
+    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);
+      WriteCompressedField(unit, parent);
+      s->Write<int32_t>(unit->untag()->id_);
+    }
+  }
+
+ private:
+  GrowableArray<LoadingUnitPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LoadingUnitDeserializationCluster : public DeserializationCluster {
+ public:
+  LoadingUnitDeserializationCluster() : DeserializationCluster("LoadingUnit") {}
+  ~LoadingUnitDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, LoadingUnit::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    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->untag()->parent_ = static_cast<LoadingUnitPtr>(d->ReadRef());
+      unit->untag()->base_objects_ = Array::null();
+      unit->untag()->id_ = d->Read<int32_t>();
+      unit->untag()->loaded_ = false;
+      unit->untag()->load_outstanding_ = false;
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LanguageErrorSerializationCluster : public SerializationCluster {
+ public:
+  LanguageErrorSerializationCluster()
+      : SerializationCluster("LanguageError",
+                             kLanguageErrorCid,
+                             compiler::target::LanguageError::InstanceSize()) {}
+  ~LanguageErrorSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LanguageErrorPtr error = LanguageError::RawCast(object);
+    objects_.Add(error);
+    PushFromTo(error);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LanguageErrorPtr error = objects_[i];
+      s->AssignRef(error);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LanguageErrorPtr error = objects_[i];
+      AutoTraceObject(error);
+      WriteFromTo(error);
+      s->WriteTokenPosition(error->untag()->token_pos_);
+      s->Write<bool>(error->untag()->report_after_token_);
+      s->Write<int8_t>(error->untag()->kind_);
+    }
+  }
+
+ private:
+  GrowableArray<LanguageErrorPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LanguageErrorDeserializationCluster : public DeserializationCluster {
+ public:
+  LanguageErrorDeserializationCluster()
+      : DeserializationCluster("LanguageError") {}
+  ~LanguageErrorDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, LanguageError::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LanguageErrorPtr error = static_cast<LanguageErrorPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(error, kLanguageErrorCid,
+                                     LanguageError::InstanceSize());
+      ReadFromTo(error);
+      error->untag()->token_pos_ = d->ReadTokenPosition();
+      error->untag()->report_after_token_ = d->Read<bool>();
+      error->untag()->kind_ = d->Read<int8_t>();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class UnhandledExceptionSerializationCluster : public SerializationCluster {
+ public:
+  UnhandledExceptionSerializationCluster()
+      : SerializationCluster(
+            "UnhandledException",
+            kUnhandledExceptionCid,
+            compiler::target::UnhandledException::InstanceSize()) {}
+  ~UnhandledExceptionSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    UnhandledExceptionPtr exception = UnhandledException::RawCast(object);
+    objects_.Add(exception);
+    PushFromTo(exception);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      UnhandledExceptionPtr exception = objects_[i];
+      s->AssignRef(exception);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      UnhandledExceptionPtr exception = objects_[i];
+      AutoTraceObject(exception);
+      WriteFromTo(exception);
+    }
+  }
+
+ private:
+  GrowableArray<UnhandledExceptionPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class UnhandledExceptionDeserializationCluster : public DeserializationCluster {
+ public:
+  UnhandledExceptionDeserializationCluster()
+      : DeserializationCluster("UnhandledException") {}
+  ~UnhandledExceptionDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, UnhandledException::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      UnhandledExceptionPtr exception =
+          static_cast<UnhandledExceptionPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(exception, kUnhandledExceptionCid,
+                                     UnhandledException::InstanceSize());
+      ReadFromTo(exception);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class InstanceSerializationCluster : public SerializationCluster {
+ public:
+  InstanceSerializationCluster(bool is_canonical, intptr_t cid)
+      : SerializationCluster("Instance", cid, kSizeVaries, is_canonical) {
+    ClassPtr cls = IsolateGroup::Current()->class_table()->At(cid);
+    host_next_field_offset_in_words_ =
+        cls->untag()->host_next_field_offset_in_words_;
+    ASSERT(host_next_field_offset_in_words_ > 0);
+#if defined(DART_PRECOMPILER)
+    target_next_field_offset_in_words_ =
+        cls->untag()->target_next_field_offset_in_words_;
+    target_instance_size_in_words_ =
+        cls->untag()->target_instance_size_in_words_;
+#else
+    target_next_field_offset_in_words_ =
+        cls->untag()->host_next_field_offset_in_words_;
+    target_instance_size_in_words_ = cls->untag()->host_instance_size_in_words_;
+#endif  // defined(DART_PRECOMPILER)
+    ASSERT(target_next_field_offset_in_words_ > 0);
+    ASSERT(target_instance_size_in_words_ > 0);
+  }
+  ~InstanceSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    InstancePtr instance = Instance::RawCast(object);
+    objects_.Add(instance);
+    const intptr_t next_field_offset = host_next_field_offset_in_words_
+                                       << kCompressedWordSizeLog2;
+    const auto unboxed_fields_bitmap =
+        s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(cid_);
+    intptr_t offset = Instance::NextFieldOffset();
+    while (offset < next_field_offset) {
+      // Skips unboxed fields
+      if (!unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
+        ObjectPtr raw_obj =
+            reinterpret_cast<CompressedObjectPtr*>(
+                reinterpret_cast<uword>(instance->untag()) + offset)
+                ->Decompress(instance->untag()->heap_base());
+        s->Push(raw_obj);
+      }
+      offset += kCompressedWordSize;
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+
+    s->Write<int32_t>(target_next_field_offset_in_words_);
+    s->Write<int32_t>(target_instance_size_in_words_);
+
+    for (intptr_t i = 0; i < count; i++) {
+      InstancePtr instance = objects_[i];
+      s->AssignRef(instance);
+    }
+
+    const intptr_t instance_size = compiler::target::RoundedAllocationSize(
+        target_instance_size_in_words_ * compiler::target::kCompressedWordSize);
+    target_memory_size_ += instance_size * count;
+  }
+
+  void WriteFill(Serializer* s) {
+    intptr_t next_field_offset = host_next_field_offset_in_words_
+                                 << kCompressedWordSizeLog2;
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned64(CalculateTargetUnboxedFieldsBitmap(s, cid_).Value());
+    const auto unboxed_fields_bitmap =
+        s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(cid_);
+
+    for (intptr_t i = 0; i < count; i++) {
+      InstancePtr instance = objects_[i];
+      AutoTraceObject(instance);
+      intptr_t offset = Instance::NextFieldOffset();
+      while (offset < next_field_offset) {
+        if (unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
+          // Writes 32 bits of the unboxed value at a time.
+          const compressed_uword value = *reinterpret_cast<compressed_uword*>(
+              reinterpret_cast<uword>(instance->untag()) + offset);
+          s->WriteWordWith32BitWrites(value);
+        } else {
+          ObjectPtr raw_obj =
+              reinterpret_cast<CompressedObjectPtr*>(
+                  reinterpret_cast<uword>(instance->untag()) + offset)
+                  ->Decompress(instance->untag()->heap_base());
+          s->WriteElementRef(raw_obj, offset);
+        }
+        offset += kCompressedWordSize;
+      }
+    }
+  }
+
+ private:
+  intptr_t host_next_field_offset_in_words_;
+  intptr_t target_next_field_offset_in_words_;
+  intptr_t target_instance_size_in_words_;
+  GrowableArray<InstancePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class AbstractInstanceDeserializationCluster : public DeserializationCluster {
+ protected:
+  explicit AbstractInstanceDeserializationCluster(const char* name,
+                                                  bool is_canonical)
+      : DeserializationCluster(name, is_canonical) {}
+
+ public:
+#if defined(DART_PRECOMPILED_RUNTIME)
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!primary && is_canonical()) {
+      SafepointMutexLocker ml(
+          d->isolate_group()->constant_canonicalization_mutex());
+      Instance& instance = Instance::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        instance ^= refs.At(i);
+        instance = instance.CanonicalizeLocked(d->thread());
+        refs.SetAt(i, instance);
+      }
+    }
+  }
+#endif
+};
+
+class InstanceDeserializationCluster
+    : public AbstractInstanceDeserializationCluster {
+ public:
+  explicit InstanceDeserializationCluster(intptr_t cid, bool is_canonical)
+      : AbstractInstanceDeserializationCluster("Instance", is_canonical),
+        cid_(cid) {}
+  ~InstanceDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    const intptr_t count = d->ReadUnsigned();
+    next_field_offset_in_words_ = d->Read<int32_t>();
+    instance_size_in_words_ = d->Read<int32_t>();
+    intptr_t instance_size = Object::RoundedAllocationSize(
+        instance_size_in_words_ * kCompressedWordSize);
+    for (intptr_t i = 0; i < count; i++) {
+      d->AssignRef(old_space->AllocateSnapshot(instance_size));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    intptr_t next_field_offset = next_field_offset_in_words_
+                                 << kCompressedWordSizeLog2;
+    intptr_t instance_size = Object::RoundedAllocationSize(
+        instance_size_in_words_ * kCompressedWordSize);
+    const UnboxedFieldBitmap unboxed_fields_bitmap(d->ReadUnsigned64());
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      InstancePtr instance = static_cast<InstancePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(instance, cid_, instance_size,
+                                     primary && is_canonical());
+      intptr_t offset = Instance::NextFieldOffset();
+      while (offset < next_field_offset) {
+        if (unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
+          compressed_uword* p = reinterpret_cast<compressed_uword*>(
+              reinterpret_cast<uword>(instance->untag()) + offset);
+          // Reads 32 bits of the unboxed value at a time
+          *p = d->ReadWordWith32BitReads();
+        } else {
+          CompressedObjectPtr* p = reinterpret_cast<CompressedObjectPtr*>(
+              reinterpret_cast<uword>(instance->untag()) + offset);
+          *p = d->ReadRef();
+        }
+        offset += kCompressedWordSize;
+      }
+      while (offset < instance_size) {
+        CompressedObjectPtr* p = reinterpret_cast<CompressedObjectPtr*>(
+            reinterpret_cast<uword>(instance->untag()) + offset);
+        *p = Object::null();
+        offset += kCompressedWordSize;
+      }
+      ASSERT(offset == instance_size);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+  intptr_t next_field_offset_in_words_;
+  intptr_t instance_size_in_words_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LibraryPrefixSerializationCluster : public SerializationCluster {
+ public:
+  LibraryPrefixSerializationCluster()
+      : SerializationCluster("LibraryPrefix",
+                             kLibraryPrefixCid,
+                             compiler::target::LibraryPrefix::InstanceSize()) {}
+  ~LibraryPrefixSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LibraryPrefixPtr prefix = LibraryPrefix::RawCast(object);
+    objects_.Add(prefix);
+    PushFromTo(prefix);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LibraryPrefixPtr prefix = objects_[i];
+      s->AssignRef(prefix);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LibraryPrefixPtr prefix = objects_[i];
+      AutoTraceObject(prefix);
+      WriteFromTo(prefix);
+      s->Write<uint16_t>(prefix->untag()->num_imports_);
+      s->Write<bool>(prefix->untag()->is_deferred_load_);
+    }
+  }
+
+ private:
+  GrowableArray<LibraryPrefixPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LibraryPrefixDeserializationCluster : public DeserializationCluster {
+ public:
+  LibraryPrefixDeserializationCluster()
+      : DeserializationCluster("LibraryPrefix") {}
+  ~LibraryPrefixDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, LibraryPrefix::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LibraryPrefixPtr prefix = static_cast<LibraryPrefixPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(prefix, kLibraryPrefixCid,
+                                     LibraryPrefix::InstanceSize());
+      ReadFromTo(prefix);
+      prefix->untag()->num_imports_ = d->Read<uint16_t>();
+      prefix->untag()->is_deferred_load_ = d->Read<bool>();
+    }
+  }
+};
+
+// Used to pack nullability into other serialized values.
+static constexpr intptr_t kNullabilityBitSize = 2;
+static constexpr intptr_t kNullabilityBitMask = (1 << kNullabilityBitSize) - 1;
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypeSerializationCluster
+    : public CanonicalSetSerializationCluster<
+          CanonicalTypeSet,
+          Type,
+          TypePtr,
+          /*kAllCanonicalObjectsAreIncludedIntoSet=*/false> {
+ public:
+  TypeSerializationCluster(bool is_canonical, bool represents_canonical_set)
+      : CanonicalSetSerializationCluster(
+            kTypeCid,
+            is_canonical,
+            represents_canonical_set,
+            "Type",
+            compiler::target::Type::InstanceSize()) {}
+  ~TypeSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypePtr type = Type::RawCast(object);
+    objects_.Add(type);
+
+    PushFromTo(type);
+
+    if (type->untag()->type_class_id()->IsHeapObject()) {
+      // Type class is still an unresolved class.
+      UNREACHABLE();
+    }
+
+    SmiPtr raw_type_class_id = Smi::RawCast(type->untag()->type_class_id());
+    ClassPtr type_class =
+        s->isolate_group()->class_table()->At(Smi::Value(raw_type_class_id));
+    s->Push(type_class);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+    for (intptr_t i = 0; i < count; i++) {
+      TypePtr type = objects_[i];
+      s->AssignRef(type);
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WriteType(s, objects_[i]);
+    }
+  }
+
+ private:
+  Type& type_ = Type::Handle();
+  Class& cls_ = Class::Handle();
+
+  // Type::Canonicalize does not actually put all canonical Type objects into
+  // canonical_types set. Some of the canonical declaration types (but not all
+  // of them) are simply cached in UntaggedClass::declaration_type_ and are not
+  // inserted into the canonical_types set.
+  // Keep in sync with Type::Canonicalize.
+  virtual bool IsInCanonicalSet(Serializer* s, TypePtr type) {
+    SmiPtr raw_type_class_id = Smi::RawCast(type->untag()->type_class_id());
+    ClassPtr type_class =
+        s->isolate_group()->class_table()->At(Smi::Value(raw_type_class_id));
+    if (type_class->untag()->declaration_type() != type) {
+      return true;
+    }
+
+    type_ = type;
+    cls_ = type_class;
+    return !type_.IsDeclarationTypeOf(cls_);
+  }
+
+  void WriteType(Serializer* s, TypePtr type) {
+    AutoTraceObject(type);
+    WriteFromTo(type);
+    ASSERT(type->untag()->type_state_ < (1 << UntaggedType::kTypeStateBitSize));
+    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
+    static_assert(UntaggedType::kTypeStateBitSize + kNullabilityBitSize <=
+                      kBitsPerByte * sizeof(uint8_t),
+                  "Cannot pack type_state_ and nullability_ into a uint8_t");
+    const uint8_t combined =
+        (type->untag()->type_state_ << kNullabilityBitSize) |
+        type->untag()->nullability_;
+    ASSERT_EQUAL(type->untag()->type_state_, combined >> kNullabilityBitSize);
+    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
+    s->Write<uint8_t>(combined);
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypeDeserializationCluster
+    : public CanonicalSetDeserializationCluster<
+          CanonicalTypeSet,
+          /*kAllCanonicalObjectsAreIncludedIntoSet=*/false> {
+ public:
+  explicit TypeDeserializationCluster(bool is_canonical, bool is_root_unit)
+      : CanonicalSetDeserializationCluster(is_canonical, is_root_unit, "Type") {
+  }
+  ~TypeDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Type::InstanceSize());
+    BuildCanonicalSetFromLayout(d);
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypePtr type = static_cast<TypePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(type, kTypeCid, Type::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(type);
+      const uint8_t combined = d->Read<uint8_t>();
+      type->untag()->type_state_ = combined >> kNullabilityBitSize;
+      type->untag()->nullability_ = combined & kNullabilityBitMask;
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(d, refs,
+                         Array::Handle(object_store->canonical_types()));
+      object_store->set_canonical_types(table_);
+    } else if (!primary && is_canonical()) {
+      AbstractType& type = AbstractType::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        type ^= refs.At(i);
+        type = type.Canonicalize(d->thread(), nullptr);
+        refs.SetAt(i, type);
+      }
+    }
+
+    Type& type = Type::Handle(d->zone());
+    Code& stub = Code::Handle(d->zone());
+
+    if (Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type ^= refs.At(id);
+        type.UpdateTypeTestingStubEntryPoint();
+      }
+    } else {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type ^= refs.At(id);
+        stub = TypeTestingStubGenerator::DefaultCodeForType(type);
+        type.InitializeTypeTestingStubNonAtomic(stub);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class FunctionTypeSerializationCluster
+    : public CanonicalSetSerializationCluster<CanonicalFunctionTypeSet,
+                                              FunctionType,
+                                              FunctionTypePtr> {
+ public:
+  explicit FunctionTypeSerializationCluster(bool is_canonical,
+                                            bool represents_canonical_set)
+      : CanonicalSetSerializationCluster(
+            kFunctionTypeCid,
+            is_canonical,
+            represents_canonical_set,
+            "FunctionType",
+            compiler::target::FunctionType::InstanceSize()) {}
+  ~FunctionTypeSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    FunctionTypePtr type = FunctionType::RawCast(object);
+    objects_.Add(type);
+    PushFromTo(type);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+
+    for (intptr_t i = 0; i < count; i++) {
+      FunctionTypePtr type = objects_[i];
+      s->AssignRef(type);
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WriteFunctionType(s, objects_[i]);
+    }
+  }
+
+ private:
+  void WriteFunctionType(Serializer* s, FunctionTypePtr type) {
+    AutoTraceObject(type);
+    WriteFromTo(type);
+    ASSERT(type->untag()->type_state_ <
+           (1 << UntaggedFunctionType::kTypeStateBitSize));
+    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
+    static_assert(
+        UntaggedFunctionType::kTypeStateBitSize + kNullabilityBitSize <=
+            kBitsPerByte * sizeof(uint8_t),
+        "Cannot pack type_state_ and nullability_ into a uint8_t");
+    const uint8_t combined =
+        (type->untag()->type_state_ << kNullabilityBitSize) |
+        type->untag()->nullability_;
+    ASSERT_EQUAL(type->untag()->type_state_, combined >> kNullabilityBitSize);
+    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
+    s->Write<uint8_t>(combined);
+    s->Write<uint32_t>(type->untag()->packed_parameter_counts_);
+    s->Write<uint16_t>(type->untag()->packed_type_parameter_counts_);
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class FunctionTypeDeserializationCluster
+    : public CanonicalSetDeserializationCluster<CanonicalFunctionTypeSet> {
+ public:
+  explicit FunctionTypeDeserializationCluster(bool is_canonical,
+                                              bool is_root_unit)
+      : CanonicalSetDeserializationCluster(is_canonical,
+                                           is_root_unit,
+                                           "FunctionType") {}
+  ~FunctionTypeDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, FunctionType::InstanceSize());
+    BuildCanonicalSetFromLayout(d);
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      FunctionTypePtr type = static_cast<FunctionTypePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(type, kFunctionTypeCid,
+                                     FunctionType::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(type);
+      const uint8_t combined = d->Read<uint8_t>();
+      type->untag()->type_state_ = combined >> kNullabilityBitSize;
+      type->untag()->nullability_ = combined & kNullabilityBitMask;
+      type->untag()->packed_parameter_counts_ = d->Read<uint32_t>();
+      type->untag()->packed_type_parameter_counts_ = d->Read<uint16_t>();
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(
+          d, refs, Array::Handle(object_store->canonical_function_types()));
+      object_store->set_canonical_function_types(table_);
+    } else if (!primary && is_canonical()) {
+      AbstractType& type = AbstractType::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        type ^= refs.At(i);
+        type = type.Canonicalize(d->thread(), nullptr);
+        refs.SetAt(i, type);
+      }
+    }
+
+    FunctionType& type = FunctionType::Handle(d->zone());
+    Code& stub = Code::Handle(d->zone());
+
+    if (Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type ^= refs.At(id);
+        type.UpdateTypeTestingStubEntryPoint();
+      }
+    } else {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type ^= refs.At(id);
+        stub = TypeTestingStubGenerator::DefaultCodeForType(type);
+        type.InitializeTypeTestingStubNonAtomic(stub);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypeRefSerializationCluster : public SerializationCluster {
+ public:
+  TypeRefSerializationCluster()
+      : SerializationCluster("TypeRef",
+                             kTypeRefCid,
+                             compiler::target::TypeRef::InstanceSize()) {}
+  ~TypeRefSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypeRefPtr type = TypeRef::RawCast(object);
+    objects_.Add(type);
+    PushFromTo(type);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      TypeRefPtr type = objects_[i];
+      s->AssignRef(type);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      TypeRefPtr type = objects_[i];
+      AutoTraceObject(type);
+      WriteFromTo(type);
+    }
+  }
+
+ private:
+  GrowableArray<TypeRefPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypeRefDeserializationCluster : public DeserializationCluster {
+ public:
+  TypeRefDeserializationCluster() : DeserializationCluster("TypeRef") {}
+  ~TypeRefDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, TypeRef::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypeRefPtr type = static_cast<TypeRefPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(type, kTypeRefCid, TypeRef::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(type);
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!primary && is_canonical()) {
+      AbstractType& type = AbstractType::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        type ^= refs.At(i);
+        type = type.Canonicalize(d->thread(), nullptr);
+        refs.SetAt(i, type);
+      }
+    }
+
+    TypeRef& type_ref = TypeRef::Handle(d->zone());
+    Code& stub = Code::Handle(d->zone());
+
+    if (Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type_ref ^= refs.At(id);
+        type_ref.UpdateTypeTestingStubEntryPoint();
+      }
+    } else {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type_ref ^= refs.At(id);
+        stub = TypeTestingStubGenerator::DefaultCodeForType(type_ref);
+        type_ref.InitializeTypeTestingStubNonAtomic(stub);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypeParameterSerializationCluster
+    : public CanonicalSetSerializationCluster<CanonicalTypeParameterSet,
+                                              TypeParameter,
+                                              TypeParameterPtr> {
+ public:
+  TypeParameterSerializationCluster(bool is_canonical,
+                                    bool cluster_represents_canonical_set)
+      : CanonicalSetSerializationCluster(
+            kTypeParameterCid,
+            is_canonical,
+            cluster_represents_canonical_set,
+            "TypeParameter",
+            compiler::target::TypeParameter::InstanceSize()) {}
+  ~TypeParameterSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypeParameterPtr type = TypeParameter::RawCast(object);
+    objects_.Add(type);
+
+    PushFromTo(type);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+    for (intptr_t i = 0; i < count; i++) {
+      TypeParameterPtr type = objects_[i];
+      s->AssignRef(type);
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WriteTypeParameter(s, objects_[i]);
+    }
+  }
+
+ private:
+  void WriteTypeParameter(Serializer* s, TypeParameterPtr type) {
+    AutoTraceObject(type);
+    WriteFromTo(type);
+    s->Write<int32_t>(type->untag()->parameterized_class_id_);
+    s->Write<uint8_t>(type->untag()->base_);
+    s->Write<uint8_t>(type->untag()->index_);
+    ASSERT(type->untag()->flags_ < (1 << UntaggedTypeParameter::kFlagsBitSize));
+    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
+    static_assert(UntaggedTypeParameter::kFlagsBitSize + kNullabilityBitSize <=
+                      kBitsPerByte * sizeof(uint8_t),
+                  "Cannot pack flags_ and nullability_ into a uint8_t");
+    const uint8_t combined = (type->untag()->flags_ << kNullabilityBitSize) |
+                             type->untag()->nullability_;
+    ASSERT_EQUAL(type->untag()->flags_, combined >> kNullabilityBitSize);
+    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
+    s->Write<uint8_t>(combined);
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypeParameterDeserializationCluster
+    : public CanonicalSetDeserializationCluster<CanonicalTypeParameterSet> {
+ public:
+  explicit TypeParameterDeserializationCluster(bool is_canonical,
+                                               bool is_root_unit)
+      : CanonicalSetDeserializationCluster(is_canonical,
+                                           is_root_unit,
+                                           "TypeParameter") {}
+  ~TypeParameterDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, TypeParameter::InstanceSize());
+    BuildCanonicalSetFromLayout(d);
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypeParameterPtr type = static_cast<TypeParameterPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(type, kTypeParameterCid,
+                                     TypeParameter::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(type);
+      type->untag()->parameterized_class_id_ = d->Read<int32_t>();
+      type->untag()->base_ = d->Read<uint8_t>();
+      type->untag()->index_ = d->Read<uint8_t>();
+      const uint8_t combined = d->Read<uint8_t>();
+      type->untag()->flags_ = combined >> kNullabilityBitSize;
+      type->untag()->nullability_ = combined & kNullabilityBitMask;
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(
+          d, refs, Array::Handle(object_store->canonical_type_parameters()));
+      object_store->set_canonical_type_parameters(table_);
+    } else if (!primary && is_canonical()) {
+      TypeParameter& type_param = TypeParameter::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        type_param ^= refs.At(i);
+        type_param ^= type_param.Canonicalize(d->thread(), nullptr);
+        refs.SetAt(i, type_param);
+      }
+    }
+
+    TypeParameter& type_param = TypeParameter::Handle(d->zone());
+    Code& stub = Code::Handle(d->zone());
+
+    if (Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type_param ^= refs.At(id);
+        type_param.UpdateTypeTestingStubEntryPoint();
+      }
+    } else {
+      for (intptr_t id = start_index_; id < stop_index_; id++) {
+        type_param ^= refs.At(id);
+        stub = TypeTestingStubGenerator::DefaultCodeForType(type_param);
+        type_param.InitializeTypeTestingStubNonAtomic(stub);
+      }
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ClosureSerializationCluster : public SerializationCluster {
+ public:
+  explicit ClosureSerializationCluster(bool is_canonical)
+      : SerializationCluster("Closure",
+                             kClosureCid,
+                             compiler::target::Closure::InstanceSize(),
+                             is_canonical) {}
+  ~ClosureSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ClosurePtr closure = Closure::RawCast(object);
+    objects_.Add(closure);
+    PushFromTo(closure);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ClosurePtr closure = objects_[i];
+      s->AssignRef(closure);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ClosurePtr closure = objects_[i];
+      AutoTraceObject(closure);
+      WriteFromTo(closure);
+    }
+  }
+
+ private:
+  GrowableArray<ClosurePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ClosureDeserializationCluster
+    : public AbstractInstanceDeserializationCluster {
+ public:
+  explicit ClosureDeserializationCluster(bool is_canonical)
+      : AbstractInstanceDeserializationCluster("Closure", is_canonical) {}
+  ~ClosureDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Closure::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ClosurePtr closure = static_cast<ClosurePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(closure, kClosureCid,
+                                     Closure::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(closure);
+#if defined(DART_PRECOMPILED_RUNTIME)
+      closure->untag()->entry_point_ = 0;
+#endif
+    }
+  }
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    // We only cache the entry point in bare instructions mode (as we need
+    // to load the function anyway otherwise).
+    if (d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
+      auto& closure = Closure::Handle(d->zone());
+      auto& func = Function::Handle(d->zone());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        closure ^= refs.At(i);
+        func = closure.function();
+        uword entry_point = func.entry_point();
+        ASSERT(entry_point != 0);
+        closure.ptr()->untag()->entry_point_ = entry_point;
+      }
+    }
+  }
+#endif
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class MintSerializationCluster : public SerializationCluster {
+ public:
+  explicit MintSerializationCluster(bool is_canonical)
+      : SerializationCluster("int", kMintCid, kSizeVaries, is_canonical) {}
+  ~MintSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    if (!object->IsHeapObject()) {
+      SmiPtr smi = Smi::RawCast(object);
+      smis_.Add(smi);
+    } else {
+      MintPtr mint = Mint::RawCast(object);
+      mints_.Add(mint);
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    s->WriteUnsigned(smis_.length() + mints_.length());
+    for (intptr_t i = 0; i < smis_.length(); i++) {
+      SmiPtr smi = smis_[i];
+      s->AssignRef(smi);
+      AutoTraceObject(smi);
+      const int64_t value = Smi::Value(smi);
+      s->Write<int64_t>(value);
+      if (!Smi::IsValid(value)) {
+        // This Smi will become a Mint when loaded.
+        target_memory_size_ += compiler::target::Mint::InstanceSize();
+      }
+    }
+    for (intptr_t i = 0; i < mints_.length(); i++) {
+      MintPtr mint = mints_[i];
+      s->AssignRef(mint);
+      AutoTraceObject(mint);
+      s->Write<int64_t>(mint->untag()->value_);
+      // All Mints on the host should be Mints on the target.
+      ASSERT(!Smi::IsValid(mint->untag()->value_));
+      target_memory_size_ += compiler::target::Mint::InstanceSize();
+    }
+  }
+
+  void WriteFill(Serializer* s) {}
+
+ private:
+  GrowableArray<SmiPtr> smis_;
+  GrowableArray<MintPtr> mints_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class MintDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit MintDeserializationCluster(bool is_canonical)
+      : DeserializationCluster("int", is_canonical) {}
+  ~MintDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    PageSpace* old_space = d->heap()->old_space();
+
+    start_index_ = d->next_index();
+    const intptr_t count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      int64_t value = d->Read<int64_t>();
+      if (Smi::IsValid(value)) {
+        d->AssignRef(Smi::New(value));
+      } else {
+        MintPtr mint = static_cast<MintPtr>(
+            old_space->AllocateSnapshot(Mint::InstanceSize()));
+        Deserializer::InitializeHeader(mint, kMintCid, Mint::InstanceSize(),
+                                       is_canonical());
+        mint->untag()->value_ = value;
+        d->AssignRef(mint);
+      }
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {}
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!primary && is_canonical()) {
+      const Class& mint_cls = Class::Handle(
+          d->zone(), d->isolate_group()->object_store()->mint_class());
+      Object& number = Object::Handle(d->zone());
+      Mint& number2 = Mint::Handle(d->zone());
+      SafepointMutexLocker ml(
+          d->isolate_group()->constant_canonicalization_mutex());
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        number = refs.At(i);
+        if (!number.IsMint()) continue;
+        number2 =
+            mint_cls.LookupCanonicalMint(d->zone(), Mint::Cast(number).value());
+        if (number2.IsNull()) {
+          number.SetCanonical();
+          mint_cls.InsertCanonicalMint(d->zone(), Mint::Cast(number));
+        } else {
+          refs.SetAt(i, number2);
+        }
+      }
+    }
+  }
+#endif
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class DoubleSerializationCluster : public SerializationCluster {
+ public:
+  explicit DoubleSerializationCluster(bool is_canonical)
+      : SerializationCluster("double",
+                             kDoubleCid,
+                             compiler::target::Double::InstanceSize(),
+                             is_canonical) {}
+  ~DoubleSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    DoublePtr dbl = Double::RawCast(object);
+    objects_.Add(dbl);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      DoublePtr dbl = objects_[i];
+      s->AssignRef(dbl);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      DoublePtr dbl = objects_[i];
+      AutoTraceObject(dbl);
+      s->Write<double>(dbl->untag()->value_);
+    }
+  }
+
+ private:
+  GrowableArray<DoublePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class DoubleDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit DoubleDeserializationCluster(bool is_canonical)
+      : DeserializationCluster("double", is_canonical) {}
+  ~DoubleDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, Double::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      DoublePtr dbl = static_cast<DoublePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(dbl, kDoubleCid, Double::InstanceSize(),
+                                     primary && is_canonical());
+      dbl->untag()->value_ = d->Read<double>();
+    }
+  }
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!primary && is_canonical()) {
+      auto Z = d->zone();
+      auto isolate_group = d->isolate_group();
+      const Class& cls =
+          Class::Handle(Z, isolate_group->object_store()->double_class());
+      SafepointMutexLocker ml(isolate_group->constant_canonicalization_mutex());
+      Double& dbl = Double::Handle(Z);
+      Double& dbl2 = Double::Handle(Z);
+      for (intptr_t i = start_index_; i < stop_index_; i++) {
+        dbl ^= refs.At(i);
+        dbl2 = cls.LookupCanonicalDouble(Z, dbl.value());
+        if (dbl2.IsNull()) {
+          dbl.SetCanonical();
+          cls.InsertCanonicalDouble(Z, dbl);
+        } else {
+          refs.SetAt(i, dbl2);
+        }
+      }
+    }
+  }
+#endif
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class GrowableObjectArraySerializationCluster : public SerializationCluster {
+ public:
+  GrowableObjectArraySerializationCluster()
+      : SerializationCluster(
+            "GrowableObjectArray",
+            kGrowableObjectArrayCid,
+            compiler::target::GrowableObjectArray::InstanceSize()) {}
+  ~GrowableObjectArraySerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    GrowableObjectArrayPtr array = GrowableObjectArray::RawCast(object);
+    objects_.Add(array);
+    PushFromTo(array);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      GrowableObjectArrayPtr array = objects_[i];
+      s->AssignRef(array);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      GrowableObjectArrayPtr array = objects_[i];
+      AutoTraceObject(array);
+      WriteFromTo(array);
+    }
+  }
+
+ private:
+  GrowableArray<GrowableObjectArrayPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class GrowableObjectArrayDeserializationCluster
+    : public DeserializationCluster {
+ public:
+  GrowableObjectArrayDeserializationCluster()
+      : DeserializationCluster("GrowableObjectArray") {}
+  ~GrowableObjectArrayDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, GrowableObjectArray::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      GrowableObjectArrayPtr list =
+          static_cast<GrowableObjectArrayPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(list, kGrowableObjectArrayCid,
+                                     GrowableObjectArray::InstanceSize());
+      ReadFromTo(list);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypedDataSerializationCluster : public SerializationCluster {
+ public:
+  explicit TypedDataSerializationCluster(intptr_t cid)
+      : SerializationCluster("TypedData", cid) {}
+  ~TypedDataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypedDataPtr data = TypedData::RawCast(object);
+    objects_.Add(data);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    const intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
+    for (intptr_t i = 0; i < count; i++) {
+      TypedDataPtr data = objects_[i];
+      s->AssignRef(data);
+      AutoTraceObject(data);
+      const intptr_t length = Smi::Value(data->untag()->length());
+      s->WriteUnsigned(length);
+      target_memory_size_ +=
+          compiler::target::TypedData::InstanceSize(length * element_size);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
+    for (intptr_t i = 0; i < count; i++) {
+      TypedDataPtr data = objects_[i];
+      AutoTraceObject(data);
+      const intptr_t length = Smi::Value(data->untag()->length());
+      s->WriteUnsigned(length);
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data());
+      s->WriteBytes(cdata, length * element_size);
+    }
+  }
+
+ private:
+  GrowableArray<TypedDataPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypedDataDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit TypedDataDeserializationCluster(intptr_t cid)
+      : DeserializationCluster("TypedData"), cid_(cid) {}
+  ~TypedDataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    const intptr_t count = d->ReadUnsigned();
+    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
+    for (intptr_t i = 0; i < count; i++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(old_space->AllocateSnapshot(
+          TypedData::InstanceSize(length * element_size)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypedDataPtr data = static_cast<TypedDataPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      const intptr_t length_in_bytes = length * element_size;
+      Deserializer::InitializeHeader(data, cid_,
+                                     TypedData::InstanceSize(length_in_bytes));
+      data->untag()->length_ = Smi::New(length);
+      data->untag()->RecomputeDataField();
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data());
+      d->ReadBytes(cdata, length_in_bytes);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class TypedDataViewSerializationCluster : public SerializationCluster {
+ public:
+  explicit TypedDataViewSerializationCluster(intptr_t cid)
+      : SerializationCluster("TypedDataView",
+                             cid,
+                             compiler::target::TypedDataView::InstanceSize()) {}
+  ~TypedDataViewSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    TypedDataViewPtr view = TypedDataView::RawCast(object);
+    objects_.Add(view);
+
+    PushFromTo(view);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      TypedDataViewPtr view = objects_[i];
+      s->AssignRef(view);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      TypedDataViewPtr view = objects_[i];
+      AutoTraceObject(view);
+      WriteFromTo(view);
+    }
+  }
+
+ private:
+  GrowableArray<TypedDataViewPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypedDataViewDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit TypedDataViewDeserializationCluster(intptr_t cid)
+      : DeserializationCluster("TypedDataView"), cid_(cid) {}
+  ~TypedDataViewDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, TypedDataView::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      TypedDataViewPtr view = static_cast<TypedDataViewPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(view, cid_, TypedDataView::InstanceSize());
+      ReadFromTo(view);
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    ASSERT(primary || !is_canonical());
+    auto& view = TypedDataView::Handle(d->zone());
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      view ^= refs.At(id);
+      view.RecomputeDataField();
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ExternalTypedDataSerializationCluster : public SerializationCluster {
+ public:
+  explicit ExternalTypedDataSerializationCluster(intptr_t cid)
+      : SerializationCluster(
+            "ExternalTypedData",
+            cid,
+            compiler::target::ExternalTypedData::InstanceSize()) {}
+  ~ExternalTypedDataSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ExternalTypedDataPtr data = ExternalTypedData::RawCast(object);
+    objects_.Add(data);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ExternalTypedDataPtr data = objects_[i];
+      s->AssignRef(data);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    intptr_t element_size = ExternalTypedData::ElementSizeInBytes(cid_);
+    for (intptr_t i = 0; i < count; i++) {
+      ExternalTypedDataPtr data = objects_[i];
+      AutoTraceObject(data);
+      const intptr_t length = Smi::Value(data->untag()->length());
+      s->WriteUnsigned(length);
+      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data_);
+      s->Align(ExternalTypedData::kDataSerializationAlignment);
+      s->WriteBytes(cdata, length * element_size);
+    }
+  }
+
+ private:
+  GrowableArray<ExternalTypedDataPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ExternalTypedDataDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit ExternalTypedDataDeserializationCluster(intptr_t cid)
+      : DeserializationCluster("ExternalTypedData"), cid_(cid) {}
+  ~ExternalTypedDataDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, ExternalTypedData::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    intptr_t element_size = ExternalTypedData::ElementSizeInBytes(cid_);
+
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ExternalTypedDataPtr data = static_cast<ExternalTypedDataPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(data, cid_,
+                                     ExternalTypedData::InstanceSize());
+      data->untag()->length_ = Smi::New(length);
+      d->Align(ExternalTypedData::kDataSerializationAlignment);
+      data->untag()->data_ = const_cast<uint8_t*>(d->CurrentBufferAddress());
+      d->Advance(length * element_size);
+      // No finalizer / external size 0.
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class StackTraceSerializationCluster : public SerializationCluster {
+ public:
+  StackTraceSerializationCluster()
+      : SerializationCluster("StackTrace",
+                             kStackTraceCid,
+                             compiler::target::StackTrace::InstanceSize()) {}
+  ~StackTraceSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    StackTracePtr trace = StackTrace::RawCast(object);
+    objects_.Add(trace);
+    PushFromTo(trace);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      StackTracePtr trace = objects_[i];
+      s->AssignRef(trace);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      StackTracePtr trace = objects_[i];
+      AutoTraceObject(trace);
+      WriteFromTo(trace);
+    }
+  }
+
+ private:
+  GrowableArray<StackTracePtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class StackTraceDeserializationCluster : public DeserializationCluster {
+ public:
+  StackTraceDeserializationCluster() : DeserializationCluster("StackTrace") {}
+  ~StackTraceDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, StackTrace::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      StackTracePtr trace = static_cast<StackTracePtr>(d->Ref(id));
+      Deserializer::InitializeHeader(trace, kStackTraceCid,
+                                     StackTrace::InstanceSize());
+      ReadFromTo(trace);
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class RegExpSerializationCluster : public SerializationCluster {
+ public:
+  RegExpSerializationCluster()
+      : SerializationCluster("RegExp",
+                             kRegExpCid,
+                             compiler::target::RegExp::InstanceSize()) {}
+  ~RegExpSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    RegExpPtr regexp = RegExp::RawCast(object);
+    objects_.Add(regexp);
+    PushFromTo(regexp);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      RegExpPtr regexp = objects_[i];
+      s->AssignRef(regexp);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      RegExpPtr regexp = objects_[i];
+      AutoTraceObject(regexp);
+      WriteFromTo(regexp);
+      s->Write<int32_t>(regexp->untag()->num_one_byte_registers_);
+      s->Write<int32_t>(regexp->untag()->num_two_byte_registers_);
+      s->Write<int8_t>(regexp->untag()->type_flags_);
+    }
+  }
+
+ private:
+  GrowableArray<RegExpPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class RegExpDeserializationCluster : public DeserializationCluster {
+ public:
+  RegExpDeserializationCluster() : DeserializationCluster("RegExp") {}
+  ~RegExpDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, RegExp::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      RegExpPtr regexp = static_cast<RegExpPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(regexp, kRegExpCid,
+                                     RegExp::InstanceSize());
+      ReadFromTo(regexp);
+      regexp->untag()->num_one_byte_registers_ = d->Read<int32_t>();
+      regexp->untag()->num_two_byte_registers_ = d->Read<int32_t>();
+      regexp->untag()->type_flags_ = d->Read<int8_t>();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class WeakPropertySerializationCluster : public SerializationCluster {
+ public:
+  WeakPropertySerializationCluster()
+      : SerializationCluster("WeakProperty",
+                             kWeakPropertyCid,
+                             compiler::target::WeakProperty::InstanceSize()) {}
+  ~WeakPropertySerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    WeakPropertyPtr property = WeakProperty::RawCast(object);
+    objects_.Add(property);
+  }
+
+  void RetraceEphemerons(Serializer* s) {
+    for (intptr_t i = 0; i < objects_.length(); i++) {
+      WeakPropertyPtr property = objects_[i];
+      if (s->IsReachable(property->untag()->key())) {
+        s->Push(property->untag()->value());
+      }
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      WeakPropertyPtr property = objects_[i];
+      s->AssignRef(property);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      WeakPropertyPtr property = objects_[i];
+      AutoTraceObject(property);
+      if (s->HasRef(property->untag()->key())) {
+        s->WriteOffsetRef(property->untag()->key(), WeakProperty::key_offset());
+        s->WriteOffsetRef(property->untag()->value(),
+                          WeakProperty::value_offset());
+      } else {
+        s->WriteOffsetRef(Object::null(), WeakProperty::key_offset());
+        s->WriteOffsetRef(Object::null(), WeakProperty::value_offset());
+      }
+    }
+  }
+
+ private:
+  GrowableArray<WeakPropertyPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class WeakPropertyDeserializationCluster : public DeserializationCluster {
+ public:
+  WeakPropertyDeserializationCluster()
+      : DeserializationCluster("WeakProperty") {}
+  ~WeakPropertyDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, WeakProperty::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    ASSERT(!is_canonical());  // Never canonical.
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      WeakPropertyPtr property = static_cast<WeakPropertyPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(property, kWeakPropertyCid,
+                                     WeakProperty::InstanceSize());
+      ReadFromTo(property);
+      property->untag()->next_ = WeakProperty::null();
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LinkedHashMapSerializationCluster : public SerializationCluster {
+ public:
+  LinkedHashMapSerializationCluster(bool is_canonical, intptr_t cid)
+      : SerializationCluster("LinkedHashMap",
+                             cid,
+                             compiler::target::LinkedHashMap::InstanceSize(),
+                             is_canonical) {}
+  ~LinkedHashMapSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LinkedHashMapPtr map = LinkedHashMap::RawCast(object);
+    // We never have mutable hashmaps in snapshots.
+    ASSERT(map->untag()->IsCanonical());
+    ASSERT_EQUAL(map.GetClassId(), kImmutableLinkedHashMapCid);
+    objects_.Add(map);
+    PushFromTo(map);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LinkedHashMapPtr map = objects_[i];
+      s->AssignRef(map);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LinkedHashMapPtr map = objects_[i];
+      AutoTraceObject(map);
+      WriteFromTo(map);
+    }
+  }
+
+ private:
+  GrowableArray<LinkedHashMapPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LinkedHashMapDeserializationCluster
+    : public AbstractInstanceDeserializationCluster {
+ public:
+  explicit LinkedHashMapDeserializationCluster(bool is_canonical, intptr_t cid)
+      : AbstractInstanceDeserializationCluster("LinkedHashMap", is_canonical),
+        cid_(cid) {}
+  ~LinkedHashMapDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, LinkedHashMap::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LinkedHashMapPtr map = static_cast<LinkedHashMapPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(map, cid_, LinkedHashMap::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(map);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class LinkedHashSetSerializationCluster : public SerializationCluster {
+ public:
+  LinkedHashSetSerializationCluster(bool is_canonical, intptr_t cid)
+      : SerializationCluster("LinkedHashSet",
+                             cid,
+                             compiler::target::LinkedHashSet::InstanceSize(),
+                             is_canonical) {}
+  ~LinkedHashSetSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LinkedHashSetPtr set = LinkedHashSet::RawCast(object);
+    // We never have mutable hashsets in snapshots.
+    ASSERT(set->untag()->IsCanonical());
+    ASSERT_EQUAL(set.GetClassId(), kImmutableLinkedHashSetCid);
+    objects_.Add(set);
+    PushFromTo(set);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LinkedHashSetPtr set = objects_[i];
+      s->AssignRef(set);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LinkedHashSetPtr set = objects_[i];
+      AutoTraceObject(set);
+      WriteFromTo(set);
+    }
+  }
+
+ private:
+  GrowableArray<LinkedHashSetPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LinkedHashSetDeserializationCluster
+    : public AbstractInstanceDeserializationCluster {
+ public:
+  explicit LinkedHashSetDeserializationCluster(bool is_canonical, intptr_t cid)
+      : AbstractInstanceDeserializationCluster("LinkedHashSet", is_canonical),
+        cid_(cid) {}
+  ~LinkedHashSetDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    ReadAllocFixedSize(d, LinkedHashSet::InstanceSize());
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LinkedHashSetPtr set = static_cast<LinkedHashSetPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(set, cid_, LinkedHashSet::InstanceSize(),
+                                     primary && is_canonical());
+      ReadFromTo(set);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class ArraySerializationCluster : public SerializationCluster {
+ public:
+  ArraySerializationCluster(bool is_canonical, intptr_t cid)
+      : SerializationCluster("Array", cid, kSizeVaries, is_canonical) {}
+  ~ArraySerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    ArrayPtr array = Array::RawCast(object);
+    objects_.Add(array);
+
+    s->Push(array->untag()->type_arguments());
+    const intptr_t length = Smi::Value(array->untag()->length());
+    for (intptr_t i = 0; i < length; i++) {
+      s->Push(array->untag()->element(i));
+    }
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      ArrayPtr array = objects_[i];
+      s->AssignRef(array);
+      AutoTraceObject(array);
+      const intptr_t length = Smi::Value(array->untag()->length());
+      s->WriteUnsigned(length);
+      target_memory_size_ += compiler::target::Array::InstanceSize(length);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      ArrayPtr array = objects_[i];
+      AutoTraceObject(array);
+      const intptr_t length = Smi::Value(array->untag()->length());
+      s->WriteUnsigned(length);
+      WriteCompressedField(array, type_arguments);
+      for (intptr_t j = 0; j < length; j++) {
+        s->WriteElementRef(array->untag()->element(j), j);
+      }
+    }
+  }
+
+ private:
+  GrowableArray<ArrayPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ArrayDeserializationCluster
+    : public AbstractInstanceDeserializationCluster {
+ public:
+  explicit ArrayDeserializationCluster(bool is_canonical, intptr_t cid)
+      : AbstractInstanceDeserializationCluster("Array", is_canonical),
+        cid_(cid) {}
+  ~ArrayDeserializationCluster() {}
+
+  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++) {
+      const intptr_t length = d->ReadUnsigned();
+      d->AssignRef(old_space->AllocateSnapshot(Array::InstanceSize(length)));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      ArrayPtr array = static_cast<ArrayPtr>(d->Ref(id));
+      const intptr_t length = d->ReadUnsigned();
+      Deserializer::InitializeHeader(array, cid_, Array::InstanceSize(length),
+                                     primary && is_canonical());
+      array->untag()->type_arguments_ =
+          static_cast<TypeArgumentsPtr>(d->ReadRef());
+      array->untag()->length_ = CompressedSmiPtr(Smi::New(length));
+      for (intptr_t j = 0; j < length; j++) {
+        array->untag()->data()[j] = d->ReadRef();
+      }
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class StringSerializationCluster
+    : public CanonicalSetSerializationCluster<CanonicalStringSet,
+                                              String,
+                                              StringPtr> {
+ public:
+  // To distinguish one and two byte strings, we put a bit in the length to
+  // indicate which it is. The length is an unsigned SMI, so we actually have
+  // two spare bits available. Keep in sync with DecodeLengthAndCid.
+  static intptr_t EncodeLengthAndCid(intptr_t length, intptr_t cid) {
+    ASSERT(cid == kOneByteStringCid || cid == kTwoByteStringCid);
+    ASSERT(length <= compiler::target::kSmiMax);
+    return (length << 1) | (cid == kTwoByteStringCid ? 0x1 : 0x0);
+  }
+
+  explicit StringSerializationCluster(bool is_canonical,
+                                      bool represents_canonical_set)
+      : CanonicalSetSerializationCluster(kStringCid,
+                                         is_canonical,
+                                         represents_canonical_set,
+                                         "String",
+                                         kSizeVaries) {}
+  ~StringSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    StringPtr str = static_cast<StringPtr>(object);
+    objects_.Add(str);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    ReorderObjects(s);
+    for (intptr_t i = 0; i < count; i++) {
+      StringPtr str = objects_[i];
+      s->AssignRef(str);
+      AutoTraceObject(str);
+      const intptr_t cid = str->GetClassId();
+      const intptr_t length = Smi::Value(str->untag()->length());
+      const intptr_t encoded = EncodeLengthAndCid(length, cid);
+      s->WriteUnsigned(encoded);
+      target_memory_size_ +=
+          cid == kOneByteStringCid
+              ? compiler::target::OneByteString::InstanceSize(length)
+              : compiler::target::TwoByteString::InstanceSize(length);
+    }
+    WriteCanonicalSetLayout(s);
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      StringPtr str = objects_[i];
+      AutoTraceObject(str);
+      const intptr_t cid = str->GetClassId();
+      const intptr_t length = Smi::Value(str->untag()->length());
+      const intptr_t encoded = EncodeLengthAndCid(length, cid);
+      s->WriteUnsigned(encoded);
+      if (cid == kOneByteStringCid) {
+        s->WriteBytes(static_cast<OneByteStringPtr>(str)->untag()->data(),
+                      length);
+      } else {
+        s->WriteBytes(reinterpret_cast<uint8_t*>(
+                          static_cast<TwoByteStringPtr>(str)->untag()->data()),
+                      length * 2);
+      }
+    }
+  }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class StringDeserializationCluster
+    : public CanonicalSetDeserializationCluster<CanonicalStringSet> {
+ public:
+  static intptr_t DecodeLengthAndCid(intptr_t encoded, intptr_t* out_cid) {
+    *out_cid = (encoded & 0x1) != 0 ? kTwoByteStringCid : kOneByteStringCid;
+    return encoded >> 1;
+  }
+
+  static intptr_t InstanceSize(intptr_t length, intptr_t cid) {
+    return cid == kOneByteStringCid ? OneByteString::InstanceSize(length)
+                                    : TwoByteString::InstanceSize(length);
+  }
+
+  explicit StringDeserializationCluster(bool is_canonical, bool is_root_unit)
+      : CanonicalSetDeserializationCluster(is_canonical,
+                                           is_root_unit,
+                                           "String") {}
+  ~StringDeserializationCluster() {}
+
+  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++) {
+      const intptr_t encoded = d->ReadUnsigned();
+      intptr_t cid = 0;
+      const intptr_t length = DecodeLengthAndCid(encoded, &cid);
+      d->AssignRef(old_space->AllocateSnapshot(InstanceSize(length, cid)));
+    }
+    stop_index_ = d->next_index();
+    BuildCanonicalSetFromLayout(d);
+  }
+
+  void ReadFill(Deserializer* d, bool primary) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      StringPtr str = static_cast<StringPtr>(d->Ref(id));
+      const intptr_t encoded = d->ReadUnsigned();
+      intptr_t cid = 0;
+      const intptr_t length = DecodeLengthAndCid(encoded, &cid);
+      Deserializer::InitializeHeader(str, cid, InstanceSize(length, cid),
+                                     primary && is_canonical());
+      str->untag()->length_ = Smi::New(length);
+      StringHasher hasher;
+      if (cid == kOneByteStringCid) {
+        for (intptr_t j = 0; j < length; j++) {
+          uint8_t code_unit = d->Read<uint8_t>();
+          static_cast<OneByteStringPtr>(str)->untag()->data()[j] = code_unit;
+          hasher.Add(code_unit);
+        }
+      } else {
+        for (intptr_t j = 0; j < length; j++) {
+          uint16_t code_unit = d->Read<uint8_t>();
+          code_unit = code_unit | (d->Read<uint8_t>() << 8);
+          static_cast<TwoByteStringPtr>(str)->untag()->data()[j] = code_unit;
+          hasher.Add(code_unit);
+        }
+      }
+      String::SetCachedHash(str, hasher.Finalize());
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
+    if (!table_.IsNull()) {
+      auto object_store = d->isolate_group()->object_store();
+      VerifyCanonicalSet(d, refs, Array::Handle(object_store->symbol_table()));
+      object_store->set_symbol_table(table_);
+      if (d->isolate_group() == Dart::vm_isolate_group()) {
+        Symbols::InitFromSnapshot(d->isolate_group());
+      }
+#if defined(DEBUG)
+      Symbols::New(Thread::Current(), ":some:new:symbol:");
+      ASSERT(object_store->symbol_table() == table_.ptr());  // Did not rehash.
+#endif
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class FakeSerializationCluster : public SerializationCluster {
+ public:
+  FakeSerializationCluster(const char* name,
+                           intptr_t num_objects,
+                           intptr_t size,
+                           intptr_t target_memory_size = 0)
+      : SerializationCluster(name, -1) {
+    num_objects_ = num_objects;
+    size_ = size;
+    target_memory_size_ = target_memory_size;
+  }
+  ~FakeSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) { UNREACHABLE(); }
+  void WriteAlloc(Serializer* s) { UNREACHABLE(); }
+  void WriteFill(Serializer* s) { UNREACHABLE(); }
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class VMSerializationRoots : public SerializationRoots {
+ public:
+  explicit VMSerializationRoots(const Array& symbols, bool should_write_symbols)
+      : symbols_(symbols),
+        should_write_symbols_(should_write_symbols),
+        zone_(Thread::Current()->zone()) {}
+
+  void AddBaseObjects(Serializer* s) {
+    // These objects are always allocated by Object::InitOnce, so they are not
+    // written into the snapshot.
+
+    s->AddBaseObject(Object::null(), "Null", "null");
+    s->AddBaseObject(Object::sentinel().ptr(), "Null", "sentinel");
+    s->AddBaseObject(Object::transition_sentinel().ptr(), "Null",
+                     "transition_sentinel");
+    s->AddBaseObject(Object::empty_array().ptr(), "Array", "<empty_array>");
+    s->AddBaseObject(Object::zero_array().ptr(), "Array", "<zero_array>");
+    s->AddBaseObject(Object::dynamic_type().ptr(), "Type", "<dynamic type>");
+    s->AddBaseObject(Object::void_type().ptr(), "Type", "<void type>");
+    s->AddBaseObject(Object::empty_type_arguments().ptr(), "TypeArguments",
+                     "[]");
+    s->AddBaseObject(Bool::True().ptr(), "bool", "true");
+    s->AddBaseObject(Bool::False().ptr(), "bool", "false");
+    ASSERT(Object::extractor_parameter_types().ptr() != Object::null());
+    s->AddBaseObject(Object::extractor_parameter_types().ptr(), "Array",
+                     "<extractor parameter types>");
+    ASSERT(Object::extractor_parameter_names().ptr() != Object::null());
+    s->AddBaseObject(Object::extractor_parameter_names().ptr(), "Array",
+                     "<extractor parameter names>");
+    s->AddBaseObject(Object::empty_context_scope().ptr(), "ContextScope",
+                     "<empty>");
+    s->AddBaseObject(Object::empty_object_pool().ptr(), "ObjectPool",
+                     "<empty>");
+    s->AddBaseObject(Object::empty_compressed_stackmaps().ptr(),
+                     "CompressedStackMaps", "<empty>");
+    s->AddBaseObject(Object::empty_descriptors().ptr(), "PcDescriptors",
+                     "<empty>");
+    s->AddBaseObject(Object::empty_var_descriptors().ptr(),
+                     "LocalVarDescriptors", "<empty>");
+    s->AddBaseObject(Object::empty_exception_handlers().ptr(),
+                     "ExceptionHandlers", "<empty>");
+
+    for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
+      s->AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i],
+                       "ArgumentsDescriptor", "<cached arguments descriptor>");
+    }
+    for (intptr_t i = 0; i < ICData::kCachedICDataArrayCount; i++) {
+      s->AddBaseObject(ICData::cached_icdata_arrays_[i], "Array",
+                       "<empty icdata entries>");
+    }
+    s->AddBaseObject(SubtypeTestCache::cached_array_, "Array",
+                     "<empty subtype entries>");
+
+    ClassTable* table = s->isolate_group()->class_table();
+    for (intptr_t cid = kFirstInternalOnlyCid; cid <= kLastInternalOnlyCid;
+         cid++) {
+      // Error, CallSiteData has no class object.
+      if (cid != kErrorCid && cid != kCallSiteDataCid) {
+        ASSERT(table->HasValidClassAt(cid));
+        s->AddBaseObject(
+            table->At(cid), "Class",
+            Class::Handle(table->At(cid))
+                .NameCString(Object::NameVisibility::kInternalName));
+      }
+    }
+    s->AddBaseObject(table->At(kDynamicCid), "Class", "dynamic");
+    s->AddBaseObject(table->At(kVoidCid), "Class", "void");
+
+    if (!Snapshot::IncludesCode(s->kind())) {
+      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+        s->AddBaseObject(StubCode::EntryAt(i).ptr(), "Code", "<stub code>");
+      }
+    }
+  }
+
+  void PushRoots(Serializer* s) {
+    if (should_write_symbols_) {
+      s->Push(symbols_.ptr());
+    } else {
+      for (intptr_t i = 0; i < symbols_.Length(); i++) {
+        s->Push(symbols_.At(i));
+      }
+    }
+    if (Snapshot::IncludesCode(s->kind())) {
+      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+        s->Push(StubCode::EntryAt(i).ptr());
+      }
+    }
+  }
+
+  void WriteRoots(Serializer* s) {
+    s->WriteRootRef(should_write_symbols_ ? symbols_.ptr() : Object::null(),
+                    "symbol-table");
+    if (Snapshot::IncludesCode(s->kind())) {
+      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+        s->WriteRootRef(StubCode::EntryAt(i).ptr(),
+                        zone_->PrintToString("Stub:%s", StubCode::NameAt(i)));
+      }
+    }
+
+    if (!should_write_symbols_ && s->profile_writer() != nullptr) {
+      // If writing V8 snapshot profile create an artifical node representing
+      // VM isolate symbol table.
+      ASSERT(!s->IsReachable(symbols_.ptr()));
+      s->AssignArtificialRef(symbols_.ptr());
+      const auto& symbols_snapshot_id = s->GetProfileId(symbols_.ptr());
+      s->profile_writer()->SetObjectTypeAndName(symbols_snapshot_id, "Symbols",
+                                                "vm_symbols");
+      s->profile_writer()->AddRoot(symbols_snapshot_id);
+      for (intptr_t i = 0; i < symbols_.Length(); i++) {
+        s->profile_writer()->AttributeReferenceTo(
+            symbols_snapshot_id, V8SnapshotProfileWriter::Reference::Element(i),
+            s->GetProfileId(symbols_.At(i)));
+      }
+    }
+  }
+
+ private:
+  const Array& symbols_;
+  const bool should_write_symbols_;
+  Zone* zone_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class VMDeserializationRoots : public DeserializationRoots {
+ public:
+  VMDeserializationRoots() : symbol_table_(Array::Handle()) {}
+
+  bool AddBaseObjects(Deserializer* d) {
+    // These objects are always allocated by Object::InitOnce, so they are not
+    // written into the snapshot.
+
+    d->AddBaseObject(Object::null());
+    d->AddBaseObject(Object::sentinel().ptr());
+    d->AddBaseObject(Object::transition_sentinel().ptr());
+    d->AddBaseObject(Object::empty_array().ptr());
+    d->AddBaseObject(Object::zero_array().ptr());
+    d->AddBaseObject(Object::dynamic_type().ptr());
+    d->AddBaseObject(Object::void_type().ptr());
+    d->AddBaseObject(Object::empty_type_arguments().ptr());
+    d->AddBaseObject(Bool::True().ptr());
+    d->AddBaseObject(Bool::False().ptr());
+    ASSERT(Object::extractor_parameter_types().ptr() != Object::null());
+    d->AddBaseObject(Object::extractor_parameter_types().ptr());
+    ASSERT(Object::extractor_parameter_names().ptr() != Object::null());
+    d->AddBaseObject(Object::extractor_parameter_names().ptr());
+    d->AddBaseObject(Object::empty_context_scope().ptr());
+    d->AddBaseObject(Object::empty_object_pool().ptr());
+    d->AddBaseObject(Object::empty_compressed_stackmaps().ptr());
+    d->AddBaseObject(Object::empty_descriptors().ptr());
+    d->AddBaseObject(Object::empty_var_descriptors().ptr());
+    d->AddBaseObject(Object::empty_exception_handlers().ptr());
+
+    for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
+      d->AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
+    }
+    for (intptr_t i = 0; i < ICData::kCachedICDataArrayCount; i++) {
+      d->AddBaseObject(ICData::cached_icdata_arrays_[i]);
+    }
+    d->AddBaseObject(SubtypeTestCache::cached_array_);
+
+    ClassTable* table = d->isolate_group()->class_table();
+    for (intptr_t cid = kFirstInternalOnlyCid; cid <= kLastInternalOnlyCid;
+         cid++) {
+      // Error, CallSiteData has no class object.
+      if (cid != kErrorCid && cid != kCallSiteDataCid) {
+        ASSERT(table->HasValidClassAt(cid));
+        d->AddBaseObject(table->At(cid));
+      }
+    }
+    d->AddBaseObject(table->At(kDynamicCid));
+    d->AddBaseObject(table->At(kVoidCid));
+
+    if (!Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+        d->AddBaseObject(StubCode::EntryAt(i).ptr());
+      }
+    }
+
+    return true;  // primary
+  }
+
+  void ReadRoots(Deserializer* d) {
+    symbol_table_ ^= d->ReadRef();
+    if (!symbol_table_.IsNull()) {
+      d->isolate_group()->object_store()->set_symbol_table(symbol_table_);
+    }
+    if (Snapshot::IncludesCode(d->kind())) {
+      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+        Code* code = Code::ReadOnlyHandle();
+        *code ^= d->ReadRef();
+        StubCode::EntryAtPut(i, code);
+      }
+      StubCode::InitializationDone();
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs) {
+    // Move remaining bump allocation space to the freelist so it used by C++
+    // allocations (e.g., FinalizeVMIsolate) before allocating new pages.
+    d->heap()->old_space()->AbandonBumpAllocation();
+
+    if (!symbol_table_.IsNull()) {
+      Symbols::InitFromSnapshot(d->isolate_group());
+    }
+
+    Object::set_vm_isolate_snapshot_object_table(refs);
+  }
+
+ private:
+  Array& symbol_table_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+static const char* const 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,
+                            DECLARE_OBJECT_STORE_FIELD,
+                            DECLARE_OBJECT_STORE_FIELD,
+                            DECLARE_OBJECT_STORE_FIELD,
+                            DECLARE_OBJECT_STORE_FIELD)
+#undef DECLARE_OBJECT_STORE_FIELD
+};
+
+class ProgramSerializationRoots : public SerializationRoots {
+ public:
+  ProgramSerializationRoots(ZoneGrowableArray<Object*>* base_objects,
+                            ObjectStore* object_store,
+                            Snapshot::Kind snapshot_kind)
+      : base_objects_(base_objects),
+        object_store_(object_store),
+        dispatch_table_entries_(Array::Handle()),
+        saved_symbol_table_(Array::Handle()),
+        saved_canonical_types_(Array::Handle()),
+        saved_canonical_function_types_(Array::Handle()),
+        saved_canonical_type_arguments_(Array::Handle()),
+        saved_canonical_type_parameters_(Array::Handle()) {
+    saved_symbol_table_ = object_store->symbol_table();
+    object_store->set_symbol_table(
+        Array::Handle(HashTables::New<CanonicalStringSet>(4)));
+    saved_canonical_types_ = object_store->canonical_types();
+    object_store->set_canonical_types(
+        Array::Handle(HashTables::New<CanonicalTypeSet>(4)));
+    saved_canonical_function_types_ = object_store->canonical_function_types();
+    object_store->set_canonical_function_types(
+        Array::Handle(HashTables::New<CanonicalFunctionTypeSet>(4)));
+    saved_canonical_type_arguments_ = object_store->canonical_type_arguments();
+    object_store->set_canonical_type_arguments(
+        Array::Handle(HashTables::New<CanonicalTypeArgumentsSet>(4)));
+    saved_canonical_type_parameters_ =
+        object_store->canonical_type_parameters();
+    object_store->set_canonical_type_parameters(
+        Array::Handle(HashTables::New<CanonicalTypeParameterSet>(4)));
+  }
+  ~ProgramSerializationRoots() {
+    object_store_->set_symbol_table(saved_symbol_table_);
+    object_store_->set_canonical_types(saved_canonical_types_);
+    object_store_->set_canonical_function_types(
+        saved_canonical_function_types_);
+    object_store_->set_canonical_type_arguments(
+        saved_canonical_type_arguments_);
+    object_store_->set_canonical_type_parameters(
+        saved_canonical_type_parameters_);
+  }
+
+  void AddBaseObjects(Serializer* s) {
+    if (base_objects_ == nullptr) {
+      // Not writing a new vm isolate: use the one this VM was loaded from.
+      const Array& base_objects = Object::vm_isolate_snapshot_object_table();
+      for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
+        s->AddBaseObject(base_objects.At(i));
+      }
+    } else {
+      // Base objects carried over from WriteVMSnapshot.
+      for (intptr_t i = 0; i < base_objects_->length(); i++) {
+        s->AddBaseObject((*base_objects_)[i]->ptr());
+      }
+    }
+  }
+
+  void PushRoots(Serializer* s) {
+    ObjectPtr* from = object_store_->from();
+    ObjectPtr* to = object_store_->to_snapshot(s->kind());
+    for (ObjectPtr* p = from; p <= to; p++) {
+      s->Push(*p);
+    }
+
+    dispatch_table_entries_ = object_store_->dispatch_table_code_entries();
+    // We should only have a dispatch table in precompiled mode.
+    ASSERT(dispatch_table_entries_.IsNull() || s->kind() == Snapshot::kFullAOT);
+
+#if defined(DART_PRECOMPILER)
+    // We treat the dispatch table as a root object and trace the Code objects
+    // it references. Otherwise, a non-empty entry could be invalid on
+    // deserialization if the corresponding Code object was not reachable from
+    // the existing snapshot roots.
+    if (!dispatch_table_entries_.IsNull()) {
+      for (intptr_t i = 0; i < dispatch_table_entries_.Length(); i++) {
+        s->Push(dispatch_table_entries_.At(i));
+      }
+    }
+#endif
+  }
+
+  void WriteRoots(Serializer* s) {
+    ObjectPtr* from = object_store_->from();
+    ObjectPtr* to = object_store_->to_snapshot(s->kind());
+    for (ObjectPtr* p = from; p <= to; p++) {
+      s->WriteRootRef(*p, kObjectStoreFieldNames[p - from]);
+    }
+
+    // The dispatch table is serialized only for precompiled snapshots.
+    s->WriteDispatchTable(dispatch_table_entries_);
+  }
+
+ private:
+  ZoneGrowableArray<Object*>* base_objects_;
+  ObjectStore* object_store_;
+  Array& dispatch_table_entries_;
+  Array& saved_symbol_table_;
+  Array& saved_canonical_types_;
+  Array& saved_canonical_function_types_;
+  Array& saved_canonical_type_arguments_;
+  Array& saved_canonical_type_parameters_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class ProgramDeserializationRoots : public DeserializationRoots {
+ public:
+  explicit ProgramDeserializationRoots(ObjectStore* object_store)
+      : object_store_(object_store) {}
+
+  bool AddBaseObjects(Deserializer* d) {
+    // N.B.: Skipping index 0 because ref 0 is illegal.
+    const Array& base_objects = Object::vm_isolate_snapshot_object_table();
+    for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
+      d->AddBaseObject(base_objects.At(i));
+    }
+    return true;  // primary
+  }
+
+  void ReadRoots(Deserializer* d) {
+    // Read roots.
+    ObjectPtr* from = object_store_->from();
+    ObjectPtr* to = object_store_->to_snapshot(d->kind());
+    for (ObjectPtr* p = from; p <= to; p++) {
+      *p = d->ReadRef();
+    }
+
+    // Deserialize dispatch table (when applicable)
+    d->ReadDispatchTable();
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs) {
+    auto isolate_group = d->isolate_group();
+    {
+      SafepointWriteRwLocker ml(d->thread(), isolate_group->program_lock());
+      isolate_group->class_table()->CopySizesFromClassObjects();
+    }
+    d->heap()->old_space()->EvaluateAfterLoading();
+
+    const Array& units =
+        Array::Handle(isolate_group->object_store()->loading_units());
+    if (!units.IsNull()) {
+      LoadingUnit& unit = LoadingUnit::Handle();
+      unit ^= units.At(LoadingUnit::kRootId);
+      unit.set_base_objects(refs);
+    }
+
+    // Setup native resolver for bootstrap impl.
+    Bootstrap::SetupNativeResolver();
+  }
+
+ private:
+  ObjectStore* object_store_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+class UnitSerializationRoots : public SerializationRoots {
+ public:
+  explicit UnitSerializationRoots(LoadingUnitSerializationData* unit)
+      : unit_(unit) {}
+
+  void AddBaseObjects(Serializer* s) {
+    ZoneGrowableArray<Object*>* objects = unit_->parent()->objects();
+    for (intptr_t i = 0; i < objects->length(); i++) {
+      s->AddBaseObject(objects->At(i)->ptr());
+    }
+  }
+
+  void PushRoots(Serializer* s) {
+    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->ptr());
+      if (FLAG_use_bare_instructions) {
+        ObjectPoolPtr pool = code->untag()->object_pool_;
+        if (pool != ObjectPool::null()) {
+          const intptr_t length = pool->untag()->length_;
+          uint8_t* entry_bits = pool->untag()->entry_bits();
+          for (intptr_t i = 0; i < length; i++) {
+            auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+            if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+              s->Push(pool->untag()->data()[i].raw_obj_);
+            }
+          }
+        }
+      } else {
+        s->Push(code->untag()->object_pool_);
+      }
+      s->Push(code->untag()->compressed_stackmaps_);
+      s->Push(code->untag()->code_source_map_);
+    }
+  }
+
+  void WriteRoots(Serializer* s) {
+#if defined(DART_PRECOMPILER)
+    intptr_t start_index = 0;
+    intptr_t num_deferred_objects = unit_->deferred_objects()->length();
+    if (num_deferred_objects != 0) {
+      start_index = s->RefId(unit_->deferred_objects()->At(0)->ptr());
+      ASSERT(start_index > 0);
+    }
+    s->WriteUnsigned(start_index);
+    s->WriteUnsigned(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->ptr());
+      ASSERT(s->RefId(code) == (start_index + i));
+      ASSERT(!Code::IsDiscarded(code));
+      s->WriteInstructions(code->untag()->instructions_,
+                           code->untag()->unchecked_offset_, code, false);
+      if (!FLAG_use_bare_instructions) {
+        s->WriteRootRef(code->untag()->object_pool_, "deferred-code");
+      }
+      s->WriteRootRef(code->untag()->compressed_stackmaps_, "deferred-code");
+      s->WriteRootRef(code->untag()->code_source_map_, "deferred-code");
+    }
+
+    if (FLAG_use_bare_instructions) {
+      ObjectPoolPtr pool =
+          s->isolate_group()->object_store()->global_object_pool();
+      const intptr_t length = pool->untag()->length_;
+      uint8_t* entry_bits = pool->untag()->entry_bits();
+      intptr_t last_write = 0;
+      for (intptr_t i = 0; i < length; i++) {
+        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+        if (entry_type == ObjectPool::EntryType::kTaggedObject) {
+          if (s->IsWritten(pool->untag()->data()[i].raw_obj_)) {
+            intptr_t skip = i - last_write;
+            s->WriteUnsigned(skip);
+            s->WriteRootRef(pool->untag()->data()[i].raw_obj_,
+                            "deferred-literal");
+            last_write = i;
+          }
+        }
+      }
+      s->WriteUnsigned(length - last_write);
+    }
+#endif
+  }
+
+ private:
+  LoadingUnitSerializationData* unit_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class UnitDeserializationRoots : public DeserializationRoots {
+ public:
+  explicit UnitDeserializationRoots(const LoadingUnit& unit) : unit_(unit) {}
+
+  bool AddBaseObjects(Deserializer* d) {
+    const Array& base_objects =
+        Array::Handle(LoadingUnit::Handle(unit_.parent()).base_objects());
+    for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
+      d->AddBaseObject(base_objects.At(i));
+    }
+    return false;  // primary
+  }
+
+  void ReadRoots(Deserializer* d) {
+    deferred_start_index_ = d->ReadUnsigned();
+    deferred_stop_index_ = deferred_start_index_ + d->ReadUnsigned();
+    for (intptr_t id = deferred_start_index_; id < deferred_stop_index_; id++) {
+      CodePtr code = static_cast<CodePtr>(d->Ref(id));
+      ASSERT(!Code::IsUnknownDartCode(code));
+      d->ReadInstructions(code, /*deferred=*/false, /*discarded=*/false);
+      if (code->untag()->owner_->IsHeapObject() &&
+          code->untag()->owner_->IsFunction()) {
+        FunctionPtr func = static_cast<FunctionPtr>(code->untag()->owner_);
+        uword entry_point = code->untag()->entry_point_;
+        ASSERT(entry_point != 0);
+        func->untag()->entry_point_ = entry_point;
+        uword unchecked_entry_point = code->untag()->unchecked_entry_point_;
+        ASSERT(unchecked_entry_point != 0);
+        func->untag()->unchecked_entry_point_ = unchecked_entry_point;
+#if defined(DART_PRECOMPILED_RUNTIME)
+        if (FLAG_use_bare_instructions &&
+            func->untag()->data()->IsHeapObject() &&
+            func->untag()->data()->IsClosureData()) {
+          // For closure functions in bare instructions mode, also update the
+          // cache inside the static implicit closure object, if any.
+          auto data = static_cast<ClosureDataPtr>(func->untag()->data());
+          if (data->untag()->closure() != Closure::null()) {
+            // Closure functions only have one entry point.
+            ASSERT_EQUAL(entry_point, unchecked_entry_point);
+            data->untag()->closure()->untag()->entry_point_ = entry_point;
+          }
+        }
+#endif
+      }
+      if (!FLAG_use_bare_instructions) {
+        code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
+      }
+      code->untag()->compressed_stackmaps_ =
+          static_cast<CompressedStackMapsPtr>(d->ReadRef());
+      code->untag()->code_source_map_ =
+          static_cast<CodeSourceMapPtr>(d->ReadRef());
+    }
+
+    if (FLAG_use_bare_instructions) {
+      ObjectPoolPtr pool =
+          d->isolate_group()->object_store()->global_object_pool();
+      const intptr_t length = pool->untag()->length_;
+      uint8_t* entry_bits = pool->untag()->entry_bits();
+      for (intptr_t i = d->ReadUnsigned(); i < length; i += d->ReadUnsigned()) {
+        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
+        ASSERT(entry_type == ObjectPool::EntryType::kTaggedObject);
+        // The existing entry will usually be null, but it might also be an
+        // equivalent object that was duplicated in another loading unit.
+        pool->untag()->data()[i].raw_obj_ = d->ReadRef();
+      }
+    }
+
+    // Reinitialize the dispatch table by rereading the table's serialization
+    // in the root snapshot.
+    auto isolate_group = d->isolate_group();
+    if (isolate_group->dispatch_table_snapshot() != nullptr) {
+      ReadStream stream(isolate_group->dispatch_table_snapshot(),
+                        isolate_group->dispatch_table_snapshot_size());
+      d->ReadDispatchTable(&stream, /*deferred=*/true, deferred_start_index_,
+                           deferred_stop_index_);
+    }
+  }
+
+  void PostLoad(Deserializer* d, const Array& refs) {
+    d->EndInstructions();
+    unit_.set_base_objects(refs);
+  }
+
+ private:
+  const LoadingUnit& unit_;
+  intptr_t deferred_start_index_;
+  intptr_t deferred_stop_index_;
+};
+
+#if defined(DEBUG)
+static const int32_t kSectionMarker = 0xABAB;
+#endif
+
+Serializer::Serializer(Thread* thread,
+                       Snapshot::Kind kind,
+                       NonStreamingWriteStream* stream,
+                       ImageWriter* image_writer,
+                       bool vm,
+                       V8SnapshotProfileWriter* profile_writer)
+    : ThreadStackResource(thread),
+      heap_(thread->isolate_group()->heap()),
+      zone_(thread->zone()),
+      kind_(kind),
+      stream_(stream),
+      image_writer_(image_writer),
+      canonical_clusters_by_cid_(nullptr),
+      clusters_by_cid_(nullptr),
+      stack_(),
+      num_cids_(0),
+      num_tlc_cids_(0),
+      num_base_objects_(0),
+      num_written_objects_(0),
+      next_ref_index_(kFirstReference),
+      previous_text_offset_(0),
+      initial_field_table_(thread->isolate_group()->initial_field_table()),
+      vm_(vm),
+      profile_writer_(profile_writer)
+#if defined(SNAPSHOT_BACKTRACE)
+      ,
+      current_parent_(Object::null()),
+      parent_pairs_()
+#endif
+#if defined(DART_PRECOMPILER)
+      ,
+      deduped_instructions_sources_(zone_)
+#endif
+{
+  num_cids_ = thread->isolate_group()->class_table()->NumCids();
+  num_tlc_cids_ = thread->isolate_group()->class_table()->NumTopLevelCids();
+  canonical_clusters_by_cid_ = new SerializationCluster*[num_cids_];
+  for (intptr_t i = 0; i < num_cids_; i++) {
+    canonical_clusters_by_cid_[i] = nullptr;
+  }
+  clusters_by_cid_ = new SerializationCluster*[num_cids_];
+  for (intptr_t i = 0; i < num_cids_; i++) {
+    clusters_by_cid_[i] = nullptr;
+  }
+  if (profile_writer_ != nullptr) {
+    offsets_table_ = new (zone_) OffsetsTable(zone_);
+  }
+}
+
+Serializer::~Serializer() {
+  delete[] canonical_clusters_by_cid_;
+  delete[] clusters_by_cid_;
+}
+
+void Serializer::AddBaseObject(ObjectPtr base_object,
+                               const char* type,
+                               const char* name) {
+  AssignRef(base_object);
+  num_base_objects_++;
+
+  if ((profile_writer_ != nullptr) && (type != nullptr)) {
+    const auto& profile_id = GetProfileId(base_object);
+    profile_writer_->SetObjectTypeAndName(profile_id, type, name);
+    profile_writer_->AddRoot(profile_id);
+  }
+}
+
+intptr_t Serializer::AssignRef(ObjectPtr object) {
+  ASSERT(IsAllocatedReference(next_ref_index_));
+
+  // The object id weak table holds image offsets for Instructions instead
+  // of ref indices.
+  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
+  heap_->SetObjectId(object, next_ref_index_);
+  ASSERT(heap_->GetObjectId(object) == next_ref_index_);
+
+  objects_->Add(&Object::ZoneHandle(object));
+
+  return next_ref_index_++;
+}
+
+intptr_t Serializer::AssignArtificialRef(ObjectPtr object) {
+  const intptr_t ref = -(next_ref_index_++);
+  ASSERT(IsArtificialReference(ref));
+  if (object != nullptr) {
+    ASSERT(!object.IsHeapObject() || !object.IsInstructions());
+    ASSERT(heap_->GetObjectId(object) == kUnreachableReference);
+    heap_->SetObjectId(object, ref);
+    ASSERT(heap_->GetObjectId(object) == ref);
+  }
+  return ref;
+}
+
+void Serializer::FlushProfile() {
+  if (profile_writer_ == nullptr) return;
+  const intptr_t bytes =
+      stream_->Position() - object_currently_writing_.last_stream_position_;
+  profile_writer_->AttributeBytesTo(object_currently_writing_.id_, bytes);
+  object_currently_writing_.last_stream_position_ = stream_->Position();
+}
+
+V8SnapshotProfileWriter::ObjectId Serializer::GetProfileId(
+    ObjectPtr object) const {
+  // Instructions are handled separately.
+  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
+  return GetProfileId(UnsafeRefId(object));
+}
+
+V8SnapshotProfileWriter::ObjectId Serializer::GetProfileId(
+    intptr_t heap_id) const {
+  if (IsArtificialReference(heap_id)) {
+    return {IdSpace::kArtificial, -heap_id};
+  }
+  ASSERT(IsAllocatedReference(heap_id));
+  return {IdSpace::kSnapshot, heap_id};
+}
+
+void Serializer::AttributeReference(
+    ObjectPtr object,
+    const V8SnapshotProfileWriter::Reference& reference) {
+  if (profile_writer_ == nullptr) return;
+  const auto& object_id = GetProfileId(object);
+#if defined(DART_PRECOMPILER)
+  if (object->IsHeapObject() && object->IsWeakSerializationReference()) {
+    auto const wsr = WeakSerializationReference::RawCast(object);
+    auto const target = wsr->untag()->target();
+    const auto& target_id = GetProfileId(target);
+    if (object_id != target_id) {
+      const auto& replacement_id = GetProfileId(wsr->untag()->replacement());
+      ASSERT(object_id == replacement_id);
+      // The target of the WSR will be replaced in the snapshot, so write
+      // attributions for both the dropped target and for the replacement.
+      profile_writer_->AttributeDroppedReferenceTo(
+          object_currently_writing_.id_, reference, target_id, replacement_id);
+      return;
+    }
+    // The replacement isn't used for this WSR in the snapshot, as either the
+    // target is strongly referenced or the WSR itself is unreachable, so fall
+    // through to attributing a reference to the WSR (which shares the profile
+    // ID of the target).
+  }
+#endif
+  profile_writer_->AttributeReferenceTo(object_currently_writing_.id_,
+                                        reference, object_id);
+}
+
+Serializer::WritingObjectScope::WritingObjectScope(
+    Serializer* serializer,
+    const V8SnapshotProfileWriter::ObjectId& id,
+    ObjectPtr object)
+    : serializer_(serializer),
+      old_object_(serializer->object_currently_writing_.object_),
+      old_id_(serializer->object_currently_writing_.id_),
+      old_cid_(serializer->object_currently_writing_.cid_) {
+  if (serializer_->profile_writer_ == nullptr) return;
+  // The ID should correspond to one already added appropriately to the
+  // profile writer.
+  ASSERT(serializer_->profile_writer_->HasId(id));
+  serializer_->FlushProfile();
+  serializer_->object_currently_writing_.object_ = object;
+  serializer_->object_currently_writing_.id_ = id;
+  serializer_->object_currently_writing_.cid_ =
+      object == nullptr ? -1 : object->GetClassIdMayBeSmi();
+}
+
+Serializer::WritingObjectScope::~WritingObjectScope() {
+  if (serializer_->profile_writer_ == nullptr) return;
+  serializer_->FlushProfile();
+  serializer_->object_currently_writing_.object_ = old_object_;
+  serializer_->object_currently_writing_.id_ = old_id_;
+  serializer_->object_currently_writing_.cid_ = old_cid_;
+}
+
+V8SnapshotProfileWriter::ObjectId Serializer::WritingObjectScope::ReserveId(
+    Serializer* s,
+    const char* type,
+    ObjectPtr obj,
+    const char* name) {
+  if (s->profile_writer_ == nullptr) {
+    return V8SnapshotProfileWriter::kArtificialRootId;
+  }
+  if (name == nullptr) {
+    // Handle some cases where there are obvious names to assign.
+    switch (obj->GetClassIdMayBeSmi()) {
+      case kSmiCid: {
+        name = OS::SCreate(s->zone(), "%" Pd "", Smi::Value(Smi::RawCast(obj)));
+        break;
+      }
+      case kMintCid: {
+        name = OS::SCreate(s->zone(), "%" Pd64 "",
+                           Mint::RawCast(obj)->untag()->value_);
+        break;
+      }
+      case kOneByteStringCid:
+      case kTwoByteStringCid: {
+        name = String::ToCString(s->thread(), String::RawCast(obj));
+        break;
+      }
+    }
+  }
+  const auto& obj_id = s->GetProfileId(obj);
+  s->profile_writer_->SetObjectTypeAndName(obj_id, type, name);
+  return obj_id;
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+bool Serializer::CreateArtificialNodeIfNeeded(ObjectPtr obj) {
+  ASSERT(profile_writer() != nullptr);
+
+  // UnsafeRefId will do lazy reference allocation for WSRs.
+  intptr_t id = UnsafeRefId(obj);
+  ASSERT(id != kUnallocatedReference);
+  if (id != kUnreachableReference) {
+    return IsArtificialReference(id);
+  }
+  if (obj->IsHeapObject() && obj->IsWeakSerializationReference()) {
+    auto const target =
+        WeakSerializationReference::RawCast(obj)->untag()->target();
+    CreateArtificialNodeIfNeeded(target);
+    // Since the WSR is unreachable, we can replace its id with whatever the
+    // ID of the target is, whether real or artificial.
+    id = heap_->GetObjectId(target);
+    heap_->SetObjectId(obj, id);
+    return IsArtificialReference(id);
+  }
+
+  const char* type = nullptr;
+  const char* name = nullptr;
+  GrowableArray<std::pair<ObjectPtr, V8SnapshotProfileWriter::Reference>> links;
+  const classid_t cid = obj->GetClassIdMayBeSmi();
+  switch (cid) {
+    // For profiling static call target tables in AOT mode.
+    case kSmiCid: {
+      type = "Smi";
+      break;
+    }
+    // For profiling per-code object pools in bare instructions mode.
+    case kObjectPoolCid: {
+      type = "ObjectPool";
+      auto const pool = ObjectPool::RawCast(obj);
+      for (intptr_t i = 0; i < pool->untag()->length_; i++) {
+        uint8_t bits = pool->untag()->entry_bits()[i];
+        if (ObjectPool::TypeBits::decode(bits) ==
+            ObjectPool::EntryType::kTaggedObject) {
+          auto const elem = pool->untag()->data()[i].raw_obj_;
+          // Elements should be reachable from the global object pool.
+          ASSERT(HasRef(elem));
+          links.Add({elem, V8SnapshotProfileWriter::Reference::Element(i)});
+        }
+      }
+      break;
+    }
+    // For profiling static call target tables and the dispatch table in AOT.
+    case kImmutableArrayCid:
+    case kArrayCid: {
+      type = "Array";
+      auto const array = Array::RawCast(obj);
+      for (intptr_t i = 0, n = Smi::Value(array->untag()->length()); i < n;
+           i++) {
+        ObjectPtr elem = array->untag()->element(i);
+        links.Add({elem, V8SnapshotProfileWriter::Reference::Element(i)});
+      }
+      break;
+    }
+    // For profiling the dispatch table.
+    case kCodeCid: {
+      type = "Code";
+      auto const code = Code::RawCast(obj);
+      name = CodeSerializationCluster::MakeDisambiguatedCodeName(this, code);
+      links.Add({code->untag()->owner(),
+                 V8SnapshotProfileWriter::Reference::Property("owner_")});
+      break;
+    }
+    case kFunctionCid: {
+      FunctionPtr func = static_cast<FunctionPtr>(obj);
+      type = "Function";
+      name = FunctionSerializationCluster::MakeDisambiguatedFunctionName(this,
+                                                                         func);
+      links.Add({func->untag()->owner(),
+                 V8SnapshotProfileWriter::Reference::Property("owner_")});
+      ObjectPtr data = func->untag()->data();
+      if (data->GetClassId() == kClosureDataCid) {
+        links.Add(
+            {data, V8SnapshotProfileWriter::Reference::Property("data_")});
+      }
+      break;
+    }
+    case kClosureDataCid: {
+      auto data = static_cast<ClosureDataPtr>(obj);
+      type = "ClosureData";
+      links.Add(
+          {data->untag()->parent_function(),
+           V8SnapshotProfileWriter::Reference::Property("parent_function_")});
+      break;
+    }
+    case kClassCid: {
+      ClassPtr cls = static_cast<ClassPtr>(obj);
+      type = "Class";
+      name = String::ToCString(thread(), cls->untag()->name());
+      links.Add({cls->untag()->library(),
+                 V8SnapshotProfileWriter::Reference::Property("library_")});
+      break;
+    }
+    case kPatchClassCid: {
+      PatchClassPtr patch_cls = static_cast<PatchClassPtr>(obj);
+      type = "PatchClass";
+      links.Add(
+          {patch_cls->untag()->patched_class(),
+           V8SnapshotProfileWriter::Reference::Property("patched_class_")});
+      break;
+    }
+    case kLibraryCid: {
+      LibraryPtr lib = static_cast<LibraryPtr>(obj);
+      type = "Library";
+      name = String::ToCString(thread(), lib->untag()->url());
+      break;
+    }
+    case kFunctionTypeCid: {
+      type = "FunctionType";
+      break;
+    };
+    default:
+      FATAL("Request to create artificial node for object with cid %d", cid);
+  }
+
+  id = AssignArtificialRef(obj);
+  Serializer::WritingObjectScope scope(this, type, obj, name);
+  for (const auto& link : links) {
+    CreateArtificialNodeIfNeeded(link.first);
+    AttributeReference(link.first, link.second);
+  }
+  return true;
+}
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+intptr_t Serializer::RefId(ObjectPtr object) const {
+  auto const id = UnsafeRefId(object);
+  if (IsAllocatedReference(id)) {
+    return id;
+  }
+  ASSERT(id == kUnreachableReference || IsArtificialReference(id));
+  REUSABLE_OBJECT_HANDLESCOPE(thread());
+  auto& handle = thread()->ObjectHandle();
+  handle = object;
+  FATAL("Reference to unreachable object %s", handle.ToCString());
+}
+
+intptr_t Serializer::UnsafeRefId(ObjectPtr object) const {
+  // The object id weak table holds image offsets for Instructions instead
+  // of ref indices.
+  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
+  if (!Snapshot::IncludesCode(kind_) &&
+      object->GetClassIdMayBeSmi() == kCodeCid) {
+    return RefId(Object::null());
+  }
+  auto id = heap_->GetObjectId(object);
+  if (id != kUnallocatedReference) {
+    return id;
+  }
+  // This is the only case where we may still see unallocated references after
+  // WriteAlloc is finished.
+  if (object->IsWeakSerializationReference()) {
+    // Lazily set the object ID of the WSR to the object which will replace
+    // it in the snapshot.
+    auto const wsr = static_cast<WeakSerializationReferencePtr>(object);
+    // Either the target or the replacement must be allocated, since the
+    // WSR is reachable.
+    id = HasRef(wsr->untag()->target()) ? RefId(wsr->untag()->target())
+                                        : RefId(wsr->untag()->replacement());
+    heap_->SetObjectId(wsr, id);
+    return id;
+  }
+  REUSABLE_OBJECT_HANDLESCOPE(thread());
+  auto& handle = thread()->ObjectHandle();
+  handle = object;
+  FATAL("Reference for object %s is unallocated", handle.ToCString());
+}
+
+const char* Serializer::ReadOnlyObjectType(intptr_t cid) {
+  switch (cid) {
+    case kPcDescriptorsCid:
+      return "PcDescriptors";
+    case kCodeSourceMapCid:
+      return "CodeSourceMap";
+    case kCompressedStackMapsCid:
+      return "CompressedStackMaps";
+    case kStringCid:
+      return current_loading_unit_id_ <= LoadingUnit::kRootId
+                 ? "CanonicalString"
+                 : nullptr;
+    case kOneByteStringCid:
+      return current_loading_unit_id_ <= LoadingUnit::kRootId
+                 ? "OneByteStringCid"
+                 : nullptr;
+    case kTwoByteStringCid:
+      return current_loading_unit_id_ <= LoadingUnit::kRootId
+                 ? "TwoByteStringCid"
+                 : nullptr;
+    default:
+      return nullptr;
+  }
+}
+
+SerializationCluster* Serializer::NewClusterForClass(intptr_t cid,
+                                                     bool is_canonical) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+  return NULL;
+#else
+  Zone* Z = zone_;
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
+    Push(isolate_group()->class_table()->At(cid));
+    return new (Z) InstanceSerializationCluster(is_canonical, cid);
+  }
+  if (IsTypedDataViewClassId(cid)) {
+    return new (Z) TypedDataViewSerializationCluster(cid);
+  }
+  if (IsExternalTypedDataClassId(cid)) {
+    return new (Z) ExternalTypedDataSerializationCluster(cid);
+  }
+  if (IsTypedDataClassId(cid)) {
+    return new (Z) TypedDataSerializationCluster(cid);
+  }
+
+#if !defined(DART_COMPRESSED_POINTERS)
+  // Sometimes we write memory images for read-only objects that contain no
+  // pointers. These can be mmapped directly, needing no relocation, and added
+  // to the list of heap pages. This gives us lazy/demand paging from the OS.
+  // We do not do this for snapshots without code to keep snapshots portable
+  // between machines with different word sizes. We do not do this when we use
+  // compressed pointers because we cannot always control the load address of
+  // the memory image, and it might be outside the 4GB region addressable by
+  // compressed pointers.
+  if (Snapshot::IncludesCode(kind_)) {
+    if (auto const type = ReadOnlyObjectType(cid)) {
+      return new (Z) RODataSerializationCluster(Z, type, cid, is_canonical);
+    }
+  }
+#endif
+
+  const bool cluster_represents_canonical_set =
+      current_loading_unit_id_ <= LoadingUnit::kRootId && is_canonical;
+
+  switch (cid) {
+    case kClassCid:
+      return new (Z) ClassSerializationCluster(num_cids_ + num_tlc_cids_);
+    case kTypeParametersCid:
+      return new (Z) TypeParametersSerializationCluster();
+    case kTypeArgumentsCid:
+      return new (Z) TypeArgumentsSerializationCluster(
+          is_canonical, cluster_represents_canonical_set);
+    case kPatchClassCid:
+      return new (Z) PatchClassSerializationCluster();
+    case kFunctionCid:
+      return new (Z) FunctionSerializationCluster();
+    case kClosureDataCid:
+      return new (Z) ClosureDataSerializationCluster();
+    case kFfiTrampolineDataCid:
+      return new (Z) FfiTrampolineDataSerializationCluster();
+    case kFieldCid:
+      return new (Z) FieldSerializationCluster();
+    case kScriptCid:
+      return new (Z) ScriptSerializationCluster();
+    case kLibraryCid:
+      return new (Z) LibrarySerializationCluster();
+    case kNamespaceCid:
+      return new (Z) NamespaceSerializationCluster();
+    case kKernelProgramInfoCid:
+      return new (Z) KernelProgramInfoSerializationCluster();
+    case kCodeCid:
+      return new (Z) CodeSerializationCluster(heap_);
+    case kObjectPoolCid:
+      return new (Z) ObjectPoolSerializationCluster();
+    case kPcDescriptorsCid:
+      return new (Z) PcDescriptorsSerializationCluster();
+    case kCodeSourceMapCid:
+      return new (Z) CodeSourceMapSerializationCluster();
+    case kCompressedStackMapsCid:
+      return new (Z) CompressedStackMapsSerializationCluster();
+    case kExceptionHandlersCid:
+      return new (Z) ExceptionHandlersSerializationCluster();
+    case kContextCid:
+      return new (Z) ContextSerializationCluster();
+    case kContextScopeCid:
+      return new (Z) ContextScopeSerializationCluster();
+    case kUnlinkedCallCid:
+      return new (Z) UnlinkedCallSerializationCluster();
+    case kICDataCid:
+      return new (Z) ICDataSerializationCluster();
+    case kMegamorphicCacheCid:
+      return new (Z) MegamorphicCacheSerializationCluster();
+    case kSubtypeTestCacheCid:
+      return new (Z) SubtypeTestCacheSerializationCluster();
+    case kLoadingUnitCid:
+      return new (Z) LoadingUnitSerializationCluster();
+    case kLanguageErrorCid:
+      return new (Z) LanguageErrorSerializationCluster();
+    case kUnhandledExceptionCid:
+      return new (Z) UnhandledExceptionSerializationCluster();
+    case kLibraryPrefixCid:
+      return new (Z) LibraryPrefixSerializationCluster();
+    case kTypeCid:
+      return new (Z) TypeSerializationCluster(is_canonical,
+                                              cluster_represents_canonical_set);
+    case kFunctionTypeCid:
+      return new (Z) FunctionTypeSerializationCluster(
+          is_canonical, cluster_represents_canonical_set);
+    case kTypeRefCid:
+      return new (Z) TypeRefSerializationCluster();
+    case kTypeParameterCid:
+      return new (Z) TypeParameterSerializationCluster(
+          is_canonical, cluster_represents_canonical_set);
+    case kClosureCid:
+      return new (Z) ClosureSerializationCluster(is_canonical);
+    case kMintCid:
+      return new (Z) MintSerializationCluster(is_canonical);
+    case kDoubleCid:
+      return new (Z) DoubleSerializationCluster(is_canonical);
+    case kGrowableObjectArrayCid:
+      return new (Z) GrowableObjectArraySerializationCluster();
+    case kStackTraceCid:
+      return new (Z) StackTraceSerializationCluster();
+    case kRegExpCid:
+      return new (Z) RegExpSerializationCluster();
+    case kWeakPropertyCid:
+      return new (Z) WeakPropertySerializationCluster();
+    case kLinkedHashMapCid:
+      // We do not have mutable hash maps in snapshots.
+      UNREACHABLE();
+    case kImmutableLinkedHashMapCid:
+      return new (Z) LinkedHashMapSerializationCluster(
+          is_canonical, kImmutableLinkedHashMapCid);
+    case kLinkedHashSetCid:
+      // We do not have mutable hash sets in snapshots.
+      UNREACHABLE();
+    case kImmutableLinkedHashSetCid:
+      return new (Z) LinkedHashSetSerializationCluster(
+          is_canonical, kImmutableLinkedHashSetCid);
+    case kArrayCid:
+      return new (Z) ArraySerializationCluster(is_canonical, kArrayCid);
+    case kImmutableArrayCid:
+      return new (Z)
+          ArraySerializationCluster(is_canonical, kImmutableArrayCid);
+    case kStringCid:
+      return new (Z) StringSerializationCluster(
+          is_canonical, cluster_represents_canonical_set && !vm_);
+    case kWeakSerializationReferenceCid:
+#if defined(DART_PRECOMPILER)
+      ASSERT(kind_ == Snapshot::kFullAOT);
+      return new (Z) WeakSerializationReferenceSerializationCluster();
+#endif
+    default:
+      break;
+  }
+
+  // The caller will check for NULL and provide an error with more context than
+  // is available here.
+  return NULL;
+#endif  // !DART_PRECOMPILED_RUNTIME
+}
+
+bool Serializer::InCurrentLoadingUnitOrRoot(ObjectPtr obj) {
+  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;
+    heap_->SetLoadingUnit(obj, unit_id);
+  }
+  return unit_id == LoadingUnit::kRootId || unit_id == current_loading_unit_id_;
+}
+
+void Serializer::RecordDeferredCode(CodePtr code) {
+  const intptr_t unit_id = heap_->GetLoadingUnit(code);
+  ASSERT(unit_id != WeakTable::kNoValue && unit_id != LoadingUnit::kRootId);
+  (*loading_units_)[unit_id]->AddDeferredObject(code);
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+intptr_t Serializer::PrepareInstructions() {
+  if (!Snapshot::IncludesCode(kind())) return 0;
+
+  // Code objects that have identical/duplicate instructions must be adjacent in
+  // the order that Code objects are written because the encoding of the
+  // reference from the Code to the Instructions assumes monotonically
+  // increasing offsets as part of a delta encoding. Also the code order table
+  // that allows for mapping return addresses back to Code objects depends on
+  // this sorting.
+  if (code_cluster_ != nullptr) {
+    CodeSerializationCluster::Sort(code_cluster_->objects());
+  }
+  if ((loading_units_ != nullptr) &&
+      (current_loading_unit_id_ == LoadingUnit::kRootId)) {
+    for (intptr_t i = LoadingUnit::kRootId + 1; i < loading_units_->length();
+         i++) {
+      auto unit_objects = loading_units_->At(i)->deferred_objects();
+      CodeSerializationCluster::Sort(unit_objects);
+      ASSERT(unit_objects->length() == 0 || code_cluster_ != nullptr);
+      for (intptr_t j = 0; j < unit_objects->length(); j++) {
+        code_cluster_->deferred_objects()->Add(unit_objects->At(j)->ptr());
+      }
+    }
+  }
+
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+  if ((kind() == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
+    // Group the code objects whose instructions are not being deferred in this
+    // snapshot unit in the order they will be written: first the code objects
+    // encountered for this first time in this unit being written by the
+    // CodeSerializationCluster, then code object previously deferred whose
+    // instructions are now written by UnitSerializationRoots. This order needs
+    // to be known to finalize bare-instructions-mode's PC-relative calls.
+    GrowableArray<CodePtr> code_objects;
+    if (code_cluster_ != nullptr) {
+      auto in = code_cluster_->objects();
+      for (intptr_t i = 0; i < in->length(); i++) {
+        code_objects.Add(in->At(i));
+      }
+    }
+    if (loading_units_ != nullptr) {
+      auto in =
+          loading_units_->At(current_loading_unit_id_)->deferred_objects();
+      for (intptr_t i = 0; i < in->length(); i++) {
+        code_objects.Add(in->At(i)->ptr());
+      }
+    }
+
+    GrowableArray<ImageWriterCommand> writer_commands;
+    RelocateCodeObjects(vm_, &code_objects, &writer_commands);
+    image_writer_->PrepareForSerialization(&writer_commands);
+    return code_objects.length();
+  }
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+  return 0;
+}
+
+void Serializer::WriteInstructions(InstructionsPtr instr,
+                                   uint32_t unchecked_offset,
+                                   CodePtr code,
+                                   bool deferred) {
+  ASSERT(code != Code::null());
+
+  ASSERT(InCurrentLoadingUnitOrRoot(code) != deferred);
+  if (deferred) {
+    return;
+  }
+
+  const intptr_t offset = image_writer_->GetTextOffsetFor(instr, code);
+#if defined(DART_PRECOMPILER)
+  if (profile_writer_ != nullptr) {
+    ASSERT(object_currently_writing_.id_ !=
+           V8SnapshotProfileWriter::kArtificialRootId);
+    const auto offset_space = vm_ ? IdSpace::kVmText : IdSpace::kIsolateText;
+    profile_writer_->AttributeReferenceTo(
+        object_currently_writing_.id_,
+        V8SnapshotProfileWriter::Reference::Property("<instructions>"),
+        {offset_space, offset});
+  }
+
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    ASSERT(offset != 0);
+    RELEASE_ASSERT(offset >= previous_text_offset_);
+    const uint32_t delta = offset - previous_text_offset_;
+    WriteUnsigned(delta);
+    const uint32_t payload_info =
+        (unchecked_offset << 1) | (Code::HasMonomorphicEntry(code) ? 0x1 : 0x0);
+    WriteUnsigned(payload_info);
+    previous_text_offset_ = offset;
+
+    if (Code::IsDiscarded(code)) {
+      // Discarded Code objects are not supported in the vm isolate snapshot.
+      ASSERT(!vm_);
+      // Stack maps of discarded Code objects are written along with
+      // instructions so they can be added to instructions table during
+      // deserialization.
+      WritePropertyRef(code->untag()->compressed_stackmaps_,
+                       "compressed_stackmaps_");
+    }
+    return;
+  }
+#endif
+  Write<uint32_t>(offset);
+  WriteUnsigned(unchecked_offset);
+}
+
+void Serializer::TraceDataOffset(uint32_t offset) {
+  if (profile_writer_ == nullptr) return;
+  // ROData cannot be roots.
+  ASSERT(object_currently_writing_.id_ !=
+         V8SnapshotProfileWriter::kArtificialRootId);
+  auto offset_space = vm_ ? IdSpace::kVmData : IdSpace::kIsolateData;
+  // TODO(sjindel): Give this edge a more appropriate type than element
+  // (internal, maybe?).
+  profile_writer_->AttributeReferenceTo(
+      object_currently_writing_.id_,
+      V8SnapshotProfileWriter::Reference::Element(0), {offset_space, offset});
+}
+
+uint32_t Serializer::GetDataOffset(ObjectPtr object) const {
+  return image_writer_->GetDataOffsetFor(object);
+}
+
+intptr_t Serializer::GetDataSize() const {
+  if (image_writer_ == NULL) {
+    return 0;
+  }
+  return image_writer_->data_size();
+}
+#endif
+
+void Serializer::Push(ObjectPtr object) {
+  if (object->IsHeapObject() && object->IsCode() &&
+      !Snapshot::IncludesCode(kind_)) {
+    return;  // Do not trace, will write null.
+  }
+
+  intptr_t id = heap_->GetObjectId(object);
+  if (id == kUnreachableReference) {
+    // When discovering the transitive closure of objects reachable from the
+    // roots we do not trace references, e.g. inside [RawCode], to
+    // [RawInstructions], since [RawInstructions] doesn't contain any references
+    // and the serialization code uses an [ImageWriter] for those.
+    if (object->IsHeapObject() && object->IsInstructions()) {
+      UnexpectedObject(object,
+                       "Instructions should only be reachable from Code");
+    }
+
+    heap_->SetObjectId(object, kUnallocatedReference);
+    ASSERT(IsReachableReference(heap_->GetObjectId(object)));
+    stack_.Add(object);
+    num_written_objects_++;
+#if defined(SNAPSHOT_BACKTRACE)
+    parent_pairs_.Add(&Object::Handle(zone_, object));
+    parent_pairs_.Add(&Object::Handle(zone_, current_parent_));
+#endif
+  }
+}
+
+void Serializer::Trace(ObjectPtr object) {
+  intptr_t cid;
+  bool is_canonical;
+  if (!object->IsHeapObject()) {
+    // Smis are merged into the Mint cluster because Smis for the writer might
+    // become Mints for the reader and vice versa.
+    cid = kMintCid;
+    is_canonical = true;
+  } else {
+    cid = object->GetClassId();
+    is_canonical = object->untag()->IsCanonical();
+  }
+  if (IsStringClassId(cid)) {
+    cid = kStringCid;
+  }
+
+  SerializationCluster** cluster_ref =
+      is_canonical ? &canonical_clusters_by_cid_[cid] : &clusters_by_cid_[cid];
+  if (*cluster_ref == nullptr) {
+    *cluster_ref = NewClusterForClass(cid, is_canonical);
+    if (*cluster_ref == nullptr) {
+      UnexpectedObject(object, "No serialization cluster defined");
+    }
+  }
+  SerializationCluster* cluster = *cluster_ref;
+  ASSERT(cluster != nullptr);
+  if (cluster->is_canonical() != is_canonical) {
+    FATAL("cluster for %s (cid %" Pd ") %s as canonical, but %s",
+          cluster->name(), cid,
+          cluster->is_canonical() ? "marked" : "not marked",
+          is_canonical ? "should be" : "should not be");
+  }
+
+#if defined(SNAPSHOT_BACKTRACE)
+  current_parent_ = object;
+#endif
+
+  cluster->Trace(this, object);
+
+#if defined(SNAPSHOT_BACKTRACE)
+  current_parent_ = Object::null();
+#endif
+}
+
+void Serializer::UnexpectedObject(ObjectPtr raw_object, const char* message) {
+  // Exit the no safepoint scope so we can allocate while printing.
+  while (thread()->no_safepoint_scope_depth() > 0) {
+    thread()->DecrementNoSafepointScopeDepth();
+  }
+  Object& object = Object::Handle(raw_object);
+  OS::PrintErr("Unexpected object (%s, %s): 0x%" Px " %s\n", message,
+               Snapshot::KindToCString(kind_), static_cast<uword>(object.ptr()),
+               object.ToCString());
+#if defined(SNAPSHOT_BACKTRACE)
+  while (!object.IsNull()) {
+    object = ParentOf(object);
+    OS::PrintErr("referenced by 0x%" Px " %s\n",
+                 static_cast<uword>(object.ptr()), object.ToCString());
+  }
+#endif
+  OS::Abort();
+}
+
+#if defined(SNAPSHOT_BACKTRACE)
+ObjectPtr Serializer::ParentOf(const Object& object) {
+  for (intptr_t i = 0; i < parent_pairs_.length(); i += 2) {
+    if (parent_pairs_[i]->ptr() == object.ptr()) {
+      return parent_pairs_[i + 1]->ptr();
+    }
+  }
+  return Object::null();
+}
+#endif  // SNAPSHOT_BACKTRACE
+
+void Serializer::WriteVersionAndFeatures(bool is_vm_snapshot) {
+  const char* expected_version = Version::SnapshotString();
+  ASSERT(expected_version != NULL);
+  const intptr_t version_len = strlen(expected_version);
+  WriteBytes(reinterpret_cast<const uint8_t*>(expected_version), version_len);
+
+  const char* expected_features =
+      Dart::FeaturesString(IsolateGroup::Current(), is_vm_snapshot, kind_);
+  ASSERT(expected_features != NULL);
+  const intptr_t features_len = strlen(expected_features);
+  WriteBytes(reinterpret_cast<const uint8_t*>(expected_features),
+             features_len + 1);
+  free(const_cast<char*>(expected_features));
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+static int CompareClusters(SerializationCluster* const* a,
+                           SerializationCluster* const* b) {
+  if ((*a)->size() > (*b)->size()) {
+    return -1;
+  } else if ((*a)->size() < (*b)->size()) {
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+#define CID_CLUSTER(Type)                                                      \
+  reinterpret_cast<Type##SerializationCluster*>(clusters_by_cid_[k##Type##Cid])
+
+ZoneGrowableArray<Object*>* Serializer::Serialize(SerializationRoots* roots) {
+  // While object_currently_writing_ is initialized to the artificial root, we
+  // set up a scope to ensure proper flushing to the profile.
+  Serializer::WritingObjectScope scope(
+      this, V8SnapshotProfileWriter::kArtificialRootId);
+  roots->AddBaseObjects(this);
+
+  NoSafepointScope no_safepoint;
+
+  roots->PushRoots(this);
+
+  // Resolving WeakSerializationReferences and WeakProperties may cause new
+  // objects to be pushed on the stack, and handling the changes to the stack
+  // may cause the targets of WeakSerializationReferences and keys of
+  // WeakProperties to become reachable, so we do this as a fixed point
+  // computation. Note that reachability is computed monotonically (an object
+  // can change from not reachable to reachable, but never the reverse), which
+  // is technically a conservative approximation for WSRs, but doing a strict
+  // analysis that allows non-motonoic reachability may not halt.
+  //
+  // To see this, take a WSR whose replacement causes the target of another WSR
+  // to become reachable, which then causes the target of the first WSR to
+  // become reachable, but the only way to reach the target is through the
+  // target of the second WSR, which was only reachable via the replacement
+  // the first.
+  //
+  // In practice, this case doesn't come up as replacements tend to be either
+  // null, smis, or singleton objects that do not contain WSRs currently.
+  while (stack_.length() > 0) {
+    // Strong references.
+    while (stack_.length() > 0) {
+      Trace(stack_.RemoveLast());
+    }
+
+    // Ephemeron references.
+#if defined(DART_PRECOMPILER)
+    if (auto const cluster = CID_CLUSTER(WeakSerializationReference)) {
+      cluster->RetraceEphemerons(this);
+    }
+#endif
+    if (auto const cluster = CID_CLUSTER(WeakProperty)) {
+      cluster->RetraceEphemerons(this);
+    }
+  }
+
+#if defined(DART_PRECOMPILER)
+  auto const wsr_cluster = CID_CLUSTER(WeakSerializationReference);
+  if (wsr_cluster != nullptr) {
+    // Now that we have computed the reachability fixpoint, we remove the
+    // count of now-reachable WSRs as they are not actually serialized.
+    num_written_objects_ -= wsr_cluster->Count(this);
+    // We don't need to write this cluster, so remove it from consideration.
+    clusters_by_cid_[kWeakSerializationReferenceCid] = nullptr;
+  }
+  ASSERT(clusters_by_cid_[kWeakSerializationReferenceCid] == nullptr);
+#endif
+
+  code_cluster_ = CID_CLUSTER(Code);
+
+  GrowableArray<SerializationCluster*> clusters;
+  // The order that PostLoad runs matters for some classes because of
+  // assumptions during canonicalization, read filling, or post-load filling of
+  // some classes about what has already been read and/or canonicalized.
+  // Explicitly add these clusters first, then add the rest ordered by class id.
+#define ADD_CANONICAL_NEXT(cid)                                                \
+  if (auto const cluster = canonical_clusters_by_cid_[cid]) {                  \
+    clusters.Add(cluster);                                                     \
+    canonical_clusters_by_cid_[cid] = nullptr;                                 \
+  }
+#define ADD_NON_CANONICAL_NEXT(cid)                                            \
+  if (auto const cluster = clusters_by_cid_[cid]) {                            \
+    clusters.Add(cluster);                                                     \
+    clusters_by_cid_[cid] = nullptr;                                           \
+  }
+  ADD_CANONICAL_NEXT(kOneByteStringCid)
+  ADD_CANONICAL_NEXT(kTwoByteStringCid)
+  ADD_CANONICAL_NEXT(kStringCid)
+  ADD_CANONICAL_NEXT(kMintCid)
+  ADD_CANONICAL_NEXT(kDoubleCid)
+  ADD_CANONICAL_NEXT(kTypeParameterCid)
+  ADD_CANONICAL_NEXT(kTypeCid)
+  ADD_CANONICAL_NEXT(kTypeArgumentsCid)
+  // Code cluster should be deserialized before Function as
+  // FunctionDeserializationCluster::ReadFill uses instructions table
+  // which is filled in CodeDeserializationCluster::ReadFill.
+  ADD_NON_CANONICAL_NEXT(kCodeCid)
+  // The function cluster should be deserialized before any closures, as
+  // PostLoad for closures caches the entry point found in the function.
+  ADD_NON_CANONICAL_NEXT(kFunctionCid)
+  ADD_CANONICAL_NEXT(kClosureCid)
+#undef ADD_CANONICAL_NEXT
+#undef ADD_NON_CANONICAL_NEXT
+  const intptr_t out_of_order_clusters = clusters.length();
+  for (intptr_t cid = 0; cid < num_cids_; cid++) {
+    if (auto const cluster = canonical_clusters_by_cid_[cid]) {
+      clusters.Add(cluster);
+    }
+  }
+  for (intptr_t cid = 0; cid < num_cids_; cid++) {
+    if (auto const cluster = clusters_by_cid_[cid]) {
+      clusters.Add(clusters_by_cid_[cid]);
+    }
+  }
+  // Put back any taken out temporarily to avoid re-adding them during the loop.
+  for (intptr_t i = 0; i < out_of_order_clusters; i++) {
+    const auto& cluster = clusters.At(i);
+    const intptr_t cid = cluster->cid();
+    auto const cid_clusters =
+        cluster->is_canonical() ? canonical_clusters_by_cid_ : clusters_by_cid_;
+    ASSERT(cid_clusters[cid] == nullptr);
+    cid_clusters[cid] = cluster;
+  }
+
+  instructions_table_len_ = PrepareInstructions();
+
+  intptr_t num_objects = num_base_objects_ + num_written_objects_;
+#if defined(ARCH_IS_64_BIT)
+  if (!Utils::IsInt(32, num_objects)) {
+    FATAL("Ref overflow");
+  }
+#endif
+
+  WriteUnsigned(num_base_objects_);
+  WriteUnsigned(num_objects);
+  WriteUnsigned(clusters.length());
+  // TODO(dartbug.com/36097): Not every snapshot carries the field table.
+  if (current_loading_unit_id_ <= LoadingUnit::kRootId) {
+    WriteUnsigned(initial_field_table_->NumFieldIds());
+  } else {
+    WriteUnsigned(0);
+  }
+  ASSERT((instructions_table_len_ == 0) ||
+         (FLAG_precompiled_mode && FLAG_use_bare_instructions));
+  WriteUnsigned(instructions_table_len_);
+
+  for (SerializationCluster* cluster : clusters) {
+    cluster->WriteAndMeasureAlloc(this);
+    bytes_heap_allocated_ += cluster->target_memory_size();
+#if defined(DEBUG)
+    Write<int32_t>(next_ref_index_);
+#endif
+  }
+
+  // We should have assigned a ref to every object we pushed.
+  ASSERT((next_ref_index_ - 1) == num_objects);
+  // And recorded them all in [objects_].
+  ASSERT(objects_->length() == num_objects);
+
+#if defined(DART_PRECOMPILER)
+  if (profile_writer_ != nullptr && wsr_cluster != nullptr) {
+    // Post-WriteAlloc, we eagerly create artificial nodes for any unreachable
+    // targets in reachable WSRs if writing a v8 snapshot profile, since they
+    // will be used in AttributeReference().
+    //
+    // Unreachable WSRs may also need artifical nodes, as they may be members
+    // of other unreachable objects that have artificial nodes in the profile,
+    // but they are instead lazily handled in CreateArtificialNodeIfNeeded().
+    wsr_cluster->CreateArtificialTargetNodesIfNeeded(this);
+  }
+#endif
+
+  for (SerializationCluster* cluster : clusters) {
+    cluster->WriteAndMeasureFill(this);
+#if defined(DEBUG)
+    Write<int32_t>(kSectionMarker);
+#endif
+  }
+
+  roots->WriteRoots(this);
+
+#if defined(DEBUG)
+  Write<int32_t>(kSectionMarker);
+#endif
+
+  PrintSnapshotSizes();
+
+  heap()->ResetObjectIdTable();
+  return objects_;
+}
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+#if defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
+// The serialized format of the dispatch table is a sequence of variable-length
+// integers (the built-in variable-length integer encoding/decoding of
+// the stream). Each encoded integer e is interpreted thus:
+// -kRecentCount .. -1   Pick value from the recent values buffer at index -1-e.
+// 0                     Empty (unused) entry.
+// 1 .. kMaxRepeat       Repeat previous entry e times.
+// kIndexBase or higher  Pick entry point from the object at index e-kIndexBase
+//                       in the snapshot code cluster. Also put it in the recent
+//                       values buffer at the next round-robin index.
+
+// Constants for serialization format. Chosen such that repeats and recent
+// values are encoded as single bytes in SLEB128 encoding.
+static constexpr intptr_t kDispatchTableSpecialEncodingBits = 6;
+static constexpr intptr_t kDispatchTableRecentCount =
+    1 << kDispatchTableSpecialEncodingBits;
+static constexpr intptr_t kDispatchTableRecentMask =
+    (1 << kDispatchTableSpecialEncodingBits) - 1;
+static constexpr intptr_t kDispatchTableMaxRepeat =
+    (1 << kDispatchTableSpecialEncodingBits) - 1;
+static constexpr intptr_t kDispatchTableIndexBase = kDispatchTableMaxRepeat + 1;
+#endif  // defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
+
+void Serializer::WriteDispatchTable(const Array& entries) {
+#if defined(DART_PRECOMPILER)
+  if (kind() != Snapshot::kFullAOT) return;
+
+  // Create an artifical node to which the bytes should be attributed. We
+  // don't attribute them to entries.ptr(), as we don't want to attribute the
+  // bytes for printing out a length of 0 to Object::null() when the dispatch
+  // table is empty.
+  const intptr_t profile_ref = AssignArtificialRef();
+  const auto& dispatch_table_profile_id = GetProfileId(profile_ref);
+  if (profile_writer_ != nullptr) {
+    profile_writer_->SetObjectTypeAndName(dispatch_table_profile_id,
+                                          "DispatchTable", "dispatch_table");
+    profile_writer_->AddRoot(dispatch_table_profile_id);
+  }
+  WritingObjectScope scope(this, dispatch_table_profile_id);
+  if (profile_writer_ != nullptr) {
+    // We'll write the Array object as a property of the artificial dispatch
+    // table node, so Code objects otherwise unreferenced will have it as an
+    // ancestor.
+    CreateArtificialNodeIfNeeded(entries.ptr());
+    AttributePropertyRef(entries.ptr(), "<code entries>");
+  }
+
+  const intptr_t bytes_before = bytes_written();
+  const intptr_t table_length = entries.IsNull() ? 0 : entries.Length();
+
+  ASSERT(table_length <= compiler::target::kWordMax);
+  WriteUnsigned(table_length);
+  if (table_length == 0) {
+    dispatch_table_size_ = bytes_written() - bytes_before;
+    return;
+  }
+
+  ASSERT(code_cluster_ != nullptr);
+  // Reference IDs in a cluster are allocated sequentially, so we can use the
+  // first code object's reference ID to calculate the cluster index.
+  const intptr_t first_code_id = RefId(code_cluster_->objects()->At(0));
+  // The first object in the code cluster must have its reference ID allocated.
+  ASSERT(IsAllocatedReference(first_code_id));
+
+  // If instructions can be deduped, the code order table in the deserializer
+  // may not contain all Code objects in the snapshot. Thus, we write the ID
+  // for the first code object here so we can retrieve it during deserialization
+  // and calculate the snapshot ID for Code objects from the cluster index.
+  //
+  // We could just use the snapshot reference ID of the Code object itself
+  // instead of the cluster index and avoid this. However, since entries are
+  // SLEB128 encoded, the size delta for serializing the first ID once is less
+  // than the size delta of serializing the ID plus kIndexBase for each entry,
+  // even when Code objects are allocated before all other non-base objects.
+  //
+  // We could also map Code objects to the first Code object in the cluster with
+  // the same entry point and serialize that ID instead, but that loses
+  // information about which Code object was originally referenced.
+  ASSERT(first_code_id <= compiler::target::kWordMax);
+  WriteUnsigned(first_code_id);
+
+  CodePtr previous_code = nullptr;
+  CodePtr recent[kDispatchTableRecentCount] = {nullptr};
+  intptr_t recent_index = 0;
+  intptr_t repeat_count = 0;
+  for (intptr_t i = 0; i < table_length; i++) {
+    auto const code = Code::RawCast(entries.At(i));
+    // First, see if we're repeating the previous entry (invalid, recent, or
+    // encoded).
+    if (code == previous_code) {
+      if (++repeat_count == kDispatchTableMaxRepeat) {
+        Write(kDispatchTableMaxRepeat);
+        repeat_count = 0;
+      }
+      continue;
+    }
+    // Emit any outsanding repeat count before handling the new code value.
+    if (repeat_count > 0) {
+      Write(repeat_count);
+      repeat_count = 0;
+    }
+    previous_code = code;
+    // The invalid entry can be repeated, but is never part of the recent list
+    // since it already encodes to a single byte..
+    if (code == Code::null()) {
+      Write(0);
+      continue;
+    }
+    // Check against the recent entries, and write an encoded reference to
+    // the recent entry if found.
+    intptr_t found_index = 0;
+    for (; found_index < kDispatchTableRecentCount; found_index++) {
+      if (recent[found_index] == code) break;
+    }
+    if (found_index < kDispatchTableRecentCount) {
+      Write(~found_index);
+      continue;
+    }
+    // We have a non-repeated, non-recent entry, so encode the reference ID of
+    // the code object and emit that.
+    auto const object_id = RefId(code);
+    // Make sure that this code object has an allocated reference ID.
+    ASSERT(IsAllocatedReference(object_id));
+    // Use the index in the code cluster, not in the snapshot..
+    auto const encoded = kDispatchTableIndexBase + (object_id - first_code_id);
+    ASSERT(encoded <= compiler::target::kWordMax);
+    Write(encoded);
+    recent[recent_index] = code;
+    recent_index = (recent_index + 1) & kDispatchTableRecentMask;
+  }
+  if (repeat_count > 0) {
+    Write(repeat_count);
+  }
+  dispatch_table_size_ = bytes_written() - bytes_before;
+#endif  // defined(DART_PRECOMPILER)
+}
+
+void Serializer::PrintSnapshotSizes() {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_print_snapshot_sizes_verbose) {
+    TextBuffer buffer(1024);
+    // Header, using format sizes matching those below to ensure alignment.
+    buffer.Printf("%25s", "Cluster");
+    buffer.Printf(" %6s", "Objs");
+    buffer.Printf(" %8s", "Size");
+    buffer.Printf(" %8s", "Fraction");
+    buffer.Printf(" %10s", "Cumulative");
+    buffer.Printf(" %8s", "HeapSize");
+    buffer.Printf(" %5s", "Cid");
+    buffer.Printf(" %9s", "Canonical");
+    buffer.AddString("\n");
+    GrowableArray<SerializationCluster*> clusters_by_size;
+    for (intptr_t cid = 1; cid < num_cids_; cid++) {
+      if (auto const cluster = canonical_clusters_by_cid_[cid]) {
+        clusters_by_size.Add(cluster);
+      }
+      if (auto const cluster = clusters_by_cid_[cid]) {
+        clusters_by_size.Add(cluster);
+      }
+    }
+    intptr_t text_size = 0;
+    if (image_writer_ != nullptr) {
+      auto const text_object_count = image_writer_->GetTextObjectCount();
+      text_size = image_writer_->text_size();
+      intptr_t trampoline_count, trampoline_size;
+      image_writer_->GetTrampolineInfo(&trampoline_count, &trampoline_size);
+      auto const instructions_count = text_object_count - trampoline_count;
+      auto const instructions_size = text_size - trampoline_size;
+      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
+          ImageWriter::TagObjectTypeAsReadOnly(zone_, "Instructions"),
+          instructions_count, instructions_size));
+      if (trampoline_size > 0) {
+        clusters_by_size.Add(new (zone_) FakeSerializationCluster(
+            ImageWriter::TagObjectTypeAsReadOnly(zone_, "Trampoline"),
+            trampoline_count, trampoline_size));
+      }
+    }
+    // The dispatch_table_size_ will be 0 if the snapshot did not include a
+    // dispatch table (i.e., the VM snapshot). For a precompiled isolate
+    // snapshot, we always serialize at least _one_ byte for the DispatchTable.
+    if (dispatch_table_size_ > 0) {
+      const auto& dispatch_table_entries = Array::Handle(
+          zone_,
+          isolate_group()->object_store()->dispatch_table_code_entries());
+      auto const entry_count =
+          dispatch_table_entries.IsNull() ? 0 : dispatch_table_entries.Length();
+      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
+          "DispatchTable", entry_count, dispatch_table_size_));
+    }
+    if (instructions_table_len_ > 0) {
+      const intptr_t memory_size =
+          compiler::target::InstructionsTable::InstanceSize(
+              instructions_table_len_) +
+          compiler::target::Array::InstanceSize(instructions_table_len_);
+      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
+          "InstructionsTable", instructions_table_len_, 0, memory_size));
+    }
+    clusters_by_size.Sort(CompareClusters);
+    double total_size =
+        static_cast<double>(bytes_written() + GetDataSize() + text_size);
+    double cumulative_fraction = 0.0;
+    for (intptr_t i = 0; i < clusters_by_size.length(); i++) {
+      SerializationCluster* cluster = clusters_by_size[i];
+      double fraction = static_cast<double>(cluster->size()) / total_size;
+      cumulative_fraction += fraction;
+      buffer.Printf("%25s", cluster->name());
+      buffer.Printf(" %6" Pd "", cluster->num_objects());
+      buffer.Printf(" %8" Pd "", cluster->size());
+      buffer.Printf(" %1.6lf", fraction);
+      buffer.Printf(" %1.8lf", cumulative_fraction);
+      buffer.Printf(" %8" Pd "", cluster->target_memory_size());
+      if (cluster->cid() != -1) {
+        buffer.Printf(" %5" Pd "", cluster->cid());
+      } else {
+        buffer.Printf(" %5s", "");
+      }
+      if (cluster->is_canonical()) {
+        buffer.Printf(" %9s", "canonical");
+      } else {
+        buffer.Printf(" %9s", "");
+      }
+      buffer.AddString("\n");
+    }
+    OS::PrintErr("%s", buffer.buffer());
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+}
+
+Deserializer::Deserializer(Thread* thread,
+                           Snapshot::Kind kind,
+                           const uint8_t* buffer,
+                           intptr_t size,
+                           const uint8_t* data_buffer,
+                           const uint8_t* instructions_buffer,
+                           bool is_non_root_unit,
+                           intptr_t offset)
+    : ThreadStackResource(thread),
+      heap_(thread->isolate_group()->heap()),
+      zone_(thread->zone()),
+      kind_(kind),
+      stream_(buffer, size),
+      image_reader_(nullptr),
+      refs_(nullptr),
+      next_ref_index_(kFirstReference),
+      previous_text_offset_(0),
+      clusters_(nullptr),
+      initial_field_table_(thread->isolate_group()->initial_field_table()),
+      is_non_root_unit_(is_non_root_unit),
+      instructions_table_(InstructionsTable::Handle(thread->zone())) {
+  if (Snapshot::IncludesCode(kind)) {
+    ASSERT(instructions_buffer != nullptr);
+    ASSERT(data_buffer != nullptr);
+    image_reader_ = new (zone_) ImageReader(data_buffer, instructions_buffer);
+  }
+  stream_.SetPosition(offset);
+}
+
+Deserializer::~Deserializer() {
+  delete[] clusters_;
+}
+
+DeserializationCluster* Deserializer::ReadCluster() {
+  const uint64_t cid_and_canonical = Read<uint64_t>();
+  const intptr_t cid = (cid_and_canonical >> 1) & kMaxUint32;
+  const bool is_canonical = (cid_and_canonical & 0x1) == 0x1;
+  Zone* Z = zone_;
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
+    return new (Z) InstanceDeserializationCluster(cid, is_canonical);
+  }
+  if (IsTypedDataViewClassId(cid)) {
+    ASSERT(!is_canonical);
+    return new (Z) TypedDataViewDeserializationCluster(cid);
+  }
+  if (IsExternalTypedDataClassId(cid)) {
+    ASSERT(!is_canonical);
+    return new (Z) ExternalTypedDataDeserializationCluster(cid);
+  }
+  if (IsTypedDataClassId(cid)) {
+    ASSERT(!is_canonical);
+    return new (Z) TypedDataDeserializationCluster(cid);
+  }
+
+#if !defined(DART_COMPRESSED_POINTERS)
+  if (Snapshot::IncludesCode(kind_)) {
+    switch (cid) {
+      case kPcDescriptorsCid:
+      case kCodeSourceMapCid:
+      case kCompressedStackMapsCid:
+        return new (Z)
+            RODataDeserializationCluster(is_canonical, !is_non_root_unit_, cid);
+      case kOneByteStringCid:
+      case kTwoByteStringCid:
+      case kStringCid:
+        if (!is_non_root_unit_) {
+          return new (Z) RODataDeserializationCluster(is_canonical,
+                                                      !is_non_root_unit_, cid);
+        }
+        break;
+    }
+  }
+#endif
+
+  switch (cid) {
+    case kClassCid:
+      ASSERT(!is_canonical);
+      return new (Z) ClassDeserializationCluster();
+    case kTypeParametersCid:
+      return new (Z) TypeParametersDeserializationCluster();
+    case kTypeArgumentsCid:
+      return new (Z)
+          TypeArgumentsDeserializationCluster(is_canonical, !is_non_root_unit_);
+    case kPatchClassCid:
+      ASSERT(!is_canonical);
+      return new (Z) PatchClassDeserializationCluster();
+    case kFunctionCid:
+      ASSERT(!is_canonical);
+      return new (Z) FunctionDeserializationCluster();
+    case kClosureDataCid:
+      ASSERT(!is_canonical);
+      return new (Z) ClosureDataDeserializationCluster();
+    case kFfiTrampolineDataCid:
+      ASSERT(!is_canonical);
+      return new (Z) FfiTrampolineDataDeserializationCluster();
+    case kFieldCid:
+      ASSERT(!is_canonical);
+      return new (Z) FieldDeserializationCluster();
+    case kScriptCid:
+      ASSERT(!is_canonical);
+      return new (Z) ScriptDeserializationCluster();
+    case kLibraryCid:
+      ASSERT(!is_canonical);
+      return new (Z) LibraryDeserializationCluster();
+    case kNamespaceCid:
+      ASSERT(!is_canonical);
+      return new (Z) NamespaceDeserializationCluster();
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    case kKernelProgramInfoCid:
+      ASSERT(!is_canonical);
+      return new (Z) KernelProgramInfoDeserializationCluster();
+#endif  // !DART_PRECOMPILED_RUNTIME
+    case kCodeCid:
+      ASSERT(!is_canonical);
+      return new (Z) CodeDeserializationCluster();
+    case kObjectPoolCid:
+      ASSERT(!is_canonical);
+      return new (Z) ObjectPoolDeserializationCluster();
+    case kPcDescriptorsCid:
+      ASSERT(!is_canonical);
+      return new (Z) PcDescriptorsDeserializationCluster();
+    case kCodeSourceMapCid:
+      ASSERT(!is_canonical);
+      return new (Z) CodeSourceMapDeserializationCluster();
+    case kCompressedStackMapsCid:
+      ASSERT(!is_canonical);
+      return new (Z) CompressedStackMapsDeserializationCluster();
+    case kExceptionHandlersCid:
+      ASSERT(!is_canonical);
+      return new (Z) ExceptionHandlersDeserializationCluster();
+    case kContextCid:
+      ASSERT(!is_canonical);
+      return new (Z) ContextDeserializationCluster();
+    case kContextScopeCid:
+      ASSERT(!is_canonical);
+      return new (Z) ContextScopeDeserializationCluster();
+    case kUnlinkedCallCid:
+      ASSERT(!is_canonical);
+      return new (Z) UnlinkedCallDeserializationCluster();
+    case kICDataCid:
+      ASSERT(!is_canonical);
+      return new (Z) ICDataDeserializationCluster();
+    case kMegamorphicCacheCid:
+      ASSERT(!is_canonical);
+      return new (Z) MegamorphicCacheDeserializationCluster();
+    case kSubtypeTestCacheCid:
+      ASSERT(!is_canonical);
+      return new (Z) SubtypeTestCacheDeserializationCluster();
+    case kLoadingUnitCid:
+      ASSERT(!is_canonical);
+      return new (Z) LoadingUnitDeserializationCluster();
+    case kLanguageErrorCid:
+      ASSERT(!is_canonical);
+      return new (Z) LanguageErrorDeserializationCluster();
+    case kUnhandledExceptionCid:
+      ASSERT(!is_canonical);
+      return new (Z) UnhandledExceptionDeserializationCluster();
+    case kLibraryPrefixCid:
+      ASSERT(!is_canonical);
+      return new (Z) LibraryPrefixDeserializationCluster();
+    case kTypeCid:
+      return new (Z)
+          TypeDeserializationCluster(is_canonical, !is_non_root_unit_);
+    case kFunctionTypeCid:
+      return new (Z)
+          FunctionTypeDeserializationCluster(is_canonical, !is_non_root_unit_);
+    case kTypeRefCid:
+      ASSERT(!is_canonical);
+      return new (Z) TypeRefDeserializationCluster();
+    case kTypeParameterCid:
+      return new (Z)
+          TypeParameterDeserializationCluster(is_canonical, !is_non_root_unit_);
+    case kClosureCid:
+      return new (Z) ClosureDeserializationCluster(is_canonical);
+    case kMintCid:
+      return new (Z) MintDeserializationCluster(is_canonical);
+    case kDoubleCid:
+      return new (Z) DoubleDeserializationCluster(is_canonical);
+    case kGrowableObjectArrayCid:
+      ASSERT(!is_canonical);
+      return new (Z) GrowableObjectArrayDeserializationCluster();
+    case kStackTraceCid:
+      ASSERT(!is_canonical);
+      return new (Z) StackTraceDeserializationCluster();
+    case kRegExpCid:
+      ASSERT(!is_canonical);
+      return new (Z) RegExpDeserializationCluster();
+    case kWeakPropertyCid:
+      ASSERT(!is_canonical);
+      return new (Z) WeakPropertyDeserializationCluster();
+    case kLinkedHashMapCid:
+      // We do not have mutable hash maps in snapshots.
+      UNREACHABLE();
+    case kImmutableLinkedHashMapCid:
+      return new (Z) LinkedHashMapDeserializationCluster(
+          is_canonical, kImmutableLinkedHashMapCid);
+    case kLinkedHashSetCid:
+      // We do not have mutable hash sets in snapshots.
+      UNREACHABLE();
+    case kImmutableLinkedHashSetCid:
+      return new (Z) LinkedHashSetDeserializationCluster(
+          is_canonical, kImmutableLinkedHashSetCid);
+    case kArrayCid:
+      return new (Z) ArrayDeserializationCluster(is_canonical, kArrayCid);
+    case kImmutableArrayCid:
+      return new (Z)
+          ArrayDeserializationCluster(is_canonical, kImmutableArrayCid);
+    case kStringCid:
+      return new (Z) StringDeserializationCluster(
+          is_canonical,
+          !is_non_root_unit_ && isolate_group() != Dart::vm_isolate_group());
+    default:
+      break;
+  }
+  FATAL1("No cluster defined for cid %" Pd, cid);
+  return NULL;
+}
+
+void Deserializer::ReadDispatchTable(ReadStream* stream,
+                                     bool deferred,
+                                     intptr_t deferred_code_start_index,
+                                     intptr_t deferred_code_end_index) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  const uint8_t* table_snapshot_start = stream->AddressOfCurrentPosition();
+  const intptr_t length = stream->ReadUnsigned();
+  if (length == 0) return;
+
+  // Not all Code objects may be in the code_order_table when instructions can
+  // be deduplicated. Thus, we serialize the reference ID of the first code
+  // object, from which we can get the reference ID for any code object.
+  const intptr_t first_code_id = stream->ReadUnsigned();
+
+  auto const IG = isolate_group();
+  auto code = IG->object_store()->dispatch_table_null_error_stub();
+  ASSERT(code != Code::null());
+  uword null_entry = Code::EntryPointOf(code);
+  uword not_loaded_entry = StubCode::NotLoaded().EntryPoint();
+
+  DispatchTable* table;
+  if (deferred) {
+    table = IG->dispatch_table();
+    ASSERT(table != nullptr && table->length() == length);
+  } else {
+    ASSERT(IG->dispatch_table() == nullptr);
+    table = new DispatchTable(length);
+  }
+  auto const array = table->array();
+  uword value = 0;
+  uword recent[kDispatchTableRecentCount] = {0};
+  intptr_t recent_index = 0;
+  intptr_t repeat_count = 0;
+  for (intptr_t i = 0; i < length; i++) {
+    if (repeat_count > 0) {
+      array[i] = value;
+      repeat_count--;
+      continue;
+    }
+    auto const encoded = stream->Read<intptr_t>();
+    if (encoded == 0) {
+      value = null_entry;
+    } else if (encoded < 0) {
+      intptr_t r = ~encoded;
+      ASSERT(r < kDispatchTableRecentCount);
+      value = recent[r];
+    } else if (encoded <= kDispatchTableMaxRepeat) {
+      repeat_count = encoded - 1;
+    } else {
+      intptr_t cluster_index = encoded - kDispatchTableIndexBase;
+      if (deferred) {
+        intptr_t id = first_code_id + cluster_index;
+        if ((deferred_code_start_index <= id) &&
+            (id < deferred_code_end_index)) {
+          // Deferred instructions are at the end of the instructions table.
+          value = instructions_table().EntryPointAt(
+              instructions_table().length() - deferred_code_end_index + id);
+        } else {
+          // Reuse old value from the dispatch table.
+          value = array[i];
+        }
+      } else {
+        if (cluster_index < instructions_table().length()) {
+          value = instructions_table().EntryPointAt(cluster_index);
+        } else {
+          value = not_loaded_entry;
+        }
+      }
+      recent[recent_index] = value;
+      recent_index = (recent_index + 1) & kDispatchTableRecentMask;
+    }
+    array[i] = value;
+  }
+  ASSERT(repeat_count == 0);
+
+  if (!deferred) {
+    IG->set_dispatch_table(table);
+    intptr_t table_snapshot_size =
+        stream->AddressOfCurrentPosition() - table_snapshot_start;
+    IG->set_dispatch_table_snapshot(table_snapshot_start);
+    IG->set_dispatch_table_snapshot_size(table_snapshot_size);
+  }
+#endif
+}
+
+ApiErrorPtr Deserializer::VerifyImageAlignment() {
+  if (image_reader_ != nullptr) {
+    return image_reader_->VerifyAlignment();
+  }
+  return ApiError::null();
+}
+
+char* SnapshotHeaderReader::VerifyVersionAndFeatures(
+    IsolateGroup* isolate_group,
+    intptr_t* offset) {
+  char* error = VerifyVersion();
+  if (error == nullptr) {
+    error = VerifyFeatures(isolate_group);
+  }
+  if (error == nullptr) {
+    *offset = stream_.Position();
+  }
+  return error;
+}
+
+char* SnapshotHeaderReader::VerifyVersion() {
+  // If the version string doesn't match, return an error.
+  // Note: New things are allocated only if we're going to return an error.
+
+  const char* expected_version = Version::SnapshotString();
+  ASSERT(expected_version != NULL);
+  const intptr_t version_len = strlen(expected_version);
+  if (stream_.PendingBytes() < version_len) {
+    const intptr_t kMessageBufferSize = 128;
+    char message_buffer[kMessageBufferSize];
+    Utils::SNPrint(message_buffer, kMessageBufferSize,
+                   "No full snapshot version found, expected '%s'",
+                   expected_version);
+    return BuildError(message_buffer);
+  }
+
+  const char* version =
+      reinterpret_cast<const char*>(stream_.AddressOfCurrentPosition());
+  ASSERT(version != NULL);
+  if (strncmp(version, expected_version, version_len) != 0) {
+    const intptr_t kMessageBufferSize = 256;
+    char message_buffer[kMessageBufferSize];
+    char* actual_version = Utils::StrNDup(version, version_len);
+    Utils::SNPrint(message_buffer, kMessageBufferSize,
+                   "Wrong %s snapshot version, expected '%s' found '%s'",
+                   (Snapshot::IsFull(kind_)) ? "full" : "script",
+                   expected_version, actual_version);
+    free(actual_version);
+    return BuildError(message_buffer);
+  }
+  stream_.Advance(version_len);
+
+  return nullptr;
+}
+
+char* SnapshotHeaderReader::VerifyFeatures(IsolateGroup* isolate_group) {
+  const char* expected_features =
+      Dart::FeaturesString(isolate_group, (isolate_group == NULL), kind_);
+  ASSERT(expected_features != NULL);
+  const intptr_t expected_len = strlen(expected_features);
+
+  const char* features = nullptr;
+  intptr_t features_length = 0;
+
+  auto error = ReadFeatures(&features, &features_length);
+  if (error != nullptr) {
+    return error;
+  }
+
+  if (features_length != expected_len ||
+      (strncmp(features, expected_features, expected_len) != 0)) {
+    const intptr_t kMessageBufferSize = 1024;
+    char message_buffer[kMessageBufferSize];
+    char* actual_features = Utils::StrNDup(
+        features, features_length < 1024 ? features_length : 1024);
+    Utils::SNPrint(message_buffer, kMessageBufferSize,
+                   "Snapshot not compatible with the current VM configuration: "
+                   "the snapshot requires '%s' but the VM has '%s'",
+                   actual_features, expected_features);
+    free(const_cast<char*>(expected_features));
+    free(actual_features);
+    return BuildError(message_buffer);
+  }
+  free(const_cast<char*>(expected_features));
+  return nullptr;
+}
+
+char* SnapshotHeaderReader::ReadFeatures(const char** features,
+                                         intptr_t* features_length) {
+  const char* cursor =
+      reinterpret_cast<const char*>(stream_.AddressOfCurrentPosition());
+  const intptr_t length = Utils::StrNLen(cursor, stream_.PendingBytes());
+  if (length == stream_.PendingBytes()) {
+    return BuildError(
+        "The features string in the snapshot was not '\\0'-terminated.");
+  }
+  *features = cursor;
+  *features_length = length;
+  stream_.Advance(length + 1);
+  return nullptr;
+}
+
+char* SnapshotHeaderReader::BuildError(const char* message) {
+  return Utils::StrDup(message);
+}
+
+ApiErrorPtr FullSnapshotReader::ConvertToApiError(char* message) {
+  // This can also fail while bringing up the VM isolate, so make sure to
+  // allocate the error message in old space.
+  const String& msg = String::Handle(String::New(message, Heap::kOld));
+
+  // The [message] was constructed with [BuildError] and needs to be freed.
+  free(message);
+
+  return ApiError::New(msg, Heap::kOld);
+}
+
+void Deserializer::ReadInstructions(CodePtr code,
+                                    bool deferred,
+                                    bool discarded) {
+  if (deferred) {
+    ASSERT(!discarded);
+#if defined(DART_PRECOMPILED_RUNTIME)
+    if (FLAG_use_bare_instructions) {
+      uword entry_point = StubCode::NotLoaded().EntryPoint();
+      code->untag()->entry_point_ = entry_point;
+      code->untag()->unchecked_entry_point_ = entry_point;
+      code->untag()->monomorphic_entry_point_ = entry_point;
+      code->untag()->monomorphic_unchecked_entry_point_ = entry_point;
+      code->untag()->instructions_length_ = 0;
+      return;
+    }
+#endif
+    InstructionsPtr instr = StubCode::NotLoaded().instructions();
+    uint32_t unchecked_offset = 0;
+    code->untag()->instructions_ = instr;
+#if defined(DART_PRECOMPILED_RUNTIME)
+    code->untag()->instructions_length_ = Instructions::Size(instr);
+#else
+    code->untag()->unchecked_offset_ = unchecked_offset;
+#endif
+    Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
+    return;
+  }
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_use_bare_instructions) {
+    previous_text_offset_ += ReadUnsigned();
+    const uword payload_start =
+        image_reader_->GetBareInstructionsAt(previous_text_offset_);
+    const uint32_t payload_info = ReadUnsigned();
+    const uint32_t unchecked_offset = payload_info >> 1;
+    const bool has_monomorphic_entrypoint = (payload_info & 0x1) == 0x1;
+
+    const uword entry_offset = has_monomorphic_entrypoint
+                                   ? Instructions::kPolymorphicEntryOffsetAOT
+                                   : 0;
+    const uword monomorphic_entry_offset =
+        has_monomorphic_entrypoint ? Instructions::kMonomorphicEntryOffsetAOT
+                                   : 0;
+
+    const uword entry_point = payload_start + entry_offset;
+    const uword monomorphic_entry_point =
+        payload_start + monomorphic_entry_offset;
+
+    ObjectPtr code_descriptor = code;
+    if (discarded) {
+      code_descriptor = static_cast<CompressedStackMapsPtr>(ReadRef());
+    }
+
+    instructions_table_.SetEntryAt(instructions_index_++, payload_start,
+                                   has_monomorphic_entrypoint, code_descriptor);
+
+    if (!discarded) {
+      // There are no serialized RawInstructions objects in this mode.
+      code->untag()->instructions_ = Instructions::null();
+      code->untag()->entry_point_ = entry_point;
+      code->untag()->unchecked_entry_point_ = entry_point + unchecked_offset;
+      code->untag()->monomorphic_entry_point_ = monomorphic_entry_point;
+      code->untag()->monomorphic_unchecked_entry_point_ =
+          monomorphic_entry_point + unchecked_offset;
+    }
+    return;
+  }
+#endif
+
+  InstructionsPtr instr = image_reader_->GetInstructionsAt(Read<uint32_t>());
+  uint32_t unchecked_offset = ReadUnsigned();
+  code->untag()->instructions_ = instr;
+#if defined(DART_PRECOMPILED_RUNTIME)
+  code->untag()->instructions_length_ = Instructions::Size(instr);
+#else
+  code->untag()->unchecked_offset_ = unchecked_offset;
+  if (kind() == Snapshot::kFullJIT) {
+    const uint32_t active_offset = Read<uint32_t>();
+    instr = image_reader_->GetInstructionsAt(active_offset);
+    unchecked_offset = ReadUnsigned();
+  }
+  code->untag()->active_instructions_ = instr;
+#endif
+  Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
+}
+
+void Deserializer::EndInstructions() {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_use_bare_instructions) {
+    uword previous_end = image_reader_->GetBareInstructionsEnd();
+    for (intptr_t i = instructions_index_ - 1; i >= 0; --i) {
+      ObjectPtr descriptor = instructions_table_.DescriptorAt(i);
+      uword start = instructions_table_.PayloadStartAt(i);
+      ASSERT(start <= previous_end);
+      if (descriptor->IsCode()) {
+        CodePtr code = static_cast<CodePtr>(descriptor);
+        code->untag()->instructions_length_ = previous_end - start;
+      }
+      previous_end = start;
+    }
+
+    ObjectStore* object_store = IsolateGroup::Current()->object_store();
+    GrowableObjectArray& tables =
+        GrowableObjectArray::Handle(zone_, object_store->instructions_tables());
+    if (tables.IsNull()) {
+      tables = GrowableObjectArray::New(Heap::kOld);
+      object_store->set_instructions_tables(tables);
+    }
+    if ((tables.Length() == 0) ||
+        (tables.At(tables.Length() - 1) != instructions_table_.ptr())) {
+      tables.Add(instructions_table_, Heap::kOld);
+    }
+  }
+#endif
+}
+
+ObjectPtr Deserializer::GetObjectAt(uint32_t offset) const {
+  return image_reader_->GetObjectAt(offset);
+}
+
+class HeapLocker : public StackResource {
+ public:
+  HeapLocker(Thread* thread, PageSpace* page_space)
+      : StackResource(thread),
+        page_space_(page_space),
+        freelist_(page_space->DataFreeList()) {
+    page_space_->AcquireLock(freelist_);
+  }
+  ~HeapLocker() { page_space_->ReleaseLock(freelist_); }
+
+ private:
+  PageSpace* page_space_;
+  FreeList* freelist_;
+};
+
+void Deserializer::Deserialize(DeserializationRoots* roots) {
+  Array& refs = Array::Handle(zone_);
+  num_base_objects_ = ReadUnsigned();
+  num_objects_ = ReadUnsigned();
+  num_clusters_ = ReadUnsigned();
+  const intptr_t initial_field_table_len = ReadUnsigned();
+  const intptr_t instructions_table_len = ReadUnsigned();
+
+  clusters_ = new DeserializationCluster*[num_clusters_];
+  refs = Array::New(num_objects_ + kFirstReference, Heap::kOld);
+  if (initial_field_table_len > 0) {
+    initial_field_table_->AllocateIndex(initial_field_table_len - 1);
+    ASSERT_EQUAL(initial_field_table_->NumFieldIds(), initial_field_table_len);
+  }
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (instructions_table_len > 0) {
+    ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+    const uword start_pc = image_reader_->GetBareInstructionsAt(0);
+    const uword end_pc = image_reader_->GetBareInstructionsEnd();
+    instructions_table_ =
+        InstructionsTable::New(instructions_table_len, start_pc, end_pc);
+  }
+#else
+  ASSERT(instructions_table_len == 0);
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+  bool primary;
+  {
+    // The deserializer initializes objects without using the write barrier,
+    // partly for speed since we know all the deserialized objects will be
+    // long-lived and partly because the target objects can be not yet
+    // initialized at the time of the write. To make this safe, we must ensure
+    // there are no other threads mutating this heap, and that incremental
+    // marking is not in progress. This is normally the case anyway for the
+    // main snapshot being deserialized at isolate load, but needs checks for
+    // loading secondary snapshots are part of deferred loading.
+    HeapIterationScope iter(thread());
+    // For bump-pointer allocation in old-space.
+    HeapLocker hl(thread(), heap_->old_space());
+    // Must not perform any other type of allocation, which might trigger GC
+    // while there are still uninitialized objects.
+    NoSafepointScope no_safepoint;
+    refs_ = refs.ptr();
+
+    primary = roots->AddBaseObjects(this);
+
+    if (num_base_objects_ != (next_ref_index_ - kFirstReference)) {
+      FATAL2("Snapshot expects %" Pd
+             " base objects, but deserializer provided %" Pd,
+             num_base_objects_, next_ref_index_ - kFirstReference);
+    }
+
+    {
+      TIMELINE_DURATION(thread(), Isolate, "ReadAlloc");
+      for (intptr_t i = 0; i < num_clusters_; i++) {
+        clusters_[i] = ReadCluster();
+        TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
+        clusters_[i]->ReadAlloc(this);
+#if defined(DEBUG)
+        intptr_t serializers_next_ref_index_ = Read<int32_t>();
+        ASSERT_EQUAL(serializers_next_ref_index_, next_ref_index_);
+#endif
+      }
+    }
+
+    // We should have completely filled the ref array.
+    ASSERT_EQUAL(next_ref_index_ - kFirstReference, num_objects_);
+
+    {
+      TIMELINE_DURATION(thread(), Isolate, "ReadFill");
+      SafepointWriteRwLocker ml(thread(), isolate_group()->program_lock());
+      for (intptr_t i = 0; i < num_clusters_; i++) {
+        TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
+        clusters_[i]->ReadFill(this, primary);
+#if defined(DEBUG)
+        int32_t section_marker = Read<int32_t>();
+        ASSERT(section_marker == kSectionMarker);
+#endif
+      }
+    }
+
+    roots->ReadRoots(this);
+
+#if defined(DEBUG)
+    int32_t section_marker = Read<int32_t>();
+    ASSERT(section_marker == kSectionMarker);
+#endif
+
+    refs_ = NULL;
+  }
+
+  roots->PostLoad(this, refs);
+
+#if defined(DEBUG)
+  auto isolate_group = thread()->isolate_group();
+  isolate_group->ValidateClassTable();
+  if (isolate_group != Dart::vm_isolate()->group()) {
+    isolate_group->heap()->Verify();
+  }
+#endif
+
+  {
+    TIMELINE_DURATION(thread(), Isolate, "PostLoad");
+    for (intptr_t i = 0; i < num_clusters_; i++) {
+      TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
+      clusters_[i]->PostLoad(this, refs, primary);
+    }
+  }
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+FullSnapshotWriter::FullSnapshotWriter(
+    Snapshot::Kind kind,
+    NonStreamingWriteStream* vm_snapshot_data,
+    NonStreamingWriteStream* isolate_snapshot_data,
+    ImageWriter* vm_image_writer,
+    ImageWriter* isolate_image_writer)
+    : thread_(Thread::Current()),
+      kind_(kind),
+      vm_snapshot_data_(vm_snapshot_data),
+      isolate_snapshot_data_(isolate_snapshot_data),
+      vm_isolate_snapshot_size_(0),
+      isolate_snapshot_size_(0),
+      vm_image_writer_(vm_image_writer),
+      isolate_image_writer_(isolate_image_writer) {
+  ASSERT(isolate_group() != NULL);
+  ASSERT(heap() != NULL);
+  ObjectStore* object_store = isolate_group()->object_store();
+  ASSERT(object_store != NULL);
+
+#if defined(DEBUG)
+  isolate_group()->ValidateClassTable();
+  isolate_group()->ValidateConstants();
+#endif  // DEBUG
+
+#if defined(DART_PRECOMPILER)
+  if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+    profile_writer_ = new (zone()) V8SnapshotProfileWriter(zone());
+  }
+#endif
+}
+
+FullSnapshotWriter::~FullSnapshotWriter() {}
+
+ZoneGrowableArray<Object*>* FullSnapshotWriter::WriteVMSnapshot() {
+  TIMELINE_DURATION(thread(), Isolate, "WriteVMSnapshot");
+
+  ASSERT(vm_snapshot_data_ != nullptr);
+  Serializer serializer(thread(), kind_, vm_snapshot_data_, vm_image_writer_,
+                        /*vm=*/true, profile_writer_);
+
+  serializer.ReserveHeader();
+  serializer.WriteVersionAndFeatures(true);
+  VMSerializationRoots roots(
+      Array::Handle(Dart::vm_isolate_group()->object_store()->symbol_table()),
+      /*should_write_symbols=*/!Snapshot::IncludesStringsInROData(kind_));
+  ZoneGrowableArray<Object*>* objects = serializer.Serialize(&roots);
+  serializer.FillHeader(serializer.kind());
+  clustered_vm_size_ = serializer.bytes_written();
+  heap_vm_size_ = serializer.bytes_heap_allocated();
+
+  if (Snapshot::IncludesCode(kind_)) {
+    vm_image_writer_->SetProfileWriter(profile_writer_);
+    vm_image_writer_->Write(serializer.stream(), true);
+    mapped_data_size_ += vm_image_writer_->data_size();
+    mapped_text_size_ += vm_image_writer_->text_size();
+    vm_image_writer_->ResetOffsets();
+    vm_image_writer_->ClearProfileWriter();
+  }
+
+  // The clustered part + the direct mapped data part.
+  vm_isolate_snapshot_size_ = serializer.bytes_written();
+  return objects;
+}
+
+void FullSnapshotWriter::WriteProgramSnapshot(
+    ZoneGrowableArray<Object*>* objects,
+    GrowableArray<LoadingUnitSerializationData*>* units) {
+  TIMELINE_DURATION(thread(), Isolate, "WriteProgramSnapshot");
+
+  ASSERT(isolate_snapshot_data_ != nullptr);
+  Serializer serializer(thread(), kind_, isolate_snapshot_data_,
+                        isolate_image_writer_, /*vm=*/false, profile_writer_);
+  serializer.set_loading_units(units);
+  serializer.set_current_loading_unit_id(LoadingUnit::kRootId);
+  ObjectStore* object_store = isolate_group()->object_store();
+  ASSERT(object_store != NULL);
+
+  // These type arguments must always be retained.
+  ASSERT(object_store->type_argument_int()->untag()->IsCanonical());
+  ASSERT(object_store->type_argument_double()->untag()->IsCanonical());
+  ASSERT(object_store->type_argument_string()->untag()->IsCanonical());
+  ASSERT(object_store->type_argument_string_dynamic()->untag()->IsCanonical());
+  ASSERT(object_store->type_argument_string_string()->untag()->IsCanonical());
+
+  serializer.ReserveHeader();
+  serializer.WriteVersionAndFeatures(false);
+  ProgramSerializationRoots roots(objects, object_store, kind_);
+  objects = serializer.Serialize(&roots);
+  if (units != nullptr) {
+    (*units)[LoadingUnit::kRootId]->set_objects(objects);
+  }
+  serializer.FillHeader(serializer.kind());
+  clustered_isolate_size_ = serializer.bytes_written();
+  heap_isolate_size_ = serializer.bytes_heap_allocated();
+
+  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::WriteUnitSnapshot(
+    GrowableArray<LoadingUnitSerializationData*>* units,
+    LoadingUnitSerializationData* unit,
+    uint32_t program_hash) {
+  TIMELINE_DURATION(thread(), Isolate, "WriteUnitSnapshot");
+
+  Serializer serializer(thread(), kind_, isolate_snapshot_data_,
+                        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.Write(program_hash);
+
+  UnitSerializationRoots roots(unit);
+  unit->set_objects(serializer.Serialize(&roots));
+
+  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) {
+  ZoneGrowableArray<Object*>* objects;
+  if (vm_snapshot_data_ != nullptr) {
+    objects = WriteVMSnapshot();
+  } else {
+    objects = nullptr;
+  }
+
+  if (isolate_snapshot_data_ != nullptr) {
+    WriteProgramSnapshot(objects, data);
+  }
+
+  if (FLAG_print_snapshot_sizes) {
+    OS::Print("VMIsolate(CodeSize): %" Pd "\n", clustered_vm_size_);
+    OS::Print("Isolate(CodeSize): %" Pd "\n", clustered_isolate_size_);
+    OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", mapped_data_size_);
+    OS::Print("Instructions(CodeSize): %" Pd "\n", mapped_text_size_);
+    OS::Print("Total(CodeSize): %" Pd "\n",
+              clustered_vm_size_ + clustered_isolate_size_ + mapped_data_size_ +
+                  mapped_text_size_);
+    OS::Print("VMIsolate(HeapSize): %" Pd "\n", heap_vm_size_);
+    OS::Print("Isolate(HeapSize): %" Pd "\n", heap_isolate_size_);
+    OS::Print("Total(HeapSize): %" Pd "\n", heap_vm_size_ + heap_isolate_size_);
+  }
+
+#if defined(DART_PRECOMPILER)
+  if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+    profile_writer_->Write(FLAG_write_v8_snapshot_profile_to);
+  }
+#endif
+}
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+FullSnapshotReader::FullSnapshotReader(const Snapshot* snapshot,
+                                       const uint8_t* instructions_buffer,
+                                       Thread* thread)
+    : kind_(snapshot->kind()),
+      thread_(thread),
+      buffer_(snapshot->Addr()),
+      size_(snapshot->length()),
+      data_image_(snapshot->DataImage()),
+      instructions_image_(instructions_buffer) {}
+
+char* SnapshotHeaderReader::InitializeGlobalVMFlagsFromSnapshot(
+    const Snapshot* snapshot) {
+  SnapshotHeaderReader header_reader(snapshot);
+
+  char* error = header_reader.VerifyVersion();
+  if (error != nullptr) {
+    return error;
+  }
+
+  const char* features = nullptr;
+  intptr_t features_length = 0;
+  error = header_reader.ReadFeatures(&features, &features_length);
+  if (error != nullptr) {
+    return error;
+  }
+
+  ASSERT(features[features_length] == '\0');
+  const char* cursor = features;
+  while (*cursor != '\0') {
+    while (*cursor == ' ') {
+      cursor++;
+    }
+
+    const char* end = strstr(cursor, " ");
+    if (end == nullptr) {
+      end = features + features_length;
+    }
+
+#define SET_FLAG(name)                                                         \
+  if (strncmp(cursor, #name, end - cursor) == 0) {                             \
+    FLAG_##name = true;                                                        \
+    cursor = end;                                                              \
+    continue;                                                                  \
+  }                                                                            \
+  if (strncmp(cursor, "no-" #name, end - cursor) == 0) {                       \
+    FLAG_##name = false;                                                       \
+    cursor = end;                                                              \
+    continue;                                                                  \
+  }
+
+#define CHECK_FLAG(name, mode)                                                 \
+  if (strncmp(cursor, #name, end - cursor) == 0) {                             \
+    if (!FLAG_##name) {                                                        \
+      return header_reader.BuildError("Flag " #name                            \
+                                      " is true in snapshot, "                 \
+                                      "but " #name                             \
+                                      " is always false in " mode);            \
+    }                                                                          \
+    cursor = end;                                                              \
+    continue;                                                                  \
+  }                                                                            \
+  if (strncmp(cursor, "no-" #name, end - cursor) == 0) {                       \
+    if (FLAG_##name) {                                                         \
+      return header_reader.BuildError("Flag " #name                            \
+                                      " is false in snapshot, "                \
+                                      "but " #name                             \
+                                      " is always true in " mode);             \
+    }                                                                          \
+    cursor = end;                                                              \
+    continue;                                                                  \
+  }
+
+#define SET_P(name, T, DV, C) SET_FLAG(name)
+
+#if defined(PRODUCT)
+#define SET_OR_CHECK_R(name, PV, T, DV, C) CHECK_FLAG(name, "product mode")
+#else
+#define SET_OR_CHECK_R(name, PV, T, DV, C) SET_FLAG(name)
+#endif
+
+#if defined(PRODUCT)
+#define SET_OR_CHECK_C(name, PCV, PV, T, DV, C) CHECK_FLAG(name, "product mode")
+#elif defined(DART_PRECOMPILED_RUNTIME)
+#define SET_OR_CHECK_C(name, PCV, PV, T, DV, C)                                \
+  CHECK_FLAG(name, "the precompiled runtime")
+#else
+#define SET_OR_CHECK_C(name, PV, T, DV, C) SET_FLAG(name)
+#endif
+
+#if !defined(DEBUG)
+#define SET_OR_CHECK_D(name, T, DV, C) CHECK_FLAG(name, "non-debug mode")
+#else
+#define SET_OR_CHECK_D(name, T, DV, C) SET_FLAG(name)
+#endif
+
+    VM_GLOBAL_FLAG_LIST(SET_P, SET_OR_CHECK_R, SET_OR_CHECK_C, SET_OR_CHECK_D)
+
+#undef SET_OR_CHECK_D
+#undef SET_OR_CHECK_C
+#undef SET_OR_CHECK_R
+#undef SET_P
+#undef CHECK_FLAG
+#undef SET_FLAG
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+    if (FLAG_sound_null_safety == kNullSafetyOptionUnspecified) {
+      if (strncmp(cursor, "null-safety", end - cursor) == 0) {
+        FLAG_sound_null_safety = kNullSafetyOptionStrong;
+        cursor = end;
+        continue;
+      }
+      if (strncmp(cursor, "no-null-safety", end - cursor) == 0) {
+        FLAG_sound_null_safety = kNullSafetyOptionWeak;
+        cursor = end;
+        continue;
+      }
+    }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+    cursor = end;
+  }
+
+  return nullptr;
+}
+
+bool SnapshotHeaderReader::NullSafetyFromSnapshot(const Snapshot* snapshot) {
+  bool null_safety = false;
+  SnapshotHeaderReader header_reader(snapshot);
+  const char* features = nullptr;
+  intptr_t features_length = 0;
+
+  char* error = header_reader.ReadFeatures(&features, &features_length);
+  if (error != nullptr) {
+    return false;
+  }
+
+  ASSERT(features[features_length] == '\0');
+  const char* cursor = features;
+  while (*cursor != '\0') {
+    while (*cursor == ' ') {
+      cursor++;
+    }
+
+    const char* end = strstr(cursor, " ");
+    if (end == nullptr) {
+      end = features + features_length;
+    }
+
+    if (strncmp(cursor, "null-safety", end - cursor) == 0) {
+      cursor = end;
+      null_safety = true;
+      continue;
+    }
+    if (strncmp(cursor, "no-null-safety", end - cursor) == 0) {
+      cursor = end;
+      null_safety = false;
+      continue;
+    }
+
+    cursor = end;
+  }
+
+  return null_safety;
+}
+
+ApiErrorPtr FullSnapshotReader::ReadVMSnapshot() {
+  SnapshotHeaderReader header_reader(kind_, buffer_, size_);
+
+  intptr_t offset = 0;
+  char* error = header_reader.VerifyVersionAndFeatures(
+      /*isolate_group=*/nullptr, &offset);
+  if (error != nullptr) {
+    return ConvertToApiError(error);
+  }
+
+  Deserializer deserializer(thread_, kind_, buffer_, size_, data_image_,
+                            instructions_image_, /*is_non_root_unit=*/false,
+                            offset);
+  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
+  if (api_error != ApiError::null()) {
+    return api_error;
+  }
+
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(data_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(data_image_,
+                                             /* is_executable */ false);
+    ASSERT(instructions_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(instructions_image_,
+                                             /* is_executable */ true);
+  }
+
+  VMDeserializationRoots roots;
+  deserializer.Deserialize(&roots);
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  // Initialize entries in the VM portion of the BSS segment.
+  ASSERT(Snapshot::IncludesCode(kind_));
+  Image image(instructions_image_);
+  if (auto const bss = image.bss()) {
+    BSS::Initialize(thread_, bss, /*vm=*/true);
+  }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+  return ApiError::null();
+}
+
+ApiErrorPtr FullSnapshotReader::ReadProgramSnapshot() {
+  SnapshotHeaderReader header_reader(kind_, buffer_, size_);
+  intptr_t offset = 0;
+  char* error =
+      header_reader.VerifyVersionAndFeatures(thread_->isolate_group(), &offset);
+  if (error != nullptr) {
+    return ConvertToApiError(error);
+  }
+
+  Deserializer deserializer(thread_, kind_, buffer_, size_, data_image_,
+                            instructions_image_, /*is_non_root_unit=*/false,
+                            offset);
+  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
+  if (api_error != ApiError::null()) {
+    return api_error;
+  }
+
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(data_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(data_image_,
+                                             /* is_executable */ false);
+    ASSERT(instructions_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(instructions_image_,
+                                             /* is_executable */ true);
+  }
+
+  ProgramDeserializationRoots roots(thread_->isolate_group()->object_store());
+  deserializer.Deserialize(&roots);
+
+  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_group(), &offset);
+  if (error != nullptr) {
+    return ConvertToApiError(error);
+  }
+
+  Deserializer deserializer(
+      thread_, kind_, buffer_, size_, data_image_, instructions_image_,
+      /*is_non_root_unit=*/unit.id() != LoadingUnit::kRootId, offset);
+  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
+  if (api_error != ApiError::null()) {
+    return api_error;
+  }
+  {
+    Array& units =
+        Array::Handle(isolate_group()->object_store()->loading_units());
+    uint32_t main_program_hash = Smi::Value(Smi::RawCast(units.At(0)));
+    uint32_t unit_program_hash = deserializer.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")));
+    }
+  }
+
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(data_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(data_image_,
+                                             /* is_executable */ false);
+    ASSERT(instructions_image_ != NULL);
+    thread_->isolate_group()->SetupImagePage(instructions_image_,
+                                             /* is_executable */ true);
+  }
+
+  UnitDeserializationRoots roots(unit);
+  deserializer.Deserialize(&roots);
+
+  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
+    // object pool.  The [code] is initialized (at AOT compile-time) to be a
+    // [StubCode::SwitchableCallMiss].
+    //
+    // In --use-bare-instruction we reduce the extra indirection via the [code]
+    // object and store instead (ic_data, entrypoint) in the object pool.
+    //
+    // Since the actual [entrypoint] is only known at AOT runtime we switch all
+    // existing UnlinkedCall entries in the object pool to be it's entrypoint.
+    auto zone = thread_->zone();
+    const auto& pool = ObjectPool::Handle(
+        zone, ObjectPool::RawCast(
+                  isolate_group()->object_store()->global_object_pool()));
+    auto& entry = Object::Handle(zone);
+    auto& smi = Smi::Handle(zone);
+    for (intptr_t i = 0; i < pool.Length(); i++) {
+      if (pool.TypeAt(i) == ObjectPool::EntryType::kTaggedObject) {
+        entry = pool.ObjectAt(i);
+        if (entry.ptr() == StubCode::SwitchableCallMiss().ptr()) {
+          smi = Smi::FromAlignedAddress(
+              StubCode::SwitchableCallMiss().MonomorphicEntryPoint());
+          pool.SetTypeAt(i, ObjectPool::EntryType::kImmediate,
+                         ObjectPool::Patchability::kPatchable);
+          pool.SetObjectAt(i, smi);
+        } else if (entry.ptr() == StubCode::MegamorphicCall().ptr()) {
+          smi = Smi::FromAlignedAddress(
+              StubCode::MegamorphicCall().MonomorphicEntryPoint());
+          pool.SetTypeAt(i, ObjectPool::EntryType::kImmediate,
+                         ObjectPool::Patchability::kPatchable);
+          pool.SetObjectAt(i, smi);
+        }
+      }
+    }
+  }
+#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_);
+  if (auto const bss = image.bss()) {
+    BSS::Initialize(thread_, bss, /*vm=*/false);
+  }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+}
+
+}  // namespace dart
diff --git a/runtime/vm/app_snapshot.h b/runtime/vm/app_snapshot.h
new file mode 100644
index 0000000..da96ab4
--- /dev/null
+++ b/runtime/vm/app_snapshot.h
@@ -0,0 +1,823 @@
+// 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.
+
+#ifndef RUNTIME_VM_APP_SNAPSHOT_H_
+#define RUNTIME_VM_APP_SNAPSHOT_H_
+
+#include "platform/assert.h"
+#include "vm/allocation.h"
+#include "vm/bitfield.h"
+#include "vm/datastream.h"
+#include "vm/globals.h"
+#include "vm/growable_array.h"
+#include "vm/hash_map.h"
+#include "vm/heap/heap.h"
+#include "vm/image_snapshot.h"
+#include "vm/object.h"
+#include "vm/raw_object_fields.h"
+#include "vm/snapshot.h"
+#include "vm/version.h"
+
+#if defined(DEBUG)
+#define SNAPSHOT_BACKTRACE
+#endif
+
+namespace dart {
+
+// 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
+// class instead once per object, and to allow filling the objects in a tight
+// loop. The snapshot has two major sections: the first describes how to
+// allocate the objects and the second describes how to initialize them.
+// Deserialization starts by allocating a reference array large enough to hold
+// the base objects (objects already available to both the serializer and
+// deserializer) and the objects written in the snapshot. The allocation section
+// is then read for each cluster, filling the reference array. Then the
+// initialization/fill secton is read for each cluster, using the indices into
+// the reference array to fill pointers. At this point, every object has been
+// touched exactly once and in order, making this approach very cache friendly.
+// Finally, each cluster is given an opportunity to perform some fix-ups that
+// 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_(), objects_(nullptr) {}
+
+  intptr_t id() const { return id_; }
+  LoadingUnitSerializationData* parent() const { return parent_; }
+  void AddDeferredObject(CodePtr obj) {
+    deferred_objects_.Add(&Code::ZoneHandle(obj));
+  }
+  GrowableArray<Code*>* deferred_objects() { return &deferred_objects_; }
+  ZoneGrowableArray<Object*>* objects() {
+    ASSERT(objects_ != nullptr);
+    return objects_;
+  }
+  void set_objects(ZoneGrowableArray<Object*>* objects) {
+    ASSERT(objects_ == nullptr);
+    objects_ = objects;
+  }
+
+ private:
+  intptr_t id_;
+  LoadingUnitSerializationData* parent_;
+  GrowableArray<Code*> deferred_objects_;
+  ZoneGrowableArray<Object*>* objects_;
+};
+
+class SerializationCluster : public ZoneAllocated {
+ public:
+  static constexpr intptr_t kSizeVaries = -1;
+  explicit SerializationCluster(const char* name,
+                                intptr_t cid,
+                                intptr_t target_instance_size = kSizeVaries,
+                                bool is_canonical = false)
+      : name_(name),
+        cid_(cid),
+        target_instance_size_(target_instance_size),
+        is_canonical_(is_canonical) {
+    ASSERT(target_instance_size == kSizeVaries || target_instance_size >= 0);
+  }
+  virtual ~SerializationCluster() {}
+
+  // Add [object] to the cluster and push its outgoing references.
+  virtual void Trace(Serializer* serializer, ObjectPtr object) = 0;
+
+  // Write the cluster type and information needed to allocate the cluster's
+  // objects. For fixed sized objects, this is just the object count. For
+  // variable sized objects, this is the object count and length of each object.
+  virtual void WriteAlloc(Serializer* serializer) = 0;
+
+  // Write the byte and reference data of the cluster's objects.
+  virtual void WriteFill(Serializer* serializer) = 0;
+
+  void WriteAndMeasureAlloc(Serializer* serializer);
+  void WriteAndMeasureFill(Serializer* serializer);
+
+  const char* name() const { return name_; }
+  intptr_t cid() const { return cid_; }
+  bool is_canonical() const { return is_canonical_; }
+  intptr_t size() const { return size_; }
+  intptr_t num_objects() const { return num_objects_; }
+
+  // Returns number of bytes needed for deserialized objects in
+  // this cluster. Printed in --print_snapshot_sizes_verbose statistics.
+  //
+  // In order to calculate this size, clusters of fixed-size objects
+  // can pass instance size as [target_instance_size] constructor parameter.
+  // Otherwise clusters should count [target_memory_size] in
+  // their [WriteAlloc] methods.
+  intptr_t target_memory_size() const { return target_memory_size_; }
+
+ protected:
+  const char* const name_;
+  const intptr_t cid_;
+  const intptr_t target_instance_size_;
+  const bool is_canonical_;
+  intptr_t size_ = 0;
+  intptr_t num_objects_ = 0;
+  intptr_t target_memory_size_ = 0;
+};
+
+class DeserializationCluster : public ZoneAllocated {
+ public:
+  explicit DeserializationCluster(const char* name, bool is_canonical = false)
+      : name_(name),
+        is_canonical_(is_canonical),
+        start_index_(-1),
+        stop_index_(-1) {}
+  virtual ~DeserializationCluster() {}
+
+  // Allocate memory for all objects in the cluster and write their addresses
+  // into the ref array. Do not touch this memory.
+  virtual void ReadAlloc(Deserializer* deserializer) = 0;
+
+  // Initialize the cluster's objects. Do not touch the memory of other objects.
+  virtual void ReadFill(Deserializer* deserializer, bool primary) = 0;
+
+  // Complete any action that requires the full graph to be deserialized, such
+  // as rehashing.
+  virtual void PostLoad(Deserializer* deserializer,
+                        const Array& refs,
+                        bool primary) {
+    if (!primary && is_canonical()) {
+      FATAL1("%s needs canonicalization but doesn't define PostLoad", name());
+    }
+  }
+
+  const char* name() const { return name_; }
+  bool is_canonical() const { return is_canonical_; }
+
+ protected:
+  void ReadAllocFixedSize(Deserializer* deserializer, intptr_t instance_size);
+
+  const char* const name_;
+  const bool is_canonical_;
+  // The range of the ref array that belongs to this cluster.
+  intptr_t start_index_;
+  intptr_t stop_index_;
+};
+
+class SerializationRoots {
+ public:
+  virtual ~SerializationRoots() {}
+  virtual void AddBaseObjects(Serializer* serializer) = 0;
+  virtual void PushRoots(Serializer* serializer) = 0;
+  virtual void WriteRoots(Serializer* serializer) = 0;
+};
+
+class DeserializationRoots {
+ public:
+  virtual ~DeserializationRoots() {}
+  // Returns true if these roots are the first snapshot loaded into a heap, and
+  // so can assume any canonical objects don't already exist. Returns false if
+  // some other snapshot may be loaded before these roots, and so written
+  // canonical objects need to run canonicalization during load.
+  virtual bool AddBaseObjects(Deserializer* deserializer) = 0;
+  virtual void ReadRoots(Deserializer* deserializer) = 0;
+  virtual void PostLoad(Deserializer* deserializer, const Array& refs) = 0;
+};
+
+// 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 constexpr intptr_t kUnreachableReference = 0;
+COMPILE_ASSERT(kUnreachableReference == WeakTable::kNoValue);
+static constexpr intptr_t kFirstReference = 1;
+
+// Reference value for traced objects that have not been allocated their final
+// reference ID.
+static const intptr_t kUnallocatedReference = -1;
+
+static constexpr bool IsAllocatedReference(intptr_t ref) {
+  return ref > kUnreachableReference;
+}
+
+static constexpr bool IsArtificialReference(intptr_t ref) {
+  return ref < kUnallocatedReference;
+}
+
+static constexpr bool IsReachableReference(intptr_t ref) {
+  return ref == kUnallocatedReference || IsAllocatedReference(ref);
+}
+
+class CodeSerializationCluster;
+
+class Serializer : public ThreadStackResource {
+ public:
+  Serializer(Thread* thread,
+             Snapshot::Kind kind,
+             NonStreamingWriteStream* stream,
+             ImageWriter* image_writer_,
+             bool vm_,
+             V8SnapshotProfileWriter* profile_writer = nullptr);
+  ~Serializer();
+
+  void AddBaseObject(ObjectPtr base_object,
+                     const char* type = nullptr,
+                     const char* name = nullptr);
+  intptr_t AssignRef(ObjectPtr object);
+  intptr_t AssignArtificialRef(ObjectPtr object = nullptr);
+
+  void Push(ObjectPtr object);
+
+  void AddUntracedRef() { num_written_objects_++; }
+
+  void Trace(ObjectPtr object);
+
+  void UnexpectedObject(ObjectPtr object, const char* message);
+#if defined(SNAPSHOT_BACKTRACE)
+  ObjectPtr ParentOf(const Object& object);
+#endif
+
+  SerializationCluster* NewClusterForClass(intptr_t cid, bool is_canonical);
+
+  void ReserveHeader() {
+    // Make room for recording snapshot buffer size.
+    stream_->SetPosition(Snapshot::kHeaderSize);
+  }
+
+  void FillHeader(Snapshot::Kind kind) {
+    Snapshot* header = reinterpret_cast<Snapshot*>(stream_->buffer());
+    header->set_magic();
+    header->set_length(stream_->bytes_written());
+    header->set_kind(kind);
+  }
+
+  void WriteVersionAndFeatures(bool is_vm_snapshot);
+
+  ZoneGrowableArray<Object*>* Serialize(SerializationRoots* roots);
+  void PrintSnapshotSizes();
+
+  FieldTable* initial_field_table() const { return initial_field_table_; }
+
+  NonStreamingWriteStream* stream() { return stream_; }
+  intptr_t bytes_written() { return stream_->bytes_written(); }
+  intptr_t bytes_heap_allocated() { return bytes_heap_allocated_; }
+
+  class WritingObjectScope : ValueObject {
+   public:
+    WritingObjectScope(Serializer* serializer,
+                       const char* type,
+                       ObjectPtr object,
+                       StringPtr name)
+        : WritingObjectScope(
+              serializer,
+              ReserveId(serializer,
+                        type,
+                        object,
+                        String::ToCString(serializer->thread(), name)),
+              object) {}
+
+    WritingObjectScope(Serializer* serializer,
+                       const char* type,
+                       ObjectPtr object,
+                       const char* name)
+        : WritingObjectScope(serializer,
+                             ReserveId(serializer, type, object, name),
+                             object) {}
+
+    WritingObjectScope(Serializer* serializer,
+                       const V8SnapshotProfileWriter::ObjectId& id,
+                       ObjectPtr object = nullptr);
+
+    WritingObjectScope(Serializer* serializer, ObjectPtr object)
+        : WritingObjectScope(serializer,
+                             serializer->GetProfileId(object),
+                             object) {}
+
+    ~WritingObjectScope();
+
+   private:
+    static V8SnapshotProfileWriter::ObjectId ReserveId(Serializer* serializer,
+                                                       const char* type,
+                                                       ObjectPtr object,
+                                                       const char* name);
+
+   private:
+    Serializer* const serializer_;
+    const ObjectPtr old_object_;
+    const V8SnapshotProfileWriter::ObjectId old_id_;
+    const classid_t old_cid_;
+  };
+
+  // Writes raw data to the stream (basic type).
+  // sizeof(T) must be in {1,2,4,8}.
+  template <typename T>
+  void Write(T value) {
+    BaseWriteStream::Raw<sizeof(T), T>::Write(stream_, value);
+  }
+  void WriteUnsigned(intptr_t value) { stream_->WriteUnsigned(value); }
+  void WriteUnsigned64(uint64_t value) { stream_->WriteUnsigned(value); }
+
+  void WriteWordWith32BitWrites(uword value) {
+    stream_->WriteWordWith32BitWrites(value);
+  }
+
+  void WriteBytes(const uint8_t* addr, intptr_t len) {
+    stream_->WriteBytes(addr, len);
+  }
+  void Align(intptr_t alignment) { stream_->Align(alignment); }
+
+  V8SnapshotProfileWriter::ObjectId GetProfileId(ObjectPtr object) const;
+  V8SnapshotProfileWriter::ObjectId GetProfileId(intptr_t ref) const;
+
+  void WriteRootRef(ObjectPtr object, const char* name = nullptr) {
+    intptr_t id = RefId(object);
+    WriteUnsigned(id);
+    if (profile_writer_ != nullptr) {
+      profile_writer_->AddRoot(GetProfileId(object), name);
+    }
+  }
+
+  // Record a reference from the currently written object to the given object
+  // and return reference id for the given object.
+  void AttributeReference(ObjectPtr object,
+                          const V8SnapshotProfileWriter::Reference& reference);
+
+  void AttributeElementRef(ObjectPtr object, intptr_t index) {
+    AttributeReference(object,
+                       V8SnapshotProfileWriter::Reference::Element(index));
+  }
+
+  void WriteElementRef(ObjectPtr object, intptr_t index) {
+    AttributeElementRef(object, index);
+    WriteUnsigned(RefId(object));
+  }
+
+  void AttributePropertyRef(ObjectPtr object, const char* property) {
+    AttributeReference(object,
+                       V8SnapshotProfileWriter::Reference::Property(property));
+  }
+
+  void WritePropertyRef(ObjectPtr object, const char* property) {
+    AttributePropertyRef(object, property);
+    WriteUnsigned(RefId(object));
+  }
+
+  void WriteOffsetRef(ObjectPtr object, intptr_t offset) {
+    intptr_t id = RefId(object);
+    WriteUnsigned(id);
+    if (profile_writer_ != nullptr) {
+      if (auto const property = offsets_table_->FieldNameForOffset(
+              object_currently_writing_.cid_, offset)) {
+        AttributePropertyRef(object, property);
+      } else {
+        AttributeElementRef(object, offset);
+      }
+    }
+  }
+
+  template <typename T, typename... P>
+  void WriteFromTo(T obj, P&&... args) {
+    auto* from = obj->untag()->from();
+    auto* to = obj->untag()->to_snapshot(kind(), args...);
+    WriteRange(obj, from, to);
+  }
+
+  template <typename T>
+  DART_NOINLINE void WriteRange(ObjectPtr obj, T from, T to) {
+    for (auto* p = from; p <= to; p++) {
+      WriteOffsetRef(
+          p->Decompress(obj->heap_base()),
+          reinterpret_cast<uword>(p) - reinterpret_cast<uword>(obj->untag()));
+    }
+  }
+
+  template <typename T, typename... P>
+  void PushFromTo(T obj, P&&... args) {
+    auto* from = obj->untag()->from();
+    auto* to = obj->untag()->to_snapshot(kind(), args...);
+    PushRange(obj, from, to);
+  }
+
+  template <typename T>
+  DART_NOINLINE void PushRange(ObjectPtr obj, T from, T to) {
+    for (auto* p = from; p <= to; p++) {
+      Push(p->Decompress(obj->heap_base()));
+    }
+  }
+
+  void WriteTokenPosition(TokenPosition pos) { Write(pos.Serialize()); }
+
+  void WriteCid(intptr_t cid) {
+    COMPILE_ASSERT(UntaggedObject::kClassIdTagSize <= 32);
+    Write<int32_t>(cid);
+  }
+
+  // Sorts Code objects and reorders instructions before writing snapshot.
+  // Returns length of instructions table (in bare instructions mode).
+  intptr_t PrepareInstructions();
+
+  void WriteInstructions(InstructionsPtr instr,
+                         uint32_t unchecked_offset,
+                         CodePtr code,
+                         bool deferred);
+  uint32_t GetDataOffset(ObjectPtr object) const;
+  void TraceDataOffset(uint32_t offset);
+  intptr_t GetDataSize() const;
+
+  void WriteDispatchTable(const Array& entries);
+
+  Heap* heap() const { return heap_; }
+  Zone* zone() const { return zone_; }
+  Snapshot::Kind kind() const { return kind_; }
+  intptr_t next_ref_index() const { return next_ref_index_; }
+
+  void DumpCombinedCodeStatistics();
+
+  V8SnapshotProfileWriter* profile_writer() const { return profile_writer_; }
+
+  // If the given [obj] was not included into the snapshot and have not
+  // yet gotten an artificial node created for it create an artificial node
+  // in the profile representing this object.
+  // Returns true if [obj] has an artificial profile node associated with it.
+  bool CreateArtificialNodeIfNeeded(ObjectPtr obj);
+
+  bool InCurrentLoadingUnitOrRoot(ObjectPtr obj);
+  void RecordDeferredCode(CodePtr ptr);
+  GrowableArray<LoadingUnitSerializationData*>* loading_units() const {
+    return loading_units_;
+  }
+  void set_loading_units(GrowableArray<LoadingUnitSerializationData*>* units) {
+    loading_units_ = units;
+  }
+  intptr_t current_loading_unit_id() const { return current_loading_unit_id_; }
+  void set_current_loading_unit_id(intptr_t id) {
+    current_loading_unit_id_ = id;
+  }
+
+  // Returns the reference ID for the object. Fails for objects that have not
+  // been allocated a reference ID yet, so should be used only after all
+  // WriteAlloc calls.
+  intptr_t RefId(ObjectPtr object) const;
+
+  // Same as RefId, but allows artificial and unreachable references. Still
+  // fails for unallocated references.
+  intptr_t UnsafeRefId(ObjectPtr object) const;
+
+  // Whether the object is reachable.
+  bool IsReachable(ObjectPtr object) const {
+    return IsReachableReference(heap_->GetObjectId(object));
+  }
+  // Whether the object has an allocated reference.
+  bool HasRef(ObjectPtr object) const {
+    return IsAllocatedReference(heap_->GetObjectId(object));
+  }
+  // Whether the object only appears in the V8 snapshot profile.
+  bool HasArtificialRef(ObjectPtr object) const {
+    return IsArtificialReference(heap_->GetObjectId(object));
+  }
+  // Whether a node for the object already has been added to the V8 snapshot
+  // profile.
+  bool HasProfileNode(ObjectPtr object) const {
+    ASSERT(profile_writer_ != nullptr);
+    return profile_writer_->HasId(GetProfileId(object));
+  }
+  bool IsWritten(ObjectPtr object) const {
+    return heap_->GetObjectId(object) > num_base_objects_;
+  }
+
+ private:
+  const char* ReadOnlyObjectType(intptr_t cid);
+  void FlushProfile();
+
+  Heap* heap_;
+  Zone* zone_;
+  Snapshot::Kind kind_;
+  NonStreamingWriteStream* stream_;
+  ImageWriter* image_writer_;
+  SerializationCluster** canonical_clusters_by_cid_;
+  SerializationCluster** clusters_by_cid_;
+  CodeSerializationCluster* code_cluster_ = nullptr;
+  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_;
+  intptr_t previous_text_offset_;
+  FieldTable* initial_field_table_;
+
+  intptr_t dispatch_table_size_ = 0;
+  intptr_t bytes_heap_allocated_ = 0;
+  intptr_t instructions_table_len_ = 0;
+
+  // True if writing VM snapshot, false for Isolate snapshot.
+  bool vm_;
+
+  V8SnapshotProfileWriter* profile_writer_ = nullptr;
+  struct ProfilingObject {
+    ObjectPtr object_ = nullptr;
+    // Unless within a WritingObjectScope, any bytes written are attributed to
+    // the artificial root.
+    V8SnapshotProfileWriter::ObjectId id_ =
+        V8SnapshotProfileWriter::kArtificialRootId;
+    intptr_t last_stream_position_ = 0;
+    intptr_t cid_ = -1;
+  } object_currently_writing_;
+  OffsetsTable* offsets_table_ = nullptr;
+
+#if defined(SNAPSHOT_BACKTRACE)
+  ObjectPtr current_parent_;
+  GrowableArray<Object*> parent_pairs_;
+#endif
+
+#if defined(DART_PRECOMPILER)
+  IntMap<intptr_t> deduped_instructions_sources_;
+#endif
+
+  intptr_t current_loading_unit_id_ = 0;
+  GrowableArray<LoadingUnitSerializationData*>* loading_units_ = nullptr;
+  ZoneGrowableArray<Object*>* objects_ = new ZoneGrowableArray<Object*>();
+
+  DISALLOW_IMPLICIT_CONSTRUCTORS(Serializer);
+};
+
+#define AutoTraceObject(obj)                                                   \
+  Serializer::WritingObjectScope scope_##__COUNTER__(s, name(), obj, nullptr)
+
+#define AutoTraceObjectName(obj, str)                                          \
+  Serializer::WritingObjectScope scope_##__COUNTER__(s, name(), obj, str)
+
+#define WriteFieldValue(field, value) s->WritePropertyRef(value, #field);
+
+#define WriteFromTo(obj, ...) s->WriteFromTo(obj, ##__VA_ARGS__);
+
+#define PushFromTo(obj, ...) s->PushFromTo(obj, ##__VA_ARGS__);
+
+#define WriteField(obj, field) s->WritePropertyRef(obj->untag()->field, #field)
+#define WriteCompressedField(obj, name)                                        \
+  s->WritePropertyRef(obj->untag()->name(), #name "_")
+
+// This class can be used to read version and features from a snapshot before
+// the VM has been initialized.
+class SnapshotHeaderReader {
+ public:
+  static char* InitializeGlobalVMFlagsFromSnapshot(const Snapshot* snapshot);
+  static bool NullSafetyFromSnapshot(const Snapshot* snapshot);
+
+  explicit SnapshotHeaderReader(const Snapshot* snapshot)
+      : SnapshotHeaderReader(snapshot->kind(),
+                             snapshot->Addr(),
+                             snapshot->length()) {}
+
+  SnapshotHeaderReader(Snapshot::Kind kind,
+                       const uint8_t* buffer,
+                       intptr_t size)
+      : kind_(kind), stream_(buffer, size) {
+    stream_.SetPosition(Snapshot::kHeaderSize);
+  }
+
+  // Verifies the version and features in the snapshot are compatible with the
+  // current VM.  If isolate is non-null it validates isolate-specific features.
+  //
+  // Returns null on success and a malloc()ed error on failure.
+  // The [offset] will be the next position in the snapshot stream after the
+  // features.
+  char* VerifyVersionAndFeatures(IsolateGroup* isolate_group, intptr_t* offset);
+
+ private:
+  char* VerifyVersion();
+  char* ReadFeatures(const char** features, intptr_t* features_length);
+  char* VerifyFeatures(IsolateGroup* isolate_group);
+  char* BuildError(const char* message);
+
+  Snapshot::Kind kind_;
+  ReadStream stream_;
+};
+
+class Deserializer : public ThreadStackResource {
+ public:
+  Deserializer(Thread* thread,
+               Snapshot::Kind kind,
+               const uint8_t* buffer,
+               intptr_t size,
+               const uint8_t* data_buffer,
+               const uint8_t* instructions_buffer,
+               bool is_non_root_unit,
+               intptr_t offset = 0);
+  ~Deserializer();
+
+  // Verifies the image alignment.
+  //
+  // Returns ApiError::null() on success and an ApiError with an an appropriate
+  // message otherwise.
+  ApiErrorPtr VerifyImageAlignment();
+
+  static void InitializeHeader(ObjectPtr raw,
+                               intptr_t cid,
+                               intptr_t size,
+                               bool is_canonical = false);
+
+  // Reads raw data (for basic types).
+  // sizeof(T) must be in {1,2,4,8}.
+  template <typename T>
+  T Read() {
+    return ReadStream::Raw<sizeof(T), T>::Read(&stream_);
+  }
+  intptr_t ReadUnsigned() { return stream_.ReadUnsigned(); }
+  uint64_t ReadUnsigned64() { return stream_.ReadUnsigned<uint64_t>(); }
+  void ReadBytes(uint8_t* addr, intptr_t len) { stream_.ReadBytes(addr, len); }
+
+  uword ReadWordWith32BitReads() { return stream_.ReadWordWith32BitReads(); }
+
+  intptr_t position() const { return stream_.Position(); }
+  void set_position(intptr_t p) { stream_.SetPosition(p); }
+  const uint8_t* CurrentBufferAddress() const {
+    return stream_.AddressOfCurrentPosition();
+  }
+
+  void Advance(intptr_t value) { stream_.Advance(value); }
+  void Align(intptr_t alignment) { stream_.Align(alignment); }
+
+  void AddBaseObject(ObjectPtr base_object) { AssignRef(base_object); }
+
+  void AssignRef(ObjectPtr object) {
+    ASSERT(next_ref_index_ <= num_objects_);
+    refs_->untag()->data()[next_ref_index_] = object;
+    next_ref_index_++;
+  }
+
+  ObjectPtr Ref(intptr_t index) const {
+    ASSERT(index > 0);
+    ASSERT(index <= num_objects_);
+    return refs_->untag()->element(index);
+  }
+
+  ObjectPtr ReadRef() { return Ref(ReadUnsigned()); }
+
+  template <typename T, typename... P>
+  void ReadFromTo(T obj, P&&... params) {
+    auto* from = obj->untag()->from();
+    auto* to_snapshot = obj->untag()->to_snapshot(kind(), params...);
+    auto* to = obj->untag()->to(params...);
+    for (auto* p = from; p <= to_snapshot; p++) {
+      *p = ReadRef();
+    }
+    // This is necessary because, unlike Object::Allocate, the clustered
+    // deserializer allocates object without null-initializing them. Instead,
+    // each deserialization cluster is responsible for initializing every field,
+    // ensuring that every field is written to exactly once.
+    for (auto* p = to_snapshot + 1; p <= to; p++) {
+      *p = Object::null();
+    }
+  }
+
+  TokenPosition ReadTokenPosition() {
+    return TokenPosition::Deserialize(Read<int32_t>());
+  }
+
+  intptr_t ReadCid() {
+    COMPILE_ASSERT(UntaggedObject::kClassIdTagSize <= 32);
+    return Read<int32_t>();
+  }
+
+  void ReadInstructions(CodePtr code, bool deferred, bool discarded);
+  void EndInstructions();
+  ObjectPtr GetObjectAt(uint32_t offset) const;
+
+  void Deserialize(DeserializationRoots* roots);
+
+  DeserializationCluster* ReadCluster();
+
+  void ReadDispatchTable() {
+    ReadDispatchTable(&stream_, /*deferred=*/false, -1, -1);
+  }
+  void ReadDispatchTable(ReadStream* stream,
+                         bool deferred,
+                         intptr_t deferred_code_start_index,
+                         intptr_t deferred_code_end_index);
+
+  intptr_t next_index() const { return next_ref_index_; }
+  Heap* heap() const { return heap_; }
+  Zone* zone() const { return zone_; }
+  Snapshot::Kind kind() const { return kind_; }
+  FieldTable* initial_field_table() const { return initial_field_table_; }
+  bool is_non_root_unit() const { return is_non_root_unit_; }
+  void set_code_start_index(intptr_t value) { code_start_index_ = value; }
+  intptr_t code_start_index() { return code_start_index_; }
+  const InstructionsTable& instructions_table() const {
+    return instructions_table_;
+  }
+
+ private:
+  Heap* heap_;
+  Zone* zone_;
+  Snapshot::Kind kind_;
+  ReadStream stream_;
+  ImageReader* image_reader_;
+  intptr_t num_base_objects_;
+  intptr_t num_objects_;
+  intptr_t num_clusters_;
+  ArrayPtr refs_;
+  intptr_t next_ref_index_;
+  intptr_t previous_text_offset_;
+  intptr_t code_start_index_ = 0;
+  intptr_t instructions_index_ = 0;
+  DeserializationCluster** clusters_;
+  FieldTable* initial_field_table_;
+  const bool is_non_root_unit_;
+  InstructionsTable& instructions_table_;
+};
+
+#define ReadFromTo(obj, ...) d->ReadFromTo(obj, ##__VA_ARGS__);
+
+class FullSnapshotWriter {
+ public:
+  static const intptr_t kInitialSize = 64 * KB;
+  FullSnapshotWriter(Snapshot::Kind kind,
+                     NonStreamingWriteStream* vm_snapshot_data,
+                     NonStreamingWriteStream* isolate_snapshot_data,
+                     ImageWriter* vm_image_writer,
+                     ImageWriter* iso_image_writer);
+  ~FullSnapshotWriter();
+
+  Thread* thread() const { return thread_; }
+  Zone* zone() const { return thread_->zone(); }
+  IsolateGroup* isolate_group() const { return thread_->isolate_group(); }
+  Heap* heap() const { return isolate_group()->heap(); }
+
+  // Writes a full snapshot of the program(VM isolate, regular isolate group).
+  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_; }
+
+ private:
+  // Writes a snapshot of the VM Isolate.
+  ZoneGrowableArray<Object*>* WriteVMSnapshot();
+
+  // Writes a full snapshot of regular Dart isolate group.
+  void WriteProgramSnapshot(ZoneGrowableArray<Object*>* objects,
+                            GrowableArray<LoadingUnitSerializationData*>* data);
+
+  Thread* thread_;
+  Snapshot::Kind kind_;
+  NonStreamingWriteStream* const vm_snapshot_data_;
+  NonStreamingWriteStream* const isolate_snapshot_data_;
+  intptr_t vm_isolate_snapshot_size_;
+  intptr_t isolate_snapshot_size_;
+  ImageWriter* vm_image_writer_;
+  ImageWriter* isolate_image_writer_;
+
+  // Stats for benchmarking.
+  intptr_t clustered_vm_size_ = 0;
+  intptr_t clustered_isolate_size_ = 0;
+  intptr_t mapped_data_size_ = 0;
+  intptr_t mapped_text_size_ = 0;
+  intptr_t heap_vm_size_ = 0;
+  intptr_t heap_isolate_size_ = 0;
+
+  V8SnapshotProfileWriter* profile_writer_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
+};
+
+class FullSnapshotReader {
+ public:
+  FullSnapshotReader(const Snapshot* snapshot,
+                     const uint8_t* instructions_buffer,
+                     Thread* thread);
+  ~FullSnapshotReader() {}
+
+  ApiErrorPtr ReadVMSnapshot();
+  ApiErrorPtr ReadProgramSnapshot();
+  ApiErrorPtr ReadUnitSnapshot(const LoadingUnit& unit);
+
+ private:
+  IsolateGroup* isolate_group() const { return thread_->isolate_group(); }
+
+  ApiErrorPtr ConvertToApiError(char* message);
+  void PatchGlobalObjectPool();
+  void InitializeBSS();
+
+  Snapshot::Kind kind_;
+  Thread* thread_;
+  const uint8_t* buffer_;
+  intptr_t size_;
+  const uint8_t* data_image_;
+  const uint8_t* instructions_image_;
+
+  DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader);
+};
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_APP_SNAPSHOT_H_
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 2fe4811..3c2345e 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -15,7 +15,7 @@
 #include "platform/globals.h"
 #include "platform/utils.h"
 
-#include "vm/clustered_snapshot.h"
+#include "vm/app_snapshot.h"
 #include "vm/dart_api_impl.h"
 #include "vm/datastream.h"
 #include "vm/message_snapshot.h"
@@ -166,20 +166,23 @@
 
 BENCHMARK(UseDartApi) {
   const int kNumIterations = 1000000;
-  const char* kScriptChars =
-      "import 'dart:nativewrappers';\n"
-      "class Class extends NativeFieldWrapperClass1 {\n"
-      "  void init() native 'init';\n"
-      "  int method(int param1, int param2) native 'method';\n"
-      "}\n"
-      "\n"
-      "void benchmark(int count) {\n"
-      "  Class c = Class();\n"
-      "  c.init();\n"
-      "  for (int i = 0; i < count; i++) {\n"
-      "    c.method(i,7);\n"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+import 'dart:nativewrappers';
+
+class Class extends NativeFieldWrapperClass1 {
+  @pragma("vm:external-name", "init")
+  external void init();
+  @pragma("vm:external-name", "method")
+  external int method(int param1, int param2);
+}
+
+void benchmark(int count) {
+  Class c = Class();
+  c.init();
+  for (int i = 0; i < count; i++) {
+    c.method(i,7);
+  }
+})";
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, bm_uda_lookup,
                                              RESOLVED_USER_TEST_URI, false);
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 20d63d2..203f9ca 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -138,12 +138,6 @@
       return Error::Cast(result).ptr();
     }
 
-    // The builtin library should be registered with the VM.
-    const auto& dart_builtin =
-        String::Handle(zone, String::New("dart:_builtin"));
-    library = Library::LookupLibrary(thread, dart_builtin);
-    isolate_group->object_store()->set_builtin_library(library);
-
     if (FLAG_precompiled_mode) {
       loader.ReadLoadingUnits();
     }
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 4911d25..6f6d67d 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -65,7 +65,6 @@
   V(SendPortImpl_get_id, 1)                                                    \
   V(SendPortImpl_get_hashcode, 1)                                              \
   V(SendPortImpl_sendInternal_, 2)                                             \
-  V(SendPortImpl_sendAndExitInternal_, 2)                                      \
   V(Smi_bitNegate, 1)                                                          \
   V(Smi_bitLength, 1)                                                          \
   V(Mint_bitNegate, 1)                                                         \
@@ -316,12 +315,13 @@
   V(Int32x4_setFlagZ, 2)                                                       \
   V(Int32x4_setFlagW, 2)                                                       \
   V(Int32x4_select, 3)                                                         \
+  V(Isolate_exit_, 2)                                                          \
+  V(Isolate_getCurrentRootUriStr, 0)                                           \
+  V(Isolate_getDebugName, 1)                                                   \
+  V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0)                         \
+  V(Isolate_sendOOB, 2)                                                        \
   V(Isolate_spawnFunction, 10)                                                 \
   V(Isolate_spawnUri, 12)                                                      \
-  V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0)                         \
-  V(Isolate_getCurrentRootUriStr, 0)                                           \
-  V(Isolate_sendOOB, 2)                                                        \
-  V(Isolate_getDebugName, 1)                                                   \
   V(GrowableList_allocate, 2)                                                  \
   V(GrowableList_getIndexed, 2)                                                \
   V(GrowableList_setIndexed, 3)                                                \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index c858051..1ea4076 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -266,8 +266,12 @@
   ASSERT_EQUAL(WeakProperty::InstanceSize(), cls.host_instance_size());
   cls = object_store->linked_hash_map_class();
   ASSERT_EQUAL(LinkedHashMap::InstanceSize(), cls.host_instance_size());
-  cls = object_store->linked_hash_set_class();
+  cls = object_store->immutable_linked_hash_map_class();
   ASSERT_EQUAL(LinkedHashMap::InstanceSize(), cls.host_instance_size());
+  cls = object_store->linked_hash_set_class();
+  ASSERT_EQUAL(LinkedHashSet::InstanceSize(), cls.host_instance_size());
+  cls = object_store->immutable_linked_hash_set_class();
+  ASSERT_EQUAL(LinkedHashSet::InstanceSize(), cls.host_instance_size());
 #endif  // defined(DEBUG)
 
   // Remember the currently pending classes.
@@ -1221,12 +1225,16 @@
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
 
+  // The enum_cls is the actual declared class.
+  // The shared super-class holds the fields for index and name.
+  const Class& super_cls = Class::Handle(zone, enum_cls.SuperClass());
+
   const Field& index_field =
-      Field::Handle(zone, enum_cls.LookupInstanceField(Symbols::Index()));
+      Field::Handle(zone, super_cls.LookupInstanceField(Symbols::Index()));
   ASSERT(!index_field.IsNull());
 
   const Field& name_field = Field::Handle(
-      zone, enum_cls.LookupInstanceFieldAllowPrivate(Symbols::_name()));
+      zone, super_cls.LookupInstanceFieldAllowPrivate(Symbols::_name()));
   ASSERT(!name_field.IsNull());
 
   const String& enum_name = String::Handle(zone, enum_cls.ScrubbedName());
@@ -1370,7 +1378,7 @@
   ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
 
   // Now verify field offsets of 'Pointer' class.
-  cls = class_table.At(kFfiPointerCid);
+  cls = class_table.At(kPointerCid);
   error = cls.EnsureIsFinalized(thread);
   ASSERT(error.IsNull());
   ASSERT(cls.NumTypeParameters() == 1);
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index e7f7cbc..8d17bea 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -101,11 +101,13 @@
 #define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V)                   \
   CLASS_LIST_INTERNAL_ONLY(V) CLASS_LIST_INSTANCE_SINGLETONS(V)
 
-// TODO(http://dartbug.com/45908): Add ImmutableLinkedHashMap.
-#define CLASS_LIST_MAPS(V) V(LinkedHashMap)
+#define CLASS_LIST_MAPS(V)                                                     \
+  V(LinkedHashMap)                                                             \
+  V(ImmutableLinkedHashMap)
 
-// TODO(http://dartbug.com/45908): Add ImmutableLinkedHashSet.
-#define CLASS_LIST_SETS(V) V(LinkedHashSet)
+#define CLASS_LIST_SETS(V)                                                     \
+  V(LinkedHashSet)                                                             \
+  V(ImmutableLinkedHashSet)
 
 #define CLASS_LIST_FIXED_LENGTH_ARRAYS(V)                                      \
   V(Array)                                                                     \
@@ -157,11 +159,9 @@
   V(Handle)
 
 #define CLASS_LIST_FFI(V)                                                      \
-  V(Pointer)                                                                   \
   V(NativeFunction)                                                            \
   CLASS_LIST_FFI_TYPE_MARKER(V)                                                \
   V(NativeType)                                                                \
-  V(DynamicLibrary)                                                            \
   V(Struct)
 
 #define DART_CLASS_LIST_TYPED_DATA(V)                                          \
@@ -387,7 +387,7 @@
 
 inline bool IsFfiTypeClassId(intptr_t index) {
   switch (index) {
-    case kFfiPointerCid:
+    case kPointerCid:
     case kFfiNativeFunctionCid:
 #define CASE_FFI_CID(name) case kFfi##name##Cid:
       CLASS_LIST_FFI_TYPE_MARKER(CASE_FFI_CID)
@@ -401,6 +401,8 @@
 
 inline bool IsFfiPredefinedClassId(classid_t class_id) {
   switch (class_id) {
+    case kPointerCid:
+    case kDynamicLibraryCid:
 #define CASE_FFI_CID(name) case kFfi##name##Cid:
     CLASS_LIST_FFI(CASE_FFI_CID)
 #undef CASE_FFI_CID
@@ -412,11 +414,11 @@
 }
 
 inline bool IsFfiPointerClassId(intptr_t index) {
-  return index == kFfiPointerCid;
+  return index == kPointerCid;
 }
 
 inline bool IsFfiDynamicLibraryClassId(intptr_t index) {
-  return index == kFfiDynamicLibraryCid;
+  return index == kDynamicLibraryCid;
 }
 
 inline bool IsInternalVMdefinedClassId(intptr_t index) {
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
deleted file mode 100644
index 40b0a98..0000000
--- a/runtime/vm/clustered_snapshot.cc
+++ /dev/null
@@ -1,8315 +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.
-
-#include <memory>
-#include <utility>
-
-#include "vm/clustered_snapshot.h"
-
-#include "platform/assert.h"
-#include "vm/bootstrap.h"
-#include "vm/bss_relocs.h"
-#include "vm/canonical_tables.h"
-#include "vm/class_id.h"
-#include "vm/code_observers.h"
-#include "vm/compiler/api/print_filter.h"
-#include "vm/compiler/assembler/disassembler.h"
-#include "vm/dart.h"
-#include "vm/dart_entry.h"
-#include "vm/dispatch_table.h"
-#include "vm/flag_list.h"
-#include "vm/growable_array.h"
-#include "vm/heap/heap.h"
-#include "vm/image_snapshot.h"
-#include "vm/native_entry.h"
-#include "vm/object.h"
-#include "vm/object_store.h"
-#include "vm/program_visitor.h"
-#include "vm/stub_code.h"
-#include "vm/symbols.h"
-#include "vm/timeline.h"
-#include "vm/v8_snapshot_writer.h"
-#include "vm/version.h"
-#include "vm/zone_text_buffer.h"
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-#include "vm/compiler/backend/code_statistics.h"
-#include "vm/compiler/backend/il_printer.h"
-#include "vm/compiler/relocation.h"
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-
-namespace dart {
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-DEFINE_FLAG(bool,
-            print_cluster_information,
-            false,
-            "Print information about clusters written to snapshot");
-#endif
-
-#if defined(DART_PRECOMPILER)
-DEFINE_FLAG(charp,
-            write_v8_snapshot_profile_to,
-            NULL,
-            "Write a snapshot profile in V8 format to a file.");
-#endif  // defined(DART_PRECOMPILER)
-
-namespace {
-// StorageTrait for HashTable which allows to create hash tables backed by
-// zone memory. Used to compute cluster order for canonical clusters.
-struct GrowableArrayStorageTraits {
-  class Array : public ZoneAllocated {
-   public:
-    explicit Array(Zone* zone, intptr_t length)
-        : length_(length), array_(zone->Alloc<ObjectPtr>(length)) {}
-
-    intptr_t Length() const { return length_; }
-    void SetAt(intptr_t index, const Object& value) const {
-      array_[index] = value.ptr();
-    }
-    ObjectPtr At(intptr_t index) const { return array_[index]; }
-
-   private:
-    intptr_t length_ = 0;
-    ObjectPtr* array_ = nullptr;
-    DISALLOW_COPY_AND_ASSIGN(Array);
-  };
-
-  using ArrayPtr = Array*;
-  class ArrayHandle : public ZoneAllocated {
-   public:
-    explicit ArrayHandle(ArrayPtr ptr) : ptr_(ptr) {}
-    ArrayHandle() {}
-
-    void SetFrom(const ArrayHandle& other) { ptr_ = other.ptr_; }
-    void Clear() { ptr_ = nullptr; }
-    bool IsNull() const { return ptr_ == nullptr; }
-    ArrayPtr ptr() { return ptr_; }
-
-    intptr_t Length() const { return ptr_->Length(); }
-    void SetAt(intptr_t index, const Object& value) const {
-      ptr_->SetAt(index, value);
-    }
-    ObjectPtr At(intptr_t index) const { return ptr_->At(index); }
-
-   private:
-    ArrayPtr ptr_ = nullptr;
-    DISALLOW_COPY_AND_ASSIGN(ArrayHandle);
-  };
-
-  static ArrayHandle& PtrToHandle(ArrayPtr ptr) {
-    return *new ArrayHandle(ptr);
-  }
-
-  static void SetHandle(ArrayHandle& dst, const ArrayHandle& src) {  // NOLINT
-    dst.SetFrom(src);
-  }
-
-  static void ClearHandle(ArrayHandle& dst) {  // NOLINT
-    dst.Clear();
-  }
-
-  static ArrayPtr New(Zone* zone, intptr_t length, Heap::Space space) {
-    return new (zone) Array(zone, length);
-  }
-
-  static bool IsImmutable(const ArrayHandle& handle) { return false; }
-
-  static ObjectPtr At(ArrayHandle* array, intptr_t index) {
-    return array->At(index);
-  }
-
-  static void SetAt(ArrayHandle* array, intptr_t index, const Object& value) {
-    array->SetAt(index, value);
-  }
-};
-}  // namespace
-
-#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-
-static void RelocateCodeObjects(
-    bool is_vm,
-    GrowableArray<CodePtr>* code_objects,
-    GrowableArray<ImageWriterCommand>* image_writer_commands) {
-  auto thread = Thread::Current();
-  auto isolate_group =
-      is_vm ? Dart::vm_isolate()->group() : thread->isolate_group();
-
-  WritableCodePages writable_code_pages(thread, isolate_group);
-  CodeRelocator::Relocate(thread, code_objects, image_writer_commands, is_vm);
-}
-
-#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-
-void Deserializer::InitializeHeader(ObjectPtr raw,
-                                    intptr_t class_id,
-                                    intptr_t size,
-                                    bool is_canonical) {
-  ASSERT(Utils::IsAligned(size, kObjectAlignment));
-  uword tags = 0;
-  tags = UntaggedObject::ClassIdTag::update(class_id, tags);
-  tags = UntaggedObject::SizeTag::update(size, tags);
-  tags = UntaggedObject::CanonicalBit::update(is_canonical, tags);
-  tags = UntaggedObject::OldBit::update(true, tags);
-  tags = UntaggedObject::OldAndNotMarkedBit::update(true, tags);
-  tags = UntaggedObject::OldAndNotRememberedBit::update(true, tags);
-  tags = UntaggedObject::NewBit::update(false, tags);
-  raw->untag()->tags_ = tags;
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-void SerializationCluster::WriteAndMeasureAlloc(Serializer* serializer) {
-  intptr_t start_size = serializer->bytes_written();
-  intptr_t start_data = serializer->GetDataSize();
-  intptr_t start_objects = serializer->next_ref_index();
-  uint64_t cid_and_canonical =
-      (static_cast<uint64_t>(cid_) << 1) | (is_canonical() ? 0x1 : 0x0);
-  serializer->Write<uint64_t>(cid_and_canonical);
-  WriteAlloc(serializer);
-  intptr_t stop_size = serializer->bytes_written();
-  intptr_t stop_data = serializer->GetDataSize();
-  intptr_t stop_objects = serializer->next_ref_index();
-  if (FLAG_print_cluster_information) {
-    OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "), ", start_size,
-                 stop_size - start_size);
-    OS::PrintErr("Data 0x%" Pp " (%" Pd "): ", start_data,
-                 stop_data - start_data);
-    OS::PrintErr("Alloc %s (%" Pd ")\n", name(), stop_objects - start_objects);
-  }
-  size_ += (stop_size - start_size) + (stop_data - start_data);
-  num_objects_ += (stop_objects - start_objects);
-  if (target_instance_size_ != kSizeVaries) {
-    target_memory_size_ += num_objects_ * target_instance_size_;
-  }
-}
-
-void SerializationCluster::WriteAndMeasureFill(Serializer* serializer) {
-  intptr_t start = serializer->bytes_written();
-  WriteFill(serializer);
-  intptr_t stop = serializer->bytes_written();
-  if (FLAG_print_cluster_information) {
-    OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "): Fill %s\n", start, stop - start,
-                 name());
-  }
-  size_ += (stop - start);
-}
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-DART_NOINLINE
-void DeserializationCluster::ReadAllocFixedSize(Deserializer* d,
-                                                intptr_t instance_size) {
-  start_index_ = d->next_index();
-  PageSpace* old_space = d->heap()->old_space();
-  intptr_t count = d->ReadUnsigned();
-  for (intptr_t i = 0; i < count; i++) {
-    d->AssignRef(old_space->AllocateSnapshot(instance_size));
-  }
-  stop_index_ = d->next_index();
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-static UnboxedFieldBitmap CalculateTargetUnboxedFieldsBitmap(
-    Serializer* s,
-    intptr_t class_id) {
-  const auto unboxed_fields_bitmap_host =
-      s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(class_id);
-
-  UnboxedFieldBitmap unboxed_fields_bitmap;
-  if (unboxed_fields_bitmap_host.IsEmpty() ||
-      kWordSize == compiler::target::kWordSize) {
-    unboxed_fields_bitmap = unboxed_fields_bitmap_host;
-  } else {
-    ASSERT(kWordSize == 8 && compiler::target::kWordSize == 4);
-    // A new bitmap is built if the word sizes in the target and
-    // host are different
-    unboxed_fields_bitmap.Reset();
-    intptr_t target_i = 0, host_i = 0;
-
-    while (host_i < UnboxedFieldBitmap::Length()) {
-      // Each unboxed field has constant length, therefore the number of
-      // words used by it should double when compiling from 64-bit to 32-bit.
-      if (unboxed_fields_bitmap_host.Get(host_i++)) {
-        unboxed_fields_bitmap.Set(target_i++);
-        unboxed_fields_bitmap.Set(target_i++);
-      } else {
-        // For object pointers, the field is always one word length
-        target_i++;
-      }
-    }
-  }
-
-  return unboxed_fields_bitmap;
-}
-
-class ClassSerializationCluster : public SerializationCluster {
- public:
-  explicit ClassSerializationCluster(intptr_t num_cids)
-      : SerializationCluster("Class",
-                             kClassCid,
-                             compiler::target::Class::InstanceSize()),
-        predefined_(kNumPredefinedCids),
-        objects_(num_cids) {}
-  ~ClassSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ClassPtr cls = Class::RawCast(object);
-    intptr_t class_id = cls->untag()->id_;
-
-    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
-      // them.
-      predefined_.Add(cls);
-    } else {
-      objects_.Add(cls);
-    }
-
-    PushFromTo(cls);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    intptr_t count = predefined_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ClassPtr cls = predefined_[i];
-      s->AssignRef(cls);
-      AutoTraceObject(cls);
-      intptr_t class_id = cls->untag()->id_;
-      s->WriteCid(class_id);
-    }
-    count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ClassPtr cls = objects_[i];
-      s->AssignRef(cls);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t count = predefined_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WriteClass(s, predefined_[i]);
-    }
-    count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WriteClass(s, objects_[i]);
-    }
-  }
-
- private:
-  void WriteClass(Serializer* s, ClassPtr cls) {
-    AutoTraceObjectName(cls, cls->untag()->name());
-    WriteFromTo(cls);
-    intptr_t class_id = cls->untag()->id_;
-    if (class_id == kIllegalCid) {
-      s->UnexpectedObject(cls, "Class with illegal cid");
-    }
-    s->WriteCid(class_id);
-    if (s->kind() == Snapshot::kFullCore &&
-        RequireCanonicalTypeErasureOfConstants(cls)) {
-      s->UnexpectedObject(cls, "Class with non mode agnostic constants");
-    }
-    if (s->kind() != Snapshot::kFullAOT) {
-      s->Write<uint32_t>(cls->untag()->kernel_offset_);
-    }
-    s->Write<int32_t>(Class::target_instance_size_in_words(cls));
-    s->Write<int32_t>(Class::target_next_field_offset_in_words(cls));
-    s->Write<int32_t>(Class::target_type_arguments_field_offset_in_words(cls));
-    s->Write<int16_t>(cls->untag()->num_type_arguments_);
-    s->Write<uint16_t>(cls->untag()->num_native_fields_);
-    if (s->kind() != Snapshot::kFullAOT) {
-      s->WriteTokenPosition(cls->untag()->token_pos_);
-      s->WriteTokenPosition(cls->untag()->end_token_pos_);
-    }
-    s->Write<uint32_t>(cls->untag()->state_bits_);
-
-    // In AOT, the bitmap of unboxed fields should also be serialized
-    if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
-      s->WriteUnsigned64(
-          CalculateTargetUnboxedFieldsBitmap(s, class_id).Value());
-    }
-  }
-
-  GrowableArray<ClassPtr> predefined_;
-  GrowableArray<ClassPtr> objects_;
-
-  bool RequireCanonicalTypeErasureOfConstants(ClassPtr cls) {
-    // Do not generate a core snapshot containing constants that would require
-    // a canonical erasure of their types if loaded in an isolate running in
-    // unsound nullability mode.
-    if (cls->untag()->host_type_arguments_field_offset_in_words_ ==
-            Class::kNoTypeArguments ||
-        cls->untag()->constants() == Array::null()) {
-      return false;
-    }
-    Zone* zone = Thread::Current()->zone();
-    const Class& clazz = Class::Handle(zone, cls);
-    return clazz.RequireCanonicalTypeErasureOfConstants(zone);
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ClassDeserializationCluster : public DeserializationCluster {
- public:
-  ClassDeserializationCluster() : DeserializationCluster("Class") {}
-  ~ClassDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    predefined_start_index_ = d->next_index();
-    PageSpace* old_space = d->heap()->old_space();
-    intptr_t count = d->ReadUnsigned();
-    ClassTable* table = d->isolate_group()->class_table();
-    for (intptr_t i = 0; i < count; i++) {
-      intptr_t class_id = d->ReadCid();
-      ASSERT(table->HasValidClassAt(class_id));
-      ClassPtr cls = table->At(class_id);
-      ASSERT(cls != nullptr);
-      d->AssignRef(cls);
-    }
-    predefined_stop_index_ = d->next_index();
-
-    start_index_ = d->next_index();
-    count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(old_space->AllocateSnapshot(Class::InstanceSize()));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ClassTable* table = d->isolate_group()->class_table();
-
-    for (intptr_t id = predefined_start_index_; id < predefined_stop_index_;
-         id++) {
-      ClassPtr cls = static_cast<ClassPtr>(d->Ref(id));
-      ReadFromTo(cls);
-      intptr_t class_id = d->ReadCid();
-      cls->untag()->id_ = class_id;
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      if (d->kind() != Snapshot::kFullAOT) {
-        cls->untag()->kernel_offset_ = d->Read<uint32_t>();
-      }
-#endif
-      if (!IsInternalVMdefinedClassId(class_id)) {
-        cls->untag()->host_instance_size_in_words_ = d->Read<int32_t>();
-        cls->untag()->host_next_field_offset_in_words_ = d->Read<int32_t>();
-#if defined(DART_PRECOMPILER)
-        // Only one pair is serialized. The target field only exists when
-        // DART_PRECOMPILER is defined
-        cls->untag()->target_instance_size_in_words_ =
-            cls->untag()->host_instance_size_in_words_;
-        cls->untag()->target_next_field_offset_in_words_ =
-            cls->untag()->host_next_field_offset_in_words_;
-#endif  // defined(DART_PRECOMPILER)
-      } else {
-        d->Read<int32_t>();  // Skip.
-        d->Read<int32_t>();  // Skip.
-      }
-      cls->untag()->host_type_arguments_field_offset_in_words_ =
-          d->Read<int32_t>();
-#if defined(DART_PRECOMPILER)
-      cls->untag()->target_type_arguments_field_offset_in_words_ =
-          cls->untag()->host_type_arguments_field_offset_in_words_;
-#endif  // defined(DART_PRECOMPILER)
-      cls->untag()->num_type_arguments_ = d->Read<int16_t>();
-      cls->untag()->num_native_fields_ = d->Read<uint16_t>();
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      ASSERT(d->kind() != Snapshot::kFullAOT);
-      cls->untag()->token_pos_ = d->ReadTokenPosition();
-      cls->untag()->end_token_pos_ = d->ReadTokenPosition();
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-      cls->untag()->state_bits_ = d->Read<uint32_t>();
-
-      if (FLAG_precompiled_mode) {
-        d->ReadUnsigned64();  // Skip unboxed fields bitmap.
-      }
-    }
-
-    auto shared_class_table = d->isolate_group()->shared_class_table();
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ClassPtr cls = static_cast<ClassPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(cls, kClassCid, Class::InstanceSize());
-      ReadFromTo(cls);
-
-      intptr_t class_id = d->ReadCid();
-      ASSERT(class_id >= kNumPredefinedCids);
-      cls->untag()->id_ = class_id;
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      if (d->kind() != Snapshot::kFullAOT) {
-        cls->untag()->kernel_offset_ = d->Read<uint32_t>();
-      }
-#endif
-      cls->untag()->host_instance_size_in_words_ = d->Read<int32_t>();
-      cls->untag()->host_next_field_offset_in_words_ = d->Read<int32_t>();
-      cls->untag()->host_type_arguments_field_offset_in_words_ =
-          d->Read<int32_t>();
-#if defined(DART_PRECOMPILER)
-      cls->untag()->target_instance_size_in_words_ =
-          cls->untag()->host_instance_size_in_words_;
-      cls->untag()->target_next_field_offset_in_words_ =
-          cls->untag()->host_next_field_offset_in_words_;
-      cls->untag()->target_type_arguments_field_offset_in_words_ =
-          cls->untag()->host_type_arguments_field_offset_in_words_;
-#endif  // defined(DART_PRECOMPILER)
-      cls->untag()->num_type_arguments_ = d->Read<int16_t>();
-      cls->untag()->num_native_fields_ = d->Read<uint16_t>();
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      ASSERT(d->kind() != Snapshot::kFullAOT);
-      cls->untag()->token_pos_ = d->ReadTokenPosition();
-      cls->untag()->end_token_pos_ = d->ReadTokenPosition();
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-      cls->untag()->state_bits_ = d->Read<uint32_t>();
-
-      table->AllocateIndex(class_id);
-      table->SetAt(class_id, cls);
-
-      if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
-        const UnboxedFieldBitmap unboxed_fields_map(d->ReadUnsigned64());
-        shared_class_table->SetUnboxedFieldsMapAt(class_id, unboxed_fields_map);
-      }
-    }
-  }
-
- private:
-  intptr_t predefined_start_index_;
-  intptr_t predefined_stop_index_;
-};
-
-// Super classes for writing out clusters which contain objects grouped into
-// a canonical set (e.g. String, Type, TypeArguments, etc).
-// To save space in the snapshot we avoid writing such canonical sets
-// explicitly as Array objects into the snapshot and instead utilize a different
-// encoding: objects in a cluster representing a canonical set are sorted
-// to appear in the same order they appear in the Array representing the set,
-// and we additionaly write out array of values describing gaps between objects.
-//
-// In some situations not all canonical objects of the some type need to
-// be added to the resulting canonical set because they are cached in some
-// special way (see Type::Canonicalize as an example, which caches declaration
-// types in a special way). In this case subclass can set
-// kAllCanonicalObjectsAreIncludedIntoSet to |false| and override
-// IsInCanonicalSet filter.
-#if !defined(DART_PRECOMPILED_RUNTIME)
-template <typename SetType,
-          typename HandleType,
-          typename PointerType,
-          bool kAllCanonicalObjectsAreIncludedIntoSet = true>
-class CanonicalSetSerializationCluster : public SerializationCluster {
- protected:
-  CanonicalSetSerializationCluster(intptr_t cid,
-                                   bool is_canonical,
-                                   bool represents_canonical_set,
-                                   const char* name,
-                                   intptr_t target_instance_size = 0)
-      : SerializationCluster(name, cid, target_instance_size, is_canonical),
-        represents_canonical_set_(represents_canonical_set) {}
-
-  virtual bool IsInCanonicalSet(Serializer* s, PointerType ptr) {
-    // Must override this function if kAllCanonicalObjectsAreIncludedIntoSet
-    // is set to |false|.
-    ASSERT(kAllCanonicalObjectsAreIncludedIntoSet);
-    return true;
-  }
-
-  void ReorderObjects(Serializer* s) {
-    if (!represents_canonical_set_) {
-      return;
-    }
-
-    // Sort objects before writing them out so that they appear in the same
-    // order as they would appear in a CanonicalStringSet.
-    using ZoneCanonicalSet =
-        HashTable<typename SetType::Traits, 0, 0, GrowableArrayStorageTraits>;
-
-    // Compute required capacity for the hashtable (to avoid overallocating).
-    intptr_t required_capacity = 0;
-    for (auto ptr : objects_) {
-      if (kAllCanonicalObjectsAreIncludedIntoSet || IsInCanonicalSet(s, ptr)) {
-        required_capacity++;
-      }
-    }
-
-    intptr_t num_occupied = 0;
-
-    // Build canonical set out of objects that should belong to it.
-    // Objects that don't belong to it are copied to the prefix of objects_.
-    ZoneCanonicalSet table(
-        s->zone(), HashTables::New<ZoneCanonicalSet>(required_capacity));
-    HandleType& element = HandleType::Handle(s->zone());
-    for (auto ptr : objects_) {
-      if (kAllCanonicalObjectsAreIncludedIntoSet || IsInCanonicalSet(s, ptr)) {
-        element ^= ptr;
-        intptr_t entry = -1;
-        const bool present = table.FindKeyOrDeletedOrUnused(element, &entry);
-        if (!present) {
-          table.InsertKey(entry, element);
-        } else {
-          // Two recursive types with different topology (and hashes)
-          // may be equal.
-          ASSERT(element.IsRecursive());
-          objects_[num_occupied++] = ptr;
-        }
-      } else {
-        objects_[num_occupied++] = ptr;
-      }
-    }
-
-    const auto prefix_length = num_occupied;
-
-    // Compute objects_ order and gaps based on canonical set layout.
-    auto& arr = table.Release();
-    intptr_t last_occupied = ZoneCanonicalSet::kFirstKeyIndex - 1;
-    for (intptr_t i = ZoneCanonicalSet::kFirstKeyIndex, length = arr.Length();
-         i < length; i++) {
-      ObjectPtr v = arr.At(i);
-      ASSERT(v != ZoneCanonicalSet::DeletedMarker().ptr());
-      if (v != ZoneCanonicalSet::UnusedMarker().ptr()) {
-        const intptr_t unused_run_length = (i - 1) - last_occupied;
-        gaps_.Add(unused_run_length);
-        objects_[num_occupied++] = static_cast<PointerType>(v);
-        last_occupied = i;
-      }
-    }
-    ASSERT(num_occupied == objects_.length());
-    ASSERT(prefix_length == (objects_.length() - gaps_.length()));
-    table_length_ = arr.Length();
-  }
-
-  void WriteCanonicalSetLayout(Serializer* s) {
-    if (represents_canonical_set_) {
-      s->WriteUnsigned(table_length_);
-      s->WriteUnsigned(objects_.length() - gaps_.length());
-      for (auto gap : gaps_) {
-        s->WriteUnsigned(gap);
-      }
-      target_memory_size_ +=
-          compiler::target::Array::InstanceSize(table_length_);
-    }
-  }
-
-  GrowableArray<PointerType> objects_;
-
- private:
-  const bool represents_canonical_set_;
-  GrowableArray<intptr_t> gaps_;
-  intptr_t table_length_ = 0;
-};
-#endif
-
-template <typename SetType, bool kAllCanonicalObjectsAreIncludedIntoSet = true>
-class CanonicalSetDeserializationCluster : public DeserializationCluster {
- public:
-  CanonicalSetDeserializationCluster(bool is_canonical,
-                                     bool is_root_unit,
-                                     const char* name)
-      : DeserializationCluster(name, is_canonical),
-        is_root_unit_(is_root_unit),
-        table_(Array::Handle()) {}
-
-  void BuildCanonicalSetFromLayout(Deserializer* d) {
-    if (!is_root_unit_ || !is_canonical()) {
-      return;
-    }
-
-    const auto table_length = d->ReadUnsigned();
-    first_element_ = d->ReadUnsigned();
-    const intptr_t count = stop_index_ - (start_index_ + first_element_);
-    auto table = StartDeserialization(d, table_length, count);
-    for (intptr_t i = start_index_ + first_element_; i < stop_index_; i++) {
-      table.FillGap(d->ReadUnsigned());
-      table.WriteElement(d, d->Ref(i));
-    }
-    table_ = table.Finish();
-  }
-
- protected:
-  const bool is_root_unit_;
-  intptr_t first_element_;
-  Array& table_;
-
-  void VerifyCanonicalSet(Deserializer* d,
-                          const Array& refs,
-                          const Array& current_table) {
-#if defined(DEBUG)
-    // First check that we are not overwriting a table and loosing information.
-    if (!current_table.IsNull()) {
-      SetType current_set(d->zone(), current_table.ptr());
-      ASSERT(current_set.NumOccupied() == 0);
-      current_set.Release();
-    }
-
-    // Now check that manually created table behaves correctly as a canonical
-    // set.
-    SetType canonical_set(d->zone(), table_.ptr());
-    Object& key = Object::Handle();
-    for (intptr_t i = start_index_ + first_element_; i < stop_index_; i++) {
-      key = refs.At(i);
-      ASSERT(canonical_set.GetOrNull(key) != Object::null());
-    }
-    canonical_set.Release();
-#endif  // defined(DEBUG)
-  }
-
- private:
-  struct DeserializationFinger {
-    ArrayPtr table;
-    intptr_t current_index;
-    ObjectPtr gap_element;
-
-    void FillGap(int length) {
-      for (intptr_t j = 0; j < length; j++) {
-        table->untag()->data()[current_index + j] = gap_element;
-      }
-      current_index += length;
-    }
-
-    void WriteElement(Deserializer* d, ObjectPtr object) {
-      table->untag()->data()[current_index++] = object;
-    }
-
-    ArrayPtr Finish() {
-      if (table != Array::null()) {
-        FillGap(Smi::Value(table->untag()->length()) - current_index);
-      }
-      auto result = table;
-      table = Array::null();
-      return result;
-    }
-  };
-
-  static DeserializationFinger StartDeserialization(Deserializer* d,
-                                                    intptr_t length,
-                                                    intptr_t count) {
-    const intptr_t instance_size = Array::InstanceSize(length);
-    ArrayPtr table = static_cast<ArrayPtr>(
-        d->heap()->old_space()->AllocateSnapshot(instance_size));
-    Deserializer::InitializeHeader(table, kArrayCid, instance_size);
-    table->untag()->type_arguments_ = TypeArguments::null();
-    table->untag()->length_ = CompressedSmiPtr(Smi::New(length));
-    for (intptr_t i = 0; i < SetType::kFirstKeyIndex; i++) {
-      table->untag()->data()[i] = Smi::New(0);
-    }
-    table->untag()->data()[SetType::kOccupiedEntriesIndex] = Smi::New(count);
-    return {table, SetType::kFirstKeyIndex, SetType::UnusedMarker().ptr()};
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypeParametersSerializationCluster : public SerializationCluster {
- public:
-  TypeParametersSerializationCluster()
-      : SerializationCluster("TypeParameters",
-                             kTypeParametersCid,
-                             compiler::target::TypeParameters::InstanceSize()) {
-  }
-  ~TypeParametersSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypeParametersPtr type_params = TypeParameters::RawCast(object);
-    objects_.Add(type_params);
-    PushFromTo(type_params);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      TypeParametersPtr type_params = objects_[i];
-      s->AssignRef(type_params);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      TypeParametersPtr type_params = objects_[i];
-      AutoTraceObject(type_params);
-      WriteFromTo(type_params);
-    }
-  }
-
- private:
-  GrowableArray<TypeParametersPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypeParametersDeserializationCluster : public DeserializationCluster {
- public:
-  TypeParametersDeserializationCluster()
-      : DeserializationCluster("TypeParameters") {}
-  ~TypeParametersDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, TypeParameters::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypeParametersPtr type_params =
-          static_cast<TypeParametersPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(type_params, kTypeParametersCid,
-                                     TypeParameters::InstanceSize());
-      ReadFromTo(type_params);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypeArgumentsSerializationCluster
-    : public CanonicalSetSerializationCluster<CanonicalTypeArgumentsSet,
-                                              TypeArguments,
-                                              TypeArgumentsPtr> {
- public:
-  TypeArgumentsSerializationCluster(bool is_canonical,
-                                    bool represents_canonical_set)
-      : CanonicalSetSerializationCluster(kTypeArgumentsCid,
-                                         is_canonical,
-                                         represents_canonical_set,
-                                         "TypeArguments") {}
-  ~TypeArgumentsSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypeArgumentsPtr type_args = TypeArguments::RawCast(object);
-    objects_.Add(type_args);
-
-    s->Push(type_args->untag()->instantiations());
-    const intptr_t length = Smi::Value(type_args->untag()->length());
-    for (intptr_t i = 0; i < length; i++) {
-      s->Push(type_args->untag()->element(i));
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-    for (intptr_t i = 0; i < count; i++) {
-      TypeArgumentsPtr type_args = objects_[i];
-      s->AssignRef(type_args);
-      AutoTraceObject(type_args);
-      const intptr_t length = Smi::Value(type_args->untag()->length());
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::TypeArguments::InstanceSize(length);
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      TypeArgumentsPtr type_args = objects_[i];
-      AutoTraceObject(type_args);
-      const intptr_t length = Smi::Value(type_args->untag()->length());
-      s->WriteUnsigned(length);
-      intptr_t hash = Smi::Value(type_args->untag()->hash());
-      s->Write<int32_t>(hash);
-      const intptr_t nullability =
-          Smi::Value(type_args->untag()->nullability());
-      s->WriteUnsigned(nullability);
-      WriteField(type_args, instantiations());
-      for (intptr_t j = 0; j < length; j++) {
-        s->WriteElementRef(type_args->untag()->element(j), j);
-      }
-    }
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypeArgumentsDeserializationCluster
-    : public CanonicalSetDeserializationCluster<CanonicalTypeArgumentsSet> {
- public:
-  explicit TypeArgumentsDeserializationCluster(bool is_canonical,
-                                               bool is_root_unit)
-      : CanonicalSetDeserializationCluster(is_canonical,
-                                           is_root_unit,
-                                           "TypeArguments") {}
-  ~TypeArgumentsDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(TypeArguments::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-    BuildCanonicalSetFromLayout(d);
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypeArgumentsPtr type_args = static_cast<TypeArgumentsPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(type_args, kTypeArgumentsCid,
-                                     TypeArguments::InstanceSize(length),
-                                     primary && is_canonical());
-      type_args->untag()->length_ = Smi::New(length);
-      type_args->untag()->hash_ = Smi::New(d->Read<int32_t>());
-      type_args->untag()->nullability_ = Smi::New(d->ReadUnsigned());
-      type_args->untag()->instantiations_ = static_cast<ArrayPtr>(d->ReadRef());
-      for (intptr_t j = 0; j < length; j++) {
-        type_args->untag()->types()[j] =
-            static_cast<AbstractTypePtr>(d->ReadRef());
-      }
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(
-          d, refs, Array::Handle(object_store->canonical_type_arguments()));
-      object_store->set_canonical_type_arguments(table_);
-    } else if (!primary && is_canonical()) {
-      TypeArguments& type_arg = TypeArguments::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        type_arg ^= refs.At(i);
-        type_arg = type_arg.Canonicalize(d->thread(), nullptr);
-        refs.SetAt(i, type_arg);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class PatchClassSerializationCluster : public SerializationCluster {
- public:
-  PatchClassSerializationCluster()
-      : SerializationCluster("PatchClass",
-                             kPatchClassCid,
-                             compiler::target::PatchClass::InstanceSize()) {}
-  ~PatchClassSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    PatchClassPtr cls = PatchClass::RawCast(object);
-    objects_.Add(cls);
-    PushFromTo(cls);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      PatchClassPtr cls = objects_[i];
-      s->AssignRef(cls);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      PatchClassPtr cls = objects_[i];
-      AutoTraceObject(cls);
-      WriteFromTo(cls);
-      if (s->kind() != Snapshot::kFullAOT) {
-        s->Write<int32_t>(cls->untag()->library_kernel_offset_);
-      }
-    }
-  }
-
- private:
-  GrowableArray<PatchClassPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class PatchClassDeserializationCluster : public DeserializationCluster {
- public:
-  PatchClassDeserializationCluster() : DeserializationCluster("PatchClass") {}
-  ~PatchClassDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, PatchClass::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      PatchClassPtr cls = static_cast<PatchClassPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(cls, kPatchClassCid,
-                                     PatchClass::InstanceSize());
-      ReadFromTo(cls);
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      if (d->kind() != Snapshot::kFullAOT) {
-        cls->untag()->library_kernel_offset_ = d->Read<int32_t>();
-      }
-#endif
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class FunctionSerializationCluster : public SerializationCluster {
- public:
-  FunctionSerializationCluster()
-      : SerializationCluster("Function",
-                             kFunctionCid,
-                             compiler::target::Function::InstanceSize()) {}
-  ~FunctionSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    Snapshot::Kind kind = s->kind();
-    FunctionPtr func = Function::RawCast(object);
-    objects_.Add(func);
-
-    PushFromTo(func);
-    if (kind == Snapshot::kFullAOT) {
-      s->Push(func->untag()->code());
-    } else if (kind == Snapshot::kFullJIT) {
-      NOT_IN_PRECOMPILED(s->Push(func->untag()->unoptimized_code()));
-      s->Push(func->untag()->code());
-      s->Push(func->untag()->ic_data_array());
-    }
-    if (kind != Snapshot::kFullAOT) {
-      NOT_IN_PRECOMPILED(s->Push(func->untag()->positional_parameter_names()));
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      FunctionPtr func = objects_[i];
-      s->AssignRef(func);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    Snapshot::Kind kind = s->kind();
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      FunctionPtr func = objects_[i];
-      AutoTraceObjectName(func, MakeDisambiguatedFunctionName(s, func));
-      WriteFromTo(func);
-      if (kind == Snapshot::kFullAOT) {
-        WriteCompressedField(func, code);
-      } else if (s->kind() == Snapshot::kFullJIT) {
-        NOT_IN_PRECOMPILED(WriteCompressedField(func, unoptimized_code));
-        WriteCompressedField(func, code);
-        WriteCompressedField(func, ic_data_array);
-      }
-
-      if (kind != Snapshot::kFullAOT) {
-        NOT_IN_PRECOMPILED(
-            WriteCompressedField(func, positional_parameter_names));
-        s->WriteTokenPosition(func->untag()->token_pos_);
-        s->WriteTokenPosition(func->untag()->end_token_pos_);
-        s->Write<uint32_t>(func->untag()->kernel_offset_);
-      }
-
-      s->Write<uint32_t>(func->untag()->packed_fields_);
-      s->Write<uint32_t>(func->untag()->kind_tag_);
-    }
-  }
-
-  static const char* MakeDisambiguatedFunctionName(Serializer* s,
-                                                   FunctionPtr f) {
-    if (s->profile_writer() == nullptr) {
-      return nullptr;
-    }
-
-    REUSABLE_FUNCTION_HANDLESCOPE(s->thread());
-    Function& fun = reused_function_handle.Handle();
-    fun = f;
-    ZoneTextBuffer printer(s->thread()->zone());
-    fun.PrintName(NameFormattingParams::DisambiguatedUnqualified(
-                      Object::NameVisibility::kInternalName),
-                  &printer);
-    return printer.buffer();
-  }
-
- private:
-  GrowableArray<FunctionPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class FunctionDeserializationCluster : public DeserializationCluster {
- public:
-  FunctionDeserializationCluster() : DeserializationCluster("Function") {}
-  ~FunctionDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Function::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    Snapshot::Kind kind = d->kind();
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      FunctionPtr func = static_cast<FunctionPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(func, kFunctionCid,
-                                     Function::InstanceSize());
-      ReadFromTo(func);
-
-#if defined(DEBUG)
-      func->untag()->entry_point_ = 0;
-      func->untag()->unchecked_entry_point_ = 0;
-#endif
-
-      if (kind == Snapshot::kFullAOT) {
-        const intptr_t code_index = d->ReadUnsigned();
-        CodePtr code = static_cast<CodePtr>(d->Ref(code_index));
-        func->untag()->code_ = code;
-        if (Code::IsUnknownDartCode(code)) {
-          const uword entry_point = d->instructions_table().EntryPointAt(
-              code_index - d->code_start_index());
-          func->untag()->entry_point_ = entry_point;
-          func->untag()->unchecked_entry_point_ = entry_point;
-        }
-      } else if (kind == Snapshot::kFullJIT) {
-        NOT_IN_PRECOMPILED(func->untag()->unoptimized_code_ =
-                               static_cast<CodePtr>(d->ReadRef()));
-        func->untag()->code_ = static_cast<CodePtr>(d->ReadRef());
-        func->untag()->ic_data_array_ = static_cast<ArrayPtr>(d->ReadRef());
-      }
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      if (kind != Snapshot::kFullAOT) {
-        func->untag()->positional_parameter_names_ =
-            static_cast<ArrayPtr>(d->ReadRef());
-        func->untag()->token_pos_ = d->ReadTokenPosition();
-        func->untag()->end_token_pos_ = d->ReadTokenPosition();
-        func->untag()->kernel_offset_ = d->Read<uint32_t>();
-      }
-      func->untag()->unboxed_parameters_info_.Reset();
-#endif
-      func->untag()->packed_fields_ = d->Read<uint32_t>();
-      func->untag()->kind_tag_ = d->Read<uint32_t>();
-      if (kind == Snapshot::kFullAOT) {
-        // Omit fields used to support de/reoptimization.
-      } else {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-        func->untag()->usage_counter_ = 0;
-        func->untag()->optimized_instruction_count_ = 0;
-        func->untag()->optimized_call_site_count_ = 0;
-        func->untag()->deoptimization_counter_ = 0;
-        func->untag()->state_bits_ = 0;
-        func->untag()->inlining_depth_ = 0;
-#endif
-      }
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (d->kind() == Snapshot::kFullAOT) {
-      Function& func = Function::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        func ^= refs.At(i);
-        auto const code = func.ptr()->untag()->code();
-        ASSERT(code->IsCode());
-        if (!Code::IsUnknownDartCode(code)) {
-          uword entry_point = code->untag()->entry_point_;
-          ASSERT(entry_point != 0);
-          func.ptr()->untag()->entry_point_ = entry_point;
-          uword unchecked_entry_point = code->untag()->unchecked_entry_point_;
-          ASSERT(unchecked_entry_point != 0);
-          func.ptr()->untag()->unchecked_entry_point_ = unchecked_entry_point;
-        }
-      }
-    } else if (d->kind() == Snapshot::kFullJIT) {
-      Function& func = Function::Handle(d->zone());
-      Code& code = Code::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        func ^= refs.At(i);
-        code = func.CurrentCode();
-        if (func.HasCode() && !code.IsDisabled()) {
-          func.SetInstructionsSafe(code);  // Set entrypoint.
-          func.SetWasCompiled(true);
-        } else {
-          func.ClearCodeSafe();  // Set code and entrypoint to lazy compile stub
-        }
-      }
-    } else {
-      Function& func = Function::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        func ^= refs.At(i);
-        func.ClearCodeSafe();  // Set code and entrypoint to lazy compile stub.
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ClosureDataSerializationCluster : public SerializationCluster {
- public:
-  ClosureDataSerializationCluster()
-      : SerializationCluster("ClosureData",
-                             kClosureDataCid,
-                             compiler::target::ClosureData::InstanceSize()) {}
-  ~ClosureDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ClosureDataPtr data = ClosureData::RawCast(object);
-    objects_.Add(data);
-
-    if (s->kind() != Snapshot::kFullAOT) {
-      s->Push(data->untag()->context_scope());
-    }
-    s->Push(data->untag()->parent_function());
-    s->Push(data->untag()->closure());
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ClosureDataPtr data = objects_[i];
-      s->AssignRef(data);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ClosureDataPtr data = objects_[i];
-      AutoTraceObject(data);
-      if (s->kind() != Snapshot::kFullAOT) {
-        WriteCompressedField(data, context_scope);
-      }
-      WriteCompressedField(data, parent_function);
-      WriteCompressedField(data, closure);
-      s->WriteUnsigned(
-          static_cast<intptr_t>(data->untag()->default_type_arguments_kind_));
-    }
-  }
-
- private:
-  GrowableArray<ClosureDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ClosureDataDeserializationCluster : public DeserializationCluster {
- public:
-  ClosureDataDeserializationCluster() : DeserializationCluster("ClosureData") {}
-  ~ClosureDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, ClosureData::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ClosureDataPtr data = static_cast<ClosureDataPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(data, kClosureDataCid,
-                                     ClosureData::InstanceSize());
-      if (d->kind() == Snapshot::kFullAOT) {
-        data->untag()->context_scope_ = ContextScope::null();
-      } else {
-        data->untag()->context_scope_ =
-            static_cast<ContextScopePtr>(d->ReadRef());
-      }
-      data->untag()->parent_function_ = static_cast<FunctionPtr>(d->ReadRef());
-      data->untag()->closure_ = static_cast<ClosurePtr>(d->ReadRef());
-      data->untag()->default_type_arguments_kind_ =
-          static_cast<ClosureData::DefaultTypeArgumentsKind>(d->ReadUnsigned());
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class FfiTrampolineDataSerializationCluster : public SerializationCluster {
- public:
-  FfiTrampolineDataSerializationCluster()
-      : SerializationCluster(
-            "FfiTrampolineData",
-            kFfiTrampolineDataCid,
-            compiler::target::FfiTrampolineData::InstanceSize()) {}
-  ~FfiTrampolineDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    FfiTrampolineDataPtr data = FfiTrampolineData::RawCast(object);
-    objects_.Add(data);
-    PushFromTo(data);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      s->AssignRef(objects_[i]);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      FfiTrampolineDataPtr const data = objects_[i];
-      AutoTraceObject(data);
-      WriteFromTo(data);
-
-      if (s->kind() == Snapshot::kFullAOT) {
-        s->WriteUnsigned(data->untag()->callback_id_);
-      } else {
-        // FFI callbacks can only be written to AOT snapshots.
-        ASSERT(data->untag()->callback_target() == Object::null());
-      }
-    }
-  }
-
- private:
-  GrowableArray<FfiTrampolineDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class FfiTrampolineDataDeserializationCluster : public DeserializationCluster {
- public:
-  FfiTrampolineDataDeserializationCluster()
-      : DeserializationCluster("FfiTrampolineData") {}
-  ~FfiTrampolineDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, FfiTrampolineData::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      FfiTrampolineDataPtr data = static_cast<FfiTrampolineDataPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(data, kFfiTrampolineDataCid,
-                                     FfiTrampolineData::InstanceSize());
-      ReadFromTo(data);
-      data->untag()->callback_id_ =
-          d->kind() == Snapshot::kFullAOT ? d->ReadUnsigned() : 0;
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class FieldSerializationCluster : public SerializationCluster {
- public:
-  FieldSerializationCluster()
-      : SerializationCluster("Field",
-                             kFieldCid,
-                             compiler::target::Field::InstanceSize()) {}
-  ~FieldSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    FieldPtr field = Field::RawCast(object);
-    objects_.Add(field);
-
-    Snapshot::Kind kind = s->kind();
-
-    s->Push(field->untag()->name());
-    s->Push(field->untag()->owner());
-    s->Push(field->untag()->type());
-    // Write out the initializer function
-    s->Push(field->untag()->initializer_function());
-
-    if (kind != Snapshot::kFullAOT) {
-      s->Push(field->untag()->guarded_list_length());
-    }
-    if (kind == Snapshot::kFullJIT) {
-      s->Push(field->untag()->dependent_code());
-    }
-    // Write out either the initial static value or field offset.
-    if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
-      const intptr_t field_id =
-          Smi::Value(field->untag()->host_offset_or_field_id());
-      s->Push(s->initial_field_table()->At(field_id));
-    } else {
-      s->Push(Smi::New(Field::TargetOffsetOf(field)));
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      FieldPtr field = objects_[i];
-      s->AssignRef(field);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    Snapshot::Kind kind = s->kind();
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      FieldPtr field = objects_[i];
-      AutoTraceObjectName(field, field->untag()->name());
-
-      WriteCompressedField(field, name);
-      WriteCompressedField(field, owner);
-      WriteCompressedField(field, type);
-      // Write out the initializer function and initial value if not in AOT.
-      WriteCompressedField(field, initializer_function);
-      if (kind != Snapshot::kFullAOT) {
-        WriteCompressedField(field, guarded_list_length);
-      }
-      if (kind == Snapshot::kFullJIT) {
-        WriteCompressedField(field, dependent_code);
-      }
-
-      if (kind != Snapshot::kFullAOT) {
-        s->WriteTokenPosition(field->untag()->token_pos_);
-        s->WriteTokenPosition(field->untag()->end_token_pos_);
-        s->WriteCid(field->untag()->guarded_cid_);
-        s->WriteCid(field->untag()->is_nullable_);
-        s->Write<int8_t>(field->untag()->static_type_exactness_state_);
-        s->Write<uint32_t>(field->untag()->kernel_offset_);
-      }
-      s->Write<uint16_t>(field->untag()->kind_bits_);
-
-      // Write out either the initial static value or field offset.
-      if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
-        const intptr_t field_id =
-            Smi::Value(field->untag()->host_offset_or_field_id());
-        WriteFieldValue("static value", s->initial_field_table()->At(field_id));
-        s->WriteUnsigned(field_id);
-      } else {
-        WriteFieldValue("offset", Smi::New(Field::TargetOffsetOf(field)));
-      }
-    }
-  }
-
- private:
-  GrowableArray<FieldPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class FieldDeserializationCluster : public DeserializationCluster {
- public:
-  FieldDeserializationCluster() : DeserializationCluster("Field") {}
-  ~FieldDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Field::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    Snapshot::Kind kind = d->kind();
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      FieldPtr field = static_cast<FieldPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(field, kFieldCid, Field::InstanceSize());
-      ReadFromTo(field);
-      if (kind != Snapshot::kFullAOT) {
-        field->untag()->guarded_list_length_ =
-            static_cast<SmiPtr>(d->ReadRef());
-      }
-      if (kind == Snapshot::kFullJIT) {
-        field->untag()->dependent_code_ = static_cast<ArrayPtr>(d->ReadRef());
-      }
-      if (kind != Snapshot::kFullAOT) {
-        field->untag()->token_pos_ = d->ReadTokenPosition();
-        field->untag()->end_token_pos_ = d->ReadTokenPosition();
-        field->untag()->guarded_cid_ = d->ReadCid();
-        field->untag()->is_nullable_ = d->ReadCid();
-        const int8_t static_type_exactness_state = d->Read<int8_t>();
-#if defined(TARGET_ARCH_X64)
-        field->untag()->static_type_exactness_state_ =
-            static_type_exactness_state;
-#else
-        // We might produce core snapshots using X64 VM and then consume
-        // them in IA32 or ARM VM. In which case we need to simply ignore
-        // static type exactness state written into snapshot because non-X64
-        // builds don't have this feature enabled.
-        // TODO(dartbug.com/34170) Support other architectures.
-        USE(static_type_exactness_state);
-        field->untag()->static_type_exactness_state_ =
-            StaticTypeExactnessState::NotTracking().Encode();
-#endif  // defined(TARGET_ARCH_X64)
-#if !defined(DART_PRECOMPILED_RUNTIME)
-        field->untag()->kernel_offset_ = d->Read<uint32_t>();
-#endif
-      }
-      field->untag()->kind_bits_ = d->Read<uint16_t>();
-
-      ObjectPtr value_or_offset = d->ReadRef();
-      if (Field::StaticBit::decode(field->untag()->kind_bits_)) {
-        const intptr_t field_id = d->ReadUnsigned();
-        d->initial_field_table()->SetAt(
-            field_id, static_cast<InstancePtr>(value_or_offset));
-        field->untag()->host_offset_or_field_id_ = Smi::New(field_id);
-      } else {
-        field->untag()->host_offset_or_field_id_ =
-            Smi::RawCast(value_or_offset);
-#if !defined(DART_PRECOMPILED_RUNTIME)
-        field->untag()->target_offset_ =
-            Smi::Value(field->untag()->host_offset_or_field_id());
-#endif  //  !defined(DART_PRECOMPILED_RUNTIME)
-      }
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    Field& field = Field::Handle(d->zone());
-    if (!IsolateGroup::Current()->use_field_guards()) {
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        field ^= refs.At(i);
-        field.set_guarded_cid_unsafe(kDynamicCid);
-        field.set_is_nullable_unsafe(true);
-        field.set_guarded_list_length_unsafe(Field::kNoFixedLength);
-        field.set_guarded_list_length_in_object_offset_unsafe(
-            Field::kUnknownLengthOffset);
-        field.set_static_type_exactness_state_unsafe(
-            StaticTypeExactnessState::NotTracking());
-      }
-    } else {
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        field ^= refs.At(i);
-        field.InitializeGuardedListLengthInObjectOffset(/*unsafe=*/true);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ScriptSerializationCluster : public SerializationCluster {
- public:
-  ScriptSerializationCluster()
-      : SerializationCluster("Script",
-                             kScriptCid,
-                             compiler::target::Script::InstanceSize()) {}
-  ~ScriptSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ScriptPtr script = Script::RawCast(object);
-    objects_.Add(script);
-    PushFromTo(script);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ScriptPtr script = objects_[i];
-      s->AssignRef(script);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ScriptPtr script = objects_[i];
-      AutoTraceObjectName(script, script->untag()->url());
-      WriteFromTo(script);
-      if (s->kind() != Snapshot::kFullAOT) {
-        // Clear out the max position cache in snapshots to ensure no
-        // differences in the snapshot due to triggering caching vs. not.
-        int32_t written_flags =
-            UntaggedScript::CachedMaxPositionBitField::update(
-                0, script->untag()->flags_and_max_position_);
-        written_flags = UntaggedScript::HasCachedMaxPositionBit::update(
-            false, written_flags);
-        s->Write<int32_t>(written_flags);
-      }
-      s->Write<int32_t>(script->untag()->kernel_script_index_);
-    }
-  }
-
- private:
-  GrowableArray<ScriptPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ScriptDeserializationCluster : public DeserializationCluster {
- public:
-  ScriptDeserializationCluster() : DeserializationCluster("Script") {}
-  ~ScriptDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Script::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ScriptPtr script = static_cast<ScriptPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(script, kScriptCid,
-                                     Script::InstanceSize());
-      ReadFromTo(script);
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      script->untag()->flags_and_max_position_ = d->Read<int32_t>();
-#endif
-      script->untag()->kernel_script_index_ = d->Read<int32_t>();
-      script->untag()->load_timestamp_ = 0;
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class LibrarySerializationCluster : public SerializationCluster {
- public:
-  LibrarySerializationCluster()
-      : SerializationCluster("Library",
-                             kLibraryCid,
-                             compiler::target::Library::InstanceSize()) {}
-  ~LibrarySerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    LibraryPtr lib = Library::RawCast(object);
-    objects_.Add(lib);
-    PushFromTo(lib);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      LibraryPtr lib = objects_[i];
-      s->AssignRef(lib);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      LibraryPtr lib = objects_[i];
-      AutoTraceObjectName(lib, lib->untag()->url());
-      WriteFromTo(lib);
-      s->Write<int32_t>(lib->untag()->index_);
-      s->Write<uint16_t>(lib->untag()->num_imports_);
-      s->Write<int8_t>(lib->untag()->load_state_);
-      s->Write<uint8_t>(lib->untag()->flags_);
-      if (s->kind() != Snapshot::kFullAOT) {
-        s->Write<uint32_t>(lib->untag()->kernel_offset_);
-      }
-    }
-  }
-
- private:
-  GrowableArray<LibraryPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class LibraryDeserializationCluster : public DeserializationCluster {
- public:
-  LibraryDeserializationCluster() : DeserializationCluster("Library") {}
-  ~LibraryDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Library::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      LibraryPtr lib = static_cast<LibraryPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(lib, kLibraryCid, Library::InstanceSize());
-      ReadFromTo(lib);
-      lib->untag()->native_entry_resolver_ = NULL;
-      lib->untag()->native_entry_symbol_resolver_ = NULL;
-      lib->untag()->index_ = d->Read<int32_t>();
-      lib->untag()->num_imports_ = d->Read<uint16_t>();
-      lib->untag()->load_state_ = d->Read<int8_t>();
-      lib->untag()->flags_ =
-          UntaggedLibrary::InFullSnapshotBit::update(true, d->Read<uint8_t>());
-#if !defined(DART_PRECOMPILED_RUNTIME)
-      if (d->kind() != Snapshot::kFullAOT) {
-        lib->untag()->kernel_offset_ = d->Read<uint32_t>();
-      }
-#endif
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class NamespaceSerializationCluster : public SerializationCluster {
- public:
-  NamespaceSerializationCluster()
-      : SerializationCluster("Namespace",
-                             kNamespaceCid,
-                             compiler::target::Namespace::InstanceSize()) {}
-  ~NamespaceSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    NamespacePtr ns = Namespace::RawCast(object);
-    objects_.Add(ns);
-    PushFromTo(ns);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      NamespacePtr ns = objects_[i];
-      s->AssignRef(ns);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      NamespacePtr ns = objects_[i];
-      AutoTraceObject(ns);
-      WriteFromTo(ns);
-    }
-  }
-
- private:
-  GrowableArray<NamespacePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class NamespaceDeserializationCluster : public DeserializationCluster {
- public:
-  NamespaceDeserializationCluster() : DeserializationCluster("Namespace") {}
-  ~NamespaceDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Namespace::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      NamespacePtr ns = static_cast<NamespacePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(ns, kNamespaceCid,
-                                     Namespace::InstanceSize());
-      ReadFromTo(ns);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-// KernelProgramInfo objects are not written into a full AOT snapshot.
-class KernelProgramInfoSerializationCluster : public SerializationCluster {
- public:
-  KernelProgramInfoSerializationCluster()
-      : SerializationCluster(
-            "KernelProgramInfo",
-            kKernelProgramInfoCid,
-            compiler::target::KernelProgramInfo::InstanceSize()) {}
-  ~KernelProgramInfoSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    KernelProgramInfoPtr info = KernelProgramInfo::RawCast(object);
-    objects_.Add(info);
-    PushFromTo(info);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      KernelProgramInfoPtr info = objects_[i];
-      s->AssignRef(info);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      KernelProgramInfoPtr info = objects_[i];
-      AutoTraceObject(info);
-      WriteFromTo(info);
-      s->Write<uint32_t>(info->untag()->kernel_binary_version_);
-    }
-  }
-
- private:
-  GrowableArray<KernelProgramInfoPtr> objects_;
-};
-
-// Since KernelProgramInfo objects are not written into full AOT snapshots,
-// one will never need to read them from a full AOT snapshot.
-class KernelProgramInfoDeserializationCluster : public DeserializationCluster {
- public:
-  KernelProgramInfoDeserializationCluster()
-      : DeserializationCluster("KernelProgramInfo") {}
-  ~KernelProgramInfoDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, KernelProgramInfo::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      KernelProgramInfoPtr info = static_cast<KernelProgramInfoPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(info, kKernelProgramInfoCid,
-                                     KernelProgramInfo::InstanceSize());
-      ReadFromTo(info);
-      info->untag()->kernel_binary_version_ = d->Read<uint32_t>();
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    Array& array = Array::Handle(d->zone());
-    KernelProgramInfo& info = KernelProgramInfo::Handle(d->zone());
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      info ^= refs.At(id);
-      array = HashTables::New<UnorderedHashMap<SmiTraits>>(16, Heap::kOld);
-      info.set_libraries_cache(array);
-      array = HashTables::New<UnorderedHashMap<SmiTraits>>(16, Heap::kOld);
-      info.set_classes_cache(array);
-    }
-  }
-};
-
-class CodeSerializationCluster : public SerializationCluster {
- public:
-  explicit CodeSerializationCluster(Heap* heap)
-      : SerializationCluster("Code", kCodeCid), array_(Array::Handle()) {}
-  ~CodeSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    CodePtr code = Code::RawCast(object);
-
-    const bool is_deferred = !s->InCurrentLoadingUnitOrRoot(code);
-    if (is_deferred) {
-      s->RecordDeferredCode(code);
-    } else {
-      objects_.Add(code);
-    }
-
-    // Even if this code object is itself deferred we still need to scan
-    // the pool for references to other code objects (which might reside
-    // in the current loading unit).
-    ObjectPoolPtr pool = code->untag()->object_pool_;
-    if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
-      TracePool(s, pool, /*only_code=*/is_deferred);
-    } else {
-      if (s->InCurrentLoadingUnitOrRoot(pool)) {
-        s->Push(pool);
-      } else {
-        TracePool(s, pool, /*only_code=*/true);
-      }
-    }
-
-    if (s->kind() == Snapshot::kFullJIT) {
-      s->Push(code->untag()->deopt_info_array_);
-      s->Push(code->untag()->static_calls_target_table_);
-    } else if (s->kind() == Snapshot::kFullAOT) {
-#if defined(DART_PRECOMPILER)
-      auto const calls_array = code->untag()->static_calls_target_table_;
-      if (calls_array != Array::null()) {
-        // Some Code entries in the static calls target table may only be
-        // accessible via here, so push the Code objects.
-        array_ = calls_array;
-        for (auto entry : StaticCallsTable(array_)) {
-          auto kind = Code::KindField::decode(
-              Smi::Value(entry.Get<Code::kSCallTableKindAndOffset>()));
-          switch (kind) {
-            case Code::kCallViaCode:
-              // Code object in the pool.
-              continue;
-            case Code::kPcRelativeTTSCall:
-              // TTS will be reachable through type object which itself is
-              // in the pool.
-              continue;
-            case Code::kPcRelativeCall:
-            case Code::kPcRelativeTailCall:
-              auto destination = entry.Get<Code::kSCallTableCodeOrTypeTarget>();
-              ASSERT(destination->IsHeapObject() && destination->IsCode());
-              s->Push(destination);
-          }
-        }
-      }
-#else
-      UNREACHABLE();
-#endif
-    }
-
-    if (s->InCurrentLoadingUnitOrRoot(code->untag()->compressed_stackmaps_)) {
-      s->Push(code->untag()->compressed_stackmaps_);
-    }
-
-    if (Code::IsDiscarded(code)) {
-      ASSERT(s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
-             FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
-      // Only object pool and static call table entries and the compressed
-      // stack maps should be pushed.
-      return;
-    }
-
-    s->Push(code->untag()->owner_);
-    s->Push(code->untag()->exception_handlers_);
-    s->Push(code->untag()->pc_descriptors_);
-    s->Push(code->untag()->catch_entry_);
-    if (!FLAG_precompiled_mode || !FLAG_dwarf_stack_traces_mode) {
-      s->Push(code->untag()->inlined_id_to_function_);
-      if (s->InCurrentLoadingUnitOrRoot(code->untag()->code_source_map_)) {
-        s->Push(code->untag()->code_source_map_);
-      }
-    }
-#if !defined(PRODUCT)
-    s->Push(code->untag()->return_address_metadata_);
-    if (FLAG_code_comments) {
-      s->Push(code->untag()->comments_);
-    }
-#endif
-  }
-
-  void TracePool(Serializer* s, ObjectPoolPtr pool, bool only_code) {
-    if (pool == ObjectPool::null()) {
-      return;
-    }
-
-    const intptr_t length = pool->untag()->length_;
-    uint8_t* entry_bits = pool->untag()->entry_bits();
-    for (intptr_t i = 0; i < length; i++) {
-      auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
-      if (entry_type == ObjectPool::EntryType::kTaggedObject) {
-        const ObjectPtr target = pool->untag()->data()[i].raw_obj_;
-        if (!only_code || target->IsCode()) {
-          s->Push(target);
-        }
-      }
-    }
-  }
-
-  struct CodeOrderInfo {
-    CodePtr code;
-    intptr_t order;
-    intptr_t original_index;
-  };
-
-  // We sort code objects in such a way that code objects with the same
-  // instructions are grouped together. To make sorting more stable between
-  // similar programs we also sort them further by their original indices -
-  // this helps to stabilize output of --print-instructions-sizes-to which uses
-  // the name of the first code object (among those pointing to the same
-  // instruction objects).
-  static int CompareCodeOrderInfo(CodeOrderInfo const* a,
-                                  CodeOrderInfo const* b) {
-    if (a->order < b->order) return -1;
-    if (a->order > b->order) return 1;
-    if (a->original_index < b->original_index) return -1;
-    if (a->original_index > b->original_index) return 1;
-    return 0;
-  }
-
-  static void Insert(GrowableArray<CodeOrderInfo>* order_list,
-                     IntMap<intptr_t>* order_map,
-                     CodePtr code,
-                     intptr_t original_index) {
-    InstructionsPtr instr = code->untag()->instructions_;
-    intptr_t key = static_cast<intptr_t>(instr);
-    intptr_t order;
-    if (order_map->HasKey(key)) {
-      order = order_map->Lookup(key);
-    } else {
-      order = order_list->length() + 1;
-      order_map->Insert(key, order);
-    }
-    CodeOrderInfo info;
-    info.code = code;
-    info.order = order;
-    info.original_index = original_index;
-    order_list->Add(info);
-  }
-
-  static void Sort(GrowableArray<CodePtr>* codes) {
-    GrowableArray<CodeOrderInfo> order_list;
-    IntMap<intptr_t> order_map;
-    for (intptr_t i = 0; i < codes->length(); i++) {
-      Insert(&order_list, &order_map, (*codes)[i], i);
-    }
-    order_list.Sort(CompareCodeOrderInfo);
-    ASSERT(order_list.length() == codes->length());
-    for (intptr_t i = 0; i < order_list.length(); i++) {
-      (*codes)[i] = order_list[i].code;
-    }
-  }
-
-  static void Sort(GrowableArray<Code*>* codes) {
-    GrowableArray<CodeOrderInfo> order_list;
-    IntMap<intptr_t> order_map;
-    for (intptr_t i = 0; i < codes->length(); i++) {
-      Insert(&order_list, &order_map, (*codes)[i]->ptr(), i);
-    }
-    order_list.Sort(CompareCodeOrderInfo);
-    ASSERT(order_list.length() == codes->length());
-    for (intptr_t i = 0; i < order_list.length(); i++) {
-      *(*codes)[i] = order_list[i].code;
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      WriteAlloc(s, objects_[i]);
-    }
-    const intptr_t deferred_count = deferred_objects_.length();
-    s->WriteUnsigned(deferred_count);
-    for (intptr_t i = 0; i < deferred_count; i++) {
-      WriteAlloc(s, deferred_objects_[i]);
-    }
-  }
-
-  void WriteAlloc(Serializer* s, CodePtr code) {
-    s->AssignRef(code);
-    AutoTraceObjectName(code, MakeDisambiguatedCodeName(s, code));
-    const int32_t state_bits = code->untag()->state_bits_;
-    s->Write<int32_t>(state_bits);
-    if (!Code::DiscardedBit::decode(state_bits)) {
-      target_memory_size_ += compiler::target::Code::InstanceSize(0);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    Snapshot::Kind kind = s->kind();
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      CodePtr code = objects_[i];
-      WriteFill(s, kind, code, false);
-    }
-    const intptr_t deferred_count = deferred_objects_.length();
-    for (intptr_t i = 0; i < deferred_count; i++) {
-      CodePtr code = deferred_objects_[i];
-      WriteFill(s, kind, code, true);
-    }
-  }
-
-  void WriteFill(Serializer* s,
-                 Snapshot::Kind kind,
-                 CodePtr code,
-                 bool deferred) {
-    AutoTraceObjectName(code, MakeDisambiguatedCodeName(s, code));
-
-    intptr_t pointer_offsets_length =
-        Code::PtrOffBits::decode(code->untag()->state_bits_);
-    if (pointer_offsets_length != 0) {
-      FATAL("Cannot serialize code with embedded pointers");
-    }
-    if (kind == Snapshot::kFullAOT && Code::IsDisabled(code)) {
-      // Disabled code is fatal in AOT since we cannot recompile.
-      s->UnexpectedObject(code, "Disabled code");
-    }
-
-    s->WriteInstructions(code->untag()->instructions_,
-                         code->untag()->unchecked_offset_, code, deferred);
-    if (kind == Snapshot::kFullJIT) {
-      // TODO(rmacnak): Fix references to disabled code before serializing.
-      // For now, we may write the FixCallersTarget or equivalent stub. This
-      // will cause a fixup if this code is called.
-      const uint32_t active_unchecked_offset =
-          code->untag()->unchecked_entry_point_ - code->untag()->entry_point_;
-      s->WriteInstructions(code->untag()->active_instructions_,
-                           active_unchecked_offset, code, deferred);
-    }
-
-#if defined(DART_PRECOMPILER)
-    if (FLAG_write_v8_snapshot_profile_to != nullptr) {
-      // If we are writing V8 snapshot profile then attribute references going
-      // through the object pool and static calls to the code object itself.
-      if (kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
-          code->untag()->object_pool_ != ObjectPool::null()) {
-        ObjectPoolPtr pool = code->untag()->object_pool_;
-        // Non-empty per-code object pools should not be reachable in this mode.
-        ASSERT(!s->HasRef(pool) || pool == Object::empty_object_pool().ptr());
-        s->CreateArtificialNodeIfNeeded(pool);
-        s->AttributePropertyRef(pool, "object_pool_");
-      }
-      if (kind != Snapshot::kFullJIT &&
-          code->untag()->static_calls_target_table_ != Array::null()) {
-        auto const table = code->untag()->static_calls_target_table_;
-        // Non-empty static call target tables shouldn't be reachable in this
-        // mode.
-        ASSERT(!s->HasRef(table) || table == Object::empty_array().ptr());
-        s->CreateArtificialNodeIfNeeded(table);
-        s->AttributePropertyRef(table, "static_calls_target_table_");
-      }
-    }
-#endif  // defined(DART_PRECOMPILER)
-
-    if (Code::IsDiscarded(code)) {
-      // Only write instructions, compressed stackmaps and state bits
-      // for the discarded Code objects.
-      ASSERT(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions &&
-             FLAG_dwarf_stack_traces_mode && !FLAG_retain_code_objects);
-#if defined(DART_PRECOMPILER)
-      if (FLAG_write_v8_snapshot_profile_to != nullptr) {
-        // Keep the owner as a (possibly artificial) node for snapshot analysis.
-        const auto& owner = code->untag()->owner_;
-        s->CreateArtificialNodeIfNeeded(owner);
-        s->AttributePropertyRef(owner, "owner_");
-      }
-#endif
-
-      return;
-    }
-
-    // No need to write object pool out if we are producing full AOT
-    // snapshot with bare instructions.
-    if (!(kind == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
-      if (s->InCurrentLoadingUnitOrRoot(code->untag()->object_pool_)) {
-        WriteField(code, object_pool_);
-      } else {
-        WriteFieldValue(object_pool_, ObjectPool::null());
-      }
-    }
-    WriteField(code, owner_);
-    WriteField(code, exception_handlers_);
-    WriteField(code, pc_descriptors_);
-    WriteField(code, catch_entry_);
-    if (s->InCurrentLoadingUnitOrRoot(code->untag()->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_);
-      if (s->InCurrentLoadingUnitOrRoot(code->untag()->code_source_map_)) {
-        WriteField(code, code_source_map_);
-      } else {
-        WriteFieldValue(code_source_map_, CodeSourceMap::null());
-      }
-    }
-    if (kind == Snapshot::kFullJIT) {
-      WriteField(code, deopt_info_array_);
-      WriteField(code, static_calls_target_table_);
-    }
-
-#if !defined(PRODUCT)
-    WriteField(code, return_address_metadata_);
-    if (FLAG_code_comments) {
-      WriteField(code, comments_);
-    }
-#endif
-  }
-
-  GrowableArray<CodePtr>* objects() { return &objects_; }
-  GrowableArray<CodePtr>* deferred_objects() { return &deferred_objects_; }
-
-  static const char* MakeDisambiguatedCodeName(Serializer* s, CodePtr c) {
-    if (s->profile_writer() == nullptr) {
-      return nullptr;
-    }
-
-    REUSABLE_CODE_HANDLESCOPE(s->thread());
-    Code& code = reused_code_handle.Handle();
-    code = c;
-    return code.QualifiedName(
-        NameFormattingParams::DisambiguatedWithoutClassName(
-            Object::NameVisibility::kInternalName));
-  }
-
- private:
-  GrowableArray<CodePtr> objects_;
-  GrowableArray<CodePtr> deferred_objects_;
-  Array& array_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class CodeDeserializationCluster : public DeserializationCluster {
- public:
-  CodeDeserializationCluster() : DeserializationCluster("Code") {}
-  ~CodeDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    PageSpace* old_space = d->heap()->old_space();
-    start_index_ = d->next_index();
-    d->set_code_start_index(start_index_);
-    const intptr_t count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      ReadAllocOneCode(d, old_space);
-    }
-    stop_index_ = d->next_index();
-    deferred_start_index_ = d->next_index();
-    const intptr_t deferred_count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < deferred_count; i++) {
-      ReadAllocOneCode(d, old_space);
-    }
-    deferred_stop_index_ = d->next_index();
-  }
-
-  void ReadAllocOneCode(Deserializer* d, PageSpace* old_space) {
-    const int32_t state_bits = d->Read<int32_t>();
-    if (Code::DiscardedBit::decode(state_bits)) {
-      ASSERT(StubCode::HasBeenInitialized());
-      d->AssignRef(StubCode::UnknownDartCode().ptr());
-    } else {
-      auto code = static_cast<CodePtr>(
-          old_space->AllocateSnapshot(Code::InstanceSize(0)));
-      d->AssignRef(code);
-      code->untag()->state_bits_ = state_bits;
-    }
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ReadFill(d, id, false);
-    }
-    for (intptr_t id = deferred_start_index_; id < deferred_stop_index_; id++) {
-      ReadFill(d, id, true);
-    }
-  }
-
-  void ReadFill(Deserializer* d, intptr_t id, bool deferred) {
-    auto const code = static_cast<CodePtr>(d->Ref(id));
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-    if (Code::IsUnknownDartCode(code)) {
-      d->ReadInstructions(code, deferred, /*discarded=*/true);
-      return;
-    }
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-    Deserializer::InitializeHeader(code, kCodeCid, Code::InstanceSize(0));
-    ASSERT(!Code::IsDiscarded(code));
-
-    d->ReadInstructions(code, deferred, /*discarded=*/false);
-
-    // There would be a single global pool if this is a full AOT snapshot
-    // with bare instructions.
-    if (!(d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
-      code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
-    } else {
-      code->untag()->object_pool_ = ObjectPool::null();
-    }
-    code->untag()->owner_ = d->ReadRef();
-    code->untag()->exception_handlers_ =
-        static_cast<ExceptionHandlersPtr>(d->ReadRef());
-    code->untag()->pc_descriptors_ =
-        static_cast<PcDescriptorsPtr>(d->ReadRef());
-    code->untag()->catch_entry_ = d->ReadRef();
-    code->untag()->compressed_stackmaps_ =
-        static_cast<CompressedStackMapsPtr>(d->ReadRef());
-    code->untag()->inlined_id_to_function_ =
-        static_cast<ArrayPtr>(d->ReadRef());
-    code->untag()->code_source_map_ =
-        static_cast<CodeSourceMapPtr>(d->ReadRef());
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-    if (d->kind() == Snapshot::kFullJIT) {
-      code->untag()->deopt_info_array_ = static_cast<ArrayPtr>(d->ReadRef());
-      code->untag()->static_calls_target_table_ =
-          static_cast<ArrayPtr>(d->ReadRef());
-    }
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-#if !defined(PRODUCT)
-    code->untag()->return_address_metadata_ = d->ReadRef();
-    code->untag()->var_descriptors_ = LocalVarDescriptors::null();
-    code->untag()->comments_ = FLAG_code_comments
-                                   ? static_cast<ArrayPtr>(d->ReadRef())
-                                   : Array::null();
-    code->untag()->compile_timestamp_ = 0;
-#endif
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    d->EndInstructions();
-
-#if !defined(PRODUCT)
-    if (!CodeObservers::AreActive() && !FLAG_support_disassembler) return;
-#endif
-    Code& code = Code::Handle(d->zone());
-#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-    Object& owner = Object::Handle(d->zone());
-#endif
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      code ^= refs.At(id);
-#if !defined(DART_PRECOMPILED_RUNTIME) && !defined(PRODUCT)
-      if (CodeObservers::AreActive()) {
-        Code::NotifyCodeObservers(code, code.is_optimized());
-      }
-#endif
-#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-      owner = code.owner();
-      if (owner.IsFunction()) {
-        if ((FLAG_disassemble ||
-             (code.is_optimized() && FLAG_disassemble_optimized)) &&
-            compiler::PrintFilter::ShouldPrint(Function::Cast(owner))) {
-          Disassembler::DisassembleCode(Function::Cast(owner), code,
-                                        code.is_optimized());
-        }
-      } else if (FLAG_disassemble_stubs) {
-        Disassembler::DisassembleStub(code.Name(), code);
-      }
-#endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-    }
-  }
-
- private:
-  intptr_t deferred_start_index_;
-  intptr_t deferred_stop_index_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ObjectPoolSerializationCluster : public SerializationCluster {
- public:
-  ObjectPoolSerializationCluster()
-      : SerializationCluster("ObjectPool", kObjectPoolCid) {}
-  ~ObjectPoolSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ObjectPoolPtr pool = ObjectPool::RawCast(object);
-    objects_.Add(pool);
-
-    if (s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
-      // Treat pool as weak.
-    } else {
-      const intptr_t length = pool->untag()->length_;
-      uint8_t* entry_bits = pool->untag()->entry_bits();
-      for (intptr_t i = 0; i < length; i++) {
-        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
-        if (entry_type == ObjectPool::EntryType::kTaggedObject) {
-          s->Push(pool->untag()->data()[i].raw_obj_);
-        }
-      }
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ObjectPoolPtr pool = objects_[i];
-      s->AssignRef(pool);
-      AutoTraceObject(pool);
-      const intptr_t length = pool->untag()->length_;
-      s->WriteUnsigned(length);
-      target_memory_size_ += compiler::target::ObjectPool::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    bool weak = s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions;
-
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ObjectPoolPtr pool = objects_[i];
-      AutoTraceObject(pool);
-      const intptr_t length = pool->untag()->length_;
-      s->WriteUnsigned(length);
-      uint8_t* entry_bits = pool->untag()->entry_bits();
-      for (intptr_t j = 0; j < length; j++) {
-        s->Write<uint8_t>(entry_bits[j]);
-        UntaggedObjectPool::Entry& entry = pool->untag()->data()[j];
-        switch (ObjectPool::TypeBits::decode(entry_bits[j])) {
-          case ObjectPool::EntryType::kTaggedObject: {
-            if ((entry.raw_obj_ == StubCode::CallNoScopeNative().ptr()) ||
-                (entry.raw_obj_ == StubCode::CallAutoScopeNative().ptr())) {
-              // Natives can run while precompiling, becoming linked and
-              // switching their stub. Reset to the initial stub used for
-              // lazy-linking.
-              s->WriteElementRef(StubCode::CallBootstrapNative().ptr(), j);
-              break;
-            }
-            if (weak && !s->HasRef(entry.raw_obj_)) {
-              // Any value will do, but null has the shortest id.
-              s->WriteElementRef(Object::null(), j);
-            } else {
-              s->WriteElementRef(entry.raw_obj_, j);
-            }
-            break;
-          }
-          case ObjectPool::EntryType::kImmediate: {
-            s->Write<intptr_t>(entry.raw_value_);
-            break;
-          }
-          case ObjectPool::EntryType::kNativeFunction:
-          case ObjectPool::EntryType::kNativeFunctionWrapper: {
-            // Write nothing. Will initialize with the lazy link entry.
-            break;
-          }
-          default:
-            UNREACHABLE();
-        }
-      }
-    }
-  }
-
- private:
-  GrowableArray<ObjectPoolPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ObjectPoolDeserializationCluster : public DeserializationCluster {
- public:
-  ObjectPoolDeserializationCluster() : DeserializationCluster("ObjectPool") {}
-  ~ObjectPoolDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(ObjectPool::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    fill_position_ = d->position();
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      const intptr_t length = d->ReadUnsigned();
-      ObjectPoolPtr pool = static_cast<ObjectPoolPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(pool, kObjectPoolCid,
-                                     ObjectPool::InstanceSize(length));
-      pool->untag()->length_ = length;
-      for (intptr_t j = 0; j < length; j++) {
-        const uint8_t entry_bits = d->Read<uint8_t>();
-        pool->untag()->entry_bits()[j] = entry_bits;
-        UntaggedObjectPool::Entry& entry = pool->untag()->data()[j];
-        switch (ObjectPool::TypeBits::decode(entry_bits)) {
-          case ObjectPool::EntryType::kTaggedObject:
-            entry.raw_obj_ = d->ReadRef();
-            break;
-          case ObjectPool::EntryType::kImmediate:
-            entry.raw_value_ = d->Read<intptr_t>();
-            break;
-          case ObjectPool::EntryType::kNativeFunction: {
-            // Read nothing. Initialize with the lazy link entry.
-            uword new_entry = NativeEntry::LinkNativeCallEntry();
-            entry.raw_value_ = static_cast<intptr_t>(new_entry);
-            break;
-          }
-          default:
-            UNREACHABLE();
-        }
-      }
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (d->is_non_root_unit()) {
-      // If this is a non-root unit, some pool entries that should be canonical
-      // may have been replaced be with other objects during canonicalization.
-
-      intptr_t restore_position = d->position();
-      d->set_position(fill_position_);
-
-      auto Z = d->zone();
-      ObjectPool& pool = ObjectPool::Handle(Z);
-      Object& entry = Object::Handle(Z);
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        pool ^= refs.At(id);
-        const intptr_t length = d->ReadUnsigned();
-        for (intptr_t j = 0; j < length; j++) {
-          const uint8_t entry_bits = d->Read<uint8_t>();
-          switch (ObjectPool::TypeBits::decode(entry_bits)) {
-            case ObjectPool::EntryType::kTaggedObject:
-              entry = refs.At(d->ReadUnsigned());
-              pool.SetObjectAt(j, entry);
-              break;
-            case ObjectPool::EntryType::kImmediate:
-              d->Read<intptr_t>();
-              break;
-            case ObjectPool::EntryType::kNativeFunction: {
-              // Read nothing.
-              break;
-            }
-            default:
-              UNREACHABLE();
-          }
-        }
-      }
-
-      d->set_position(restore_position);
-    }
-  }
-
- private:
-  intptr_t fill_position_ = 0;
-};
-
-#if defined(DART_PRECOMPILER)
-class WeakSerializationReferenceSerializationCluster
-    : public SerializationCluster {
- public:
-  WeakSerializationReferenceSerializationCluster()
-      : SerializationCluster(
-            "WeakSerializationReference",
-            compiler::target::WeakSerializationReference::InstanceSize()) {}
-  ~WeakSerializationReferenceSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ASSERT(s->kind() == Snapshot::kFullAOT);
-    objects_.Add(WeakSerializationReference::RawCast(object));
-  }
-
-  void RetraceEphemerons(Serializer* s) {
-    for (intptr_t i = 0; i < objects_.length(); i++) {
-      WeakSerializationReferencePtr weak = objects_[i];
-      if (!s->IsReachable(weak->untag()->target())) {
-        s->Push(weak->untag()->replacement());
-      }
-    }
-  }
-
-  intptr_t Count(Serializer* s) { return objects_.length(); }
-
-  void CreateArtificialTargetNodesIfNeeded(Serializer* s) {
-    for (intptr_t i = 0; i < objects_.length(); i++) {
-      WeakSerializationReferencePtr weak = objects_[i];
-      s->CreateArtificialNodeIfNeeded(weak->untag()->target());
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    UNREACHABLE();  // No WSRs are serialized, and so this cluster is not added.
-  }
-
-  void WriteFill(Serializer* s) {
-    UNREACHABLE();  // No WSRs are serialized, and so this cluster is not added.
-  }
-
- private:
-  GrowableArray<WeakSerializationReferencePtr> objects_;
-};
-#endif
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class PcDescriptorsSerializationCluster : public SerializationCluster {
- public:
-  PcDescriptorsSerializationCluster()
-      : SerializationCluster("PcDescriptors", kPcDescriptorsCid) {}
-  ~PcDescriptorsSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    PcDescriptorsPtr desc = PcDescriptors::RawCast(object);
-    objects_.Add(desc);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      PcDescriptorsPtr desc = objects_[i];
-      s->AssignRef(desc);
-      AutoTraceObject(desc);
-      const intptr_t length = desc->untag()->length_;
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::PcDescriptors::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      PcDescriptorsPtr desc = objects_[i];
-      AutoTraceObject(desc);
-      const intptr_t length = desc->untag()->length_;
-      s->WriteUnsigned(length);
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(desc->untag()->data());
-      s->WriteBytes(cdata, length);
-    }
-  }
-
- private:
-  GrowableArray<PcDescriptorsPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class PcDescriptorsDeserializationCluster : public DeserializationCluster {
- public:
-  PcDescriptorsDeserializationCluster()
-      : DeserializationCluster("PcDescriptors") {}
-  ~PcDescriptorsDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(PcDescriptors::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      const intptr_t length = d->ReadUnsigned();
-      PcDescriptorsPtr desc = static_cast<PcDescriptorsPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(desc, kPcDescriptorsCid,
-                                     PcDescriptors::InstanceSize(length));
-      desc->untag()->length_ = length;
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(desc->untag()->data());
-      d->ReadBytes(cdata, length);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class CodeSourceMapSerializationCluster : public SerializationCluster {
- public:
-  CodeSourceMapSerializationCluster()
-      : SerializationCluster("CodeSourceMap", kCodeSourceMapCid) {}
-  ~CodeSourceMapSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    CodeSourceMapPtr map = CodeSourceMap::RawCast(object);
-    objects_.Add(map);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      CodeSourceMapPtr map = objects_[i];
-      s->AssignRef(map);
-      AutoTraceObject(map);
-      const intptr_t length = map->untag()->length_;
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::PcDescriptors::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      CodeSourceMapPtr map = objects_[i];
-      AutoTraceObject(map);
-      const intptr_t length = map->untag()->length_;
-      s->WriteUnsigned(length);
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
-      s->WriteBytes(cdata, length);
-    }
-  }
-
- private:
-  GrowableArray<CodeSourceMapPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class CodeSourceMapDeserializationCluster : public DeserializationCluster {
- public:
-  CodeSourceMapDeserializationCluster()
-      : DeserializationCluster("CodeSourceMap") {}
-  ~CodeSourceMapDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(CodeSourceMap::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      const intptr_t length = d->ReadUnsigned();
-      CodeSourceMapPtr map = static_cast<CodeSourceMapPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(map, kPcDescriptorsCid,
-                                     CodeSourceMap::InstanceSize(length));
-      map->untag()->length_ = length;
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
-      d->ReadBytes(cdata, length);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class CompressedStackMapsSerializationCluster : public SerializationCluster {
- public:
-  CompressedStackMapsSerializationCluster()
-      : SerializationCluster("CompressedStackMaps", kCompressedStackMapsCid) {}
-  ~CompressedStackMapsSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    CompressedStackMapsPtr desc = CompressedStackMaps::RawCast(object);
-    objects_.Add(desc);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      CompressedStackMapsPtr map = objects_[i];
-      s->AssignRef(map);
-      AutoTraceObject(map);
-      const intptr_t length = UntaggedCompressedStackMaps::SizeField::decode(
-          map->untag()->flags_and_size_);
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::CompressedStackMaps::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      CompressedStackMapsPtr map = objects_[i];
-      AutoTraceObject(map);
-      s->WriteUnsigned(map->untag()->flags_and_size_);
-      const intptr_t length = UntaggedCompressedStackMaps::SizeField::decode(
-          map->untag()->flags_and_size_);
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
-      s->WriteBytes(cdata, length);
-    }
-  }
-
- private:
-  GrowableArray<CompressedStackMapsPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class CompressedStackMapsDeserializationCluster
-    : public DeserializationCluster {
- public:
-  CompressedStackMapsDeserializationCluster()
-      : DeserializationCluster("CompressedStackMaps") {}
-  ~CompressedStackMapsDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(old_space->AllocateSnapshot(
-          CompressedStackMaps::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      const intptr_t flags_and_size = d->ReadUnsigned();
-      const intptr_t length =
-          UntaggedCompressedStackMaps::SizeField::decode(flags_and_size);
-      CompressedStackMapsPtr map =
-          static_cast<CompressedStackMapsPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(map, kCompressedStackMapsCid,
-                                     CompressedStackMaps::InstanceSize(length));
-      map->untag()->flags_and_size_ = flags_and_size;
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(map->untag()->data());
-      d->ReadBytes(cdata, length);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME) && !defined(DART_COMPRESSED_POINTERS)
-// PcDescriptor, CompressedStackMaps, OneByteString, TwoByteString
-class RODataSerializationCluster
-    : public CanonicalSetSerializationCluster<CanonicalStringSet,
-                                              String,
-                                              ObjectPtr> {
- public:
-  RODataSerializationCluster(Zone* zone,
-                             const char* type,
-                             intptr_t cid,
-                             bool is_canonical)
-      : CanonicalSetSerializationCluster(
-            cid,
-            is_canonical,
-            is_canonical && IsStringClassId(cid),
-            ImageWriter::TagObjectTypeAsReadOnly(zone, type)),
-        zone_(zone),
-        cid_(cid),
-        type_(type) {}
-  ~RODataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    // A string's hash must already be computed when we write it because it
-    // will be loaded into read-only memory. Extra bytes due to allocation
-    // rounding need to be deterministically set for reliable deduplication in
-    // shared images.
-    if (object->untag()->InVMIsolateHeap() ||
-        s->heap()->old_space()->IsObjectFromImagePages(object)) {
-      // This object is already read-only.
-    } else {
-      Object::FinalizeReadOnlyObject(object);
-    }
-
-    objects_.Add(object);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const bool is_string_cluster = IsStringClassId(cid_);
-
-    intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-
-    uint32_t running_offset = 0;
-    for (intptr_t i = 0; i < count; i++) {
-      ObjectPtr object = objects_[i];
-      s->AssignRef(object);
-      const StringPtr name =
-          is_string_cluster ? String::RawCast(object) : nullptr;
-      Serializer::WritingObjectScope scope(s, type_, object, name);
-      uint32_t offset = s->GetDataOffset(object);
-      s->TraceDataOffset(offset);
-      ASSERT(Utils::IsAligned(
-          offset, compiler::target::ObjectAlignment::kObjectAlignment));
-      ASSERT(offset > running_offset);
-      s->WriteUnsigned((offset - running_offset) >>
-                       compiler::target::ObjectAlignment::kObjectAlignmentLog2);
-      running_offset = offset;
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    // No-op.
-  }
-
- private:
-  Zone* zone_;
-  const intptr_t cid_;
-  const char* const type_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME && !DART_COMPRESSED_POINTERS
-
-#if !defined(DART_COMPRESSED_POINTERS)
-class RODataDeserializationCluster
-    : public CanonicalSetDeserializationCluster<CanonicalStringSet> {
- public:
-  explicit RODataDeserializationCluster(bool is_canonical,
-                                        bool is_root_unit,
-                                        intptr_t cid)
-      : CanonicalSetDeserializationCluster(is_canonical,
-                                           is_root_unit,
-                                           "ROData"),
-        cid_(cid) {}
-  ~RODataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    start_index_ = d->next_index();
-    intptr_t count = d->ReadUnsigned();
-    uint32_t running_offset = 0;
-    for (intptr_t i = 0; i < count; i++) {
-      running_offset += d->ReadUnsigned() << kObjectAlignmentLog2;
-      ObjectPtr object = d->GetObjectAt(running_offset);
-      d->AssignRef(object);
-    }
-    stop_index_ = d->next_index();
-    if (cid_ == kStringCid) {
-      BuildCanonicalSetFromLayout(d);
-    }
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    // No-op.
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(d, refs, Array::Handle(object_store->symbol_table()));
-      object_store->set_symbol_table(table_);
-      if (d->isolate_group() == Dart::vm_isolate_group()) {
-        Symbols::InitFromSnapshot(d->isolate_group());
-      }
-    } else if (!primary && is_canonical()) {
-      FATAL("Cannot recanonicalize RO objects.");
-    }
-  }
-
- private:
-  const intptr_t cid_;
-};
-#endif  // !DART_COMPRESSED_POINTERS
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ExceptionHandlersSerializationCluster : public SerializationCluster {
- public:
-  ExceptionHandlersSerializationCluster()
-      : SerializationCluster("ExceptionHandlers", kExceptionHandlersCid) {}
-  ~ExceptionHandlersSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ExceptionHandlersPtr handlers = ExceptionHandlers::RawCast(object);
-    objects_.Add(handlers);
-
-    s->Push(handlers->untag()->handled_types_data());
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ExceptionHandlersPtr handlers = objects_[i];
-      s->AssignRef(handlers);
-      AutoTraceObject(handlers);
-      const intptr_t length = handlers->untag()->num_entries_;
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::ExceptionHandlers::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ExceptionHandlersPtr handlers = objects_[i];
-      AutoTraceObject(handlers);
-      const intptr_t length = handlers->untag()->num_entries_;
-      s->WriteUnsigned(length);
-      WriteCompressedField(handlers, handled_types_data);
-      for (intptr_t j = 0; j < length; j++) {
-        const ExceptionHandlerInfo& info = handlers->untag()->data()[j];
-        s->Write<uint32_t>(info.handler_pc_offset);
-        s->Write<int16_t>(info.outer_try_index);
-        s->Write<int8_t>(info.needs_stacktrace);
-        s->Write<int8_t>(info.has_catch_all);
-        s->Write<int8_t>(info.is_generated);
-      }
-    }
-  }
-
- private:
-  GrowableArray<ExceptionHandlersPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ExceptionHandlersDeserializationCluster : public DeserializationCluster {
- public:
-  ExceptionHandlersDeserializationCluster()
-      : DeserializationCluster("ExceptionHandlers") {}
-  ~ExceptionHandlersDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(ExceptionHandlers::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ExceptionHandlersPtr handlers =
-          static_cast<ExceptionHandlersPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(handlers, kExceptionHandlersCid,
-                                     ExceptionHandlers::InstanceSize(length));
-      handlers->untag()->num_entries_ = length;
-      handlers->untag()->handled_types_data_ =
-          static_cast<ArrayPtr>(d->ReadRef());
-      for (intptr_t j = 0; j < length; j++) {
-        ExceptionHandlerInfo& info = handlers->untag()->data()[j];
-        info.handler_pc_offset = d->Read<uint32_t>();
-        info.outer_try_index = d->Read<int16_t>();
-        info.needs_stacktrace = d->Read<int8_t>();
-        info.has_catch_all = d->Read<int8_t>();
-        info.is_generated = d->Read<int8_t>();
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ContextSerializationCluster : public SerializationCluster {
- public:
-  ContextSerializationCluster()
-      : SerializationCluster("Context", kContextCid) {}
-  ~ContextSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ContextPtr context = Context::RawCast(object);
-    objects_.Add(context);
-
-    s->Push(context->untag()->parent_);
-    const intptr_t length = context->untag()->num_variables_;
-    for (intptr_t i = 0; i < length; i++) {
-      s->Push(context->untag()->data()[i]);
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ContextPtr context = objects_[i];
-      s->AssignRef(context);
-      AutoTraceObject(context);
-      const intptr_t length = context->untag()->num_variables_;
-      s->WriteUnsigned(length);
-      target_memory_size_ += compiler::target::Context::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ContextPtr context = objects_[i];
-      AutoTraceObject(context);
-      const intptr_t length = context->untag()->num_variables_;
-      s->WriteUnsigned(length);
-      WriteField(context, parent_);
-      for (intptr_t j = 0; j < length; j++) {
-        s->WriteElementRef(context->untag()->data()[j], j);
-      }
-    }
-  }
-
- private:
-  GrowableArray<ContextPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ContextDeserializationCluster : public DeserializationCluster {
- public:
-  ContextDeserializationCluster() : DeserializationCluster("Context") {}
-  ~ContextDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(old_space->AllocateSnapshot(Context::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ContextPtr context = static_cast<ContextPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(context, kContextCid,
-                                     Context::InstanceSize(length));
-      context->untag()->num_variables_ = length;
-      context->untag()->parent_ = static_cast<ContextPtr>(d->ReadRef());
-      for (intptr_t j = 0; j < length; j++) {
-        context->untag()->data()[j] = d->ReadRef();
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ContextScopeSerializationCluster : public SerializationCluster {
- public:
-  ContextScopeSerializationCluster()
-      : SerializationCluster("ContextScope", kContextScopeCid) {}
-  ~ContextScopeSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ContextScopePtr scope = ContextScope::RawCast(object);
-    objects_.Add(scope);
-
-    const intptr_t length = scope->untag()->num_variables_;
-    PushFromTo(scope, length);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ContextScopePtr scope = objects_[i];
-      s->AssignRef(scope);
-      AutoTraceObject(scope);
-      const intptr_t length = scope->untag()->num_variables_;
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::ContextScope::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ContextScopePtr scope = objects_[i];
-      AutoTraceObject(scope);
-      const intptr_t length = scope->untag()->num_variables_;
-      s->WriteUnsigned(length);
-      s->Write<bool>(scope->untag()->is_implicit_);
-      WriteFromTo(scope, length);
-    }
-  }
-
- private:
-  GrowableArray<ContextScopePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ContextScopeDeserializationCluster : public DeserializationCluster {
- public:
-  ContextScopeDeserializationCluster()
-      : DeserializationCluster("ContextScope") {}
-  ~ContextScopeDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(
-          old_space->AllocateSnapshot(ContextScope::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ContextScopePtr scope = static_cast<ContextScopePtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(scope, kContextScopeCid,
-                                     ContextScope::InstanceSize(length));
-      scope->untag()->num_variables_ = length;
-      scope->untag()->is_implicit_ = d->Read<bool>();
-      ReadFromTo(scope, length);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class UnlinkedCallSerializationCluster : public SerializationCluster {
- public:
-  UnlinkedCallSerializationCluster()
-      : SerializationCluster("UnlinkedCall",
-                             kUnlinkedCallCid,
-                             compiler::target::UnlinkedCall::InstanceSize()) {}
-  ~UnlinkedCallSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    UnlinkedCallPtr unlinked = UnlinkedCall::RawCast(object);
-    objects_.Add(unlinked);
-    PushFromTo(unlinked);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      UnlinkedCallPtr unlinked = objects_[i];
-      s->AssignRef(unlinked);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      UnlinkedCallPtr unlinked = objects_[i];
-      AutoTraceObjectName(unlinked, unlinked->untag()->target_name_);
-      WriteFromTo(unlinked);
-      s->Write<bool>(unlinked->untag()->can_patch_to_monomorphic_);
-    }
-  }
-
- private:
-  GrowableArray<UnlinkedCallPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class UnlinkedCallDeserializationCluster : public DeserializationCluster {
- public:
-  UnlinkedCallDeserializationCluster()
-      : DeserializationCluster("UnlinkedCall") {}
-  ~UnlinkedCallDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, UnlinkedCall::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      UnlinkedCallPtr unlinked = static_cast<UnlinkedCallPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(unlinked, kUnlinkedCallCid,
-                                     UnlinkedCall::InstanceSize());
-      ReadFromTo(unlinked);
-      unlinked->untag()->can_patch_to_monomorphic_ = d->Read<bool>();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ICDataSerializationCluster : public SerializationCluster {
- public:
-  ICDataSerializationCluster()
-      : SerializationCluster("ICData",
-                             kICDataCid,
-                             compiler::target::ICData::InstanceSize()) {}
-  ~ICDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ICDataPtr ic = ICData::RawCast(object);
-    objects_.Add(ic);
-    PushFromTo(ic);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ICDataPtr ic = objects_[i];
-      s->AssignRef(ic);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    Snapshot::Kind kind = s->kind();
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ICDataPtr ic = objects_[i];
-      AutoTraceObjectName(ic, ic->untag()->target_name_);
-      WriteFromTo(ic);
-      if (kind != Snapshot::kFullAOT) {
-        NOT_IN_PRECOMPILED(s->Write<int32_t>(ic->untag()->deopt_id_));
-      }
-      s->Write<uint32_t>(ic->untag()->state_bits_);
-    }
-  }
-
- private:
-  GrowableArray<ICDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ICDataDeserializationCluster : public DeserializationCluster {
- public:
-  ICDataDeserializationCluster() : DeserializationCluster("ICData") {}
-  ~ICDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, ICData::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ICDataPtr ic = static_cast<ICDataPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(ic, kICDataCid, ICData::InstanceSize());
-      ReadFromTo(ic);
-      NOT_IN_PRECOMPILED(ic->untag()->deopt_id_ = d->Read<int32_t>());
-      ic->untag()->state_bits_ = d->Read<int32_t>();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class MegamorphicCacheSerializationCluster : public SerializationCluster {
- public:
-  MegamorphicCacheSerializationCluster()
-      : SerializationCluster(
-            "MegamorphicCache",
-            kMegamorphicCacheCid,
-            compiler::target::MegamorphicCache::InstanceSize()) {}
-  ~MegamorphicCacheSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    MegamorphicCachePtr cache = MegamorphicCache::RawCast(object);
-    objects_.Add(cache);
-    PushFromTo(cache);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      MegamorphicCachePtr cache = objects_[i];
-      s->AssignRef(cache);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      MegamorphicCachePtr cache = objects_[i];
-      AutoTraceObjectName(cache, cache->untag()->target_name_);
-      WriteFromTo(cache);
-      s->Write<int32_t>(cache->untag()->filled_entry_count_);
-    }
-  }
-
- private:
-  GrowableArray<MegamorphicCachePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class MegamorphicCacheDeserializationCluster : public DeserializationCluster {
- public:
-  MegamorphicCacheDeserializationCluster()
-      : DeserializationCluster("MegamorphicCache") {}
-  ~MegamorphicCacheDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, MegamorphicCache::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      MegamorphicCachePtr cache = static_cast<MegamorphicCachePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(cache, kMegamorphicCacheCid,
-                                     MegamorphicCache::InstanceSize());
-      ReadFromTo(cache);
-      cache->untag()->filled_entry_count_ = d->Read<int32_t>();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class SubtypeTestCacheSerializationCluster : public SerializationCluster {
- public:
-  SubtypeTestCacheSerializationCluster()
-      : SerializationCluster(
-            "SubtypeTestCache",
-            kSubtypeTestCacheCid,
-            compiler::target::SubtypeTestCache::InstanceSize()) {}
-  ~SubtypeTestCacheSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    SubtypeTestCachePtr cache = SubtypeTestCache::RawCast(object);
-    objects_.Add(cache);
-    s->Push(cache->untag()->cache_);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      SubtypeTestCachePtr cache = objects_[i];
-      s->AssignRef(cache);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      SubtypeTestCachePtr cache = objects_[i];
-      AutoTraceObject(cache);
-      WriteField(cache, cache_);
-    }
-  }
-
- private:
-  GrowableArray<SubtypeTestCachePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class SubtypeTestCacheDeserializationCluster : public DeserializationCluster {
- public:
-  SubtypeTestCacheDeserializationCluster()
-      : DeserializationCluster("SubtypeTestCache") {}
-  ~SubtypeTestCacheDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, SubtypeTestCache::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      SubtypeTestCachePtr cache = static_cast<SubtypeTestCachePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(cache, kSubtypeTestCacheCid,
-                                     SubtypeTestCache::InstanceSize());
-      cache->untag()->cache_ = static_cast<ArrayPtr>(d->ReadRef());
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class LoadingUnitSerializationCluster : public SerializationCluster {
- public:
-  LoadingUnitSerializationCluster()
-      : SerializationCluster("LoadingUnit",
-                             kLoadingUnitCid,
-                             compiler::target::LoadingUnit::InstanceSize()) {}
-  ~LoadingUnitSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    LoadingUnitPtr unit = LoadingUnit::RawCast(object);
-    objects_.Add(unit);
-    s->Push(unit->untag()->parent());
-  }
-
-  void WriteAlloc(Serializer* s) {
-    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);
-      WriteCompressedField(unit, parent);
-      s->Write<int32_t>(unit->untag()->id_);
-    }
-  }
-
- private:
-  GrowableArray<LoadingUnitPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class LoadingUnitDeserializationCluster : public DeserializationCluster {
- public:
-  LoadingUnitDeserializationCluster() : DeserializationCluster("LoadingUnit") {}
-  ~LoadingUnitDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, LoadingUnit::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    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->untag()->parent_ = static_cast<LoadingUnitPtr>(d->ReadRef());
-      unit->untag()->base_objects_ = Array::null();
-      unit->untag()->id_ = d->Read<int32_t>();
-      unit->untag()->loaded_ = false;
-      unit->untag()->load_outstanding_ = false;
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class LanguageErrorSerializationCluster : public SerializationCluster {
- public:
-  LanguageErrorSerializationCluster()
-      : SerializationCluster("LanguageError",
-                             kLanguageErrorCid,
-                             compiler::target::LanguageError::InstanceSize()) {}
-  ~LanguageErrorSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    LanguageErrorPtr error = LanguageError::RawCast(object);
-    objects_.Add(error);
-    PushFromTo(error);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      LanguageErrorPtr error = objects_[i];
-      s->AssignRef(error);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      LanguageErrorPtr error = objects_[i];
-      AutoTraceObject(error);
-      WriteFromTo(error);
-      s->WriteTokenPosition(error->untag()->token_pos_);
-      s->Write<bool>(error->untag()->report_after_token_);
-      s->Write<int8_t>(error->untag()->kind_);
-    }
-  }
-
- private:
-  GrowableArray<LanguageErrorPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class LanguageErrorDeserializationCluster : public DeserializationCluster {
- public:
-  LanguageErrorDeserializationCluster()
-      : DeserializationCluster("LanguageError") {}
-  ~LanguageErrorDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, LanguageError::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      LanguageErrorPtr error = static_cast<LanguageErrorPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(error, kLanguageErrorCid,
-                                     LanguageError::InstanceSize());
-      ReadFromTo(error);
-      error->untag()->token_pos_ = d->ReadTokenPosition();
-      error->untag()->report_after_token_ = d->Read<bool>();
-      error->untag()->kind_ = d->Read<int8_t>();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class UnhandledExceptionSerializationCluster : public SerializationCluster {
- public:
-  UnhandledExceptionSerializationCluster()
-      : SerializationCluster(
-            "UnhandledException",
-            kUnhandledExceptionCid,
-            compiler::target::UnhandledException::InstanceSize()) {}
-  ~UnhandledExceptionSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    UnhandledExceptionPtr exception = UnhandledException::RawCast(object);
-    objects_.Add(exception);
-    PushFromTo(exception);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      UnhandledExceptionPtr exception = objects_[i];
-      s->AssignRef(exception);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      UnhandledExceptionPtr exception = objects_[i];
-      AutoTraceObject(exception);
-      WriteFromTo(exception);
-    }
-  }
-
- private:
-  GrowableArray<UnhandledExceptionPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class UnhandledExceptionDeserializationCluster : public DeserializationCluster {
- public:
-  UnhandledExceptionDeserializationCluster()
-      : DeserializationCluster("UnhandledException") {}
-  ~UnhandledExceptionDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, UnhandledException::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      UnhandledExceptionPtr exception =
-          static_cast<UnhandledExceptionPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(exception, kUnhandledExceptionCid,
-                                     UnhandledException::InstanceSize());
-      ReadFromTo(exception);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class InstanceSerializationCluster : public SerializationCluster {
- public:
-  InstanceSerializationCluster(bool is_canonical, intptr_t cid)
-      : SerializationCluster("Instance", cid, kSizeVaries, is_canonical) {
-    ClassPtr cls = IsolateGroup::Current()->class_table()->At(cid);
-    host_next_field_offset_in_words_ =
-        cls->untag()->host_next_field_offset_in_words_;
-    ASSERT(host_next_field_offset_in_words_ > 0);
-#if defined(DART_PRECOMPILER)
-    target_next_field_offset_in_words_ =
-        cls->untag()->target_next_field_offset_in_words_;
-    target_instance_size_in_words_ =
-        cls->untag()->target_instance_size_in_words_;
-#else
-    target_next_field_offset_in_words_ =
-        cls->untag()->host_next_field_offset_in_words_;
-    target_instance_size_in_words_ = cls->untag()->host_instance_size_in_words_;
-#endif  // defined(DART_PRECOMPILER)
-    ASSERT(target_next_field_offset_in_words_ > 0);
-    ASSERT(target_instance_size_in_words_ > 0);
-  }
-  ~InstanceSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    InstancePtr instance = Instance::RawCast(object);
-    objects_.Add(instance);
-    const intptr_t next_field_offset = host_next_field_offset_in_words_
-                                       << kCompressedWordSizeLog2;
-    const auto unboxed_fields_bitmap =
-        s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(cid_);
-    intptr_t offset = Instance::NextFieldOffset();
-    while (offset < next_field_offset) {
-      // Skips unboxed fields
-      if (!unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
-        ObjectPtr raw_obj =
-            reinterpret_cast<CompressedObjectPtr*>(
-                reinterpret_cast<uword>(instance->untag()) + offset)
-                ->Decompress(instance->untag()->heap_base());
-        s->Push(raw_obj);
-      }
-      offset += kCompressedWordSize;
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-
-    s->Write<int32_t>(target_next_field_offset_in_words_);
-    s->Write<int32_t>(target_instance_size_in_words_);
-
-    for (intptr_t i = 0; i < count; i++) {
-      InstancePtr instance = objects_[i];
-      s->AssignRef(instance);
-    }
-
-    const intptr_t instance_size = compiler::target::RoundedAllocationSize(
-        target_instance_size_in_words_ * compiler::target::kCompressedWordSize);
-    target_memory_size_ += instance_size * count;
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t next_field_offset = host_next_field_offset_in_words_
-                                 << kCompressedWordSizeLog2;
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned64(CalculateTargetUnboxedFieldsBitmap(s, cid_).Value());
-    const auto unboxed_fields_bitmap =
-        s->isolate_group()->shared_class_table()->GetUnboxedFieldsMapAt(cid_);
-
-    for (intptr_t i = 0; i < count; i++) {
-      InstancePtr instance = objects_[i];
-      AutoTraceObject(instance);
-      intptr_t offset = Instance::NextFieldOffset();
-      while (offset < next_field_offset) {
-        if (unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
-          // Writes 32 bits of the unboxed value at a time
-          const compressed_uword value = *reinterpret_cast<compressed_uword*>(
-              reinterpret_cast<uword>(instance->untag()) + offset);
-          s->WriteWordWith32BitWrites(value);
-        } else {
-          ObjectPtr raw_obj =
-              reinterpret_cast<CompressedObjectPtr*>(
-                  reinterpret_cast<uword>(instance->untag()) + offset)
-                  ->Decompress(instance->untag()->heap_base());
-          s->WriteElementRef(raw_obj, offset);
-        }
-        offset += kCompressedWordSize;
-      }
-    }
-  }
-
- private:
-  intptr_t host_next_field_offset_in_words_;
-  intptr_t target_next_field_offset_in_words_;
-  intptr_t target_instance_size_in_words_;
-  GrowableArray<InstancePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class AbstractInstanceDeserializationCluster : public DeserializationCluster {
- protected:
-  explicit AbstractInstanceDeserializationCluster(const char* name,
-                                                  bool is_canonical)
-      : DeserializationCluster(name, is_canonical) {}
-
- public:
-#if defined(DART_PRECOMPILED_RUNTIME)
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!primary && is_canonical()) {
-      SafepointMutexLocker ml(
-          d->isolate_group()->constant_canonicalization_mutex());
-      Instance& instance = Instance::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        instance ^= refs.At(i);
-        instance = instance.CanonicalizeLocked(d->thread());
-        refs.SetAt(i, instance);
-      }
-    }
-  }
-#endif
-};
-
-class InstanceDeserializationCluster
-    : public AbstractInstanceDeserializationCluster {
- public:
-  explicit InstanceDeserializationCluster(intptr_t cid, bool is_canonical)
-      : AbstractInstanceDeserializationCluster("Instance", is_canonical),
-        cid_(cid) {}
-  ~InstanceDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    start_index_ = d->next_index();
-    PageSpace* old_space = d->heap()->old_space();
-    const intptr_t count = d->ReadUnsigned();
-    next_field_offset_in_words_ = d->Read<int32_t>();
-    instance_size_in_words_ = d->Read<int32_t>();
-    intptr_t instance_size = Object::RoundedAllocationSize(
-        instance_size_in_words_ * kCompressedWordSize);
-    for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(old_space->AllocateSnapshot(instance_size));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    intptr_t next_field_offset = next_field_offset_in_words_
-                                 << kCompressedWordSizeLog2;
-    intptr_t instance_size = Object::RoundedAllocationSize(
-        instance_size_in_words_ * kCompressedWordSize);
-    const UnboxedFieldBitmap unboxed_fields_bitmap(d->ReadUnsigned64());
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      InstancePtr instance = static_cast<InstancePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(instance, cid_, instance_size,
-                                     primary && is_canonical());
-      intptr_t offset = Instance::NextFieldOffset();
-      while (offset < next_field_offset) {
-        if (unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
-          compressed_uword* p = reinterpret_cast<compressed_uword*>(
-              reinterpret_cast<uword>(instance->untag()) + offset);
-          // Reads 32 bits of the unboxed value at a time
-          *p = d->ReadWordWith32BitReads();
-        } else {
-          CompressedObjectPtr* p = reinterpret_cast<CompressedObjectPtr*>(
-              reinterpret_cast<uword>(instance->untag()) + offset);
-          *p = d->ReadRef();
-        }
-        offset += kCompressedWordSize;
-      }
-      while (offset < instance_size) {
-        CompressedObjectPtr* p = reinterpret_cast<CompressedObjectPtr*>(
-            reinterpret_cast<uword>(instance->untag()) + offset);
-        *p = Object::null();
-        offset += kCompressedWordSize;
-      }
-      ASSERT(offset == instance_size);
-    }
-  }
-
- private:
-  const intptr_t cid_;
-  intptr_t next_field_offset_in_words_;
-  intptr_t instance_size_in_words_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class LibraryPrefixSerializationCluster : public SerializationCluster {
- public:
-  LibraryPrefixSerializationCluster()
-      : SerializationCluster("LibraryPrefix",
-                             kLibraryPrefixCid,
-                             compiler::target::LibraryPrefix::InstanceSize()) {}
-  ~LibraryPrefixSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    LibraryPrefixPtr prefix = LibraryPrefix::RawCast(object);
-    objects_.Add(prefix);
-    PushFromTo(prefix);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      LibraryPrefixPtr prefix = objects_[i];
-      s->AssignRef(prefix);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      LibraryPrefixPtr prefix = objects_[i];
-      AutoTraceObject(prefix);
-      WriteFromTo(prefix);
-      s->Write<uint16_t>(prefix->untag()->num_imports_);
-      s->Write<bool>(prefix->untag()->is_deferred_load_);
-    }
-  }
-
- private:
-  GrowableArray<LibraryPrefixPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class LibraryPrefixDeserializationCluster : public DeserializationCluster {
- public:
-  LibraryPrefixDeserializationCluster()
-      : DeserializationCluster("LibraryPrefix") {}
-  ~LibraryPrefixDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, LibraryPrefix::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      LibraryPrefixPtr prefix = static_cast<LibraryPrefixPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(prefix, kLibraryPrefixCid,
-                                     LibraryPrefix::InstanceSize());
-      ReadFromTo(prefix);
-      prefix->untag()->num_imports_ = d->Read<uint16_t>();
-      prefix->untag()->is_deferred_load_ = d->Read<bool>();
-    }
-  }
-};
-
-// Used to pack nullability into other serialized values.
-static constexpr intptr_t kNullabilityBitSize = 2;
-static constexpr intptr_t kNullabilityBitMask = (1 << kNullabilityBitSize) - 1;
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypeSerializationCluster
-    : public CanonicalSetSerializationCluster<
-          CanonicalTypeSet,
-          Type,
-          TypePtr,
-          /*kAllCanonicalObjectsAreIncludedIntoSet=*/false> {
- public:
-  TypeSerializationCluster(bool is_canonical, bool represents_canonical_set)
-      : CanonicalSetSerializationCluster(
-            kTypeCid,
-            is_canonical,
-            represents_canonical_set,
-            "Type",
-            compiler::target::Type::InstanceSize()) {}
-  ~TypeSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypePtr type = Type::RawCast(object);
-    objects_.Add(type);
-
-    PushFromTo(type);
-
-    if (type->untag()->type_class_id()->IsHeapObject()) {
-      // Type class is still an unresolved class.
-      UNREACHABLE();
-    }
-
-    SmiPtr raw_type_class_id = Smi::RawCast(type->untag()->type_class_id());
-    ClassPtr type_class =
-        s->isolate_group()->class_table()->At(Smi::Value(raw_type_class_id));
-    s->Push(type_class);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-    for (intptr_t i = 0; i < count; i++) {
-      TypePtr type = objects_[i];
-      s->AssignRef(type);
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WriteType(s, objects_[i]);
-    }
-  }
-
- private:
-  Type& type_ = Type::Handle();
-  Class& cls_ = Class::Handle();
-
-  // Type::Canonicalize does not actually put all canonical Type objects into
-  // canonical_types set. Some of the canonical declaration types (but not all
-  // of them) are simply cached in UntaggedClass::declaration_type_ and are not
-  // inserted into the canonical_types set.
-  // Keep in sync with Type::Canonicalize.
-  virtual bool IsInCanonicalSet(Serializer* s, TypePtr type) {
-    SmiPtr raw_type_class_id = Smi::RawCast(type->untag()->type_class_id());
-    ClassPtr type_class =
-        s->isolate_group()->class_table()->At(Smi::Value(raw_type_class_id));
-    if (type_class->untag()->declaration_type() != type) {
-      return true;
-    }
-
-    type_ = type;
-    cls_ = type_class;
-    return !type_.IsDeclarationTypeOf(cls_);
-  }
-
-  void WriteType(Serializer* s, TypePtr type) {
-    AutoTraceObject(type);
-    WriteFromTo(type);
-    ASSERT(type->untag()->type_state_ < (1 << UntaggedType::kTypeStateBitSize));
-    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
-    static_assert(UntaggedType::kTypeStateBitSize + kNullabilityBitSize <=
-                      kBitsPerByte * sizeof(uint8_t),
-                  "Cannot pack type_state_ and nullability_ into a uint8_t");
-    const uint8_t combined =
-        (type->untag()->type_state_ << kNullabilityBitSize) |
-        type->untag()->nullability_;
-    ASSERT_EQUAL(type->untag()->type_state_, combined >> kNullabilityBitSize);
-    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
-    s->Write<uint8_t>(combined);
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypeDeserializationCluster
-    : public CanonicalSetDeserializationCluster<
-          CanonicalTypeSet,
-          /*kAllCanonicalObjectsAreIncludedIntoSet=*/false> {
- public:
-  explicit TypeDeserializationCluster(bool is_canonical, bool is_root_unit)
-      : CanonicalSetDeserializationCluster(is_canonical, is_root_unit, "Type") {
-  }
-  ~TypeDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Type::InstanceSize());
-    BuildCanonicalSetFromLayout(d);
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypePtr type = static_cast<TypePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kTypeCid, Type::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(type);
-      const uint8_t combined = d->Read<uint8_t>();
-      type->untag()->type_state_ = combined >> kNullabilityBitSize;
-      type->untag()->nullability_ = combined & kNullabilityBitMask;
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(d, refs,
-                         Array::Handle(object_store->canonical_types()));
-      object_store->set_canonical_types(table_);
-    } else if (!primary && is_canonical()) {
-      AbstractType& type = AbstractType::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        type ^= refs.At(i);
-        type = type.Canonicalize(d->thread(), nullptr);
-        refs.SetAt(i, type);
-      }
-    }
-
-    Type& type = Type::Handle(d->zone());
-    Code& stub = Code::Handle(d->zone());
-
-    if (Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type ^= refs.At(id);
-        type.UpdateTypeTestingStubEntryPoint();
-      }
-    } else {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type ^= refs.At(id);
-        stub = TypeTestingStubGenerator::DefaultCodeForType(type);
-        type.InitializeTypeTestingStubNonAtomic(stub);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class FunctionTypeSerializationCluster
-    : public CanonicalSetSerializationCluster<CanonicalFunctionTypeSet,
-                                              FunctionType,
-                                              FunctionTypePtr> {
- public:
-  explicit FunctionTypeSerializationCluster(bool is_canonical,
-                                            bool represents_canonical_set)
-      : CanonicalSetSerializationCluster(
-            kFunctionTypeCid,
-            is_canonical,
-            represents_canonical_set,
-            "FunctionType",
-            compiler::target::FunctionType::InstanceSize()) {}
-  ~FunctionTypeSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    FunctionTypePtr type = FunctionType::RawCast(object);
-    objects_.Add(type);
-    PushFromTo(type);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-
-    for (intptr_t i = 0; i < count; i++) {
-      FunctionTypePtr type = objects_[i];
-      s->AssignRef(type);
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WriteFunctionType(s, objects_[i]);
-    }
-  }
-
- private:
-  void WriteFunctionType(Serializer* s, FunctionTypePtr type) {
-    AutoTraceObject(type);
-    WriteFromTo(type);
-    ASSERT(type->untag()->type_state_ <
-           (1 << UntaggedFunctionType::kTypeStateBitSize));
-    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
-    static_assert(
-        UntaggedFunctionType::kTypeStateBitSize + kNullabilityBitSize <=
-            kBitsPerByte * sizeof(uint8_t),
-        "Cannot pack type_state_ and nullability_ into a uint8_t");
-    const uint8_t combined =
-        (type->untag()->type_state_ << kNullabilityBitSize) |
-        type->untag()->nullability_;
-    ASSERT_EQUAL(type->untag()->type_state_, combined >> kNullabilityBitSize);
-    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
-    s->Write<uint8_t>(combined);
-    s->Write<uint32_t>(type->untag()->packed_parameter_counts_);
-    s->Write<uint16_t>(type->untag()->packed_type_parameter_counts_);
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class FunctionTypeDeserializationCluster
-    : public CanonicalSetDeserializationCluster<CanonicalFunctionTypeSet> {
- public:
-  explicit FunctionTypeDeserializationCluster(bool is_canonical,
-                                              bool is_root_unit)
-      : CanonicalSetDeserializationCluster(is_canonical,
-                                           is_root_unit,
-                                           "FunctionType") {}
-  ~FunctionTypeDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, FunctionType::InstanceSize());
-    BuildCanonicalSetFromLayout(d);
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      FunctionTypePtr type = static_cast<FunctionTypePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kFunctionTypeCid,
-                                     FunctionType::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(type);
-      const uint8_t combined = d->Read<uint8_t>();
-      type->untag()->type_state_ = combined >> kNullabilityBitSize;
-      type->untag()->nullability_ = combined & kNullabilityBitMask;
-      type->untag()->packed_parameter_counts_ = d->Read<uint32_t>();
-      type->untag()->packed_type_parameter_counts_ = d->Read<uint16_t>();
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(
-          d, refs, Array::Handle(object_store->canonical_function_types()));
-      object_store->set_canonical_function_types(table_);
-    } else if (!primary && is_canonical()) {
-      AbstractType& type = AbstractType::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        type ^= refs.At(i);
-        type = type.Canonicalize(d->thread(), nullptr);
-        refs.SetAt(i, type);
-      }
-    }
-
-    FunctionType& type = FunctionType::Handle(d->zone());
-    Code& stub = Code::Handle(d->zone());
-
-    if (Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type ^= refs.At(id);
-        type.UpdateTypeTestingStubEntryPoint();
-      }
-    } else {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type ^= refs.At(id);
-        stub = TypeTestingStubGenerator::DefaultCodeForType(type);
-        type.InitializeTypeTestingStubNonAtomic(stub);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypeRefSerializationCluster : public SerializationCluster {
- public:
-  TypeRefSerializationCluster()
-      : SerializationCluster("TypeRef",
-                             kTypeRefCid,
-                             compiler::target::TypeRef::InstanceSize()) {}
-  ~TypeRefSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypeRefPtr type = TypeRef::RawCast(object);
-    objects_.Add(type);
-    PushFromTo(type);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      TypeRefPtr type = objects_[i];
-      s->AssignRef(type);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      TypeRefPtr type = objects_[i];
-      AutoTraceObject(type);
-      WriteFromTo(type);
-    }
-  }
-
- private:
-  GrowableArray<TypeRefPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypeRefDeserializationCluster : public DeserializationCluster {
- public:
-  TypeRefDeserializationCluster() : DeserializationCluster("TypeRef") {}
-  ~TypeRefDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, TypeRef::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypeRefPtr type = static_cast<TypeRefPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kTypeRefCid, TypeRef::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(type);
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!primary && is_canonical()) {
-      AbstractType& type = AbstractType::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        type ^= refs.At(i);
-        type = type.Canonicalize(d->thread(), nullptr);
-        refs.SetAt(i, type);
-      }
-    }
-
-    TypeRef& type_ref = TypeRef::Handle(d->zone());
-    Code& stub = Code::Handle(d->zone());
-
-    if (Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type_ref ^= refs.At(id);
-        type_ref.UpdateTypeTestingStubEntryPoint();
-      }
-    } else {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type_ref ^= refs.At(id);
-        stub = TypeTestingStubGenerator::DefaultCodeForType(type_ref);
-        type_ref.InitializeTypeTestingStubNonAtomic(stub);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypeParameterSerializationCluster
-    : public CanonicalSetSerializationCluster<CanonicalTypeParameterSet,
-                                              TypeParameter,
-                                              TypeParameterPtr> {
- public:
-  TypeParameterSerializationCluster(bool is_canonical,
-                                    bool cluster_represents_canonical_set)
-      : CanonicalSetSerializationCluster(
-            kTypeParameterCid,
-            is_canonical,
-            cluster_represents_canonical_set,
-            "TypeParameter",
-            compiler::target::TypeParameter::InstanceSize()) {}
-  ~TypeParameterSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypeParameterPtr type = TypeParameter::RawCast(object);
-    objects_.Add(type);
-
-    PushFromTo(type);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-    for (intptr_t i = 0; i < count; i++) {
-      TypeParameterPtr type = objects_[i];
-      s->AssignRef(type);
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WriteTypeParameter(s, objects_[i]);
-    }
-  }
-
- private:
-  void WriteTypeParameter(Serializer* s, TypeParameterPtr type) {
-    AutoTraceObject(type);
-    WriteFromTo(type);
-    s->Write<int32_t>(type->untag()->parameterized_class_id_);
-    s->Write<uint8_t>(type->untag()->base_);
-    s->Write<uint8_t>(type->untag()->index_);
-    ASSERT(type->untag()->flags_ < (1 << UntaggedTypeParameter::kFlagsBitSize));
-    ASSERT(type->untag()->nullability_ < (1 << kNullabilityBitSize));
-    static_assert(UntaggedTypeParameter::kFlagsBitSize + kNullabilityBitSize <=
-                      kBitsPerByte * sizeof(uint8_t),
-                  "Cannot pack flags_ and nullability_ into a uint8_t");
-    const uint8_t combined = (type->untag()->flags_ << kNullabilityBitSize) |
-                             type->untag()->nullability_;
-    ASSERT_EQUAL(type->untag()->flags_, combined >> kNullabilityBitSize);
-    ASSERT_EQUAL(type->untag()->nullability_, combined & kNullabilityBitMask);
-    s->Write<uint8_t>(combined);
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypeParameterDeserializationCluster
-    : public CanonicalSetDeserializationCluster<CanonicalTypeParameterSet> {
- public:
-  explicit TypeParameterDeserializationCluster(bool is_canonical,
-                                               bool is_root_unit)
-      : CanonicalSetDeserializationCluster(is_canonical,
-                                           is_root_unit,
-                                           "TypeParameter") {}
-  ~TypeParameterDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, TypeParameter::InstanceSize());
-    BuildCanonicalSetFromLayout(d);
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypeParameterPtr type = static_cast<TypeParameterPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kTypeParameterCid,
-                                     TypeParameter::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(type);
-      type->untag()->parameterized_class_id_ = d->Read<int32_t>();
-      type->untag()->base_ = d->Read<uint8_t>();
-      type->untag()->index_ = d->Read<uint8_t>();
-      const uint8_t combined = d->Read<uint8_t>();
-      type->untag()->flags_ = combined >> kNullabilityBitSize;
-      type->untag()->nullability_ = combined & kNullabilityBitMask;
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(
-          d, refs, Array::Handle(object_store->canonical_type_parameters()));
-      object_store->set_canonical_type_parameters(table_);
-    } else if (!primary && is_canonical()) {
-      TypeParameter& type_param = TypeParameter::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        type_param ^= refs.At(i);
-        type_param ^= type_param.Canonicalize(d->thread(), nullptr);
-        refs.SetAt(i, type_param);
-      }
-    }
-
-    TypeParameter& type_param = TypeParameter::Handle(d->zone());
-    Code& stub = Code::Handle(d->zone());
-
-    if (Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type_param ^= refs.At(id);
-        type_param.UpdateTypeTestingStubEntryPoint();
-      }
-    } else {
-      for (intptr_t id = start_index_; id < stop_index_; id++) {
-        type_param ^= refs.At(id);
-        stub = TypeTestingStubGenerator::DefaultCodeForType(type_param);
-        type_param.InitializeTypeTestingStubNonAtomic(stub);
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ClosureSerializationCluster : public SerializationCluster {
- public:
-  explicit ClosureSerializationCluster(bool is_canonical)
-      : SerializationCluster("Closure",
-                             kClosureCid,
-                             compiler::target::Closure::InstanceSize(),
-                             is_canonical) {}
-  ~ClosureSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ClosurePtr closure = Closure::RawCast(object);
-    objects_.Add(closure);
-    PushFromTo(closure);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ClosurePtr closure = objects_[i];
-      s->AssignRef(closure);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ClosurePtr closure = objects_[i];
-      AutoTraceObject(closure);
-      WriteFromTo(closure);
-    }
-  }
-
- private:
-  GrowableArray<ClosurePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ClosureDeserializationCluster
-    : public AbstractInstanceDeserializationCluster {
- public:
-  explicit ClosureDeserializationCluster(bool is_canonical)
-      : AbstractInstanceDeserializationCluster("Closure", is_canonical) {}
-  ~ClosureDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Closure::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ClosurePtr closure = static_cast<ClosurePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(closure, kClosureCid,
-                                     Closure::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(closure);
-#if defined(DART_PRECOMPILED_RUNTIME)
-      closure->untag()->entry_point_ = 0;
-#endif
-    }
-  }
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    // We only cache the entry point in bare instructions mode (as we need
-    // to load the function anyway otherwise).
-    if (d->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions) {
-      auto& closure = Closure::Handle(d->zone());
-      auto& func = Function::Handle(d->zone());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        closure ^= refs.At(i);
-        func = closure.function();
-        uword entry_point = func.entry_point();
-        ASSERT(entry_point != 0);
-        closure.ptr()->untag()->entry_point_ = entry_point;
-      }
-    }
-  }
-#endif
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class MintSerializationCluster : public SerializationCluster {
- public:
-  explicit MintSerializationCluster(bool is_canonical)
-      : SerializationCluster("int", kMintCid, kSizeVaries, is_canonical) {}
-  ~MintSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    if (!object->IsHeapObject()) {
-      SmiPtr smi = Smi::RawCast(object);
-      smis_.Add(smi);
-    } else {
-      MintPtr mint = Mint::RawCast(object);
-      mints_.Add(mint);
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    s->WriteUnsigned(smis_.length() + mints_.length());
-    for (intptr_t i = 0; i < smis_.length(); i++) {
-      SmiPtr smi = smis_[i];
-      s->AssignRef(smi);
-      AutoTraceObject(smi);
-      const int64_t value = Smi::Value(smi);
-      s->Write<int64_t>(value);
-      if (!Smi::IsValid(value)) {
-        // This Smi will become a Mint when loaded.
-        target_memory_size_ += compiler::target::Mint::InstanceSize();
-      }
-    }
-    for (intptr_t i = 0; i < mints_.length(); i++) {
-      MintPtr mint = mints_[i];
-      s->AssignRef(mint);
-      AutoTraceObject(mint);
-      s->Write<int64_t>(mint->untag()->value_);
-      // All Mints on the host should be Mints on the target.
-      ASSERT(!Smi::IsValid(mint->untag()->value_));
-      target_memory_size_ += compiler::target::Mint::InstanceSize();
-    }
-  }
-
-  void WriteFill(Serializer* s) {}
-
- private:
-  GrowableArray<SmiPtr> smis_;
-  GrowableArray<MintPtr> mints_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class MintDeserializationCluster : public DeserializationCluster {
- public:
-  explicit MintDeserializationCluster(bool is_canonical)
-      : DeserializationCluster("int", is_canonical) {}
-  ~MintDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    PageSpace* old_space = d->heap()->old_space();
-
-    start_index_ = d->next_index();
-    const intptr_t count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      int64_t value = d->Read<int64_t>();
-      if (Smi::IsValid(value)) {
-        d->AssignRef(Smi::New(value));
-      } else {
-        MintPtr mint = static_cast<MintPtr>(
-            old_space->AllocateSnapshot(Mint::InstanceSize()));
-        Deserializer::InitializeHeader(mint, kMintCid, Mint::InstanceSize(),
-                                       is_canonical());
-        mint->untag()->value_ = value;
-        d->AssignRef(mint);
-      }
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {}
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!primary && is_canonical()) {
-      const Class& mint_cls = Class::Handle(
-          d->zone(), d->isolate_group()->object_store()->mint_class());
-      Object& number = Object::Handle(d->zone());
-      Mint& number2 = Mint::Handle(d->zone());
-      SafepointMutexLocker ml(
-          d->isolate_group()->constant_canonicalization_mutex());
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        number = refs.At(i);
-        if (!number.IsMint()) continue;
-        number2 =
-            mint_cls.LookupCanonicalMint(d->zone(), Mint::Cast(number).value());
-        if (number2.IsNull()) {
-          number.SetCanonical();
-          mint_cls.InsertCanonicalMint(d->zone(), Mint::Cast(number));
-        } else {
-          refs.SetAt(i, number2);
-        }
-      }
-    }
-  }
-#endif
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class DoubleSerializationCluster : public SerializationCluster {
- public:
-  explicit DoubleSerializationCluster(bool is_canonical)
-      : SerializationCluster("double",
-                             kDoubleCid,
-                             compiler::target::Double::InstanceSize(),
-                             is_canonical) {}
-  ~DoubleSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    DoublePtr dbl = Double::RawCast(object);
-    objects_.Add(dbl);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      DoublePtr dbl = objects_[i];
-      s->AssignRef(dbl);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      DoublePtr dbl = objects_[i];
-      AutoTraceObject(dbl);
-      s->Write<double>(dbl->untag()->value_);
-    }
-  }
-
- private:
-  GrowableArray<DoublePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class DoubleDeserializationCluster : public DeserializationCluster {
- public:
-  explicit DoubleDeserializationCluster(bool is_canonical)
-      : DeserializationCluster("double", is_canonical) {}
-  ~DoubleDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, Double::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      DoublePtr dbl = static_cast<DoublePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(dbl, kDoubleCid, Double::InstanceSize(),
-                                     primary && is_canonical());
-      dbl->untag()->value_ = d->Read<double>();
-    }
-  }
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!primary && is_canonical()) {
-      auto Z = d->zone();
-      auto isolate_group = d->isolate_group();
-      const Class& cls =
-          Class::Handle(Z, isolate_group->object_store()->double_class());
-      SafepointMutexLocker ml(isolate_group->constant_canonicalization_mutex());
-      Double& dbl = Double::Handle(Z);
-      Double& dbl2 = Double::Handle(Z);
-      for (intptr_t i = start_index_; i < stop_index_; i++) {
-        dbl ^= refs.At(i);
-        dbl2 = cls.LookupCanonicalDouble(Z, dbl.value());
-        if (dbl2.IsNull()) {
-          dbl.SetCanonical();
-          cls.InsertCanonicalDouble(Z, dbl);
-        } else {
-          refs.SetAt(i, dbl2);
-        }
-      }
-    }
-  }
-#endif
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class GrowableObjectArraySerializationCluster : public SerializationCluster {
- public:
-  GrowableObjectArraySerializationCluster()
-      : SerializationCluster(
-            "GrowableObjectArray",
-            kGrowableObjectArrayCid,
-            compiler::target::GrowableObjectArray::InstanceSize()) {}
-  ~GrowableObjectArraySerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    GrowableObjectArrayPtr array = GrowableObjectArray::RawCast(object);
-    objects_.Add(array);
-    PushFromTo(array);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      GrowableObjectArrayPtr array = objects_[i];
-      s->AssignRef(array);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      GrowableObjectArrayPtr array = objects_[i];
-      AutoTraceObject(array);
-      WriteFromTo(array);
-    }
-  }
-
- private:
-  GrowableArray<GrowableObjectArrayPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class GrowableObjectArrayDeserializationCluster
-    : public DeserializationCluster {
- public:
-  GrowableObjectArrayDeserializationCluster()
-      : DeserializationCluster("GrowableObjectArray") {}
-  ~GrowableObjectArrayDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, GrowableObjectArray::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      GrowableObjectArrayPtr list =
-          static_cast<GrowableObjectArrayPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(list, kGrowableObjectArrayCid,
-                                     GrowableObjectArray::InstanceSize());
-      ReadFromTo(list);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypedDataSerializationCluster : public SerializationCluster {
- public:
-  explicit TypedDataSerializationCluster(intptr_t cid)
-      : SerializationCluster("TypedData", cid) {}
-  ~TypedDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypedDataPtr data = TypedData::RawCast(object);
-    objects_.Add(data);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    const intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
-    for (intptr_t i = 0; i < count; i++) {
-      TypedDataPtr data = objects_[i];
-      s->AssignRef(data);
-      AutoTraceObject(data);
-      const intptr_t length = Smi::Value(data->untag()->length());
-      s->WriteUnsigned(length);
-      target_memory_size_ +=
-          compiler::target::TypedData::InstanceSize(length * element_size);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
-    for (intptr_t i = 0; i < count; i++) {
-      TypedDataPtr data = objects_[i];
-      AutoTraceObject(data);
-      const intptr_t length = Smi::Value(data->untag()->length());
-      s->WriteUnsigned(length);
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data());
-      s->WriteBytes(cdata, length * element_size);
-    }
-  }
-
- private:
-  GrowableArray<TypedDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypedDataDeserializationCluster : public DeserializationCluster {
- public:
-  explicit TypedDataDeserializationCluster(intptr_t cid)
-      : DeserializationCluster("TypedData"), cid_(cid) {}
-  ~TypedDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    start_index_ = d->next_index();
-    PageSpace* old_space = d->heap()->old_space();
-    const intptr_t count = d->ReadUnsigned();
-    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
-    for (intptr_t i = 0; i < count; i++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(old_space->AllocateSnapshot(
-          TypedData::InstanceSize(length * element_size)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypedDataPtr data = static_cast<TypedDataPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      const intptr_t length_in_bytes = length * element_size;
-      Deserializer::InitializeHeader(data, cid_,
-                                     TypedData::InstanceSize(length_in_bytes));
-      data->untag()->length_ = Smi::New(length);
-      data->untag()->RecomputeDataField();
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data());
-      d->ReadBytes(cdata, length_in_bytes);
-    }
-  }
-
- private:
-  const intptr_t cid_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class TypedDataViewSerializationCluster : public SerializationCluster {
- public:
-  explicit TypedDataViewSerializationCluster(intptr_t cid)
-      : SerializationCluster("TypedDataView",
-                             cid,
-                             compiler::target::TypedDataView::InstanceSize()) {}
-  ~TypedDataViewSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    TypedDataViewPtr view = TypedDataView::RawCast(object);
-    objects_.Add(view);
-
-    PushFromTo(view);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      TypedDataViewPtr view = objects_[i];
-      s->AssignRef(view);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      TypedDataViewPtr view = objects_[i];
-      AutoTraceObject(view);
-      WriteFromTo(view);
-    }
-  }
-
- private:
-  GrowableArray<TypedDataViewPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class TypedDataViewDeserializationCluster : public DeserializationCluster {
- public:
-  explicit TypedDataViewDeserializationCluster(intptr_t cid)
-      : DeserializationCluster("TypedDataView"), cid_(cid) {}
-  ~TypedDataViewDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, TypedDataView::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      TypedDataViewPtr view = static_cast<TypedDataViewPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(view, cid_, TypedDataView::InstanceSize());
-      ReadFromTo(view);
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    ASSERT(primary || !is_canonical());
-    auto& view = TypedDataView::Handle(d->zone());
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      view ^= refs.At(id);
-      view.RecomputeDataField();
-    }
-  }
-
- private:
-  const intptr_t cid_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ExternalTypedDataSerializationCluster : public SerializationCluster {
- public:
-  explicit ExternalTypedDataSerializationCluster(intptr_t cid)
-      : SerializationCluster(
-            "ExternalTypedData",
-            cid,
-            compiler::target::ExternalTypedData::InstanceSize()) {}
-  ~ExternalTypedDataSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ExternalTypedDataPtr data = ExternalTypedData::RawCast(object);
-    objects_.Add(data);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ExternalTypedDataPtr data = objects_[i];
-      s->AssignRef(data);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    intptr_t element_size = ExternalTypedData::ElementSizeInBytes(cid_);
-    for (intptr_t i = 0; i < count; i++) {
-      ExternalTypedDataPtr data = objects_[i];
-      AutoTraceObject(data);
-      const intptr_t length = Smi::Value(data->untag()->length());
-      s->WriteUnsigned(length);
-      uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data_);
-      s->Align(ExternalTypedData::kDataSerializationAlignment);
-      s->WriteBytes(cdata, length * element_size);
-    }
-  }
-
- private:
-  GrowableArray<ExternalTypedDataPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ExternalTypedDataDeserializationCluster : public DeserializationCluster {
- public:
-  explicit ExternalTypedDataDeserializationCluster(intptr_t cid)
-      : DeserializationCluster("ExternalTypedData"), cid_(cid) {}
-  ~ExternalTypedDataDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, ExternalTypedData::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    intptr_t element_size = ExternalTypedData::ElementSizeInBytes(cid_);
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ExternalTypedDataPtr data = static_cast<ExternalTypedDataPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(data, cid_,
-                                     ExternalTypedData::InstanceSize());
-      data->untag()->length_ = Smi::New(length);
-      d->Align(ExternalTypedData::kDataSerializationAlignment);
-      data->untag()->data_ = const_cast<uint8_t*>(d->CurrentBufferAddress());
-      d->Advance(length * element_size);
-      // No finalizer / external size 0.
-    }
-  }
-
- private:
-  const intptr_t cid_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class StackTraceSerializationCluster : public SerializationCluster {
- public:
-  StackTraceSerializationCluster()
-      : SerializationCluster("StackTrace",
-                             kStackTraceCid,
-                             compiler::target::StackTrace::InstanceSize()) {}
-  ~StackTraceSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    StackTracePtr trace = StackTrace::RawCast(object);
-    objects_.Add(trace);
-    PushFromTo(trace);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      StackTracePtr trace = objects_[i];
-      s->AssignRef(trace);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      StackTracePtr trace = objects_[i];
-      AutoTraceObject(trace);
-      WriteFromTo(trace);
-    }
-  }
-
- private:
-  GrowableArray<StackTracePtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class StackTraceDeserializationCluster : public DeserializationCluster {
- public:
-  StackTraceDeserializationCluster() : DeserializationCluster("StackTrace") {}
-  ~StackTraceDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, StackTrace::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      StackTracePtr trace = static_cast<StackTracePtr>(d->Ref(id));
-      Deserializer::InitializeHeader(trace, kStackTraceCid,
-                                     StackTrace::InstanceSize());
-      ReadFromTo(trace);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class RegExpSerializationCluster : public SerializationCluster {
- public:
-  RegExpSerializationCluster()
-      : SerializationCluster("RegExp",
-                             kRegExpCid,
-                             compiler::target::RegExp::InstanceSize()) {}
-  ~RegExpSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    RegExpPtr regexp = RegExp::RawCast(object);
-    objects_.Add(regexp);
-    PushFromTo(regexp);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      RegExpPtr regexp = objects_[i];
-      s->AssignRef(regexp);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      RegExpPtr regexp = objects_[i];
-      AutoTraceObject(regexp);
-      WriteFromTo(regexp);
-      s->Write<int32_t>(regexp->untag()->num_one_byte_registers_);
-      s->Write<int32_t>(regexp->untag()->num_two_byte_registers_);
-      s->Write<int8_t>(regexp->untag()->type_flags_);
-    }
-  }
-
- private:
-  GrowableArray<RegExpPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class RegExpDeserializationCluster : public DeserializationCluster {
- public:
-  RegExpDeserializationCluster() : DeserializationCluster("RegExp") {}
-  ~RegExpDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, RegExp::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      RegExpPtr regexp = static_cast<RegExpPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(regexp, kRegExpCid,
-                                     RegExp::InstanceSize());
-      ReadFromTo(regexp);
-      regexp->untag()->num_one_byte_registers_ = d->Read<int32_t>();
-      regexp->untag()->num_two_byte_registers_ = d->Read<int32_t>();
-      regexp->untag()->type_flags_ = d->Read<int8_t>();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class WeakPropertySerializationCluster : public SerializationCluster {
- public:
-  WeakPropertySerializationCluster()
-      : SerializationCluster("WeakProperty",
-                             kWeakPropertyCid,
-                             compiler::target::WeakProperty::InstanceSize()) {}
-  ~WeakPropertySerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    WeakPropertyPtr property = WeakProperty::RawCast(object);
-    objects_.Add(property);
-  }
-
-  void RetraceEphemerons(Serializer* s) {
-    for (intptr_t i = 0; i < objects_.length(); i++) {
-      WeakPropertyPtr property = objects_[i];
-      if (s->IsReachable(property->untag()->key())) {
-        s->Push(property->untag()->value());
-      }
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      WeakPropertyPtr property = objects_[i];
-      s->AssignRef(property);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      WeakPropertyPtr property = objects_[i];
-      AutoTraceObject(property);
-      if (s->HasRef(property->untag()->key())) {
-        s->WriteOffsetRef(property->untag()->key(), WeakProperty::key_offset());
-        s->WriteOffsetRef(property->untag()->value(),
-                          WeakProperty::value_offset());
-      } else {
-        s->WriteOffsetRef(Object::null(), WeakProperty::key_offset());
-        s->WriteOffsetRef(Object::null(), WeakProperty::value_offset());
-      }
-    }
-  }
-
- private:
-  GrowableArray<WeakPropertyPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class WeakPropertyDeserializationCluster : public DeserializationCluster {
- public:
-  WeakPropertyDeserializationCluster()
-      : DeserializationCluster("WeakProperty") {}
-  ~WeakPropertyDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, WeakProperty::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    ASSERT(!is_canonical());  // Never canonical.
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      WeakPropertyPtr property = static_cast<WeakPropertyPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(property, kWeakPropertyCid,
-                                     WeakProperty::InstanceSize());
-      ReadFromTo(property);
-      property->untag()->next_ = WeakProperty::null();
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class LinkedHashMapSerializationCluster : public SerializationCluster {
- public:
-  LinkedHashMapSerializationCluster()
-      : SerializationCluster("LinkedHashMap",
-                             kLinkedHashMapCid,
-                             compiler::target::LinkedHashMap::InstanceSize()) {}
-  ~LinkedHashMapSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    LinkedHashMapPtr map = LinkedHashMap::RawCast(object);
-    objects_.Add(map);
-    PushFromTo(map);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      LinkedHashMapPtr map = objects_[i];
-      s->AssignRef(map);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      LinkedHashMapPtr map = objects_[i];
-      AutoTraceObject(map);
-      WriteFromTo(map);
-    }
-  }
-
- private:
-  GrowableArray<LinkedHashMapPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class LinkedHashMapDeserializationCluster
-    : public AbstractInstanceDeserializationCluster {
- public:
-  explicit LinkedHashMapDeserializationCluster(bool is_canonical)
-      : AbstractInstanceDeserializationCluster("LinkedHashMap", is_canonical) {}
-  ~LinkedHashMapDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    ReadAllocFixedSize(d, LinkedHashMap::InstanceSize());
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      LinkedHashMapPtr map = static_cast<LinkedHashMapPtr>(d->Ref(id));
-      Deserializer::InitializeHeader(map, kLinkedHashMapCid,
-                                     LinkedHashMap::InstanceSize(),
-                                     primary && is_canonical());
-      ReadFromTo(map);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class ArraySerializationCluster : public SerializationCluster {
- public:
-  ArraySerializationCluster(bool is_canonical, intptr_t cid)
-      : SerializationCluster("Array", cid, kSizeVaries, is_canonical) {}
-  ~ArraySerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    ArrayPtr array = Array::RawCast(object);
-    objects_.Add(array);
-
-    s->Push(array->untag()->type_arguments());
-    const intptr_t length = Smi::Value(array->untag()->length());
-    for (intptr_t i = 0; i < length; i++) {
-      s->Push(array->untag()->element(i));
-    }
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      ArrayPtr array = objects_[i];
-      s->AssignRef(array);
-      AutoTraceObject(array);
-      const intptr_t length = Smi::Value(array->untag()->length());
-      s->WriteUnsigned(length);
-      target_memory_size_ += compiler::target::Array::InstanceSize(length);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      ArrayPtr array = objects_[i];
-      AutoTraceObject(array);
-      const intptr_t length = Smi::Value(array->untag()->length());
-      s->WriteUnsigned(length);
-      WriteCompressedField(array, type_arguments);
-      for (intptr_t j = 0; j < length; j++) {
-        s->WriteElementRef(array->untag()->element(j), j);
-      }
-    }
-  }
-
- private:
-  GrowableArray<ArrayPtr> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ArrayDeserializationCluster
-    : public AbstractInstanceDeserializationCluster {
- public:
-  explicit ArrayDeserializationCluster(bool is_canonical, intptr_t cid)
-      : AbstractInstanceDeserializationCluster("Array", is_canonical),
-        cid_(cid) {}
-  ~ArrayDeserializationCluster() {}
-
-  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++) {
-      const intptr_t length = d->ReadUnsigned();
-      d->AssignRef(old_space->AllocateSnapshot(Array::InstanceSize(length)));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      ArrayPtr array = static_cast<ArrayPtr>(d->Ref(id));
-      const intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(array, cid_, Array::InstanceSize(length),
-                                     primary && is_canonical());
-      array->untag()->type_arguments_ =
-          static_cast<TypeArgumentsPtr>(d->ReadRef());
-      array->untag()->length_ = CompressedSmiPtr(Smi::New(length));
-      for (intptr_t j = 0; j < length; j++) {
-        array->untag()->data()[j] = d->ReadRef();
-      }
-    }
-  }
-
- private:
-  const intptr_t cid_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class StringSerializationCluster
-    : public CanonicalSetSerializationCluster<CanonicalStringSet,
-                                              String,
-                                              StringPtr> {
- public:
-  // To distinguish one and two byte strings, we put a bit in the length to
-  // indicate which it is. The length is an unsigned SMI, so we actually have
-  // two spare bits available. Keep in sync with DecodeLengthAndCid.
-  static intptr_t EncodeLengthAndCid(intptr_t length, intptr_t cid) {
-    ASSERT(cid == kOneByteStringCid || cid == kTwoByteStringCid);
-    ASSERT(length <= compiler::target::kSmiMax);
-    return (length << 1) | (cid == kTwoByteStringCid ? 0x1 : 0x0);
-  }
-
-  explicit StringSerializationCluster(bool is_canonical,
-                                      bool represents_canonical_set)
-      : CanonicalSetSerializationCluster(kStringCid,
-                                         is_canonical,
-                                         represents_canonical_set,
-                                         "String",
-                                         kSizeVaries) {}
-  ~StringSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) {
-    StringPtr str = static_cast<StringPtr>(object);
-    objects_.Add(str);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    const intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    ReorderObjects(s);
-    for (intptr_t i = 0; i < count; i++) {
-      StringPtr str = objects_[i];
-      s->AssignRef(str);
-      AutoTraceObject(str);
-      const intptr_t cid = str->GetClassId();
-      const intptr_t length = Smi::Value(str->untag()->length());
-      const intptr_t encoded = EncodeLengthAndCid(length, cid);
-      s->WriteUnsigned(encoded);
-      target_memory_size_ +=
-          cid == kOneByteStringCid
-              ? compiler::target::OneByteString::InstanceSize(length)
-              : compiler::target::TwoByteString::InstanceSize(length);
-    }
-    WriteCanonicalSetLayout(s);
-  }
-
-  void WriteFill(Serializer* s) {
-    const intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      StringPtr str = objects_[i];
-      AutoTraceObject(str);
-      const intptr_t cid = str->GetClassId();
-      const intptr_t length = Smi::Value(str->untag()->length());
-      const intptr_t encoded = EncodeLengthAndCid(length, cid);
-      s->WriteUnsigned(encoded);
-      if (cid == kOneByteStringCid) {
-        s->WriteBytes(static_cast<OneByteStringPtr>(str)->untag()->data(),
-                      length);
-      } else {
-        s->WriteBytes(reinterpret_cast<uint8_t*>(
-                          static_cast<TwoByteStringPtr>(str)->untag()->data()),
-                      length * 2);
-      }
-    }
-  }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class StringDeserializationCluster
-    : public CanonicalSetDeserializationCluster<CanonicalStringSet> {
- public:
-  static intptr_t DecodeLengthAndCid(intptr_t encoded, intptr_t* out_cid) {
-    *out_cid = (encoded & 0x1) != 0 ? kTwoByteStringCid : kOneByteStringCid;
-    return encoded >> 1;
-  }
-
-  static intptr_t InstanceSize(intptr_t length, intptr_t cid) {
-    return cid == kOneByteStringCid ? OneByteString::InstanceSize(length)
-                                    : TwoByteString::InstanceSize(length);
-  }
-
-  explicit StringDeserializationCluster(bool is_canonical, bool is_root_unit)
-      : CanonicalSetDeserializationCluster(is_canonical,
-                                           is_root_unit,
-                                           "String") {}
-  ~StringDeserializationCluster() {}
-
-  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++) {
-      const intptr_t encoded = d->ReadUnsigned();
-      intptr_t cid = 0;
-      const intptr_t length = DecodeLengthAndCid(encoded, &cid);
-      d->AssignRef(old_space->AllocateSnapshot(InstanceSize(length, cid)));
-    }
-    stop_index_ = d->next_index();
-    BuildCanonicalSetFromLayout(d);
-  }
-
-  void ReadFill(Deserializer* d, bool primary) {
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      StringPtr str = static_cast<StringPtr>(d->Ref(id));
-      const intptr_t encoded = d->ReadUnsigned();
-      intptr_t cid = 0;
-      const intptr_t length = DecodeLengthAndCid(encoded, &cid);
-      Deserializer::InitializeHeader(str, cid, InstanceSize(length, cid),
-                                     primary && is_canonical());
-      str->untag()->length_ = Smi::New(length);
-      StringHasher hasher;
-      if (cid == kOneByteStringCid) {
-        for (intptr_t j = 0; j < length; j++) {
-          uint8_t code_unit = d->Read<uint8_t>();
-          static_cast<OneByteStringPtr>(str)->untag()->data()[j] = code_unit;
-          hasher.Add(code_unit);
-        }
-      } else {
-        for (intptr_t j = 0; j < length; j++) {
-          uint16_t code_unit = d->Read<uint8_t>();
-          code_unit = code_unit | (d->Read<uint8_t>() << 8);
-          static_cast<TwoByteStringPtr>(str)->untag()->data()[j] = code_unit;
-          hasher.Add(code_unit);
-        }
-      }
-      String::SetCachedHash(str, hasher.Finalize());
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs, bool primary) {
-    if (!table_.IsNull()) {
-      auto object_store = d->isolate_group()->object_store();
-      VerifyCanonicalSet(d, refs, Array::Handle(object_store->symbol_table()));
-      object_store->set_symbol_table(table_);
-      if (d->isolate_group() == Dart::vm_isolate_group()) {
-        Symbols::InitFromSnapshot(d->isolate_group());
-      }
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class FakeSerializationCluster : public SerializationCluster {
- public:
-  FakeSerializationCluster(const char* name,
-                           intptr_t num_objects,
-                           intptr_t size,
-                           intptr_t target_memory_size = 0)
-      : SerializationCluster(name, -1) {
-    num_objects_ = num_objects;
-    size_ = size;
-    target_memory_size_ = target_memory_size;
-  }
-  ~FakeSerializationCluster() {}
-
-  void Trace(Serializer* s, ObjectPtr object) { UNREACHABLE(); }
-  void WriteAlloc(Serializer* s) { UNREACHABLE(); }
-  void WriteFill(Serializer* s) { UNREACHABLE(); }
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class VMSerializationRoots : public SerializationRoots {
- public:
-  explicit VMSerializationRoots(const Array& symbols, bool should_write_symbols)
-      : symbols_(symbols),
-        should_write_symbols_(should_write_symbols),
-        zone_(Thread::Current()->zone()) {}
-
-  void AddBaseObjects(Serializer* s) {
-    // These objects are always allocated by Object::InitOnce, so they are not
-    // written into the snapshot.
-
-    s->AddBaseObject(Object::null(), "Null", "null");
-    s->AddBaseObject(Object::sentinel().ptr(), "Null", "sentinel");
-    s->AddBaseObject(Object::transition_sentinel().ptr(), "Null",
-                     "transition_sentinel");
-    s->AddBaseObject(Object::empty_array().ptr(), "Array", "<empty_array>");
-    s->AddBaseObject(Object::zero_array().ptr(), "Array", "<zero_array>");
-    s->AddBaseObject(Object::dynamic_type().ptr(), "Type", "<dynamic type>");
-    s->AddBaseObject(Object::void_type().ptr(), "Type", "<void type>");
-    s->AddBaseObject(Object::empty_type_arguments().ptr(), "TypeArguments",
-                     "[]");
-    s->AddBaseObject(Bool::True().ptr(), "bool", "true");
-    s->AddBaseObject(Bool::False().ptr(), "bool", "false");
-    ASSERT(Object::extractor_parameter_types().ptr() != Object::null());
-    s->AddBaseObject(Object::extractor_parameter_types().ptr(), "Array",
-                     "<extractor parameter types>");
-    ASSERT(Object::extractor_parameter_names().ptr() != Object::null());
-    s->AddBaseObject(Object::extractor_parameter_names().ptr(), "Array",
-                     "<extractor parameter names>");
-    s->AddBaseObject(Object::empty_context_scope().ptr(), "ContextScope",
-                     "<empty>");
-    s->AddBaseObject(Object::empty_object_pool().ptr(), "ObjectPool",
-                     "<empty>");
-    s->AddBaseObject(Object::empty_compressed_stackmaps().ptr(),
-                     "CompressedStackMaps", "<empty>");
-    s->AddBaseObject(Object::empty_descriptors().ptr(), "PcDescriptors",
-                     "<empty>");
-    s->AddBaseObject(Object::empty_var_descriptors().ptr(),
-                     "LocalVarDescriptors", "<empty>");
-    s->AddBaseObject(Object::empty_exception_handlers().ptr(),
-                     "ExceptionHandlers", "<empty>");
-
-    for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
-      s->AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i],
-                       "ArgumentsDescriptor", "<cached arguments descriptor>");
-    }
-    for (intptr_t i = 0; i < ICData::kCachedICDataArrayCount; i++) {
-      s->AddBaseObject(ICData::cached_icdata_arrays_[i], "Array",
-                       "<empty icdata entries>");
-    }
-    s->AddBaseObject(SubtypeTestCache::cached_array_, "Array",
-                     "<empty subtype entries>");
-
-    ClassTable* table = s->isolate_group()->class_table();
-    for (intptr_t cid = kFirstInternalOnlyCid; cid <= kLastInternalOnlyCid;
-         cid++) {
-      // Error, CallSiteData has no class object.
-      if (cid != kErrorCid && cid != kCallSiteDataCid) {
-        ASSERT(table->HasValidClassAt(cid));
-        s->AddBaseObject(
-            table->At(cid), "Class",
-            Class::Handle(table->At(cid))
-                .NameCString(Object::NameVisibility::kInternalName));
-      }
-    }
-    s->AddBaseObject(table->At(kDynamicCid), "Class", "dynamic");
-    s->AddBaseObject(table->At(kVoidCid), "Class", "void");
-
-    if (!Snapshot::IncludesCode(s->kind())) {
-      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-        s->AddBaseObject(StubCode::EntryAt(i).ptr(), "Code", "<stub code>");
-      }
-    }
-  }
-
-  void PushRoots(Serializer* s) {
-    if (should_write_symbols_) {
-      s->Push(symbols_.ptr());
-    } else {
-      for (intptr_t i = 0; i < symbols_.Length(); i++) {
-        s->Push(symbols_.At(i));
-      }
-    }
-    if (Snapshot::IncludesCode(s->kind())) {
-      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-        s->Push(StubCode::EntryAt(i).ptr());
-      }
-    }
-  }
-
-  void WriteRoots(Serializer* s) {
-    s->WriteRootRef(should_write_symbols_ ? symbols_.ptr() : Object::null(),
-                    "symbol-table");
-    if (Snapshot::IncludesCode(s->kind())) {
-      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-        s->WriteRootRef(StubCode::EntryAt(i).ptr(),
-                        zone_->PrintToString("Stub:%s", StubCode::NameAt(i)));
-      }
-    }
-
-    if (!should_write_symbols_ && s->profile_writer() != nullptr) {
-      // If writing V8 snapshot profile create an artifical node representing
-      // VM isolate symbol table.
-      ASSERT(!s->IsReachable(symbols_.ptr()));
-      s->AssignArtificialRef(symbols_.ptr());
-      const auto& symbols_snapshot_id = s->GetProfileId(symbols_.ptr());
-      s->profile_writer()->SetObjectTypeAndName(symbols_snapshot_id, "Symbols",
-                                                "vm_symbols");
-      s->profile_writer()->AddRoot(symbols_snapshot_id);
-      for (intptr_t i = 0; i < symbols_.Length(); i++) {
-        s->profile_writer()->AttributeReferenceTo(
-            symbols_snapshot_id, V8SnapshotProfileWriter::Reference::Element(i),
-            s->GetProfileId(symbols_.At(i)));
-      }
-    }
-  }
-
- private:
-  const Array& symbols_;
-  const bool should_write_symbols_;
-  Zone* zone_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class VMDeserializationRoots : public DeserializationRoots {
- public:
-  VMDeserializationRoots() : symbol_table_(Array::Handle()) {}
-
-  bool AddBaseObjects(Deserializer* d) {
-    // These objects are always allocated by Object::InitOnce, so they are not
-    // written into the snapshot.
-
-    d->AddBaseObject(Object::null());
-    d->AddBaseObject(Object::sentinel().ptr());
-    d->AddBaseObject(Object::transition_sentinel().ptr());
-    d->AddBaseObject(Object::empty_array().ptr());
-    d->AddBaseObject(Object::zero_array().ptr());
-    d->AddBaseObject(Object::dynamic_type().ptr());
-    d->AddBaseObject(Object::void_type().ptr());
-    d->AddBaseObject(Object::empty_type_arguments().ptr());
-    d->AddBaseObject(Bool::True().ptr());
-    d->AddBaseObject(Bool::False().ptr());
-    ASSERT(Object::extractor_parameter_types().ptr() != Object::null());
-    d->AddBaseObject(Object::extractor_parameter_types().ptr());
-    ASSERT(Object::extractor_parameter_names().ptr() != Object::null());
-    d->AddBaseObject(Object::extractor_parameter_names().ptr());
-    d->AddBaseObject(Object::empty_context_scope().ptr());
-    d->AddBaseObject(Object::empty_object_pool().ptr());
-    d->AddBaseObject(Object::empty_compressed_stackmaps().ptr());
-    d->AddBaseObject(Object::empty_descriptors().ptr());
-    d->AddBaseObject(Object::empty_var_descriptors().ptr());
-    d->AddBaseObject(Object::empty_exception_handlers().ptr());
-
-    for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
-      d->AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
-    }
-    for (intptr_t i = 0; i < ICData::kCachedICDataArrayCount; i++) {
-      d->AddBaseObject(ICData::cached_icdata_arrays_[i]);
-    }
-    d->AddBaseObject(SubtypeTestCache::cached_array_);
-
-    ClassTable* table = d->isolate_group()->class_table();
-    for (intptr_t cid = kFirstInternalOnlyCid; cid <= kLastInternalOnlyCid;
-         cid++) {
-      // Error, CallSiteData has no class object.
-      if (cid != kErrorCid && cid != kCallSiteDataCid) {
-        ASSERT(table->HasValidClassAt(cid));
-        d->AddBaseObject(table->At(cid));
-      }
-    }
-    d->AddBaseObject(table->At(kDynamicCid));
-    d->AddBaseObject(table->At(kVoidCid));
-
-    if (!Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-        d->AddBaseObject(StubCode::EntryAt(i).ptr());
-      }
-    }
-
-    return true;  // primary
-  }
-
-  void ReadRoots(Deserializer* d) {
-    symbol_table_ ^= d->ReadRef();
-    if (!symbol_table_.IsNull()) {
-      d->isolate_group()->object_store()->set_symbol_table(symbol_table_);
-    }
-    if (Snapshot::IncludesCode(d->kind())) {
-      for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-        Code* code = Code::ReadOnlyHandle();
-        *code ^= d->ReadRef();
-        StubCode::EntryAtPut(i, code);
-      }
-      StubCode::InitializationDone();
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs) {
-    // Move remaining bump allocation space to the freelist so it used by C++
-    // allocations (e.g., FinalizeVMIsolate) before allocating new pages.
-    d->heap()->old_space()->AbandonBumpAllocation();
-
-    if (!symbol_table_.IsNull()) {
-      Symbols::InitFromSnapshot(d->isolate_group());
-    }
-
-    Object::set_vm_isolate_snapshot_object_table(refs);
-  }
-
- private:
-  Array& symbol_table_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-static const char* const 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,
-                            DECLARE_OBJECT_STORE_FIELD,
-                            DECLARE_OBJECT_STORE_FIELD,
-                            DECLARE_OBJECT_STORE_FIELD,
-                            DECLARE_OBJECT_STORE_FIELD)
-#undef DECLARE_OBJECT_STORE_FIELD
-};
-
-class ProgramSerializationRoots : public SerializationRoots {
- public:
-  ProgramSerializationRoots(ZoneGrowableArray<Object*>* base_objects,
-                            ObjectStore* object_store,
-                            Snapshot::Kind snapshot_kind)
-      : base_objects_(base_objects),
-        object_store_(object_store),
-        dispatch_table_entries_(Array::Handle()),
-        saved_symbol_table_(Array::Handle()),
-        saved_canonical_types_(Array::Handle()),
-        saved_canonical_function_types_(Array::Handle()),
-        saved_canonical_type_arguments_(Array::Handle()),
-        saved_canonical_type_parameters_(Array::Handle()) {
-    saved_symbol_table_ = object_store->symbol_table();
-    object_store->set_symbol_table(
-        Array::Handle(HashTables::New<CanonicalStringSet>(4)));
-    saved_canonical_types_ = object_store->canonical_types();
-    object_store->set_canonical_types(
-        Array::Handle(HashTables::New<CanonicalTypeSet>(4)));
-    saved_canonical_function_types_ = object_store->canonical_function_types();
-    object_store->set_canonical_function_types(
-        Array::Handle(HashTables::New<CanonicalFunctionTypeSet>(4)));
-    saved_canonical_type_arguments_ = object_store->canonical_type_arguments();
-    object_store->set_canonical_type_arguments(
-        Array::Handle(HashTables::New<CanonicalTypeArgumentsSet>(4)));
-    saved_canonical_type_parameters_ =
-        object_store->canonical_type_parameters();
-    object_store->set_canonical_type_parameters(
-        Array::Handle(HashTables::New<CanonicalTypeParameterSet>(4)));
-  }
-  ~ProgramSerializationRoots() {
-    object_store_->set_symbol_table(saved_symbol_table_);
-    object_store_->set_canonical_types(saved_canonical_types_);
-    object_store_->set_canonical_function_types(
-        saved_canonical_function_types_);
-    object_store_->set_canonical_type_arguments(
-        saved_canonical_type_arguments_);
-    object_store_->set_canonical_type_parameters(
-        saved_canonical_type_parameters_);
-  }
-
-  void AddBaseObjects(Serializer* s) {
-    if (base_objects_ == nullptr) {
-      // Not writing a new vm isolate: use the one this VM was loaded from.
-      const Array& base_objects = Object::vm_isolate_snapshot_object_table();
-      for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
-        s->AddBaseObject(base_objects.At(i));
-      }
-    } else {
-      // Base objects carried over from WriteVMSnapshot.
-      for (intptr_t i = 0; i < base_objects_->length(); i++) {
-        s->AddBaseObject((*base_objects_)[i]->ptr());
-      }
-    }
-  }
-
-  void PushRoots(Serializer* s) {
-    ObjectPtr* from = object_store_->from();
-    ObjectPtr* to = object_store_->to_snapshot(s->kind());
-    for (ObjectPtr* p = from; p <= to; p++) {
-      s->Push(*p);
-    }
-
-    dispatch_table_entries_ = object_store_->dispatch_table_code_entries();
-    // We should only have a dispatch table in precompiled mode.
-    ASSERT(dispatch_table_entries_.IsNull() || s->kind() == Snapshot::kFullAOT);
-
-#if defined(DART_PRECOMPILER)
-    // We treat the dispatch table as a root object and trace the Code objects
-    // it references. Otherwise, a non-empty entry could be invalid on
-    // deserialization if the corresponding Code object was not reachable from
-    // the existing snapshot roots.
-    if (!dispatch_table_entries_.IsNull()) {
-      for (intptr_t i = 0; i < dispatch_table_entries_.Length(); i++) {
-        s->Push(dispatch_table_entries_.At(i));
-      }
-    }
-#endif
-  }
-
-  void WriteRoots(Serializer* s) {
-    ObjectPtr* from = object_store_->from();
-    ObjectPtr* to = object_store_->to_snapshot(s->kind());
-    for (ObjectPtr* p = from; p <= to; p++) {
-      s->WriteRootRef(*p, kObjectStoreFieldNames[p - from]);
-    }
-
-    // The dispatch table is serialized only for precompiled snapshots.
-    s->WriteDispatchTable(dispatch_table_entries_);
-  }
-
- private:
-  ZoneGrowableArray<Object*>* base_objects_;
-  ObjectStore* object_store_;
-  Array& dispatch_table_entries_;
-  Array& saved_symbol_table_;
-  Array& saved_canonical_types_;
-  Array& saved_canonical_function_types_;
-  Array& saved_canonical_type_arguments_;
-  Array& saved_canonical_type_parameters_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class ProgramDeserializationRoots : public DeserializationRoots {
- public:
-  explicit ProgramDeserializationRoots(ObjectStore* object_store)
-      : object_store_(object_store) {}
-
-  bool AddBaseObjects(Deserializer* d) {
-    // N.B.: Skipping index 0 because ref 0 is illegal.
-    const Array& base_objects = Object::vm_isolate_snapshot_object_table();
-    for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
-      d->AddBaseObject(base_objects.At(i));
-    }
-    return true;  // primary
-  }
-
-  void ReadRoots(Deserializer* d) {
-    // Read roots.
-    ObjectPtr* from = object_store_->from();
-    ObjectPtr* to = object_store_->to_snapshot(d->kind());
-    for (ObjectPtr* p = from; p <= to; p++) {
-      *p = d->ReadRef();
-    }
-
-    // Deserialize dispatch table (when applicable)
-    d->ReadDispatchTable();
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs) {
-    auto isolate_group = d->isolate_group();
-    {
-      SafepointWriteRwLocker ml(d->thread(), isolate_group->program_lock());
-      isolate_group->class_table()->CopySizesFromClassObjects();
-    }
-    d->heap()->old_space()->EvaluateAfterLoading();
-
-    const Array& units =
-        Array::Handle(isolate_group->object_store()->loading_units());
-    if (!units.IsNull()) {
-      LoadingUnit& unit = LoadingUnit::Handle();
-      unit ^= units.At(LoadingUnit::kRootId);
-      unit.set_base_objects(refs);
-    }
-
-    // Setup native resolver for bootstrap impl.
-    Bootstrap::SetupNativeResolver();
-  }
-
- private:
-  ObjectStore* object_store_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-class UnitSerializationRoots : public SerializationRoots {
- public:
-  explicit UnitSerializationRoots(LoadingUnitSerializationData* unit)
-      : unit_(unit) {}
-
-  void AddBaseObjects(Serializer* s) {
-    ZoneGrowableArray<Object*>* objects = unit_->parent()->objects();
-    for (intptr_t i = 0; i < objects->length(); i++) {
-      s->AddBaseObject(objects->At(i)->ptr());
-    }
-  }
-
-  void PushRoots(Serializer* s) {
-    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->ptr());
-      if (FLAG_use_bare_instructions) {
-        ObjectPoolPtr pool = code->untag()->object_pool_;
-        if (pool != ObjectPool::null()) {
-          const intptr_t length = pool->untag()->length_;
-          uint8_t* entry_bits = pool->untag()->entry_bits();
-          for (intptr_t i = 0; i < length; i++) {
-            auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
-            if (entry_type == ObjectPool::EntryType::kTaggedObject) {
-              s->Push(pool->untag()->data()[i].raw_obj_);
-            }
-          }
-        }
-      } else {
-        s->Push(code->untag()->object_pool_);
-      }
-      s->Push(code->untag()->compressed_stackmaps_);
-      s->Push(code->untag()->code_source_map_);
-    }
-  }
-
-  void WriteRoots(Serializer* s) {
-#if defined(DART_PRECOMPILER)
-    intptr_t start_index = 0;
-    intptr_t num_deferred_objects = unit_->deferred_objects()->length();
-    if (num_deferred_objects != 0) {
-      start_index = s->RefId(unit_->deferred_objects()->At(0)->ptr());
-      ASSERT(start_index > 0);
-    }
-    s->WriteUnsigned(start_index);
-    s->WriteUnsigned(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->ptr());
-      ASSERT(s->RefId(code) == (start_index + i));
-      ASSERT(!Code::IsDiscarded(code));
-      s->WriteInstructions(code->untag()->instructions_,
-                           code->untag()->unchecked_offset_, code, false);
-      if (!FLAG_use_bare_instructions) {
-        s->WriteRootRef(code->untag()->object_pool_, "deferred-code");
-      }
-      s->WriteRootRef(code->untag()->compressed_stackmaps_, "deferred-code");
-      s->WriteRootRef(code->untag()->code_source_map_, "deferred-code");
-    }
-
-    if (FLAG_use_bare_instructions) {
-      ObjectPoolPtr pool =
-          s->isolate_group()->object_store()->global_object_pool();
-      const intptr_t length = pool->untag()->length_;
-      uint8_t* entry_bits = pool->untag()->entry_bits();
-      intptr_t last_write = 0;
-      for (intptr_t i = 0; i < length; i++) {
-        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
-        if (entry_type == ObjectPool::EntryType::kTaggedObject) {
-          if (s->IsWritten(pool->untag()->data()[i].raw_obj_)) {
-            intptr_t skip = i - last_write;
-            s->WriteUnsigned(skip);
-            s->WriteRootRef(pool->untag()->data()[i].raw_obj_,
-                            "deferred-literal");
-            last_write = i;
-          }
-        }
-      }
-      s->WriteUnsigned(length - last_write);
-    }
-#endif
-  }
-
- private:
-  LoadingUnitSerializationData* unit_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class UnitDeserializationRoots : public DeserializationRoots {
- public:
-  explicit UnitDeserializationRoots(const LoadingUnit& unit) : unit_(unit) {}
-
-  bool AddBaseObjects(Deserializer* d) {
-    const Array& base_objects =
-        Array::Handle(LoadingUnit::Handle(unit_.parent()).base_objects());
-    for (intptr_t i = kFirstReference; i < base_objects.Length(); i++) {
-      d->AddBaseObject(base_objects.At(i));
-    }
-    return false;  // primary
-  }
-
-  void ReadRoots(Deserializer* d) {
-    deferred_start_index_ = d->ReadUnsigned();
-    deferred_stop_index_ = deferred_start_index_ + d->ReadUnsigned();
-    for (intptr_t id = deferred_start_index_; id < deferred_stop_index_; id++) {
-      CodePtr code = static_cast<CodePtr>(d->Ref(id));
-      ASSERT(!Code::IsUnknownDartCode(code));
-      d->ReadInstructions(code, /*deferred=*/false, /*discarded=*/false);
-      if (code->untag()->owner_->IsHeapObject() &&
-          code->untag()->owner_->IsFunction()) {
-        FunctionPtr func = static_cast<FunctionPtr>(code->untag()->owner_);
-        uword entry_point = code->untag()->entry_point_;
-        ASSERT(entry_point != 0);
-        func->untag()->entry_point_ = entry_point;
-        uword unchecked_entry_point = code->untag()->unchecked_entry_point_;
-        ASSERT(unchecked_entry_point != 0);
-        func->untag()->unchecked_entry_point_ = unchecked_entry_point;
-#if defined(DART_PRECOMPILED_RUNTIME)
-        if (FLAG_use_bare_instructions &&
-            func->untag()->data()->IsHeapObject() &&
-            func->untag()->data()->IsClosureData()) {
-          // For closure functions in bare instructions mode, also update the
-          // cache inside the static implicit closure object, if any.
-          auto data = static_cast<ClosureDataPtr>(func->untag()->data());
-          if (data->untag()->closure() != Closure::null()) {
-            // Closure functions only have one entry point.
-            ASSERT_EQUAL(entry_point, unchecked_entry_point);
-            data->untag()->closure()->untag()->entry_point_ = entry_point;
-          }
-        }
-#endif
-      }
-      if (!FLAG_use_bare_instructions) {
-        code->untag()->object_pool_ = static_cast<ObjectPoolPtr>(d->ReadRef());
-      }
-      code->untag()->compressed_stackmaps_ =
-          static_cast<CompressedStackMapsPtr>(d->ReadRef());
-      code->untag()->code_source_map_ =
-          static_cast<CodeSourceMapPtr>(d->ReadRef());
-    }
-
-    if (FLAG_use_bare_instructions) {
-      ObjectPoolPtr pool =
-          d->isolate_group()->object_store()->global_object_pool();
-      const intptr_t length = pool->untag()->length_;
-      uint8_t* entry_bits = pool->untag()->entry_bits();
-      for (intptr_t i = d->ReadUnsigned(); i < length; i += d->ReadUnsigned()) {
-        auto entry_type = ObjectPool::TypeBits::decode(entry_bits[i]);
-        ASSERT(entry_type == ObjectPool::EntryType::kTaggedObject);
-        // The existing entry will usually be null, but it might also be an
-        // equivalent object that was duplicated in another loading unit.
-        pool->untag()->data()[i].raw_obj_ = d->ReadRef();
-      }
-    }
-
-    // Reinitialize the dispatch table by rereading the table's serialization
-    // in the root snapshot.
-    auto isolate_group = d->isolate_group();
-    if (isolate_group->dispatch_table_snapshot() != nullptr) {
-      ReadStream stream(isolate_group->dispatch_table_snapshot(),
-                        isolate_group->dispatch_table_snapshot_size());
-      d->ReadDispatchTable(&stream, /*deferred=*/true, deferred_start_index_,
-                           deferred_stop_index_);
-    }
-  }
-
-  void PostLoad(Deserializer* d, const Array& refs) {
-    d->EndInstructions();
-    unit_.set_base_objects(refs);
-  }
-
- private:
-  const LoadingUnit& unit_;
-  intptr_t deferred_start_index_;
-  intptr_t deferred_stop_index_;
-};
-
-#if defined(DEBUG)
-static const int32_t kSectionMarker = 0xABAB;
-#endif
-
-Serializer::Serializer(Thread* thread,
-                       Snapshot::Kind kind,
-                       NonStreamingWriteStream* stream,
-                       ImageWriter* image_writer,
-                       bool vm,
-                       V8SnapshotProfileWriter* profile_writer)
-    : ThreadStackResource(thread),
-      heap_(thread->isolate_group()->heap()),
-      zone_(thread->zone()),
-      kind_(kind),
-      stream_(stream),
-      image_writer_(image_writer),
-      canonical_clusters_by_cid_(nullptr),
-      clusters_by_cid_(nullptr),
-      stack_(),
-      num_cids_(0),
-      num_tlc_cids_(0),
-      num_base_objects_(0),
-      num_written_objects_(0),
-      next_ref_index_(kFirstReference),
-      previous_text_offset_(0),
-      initial_field_table_(thread->isolate_group()->initial_field_table()),
-      vm_(vm),
-      profile_writer_(profile_writer)
-#if defined(SNAPSHOT_BACKTRACE)
-      ,
-      current_parent_(Object::null()),
-      parent_pairs_()
-#endif
-#if defined(DART_PRECOMPILER)
-      ,
-      deduped_instructions_sources_(zone_)
-#endif
-{
-  num_cids_ = thread->isolate_group()->class_table()->NumCids();
-  num_tlc_cids_ = thread->isolate_group()->class_table()->NumTopLevelCids();
-  canonical_clusters_by_cid_ = new SerializationCluster*[num_cids_];
-  for (intptr_t i = 0; i < num_cids_; i++) {
-    canonical_clusters_by_cid_[i] = nullptr;
-  }
-  clusters_by_cid_ = new SerializationCluster*[num_cids_];
-  for (intptr_t i = 0; i < num_cids_; i++) {
-    clusters_by_cid_[i] = nullptr;
-  }
-  if (profile_writer_ != nullptr) {
-    offsets_table_ = new (zone_) OffsetsTable(zone_);
-  }
-}
-
-Serializer::~Serializer() {
-  delete[] canonical_clusters_by_cid_;
-  delete[] clusters_by_cid_;
-}
-
-void Serializer::AddBaseObject(ObjectPtr base_object,
-                               const char* type,
-                               const char* name) {
-  AssignRef(base_object);
-  num_base_objects_++;
-
-  if ((profile_writer_ != nullptr) && (type != nullptr)) {
-    const auto& profile_id = GetProfileId(base_object);
-    profile_writer_->SetObjectTypeAndName(profile_id, type, name);
-    profile_writer_->AddRoot(profile_id);
-  }
-}
-
-intptr_t Serializer::AssignRef(ObjectPtr object) {
-  ASSERT(IsAllocatedReference(next_ref_index_));
-
-  // The object id weak table holds image offsets for Instructions instead
-  // of ref indices.
-  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
-  heap_->SetObjectId(object, next_ref_index_);
-  ASSERT(heap_->GetObjectId(object) == next_ref_index_);
-
-  objects_->Add(&Object::ZoneHandle(object));
-
-  return next_ref_index_++;
-}
-
-intptr_t Serializer::AssignArtificialRef(ObjectPtr object) {
-  const intptr_t ref = -(next_ref_index_++);
-  ASSERT(IsArtificialReference(ref));
-  if (object != nullptr) {
-    ASSERT(!object.IsHeapObject() || !object.IsInstructions());
-    ASSERT(heap_->GetObjectId(object) == kUnreachableReference);
-    heap_->SetObjectId(object, ref);
-    ASSERT(heap_->GetObjectId(object) == ref);
-  }
-  return ref;
-}
-
-void Serializer::FlushProfile() {
-  if (profile_writer_ == nullptr) return;
-  const intptr_t bytes =
-      stream_->Position() - object_currently_writing_.last_stream_position_;
-  profile_writer_->AttributeBytesTo(object_currently_writing_.id_, bytes);
-  object_currently_writing_.last_stream_position_ = stream_->Position();
-}
-
-V8SnapshotProfileWriter::ObjectId Serializer::GetProfileId(
-    ObjectPtr object) const {
-  // Instructions are handled separately.
-  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
-  return GetProfileId(UnsafeRefId(object));
-}
-
-V8SnapshotProfileWriter::ObjectId Serializer::GetProfileId(
-    intptr_t heap_id) const {
-  if (IsArtificialReference(heap_id)) {
-    return {IdSpace::kArtificial, -heap_id};
-  }
-  ASSERT(IsAllocatedReference(heap_id));
-  return {IdSpace::kSnapshot, heap_id};
-}
-
-void Serializer::AttributeReference(
-    ObjectPtr object,
-    const V8SnapshotProfileWriter::Reference& reference) {
-  if (profile_writer_ == nullptr) return;
-  const auto& object_id = GetProfileId(object);
-#if defined(DART_PRECOMPILER)
-  if (object->IsHeapObject() && object->IsWeakSerializationReference()) {
-    auto const wsr = WeakSerializationReference::RawCast(object);
-    auto const target = wsr->untag()->target();
-    const auto& target_id = GetProfileId(target);
-    if (object_id != target_id) {
-      const auto& replacement_id = GetProfileId(wsr->untag()->replacement());
-      ASSERT(object_id == replacement_id);
-      // The target of the WSR will be replaced in the snapshot, so write
-      // attributions for both the dropped target and for the replacement.
-      profile_writer_->AttributeDroppedReferenceTo(
-          object_currently_writing_.id_, reference, target_id, replacement_id);
-      return;
-    }
-    // The replacement isn't used for this WSR in the snapshot, as either the
-    // target is strongly referenced or the WSR itself is unreachable, so fall
-    // through to attributing a reference to the WSR (which shares the profile
-    // ID of the target).
-  }
-#endif
-  profile_writer_->AttributeReferenceTo(object_currently_writing_.id_,
-                                        reference, object_id);
-}
-
-Serializer::WritingObjectScope::WritingObjectScope(
-    Serializer* serializer,
-    const V8SnapshotProfileWriter::ObjectId& id,
-    ObjectPtr object)
-    : serializer_(serializer),
-      old_object_(serializer->object_currently_writing_.object_),
-      old_id_(serializer->object_currently_writing_.id_),
-      old_cid_(serializer->object_currently_writing_.cid_) {
-  if (serializer_->profile_writer_ == nullptr) return;
-  // The ID should correspond to one already added appropriately to the
-  // profile writer.
-  ASSERT(serializer_->profile_writer_->HasId(id));
-  serializer_->FlushProfile();
-  serializer_->object_currently_writing_.object_ = object;
-  serializer_->object_currently_writing_.id_ = id;
-  serializer_->object_currently_writing_.cid_ =
-      object == nullptr ? -1 : object->GetClassIdMayBeSmi();
-}
-
-Serializer::WritingObjectScope::~WritingObjectScope() {
-  if (serializer_->profile_writer_ == nullptr) return;
-  serializer_->FlushProfile();
-  serializer_->object_currently_writing_.object_ = old_object_;
-  serializer_->object_currently_writing_.id_ = old_id_;
-  serializer_->object_currently_writing_.cid_ = old_cid_;
-}
-
-V8SnapshotProfileWriter::ObjectId Serializer::WritingObjectScope::ReserveId(
-    Serializer* s,
-    const char* type,
-    ObjectPtr obj,
-    const char* name) {
-  if (s->profile_writer_ == nullptr) {
-    return V8SnapshotProfileWriter::kArtificialRootId;
-  }
-  if (name == nullptr) {
-    // Handle some cases where there are obvious names to assign.
-    switch (obj->GetClassIdMayBeSmi()) {
-      case kSmiCid: {
-        name = OS::SCreate(s->zone(), "%" Pd "", Smi::Value(Smi::RawCast(obj)));
-        break;
-      }
-      case kMintCid: {
-        name = OS::SCreate(s->zone(), "%" Pd64 "",
-                           Mint::RawCast(obj)->untag()->value_);
-        break;
-      }
-      case kOneByteStringCid:
-      case kTwoByteStringCid: {
-        name = String::ToCString(s->thread(), String::RawCast(obj));
-        break;
-      }
-    }
-  }
-  const auto& obj_id = s->GetProfileId(obj);
-  s->profile_writer_->SetObjectTypeAndName(obj_id, type, name);
-  return obj_id;
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-bool Serializer::CreateArtificialNodeIfNeeded(ObjectPtr obj) {
-  ASSERT(profile_writer() != nullptr);
-
-  // UnsafeRefId will do lazy reference allocation for WSRs.
-  intptr_t id = UnsafeRefId(obj);
-  ASSERT(id != kUnallocatedReference);
-  if (id != kUnreachableReference) {
-    return IsArtificialReference(id);
-  }
-  if (obj->IsHeapObject() && obj->IsWeakSerializationReference()) {
-    auto const target =
-        WeakSerializationReference::RawCast(obj)->untag()->target();
-    CreateArtificialNodeIfNeeded(target);
-    // Since the WSR is unreachable, we can replace its id with whatever the
-    // ID of the target is, whether real or artificial.
-    id = heap_->GetObjectId(target);
-    heap_->SetObjectId(obj, id);
-    return IsArtificialReference(id);
-  }
-
-  const char* type = nullptr;
-  const char* name = nullptr;
-  GrowableArray<std::pair<ObjectPtr, V8SnapshotProfileWriter::Reference>> links;
-  const classid_t cid = obj->GetClassIdMayBeSmi();
-  switch (cid) {
-    // For profiling static call target tables in AOT mode.
-    case kSmiCid: {
-      type = "Smi";
-      break;
-    }
-    // For profiling per-code object pools in bare instructions mode.
-    case kObjectPoolCid: {
-      type = "ObjectPool";
-      auto const pool = ObjectPool::RawCast(obj);
-      for (intptr_t i = 0; i < pool->untag()->length_; i++) {
-        uint8_t bits = pool->untag()->entry_bits()[i];
-        if (ObjectPool::TypeBits::decode(bits) ==
-            ObjectPool::EntryType::kTaggedObject) {
-          auto const elem = pool->untag()->data()[i].raw_obj_;
-          // Elements should be reachable from the global object pool.
-          ASSERT(HasRef(elem));
-          links.Add({elem, V8SnapshotProfileWriter::Reference::Element(i)});
-        }
-      }
-      break;
-    }
-    // For profiling static call target tables and the dispatch table in AOT.
-    case kImmutableArrayCid:
-    case kArrayCid: {
-      type = "Array";
-      auto const array = Array::RawCast(obj);
-      for (intptr_t i = 0, n = Smi::Value(array->untag()->length()); i < n;
-           i++) {
-        ObjectPtr elem = array->untag()->element(i);
-        links.Add({elem, V8SnapshotProfileWriter::Reference::Element(i)});
-      }
-      break;
-    }
-    // For profiling the dispatch table.
-    case kCodeCid: {
-      type = "Code";
-      auto const code = Code::RawCast(obj);
-      name = CodeSerializationCluster::MakeDisambiguatedCodeName(this, code);
-      links.Add({code->untag()->owner(),
-                 V8SnapshotProfileWriter::Reference::Property("owner_")});
-      break;
-    }
-    case kFunctionCid: {
-      FunctionPtr func = static_cast<FunctionPtr>(obj);
-      type = "Function";
-      name = FunctionSerializationCluster::MakeDisambiguatedFunctionName(this,
-                                                                         func);
-      links.Add({func->untag()->owner(),
-                 V8SnapshotProfileWriter::Reference::Property("owner_")});
-      ObjectPtr data = func->untag()->data();
-      if (data->GetClassId() == kClosureDataCid) {
-        links.Add(
-            {data, V8SnapshotProfileWriter::Reference::Property("data_")});
-      }
-      break;
-    }
-    case kClosureDataCid: {
-      auto data = static_cast<ClosureDataPtr>(obj);
-      type = "ClosureData";
-      links.Add(
-          {data->untag()->parent_function(),
-           V8SnapshotProfileWriter::Reference::Property("parent_function_")});
-      break;
-    }
-    case kClassCid: {
-      ClassPtr cls = static_cast<ClassPtr>(obj);
-      type = "Class";
-      name = String::ToCString(thread(), cls->untag()->name());
-      links.Add({cls->untag()->library(),
-                 V8SnapshotProfileWriter::Reference::Property("library_")});
-      break;
-    }
-    case kPatchClassCid: {
-      PatchClassPtr patch_cls = static_cast<PatchClassPtr>(obj);
-      type = "PatchClass";
-      links.Add(
-          {patch_cls->untag()->patched_class(),
-           V8SnapshotProfileWriter::Reference::Property("patched_class_")});
-      break;
-    }
-    case kLibraryCid: {
-      LibraryPtr lib = static_cast<LibraryPtr>(obj);
-      type = "Library";
-      name = String::ToCString(thread(), lib->untag()->url());
-      break;
-    }
-    case kFunctionTypeCid: {
-      type = "FunctionType";
-      break;
-    };
-    default:
-      FATAL("Request to create artificial node for object with cid %d", cid);
-  }
-
-  id = AssignArtificialRef(obj);
-  Serializer::WritingObjectScope scope(this, type, obj, name);
-  for (const auto& link : links) {
-    CreateArtificialNodeIfNeeded(link.first);
-    AttributeReference(link.first, link.second);
-  }
-  return true;
-}
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-
-intptr_t Serializer::RefId(ObjectPtr object) const {
-  auto const id = UnsafeRefId(object);
-  if (IsAllocatedReference(id)) {
-    return id;
-  }
-  ASSERT(id == kUnreachableReference || IsArtificialReference(id));
-  REUSABLE_OBJECT_HANDLESCOPE(thread());
-  auto& handle = thread()->ObjectHandle();
-  handle = object;
-  FATAL("Reference to unreachable object %s", handle.ToCString());
-}
-
-intptr_t Serializer::UnsafeRefId(ObjectPtr object) const {
-  // The object id weak table holds image offsets for Instructions instead
-  // of ref indices.
-  ASSERT(!object->IsHeapObject() || !object->IsInstructions());
-  if (!Snapshot::IncludesCode(kind_) &&
-      object->GetClassIdMayBeSmi() == kCodeCid) {
-    return RefId(Object::null());
-  }
-  auto id = heap_->GetObjectId(object);
-  if (id != kUnallocatedReference) {
-    return id;
-  }
-  // This is the only case where we may still see unallocated references after
-  // WriteAlloc is finished.
-  if (object->IsWeakSerializationReference()) {
-    // Lazily set the object ID of the WSR to the object which will replace
-    // it in the snapshot.
-    auto const wsr = static_cast<WeakSerializationReferencePtr>(object);
-    // Either the target or the replacement must be allocated, since the
-    // WSR is reachable.
-    id = HasRef(wsr->untag()->target()) ? RefId(wsr->untag()->target())
-                                        : RefId(wsr->untag()->replacement());
-    heap_->SetObjectId(wsr, id);
-    return id;
-  }
-  REUSABLE_OBJECT_HANDLESCOPE(thread());
-  auto& handle = thread()->ObjectHandle();
-  handle = object;
-  FATAL("Reference for object %s is unallocated", handle.ToCString());
-}
-
-const char* Serializer::ReadOnlyObjectType(intptr_t cid) {
-  switch (cid) {
-    case kPcDescriptorsCid:
-      return "PcDescriptors";
-    case kCodeSourceMapCid:
-      return "CodeSourceMap";
-    case kCompressedStackMapsCid:
-      return "CompressedStackMaps";
-    case kStringCid:
-      return current_loading_unit_id_ <= LoadingUnit::kRootId
-                 ? "CanonicalString"
-                 : nullptr;
-    case kOneByteStringCid:
-      return current_loading_unit_id_ <= LoadingUnit::kRootId
-                 ? "OneByteStringCid"
-                 : nullptr;
-    case kTwoByteStringCid:
-      return current_loading_unit_id_ <= LoadingUnit::kRootId
-                 ? "TwoByteStringCid"
-                 : nullptr;
-    default:
-      return nullptr;
-  }
-}
-
-SerializationCluster* Serializer::NewClusterForClass(intptr_t cid,
-                                                     bool is_canonical) {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  UNREACHABLE();
-  return NULL;
-#else
-  Zone* Z = zone_;
-  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
-    Push(isolate_group()->class_table()->At(cid));
-    return new (Z) InstanceSerializationCluster(is_canonical, cid);
-  }
-  if (IsTypedDataViewClassId(cid)) {
-    return new (Z) TypedDataViewSerializationCluster(cid);
-  }
-  if (IsExternalTypedDataClassId(cid)) {
-    return new (Z) ExternalTypedDataSerializationCluster(cid);
-  }
-  if (IsTypedDataClassId(cid)) {
-    return new (Z) TypedDataSerializationCluster(cid);
-  }
-
-#if !defined(DART_COMPRESSED_POINTERS)
-  // Sometimes we write memory images for read-only objects that contain no
-  // pointers. These can be mmapped directly, needing no relocation, and added
-  // to the list of heap pages. This gives us lazy/demand paging from the OS.
-  // We do not do this for snapshots without code to keep snapshots portable
-  // between machines with different word sizes. We do not do this when we use
-  // compressed pointers because we cannot always control the load address of
-  // the memory image, and it might be outside the 4GB region addressable by
-  // compressed pointers.
-  if (Snapshot::IncludesCode(kind_)) {
-    if (auto const type = ReadOnlyObjectType(cid)) {
-      return new (Z) RODataSerializationCluster(Z, type, cid, is_canonical);
-    }
-  }
-#endif
-
-  const bool cluster_represents_canonical_set =
-      current_loading_unit_id_ <= LoadingUnit::kRootId && is_canonical;
-
-  switch (cid) {
-    case kClassCid:
-      return new (Z) ClassSerializationCluster(num_cids_ + num_tlc_cids_);
-    case kTypeParametersCid:
-      return new (Z) TypeParametersSerializationCluster();
-    case kTypeArgumentsCid:
-      return new (Z) TypeArgumentsSerializationCluster(
-          is_canonical, cluster_represents_canonical_set);
-    case kPatchClassCid:
-      return new (Z) PatchClassSerializationCluster();
-    case kFunctionCid:
-      return new (Z) FunctionSerializationCluster();
-    case kClosureDataCid:
-      return new (Z) ClosureDataSerializationCluster();
-    case kFfiTrampolineDataCid:
-      return new (Z) FfiTrampolineDataSerializationCluster();
-    case kFieldCid:
-      return new (Z) FieldSerializationCluster();
-    case kScriptCid:
-      return new (Z) ScriptSerializationCluster();
-    case kLibraryCid:
-      return new (Z) LibrarySerializationCluster();
-    case kNamespaceCid:
-      return new (Z) NamespaceSerializationCluster();
-    case kKernelProgramInfoCid:
-      return new (Z) KernelProgramInfoSerializationCluster();
-    case kCodeCid:
-      return new (Z) CodeSerializationCluster(heap_);
-    case kObjectPoolCid:
-      return new (Z) ObjectPoolSerializationCluster();
-    case kPcDescriptorsCid:
-      return new (Z) PcDescriptorsSerializationCluster();
-    case kCodeSourceMapCid:
-      return new (Z) CodeSourceMapSerializationCluster();
-    case kCompressedStackMapsCid:
-      return new (Z) CompressedStackMapsSerializationCluster();
-    case kExceptionHandlersCid:
-      return new (Z) ExceptionHandlersSerializationCluster();
-    case kContextCid:
-      return new (Z) ContextSerializationCluster();
-    case kContextScopeCid:
-      return new (Z) ContextScopeSerializationCluster();
-    case kUnlinkedCallCid:
-      return new (Z) UnlinkedCallSerializationCluster();
-    case kICDataCid:
-      return new (Z) ICDataSerializationCluster();
-    case kMegamorphicCacheCid:
-      return new (Z) MegamorphicCacheSerializationCluster();
-    case kSubtypeTestCacheCid:
-      return new (Z) SubtypeTestCacheSerializationCluster();
-    case kLoadingUnitCid:
-      return new (Z) LoadingUnitSerializationCluster();
-    case kLanguageErrorCid:
-      return new (Z) LanguageErrorSerializationCluster();
-    case kUnhandledExceptionCid:
-      return new (Z) UnhandledExceptionSerializationCluster();
-    case kLibraryPrefixCid:
-      return new (Z) LibraryPrefixSerializationCluster();
-    case kTypeCid:
-      return new (Z) TypeSerializationCluster(is_canonical,
-                                              cluster_represents_canonical_set);
-    case kFunctionTypeCid:
-      return new (Z) FunctionTypeSerializationCluster(
-          is_canonical, cluster_represents_canonical_set);
-    case kTypeRefCid:
-      return new (Z) TypeRefSerializationCluster();
-    case kTypeParameterCid:
-      return new (Z) TypeParameterSerializationCluster(
-          is_canonical, cluster_represents_canonical_set);
-    case kClosureCid:
-      return new (Z) ClosureSerializationCluster(is_canonical);
-    case kMintCid:
-      return new (Z) MintSerializationCluster(is_canonical);
-    case kDoubleCid:
-      return new (Z) DoubleSerializationCluster(is_canonical);
-    case kGrowableObjectArrayCid:
-      return new (Z) GrowableObjectArraySerializationCluster();
-    case kStackTraceCid:
-      return new (Z) StackTraceSerializationCluster();
-    case kRegExpCid:
-      return new (Z) RegExpSerializationCluster();
-    case kWeakPropertyCid:
-      return new (Z) WeakPropertySerializationCluster();
-    case kLinkedHashMapCid:
-      // We do not have mutable hash maps in snapshots.
-      UNREACHABLE();
-    case kLinkedHashSetCid:
-      // We do not have mutable hash sets in snapshots.
-      UNREACHABLE();
-    case kArrayCid:
-      return new (Z) ArraySerializationCluster(is_canonical, kArrayCid);
-    case kImmutableArrayCid:
-      return new (Z)
-          ArraySerializationCluster(is_canonical, kImmutableArrayCid);
-    case kStringCid:
-      return new (Z) StringSerializationCluster(
-          is_canonical, cluster_represents_canonical_set && !vm_);
-    case kWeakSerializationReferenceCid:
-#if defined(DART_PRECOMPILER)
-      ASSERT(kind_ == Snapshot::kFullAOT);
-      return new (Z) WeakSerializationReferenceSerializationCluster();
-#endif
-    default:
-      break;
-  }
-
-  // The caller will check for NULL and provide an error with more context than
-  // is available here.
-  return NULL;
-#endif  // !DART_PRECOMPILED_RUNTIME
-}
-
-bool Serializer::InCurrentLoadingUnitOrRoot(ObjectPtr obj) {
-  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;
-    heap_->SetLoadingUnit(obj, unit_id);
-  }
-  return unit_id == LoadingUnit::kRootId || unit_id == current_loading_unit_id_;
-}
-
-void Serializer::RecordDeferredCode(CodePtr code) {
-  const intptr_t unit_id = heap_->GetLoadingUnit(code);
-  ASSERT(unit_id != WeakTable::kNoValue && unit_id != LoadingUnit::kRootId);
-  (*loading_units_)[unit_id]->AddDeferredObject(code);
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-intptr_t Serializer::PrepareInstructions() {
-  if (!Snapshot::IncludesCode(kind())) return 0;
-
-  // Code objects that have identical/duplicate instructions must be adjacent in
-  // the order that Code objects are written because the encoding of the
-  // reference from the Code to the Instructions assumes monotonically
-  // increasing offsets as part of a delta encoding. Also the code order table
-  // that allows for mapping return addresses back to Code objects depends on
-  // this sorting.
-  if (code_cluster_ != nullptr) {
-    CodeSerializationCluster::Sort(code_cluster_->objects());
-  }
-  if ((loading_units_ != nullptr) &&
-      (current_loading_unit_id_ == LoadingUnit::kRootId)) {
-    for (intptr_t i = LoadingUnit::kRootId + 1; i < loading_units_->length();
-         i++) {
-      auto unit_objects = loading_units_->At(i)->deferred_objects();
-      CodeSerializationCluster::Sort(unit_objects);
-      ASSERT(unit_objects->length() == 0 || code_cluster_ != nullptr);
-      for (intptr_t j = 0; j < unit_objects->length(); j++) {
-        code_cluster_->deferred_objects()->Add(unit_objects->At(j)->ptr());
-      }
-    }
-  }
-
-#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-  if ((kind() == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
-    // Group the code objects whose instructions are not being deferred in this
-    // snapshot unit in the order they will be written: first the code objects
-    // encountered for this first time in this unit being written by the
-    // CodeSerializationCluster, then code object previously deferred whose
-    // instructions are now written by UnitSerializationRoots. This order needs
-    // to be known to finalize bare-instructions-mode's PC-relative calls.
-    GrowableArray<CodePtr> code_objects;
-    if (code_cluster_ != nullptr) {
-      auto in = code_cluster_->objects();
-      for (intptr_t i = 0; i < in->length(); i++) {
-        code_objects.Add(in->At(i));
-      }
-    }
-    if (loading_units_ != nullptr) {
-      auto in =
-          loading_units_->At(current_loading_unit_id_)->deferred_objects();
-      for (intptr_t i = 0; i < in->length(); i++) {
-        code_objects.Add(in->At(i)->ptr());
-      }
-    }
-
-    GrowableArray<ImageWriterCommand> writer_commands;
-    RelocateCodeObjects(vm_, &code_objects, &writer_commands);
-    image_writer_->PrepareForSerialization(&writer_commands);
-    return code_objects.length();
-  }
-#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-  return 0;
-}
-
-void Serializer::WriteInstructions(InstructionsPtr instr,
-                                   uint32_t unchecked_offset,
-                                   CodePtr code,
-                                   bool deferred) {
-  ASSERT(code != Code::null());
-
-  ASSERT(InCurrentLoadingUnitOrRoot(code) != deferred);
-  if (deferred) {
-    return;
-  }
-
-  const intptr_t offset = image_writer_->GetTextOffsetFor(instr, code);
-#if defined(DART_PRECOMPILER)
-  if (profile_writer_ != nullptr) {
-    ASSERT(object_currently_writing_.id_ !=
-           V8SnapshotProfileWriter::kArtificialRootId);
-    const auto offset_space = vm_ ? IdSpace::kVmText : IdSpace::kIsolateText;
-    profile_writer_->AttributeReferenceTo(
-        object_currently_writing_.id_,
-        V8SnapshotProfileWriter::Reference::Property("<instructions>"),
-        {offset_space, offset});
-  }
-
-  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
-    ASSERT(offset != 0);
-    RELEASE_ASSERT(offset >= previous_text_offset_);
-    const uint32_t delta = offset - previous_text_offset_;
-    WriteUnsigned(delta);
-    const uint32_t payload_info =
-        (unchecked_offset << 1) | (Code::HasMonomorphicEntry(code) ? 0x1 : 0x0);
-    WriteUnsigned(payload_info);
-    previous_text_offset_ = offset;
-
-    if (Code::IsDiscarded(code)) {
-      // Discarded Code objects are not supported in the vm isolate snapshot.
-      ASSERT(!vm_);
-      // Stack maps of discarded Code objects are written along with
-      // instructions so they can be added to instructions table during
-      // deserialization.
-      WritePropertyRef(code->untag()->compressed_stackmaps_,
-                       "compressed_stackmaps_");
-    }
-    return;
-  }
-#endif
-  Write<uint32_t>(offset);
-  WriteUnsigned(unchecked_offset);
-}
-
-void Serializer::TraceDataOffset(uint32_t offset) {
-  if (profile_writer_ == nullptr) return;
-  // ROData cannot be roots.
-  ASSERT(object_currently_writing_.id_ !=
-         V8SnapshotProfileWriter::kArtificialRootId);
-  auto offset_space = vm_ ? IdSpace::kVmData : IdSpace::kIsolateData;
-  // TODO(sjindel): Give this edge a more appropriate type than element
-  // (internal, maybe?).
-  profile_writer_->AttributeReferenceTo(
-      object_currently_writing_.id_,
-      V8SnapshotProfileWriter::Reference::Element(0), {offset_space, offset});
-}
-
-uint32_t Serializer::GetDataOffset(ObjectPtr object) const {
-  return image_writer_->GetDataOffsetFor(object);
-}
-
-intptr_t Serializer::GetDataSize() const {
-  if (image_writer_ == NULL) {
-    return 0;
-  }
-  return image_writer_->data_size();
-}
-#endif
-
-void Serializer::Push(ObjectPtr object) {
-  if (object->IsHeapObject() && object->IsCode() &&
-      !Snapshot::IncludesCode(kind_)) {
-    return;  // Do not trace, will write null.
-  }
-
-  intptr_t id = heap_->GetObjectId(object);
-  if (id == kUnreachableReference) {
-    // When discovering the transitive closure of objects reachable from the
-    // roots we do not trace references, e.g. inside [RawCode], to
-    // [RawInstructions], since [RawInstructions] doesn't contain any references
-    // and the serialization code uses an [ImageWriter] for those.
-    if (object->IsHeapObject() && object->IsInstructions()) {
-      UnexpectedObject(object,
-                       "Instructions should only be reachable from Code");
-    }
-
-    heap_->SetObjectId(object, kUnallocatedReference);
-    ASSERT(IsReachableReference(heap_->GetObjectId(object)));
-    stack_.Add(object);
-    num_written_objects_++;
-#if defined(SNAPSHOT_BACKTRACE)
-    parent_pairs_.Add(&Object::Handle(zone_, object));
-    parent_pairs_.Add(&Object::Handle(zone_, current_parent_));
-#endif
-  }
-}
-
-void Serializer::Trace(ObjectPtr object) {
-  intptr_t cid;
-  bool is_canonical;
-  if (!object->IsHeapObject()) {
-    // Smis are merged into the Mint cluster because Smis for the writer might
-    // become Mints for the reader and vice versa.
-    cid = kMintCid;
-    is_canonical = true;
-  } else {
-    cid = object->GetClassId();
-    is_canonical = object->untag()->IsCanonical();
-  }
-  if (IsStringClassId(cid)) {
-    cid = kStringCid;
-  }
-
-  SerializationCluster** cluster_ref =
-      is_canonical ? &canonical_clusters_by_cid_[cid] : &clusters_by_cid_[cid];
-  if (*cluster_ref == nullptr) {
-    *cluster_ref = NewClusterForClass(cid, is_canonical);
-    if (*cluster_ref == nullptr) {
-      UnexpectedObject(object, "No serialization cluster defined");
-    }
-  }
-  SerializationCluster* cluster = *cluster_ref;
-  ASSERT(cluster != nullptr);
-  if (cluster->is_canonical() != is_canonical) {
-    FATAL("cluster for %s (cid %" Pd ") %s as canonical, but %s",
-          cluster->name(), cid,
-          cluster->is_canonical() ? "marked" : "not marked",
-          is_canonical ? "should be" : "should not be");
-  }
-
-#if defined(SNAPSHOT_BACKTRACE)
-  current_parent_ = object;
-#endif
-
-  cluster->Trace(this, object);
-
-#if defined(SNAPSHOT_BACKTRACE)
-  current_parent_ = Object::null();
-#endif
-}
-
-void Serializer::UnexpectedObject(ObjectPtr raw_object, const char* message) {
-  // Exit the no safepoint scope so we can allocate while printing.
-  while (thread()->no_safepoint_scope_depth() > 0) {
-    thread()->DecrementNoSafepointScopeDepth();
-  }
-  Object& object = Object::Handle(raw_object);
-  OS::PrintErr("Unexpected object (%s, %s): 0x%" Px " %s\n", message,
-               Snapshot::KindToCString(kind_), static_cast<uword>(object.ptr()),
-               object.ToCString());
-#if defined(SNAPSHOT_BACKTRACE)
-  while (!object.IsNull()) {
-    object = ParentOf(object);
-    OS::PrintErr("referenced by 0x%" Px " %s\n",
-                 static_cast<uword>(object.ptr()), object.ToCString());
-  }
-#endif
-  OS::Abort();
-}
-
-#if defined(SNAPSHOT_BACKTRACE)
-ObjectPtr Serializer::ParentOf(const Object& object) {
-  for (intptr_t i = 0; i < parent_pairs_.length(); i += 2) {
-    if (parent_pairs_[i]->ptr() == object.ptr()) {
-      return parent_pairs_[i + 1]->ptr();
-    }
-  }
-  return Object::null();
-}
-#endif  // SNAPSHOT_BACKTRACE
-
-void Serializer::WriteVersionAndFeatures(bool is_vm_snapshot) {
-  const char* expected_version = Version::SnapshotString();
-  ASSERT(expected_version != NULL);
-  const intptr_t version_len = strlen(expected_version);
-  WriteBytes(reinterpret_cast<const uint8_t*>(expected_version), version_len);
-
-  const char* expected_features =
-      Dart::FeaturesString(IsolateGroup::Current(), is_vm_snapshot, kind_);
-  ASSERT(expected_features != NULL);
-  const intptr_t features_len = strlen(expected_features);
-  WriteBytes(reinterpret_cast<const uint8_t*>(expected_features),
-             features_len + 1);
-  free(const_cast<char*>(expected_features));
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-static int CompareClusters(SerializationCluster* const* a,
-                           SerializationCluster* const* b) {
-  if ((*a)->size() > (*b)->size()) {
-    return -1;
-  } else if ((*a)->size() < (*b)->size()) {
-    return 1;
-  } else {
-    return 0;
-  }
-}
-
-#define CID_CLUSTER(Type)                                                      \
-  reinterpret_cast<Type##SerializationCluster*>(clusters_by_cid_[k##Type##Cid])
-
-ZoneGrowableArray<Object*>* Serializer::Serialize(SerializationRoots* roots) {
-  // While object_currently_writing_ is initialized to the artificial root, we
-  // set up a scope to ensure proper flushing to the profile.
-  Serializer::WritingObjectScope scope(
-      this, V8SnapshotProfileWriter::kArtificialRootId);
-  roots->AddBaseObjects(this);
-
-  NoSafepointScope no_safepoint;
-
-  roots->PushRoots(this);
-
-  // Resolving WeakSerializationReferences and WeakProperties may cause new
-  // objects to be pushed on the stack, and handling the changes to the stack
-  // may cause the targets of WeakSerializationReferences and keys of
-  // WeakProperties to become reachable, so we do this as a fixed point
-  // computation. Note that reachability is computed monotonically (an object
-  // can change from not reachable to reachable, but never the reverse), which
-  // is technically a conservative approximation for WSRs, but doing a strict
-  // analysis that allows non-motonoic reachability may not halt.
-  //
-  // To see this, take a WSR whose replacement causes the target of another WSR
-  // to become reachable, which then causes the target of the first WSR to
-  // become reachable, but the only way to reach the target is through the
-  // target of the second WSR, which was only reachable via the replacement
-  // the first.
-  //
-  // In practice, this case doesn't come up as replacements tend to be either
-  // null, smis, or singleton objects that do not contain WSRs currently.
-  while (stack_.length() > 0) {
-    // Strong references.
-    while (stack_.length() > 0) {
-      Trace(stack_.RemoveLast());
-    }
-
-    // Ephemeron references.
-#if defined(DART_PRECOMPILER)
-    if (auto const cluster = CID_CLUSTER(WeakSerializationReference)) {
-      cluster->RetraceEphemerons(this);
-    }
-#endif
-    if (auto const cluster = CID_CLUSTER(WeakProperty)) {
-      cluster->RetraceEphemerons(this);
-    }
-  }
-
-#if defined(DART_PRECOMPILER)
-  auto const wsr_cluster = CID_CLUSTER(WeakSerializationReference);
-  if (wsr_cluster != nullptr) {
-    // Now that we have computed the reachability fixpoint, we remove the
-    // count of now-reachable WSRs as they are not actually serialized.
-    num_written_objects_ -= wsr_cluster->Count(this);
-    // We don't need to write this cluster, so remove it from consideration.
-    clusters_by_cid_[kWeakSerializationReferenceCid] = nullptr;
-  }
-  ASSERT(clusters_by_cid_[kWeakSerializationReferenceCid] == nullptr);
-#endif
-
-  code_cluster_ = CID_CLUSTER(Code);
-
-  GrowableArray<SerializationCluster*> clusters;
-  // The order that PostLoad runs matters for some classes because of
-  // assumptions during canonicalization, read filling, or post-load filling of
-  // some classes about what has already been read and/or canonicalized.
-  // Explicitly add these clusters first, then add the rest ordered by class id.
-#define ADD_CANONICAL_NEXT(cid)                                                \
-  if (auto const cluster = canonical_clusters_by_cid_[cid]) {                  \
-    clusters.Add(cluster);                                                     \
-    canonical_clusters_by_cid_[cid] = nullptr;                                 \
-  }
-#define ADD_NON_CANONICAL_NEXT(cid)                                            \
-  if (auto const cluster = clusters_by_cid_[cid]) {                            \
-    clusters.Add(cluster);                                                     \
-    clusters_by_cid_[cid] = nullptr;                                           \
-  }
-  ADD_CANONICAL_NEXT(kOneByteStringCid)
-  ADD_CANONICAL_NEXT(kTwoByteStringCid)
-  ADD_CANONICAL_NEXT(kStringCid)
-  ADD_CANONICAL_NEXT(kMintCid)
-  ADD_CANONICAL_NEXT(kDoubleCid)
-  ADD_CANONICAL_NEXT(kTypeParameterCid)
-  ADD_CANONICAL_NEXT(kTypeCid)
-  ADD_CANONICAL_NEXT(kTypeArgumentsCid)
-  // Code cluster should be deserialized before Function as
-  // FunctionDeserializationCluster::ReadFill uses instructions table
-  // which is filled in CodeDeserializationCluster::ReadFill.
-  ADD_NON_CANONICAL_NEXT(kCodeCid)
-  // The function cluster should be deserialized before any closures, as
-  // PostLoad for closures caches the entry point found in the function.
-  ADD_NON_CANONICAL_NEXT(kFunctionCid)
-  ADD_CANONICAL_NEXT(kClosureCid)
-#undef ADD_CANONICAL_NEXT
-#undef ADD_NON_CANONICAL_NEXT
-  const intptr_t out_of_order_clusters = clusters.length();
-  for (intptr_t cid = 0; cid < num_cids_; cid++) {
-    if (auto const cluster = canonical_clusters_by_cid_[cid]) {
-      clusters.Add(cluster);
-    }
-  }
-  for (intptr_t cid = 0; cid < num_cids_; cid++) {
-    if (auto const cluster = clusters_by_cid_[cid]) {
-      clusters.Add(clusters_by_cid_[cid]);
-    }
-  }
-  // Put back any taken out temporarily to avoid re-adding them during the loop.
-  for (intptr_t i = 0; i < out_of_order_clusters; i++) {
-    const auto& cluster = clusters.At(i);
-    const intptr_t cid = cluster->cid();
-    auto const cid_clusters =
-        cluster->is_canonical() ? canonical_clusters_by_cid_ : clusters_by_cid_;
-    ASSERT(cid_clusters[cid] == nullptr);
-    cid_clusters[cid] = cluster;
-  }
-
-  instructions_table_len_ = PrepareInstructions();
-
-  intptr_t num_objects = num_base_objects_ + num_written_objects_;
-#if defined(ARCH_IS_64_BIT)
-  if (!Utils::IsInt(32, num_objects)) {
-    FATAL("Ref overflow");
-  }
-#endif
-
-  WriteUnsigned(num_base_objects_);
-  WriteUnsigned(num_objects);
-  WriteUnsigned(clusters.length());
-  // TODO(dartbug.com/36097): Not every snapshot carries the field table.
-  if (current_loading_unit_id_ <= LoadingUnit::kRootId) {
-    WriteUnsigned(initial_field_table_->NumFieldIds());
-  } else {
-    WriteUnsigned(0);
-  }
-  ASSERT((instructions_table_len_ == 0) ||
-         (FLAG_precompiled_mode && FLAG_use_bare_instructions));
-  WriteUnsigned(instructions_table_len_);
-
-  for (SerializationCluster* cluster : clusters) {
-    cluster->WriteAndMeasureAlloc(this);
-    bytes_heap_allocated_ += cluster->target_memory_size();
-#if defined(DEBUG)
-    Write<int32_t>(next_ref_index_);
-#endif
-  }
-
-  // We should have assigned a ref to every object we pushed.
-  ASSERT((next_ref_index_ - 1) == num_objects);
-  // And recorded them all in [objects_].
-  ASSERT(objects_->length() == num_objects);
-
-#if defined(DART_PRECOMPILER)
-  if (profile_writer_ != nullptr && wsr_cluster != nullptr) {
-    // Post-WriteAlloc, we eagerly create artificial nodes for any unreachable
-    // targets in reachable WSRs if writing a v8 snapshot profile, since they
-    // will be used in AttributeReference().
-    //
-    // Unreachable WSRs may also need artifical nodes, as they may be members
-    // of other unreachable objects that have artificial nodes in the profile,
-    // but they are instead lazily handled in CreateArtificialNodeIfNeeded().
-    wsr_cluster->CreateArtificialTargetNodesIfNeeded(this);
-  }
-#endif
-
-  for (SerializationCluster* cluster : clusters) {
-    cluster->WriteAndMeasureFill(this);
-#if defined(DEBUG)
-    Write<int32_t>(kSectionMarker);
-#endif
-  }
-
-  roots->WriteRoots(this);
-
-#if defined(DEBUG)
-  Write<int32_t>(kSectionMarker);
-#endif
-
-  PrintSnapshotSizes();
-
-  heap()->ResetObjectIdTable();
-  return objects_;
-}
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-
-#if defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
-// The serialized format of the dispatch table is a sequence of variable-length
-// integers (the built-in variable-length integer encoding/decoding of
-// the stream). Each encoded integer e is interpreted thus:
-// -kRecentCount .. -1   Pick value from the recent values buffer at index -1-e.
-// 0                     Empty (unused) entry.
-// 1 .. kMaxRepeat       Repeat previous entry e times.
-// kIndexBase or higher  Pick entry point from the object at index e-kIndexBase
-//                       in the snapshot code cluster. Also put it in the recent
-//                       values buffer at the next round-robin index.
-
-// Constants for serialization format. Chosen such that repeats and recent
-// values are encoded as single bytes in SLEB128 encoding.
-static constexpr intptr_t kDispatchTableSpecialEncodingBits = 6;
-static constexpr intptr_t kDispatchTableRecentCount =
-    1 << kDispatchTableSpecialEncodingBits;
-static constexpr intptr_t kDispatchTableRecentMask =
-    (1 << kDispatchTableSpecialEncodingBits) - 1;
-static constexpr intptr_t kDispatchTableMaxRepeat =
-    (1 << kDispatchTableSpecialEncodingBits) - 1;
-static constexpr intptr_t kDispatchTableIndexBase = kDispatchTableMaxRepeat + 1;
-#endif  // defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
-
-void Serializer::WriteDispatchTable(const Array& entries) {
-#if defined(DART_PRECOMPILER)
-  if (kind() != Snapshot::kFullAOT) return;
-
-  // Create an artifical node to which the bytes should be attributed. We
-  // don't attribute them to entries.ptr(), as we don't want to attribute the
-  // bytes for printing out a length of 0 to Object::null() when the dispatch
-  // table is empty.
-  const intptr_t profile_ref = AssignArtificialRef();
-  const auto& dispatch_table_profile_id = GetProfileId(profile_ref);
-  if (profile_writer_ != nullptr) {
-    profile_writer_->SetObjectTypeAndName(dispatch_table_profile_id,
-                                          "DispatchTable", "dispatch_table");
-    profile_writer_->AddRoot(dispatch_table_profile_id);
-  }
-  WritingObjectScope scope(this, dispatch_table_profile_id);
-  if (profile_writer_ != nullptr) {
-    // We'll write the Array object as a property of the artificial dispatch
-    // table node, so Code objects otherwise unreferenced will have it as an
-    // ancestor.
-    CreateArtificialNodeIfNeeded(entries.ptr());
-    AttributePropertyRef(entries.ptr(), "<code entries>");
-  }
-
-  const intptr_t bytes_before = bytes_written();
-  const intptr_t table_length = entries.IsNull() ? 0 : entries.Length();
-
-  ASSERT(table_length <= compiler::target::kWordMax);
-  WriteUnsigned(table_length);
-  if (table_length == 0) {
-    dispatch_table_size_ = bytes_written() - bytes_before;
-    return;
-  }
-
-  ASSERT(code_cluster_ != nullptr);
-  // Reference IDs in a cluster are allocated sequentially, so we can use the
-  // first code object's reference ID to calculate the cluster index.
-  const intptr_t first_code_id = RefId(code_cluster_->objects()->At(0));
-  // The first object in the code cluster must have its reference ID allocated.
-  ASSERT(IsAllocatedReference(first_code_id));
-
-  // If instructions can be deduped, the code order table in the deserializer
-  // may not contain all Code objects in the snapshot. Thus, we write the ID
-  // for the first code object here so we can retrieve it during deserialization
-  // and calculate the snapshot ID for Code objects from the cluster index.
-  //
-  // We could just use the snapshot reference ID of the Code object itself
-  // instead of the cluster index and avoid this. However, since entries are
-  // SLEB128 encoded, the size delta for serializing the first ID once is less
-  // than the size delta of serializing the ID plus kIndexBase for each entry,
-  // even when Code objects are allocated before all other non-base objects.
-  //
-  // We could also map Code objects to the first Code object in the cluster with
-  // the same entry point and serialize that ID instead, but that loses
-  // information about which Code object was originally referenced.
-  ASSERT(first_code_id <= compiler::target::kWordMax);
-  WriteUnsigned(first_code_id);
-
-  CodePtr previous_code = nullptr;
-  CodePtr recent[kDispatchTableRecentCount] = {nullptr};
-  intptr_t recent_index = 0;
-  intptr_t repeat_count = 0;
-  for (intptr_t i = 0; i < table_length; i++) {
-    auto const code = Code::RawCast(entries.At(i));
-    // First, see if we're repeating the previous entry (invalid, recent, or
-    // encoded).
-    if (code == previous_code) {
-      if (++repeat_count == kDispatchTableMaxRepeat) {
-        Write(kDispatchTableMaxRepeat);
-        repeat_count = 0;
-      }
-      continue;
-    }
-    // Emit any outsanding repeat count before handling the new code value.
-    if (repeat_count > 0) {
-      Write(repeat_count);
-      repeat_count = 0;
-    }
-    previous_code = code;
-    // The invalid entry can be repeated, but is never part of the recent list
-    // since it already encodes to a single byte..
-    if (code == Code::null()) {
-      Write(0);
-      continue;
-    }
-    // Check against the recent entries, and write an encoded reference to
-    // the recent entry if found.
-    intptr_t found_index = 0;
-    for (; found_index < kDispatchTableRecentCount; found_index++) {
-      if (recent[found_index] == code) break;
-    }
-    if (found_index < kDispatchTableRecentCount) {
-      Write(~found_index);
-      continue;
-    }
-    // We have a non-repeated, non-recent entry, so encode the reference ID of
-    // the code object and emit that.
-    auto const object_id = RefId(code);
-    // Make sure that this code object has an allocated reference ID.
-    ASSERT(IsAllocatedReference(object_id));
-    // Use the index in the code cluster, not in the snapshot..
-    auto const encoded = kDispatchTableIndexBase + (object_id - first_code_id);
-    ASSERT(encoded <= compiler::target::kWordMax);
-    Write(encoded);
-    recent[recent_index] = code;
-    recent_index = (recent_index + 1) & kDispatchTableRecentMask;
-  }
-  if (repeat_count > 0) {
-    Write(repeat_count);
-  }
-  dispatch_table_size_ = bytes_written() - bytes_before;
-#endif  // defined(DART_PRECOMPILER)
-}
-
-void Serializer::PrintSnapshotSizes() {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  if (FLAG_print_snapshot_sizes_verbose) {
-    TextBuffer buffer(1024);
-    // Header, using format sizes matching those below to ensure alignment.
-    buffer.Printf("%25s", "Cluster");
-    buffer.Printf(" %6s", "Objs");
-    buffer.Printf(" %8s", "Size");
-    buffer.Printf(" %8s", "Fraction");
-    buffer.Printf(" %10s", "Cumulative");
-    buffer.Printf(" %8s", "HeapSize");
-    buffer.Printf(" %5s", "Cid");
-    buffer.Printf(" %9s", "Canonical");
-    buffer.AddString("\n");
-    GrowableArray<SerializationCluster*> clusters_by_size;
-    for (intptr_t cid = 1; cid < num_cids_; cid++) {
-      if (auto const cluster = canonical_clusters_by_cid_[cid]) {
-        clusters_by_size.Add(cluster);
-      }
-      if (auto const cluster = clusters_by_cid_[cid]) {
-        clusters_by_size.Add(cluster);
-      }
-    }
-    intptr_t text_size = 0;
-    if (image_writer_ != nullptr) {
-      auto const text_object_count = image_writer_->GetTextObjectCount();
-      text_size = image_writer_->text_size();
-      intptr_t trampoline_count, trampoline_size;
-      image_writer_->GetTrampolineInfo(&trampoline_count, &trampoline_size);
-      auto const instructions_count = text_object_count - trampoline_count;
-      auto const instructions_size = text_size - trampoline_size;
-      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
-          ImageWriter::TagObjectTypeAsReadOnly(zone_, "Instructions"),
-          instructions_count, instructions_size));
-      if (trampoline_size > 0) {
-        clusters_by_size.Add(new (zone_) FakeSerializationCluster(
-            ImageWriter::TagObjectTypeAsReadOnly(zone_, "Trampoline"),
-            trampoline_count, trampoline_size));
-      }
-    }
-    // The dispatch_table_size_ will be 0 if the snapshot did not include a
-    // dispatch table (i.e., the VM snapshot). For a precompiled isolate
-    // snapshot, we always serialize at least _one_ byte for the DispatchTable.
-    if (dispatch_table_size_ > 0) {
-      const auto& dispatch_table_entries = Array::Handle(
-          zone_,
-          isolate_group()->object_store()->dispatch_table_code_entries());
-      auto const entry_count =
-          dispatch_table_entries.IsNull() ? 0 : dispatch_table_entries.Length();
-      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
-          "DispatchTable", entry_count, dispatch_table_size_));
-    }
-    if (instructions_table_len_ > 0) {
-      const intptr_t memory_size =
-          compiler::target::InstructionsTable::InstanceSize(
-              instructions_table_len_) +
-          compiler::target::Array::InstanceSize(instructions_table_len_);
-      clusters_by_size.Add(new (zone_) FakeSerializationCluster(
-          "InstructionsTable", instructions_table_len_, 0, memory_size));
-    }
-    clusters_by_size.Sort(CompareClusters);
-    double total_size =
-        static_cast<double>(bytes_written() + GetDataSize() + text_size);
-    double cumulative_fraction = 0.0;
-    for (intptr_t i = 0; i < clusters_by_size.length(); i++) {
-      SerializationCluster* cluster = clusters_by_size[i];
-      double fraction = static_cast<double>(cluster->size()) / total_size;
-      cumulative_fraction += fraction;
-      buffer.Printf("%25s", cluster->name());
-      buffer.Printf(" %6" Pd "", cluster->num_objects());
-      buffer.Printf(" %8" Pd "", cluster->size());
-      buffer.Printf(" %1.6lf", fraction);
-      buffer.Printf(" %1.8lf", cumulative_fraction);
-      buffer.Printf(" %8" Pd "", cluster->target_memory_size());
-      if (cluster->cid() != -1) {
-        buffer.Printf(" %5" Pd "", cluster->cid());
-      } else {
-        buffer.Printf(" %5s", "");
-      }
-      if (cluster->is_canonical()) {
-        buffer.Printf(" %9s", "canonical");
-      } else {
-        buffer.Printf(" %9s", "");
-      }
-      buffer.AddString("\n");
-    }
-    OS::PrintErr("%s", buffer.buffer());
-  }
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-}
-
-Deserializer::Deserializer(Thread* thread,
-                           Snapshot::Kind kind,
-                           const uint8_t* buffer,
-                           intptr_t size,
-                           const uint8_t* data_buffer,
-                           const uint8_t* instructions_buffer,
-                           bool is_non_root_unit,
-                           intptr_t offset)
-    : ThreadStackResource(thread),
-      heap_(thread->isolate_group()->heap()),
-      zone_(thread->zone()),
-      kind_(kind),
-      stream_(buffer, size),
-      image_reader_(nullptr),
-      refs_(nullptr),
-      next_ref_index_(kFirstReference),
-      previous_text_offset_(0),
-      clusters_(nullptr),
-      initial_field_table_(thread->isolate_group()->initial_field_table()),
-      is_non_root_unit_(is_non_root_unit),
-      instructions_table_(InstructionsTable::Handle(thread->zone())) {
-  if (Snapshot::IncludesCode(kind)) {
-    ASSERT(instructions_buffer != nullptr);
-    ASSERT(data_buffer != nullptr);
-    image_reader_ = new (zone_) ImageReader(data_buffer, instructions_buffer);
-  }
-  stream_.SetPosition(offset);
-}
-
-Deserializer::~Deserializer() {
-  delete[] clusters_;
-}
-
-DeserializationCluster* Deserializer::ReadCluster() {
-  const uint64_t cid_and_canonical = Read<uint64_t>();
-  const intptr_t cid = (cid_and_canonical >> 1) & kMaxUint32;
-  const bool is_canonical = (cid_and_canonical & 0x1) == 0x1;
-  Zone* Z = zone_;
-  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
-    return new (Z) InstanceDeserializationCluster(cid, is_canonical);
-  }
-  if (IsTypedDataViewClassId(cid)) {
-    ASSERT(!is_canonical);
-    return new (Z) TypedDataViewDeserializationCluster(cid);
-  }
-  if (IsExternalTypedDataClassId(cid)) {
-    ASSERT(!is_canonical);
-    return new (Z) ExternalTypedDataDeserializationCluster(cid);
-  }
-  if (IsTypedDataClassId(cid)) {
-    ASSERT(!is_canonical);
-    return new (Z) TypedDataDeserializationCluster(cid);
-  }
-
-#if !defined(DART_COMPRESSED_POINTERS)
-  if (Snapshot::IncludesCode(kind_)) {
-    switch (cid) {
-      case kPcDescriptorsCid:
-      case kCodeSourceMapCid:
-      case kCompressedStackMapsCid:
-        return new (Z)
-            RODataDeserializationCluster(is_canonical, !is_non_root_unit_, cid);
-      case kOneByteStringCid:
-      case kTwoByteStringCid:
-      case kStringCid:
-        if (!is_non_root_unit_) {
-          return new (Z) RODataDeserializationCluster(is_canonical,
-                                                      !is_non_root_unit_, cid);
-        }
-        break;
-    }
-  }
-#endif
-
-  switch (cid) {
-    case kClassCid:
-      ASSERT(!is_canonical);
-      return new (Z) ClassDeserializationCluster();
-    case kTypeParametersCid:
-      return new (Z) TypeParametersDeserializationCluster();
-    case kTypeArgumentsCid:
-      return new (Z)
-          TypeArgumentsDeserializationCluster(is_canonical, !is_non_root_unit_);
-    case kPatchClassCid:
-      ASSERT(!is_canonical);
-      return new (Z) PatchClassDeserializationCluster();
-    case kFunctionCid:
-      ASSERT(!is_canonical);
-      return new (Z) FunctionDeserializationCluster();
-    case kClosureDataCid:
-      ASSERT(!is_canonical);
-      return new (Z) ClosureDataDeserializationCluster();
-    case kFfiTrampolineDataCid:
-      ASSERT(!is_canonical);
-      return new (Z) FfiTrampolineDataDeserializationCluster();
-    case kFieldCid:
-      ASSERT(!is_canonical);
-      return new (Z) FieldDeserializationCluster();
-    case kScriptCid:
-      ASSERT(!is_canonical);
-      return new (Z) ScriptDeserializationCluster();
-    case kLibraryCid:
-      ASSERT(!is_canonical);
-      return new (Z) LibraryDeserializationCluster();
-    case kNamespaceCid:
-      ASSERT(!is_canonical);
-      return new (Z) NamespaceDeserializationCluster();
-#if !defined(DART_PRECOMPILED_RUNTIME)
-    case kKernelProgramInfoCid:
-      ASSERT(!is_canonical);
-      return new (Z) KernelProgramInfoDeserializationCluster();
-#endif  // !DART_PRECOMPILED_RUNTIME
-    case kCodeCid:
-      ASSERT(!is_canonical);
-      return new (Z) CodeDeserializationCluster();
-    case kObjectPoolCid:
-      ASSERT(!is_canonical);
-      return new (Z) ObjectPoolDeserializationCluster();
-    case kPcDescriptorsCid:
-      ASSERT(!is_canonical);
-      return new (Z) PcDescriptorsDeserializationCluster();
-    case kCodeSourceMapCid:
-      ASSERT(!is_canonical);
-      return new (Z) CodeSourceMapDeserializationCluster();
-    case kCompressedStackMapsCid:
-      ASSERT(!is_canonical);
-      return new (Z) CompressedStackMapsDeserializationCluster();
-    case kExceptionHandlersCid:
-      ASSERT(!is_canonical);
-      return new (Z) ExceptionHandlersDeserializationCluster();
-    case kContextCid:
-      ASSERT(!is_canonical);
-      return new (Z) ContextDeserializationCluster();
-    case kContextScopeCid:
-      ASSERT(!is_canonical);
-      return new (Z) ContextScopeDeserializationCluster();
-    case kUnlinkedCallCid:
-      ASSERT(!is_canonical);
-      return new (Z) UnlinkedCallDeserializationCluster();
-    case kICDataCid:
-      ASSERT(!is_canonical);
-      return new (Z) ICDataDeserializationCluster();
-    case kMegamorphicCacheCid:
-      ASSERT(!is_canonical);
-      return new (Z) MegamorphicCacheDeserializationCluster();
-    case kSubtypeTestCacheCid:
-      ASSERT(!is_canonical);
-      return new (Z) SubtypeTestCacheDeserializationCluster();
-    case kLoadingUnitCid:
-      ASSERT(!is_canonical);
-      return new (Z) LoadingUnitDeserializationCluster();
-    case kLanguageErrorCid:
-      ASSERT(!is_canonical);
-      return new (Z) LanguageErrorDeserializationCluster();
-    case kUnhandledExceptionCid:
-      ASSERT(!is_canonical);
-      return new (Z) UnhandledExceptionDeserializationCluster();
-    case kLibraryPrefixCid:
-      ASSERT(!is_canonical);
-      return new (Z) LibraryPrefixDeserializationCluster();
-    case kTypeCid:
-      return new (Z)
-          TypeDeserializationCluster(is_canonical, !is_non_root_unit_);
-    case kFunctionTypeCid:
-      return new (Z)
-          FunctionTypeDeserializationCluster(is_canonical, !is_non_root_unit_);
-    case kTypeRefCid:
-      ASSERT(!is_canonical);
-      return new (Z) TypeRefDeserializationCluster();
-    case kTypeParameterCid:
-      return new (Z)
-          TypeParameterDeserializationCluster(is_canonical, !is_non_root_unit_);
-    case kClosureCid:
-      return new (Z) ClosureDeserializationCluster(is_canonical);
-    case kMintCid:
-      return new (Z) MintDeserializationCluster(is_canonical);
-    case kDoubleCid:
-      return new (Z) DoubleDeserializationCluster(is_canonical);
-    case kGrowableObjectArrayCid:
-      ASSERT(!is_canonical);
-      return new (Z) GrowableObjectArrayDeserializationCluster();
-    case kStackTraceCid:
-      ASSERT(!is_canonical);
-      return new (Z) StackTraceDeserializationCluster();
-    case kRegExpCid:
-      ASSERT(!is_canonical);
-      return new (Z) RegExpDeserializationCluster();
-    case kWeakPropertyCid:
-      ASSERT(!is_canonical);
-      return new (Z) WeakPropertyDeserializationCluster();
-    case kLinkedHashMapCid:
-      // We do not have mutable hash maps in snapshots.
-      UNREACHABLE();
-    case kLinkedHashSetCid:
-      // We do not have mutable hash sets in snapshots.
-      UNREACHABLE();
-    case kArrayCid:
-      return new (Z) ArrayDeserializationCluster(is_canonical, kArrayCid);
-    case kImmutableArrayCid:
-      return new (Z)
-          ArrayDeserializationCluster(is_canonical, kImmutableArrayCid);
-    case kStringCid:
-      return new (Z) StringDeserializationCluster(
-          is_canonical,
-          !is_non_root_unit_ && isolate_group() != Dart::vm_isolate_group());
-    default:
-      break;
-  }
-  FATAL1("No cluster defined for cid %" Pd, cid);
-  return NULL;
-}
-
-void Deserializer::ReadDispatchTable(ReadStream* stream,
-                                     bool deferred,
-                                     intptr_t deferred_code_start_index,
-                                     intptr_t deferred_code_end_index) {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  const uint8_t* table_snapshot_start = stream->AddressOfCurrentPosition();
-  const intptr_t length = stream->ReadUnsigned();
-  if (length == 0) return;
-
-  // Not all Code objects may be in the code_order_table when instructions can
-  // be deduplicated. Thus, we serialize the reference ID of the first code
-  // object, from which we can get the reference ID for any code object.
-  const intptr_t first_code_id = stream->ReadUnsigned();
-
-  auto const IG = isolate_group();
-  auto code = IG->object_store()->dispatch_table_null_error_stub();
-  ASSERT(code != Code::null());
-  uword null_entry = Code::EntryPointOf(code);
-  uword not_loaded_entry = StubCode::NotLoaded().EntryPoint();
-
-  DispatchTable* table;
-  if (deferred) {
-    table = IG->dispatch_table();
-    ASSERT(table != nullptr && table->length() == length);
-  } else {
-    ASSERT(IG->dispatch_table() == nullptr);
-    table = new DispatchTable(length);
-  }
-  auto const array = table->array();
-  uword value = 0;
-  uword recent[kDispatchTableRecentCount] = {0};
-  intptr_t recent_index = 0;
-  intptr_t repeat_count = 0;
-  for (intptr_t i = 0; i < length; i++) {
-    if (repeat_count > 0) {
-      array[i] = value;
-      repeat_count--;
-      continue;
-    }
-    auto const encoded = stream->Read<intptr_t>();
-    if (encoded == 0) {
-      value = null_entry;
-    } else if (encoded < 0) {
-      intptr_t r = ~encoded;
-      ASSERT(r < kDispatchTableRecentCount);
-      value = recent[r];
-    } else if (encoded <= kDispatchTableMaxRepeat) {
-      repeat_count = encoded - 1;
-    } else {
-      intptr_t cluster_index = encoded - kDispatchTableIndexBase;
-      if (deferred) {
-        intptr_t id = first_code_id + cluster_index;
-        if ((deferred_code_start_index <= id) &&
-            (id < deferred_code_end_index)) {
-          // Deferred instructions are at the end of the instructions table.
-          value = instructions_table().EntryPointAt(
-              instructions_table().length() - deferred_code_end_index + id);
-        } else {
-          // Reuse old value from the dispatch table.
-          value = array[i];
-        }
-      } else {
-        if (cluster_index < instructions_table().length()) {
-          value = instructions_table().EntryPointAt(cluster_index);
-        } else {
-          value = not_loaded_entry;
-        }
-      }
-      recent[recent_index] = value;
-      recent_index = (recent_index + 1) & kDispatchTableRecentMask;
-    }
-    array[i] = value;
-  }
-  ASSERT(repeat_count == 0);
-
-  if (!deferred) {
-    IG->set_dispatch_table(table);
-    intptr_t table_snapshot_size =
-        stream->AddressOfCurrentPosition() - table_snapshot_start;
-    IG->set_dispatch_table_snapshot(table_snapshot_start);
-    IG->set_dispatch_table_snapshot_size(table_snapshot_size);
-  }
-#endif
-}
-
-ApiErrorPtr Deserializer::VerifyImageAlignment() {
-  if (image_reader_ != nullptr) {
-    return image_reader_->VerifyAlignment();
-  }
-  return ApiError::null();
-}
-
-char* SnapshotHeaderReader::VerifyVersionAndFeatures(
-    IsolateGroup* isolate_group,
-    intptr_t* offset) {
-  char* error = VerifyVersion();
-  if (error == nullptr) {
-    error = VerifyFeatures(isolate_group);
-  }
-  if (error == nullptr) {
-    *offset = stream_.Position();
-  }
-  return error;
-}
-
-char* SnapshotHeaderReader::VerifyVersion() {
-  // If the version string doesn't match, return an error.
-  // Note: New things are allocated only if we're going to return an error.
-
-  const char* expected_version = Version::SnapshotString();
-  ASSERT(expected_version != NULL);
-  const intptr_t version_len = strlen(expected_version);
-  if (stream_.PendingBytes() < version_len) {
-    const intptr_t kMessageBufferSize = 128;
-    char message_buffer[kMessageBufferSize];
-    Utils::SNPrint(message_buffer, kMessageBufferSize,
-                   "No full snapshot version found, expected '%s'",
-                   expected_version);
-    return BuildError(message_buffer);
-  }
-
-  const char* version =
-      reinterpret_cast<const char*>(stream_.AddressOfCurrentPosition());
-  ASSERT(version != NULL);
-  if (strncmp(version, expected_version, version_len) != 0) {
-    const intptr_t kMessageBufferSize = 256;
-    char message_buffer[kMessageBufferSize];
-    char* actual_version = Utils::StrNDup(version, version_len);
-    Utils::SNPrint(message_buffer, kMessageBufferSize,
-                   "Wrong %s snapshot version, expected '%s' found '%s'",
-                   (Snapshot::IsFull(kind_)) ? "full" : "script",
-                   expected_version, actual_version);
-    free(actual_version);
-    return BuildError(message_buffer);
-  }
-  stream_.Advance(version_len);
-
-  return nullptr;
-}
-
-char* SnapshotHeaderReader::VerifyFeatures(IsolateGroup* isolate_group) {
-  const char* expected_features =
-      Dart::FeaturesString(isolate_group, (isolate_group == NULL), kind_);
-  ASSERT(expected_features != NULL);
-  const intptr_t expected_len = strlen(expected_features);
-
-  const char* features = nullptr;
-  intptr_t features_length = 0;
-
-  auto error = ReadFeatures(&features, &features_length);
-  if (error != nullptr) {
-    return error;
-  }
-
-  if (features_length != expected_len ||
-      (strncmp(features, expected_features, expected_len) != 0)) {
-    const intptr_t kMessageBufferSize = 1024;
-    char message_buffer[kMessageBufferSize];
-    char* actual_features = Utils::StrNDup(
-        features, features_length < 1024 ? features_length : 1024);
-    Utils::SNPrint(message_buffer, kMessageBufferSize,
-                   "Snapshot not compatible with the current VM configuration: "
-                   "the snapshot requires '%s' but the VM has '%s'",
-                   actual_features, expected_features);
-    free(const_cast<char*>(expected_features));
-    free(actual_features);
-    return BuildError(message_buffer);
-  }
-  free(const_cast<char*>(expected_features));
-  return nullptr;
-}
-
-char* SnapshotHeaderReader::ReadFeatures(const char** features,
-                                         intptr_t* features_length) {
-  const char* cursor =
-      reinterpret_cast<const char*>(stream_.AddressOfCurrentPosition());
-  const intptr_t length = Utils::StrNLen(cursor, stream_.PendingBytes());
-  if (length == stream_.PendingBytes()) {
-    return BuildError(
-        "The features string in the snapshot was not '\\0'-terminated.");
-  }
-  *features = cursor;
-  *features_length = length;
-  stream_.Advance(length + 1);
-  return nullptr;
-}
-
-char* SnapshotHeaderReader::BuildError(const char* message) {
-  return Utils::StrDup(message);
-}
-
-ApiErrorPtr FullSnapshotReader::ConvertToApiError(char* message) {
-  // This can also fail while bringing up the VM isolate, so make sure to
-  // allocate the error message in old space.
-  const String& msg = String::Handle(String::New(message, Heap::kOld));
-
-  // The [message] was constructed with [BuildError] and needs to be freed.
-  free(message);
-
-  return ApiError::New(msg, Heap::kOld);
-}
-
-void Deserializer::ReadInstructions(CodePtr code,
-                                    bool deferred,
-                                    bool discarded) {
-  if (deferred) {
-    ASSERT(!discarded);
-#if defined(DART_PRECOMPILED_RUNTIME)
-    if (FLAG_use_bare_instructions) {
-      uword entry_point = StubCode::NotLoaded().EntryPoint();
-      code->untag()->entry_point_ = entry_point;
-      code->untag()->unchecked_entry_point_ = entry_point;
-      code->untag()->monomorphic_entry_point_ = entry_point;
-      code->untag()->monomorphic_unchecked_entry_point_ = entry_point;
-      code->untag()->instructions_length_ = 0;
-      return;
-    }
-#endif
-    InstructionsPtr instr = StubCode::NotLoaded().instructions();
-    uint32_t unchecked_offset = 0;
-    code->untag()->instructions_ = instr;
-#if defined(DART_PRECOMPILED_RUNTIME)
-    code->untag()->instructions_length_ = Instructions::Size(instr);
-#else
-    code->untag()->unchecked_offset_ = unchecked_offset;
-#endif
-    Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
-    return;
-  }
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  if (FLAG_use_bare_instructions) {
-    previous_text_offset_ += ReadUnsigned();
-    const uword payload_start =
-        image_reader_->GetBareInstructionsAt(previous_text_offset_);
-    const uint32_t payload_info = ReadUnsigned();
-    const uint32_t unchecked_offset = payload_info >> 1;
-    const bool has_monomorphic_entrypoint = (payload_info & 0x1) == 0x1;
-
-    const uword entry_offset = has_monomorphic_entrypoint
-                                   ? Instructions::kPolymorphicEntryOffsetAOT
-                                   : 0;
-    const uword monomorphic_entry_offset =
-        has_monomorphic_entrypoint ? Instructions::kMonomorphicEntryOffsetAOT
-                                   : 0;
-
-    const uword entry_point = payload_start + entry_offset;
-    const uword monomorphic_entry_point =
-        payload_start + monomorphic_entry_offset;
-
-    ObjectPtr code_descriptor = code;
-    if (discarded) {
-      code_descriptor = static_cast<CompressedStackMapsPtr>(ReadRef());
-    }
-
-    instructions_table_.SetEntryAt(instructions_index_++, payload_start,
-                                   has_monomorphic_entrypoint, code_descriptor);
-
-    if (!discarded) {
-      // There are no serialized RawInstructions objects in this mode.
-      code->untag()->instructions_ = Instructions::null();
-      code->untag()->entry_point_ = entry_point;
-      code->untag()->unchecked_entry_point_ = entry_point + unchecked_offset;
-      code->untag()->monomorphic_entry_point_ = monomorphic_entry_point;
-      code->untag()->monomorphic_unchecked_entry_point_ =
-          monomorphic_entry_point + unchecked_offset;
-    }
-    return;
-  }
-#endif
-
-  InstructionsPtr instr = image_reader_->GetInstructionsAt(Read<uint32_t>());
-  uint32_t unchecked_offset = ReadUnsigned();
-  code->untag()->instructions_ = instr;
-#if defined(DART_PRECOMPILED_RUNTIME)
-  code->untag()->instructions_length_ = Instructions::Size(instr);
-#else
-  code->untag()->unchecked_offset_ = unchecked_offset;
-  if (kind() == Snapshot::kFullJIT) {
-    const uint32_t active_offset = Read<uint32_t>();
-    instr = image_reader_->GetInstructionsAt(active_offset);
-    unchecked_offset = ReadUnsigned();
-  }
-  code->untag()->active_instructions_ = instr;
-#endif
-  Code::InitializeCachedEntryPointsFrom(code, instr, unchecked_offset);
-}
-
-void Deserializer::EndInstructions() {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  if (FLAG_use_bare_instructions) {
-    uword previous_end = image_reader_->GetBareInstructionsEnd();
-    for (intptr_t i = instructions_index_ - 1; i >= 0; --i) {
-      ObjectPtr descriptor = instructions_table_.DescriptorAt(i);
-      uword start = instructions_table_.PayloadStartAt(i);
-      ASSERT(start <= previous_end);
-      if (descriptor->IsCode()) {
-        CodePtr code = static_cast<CodePtr>(descriptor);
-        code->untag()->instructions_length_ = previous_end - start;
-      }
-      previous_end = start;
-    }
-
-    ObjectStore* object_store = IsolateGroup::Current()->object_store();
-    GrowableObjectArray& tables =
-        GrowableObjectArray::Handle(zone_, object_store->instructions_tables());
-    if (tables.IsNull()) {
-      tables = GrowableObjectArray::New(Heap::kOld);
-      object_store->set_instructions_tables(tables);
-    }
-    if ((tables.Length() == 0) ||
-        (tables.At(tables.Length() - 1) != instructions_table_.ptr())) {
-      tables.Add(instructions_table_, Heap::kOld);
-    }
-  }
-#endif
-}
-
-ObjectPtr Deserializer::GetObjectAt(uint32_t offset) const {
-  return image_reader_->GetObjectAt(offset);
-}
-
-class HeapLocker : public StackResource {
- public:
-  HeapLocker(Thread* thread, PageSpace* page_space)
-      : StackResource(thread),
-        page_space_(page_space),
-        freelist_(page_space->DataFreeList()) {
-    page_space_->AcquireLock(freelist_);
-  }
-  ~HeapLocker() { page_space_->ReleaseLock(freelist_); }
-
- private:
-  PageSpace* page_space_;
-  FreeList* freelist_;
-};
-
-void Deserializer::Deserialize(DeserializationRoots* roots) {
-  Array& refs = Array::Handle(zone_);
-  num_base_objects_ = ReadUnsigned();
-  num_objects_ = ReadUnsigned();
-  num_clusters_ = ReadUnsigned();
-  const intptr_t initial_field_table_len = ReadUnsigned();
-  const intptr_t instructions_table_len = ReadUnsigned();
-
-  clusters_ = new DeserializationCluster*[num_clusters_];
-  refs = Array::New(num_objects_ + kFirstReference, Heap::kOld);
-  if (initial_field_table_len > 0) {
-    initial_field_table_->AllocateIndex(initial_field_table_len - 1);
-    ASSERT_EQUAL(initial_field_table_->NumFieldIds(), initial_field_table_len);
-  }
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  if (instructions_table_len > 0) {
-    ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
-    const uword start_pc = image_reader_->GetBareInstructionsAt(0);
-    const uword end_pc = image_reader_->GetBareInstructionsEnd();
-    instructions_table_ =
-        InstructionsTable::New(instructions_table_len, start_pc, end_pc);
-  }
-#else
-  ASSERT(instructions_table_len == 0);
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-  bool primary;
-  {
-    // The deserializer initializes objects without using the write barrier,
-    // partly for speed since we know all the deserialized objects will be
-    // long-lived and partly because the target objects can be not yet
-    // initialized at the time of the write. To make this safe, we must ensure
-    // there are no other threads mutating this heap, and that incremental
-    // marking is not in progress. This is normally the case anyway for the
-    // main snapshot being deserialized at isolate load, but needs checks for
-    // loading secondary snapshots are part of deferred loading.
-    HeapIterationScope iter(thread());
-    // For bump-pointer allocation in old-space.
-    HeapLocker hl(thread(), heap_->old_space());
-    // Must not perform any other type of allocation, which might trigger GC
-    // while there are still uninitialized objects.
-    NoSafepointScope no_safepoint;
-    refs_ = refs.ptr();
-
-    primary = roots->AddBaseObjects(this);
-
-    if (num_base_objects_ != (next_ref_index_ - kFirstReference)) {
-      FATAL2("Snapshot expects %" Pd
-             " base objects, but deserializer provided %" Pd,
-             num_base_objects_, next_ref_index_ - kFirstReference);
-    }
-
-    {
-      TIMELINE_DURATION(thread(), Isolate, "ReadAlloc");
-      for (intptr_t i = 0; i < num_clusters_; i++) {
-        clusters_[i] = ReadCluster();
-        TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
-        clusters_[i]->ReadAlloc(this);
-#if defined(DEBUG)
-        intptr_t serializers_next_ref_index_ = Read<int32_t>();
-        ASSERT_EQUAL(serializers_next_ref_index_, next_ref_index_);
-#endif
-      }
-    }
-
-    // We should have completely filled the ref array.
-    ASSERT_EQUAL(next_ref_index_ - kFirstReference, num_objects_);
-
-    {
-      TIMELINE_DURATION(thread(), Isolate, "ReadFill");
-      SafepointWriteRwLocker ml(thread(), isolate_group()->program_lock());
-      for (intptr_t i = 0; i < num_clusters_; i++) {
-        TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
-        clusters_[i]->ReadFill(this, primary);
-#if defined(DEBUG)
-        int32_t section_marker = Read<int32_t>();
-        ASSERT(section_marker == kSectionMarker);
-#endif
-      }
-    }
-
-    roots->ReadRoots(this);
-
-#if defined(DEBUG)
-    int32_t section_marker = Read<int32_t>();
-    ASSERT(section_marker == kSectionMarker);
-#endif
-
-    refs_ = NULL;
-  }
-
-  roots->PostLoad(this, refs);
-
-#if defined(DEBUG)
-  auto isolate_group = thread()->isolate_group();
-  isolate_group->ValidateClassTable();
-  if (isolate_group != Dart::vm_isolate()->group()) {
-    isolate_group->heap()->Verify();
-  }
-#endif
-
-  {
-    TIMELINE_DURATION(thread(), Isolate, "PostLoad");
-    for (intptr_t i = 0; i < num_clusters_; i++) {
-      TIMELINE_DURATION(thread(), Isolate, clusters_[i]->name());
-      clusters_[i]->PostLoad(this, refs, primary);
-    }
-  }
-}
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
-FullSnapshotWriter::FullSnapshotWriter(
-    Snapshot::Kind kind,
-    NonStreamingWriteStream* vm_snapshot_data,
-    NonStreamingWriteStream* isolate_snapshot_data,
-    ImageWriter* vm_image_writer,
-    ImageWriter* isolate_image_writer)
-    : thread_(Thread::Current()),
-      kind_(kind),
-      vm_snapshot_data_(vm_snapshot_data),
-      isolate_snapshot_data_(isolate_snapshot_data),
-      vm_isolate_snapshot_size_(0),
-      isolate_snapshot_size_(0),
-      vm_image_writer_(vm_image_writer),
-      isolate_image_writer_(isolate_image_writer) {
-  ASSERT(isolate_group() != NULL);
-  ASSERT(heap() != NULL);
-  ObjectStore* object_store = isolate_group()->object_store();
-  ASSERT(object_store != NULL);
-
-#if defined(DEBUG)
-  isolate_group()->ValidateClassTable();
-  isolate_group()->ValidateConstants();
-#endif  // DEBUG
-
-#if defined(DART_PRECOMPILER)
-  if (FLAG_write_v8_snapshot_profile_to != nullptr) {
-    profile_writer_ = new (zone()) V8SnapshotProfileWriter(zone());
-  }
-#endif
-}
-
-FullSnapshotWriter::~FullSnapshotWriter() {}
-
-ZoneGrowableArray<Object*>* FullSnapshotWriter::WriteVMSnapshot() {
-  TIMELINE_DURATION(thread(), Isolate, "WriteVMSnapshot");
-
-  ASSERT(vm_snapshot_data_ != nullptr);
-  Serializer serializer(thread(), kind_, vm_snapshot_data_, vm_image_writer_,
-                        /*vm=*/true, profile_writer_);
-
-  serializer.ReserveHeader();
-  serializer.WriteVersionAndFeatures(true);
-  VMSerializationRoots roots(
-      Array::Handle(Dart::vm_isolate_group()->object_store()->symbol_table()),
-      /*should_write_symbols=*/!Snapshot::IncludesStringsInROData(kind_));
-  ZoneGrowableArray<Object*>* objects = serializer.Serialize(&roots);
-  serializer.FillHeader(serializer.kind());
-  clustered_vm_size_ = serializer.bytes_written();
-  heap_vm_size_ = serializer.bytes_heap_allocated();
-
-  if (Snapshot::IncludesCode(kind_)) {
-    vm_image_writer_->SetProfileWriter(profile_writer_);
-    vm_image_writer_->Write(serializer.stream(), true);
-    mapped_data_size_ += vm_image_writer_->data_size();
-    mapped_text_size_ += vm_image_writer_->text_size();
-    vm_image_writer_->ResetOffsets();
-    vm_image_writer_->ClearProfileWriter();
-  }
-
-  // The clustered part + the direct mapped data part.
-  vm_isolate_snapshot_size_ = serializer.bytes_written();
-  return objects;
-}
-
-void FullSnapshotWriter::WriteProgramSnapshot(
-    ZoneGrowableArray<Object*>* objects,
-    GrowableArray<LoadingUnitSerializationData*>* units) {
-  TIMELINE_DURATION(thread(), Isolate, "WriteProgramSnapshot");
-
-  ASSERT(isolate_snapshot_data_ != nullptr);
-  Serializer serializer(thread(), kind_, isolate_snapshot_data_,
-                        isolate_image_writer_, /*vm=*/false, profile_writer_);
-  serializer.set_loading_units(units);
-  serializer.set_current_loading_unit_id(LoadingUnit::kRootId);
-  ObjectStore* object_store = isolate_group()->object_store();
-  ASSERT(object_store != NULL);
-
-  // These type arguments must always be retained.
-  ASSERT(object_store->type_argument_int()->untag()->IsCanonical());
-  ASSERT(object_store->type_argument_double()->untag()->IsCanonical());
-  ASSERT(object_store->type_argument_string()->untag()->IsCanonical());
-  ASSERT(object_store->type_argument_string_dynamic()->untag()->IsCanonical());
-  ASSERT(object_store->type_argument_string_string()->untag()->IsCanonical());
-
-  serializer.ReserveHeader();
-  serializer.WriteVersionAndFeatures(false);
-  ProgramSerializationRoots roots(objects, object_store, kind_);
-  objects = serializer.Serialize(&roots);
-  if (units != nullptr) {
-    (*units)[LoadingUnit::kRootId]->set_objects(objects);
-  }
-  serializer.FillHeader(serializer.kind());
-  clustered_isolate_size_ = serializer.bytes_written();
-  heap_isolate_size_ = serializer.bytes_heap_allocated();
-
-  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::WriteUnitSnapshot(
-    GrowableArray<LoadingUnitSerializationData*>* units,
-    LoadingUnitSerializationData* unit,
-    uint32_t program_hash) {
-  TIMELINE_DURATION(thread(), Isolate, "WriteUnitSnapshot");
-
-  Serializer serializer(thread(), kind_, isolate_snapshot_data_,
-                        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.Write(program_hash);
-
-  UnitSerializationRoots roots(unit);
-  unit->set_objects(serializer.Serialize(&roots));
-
-  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) {
-  ZoneGrowableArray<Object*>* objects;
-  if (vm_snapshot_data_ != nullptr) {
-    objects = WriteVMSnapshot();
-  } else {
-    objects = nullptr;
-  }
-
-  if (isolate_snapshot_data_ != nullptr) {
-    WriteProgramSnapshot(objects, data);
-  }
-
-  if (FLAG_print_snapshot_sizes) {
-    OS::Print("VMIsolate(CodeSize): %" Pd "\n", clustered_vm_size_);
-    OS::Print("Isolate(CodeSize): %" Pd "\n", clustered_isolate_size_);
-    OS::Print("ReadOnlyData(CodeSize): %" Pd "\n", mapped_data_size_);
-    OS::Print("Instructions(CodeSize): %" Pd "\n", mapped_text_size_);
-    OS::Print("Total(CodeSize): %" Pd "\n",
-              clustered_vm_size_ + clustered_isolate_size_ + mapped_data_size_ +
-                  mapped_text_size_);
-    OS::Print("VMIsolate(HeapSize): %" Pd "\n", heap_vm_size_);
-    OS::Print("Isolate(HeapSize): %" Pd "\n", heap_isolate_size_);
-    OS::Print("Total(HeapSize): %" Pd "\n", heap_vm_size_ + heap_isolate_size_);
-  }
-
-#if defined(DART_PRECOMPILER)
-  if (FLAG_write_v8_snapshot_profile_to != nullptr) {
-    profile_writer_->Write(FLAG_write_v8_snapshot_profile_to);
-  }
-#endif
-}
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-FullSnapshotReader::FullSnapshotReader(const Snapshot* snapshot,
-                                       const uint8_t* instructions_buffer,
-                                       Thread* thread)
-    : kind_(snapshot->kind()),
-      thread_(thread),
-      buffer_(snapshot->Addr()),
-      size_(snapshot->length()),
-      data_image_(snapshot->DataImage()),
-      instructions_image_(instructions_buffer) {}
-
-char* SnapshotHeaderReader::InitializeGlobalVMFlagsFromSnapshot(
-    const Snapshot* snapshot) {
-  SnapshotHeaderReader header_reader(snapshot);
-
-  char* error = header_reader.VerifyVersion();
-  if (error != nullptr) {
-    return error;
-  }
-
-  const char* features = nullptr;
-  intptr_t features_length = 0;
-  error = header_reader.ReadFeatures(&features, &features_length);
-  if (error != nullptr) {
-    return error;
-  }
-
-  ASSERT(features[features_length] == '\0');
-  const char* cursor = features;
-  while (*cursor != '\0') {
-    while (*cursor == ' ') {
-      cursor++;
-    }
-
-    const char* end = strstr(cursor, " ");
-    if (end == nullptr) {
-      end = features + features_length;
-    }
-
-#define SET_FLAG(name)                                                         \
-  if (strncmp(cursor, #name, end - cursor) == 0) {                             \
-    FLAG_##name = true;                                                        \
-    cursor = end;                                                              \
-    continue;                                                                  \
-  }                                                                            \
-  if (strncmp(cursor, "no-" #name, end - cursor) == 0) {                       \
-    FLAG_##name = false;                                                       \
-    cursor = end;                                                              \
-    continue;                                                                  \
-  }
-
-#define CHECK_FLAG(name, mode)                                                 \
-  if (strncmp(cursor, #name, end - cursor) == 0) {                             \
-    if (!FLAG_##name) {                                                        \
-      return header_reader.BuildError("Flag " #name                            \
-                                      " is true in snapshot, "                 \
-                                      "but " #name                             \
-                                      " is always false in " mode);            \
-    }                                                                          \
-    cursor = end;                                                              \
-    continue;                                                                  \
-  }                                                                            \
-  if (strncmp(cursor, "no-" #name, end - cursor) == 0) {                       \
-    if (FLAG_##name) {                                                         \
-      return header_reader.BuildError("Flag " #name                            \
-                                      " is false in snapshot, "                \
-                                      "but " #name                             \
-                                      " is always true in " mode);             \
-    }                                                                          \
-    cursor = end;                                                              \
-    continue;                                                                  \
-  }
-
-#define SET_P(name, T, DV, C) SET_FLAG(name)
-
-#if defined(PRODUCT)
-#define SET_OR_CHECK_R(name, PV, T, DV, C) CHECK_FLAG(name, "product mode")
-#else
-#define SET_OR_CHECK_R(name, PV, T, DV, C) SET_FLAG(name)
-#endif
-
-#if defined(PRODUCT)
-#define SET_OR_CHECK_C(name, PCV, PV, T, DV, C) CHECK_FLAG(name, "product mode")
-#elif defined(DART_PRECOMPILED_RUNTIME)
-#define SET_OR_CHECK_C(name, PCV, PV, T, DV, C)                                \
-  CHECK_FLAG(name, "the precompiled runtime")
-#else
-#define SET_OR_CHECK_C(name, PV, T, DV, C) SET_FLAG(name)
-#endif
-
-#if !defined(DEBUG)
-#define SET_OR_CHECK_D(name, T, DV, C) CHECK_FLAG(name, "non-debug mode")
-#else
-#define SET_OR_CHECK_D(name, T, DV, C) SET_FLAG(name)
-#endif
-
-    VM_GLOBAL_FLAG_LIST(SET_P, SET_OR_CHECK_R, SET_OR_CHECK_C, SET_OR_CHECK_D)
-
-#undef SET_OR_CHECK_D
-#undef SET_OR_CHECK_C
-#undef SET_OR_CHECK_R
-#undef SET_P
-#undef CHECK_FLAG
-#undef SET_FLAG
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-    if (FLAG_sound_null_safety == kNullSafetyOptionUnspecified) {
-      if (strncmp(cursor, "null-safety", end - cursor) == 0) {
-        FLAG_sound_null_safety = kNullSafetyOptionStrong;
-        cursor = end;
-        continue;
-      }
-      if (strncmp(cursor, "no-null-safety", end - cursor) == 0) {
-        FLAG_sound_null_safety = kNullSafetyOptionWeak;
-        cursor = end;
-        continue;
-      }
-    }
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-    cursor = end;
-  }
-
-  return nullptr;
-}
-
-bool SnapshotHeaderReader::NullSafetyFromSnapshot(const Snapshot* snapshot) {
-  bool null_safety = false;
-  SnapshotHeaderReader header_reader(snapshot);
-  const char* features = nullptr;
-  intptr_t features_length = 0;
-
-  char* error = header_reader.ReadFeatures(&features, &features_length);
-  if (error != nullptr) {
-    return false;
-  }
-
-  ASSERT(features[features_length] == '\0');
-  const char* cursor = features;
-  while (*cursor != '\0') {
-    while (*cursor == ' ') {
-      cursor++;
-    }
-
-    const char* end = strstr(cursor, " ");
-    if (end == nullptr) {
-      end = features + features_length;
-    }
-
-    if (strncmp(cursor, "null-safety", end - cursor) == 0) {
-      cursor = end;
-      null_safety = true;
-      continue;
-    }
-    if (strncmp(cursor, "no-null-safety", end - cursor) == 0) {
-      cursor = end;
-      null_safety = false;
-      continue;
-    }
-
-    cursor = end;
-  }
-
-  return null_safety;
-}
-
-ApiErrorPtr FullSnapshotReader::ReadVMSnapshot() {
-  SnapshotHeaderReader header_reader(kind_, buffer_, size_);
-
-  intptr_t offset = 0;
-  char* error = header_reader.VerifyVersionAndFeatures(
-      /*isolate_group=*/nullptr, &offset);
-  if (error != nullptr) {
-    return ConvertToApiError(error);
-  }
-
-  Deserializer deserializer(thread_, kind_, buffer_, size_, data_image_,
-                            instructions_image_, /*is_non_root_unit=*/false,
-                            offset);
-  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
-  if (api_error != ApiError::null()) {
-    return api_error;
-  }
-
-  if (Snapshot::IncludesCode(kind_)) {
-    ASSERT(data_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(data_image_,
-                                             /* is_executable */ false);
-    ASSERT(instructions_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(instructions_image_,
-                                             /* is_executable */ true);
-  }
-
-  VMDeserializationRoots roots;
-  deserializer.Deserialize(&roots);
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-  // Initialize entries in the VM portion of the BSS segment.
-  ASSERT(Snapshot::IncludesCode(kind_));
-  Image image(instructions_image_);
-  if (auto const bss = image.bss()) {
-    BSS::Initialize(thread_, bss, /*vm=*/true);
-  }
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-  return ApiError::null();
-}
-
-ApiErrorPtr FullSnapshotReader::ReadProgramSnapshot() {
-  SnapshotHeaderReader header_reader(kind_, buffer_, size_);
-  intptr_t offset = 0;
-  char* error =
-      header_reader.VerifyVersionAndFeatures(thread_->isolate_group(), &offset);
-  if (error != nullptr) {
-    return ConvertToApiError(error);
-  }
-
-  Deserializer deserializer(thread_, kind_, buffer_, size_, data_image_,
-                            instructions_image_, /*is_non_root_unit=*/false,
-                            offset);
-  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
-  if (api_error != ApiError::null()) {
-    return api_error;
-  }
-
-  if (Snapshot::IncludesCode(kind_)) {
-    ASSERT(data_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(data_image_,
-                                             /* is_executable */ false);
-    ASSERT(instructions_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(instructions_image_,
-                                             /* is_executable */ true);
-  }
-
-  ProgramDeserializationRoots roots(thread_->isolate_group()->object_store());
-  deserializer.Deserialize(&roots);
-
-  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_group(), &offset);
-  if (error != nullptr) {
-    return ConvertToApiError(error);
-  }
-
-  Deserializer deserializer(
-      thread_, kind_, buffer_, size_, data_image_, instructions_image_,
-      /*is_non_root_unit=*/unit.id() != LoadingUnit::kRootId, offset);
-  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
-  if (api_error != ApiError::null()) {
-    return api_error;
-  }
-  {
-    Array& units =
-        Array::Handle(isolate_group()->object_store()->loading_units());
-    uint32_t main_program_hash = Smi::Value(Smi::RawCast(units.At(0)));
-    uint32_t unit_program_hash = deserializer.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")));
-    }
-  }
-
-  if (Snapshot::IncludesCode(kind_)) {
-    ASSERT(data_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(data_image_,
-                                             /* is_executable */ false);
-    ASSERT(instructions_image_ != NULL);
-    thread_->isolate_group()->SetupImagePage(instructions_image_,
-                                             /* is_executable */ true);
-  }
-
-  UnitDeserializationRoots roots(unit);
-  deserializer.Deserialize(&roots);
-
-  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
-    // object pool.  The [code] is initialized (at AOT compile-time) to be a
-    // [StubCode::SwitchableCallMiss].
-    //
-    // In --use-bare-instruction we reduce the extra indirection via the [code]
-    // object and store instead (ic_data, entrypoint) in the object pool.
-    //
-    // Since the actual [entrypoint] is only known at AOT runtime we switch all
-    // existing UnlinkedCall entries in the object pool to be it's entrypoint.
-    auto zone = thread_->zone();
-    const auto& pool = ObjectPool::Handle(
-        zone, ObjectPool::RawCast(
-                  isolate_group()->object_store()->global_object_pool()));
-    auto& entry = Object::Handle(zone);
-    auto& smi = Smi::Handle(zone);
-    for (intptr_t i = 0; i < pool.Length(); i++) {
-      if (pool.TypeAt(i) == ObjectPool::EntryType::kTaggedObject) {
-        entry = pool.ObjectAt(i);
-        if (entry.ptr() == StubCode::SwitchableCallMiss().ptr()) {
-          smi = Smi::FromAlignedAddress(
-              StubCode::SwitchableCallMiss().MonomorphicEntryPoint());
-          pool.SetTypeAt(i, ObjectPool::EntryType::kImmediate,
-                         ObjectPool::Patchability::kPatchable);
-          pool.SetObjectAt(i, smi);
-        } else if (entry.ptr() == StubCode::MegamorphicCall().ptr()) {
-          smi = Smi::FromAlignedAddress(
-              StubCode::MegamorphicCall().MonomorphicEntryPoint());
-          pool.SetTypeAt(i, ObjectPool::EntryType::kImmediate,
-                         ObjectPool::Patchability::kPatchable);
-          pool.SetObjectAt(i, smi);
-        }
-      }
-    }
-  }
-#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_);
-  if (auto const bss = image.bss()) {
-    BSS::Initialize(thread_, bss, /*vm=*/false);
-  }
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-}
-
-}  // namespace dart
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
deleted file mode 100644
index d80cb7453..0000000
--- a/runtime/vm/clustered_snapshot.h
+++ /dev/null
@@ -1,823 +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.
-
-#ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
-#define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
-
-#include "platform/assert.h"
-#include "vm/allocation.h"
-#include "vm/bitfield.h"
-#include "vm/datastream.h"
-#include "vm/globals.h"
-#include "vm/growable_array.h"
-#include "vm/hash_map.h"
-#include "vm/heap/heap.h"
-#include "vm/image_snapshot.h"
-#include "vm/object.h"
-#include "vm/raw_object_fields.h"
-#include "vm/snapshot.h"
-#include "vm/version.h"
-
-#if defined(DEBUG)
-#define SNAPSHOT_BACKTRACE
-#endif
-
-namespace dart {
-
-// 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
-// class instead once per object, and to allow filling the objects in a tight
-// loop. The snapshot has two major sections: the first describes how to
-// allocate the objects and the second describes how to initialize them.
-// Deserialization starts by allocating a reference array large enough to hold
-// the base objects (objects already available to both the serializer and
-// deserializer) and the objects written in the snapshot. The allocation section
-// is then read for each cluster, filling the reference array. Then the
-// initialization/fill secton is read for each cluster, using the indices into
-// the reference array to fill pointers. At this point, every object has been
-// touched exactly once and in order, making this approach very cache friendly.
-// Finally, each cluster is given an opportunity to perform some fix-ups that
-// 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_(), objects_(nullptr) {}
-
-  intptr_t id() const { return id_; }
-  LoadingUnitSerializationData* parent() const { return parent_; }
-  void AddDeferredObject(CodePtr obj) {
-    deferred_objects_.Add(&Code::ZoneHandle(obj));
-  }
-  GrowableArray<Code*>* deferred_objects() { return &deferred_objects_; }
-  ZoneGrowableArray<Object*>* objects() {
-    ASSERT(objects_ != nullptr);
-    return objects_;
-  }
-  void set_objects(ZoneGrowableArray<Object*>* objects) {
-    ASSERT(objects_ == nullptr);
-    objects_ = objects;
-  }
-
- private:
-  intptr_t id_;
-  LoadingUnitSerializationData* parent_;
-  GrowableArray<Code*> deferred_objects_;
-  ZoneGrowableArray<Object*>* objects_;
-};
-
-class SerializationCluster : public ZoneAllocated {
- public:
-  static constexpr intptr_t kSizeVaries = -1;
-  explicit SerializationCluster(const char* name,
-                                intptr_t cid,
-                                intptr_t target_instance_size = kSizeVaries,
-                                bool is_canonical = false)
-      : name_(name),
-        cid_(cid),
-        target_instance_size_(target_instance_size),
-        is_canonical_(is_canonical) {
-    ASSERT(target_instance_size == kSizeVaries || target_instance_size >= 0);
-  }
-  virtual ~SerializationCluster() {}
-
-  // Add [object] to the cluster and push its outgoing references.
-  virtual void Trace(Serializer* serializer, ObjectPtr object) = 0;
-
-  // Write the cluster type and information needed to allocate the cluster's
-  // objects. For fixed sized objects, this is just the object count. For
-  // variable sized objects, this is the object count and length of each object.
-  virtual void WriteAlloc(Serializer* serializer) = 0;
-
-  // Write the byte and reference data of the cluster's objects.
-  virtual void WriteFill(Serializer* serializer) = 0;
-
-  void WriteAndMeasureAlloc(Serializer* serializer);
-  void WriteAndMeasureFill(Serializer* serializer);
-
-  const char* name() const { return name_; }
-  intptr_t cid() const { return cid_; }
-  bool is_canonical() const { return is_canonical_; }
-  intptr_t size() const { return size_; }
-  intptr_t num_objects() const { return num_objects_; }
-
-  // Returns number of bytes needed for deserialized objects in
-  // this cluster. Printed in --print_snapshot_sizes_verbose statistics.
-  //
-  // In order to calculate this size, clusters of fixed-size objects
-  // can pass instance size as [target_instance_size] constructor parameter.
-  // Otherwise clusters should count [target_memory_size] in
-  // their [WriteAlloc] methods.
-  intptr_t target_memory_size() const { return target_memory_size_; }
-
- protected:
-  const char* const name_;
-  const intptr_t cid_;
-  const intptr_t target_instance_size_;
-  const bool is_canonical_;
-  intptr_t size_ = 0;
-  intptr_t num_objects_ = 0;
-  intptr_t target_memory_size_ = 0;
-};
-
-class DeserializationCluster : public ZoneAllocated {
- public:
-  explicit DeserializationCluster(const char* name, bool is_canonical = false)
-      : name_(name),
-        is_canonical_(is_canonical),
-        start_index_(-1),
-        stop_index_(-1) {}
-  virtual ~DeserializationCluster() {}
-
-  // Allocate memory for all objects in the cluster and write their addresses
-  // into the ref array. Do not touch this memory.
-  virtual void ReadAlloc(Deserializer* deserializer) = 0;
-
-  // Initialize the cluster's objects. Do not touch the memory of other objects.
-  virtual void ReadFill(Deserializer* deserializer, bool primary) = 0;
-
-  // Complete any action that requires the full graph to be deserialized, such
-  // as rehashing.
-  virtual void PostLoad(Deserializer* deserializer,
-                        const Array& refs,
-                        bool primary) {
-    if (!primary && is_canonical()) {
-      FATAL1("%s needs canonicalization but doesn't define PostLoad", name());
-    }
-  }
-
-  const char* name() const { return name_; }
-  bool is_canonical() const { return is_canonical_; }
-
- protected:
-  void ReadAllocFixedSize(Deserializer* deserializer, intptr_t instance_size);
-
-  const char* const name_;
-  const bool is_canonical_;
-  // The range of the ref array that belongs to this cluster.
-  intptr_t start_index_;
-  intptr_t stop_index_;
-};
-
-class SerializationRoots {
- public:
-  virtual ~SerializationRoots() {}
-  virtual void AddBaseObjects(Serializer* serializer) = 0;
-  virtual void PushRoots(Serializer* serializer) = 0;
-  virtual void WriteRoots(Serializer* serializer) = 0;
-};
-
-class DeserializationRoots {
- public:
-  virtual ~DeserializationRoots() {}
-  // Returns true if these roots are the first snapshot loaded into a heap, and
-  // so can assume any canonical objects don't already exist. Returns false if
-  // some other snapshot may be loaded before these roots, and so written
-  // canonical objects need to run canonicalization during load.
-  virtual bool AddBaseObjects(Deserializer* deserializer) = 0;
-  virtual void ReadRoots(Deserializer* deserializer) = 0;
-  virtual void PostLoad(Deserializer* deserializer, const Array& refs) = 0;
-};
-
-// 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 constexpr intptr_t kUnreachableReference = 0;
-COMPILE_ASSERT(kUnreachableReference == WeakTable::kNoValue);
-static constexpr intptr_t kFirstReference = 1;
-
-// Reference value for traced objects that have not been allocated their final
-// reference ID.
-static const intptr_t kUnallocatedReference = -1;
-
-static constexpr bool IsAllocatedReference(intptr_t ref) {
-  return ref > kUnreachableReference;
-}
-
-static constexpr bool IsArtificialReference(intptr_t ref) {
-  return ref < kUnallocatedReference;
-}
-
-static constexpr bool IsReachableReference(intptr_t ref) {
-  return ref == kUnallocatedReference || IsAllocatedReference(ref);
-}
-
-class CodeSerializationCluster;
-
-class Serializer : public ThreadStackResource {
- public:
-  Serializer(Thread* thread,
-             Snapshot::Kind kind,
-             NonStreamingWriteStream* stream,
-             ImageWriter* image_writer_,
-             bool vm_,
-             V8SnapshotProfileWriter* profile_writer = nullptr);
-  ~Serializer();
-
-  void AddBaseObject(ObjectPtr base_object,
-                     const char* type = nullptr,
-                     const char* name = nullptr);
-  intptr_t AssignRef(ObjectPtr object);
-  intptr_t AssignArtificialRef(ObjectPtr object = nullptr);
-
-  void Push(ObjectPtr object);
-
-  void AddUntracedRef() { num_written_objects_++; }
-
-  void Trace(ObjectPtr object);
-
-  void UnexpectedObject(ObjectPtr object, const char* message);
-#if defined(SNAPSHOT_BACKTRACE)
-  ObjectPtr ParentOf(const Object& object);
-#endif
-
-  SerializationCluster* NewClusterForClass(intptr_t cid, bool is_canonical);
-
-  void ReserveHeader() {
-    // Make room for recording snapshot buffer size.
-    stream_->SetPosition(Snapshot::kHeaderSize);
-  }
-
-  void FillHeader(Snapshot::Kind kind) {
-    Snapshot* header = reinterpret_cast<Snapshot*>(stream_->buffer());
-    header->set_magic();
-    header->set_length(stream_->bytes_written());
-    header->set_kind(kind);
-  }
-
-  void WriteVersionAndFeatures(bool is_vm_snapshot);
-
-  ZoneGrowableArray<Object*>* Serialize(SerializationRoots* roots);
-  void PrintSnapshotSizes();
-
-  FieldTable* initial_field_table() const { return initial_field_table_; }
-
-  NonStreamingWriteStream* stream() { return stream_; }
-  intptr_t bytes_written() { return stream_->bytes_written(); }
-  intptr_t bytes_heap_allocated() { return bytes_heap_allocated_; }
-
-  class WritingObjectScope : ValueObject {
-   public:
-    WritingObjectScope(Serializer* serializer,
-                       const char* type,
-                       ObjectPtr object,
-                       StringPtr name)
-        : WritingObjectScope(
-              serializer,
-              ReserveId(serializer,
-                        type,
-                        object,
-                        String::ToCString(serializer->thread(), name)),
-              object) {}
-
-    WritingObjectScope(Serializer* serializer,
-                       const char* type,
-                       ObjectPtr object,
-                       const char* name)
-        : WritingObjectScope(serializer,
-                             ReserveId(serializer, type, object, name),
-                             object) {}
-
-    WritingObjectScope(Serializer* serializer,
-                       const V8SnapshotProfileWriter::ObjectId& id,
-                       ObjectPtr object = nullptr);
-
-    WritingObjectScope(Serializer* serializer, ObjectPtr object)
-        : WritingObjectScope(serializer,
-                             serializer->GetProfileId(object),
-                             object) {}
-
-    ~WritingObjectScope();
-
-   private:
-    static V8SnapshotProfileWriter::ObjectId ReserveId(Serializer* serializer,
-                                                       const char* type,
-                                                       ObjectPtr object,
-                                                       const char* name);
-
-   private:
-    Serializer* const serializer_;
-    const ObjectPtr old_object_;
-    const V8SnapshotProfileWriter::ObjectId old_id_;
-    const classid_t old_cid_;
-  };
-
-  // Writes raw data to the stream (basic type).
-  // sizeof(T) must be in {1,2,4,8}.
-  template <typename T>
-  void Write(T value) {
-    BaseWriteStream::Raw<sizeof(T), T>::Write(stream_, value);
-  }
-  void WriteUnsigned(intptr_t value) { stream_->WriteUnsigned(value); }
-  void WriteUnsigned64(uint64_t value) { stream_->WriteUnsigned(value); }
-
-  void WriteWordWith32BitWrites(uword value) {
-    stream_->WriteWordWith32BitWrites(value);
-  }
-
-  void WriteBytes(const uint8_t* addr, intptr_t len) {
-    stream_->WriteBytes(addr, len);
-  }
-  void Align(intptr_t alignment) { stream_->Align(alignment); }
-
-  V8SnapshotProfileWriter::ObjectId GetProfileId(ObjectPtr object) const;
-  V8SnapshotProfileWriter::ObjectId GetProfileId(intptr_t ref) const;
-
-  void WriteRootRef(ObjectPtr object, const char* name = nullptr) {
-    intptr_t id = RefId(object);
-    WriteUnsigned(id);
-    if (profile_writer_ != nullptr) {
-      profile_writer_->AddRoot(GetProfileId(object), name);
-    }
-  }
-
-  // Record a reference from the currently written object to the given object
-  // and return reference id for the given object.
-  void AttributeReference(ObjectPtr object,
-                          const V8SnapshotProfileWriter::Reference& reference);
-
-  void AttributeElementRef(ObjectPtr object, intptr_t index) {
-    AttributeReference(object,
-                       V8SnapshotProfileWriter::Reference::Element(index));
-  }
-
-  void WriteElementRef(ObjectPtr object, intptr_t index) {
-    AttributeElementRef(object, index);
-    WriteUnsigned(RefId(object));
-  }
-
-  void AttributePropertyRef(ObjectPtr object, const char* property) {
-    AttributeReference(object,
-                       V8SnapshotProfileWriter::Reference::Property(property));
-  }
-
-  void WritePropertyRef(ObjectPtr object, const char* property) {
-    AttributePropertyRef(object, property);
-    WriteUnsigned(RefId(object));
-  }
-
-  void WriteOffsetRef(ObjectPtr object, intptr_t offset) {
-    intptr_t id = RefId(object);
-    WriteUnsigned(id);
-    if (profile_writer_ != nullptr) {
-      if (auto const property = offsets_table_->FieldNameForOffset(
-              object_currently_writing_.cid_, offset)) {
-        AttributePropertyRef(object, property);
-      } else {
-        AttributeElementRef(object, offset);
-      }
-    }
-  }
-
-  template <typename T, typename... P>
-  void WriteFromTo(T obj, P&&... args) {
-    auto* from = obj->untag()->from();
-    auto* to = obj->untag()->to_snapshot(kind(), args...);
-    WriteRange(obj, from, to);
-  }
-
-  template <typename T>
-  DART_NOINLINE void WriteRange(ObjectPtr obj, T from, T to) {
-    for (auto* p = from; p <= to; p++) {
-      WriteOffsetRef(
-          p->Decompress(obj->heap_base()),
-          reinterpret_cast<uword>(p) - reinterpret_cast<uword>(obj->untag()));
-    }
-  }
-
-  template <typename T, typename... P>
-  void PushFromTo(T obj, P&&... args) {
-    auto* from = obj->untag()->from();
-    auto* to = obj->untag()->to_snapshot(kind(), args...);
-    PushRange(obj, from, to);
-  }
-
-  template <typename T>
-  DART_NOINLINE void PushRange(ObjectPtr obj, T from, T to) {
-    for (auto* p = from; p <= to; p++) {
-      Push(p->Decompress(obj->heap_base()));
-    }
-  }
-
-  void WriteTokenPosition(TokenPosition pos) { Write(pos.Serialize()); }
-
-  void WriteCid(intptr_t cid) {
-    COMPILE_ASSERT(UntaggedObject::kClassIdTagSize <= 32);
-    Write<int32_t>(cid);
-  }
-
-  // Sorts Code objects and reorders instructions before writing snapshot.
-  // Returns length of instructions table (in bare instructions mode).
-  intptr_t PrepareInstructions();
-
-  void WriteInstructions(InstructionsPtr instr,
-                         uint32_t unchecked_offset,
-                         CodePtr code,
-                         bool deferred);
-  uint32_t GetDataOffset(ObjectPtr object) const;
-  void TraceDataOffset(uint32_t offset);
-  intptr_t GetDataSize() const;
-
-  void WriteDispatchTable(const Array& entries);
-
-  Heap* heap() const { return heap_; }
-  Zone* zone() const { return zone_; }
-  Snapshot::Kind kind() const { return kind_; }
-  intptr_t next_ref_index() const { return next_ref_index_; }
-
-  void DumpCombinedCodeStatistics();
-
-  V8SnapshotProfileWriter* profile_writer() const { return profile_writer_; }
-
-  // If the given [obj] was not included into the snapshot and have not
-  // yet gotten an artificial node created for it create an artificial node
-  // in the profile representing this object.
-  // Returns true if [obj] has an artificial profile node associated with it.
-  bool CreateArtificialNodeIfNeeded(ObjectPtr obj);
-
-  bool InCurrentLoadingUnitOrRoot(ObjectPtr obj);
-  void RecordDeferredCode(CodePtr ptr);
-  GrowableArray<LoadingUnitSerializationData*>* loading_units() const {
-    return loading_units_;
-  }
-  void set_loading_units(GrowableArray<LoadingUnitSerializationData*>* units) {
-    loading_units_ = units;
-  }
-  intptr_t current_loading_unit_id() const { return current_loading_unit_id_; }
-  void set_current_loading_unit_id(intptr_t id) {
-    current_loading_unit_id_ = id;
-  }
-
-  // Returns the reference ID for the object. Fails for objects that have not
-  // been allocated a reference ID yet, so should be used only after all
-  // WriteAlloc calls.
-  intptr_t RefId(ObjectPtr object) const;
-
-  // Same as RefId, but allows artificial and unreachable references. Still
-  // fails for unallocated references.
-  intptr_t UnsafeRefId(ObjectPtr object) const;
-
-  // Whether the object is reachable.
-  bool IsReachable(ObjectPtr object) const {
-    return IsReachableReference(heap_->GetObjectId(object));
-  }
-  // Whether the object has an allocated reference.
-  bool HasRef(ObjectPtr object) const {
-    return IsAllocatedReference(heap_->GetObjectId(object));
-  }
-  // Whether the object only appears in the V8 snapshot profile.
-  bool HasArtificialRef(ObjectPtr object) const {
-    return IsArtificialReference(heap_->GetObjectId(object));
-  }
-  // Whether a node for the object already has been added to the V8 snapshot
-  // profile.
-  bool HasProfileNode(ObjectPtr object) const {
-    ASSERT(profile_writer_ != nullptr);
-    return profile_writer_->HasId(GetProfileId(object));
-  }
-  bool IsWritten(ObjectPtr object) const {
-    return heap_->GetObjectId(object) > num_base_objects_;
-  }
-
- private:
-  const char* ReadOnlyObjectType(intptr_t cid);
-  void FlushProfile();
-
-  Heap* heap_;
-  Zone* zone_;
-  Snapshot::Kind kind_;
-  NonStreamingWriteStream* stream_;
-  ImageWriter* image_writer_;
-  SerializationCluster** canonical_clusters_by_cid_;
-  SerializationCluster** clusters_by_cid_;
-  CodeSerializationCluster* code_cluster_ = nullptr;
-  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_;
-  intptr_t previous_text_offset_;
-  FieldTable* initial_field_table_;
-
-  intptr_t dispatch_table_size_ = 0;
-  intptr_t bytes_heap_allocated_ = 0;
-  intptr_t instructions_table_len_ = 0;
-
-  // True if writing VM snapshot, false for Isolate snapshot.
-  bool vm_;
-
-  V8SnapshotProfileWriter* profile_writer_ = nullptr;
-  struct ProfilingObject {
-    ObjectPtr object_ = nullptr;
-    // Unless within a WritingObjectScope, any bytes written are attributed to
-    // the artificial root.
-    V8SnapshotProfileWriter::ObjectId id_ =
-        V8SnapshotProfileWriter::kArtificialRootId;
-    intptr_t last_stream_position_ = 0;
-    intptr_t cid_ = -1;
-  } object_currently_writing_;
-  OffsetsTable* offsets_table_ = nullptr;
-
-#if defined(SNAPSHOT_BACKTRACE)
-  ObjectPtr current_parent_;
-  GrowableArray<Object*> parent_pairs_;
-#endif
-
-#if defined(DART_PRECOMPILER)
-  IntMap<intptr_t> deduped_instructions_sources_;
-#endif
-
-  intptr_t current_loading_unit_id_ = 0;
-  GrowableArray<LoadingUnitSerializationData*>* loading_units_ = nullptr;
-  ZoneGrowableArray<Object*>* objects_ = new ZoneGrowableArray<Object*>();
-
-  DISALLOW_IMPLICIT_CONSTRUCTORS(Serializer);
-};
-
-#define AutoTraceObject(obj)                                                   \
-  Serializer::WritingObjectScope scope_##__COUNTER__(s, name(), obj, nullptr)
-
-#define AutoTraceObjectName(obj, str)                                          \
-  Serializer::WritingObjectScope scope_##__COUNTER__(s, name(), obj, str)
-
-#define WriteFieldValue(field, value) s->WritePropertyRef(value, #field);
-
-#define WriteFromTo(obj, ...) s->WriteFromTo(obj, ##__VA_ARGS__);
-
-#define PushFromTo(obj, ...) s->PushFromTo(obj, ##__VA_ARGS__);
-
-#define WriteField(obj, field) s->WritePropertyRef(obj->untag()->field, #field)
-#define WriteCompressedField(obj, name)                                        \
-  s->WritePropertyRef(obj->untag()->name(), #name "_")
-
-// This class can be used to read version and features from a snapshot before
-// the VM has been initialized.
-class SnapshotHeaderReader {
- public:
-  static char* InitializeGlobalVMFlagsFromSnapshot(const Snapshot* snapshot);
-  static bool NullSafetyFromSnapshot(const Snapshot* snapshot);
-
-  explicit SnapshotHeaderReader(const Snapshot* snapshot)
-      : SnapshotHeaderReader(snapshot->kind(),
-                             snapshot->Addr(),
-                             snapshot->length()) {}
-
-  SnapshotHeaderReader(Snapshot::Kind kind,
-                       const uint8_t* buffer,
-                       intptr_t size)
-      : kind_(kind), stream_(buffer, size) {
-    stream_.SetPosition(Snapshot::kHeaderSize);
-  }
-
-  // Verifies the version and features in the snapshot are compatible with the
-  // current VM.  If isolate is non-null it validates isolate-specific features.
-  //
-  // Returns null on success and a malloc()ed error on failure.
-  // The [offset] will be the next position in the snapshot stream after the
-  // features.
-  char* VerifyVersionAndFeatures(IsolateGroup* isolate_group, intptr_t* offset);
-
- private:
-  char* VerifyVersion();
-  char* ReadFeatures(const char** features, intptr_t* features_length);
-  char* VerifyFeatures(IsolateGroup* isolate_group);
-  char* BuildError(const char* message);
-
-  Snapshot::Kind kind_;
-  ReadStream stream_;
-};
-
-class Deserializer : public ThreadStackResource {
- public:
-  Deserializer(Thread* thread,
-               Snapshot::Kind kind,
-               const uint8_t* buffer,
-               intptr_t size,
-               const uint8_t* data_buffer,
-               const uint8_t* instructions_buffer,
-               bool is_non_root_unit,
-               intptr_t offset = 0);
-  ~Deserializer();
-
-  // Verifies the image alignment.
-  //
-  // Returns ApiError::null() on success and an ApiError with an an appropriate
-  // message otherwise.
-  ApiErrorPtr VerifyImageAlignment();
-
-  static void InitializeHeader(ObjectPtr raw,
-                               intptr_t cid,
-                               intptr_t size,
-                               bool is_canonical = false);
-
-  // Reads raw data (for basic types).
-  // sizeof(T) must be in {1,2,4,8}.
-  template <typename T>
-  T Read() {
-    return ReadStream::Raw<sizeof(T), T>::Read(&stream_);
-  }
-  intptr_t ReadUnsigned() { return stream_.ReadUnsigned(); }
-  uint64_t ReadUnsigned64() { return stream_.ReadUnsigned<uint64_t>(); }
-  void ReadBytes(uint8_t* addr, intptr_t len) { stream_.ReadBytes(addr, len); }
-
-  uword ReadWordWith32BitReads() { return stream_.ReadWordWith32BitReads(); }
-
-  intptr_t position() const { return stream_.Position(); }
-  void set_position(intptr_t p) { stream_.SetPosition(p); }
-  const uint8_t* CurrentBufferAddress() const {
-    return stream_.AddressOfCurrentPosition();
-  }
-
-  void Advance(intptr_t value) { stream_.Advance(value); }
-  void Align(intptr_t alignment) { stream_.Align(alignment); }
-
-  void AddBaseObject(ObjectPtr base_object) { AssignRef(base_object); }
-
-  void AssignRef(ObjectPtr object) {
-    ASSERT(next_ref_index_ <= num_objects_);
-    refs_->untag()->data()[next_ref_index_] = object;
-    next_ref_index_++;
-  }
-
-  ObjectPtr Ref(intptr_t index) const {
-    ASSERT(index > 0);
-    ASSERT(index <= num_objects_);
-    return refs_->untag()->element(index);
-  }
-
-  ObjectPtr ReadRef() { return Ref(ReadUnsigned()); }
-
-  template <typename T, typename... P>
-  void ReadFromTo(T obj, P&&... params) {
-    auto* from = obj->untag()->from();
-    auto* to_snapshot = obj->untag()->to_snapshot(kind(), params...);
-    auto* to = obj->untag()->to(params...);
-    for (auto* p = from; p <= to_snapshot; p++) {
-      *p = ReadRef();
-    }
-    // This is necessary because, unlike Object::Allocate, the clustered
-    // deserializer allocates object without null-initializing them. Instead,
-    // each deserialization cluster is responsible for initializing every field,
-    // ensuring that every field is written to exactly once.
-    for (auto* p = to_snapshot + 1; p <= to; p++) {
-      *p = Object::null();
-    }
-  }
-
-  TokenPosition ReadTokenPosition() {
-    return TokenPosition::Deserialize(Read<int32_t>());
-  }
-
-  intptr_t ReadCid() {
-    COMPILE_ASSERT(UntaggedObject::kClassIdTagSize <= 32);
-    return Read<int32_t>();
-  }
-
-  void ReadInstructions(CodePtr code, bool deferred, bool discarded);
-  void EndInstructions();
-  ObjectPtr GetObjectAt(uint32_t offset) const;
-
-  void Deserialize(DeserializationRoots* roots);
-
-  DeserializationCluster* ReadCluster();
-
-  void ReadDispatchTable() {
-    ReadDispatchTable(&stream_, /*deferred=*/false, -1, -1);
-  }
-  void ReadDispatchTable(ReadStream* stream,
-                         bool deferred,
-                         intptr_t deferred_code_start_index,
-                         intptr_t deferred_code_end_index);
-
-  intptr_t next_index() const { return next_ref_index_; }
-  Heap* heap() const { return heap_; }
-  Zone* zone() const { return zone_; }
-  Snapshot::Kind kind() const { return kind_; }
-  FieldTable* initial_field_table() const { return initial_field_table_; }
-  bool is_non_root_unit() const { return is_non_root_unit_; }
-  void set_code_start_index(intptr_t value) { code_start_index_ = value; }
-  intptr_t code_start_index() { return code_start_index_; }
-  const InstructionsTable& instructions_table() const {
-    return instructions_table_;
-  }
-
- private:
-  Heap* heap_;
-  Zone* zone_;
-  Snapshot::Kind kind_;
-  ReadStream stream_;
-  ImageReader* image_reader_;
-  intptr_t num_base_objects_;
-  intptr_t num_objects_;
-  intptr_t num_clusters_;
-  ArrayPtr refs_;
-  intptr_t next_ref_index_;
-  intptr_t previous_text_offset_;
-  intptr_t code_start_index_ = 0;
-  intptr_t instructions_index_ = 0;
-  DeserializationCluster** clusters_;
-  FieldTable* initial_field_table_;
-  const bool is_non_root_unit_;
-  InstructionsTable& instructions_table_;
-};
-
-#define ReadFromTo(obj, ...) d->ReadFromTo(obj, ##__VA_ARGS__);
-
-class FullSnapshotWriter {
- public:
-  static const intptr_t kInitialSize = 64 * KB;
-  FullSnapshotWriter(Snapshot::Kind kind,
-                     NonStreamingWriteStream* vm_snapshot_data,
-                     NonStreamingWriteStream* isolate_snapshot_data,
-                     ImageWriter* vm_image_writer,
-                     ImageWriter* iso_image_writer);
-  ~FullSnapshotWriter();
-
-  Thread* thread() const { return thread_; }
-  Zone* zone() const { return thread_->zone(); }
-  IsolateGroup* isolate_group() const { return thread_->isolate_group(); }
-  Heap* heap() const { return isolate_group()->heap(); }
-
-  // Writes a full snapshot of the program(VM isolate, regular isolate group).
-  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_; }
-
- private:
-  // Writes a snapshot of the VM Isolate.
-  ZoneGrowableArray<Object*>* WriteVMSnapshot();
-
-  // Writes a full snapshot of regular Dart isolate group.
-  void WriteProgramSnapshot(ZoneGrowableArray<Object*>* objects,
-                            GrowableArray<LoadingUnitSerializationData*>* data);
-
-  Thread* thread_;
-  Snapshot::Kind kind_;
-  NonStreamingWriteStream* const vm_snapshot_data_;
-  NonStreamingWriteStream* const isolate_snapshot_data_;
-  intptr_t vm_isolate_snapshot_size_;
-  intptr_t isolate_snapshot_size_;
-  ImageWriter* vm_image_writer_;
-  ImageWriter* isolate_image_writer_;
-
-  // Stats for benchmarking.
-  intptr_t clustered_vm_size_ = 0;
-  intptr_t clustered_isolate_size_ = 0;
-  intptr_t mapped_data_size_ = 0;
-  intptr_t mapped_text_size_ = 0;
-  intptr_t heap_vm_size_ = 0;
-  intptr_t heap_isolate_size_ = 0;
-
-  V8SnapshotProfileWriter* profile_writer_ = nullptr;
-
-  DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
-};
-
-class FullSnapshotReader {
- public:
-  FullSnapshotReader(const Snapshot* snapshot,
-                     const uint8_t* instructions_buffer,
-                     Thread* thread);
-  ~FullSnapshotReader() {}
-
-  ApiErrorPtr ReadVMSnapshot();
-  ApiErrorPtr ReadProgramSnapshot();
-  ApiErrorPtr ReadUnitSnapshot(const LoadingUnit& unit);
-
- private:
-  IsolateGroup* isolate_group() const { return thread_->isolate_group(); }
-
-  ApiErrorPtr ConvertToApiError(char* message);
-  void PatchGlobalObjectPool();
-  void InitializeBSS();
-
-  Snapshot::Kind kind_;
-  Thread* thread_;
-  const uint8_t* buffer_;
-  intptr_t size_;
-  const uint8_t* data_image_;
-  const uint8_t* instructions_image_;
-
-  DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader);
-};
-
-}  // namespace dart
-
-#endif  // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index e096382..955e5eb 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -40,23 +40,24 @@
 }
 
 TEST_CASE(StackMapGC) {
-  const char* kScriptChars =
-      "class A {"
-      "  static void func(var i, var k) native 'NativeFunc';"
-      "  static foo() {"
-      "    var i;"
-      "    var s1;"
-      "    var k;"
-      "    var s2;"
-      "    var s3;"
-      "    i = 10; s1 = 'abcd'; k = 20; s2 = 'B'; s3 = 'C';"
-      "    func(i, k);"
-      "    return i + k; }"
-      "  static void moo() {"
-      "    var i = A.foo();"
-      "    if (i != 30) throw '$i != 30';"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+class A {
+  @pragma("vm:external-name", "NativeFunc")
+  external static void func(var i, var k);
+  static foo() {
+    var i;
+    var s1;
+    var k;
+    var s2;
+    var s3;
+    i = 10; s1 = 'abcd'; k = 20; s2 = 'B'; s3 = 'C';
+    func(i, k);
+    return i + k; }
+  static void moo() {
+    var i = A.foo();
+    if (i != 30) throw '$i != 30';
+  }
+})";
   // First setup the script and compile the script.
   TestCase::LoadTestScript(kScriptChars, native_resolver);
   TransitionNativeToVM transition(thread);
diff --git a/runtime/vm/code_patcher_arm64_test.cc b/runtime/vm/code_patcher_arm64_test.cc
index 54fc1b9..0bd184c 100644
--- a/runtime/vm/code_patcher_arm64_test.cc
+++ b/runtime/vm/code_patcher_arm64_test.cc
@@ -33,7 +33,8 @@
       signature, function_name, UntaggedFunction::kRegularFunction, true, false,
       false, false, false, owner_class, TokenPosition::kNoSource));
 
-  const String& target_name = String::Handle(String::New("targetFunction"));
+  const String& target_name =
+      String::Handle(Symbols::New(thread, "targetFunction"));
   const intptr_t kTypeArgsLen = 0;
   const intptr_t kNumArgs = 1;
   const Array& args_descriptor = Array::Handle(ArgumentsDescriptor::NewBoxed(
diff --git a/runtime/vm/code_patcher_arm_test.cc b/runtime/vm/code_patcher_arm_test.cc
index c9026d5..c963d44 100644
--- a/runtime/vm/code_patcher_arm_test.cc
+++ b/runtime/vm/code_patcher_arm_test.cc
@@ -33,7 +33,8 @@
       signature, function_name, UntaggedFunction::kRegularFunction, true, false,
       false, false, false, owner_class, TokenPosition::kNoSource));
 
-  const String& target_name = String::Handle(String::New("targetFunction"));
+  const String& target_name =
+      String::Handle(Symbols::New(thread, "targetFunction"));
   const intptr_t kTypeArgsLen = 0;
   const intptr_t kNumArgs = 1;
   const Array& args_descriptor = Array::Handle(ArgumentsDescriptor::NewBoxed(
diff --git a/runtime/vm/code_patcher_ia32_test.cc b/runtime/vm/code_patcher_ia32_test.cc
index 36c6ec5..ef55b48 100644
--- a/runtime/vm/code_patcher_ia32_test.cc
+++ b/runtime/vm/code_patcher_ia32_test.cc
@@ -33,7 +33,8 @@
       signature, function_name, UntaggedFunction::kRegularFunction, true, false,
       false, false, false, owner_class, TokenPosition::kNoSource));
 
-  const String& target_name = String::Handle(String::New("targetFunction"));
+  const String& target_name =
+      String::Handle(Symbols::New(thread, "targetFunction"));
   const intptr_t kTypeArgsLen = 0;
   const intptr_t kNumArgs = 1;
   const Array& args_descriptor = Array::Handle(ArgumentsDescriptor::NewBoxed(
diff --git a/runtime/vm/code_patcher_x64_test.cc b/runtime/vm/code_patcher_x64_test.cc
index e5666e3..29cf624 100644
--- a/runtime/vm/code_patcher_x64_test.cc
+++ b/runtime/vm/code_patcher_x64_test.cc
@@ -33,7 +33,8 @@
       signature, function_name, UntaggedFunction::kRegularFunction, true, false,
       false, false, false, owner_class, TokenPosition::kNoSource));
 
-  const String& target_name = String::Handle(String::New("targetFunction"));
+  const String& target_name =
+      String::Handle(Symbols::New(thread, "targetFunction"));
   const intptr_t kTypeArgsLen = 0;
   const intptr_t kNumArgs = 1;
   const Array& args_descriptor = Array::Handle(ArgumentsDescriptor::NewBoxed(
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 8a0978b..a013cb2 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -465,23 +465,35 @@
 
     switch (op_kind) {
       case Token::kEQ:
-      case Token::kNE:
-        if (left_type->IsNull() || left_type->IsNullableSmi() ||
-            right_type->IsNull() || right_type->IsNullableSmi()) {
+      case Token::kNE: {
+        // If both arguments are nullable Smi or one of the arguments is
+        // a null or Smi and the other argument is nullable then emit
+        // StrictCompare (all arguments are going to be boxed anyway).
+        // Otherwise prefer EqualityCompare to avoid redundant boxing.
+        const bool left_is_null_or_smi =
+            left_type->IsNull() || left_type->IsNullableSmi();
+        const bool right_is_null_or_smi =
+            right_type->IsNull() || right_type->IsNullableSmi();
+        const bool both_are_nullable_smis =
+            left_type->IsNullableSmi() && right_type->IsNullableSmi();
+        const bool either_can_be_null =
+            left_type->is_nullable() || right_type->is_nullable();
+        if (both_are_nullable_smis ||
+            ((left_is_null_or_smi || right_is_null_or_smi) &&
+             either_can_be_null)) {
           replacement = new (Z) StrictCompareInstr(
               instr->source(),
               (op_kind == Token::kEQ) ? Token::kEQ_STRICT : Token::kNE_STRICT,
               left_value->CopyWithType(Z), right_value->CopyWithType(Z),
               /*needs_number_check=*/false, DeoptId::kNone);
         } else {
-          const bool null_aware =
-              left_type->is_nullable() || right_type->is_nullable();
           replacement = new (Z) EqualityCompareInstr(
               instr->source(), op_kind, left_value->CopyWithType(Z),
               right_value->CopyWithType(Z), kMintCid, DeoptId::kNone,
-              null_aware, Instruction::kNotSpeculative);
+              /*null_aware=*/either_can_be_null, Instruction::kNotSpeculative);
         }
         break;
+      }
       case Token::kLT:
       case Token::kLTE:
       case Token::kGT:
@@ -602,7 +614,7 @@
       case Token::kNE: {
         // TODO(dartbug.com/32166): Support EQ, NE for nullable doubles.
         // (requires null-aware comparison instruction).
-        if (left_type->IsDouble() && right_type->IsDouble()) {
+        if (!left_type->is_nullable() && !right_type->is_nullable()) {
           left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
           right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
           replacement = new (Z) EqualityCompareInstr(
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index ec5c09d..82b4c61 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -552,7 +552,7 @@
 
       // With the nnbd experiment enabled, these non-nullable type arguments may
       // not be retained, although they will be used and expected to be
-      // canonical.
+      // canonical by Dart_NewListOfType.
       AddTypeArguments(
           TypeArguments::Handle(Z, IG->object_store()->type_argument_int()));
       AddTypeArguments(
@@ -782,6 +782,7 @@
 }
 
 void Precompiler::CollectCallbackFields() {
+  PRECOMPILER_TIMER_SCOPE(this, CollectCallbackFields);
   HANDLESCOPE(T);
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
@@ -883,6 +884,7 @@
 }
 
 void Precompiler::AddCalleesOf(const Function& function, intptr_t gop_offset) {
+  PRECOMPILER_TIMER_SCOPE(this, AddCalleesOf);
   ASSERT(function.HasCode());
 
   const Code& code = Code::Handle(Z, function.CurrentCode());
@@ -987,51 +989,70 @@
 void Precompiler::AddCalleesOfHelper(const Object& entry,
                                      String* temp_selector,
                                      Class* temp_cls) {
-  if (entry.IsUnlinkedCall()) {
-    const auto& call_site = UnlinkedCall::Cast(entry);
-    // A dynamic call.
-    *temp_selector = call_site.target_name();
-    AddSelector(*temp_selector);
-    if (IsPotentialClosureCall(*temp_selector)) {
-      const Array& arguments_descriptor =
-          Array::Handle(Z, call_site.arguments_descriptor());
-      AddClosureCall(*temp_selector, arguments_descriptor);
-    }
-  } else if (entry.IsMegamorphicCache()) {
-    // A dynamic call.
-    const auto& cache = MegamorphicCache::Cast(entry);
-    *temp_selector = cache.target_name();
-    AddSelector(*temp_selector);
-    if (IsPotentialClosureCall(*temp_selector)) {
-      const Array& arguments_descriptor =
-          Array::Handle(Z, cache.arguments_descriptor());
-      AddClosureCall(*temp_selector, arguments_descriptor);
-    }
-  } else if (entry.IsField()) {
-    // Potential need for field initializer.
-    const auto& field = Field::Cast(entry);
-    AddField(field);
-  } else if (entry.IsInstance()) {
-    // Const object, literal or args descriptor.
-    const auto& instance = Instance::Cast(entry);
-    AddConstObject(instance);
-  } else if (entry.IsFunction()) {
-    // Local closure function.
-    const auto& target = Function::Cast(entry);
-    AddFunction(target, RetainReasons::kLocalClosure);
-    if (target.IsFfiTrampoline()) {
-      const auto& callback_target =
-          Function::Handle(Z, target.FfiCallbackTarget());
-      if (!callback_target.IsNull()) {
-        AddFunction(callback_target, RetainReasons::kFfiCallbackTarget);
+  switch (entry.GetClassId()) {
+    case kOneByteStringCid:
+    case kNullCid:
+      // Skip common leaf constants early in order to
+      // process object pools faster.
+      return;
+    case kUnlinkedCallCid: {
+      const auto& call_site = UnlinkedCall::Cast(entry);
+      // A dynamic call.
+      *temp_selector = call_site.target_name();
+      AddSelector(*temp_selector);
+      if (IsPotentialClosureCall(*temp_selector)) {
+        const Array& arguments_descriptor =
+            Array::Handle(Z, call_site.arguments_descriptor());
+        AddClosureCall(*temp_selector, arguments_descriptor);
       }
+      break;
     }
-  } else if (entry.IsCode()) {
-    const auto& target_code = Code::Cast(entry);
-    if (target_code.IsAllocationStubCode()) {
-      *temp_cls ^= target_code.owner();
-      AddInstantiatedClass(*temp_cls);
+    case kMegamorphicCacheCid: {
+      // A dynamic call.
+      const auto& cache = MegamorphicCache::Cast(entry);
+      *temp_selector = cache.target_name();
+      AddSelector(*temp_selector);
+      if (IsPotentialClosureCall(*temp_selector)) {
+        const Array& arguments_descriptor =
+            Array::Handle(Z, cache.arguments_descriptor());
+        AddClosureCall(*temp_selector, arguments_descriptor);
+      }
+      break;
     }
+    case kFieldCid: {
+      // Potential need for field initializer.
+      const auto& field = Field::Cast(entry);
+      AddField(field);
+      break;
+    }
+    case kFunctionCid: {
+      // Local closure function.
+      const auto& target = Function::Cast(entry);
+      AddFunction(target, RetainReasons::kLocalClosure);
+      if (target.IsFfiTrampoline()) {
+        const auto& callback_target =
+            Function::Handle(Z, target.FfiCallbackTarget());
+        if (!callback_target.IsNull()) {
+          AddFunction(callback_target, RetainReasons::kFfiCallbackTarget);
+        }
+      }
+      break;
+    }
+    case kCodeCid: {
+      const auto& target_code = Code::Cast(entry);
+      if (target_code.IsAllocationStubCode()) {
+        *temp_cls ^= target_code.owner();
+        AddInstantiatedClass(*temp_cls);
+      }
+      break;
+    }
+    default:
+      if (entry.IsInstance()) {
+        // Const object, literal or args descriptor.
+        const auto& instance = Instance::Cast(entry);
+        AddConstObject(instance);
+      }
+      break;
   }
 }
 
@@ -1603,6 +1624,7 @@
 }
 
 void Precompiler::CheckForNewDynamicFunctions() {
+  PRECOMPILER_TIMER_SCOPE(this, CheckForNewDynamicFunctions);
   HANDLESCOPE(T);
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm64.cc b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
index df3c817..66a1480 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
@@ -1148,12 +1148,12 @@
 #if !defined(DART_COMPRESSED_POINTERS)
   // Convert double value to signed 64-bit int in R0 and back to a
   // double value in V1.
-  __ fcvtzdsx(R0, V0);
+  __ fcvtzsxd(R0, V0);
   __ scvtfdx(V1, R0);
 #else
   // Convert double value to signed 32-bit int in R0 and back to a
   // double value in V1.
-  __ fcvtzdsw(R0, V0);
+  __ fcvtzswd(R0, V0);
   __ scvtfdw(V1, R0);
 #endif
 
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index d285792..c17b697 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -1671,8 +1671,11 @@
   RELEASE_ASSERT(CanLoadFromObjectPool(object));
   // Make sure that class CallPattern is able to decode this load from the
   // object pool.
-  const auto index = is_unique ? object_pool_builder().AddObject(object)
-                               : object_pool_builder().FindObject(object);
+  const auto index = is_unique
+                         ? object_pool_builder().AddObject(
+                               object, ObjectPoolBuilderEntry::kPatchable)
+                         : object_pool_builder().FindObject(
+                               object, ObjectPoolBuilderEntry::kNotPatchable);
   LoadWordFromPoolIndex(rd, index, pp, cond);
 }
 
@@ -1766,7 +1769,8 @@
 void Assembler::StoreIntoObject(Register object,
                                 const Address& dest,
                                 Register value,
-                                CanBeSmi can_be_smi) {
+                                CanBeSmi can_be_smi,
+                                MemoryOrder memory_order) {
   // x.slot = x. Barrier should have be removed at the IL level.
   ASSERT(object != value);
   ASSERT(object != LINK_REGISTER);
@@ -1774,7 +1778,11 @@
   ASSERT(object != TMP);
   ASSERT(value != TMP);
 
-  str(value, dest);
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest);
+  } else {
+    str(value, dest);
+  }
 
   // In parallel, test whether
   //  - object is old and not remembered and value is new, or
@@ -1889,22 +1897,28 @@
 void Assembler::StoreIntoObjectOffset(Register object,
                                       int32_t offset,
                                       Register value,
-                                      CanBeSmi can_value_be_smi) {
+                                      CanBeSmi can_value_be_smi,
+                                      MemoryOrder memory_order) {
   int32_t ignored = 0;
   if (Address::CanHoldStoreOffset(kFourBytes, offset - kHeapObjectTag,
                                   &ignored)) {
     StoreIntoObject(object, FieldAddress(object, offset), value,
-                    can_value_be_smi);
+                    can_value_be_smi, memory_order);
   } else {
     AddImmediate(IP, object, offset - kHeapObjectTag);
-    StoreIntoObject(object, Address(IP), value, can_value_be_smi);
+    StoreIntoObject(object, Address(IP), value, can_value_be_smi, memory_order);
   }
 }
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         Register value) {
-  str(value, dest);
+                                         Register value,
+                                         MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest);
+  } else {
+    str(value, dest);
+  }
 #if defined(DEBUG)
   Label done;
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
@@ -1921,43 +1935,52 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         const Object& value) {
+                                         const Object& value,
+                                         MemoryOrder memory_order) {
   ASSERT(IsOriginalObject(value));
   ASSERT(IsNotTemporaryScopedHandle(value));
   // No store buffer update.
   LoadObject(IP, value);
-  str(IP, dest);
+  if (memory_order == kRelease) {
+    StoreRelease(IP, dest);
+  } else {
+    str(IP, dest);
+  }
 }
 
 void Assembler::StoreIntoObjectNoBarrierOffset(Register object,
                                                int32_t offset,
-                                               Register value) {
+                                               Register value,
+                                               MemoryOrder memory_order) {
   int32_t ignored = 0;
   if (Address::CanHoldStoreOffset(kFourBytes, offset - kHeapObjectTag,
                                   &ignored)) {
-    StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value);
+    StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value,
+                             memory_order);
   } else {
     Register base = object == R9 ? R8 : R9;
     Push(base);
     AddImmediate(base, object, offset - kHeapObjectTag);
-    StoreIntoObjectNoBarrier(object, Address(base), value);
+    StoreIntoObjectNoBarrier(object, Address(base), value, memory_order);
     Pop(base);
   }
 }
 
 void Assembler::StoreIntoObjectNoBarrierOffset(Register object,
                                                int32_t offset,
-                                               const Object& value) {
+                                               const Object& value,
+                                               MemoryOrder memory_order) {
   ASSERT(IsOriginalObject(value));
   int32_t ignored = 0;
   if (Address::CanHoldStoreOffset(kFourBytes, offset - kHeapObjectTag,
                                   &ignored)) {
-    StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value);
+    StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value,
+                             memory_order);
   } else {
     Register base = object == R9 ? R8 : R9;
     Push(base);
     AddImmediate(base, object, offset - kHeapObjectTag);
-    StoreIntoObjectNoBarrier(object, Address(base), value);
+    StoreIntoObjectNoBarrier(object, Address(base), value, memory_order);
     Pop(base);
   }
 }
@@ -2280,6 +2303,16 @@
   BindARMv7(label);
 }
 
+void Assembler::LoadCompressedSmi(Register dest, const Address& slot) {
+  ldr(dest, slot);
+#if defined(DEBUG)
+  Label done;
+  BranchIfSmi(dest, &done);
+  Stop("Expected Smi");
+  Bind(&done);
+#endif
+}
+
 OperandSize Address::OperandSizeFor(intptr_t cid) {
   switch (cid) {
     case kArrayCid:
diff --git a/runtime/vm/compiler/assembler/assembler_arm.h b/runtime/vm/compiler/assembler/assembler_arm.h
index abb82a1..e98eef8 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.h
+++ b/runtime/vm/compiler/assembler/assembler_arm.h
@@ -395,6 +395,7 @@
     LoadFromOffset(dst, base, offset);
   }
   void LoadCompressed(Register dest, const Address& slot) { ldr(dest, slot); }
+  void LoadCompressedSmi(Register dest, const Address& slot);
   void StoreMemoryValue(Register src, Register base, int32_t offset) {
     StoreToOffset(src, base, offset);
   }
@@ -402,9 +403,16 @@
     ldr(dst, Address(address, offset));
     dmb();
   }
-  void StoreRelease(Register src, Register address, int32_t offset = 0) {
+  void StoreRelease(Register src,
+                    Register address,
+                    int32_t offset = 0) override {
+    StoreRelease(src, Address(address, offset));
+  }
+  void StoreRelease(Register src, Address dest) {
     dmb();
-    str(src, Address(address, offset));
+    str(src, dest);
+
+    // We don't run TSAN bots on 32 bit.
   }
 
   void CompareWithFieldValue(Register value, FieldAddress address) {
@@ -422,7 +430,15 @@
     cmp(value, Operand(TMP));
   }
 
-  void CompareTypeNullabilityWith(Register type, int8_t value) {
+  void CompareFunctionTypeNullabilityWith(Register type,
+                                          int8_t value) override {
+    EnsureHasClassIdInDEBUG(kFunctionTypeCid, type, TMP);
+    ldrb(TMP, FieldAddress(
+                  type, compiler::target::FunctionType::nullability_offset()));
+    cmp(TMP, Operand(value));
+  }
+  void CompareTypeNullabilityWith(Register type, int8_t value) override {
+    EnsureHasClassIdInDEBUG(kTypeCid, type, TMP);
     ldrb(TMP, FieldAddress(type, compiler::target::Type::nullability_offset()));
     cmp(TMP, Operand(value));
   }
@@ -877,7 +893,8 @@
   void StoreIntoObject(Register object,      // Object we are storing into.
                        const Address& dest,  // Where we are storing into.
                        Register value,       // Value we are storing.
-                       CanBeSmi can_value_be_smi = kValueCanBeSmi) override;
+                       CanBeSmi can_value_be_smi = kValueCanBeSmi,
+                       MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreIntoArray(Register object,
                       Register slot,
                       Register value,
@@ -885,20 +902,28 @@
   void StoreIntoObjectOffset(Register object,
                              int32_t offset,
                              Register value,
-                             CanBeSmi can_value_be_smi = kValueCanBeSmi);
+                             CanBeSmi can_value_be_smi = kValueCanBeSmi,
+                             MemoryOrder memory_order = kRelaxedNonAtomic);
 
+  void StoreIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreIntoObjectNoBarrier(Register object,
                                 const Address& dest,
-                                Register value) override;
-  void StoreIntoObjectNoBarrier(Register object,
-                                const Address& dest,
-                                const Object& value);
-  void StoreIntoObjectNoBarrierOffset(Register object,
-                                      int32_t offset,
-                                      Register value);
-  void StoreIntoObjectNoBarrierOffset(Register object,
-                                      int32_t offset,
-                                      const Object& value);
+                                const Object& value,
+                                MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreIntoObjectNoBarrierOffset(
+      Register object,
+      int32_t offset,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreIntoObjectNoBarrierOffset(
+      Register object,
+      int32_t offset,
+      const Object& value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
 
   // Stores a non-tagged value into a heap object.
   void StoreInternalPointer(Register object,
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 3502a6e..8aed5c6 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -50,6 +50,14 @@
   buffer_.Emit<int64_t>(value);
 }
 
+int32_t Assembler::BindImm26Branch(int64_t position, int64_t dest) {
+  ASSERT(CanEncodeImm26BranchOffset(dest));
+  const int32_t next = buffer_.Load<int32_t>(position);
+  const int32_t encoded = EncodeImm26BranchOffset(dest, next);
+  buffer_.Store<int32_t>(position, encoded);
+  return DecodeImm26BranchOffset(next);
+}
+
 int32_t Assembler::BindImm19Branch(int64_t position, int64_t dest) {
   if (use_far_branches() && !CanEncodeImm19BranchOffset(dest)) {
     // Far branches are enabled, and we can't encode the branch offset in
@@ -63,6 +71,7 @@
     const int32_t far_branch =
         buffer_.Load<int32_t>(position + 1 * Instr::kInstrSize);
     const Condition c = DecodeImm19BranchCondition(guard_branch);
+    ASSERT(c != NV);
 
     // Grab the link to the next branch.
     const int32_t next = DecodeImm26BranchOffset(far_branch);
@@ -74,12 +83,6 @@
     // Encode the branch.
     const int32_t encoded_branch = EncodeImm26BranchOffset(offset, far_branch);
 
-    // If the guard branch is conditioned on NV, replace it with a nop.
-    if (c == NV) {
-      buffer_.Store<int32_t>(position + 0 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-    }
-
     // Write the far branch into the buffer and link to the next branch.
     buffer_.Store<int32_t>(position + 1 * Instr::kInstrSize, encoded_branch);
     return next;
@@ -131,6 +134,7 @@
     const int32_t far_branch =
         buffer_.Load<int32_t>(position + 1 * Instr::kInstrSize);
     const Condition c = DecodeImm14BranchCondition(guard_branch);
+    ASSERT(c != NV);
 
     // Grab the link to the next branch.
     const int32_t next = DecodeImm26BranchOffset(far_branch);
@@ -142,12 +146,6 @@
     // Encode the branch.
     const int32_t encoded_branch = EncodeImm26BranchOffset(offset, far_branch);
 
-    // If the guard branch is conditioned on NV, replace it with a nop.
-    if (c == NV) {
-      buffer_.Store<int32_t>(position + 0 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-    }
-
     // Write the far branch into the buffer and link to the next branch.
     buffer_.Store<int32_t>(position + 1 * Instr::kInstrSize, encoded_branch);
     return next;
@@ -241,10 +239,15 @@
   while (label->IsLinked()) {
     const int64_t position = label->Position();
     const int64_t dest = bound_pc - position;
-    if (IsTestAndBranch(buffer_.Load<int32_t>(position))) {
+    const int32_t instr = buffer_.Load<int32_t>(position);
+    if (IsTestAndBranch(instr)) {
       label->position_ = BindImm14Branch(position, dest);
-    } else {
+    } else if (IsConditionalBranch(instr) || IsCompareAndBranch(instr)) {
       label->position_ = BindImm19Branch(position, dest);
+    } else if (IsUnconditionalBranch(instr)) {
+      label->position_ = BindImm26Branch(position, dest);
+    } else {
+      UNREACHABLE();
     }
   }
   label->BindTo(bound_pc, lr_state());
@@ -555,8 +558,11 @@
     }
   }
   if (CanLoadFromObjectPool(object)) {
-    const intptr_t index = is_unique ? object_pool_builder().AddObject(object)
-                                     : object_pool_builder().FindObject(object);
+    const intptr_t index =
+        is_unique ? object_pool_builder().AddObject(
+                        object, ObjectPoolBuilderEntry::kPatchable)
+                  : object_pool_builder().FindObject(
+                        object, ObjectPoolBuilderEntry::kNotPatchable);
     LoadWordFromPoolIndex(dst, index);
     return;
   }
@@ -1092,33 +1098,42 @@
 void Assembler::StoreIntoObjectOffset(Register object,
                                       int32_t offset,
                                       Register value,
-                                      CanBeSmi value_can_be_smi) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
-    StoreIntoObject(object, FieldAddress(object, offset), value,
-                    value_can_be_smi);
+                                      CanBeSmi value_can_be_smi,
+                                      MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, object, offset);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
+    str(value, FieldAddress(object, offset));
   } else {
     AddImmediate(TMP, object, offset - kHeapObjectTag);
-    StoreIntoObject(object, Address(TMP), value, value_can_be_smi);
+    str(value, Address(TMP));
   }
+  StoreBarrier(object, value, value_can_be_smi);
 }
 
 void Assembler::StoreCompressedIntoObjectOffset(Register object,
                                                 int32_t offset,
                                                 Register value,
-                                                CanBeSmi value_can_be_smi) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
-    StoreCompressedIntoObject(object, FieldAddress(object, offset), value,
-                              value_can_be_smi);
+                                                CanBeSmi value_can_be_smi,
+                                                MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreReleaseCompressed(value, object, offset);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
+    str(value, FieldAddress(object, offset), kObjectBytes);
   } else {
     AddImmediate(TMP, object, offset - kHeapObjectTag);
-    StoreCompressedIntoObject(object, Address(TMP), value, value_can_be_smi);
+    str(value, Address(TMP), kObjectBytes);
   }
+  StoreBarrier(object, value, value_can_be_smi);
 }
 
 void Assembler::StoreIntoObject(Register object,
                                 const Address& dest,
                                 Register value,
-                                CanBeSmi can_be_smi) {
+                                CanBeSmi can_be_smi,
+                                MemoryOrder memory_order) {
+  // stlr does not feature an address operand.
+  ASSERT(memory_order == kRelaxedNonAtomic);
   str(value, dest);
   StoreBarrier(object, value, can_be_smi);
 }
@@ -1126,7 +1141,10 @@
 void Assembler::StoreCompressedIntoObject(Register object,
                                           const Address& dest,
                                           Register value,
-                                          CanBeSmi can_be_smi) {
+                                          CanBeSmi can_be_smi,
+                                          MemoryOrder memory_order) {
+  // stlr does not feature an address operand.
+  ASSERT(memory_order == kRelaxedNonAtomic);
   str(value, dest, kObjectBytes);
   StoreBarrier(object, value, can_be_smi);
 }
@@ -1264,7 +1282,10 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         Register value) {
+                                         Register value,
+                                         MemoryOrder memory_order) {
+  // stlr does not feature an address operand.
+  ASSERT(memory_order == kRelaxedNonAtomic);
   str(value, dest);
 #if defined(DEBUG)
   Label done;
@@ -1283,7 +1304,10 @@
 
 void Assembler::StoreCompressedIntoObjectNoBarrier(Register object,
                                                    const Address& dest,
-                                                   Register value) {
+                                                   Register value,
+                                                   MemoryOrder memory_order) {
+  // stlr does not feature an address operand.
+  ASSERT(memory_order == kRelaxedNonAtomic);
   str(value, dest, kObjectBytes);
 #if defined(DEBUG)
   Label done;
@@ -1302,8 +1326,11 @@
 
 void Assembler::StoreIntoObjectOffsetNoBarrier(Register object,
                                                int32_t offset,
-                                               Register value) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
+                                               Register value,
+                                               MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, object, offset);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
     StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value);
   } else {
     AddImmediate(TMP, object, offset - kHeapObjectTag);
@@ -1311,10 +1338,14 @@
   }
 }
 
-void Assembler::StoreCompressedIntoObjectOffsetNoBarrier(Register object,
-                                                         int32_t offset,
-                                                         Register value) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
+void Assembler::StoreCompressedIntoObjectOffsetNoBarrier(
+    Register object,
+    int32_t offset,
+    Register value,
+    MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreReleaseCompressed(value, object, offset);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
     StoreCompressedIntoObjectNoBarrier(object, FieldAddress(object, offset),
                                        value);
   } else {
@@ -1339,7 +1370,10 @@
 
 void Assembler::StoreCompressedIntoObjectNoBarrier(Register object,
                                                    const Address& dest,
-                                                   const Object& value) {
+                                                   const Object& value,
+                                                   MemoryOrder memory_order) {
+  // stlr does not feature an address operand.
+  ASSERT(memory_order == kRelaxedNonAtomic);
   ASSERT(IsOriginalObject(value));
   ASSERT(IsNotTemporaryScopedHandle(value));
   // No store buffer update.
@@ -1353,8 +1387,17 @@
 
 void Assembler::StoreIntoObjectOffsetNoBarrier(Register object,
                                                int32_t offset,
-                                               const Object& value) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
+                                               const Object& value,
+                                               MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    Register value_reg = TMP2;
+    if (IsSameObject(compiler::NullObject(), value)) {
+      value_reg = NULL_REG;
+    } else {
+      LoadObject(value_reg, value);
+    }
+    StoreIntoObjectOffsetNoBarrier(object, offset, value_reg, memory_order);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
     StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value);
   } else {
     AddImmediate(TMP, object, offset - kHeapObjectTag);
@@ -1362,10 +1405,21 @@
   }
 }
 
-void Assembler::StoreCompressedIntoObjectOffsetNoBarrier(Register object,
-                                                         int32_t offset,
-                                                         const Object& value) {
-  if (Address::CanHoldOffset(offset - kHeapObjectTag)) {
+void Assembler::StoreCompressedIntoObjectOffsetNoBarrier(
+    Register object,
+    int32_t offset,
+    const Object& value,
+    MemoryOrder memory_order) {
+  Register value_reg = TMP2;
+  if (memory_order == kRelease) {
+    if (IsSameObject(compiler::NullObject(), value)) {
+      value_reg = NULL_REG;
+    } else {
+      LoadObject(value_reg, value);
+    }
+    StoreCompressedIntoObjectOffsetNoBarrier(object, offset, value_reg,
+                                             memory_order);
+  } else if (FieldAddress::CanHoldOffset(offset)) {
     StoreCompressedIntoObjectNoBarrier(object, FieldAddress(object, offset),
                                        value);
   } else {
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index 3826473..d2432b5 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -370,6 +370,12 @@
 
 class FieldAddress : public Address {
  public:
+  static bool CanHoldOffset(int32_t offset,
+                            AddressType at = Offset,
+                            OperandSize sz = kEightBytes) {
+    return Address::CanHoldOffset(offset - kHeapObjectTag, at, sz);
+  }
+
   FieldAddress(Register base, int32_t disp, OperandSize sz = kEightBytes)
       : Address(base, disp - kHeapObjectTag, Offset, sz) {}
 
@@ -595,19 +601,32 @@
     }
   }
 
-  void StoreRelease(Register dst, Register address, int32_t offset = 0) {
+  void StoreRelease(Register src,
+                    Register address,
+                    int32_t offset = 0) override {
+    Register kDestReg = address;
     if (offset != 0) {
-      AddImmediate(TMP2, address, offset);
-      stlr(dst, TMP2);
-#if defined(USING_THREAD_SANITIZER)
-      TsanStoreRelease(TMP2);
-#endif
-    } else {
-      stlr(dst, address);
-#if defined(USING_THREAD_SANITIZER)
-      TsanStoreRelease(address);
-#endif
+      kDestReg = TMP;
+      AddImmediate(kDestReg, address, offset);
     }
+    stlr(src, kDestReg);
+#if defined(USING_THREAD_SANITIZER)
+    TsanStoreRelease(kDestReg);
+#endif
+  }
+
+  void StoreReleaseCompressed(Register src,
+                              Register address,
+                              int32_t offset = 0) {
+    Register kResultReg = address;
+    if (offset != 0) {
+      kResultReg = TMP;
+      AddImmediate(kResultReg, address, offset);
+    }
+    stlr(src, kResultReg, kObjectBytes);
+#if defined(USING_THREAD_SANITIZER)
+    TsanStoreRelease(kResultReg);
+#endif
   }
 
   void CompareWithFieldValue(Register value, FieldAddress address) {
@@ -627,7 +646,17 @@
     cmp(value, Operand(TMP), sz);
   }
 
-  void CompareTypeNullabilityWith(Register type, int8_t value) {
+  void CompareFunctionTypeNullabilityWith(Register type,
+                                          int8_t value) override {
+    EnsureHasClassIdInDEBUG(kFunctionTypeCid, type, TMP);
+    ldr(TMP,
+        FieldAddress(type, compiler::target::FunctionType::nullability_offset(),
+                     kByte),
+        kUnsignedByte);
+    cmp(TMP, Operand(value));
+  }
+  void CompareTypeNullabilityWith(Register type, int8_t value) override {
+    EnsureHasClassIdInDEBUG(kTypeCid, type, TMP);
     ldr(TMP,
         FieldAddress(type, compiler::target::Type::nullability_offset(), kByte),
         kUnsignedByte);
@@ -1192,7 +1221,11 @@
 
   // Conditional branch.
   void b(Label* label, Condition cond = AL) {
-    EmitConditionalBranch(BCOND, cond, label);
+    if (cond == AL) {
+      EmitUnconditionalBranch(B, label);
+    } else {
+      EmitConditionalBranch(BCOND, cond, label);
+    }
   }
 
   void b(int32_t offset) { EmitUnconditionalBranchOp(B, offset); }
@@ -1312,17 +1345,41 @@
     const Register crn = ConcreteRegister(rn);
     EmitFPIntCvtOp(SCVTFD, static_cast<Register>(vd), crn, kFourBytes);
   }
-  void fcvtzdsx(Register rd, VRegister vn) {
+  void fcvtzsxd(Register rd, VRegister vn) {
     ASSERT(rd != R31);
     ASSERT(rd != CSP);
     const Register crd = ConcreteRegister(rd);
-    EmitFPIntCvtOp(FCVTZDS, crd, static_cast<Register>(vn));
+    EmitFPIntCvtOp(FCVTZS_D, crd, static_cast<Register>(vn));
   }
-  void fcvtzdsw(Register rd, VRegister vn) {
+  void fcvtzswd(Register rd, VRegister vn) {
     ASSERT(rd != R31);
     ASSERT(rd != CSP);
     const Register crd = ConcreteRegister(rd);
-    EmitFPIntCvtOp(FCVTZDS, crd, static_cast<Register>(vn), kFourBytes);
+    EmitFPIntCvtOp(FCVTZS_D, crd, static_cast<Register>(vn), kFourBytes);
+  }
+  void fcvtmsxd(Register rd, VRegister vn) {
+    ASSERT(rd != R31);
+    ASSERT(rd != CSP);
+    const Register crd = ConcreteRegister(rd);
+    EmitFPIntCvtOp(FCVTMS_D, crd, static_cast<Register>(vn));
+  }
+  void fcvtmswd(Register rd, VRegister vn) {
+    ASSERT(rd != R31);
+    ASSERT(rd != CSP);
+    const Register crd = ConcreteRegister(rd);
+    EmitFPIntCvtOp(FCVTMS_D, crd, static_cast<Register>(vn), kFourBytes);
+  }
+  void fcvtpsxd(Register rd, VRegister vn) {
+    ASSERT(rd != R31);
+    ASSERT(rd != CSP);
+    const Register crd = ConcreteRegister(rd);
+    EmitFPIntCvtOp(FCVTPS_D, crd, static_cast<Register>(vn));
+  }
+  void fcvtpswd(Register rd, VRegister vn) {
+    ASSERT(rd != R31);
+    ASSERT(rd != CSP);
+    const Register crd = ConcreteRegister(rd);
+    EmitFPIntCvtOp(FCVTPS_D, crd, static_cast<Register>(vn), kFourBytes);
   }
   void fmovdd(VRegister vd, VRegister vn) { EmitFPOneSourceOp(FMOVDD, vd, vn); }
   void fabsd(VRegister vd, VRegister vn) { EmitFPOneSourceOp(FABSD, vd, vn); }
@@ -1696,7 +1753,8 @@
   // Macros accepting a pp Register argument may attempt to load values from
   // the object pool when possible. Unless you are sure that the untagged object
   // pool pointer is in another register, or that it is not available at all,
-  // PP should be passed for pp. `dest` can be TMP2, `rn` cannot.
+  // PP should be passed for pp. `dest` can be TMP2, `rn` cannot. `dest` can be
+  // TMP.
   void AddImmediate(Register dest,
                     Register rn,
                     int64_t imm,
@@ -1835,12 +1893,14 @@
   void StoreIntoObject(Register object,
                        const Address& dest,
                        Register value,
-                       CanBeSmi can_value_be_smi = kValueCanBeSmi) override;
+                       CanBeSmi can_value_be_smi = kValueCanBeSmi,
+                       MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreCompressedIntoObject(
       Register object,
       const Address& dest,
       Register value,
-      CanBeSmi can_value_be_smi = kValueCanBeSmi) override;
+      CanBeSmi can_value_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreBarrier(Register object, Register value, CanBeSmi can_value_be_smi);
   void StoreIntoArray(Register object,
                       Register slot,
@@ -1858,36 +1918,52 @@
   void StoreIntoObjectOffset(Register object,
                              int32_t offset,
                              Register value,
-                             CanBeSmi can_value_be_smi = kValueCanBeSmi);
+                             CanBeSmi can_value_be_smi = kValueCanBeSmi,
+                             MemoryOrder memory_order = kRelaxedNonAtomic);
   void StoreCompressedIntoObjectOffset(
       Register object,
       int32_t offset,
       Register value,
-      CanBeSmi can_value_be_smi = kValueCanBeSmi);
-  void StoreIntoObjectNoBarrier(Register object,
-                                const Address& dest,
-                                Register value) override;
-  void StoreCompressedIntoObjectNoBarrier(Register object,
-                                          const Address& dest,
-                                          Register value) override;
-  void StoreIntoObjectOffsetNoBarrier(Register object,
-                                      int32_t offset,
-                                      Register value);
-  void StoreCompressedIntoObjectOffsetNoBarrier(Register object,
-                                                int32_t offset,
-                                                Register value);
+      CanBeSmi can_value_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
+  void StoreCompressedIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
+  void StoreIntoObjectOffsetNoBarrier(
+      Register object,
+      int32_t offset,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreCompressedIntoObjectOffsetNoBarrier(
+      Register object,
+      int32_t offset,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
   void StoreIntoObjectNoBarrier(Register object,
                                 const Address& dest,
                                 const Object& value);
-  void StoreCompressedIntoObjectNoBarrier(Register object,
-                                          const Address& dest,
-                                          const Object& value);
-  void StoreIntoObjectOffsetNoBarrier(Register object,
-                                      int32_t offset,
-                                      const Object& value);
-  void StoreCompressedIntoObjectOffsetNoBarrier(Register object,
-                                                int32_t offset,
-                                                const Object& value);
+  void StoreCompressedIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      const Object& value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreIntoObjectOffsetNoBarrier(
+      Register object,
+      int32_t offset,
+      const Object& value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreCompressedIntoObjectOffsetNoBarrier(
+      Register object,
+      int32_t offset,
+      const Object& value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
 
   // Stores a non-tagged value into a heap object.
   void StoreInternalPointer(Register object,
@@ -2297,6 +2373,7 @@
     Emit(encoding);
   }
 
+  int32_t BindImm26Branch(int64_t position, int64_t dest);
   int32_t BindImm19Branch(int64_t position, int64_t dest);
   int32_t BindImm14Branch(int64_t position, int64_t dest);
 
@@ -2334,6 +2411,11 @@
     return static_cast<int64_t>(off);
   }
 
+  bool IsUnconditionalBranch(int32_t instr) {
+    return (instr & UnconditionalBranchMask) ==
+           (UnconditionalBranchFixed & UnconditionalBranchMask);
+  }
+
   bool IsConditionalBranch(int32_t instr) {
     return (instr & ConditionalBranchMask) ==
            (ConditionalBranchFixed & ConditionalBranchMask);
@@ -2414,6 +2496,7 @@
   void EmitConditionalBranchOp(ConditionalBranchOp op,
                                Condition cond,
                                int64_t imm) {
+    ASSERT(cond != AL);
     const int32_t off = EncodeImm19BranchOffset(imm, 0);
     const int32_t encoding =
         op | (static_cast<int32_t>(cond) << kCondShift) | off;
@@ -2433,21 +2516,16 @@
   void EmitConditionalBranch(ConditionalBranchOp op,
                              Condition cond,
                              Label* label) {
+    ASSERT(cond != AL);
     if (label->IsBound()) {
       const int64_t dest = label->Position() - buffer_.Size();
       if (use_far_branches() && !CanEncodeImm19BranchOffset(dest)) {
-        if (cond == AL) {
-          // If the condition is AL, we must always branch to dest. There is
-          // no need for a guard branch.
-          b(dest);
-        } else {
-          EmitConditionalBranchOp(op, InvertCondition(cond),
-                                  2 * Instr::kInstrSize);
-          // Make a new dest that takes the new position into account after the
-          // inverted test.
-          const int64_t dest = label->Position() - buffer_.Size();
-          b(dest);
-        }
+        EmitConditionalBranchOp(op, InvertCondition(cond),
+                                2 * Instr::kInstrSize);
+        // Make a new dest that takes the new position into account after the
+        // inverted test.
+        const int64_t dest = label->Position() - buffer_.Size();
+        b(dest);
       } else {
         EmitConditionalBranchOp(op, cond, dest);
       }
@@ -2540,6 +2618,18 @@
     Emit(encoding);
   }
 
+  void EmitUnconditionalBranch(UnconditionalBranchOp op, Label* label) {
+    if (label->IsBound()) {
+      const int64_t dest = label->Position() - buffer_.Size();
+      EmitUnconditionalBranchOp(op, dest);
+      label->UpdateLRState(lr_state());
+    } else {
+      const int64_t position = buffer_.Size();
+      EmitUnconditionalBranchOp(op, label->position_);
+      label->LinkTo(position, lr_state());
+    }
+  }
+
   void EmitUnconditionalBranchRegOp(UnconditionalBranchRegOp op, Register rn) {
     ASSERT((rn != CSP) && (rn != R31));
     const int32_t encoding = op | Arm64Encode::Rn(rn);
diff --git a/runtime/vm/compiler/assembler/assembler_arm64_test.cc b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
index 03f8341..a54fe57 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
@@ -3161,69 +3161,206 @@
   EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
 }
 
-ASSEMBLER_TEST_GENERATE(Fcvtzdsx, assembler) {
-  __ LoadDImmediate(V0, 42.0);
-  __ fcvtzdsx(R0, V0);
+ASSEMBLER_TEST_GENERATE(Fcvtzsxd, assembler) {
+  __ LoadDImmediate(V0, 42.5);
+  __ fcvtzsxd(R0, V0);
   __ ret();
 }
 
-ASSEMBLER_TEST_RUN(Fcvtzdsx, test) {
+ASSEMBLER_TEST_RUN(Fcvtzsxd, test) {
   typedef int64_t (*Int64Return)() DART_UNUSED;
   EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
 }
 
-ASSEMBLER_TEST_GENERATE(Fcvtzdsw, assembler) {
-  __ LoadDImmediate(V0, 42.0);
-  __ fcvtzdsw(R0, V0);
-  __ ret();
-}
-
-ASSEMBLER_TEST_RUN(Fcvtzdsw, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
-}
-
-ASSEMBLER_TEST_GENERATE(Fcvtzdsx_overflow, assembler) {
-  __ LoadDImmediate(V0, 1e20);
-  __ fcvtzdsx(R0, V0);
-  __ ret();
-}
-
-ASSEMBLER_TEST_RUN(Fcvtzdsx_overflow, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(kMaxInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
-}
-
-ASSEMBLER_TEST_GENERATE(Fcvtzdsx_overflow_negative, assembler) {
-  __ LoadDImmediate(V0, -1e20);
-  __ fcvtzdsx(R0, V0);
-  __ ret();
-}
-
-ASSEMBLER_TEST_RUN(Fcvtzdsx_overflow_negative, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(kMinInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
-}
-
-ASSEMBLER_TEST_GENERATE(Fcvtzdsw_overflow, assembler) {
-  __ LoadDImmediate(V0, 1e10);
-  __ fcvtzdsw(R0, V0);
-  __ ret();
-}
-
-ASSEMBLER_TEST_RUN(Fcvtzdsw_overflow, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
-}
-
-ASSEMBLER_TEST_GENERATE(Fcvtzdsw_overflow_negative, assembler) {
-  __ LoadDImmediate(V0, -1e10);
-  __ fcvtzdsw(R0, V0);
+ASSEMBLER_TEST_GENERATE(Fcvtzswd, assembler) {
+  __ LoadDImmediate(V0, -42.5);
+  __ fcvtzswd(R0, V0);
   __ sxtw(R0, R0);
   __ ret();
 }
 
-ASSEMBLER_TEST_RUN(Fcvtzdsw_overflow_negative, test) {
+ASSEMBLER_TEST_RUN(Fcvtzswd, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtzsxd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e20);
+  __ fcvtzsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtzsxd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtzsxd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e20);
+  __ fcvtzsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtzsxd_overflow_negative, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMinInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtzswd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e10);
+  __ fcvtzswd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtzswd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtzswd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e10);
+  __ fcvtzswd(R0, V0);
+  __ sxtw(R0, R0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtzswd_overflow_negative, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMinInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpsxd, assembler) {
+  __ LoadDImmediate(V0, 42.5);
+  __ fcvtpsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpsxd, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(43, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpswd, assembler) {
+  __ LoadDImmediate(V0, -42.5);
+  __ fcvtpswd(R0, V0);
+  __ sxtw(R0, R0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpswd, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpsxd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e20);
+  __ fcvtpsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpsxd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpsxd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e20);
+  __ fcvtpsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpsxd_overflow_negative, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMinInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpswd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e10);
+  __ fcvtpswd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpswd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtpswd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e10);
+  __ fcvtpswd(R0, V0);
+  __ sxtw(R0, R0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtpswd_overflow_negative, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMinInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmsxd, assembler) {
+  __ LoadDImmediate(V0, 42.5);
+  __ fcvtmsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmsxd, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmswd, assembler) {
+  __ LoadDImmediate(V0, -42.5);
+  __ fcvtmswd(R0, V0);
+  __ sxtw(R0, R0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmswd, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(-43, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmsxd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e20);
+  __ fcvtmsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmsxd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmsxd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e20);
+  __ fcvtmsxd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmsxd_overflow_negative, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMinInt64, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmswd_overflow, assembler) {
+  __ LoadDImmediate(V0, 1e10);
+  __ fcvtmswd(R0, V0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmswd_overflow, test) {
+  typedef int64_t (*Int64Return)() DART_UNUSED;
+  EXPECT_EQ(kMaxInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Fcvtmswd_overflow_negative, assembler) {
+  __ LoadDImmediate(V0, -1e10);
+  __ fcvtmswd(R0, V0);
+  __ sxtw(R0, R0);
+  __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Fcvtmswd_overflow_negative, test) {
   typedef int64_t (*Int64Return)() DART_UNUSED;
   EXPECT_EQ(kMinInt32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
 }
diff --git a/runtime/vm/compiler/assembler/assembler_base.h b/runtime/vm/compiler/assembler/assembler_base.h
index 1f22998..ad8aa79 100644
--- a/runtime/vm/compiler/assembler/assembler_base.h
+++ b/runtime/vm/compiler/assembler/assembler_base.h
@@ -635,6 +635,16 @@
     kValueIsNotSmi,
   };
 
+  enum MemoryOrder {
+    // All previous writes to memory in this thread must be visible to other
+    // threads. Currently, only used for lazily populating hash indices in
+    // shared const maps and sets.
+    kRelease,
+
+    // All other stores.
+    kRelaxedNonAtomic,
+  };
+
   virtual void LoadField(Register dst, const FieldAddress& address) = 0;
   virtual void LoadFieldFromOffset(Register reg,
                                    Register base,
@@ -646,11 +656,13 @@
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
       Register value,       // Value we are storing.
-      CanBeSmi can_be_smi = kValueCanBeSmi) = 0;
+      CanBeSmi can_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic) = 0;
   virtual void StoreIntoObjectNoBarrier(
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
-      Register value) = 0;  // Value we are storing.
+      Register value,       // Value we are storing.
+      MemoryOrder memory_order = kRelaxedNonAtomic) = 0;
   // For native unboxed slots, both methods are the same, as no write barrier
   // is needed.
   void StoreToSlot(Register src, Register base, const Slot& slot);
@@ -669,11 +681,13 @@
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
       Register value,       // Value we are storing.
-      CanBeSmi can_be_smi = kValueCanBeSmi) = 0;
+      CanBeSmi can_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic) = 0;
   virtual void StoreCompressedIntoObjectNoBarrier(
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
-      Register value) = 0;  // Value we are storing.
+      Register value,       // Value we are storing.
+      MemoryOrder memory_order = kRelaxedNonAtomic) = 0;
 #else
   virtual void LoadCompressedField(Register dst, const FieldAddress& address) {
     LoadField(dst, address);
@@ -687,17 +701,37 @@
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
       Register value,       // Value we are storing.
-      CanBeSmi can_be_smi = kValueCanBeSmi) {
+      CanBeSmi can_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic) {
     StoreIntoObject(object, dest, value, can_be_smi);
   }
   virtual void StoreCompressedIntoObjectNoBarrier(
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
-      Register value) {     // Value we are storing.
+      Register value,       // Value we are storing.
+      MemoryOrder memory_order = kRelaxedNonAtomic) {
     StoreIntoObjectNoBarrier(object, dest, value);
   }
 #endif  // defined(DART_COMPRESSED_POINTERS)
 
+  virtual void StoreRelease(Register src,
+                            Register address,
+                            int32_t offset = 0) = 0;
+
+  // Retrieves nullability from a FunctionTypePtr in [type] and compares it
+  // to [value].
+  //
+  // TODO(dartbug.com/47034): Change how nullability is stored so that it
+  // can be accessed without checking the class id first.
+  virtual void CompareFunctionTypeNullabilityWith(Register type,
+                                                  int8_t value) = 0;
+
+  // Retrieves nullability from a TypePtr in [type] and compares it to [value].
+  //
+  // TODO(dartbug.com/47034): Change how nullability is stored so that it
+  // can be accessed without checking the class id first.
+  virtual void CompareTypeNullabilityWith(Register type, int8_t value) = 0;
+
   virtual void EnsureHasClassIdInDEBUG(intptr_t cid,
                                        Register src,
                                        Register scratch,
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index 05b6d4b..459cbf2 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -2024,11 +2024,16 @@
 void Assembler::StoreIntoObject(Register object,
                                 const Address& dest,
                                 Register value,
-                                CanBeSmi can_be_smi) {
+                                CanBeSmi can_be_smi,
+                                MemoryOrder memory_order) {
   // x.slot = x. Barrier should have be removed at the IL level.
   ASSERT(object != value);
 
-  movl(dest, value);
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest.base(), dest.disp32());
+  } else {
+    movl(dest, value);
+  }
   Label done;
   StoreIntoObjectFilter(object, value, &done, can_be_smi, kJumpToNoUpdate);
   // A store buffer update is required.
@@ -2047,8 +2052,13 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         Register value) {
-  movl(dest, value);
+                                         Register value,
+                                         MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest.base(), dest.disp32());
+  } else {
+    movl(dest, value);
+  }
 #if defined(DEBUG)
   Label done;
   pushl(value);
@@ -2109,8 +2119,20 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         const Object& value) {
+                                         const Object& value,
+                                         MemoryOrder memory_order) {
   ASSERT(IsOriginalObject(value));
+  // Ignoring memory_order.
+  // On intel stores have store-release behavior (i.e. stores are not
+  // re-ordered with other stores).
+  // We don't run TSAN on 32 bit systems.
+  // Don't call StoreRelease here because we would have to load the immediate
+  // into a temp register which causes spilling.
+#if defined(USING_THREAD_SANITIZER)
+  if (memory_order == kRelease) {
+    UNIMPLEMENTED();
+  }
+#endif
   if (target::CanEmbedAsRawPointerInGeneratedCode(value)) {
     Immediate imm_value(target::ToRawPointer(value));
     movl(dest, imm_value);
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.h b/runtime/vm/compiler/assembler/assembler_ia32.h
index 091b2a1..6bd5f28 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.h
+++ b/runtime/vm/compiler/assembler/assembler_ia32.h
@@ -672,10 +672,14 @@
     // with other loads).
     movl(dst, Address(address, offset));
   }
-  void StoreRelease(Register src, Register address, int32_t offset = 0) {
+  void StoreRelease(Register src,
+                    Register address,
+                    int32_t offset = 0) override {
     // On intel stores have store-release behavior (i.e. stores are not
     // re-ordered with other stores).
     movl(Address(address, offset), src);
+
+    // We don't run TSAN on 32 bit systems.
   }
 
   void ExtendValue(Register to, Register from, OperandSize sz) override;
@@ -741,17 +745,21 @@
   void StoreIntoObject(Register object,      // Object we are storing into.
                        const Address& dest,  // Where we are storing into.
                        Register value,       // Value we are storing.
-                       CanBeSmi can_value_be_smi = kValueCanBeSmi) override;
+                       CanBeSmi can_value_be_smi = kValueCanBeSmi,
+                       MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreIntoArray(Register object,  // Object we are storing into.
                       Register slot,    // Where we are storing into.
                       Register value,   // Value we are storing.
                       CanBeSmi can_value_be_smi = kValueCanBeSmi);
+  void StoreIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreIntoObjectNoBarrier(Register object,
                                 const Address& dest,
-                                Register value) override;
-  void StoreIntoObjectNoBarrier(Register object,
-                                const Address& dest,
-                                const Object& value);
+                                const Object& value,
+                                MemoryOrder memory_order = kRelaxedNonAtomic);
 
   // Stores a non-tagged value into a heap object.
   void StoreInternalPointer(Register object,
@@ -774,7 +782,13 @@
     cmpxchgl(address, reg);
   }
 
-  void CompareTypeNullabilityWith(Register type, int8_t value) {
+  void CompareFunctionTypeNullabilityWith(Register type,
+                                          int8_t value) override {
+    cmpb(FieldAddress(type,
+                      compiler::target::FunctionType::nullability_offset()),
+         Immediate(value));
+  }
+  void CompareTypeNullabilityWith(Register type, int8_t value) override {
     cmpb(FieldAddress(type, compiler::target::Type::nullability_offset()),
          Immediate(value));
   }
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index 22b6673..d2dc30c 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -1287,8 +1287,11 @@
     }
   }
   if (CanLoadFromObjectPool(object)) {
-    const intptr_t index = is_unique ? object_pool_builder().AddObject(object)
-                                     : object_pool_builder().FindObject(object);
+    const intptr_t index =
+        is_unique ? object_pool_builder().AddObject(
+                        object, ObjectPoolBuilderEntry::kPatchable)
+                  : object_pool_builder().FindObject(
+                        object, ObjectPoolBuilderEntry::kNotPatchable);
     LoadWordFromPoolIndex(dst, index);
     return;
   }
@@ -1440,16 +1443,26 @@
 void Assembler::StoreIntoObject(Register object,
                                 const Address& dest,
                                 Register value,
-                                CanBeSmi can_be_smi) {
-  movq(dest, value);
+                                CanBeSmi can_be_smi,
+                                MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest.base(), dest.disp32());
+  } else {
+    movq(dest, value);
+  }
   StoreBarrier(object, value, can_be_smi);
 }
 
 void Assembler::StoreCompressedIntoObject(Register object,
                                           const Address& dest,
                                           Register value,
-                                          CanBeSmi can_be_smi) {
-  OBJ(mov)(dest, value);
+                                          CanBeSmi can_be_smi,
+                                          MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreReleaseCompressed(value, dest.base(), dest.disp8());
+  } else {
+    OBJ(mov)(dest, value);
+  }
   StoreBarrier(object, value, can_be_smi);
 }
 
@@ -1560,8 +1573,13 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         Register value) {
-  movq(dest, value);
+                                         Register value,
+                                         MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreRelease(value, dest.base(), dest.disp32());
+  } else {
+    movq(dest, value);
+  }
 #if defined(DEBUG)
   Label done;
   pushq(value);
@@ -1580,8 +1598,13 @@
 
 void Assembler::StoreCompressedIntoObjectNoBarrier(Register object,
                                                    const Address& dest,
-                                                   Register value) {
-  OBJ(mov)(dest, value);
+                                                   Register value,
+                                                   MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    StoreReleaseCompressed(value, dest.base(), dest.disp8());
+  } else {
+    OBJ(mov)(dest, value);
+  }
 #if defined(DEBUG)
   Label done;
   pushq(value);
@@ -1600,15 +1623,22 @@
 
 void Assembler::StoreIntoObjectNoBarrier(Register object,
                                          const Address& dest,
-                                         const Object& value) {
-  StoreObject(dest, value);
+                                         const Object& value,
+                                         MemoryOrder memory_order) {
+  if (memory_order == kRelease) {
+    LoadObject(TMP, value);
+    StoreIntoObjectNoBarrier(object, dest, TMP, memory_order);
+  } else {
+    StoreObject(dest, value);
+  }
 }
 
 void Assembler::StoreCompressedIntoObjectNoBarrier(Register object,
                                                    const Address& dest,
-                                                   const Object& value) {
+                                                   const Object& value,
+                                                   MemoryOrder memory_order) {
   LoadObject(TMP, value);
-  StoreCompressedIntoObjectNoBarrier(object, dest, TMP);
+  StoreCompressedIntoObjectNoBarrier(object, dest, TMP, memory_order);
 }
 
 void Assembler::StoreInternalPointer(Register object,
diff --git a/runtime/vm/compiler/assembler/assembler_x64.h b/runtime/vm/compiler/assembler/assembler_x64.h
index e32a0a4..237bd61 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.h
+++ b/runtime/vm/compiler/assembler/assembler_x64.h
@@ -789,12 +789,14 @@
   void StoreIntoObject(Register object,      // Object we are storing into.
                        const Address& dest,  // Where we are storing into.
                        Register value,       // Value we are storing.
-                       CanBeSmi can_be_smi = kValueCanBeSmi) override;
+                       CanBeSmi can_be_smi = kValueCanBeSmi,
+                       MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreCompressedIntoObject(
       Register object,      // Object we are storing into.
       const Address& dest,  // Where we are storing into.
       Register value,       // Value we are storing.
-      CanBeSmi can_be_smi = kValueCanBeSmi) override;
+      CanBeSmi can_be_smi = kValueCanBeSmi,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreBarrier(Register object,  // Object we are storing into.
                     Register value,   // Value we are storing.
                     CanBeSmi can_be_smi);
@@ -807,18 +809,25 @@
                                 Register value,   // Value we are storing.
                                 CanBeSmi can_be_smi = kValueCanBeSmi);
 
+  void StoreIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
+  void StoreCompressedIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      Register value,
+      MemoryOrder memory_order = kRelaxedNonAtomic) override;
   void StoreIntoObjectNoBarrier(Register object,
                                 const Address& dest,
-                                Register value) override;
-  void StoreCompressedIntoObjectNoBarrier(Register object,
-                                          const Address& dest,
-                                          Register value) override;
-  void StoreIntoObjectNoBarrier(Register object,
-                                const Address& dest,
-                                const Object& value);
-  void StoreCompressedIntoObjectNoBarrier(Register object,
-                                          const Address& dest,
-                                          const Object& value);
+                                const Object& value,
+                                MemoryOrder memory_order = kRelaxedNonAtomic);
+  void StoreCompressedIntoObjectNoBarrier(
+      Register object,
+      const Address& dest,
+      const Object& value,
+      MemoryOrder memory_order = kRelaxedNonAtomic);
 
   // Stores a non-tagged value into a heap object.
   void StoreInternalPointer(Register object,
@@ -1063,7 +1072,9 @@
     TsanLoadAcquire(Address(address, offset));
 #endif
   }
-  void StoreRelease(Register src, Register address, int32_t offset = 0) {
+  void StoreRelease(Register src,
+                    Register address,
+                    int32_t offset = 0) override {
     // On intel stores have store-release behavior (i.e. stores are not
     // re-ordered with other stores).
     movq(Address(address, offset), src);
@@ -1071,6 +1082,16 @@
     TsanStoreRelease(Address(address, offset));
 #endif
   }
+  void StoreReleaseCompressed(Register src,
+                              Register address,
+                              int32_t offset = 0) {
+    // On intel stores have store-release behavior (i.e. stores are not
+    // re-ordered with other stores).
+    OBJ(mov)(Address(address, offset), src);
+#if defined(USING_THREAD_SANITIZER)
+    TsanStoreRelease(Address(address, offset));
+#endif
+  }
 
   void CompareWithFieldValue(Register value, FieldAddress address) {
     cmpq(value, address);
@@ -1081,7 +1102,15 @@
     OBJ(cmp)(value, FieldAddress(base, offset));
   }
 
-  void CompareTypeNullabilityWith(Register type, int8_t value) {
+  void CompareFunctionTypeNullabilityWith(Register type,
+                                          int8_t value) override {
+    EnsureHasClassIdInDEBUG(kFunctionTypeCid, type, TMP);
+    cmpb(FieldAddress(type,
+                      compiler::target::FunctionType::nullability_offset()),
+         Immediate(value));
+  }
+  void CompareTypeNullabilityWith(Register type, int8_t value) override {
+    EnsureHasClassIdInDEBUG(kTypeCid, type, TMP);
     cmpb(FieldAddress(type, compiler::target::Type::nullability_offset()),
          Immediate(value));
   }
diff --git a/runtime/vm/compiler/assembler/disassembler_arm64.cc b/runtime/vm/compiler/assembler/disassembler_arm64.cc
index 08529fe..8f441ef 100644
--- a/runtime/vm/compiler/assembler/disassembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/disassembler_arm64.cc
@@ -1435,8 +1435,12 @@
       Format(instr, "fmovrd'sf 'rd, 'vn");
     } else if (instr->Bits(16, 5) == 7) {
       Format(instr, "fmovdr'sf 'vd, 'rn");
+    } else if (instr->Bits(16, 5) == 8) {
+      Format(instr, "fcvtps'sf 'rd, 'vn");
+    } else if (instr->Bits(16, 5) == 16) {
+      Format(instr, "fcvtms'sf 'rd, 'vn");
     } else if (instr->Bits(16, 5) == 24) {
-      Format(instr, "fcvtzds'sf 'rd, 'vn");
+      Format(instr, "fcvtzs'sf 'rd, 'vn");
     } else {
       Unknown(instr);
     }
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index d920a61..9355b01 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -442,10 +442,9 @@
 }
 #endif
 
-void FlowGraphCompiler::RecordCatchEntryMoves(Environment* env,
-                                              intptr_t try_index) {
+void FlowGraphCompiler::RecordCatchEntryMoves(Environment* env) {
 #if defined(DART_PRECOMPILER)
-  try_index = try_index != kInvalidTryIndex ? try_index : CurrentTryIndex();
+  const intptr_t try_index = CurrentTryIndex();
   if (is_optimizing() && env != nullptr && (try_index != kInvalidTryIndex)) {
     env = env->Outermost();
     CatchBlockEntryInstr* catch_block =
@@ -487,7 +486,7 @@
 
     catch_entry_moves_maps_builder_->EndMapping();
   }
-#endif  // defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
+#endif  // defined(DART_PRECOMPILER)
 }
 
 void FlowGraphCompiler::EmitCallsiteMetadata(const InstructionSource& source,
@@ -1449,8 +1448,7 @@
   }
 
   if (is_optimizing()) {
-    EmitMegamorphicInstanceCall(ic_data_in, deopt_id, source, locs,
-                                kInvalidTryIndex);
+    EmitMegamorphicInstanceCall(ic_data_in, deopt_id, source, locs);
     return;
   }
 
@@ -1623,8 +1621,15 @@
       blocked_registers[loc.reg()] = true;
     } else if (loc.IsFpuRegister()) {
       // Check that a register is not specified twice in the summary.
-      ASSERT(!blocked_fpu_registers[loc.fpu_reg()]);
-      blocked_fpu_registers[loc.fpu_reg()] = true;
+      const FpuRegister fpu_reg = loc.fpu_reg();
+      if ((fpu_reg < 0) || (fpu_reg >= kNumberOfFpuRegisters)) {
+        // Debug prints for https://github.com/dart-lang/sdk/issues/47314.
+        OS::PrintErr("input(%" Pd ") fpu_reg = %d\n", i, fpu_reg);
+        OS::PrintErr("instr = %s\n", instr->ToCString());
+        UNREACHABLE();
+      }
+      ASSERT(!blocked_fpu_registers[fpu_reg]);
+      blocked_fpu_registers[fpu_reg] = true;
     }
   }
 
@@ -1636,8 +1641,15 @@
       blocked_registers[loc.reg()] = true;
     } else if (loc.IsFpuRegister()) {
       // Check that a register is not specified twice in the summary.
-      ASSERT(!blocked_fpu_registers[loc.fpu_reg()]);
-      blocked_fpu_registers[loc.fpu_reg()] = true;
+      const FpuRegister fpu_reg = loc.fpu_reg();
+      if ((fpu_reg < 0) || (fpu_reg >= kNumberOfFpuRegisters)) {
+        // Debug prints for https://github.com/dart-lang/sdk/issues/47314.
+        OS::PrintErr("temp(%" Pd ") fpu_reg = %d\n", i, fpu_reg);
+        OS::PrintErr("instr = %s\n", instr->ToCString());
+        UNREACHABLE();
+      }
+      ASSERT(!blocked_fpu_registers[fpu_reg]);
+      blocked_fpu_registers[fpu_reg] = true;
     }
   }
 
@@ -2394,9 +2406,8 @@
     __ Bind(&next_test);
   }
   if (add_megamorphic_call) {
-    int try_index = kInvalidTryIndex;
     EmitMegamorphicInstanceCall(function_name, arguments_descriptor, deopt_id,
-                                source_index, locs, try_index);
+                                source_index, locs);
   }
 }
 
@@ -3232,6 +3243,7 @@
 #define __ compiler->assembler()->
 
 void ThrowErrorSlowPathCode::EmitNativeCode(FlowGraphCompiler* compiler) {
+  RELEASE_ASSERT(try_index_ == compiler->CurrentTryIndex());
   if (compiler::Assembler::EmittingComments()) {
     __ Comment("slow path %s operation", name());
   }
@@ -3254,18 +3266,17 @@
     __ CallRuntime(runtime_entry_, num_args);
   }
   const intptr_t deopt_id = instruction()->deopt_id();
-  compiler->AddDescriptor(UntaggedPcDescriptors::kOther,
-                          compiler->assembler()->CodeSize(), deopt_id,
-                          instruction()->source(), try_index_);
+  compiler->AddCurrentDescriptor(UntaggedPcDescriptors::kOther, deopt_id,
+                                 instruction()->source());
   AddMetadataForRuntimeCall(compiler);
   compiler->RecordSafepoint(locs, num_args);
-  if (!FLAG_precompiled_mode || (try_index_ != kInvalidTryIndex) ||
+  if (!FLAG_precompiled_mode ||
       (compiler->CurrentTryIndex() != kInvalidTryIndex)) {
     Environment* env =
         compiler->SlowPathEnvironmentFor(instruction(), num_args);
     // TODO(47044): Should be able to say `FLAG_precompiled_mode` instead.
     if (CompilerState::Current().is_aot()) {
-      compiler->RecordCatchEntryMoves(env, try_index_);
+      compiler->RecordCatchEntryMoves(env);
     } else if (compiler->is_optimizing()) {
       ASSERT(env != nullptr);
       compiler->AddSlowPathDeoptInfo(deopt_id, env);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index c49546e..c6cda87 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -298,9 +298,11 @@
   const Register result_;
 };
 
-class DoubleToIntegerSlowPath : public TemplateSlowPathCode<Instruction> {
+class DoubleToIntegerSlowPath
+    : public TemplateSlowPathCode<DoubleToIntegerInstr> {
  public:
-  DoubleToIntegerSlowPath(Instruction* instruction, FpuRegister value_reg)
+  DoubleToIntegerSlowPath(DoubleToIntegerInstr* instruction,
+                          FpuRegister value_reg)
       : TemplateSlowPathCode(instruction), value_reg_(value_reg) {}
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler);
@@ -758,24 +760,19 @@
   void EmitMegamorphicInstanceCall(const ICData& icdata,
                                    intptr_t deopt_id,
                                    const InstructionSource& source,
-                                   LocationSummary* locs,
-                                   intptr_t try_index,
-                                   intptr_t slow_path_argument_count = 0) {
+                                   LocationSummary* locs) {
     const String& name = String::Handle(icdata.target_name());
     const Array& arguments_descriptor =
         Array::Handle(icdata.arguments_descriptor());
     EmitMegamorphicInstanceCall(name, arguments_descriptor, deopt_id, source,
-                                locs, try_index);
+                                locs);
   }
 
-  // Pass a value for try-index where block is not available (e.g. slow path).
   void EmitMegamorphicInstanceCall(const String& function_name,
                                    const Array& arguments_descriptor,
                                    intptr_t deopt_id,
                                    const InstructionSource& source,
-                                   LocationSummary* locs,
-                                   intptr_t try_index,
-                                   intptr_t slow_path_argument_count = 0);
+                                   LocationSummary* locs);
 
   void EmitInstanceCallAOT(
       const ICData& ic_data,
@@ -816,8 +813,7 @@
 
   void EmitEdgeCounter(intptr_t edge_id);
 
-  void RecordCatchEntryMoves(Environment* env,
-                             intptr_t try_index = kInvalidTryIndex);
+  void RecordCatchEntryMoves(Environment* env);
 
   void EmitCallToStub(const Code& stub);
   void EmitTailCallToStub(const Code& stub);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 746b275..fbe3e61 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -566,9 +566,7 @@
     const Array& arguments_descriptor,
     intptr_t deopt_id,
     const InstructionSource& source,
-    LocationSummary* locs,
-    intptr_t try_index,
-    intptr_t slow_path_argument_count) {
+    LocationSummary* locs) {
   ASSERT(CanCallDart());
   ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
   const ArgumentsDescriptor args_desc(arguments_descriptor);
@@ -584,7 +582,7 @@
   if (FLAG_precompiled_mode) {
     if (FLAG_use_bare_instructions) {
       // The AOT runtime will replace the slot in the object pool with the
-      // entrypoint address - see clustered_snapshot.cc.
+      // entrypoint address - see app_snapshot.cc.
       CLOBBERS_LR(__ LoadUniqueObject(LR, StubCode::MegamorphicCall()));
     } else {
       __ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
@@ -603,26 +601,20 @@
         CODE_REG, Code::entry_point_offset(Code::EntryKind::kMonomorphic)));
   }
 
-  RecordSafepoint(locs, slow_path_argument_count);
-  const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
-  if (FLAG_precompiled_mode) {
-    // Megamorphic calls may occur in slow path stubs.
-    // If valid use try_index argument.
-    if (try_index == kInvalidTryIndex) {
-      try_index = CurrentTryIndex();
+  RecordSafepoint(locs);
+  AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
+  if (!FLAG_precompiled_mode) {
+    const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
+    if (is_optimizing()) {
+      AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
+    } else {
+      // Add deoptimization continuation point after the call and before the
+      // arguments are removed.
+      AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after,
+                           source);
     }
-    AddDescriptor(UntaggedPcDescriptors::kOther, assembler()->CodeSize(),
-                  DeoptId::kNone, source, try_index);
-  } else if (is_optimizing()) {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
-  } else {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    // Add deoptimization continuation point after the call and before the
-    // arguments are removed.
-    AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after, source);
   }
-  RecordCatchEntryMoves(pending_deoptimization_env_, try_index);
+  RecordCatchEntryMoves(pending_deoptimization_env_);
   __ Drop(args_desc.SizeWithTypeArgs());
 }
 
@@ -651,7 +643,7 @@
       (ic_data.SizeWithoutTypeArgs() - 1) * compiler::target::kWordSize);
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
     // The AOT runtime will replace the slot in the object pool with the
-    // entrypoint address - see clustered_snapshot.cc.
+    // entrypoint address - see app_snapshot.cc.
     CLOBBERS_LR(__ LoadUniqueObject(LR, initial_stub));
   } else {
     __ LoadUniqueObject(CODE_REG, initial_stub);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 4cc8af9..da37d86 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -557,9 +557,7 @@
     const Array& arguments_descriptor,
     intptr_t deopt_id,
     const InstructionSource& source,
-    LocationSummary* locs,
-    intptr_t try_index,
-    intptr_t slow_path_argument_count) {
+    LocationSummary* locs) {
   ASSERT(CanCallDart());
   ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
   const ArgumentsDescriptor args_desc(arguments_descriptor);
@@ -580,7 +578,7 @@
   ASSERT((data_index + 1) == stub_index);
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
     // The AOT runtime will replace the slot in the object pool with the
-    // entrypoint address - see clustered_snapshot.cc.
+    // entrypoint address - see app_snapshot.cc.
     CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
   } else {
     __ LoadDoubleWordFromPoolIndex(R5, CODE_REG, data_index);
@@ -590,26 +588,20 @@
   }
   CLOBBERS_LR(__ blr(LR));
 
-  RecordSafepoint(locs, slow_path_argument_count);
-  const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
-  if (FLAG_precompiled_mode) {
-    // Megamorphic calls may occur in slow path stubs.
-    // If valid use try_index argument.
-    if (try_index == kInvalidTryIndex) {
-      try_index = CurrentTryIndex();
+  RecordSafepoint(locs);
+  AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
+  if (!FLAG_precompiled_mode) {
+    const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
+    if (is_optimizing()) {
+      AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
+    } else {
+      // Add deoptimization continuation point after the call and before the
+      // arguments are removed.
+      AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after,
+                           source);
     }
-    AddDescriptor(UntaggedPcDescriptors::kOther, assembler()->CodeSize(),
-                  DeoptId::kNone, source, try_index);
-  } else if (is_optimizing()) {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
-  } else {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    // Add deoptimization continuation point after the call and before the
-    // arguments are removed.
-    AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after, source);
   }
-  RecordCatchEntryMoves(pending_deoptimization_env_, try_index);
+  RecordCatchEntryMoves(pending_deoptimization_env_);
   __ Drop(args_desc.SizeWithTypeArgs());
 }
 
@@ -646,7 +638,7 @@
 
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
     // The AOT runtime will replace the slot in the object pool with the
-    // entrypoint address - see clustered_snapshot.cc.
+    // entrypoint address - see app_snapshot.cc.
     CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
   } else {
     __ LoadDoubleWordFromPoolIndex(R5, CODE_REG, data_index);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index 5201548..0b232dd 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -596,9 +596,7 @@
     const Array& arguments_descriptor,
     intptr_t deopt_id,
     const InstructionSource& source,
-    LocationSummary* locs,
-    intptr_t try_index,
-    intptr_t slow_path_argument_count) {
+    LocationSummary* locs) {
   ASSERT(CanCallDart());
   ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
   const ArgumentsDescriptor args_desc(arguments_descriptor);
@@ -615,7 +613,7 @@
       CODE_REG, Code::entry_point_offset(Code::EntryKind::kMonomorphic)));
 
   AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-  RecordSafepoint(locs, slow_path_argument_count);
+  RecordSafepoint(locs);
   const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
   // Precompilation not implemented on ia32 platform.
   ASSERT(!FLAG_precompiled_mode);
@@ -626,7 +624,7 @@
     // arguments are removed.
     AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after, source);
   }
-  RecordCatchEntryMoves(pending_deoptimization_env_, try_index);
+  RecordCatchEntryMoves(pending_deoptimization_env_);
   __ Drop(args_desc.SizeWithTypeArgs());
 }
 
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 0dcad25..573add6 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -566,9 +566,7 @@
     const Array& arguments_descriptor,
     intptr_t deopt_id,
     const InstructionSource& source,
-    LocationSummary* locs,
-    intptr_t try_index,
-    intptr_t slow_path_argument_count) {
+    LocationSummary* locs) {
   ASSERT(CanCallDart());
   ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
   const ArgumentsDescriptor args_desc(arguments_descriptor);
@@ -583,7 +581,7 @@
   if (FLAG_precompiled_mode) {
     if (FLAG_use_bare_instructions) {
       // The AOT runtime will replace the slot in the object pool with the
-      // entrypoint address - see clustered_snapshot.cc.
+      // entrypoint address - see app_snapshot.cc.
       __ LoadUniqueObject(RCX, StubCode::MegamorphicCall());
     } else {
       __ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
@@ -600,26 +598,20 @@
         CODE_REG, Code::entry_point_offset(Code::EntryKind::kMonomorphic)));
   }
 
-  RecordSafepoint(locs, slow_path_argument_count);
-  const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
-  if (FLAG_precompiled_mode) {
-    // Megamorphic calls may occur in slow path stubs.
-    // If valid use try_index argument.
-    if (try_index == kInvalidTryIndex) {
-      try_index = CurrentTryIndex();
+  RecordSafepoint(locs);
+  AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
+  if (!FLAG_precompiled_mode) {
+    const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
+    if (is_optimizing()) {
+      AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
+    } else {
+      // Add deoptimization continuation point after the call and before the
+      // arguments are removed.
+      AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after,
+                           source);
     }
-    AddDescriptor(UntaggedPcDescriptors::kOther, assembler()->CodeSize(),
-                  DeoptId::kNone, source, try_index);
-  } else if (is_optimizing()) {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    AddDeoptIndexAtCall(deopt_id_after, pending_deoptimization_env_);
-  } else {
-    AddCurrentDescriptor(UntaggedPcDescriptors::kOther, DeoptId::kNone, source);
-    // Add deoptimization continuation point after the call and before the
-    // arguments are removed.
-    AddCurrentDescriptor(UntaggedPcDescriptors::kDeopt, deopt_id_after, source);
   }
-  RecordCatchEntryMoves(pending_deoptimization_env_, try_index);
+  RecordCatchEntryMoves(pending_deoptimization_env_);
   __ Drop(args_desc.SizeWithTypeArgs(), RCX);
 }
 
@@ -647,7 +639,7 @@
                    RSP, (ic_data.SizeWithoutTypeArgs() - 1) * kWordSize));
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
     // The AOT runtime will replace the slot in the object pool with the
-    // entrypoint address - see clustered_snapshot.cc.
+    // entrypoint address - see app_snapshot.cc.
     __ LoadUniqueObject(RCX, initial_stub);
   } else {
     const intptr_t entry_point_offset =
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index d15f357..7f82524 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -2825,6 +2825,7 @@
       switch (call->function().recognized_kind()) {
         case MethodRecognizer::kByteDataFactory:
         case MethodRecognizer::kLinkedHashBase_getData:
+        case MethodRecognizer::kImmutableLinkedHashBase_getData:
           return flow_graph->constant_null();
         default:
           break;
@@ -5616,6 +5617,9 @@
       compiler->SlowPathEnvironmentFor(instruction(), /*num_slow_path_args=*/0);
 
   __ MoveUnboxedDouble(DoubleToIntegerStubABI::kInputReg, value_reg_);
+  __ LoadImmediate(
+      DoubleToIntegerStubABI::kRecognizedKindReg,
+      compiler::target::ToRawSmi(instruction()->recognized_kind()));
   compiler->GenerateStubCall(instruction()->source(),
                              StubCode::DoubleToInteger(),
                              UntaggedPcDescriptors::kOther, locs,
@@ -6199,10 +6203,10 @@
 intptr_t InvokeMathCFunctionInstr::ArgumentCountFor(
     MethodRecognizer::Kind kind) {
   switch (kind) {
-    case MethodRecognizer::kDoubleTruncate:
-    case MethodRecognizer::kDoubleFloor:
-    case MethodRecognizer::kDoubleCeil:
-    case MethodRecognizer::kDoubleRound:
+    case MethodRecognizer::kDoubleTruncateToDouble:
+    case MethodRecognizer::kDoubleFloorToDouble:
+    case MethodRecognizer::kDoubleCeilToDouble:
+    case MethodRecognizer::kDoubleRoundToDouble:
     case MethodRecognizer::kMathAtan:
     case MethodRecognizer::kMathTan:
     case MethodRecognizer::kMathAcos:
@@ -6224,13 +6228,13 @@
 
 const RuntimeEntry& InvokeMathCFunctionInstr::TargetFunction() const {
   switch (recognized_kind_) {
-    case MethodRecognizer::kDoubleTruncate:
+    case MethodRecognizer::kDoubleTruncateToDouble:
       return kLibcTruncRuntimeEntry;
-    case MethodRecognizer::kDoubleRound:
+    case MethodRecognizer::kDoubleRoundToDouble:
       return kLibcRoundRuntimeEntry;
-    case MethodRecognizer::kDoubleFloor:
+    case MethodRecognizer::kDoubleFloorToDouble:
       return kLibcFloorRuntimeEntry;
-    case MethodRecognizer::kDoubleCeil:
+    case MethodRecognizer::kDoubleCeilToDouble:
       return kLibcCeilRuntimeEntry;
     case MethodRecognizer::kMathDoublePow:
       return kLibcPowRuntimeEntry;
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index f28d741..a6f9d2d 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -5354,10 +5354,13 @@
                           Value* value,
                           StoreBarrierType emit_store_barrier,
                           const InstructionSource& source,
-                          Kind kind = Kind::kOther)
+                          Kind kind = Kind::kOther,
+                          compiler::Assembler::MemoryOrder memory_order =
+                              compiler::Assembler::kRelaxedNonAtomic)
       : TemplateInstruction(source),
         slot_(slot),
         emit_store_barrier_(emit_store_barrier),
+        memory_order_(memory_order),
         token_pos_(source.token_pos),
         is_initialization_(kind == Kind::kInitializing) {
     SetInputAt(kInstancePos, instance);
@@ -5464,6 +5467,7 @@
 
   const Slot& slot_;
   StoreBarrierType emit_store_barrier_;
+  compiler::Assembler::MemoryOrder memory_order_;
   const TokenPosition token_pos_;
   // Marks initializing stores. E.g. in the constructor.
   const bool is_initialization_;
@@ -8316,13 +8320,20 @@
 
 class DoubleToIntegerInstr : public TemplateDefinition<1, Throws, Pure> {
  public:
-  DoubleToIntegerInstr(Value* value, intptr_t deopt_id)
-      : TemplateDefinition(deopt_id) {
+  DoubleToIntegerInstr(Value* value,
+                       MethodRecognizer::Kind recognized_kind,
+                       intptr_t deopt_id)
+      : TemplateDefinition(deopt_id), recognized_kind_(recognized_kind) {
+    ASSERT((recognized_kind == MethodRecognizer::kDoubleToInteger) ||
+           (recognized_kind == MethodRecognizer::kDoubleFloorToInt) ||
+           (recognized_kind == MethodRecognizer::kDoubleCeilToInt));
     SetInputAt(0, value);
   }
 
   Value* value() const { return inputs_[0]; }
 
+  MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; }
+
   DECLARE_INSTRUCTION(DoubleToInteger)
   virtual CompileType ComputeType() const;
 
@@ -8344,9 +8355,13 @@
 
   virtual bool HasUnknownSideEffects() const { return false; }
 
-  virtual bool AttributesEqual(const Instruction& other) const { return true; }
+  virtual bool AttributesEqual(const Instruction& other) const {
+    return other.AsDoubleToInteger()->recognized_kind() == recognized_kind();
+  }
 
  private:
+  const MethodRecognizer::Kind recognized_kind_;
+
   DISALLOW_COPY_AND_ASSIGN(DoubleToIntegerInstr);
 };
 
@@ -8385,6 +8400,9 @@
                       MethodRecognizer::Kind recognized_kind,
                       intptr_t deopt_id)
       : TemplateDefinition(deopt_id), recognized_kind_(recognized_kind) {
+    ASSERT((recognized_kind == MethodRecognizer::kDoubleTruncateToDouble) ||
+           (recognized_kind == MethodRecognizer::kDoubleFloorToDouble) ||
+           (recognized_kind == MethodRecognizer::kDoubleCeilToDouble));
     SetInputAt(0, value);
   }
 
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 7b56c73..30015fa 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -156,8 +156,9 @@
 LocationSummary* MemoryCopyInstr::MakeLocationSummary(Zone* zone,
                                                       bool opt) const {
   const intptr_t kNumInputs = 5;
-  const intptr_t kNumTemps =
-      element_size_ == 16 ? 4 : element_size_ == 8 ? 2 : 1;
+  const intptr_t kNumTemps = element_size_ == 16  ? 4
+                             : element_size_ == 8 ? 2
+                                                  : 1;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   locs->set_in(kSrcPos, Location::WritableRegister());
@@ -2841,6 +2842,7 @@
   ASSERT(offset_in_bytes > 0);  // Field is finalized and points after header.
 
   if (slot().representation() != kTagged) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     auto const rep = slot().representation();
     ASSERT(RepresentationUtils::IsUnboxedInteger(rep));
     const size_t value_size = RepresentationUtils::ValueSize(rep);
@@ -2862,6 +2864,7 @@
   }
 
   if (IsUnboxedDartFieldStore() && compiler->is_optimizing()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     const intptr_t cid = slot().field().UnboxedFieldCid();
     const DRegister value = EvenDRegisterOf(locs()->in(kValuePos).fpu_reg());
 
@@ -2940,6 +2943,7 @@
   }
 
   if (IsPotentialUnboxedDartFieldStore()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     const Register value_reg = locs()->in(kValuePos).reg();
     const Register temp = locs()->temp(0).reg();
     const Register temp2 = locs()->temp(1).reg();
@@ -3021,15 +3025,16 @@
   if (ShouldEmitStoreBarrier()) {
     const Register value_reg = locs()->in(kValuePos).reg();
     __ StoreIntoObjectOffset(instance_reg, offset_in_bytes, value_reg,
-                             CanValueBeSmi());
+                             CanValueBeSmi(), memory_order_);
   } else {
     if (locs()->in(kValuePos).IsConstant()) {
       __ StoreIntoObjectNoBarrierOffset(instance_reg, offset_in_bytes,
-                                        locs()->in(kValuePos).constant());
+                                        locs()->in(kValuePos).constant(),
+                                        memory_order_);
     } else {
       const Register value_reg = locs()->in(kValuePos).reg();
       __ StoreIntoObjectNoBarrierOffset(instance_reg, offset_in_bytes,
-                                        value_reg);
+                                        value_reg, memory_order_);
     }
   }
   __ Bind(&skip_store);
@@ -3660,10 +3665,9 @@
       __ Call(compiler::Address(THR, entry_point_offset));
       compiler->RecordSafepoint(instruction()->locs(), kNumSlowPathArgs);
       compiler->RecordCatchEntryMoves(env);
-      compiler->AddDescriptor(
-          UntaggedPcDescriptors::kOther, compiler->assembler()->CodeSize(),
-          instruction()->deopt_id(), instruction()->source(),
-          compiler->CurrentTryIndex());
+      compiler->AddCurrentDescriptor(UntaggedPcDescriptors::kOther,
+                                     instruction()->deopt_id(),
+                                     instruction()->source());
     } else {
       __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
       compiler->EmitCallsiteMetadata(
@@ -5681,7 +5685,7 @@
 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT((op_kind() == MethodRecognizer::kMathMin) ||
          (op_kind() == MethodRecognizer::kMathMax));
-  const intptr_t is_min = (op_kind() == MethodRecognizer::kMathMin);
+  const bool is_min = (op_kind() == MethodRecognizer::kMathMin);
   if (result_cid() == kDoubleCid) {
     compiler::Label done, returns_nan, are_equal;
     const DRegister left = EvenDRegisterOf(locs()->in(0).fpu_reg());
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index cf075b0..7432fad 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -2410,6 +2410,7 @@
   ASSERT(offset_in_bytes > 0);  // Field is finalized and points after header.
 
   if (slot().representation() != kTagged) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     ASSERT(RepresentationUtils::IsUnboxedInteger(slot().representation()));
     const Register value = locs()->in(kValuePos).reg();
     __ Comment("NativeUnboxedStoreInstanceFieldInstr");
@@ -2420,6 +2421,7 @@
   }
 
   if (IsUnboxedDartFieldStore() && compiler->is_optimizing()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     const VRegister value = locs()->in(kValuePos).fpu_reg();
     const intptr_t cid = slot().field().UnboxedFieldCid();
 
@@ -2489,6 +2491,7 @@
   }
 
   if (IsPotentialUnboxedDartFieldStore()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     const Register value_reg = locs()->in(kValuePos).reg();
     const Register temp = locs()->temp(0).reg();
     const Register temp2 = locs()->temp(1).reg();
@@ -2574,28 +2577,30 @@
     const Register value_reg = locs()->in(kValuePos).reg();
     if (!compressed) {
       __ StoreIntoObjectOffset(instance_reg, offset_in_bytes, value_reg,
-                               CanValueBeSmi());
+                               CanValueBeSmi(), memory_order_);
     } else {
       __ StoreCompressedIntoObjectOffset(instance_reg, offset_in_bytes,
-                                         value_reg, CanValueBeSmi());
+                                         value_reg, CanValueBeSmi(),
+                                         memory_order_);
     }
   } else {
     if (locs()->in(kValuePos).IsConstant()) {
       const auto& value = locs()->in(kValuePos).constant();
       if (!compressed) {
-        __ StoreIntoObjectOffsetNoBarrier(instance_reg, offset_in_bytes, value);
+        __ StoreIntoObjectOffsetNoBarrier(instance_reg, offset_in_bytes, value,
+                                          memory_order_);
       } else {
-        __ StoreCompressedIntoObjectOffsetNoBarrier(instance_reg,
-                                                    offset_in_bytes, value);
+        __ StoreCompressedIntoObjectOffsetNoBarrier(
+            instance_reg, offset_in_bytes, value, memory_order_);
       }
     } else {
       const Register value_reg = locs()->in(kValuePos).reg();
       if (!compressed) {
         __ StoreIntoObjectOffsetNoBarrier(instance_reg, offset_in_bytes,
-                                          value_reg);
+                                          value_reg, memory_order_);
       } else {
-        __ StoreCompressedIntoObjectOffsetNoBarrier(instance_reg,
-                                                    offset_in_bytes, value_reg);
+        __ StoreCompressedIntoObjectOffsetNoBarrier(
+            instance_reg, offset_in_bytes, value_reg, memory_order_);
       }
     }
   }
@@ -3217,10 +3222,9 @@
       }
       compiler->RecordSafepoint(locs, kNumSlowPathArgs);
       compiler->RecordCatchEntryMoves(env);
-      compiler->AddDescriptor(
-          UntaggedPcDescriptors::kOther, compiler->assembler()->CodeSize(),
-          instruction()->deopt_id(), instruction()->source(),
-          compiler->CurrentTryIndex());
+      compiler->AddCurrentDescriptor(UntaggedPcDescriptors::kOther,
+                                     instruction()->deopt_id(),
+                                     instruction()->source());
     } else {
       __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
       compiler->EmitCallsiteMetadata(
@@ -4008,10 +4012,9 @@
                                      !stubs_in_vm_isolate;
   LocationSummary* summary = new (zone) LocationSummary(
       zone, kNumInputs, kNumTemps,
-      ValueFitsSmi()
-          ? LocationSummary::kNoCall
-          : shared_slow_path_call ? LocationSummary::kCallOnSharedSlowPath
-                                  : LocationSummary::kCallOnSlowPath);
+      ValueFitsSmi()          ? LocationSummary::kNoCall
+      : shared_slow_path_call ? LocationSummary::kCallOnSharedSlowPath
+                              : LocationSummary::kCallOnSlowPath);
   summary->set_in(0, Location::RequiresRegister());
   if (ValueFitsSmi()) {
     summary->set_out(0, Location::RequiresRegister());
@@ -4727,7 +4730,7 @@
 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT((op_kind() == MethodRecognizer::kMathMin) ||
          (op_kind() == MethodRecognizer::kMathMax));
-  const intptr_t is_min = (op_kind() == MethodRecognizer::kMathMin);
+  const bool is_min = (op_kind() == MethodRecognizer::kMathMin);
   if (result_cid() == kDoubleCid) {
     compiler::Label done, returns_nan, are_equal;
     const VRegister left = locs()->in(0).fpu_reg();
@@ -4910,12 +4913,24 @@
   compiler->AddSlowPathCode(slow_path);
 
   // First check for NaN. Checking for minint after the conversion doesn't work
-  // on ARM64 because fcvtzds gives 0 for NaN.
+  // on ARM64 because fcvtzs gives 0 for NaN.
   __ fcmpd(value_double, value_double);
   __ b(slow_path->entry_label(), VS);
 
-  __ fcvtzdsx(result, value_double);
-  // Overflow is signaled with minint.
+  switch (recognized_kind()) {
+    case MethodRecognizer::kDoubleToInteger:
+      __ fcvtzsxd(result, value_double);
+      break;
+    case MethodRecognizer::kDoubleFloorToInt:
+      __ fcvtmsxd(result, value_double);
+      break;
+    case MethodRecognizer::kDoubleCeilToInt:
+      __ fcvtpsxd(result, value_double);
+      break;
+    default:
+      UNREACHABLE();
+  }
+    // Overflow is signaled with minint.
 
 #if !defined(DART_COMPRESSED_POINTERS)
   // Check for overflow and that it fits into Smi.
@@ -4948,12 +4963,12 @@
   const Register result = locs()->out(0).reg();
   const VRegister value = locs()->in(0).fpu_reg();
   // First check for NaN. Checking for minint after the conversion doesn't work
-  // on ARM64 because fcvtzds gives 0 for NaN.
+  // on ARM64 because fcvtzs gives 0 for NaN.
   // TODO(zra): Check spec that this is true.
   __ fcmpd(value, value);
   __ b(deopt, VS);
 
-  __ fcvtzdsx(result, value);
+  __ fcvtzsxd(result, value);
 
 #if !defined(DART_COMPRESSED_POINTERS)
   // Check for overflow and that it fits into Smi.
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 687529e..198e2d4 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -2135,6 +2135,7 @@
   ASSERT(offset_in_bytes > 0);  // Field is finalized and points after header.
 
   if (slot().representation() != kTagged) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     auto const rep = slot().representation();
     ASSERT(RepresentationUtils::IsUnboxedInteger(rep));
     const size_t value_size = RepresentationUtils::ValueSize(rep);
@@ -2156,6 +2157,7 @@
   }
 
   if (IsUnboxedDartFieldStore() && compiler->is_optimizing()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     XmmRegister value = locs()->in(kValuePos).fpu_reg();
     Register temp = locs()->temp(0).reg();
     Register temp2 = locs()->temp(1).reg();
@@ -2207,6 +2209,7 @@
   }
 
   if (IsPotentialUnboxedDartFieldStore()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     __ Comment("PotentialUnboxedStore");
     Register value_reg = locs()->in(kValuePos).reg();
     Register temp = locs()->temp(0).reg();
@@ -2294,17 +2297,17 @@
     Register value_reg = locs()->in(kValuePos).reg();
     __ StoreIntoObject(instance_reg,
                        compiler::FieldAddress(instance_reg, offset_in_bytes),
-                       value_reg, CanValueBeSmi());
+                       value_reg, CanValueBeSmi(), memory_order_);
   } else {
     if (locs()->in(kValuePos).IsConstant()) {
       __ StoreIntoObjectNoBarrier(
           instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-          locs()->in(kValuePos).constant());
+          locs()->in(kValuePos).constant(), memory_order_);
     } else {
       Register value_reg = locs()->in(kValuePos).reg();
       __ StoreIntoObjectNoBarrier(
           instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-          value_reg);
+          value_reg, memory_order_);
     }
   }
   __ Bind(&skip_store);
@@ -4833,7 +4836,7 @@
 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT((op_kind() == MethodRecognizer::kMathMin) ||
          (op_kind() == MethodRecognizer::kMathMax));
-  const intptr_t is_min = (op_kind() == MethodRecognizer::kMathMin);
+  const bool is_min = (op_kind() == MethodRecognizer::kMathMin);
   if (result_cid() == kDoubleCid) {
     compiler::Label done, returns_nan, are_equal;
     XmmRegister left = locs()->in(0).fpu_reg();
@@ -5018,6 +5021,7 @@
 }
 
 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  ASSERT(recognized_kind() == MethodRecognizer::kDoubleToInteger);
   const Register result = locs()->out(0).reg();
   const XmmRegister value_double = locs()->in(0).fpu_reg();
 
@@ -5072,13 +5076,13 @@
   XmmRegister value = locs()->in(0).fpu_reg();
   XmmRegister result = locs()->out(0).fpu_reg();
   switch (recognized_kind()) {
-    case MethodRecognizer::kDoubleTruncate:
+    case MethodRecognizer::kDoubleTruncateToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundToZero);
       break;
-    case MethodRecognizer::kDoubleFloor:
+    case MethodRecognizer::kDoubleFloorToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundDown);
       break;
-    case MethodRecognizer::kDoubleCeil:
+    case MethodRecognizer::kDoubleCeilToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundUp);
       break;
     default:
diff --git a/runtime/vm/compiler/backend/il_test.cc b/runtime/vm/compiler/backend/il_test.cc
index 260d17d..30502a4 100644
--- a/runtime/vm/compiler/backend/il_test.cc
+++ b/runtime/vm/compiler/backend/il_test.cc
@@ -469,7 +469,10 @@
   GrowableArray<intptr_t> expected_abstract_cids;
   for (intptr_t cid = kInstanceCid; cid < num_cids; cid++) {
     if (!class_table->HasValidClassAt(cid)) continue;
-    if (cid == kNullCid && is_nullable) continue;
+    if (cid == kNullCid) continue;
+    if (cid == kNeverCid) continue;
+    if (cid == kDynamicCid && !is_nullable) continue;
+    if (cid == kVoidCid && !is_nullable) continue;
     to_check = class_table->At(cid);
     // Only add concrete classes.
     if (to_check.is_abstract()) {
@@ -604,4 +607,33 @@
   RANGES_CONTAIN_EXPECTED_CIDS(abstract_range, expected_cids);
 }
 
+// This test verifies that double == Smi is recognized and
+// implemented using EqualityCompare.
+// Regression test for https://github.com/dart-lang/sdk/issues/47031.
+ISOLATE_UNIT_TEST_CASE(IRTest_DoubleEqualsSmi) {
+  const char* kScript = R"(
+    bool foo(double x) => (x + 0.5) == 0;
+    main() {
+      foo(-0.5);
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "foo"));
+
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  ILMatcher cursor(flow_graph, entry, /*trace=*/true,
+                   ParallelMovesHandling::kSkip);
+
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      kMatchAndMoveBinaryDoubleOp,
+      kMatchAndMoveEqualityCompare,
+      kMatchReturn,
+  }));
+}
+
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index da9b346..b3c92e0 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -92,7 +92,7 @@
   // No addressing mode will ignore the upper bits. Cannot use the shorter `orl`
   // to clear the upper bits as this instructions uses negative indices as part
   // of FP-relative loads.
-  // TODO(compressed-pointers): Can we guarentee the index is already
+  // TODO(compressed-pointers): Can we guarantee the index is already
   // sign-extended if always comes for an args-descriptor load?
   __ movsxd(index, index);
 #endif
@@ -123,7 +123,7 @@
   // No addressing mode will ignore the upper bits. Cannot use the shorter `orl`
   // to clear the upper bits as this instructions uses negative indices as part
   // of FP-relative stores.
-  // TODO(compressed-pointers): Can we guarentee the index is already
+  // TODO(compressed-pointers): Can we guarantee the index is already
   // sign-extended if always comes for an args-descriptor load?
   __ movsxd(index, index);
 #endif
@@ -2486,6 +2486,7 @@
   ASSERT(offset_in_bytes > 0);  // Field is finalized and points after header.
 
   if (slot().representation() != kTagged) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     ASSERT(RepresentationUtils::IsUnboxedInteger(slot().representation()));
     const Register value = locs()->in(kValuePos).reg();
     __ Comment("NativeUnboxedStoreInstanceFieldInstr");
@@ -2496,6 +2497,7 @@
   }
 
   if (IsUnboxedDartFieldStore() && compiler->is_optimizing()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     XmmRegister value = locs()->in(kValuePos).fpu_reg();
     const intptr_t cid = slot().field().UnboxedFieldCid();
 
@@ -2572,6 +2574,7 @@
   }
 
   if (IsPotentialUnboxedDartFieldStore()) {
+    ASSERT(memory_order_ != compiler::AssemblerBase::kRelease);
     Register value_reg = locs()->in(kValuePos).reg();
     Register temp = locs()->temp(0).reg();
     Register temp2 = locs()->temp(1).reg();
@@ -2659,11 +2662,11 @@
     if (!compressed) {
       __ StoreIntoObject(instance_reg,
                          compiler::FieldAddress(instance_reg, offset_in_bytes),
-                         value_reg, CanValueBeSmi());
+                         value_reg, CanValueBeSmi(), memory_order_);
     } else {
       __ StoreCompressedIntoObject(
           instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-          value_reg, CanValueBeSmi());
+          value_reg, CanValueBeSmi(), memory_order_);
     }
   } else {
     if (locs()->in(kValuePos).IsConstant()) {
@@ -2671,22 +2674,22 @@
       if (!compressed) {
         __ StoreIntoObjectNoBarrier(
             instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-            value);
+            value, memory_order_);
       } else {
         __ StoreCompressedIntoObjectNoBarrier(
             instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-            value);
+            value, memory_order_);
       }
     } else {
       Register value_reg = locs()->in(kValuePos).reg();
       if (!compressed) {
         __ StoreIntoObjectNoBarrier(
             instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-            value_reg);
+            value_reg, memory_order_);
       } else {
         __ StoreCompressedIntoObjectNoBarrier(
             instance_reg, compiler::FieldAddress(instance_reg, offset_in_bytes),
-            value_reg);
+            value_reg, memory_order_);
       }
     }
   }
@@ -3305,10 +3308,9 @@
       __ call(compiler::Address(THR, entry_point_offset));
       compiler->RecordSafepoint(instruction()->locs(), kNumSlowPathArgs);
       compiler->RecordCatchEntryMoves(env);
-      compiler->AddDescriptor(
-          UntaggedPcDescriptors::kOther, compiler->assembler()->CodeSize(),
-          instruction()->deopt_id(), instruction()->source(),
-          compiler->CurrentTryIndex());
+      compiler->AddCurrentDescriptor(UntaggedPcDescriptors::kOther,
+                                     instruction()->deopt_id(),
+                                     instruction()->source());
     } else {
       __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
       compiler->EmitCallsiteMetadata(
@@ -5213,13 +5215,45 @@
 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   const Register result = locs()->out(0).reg();
   const Register temp = locs()->temp(0).reg();
-  const XmmRegister value_double = locs()->in(0).fpu_reg();
+  XmmRegister value_double = locs()->in(0).fpu_reg();
   ASSERT(result != temp);
 
   DoubleToIntegerSlowPath* slow_path =
       new DoubleToIntegerSlowPath(this, value_double);
   compiler->AddSlowPathCode(slow_path);
 
+  if (recognized_kind() != MethodRecognizer::kDoubleToInteger) {
+    // In JIT mode VM knows target CPU features at compile time
+    // and can pick more optimal representation for DoubleToDouble
+    // conversion. In AOT mode we test if roundsd instruction is
+    // available at run time and fall back to stub if it isn't.
+    ASSERT(CompilerState::Current().is_aot());
+    if (FLAG_use_slow_path) {
+      __ jmp(slow_path->entry_label());
+      __ Bind(slow_path->exit_label());
+      return;
+    }
+    __ cmpb(
+        compiler::Address(
+            THR,
+            compiler::target::Thread::double_truncate_round_supported_offset()),
+        compiler::Immediate(0));
+    __ j(EQUAL, slow_path->entry_label());
+
+    __ xorps(FpuTMP, FpuTMP);
+    switch (recognized_kind()) {
+      case MethodRecognizer::kDoubleFloorToInt:
+        __ roundsd(FpuTMP, value_double, compiler::Assembler::kRoundDown);
+        break;
+      case MethodRecognizer::kDoubleCeilToInt:
+        __ roundsd(FpuTMP, value_double, compiler::Assembler::kRoundUp);
+        break;
+      default:
+        UNREACHABLE();
+    }
+    value_double = FpuTMP;
+  }
+
   __ OBJ(cvttsd2si)(result, value_double);
   // Overflow is signalled with minint.
   // Check for overflow and that it fits into Smi.
@@ -5279,13 +5313,13 @@
     __ xorps(result, result);
   }
   switch (recognized_kind()) {
-    case MethodRecognizer::kDoubleTruncate:
+    case MethodRecognizer::kDoubleTruncateToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundToZero);
       break;
-    case MethodRecognizer::kDoubleFloor:
+    case MethodRecognizer::kDoubleFloorToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundDown);
       break;
-    case MethodRecognizer::kDoubleCeil:
+    case MethodRecognizer::kDoubleCeilToDouble:
       __ roundsd(result, value, compiler::Assembler::kRoundUp);
       break;
     default:
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 09359cc..2523166 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -1347,6 +1347,7 @@
     // changes while compiling. Propagate that 'error' and retry compilation
     // later.
     ASSERT(CompilerState::Current().is_aot() ||
+           (error.ptr() == Object::out_of_memory_error().ptr()) ||
            Compiler::IsBackgroundCompilation() || error.IsUnhandledException());
     Thread::Current()->long_jump_base()->Jump(1, error);
     UNREACHABLE();
@@ -2310,6 +2311,9 @@
 }
 
 bool FlowGraphInliner::FunctionHasPreferInlinePragma(const Function& function) {
+  if (!function.has_pragma()) {
+    return false;
+  }
   Thread* thread = dart::Thread::Current();
   COMPILER_TIMINGS_TIMER_SCOPE(thread, CheckForPragma);
   Object& options = Object::Handle();
@@ -2319,6 +2323,9 @@
 }
 
 bool FlowGraphInliner::FunctionHasNeverInlinePragma(const Function& function) {
+  if (!function.has_pragma()) {
+    return false;
+  }
   Thread* thread = dart::Thread::Current();
   COMPILER_TIMINGS_TIMER_SCOPE(thread, CheckForPragma);
   Object& options = Object::Handle();
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 17a1c15..7d35302 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -2789,7 +2789,9 @@
       break;
 
     case Slot::Kind::kLinkedHashBase_index:
+    case Slot::Kind::kImmutableLinkedHashBase_index:
     case Slot::Kind::kLinkedHashBase_data:
+    case Slot::Kind::kImmutableLinkedHashBase_data:
     case Slot::Kind::kGrowableObjectArray_data:
     case Slot::Kind::kContext_parent:
     case Slot::Kind::kTypeArguments:
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index d85727d..a704ac9 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -3914,7 +3914,7 @@
 
         for (auto phi : *join->phis()) {
           phi->mark_dead();
-          if (HasNonPhiUse(phi)) {
+          if (HasActualUse(phi)) {
             MarkLive(phi);
           }
         }
@@ -3922,7 +3922,7 @@
     }
 
     for (auto info : parameter_info_) {
-      if (HasNonPhiUse(info->instr)) {
+      if (HasActualUse(info->instr)) {
         MarkLive(info->instr);
       }
     }
@@ -3962,6 +3962,8 @@
           worklist_.Add(param);
         }
       }
+    } else if (UnboxInstr* unbox = defn->AsUnbox()) {
+      MarkLive(unbox->value()->definition());
     }
   }
 
@@ -4003,10 +4005,16 @@
   }
 
   // Returns true if definition has a use in an instruction which is not a phi.
-  static bool HasNonPhiUse(Definition* defn) {
+  // Skip over Unbox instructions which may be inserted for unused phis.
+  static bool HasActualUse(Definition* defn) {
     for (Value* use = defn->input_use_list(); use != nullptr;
          use = use->next_use()) {
-      if (!use->instruction()->IsPhi()) {
+      Instruction* use_instruction = use->instruction();
+      if (UnboxInstr* unbox = use_instruction->AsUnbox()) {
+        if (HasActualUse(unbox)) {
+          return true;
+        }
+      } else if (!use_instruction->IsPhi()) {
         return true;
       }
     }
diff --git a/runtime/vm/compiler/backend/redundancy_elimination_test.cc b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
index 23ffde4..4e0a257 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination_test.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
@@ -120,7 +120,8 @@
 
 ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple1) {
   const char* script_chars = R"(
-      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      @pragma("vm:external-name", "BlackholeNative")
+      external dynamic blackhole([dynamic val]);
       foo(int p) {
         var a = blackhole(), b = blackhole();
         try {
@@ -139,7 +140,8 @@
 
 ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple2) {
   const char* script_chars = R"(
-      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      @pragma("vm:external-name", "BlackholeNative")
+      external dynamic blackhole([dynamic val]);
       foo(int p) {
         var a = blackhole(), b = blackhole();
         try {
@@ -159,7 +161,8 @@
 
 ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic1) {
   const char* script_chars = R"(
-      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      @pragma("vm:external-name", "BlackholeNative")
+      external dynamic blackhole([dynamic val]);
       foo(int p) {
         var a = blackhole(), b;
         for (var i = 0; i < 42; i++) {
@@ -181,7 +184,8 @@
 
 ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic2) {
   const char* script_chars = R"(
-      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      @pragma("vm:external-name", "BlackholeNative")
+      external dynamic blackhole([dynamic val]);
       foo(int p) {
         var a = blackhole(), b = blackhole();
         for (var i = 0; i < 42; i++) {
@@ -211,7 +215,8 @@
     std::function<Definition*(CompilerState* S, FlowGraph*, Definition*)>
         make_redefinition) {
   const char* script_chars = R"(
-    dynamic blackhole([a, b, c, d, e, f]) native 'BlackholeNative';
+    @pragma("vm:external-name", "BlackholeNative")
+    external dynamic blackhole([a, b, c, d, e, f]);
     class K {
       var field;
     }
@@ -375,7 +380,8 @@
     std::function<Definition*(CompilerState* S, FlowGraph*, Definition*)>
         make_redefinition) {
   const char* script_chars = R"(
-    dynamic blackhole([a, b, c, d, e, f]) native 'BlackholeNative';
+    @pragma("vm:external-name", "BlackholeNative")
+    external dynamic blackhole([a, b, c, d, e, f]);
     class K {
       var field;
     }
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index 9f84201..15f0080 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -201,7 +201,9 @@
       UNBOXED_NATIVE_SLOTS_LIST(UNBOXED_NATIVE_SLOT_CASE)
 #undef UNBOXED_NATIVE_SLOT_CASE
     case Slot::Kind::kLinkedHashBase_index:
+    case Slot::Kind::kImmutableLinkedHashBase_index:
     case Slot::Kind::kLinkedHashBase_data:
+    case Slot::Kind::kImmutableLinkedHashBase_data:
     case Slot::Kind::kLinkedHashBase_hash_mask:
     case Slot::Kind::kLinkedHashBase_used_data:
     case Slot::Kind::kLinkedHashBase_deleted_keys:
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index 27adf00..a31e9a9 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -61,6 +61,8 @@
   V(Closure, UntaggedClosure, function_type_arguments, TypeArguments, FINAL)   \
   V(FunctionType, UntaggedFunctionType, type_parameters, TypeParameters,       \
     FINAL)                                                                     \
+  V(ImmutableLinkedHashBase, UntaggedLinkedHashBase, index,                    \
+    TypedDataUint32Array, VAR)                                                 \
   V(Instance, UntaggedInstance, native_fields_array, Dynamic, VAR)             \
   V(Type, UntaggedType, arguments, TypeArguments, FINAL)                       \
   V(TypeParameters, UntaggedTypeParameters, flags, Array, FINAL)               \
@@ -98,6 +100,8 @@
   V(String, UntaggedString, length, Smi, FINAL)                                \
   V(LinkedHashBase, UntaggedLinkedHashBase, index, TypedDataUint32Array, VAR)  \
   V(LinkedHashBase, UntaggedLinkedHashBase, data, Array, VAR)                  \
+  V(ImmutableLinkedHashBase, UntaggedLinkedHashBase, data, ImmutableArray,     \
+    FINAL)                                                                     \
   V(LinkedHashBase, UntaggedLinkedHashBase, hash_mask, Smi, VAR)               \
   V(LinkedHashBase, UntaggedLinkedHashBase, used_data, Smi, VAR)               \
   V(LinkedHashBase, UntaggedLinkedHashBase, deleted_keys, Smi, VAR)            \
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index 7adbe17..2faa89c 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -1353,6 +1353,30 @@
     return *inferred_type;
   }
 
+  // Include special cases of type inference for int operations.
+  // This helps if both type feedback and results of TFA
+  // are not available (e.g. in AOT unit tests).
+  switch (token_kind()) {
+    case Token::kADD:
+    case Token::kSUB:
+    case Token::kMUL:
+    case Token::kMOD:
+      if ((ArgumentCount() == 2) &&
+          ArgumentValueAt(0)->Type()->IsNullableInt() &&
+          ArgumentValueAt(1)->Type()->IsNullableInt()) {
+        return CompileType::Int();
+      }
+      break;
+    case Token::kNEGATE:
+      if ((ArgumentCount() == 1) &&
+          ArgumentValueAt(0)->Type()->IsNullableInt()) {
+        return CompileType::Int();
+      }
+      break;
+    default:
+      break;
+  }
+
   const Function& target = interface_target();
   if (!target.IsNull()) {
     const AbstractType& result_type =
@@ -1507,31 +1531,41 @@
 
 CompileType LoadStaticFieldInstr::ComputeType() const {
   const Field& field = this->field();
-  bool is_nullable = CompileType::kCanBeNull;
+  ASSERT(field.is_static());
+  bool is_nullable = true;
   intptr_t cid = kIllegalCid;  // Abstract type is known, calculate cid lazily.
+
   AbstractType* abstract_type = &AbstractType::ZoneHandle(field.type());
   TraceStrongModeType(this, *abstract_type);
-  ASSERT(field.is_static());
+  if (abstract_type->IsStrictlyNonNullable()) {
+    is_nullable = false;
+  }
+
   auto& obj = Object::Handle();
   const bool is_initialized = IsFieldInitialized(&obj);
   if (field.is_final() && is_initialized) {
     if (!obj.IsNull()) {
-      is_nullable = CompileType::kCannotBeNull;
+      is_nullable = false;
       cid = obj.GetClassId();
       abstract_type = nullptr;  // Cid is known, calculate abstract type lazily.
     }
   }
+
   if ((field.guarded_cid() != kIllegalCid) &&
       (field.guarded_cid() != kDynamicCid)) {
     cid = field.guarded_cid();
-    is_nullable = field.is_nullable();
+    if (!field.is_nullable()) {
+      is_nullable = false;
+    }
     abstract_type = nullptr;  // Cid is known, calculate abstract type lazily.
   }
+
   if (field.needs_load_guard()) {
     // Should be kept in sync with Slot::Get.
     DEBUG_ASSERT(IsolateGroup::Current()->HasAttemptedReload());
     return CompileType::Dynamic();
   }
+
   const bool can_be_sentinel = !calls_initializer() && field.is_late() &&
                                field.is_final() && !field.has_initializer();
   return CompileType(is_nullable, can_be_sentinel, cid, abstract_type);
diff --git a/runtime/vm/compiler/backend/type_propagator_test.cc b/runtime/vm/compiler/backend/type_propagator_test.cc
index 87d459a..96c3ac0 100644
--- a/runtime/vm/compiler/backend/type_propagator_test.cc
+++ b/runtime/vm/compiler/backend/type_propagator_test.cc
@@ -541,4 +541,55 @@
   FlowGraphTypePropagator::Propagate(H.flow_graph());  // Should not crash.
 }
 
+#if defined(DART_PRECOMPILER)
+
+// This test verifies that LoadStaticField for non-nullable field
+// is non-nullable with sound null safety.
+// Regression test for https://github.com/dart-lang/sdk/issues/47119.
+ISOLATE_UNIT_TEST_CASE(TypePropagator_NonNullableLoadStaticField) {
+  if (!IsolateGroup::Current()->null_safety()) {
+    // This test requires sound null safety.
+    return;
+  }
+
+  const char* kScript = R"(
+    const y = 0xDEADBEEF;
+    final int x = int.parse('0xFEEDFEED');
+
+    void main(List<String> args) {
+      print(x);
+      print(x + y);
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "main"));
+
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  ILMatcher cursor(flow_graph, entry, /*trace=*/true,
+                   ParallelMovesHandling::kSkip);
+
+  Instruction* load = nullptr;
+
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      {kMatchAndMoveLoadStaticField, &load},
+      kMatchAndMovePushArgument,
+      kMatchAndMoveStaticCall,
+      kMatchAndMoveUnboxInt64,
+      kMatchAndMoveBinaryInt64Op,
+      kMatchAndMoveBoxInt64,
+      kMatchAndMovePushArgument,
+      kMatchAndMoveStaticCall,
+      kMatchReturn,
+  }));
+
+  EXPECT_PROPERTY(load->AsLoadStaticField()->Type(), !it.is_nullable());
+}
+
+#endif  // defined(DART_PRECOMPILER)
+
 }  // namespace dart
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 84df214..90d1657 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -1010,8 +1010,8 @@
         Definition* d2i_instr = NULL;
         if (ic_data.HasDeoptReason(ICData::kDeoptDoubleToSmi)) {
           // Do not repeatedly deoptimize because result didn't fit into Smi.
-          d2i_instr = new (Z)
-              DoubleToIntegerInstr(new (Z) Value(input), call->deopt_id());
+          d2i_instr = new (Z) DoubleToIntegerInstr(
+              new (Z) Value(input), recognized_kind, call->deopt_id());
         } else {
           // Optimistically assume result fits into Smi.
           d2i_instr =
diff --git a/runtime/vm/compiler/compiler_timings.h b/runtime/vm/compiler/compiler_timings.h
index 6f9b31b..2f63f78 100644
--- a/runtime/vm/compiler/compiler_timings.h
+++ b/runtime/vm/compiler/compiler_timings.h
@@ -20,6 +20,9 @@
   V(CompileAll)                                                                \
   V(Iterate)                                                                   \
   V(CompileFunction)                                                           \
+  V(AddCalleesOf)                                                              \
+  V(CheckForNewDynamicFunctions)                                               \
+  V(CollectCallbackFields)                                                     \
   V(PrecompileConstructors)                                                    \
   V(AttachOptimizedTypeTestingStub)                                            \
   V(TraceForRetainedFunctions)                                                 \
diff --git a/runtime/vm/compiler/ffi/marshaller.h b/runtime/vm/compiler/ffi/marshaller.h
index 4fafbe1..9d9f3cc 100644
--- a/runtime/vm/compiler/ffi/marshaller.h
+++ b/runtime/vm/compiler/ffi/marshaller.h
@@ -103,7 +103,7 @@
   // Requires boxing or unboxing.
   bool IsPointer(intptr_t arg_index) const {
     return AbstractType::Handle(zone_, CType(arg_index)).type_class_id() ==
-           kFfiPointerCid;
+           kPointerCid;
   }
   bool IsHandle(intptr_t arg_index) const {
     return AbstractType::Handle(zone_, CType(arg_index)).type_class_id() ==
diff --git a/runtime/vm/compiler/ffi/native_type.cc b/runtime/vm/compiler/ffi/native_type.cc
index b1f8d8c..125fa3e 100644
--- a/runtime/vm/compiler/ffi/native_type.cc
+++ b/runtime/vm/compiler/ffi/native_type.cc
@@ -372,7 +372,7 @@
       return kFloat;
     case kFfiDoubleCid:
       return kDouble;
-    case kFfiPointerCid:
+    case kPointerCid:
       return compiler::target::kWordSize == 4 ? kUint32 : kInt64;
     case kFfiVoidCid:
       return kVoid;
diff --git a/runtime/vm/compiler/ffi/recognized_method.cc b/runtime/vm/compiler/ffi/recognized_method.cc
index 6900a83..fa93dd3 100644
--- a/runtime/vm/compiler/ffi/recognized_method.cc
+++ b/runtime/vm/compiler/ffi/recognized_method.cc
@@ -13,9 +13,6 @@
 namespace ffi {
 
 classid_t ElementTypedDataCid(classid_t class_id) {
-  ASSERT(class_id >= kFfiPointerCid);
-  ASSERT(class_id < kFfiVoidCid);
-  ASSERT(class_id != kFfiNativeFunctionCid);
   switch (class_id) {
     case kFfiInt8Cid:
       return kTypedDataInt8ArrayCid;
@@ -36,7 +33,7 @@
     case kFfiIntPtrCid:
       return target::kWordSize == 4 ? kTypedDataInt32ArrayCid
                                     : kTypedDataInt64ArrayCid;
-    case kFfiPointerCid:
+    case kPointerCid:
       return target::kWordSize == 4 ? kTypedDataUint32ArrayCid
                                     : kTypedDataUint64ArrayCid;
     case kFfiFloatCid:
@@ -55,7 +52,6 @@
   case MethodRecognizer::kFfiStore##type:                                      \
     return kFfi##type##Cid;
     CLASS_LIST_FFI_NUMERIC(LOAD_STORE)
-    LOAD_STORE(Pointer)
 #undef LOAD_STORE
     case MethodRecognizer::kFfiLoadFloatUnaligned:
     case MethodRecognizer::kFfiStoreFloatUnaligned:
@@ -63,6 +59,9 @@
     case MethodRecognizer::kFfiLoadDoubleUnaligned:
     case MethodRecognizer::kFfiStoreDoubleUnaligned:
       return kFfiDoubleCid;
+    case MethodRecognizer::kFfiLoadPointer:
+    case MethodRecognizer::kFfiStorePointer:
+      return kPointerCid;
     default:
       UNREACHABLE();
   }
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index a34ae49..b16a368 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -506,7 +506,8 @@
     const Slot& slot,
     StoreInstanceFieldInstr::Kind
         kind /* = StoreInstanceFieldInstr::Kind::kOther */,
-    StoreBarrierType emit_store_barrier /* = kEmitStoreBarrier */) {
+    StoreBarrierType emit_store_barrier /* = kEmitStoreBarrier */,
+    compiler::Assembler::MemoryOrder memory_order /* = kRelaxed */) {
   Value* value = Pop();
   if (value->BindsToConstant()) {
     emit_store_barrier = kNoStoreBarrier;
@@ -1216,9 +1217,11 @@
   return Fragment(instr);
 }
 
-Fragment BaseFlowGraphBuilder::DoubleToInteger() {
+Fragment BaseFlowGraphBuilder::DoubleToInteger(
+    MethodRecognizer::Kind recognized_kind) {
   Value* value = Pop();
-  auto* instr = new (Z) DoubleToIntegerInstr(value, GetNextDeoptId());
+  auto* instr =
+      new (Z) DoubleToIntegerInstr(value, recognized_kind, GetNextDeoptId());
   Push(instr);
   return Fragment(instr);
 }
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.h b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
index 93875e0..0a5339f 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
@@ -196,14 +196,18 @@
       const Slot& slot,
       StoreInstanceFieldInstr::Kind kind =
           StoreInstanceFieldInstr::Kind::kOther,
-      StoreBarrierType emit_store_barrier = kEmitStoreBarrier);
+      StoreBarrierType emit_store_barrier = kEmitStoreBarrier,
+      compiler::Assembler::MemoryOrder memory_order =
+          compiler::Assembler::kRelaxedNonAtomic);
   Fragment StoreNativeField(
       const Slot& slot,
       StoreInstanceFieldInstr::Kind kind =
           StoreInstanceFieldInstr::Kind::kOther,
-      StoreBarrierType emit_store_barrier = kEmitStoreBarrier) {
+      StoreBarrierType emit_store_barrier = kEmitStoreBarrier,
+      compiler::Assembler::MemoryOrder memory_order =
+          compiler::Assembler::kRelaxedNonAtomic) {
     return StoreNativeField(TokenPosition::kNoSource, slot, kind,
-                            emit_store_barrier);
+                            emit_store_barrier, memory_order);
   }
   Fragment StoreInstanceField(
       const Field& field,
@@ -447,12 +451,14 @@
                                intptr_t num_inputs);
 
   // Pops double value and converts it to double as specified
-  // by the recognized method (kDoubleTruncate,
-  // kDoubleFloor or kDoubleCeil).
+  // by the recognized method (kDoubleTruncateToDouble,
+  // kDoubleFloorToDouble or kDoubleCeilToDouble).
   Fragment DoubleToDouble(MethodRecognizer::Kind recognized_kind);
 
-  // Pops double value and converts it to int.
-  Fragment DoubleToInteger();
+  // Pops double value and converts it to int as specified
+  // by the recognized method (kDoubleToInteger,
+  // kDoubleFloorToInt or kDoubleCeilToInt).
+  Fragment DoubleToInteger(MethodRecognizer::Kind recognized_kind);
 
   // Pops double value and applies unary math operation.
   Fragment MathUnary(MathUnaryInstr::MathUnaryKind kind);
diff --git a/runtime/vm/compiler/frontend/constant_reader.cc b/runtime/vm/compiler/frontend/constant_reader.cc
index 22efe3c..a6bc6e5 100644
--- a/runtime/vm/compiler/frontend/constant_reader.cc
+++ b/runtime/vm/compiler/frontend/constant_reader.cc
@@ -4,6 +4,8 @@
 
 #include "vm/compiler/frontend/constant_reader.h"
 
+#include "vm/object_store.h"
+
 namespace dart {
 namespace kernel {
 
@@ -226,9 +228,9 @@
       break;
     }
     case kListConstant: {
-      const auto& corelib = Library::Handle(Z, Library::CoreLibrary());
-      const auto& list_class =
-          Class::Handle(Z, corelib.LookupClassAllowPrivate(Symbols::_List()));
+      const auto& list_class = Class::Handle(
+          Z, H.isolate_group()->object_store()->immutable_array_class());
+      ASSERT(!list_class.IsNull());
       // Build type from the raw bytes (needs temporary translator).
       TypeTranslator type_translator(
           &reader, this, active_class_, /* finalize = */ true,
@@ -259,6 +261,108 @@
       instance = array.ptr();
       break;
     }
+    case kMapConstant: {
+      const auto& map_class = Class::Handle(
+          Z,
+          H.isolate_group()->object_store()->immutable_linked_hash_map_class());
+      ASSERT(!map_class.IsNull());
+
+      // Build types from the raw bytes (needs temporary translator).
+      TypeTranslator type_translator(
+          &reader, this, active_class_, /* finalize = */ true,
+          active_class_->RequireConstCanonicalTypeErasure(null_safety),
+          /* in_constant_context = */ true);
+      auto& type_arguments =
+          TypeArguments::Handle(Z, TypeArguments::New(2, Heap::kOld));
+      AbstractType& type = type_translator.BuildType();
+      type_arguments.SetTypeAt(0, type);
+      type = type_translator.BuildType().ptr();
+      type_arguments.SetTypeAt(1, type);
+
+      // Instantiate class.
+      type = Type::New(map_class, type_arguments);
+      type = ClassFinalizer::FinalizeType(type, ClassFinalizer::kCanonicalize);
+      type_arguments = type.arguments();
+
+      // Fill map with constant elements.
+      const auto& map = LinkedHashMap::Handle(
+          Z, ImmutableLinkedHashMap::NewUninitialized(Heap::kOld));
+      ASSERT_EQUAL(map.GetClassId(), kImmutableLinkedHashMapCid);
+      map.SetTypeArguments(type_arguments);
+      const intptr_t length = reader.ReadUInt();
+      const intptr_t used_data = (length << 1);
+      map.set_used_data(used_data);
+
+      const intptr_t data_size = Utils::RoundUpToPowerOfTwo(used_data);
+      const auto& data = Array::Handle(Z, Array::New(data_size));
+      map.set_data(data);
+
+      map.set_deleted_keys(0);
+      map.ComputeAndSetHashMask();
+
+      Instance& constant = Instance::Handle(Z);
+      for (intptr_t j = 0; j < used_data; ++j) {
+        // Recurse into lazily evaluating all "sub" constants
+        // needed to evaluate the current constant.
+        const intptr_t entry_index = reader.ReadUInt();
+        ASSERT(entry_index < constant_offset);  // DAG!
+        constant = ReadConstant(entry_index);
+        data.SetAt(j, constant);
+      }
+
+      instance = map.ptr();
+      break;
+    }
+    case kSetConstant: {
+      const auto& set_class = Class::Handle(
+          Z,
+          H.isolate_group()->object_store()->immutable_linked_hash_set_class());
+      ASSERT(!set_class.IsNull());
+
+      // Build types from the raw bytes (needs temporary translator).
+      TypeTranslator type_translator(
+          &reader, this, active_class_, /* finalize = */ true,
+          active_class_->RequireConstCanonicalTypeErasure(null_safety),
+          /* in_constant_context = */ true);
+      auto& type_arguments =
+          TypeArguments::Handle(Z, TypeArguments::New(1, Heap::kOld));
+      AbstractType& type = type_translator.BuildType();
+      type_arguments.SetTypeAt(0, type);
+
+      // Instantiate class.
+      type = Type::New(set_class, type_arguments);
+      type = ClassFinalizer::FinalizeType(type, ClassFinalizer::kCanonicalize);
+      type_arguments = type.arguments();
+
+      // Fill set with constant elements.
+      const auto& set = LinkedHashSet::Handle(
+          Z, ImmutableLinkedHashSet::NewUninitialized(Heap::kOld));
+      ASSERT_EQUAL(set.GetClassId(), kImmutableLinkedHashSetCid);
+      set.SetTypeArguments(type_arguments);
+      const intptr_t length = reader.ReadUInt();
+      const intptr_t used_data = length;
+      set.set_used_data(used_data);
+
+      const intptr_t data_size = Utils::RoundUpToPowerOfTwo(used_data);
+      const auto& data = Array::Handle(Z, Array::New(data_size));
+      set.set_data(data);
+
+      set.set_deleted_keys(0);
+      set.ComputeAndSetHashMask();
+
+      Instance& constant = Instance::Handle(Z);
+      for (intptr_t j = 0; j < used_data; ++j) {
+        // Recurse into lazily evaluating all "sub" constants
+        // needed to evaluate the current constant.
+        const intptr_t entry_index = reader.ReadUInt();
+        ASSERT(entry_index < constant_offset);  // DAG!
+        constant = ReadConstant(entry_index);
+        data.SetAt(j, constant);
+      }
+
+      instance = set.ptr();
+      break;
+    }
     case kInstanceConstant: {
       const NameIndex index = reader.ReadCanonicalNameReference();
       const auto& klass = Class::Handle(Z, H.LookupClassByKernelClass(index));
@@ -299,8 +403,7 @@
       Field& field = Field::Handle(Z);
       Instance& constant = Instance::Handle(Z);
       for (intptr_t j = 0; j < number_of_fields; ++j) {
-        field = H.LookupFieldByKernelGetterOrSetter(
-            reader.ReadCanonicalNameReference());
+        field = H.LookupFieldByKernelField(reader.ReadCanonicalNameReference());
         // Recurse into lazily evaluating all "sub" constants
         // needed to evaluate the current constant.
         const intptr_t entry_index = reader.ReadUInt();
@@ -374,12 +477,9 @@
       break;
     }
     default:
-      // Set literals (kSetConstant) are currently desugared in the frontend
-      // and will not reach the VM. See http://dartbug.com/35124 for some
-      // discussion. Map constants (kMapConstant ) are already lowered to
-      // InstanceConstant or ListConstant. We should never see unevaluated
-      // constants (kUnevaluatedConstant) in the constant table, they should
-      // have been fully evaluated before we get them.
+      // We should never see unevaluated constants (kUnevaluatedConstant) in
+      // the constant table, they should have been fully evaluated before we
+      // get them.
       H.ReportError(script_, TokenPosition::kNoSource,
                     "Cannot lazily read constant: unexpected kernel tag (%" Pd
                     ")",
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 7464bef..8c1f3bc 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -238,7 +238,7 @@
         ReadBool();
         const NameIndex field_name = ReadCanonicalNameReference();
         const Field& field =
-            Field::Handle(Z, H.LookupFieldByKernelGetterOrSetter(field_name));
+            Field::Handle(Z, H.LookupFieldByKernelField(field_name));
         initializer_fields[i] = &field;
         SkipExpression();
         continue;
@@ -1928,6 +1928,9 @@
       ASSERT(instructions.current->previous() != nullptr);
       instructions.current = instructions.current->previous();
     } else {
+      if (NeedsDebugStepCheck(stack(), position)) {
+        instructions = DebugStepCheck(position) + instructions;
+      }
       instructions += CheckBoolean(position);
       instructions += Constant(Bool::True());
       Value* right_value = Pop();
@@ -2776,6 +2779,10 @@
              Class::Handle(field.Owner()).Name() == Symbols::ClassID().ptr());
       return Constant(Instance::ZoneHandle(
           Z, Instance::RawCast(field.StaticConstFieldValue())));
+    } else if (field.is_final() && field.has_trivial_initializer()) {
+      // Final fields with trivial initializers are effectively constant.
+      return Constant(Instance::ZoneHandle(
+          Z, Instance::RawCast(field.StaticConstFieldValue())));
     } else {
       const Class& owner = Class::Handle(Z, field.Owner());
       const String& getter_name = H.DartGetterName(target);
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph_test.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph_test.cc
index f280b55..6bb19fa 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph_test.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph_test.cc
@@ -340,4 +340,44 @@
   // clang-format on
 }
 
+ISOLATE_UNIT_TEST_CASE(
+    StreamingFlowGraphBuilder_StaticGetFinalFieldWithTrivialInitializer) {
+  const char* kScript = R"(
+    final int x = 0xFEEDFEED;
+    test() {
+      return x;
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "test"));
+
+  Invoke(root_library, "test");
+
+  TestPipeline pipeline(function, CompilerPass::kJIT);
+  FlowGraph* flow_graph = pipeline.RunPasses({
+      CompilerPass::kComputeSSA,
+  });
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  EXPECT(entry != nullptr);
+
+  ReturnInstr* return_instr = nullptr;
+
+  ILMatcher cursor(flow_graph, entry);
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMatchAndMoveFunctionEntry,
+      kMatchAndMoveCheckStackOverflow,
+      kMoveDebugStepChecks,
+      {kMatchReturn, &return_instr},
+  }));
+
+  EXPECT(return_instr != nullptr);
+  ConstantInstr* const_value =
+      return_instr->value()->definition()->AsConstant();
+  EXPECT(const_value != nullptr);
+  EXPECT(const_value->value().IsInteger());
+  EXPECT_EQ(0xFEEDFEED, Integer::Cast(const_value->value()).AsInt64Value());
+}
+
 }  // namespace dart
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index ad2f103..ab29403 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -883,6 +883,9 @@
     case MethodRecognizer::kLinkedHashBase_setUsedData:
     case MethodRecognizer::kLinkedHashBase_getDeletedKeys:
     case MethodRecognizer::kLinkedHashBase_setDeletedKeys:
+    case MethodRecognizer::kImmutableLinkedHashBase_getData:
+    case MethodRecognizer::kImmutableLinkedHashBase_getIndex:
+    case MethodRecognizer::kImmutableLinkedHashBase_setIndexStoreRelease:
     case MethodRecognizer::kWeakProperty_getKey:
     case MethodRecognizer::kWeakProperty_setKey:
     case MethodRecognizer::kWeakProperty_getValue:
@@ -894,10 +897,10 @@
       return true;
     case MethodRecognizer::kDoubleToInteger:
     case MethodRecognizer::kDoubleMod:
-    case MethodRecognizer::kDoubleRound:
-    case MethodRecognizer::kDoubleTruncate:
-    case MethodRecognizer::kDoubleFloor:
-    case MethodRecognizer::kDoubleCeil:
+    case MethodRecognizer::kDoubleRoundToDouble:
+    case MethodRecognizer::kDoubleTruncateToDouble:
+    case MethodRecognizer::kDoubleFloorToDouble:
+    case MethodRecognizer::kDoubleCeilToDouble:
     case MethodRecognizer::kMathDoublePow:
     case MethodRecognizer::kMathSin:
     case MethodRecognizer::kMathCos:
@@ -910,6 +913,16 @@
     case MethodRecognizer::kMathLog:
     case MethodRecognizer::kMathSqrt:
       return FlowGraphCompiler::SupportsUnboxedDoubles();
+    case MethodRecognizer::kDoubleCeilToInt:
+    case MethodRecognizer::kDoubleFloorToInt:
+      if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
+#if defined(TARGET_ARCH_X64)
+      return CompilerState::Current().is_aot();
+#elif defined(TARGET_ARCH_ARM64)
+      return true;
+#else
+      return false;
+#endif
     default:
       return false;
   }
@@ -1190,6 +1203,11 @@
       body += LoadLocal(parsed_function_->RawParameterVariable(0));
       body += LoadNativeField(Slot::LinkedHashBase_index());
       break;
+    case MethodRecognizer::kImmutableLinkedHashBase_getIndex:
+      ASSERT_EQUAL(function.NumParameters(), 1);
+      body += LoadLocal(parsed_function_->RawParameterVariable(0));
+      body += LoadNativeField(Slot::ImmutableLinkedHashBase_index());
+      break;
     case MethodRecognizer::kLinkedHashBase_setIndex:
       ASSERT_EQUAL(function.NumParameters(), 2);
       body += LoadLocal(parsed_function_->RawParameterVariable(0));
@@ -1197,11 +1215,28 @@
       body += StoreNativeField(Slot::LinkedHashBase_index());
       body += NullConstant();
       break;
+    case MethodRecognizer::kImmutableLinkedHashBase_setIndexStoreRelease:
+      ASSERT_EQUAL(function.NumParameters(), 2);
+      body += LoadLocal(parsed_function_->RawParameterVariable(0));
+      body += LoadLocal(parsed_function_->RawParameterVariable(1));
+      // Uses a store-release barrier so that other isolates will see the
+      // contents of the index after seeing the index itself.
+      body +=
+          StoreNativeField(Slot::ImmutableLinkedHashBase_index(),
+                           StoreInstanceFieldInstr::Kind::kOther,
+                           kEmitStoreBarrier, compiler::Assembler::kRelease);
+      body += NullConstant();
+      break;
     case MethodRecognizer::kLinkedHashBase_getData:
       ASSERT_EQUAL(function.NumParameters(), 1);
       body += LoadLocal(parsed_function_->RawParameterVariable(0));
       body += LoadNativeField(Slot::LinkedHashBase_data());
       break;
+    case MethodRecognizer::kImmutableLinkedHashBase_getData:
+      ASSERT(function.NumParameters() == 1);
+      body += LoadLocal(parsed_function_->RawParameterVariable(0));
+      body += LoadNativeField(Slot::ImmutableLinkedHashBase_data());
+      break;
     case MethodRecognizer::kLinkedHashBase_setData:
       ASSERT_EQUAL(function.NumParameters(), 2);
       body += LoadLocal(parsed_function_->RawParameterVariable(0));
@@ -1346,9 +1381,9 @@
           Box(LoadIndexedInstr::RepresentationOfArrayElement(typed_data_cid));
       if (kind == MethodRecognizer::kFfiLoadPointer) {
         const auto class_table = thread_->isolate_group()->class_table();
-        ASSERT(class_table->HasValidClassAt(kFfiPointerCid));
+        ASSERT(class_table->HasValidClassAt(kPointerCid));
         const auto& pointer_class =
-            Class::ZoneHandle(H.zone(), class_table->At(kFfiPointerCid));
+            Class::ZoneHandle(H.zone(), class_table->At(kPointerCid));
 
         // We find the reified type to use for the pointer allocation.
         //
@@ -1406,9 +1441,9 @@
       if (kind == MethodRecognizer::kFfiStorePointer) {
         // Do type check before anything untagged is on the stack.
         const auto class_table = thread_->isolate_group()->class_table();
-        ASSERT(class_table->HasValidClassAt(kFfiPointerCid));
+        ASSERT(class_table->HasValidClassAt(kPointerCid));
         const auto& pointer_class =
-            Class::ZoneHandle(H.zone(), class_table->At(kFfiPointerCid));
+            Class::ZoneHandle(H.zone(), class_table->At(kPointerCid));
         const auto& pointer_type_param =
             TypeParameter::ZoneHandle(pointer_class.TypeParameterAt(0));
 
@@ -1471,9 +1506,9 @@
     } break;
     case MethodRecognizer::kFfiFromAddress: {
       const auto class_table = thread_->isolate_group()->class_table();
-      ASSERT(class_table->HasValidClassAt(kFfiPointerCid));
+      ASSERT(class_table->HasValidClassAt(kPointerCid));
       const auto& pointer_class =
-          Class::ZoneHandle(H.zone(), class_table->At(kFfiPointerCid));
+          Class::ZoneHandle(H.zone(), class_table->At(kPointerCid));
 
       ASSERT(function.NumTypeParameters() == 1);
       ASSERT_EQUAL(function.NumParameters(), 1);
@@ -1515,15 +1550,17 @@
       body += LoadIndexed(kIntPtrCid);
       body += Box(kUnboxedIntPtr);
     } break;
-    case MethodRecognizer::kDoubleToInteger: {
+    case MethodRecognizer::kDoubleToInteger:
+    case MethodRecognizer::kDoubleCeilToInt:
+    case MethodRecognizer::kDoubleFloorToInt: {
       body += LoadLocal(parsed_function_->RawParameterVariable(0));
-      body += DoubleToInteger();
+      body += DoubleToInteger(kind);
     } break;
     case MethodRecognizer::kDoubleMod:
-    case MethodRecognizer::kDoubleRound:
-    case MethodRecognizer::kDoubleTruncate:
-    case MethodRecognizer::kDoubleFloor:
-    case MethodRecognizer::kDoubleCeil:
+    case MethodRecognizer::kDoubleRoundToDouble:
+    case MethodRecognizer::kDoubleTruncateToDouble:
+    case MethodRecognizer::kDoubleFloorToDouble:
+    case MethodRecognizer::kDoubleCeilToDouble:
     case MethodRecognizer::kMathDoublePow:
     case MethodRecognizer::kMathSin:
     case MethodRecognizer::kMathCos:
@@ -1539,9 +1576,9 @@
       }
       if (!CompilerState::Current().is_aot() &&
           TargetCPUFeatures::double_truncate_round_supported() &&
-          ((kind == MethodRecognizer::kDoubleTruncate) ||
-           (kind == MethodRecognizer::kDoubleFloor) ||
-           (kind == MethodRecognizer::kDoubleCeil))) {
+          ((kind == MethodRecognizer::kDoubleTruncateToDouble) ||
+           (kind == MethodRecognizer::kDoubleFloorToDouble) ||
+           (kind == MethodRecognizer::kDoubleCeilToDouble))) {
         body += DoubleToDouble(kind);
       } else {
         body += InvokeMathCFunction(kind, function.NumParameters());
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index a3b4dc2..db4e074 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -27,6 +27,7 @@
     : thread_(thread),
       zone_(thread->zone()),
       isolate_(thread->isolate()),
+      isolate_group_(thread->isolate_group()),
       allocation_space_(Heap::kNew),
       string_offsets_(TypedData::Handle(Z)),
       string_data_(ExternalTypedData::Handle(Z)),
@@ -42,6 +43,7 @@
     : thread_(thread),
       zone_(thread->zone()),
       isolate_(thread->isolate()),
+      isolate_group_(thread->isolate_group()),
       allocation_space_(space),
       string_offsets_(TypedData::Handle(Z)),
       string_data_(ExternalTypedData::Handle(Z)),
@@ -314,8 +316,22 @@
   return StringEquals(CanonicalNameString(kind), "@factories");
 }
 
+bool TranslationHelper::IsField(NameIndex name) {
+  // Fields with private names have the import URI of the library where they
+  // are visible as the parent and the string "@fields" as the parent's parent.
+  // Fields with non-private names have the string "@fields" as the parent.
+  if (IsRoot(name)) {
+    return false;
+  }
+  NameIndex kind = CanonicalNameParent(name);
+  if (IsPrivate(name)) {
+    kind = CanonicalNameParent(kind);
+  }
+  return StringEquals(CanonicalNameString(kind), "@fields");
+}
+
 NameIndex TranslationHelper::EnclosingName(NameIndex name) {
-  ASSERT(IsConstructor(name) || IsProcedure(name));
+  ASSERT(IsConstructor(name) || IsProcedure(name) || IsField(name));
   NameIndex enclosing = CanonicalNameParent(CanonicalNameParent(name));
   if (IsPrivate(name)) {
     enclosing = CanonicalNameParent(enclosing);
@@ -572,6 +588,27 @@
   return info_.InsertClass(thread_, name_index_handle_, klass);
 }
 
+FieldPtr TranslationHelper::LookupFieldByKernelField(NameIndex kernel_field) {
+  ASSERT(IsField(kernel_field));
+  NameIndex enclosing = EnclosingName(kernel_field);
+
+  Class& klass = Class::Handle(Z);
+  if (IsLibrary(enclosing)) {
+    Library& library =
+        Library::Handle(Z, LookupLibraryByKernelLibrary(enclosing));
+    klass = library.toplevel_class();
+    CheckStaticLookup(klass);
+  } else {
+    ASSERT(IsClass(enclosing));
+    klass = LookupClassByKernelClass(enclosing);
+  }
+  Field& field = Field::Handle(
+      Z, klass.LookupFieldAllowPrivate(
+             DartSymbolObfuscate(CanonicalNameString(kernel_field))));
+  CheckStaticLookup(field);
+  return field.ptr();
+}
+
 FieldPtr TranslationHelper::LookupFieldByKernelGetterOrSetter(
     NameIndex kernel_field,
     bool required) {
@@ -832,7 +869,8 @@
                                              String* name_to_modify,
                                              bool symbolize,
                                              bool obfuscate) {
-  if (name_to_modify->Length() >= 1 && name_to_modify->CharAt(0) == '_') {
+  if (name_to_modify->Length() >= 1 && name_to_modify->CharAt(0) == '_' &&
+      !library.IsNull()) {
     *name_to_modify = library.PrivateName(*name_to_modify);
     if (obfuscate && IG->obfuscate()) {
       const String& library_key = String::Handle(library.private_key());
@@ -1003,6 +1041,11 @@
       if (++next_read_ == field) return;
     }
       FALL_THROUGH;
+    case kCanonicalNameField:
+      canonical_name_field_ =
+          helper_->ReadCanonicalNameReference();  // read canonical_name_field.
+      if (++next_read_ == field) return;
+      FALL_THROUGH;
     case kCanonicalNameGetter:
       canonical_name_getter_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name_getter.
@@ -2180,7 +2223,7 @@
 
 void KernelReaderHelper::SkipInterfaceType(bool simple) {
   ReadNullability();  // read nullability.
-  ReadUInt();  // read klass_name.
+  ReadUInt();         // read klass_name.
   if (!simple) {
     SkipListOfDartTypes();  // read list of types.
   }
@@ -2250,6 +2293,13 @@
   }
 }
 
+void KernelReaderHelper::SkipListOfCanonicalNameReferences() {
+  intptr_t list_length = ReadListLength();  // read list length.
+  for (intptr_t i = 0; i < list_length; ++i) {
+    SkipCanonicalNameReference();
+  }
+}
+
 void KernelReaderHelper::SkipTypeParametersList() {
   intptr_t list_length = ReadListLength();  // read list length.
   for (intptr_t i = 0; i < list_length; ++i) {
@@ -2364,14 +2414,14 @@
       SkipExpression();  // read value.
       return;
     case kSuperPropertyGet:
-      ReadPosition();                // read position.
-      SkipName();                    // read name.
+      ReadPosition();                      // read position.
+      SkipName();                          // read name.
       SkipInterfaceMemberNameReference();  // read interface_target_reference.
       return;
     case kSuperPropertySet:
-      ReadPosition();                // read position.
-      SkipName();                    // read name.
-      SkipExpression();              // read value.
+      ReadPosition();                      // read position.
+      SkipName();                          // read name.
+      SkipExpression();                    // read value.
       SkipInterfaceMemberNameReference();  // read interface_target_reference.
       return;
     case kStaticGet:
@@ -2426,9 +2476,9 @@
       SkipExpression();  // read expression.
       return;
     case kSuperMethodInvocation:
-      ReadPosition();                // read position.
-      SkipName();                    // read name.
-      SkipArguments();               // read arguments.
+      ReadPosition();                      // read position.
+      SkipName();                          // read name.
+      SkipArguments();                     // read arguments.
       SkipInterfaceMemberNameReference();  // read interface_target_reference.
       return;
     case kStaticInvocation:
@@ -2464,7 +2514,7 @@
       SkipListOfExpressions();  // read list of expressions.
       return;
     case kIsExpression:
-      ReadPosition();    // read position.
+      ReadPosition();  // read position.
       if (translation_helper_.info().kernel_binary_version() >= 38) {
         SkipFlags();  // read flags.
       }
@@ -2852,8 +2902,8 @@
   // can store them as tighly as possible.
   AlternativeReadingScope alt(&reader_);
   SetOffset(GetOffsetForSourceInfo(index));
-  SkipBytes(ReadUInt());                         // skip uri.
-  SkipBytes(ReadUInt());                         // skip source.
+  SkipBytes(ReadUInt());  // skip uri.
+  SkipBytes(ReadUInt());  // skip source.
   const intptr_t line_start_count = ReadUInt();
   return reader_.ReadLineStartsData(line_start_count);
 }
@@ -3123,7 +3173,6 @@
   result_ = Type::New(klass, type_arguments, nullability);
   result_ = result_.NormalizeFutureOrType(Heap::kOld);
   if (finalize_) {
-    ASSERT(active_class_->klass != NULL);
     result_ = ClassFinalizer::FinalizeType(result_);
   }
 }
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index e9a4807..c854d07 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -41,6 +41,8 @@
 
   Isolate* isolate() { return isolate_; }
 
+  IsolateGroup* isolate_group() { return isolate_group_; }
+
   Heap::Space allocation_space() { return allocation_space_; }
 
   // Access to strings.
@@ -107,6 +109,7 @@
   bool IsGetter(NameIndex name);
   bool IsSetter(NameIndex name);
   bool IsFactory(NameIndex name);
+  bool IsField(NameIndex name);
 
   // For a member (field, constructor, or procedure) return the canonical name
   // of the enclosing class or library.
@@ -163,6 +166,7 @@
   virtual LibraryPtr LookupLibraryByKernelLibrary(NameIndex library);
   virtual ClassPtr LookupClassByKernelClass(NameIndex klass);
 
+  FieldPtr LookupFieldByKernelField(NameIndex field);
   FieldPtr LookupFieldByKernelGetterOrSetter(NameIndex field,
                                              bool required = true);
   FunctionPtr LookupStaticMethodByKernelProcedure(NameIndex procedure,
@@ -232,6 +236,7 @@
   Thread* thread_;
   Zone* zone_;
   Isolate* isolate_;
+  IsolateGroup* isolate_group_;
   Heap::Space allocation_space_;
 
   TypedData& string_offsets_;
@@ -441,6 +446,7 @@
  public:
   enum Field {
     kStart,  // tag.
+    kCanonicalNameField,
     kCanonicalNameGetter,
     kCanonicalNameSetter,
     kSourceUriIndex,
@@ -488,6 +494,7 @@
   bool IsLate() const { return (flags_ & kIsLate) != 0; }
   bool IsExtensionMember() const { return (flags_ & kExtensionMember) != 0; }
 
+  NameIndex canonical_name_field_;
   NameIndex canonical_name_getter_;
   NameIndex canonical_name_setter_;
   TokenPosition position_ = TokenPosition::kNoSource;
@@ -1236,6 +1243,7 @@
   void SkipListOfDartTypes();
   void SkipListOfStrings();
   void SkipListOfVariableDeclarations();
+  void SkipListOfCanonicalNameReferences();
   void SkipTypeParametersList();
   void SkipInitializer();
   void SkipExpression();
diff --git a/runtime/vm/compiler/offsets_extractor.cc b/runtime/vm/compiler/offsets_extractor.cc
index 454457d..e1f2f1f 100644
--- a/runtime/vm/compiler/offsets_extractor.cc
+++ b/runtime/vm/compiler/offsets_extractor.cc
@@ -37,7 +37,7 @@
 
 namespace dart {
 
-void Assert::Fail(const char* format, ...) {
+void Assert::Fail(const char* format, ...) const {
   abort();
 }
 
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index 3142cb9..3ed3608 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -13,7 +13,7 @@
 // debug mode to get the correct fingerprint from the mismatch error.
 #define OTHER_RECOGNIZED_LIST(V)                                               \
   V(::, identical, ObjectIdentical, 0x04168315)                                \
-  V(ClassID, getID, ClassIDgetID, 0xbe1d6669)                                  \
+  V(ClassID, getID, ClassIDgetID, 0xdc8b888a)                                  \
   V(Object, Object., ObjectConstructor, 0xab6d6cfa)                            \
   V(List, ., ListFactory, 0xbc820cf9)                                          \
   V(_List, ., ObjectArrayAllocate, 0xd693eee6)                                 \
@@ -81,18 +81,20 @@
   V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x00fc4650)                 \
   V(::, copyRangeFromUint8ListToOneByteString,                                 \
     CopyRangeFromUint8ListToOneByteString, 0x0df019c5)                         \
-  V(_StringBase, _interpolate, StringBaseInterpolate, 0xea1eafca)              \
+  V(_StringBase, _interpolate, StringBaseInterpolate, 0xfc28bc84)              \
   V(_IntegerImplementation, toDouble, IntegerToDouble, 0x97728b46)             \
   V(_Double, _add, DoubleAdd, 0xea666327)                                      \
   V(_Double, _sub, DoubleSub, 0x28474c2e)                                      \
   V(_Double, _mul, DoubleMul, 0x1f98c76c)                                      \
   V(_Double, _div, DoubleDiv, 0x287d3791)                                      \
   V(_Double, _modulo, DoubleMod, 0xfdb397ef)                                   \
-  V(_Double, ceilToDouble, DoubleCeil, 0x5f1bced9)                             \
-  V(_Double, floorToDouble, DoubleFloor, 0x54b4cb48)                           \
-  V(_Double, roundToDouble, DoubleRound, 0x5649ca00)                           \
+  V(_Double, ceil, DoubleCeilToInt, 0xcef8d7c5)                                \
+  V(_Double, ceilToDouble, DoubleCeilToDouble, 0x5f1bced9)                     \
+  V(_Double, floor, DoubleFloorToInt, 0x2a323f88)                              \
+  V(_Double, floorToDouble, DoubleFloorToDouble, 0x54b4cb48)                   \
+  V(_Double, roundToDouble, DoubleRoundToDouble, 0x5649ca00)                   \
   V(_Double, toInt, DoubleToInteger, 0x676f20a9)                               \
-  V(_Double, truncateToDouble, DoubleTruncate, 0x62d48659)                     \
+  V(_Double, truncateToDouble, DoubleTruncateToDouble, 0x62d48659)             \
   V(::, min, MathMin, 0x504a28df)                                              \
   V(::, max, MathMax, 0xead7161a)                                              \
   V(::, _doublePow, MathDoublePow, 0x989f3334)                                 \
@@ -174,6 +176,12 @@
   V(_HashVMBase, set:_hashMask, LinkedHashBase_setHashMask, 0xbbcebb58)        \
   V(_HashVMBase, get:_deletedKeys, LinkedHashBase_getDeletedKeys, 0x510dc4a0)  \
   V(_HashVMBase, set:_deletedKeys, LinkedHashBase_setDeletedKeys, 0xbdcdb85c)  \
+  V(_HashVMImmutableBase, get:_data, ImmutableLinkedHashBase_getData,          \
+    0x780e14ad)                                                                \
+  V(_HashVMImmutableBase, get:_indexNullable,                                  \
+    ImmutableLinkedHashBase_getIndex, 0xfd877bfb)                              \
+  V(_HashVMImmutableBase, set:_index,                                          \
+    ImmutableLinkedHashBase_setIndexStoreRelease, 0xa2be9418)                  \
   V(_WeakProperty, get:key, WeakProperty_getKey, 0xde00e462)                   \
   V(_WeakProperty, set:key, WeakProperty_setKey, 0x963a095f)                   \
   V(_WeakProperty, get:value, WeakProperty_getValue, 0xd2f28aae)               \
@@ -213,7 +221,7 @@
   V(::, _storePointer, FfiStorePointer, 0xea6b7751)                            \
   V(::, _fromAddress, FfiFromAddress, 0xfd8cb1cc)                              \
   V(Pointer, get:address, FfiGetAddress, 0x7cde87be)                           \
-  V(::, getNativeField, GetNativeField, 0x95b4ec94)                            \
+  V(::, _getNativeField, GetNativeField, 0xa0139b85)                           \
   V(::, reachabilityFence, ReachabilityFence, 0x619235c1)                      \
   V(_Utf8Decoder, _scan, Utf8DecoderScan, 0x1dcaf73d)                          \
   V(_Future, timeout, FutureTimeout, 0x73041520)                               \
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index c8e499b..5bc2fff 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -55,10 +55,8 @@
 namespace compiler {
 
 bool IsSameObject(const Object& a, const Object& b) {
-  if (a.IsMint() && b.IsMint()) {
-    return Mint::Cast(a).value() == Mint::Cast(b).value();
-  } else if (a.IsDouble() && b.IsDouble()) {
-    return Double::Cast(a).value() == Double::Cast(b).value();
+  if (a.IsInstance() && b.IsInstance()) {
+    return Instance::Cast(a).IsIdenticalTo(Instance::Cast(b));
   }
   return a.ptr() == b.ptr();
 }
@@ -101,7 +99,7 @@
   if (obj.IsNull()) {
     return 2011;
   }
-  if (obj.IsString() || obj.IsNumber()) {
+  if (obj.IsInstance()) {
     return Instance::Cast(obj).CanonicalizeHash();
   }
   if (obj.IsCode()) {
@@ -114,6 +112,9 @@
   if (obj.IsField()) {
     return dart::String::HashRawSymbol(Field::Cast(obj).name());
   }
+  if (obj.IsICData()) {
+    return ICData::Cast(obj).Hash();
+  }
   // Unlikely.
   return obj.GetClassId();
 }
@@ -418,8 +419,8 @@
       return WeakProperty::InstanceSize();
     case kByteBufferCid:
     case kByteDataViewCid:
-    case kFfiPointerCid:
-    case kFfiDynamicLibraryCid:
+    case kPointerCid:
+    case kDynamicLibraryCid:
 #define HANDLE_CASE(clazz) case kFfi##clazz##Cid:
       CLASS_LIST_FFI_TYPE_MARKER(HANDLE_CASE)
 #undef HANDLE_CASE
@@ -1002,6 +1003,7 @@
 namespace target {
 
 const word Array::kMaxElements = Array_kMaxElements;
+const word Context::kMaxElements = Context_kMaxElements;
 
 }  // namespace target
 }  // namespace compiler
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index ba5d79b..85c8181 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -648,6 +648,12 @@
   static word InstanceSize();
 };
 
+class ImmutableLinkedHashBase : public LinkedHashBase {
+ public:
+  // The data slot is an immutable list and final in immutable maps and sets.
+  static word data_offset();
+};
+
 class LinkedHashMap : public LinkedHashBase {
  public:
   FINAL_CLASS();
@@ -1050,6 +1056,7 @@
 class Thread : public AllStatic {
  public:
   static word api_top_scope_offset();
+  static word double_truncate_round_supported_offset();
   static word exit_through_ffi_offset();
   static uword exit_through_runtime_call();
   static uword exit_through_ffi();
@@ -1317,6 +1324,8 @@
   static word InstanceSize(intptr_t length);
   static word InstanceSize();
   FINAL_CLASS();
+
+  static const word kMaxElements;
 };
 
 class Closure : public AllStatic {
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 8598191..bc544f7 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -58,6 +58,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 0;
 static constexpr dart::compiler::target::word
@@ -197,6 +198,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 12;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     8;
@@ -220,12 +223,11 @@
     12;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    184;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 124;
+    152;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 108;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    212;
-static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    104;
+    172;
+static constexpr dart::compiler::target::word ObjectStore_type_type_offset = 96;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -284,9 +286,11 @@
     Thread_call_to_runtime_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 144;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 796;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 800;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 792;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 232;
@@ -328,7 +332,7 @@
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
     784;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 800;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 804;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
@@ -422,14 +426,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    39;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 20;
@@ -602,6 +608,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -742,6 +750,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 24;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     16;
@@ -765,12 +775,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -834,6 +844,8 @@
 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_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -972,14 +984,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    71;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 40;
@@ -1153,6 +1167,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 6;
 static constexpr dart::compiler::target::word
@@ -1292,6 +1307,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 12;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     8;
@@ -1315,12 +1332,11 @@
     12;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    184;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 124;
+    152;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 108;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    212;
-static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    104;
+    172;
+static constexpr dart::compiler::target::word ObjectStore_type_type_offset = 96;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -1379,9 +1395,11 @@
     Thread_call_to_runtime_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 144;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 764;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 768;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 760;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 232;
@@ -1423,7 +1441,7 @@
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
     752;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 768;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 772;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
@@ -1517,14 +1535,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    39;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 20;
@@ -1694,6 +1714,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -1834,6 +1856,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 24;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     16;
@@ -1857,12 +1881,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -1926,6 +1950,8 @@
 static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -2064,14 +2090,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    71;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 40;
@@ -2218,8 +2246,8 @@
 static constexpr dart::compiler::target::word Code_elements_start_offset = 176;
 static constexpr dart::compiler::target::word Code_element_size = 4;
 static constexpr dart::compiler::target::word Context_elements_start_offset =
-    24;
-static constexpr dart::compiler::target::word Context_element_size = 8;
+    16;
+static constexpr dart::compiler::target::word Context_element_size = 4;
 static constexpr dart::compiler::target::word
     ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word ContextScope_element_size = 32;
@@ -2246,6 +2274,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -2328,7 +2357,7 @@
     48;
 static constexpr dart::compiler::target::word Code_owner_offset = 56;
 static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
-static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Context_parent_offset = 12;
 static constexpr dart::compiler::target::word Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     ExternalOneByteString_external_data_offset = 16;
@@ -2385,6 +2414,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 16;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     12;
@@ -2408,12 +2439,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -2477,6 +2508,8 @@
 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_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -2615,14 +2648,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    51;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 32;
@@ -2678,7 +2713,7 @@
 static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
     16;
-static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 16;
 static constexpr dart::compiler::target::word Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
 static constexpr dart::compiler::target::word
@@ -2768,8 +2803,8 @@
 static constexpr dart::compiler::target::word Code_elements_start_offset = 176;
 static constexpr dart::compiler::target::word Code_element_size = 4;
 static constexpr dart::compiler::target::word Context_elements_start_offset =
-    24;
-static constexpr dart::compiler::target::word Context_element_size = 8;
+    16;
+static constexpr dart::compiler::target::word Context_element_size = 4;
 static constexpr dart::compiler::target::word
     ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word ContextScope_element_size = 32;
@@ -2796,6 +2831,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -2878,7 +2914,7 @@
     48;
 static constexpr dart::compiler::target::word Code_owner_offset = 56;
 static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
-static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Context_parent_offset = 12;
 static constexpr dart::compiler::target::word Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     ExternalOneByteString_external_data_offset = 16;
@@ -2935,6 +2971,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 16;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     12;
@@ -2958,12 +2996,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -3027,6 +3065,8 @@
 static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -3165,14 +3205,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    51;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 32;
@@ -3229,7 +3271,7 @@
 static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
     16;
-static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 16;
 static constexpr dart::compiler::target::word Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
 static constexpr dart::compiler::target::word
@@ -3346,6 +3388,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 0;
 static constexpr dart::compiler::target::word
@@ -3482,6 +3525,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 16;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 12;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     8;
@@ -3505,12 +3550,11 @@
     12;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    184;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 124;
+    152;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 108;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    212;
-static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    104;
+    172;
+static constexpr dart::compiler::target::word ObjectStore_type_type_offset = 96;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -3569,9 +3613,11 @@
     Thread_call_to_runtime_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 144;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 796;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 800;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 792;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 232;
@@ -3613,7 +3659,7 @@
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
     784;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 800;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 804;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
@@ -3707,14 +3753,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    39;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 20;
@@ -3884,6 +3932,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -4021,6 +4071,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 32;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 24;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     16;
@@ -4044,12 +4096,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -4113,6 +4165,8 @@
 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_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -4251,14 +4305,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    71;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 40;
@@ -4429,6 +4485,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 6;
 static constexpr dart::compiler::target::word
@@ -4565,6 +4622,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 16;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 12;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     8;
@@ -4588,12 +4647,11 @@
     12;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    184;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 124;
+    152;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 108;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    212;
-static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    104;
+    172;
+static constexpr dart::compiler::target::word ObjectStore_type_type_offset = 96;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -4652,9 +4710,11 @@
     Thread_call_to_runtime_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 144;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 764;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 768;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 760;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 232;
@@ -4696,7 +4756,7 @@
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
     752;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 768;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 772;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
@@ -4790,14 +4850,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    39;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 20;
@@ -4964,6 +5026,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -5101,6 +5165,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 32;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 24;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     16;
@@ -5124,12 +5190,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -5193,6 +5259,8 @@
 static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -5331,14 +5399,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    71;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 40;
@@ -5482,8 +5552,8 @@
 static constexpr dart::compiler::target::word Code_elements_start_offset = 144;
 static constexpr dart::compiler::target::word Code_element_size = 4;
 static constexpr dart::compiler::target::word Context_elements_start_offset =
-    24;
-static constexpr dart::compiler::target::word Context_element_size = 8;
+    16;
+static constexpr dart::compiler::target::word Context_element_size = 4;
 static constexpr dart::compiler::target::word
     ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word ContextScope_element_size = 32;
@@ -5510,6 +5580,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -5590,7 +5661,7 @@
     48;
 static constexpr dart::compiler::target::word Code_owner_offset = 56;
 static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
-static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Context_parent_offset = 12;
 static constexpr dart::compiler::target::word Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     ExternalOneByteString_external_data_offset = 16;
@@ -5646,6 +5717,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 32;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 16;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     12;
@@ -5669,12 +5742,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -5738,6 +5811,8 @@
 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_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -5876,14 +5951,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    51;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 32;
@@ -5939,7 +6016,7 @@
 static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
     16;
-static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 16;
 static constexpr dart::compiler::target::word Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
 static constexpr dart::compiler::target::word
@@ -6026,8 +6103,8 @@
 static constexpr dart::compiler::target::word Code_elements_start_offset = 144;
 static constexpr dart::compiler::target::word Code_element_size = 4;
 static constexpr dart::compiler::target::word Context_elements_start_offset =
-    24;
-static constexpr dart::compiler::target::word Context_element_size = 8;
+    16;
+static constexpr dart::compiler::target::word Context_element_size = 4;
 static constexpr dart::compiler::target::word
     ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word ContextScope_element_size = 32;
@@ -6054,6 +6131,7 @@
 static constexpr dart::compiler::target::word Array_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word Context_kMaxElements = 268435455;
 static constexpr dart::compiler::target::word
     Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -6134,7 +6212,7 @@
     48;
 static constexpr dart::compiler::target::word Code_owner_offset = 56;
 static constexpr dart::compiler::target::word Context_num_variables_offset = 8;
-static constexpr dart::compiler::target::word Context_parent_offset = 16;
+static constexpr dart::compiler::target::word Context_parent_offset = 12;
 static constexpr dart::compiler::target::word Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     ExternalOneByteString_external_data_offset = 16;
@@ -6190,6 +6268,8 @@
 static constexpr dart::compiler::target::word Isolate_user_tag_offset = 32;
 static constexpr dart::compiler::target::word LinkedHashBase_data_offset = 16;
 static constexpr dart::compiler::target::word
+    ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word LinkedHashBase_hash_mask_offset =
     12;
@@ -6213,12 +6293,12 @@
     24;
 static constexpr dart::compiler::target::word NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word ObjectStore_double_type_offset =
-    368;
-static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 248;
+    304;
+static constexpr dart::compiler::target::word ObjectStore_int_type_offset = 216;
 static constexpr dart::compiler::target::word ObjectStore_string_type_offset =
-    424;
+    344;
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_field_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -6282,6 +6362,8 @@
 static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 448;
@@ -6420,14 +6502,16 @@
 static constexpr dart::compiler::target::word Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word FunctionType_nullability_offset =
+    51;
+static constexpr dart::compiler::target::word
     FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     TypeParameter_parameterized_class_id_offset = 32;
@@ -6484,7 +6568,7 @@
 static constexpr dart::compiler::target::word CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word CompressedStackMaps_HeaderSize =
     16;
-static constexpr dart::compiler::target::word Context_header_size = 24;
+static constexpr dart::compiler::target::word Context_header_size = 16;
 static constexpr dart::compiler::target::word Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word DynamicLibrary_InstanceSize = 16;
 static constexpr dart::compiler::target::word
@@ -6611,6 +6695,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 0;
 static constexpr dart::compiler::target::word
@@ -6761,6 +6847,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     12;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 8;
@@ -6789,13 +6877,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 184;
+    AOT_ObjectStore_double_type_offset = 152;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    124;
+    108;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 212;
+    AOT_ObjectStore_string_type_offset = 172;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    104;
+    96;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word
@@ -6862,9 +6950,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    796;
+    800;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 792;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -6908,7 +6998,7 @@
     AOT_Thread_exit_through_ffi_offset = 784;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    800;
+    804;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
 static constexpr dart::compiler::target::word
@@ -7010,14 +7100,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 39;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 20;
@@ -7219,6 +7311,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -7370,6 +7464,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     24;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 16;
@@ -7398,13 +7494,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -7474,6 +7570,8 @@
     1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -7620,14 +7718,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 71;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 40;
@@ -7834,6 +7934,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -7985,6 +8087,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     24;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 16;
@@ -8013,13 +8117,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -8089,6 +8193,8 @@
     1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -8235,14 +8341,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 71;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 40;
@@ -8414,8 +8522,8 @@
     152;
 static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
 static constexpr dart::compiler::target::word
-    AOT_Context_elements_start_offset = 24;
-static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
+    AOT_Context_elements_start_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
 static constexpr dart::compiler::target::word
     AOT_ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
@@ -8447,6 +8555,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -8533,7 +8643,7 @@
 static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
 static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
     8;
-static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
 static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_ExternalOneByteString_external_data_offset = 16;
@@ -8597,6 +8707,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     16;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 12;
@@ -8625,13 +8737,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -8701,6 +8813,8 @@
     1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -8847,14 +8961,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 51;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 32;
@@ -8922,7 +9038,7 @@
 static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word
     AOT_CompressedStackMaps_HeaderSize = 16;
-static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
+static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
 static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
     16;
@@ -9025,8 +9141,8 @@
     152;
 static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
 static constexpr dart::compiler::target::word
-    AOT_Context_elements_start_offset = 24;
-static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
+    AOT_Context_elements_start_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
 static constexpr dart::compiler::target::word
     AOT_ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
@@ -9058,6 +9174,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -9144,7 +9262,7 @@
 static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
 static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
     8;
-static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
 static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_ExternalOneByteString_external_data_offset = 16;
@@ -9208,6 +9326,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     16;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 12;
@@ -9236,13 +9356,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -9312,6 +9432,8 @@
     1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -9458,14 +9580,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 51;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 32;
@@ -9534,7 +9658,7 @@
 static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word
     AOT_CompressedStackMaps_HeaderSize = 16;
-static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
+static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
 static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
     16;
@@ -9669,6 +9793,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65533;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 0;
 static constexpr dart::compiler::target::word
@@ -9815,6 +9941,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     12;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 12;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 20;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 8;
@@ -9843,13 +9971,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 184;
+    AOT_ObjectStore_double_type_offset = 152;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    124;
+    108;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 212;
+    AOT_ObjectStore_string_type_offset = 172;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    104;
+    96;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word
@@ -9916,9 +10044,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    796;
+    800;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 792;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     316;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -9962,7 +10092,7 @@
     AOT_Thread_exit_through_ffi_offset = 784;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    800;
+    804;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
 static constexpr dart::compiler::target::word
@@ -10064,14 +10194,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 25;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 28;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 24;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 39;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 36;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 20;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 24;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 12;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 20;
@@ -10270,6 +10402,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -10417,6 +10551,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     24;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 16;
@@ -10445,13 +10581,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -10521,6 +10657,8 @@
     1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -10667,14 +10805,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 71;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 40;
@@ -10878,6 +11018,8 @@
     576460752303423487;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     32765;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    576460752303423487;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -11025,6 +11167,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     24;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 24;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 16;
@@ -11053,13 +11197,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -11129,6 +11273,8 @@
     1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -11275,14 +11421,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 49;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 56;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 48;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 71;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 64;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 68;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 40;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 48;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 40;
@@ -11451,8 +11599,8 @@
     120;
 static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
 static constexpr dart::compiler::target::word
-    AOT_Context_elements_start_offset = 24;
-static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
+    AOT_Context_elements_start_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
 static constexpr dart::compiler::target::word
     AOT_ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
@@ -11484,6 +11632,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -11568,7 +11718,7 @@
 static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
 static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
     8;
-static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
 static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_ExternalOneByteString_external_data_offset = 16;
@@ -11630,6 +11780,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     16;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 12;
@@ -11658,13 +11810,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -11734,6 +11886,8 @@
     1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1592;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -11880,14 +12034,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 51;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 32;
@@ -11955,7 +12111,7 @@
 static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word
     AOT_CompressedStackMaps_HeaderSize = 16;
-static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
+static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
 static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
     16;
@@ -12055,8 +12211,8 @@
     120;
 static constexpr dart::compiler::target::word AOT_Code_element_size = 4;
 static constexpr dart::compiler::target::word
-    AOT_Context_elements_start_offset = 24;
-static constexpr dart::compiler::target::word AOT_Context_element_size = 8;
+    AOT_Context_elements_start_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_element_size = 4;
 static constexpr dart::compiler::target::word
     AOT_ContextScope_elements_start_offset = 16;
 static constexpr dart::compiler::target::word AOT_ContextScope_element_size =
@@ -12088,6 +12244,8 @@
     268435455;
 static constexpr dart::compiler::target::word AOT_Array_kMaxNewSpaceElements =
     65532;
+static constexpr dart::compiler::target::word AOT_Context_kMaxElements =
+    268435455;
 static constexpr dart::compiler::target::word
     AOT_Instructions_kMonomorphicEntryOffsetJIT = 8;
 static constexpr dart::compiler::target::word
@@ -12172,7 +12330,7 @@
 static constexpr dart::compiler::target::word AOT_Code_owner_offset = 56;
 static constexpr dart::compiler::target::word AOT_Context_num_variables_offset =
     8;
-static constexpr dart::compiler::target::word AOT_Context_parent_offset = 16;
+static constexpr dart::compiler::target::word AOT_Context_parent_offset = 12;
 static constexpr dart::compiler::target::word AOT_Double_value_offset = 8;
 static constexpr dart::compiler::target::word
     AOT_ExternalOneByteString_external_data_offset = 16;
@@ -12234,6 +12392,8 @@
 static constexpr dart::compiler::target::word AOT_LinkedHashBase_data_offset =
     16;
 static constexpr dart::compiler::target::word
+    AOT_ImmutableLinkedHashBase_data_offset = 16;
+static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_deleted_keys_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_LinkedHashBase_hash_mask_offset = 12;
@@ -12262,13 +12422,13 @@
 static constexpr dart::compiler::target::word
     AOT_NativeArguments_thread_offset = 0;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_double_type_offset = 368;
+    AOT_ObjectStore_double_type_offset = 304;
 static constexpr dart::compiler::target::word AOT_ObjectStore_int_type_offset =
-    248;
+    216;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_string_type_offset = 424;
+    AOT_ObjectStore_string_type_offset = 344;
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
-    208;
+    192;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word
@@ -12338,6 +12498,8 @@
     1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
+static constexpr dart::compiler::target::word
+    AOT_Thread_double_truncate_round_supported_offset = 1656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
     616;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -12484,14 +12646,16 @@
 static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 37;
 static constexpr dart::compiler::target::word AOT_FunctionType_hash_offset = 40;
 static constexpr dart::compiler::target::word
+    AOT_FunctionType_named_parameter_names_offset = 36;
+static constexpr dart::compiler::target::word
+    AOT_FunctionType_nullability_offset = 51;
+static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_parameter_counts_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_packed_type_parameter_counts_offset = 48;
 static constexpr dart::compiler::target::word
     AOT_FunctionType_parameter_types_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_FunctionType_named_parameter_names_offset = 36;
-static constexpr dart::compiler::target::word
     AOT_FunctionType_type_parameters_offset = 24;
 static constexpr dart::compiler::target::word
     AOT_TypeParameter_parameterized_class_id_offset = 32;
@@ -12560,7 +12724,7 @@
 static constexpr dart::compiler::target::word AOT_CodeSourceMap_HeaderSize = 16;
 static constexpr dart::compiler::target::word
     AOT_CompressedStackMaps_HeaderSize = 16;
-static constexpr dart::compiler::target::word AOT_Context_header_size = 24;
+static constexpr dart::compiler::target::word AOT_Context_header_size = 16;
 static constexpr dart::compiler::target::word AOT_Double_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_DynamicLibrary_InstanceSize =
     16;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 2954ccb7..88ab5b2 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -68,6 +68,7 @@
   ARRAY_SIZEOF(TwoByteString, InstanceSize, element_offset)                    \
   CONSTANT(Array, kMaxElements)                                                \
   CONSTANT(Array, kMaxNewSpaceElements)                                        \
+  CONSTANT(Context, kMaxElements)                                              \
   CONSTANT(Instructions, kMonomorphicEntryOffsetJIT)                           \
   CONSTANT(Instructions, kPolymorphicEntryOffsetJIT)                           \
   CONSTANT(Instructions, kMonomorphicEntryOffsetAOT)                           \
@@ -157,6 +158,7 @@
   NOT_IN_PRODUCT(FIELD(Isolate, single_step_offset))                           \
   FIELD(Isolate, user_tag_offset)                                              \
   FIELD(LinkedHashBase, data_offset)                                           \
+  FIELD(ImmutableLinkedHashBase, data_offset)                                  \
   FIELD(LinkedHashBase, deleted_keys_offset)                                   \
   FIELD(LinkedHashBase, hash_mask_offset)                                      \
   FIELD(LinkedHashBase, index_offset)                                          \
@@ -212,6 +214,7 @@
   FIELD(Thread, call_to_runtime_stub_offset)                                   \
   FIELD(Thread, dart_stream_offset)                                            \
   FIELD(Thread, dispatch_table_array_offset)                                   \
+  FIELD(Thread, double_truncate_round_supported_offset)                        \
   FIELD(Thread, optimize_entry_offset)                                         \
   FIELD(Thread, optimize_stub_offset)                                          \
   FIELD(Thread, deoptimize_entry_offset)                                       \
@@ -291,10 +294,11 @@
   FIELD(Type, type_state_offset)                                               \
   FIELD(Type, nullability_offset)                                              \
   FIELD(FunctionType, hash_offset)                                             \
+  FIELD(FunctionType, named_parameter_names_offset)                            \
+  FIELD(FunctionType, nullability_offset)                                      \
   FIELD(FunctionType, packed_parameter_counts_offset)                          \
   FIELD(FunctionType, packed_type_parameter_counts_offset)                     \
   FIELD(FunctionType, parameter_types_offset)                                  \
-  FIELD(FunctionType, named_parameter_names_offset)                            \
   FIELD(FunctionType, type_parameters_offset)                                  \
   FIELD(TypeParameter, parameterized_class_id_offset)                          \
   FIELD(TypeParameter, index_offset)                                           \
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index 7b3e42e..c340571 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -1061,7 +1061,9 @@
   __ StoreUnboxedDouble(DoubleToIntegerStubABI::kInputReg, THR,
                         target::Thread::unboxed_double_runtime_arg_offset());
   __ PushObject(NullObject()); /* Make room for result. */
-  __ CallRuntime(kDoubleToIntegerRuntimeEntry, 0);
+  __ PushRegister(DoubleToIntegerStubABI::kRecognizedKindReg);
+  __ CallRuntime(kDoubleToIntegerRuntimeEntry, 1);
+  __ Drop(1);
   __ PopRegister(DoubleToIntegerStubABI::kResultReg);
   __ LeaveStubFrame();
   __ Ret();
diff --git a/runtime/vm/compiler/stub_code_compiler.h b/runtime/vm/compiler/stub_code_compiler.h
index a425e97..58f52ce 100644
--- a/runtime/vm/compiler/stub_code_compiler.h
+++ b/runtime/vm/compiler/stub_code_compiler.h
@@ -128,7 +128,7 @@
 #elif defined(TARGET_ARCH_ARM64)
   static constexpr intptr_t kNativeCallbackTrampolineSize = 12;
 #if defined(DART_COMPRESSED_POINTERS)
-  static constexpr intptr_t kNativeCallbackSharedStubSize = 276;
+  static constexpr intptr_t kNativeCallbackSharedStubSize = 292;
 #else
   static constexpr intptr_t kNativeCallbackSharedStubSize = 268;
 #endif
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index 11775fc..eefb057 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -1559,7 +1559,7 @@
 static void GenerateWriteBarrierStubHelper(Assembler* assembler,
                                            Address stub_code,
                                            bool cards) {
-  Label add_to_mark_stack, remember_card;
+  Label add_to_mark_stack, remember_card, lost_race;
   __ tst(R0, Operand(1 << target::ObjectAlignment::kNewObjectBitPosition));
   __ b(&add_to_mark_stack, ZERO);
 
@@ -1581,13 +1581,15 @@
   // Save values being destroyed.
   __ PushList((1 << R2) | (1 << R3) | (1 << R4));
 
-  // Atomically set the remembered bit of the object header.
+  // Atomically clear kOldAndNotRememberedBit.
   ASSERT(target::Object::tags_offset() == 0);
   __ sub(R3, R1, Operand(kHeapObjectTag));
   // R3: Untagged address of header word (ldrex/strex do not support offsets).
   Label retry;
   __ Bind(&retry);
   __ ldrex(R2, R3);
+  __ tst(R2, Operand(1 << target::UntaggedObject::kOldAndNotRememberedBit));
+  __ b(&lost_race, ZERO);
   __ bic(R2, R2, Operand(1 << target::UntaggedObject::kOldAndNotRememberedBit));
   __ strex(R4, R2, R3);
   __ cmp(R4, Operand(1));
@@ -1629,7 +1631,7 @@
   __ Bind(&add_to_mark_stack);
   __ PushList((1 << R2) | (1 << R3) | (1 << R4));  // Spill.
 
-  Label marking_retry, lost_race, marking_overflow;
+  Label marking_retry, marking_overflow;
   // Atomically clear kOldAndNotMarkedBit.
   ASSERT(target::Object::tags_offset() == 0);
   __ sub(R3, R0, Operand(kHeapObjectTag));
@@ -1665,6 +1667,7 @@
   __ Ret();
 
   __ Bind(&lost_race);
+  __ clrex();
   __ PopList((1 << R2) | (1 << R3) | (1 << R4));  // Unspill.
   __ Ret();
 
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 128d968..54196b7 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -415,6 +415,13 @@
 
   // Load the code object.
   __ LoadFromOffset(R10, THR, compiler::target::Thread::callback_code_offset());
+#if defined(DART_COMPRESSED_POINTERS)
+  // Partially setup HEAP_BITS for LoadCompressed[FieldFromOffset].
+  ASSERT(IsAbiPreservedRegister(HEAP_BITS));  // Need to save and restore.
+  __ Push(HEAP_BITS);
+  __ ldr(HEAP_BITS, compiler::Address(THR, target::Thread::heap_base_offset()));
+  __ LsrImmediate(HEAP_BITS, HEAP_BITS, 32);
+#endif
   __ LoadCompressedFieldFromOffset(
       R10, R10, compiler::target::GrowableObjectArray::data_offset());
   __ LoadCompressed(
@@ -427,6 +434,9 @@
           /*array=*/R10,
           /*index=*/R9,
           /*temp=*/TMP));
+#if defined(DART_COMPRESSED_POINTERS)
+  __ Pop(HEAP_BITS);
+#endif
   __ LoadFieldFromOffset(R10, R10,
                          compiler::target::Code::entry_point_offset());
 
@@ -488,10 +498,11 @@
                           R0,  // instance
                           R1,  // end address
                           R2, R3);
-      __ ldr(R1, Address(THR, target::Thread::object_null_offset()));
-      __ str(R1, FieldAddress(R0, target::Context::parent_offset()));
+      __ StoreCompressedIntoObjectNoBarrier(
+          R0, FieldAddress(R0, target::Context::parent_offset()), NULL_REG);
       __ LoadImmediate(R1, 1);
-      __ str(R1, FieldAddress(R0, target::Context::num_variables_offset()));
+      __ str(R1, FieldAddress(R0, target::Context::num_variables_offset()),
+             kFourBytes);
       __ b(&done);
     }
 
@@ -511,10 +522,11 @@
   // Store receiver in context
   __ ldr(AllocateClosureABI::kScratchReg,
          Address(FP, target::kWordSize * kReceiverOffset));
-  __ StoreIntoObject(AllocateClosureABI::kContextReg,
-                     FieldAddress(AllocateClosureABI::kContextReg,
-                                  target::Context::variable_offset(0)),
-                     AllocateClosureABI::kScratchReg);
+  __ StoreCompressedIntoObject(
+      AllocateClosureABI::kContextReg,
+      FieldAddress(AllocateClosureABI::kContextReg,
+                   target::Context::variable_offset(0)),
+      AllocateClosureABI::kScratchReg);
 
   // Pop function before pushing context.
   __ Pop(AllocateClosureABI::kFunctionReg);
@@ -1487,7 +1499,7 @@
       target::Context::header_size() +
       target::ObjectAlignment::kObjectAlignment - 1;
   __ LoadImmediate(R2, fixed_size_plus_alignment_padding);
-  __ add(R2, R2, Operand(R1, LSL, 3));
+  __ add(R2, R2, Operand(R1, LSL, kCompressedWordSizeLog2));
   ASSERT(kSmiTagShift == 1);
   __ andi(R2, R2, Immediate(~(target::ObjectAlignment::kObjectAlignment - 1)));
 
@@ -1539,7 +1551,8 @@
   // Setup up number of context variables field.
   // R0: new object.
   // R1: number of context variables as integer value (not object).
-  __ StoreFieldToOffset(R1, R0, target::Context::num_variables_offset());
+  __ StoreFieldToOffset(R1, R0, target::Context::num_variables_offset(),
+                        kFourBytes);
 }
 
 // Called for inline allocation of contexts.
@@ -1558,13 +1571,12 @@
     // Setup the parent field.
     // R0: new object.
     // R1: number of context variables.
-    __ LoadObject(R2, NullObject());
-    __ StoreFieldToOffset(R2, R0, target::Context::parent_offset());
+    __ StoreCompressedIntoObjectOffset(R0, target::Context::parent_offset(),
+                                       NULL_REG);
 
     // Initialize the context variables.
     // R0: new object.
     // R1: number of context variables.
-    // R2: raw null.
     {
       Label loop, done;
       __ AddImmediate(R3, R0,
@@ -1572,7 +1584,7 @@
       __ Bind(&loop);
       __ subs(R1, R1, Operand(1));
       __ b(&done, MI);
-      __ str(R2, Address(R3, R1, UXTX, Address::Scaled));
+      __ str(NULL_REG, Address(R3, R1, UXTX, Address::Scaled), kObjectBytes);
       __ b(&loop, NE);  // Loop if R1 not zero.
       __ Bind(&done);
     }
@@ -1626,10 +1638,10 @@
     GenerateAllocateContextSpaceStub(assembler, &slow_case);
 
     // Load parent in the existing context.
-    __ ldr(R3, FieldAddress(R5, target::Context::parent_offset()));
+    __ LoadCompressed(R3, FieldAddress(R5, target::Context::parent_offset()));
     // Setup the parent field.
     // R0: new context.
-    __ StoreIntoObjectNoBarrier(
+    __ StoreCompressedIntoObjectNoBarrier(
         R0, FieldAddress(R0, target::Context::parent_offset()), R3);
 
     // Clone the context variables.
@@ -1648,8 +1660,8 @@
       __ subs(R1, R1, Operand(1));
       __ b(&done, MI);
 
-      __ ldr(R5, Address(R4, R1, UXTX, Address::Scaled));
-      __ str(R5, Address(R3, R1, UXTX, Address::Scaled));
+      __ ldr(R5, Address(R4, R1, UXTX, Address::Scaled), kObjectBytes);
+      __ str(R5, Address(R3, R1, UXTX, Address::Scaled), kObjectBytes);
       __ b(&loop, NE);  // Loop if R1 not zero.
 
       __ Bind(&done);
@@ -1715,7 +1727,7 @@
 static void GenerateWriteBarrierStubHelper(Assembler* assembler,
                                            Address stub_code,
                                            bool cards) {
-  Label add_to_mark_stack, remember_card;
+  Label add_to_mark_stack, remember_card, lost_race;
   __ tbz(&add_to_mark_stack, R0,
          target::ObjectAlignment::kNewObjectBitPosition);
 
@@ -1737,13 +1749,14 @@
   __ Push(R3);
   __ Push(R4);
 
-  // Atomically set the remembered bit of the object header.
+  // Atomically clear kOldAndNotRememberedBit.
   ASSERT(target::Object::tags_offset() == 0);
   __ sub(R3, R1, Operand(kHeapObjectTag));
   // R3: Untagged address of header word (ldxr/stxr do not support offsets).
   Label retry;
   __ Bind(&retry);
   __ ldxr(R2, R3, kEightBytes);
+  __ tbz(&lost_race, R2, target::UntaggedObject::kOldAndNotRememberedBit);
   __ AndImmediate(R2, R2,
                   ~(1 << target::UntaggedObject::kOldAndNotRememberedBit));
   __ stxr(R4, R2, R3, kEightBytes);
@@ -1789,7 +1802,7 @@
   __ Push(R4);  // Spill.
 
   // Atomically clear kOldAndNotMarkedBit.
-  Label marking_retry, lost_race, marking_overflow;
+  Label marking_retry, marking_overflow;
   ASSERT(target::Object::tags_offset() == 0);
   __ sub(R3, R0, Operand(kHeapObjectTag));
   // R3: Untagged address of header word (ldxr/stxr do not support offsets).
@@ -1826,6 +1839,7 @@
   __ ret();
 
   __ Bind(&lost_race);
+  __ clrex();
   __ Pop(R4);  // Unspill.
   __ Pop(R3);  // Unspill.
   __ Pop(R2);  // Unspill.
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index ea1b6a4..654e0ef 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -1349,10 +1349,20 @@
 #endif
   }
 
-  // lock+andl is an atomic read-modify-write.
-  __ lock();
-  __ andl(FieldAddress(EDX, target::Object::tags_offset()),
+  // Atomically clear kOldAndNotRememberedBit.
+  Label retry, lost_race;
+  __ movl(EAX, FieldAddress(EDX, target::Object::tags_offset()));
+  __ Bind(&retry);
+  __ movl(ECX, EAX);
+  __ testl(ECX,
+           Immediate(1 << target::UntaggedObject::kOldAndNotRememberedBit));
+  __ j(ZERO, &lost_race);  // Remembered by another thread.
+  __ andl(ECX,
           Immediate(~(1 << target::UntaggedObject::kOldAndNotRememberedBit)));
+  // Cmpxchgl: compare value = implicit operand EAX, new value = ECX.
+  // On failure, EAX is updated with the current value.
+  __ LockCmpxchgl(FieldAddress(EDX, target::Object::tags_offset()), ECX);
+  __ j(NOT_EQUAL, &retry, Assembler::kNearJump);
 
   // Load the StoreBuffer block out of the thread. Then load top_ out of the
   // StoreBufferBlock and add the address to the pointers_.
@@ -1390,6 +1400,11 @@
   __ LeaveCallRuntimeFrame();
   __ ret();
 
+  __ Bind(&lost_race);
+  __ popl(ECX);  // Unspill.
+  __ popl(EAX);  // Unspill.
+  __ ret();
+
   if (cards) {
     Label remember_card_slow;
 
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 096d3c7..12079e9 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -434,8 +434,9 @@
                           RSI,  // end address
                           RDI);
       __ movq(RSI, Address(THR, target::Thread::object_null_offset()));
-      __ movq(FieldAddress(RAX, target::Context::parent_offset()), RSI);
-      __ movq(FieldAddress(RAX, target::Context::num_variables_offset()),
+      __ StoreCompressedIntoObjectNoBarrier(
+          RAX, FieldAddress(RAX, target::Context::parent_offset()), RSI);
+      __ movl(FieldAddress(RAX, target::Context::num_variables_offset()),
               Immediate(1));
       __ jmp(&done);
     }
@@ -455,10 +456,11 @@
   // Store receiver in context
   __ movq(AllocateClosureABI::kScratchReg,
           Address(RBP, target::kWordSize * kReceiverOffsetInWords));
-  __ StoreIntoObject(AllocateClosureABI::kContextReg,
-                     FieldAddress(AllocateClosureABI::kContextReg,
-                                  target::Context::variable_offset(0)),
-                     AllocateClosureABI::kScratchReg);
+  __ StoreCompressedIntoObject(
+      AllocateClosureABI::kContextReg,
+      FieldAddress(AllocateClosureABI::kContextReg,
+                   target::Context::variable_offset(0)),
+      AllocateClosureABI::kScratchReg);
 
   // Pop function.
   __ popq(AllocateClosureABI::kFunctionReg);
@@ -1420,7 +1422,8 @@
   intptr_t fixed_size_plus_alignment_padding =
       (target::Context::header_size() +
        target::ObjectAlignment::kObjectAlignment - 1);
-  __ leaq(R13, Address(R10, TIMES_8, fixed_size_plus_alignment_padding));
+  __ leaq(R13, Address(R10, TIMES_COMPRESSED_WORD_SIZE,
+                       fixed_size_plus_alignment_padding));
   __ andq(R13, Immediate(-target::ObjectAlignment::kObjectAlignment));
 
   // Check for allocation tracing.
@@ -1454,7 +1457,8 @@
   // R10: number of context variables.
   {
     Label size_tag_overflow, done;
-    __ leaq(R13, Address(R10, TIMES_8, fixed_size_plus_alignment_padding));
+    __ leaq(R13, Address(R10, TIMES_COMPRESSED_WORD_SIZE,
+                         fixed_size_plus_alignment_padding));
     __ andq(R13, Immediate(-target::ObjectAlignment::kObjectAlignment));
     __ cmpq(R13, Immediate(target::UntaggedObject::kSizeTagMaxSizeTag));
     __ j(ABOVE, &size_tag_overflow, Assembler::kNearJump);
@@ -1478,7 +1482,7 @@
   // Setup up number of context variables field.
   // RAX: new object.
   // R10: number of context variables as integer value (not object).
-  __ movq(FieldAddress(RAX, target::Context::num_variables_offset()), R10);
+  __ movl(FieldAddress(RAX, target::Context::num_variables_offset()), R10);
 }
 
 // Called for inline allocation of contexts.
@@ -1499,7 +1503,7 @@
     // RAX: new object.
     // R9: Parent object, initialised to null.
     // No generational barrier needed, since we are storing null.
-    __ StoreIntoObjectNoBarrier(
+    __ StoreCompressedIntoObjectNoBarrier(
         RAX, FieldAddress(RAX, target::Context::parent_offset()), R9);
 
     // Initialize the context variables.
@@ -1517,7 +1521,8 @@
       __ Bind(&loop);
       __ decq(R10);
       // No generational barrier needed, since we are storing null.
-      __ StoreIntoObjectNoBarrier(RAX, Address(R13, R10, TIMES_8, 0), R9);
+      __ StoreCompressedIntoObjectNoBarrier(
+          RAX, Address(R13, R10, TIMES_COMPRESSED_WORD_SIZE, 0), R9);
       __ Bind(&entry);
       __ cmpq(R10, Immediate(0));
       __ j(NOT_EQUAL, &loop, Assembler::kNearJump);
@@ -1567,11 +1572,11 @@
     GenerateAllocateContextSpaceStub(assembler, &slow_case);
 
     // Load parent in the existing context.
-    __ movq(R13, FieldAddress(R9, target::Context::parent_offset()));
+    __ LoadCompressed(R13, FieldAddress(R9, target::Context::parent_offset()));
     // Setup the parent field.
     // RAX: new object.
     // R9: Old parent object.
-    __ StoreIntoObjectNoBarrier(
+    __ StoreCompressedIntoObjectNoBarrier(
         RAX, FieldAddress(RAX, target::Context::parent_offset()), R13);
 
     // Clone the context variables.
@@ -1582,11 +1587,12 @@
       __ jmp(&entry, Assembler::kNearJump);
       __ Bind(&loop);
       __ decq(R10);
-      __ movq(R13, FieldAddress(R9, R10, TIMES_8,
-                                target::Context::variable_offset(0)));
-      __ StoreIntoObjectNoBarrier(
+      __ LoadCompressed(R13, FieldAddress(R9, R10, TIMES_COMPRESSED_WORD_SIZE,
+                                          target::Context::variable_offset(0)));
+      __ StoreCompressedIntoObjectNoBarrier(
           RAX,
-          FieldAddress(RAX, R10, TIMES_8, target::Context::variable_offset(0)),
+          FieldAddress(RAX, R10, TIMES_COMPRESSED_WORD_SIZE,
+                       target::Context::variable_offset(0)),
           R13);
       __ Bind(&entry);
       __ cmpq(R10, Immediate(0));
@@ -1651,7 +1657,7 @@
 static void GenerateWriteBarrierStubHelper(Assembler* assembler,
                                            Address stub_code,
                                            bool cards) {
-  Label add_to_mark_stack, remember_card;
+  Label add_to_mark_stack, remember_card, lost_race;
   __ testq(RAX, Immediate(1 << target::ObjectAlignment::kNewObjectBitPosition));
   __ j(ZERO, &add_to_mark_stack);
 
@@ -1670,17 +1676,23 @@
 #endif
   }
 
-  // Update the tags that this object has been remembered.
-  // RDX: Address being stored
-  // RAX: Current tag value
-  // lock+andq is an atomic read-modify-write.
-  __ lock();
-  __ andq(FieldAddress(RDX, target::Object::tags_offset()),
-          Immediate(~(1 << target::UntaggedObject::kOldAndNotRememberedBit)));
+  __ pushq(RAX);  // Spill.
+  __ pushq(RCX);  // Spill.
 
-  // Save registers being destroyed.
-  __ pushq(RAX);
-  __ pushq(RCX);
+  // Atomically clear kOldAndNotRemembered.
+  Label retry;
+  __ movq(RAX, FieldAddress(RDX, target::Object::tags_offset()));
+  __ Bind(&retry);
+  __ movq(RCX, RAX);
+  __ testq(RCX,
+           Immediate(1 << target::UntaggedObject::kOldAndNotRememberedBit));
+  __ j(ZERO, &lost_race);  // Remembered by another thread.
+  __ andq(RCX,
+          Immediate(~(1 << target::UntaggedObject::kOldAndNotRememberedBit)));
+  // Cmpxchgq: compare value = implicit operand RAX, new value = RCX.
+  // On failure, RAX is updated with the current value.
+  __ LockCmpxchgq(FieldAddress(RDX, target::Object::tags_offset()), RCX);
+  __ j(NOT_EQUAL, &retry, Assembler::kNearJump);
 
   // Load the StoreBuffer block out of the thread. Then load top_ out of the
   // StoreBufferBlock and add the address to the pointers_.
@@ -1698,9 +1710,8 @@
   __ incq(RCX);
   __ movl(Address(RAX, target::StoreBufferBlock::top_offset()), RCX);
   __ cmpl(RCX, Immediate(target::StoreBufferBlock::kSize));
-  // Restore values.
-  __ popq(RCX);
-  __ popq(RAX);
+  __ popq(RCX);  // Unspill.
+  __ popq(RAX);  // Unspill.
   __ j(EQUAL, &overflow, Assembler::kNearJump);
   __ ret();
 
@@ -1722,15 +1733,17 @@
   __ movq(TMP, RAX);  // RAX is fixed implicit operand of CAS.
 
   // Atomically clear kOldAndNotMarkedBit.
-  Label retry, lost_race, marking_overflow;
+  Label retry_marking, marking_overflow;
   __ movq(RAX, FieldAddress(TMP, target::Object::tags_offset()));
-  __ Bind(&retry);
+  __ Bind(&retry_marking);
   __ movq(RCX, RAX);
   __ testq(RCX, Immediate(1 << target::UntaggedObject::kOldAndNotMarkedBit));
   __ j(ZERO, &lost_race);  // Marked by another thread.
   __ andq(RCX, Immediate(~(1 << target::UntaggedObject::kOldAndNotMarkedBit)));
+  // Cmpxchgq: compare value = implicit operand RAX, new value = RCX.
+  // On failure, RAX is updated with the current value.
   __ LockCmpxchgq(FieldAddress(TMP, target::Object::tags_offset()), RCX);
-  __ j(NOT_EQUAL, &retry, Assembler::kNearJump);
+  __ j(NOT_EQUAL, &retry_marking, Assembler::kNearJump);
 
   __ movq(RAX, Address(THR, target::Thread::marking_stack_block_offset()));
   __ movl(RCX, Address(RAX, target::MarkingStackBlock::top_offset()));
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index 49df77f..649bca4 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -209,6 +209,7 @@
             /*platform_kernel=*/nullptr, /*platform_kernel_size=*/0,
             expr_text.ToCString(), Array::empty_array(), Array::empty_array(),
             String::Handle(lib_handle.url()).ToCString(), "A",
+            /* method= */ nullptr,
             /* is_static= */ false);
     EXPECT_EQ(Dart_KernelCompilationStatus_Ok, compilation_result.status);
 
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 05f2342..6adbe81 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -339,9 +339,18 @@
 struct TTSInternalRegs {
   static const Register kInstanceTypeArgumentsReg = R4;
   static const Register kScratchReg = R9;
+  static const Register kSubTypeArgumentReg = R3;
+  static const Register kSuperTypeArgumentReg = R8;
+
+  // Must be pushed/popped whenever generic type arguments are being checked as
+  // they overlap with registers in TypeTestABI.
+  static const intptr_t kSavedTypeArgumentRegisters =
+      (1 << kSubTypeArgumentReg) | (1 << kSuperTypeArgumentReg);
 
   static const intptr_t kInternalRegisters =
-      (1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg);
+      ((1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg) |
+       (1 << kSubTypeArgumentReg) | (1 << kSuperTypeArgumentReg)) &
+      ~kSavedTypeArgumentRegisters;
 };
 
 // Registers in addition to those listed in TypeTestABI used inside the
@@ -497,6 +506,7 @@
 // ABI for DoubleToIntegerStub.
 struct DoubleToIntegerStubABI {
   static const FpuRegister kInputReg = Q0;
+  static const Register kRecognizedKindReg = R0;
   static const Register kResultReg = R0;
 };
 
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index c661cc2..28ac726 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -172,9 +172,17 @@
 struct TTSInternalRegs {
   static const Register kInstanceTypeArgumentsReg = R7;
   static const Register kScratchReg = R9;
+  static const Register kSubTypeArgumentReg = R5;
+  static const Register kSuperTypeArgumentReg = R6;
+
+  // Must be pushed/popped whenever generic type arguments are being checked as
+  // they overlap with registers in TypeTestABI.
+  static const intptr_t kSavedTypeArgumentRegisters = 0;
 
   static const intptr_t kInternalRegisters =
-      (1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg);
+      ((1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg) |
+       (1 << kSubTypeArgumentReg) | (1 << kSuperTypeArgumentReg)) &
+      ~kSavedTypeArgumentRegisters;
 };
 
 // Registers in addition to those listed in TypeTestABI used inside the
@@ -337,6 +345,7 @@
 // ABI for DoubleToIntegerStub.
 struct DoubleToIntegerStubABI {
   static const FpuRegister kInputReg = V0;
+  static const Register kRecognizedKindReg = R0;
   static const Register kResultReg = R0;
 };
 
@@ -540,9 +549,7 @@
   COMPILE_ASSERT((GE ^ LT) == 1);
   COMPILE_ASSERT((GT ^ LE) == 1);
   COMPILE_ASSERT((AL ^ NV) == 1);
-  // Although the NV condition is not valid for branches, it is used internally
-  // in the assembler in the implementation of far branches, so we have to
-  // allow AL and NV here. See EmitConditionalBranch.
+  ASSERT(c != AL);
   ASSERT(c != kInvalidCondition);
   return static_cast<Condition>(c ^ 1);
 }
@@ -930,7 +937,9 @@
   FMOVSR = FPIntCvtFixed | B18 | B17 | B16,
   FMOVRD = FPIntCvtFixed | B22 | B18 | B17,
   FMOVDR = FPIntCvtFixed | B22 | B18 | B17 | B16,
-  FCVTZDS = FPIntCvtFixed | B22 | B20 | B19,
+  FCVTZS_D = FPIntCvtFixed | B22 | B20 | B19,
+  FCVTMS_D = FPIntCvtFixed | B22 | B20,
+  FCVTPS_D = FPIntCvtFixed | B22 | B19,
   SCVTFD = FPIntCvtFixed | B22 | B17,
 };
 
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 5bbb8e6..5f9c331 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -236,6 +236,7 @@
 // ABI for DoubleToIntegerStub.
 struct DoubleToIntegerStubABI {
   static const FpuRegister kInputReg = XMM0;
+  static const Register kRecognizedKindReg = EAX;
   static const Register kResultReg = EAX;
 };
 
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 73296ae..eb24c81 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -148,9 +148,17 @@
 struct TTSInternalRegs {
   static const Register kInstanceTypeArgumentsReg = RSI;
   static const Register kScratchReg = R8;
+  static const Register kSubTypeArgumentReg = R10;
+  static const Register kSuperTypeArgumentReg = R13;
+
+  // Must be pushed/popped whenever generic type arguments are being checked as
+  // they overlap with registers in TypeTestABI.
+  static const intptr_t kSavedTypeArgumentRegisters = 0;
 
   static const intptr_t kInternalRegisters =
-      (1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg);
+      ((1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg) |
+       (1 << kSubTypeArgumentReg) | (1 << kSuperTypeArgumentReg)) &
+      ~kSavedTypeArgumentRegisters;
 };
 
 // Registers in addition to those listed in TypeTestABI used inside the
@@ -309,6 +317,7 @@
 // ABI for DoubleToIntegerStub.
 struct DoubleToIntegerStubABI {
   static const FpuRegister kInputReg = XMM0;
+  static const Register kRecognizedKindReg = RAX;
   static const Register kResultReg = RAX;
 };
 
diff --git a/runtime/vm/cpu_arm64.cc b/runtime/vm/cpu_arm64.cc
index e27ac58..d193d23 100644
--- a/runtime/vm/cpu_arm64.cc
+++ b/runtime/vm/cpu_arm64.cc
@@ -64,7 +64,7 @@
   return
 #if defined(USING_SIMULATOR)
       "sim"
-#endif  // !defined(HOST_ARCH_ARM64)
+#endif  // !defined(USING_SIMULATOR)
       "arm64";
 }
 
diff --git a/runtime/vm/cpu_ia32.cc b/runtime/vm/cpu_ia32.cc
index a2ed128..27ae5c5 100644
--- a/runtime/vm/cpu_ia32.cc
+++ b/runtime/vm/cpu_ia32.cc
@@ -24,7 +24,11 @@
 }
 
 const char* CPU::Id() {
-  return "ia32";
+  return
+#if defined(USING_SIMULATOR)
+      "sim"
+#endif  // !defined(USING_SIMULATOR)
+      "ia32";
 }
 
 const char* HostCPUFeatures::hardware_ = nullptr;
diff --git a/runtime/vm/cpu_x64.cc b/runtime/vm/cpu_x64.cc
index 7f5981c..cf0acf3 100644
--- a/runtime/vm/cpu_x64.cc
+++ b/runtime/vm/cpu_x64.cc
@@ -23,7 +23,11 @@
 }
 
 const char* CPU::Id() {
-  return "x64";
+  return
+#if defined(USING_SIMULATOR)
+      "sim"
+#endif  // !defined(USING_SIMULATOR)
+      "x64";
 }
 
 const char* HostCPUFeatures::hardware_ = nullptr;
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 7655866..cd3ca635 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -7,7 +7,7 @@
 
 #include "vm/dart.h"
 
-#include "vm/clustered_snapshot.h"
+#include "vm/app_snapshot.h"
 #include "vm/code_observers.h"
 #include "vm/compiler/runtime_offsets_extracted.h"
 #include "vm/compiler/runtime_offsets_list.h"
@@ -92,86 +92,62 @@
 
 class DartInitializationState {
  public:
-  enum class InitializationState {
-    kUnInitialized = 0,
-    kInitializing = 1,
-    kInitialized = 2,
-    kCleaningup = 3,
-  };
+  uint8_t kUnInitialized = 0;
+  uint8_t kInitializing = 1;
+  uint8_t kInitialized = 2;
+  uint8_t kCleaningup = 3;
 
-  DartInitializationState()
-      : state_(InitializationState::kUnInitialized),
-        in_use_(false),
-        lock_(nullptr) {
-    lock_ = new Monitor();
-  }
+  DartInitializationState() : state_(0), in_use_count_(0) {}
   ~DartInitializationState() {}
 
   bool SetInitializing() {
-    MonitorLocker ml(lock_);
-    if (state_ != InitializationState::kUnInitialized || in_use_) {
-      return false;
-    }
-    state_ = InitializationState::kInitializing;
-    return true;
+    ASSERT(in_use_count_.load() == 0);
+    return state_.compare_exchange_strong(kUnInitialized, kInitializing);
   }
 
   void ResetInitializing() {
-    MonitorLocker ml(lock_);
-    ASSERT((state_ == InitializationState::kInitializing) && !in_use_);
-    state_ = InitializationState::kUnInitialized;
+    ASSERT(in_use_count_.load() == 0);
+    bool result = state_.compare_exchange_strong(kInitializing, kUnInitialized);
+    ASSERT(result);
   }
 
   void SetInitialized() {
-    MonitorLocker ml(lock_);
-    ASSERT((state_ == InitializationState::kInitializing) && !in_use_);
-    state_ = InitializationState::kInitialized;
+    ASSERT(in_use_count_.load() == 0);
+    bool result = state_.compare_exchange_strong(kInitializing, kInitialized);
+    ASSERT(result);
   }
 
-  bool IsInitialized() const {
-    MonitorLocker ml(lock_);
-    return (state_ == InitializationState::kInitialized);
-  }
+  bool IsInitialized() const { return state_.load() == kInitialized; }
 
   bool SetCleaningup() {
-    MonitorLocker ml(lock_);
-    if (state_ != InitializationState::kInitialized) {
-      return false;
-    }
-    state_ = InitializationState::kCleaningup;
-    return true;
+    return state_.compare_exchange_strong(kInitialized, kCleaningup);
   }
 
   void SetUnInitialized() {
-    MonitorLocker ml(lock_);
-    ASSERT(state_ == InitializationState::kCleaningup);
-    while (in_use_) {
-      ml.Wait();
+    while (in_use_count_.load() > 0) {
+      OS::Sleep(1);  // Sleep for 1 millis waiting for it to not be in use.
     }
-    state_ = InitializationState::kUnInitialized;
+    bool result = state_.compare_exchange_strong(kCleaningup, kUnInitialized);
+    ASSERT(result);
   }
 
   bool SetInUse() {
-    MonitorLocker ml(lock_);
-    if (state_ != InitializationState::kInitialized) {
+    if (state_.load() != kInitialized) {
       return false;
     }
-    in_use_ = true;
+    in_use_count_ += 1;
     return true;
   }
 
   void ResetInUse() {
-    MonitorLocker ml(lock_);
-    ASSERT((state_ == InitializationState::kInitialized) ||
-           (state_ == InitializationState::kCleaningup));
-    in_use_ = false;
-    ml.NotifyAll();
+    uint8_t value = state_.load();
+    ASSERT((value == kInitialized) || (value == kCleaningup));
+    in_use_count_ -= 1;
   }
 
  private:
-  InitializationState state_;
-  bool in_use_;
-  Monitor* lock_;
+  std::atomic<uint8_t> state_;
+  std::atomic<uint64_t> in_use_count_;
 };
 static DartInitializationState init_state_;
 
@@ -340,6 +316,7 @@
   NOT_IN_PRODUCT(Metric::Init());
   StoreBuffer::Init();
   MarkingStack::Init();
+  TargetCPUFeatures::Init();
 
 #if defined(USING_SIMULATOR)
   Simulator::Init();
@@ -387,7 +364,6 @@
     Object::InitNullAndBool(vm_isolate_->group());
     vm_isolate_->isolate_group_->set_object_store(new ObjectStore());
     vm_isolate_->isolate_object_store()->Init();
-    TargetCPUFeatures::Init();
     Object::Init(vm_isolate_->group());
     OffsetsTable::Init();
     ArgumentsDescriptor::Init();
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 5d21abf..cfc1759 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -11,8 +11,8 @@
 #include "lib/stacktrace.h"
 #include "platform/assert.h"
 #include "platform/unicode.h"
+#include "vm/app_snapshot.h"
 #include "vm/class_finalizer.h"
-#include "vm/clustered_snapshot.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/dart.h"
 #include "vm/dart_api_impl.h"
@@ -485,6 +485,16 @@
   return reinterpret_cast<Dart_Handle>(acquired_error_handle);
 }
 
+Dart_Handle Api::UnwindInProgressError() {
+  Thread* T = Thread::Current();
+  CHECK_API_SCOPE(T);
+  TransitionToVM transition(T);
+  HANDLESCOPE(T);
+  const String& message = String::Handle(
+      Z, String::New("No api calls are allowed while unwind is in progress"));
+  return Api::NewHandle(T, UnwindError::New(message));
+}
+
 bool Api::IsValid(Dart_Handle handle) {
   Isolate* isolate = Isolate::Current();
   Thread* thread = Thread::Current();
@@ -5802,41 +5812,6 @@
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
-DART_EXPORT Dart_Handle Dart_GetImportsOfScheme(Dart_Handle scheme) {
-  DARTSCOPE(Thread::Current());
-  auto IG = T->isolate_group();
-  const String& scheme_vm = Api::UnwrapStringHandle(Z, scheme);
-  if (scheme_vm.IsNull()) {
-    RETURN_TYPE_ERROR(Z, scheme, String);
-  }
-
-  const GrowableObjectArray& libraries =
-      GrowableObjectArray::Handle(Z, IG->object_store()->libraries());
-  const GrowableObjectArray& result =
-      GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
-  Library& importer = Library::Handle(Z);
-  Array& imports = Array::Handle(Z);
-  Namespace& ns = Namespace::Handle(Z);
-  Library& importee = Library::Handle(Z);
-  String& importee_uri = String::Handle(Z);
-  for (intptr_t i = 0; i < libraries.Length(); i++) {
-    importer ^= libraries.At(i);
-    imports = importer.imports();
-    for (intptr_t j = 0; j < imports.Length(); j++) {
-      ns ^= imports.At(j);
-      if (ns.IsNull()) continue;
-      importee = ns.target();
-      importee_uri = importee.url();
-      if (importee_uri.StartsWith(scheme_vm)) {
-        result.Add(importer);
-        result.Add(importee);
-      }
-    }
-  }
-
-  return Api::NewHandle(T, Array::MakeFixedLength(result));
-}
-
 // Finalizes classes and invokes Dart core library function that completes
 // futures of loadLibrary calls (deferred library loading).
 DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index bd5d3e9..683be98 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -194,6 +194,9 @@
   // Gets the handle which holds the pre-created acquired error object.
   static Dart_Handle AcquiredError(IsolateGroup* isolate_group);
 
+  // Gets the handle for unwind-is-in-progress error.
+  static Dart_Handle UnwindInProgressError();
+
   // Returns true if the handle holds a Smi.
   static bool IsSmi(Dart_Handle handle) {
     // Important: we do not require current thread to be in VM state because
@@ -335,6 +338,9 @@
   if (thread->no_callback_scope_depth() != 0) {                                \
     return reinterpret_cast<Dart_Handle>(                                      \
         Api::AcquiredError(thread->isolate_group()));                          \
+  }                                                                            \
+  if (thread->is_unwind_in_progress()) {                                       \
+    return reinterpret_cast<Dart_Handle>(Api::UnwindInProgressError());        \
   }
 
 #define ASSERT_CALLBACK_STATE(thread)                                          \
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index fc1877f..bed2681 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -89,6 +89,52 @@
   EXPECT(Dart_Cleanup() == NULL);
 }
 
+UNIT_TEST_CASE(DartAPI_DartInitializeHeapSizes) {
+  Dart_InitializeParams params;
+  memset(&params, 0, sizeof(Dart_InitializeParams));
+  params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION;
+  params.vm_snapshot_data = TesterState::vm_snapshot_data;
+  params.create_group = TesterState::create_callback;
+  params.shutdown_isolate = TesterState::shutdown_callback;
+  params.cleanup_group = TesterState::group_cleanup_callback;
+  params.start_kernel_isolate = true;
+
+  // Initialize with a normal heap size specification.
+  const char* options_1[] = {"--old-gen-heap-size=3192",
+                             "--new-gen-semi-max-size=32"};
+  EXPECT(Dart_SetVMFlags(2, options_1) == NULL);
+  EXPECT(Dart_Initialize(&params) == NULL);
+  EXPECT(FLAG_old_gen_heap_size == 3192);
+  EXPECT(FLAG_new_gen_semi_max_size == 32);
+  EXPECT(Dart_Cleanup() == NULL);
+
+  const char* options_2[] = {"--old-gen-heap-size=16384",
+                             "--new-gen-semi-max-size=16384"};
+  EXPECT(Dart_SetVMFlags(2, options_2) == NULL);
+  EXPECT(Dart_Initialize(&params) == NULL);
+  if (kMaxAddrSpaceMB == 4096) {
+    EXPECT(FLAG_old_gen_heap_size == 0);
+    EXPECT(FLAG_new_gen_semi_max_size == kDefaultNewGenSemiMaxSize);
+  } else {
+    EXPECT(FLAG_old_gen_heap_size == 16384);
+    EXPECT(FLAG_new_gen_semi_max_size == 16384);
+  }
+  EXPECT(Dart_Cleanup() == NULL);
+
+  const char* options_3[] = {"--old-gen-heap-size=30720",
+                             "--new-gen-semi-max-size=30720"};
+  EXPECT(Dart_SetVMFlags(2, options_3) == NULL);
+  EXPECT(Dart_Initialize(&params) == NULL);
+  if (kMaxAddrSpaceMB == 4096) {
+    EXPECT(FLAG_old_gen_heap_size == 0);
+    EXPECT(FLAG_new_gen_semi_max_size == kDefaultNewGenSemiMaxSize);
+  } else {
+    EXPECT(FLAG_old_gen_heap_size == 30720);
+    EXPECT(FLAG_new_gen_semi_max_size == 30720);
+  }
+  EXPECT(Dart_Cleanup() == NULL);
+}
+
 TEST_CASE(Dart_KillIsolate) {
   const char* kScriptChars =
       "int testMain() {\n"
@@ -478,8 +524,8 @@
   EXPECT_STREQ("inspectStack", cstr);
   Dart_StringToCString(script_url, &cstr);
   EXPECT_STREQ(test_lib, cstr);
-  EXPECT_EQ(1, line_number);
-  EXPECT_EQ(47, column_number);
+  EXPECT_EQ(3, line_number);
+  EXPECT_EQ(24, column_number);
 
   // Second frame is foo() positioned at call to inspectStack().
   result = Dart_GetActivationFrame(stacktrace, 1, &frame);
@@ -491,7 +537,7 @@
   EXPECT_STREQ("foo", cstr);
   Dart_StringToCString(script_url, &cstr);
   EXPECT_STREQ(test_lib, cstr);
-  EXPECT_EQ(2, line_number);
+  EXPECT_EQ(4, line_number);
   EXPECT_EQ(20, column_number);
 
   // Middle frames positioned at the recursive call.
@@ -506,7 +552,7 @@
     EXPECT_STREQ("foo", cstr);
     Dart_StringToCString(script_url, &cstr);
     EXPECT_STREQ(test_lib, cstr);
-    EXPECT_EQ(2, line_number);
+    EXPECT_EQ(4, line_number);
     EXPECT_EQ(37, column_number);
   }
 
@@ -520,7 +566,7 @@
   EXPECT_STREQ("testMain", cstr);
   Dart_StringToCString(script_url, &cstr);
   EXPECT_STREQ(test_lib, cstr);
-  EXPECT_EQ(3, line_number);
+  EXPECT_EQ(5, line_number);
   EXPECT_EQ(15, column_number);
 
   // Out-of-bounds frames.
@@ -543,10 +589,12 @@
 }
 
 TEST_CASE(DartAPI_CurrentStackTraceInfo) {
-  const char* kScriptChars =
-      "inspectStack() native 'CurrentStackTraceNatve';\n"
-      "foo(n) => n == 1 ? inspectStack() : foo(n-1);\n"
-      "testMain() => foo(100);\n";
+  const char* kScriptChars = R"(
+@pragma("vm:external-name", "CurrentStackTraceNatve")
+external inspectStack();
+foo(n) => n == 1 ? inspectStack() : foo(n-1);
+testMain() => foo(100);
+  )";
 
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &CurrentStackTraceNativeLookup);
@@ -659,6 +707,82 @@
   EXPECT_STREQ(kRegularString, exception_cstr);
 }
 
+void JustPropagateErrorNative(Dart_NativeArguments args) {
+  Dart_Handle closure = Dart_GetNativeArgument(args, 0);
+  EXPECT(Dart_IsClosure(closure));
+  Dart_Handle result = Dart_InvokeClosure(closure, 0, NULL);
+  EXPECT(Dart_IsError(result));
+  Dart_PropagateError(result);
+  UNREACHABLE();
+}
+
+static Dart_NativeFunction JustPropagateError_lookup(Dart_Handle name,
+                                                     int argument_count,
+                                                     bool* auto_setup_scope) {
+  ASSERT(auto_setup_scope != NULL);
+  *auto_setup_scope = true;
+  return JustPropagateErrorNative;
+}
+
+TEST_CASE(DartAPI_EnsureUnwindErrorHandled_WhenKilled) {
+  const char* kScriptChars = R"(
+import 'dart:isolate';
+
+exitRightNow() {
+  Isolate.current.kill(priority: Isolate.immediate);
+}
+
+@pragma("vm:external-name", "Test_nativeFunc")
+external void nativeFunc(closure);
+
+void Func1() {
+  nativeFunc(() => exitRightNow());
+}
+)";
+  Dart_Handle lib =
+      TestCase::LoadTestScript(kScriptChars, &JustPropagateError_lookup);
+  Dart_Handle result;
+
+  result = Dart_Invoke(lib, NewString("Func1"), 0, NULL);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING("isolate terminated by Isolate.kill", Dart_GetError(result));
+
+  result = Dart_Invoke(lib, NewString("Func1"), 0, NULL);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING("No api calls are allowed while unwind is in progress",
+                   Dart_GetError(result));
+}
+
+TEST_CASE(DartAPI_EnsureUnwindErrorHandled_WhenSendAndExit) {
+  const char* kScriptChars = R"(
+import 'dart:isolate';
+
+sendAndExitNow() {
+  final receivePort = ReceivePort();
+  Isolate.exit(receivePort.sendPort, true);
+}
+
+@pragma("vm:external-name", "Test_nativeFunc")
+external void nativeFunc(closure);
+
+void Func1() {
+  nativeFunc(() => sendAndExitNow());
+}
+)";
+  Dart_Handle lib =
+      TestCase::LoadTestScript(kScriptChars, &JustPropagateError_lookup);
+  Dart_Handle result;
+
+  result = Dart_Invoke(lib, NewString("Func1"), 0, NULL);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING("isolate terminated by Isolate.kill", Dart_GetError(result));
+
+  result = Dart_Invoke(lib, NewString("Func1"), 0, NULL);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING("No api calls are allowed while unwind is in progress",
+                   Dart_GetError(result));
+}
+
 // Should we propagate the error via Dart_SetReturnValue?
 static bool use_set_return = false;
 
@@ -692,16 +816,18 @@
 }
 
 TEST_CASE(DartAPI_PropagateCompileTimeError) {
-  const char* kScriptChars =
-      "raiseCompileError() {\n"
-      "  return missing_semicolon\n"
-      "}\n"
-      "\n"
-      "void nativeFunc(closure) native 'Test_nativeFunc';\n"
-      "\n"
-      "void Func1() {\n"
-      "  nativeFunc(() => raiseCompileError());\n"
-      "}\n";
+  const char* kScriptChars = R"(
+raiseCompileError() {
+  return missing_semicolon
+}
+
+@pragma("vm:external-name", "Test_nativeFunc")
+external void nativeFunc(closure);
+
+void Func1() {
+  nativeFunc(() => raiseCompileError());
+}
+)";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &PropagateError_native_lookup);
   Dart_Handle result;
@@ -733,16 +859,18 @@
 }
 
 TEST_CASE(DartAPI_PropagateError) {
-  const char* kScriptChars =
-      "void throwException() {\n"
-      "  throw new Exception('myException');\n"
-      "}\n"
-      "\n"
-      "void nativeFunc(closure) native 'Test_nativeFunc';\n"
-      "\n"
-      "void Func2() {\n"
-      "  nativeFunc(() => throwException());\n"
-      "}\n";
+  const char* kScriptChars = R"(
+void throwException() {
+  throw new Exception('myException');
+}
+
+@pragma("vm:external-name", "Test_nativeFunc")
+external void nativeFunc(closure);
+
+void Func2() {
+  nativeFunc(() => throwException());
+}
+)";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &PropagateError_native_lookup);
   Dart_Handle result;
@@ -2149,28 +2277,30 @@
 }
 
 TEST_CASE(DartAPI_ByteDataAccess) {
-  const char* kScriptChars =
-      "import 'dart:typed_data';\n"
-      "class Expect {\n"
-      "  static equals(a, b) {\n"
-      "    if (a != b) {\n"
-      "      throw 'not equal. expected: $a, got: $b';\n"
-      "    }\n"
-      "  }\n"
-      "}\n"
-      "ByteData createByteData() native 'CreateByteData';"
-      "ByteData main() {"
-      "  var length = 16;"
-      "  var a = createByteData();"
-      "  Expect.equals(length, a.lengthInBytes);"
-      "  for (int i = 0; i < length; i+=1) {"
-      "    a.setInt8(i, 0x42);"
-      "  }"
-      "  for (int i = 0; i < length; i+=2) {"
-      "    Expect.equals(0x4242, a.getInt16(i));"
-      "  }"
-      "  return a;"
-      "}\n";
+  const char* kScriptChars = R"(
+import 'dart:typed_data';
+class Expect {
+  static equals(a, b) {
+    if (a != b) {
+      throw 'not equal. expected: $a, got: $b';
+    }
+  }
+}
+@pragma("vm:external-name", "CreateByteData")
+external ByteData createByteData();
+ByteData main() {
+  var length = 16;
+  var a = createByteData();
+  Expect.equals(length, a.lengthInBytes);
+  for (int i = 0; i < length; i+=1) {
+    a.setInt8(i, 0x42);
+  }
+  for (int i = 0; i < length; i+=2) {
+    Expect.equals(0x4242, a.getInt16(i));
+  }
+  return a;
+}
+)";
   // Create a test library and Load up a test script in it.
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
 
@@ -2212,32 +2342,34 @@
 TEST_CASE(DartAPI_ExternalByteDataAccess) {
   // TODO(asiva): Once we have getInt16LE and getInt16BE support use the
   // appropriate getter instead of the host endian format used now.
-  const char* kScriptChars =
-      "import 'dart:typed_data';\n"
-      "class Expect {\n"
-      "  static equals(a, b) {\n"
-      "    if (a != b) {\n"
-      "      throw 'not equal. expected: $a, got: $b';\n"
-      "    }\n"
-      "  }\n"
-      "}\n"
-      "ByteData createExternalByteData() native 'CreateExternalByteData';"
-      "ByteData main() {"
-      "  var length = 16;"
-      "  var a = createExternalByteData();"
-      "  Expect.equals(length, a.lengthInBytes);"
-      "  for (int i = 0; i < length; i+=2) {"
-      "    Expect.equals(0x4241, a.getInt16(i, Endian.little));"
-      "  }"
-      "  for (int i = 0; i < length; i+=2) {"
-      "    a.setInt8(i, 0x24);"
-      "    a.setInt8(i + 1, 0x28);"
-      "  }"
-      "  for (int i = 0; i < length; i+=2) {"
-      "    Expect.equals(0x2824, a.getInt16(i, Endian.little));"
-      "  }"
-      "  return a;"
-      "}\n";
+  const char* kScriptChars = R"(
+import 'dart:typed_data';
+class Expect {
+  static equals(a, b) {
+    if (a != b) {
+      throw 'not equal. expected: $a, got: $b';
+    }
+  }
+}
+@pragma("vm:external-name", "CreateExternalByteData")
+external ByteData createExternalByteData();
+ByteData main() {
+  var length = 16;
+  var a = createExternalByteData();
+  Expect.equals(length, a.lengthInBytes);
+  for (int i = 0; i < length; i+=2) {
+    Expect.equals(0x4241, a.getInt16(i, Endian.little));
+  }
+  for (int i = 0; i < length; i+=2) {
+    a.setInt8(i, 0x24);
+    a.setInt8(i + 1, 0x28);
+  }
+  for (int i = 0; i < length; i+=2) {
+    Expect.equals(0x2824, a.getInt16(i, Endian.little));
+  }
+  return a;
+}
+)";
   // Create a test library and Load up a test script in it.
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
 
@@ -2347,31 +2479,33 @@
 }
 
 TEST_CASE(DartAPI_OptimizedExternalByteDataAccess) {
-  const char* kScriptChars =
-      "import 'dart:typed_data';\n"
-      "class Expect {\n"
-      "  static equals(a, b) {\n"
-      "    if (a != b) {\n"
-      "      throw 'not equal. expected: $a, got: $b';\n"
-      "    }\n"
-      "  }\n"
-      "}\n"
-      "ByteData createExternalByteData() native 'CreateExternalByteData';"
-      "access(ByteData a) {"
-      "  Expect.equals(0x04030201, a.getUint32(0, Endian.little));"
-      "  Expect.equals(0x08070605, a.getUint32(4, Endian.little));"
-      "  Expect.equals(0x0c0b0a09, a.getUint32(8, Endian.little));"
-      "  Expect.equals(0x100f0e0d, a.getUint32(12, Endian.little));"
-      "}"
-      "ByteData main() {"
-      "  var length = 16;"
-      "  var a = createExternalByteData();"
-      "  Expect.equals(length, a.lengthInBytes);"
-      "  for (int i = 0; i < 20; i++) {"
-      "    access(a);"
-      "  }"
-      "  return a;"
-      "}\n";
+  const char* kScriptChars = R"(
+import 'dart:typed_data';
+class Expect {
+  static equals(a, b) {
+    if (a != b) {
+      throw 'not equal. expected: $a, got: $b';
+    }
+  }
+}
+@pragma("vm:external-name", "CreateExternalByteData")
+external ByteData createExternalByteData();
+access(ByteData a) {
+  Expect.equals(0x04030201, a.getUint32(0, Endian.little));
+  Expect.equals(0x08070605, a.getUint32(4, Endian.little));
+  Expect.equals(0x0c0b0a09, a.getUint32(8, Endian.little));
+  Expect.equals(0x100f0e0d, a.getUint32(12, Endian.little));
+}
+ByteData main() {
+  var length = 16;
+  var a = createExternalByteData();
+  Expect.equals(length, a.lengthInBytes);
+  for (int i = 0; i < 20; i++) {
+    access(a);
+  }
+  return a;
+}
+)";
   // Create a test library and Load up a test script in it.
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
 
@@ -4141,9 +4275,12 @@
     import "dart:nativewrappers";
     class ExampleResource extends NativeFieldWrapperClass1 {
       ExampleResource() { _allocate(); }
-      void _allocate() native "ExampleResource_Allocate";
-      void use() native "ExampleResource_Use";
-      void dispose() native "ExampleResource_Dispose";
+      @pragma("vm:external-name", "ExampleResource_Allocate")
+      external void _allocate();
+      @pragma("vm:external-name", "ExampleResource_Use")
+      external void use();
+      @pragma("vm:external-name", "ExampleResource_Dispose")
+      external void dispose();
     }
     main() {
       var res = new ExampleResource();
@@ -4180,19 +4317,39 @@
   return reinterpret_cast<Dart_NativeFunction>(Builtin_SecretKeeper_KeepSecret);
 }
 
+static intptr_t ReturnPtrAsInt(void* ptr) {
+  return reinterpret_cast<intptr_t>(ptr);
+}
+
+static void* SecretKeeperFfiNativeResolver(const char* name, uintptr_t argn) {
+  if (strcmp(name, "returnPtrAsInt") == 0 && argn == 1) {
+    return reinterpret_cast<void*>(&ReturnPtrAsInt);
+  }
+  return nullptr;
+}
+
 TEST_CASE(DartAPI_NativeFieldAccess) {
   const char* kScriptChars = R"(
+    import 'dart:ffi';
     import 'dart:nativewrappers';
     class SecretKeeper extends NativeFieldWrapperClass1 {
       SecretKeeper(int secret) { _keepSecret(secret); }
-      void _keepSecret(int secret) native "SecretKeeper_KeepSecret";
+      @pragma("vm:external-name", "SecretKeeper_KeepSecret")
+      external void _keepSecret(int secret);
     }
-    main() => getNativeField(SecretKeeper(321));
+    // Argument auto-conversion will wrap `o` in `_getNativeField()`.
+    @FfiNative<IntPtr Function(Pointer<Void>)>('returnPtrAsInt')
+    external int returnPtrAsInt(NativeFieldWrapperClass1 o);
+    main() => returnPtrAsInt(SecretKeeper(321));
   )";
 
   Dart_Handle result;
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, SecretKeeperNativeResolver);
+
+  result = Dart_SetFfiNativeResolver(lib, &SecretKeeperFfiNativeResolver);
+  EXPECT_VALID(result);
+
   result = Dart_Invoke(lib, NewString("main"), 0, nullptr);
 
   EXPECT_VALID(result);
@@ -4203,19 +4360,28 @@
   EXPECT_EQ(321, value);
 }
 
+// Test that trying to access an unset native field (internally through
+// _getNativeField(..)) will result in a Dart exception (and not crash).
 TEST_CASE(DartAPI_NativeFieldAccess_Throws) {
   const char* kScriptChars = R"(
+    import 'dart:ffi';
     import 'dart:nativewrappers';
     class ForgetfulSecretKeeper extends NativeFieldWrapperClass1 {
       ForgetfulSecretKeeper(int secret) { /* Forget to init. native field. */ }
     }
-    main() => getNativeField(ForgetfulSecretKeeper(321));
+    // Argument auto-conversion will wrap `o` in `_getNativeField()`.
+    @FfiNative<IntPtr Function(Pointer<Void>)>('returnPtrAsInt')
+    external int returnPtrAsInt(NativeFieldWrapperClass1 o);
+    main() => returnPtrAsInt(ForgetfulSecretKeeper(321));
   )";
 
   Dart_Handle result;
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, SecretKeeperNativeResolver);
 
+  result = Dart_SetFfiNativeResolver(lib, &SecretKeeperFfiNativeResolver);
+  EXPECT_VALID(result);
+
   result = Dart_Invoke(lib, NewString("main"), 0, nullptr);
 
   EXPECT(Dart_IsError(result));
@@ -5346,29 +5512,32 @@
   // clang-format off
   auto kScriptChars = Utils::CStringUniquePtr(
       OS::SCreate(
-          nullptr,
-          "import 'dart:nativewrappers';"
-          "class NativeFields extends NativeFieldWrapperClass2 {\n"
-          "  NativeFields(int i, int j) : fld1 = i, fld2 = j {}\n"
-          "  int fld1;\n"
-          "  final int fld2;\n"
-          "  static int%s fld3;\n"
-          "  static const int fld4 = 10;\n"
-          "  int%s initNativeFlds() native 'TestNativeFieldsAccess_init';\n"
-          "  int%s accessNativeFlds(int%s i) native "
-          "'TestNativeFieldsAccess_access';\n"
-          "}\n"
-          "class NoNativeFields {\n"
-          "  int neitherATypedDataNorNull = 0;\n"
-          "  invalidAccess() native 'TestNativeFieldsAccess_invalidAccess';\n"
-          "}\n"
-          "NativeFields testMain() {\n"
-          "  NativeFields obj = new NativeFields(10, 20);\n"
-          "  obj.initNativeFlds();\n"
-          "  obj.accessNativeFlds(null);\n"
-          "  new NoNativeFields().invalidAccess();\n"
-          "  return obj;\n"
-          "}\n",
+          nullptr, R"(
+          import 'dart:nativewrappers';
+          class NativeFields extends NativeFieldWrapperClass2 {
+            NativeFields(int i, int j) : fld1 = i, fld2 = j {}
+            int fld1;
+            final int fld2;
+            static int%s fld3;
+            static const int fld4 = 10;
+            @pragma('vm:external-name', 'TestNativeFieldsAccess_init')
+            external int%s initNativeFlds();
+            @pragma('vm:external-name', 'TestNativeFieldsAccess_access')
+            external int%s accessNativeFlds(int%s i);
+          }
+          class NoNativeFields {
+            int neitherATypedDataNorNull = 0;
+            @pragma('vm:external-name', 'TestNativeFieldsAccess_invalidAccess')
+            external invalidAccess();
+          }
+          NativeFields testMain() {
+            NativeFields obj = new NativeFields(10, 20);
+            obj.initNativeFlds();
+            obj.accessNativeFlds(null);
+            new NoNativeFields().invalidAccess();
+            return obj;
+          }
+          )",
           nullable_tag, nullable_tag, nullable_tag, nullable_tag),
       std::free);
   // clang-format on
@@ -6168,7 +6337,7 @@
   const char* kScriptChars =
       "class ZXHandle {}\n"
       "class ChannelReadResult {\n"
-      "  final List<ZXHandle> handles;\n"
+      "  final List<ZXHandle?> handles;\n"
       "  ChannelReadResult(this.handles);\n"
       "}\n"
       "void expectListOfString(List<String> _) {}\n"
@@ -6937,30 +7106,32 @@
 }
 
 TEST_CASE(DartAPI_GetNativeArguments) {
-  const char* kScriptChars =
-      "import 'dart:nativewrappers';"
-      "class MyObject extends NativeFieldWrapperClass2 {"
-      "  static MyObject createObject() native 'NativeArgument_Create';"
-      "  int accessFields(int arg1,"
-      "                   int arg2,"
-      "                   bool arg3,"
-      "                   double arg4,"
-      "                   String arg5,"
-      "                   String arg6,"
-      "                   MyObject arg7) native 'NativeArgument_Access';"
-      "}"
-      "int testMain(String extstr) {"
-      "  String str = 'abcdefg';"
-      "  MyObject obj1 = MyObject.createObject();"
-      "  MyObject obj2 = MyObject.createObject();"
-      "  return obj1.accessFields(77,"
-      "                           0x8000000000000000,"
-      "                           true,"
-      "                           3.14,"
-      "                           str,"
-      "                           extstr,"
-      "                           obj2);"
-      "}";
+  const char* kScriptChars = R"(
+import 'dart:nativewrappers';
+class MyObject extends NativeFieldWrapperClass2 {
+  @pragma("vm:external-name", "NativeArgument_Create")
+  external static MyObject createObject();
+  @pragma("vm:external-name", "NativeArgument_Access")
+  external int accessFields(int arg1,
+                   int arg2,
+                   bool arg3,
+                   double arg4,
+                   String arg5,
+                   String arg6,
+                   MyObject arg7);
+}
+int testMain(String extstr) {
+  String str = 'abcdefg';
+  MyObject obj1 = MyObject.createObject();
+  MyObject obj2 = MyObject.createObject();
+  return obj1.accessFields(77,
+                           0x8000000000000000,
+                           true,
+                           3.14,
+                           str,
+                           extstr,
+                           obj2);
+})";
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, native_args_lookup);
 
@@ -6994,14 +7165,15 @@
 }
 
 TEST_CASE(DartAPI_GetNativeArgumentCount) {
-  const char* kScriptChars =
-      "class MyObject {"
-      "  int method1(int i, int j) native 'Name_Does_Not_Matter';"
-      "}"
-      "testMain() {"
-      "  MyObject obj = new MyObject();"
-      "  return obj.method1(77, 125);"
-      "}";
+  const char* kScriptChars = R"(
+class MyObject {
+  @pragma("vm:external-name", "Name_Does_Not_Matter")
+  external int method1(int i, int j);
+}
+testMain() {
+  MyObject obj = new MyObject();
+  return obj.method1(77, 125);
+})";
 
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, gnac_lookup);
 
@@ -9164,19 +9336,20 @@
 }
 
 TEST_CASE(DartAPI_HintFreed) {
-  const char* kScriptChars =
-      "void hintFreed(int size) native 'Test_nativeFunc';\n"
-      "void main() {\n"
-      "  var v;\n"
-      "  for (var i = 0; i < 100; i++) {\n"
-      "    var t = [];\n"
-      "    for (var j = 0; j < 10000; j++) {\n"
-      "      t.add(List.filled(100, null));\n"
-      "    }\n"
-      "    v = t;\n"
-      "    hintFreed(100 * 10000 * 4);\n"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+@pragma("vm:external-name", "Test_nativeFunc")
+external void hintFreed(int size);
+void main() {
+  var v;
+  for (var i = 0; i < 100; i++) {
+    var t = [];
+    for (var j = 0; j < 10000; j++) {
+      t.add(List.filled(100, null));
+    }
+    v = t;
+    hintFreed(100 * 10000 * 4);
+  }
+})";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &HintFreed_native_lookup);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -9195,19 +9368,20 @@
 }
 
 TEST_CASE(DartAPI_NotifyIdleShort) {
-  const char* kScriptChars =
-      "void notifyIdle() native 'Test_nativeFunc';\n"
-      "void main() {\n"
-      "  var v;\n"
-      "  for (var i = 0; i < 100; i++) {\n"
-      "    var t = [];\n"
-      "    for (var j = 0; j < 10000; j++) {\n"
-      "      t.add(List.filled(100, null));\n"
-      "    }\n"
-      "    v = t;\n"
-      "    notifyIdle();\n"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+@pragma("vm:external-name", "Test_nativeFunc")
+external void notifyIdle();
+void main() {
+  var v;
+  for (var i = 0; i < 100; i++) {
+    var t = [];
+    for (var j = 0; j < 10000; j++) {
+      t.add(List.filled(100, null));
+    }
+    v = t;
+    notifyIdle();
+  }
+})";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &NotifyIdleShort_native_lookup);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -9226,19 +9400,21 @@
 }
 
 TEST_CASE(DartAPI_NotifyIdleLong) {
-  const char* kScriptChars =
-      "void notifyIdle() native 'Test_nativeFunc';\n"
-      "void main() {\n"
-      "  var v;\n"
-      "  for (var i = 0; i < 100; i++) {\n"
-      "    var t = [];\n"
-      "    for (var j = 0; j < 10000; j++) {\n"
-      "      t.add(List.filled(100, null));\n"
-      "    }\n"
-      "    v = t;\n"
-      "    notifyIdle();\n"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+@pragma("vm:external-name", "Test_nativeFunc")
+external void notifyIdle();
+void main() {
+  var v;
+  for (var i = 0; i < 100; i++) {
+    var t = [];
+    for (var j = 0; j < 10000; j++) {
+      t.add(List.filled(100, null));
+    }
+    v = t;
+    notifyIdle();
+  }
+}
+)";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &NotifyIdleLong_native_lookup);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -9257,20 +9433,21 @@
 }
 
 TEST_CASE(DartAPI_NotifyLowMemory) {
-  const char* kScriptChars =
-      "import 'dart:isolate';\n"
-      "void notifyLowMemory() native 'Test_nativeFunc';\n"
-      "void main() {\n"
-      "  var v;\n"
-      "  for (var i = 0; i < 100; i++) {\n"
-      "    var t = [];\n"
-      "    for (var j = 0; j < 10000; j++) {\n"
-      "      t.add(List.filled(100, null));\n"
-      "    }\n"
-      "    v = t;\n"
-      "    notifyLowMemory();\n"
-      "  }\n"
-      "}\n";
+  const char* kScriptChars = R"(
+import 'dart:isolate';
+@pragma("vm:external-name", "Test_nativeFunc")
+external void notifyLowMemory();
+void main() {
+  var v;
+  for (var i = 0; i < 100; i++) {
+    var t = [];
+    for (var j = 0; j < 10000; j++) {
+      t.add(List.filled(100, null));
+    }
+    v = t;
+    notifyLowMemory();
+  }
+})";
   Dart_Handle lib =
       TestCase::LoadTestScript(kScriptChars, &NotifyLowMemory_native_lookup);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -9512,8 +9689,9 @@
   return x;
 }
 
-static void* FfiNativeResolver(const char* name) {
+static void* FfiNativeResolver(const char* name, uintptr_t args_n) {
   ASSERT(strcmp(name, "EchoInt") == 0);
+  ASSERT(args_n == 1);
   return reinterpret_cast<void*>(EchoInt);
 }
 
@@ -9555,7 +9733,7 @@
       "Invalid argument(s): Library has no handler: 'file:///test-lib'.");
 }
 
-static void* NopResolver(const char* name) {
+static void* NopResolver(const char* name, uintptr_t args_n) {
   return nullptr;
 }
 
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index c02e4fb..7bbf92b 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -327,7 +327,7 @@
 
 static void InvokeEventHandler(ServiceEvent* event) {
   ASSERT(!event->IsPause());  // For pause events, call Pause instead.
-  Service::HandleEvent(event);
+  Service::HandleEvent(event, /*enter_safepoint*/ false);
 }
 
 ErrorPtr Debugger::PauseInterrupted() {
@@ -3129,6 +3129,7 @@
   const GrowableObjectArray& libs = GrowableObjectArray::Handle(
       isolate_->group()->object_store()->libraries());
   bool is_package = script_url.StartsWith(Symbols::PackageScheme());
+  bool is_dart_colon = script_url.StartsWith(Symbols::DartScheme());
   Script& script_for_lib = Script::Handle(zone);
   for (intptr_t i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
@@ -3136,7 +3137,8 @@
     // are available for look up. When certain script only contains
     // top level functions, scripts could still be loaded correctly.
     lib.EnsureTopLevelClassIsFinalized();
-    script_for_lib = lib.LookupScript(script_url, !is_package);
+    bool useResolvedUri = !is_package && !is_dart_colon;
+    script_for_lib = lib.LookupScript(script_url, useResolvedUri);
     if (!script_for_lib.IsNull()) {
       scripts.Add(script_for_lib);
     }
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 51ba8bd..f7b5cfd 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -184,6 +184,7 @@
             /* type_defintions= */ Array::empty_array(),
             String::Handle(lib.url()).ToCString(),
             /* klass= */ nullptr,
+            /* method= */ nullptr,
             /* is_static= */ true);
     if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
       return Api::NewError("Failed to compile expression.");
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 78b8631..b64d7dd 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -273,7 +273,8 @@
 }
 
 static intptr_t ToContextIndex(intptr_t offset_in_bytes) {
-  intptr_t result = (offset_in_bytes - Context::variable_offset(0)) / kWordSize;
+  intptr_t result = (offset_in_bytes - Context::variable_offset(0)) /
+                    Context::kBytesPerElement;
   ASSERT(result >= 0);
   return result;
 }
diff --git a/runtime/vm/elf.cc b/runtime/vm/elf.cc
index a4f550f..28e8224 100644
--- a/runtime/vm/elf.cc
+++ b/runtime/vm/elf.cc
@@ -173,6 +173,8 @@
   }
   bool IsWritable() const { return (flags & elf::SHF_WRITE) == elf::SHF_WRITE; }
 
+  bool HasBits() const { return type != elf::SectionHeaderType::SHT_NOBITS; }
+
   // Returns whether the size of a section can change.
   bool HasBeenFinalized() const {
     // Sections can grow or shrink up until Elf::ComputeOffsets has been run,
@@ -1559,8 +1561,27 @@
   // We now do several passes over the collected sections to reorder them in
   // a way that minimizes segments (and thus padding) in the resulting snapshot.
 
-  // If a build ID was created, we put it after the program table so it can
-  // be read with a minimum number of bytes from the ELF file.
+  auto add_sections_matching =
+      [&](const std::function<bool(Section*)>& should_add) {
+        // We order the sections in a segment so all non-NOBITS sections come
+        // before NOBITS sections, since the former sections correspond to the
+        // file contents for the segment.
+        for (auto* const section : sections_) {
+          if (!section->HasBits()) continue;
+          if (should_add(section)) {
+            add_to_reordered_sections(section);
+          }
+        }
+        for (auto* const section : sections_) {
+          if (section->HasBits()) continue;
+          if (should_add(section)) {
+            add_to_reordered_sections(section);
+          }
+        }
+      };
+
+  // If a build ID was created, we put it right after the program table so it
+  // can be read with a minimum number of bytes from the ELF file.
   auto* const build_id = Find(Elf::kBuildIdNoteName);
   if (build_id != nullptr) {
     ASSERT(build_id->type == elf::SectionHeaderType::SHT_NOTE);
@@ -1568,38 +1589,31 @@
   }
 
   // Now add the other non-writable, non-executable allocated sections.
-  for (auto* const section : sections_) {
-    if (section == build_id) continue;  // Already added.
-    if (section->IsAllocated() && !section->IsWritable() &&
-        !section->IsExecutable()) {
-      add_to_reordered_sections(section);
-    }
-  }
+  add_sections_matching([&](Section* section) -> bool {
+    if (section == build_id) return false;  // Already added.
+    return section->IsAllocated() && !section->IsWritable() &&
+           !section->IsExecutable();
+  });
 
   // Now add the executable sections in a new segment.
-  for (auto* const section : sections_) {
-    if (section->IsExecutable()) {  // Implies IsAllocated() && !IsWritable()
-      add_to_reordered_sections(section);
-    }
-  }
+  add_sections_matching([](Section* section) -> bool {
+    return section->IsExecutable();  // Implies IsAllocated() && !IsWritable()
+  });
 
   // Now add all the writable sections.
-  for (auto* const section : sections_) {
-    if (section->IsWritable()) {  // Implies IsAllocated() && !IsExecutable()
-      add_to_reordered_sections(section);
-    }
-  }
+  add_sections_matching([](Section* section) -> bool {
+    return section->IsWritable();  // Implies IsAllocated() && !IsExecutable()
+  });
 
   // We put all non-reserved unallocated sections last. Otherwise, they would
   // affect the file offset but not the memory offset of any following allocated
   // sections. Doing it in this order makes it easier to keep file and memory
   // offsets page-aligned with respect to each other, which is required for
   // some loaders.
-  for (intptr_t i = 1; i < num_sections; i++) {
-    auto* const section = sections_[i];
-    if (section->IsAllocated()) continue;
-    add_to_reordered_sections(section);
-  }
+  add_sections_matching([](Section* section) -> bool {
+    // Don't re-add the initial reserved section.
+    return !section->IsReservedSection() && !section->IsAllocated();
+  });
 
   // All sections should have been accounted for in the loops above.
   ASSERT_EQUAL(sections_.length(), reordered_sections.length());
diff --git a/runtime/vm/ffi_callback_trampolines.cc b/runtime/vm/ffi_callback_trampolines.cc
index 8cc1946..fd73c3c 100644
--- a/runtime/vm/ffi_callback_trampolines.cc
+++ b/runtime/vm/ffi_callback_trampolines.cc
@@ -48,7 +48,9 @@
     VirtualMemory* const memory = VirtualMemory::AllocateAligned(
         /*size=*/VirtualMemory::PageSize(),
         /*alignment=*/VirtualMemory::PageSize(),
-        /*is_executable=*/true, /*name=*/"Dart VM FFI callback trampolines");
+        /*is_executable=*/true,
+        /*is_compressed=*/false,
+        /*name=*/"Dart VM FFI callback trampolines");
     memory->Protect(VirtualMemory::kReadWrite);
 
     if (memory == nullptr) {
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index b5f86e7..a9628b4 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -152,7 +152,7 @@
     "Maximum number of polymorphic check, otherwise it is megamorphic.")       \
   P(max_equality_polymorphic_checks, int, 32,                                  \
     "Maximum number of polymorphic checks in equality operator,")              \
-  P(new_gen_semi_max_size, int, (kWordSize <= 4) ? 8 : 16,                     \
+  P(new_gen_semi_max_size, int, kDefaultNewGenSemiMaxSize,                     \
     "Max size of new gen semi space in MB")                                    \
   P(new_gen_semi_initial_size, int, (kWordSize <= 4) ? 1 : 2,                  \
     "Initial size of new gen semi space in MB")                                \
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index d3ac9ab..2e63f76 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -42,17 +42,19 @@
 static constexpr int kCompressedWordSizeLog2 = kWordSizeLog2;
 typedef uintptr_t compressed_uword;
 #endif
+const int kMaxAddrSpaceMB = (kWordSize <= 4) ? 4096 : kMaxInt;
 
 // Number of bytes per BigInt digit.
 const intptr_t kBytesPerBigIntDigit = 4;
 
-// The default old gen heap size in MB, where 0 == unlimited.
+// The default old gen heap size in MB, where 0 -- unlimited.
 // 32-bit: OS limit is 2 or 3 GB
 // 64-bit: Linux's limit is
 //   sysctl vm.max_map_count (default 2^16) * 512 KB OldPages = 32 GB
 // Set the VM limit below the OS limit to increase the likelihood of failing
 // gracefully with a Dart OutOfMemory exception instead of SIGABORT.
 const intptr_t kDefaultMaxOldGenHeapSize = (kWordSize <= 4) ? 1536 : 30720;
+const intptr_t kDefaultNewGenSemiMaxSize = (kWordSize <= 4) ? 8 : 16;
 
 #define kPosInfinity bit_cast<double>(DART_UINT64_C(0x7ff0000000000000))
 #define kNegInfinity bit_cast<double>(DART_UINT64_C(0xfff0000000000000))
@@ -109,7 +111,7 @@
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 
 #if !defined(PRODUCT) || defined(DART_HOST_OS_FUCHSIA) ||                      \
-    defined(DART_TARGET_OS_FUCHSIA)
+    defined(DART_TARGET_OS_FUCHSIA) || defined(DART_TARGET_OS_ANDROID)
 #define SUPPORT_TIMELINE 1
 #endif
 
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
index 7c0cb4b..e1f1be9 100644
--- a/runtime/vm/hash_map.h
+++ b/runtime/vm/hash_map.h
@@ -17,25 +17,18 @@
  public:
   explicit BaseDirectChainedHashMap(Allocator* allocator,
                                     intptr_t initial_size = kInitialSize)
-      : array_size_(0),
-        lists_size_(0),
-        count_(0),
-        array_(NULL),
-        lists_(NULL),
-        free_list_head_(kNil),
-        allocator_(allocator) {
-    ASSERT(Utils::IsPowerOfTwo(initial_size));
-    ResizeLists(initial_size);
+      : allocator_(allocator) {
     Resize(initial_size);
   }
 
   BaseDirectChainedHashMap(const BaseDirectChainedHashMap& other);
 
-  intptr_t Length() const { return count_; }
+  intptr_t Length() const { return next_pair_index_ - deleted_count_; }
 
-  virtual ~BaseDirectChainedHashMap() {
-    allocator_->template Free<HashMapListElement>(array_, array_size_);
-    allocator_->template Free<HashMapListElement>(lists_, lists_size_);
+  ~BaseDirectChainedHashMap() {
+    allocator_->template Free<uint32_t>(hash_table_, hash_table_size_);
+    allocator_->template Free<typename KeyValueTrait::Pair>(pairs_,
+                                                            pairs_size_);
   }
 
   // Assumes that no existing pair in the map has a key equal to [kv.key].
@@ -56,41 +49,35 @@
 
   typename KeyValueTrait::Pair* Lookup(typename KeyValueTrait::Key key) const;
   bool HasKey(typename KeyValueTrait::Key key) const {
-    return Lookup(key) != NULL;
+    return Lookup(key) != nullptr;
   }
 
-  intptr_t Size() const { return count_; }
-  bool IsEmpty() const { return count_ == 0; }
+  intptr_t Size() const { return next_pair_index_ - deleted_count_; }
+  bool IsEmpty() const { return Size() == 0; }
 
-  virtual void Clear() {
-    if (!IsEmpty()) {
-      count_ = 0;
-      InitArray(array_, array_size_);
-      InitArray(lists_, lists_size_);
-      lists_[0].next = kNil;
-      for (intptr_t i = 1; i < lists_size_; ++i) {
-        lists_[i].next = i - 1;
-      }
-      free_list_head_ = lists_size_ - 1;
+  void Clear() {
+    for (uint32_t i = 0; i < hash_table_size_; i++) {
+      hash_table_[i] = kEmpty;
     }
+    for (uint32_t i = 0; i < next_pair_index_; i++) {
+      pairs_[i] = typename KeyValueTrait::Pair();
+    }
+    next_pair_index_ = 0;
+    deleted_count_ = 0;
   }
 
   class Iterator {
    public:
     typename KeyValueTrait::Pair* Next();
 
-    void Reset() {
-      array_index_ = 0;
-      list_index_ = kNil;
-    }
+    void Reset() { pair_index_ = 0; }
 
    private:
     explicit Iterator(const BaseDirectChainedHashMap& map)
-        : map_(map), array_index_(0), list_index_(kNil) {}
+        : map_(map), pair_index_(0) {}
 
     const BaseDirectChainedHashMap& map_;
-    intptr_t array_index_;
-    intptr_t list_index_;
+    uint32_t pair_index_;
 
     template <typename T, typename Bs, typename A>
     friend class BaseDirectChainedHashMap;
@@ -99,35 +86,21 @@
   Iterator GetIterator() const { return Iterator(*this); }
 
  protected:
-  // A linked list of T values.  Stored in arrays.
-  struct HashMapListElement {
-    HashMapListElement() : kv(), next(kNil) {}
-    typename KeyValueTrait::Pair kv;
-    intptr_t next;  // Index in the array of the next list element.
-  };
-  static const intptr_t kNil = -1;  // The end of a linked list
-
-  static void InitArray(HashMapListElement* array, intptr_t size) {
-    for (intptr_t i = 0; i < size; ++i) {
-      array[i] = HashMapListElement();
-    }
-  }
-
-  // Must be a power of 2.
-  static const intptr_t kInitialSize = 16;
+  static constexpr intptr_t kInitialSize = 16;
 
   void Resize(intptr_t new_size);
-  void ResizeLists(intptr_t new_size);
-  uword Bound(uword value) const { return value & (array_size_ - 1); }
 
-  intptr_t array_size_;
-  intptr_t lists_size_;
-  intptr_t count_;             // The number of values stored in the HashMap.
-  HashMapListElement* array_;  // Primary store - contains the first value
-  // with a given hash.  Colliding elements are stored in linked lists.
-  HashMapListElement* lists_;  // The linked lists containing hash collisions.
-  intptr_t free_list_head_;  // Unused elements in lists_ are on the free list.
-  Allocator* allocator_;
+  Allocator* const allocator_;
+  uint32_t* hash_table_ = nullptr;
+  typename KeyValueTrait::Pair* pairs_ = nullptr;
+  uint32_t hash_table_size_ = 0;
+  uint32_t pairs_size_ = 0;
+  uint32_t next_pair_index_ = 0;
+  uint32_t deleted_count_ = 0;
+
+  static constexpr uint32_t kEmpty = kMaxUint32;
+  static constexpr uint32_t kDeleted = kMaxUint32 - 1;
+  static constexpr uint32_t kMaxPairs = kMaxUint32 - 2;
 
  private:
   void operator=(const BaseDirectChainedHashMap& other) = delete;
@@ -137,42 +110,45 @@
 BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::BaseDirectChainedHashMap(
     const BaseDirectChainedHashMap& other)
     : B(),
-      array_size_(other.array_size_),
-      lists_size_(other.lists_size_),
-      count_(other.count_),
-      array_(other.allocator_->template Alloc<HashMapListElement>(
-          other.array_size_)),
-      lists_(other.allocator_->template Alloc<HashMapListElement>(
-          other.lists_size_)),
-      free_list_head_(other.free_list_head_),
-      allocator_(other.allocator_) {
-  memmove(array_, other.array_, array_size_ * sizeof(HashMapListElement));
-  memmove(lists_, other.lists_, lists_size_ * sizeof(HashMapListElement));
+      allocator_(other.allocator_),
+      hash_table_(
+          other.allocator_->template Alloc<uint32_t>(other.hash_table_size_)),
+      pairs_(other.allocator_->template Alloc<typename KeyValueTrait::Pair>(
+          other.pairs_size_)),
+      hash_table_size_(other.hash_table_size_),
+      pairs_size_(other.pairs_size_),
+      next_pair_index_(other.next_pair_index_),
+      deleted_count_(other.deleted_count_) {
+  memmove(hash_table_, other.hash_table_, hash_table_size_ * sizeof(uint32_t));
+  memmove(pairs_, other.pairs_,
+          pairs_size_ * sizeof(typename KeyValueTrait::Pair));
 }
 
 template <typename KeyValueTrait, typename B, typename Allocator>
 typename KeyValueTrait::Pair*
 BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Lookup(
     typename KeyValueTrait::Key key) const {
-  const typename KeyValueTrait::Value kNoValue =
-      KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
-
   uword hash = KeyValueTrait::Hash(key);
-  uword pos = Bound(hash);
-  if (KeyValueTrait::ValueOf(array_[pos].kv) != kNoValue) {
-    if (KeyValueTrait::IsKeyEqual(array_[pos].kv, key)) {
-      return &array_[pos].kv;
+  uint32_t mask = hash_table_size_ - 1;
+  uint32_t hash_index = hash & mask;
+  uint32_t start = hash_index;
+  for (;;) {
+    uint32_t pair_index = hash_table_[hash_index];
+    if (pair_index == kEmpty) {
+      return nullptr;
     }
-
-    intptr_t next = array_[pos].next;
-    while (next != kNil) {
-      if (KeyValueTrait::IsKeyEqual(lists_[next].kv, key)) {
-        return &lists_[next].kv;
+    if (pair_index != kDeleted) {
+      ASSERT(pair_index < pairs_size_);
+      if (KeyValueTrait::IsKeyEqual(pairs_[pair_index], key)) {
+        return &pairs_[pair_index];
       }
-      next = lists_[next].next;
     }
+    hash_index = (hash_index + 1) & mask;
+    // Hashtable must contain at least one empty marker.
+    ASSERT(hash_index != start);
   }
-  return NULL;
+  UNREACHABLE();
+  return nullptr;
 }
 
 template <typename KeyValueTrait, typename B, typename Allocator>
@@ -182,7 +158,7 @@
   const typename KeyValueTrait::Value kNoValue =
       KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
   typename KeyValueTrait::Pair* pair = Lookup(key);
-  return (pair == NULL) ? kNoValue : KeyValueTrait::ValueOf(*pair);
+  return (pair == nullptr) ? kNoValue : KeyValueTrait::ValueOf(*pair);
 }
 
 template <typename KeyValueTrait, typename B, typename Allocator>
@@ -190,135 +166,89 @@
 BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Iterator::Next() {
   const typename KeyValueTrait::Value kNoValue =
       KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
-
-  // Return the current lists_ entry (if any), advancing list_index_.
-  if (list_index_ != kNil) {
-    intptr_t current = list_index_;
-    list_index_ = map_.lists_[current].next;
-    return &map_.lists_[current].kv;
+  while (pair_index_ < map_.next_pair_index_) {
+    if (KeyValueTrait::ValueOf(map_.pairs_[pair_index_]) != kNoValue) {
+      intptr_t old_index = pair_index_;
+      pair_index_++;
+      return &map_.pairs_[old_index];
+    }
+    pair_index_++;
   }
-
-  // When we're done with the list, we'll continue with the next array
-  // slot.
-  while ((array_index_ < map_.array_size_) &&
-         KeyValueTrait::ValueOf(map_.array_[array_index_].kv) == kNoValue) {
-    ++array_index_;
-  }
-  if (array_index_ < map_.array_size_) {
-    const intptr_t old_array_index = array_index_;
-    ++array_index_;
-    list_index_ = map_.array_[old_array_index].next;
-    return &map_.array_[old_array_index].kv;
-  }
-
   return nullptr;
 }
 
 template <typename KeyValueTrait, typename B, typename Allocator>
 void BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Resize(
     intptr_t new_size) {
+  ASSERT(new_size >= Size());
+
+  uint32_t old_hash_table_size = hash_table_size_;
+  // 75% load factor + at least one kEmpty slot
+  hash_table_size_ = Utils::RoundUpToPowerOfTwo(new_size * 4 / 3 + 1);
+  hash_table_ = allocator_->template Realloc<uint32_t>(
+      hash_table_, old_hash_table_size, hash_table_size_);
+  for (uint32_t i = 0; i < hash_table_size_; i++) {
+    hash_table_[i] = kEmpty;
+  }
+
+  typename KeyValueTrait::Pair* old_pairs = pairs_;
+  uint32_t old_pairs_size = pairs_size_;
+  uint32_t old_next_pair_index = next_pair_index_;
+  uint32_t old_deleted_count = deleted_count_;
+  next_pair_index_ = 0;
+  deleted_count_ = 0;
+  pairs_size_ = new_size;
+  pairs_ =
+      allocator_->template Alloc<typename KeyValueTrait::Pair>(pairs_size_);
+  for (uint32_t i = 0; i < pairs_size_; i++) {
+    pairs_[i] = typename KeyValueTrait::Pair();
+  }
+
   const typename KeyValueTrait::Value kNoValue =
       KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
-
-  ASSERT(new_size > count_);
-  // Hashing the values into the new array has no more collisions than in the
-  // old hash map, so we can use the existing lists_ array, if we are careful.
-
-  // Make sure we have at least one free element.
-  if (free_list_head_ == kNil) {
-    ResizeLists(lists_size_ << 1);
-  }
-
-  HashMapListElement* new_array =
-      allocator_->template Alloc<HashMapListElement>(new_size);
-  InitArray(new_array, new_size);
-
-  HashMapListElement* old_array = array_;
-  intptr_t old_size = array_size_;
-
-  intptr_t old_count = count_;
-  count_ = 0;
-  array_size_ = new_size;
-  array_ = new_array;
-
-  if (old_array != NULL) {
-    // Iterate over all the elements in lists, rehashing them.
-    for (intptr_t i = 0; i < old_size; ++i) {
-      if (KeyValueTrait::ValueOf(old_array[i].kv) != kNoValue) {
-        intptr_t current = old_array[i].next;
-        while (current != kNil) {
-          Insert(lists_[current].kv);
-          intptr_t next = lists_[current].next;
-          lists_[current].next = free_list_head_;
-          free_list_head_ = current;
-          current = next;
-        }
-        // Rehash the directly stored value.
-        Insert(old_array[i].kv);
-      }
+  uint32_t used = 0;
+  uint32_t deleted = 0;
+  for (uint32_t i = 0; i < old_next_pair_index; i++) {
+    if (KeyValueTrait::ValueOf(old_pairs[i]) == kNoValue) {
+      deleted++;
+    } else {
+      Insert(old_pairs[i]);
+      used++;
     }
   }
-  USE(old_count);
-  ASSERT(count_ == old_count);
-  allocator_->template Free<HashMapListElement>(old_array, old_size);
-}
-
-template <typename KeyValueTrait, typename B, typename Allocator>
-void BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::ResizeLists(
-    intptr_t new_size) {
-  ASSERT(new_size > lists_size_);
-
-  HashMapListElement* new_lists =
-      allocator_->template Alloc<HashMapListElement>(new_size);
-  InitArray(new_lists, new_size);
-
-  HashMapListElement* old_lists = lists_;
-  intptr_t old_size = lists_size_;
-
-  lists_size_ = new_size;
-  lists_ = new_lists;
-
-  if (old_lists != NULL) {
-    for (intptr_t i = 0; i < old_size; i++) {
-      lists_[i] = old_lists[i];
-    }
-  }
-  for (intptr_t i = old_size; i < lists_size_; ++i) {
-    lists_[i].next = free_list_head_;
-    free_list_head_ = i;
-  }
-  allocator_->template Free<HashMapListElement>(old_lists, old_size);
+  ASSERT_EQUAL(deleted, old_deleted_count);
+  ASSERT_EQUAL(used, old_next_pair_index - old_deleted_count);
+  ASSERT_EQUAL(used, next_pair_index_);
+  allocator_->template Free<typename KeyValueTrait::Pair>(old_pairs,
+                                                          old_pairs_size);
 }
 
 template <typename KeyValueTrait, typename B, typename Allocator>
 void BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Insert(
     typename KeyValueTrait::Pair kv) {
-  const typename KeyValueTrait::Value kNoValue =
-      KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
-
-  ASSERT(KeyValueTrait::ValueOf(kv) != kNoValue);
-  // TODO(dartbug.com/38018): Add assert that Lookup returns nullptr for key.
-
-  // Resizing when half of the hashtable is filled up.
-  if (count_ >= array_size_ >> 1) Resize(array_size_ << 1);
-  ASSERT(count_ < array_size_);
-  count_++;
-  uword pos = Bound(KeyValueTrait::Hash(KeyValueTrait::KeyOf(kv)));
-  if (KeyValueTrait::ValueOf(array_[pos].kv) == kNoValue) {
-    array_[pos].kv = kv;
-    array_[pos].next = kNil;
-  } else {
-    if (free_list_head_ == kNil) {
-      ResizeLists(lists_size_ << 1);
+  // TODO(dartbug.com/38018):
+  // ASSERT(Lookup(KeyValueTrait::KeyOf(kv)) == nullptr);
+  ASSERT(next_pair_index_ < pairs_size_);
+  uword hash = KeyValueTrait::Hash(KeyValueTrait::KeyOf(kv));
+  uint32_t mask = hash_table_size_ - 1;
+  uint32_t hash_index = hash & mask;
+  uint32_t start = hash_index;
+  for (;;) {
+    uint32_t pair_index = hash_table_[hash_index];
+    if ((pair_index == kEmpty) || (pair_index == kDeleted)) {
+      hash_table_[hash_index] = next_pair_index_;
+      pairs_[next_pair_index_] = kv;
+      next_pair_index_++;
+      break;
     }
-    intptr_t new_element_pos = free_list_head_;
-    ASSERT(new_element_pos != kNil);
-    free_list_head_ = lists_[free_list_head_].next;
-    lists_[new_element_pos].kv = kv;
-    lists_[new_element_pos].next = array_[pos].next;
-    ASSERT(array_[pos].next == kNil ||
-           KeyValueTrait::ValueOf(lists_[array_[pos].next].kv) != kNoValue);
-    array_[pos].next = new_element_pos;
+    ASSERT(pair_index < pairs_size_);
+    hash_index = (hash_index + 1) & mask;
+    // Hashtable must contain at least one empty marker.
+    ASSERT(hash_index != start);
+  }
+
+  if (next_pair_index_ == pairs_size_) {
+    Resize(Size() << 1);
   }
 }
 
@@ -339,66 +269,30 @@
 template <typename KeyValueTrait, typename B, typename Allocator>
 bool BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Remove(
     typename KeyValueTrait::Key key) {
-  const typename KeyValueTrait::Value kNoValue =
-      KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
-
-  uword pos = Bound(KeyValueTrait::Hash(key));
-
-  // Check to see if the first element in the bucket is the one we want to
-  // remove.
-  if (KeyValueTrait::ValueOf(array_[pos].kv) == kNoValue) return false;
-  if (KeyValueTrait::IsKeyEqual(array_[pos].kv, key)) {
-    if (array_[pos].next == kNil) {
-      array_[pos] = HashMapListElement();
-    } else {
-      intptr_t next = array_[pos].next;
-      array_[pos] = lists_[next];
-      lists_[next] = HashMapListElement();
-      lists_[next].next = free_list_head_;
-      free_list_head_ = next;
-    }
-    count_--;
-    return true;
-  }
-
-  intptr_t current = array_[pos].next;
-
-  // If there's only the single element in the bucket and it does not match the
-  // key to be removed, just return.
-  if (current == kNil) {
-    return false;
-  }
-
-  // Check the case where the second element in the bucket is the one to be
-  // removed.
-  if (KeyValueTrait::IsKeyEqual(lists_[current].kv, key)) {
-    array_[pos].next = lists_[current].next;
-    lists_[current] = HashMapListElement();
-    lists_[current].next = free_list_head_;
-    free_list_head_ = current;
-    count_--;
-    return true;
-  }
-
-  // Finally, iterate through the rest of the bucket to see if we can find the
-  // entry that matches our key.
-  intptr_t previous = -1;
-  while (!KeyValueTrait::IsKeyEqual(lists_[current].kv, key)) {
-    previous = current;
-    current = lists_[current].next;
-
-    if (current == kNil) {
-      // Could not find entry with provided key to remove.
+  uword hash = KeyValueTrait::Hash(key);
+  uint32_t mask = hash_table_size_ - 1;
+  uint32_t hash_index = hash & mask;
+  uint32_t start = hash_index;
+  for (;;) {
+    uint32_t pair_index = hash_table_[hash_index];
+    if (pair_index == kEmpty) {
       return false;
     }
+    if (pair_index != kDeleted) {
+      ASSERT(pair_index < pairs_size_);
+      if (KeyValueTrait::IsKeyEqual(pairs_[pair_index], key)) {
+        hash_table_[hash_index] = kDeleted;
+        pairs_[pair_index] = typename KeyValueTrait::Pair();
+        deleted_count_++;
+        return true;
+      }
+    }
+    hash_index = (hash_index + 1) & mask;
+    // Hashtable must contain at least one empty marker.
+    ASSERT(hash_index != start);
   }
-
-  lists_[previous].next = lists_[current].next;
-  lists_[current] = HashMapListElement();
-  lists_[current].next = free_list_head_;
-  free_list_head_ = current;
-  count_--;
-  return true;
+  UNREACHABLE();
+  return false;
 }
 
 template <typename KeyValueTrait>
@@ -433,7 +327,7 @@
   MallocDirectChainedHashMap(
       intptr_t initial_size = MallocDirectChainedHashMap::kInitialSize)
       : BaseDirectChainedHashMap<KeyValueTrait, MallocAllocated, Malloc>(
-            NULL,
+            nullptr,
             initial_size) {}
 
   // The only use of the copy constructor seems to be in hash_map_test.cc.
@@ -502,7 +396,7 @@
   struct Pair {
     Key key;
     Value value;
-    Pair() : key(NULL), value() {}
+    Pair() : key(nullptr), value() {}
     Pair(const Key key, const Value& value) : key(key), value(value) {}
     Pair(const Pair& other) : key(other.key), value(other.value) {}
     Pair& operator=(const Pair&) = default;
@@ -645,7 +539,7 @@
   inline V Lookup(const Key& key) const {
     Pair* pair =
         DirectChainedHashMap<IntKeyRawPointerValueTrait<V> >::Lookup(key);
-    if (pair == NULL) {
+    if (pair == nullptr) {
       return V();
     } else {
       return pair->value;
diff --git a/runtime/vm/hash_table.h b/runtime/vm/hash_table.h
index 318dbf4..d917aae 100644
--- a/runtime/vm/hash_table.h
+++ b/runtime/vm/hash_table.h
@@ -553,6 +553,8 @@
     }
   }
 
+  static constexpr double kMaxLoadFactor = 0.71;
+
   template <typename Table>
   static void EnsureLoadFactor(double high, const Table& table) {
     // We count deleted elements because they take up space just
@@ -707,8 +709,7 @@
 
  protected:
   void EnsureCapacity() const {
-    static const double kMaxLoadFactor = 0.71;
-    HashTables::EnsureLoadFactor(kMaxLoadFactor, *this);
+    HashTables::EnsureLoadFactor(HashTables::kMaxLoadFactor, *this);
   }
 };
 
@@ -793,8 +794,7 @@
 
  protected:
   void EnsureCapacity() const {
-    static const double kMaxLoadFactor = 0.71;
-    HashTables::EnsureLoadFactor(kMaxLoadFactor, *this);
+    HashTables::EnsureLoadFactor(HashTables::kMaxLoadFactor, *this);
   }
 };
 
diff --git a/runtime/vm/heap/become.cc b/runtime/vm/heap/become.cc
index 4bb646d..2a4e0aa 100644
--- a/runtime/vm/heap/become.cc
+++ b/runtime/vm/heap/become.cc
@@ -217,6 +217,27 @@
 };
 #endif
 
+Become::Become() {
+  IsolateGroup* group = Thread::Current()->isolate_group();
+  ASSERT(group->become() == nullptr);  // Only one outstanding become at a time.
+  group->set_become(this);
+}
+
+Become::~Become() {
+  Thread::Current()->isolate_group()->set_become(nullptr);
+}
+
+void Become::Add(const Object& before, const Object& after) {
+  pointers_.Add(before.ptr());
+  pointers_.Add(after.ptr());
+}
+
+void Become::VisitObjectPointers(ObjectPointerVisitor* visitor) {
+  if (pointers_.length() != 0) {
+    visitor->VisitPointers(&pointers_[0], pointers_.length());
+  }
+}
+
 void Become::MakeDummyObject(const Instance& instance) {
   // Make the forward pointer point to itself.
   // This is needed to distinguish it from a real forward object.
@@ -228,7 +249,7 @@
   return GetForwardedObject(object) == object;
 }
 
-void Become::CrashDump(ObjectPtr before_obj, ObjectPtr after_obj) {
+static void CrashDump(ObjectPtr before_obj, ObjectPtr after_obj) {
   OS::PrintErr("DETECTED FATAL ISSUE IN BECOME MAPPINGS\n");
 
   OS::PrintErr("BEFORE ADDRESS: %#" Px "\n", static_cast<uword>(before_obj));
@@ -256,7 +277,7 @@
   }
 }
 
-void Become::ElementsForwardIdentity(const Array& before, const Array& after) {
+void Become::Forward() {
   Thread* thread = Thread::Current();
   auto heap = thread->isolate_group()->heap();
 
@@ -264,10 +285,9 @@
   HeapIterationScope his(thread);
 
   // Setup forwarding pointers.
-  ASSERT(before.Length() == after.Length());
-  for (intptr_t i = 0; i < before.Length(); i++) {
-    ObjectPtr before_obj = before.At(i);
-    ObjectPtr after_obj = after.At(i);
+  for (intptr_t i = 0; i < pointers_.length(); i += 2) {
+    ObjectPtr before_obj = pointers_[i];
+    ObjectPtr after_obj = pointers_[i + 1];
 
     if (before_obj == after_obj) {
       FATAL("become: Cannot self-forward");
@@ -304,10 +324,11 @@
   FollowForwardingPointers(thread);
 
 #if defined(DEBUG)
-  for (intptr_t i = 0; i < before.Length(); i++) {
-    ASSERT(before.At(i) == after.At(i));
+  for (intptr_t i = 0; i < pointers_.length(); i += 2) {
+    ASSERT(pointers_[i] == pointers_[i + 1]);
   }
 #endif
+  pointers_.Clear();
 }
 
 void Become::FollowForwardingPointers(Thread* thread) {
diff --git a/runtime/vm/heap/become.h b/runtime/vm/heap/become.h
index 9914056..73d43ef 100644
--- a/runtime/vm/heap/become.h
+++ b/runtime/vm/heap/become.h
@@ -6,6 +6,7 @@
 #define RUNTIME_VM_HEAP_BECOME_H_
 
 #include "platform/atomic.h"
+#include "platform/growable_array.h"
 #include "vm/allocation.h"
 #include "vm/raw_object.h"
 
@@ -26,8 +27,9 @@
   ObjectPtr target() const { return target_; }
   void set_target(ObjectPtr target) { target_ = target; }
 
-  intptr_t HeapSize() {
-    intptr_t size = UntaggedObject::SizeTag::decode(tags_);
+  intptr_t HeapSize() { return HeapSize(tags_); }
+  intptr_t HeapSize(uword tags) {
+    intptr_t size = UntaggedObject::SizeTag::decode(tags);
     if (size != 0) return size;
     return *SizeAddress();
   }
@@ -68,15 +70,39 @@
   DISALLOW_IMPLICIT_CONSTRUCTORS(ForwardingCorpse);
 };
 
-// TODO(johnmccutchan): Refactor this class so that it is not all static and
-// provides utility methods for building the mapping of before and after.
-class Become : public AllStatic {
+// Forward/exchange object identity within pairs of objects.
+//
+// Forward: Redirects all pointers to each 'before' object to the corresponding
+// 'after' object. Every 'before' object is guaranteed to be unreachable after
+// the operation. The identity hash of the 'before' object is retained.
+//
+// This is useful for atomically applying behavior and schema changes, which can
+// be done by allocating fresh objects with the new schema and forwarding the
+// identity of the old objects to the new objects.
+//
+// Exchange: Redirect all pointers to each 'before' object to the corresponding
+// 'after' object and vice versa. Both objects remain reachable after the
+// operation.
+//
+// This is useful for implementing certain types of proxies. For example, an
+// infrequently accessed object may be written to disk and swapped with a
+// so-called "husk", and swapped back when it is later accessed.
+//
+// This operation is named 'become' after its original in Smalltalk:
+//   x become: y             "exchange identity for one pair"
+//   x becomeForward: y      "forward identity for one pair"
+//   #(x ...) elementsExchangeIdentityWith: #(y ...)
+//   #(x ...) elementsForwardIdentityTo: #(y ...)
+class Become {
  public:
-  // Smalltalk's one-way bulk become (Array>>#elementsForwardIdentityTo:).
-  // Redirects all pointers to elements of 'before' to the corresponding element
-  // in 'after'. Every element in 'before' is guaranteed to be not reachable.
-  // Useful for atomically applying behavior and schema changes.
-  static void ElementsForwardIdentity(const Array& before, const Array& after);
+  Become();
+  ~Become();
+
+  void Add(const Object& before, const Object& after);
+  void Forward();
+  void Exchange() { UNIMPLEMENTED(); }
+
+  void VisitObjectPointers(ObjectPointerVisitor* visitor);
 
   // Convert and instance object into a dummy object,
   // making the instance independent of its class.
@@ -88,7 +114,8 @@
   static void FollowForwardingPointers(Thread* thread);
 
  private:
-  static void CrashDump(ObjectPtr before_obj, ObjectPtr after_obj);
+  MallocGrowableArray<ObjectPtr> pointers_;
+  DISALLOW_COPY_AND_ASSIGN(Become);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/heap/become_test.cc b/runtime/vm/heap/become_test.cc
index 031e497b..76f325a 100644
--- a/runtime/vm/heap/become_test.cc
+++ b/runtime/vm/heap/become_test.cc
@@ -13,24 +13,25 @@
 namespace dart {
 
 void TestBecomeForward(Heap::Space before_space, Heap::Space after_space) {
+  // Allocate the container in old space to test the remembered set.
+  const Array& container = Array::Handle(Array::New(1, Heap::kOld));
+
   const String& before_obj = String::Handle(String::New("old", before_space));
   const String& after_obj = String::Handle(String::New("new", after_space));
-
+  container.SetAt(0, before_obj);
   EXPECT(before_obj.ptr() != after_obj.ptr());
 
-  // Allocate the arrays in old space to test the remembered set.
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, before_obj);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, after_obj);
-
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(before_obj, after_obj);
+  become.Forward();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
+  EXPECT(container.At(0) == after_obj.ptr());
 
   GCTestHelper::CollectAllGarbage();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
+  EXPECT(container.At(0) == after_obj.ptr());
 }
 
 ISOLATE_UNIT_TEST_CASE(BecomeFowardOldToOld) {
@@ -62,11 +63,9 @@
   EXPECT_EQ(peer, heap->GetPeer(before_obj.ptr()));
   EXPECT_EQ(no_peer, heap->GetPeer(after_obj.ptr()));
 
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, before_obj);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, after_obj);
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(before_obj, after_obj);
+  become.Forward();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
   EXPECT_EQ(peer, heap->GetPeer(before_obj.ptr()));
@@ -86,11 +85,9 @@
   EXPECT_EQ(id, heap->GetObjectId(before_obj.ptr()));
   EXPECT_EQ(no_id, heap->GetObjectId(after_obj.ptr()));
 
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, before_obj);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, after_obj);
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(before_obj, after_obj);
+  become.Forward();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
   EXPECT_EQ(id, heap->GetObjectId(before_obj.ptr()));
@@ -114,11 +111,9 @@
   EXPECT_EQ(no_id,
             isolate->forward_table_old()->GetValueExclusive(after_obj.ptr()));
 
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, before_obj);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, after_obj);
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(before_obj, after_obj);
+  become.Forward();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
   EXPECT_EQ(id,
@@ -142,12 +137,9 @@
 
   EXPECT(before_obj.ptr() != after_obj.ptr());
 
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, before_obj);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, after_obj);
-
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(before_obj, after_obj);
+  become.Forward();
 
   EXPECT(before_obj.ptr() == after_obj.ptr());
   EXPECT(!after_obj.ptr()->untag()->IsRemembered());
@@ -174,11 +166,9 @@
                  Object::Handle(card_remembered_array.At(0)).ToCString());
   }
 
-  const Array& before = Array::Handle(Array::New(1, Heap::kOld));
-  before.SetAt(0, old_element);
-  const Array& after = Array::Handle(Array::New(1, Heap::kOld));
-  after.SetAt(0, new_element);
-  Become::ElementsForwardIdentity(before, after);
+  Become become;
+  become.Add(old_element, new_element);
+  become.Forward();
 
   EXPECT(old_element.ptr() == new_element.ptr());
   EXPECT(old_element.ptr()->IsNewObject());
diff --git a/runtime/vm/heap/freelist.h b/runtime/vm/heap/freelist.h
index 7a1e2d0..8040f5f 100644
--- a/runtime/vm/heap/freelist.h
+++ b/runtime/vm/heap/freelist.h
@@ -28,8 +28,9 @@
 
   void set_next(FreeListElement* next) { next_ = next; }
 
-  intptr_t HeapSize() {
-    intptr_t size = UntaggedObject::SizeTag::decode(tags_);
+  intptr_t HeapSize() { return HeapSize(tags_); }
+  intptr_t HeapSize(uword tags) {
+    intptr_t size = UntaggedObject::SizeTag::decode(tags);
     if (size != 0) return size;
     return *SizeAddress();
   }
diff --git a/runtime/vm/heap/freelist_test.cc b/runtime/vm/heap/freelist_test.cc
index 4e7b7f4..5778886 100644
--- a/runtime/vm/heap/freelist_test.cc
+++ b/runtime/vm/heap/freelist_test.cc
@@ -84,8 +84,8 @@
 TEST_CASE(FreeList) {
   FreeList* free_list = new FreeList();
   const intptr_t kBlobSize = 1 * MB;
-  VirtualMemory* region =
-      VirtualMemory::Allocate(kBlobSize, /* is_executable */ false, "test");
+  VirtualMemory* region = VirtualMemory::Allocate(
+      kBlobSize, /* is_executable */ false, /* is_compressed */ false, "test");
 
   TestFreeList(region, free_list, false);
 
@@ -97,8 +97,8 @@
 TEST_CASE(FreeListProtected) {
   FreeList* free_list = new FreeList();
   const intptr_t kBlobSize = 1 * MB;
-  VirtualMemory* region =
-      VirtualMemory::Allocate(kBlobSize, /* is_executable */ false, "test");
+  VirtualMemory* region = VirtualMemory::Allocate(
+      kBlobSize, /*is_executable*/ false, /*is_compressed*/ false, "test");
 
   TestFreeList(region, free_list, true);
 
@@ -113,8 +113,8 @@
   const intptr_t kObjectSize = 2 * kWordSize;
   uword* objects = new uword[kBlobSize / kObjectSize];
 
-  VirtualMemory* blob =
-      VirtualMemory::Allocate(kBlobSize, /* is_executable = */ false, "test");
+  VirtualMemory* blob = VirtualMemory::Allocate(
+      kBlobSize, /*is_executable*/ false, /*is_compressed*/ false, "test");
   ASSERT(Utils::IsAligned(blob->start(), 4096));
   blob->Protect(VirtualMemory::kReadWrite);
 
@@ -154,8 +154,8 @@
     objects[i] = static_cast<uword>(NULL);
   }
 
-  VirtualMemory* blob =
-      VirtualMemory::Allocate(kBlobSize, /* is_executable = */ false, "test");
+  VirtualMemory* blob = VirtualMemory::Allocate(
+      kBlobSize, /*is_executable*/ false, /*is_compressed*/ false, "test");
   blob->Protect(VirtualMemory::kReadWrite);
 
   // Enqueue the large blob as one free block.
@@ -197,9 +197,9 @@
   // "<other code>" region is also still executable (and not writable).
   std::unique_ptr<FreeList> free_list(new FreeList());
   const uword page = VirtualMemory::PageSize();
-  std::unique_ptr<VirtualMemory> blob(
-      VirtualMemory::Allocate(2 * page,
-                              /*is_executable=*/false, "test"));
+  std::unique_ptr<VirtualMemory> blob(VirtualMemory::Allocate(
+      2 * page,
+      /*is_executable=*/false, /*is_compressed*/ false, "test"));
   const intptr_t remainder_size = page / 2;
   const intptr_t alloc_size = page - header_overlap * kObjectAlignment;
   void* const other_code =
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index e8b7bc9..97850c6 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -136,7 +136,13 @@
     return addr;
   }
 
-  old_space_.TryReleaseReservation();
+  if (old_space_.GrowthControlState()) {
+    WaitForSweeperTasks(Thread::Current());
+    old_space_.TryReleaseReservation();
+  } else {
+    // We may or may not be a safepoint, so we don't know how to wait for the
+    // sweeper.
+  }
 
   // Give up allocating this object.
   OS::PrintErr("Exhausted heap space, trying to allocate %" Pd " bytes.\n",
@@ -358,6 +364,7 @@
 
 void Heap::NotifyIdle(int64_t deadline) {
   Thread* thread = Thread::Current();
+  TIMELINE_FUNCTION_GC_DURATION(thread, "NotifyIdle");
   GcSafepointOperationScope safepoint_operation(thread);
 
   // Check if we want to collect new-space first, because if we want to collect
@@ -365,7 +372,6 @@
   // to shrink the root set (make old-space GC faster) and avoid
   // intergenerational garbage (make old-space GC free more memory).
   if (new_space_.ShouldPerformIdleScavenge(deadline)) {
-    TIMELINE_FUNCTION_GC_DURATION(thread, "IdleGC");
     CollectNewSpaceGarbage(thread, kIdle);
   }
 
@@ -377,7 +383,6 @@
     // We prefer mark-compact over other old space GCs if we have enough time,
     // since it removes old space fragmentation and frees up most memory.
     // Blocks for O(heap), roughtly twice as costly as mark-sweep.
-    TIMELINE_FUNCTION_GC_DURATION(thread, "IdleGC");
     CollectOldSpaceGarbage(thread, kMarkCompact, kIdle);
   } else if (old_space_.ReachedHardThreshold()) {
     // Even though the following GC may exceed our idle deadline, we need to
@@ -387,7 +392,6 @@
     // the only place that checks the old space allocation limit.
     // Compare the tail end of Heap::CollectNewSpaceGarbage.
     // Blocks for O(heap).
-    TIMELINE_FUNCTION_GC_DURATION(thread, "IdleGC");
     CollectOldSpaceGarbage(thread, kMarkSweep, kIdle);
   } else if (old_space_.ShouldStartIdleMarkSweep(deadline) ||
              old_space_.ReachedSoftThreshold()) {
@@ -402,16 +406,15 @@
       phase = old_space_.phase();
     }
     if (phase == PageSpace::kAwaitingFinalization) {
-      TIMELINE_FUNCTION_GC_DURATION(thread, "IdleGC");
       CollectOldSpaceGarbage(thread, Heap::kMarkSweep, Heap::kFinalize);
     } else if (phase == PageSpace::kDone) {
-      TIMELINE_FUNCTION_GC_DURATION(thread, "IdleGC");
       StartConcurrentMarking(thread);
     }
   }
 }
 
 void Heap::NotifyLowMemory() {
+  TIMELINE_FUNCTION_GC_DURATION(Thread::Current(), "NotifyLowMemory");
   CollectMostGarbage(kLowMemory);
 }
 
@@ -1020,7 +1023,7 @@
           if (!Isolate::IsSystemIsolate(isolate)) {
             ServiceEvent event(isolate, ServiceEvent::kGC);
             event.set_gc_stats(&stats_);
-            Service::HandleEvent(&event);
+            Service::HandleEvent(&event, /*enter_safepoint*/ false);
           }
         },
         /*at_safepoint=*/true);
diff --git a/runtime/vm/heap/marker.cc b/runtime/vm/heap/marker.cc
index 8b4e869..74ca4cc 100644
--- a/runtime/vm/heap/marker.cc
+++ b/runtime/vm/heap/marker.cc
@@ -46,7 +46,7 @@
   void AddMicros(int64_t micros) { marked_micros_ += micros; }
 
   bool ProcessPendingWeakProperties() {
-    bool marked = false;
+    bool more_to_mark = false;
     WeakPropertyPtr cur_weak = delayed_weak_properties_;
     delayed_weak_properties_ = WeakProperty::null();
     while (cur_weak != WeakProperty::null()) {
@@ -55,10 +55,11 @@
       ObjectPtr raw_key = cur_weak->untag()->key();
       // Reset the next pointer in the weak property.
       cur_weak->untag()->next_ = WeakProperty::null();
-      if (raw_key->untag()->IsMarked()) {
+      if (raw_key->IsSmiOrNewObject() || raw_key->untag()->IsMarked()) {
         ObjectPtr raw_val = cur_weak->untag()->value();
-        marked = marked ||
-                 (raw_val->IsHeapObject() && !raw_val->untag()->IsMarked());
+        if (!raw_val->IsSmiOrNewObject() && !raw_val->untag()->IsMarked()) {
+          more_to_mark = true;
+        }
 
         // The key is marked so we make sure to properly visit all pointers
         // originating from this weak property.
@@ -70,7 +71,7 @@
       // Advance to next weak property in the queue.
       cur_weak = next_weak;
     }
-    return marked;
+    return more_to_mark;
   }
 
   void DrainMarkingStack() {
@@ -175,16 +176,24 @@
     ObjectPtr raw_obj;
     while ((raw_obj = deferred_work_list_.Pop()) != nullptr) {
       ASSERT(raw_obj->IsHeapObject() && raw_obj->IsOldObject());
-      // N.B. We are scanning the object even if it is already marked.
+      // We need to scan objects even if they were already scanned via ordinary
+      // marking. An object may have changed since its ordinary scan and been
+      // added to deferred marking stack to compensate for write-barrier
+      // elimination.
+      // A given object may be included in the deferred marking stack multiple
+      // times. It may or may not also be in the ordinary marking stack, so
+      // failing to acquire the mark bit here doesn't reliably indicate the
+      // object was already encountered through the deferred marking stack. Our
+      // processing here is idempotent, so repeated visits only hurt performance
+      // but not correctness. Duplicatation is expected to be low.
+      // By the absence of a special case, we are treating WeakProperties as
+      // strong references here. This guarantees a WeakProperty will only be
+      // added to the delayed_weak_properties_ list of the worker that
+      // encounters it during ordinary marking. This is in the same spirit as
+      // the eliminated write barrier, which would have added the newly written
+      // key and value to the ordinary marking stack.
       bool did_mark = TryAcquireMarkBit(raw_obj);
-      const intptr_t class_id = raw_obj->GetClassId();
-      intptr_t size;
-      if (class_id != kWeakPropertyCid) {
-        size = raw_obj->untag()->VisitPointersNonvirtual(this);
-      } else {
-        WeakPropertyPtr raw_weak = static_cast<WeakPropertyPtr>(raw_obj);
-        size = ProcessWeakProperty(raw_weak, did_mark);
-      }
+      intptr_t size = raw_obj->untag()->VisitPointersNonvirtual(this);
       // Add the size only if we win the marking race to prevent
       // double-counting.
       if (did_mark) {
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index dc87ca1..0c8a740 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -47,9 +47,11 @@
                            PageType type,
                            const char* name) {
   const bool executable = type == kExecutable;
+  const bool compressed = !executable;
 
   VirtualMemory* memory = VirtualMemory::AllocateAligned(
-      size_in_words << kWordSizeLog2, kOldPageSize, executable, name);
+      size_in_words << kWordSizeLog2, kOldPageSize, executable, compressed,
+      name);
   if (memory == NULL) {
     return NULL;
   }
@@ -1035,6 +1037,8 @@
 }
 
 void PageSpace::TryReleaseReservation() {
+  ASSERT(phase() != kSweepingLarge);
+  ASSERT(phase() != kSweepingRegular);
   if (oom_reservation_ == nullptr) return;
   uword addr = reinterpret_cast<uword>(oom_reservation_);
   intptr_t size = oom_reservation_->HeapSize();
diff --git a/runtime/vm/heap/safepoint.h b/runtime/vm/heap/safepoint.h
index 363b3f5..d002189 100644
--- a/runtime/vm/heap/safepoint.h
+++ b/runtime/vm/heap/safepoint.h
@@ -461,6 +461,37 @@
   DISALLOW_COPY_AND_ASSIGN(TransitionToVM);
 };
 
+// TransitionToNative is used to transition the safepoint state of a
+// thread from "running VM code" to "running native code"
+// and ensures that the state is reverted back to the initial state
+// when exiting the scope/frame.
+class TransitionToNative : public TransitionSafepointState {
+ public:
+  explicit TransitionToNative(Thread* T)
+      : TransitionSafepointState(T), execution_state_(T->execution_state()) {
+    ASSERT(T == Thread::Current());
+    ASSERT((execution_state_ == Thread::kThreadInVM) ||
+           (execution_state_ == Thread::kThreadInNative));
+    if (execution_state_ == Thread::kThreadInVM) {
+      T->set_execution_state(Thread::kThreadInNative);
+      T->EnterSafepoint();
+    }
+    ASSERT(T->execution_state() == Thread::kThreadInNative);
+  }
+
+  ~TransitionToNative() {
+    ASSERT(thread()->execution_state() == Thread::kThreadInNative);
+    if (execution_state_ == Thread::kThreadInVM) {
+      thread()->ExitSafepoint();
+      thread()->set_execution_state(Thread::kThreadInVM);
+    }
+  }
+
+ private:
+  uint32_t execution_state_;
+  DISALLOW_COPY_AND_ASSIGN(TransitionToNative);
+};
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_HEAP_SAFEPOINT_H_
diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc
index cf52ef4..d2652ba 100644
--- a/runtime/vm/heap/scavenger.cc
+++ b/runtime/vm/heap/scavenger.cc
@@ -288,11 +288,12 @@
   void UpdateStoreBuffer(ObjectPtr obj) {
     ASSERT(obj->IsHeapObject());
     // If the newly written object is not a new object, drop it immediately.
-    if (!obj->IsNewObject() || visiting_old_object_->untag()->IsRemembered()) {
+    if (!obj->IsNewObject()) {
       return;
     }
-    visiting_old_object_->untag()->SetRememberedBit();
-    thread_->StoreBufferAddObjectGC(visiting_old_object_);
+    if (visiting_old_object_->untag()->TryAcquireRememberedBit()) {
+      thread_->StoreBufferAddObjectGC(visiting_old_object_);
+    }
   }
 
   DART_FORCE_INLINE
@@ -669,9 +670,10 @@
   if (memory == nullptr) {
     const intptr_t alignment = kNewPageSize;
     const bool is_executable = false;
+    const bool compressed = true;
     const char* const name = Heap::RegionName(Heap::kNew);
-    memory =
-        VirtualMemory::AllocateAligned(size, alignment, is_executable, name);
+    memory = VirtualMemory::AllocateAligned(size, alignment, is_executable,
+                                            compressed, name);
   }
   if (memory == nullptr) {
     return nullptr;  // Out of memory.
diff --git a/runtime/vm/heap/scavenger.h b/runtime/vm/heap/scavenger.h
index 810a26e..4b73f85 100644
--- a/runtime/vm/heap/scavenger.h
+++ b/runtime/vm/heap/scavenger.h
@@ -121,7 +121,7 @@
     ASSERT(owner_ == nullptr);
     uword result = top_;
     uword new_top = result + size;
-    if (LIKELY(new_top < end_)) {
+    if (LIKELY(new_top <= end_)) {
       top_ = new_top;
       return result;
     }
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 46cf7f1..9d49ce6 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -650,7 +650,6 @@
   thread->set_execution_state(Thread::kThreadInNative);
   thread->set_safepoint_state(Thread::AtSafepointField::encode(true) |
                               Thread::AtDeoptSafepointField::encode(true));
-  thread->clear_pending_functions();
   ASSERT(thread->no_safepoint_scope_depth() == 0);
   if (is_mutator) {
     // The mutator thread structure stays alive and attached to the isolate as
@@ -1127,6 +1126,7 @@
       if (!obj.IsSmi()) return Error::null();
       const intptr_t priority = Smi::Cast(obj).Value();
       if (priority == Isolate::kImmediateAction) {
+        Thread::Current()->StartUnwindError();
         obj = message.At(2);
         if (I->VerifyTerminateCapability(obj)) {
           // We will kill the current isolate by returning an UnwindError.
@@ -2116,7 +2116,7 @@
 #ifndef PRODUCT
   if (!Isolate::IsSystemIsolate(this) && Service::isolate_stream.enabled()) {
     ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable);
-    Service::HandleEvent(&runnableEvent);
+    Service::HandleEvent(&runnableEvent, /* enter_safepoint */ false);
   }
   GetRunnableLatencyMetric()->set_value(UptimeMicros());
 #endif  // !PRODUCT
@@ -2315,8 +2315,12 @@
   msg.value.as_string = const_cast<char*>(message);
   arr_values[0] = &msg;
   Dart_CObject stack;
-  stack.type = Dart_CObject_kString;
-  stack.value.as_string = const_cast<char*>(stacktrace);
+  if (stacktrace == NULL) {
+    stack.type = Dart_CObject_kNull;
+  } else {
+    stack.type = Dart_CObject_kString;
+    stack.value.as_string = const_cast<char*>(stacktrace);
+  }
   arr_values[1] = &stack;
 
   SendPort& listener = SendPort::Handle(current_zone());
@@ -2381,10 +2385,14 @@
 
 void Isolate::ProcessFreeSampleBlocks(Thread* thread) {
   SampleBlock* head = free_block_list_.exchange(nullptr);
+  if (head == nullptr) {
+    // No sample blocks to process.
+    return;
+  }
   // Reverse the list before processing so older blocks are streamed and reused
   // first.
   SampleBlock* reversed_head = nullptr;
-  while (head != nullptr) {
+  do {
     SampleBlock* next = head->next_free_;
     if (reversed_head == nullptr) {
       reversed_head = head;
@@ -2394,24 +2402,28 @@
       reversed_head = head;
     }
     head = next;
-  }
+  } while (head != nullptr);
   head = reversed_head;
-  while (head != nullptr) {
-    if (Service::profiler_stream.enabled() && !IsSystemIsolate(this)) {
-      StackZone zone(thread);
-      HandleScope handle_scope(thread);
-      Profile profile;
-      profile.Build(thread, nullptr, head);
-      ServiceEvent event(this, ServiceEvent::kCpuSamples);
-      event.set_cpu_profile(&profile);
-      Service::HandleEvent(&event);
-    }
+
+  if (Service::profiler_stream.enabled() && !IsSystemIsolate(this)) {
+    SampleBlockListProcessor buffer(head);
+    StackZone zone(thread);
+    HandleScope handle_scope(thread);
+    Profile profile;
+    profile.Build(thread, nullptr, &buffer);
+    ServiceEvent event(this, ServiceEvent::kCpuSamples);
+    event.set_cpu_profile(&profile);
+    Service::HandleEvent(&event);
+  }
+
+  do {
     SampleBlock* next = head->next_free_;
     head->next_free_ = nullptr;
     head->evictable_ = true;
     Profiler::sample_block_buffer()->FreeBlock(head);
     head = next;
-  }
+    thread->CheckForSafepoint();
+  } while (head != nullptr);
 }
 #endif  // !defined(PRODUCT)
 
@@ -2888,6 +2900,10 @@
     visitor->VisitPointer(
         reinterpret_cast<ObjectPtr*>(&(source()->loaded_blobs_)));
   }
+
+  if (become() != nullptr) {
+    become()->VisitObjectPointers(visitor);
+  }
 }
 
 void IsolateGroup::VisitStackPointers(ObjectPointerVisitor* visitor,
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index d6555b3..21cd81c 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -46,6 +46,7 @@
 // Forward declarations.
 class ApiState;
 class BackgroundCompiler;
+class Become;
 class Capability;
 class CodeIndexTable;
 class Debugger;
@@ -687,6 +688,9 @@
 #endif
   }
 
+  Become* become() const { return become_; }
+  void set_become(Become* become) { become_ = become; }
+
   uint64_t id() const { return id_; }
 
   static void Init();
@@ -829,6 +833,7 @@
   RelaxedAtomic<intptr_t> reload_every_n_stack_overflow_checks_;
   ProgramReloadContext* program_reload_context_ = nullptr;
 #endif
+  Become* become_ = nullptr;
 
 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit)                    \
   type metric_##variable##_;
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 71e5d04..9ad8617 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -178,8 +178,7 @@
       shared_class_table_(shared_class_table),
       mapping_(mapping),
       new_fields_offsets_(new_fields_offsets),
-      before_(zone, 16),
-      after_(zone, 16) {}
+      before_(zone, 16) {}
 
 void InstanceMorpher::AddObject(ObjectPtr object) {
   ASSERT(object->GetClassId() == cid_);
@@ -187,65 +186,65 @@
   before_.Add(&instance);
 }
 
-InstancePtr InstanceMorpher::Morph(const Instance& instance) const {
-  // Code can reference constants / canonical objects either directly in the
-  // instruction stream (ia32) or via an object pool.
-  //
-  // We have the following invariants:
-  //
-  //    a) Those canonical objects don't change state (i.e. are not mutable):
-  //       our optimizer can e.g. execute loads of such constants at
-  //       compile-time.
-  //
-  //       => We ensure that const-classes with live constants cannot be
-  //          reloaded to become non-const classes (see Class::CheckReload).
-  //
-  //    b) Those canonical objects live in old space: e.g. on ia32 the scavenger
-  //       does not make the RX pages writable and therefore cannot update
-  //       pointers embedded in the instruction stream.
-  //
-  // In order to maintain these invariants we ensure to always morph canonical
-  // objects to old space.
-  const bool is_canonical = instance.IsCanonical();
-  const Heap::Space space = is_canonical ? Heap::kOld : Heap::kNew;
-  const auto& result = Instance::Handle(
-      Z, Instance::NewFromCidAndSize(shared_class_table_, cid_, space));
+void InstanceMorpher::CreateMorphedCopies(Become* become) {
+  Instance& after = Instance::Handle(Z);
+  Object& value = Object::Handle(Z);
+  for (intptr_t i = 0; i < before_.length(); i++) {
+    const Instance& before = *before_.At(i);
 
-  // We preserve the canonical bit of the object, since this object is present
-  // in the class's constants.
-  if (is_canonical) {
-    result.SetCanonical();
-  }
+    // Code can reference constants / canonical objects either directly in the
+    // instruction stream (ia32) or via an object pool.
+    //
+    // We have the following invariants:
+    //
+    //    a) Those canonical objects don't change state (i.e. are not mutable):
+    //       our optimizer can e.g. execute loads of such constants at
+    //       compile-time.
+    //
+    //       => We ensure that const-classes with live constants cannot be
+    //          reloaded to become non-const classes (see Class::CheckReload).
+    //
+    //    b) Those canonical objects live in old space: e.g. on ia32 the
+    //       scavenger does not make the RX pages writable and therefore cannot
+    //       update pointers embedded in the instruction stream.
+    //
+    // In order to maintain these invariants we ensure to always morph canonical
+    // objects to old space.
+    const bool is_canonical = before.IsCanonical();
+    const Heap::Space space = is_canonical ? Heap::kOld : Heap::kNew;
+    after = Instance::NewFromCidAndSize(shared_class_table_, cid_, space);
+
+    // We preserve the canonical bit of the object, since this object is present
+    // in the class's constants.
+    if (is_canonical) {
+      after.SetCanonical();
+    }
 #if defined(HASH_IN_OBJECT_HEADER)
-  const uint32_t hash = Object::GetCachedHash(instance.ptr());
-  Object::SetCachedHashIfNotSet(result.ptr(), hash);
+    const uint32_t hash = Object::GetCachedHash(before.ptr());
+    Object::SetCachedHashIfNotSet(after.ptr(), hash);
 #endif
 
-  // Morph the context from instance to result using mapping_.
-  Object& value = Object::Handle(Z);
-  for (intptr_t i = 0; i < mapping_->length(); i += 2) {
-    intptr_t from_offset = mapping_->At(i);
-    intptr_t to_offset = mapping_->At(i + 1);
-    ASSERT(from_offset > 0);
-    ASSERT(to_offset > 0);
-    value = instance.RawGetFieldAtOffset(from_offset);
-    result.RawSetFieldAtOffset(to_offset, value);
-  }
+    // Morph the context from [before] to [after] using mapping_.
+    for (intptr_t i = 0; i < mapping_->length(); i += 2) {
+      intptr_t from_offset = mapping_->At(i);
+      intptr_t to_offset = mapping_->At(i + 1);
+      ASSERT(from_offset > 0);
+      ASSERT(to_offset > 0);
+      value = before.RawGetFieldAtOffset(from_offset);
+      after.RawSetFieldAtOffset(to_offset, value);
+    }
 
-  for (intptr_t i = 0; i < new_fields_offsets_->length(); i++) {
-    const intptr_t field_offset = new_fields_offsets_->At(i);
-    result.RawSetFieldAtOffset(field_offset, Object::sentinel());
-  }
+    for (intptr_t i = 0; i < new_fields_offsets_->length(); i++) {
+      const intptr_t field_offset = new_fields_offsets_->At(i);
+      after.RawSetFieldAtOffset(field_offset, Object::sentinel());
+    }
 
-  // Convert the instance into a filler object.
-  Become::MakeDummyObject(instance);
-  return result.ptr();
-}
+    // Convert the old instance into a filler object. We will switch to the new
+    // class table before the next heap walk, so there must be no instances of
+    // any class with the old size.
+    Become::MakeDummyObject(before);
 
-void InstanceMorpher::CreateMorphedCopies() {
-  for (intptr_t i = 0; i < before_.length(); i++) {
-    const Instance& copy = Instance::Handle(Z, Morph(*before_.At(i)));
-    after_.Add(&copy);
+    become->Add(before, after);
   }
 }
 
@@ -372,34 +371,6 @@
   static uword Hash(const Object& obj) { return Library::Cast(obj).UrlHash(); }
 };
 
-class BecomeMapTraits {
- public:
-  static bool ReportStats() { return false; }
-  static const char* Name() { return "BecomeMapTraits"; }
-
-  static bool IsMatch(const Object& a, const Object& b) {
-    return a.ptr() == b.ptr();
-  }
-
-  static uword Hash(const Object& obj) {
-    if (obj.IsLibrary()) {
-      return Library::Cast(obj).UrlHash();
-    } else if (obj.IsClass()) {
-      return String::HashRawSymbol(Class::Cast(obj).Name());
-    } else if (obj.IsField()) {
-      return String::HashRawSymbol(Field::Cast(obj).name());
-    } else if (obj.IsClosure()) {
-      return String::HashRawSymbol(
-          Function::Handle(Closure::Cast(obj).function()).name());
-    } else if (obj.IsLibraryPrefix()) {
-      return String::HashRawSymbol(LibraryPrefix::Cast(obj).name());
-    } else {
-      FATAL1("Unexpected type in become: %s\n", obj.ToCString());
-    }
-    return 0;
-  }
-};
-
 bool ProgramReloadContext::IsSameClass(const Class& a, const Class& b) {
   // TODO(turnidge): We need to look at generic type arguments for
   // synthetic mixin classes.  Their names are not necessarily unique
@@ -461,8 +432,6 @@
       removed_class_set_storage_(Array::null()),
       old_libraries_set_storage_(Array::null()),
       library_map_storage_(Array::null()),
-      become_map_storage_(Array::null()),
-      become_enum_mappings_(GrowableObjectArray::null()),
       saved_root_library_(Library::null()),
       saved_libraries_(GrowableObjectArray::null()) {
   // NOTE: DO NOT ALLOCATE ANY RAW OBJECTS HERE. The ProgramReloadContext is not
@@ -793,10 +762,7 @@
           // active.
           ASSERT(HasNoTasks(heap));
 
-          const Array& before = Array::Handle(Z, Array::New(count));
-          const Array& after = Array::Handle(Z, Array::New(count));
-
-          MorphInstancesPhase1Allocate(&locator, before, after);
+          MorphInstancesPhase1Allocate(&locator, IG->become());
           {
             // Apply the new class table before "become". Become will replace
             // all the instances of the old size with forwarding corpses, then
@@ -811,7 +777,7 @@
             IG->program_reload_context()->DiscardSavedClassTable(
                 /*is_rollback=*/false);
           }
-          MorphInstancesPhase2Become(before, after);
+          MorphInstancesPhase2Become(IG->become());
 
           discard_class_tables = false;
         }
@@ -1044,10 +1010,6 @@
       HashTables::New<UnorderedHashSet<LibraryMapTraits> >(4);
   library_map_storage_ =
       HashTables::New<UnorderedHashMap<LibraryMapTraits> >(4);
-  become_map_storage_ = HashTables::New<UnorderedHashMap<BecomeMapTraits> >(4);
-  // Keep a separate array for enum mappings to avoid having to invoke
-  // hashCode on the instances.
-  become_enum_mappings_ = GrowableObjectArray::New(Heap::kOld);
 
   // While reloading everything we do must be reversible so that we can abort
   // safely if the reload fails. This function stashes things to the side and
@@ -1639,39 +1601,7 @@
 }
 
 void ProgramReloadContext::CommitAfterInstanceMorphing() {
-  {
-    const GrowableObjectArray& become_enum_mappings =
-        GrowableObjectArray::Handle(become_enum_mappings_);
-    UnorderedHashMap<BecomeMapTraits> become_map(become_map_storage_);
-    intptr_t replacement_count =
-        become_map.NumOccupied() + become_enum_mappings.Length() / 2;
-    const Array& before =
-        Array::Handle(Array::New(replacement_count, Heap::kOld));
-    const Array& after =
-        Array::Handle(Array::New(replacement_count, Heap::kOld));
-    Object& obj = Object::Handle();
-    intptr_t replacement_index = 0;
-    UnorderedHashMap<BecomeMapTraits>::Iterator it(&become_map);
-    while (it.MoveNext()) {
-      const intptr_t entry = it.Current();
-      obj = become_map.GetKey(entry);
-      before.SetAt(replacement_index, obj);
-      obj = become_map.GetPayload(entry, 0);
-      after.SetAt(replacement_index, obj);
-      replacement_index++;
-    }
-    for (intptr_t i = 0; i < become_enum_mappings.Length(); i += 2) {
-      obj = become_enum_mappings.At(i);
-      before.SetAt(replacement_index, obj);
-      obj = become_enum_mappings.At(i + 1);
-      after.SetAt(replacement_index, obj);
-      replacement_index++;
-    }
-    ASSERT(replacement_index == replacement_count);
-    become_map.Release();
-
-    Become::ElementsForwardIdentity(before, after);
-  }
+  become_.Forward();
 
   // Rehash constants map for all classes. Constants are hashed by content, and
   // content may have changed from fields being added or removed.
@@ -1747,8 +1677,7 @@
 
 void IsolateGroupReloadContext::MorphInstancesPhase1Allocate(
     ObjectLocator* locator,
-    const Array& before,
-    const Array& after) {
+    Become* become) {
   ASSERT(HasInstanceMorphers());
 
   if (FLAG_trace_reload) {
@@ -1764,27 +1693,14 @@
             (count > 1) ? "s" : "");
 
   for (intptr_t i = 0; i < instance_morphers_.length(); i++) {
-    instance_morphers_.At(i)->CreateMorphedCopies();
+    instance_morphers_.At(i)->CreateMorphedCopies(become);
   }
-
-  // Create the inputs for Become.
-  intptr_t index = 0;
-  for (intptr_t i = 0; i < instance_morphers_.length(); i++) {
-    InstanceMorpher* morpher = instance_morphers_.At(i);
-    for (intptr_t j = 0; j < morpher->before()->length(); j++) {
-      before.SetAt(index, *morpher->before()->At(j));
-      after.SetAt(index, *morpher->after()->At(j));
-      index++;
-    }
-  }
-  ASSERT(index == count);
 }
 
-void IsolateGroupReloadContext::MorphInstancesPhase2Become(const Array& before,
-                                                           const Array& after) {
+void IsolateGroupReloadContext::MorphInstancesPhase2Become(Become* become) {
   ASSERT(HasInstanceMorphers());
 
-  Become::ElementsForwardIdentity(before, after);
+  become->Forward();
   // The heap now contains only instances with the new size. Ordinary GC is safe
   // again.
 }
@@ -2550,26 +2466,12 @@
                                                  const Field& new_field) {
   ASSERT(old_field.is_static());
   ASSERT(new_field.is_static());
-
   AddBecomeMapping(old_field, new_field);
 }
 
 void ProgramReloadContext::AddBecomeMapping(const Object& old,
                                             const Object& neu) {
-  ASSERT(become_map_storage_ != Array::null());
-  UnorderedHashMap<BecomeMapTraits> become_map(become_map_storage_);
-  bool update = become_map.UpdateOrInsert(old, neu);
-  ASSERT(!update);
-  become_map_storage_ = become_map.Release().ptr();
-}
-
-void ProgramReloadContext::AddEnumBecomeMapping(const Object& old,
-                                                const Object& neu) {
-  const GrowableObjectArray& become_enum_mappings =
-      GrowableObjectArray::Handle(become_enum_mappings_);
-  become_enum_mappings.Add(old);
-  become_enum_mappings.Add(neu);
-  ASSERT((become_enum_mappings.Length() % 2) == 0);
+  become_.Add(old, neu);
 }
 
 void ProgramReloadContext::RebuildDirectSubclasses() {
diff --git a/runtime/vm/isolate_reload.h b/runtime/vm/isolate_reload.h
index 69a399c..939f512 100644
--- a/runtime/vm/isolate_reload.h
+++ b/runtime/vm/isolate_reload.h
@@ -13,6 +13,7 @@
 #include "vm/globals.h"
 #include "vm/growable_array.h"
 #include "vm/hash_map.h"
+#include "vm/heap/become.h"
 #include "vm/log.h"
 #include "vm/object.h"
 
@@ -68,24 +69,15 @@
                   ZoneGrowableArray<intptr_t>* new_fields_offsets);
   virtual ~InstanceMorpher() {}
 
-  // Called on each instance that needs to be morphed.
-  InstancePtr Morph(const Instance& instance) const;
-
   // Adds an object to be morphed.
   void AddObject(ObjectPtr object);
 
   // Create the morphed objects based on the before() list.
-  void CreateMorphedCopies();
+  void CreateMorphedCopies(Become* become);
 
   // Append the morper info to JSON array.
   void AppendTo(JSONArray* array);
 
-  // Returns the list of objects that need to be morphed.
-  const GrowableArray<const Instance*>* before() const { return &before_; }
-
-  // Returns the list of morphed objects (matches order in before()).
-  const GrowableArray<const Instance*>* after() const { return &after_; }
-
   // Returns the cid associated with the from_ and to_ class.
   intptr_t cid() const { return cid_; }
 
@@ -100,7 +92,6 @@
   ZoneGrowableArray<intptr_t>* new_fields_offsets_;
 
   GrowableArray<const Instance*> before_;
-  GrowableArray<const Instance*> after_;
 };
 
 class ReasonForCancelling : public ZoneAllocated {
@@ -220,10 +211,8 @@
 
   void CheckpointSharedClassTable();
 
-  void MorphInstancesPhase1Allocate(ObjectLocator* locator,
-                                    const Array& before,
-                                    const Array& after);
-  void MorphInstancesPhase2Become(const Array& before, const Array& after);
+  void MorphInstancesPhase1Allocate(ObjectLocator* locator, Become* become);
+  void MorphInstancesPhase2Become(Become* become);
 
   void ForEachIsolate(std::function<void(Isolate*)> callback);
 
@@ -401,9 +390,10 @@
                          const Library& original);
   void AddStaticFieldMapping(const Field& old_field, const Field& new_field);
   void AddBecomeMapping(const Object& old, const Object& neu);
-  void AddEnumBecomeMapping(const Object& old, const Object& neu);
   void RebuildDirectSubclasses();
 
+  Become become_;
+
   ObjectPtr* from() {
     return reinterpret_cast<ObjectPtr*>(&old_classes_set_storage_);
   }
@@ -412,8 +402,6 @@
   ArrayPtr removed_class_set_storage_;
   ArrayPtr old_libraries_set_storage_;
   ArrayPtr library_map_storage_;
-  ArrayPtr become_map_storage_;
-  GrowableObjectArrayPtr become_enum_mappings_;
   LibraryPtr saved_root_library_;
   GrowableObjectArrayPtr saved_libraries_;
   ObjectPtr* to() { return reinterpret_cast<ObjectPtr*>(&saved_libraries_); }
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index bff8f7a..0aacc35 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -2211,7 +2211,7 @@
 
   lib = TestCase::ReloadTestScript(kReloadScript);
   EXPECT_VALID(lib);
-  EXPECT_STREQ("Deleted enum value from Fruit true -1",
+  EXPECT_STREQ("Fruit.Deleted enum value from Fruit true -1",
                SimpleInvokeStr(lib, "main"));
 }
 
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index fa1b774..65b7bd5 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 = 70;
-static const uint32_t kMaxSupportedKernelFormatVersion = 70;
+static const uint32_t kMinSupportedKernelFormatVersion = 73;
+static const uint32_t kMaxSupportedKernelFormatVersion = 73;
 
 // 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 4156252..c1df592 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -480,6 +480,7 @@
       const Array& type_definitions,
       char const* library_uri,
       char const* klass,
+      char const* method,
       bool is_static,
       const MallocGrowableArray<char*>* experimental_flags) {
     if (port_ == ILLEGAL_PORT) {
@@ -565,6 +566,14 @@
       class_object.type = Dart_CObject_kNull;
     }
 
+    Dart_CObject method_object;
+    if (method != NULL) {
+      method_object.type = Dart_CObject_kString;
+      method_object.value.as_string = const_cast<char*>(method);
+    } else {
+      method_object.type = Dart_CObject_kNull;
+    }
+
     Dart_CObject is_static_object;
     is_static_object.type = Dart_CObject_kBool;
     is_static_object.value.as_bool = is_static;
@@ -654,6 +663,7 @@
                                    &type_definitions_object,
                                    &library_uri_object,
                                    &class_object,
+                                   &method_object,
                                    &is_static_object,
                                    &dills_object,
                                    &num_blob_loads,
@@ -1133,6 +1143,7 @@
     const Array& type_definitions,
     const char* library_url,
     const char* klass,
+    const char* method,
     bool is_static) {
   Dart_Port kernel_port = WaitForKernelPort();
   if (kernel_port == ILLEGAL_PORT) {
@@ -1147,7 +1158,7 @@
   ASSERT(is_static || (klass != nullptr));
   return request.SendAndWaitForResponse(
       kernel_port, platform_kernel, platform_kernel_size, expression,
-      definitions, type_definitions, library_url, klass, is_static,
+      definitions, type_definitions, library_url, klass, method, is_static,
       experimental_flags_);
 }
 
diff --git a/runtime/vm/kernel_isolate.h b/runtime/vm/kernel_isolate.h
index 2ba4f2c..5880beb 100644
--- a/runtime/vm/kernel_isolate.h
+++ b/runtime/vm/kernel_isolate.h
@@ -75,6 +75,7 @@
       const Array& type_definitions,
       const char* library_url,
       const char* klass,
+      const char* method,
       bool is_static);
 
   static Dart_KernelCompilationResult ListDependencies();
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 3c538f6..6236cf3 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -215,6 +215,8 @@
       potential_pragma_functions_(GrowableObjectArray::Handle(Z)),
       static_field_value_(Object::Handle(Z)),
       pragma_class_(Class::Handle(Z)),
+      pragma_name_field_(Field::Handle(Z)),
+      pragma_options_field_(Field::Handle(Z)),
       name_index_handle_(Smi::Handle(Z)),
       expression_evaluation_library_(Library::Handle(Z)) {
   if (!program->is_single_program()) {
@@ -485,6 +487,8 @@
       potential_pragma_functions_(GrowableObjectArray::Handle(Z)),
       static_field_value_(Object::Handle(Z)),
       pragma_class_(Class::Handle(Z)),
+      pragma_name_field_(Field::Handle(Z)),
+      pragma_options_field_(Field::Handle(Z)),
       name_index_handle_(Smi::Handle(Z)),
       expression_evaluation_library_(Library::Handle(Z)) {
   ASSERT(T.active_class_ == &active_class_);
@@ -524,8 +528,12 @@
 
   // Obtain `dart:_internal::ExternalName.name`.
   EnsureExternalClassIsLookedUp();
+  EnsurePragmaClassIsLookedUp();
+
   Instance& constant = Instance::Handle(Z);
   String& native_name = String::Handle(Z);
+  String& pragma_name = String::Handle(Z);
+  Object& pragma_options = Object::Handle(Z);
 
   // Start scanning all candidates in [potential_natives] for the annotation
   // constant.  If the annotation is found, flag the [Function] as native and
@@ -533,6 +541,7 @@
   Function& function = Function::Handle(Z);
   for (intptr_t i = 0; i < length; ++i) {
     function ^= potential_natives_.At(i);
+
     helper_.SetOffset(function.KernelDataProgramOffset() +
                       function.kernel_offset());
     {
@@ -562,6 +571,22 @@
           function.set_native_name(native_name);
           function.set_is_external(false);
           break;
+        } else if (constant_reader.IsInstanceConstant(constant_table_index,
+                                                      pragma_class_)) {
+          constant = constant_reader.ReadConstant(constant_table_index);
+          ASSERT(constant.clazz() == pragma_class_.ptr());
+          // We found the annotation, let's flag the function as native and
+          // set the native name!
+          pragma_name ^= constant.GetField(pragma_name_field_);
+          if (pragma_name.ptr() == Symbols::vm_external_name().ptr()) {
+            pragma_options = constant.GetField(pragma_options_field_);
+            if (pragma_options.IsString()) {
+              function.set_is_native(true);
+              function.set_native_name(String::Cast(pragma_options));
+              function.set_is_external(false);
+              break;
+            }
+          }
         }
       } else {
         helper_.SkipExpression();
@@ -856,7 +881,8 @@
     SimpleExpressionConverter converter(&H, &helper_);
     const bool has_simple_initializer =
         converter.IsSimple(helper_.ReaderOffset() + 1);
-    if (!has_simple_initializer || !converter.SimpleValue().IsNull()) {
+    if (!has_simple_initializer ||
+        (!field.is_static() && !converter.SimpleValue().IsNull())) {
       field.set_has_nontrivial_initializer(true);
     }
     return;
@@ -1063,6 +1089,19 @@
       helper_.ReadByte();                    // skip flags.
       helper_.SkipTypeParametersList();      // skip type parameter list.
       helper_.SkipDartType();                // skip on-type.
+      Tag tag = helper_.ReadTag();
+      if (tag != kNothing) {
+        helper_.SkipListOfDartTypes();                // skip shown types.
+        helper_.SkipListOfCanonicalNameReferences();  // skip shown members.
+        helper_.SkipListOfCanonicalNameReferences();  // skip shown getters.
+        helper_.SkipListOfCanonicalNameReferences();  // skip shown setters.
+        helper_.SkipListOfCanonicalNameReferences();  // skip shown operators.
+        helper_.SkipListOfDartTypes();                // skip hidden types.
+        helper_.SkipListOfCanonicalNameReferences();  // skip hidden members.
+        helper_.SkipListOfCanonicalNameReferences();  // skip hidden getters.
+        helper_.SkipListOfCanonicalNameReferences();  // skip hidden setters.
+        helper_.SkipListOfCanonicalNameReferences();  // skip hidden operators.
+      }
 
       const intptr_t extension_member_count = helper_.ReadListLength();
       for (intptr_t j = 0; j < extension_member_count; ++j) {
@@ -1091,12 +1130,8 @@
     field_helper.ReadUntilExcluding(FieldHelper::kAnnotations);
     intptr_t annotation_count = helper_.ReadListLength();
     bool has_pragma_annotation;
-    {
-      String& native_name_unused = String::Handle();
-      bool is_potential_native_unused;
-      ReadVMAnnotations(library, annotation_count, &native_name_unused,
-                        &is_potential_native_unused, &has_pragma_annotation);
-    }
+    ReadVMAnnotations(library, annotation_count, /*native_name=*/nullptr,
+                      /*is_potential_native=*/nullptr, &has_pragma_annotation);
     field_helper.SetJustRead(FieldHelper::kAnnotations);
 
     field_helper.ReadUntilExcluding(FieldHelper::kType);
@@ -1387,12 +1422,8 @@
   class_helper.ReadUntilExcluding(ClassHelper::kAnnotations);
   intptr_t annotation_count = helper_.ReadListLength();
   bool has_pragma_annotation = false;
-  {
-    String& native_name_unused = String::Handle(Z);
-    bool is_potential_native_unused = false;
-    ReadVMAnnotations(library, annotation_count, &native_name_unused,
-                      &is_potential_native_unused, &has_pragma_annotation);
-  }
+  ReadVMAnnotations(library, annotation_count, /*native_name=*/nullptr,
+                    /*is_potential_native=*/nullptr, &has_pragma_annotation);
   if (has_pragma_annotation) {
     out_class->set_has_pragma(true);
   }
@@ -1467,12 +1498,9 @@
       field_helper.ReadUntilExcluding(FieldHelper::kAnnotations);
       intptr_t annotation_count = helper_.ReadListLength();
       bool has_pragma_annotation;
-      {
-        String& native_name_unused = String::Handle();
-        bool is_potential_native_unused;
-        ReadVMAnnotations(library, annotation_count, &native_name_unused,
-                          &is_potential_native_unused, &has_pragma_annotation);
-      }
+      ReadVMAnnotations(library, annotation_count, /*native_name=*/nullptr,
+                        /*is_potential_native=*/nullptr,
+                        &has_pragma_annotation);
       field_helper.SetJustRead(FieldHelper::kAnnotations);
 
       field_helper.ReadUntilExcluding(FieldHelper::kType);
@@ -1578,12 +1606,8 @@
     constructor_helper.ReadUntilExcluding(ConstructorHelper::kAnnotations);
     intptr_t annotation_count = helper_.ReadListLength();
     bool has_pragma_annotation;
-    {
-      String& native_name_unused = String::Handle();
-      bool is_potential_native_unused;
-      ReadVMAnnotations(library, annotation_count, &native_name_unused,
-                        &is_potential_native_unused, &has_pragma_annotation);
-    }
+    ReadVMAnnotations(library, annotation_count, /*native_name=*/nullptr,
+                      /*is_potential_native=*/nullptr, &has_pragma_annotation);
     constructor_helper.SetJustRead(ConstructorHelper::kAnnotations);
     constructor_helper.ReadUntilExcluding(ConstructorHelper::kFunction);
 
@@ -1744,21 +1768,33 @@
                                      String* native_name,
                                      bool* is_potential_native,
                                      bool* has_pragma_annotation) {
-  *is_potential_native = false;
+  if (is_potential_native != nullptr) {
+    *is_potential_native = false;
+  }
   *has_pragma_annotation = false;
+  if (annotation_count == 0) {
+    return;
+  }
+
+  const Array& constant_table_array =
+      Array::Handle(Z, kernel_program_info_.constants());
+  const bool have_read_constant_table = !constant_table_array.IsNull();
+
   Instance& constant = Instance::Handle(Z);
+  String& pragma_name = String::Handle(Z);
+  Object& pragma_options = Object::Handle(Z);
   for (intptr_t i = 0; i < annotation_count; ++i) {
     const intptr_t tag = helper_.PeekTag();
     if (tag == kConstantExpression) {
-      const Array& constant_table_array =
-          Array::Handle(kernel_program_info_.constants());
-      if (constant_table_array.IsNull()) {
+      if (!have_read_constant_table) {
         // We can only read in the constant table once all classes have been
         // finalized (otherwise we can't create instances of the classes!).
         //
         // We therefore delay the scanning for `ExternalName {name: ... }`
         // constants in the annotation list to later.
-        *is_potential_native = true;
+        if (is_potential_native != nullptr) {
+          *is_potential_native = true;
+        }
 
         ASSERT(kernel_program_info_.constants_table() !=
                ExternalTypedData::null());
@@ -1825,12 +1861,25 @@
         // ExternalName or Pragma class.
         if (constant_reader.IsInstanceConstant(constant_table_index,
                                                external_name_class_)) {
-          constant = constant_reader.ReadConstant(constant_table_index);
-          ASSERT(constant.clazz() == external_name_class_.ptr());
-          *native_name ^= constant.GetField(external_name_field_);
+          if (native_name != nullptr) {
+            constant = constant_reader.ReadConstant(constant_table_index);
+            ASSERT(constant.clazz() == external_name_class_.ptr());
+            *native_name ^= constant.GetField(external_name_field_);
+          }
         } else if (constant_reader.IsInstanceConstant(constant_table_index,
                                                       pragma_class_)) {
           *has_pragma_annotation = true;
+          if (native_name != nullptr) {
+            constant = constant_reader.ReadConstant(constant_table_index);
+            ASSERT(constant.clazz() == pragma_class_.ptr());
+            pragma_name ^= constant.GetField(pragma_name_field_);
+            if (pragma_name.ptr() == Symbols::vm_external_name().ptr()) {
+              pragma_options = constant.GetField(pragma_options_field_);
+              if (pragma_options.IsString()) {
+                *native_name ^= pragma_options.ptr();
+              }
+            }
+          }
         }
       }
     } else {
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 573711f..68cd64b 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -351,8 +351,12 @@
       const Library& core_lib =
           Library::Handle(zone_, dart::Library::CoreLibrary());
       pragma_class_ = core_lib.LookupLocalClass(Symbols::Pragma());
+      pragma_name_field_ = pragma_class_.LookupField(Symbols::name());
+      pragma_options_field_ = pragma_class_.LookupField(Symbols::options());
     }
     ASSERT(!pragma_class_.IsNull());
+    ASSERT(!pragma_name_field_.IsNull());
+    ASSERT(!pragma_options_field_.IsNull());
     ASSERT(pragma_class_.is_declaration_loaded());
   }
 
@@ -404,6 +408,8 @@
   Object& static_field_value_;
 
   Class& pragma_class_;
+  Field& pragma_name_field_;
+  Field& pragma_options_field_;
 
   Smi& name_index_handle_;
 
diff --git a/runtime/vm/log.cc b/runtime/vm/log.cc
index 998ff60..809df77 100644
--- a/runtime/vm/log.cc
+++ b/runtime/vm/log.cc
@@ -4,6 +4,7 @@
 
 #include "vm/log.h"
 
+#include "vm/dart.h"
 #include "vm/flags.h"
 #include "vm/isolate.h"
 #include "vm/thread.h"
@@ -28,8 +29,43 @@
             "Default: service isolate log messages are suppressed "
             "(specify 'vm-service' to log them).");
 
-Log::Log(LogPrinter printer)
-    : printer_(printer), manual_flush_(0), buffer_(0) {}
+DEFINE_FLAG(charp,
+            redirect_isolate_log_to,
+            nullptr,
+            "Log isolate messages into the given file.");
+
+namespace {
+class LogFile {
+ public:
+  static const LogFile& Instance() {
+    static LogFile log_file;
+    return log_file;
+  }
+
+  static void Print(const char* data) {
+    Dart::file_write_callback()(data, strlen(data), Instance().handle_);
+  }
+
+ private:
+  LogFile()
+      : handle_(Dart::file_open_callback()(FLAG_redirect_isolate_log_to,
+                                           /*write=*/true)) {}
+
+  ~LogFile() { Dart::file_close_callback()(handle_); }
+
+  void* handle_;
+};
+}  // namespace
+
+Log::Log(LogPrinter printer) : printer_(printer), manual_flush_(0), buffer_(0) {
+  if (printer_ == nullptr) {
+    if (FLAG_redirect_isolate_log_to == nullptr) {
+      printer_ = [](const char* data) { OS::PrintErr("%s", data); };
+    } else {
+      printer_ = &LogFile::Print;
+    }
+  }
+}
 
 Log::~Log() {
   // Did someone enable manual flushing and then forgot to Flush?
@@ -108,7 +144,7 @@
   TerminateString();
   const char* str = &buffer_[cursor];
   ASSERT(str != nullptr);
-  printer_("%s", str);
+  printer_(str);
   buffer_.TruncateTo(cursor);
 }
 
@@ -172,6 +208,13 @@
 }
 
 bool Log::ShouldFlush() const {
+#ifdef DART_TARGET_OS_ANDROID
+  // Android truncates on 1023 characters, flush more eagerly.
+  // Flush on newlines, because otherwise Android inserts newlines everywhere.
+  if (*(buffer_.end() - 1) == '\n') {
+    return true;
+  }
+#endif  // DART_TARGET_OS_ANDROID
   return ((manual_flush_ == 0) || FLAG_force_log_flush ||
           ((FLAG_force_log_flush_at_size > 0) &&
            (cursor() > FLAG_force_log_flush_at_size)));
diff --git a/runtime/vm/log.h b/runtime/vm/log.h
index f96c5ea..18c71e4 100644
--- a/runtime/vm/log.h
+++ b/runtime/vm/log.h
@@ -22,11 +22,11 @@
 
 #define THR_VPrint(format, args) Log::Current()->VPrint(format, args)
 
-typedef void (*LogPrinter)(const char* str, ...) PRINTF_ATTRIBUTE(1, 2);
+typedef void (*LogPrinter)(const char* data);
 
 class Log {
  public:
-  explicit Log(LogPrinter printer = OS::PrintErr);
+  explicit Log(LogPrinter printer = nullptr);
   ~Log();
 
   static Log* Current();
diff --git a/runtime/vm/log_test.cc b/runtime/vm/log_test.cc
index 6a926bb..d4d2864 100644
--- a/runtime/vm/log_test.cc
+++ b/runtime/vm/log_test.cc
@@ -18,26 +18,12 @@
 
 static const char* test_output_ = NULL;
 
-PRINTF_ATTRIBUTE(1, 2)
-static void TestPrinter(const char* format, ...) {
-  // Measure.
-  va_list args;
-  va_start(args, format);
-  intptr_t len = Utils::VSNPrint(NULL, 0, format, args);
-  va_end(args);
-
-  // Print string to buffer.
-  char* buffer = reinterpret_cast<char*>(malloc(len + 1));
-  va_list args2;
-  va_start(args2, format);
-  Utils::VSNPrint(buffer, (len + 1), format, args2);
-  va_end(args2);
-
+static void TestPrinter(const char* buffer) {
   if (test_output_ != NULL) {
     free(const_cast<char*>(test_output_));
     test_output_ = NULL;
   }
-  test_output_ = buffer;
+  test_output_ = strdup(buffer);
 
   // Also print to stdout to see the overall result.
   OS::PrintErr("%s", test_output_);
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index c778dc7..e789ecf 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -36,13 +36,6 @@
   Thread* thread = Thread::Current();
   DEBUG_ASSERT(thread->TopErrorHandlerIsSetJump());
 
-#if defined(DEBUG)
-#define CHECK_REUSABLE_HANDLE(name)                                            \
-  ASSERT(!thread->reusable_##name##_handle_scope_active());
-  REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE)
-#undef CHECK_REUSABLE_HANDLE
-#endif  // defined(DEBUG)
-
   // Destruct all the active StackResource objects.
   StackResource::UnwindAbove(thread, top_);
   longjmp(environment_, value);
diff --git a/runtime/vm/longjump.h b/runtime/vm/longjump.h
index c551584..60f514b 100644
--- a/runtime/vm/longjump.h
+++ b/runtime/vm/longjump.h
@@ -16,11 +16,9 @@
 
 class LongJumpScope : public StackResource {
  public:
-  LongJumpScope()
-      : StackResource(ThreadState::Current()),
-        top_(nullptr),
-        base_(thread()->long_jump_base()) {
-    thread()->set_long_jump_base(this);
+  explicit LongJumpScope(ThreadState* thread = ThreadState::Current())
+      : StackResource(thread), top_(nullptr), base_(thread->long_jump_base()) {
+    thread->set_long_jump_base(this);
   }
 
   ~LongJumpScope() {
diff --git a/runtime/vm/message_snapshot.cc b/runtime/vm/message_snapshot.cc
index b2ff598..ac2eef3 100644
--- a/runtime/vm/message_snapshot.cc
+++ b/runtime/vm/message_snapshot.cc
@@ -2450,10 +2450,16 @@
 class LinkedHashMapMessageSerializationCluster
     : public MessageSerializationCluster {
  public:
-  LinkedHashMapMessageSerializationCluster()
+  LinkedHashMapMessageSerializationCluster(Zone* zone,
+                                           bool is_canonical,
+                                           intptr_t cid)
       : MessageSerializationCluster("LinkedHashMap",
-                                    MessagePhase::kNonCanonicalInstances,
-                                    kLinkedHashMapCid) {}
+                                    is_canonical
+                                        ? MessagePhase::kCanonicalInstances
+                                        : MessagePhase::kNonCanonicalInstances,
+                                    cid,
+                                    is_canonical),
+        objects_(zone, 0) {}
   ~LinkedHashMapMessageSerializationCluster() {}
 
   void Trace(MessageSerializer* s, Object* object) {
@@ -2491,14 +2497,15 @@
 class LinkedHashMapMessageDeserializationCluster
     : public MessageDeserializationCluster {
  public:
-  explicit LinkedHashMapMessageDeserializationCluster(bool is_canonical)
-      : MessageDeserializationCluster("LinkedHashMap", is_canonical) {}
+  LinkedHashMapMessageDeserializationCluster(bool is_canonical, intptr_t cid)
+      : MessageDeserializationCluster("LinkedHashMap", is_canonical),
+        cid_(cid) {}
   ~LinkedHashMapMessageDeserializationCluster() {}
 
   void ReadNodes(MessageDeserializer* d) {
     intptr_t count = d->ReadUnsigned();
     for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(LinkedHashMap::NewUninitialized());
+      d->AssignRef(LinkedHashMap::NewUninitialized(cid_));
     }
   }
 
@@ -2514,16 +2521,41 @@
     }
   }
 
-  ObjectPtr PostLoad(MessageDeserializer* d) { return PostLoadLinkedHash(d); }
+  ObjectPtr PostLoad(MessageDeserializer* d) {
+    if (!is_canonical()) {
+      ASSERT(cid_ == kLinkedHashMapCid);
+      return PostLoadLinkedHash(d);
+    }
+
+    ASSERT(cid_ == kImmutableLinkedHashMapCid);
+    SafepointMutexLocker ml(
+        d->isolate_group()->constant_canonicalization_mutex());
+    LinkedHashMap& instance = LinkedHashMap::Handle(d->zone());
+    for (intptr_t i = start_index_; i < stop_index_; i++) {
+      instance ^= d->Ref(i);
+      instance ^= instance.CanonicalizeLocked(d->thread());
+      d->UpdateRef(i, instance);
+    }
+    return nullptr;
+  }
+
+ private:
+  const intptr_t cid_;
 };
 
 class LinkedHashSetMessageSerializationCluster
     : public MessageSerializationCluster {
  public:
-  LinkedHashSetMessageSerializationCluster()
+  LinkedHashSetMessageSerializationCluster(Zone* zone,
+                                           bool is_canonical,
+                                           intptr_t cid)
       : MessageSerializationCluster("LinkedHashSet",
-                                    MessagePhase::kNonCanonicalInstances,
-                                    kLinkedHashSetCid) {}
+                                    is_canonical
+                                        ? MessagePhase::kCanonicalInstances
+                                        : MessagePhase::kNonCanonicalInstances,
+                                    cid,
+                                    is_canonical),
+        objects_(zone, 0) {}
   ~LinkedHashSetMessageSerializationCluster() {}
 
   void Trace(MessageSerializer* s, Object* object) {
@@ -2561,14 +2593,15 @@
 class LinkedHashSetMessageDeserializationCluster
     : public MessageDeserializationCluster {
  public:
-  explicit LinkedHashSetMessageDeserializationCluster(bool is_canonical)
-      : MessageDeserializationCluster("LinkedHashSet", is_canonical) {}
+  LinkedHashSetMessageDeserializationCluster(bool is_canonical, intptr_t cid)
+      : MessageDeserializationCluster("LinkedHashSet", is_canonical),
+        cid_(cid) {}
   ~LinkedHashSetMessageDeserializationCluster() {}
 
   void ReadNodes(MessageDeserializer* d) {
     intptr_t count = d->ReadUnsigned();
     for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(LinkedHashSet::NewUninitialized());
+      d->AssignRef(LinkedHashSet::NewUninitialized(cid_));
     }
   }
 
@@ -2584,7 +2617,26 @@
     }
   }
 
-  ObjectPtr PostLoad(MessageDeserializer* d) { return PostLoadLinkedHash(d); }
+  ObjectPtr PostLoad(MessageDeserializer* d) {
+    if (!is_canonical()) {
+      ASSERT(cid_ == kLinkedHashSetCid);
+      return PostLoadLinkedHash(d);
+    }
+
+    ASSERT(cid_ == kImmutableLinkedHashSetCid);
+    SafepointMutexLocker ml(
+        d->isolate_group()->constant_canonicalization_mutex());
+    LinkedHashSet& instance = LinkedHashSet::Handle(d->zone());
+    for (intptr_t i = start_index_; i < stop_index_; i++) {
+      instance ^= d->Ref(i);
+      instance ^= instance.CanonicalizeLocked(d->thread());
+      d->UpdateRef(i, instance);
+    }
+    return nullptr;
+  }
+
+ private:
+  const intptr_t cid_;
 };
 
 class ArrayMessageSerializationCluster : public MessageSerializationCluster {
@@ -3076,8 +3128,6 @@
     // here that cannot happen in reality)
     ILLEGAL(DynamicLibrary)
     ILLEGAL(Pointer)
-    ILLEGAL(FfiDynamicLibrary)
-    ILLEGAL(FfiPointer)
 
 #undef ILLEGAL
 
@@ -3112,6 +3162,7 @@
       cid = kDoubleCid;
       break;
     case Dart_CObject_kString: {
+      RELEASE_ASSERT(object->value.as_string != NULL);
       const uint8_t* utf8_str =
           reinterpret_cast<const uint8_t*>(object->value.as_string);
       intptr_t utf8_len = strlen(object->value.as_string);
@@ -3336,9 +3387,13 @@
       ephemeron_cluster_ = new (Z) WeakPropertyMessageSerializationCluster();
       return ephemeron_cluster_;
     case kLinkedHashMapCid:
-      return new (Z) LinkedHashMapMessageSerializationCluster();
+    case kImmutableLinkedHashMapCid:
+      return new (Z)
+          LinkedHashMapMessageSerializationCluster(Z, is_canonical, cid);
     case kLinkedHashSetCid:
-      return new (Z) LinkedHashSetMessageSerializationCluster();
+    case kImmutableLinkedHashSetCid:
+      return new (Z)
+          LinkedHashSetMessageSerializationCluster(Z, is_canonical, cid);
     case kArrayCid:
     case kImmutableArrayCid:
       return new (Z) ArrayMessageSerializationCluster(Z, is_canonical, cid);
@@ -3431,9 +3486,13 @@
       ASSERT(!is_canonical);
       return new (Z) WeakPropertyMessageDeserializationCluster();
     case kLinkedHashMapCid:
-      return new (Z) LinkedHashMapMessageDeserializationCluster(is_canonical);
+    case kImmutableLinkedHashMapCid:
+      return new (Z)
+          LinkedHashMapMessageDeserializationCluster(is_canonical, cid);
     case kLinkedHashSetCid:
-      return new (Z) LinkedHashSetMessageDeserializationCluster(is_canonical);
+    case kImmutableLinkedHashSetCid:
+      return new (Z)
+          LinkedHashSetMessageDeserializationCluster(is_canonical, cid);
     case kArrayCid:
     case kImmutableArrayCid:
       return new (Z) ArrayMessageDeserializationCluster(is_canonical, cid);
@@ -3686,7 +3745,7 @@
 
   volatile bool has_exception = false;
   {
-    LongJumpScope jump;
+    LongJumpScope jump(thread);
     if (setjmp(*jump.Set()) == 0) {
       serializer.Serialize(obj);
     } else {
@@ -3761,8 +3820,13 @@
     return ReadObjectGraphCopyMessage(thread, message->persistent_handle());
   } else {
     RELEASE_ASSERT(message->IsSnapshot());
-    MessageDeserializer deserializer(thread, message);
-    return deserializer.Deserialize();
+    LongJumpScope jump(thread);
+    if (setjmp(*jump.Set()) == 0) {
+      MessageDeserializer deserializer(thread, message);
+      return deserializer.Deserialize();
+    } else {
+      return thread->StealStickyError();
+    }
   }
 }
 
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8344d4b..d793156 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -662,12 +662,12 @@
 
   {
     Pointer fake_handle;
-    builtin_vtables_[kFfiPointerCid] = fake_handle.vtable();
+    builtin_vtables_[kPointerCid] = fake_handle.vtable();
   }
 
   {
     DynamicLibrary fake_handle;
-    builtin_vtables_[kFfiDynamicLibraryCid] = fake_handle.vtable();
+    builtin_vtables_[kDynamicLibraryCid] = fake_handle.vtable();
   }
 
 #define INIT_VTABLE(clazz)                                                     \
@@ -1177,7 +1177,7 @@
       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);
+      LanguageError::New(error_str, Report::kError, Heap::kOld);
 
   // Allocate the parameter arrays for method extractor types and names.
   *extractor_parameter_types_ = Array::New(1, Heap::kOld);
@@ -1191,7 +1191,6 @@
   // Some thread fields need to be reinitialized as null constants have not been
   // initialized until now.
   thread->ClearStickyError();
-  thread->clear_pending_functions();
 
   ASSERT(!null_object_->IsSmi());
   ASSERT(!null_class_->IsSmi());
@@ -1658,10 +1657,11 @@
     object_store->set_array_class(cls);
 
     // VM classes that are parameterized (Array, ImmutableArray,
-    // GrowableObjectArray, and LinkedHashMap) are also pre-finalized, so
-    // CalculateFieldOffsets() is not called, so we need to set the offset of
-    // their type_arguments_ field, which is explicitly declared in their
-    // respective Raw* classes.
+    // GrowableObjectArray, LinkedHashMap, ImmutableLinkedHashMap,
+    // LinkedHashSet, ImmutableLinkedHashSet) are also pre-finalized, so
+    // CalculateFieldOffsets() is not called, so we need to set the offset
+    // of their type_arguments_ field, which is explicitly
+    // declared in their respective Raw* classes.
     cls.set_type_arguments_field_offset(Array::type_arguments_offset(),
                                         RTN::Array::type_arguments_offset());
     cls.set_num_type_arguments_unsafe(1);
@@ -1756,10 +1756,6 @@
     type.SetIsFinalized();
     type ^= type.Canonicalize(thread, nullptr);
     object_store->set_array_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_array_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_array_type(type);
 
     cls = object_store->growable_object_array_class();  // Was allocated above.
     RegisterPrivateClass(cls, Symbols::_GrowableList(), core_lib);
@@ -1965,6 +1961,17 @@
     RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib);
     pending_classes.Add(cls);
 
+    cls = Class::New<LinkedHashMap, RTN::LinkedHashMap>(
+        kImmutableLinkedHashMapCid, isolate_group);
+    object_store->set_immutable_linked_hash_map_class(cls);
+    cls.set_type_arguments_field_offset(
+        LinkedHashMap::type_arguments_offset(),
+        RTN::LinkedHashMap::type_arguments_offset());
+    cls.set_num_type_arguments_unsafe(2);
+    cls.set_is_prefinalized();
+    RegisterPrivateClass(cls, Symbols::_ImmutableLinkedHashMap(), lib);
+    pending_classes.Add(cls);
+
     cls = Class::New<LinkedHashSet, RTN::LinkedHashSet>(isolate_group);
     object_store->set_linked_hash_set_class(cls);
     cls.set_type_arguments_field_offset(
@@ -1974,6 +1981,17 @@
     RegisterPrivateClass(cls, Symbols::_LinkedHashSet(), lib);
     pending_classes.Add(cls);
 
+    cls = Class::New<LinkedHashSet, RTN::LinkedHashSet>(
+        kImmutableLinkedHashSetCid, isolate_group);
+    object_store->set_immutable_linked_hash_set_class(cls);
+    cls.set_type_arguments_field_offset(
+        LinkedHashSet::type_arguments_offset(),
+        RTN::LinkedHashSet::type_arguments_offset());
+    cls.set_num_type_arguments_unsafe(1);
+    cls.set_is_prefinalized();
+    RegisterPrivateClass(cls, Symbols::_ImmutableLinkedHashSet(), lib);
+    pending_classes.Add(cls);
+
     // Pre-register the async library so we can place the vm class
     // FutureOr there rather than the core library.
     lib = Library::LookupLibrary(thread, Symbols::DartAsync());
@@ -2127,20 +2145,12 @@
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
     object_store->set_function_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_function_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_function_type(type);
 
     cls = Class::New<Number, RTN::Number>(isolate_group);
     RegisterClass(cls, Symbols::Number(), core_lib);
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
     object_store->set_number_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_number_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_number_type(type);
 
     cls = Class::New<Instance, RTN::Instance>(kIllegalCid, isolate_group,
                                               /*register_class=*/true,
@@ -2167,10 +2177,6 @@
     pending_classes.Add(cls);
     type = Type::NewNonParameterizedType(cls);
     object_store->set_double_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_double_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_double_type(type);
     type = type.ToNullability(Nullability::kNullable, Heap::kOld);
     object_store->set_nullable_double_type(type);
 
@@ -2186,32 +2192,19 @@
     object_store->set_string_type(type);
     type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
     object_store->set_legacy_string_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_string_type(type);
 
     cls = object_store->bool_class();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_bool_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_bool_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_bool_type(type);
 
     cls = object_store->smi_class();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_smi_type(type);
     type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_smi_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_smi_type(type);
 
     cls = object_store->mint_class();
     type = Type::NewNonParameterizedType(cls);
     object_store->set_mint_type(type);
-    type = type.ToNullability(Nullability::kLegacy, Heap::kOld);
-    object_store->set_legacy_mint_type(type);
-    type = type.ToNullability(Nullability::kNonNullable, Heap::kOld);
-    object_store->set_non_nullable_mint_type(type);
 
     // The classes 'void' and 'dynamic' are phony classes to make type checking
     // more regular; they live in the VM isolate. The class 'void' is not
@@ -2251,27 +2244,12 @@
     type_args.SetTypeAt(0, type);
     type_args = type_args.Canonicalize(thread, nullptr);
     object_store->set_type_argument_legacy_int(type_args);
-    type_args = TypeArguments::New(1);
-    type = object_store->non_nullable_int_type();
-    type_args.SetTypeAt(0, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_non_nullable_int(type_args);
 
     type_args = TypeArguments::New(1);
     type = object_store->double_type();
     type_args.SetTypeAt(0, type);
     type_args = type_args.Canonicalize(thread, nullptr);
     object_store->set_type_argument_double(type_args);
-    type_args = TypeArguments::New(1);
-    type = object_store->legacy_double_type();
-    type_args.SetTypeAt(0, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_legacy_double(type_args);
-    type_args = TypeArguments::New(1);
-    type = object_store->non_nullable_double_type();
-    type_args.SetTypeAt(0, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_non_nullable_double(type_args);
 
     type_args = TypeArguments::New(1);
     type = object_store->string_type();
@@ -2283,11 +2261,6 @@
     type_args.SetTypeAt(0, type);
     type_args = type_args.Canonicalize(thread, nullptr);
     object_store->set_type_argument_legacy_string(type_args);
-    type_args = TypeArguments::New(1);
-    type = object_store->non_nullable_string_type();
-    type_args.SetTypeAt(0, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_non_nullable_string(type_args);
 
     type_args = TypeArguments::New(2);
     type = object_store->string_type();
@@ -2295,18 +2268,6 @@
     type_args.SetTypeAt(1, Object::dynamic_type());
     type_args = type_args.Canonicalize(thread, nullptr);
     object_store->set_type_argument_string_dynamic(type_args);
-    type_args = TypeArguments::New(2);
-    type = object_store->legacy_string_type();
-    type_args.SetTypeAt(0, type);
-    type_args.SetTypeAt(1, Object::dynamic_type());
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_legacy_string_dynamic(type_args);
-    type_args = TypeArguments::New(2);
-    type = object_store->non_nullable_string_type();
-    type_args.SetTypeAt(0, type);
-    type_args.SetTypeAt(1, Object::dynamic_type());
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_non_nullable_string_dynamic(type_args);
 
     type_args = TypeArguments::New(2);
     type = object_store->string_type();
@@ -2314,19 +2275,6 @@
     type_args.SetTypeAt(1, type);
     type_args = type_args.Canonicalize(thread, nullptr);
     object_store->set_type_argument_string_string(type_args);
-    type_args = TypeArguments::New(2);
-    type = object_store->legacy_string_type();
-    type_args.SetTypeAt(0, type);
-    type_args.SetTypeAt(1, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_legacy_string_legacy_string(type_args);
-    type_args = TypeArguments::New(2);
-    type = object_store->non_nullable_string_type();
-    type_args.SetTypeAt(0, type);
-    type_args.SetTypeAt(1, type);
-    type_args = type_args.Canonicalize(thread, nullptr);
-    object_store->set_type_argument_non_nullable_string_non_nullable_string(
-        type_args);
 
     lib = Library::LookupLibrary(thread, Symbols::DartFfi());
     if (lib.IsNull()) {
@@ -2361,12 +2309,12 @@
     pending_classes.Add(cls);
     RegisterClass(cls, Symbols::FfiNativeFunction(), lib);
 
-    cls = Class::NewPointerClass(kFfiPointerCid, isolate_group);
+    cls = Class::NewPointerClass(kPointerCid, isolate_group);
     object_store->set_ffi_pointer_class(cls);
     pending_classes.Add(cls);
     RegisterClass(cls, Symbols::FfiPointer(), lib);
 
-    cls = Class::New<DynamicLibrary, RTN::DynamicLibrary>(kFfiDynamicLibraryCid,
+    cls = Class::New<DynamicLibrary, RTN::DynamicLibrary>(kDynamicLibraryCid,
                                                           isolate_group);
     cls.set_instance_size(DynamicLibrary::InstanceSize(),
                           compiler::target::RoundedAllocationSize(
@@ -2438,9 +2386,17 @@
     cls = Class::New<LinkedHashMap, RTN::LinkedHashMap>(isolate_group);
     object_store->set_linked_hash_map_class(cls);
 
+    cls = Class::New<LinkedHashMap, RTN::LinkedHashMap>(
+        kImmutableLinkedHashMapCid, isolate_group);
+    object_store->set_immutable_linked_hash_map_class(cls);
+
     cls = Class::New<LinkedHashSet, RTN::LinkedHashSet>(isolate_group);
     object_store->set_linked_hash_set_class(cls);
 
+    cls = Class::New<LinkedHashSet, RTN::LinkedHashSet>(
+        kImmutableLinkedHashSetCid, isolate_group);
+    object_store->set_immutable_linked_hash_set_class(cls);
+
     cls = Class::New<Float32x4, RTN::Float32x4>(isolate_group);
     object_store->set_float32x4_class(cls);
 
@@ -2476,10 +2432,10 @@
     cls = Class::New<Instance, RTN::Instance>(kFfiNativeFunctionCid,
                                               isolate_group);
 
-    cls = Class::NewPointerClass(kFfiPointerCid, isolate_group);
+    cls = Class::NewPointerClass(kPointerCid, isolate_group);
     object_store->set_ffi_pointer_class(cls);
 
-    cls = Class::New<DynamicLibrary, RTN::DynamicLibrary>(kFfiDynamicLibraryCid,
+    cls = Class::New<DynamicLibrary, RTN::DynamicLibrary>(kDynamicLibraryCid,
                                                           isolate_group);
 
     cls = Class::New<Instance, RTN::Instance>(kByteBufferCid, isolate_group,
@@ -2683,9 +2639,7 @@
     } else if (thread->top_exit_frame_info() != 0) {
       // Use the preallocated out of memory exception to avoid calling
       // into dart code or allocating any code.
-      const Instance& exception = Instance::Handle(
-          thread->isolate_group()->object_store()->out_of_memory());
-      Exceptions::Throw(thread, exception);
+      Exceptions::ThrowOOM();
       UNREACHABLE();
     } else {
       // Nowhere to propagate an exception to.
@@ -2806,6 +2760,11 @@
             size - kHeaderSizeInBytes);
   }
 
+  if (IsTypedDataClassId(raw_clone->GetClassId())) {
+    auto raw_typed_data = TypedData::RawCast(raw_clone);
+    raw_typed_data.untag()->RecomputeDataField();
+  }
+
   // Add clone to store buffer, if needed.
   if (!raw_clone->IsOldObject()) {
     // No need to remember an object in new space.
@@ -2819,12 +2778,6 @@
 bool Class::HasCompressedPointers() const {
   const intptr_t cid = id();
   switch (cid) {
-    // Only a couple of FFI cids correspond to actual Dart classes. so they're
-    // explicitly listed here.
-    case kFfiPointerCid:
-      return Pointer::ContainsCompressedPointers();
-    case kFfiDynamicLibraryCid:
-      return DynamicLibrary::ContainsCompressedPointers();
     case kByteBufferCid:
       return ByteBuffer::ContainsCompressedPointers();
 #define HANDLE_CASE(clazz)                                                     \
@@ -4631,6 +4584,9 @@
                   CLASS_LIST_TYPED_DATA(ADD_SET_FIELD)
 #undef ADD_SET_FIELD
 #undef CLASS_LIST_WITH_NULL
+      // Used in const hashing to determine whether we're dealing with a
+      // user-defined const. See lib/_internal/vm/lib/compact_hash.dart.
+      {"numPredefinedCids", kNumPredefinedCids},
   };
 
   const AbstractType& field_type = Type::Handle(zone, Type::IntType());
@@ -4958,9 +4914,9 @@
     case kExternalTypedDataFloat64ArrayCid:
       return Symbols::Float64List().ToCString();
 
-    case kFfiPointerCid:
+    case kPointerCid:
       return Symbols::FfiPointer().ToCString();
-    case kFfiDynamicLibraryCid:
+    case kDynamicLibraryCid:
       return Symbols::FfiDynamicLibrary().ToCString();
 
 #if !defined(PRODUCT)
@@ -6056,6 +6012,7 @@
 
 InstancePtr Class::InsertCanonicalConstant(Zone* zone,
                                            const Instance& constant) const {
+  ASSERT(constant.IsCanonical());
   ASSERT(this->ptr() == constant.clazz());
   Instance& canonical_value = Instance::Handle(zone);
   if (this->constants() == Array::null()) {
@@ -6878,7 +6835,7 @@
     intptr_t num_free_fun_type_params,
     Heap::Space space,
     TrailPtr trail) const {
-  ASSERT(!IsInstantiated(kAny, num_free_fun_type_params));
+  ASSERT(!IsInstantiated());
   if ((instantiator_type_arguments.IsNull() ||
        instantiator_type_arguments.Length() == Length()) &&
       IsUninstantiatedIdentity()) {
@@ -6896,8 +6853,7 @@
     // during finalization of V, which is also the instantiator. T depends
     // solely on the type parameters of A and will be replaced by a non-null
     // type before A is marked as finalized.
-    if (!type.IsNull() &&
-        !type.IsInstantiated(kAny, num_free_fun_type_params)) {
+    if (!type.IsNull() && !type.IsInstantiated()) {
       type = type.InstantiateFrom(instantiator_type_arguments,
                                   function_type_arguments,
                                   num_free_fun_type_params, space, trail);
@@ -8812,16 +8768,14 @@
       sig_type_params.set_flags(Array::Handle(zone, type_params.flags()));
       TypeArguments& type_args = TypeArguments::Handle(zone);
       type_args = type_params.bounds();
-      if (!type_args.IsNull() &&
-          !type_args.IsInstantiated(kAny, num_free_fun_type_params)) {
+      if (!type_args.IsNull() && !type_args.IsInstantiated()) {
         type_args = type_args.InstantiateFrom(
             instantiator_type_arguments, function_type_arguments,
             num_free_fun_type_params, space, trail);
       }
       sig_type_params.set_bounds(type_args);
       type_args = type_params.defaults();
-      if (!type_args.IsNull() &&
-          !type_args.IsInstantiated(kAny, num_free_fun_type_params)) {
+      if (!type_args.IsNull() && !type_args.IsInstantiated()) {
         type_args = type_args.InstantiateFrom(
             instantiator_type_arguments, function_type_arguments,
             num_free_fun_type_params, space, trail);
@@ -8832,7 +8786,7 @@
   }
 
   type = result_type();
-  if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
+  if (!type.IsInstantiated()) {
     type = type.InstantiateFrom(instantiator_type_arguments,
                                 function_type_arguments,
                                 num_free_fun_type_params, space, trail);
@@ -8851,7 +8805,7 @@
   sig.set_parameter_types(Array::Handle(Array::New(num_params, space)));
   for (intptr_t i = 0; i < num_params; i++) {
     type = ParameterTypeAt(i);
-    if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
+    if (!type.IsInstantiated()) {
       type = type.InstantiateFrom(instantiator_type_arguments,
                                   function_type_arguments,
                                   num_free_fun_type_params, space, trail);
@@ -10133,6 +10087,10 @@
   const Object& result =
       Object::Handle(zone, Compiler::CompileFunction(thread, *this));
   if (result.IsError()) {
+    if (result.ptr() == Object::out_of_memory_error().ptr()) {
+      Exceptions::ThrowOOM();
+      UNREACHABLE();
+    }
     if (result.IsLanguageError()) {
       Exceptions::ThrowCompileTimeError(LanguageError::Cast(result));
       UNREACHABLE();
@@ -10141,7 +10099,7 @@
     UNREACHABLE();
   }
   // Compiling in unoptimized mode should never fail if there are no errors.
-  ASSERT(HasCode());
+  RELEASE_ASSERT(HasCode());
   ASSERT(ForceOptimize() || unoptimized_code() == result.ptr());
   return CurrentCode();
 }
@@ -10911,8 +10869,9 @@
 void Field::set_guarded_list_length_in_object_offset_unsafe(
     intptr_t list_length_offset) const {
   ASSERT(IsOriginal());
-  StoreNonPointer(&untag()->guarded_list_length_in_object_offset_,
-                  static_cast<int8_t>(list_length_offset - kHeapObjectTag));
+  StoreNonPointer<int8_t, int8_t, std::memory_order_relaxed>(
+      &untag()->guarded_list_length_in_object_offset_,
+      static_cast<int8_t>(list_length_offset - kHeapObjectTag));
   ASSERT(guarded_list_length_in_object_offset() == list_length_offset);
 }
 
@@ -11212,7 +11171,8 @@
 }
 
 ObjectPtr Field::StaticConstFieldValue() const {
-  ASSERT(is_static() && is_const());
+  ASSERT(is_static() &&
+         (is_const() || (is_final() && has_trivial_initializer())));
 
   auto thread = Thread::Current();
   auto zone = thread->zone();
@@ -11223,7 +11183,11 @@
   auto& value = Object::Handle(
       zone, initial_field_table->At(field_id(), /*concurrent_use=*/true));
   if (value.ptr() == Object::sentinel().ptr()) {
+    // Fields with trivial initializers get their initial value
+    // eagerly when they are registered.
+    ASSERT(is_const());
     ASSERT(has_initializer());
+    ASSERT(has_nontrivial_initializer());
     value = EvaluateInitializer();
     if (!value.IsError()) {
       ASSERT(value.IsNull() || value.IsInstance());
@@ -13902,10 +13866,6 @@
   return IsolateGroup::Current()->object_store()->native_wrappers_library();
 }
 
-LibraryPtr Library::ProfilerLibrary() {
-  return IsolateGroup::Current()->object_store()->profiler_library();
-}
-
 LibraryPtr Library::TypedDataLibrary() {
   return IsolateGroup::Current()->object_store()->typed_data_library();
 }
@@ -15570,6 +15530,7 @@
 
 void CallSiteData::set_target_name(const String& value) const {
   ASSERT(!value.IsNull());
+  ASSERT(value.IsCanonical());
   untag()->set_target_name(value.ptr());
 }
 
@@ -15610,15 +15571,17 @@
 #endif
 }
 
+uword ICData::Hash() const {
+  return String::HashRawSymbol(target_name()) ^ deopt_id();
+}
+
 const char* ICData::ToCString() const {
   Zone* zone = Thread::Current()->zone();
   const String& name = String::Handle(zone, target_name());
-  const intptr_t num_args = NumArgsTested();
-  const intptr_t num_checks = NumberOfChecks();
-  const intptr_t type_args_len = TypeArgsLen();
-  return zone->PrintToString(
-      "ICData(%s num-args: %" Pd " num-checks: %" Pd " type-args-len: %" Pd ")",
-      name.ToCString(), num_args, num_checks, type_args_len);
+  return zone->PrintToString("ICData(%s num-args: %" Pd " num-checks: %" Pd
+                             " type-args-len: %" Pd ", deopt-id: %" Pd ")",
+                             name.ToCString(), NumArgsTested(),
+                             NumberOfChecks(), TypeArgsLen(), deopt_id());
 }
 
 FunctionPtr ICData::Owner() const {
@@ -20314,7 +20277,7 @@
 }
 
 bool AbstractType::IsFfiPointerType() const {
-  return HasTypeClass() && type_class_id() == kFfiPointerCid;
+  return HasTypeClass() && type_class_id() == kPointerCid;
 }
 
 AbstractTypePtr AbstractType::UnwrapFutureOr() const {
@@ -21836,16 +21799,11 @@
     if (!other_type_param.IsFunctionTypeParameter()) {
       return false;
     }
+    if (base() != other_type_param.base() ||
+        index() != other_type_param.index()) {
+      return false;
+    }
     if (kind == TypeEquality::kInSubtypeTest) {
-      // To be equivalent, the function type parameters should be declared
-      // at the same position in the generic function. Their index therefore
-      // needs adjustment before comparison.
-      // Example: 'foo<F>(bar<B>(B b)) { }' and 'baz<Z>(Z z) { }', baz can
-      // be assigned to bar, although B has index 1 and Z index 0.
-      if (index() - base() !=
-          other_type_param.index() - other_type_param.base()) {
-        return false;
-      }
       AbstractType& upper_bound = AbstractType::Handle(bound());
       AbstractType& other_type_param_upper_bound =
           AbstractType::Handle(other_type_param.bound());
@@ -21859,10 +21817,6 @@
         return false;
       }
     } else {
-      if (base() != other_type_param.base() ||
-          index() != other_type_param.index()) {
-        return false;
-      }
       AbstractType& type = AbstractType::Handle(bound());
       AbstractType& other_type = AbstractType::Handle(other_type_param.bound());
       if (!type.IsEquivalent(other_type, kind, trail)) {
@@ -21993,22 +21947,26 @@
     ASSERT(IsFinalized());
     if (index() >= num_free_fun_type_params) {
       // Do not instantiate the function type parameter, but possibly its bound.
+      // Also adjust index/base of the type parameter.
       result = ptr();
       AbstractType& upper_bound = AbstractType::Handle(bound());
-      if (!upper_bound.IsInstantiated(kAny, num_free_fun_type_params,
-                                      nullptr)) {
+      if (!upper_bound.IsInstantiated()) {
         upper_bound = upper_bound.InstantiateFrom(
             instantiator_type_arguments, function_type_arguments,
             num_free_fun_type_params, space, trail);
-        if ((upper_bound.IsTypeRef() &&
-             TypeRef::Cast(upper_bound).type() == Type::NeverType()) ||
-            (upper_bound.ptr() == Type::NeverType())) {
-          // Normalize 'X extends Never' to 'Never'.
-          result = Type::NeverType();
-        } else if (upper_bound.ptr() != bound()) {
-          result ^= Object::Clone(result, space);
-          TypeParameter::Cast(result).set_bound(upper_bound);
-        }
+      }
+      if ((upper_bound.IsTypeRef() &&
+           TypeRef::Cast(upper_bound).type() == Type::NeverType()) ||
+          (upper_bound.ptr() == Type::NeverType())) {
+        // Normalize 'X extends Never' to 'Never'.
+        result = Type::NeverType();
+      } else if ((upper_bound.ptr() != bound()) ||
+                 (num_free_fun_type_params != 0)) {
+        result ^= Object::Clone(result, space);
+        const auto& tp = TypeParameter::Cast(result);
+        tp.set_bound(upper_bound);
+        tp.set_base(tp.base() - num_free_fun_type_params);
+        tp.set_index(tp.index() - num_free_fun_type_params);
       }
     } else if (function_type_arguments.IsNull()) {
       return Type::DynamicType();
@@ -24566,7 +24524,8 @@
   }
 };
 
-LinkedHashMapPtr LinkedHashMap::NewDefault(Heap::Space space) {
+LinkedHashMapPtr LinkedHashMap::NewDefault(intptr_t class_id,
+                                           Heap::Space space) {
   const Array& data = Array::Handle(Array::New(kInitialIndexSize, space));
   const TypedData& index = TypedData::Handle(
       TypedData::New(kTypedDataUint32ArrayCid, kInitialIndexSize, space));
@@ -24574,35 +24533,40 @@
   static const intptr_t kAvailableBits = (kSmiBits >= 32) ? 32 : kSmiBits;
   static const intptr_t kInitialHashMask =
       (1 << (kAvailableBits - kInitialIndexBits)) - 1;
-  return LinkedHashMap::New(data, index, kInitialHashMask, 0, 0, space);
+  return LinkedHashMap::New(class_id, data, index, kInitialHashMask, 0, 0,
+                            space);
 }
 
-LinkedHashMapPtr LinkedHashMap::New(const Array& data,
+LinkedHashMapPtr LinkedHashMap::New(intptr_t class_id,
+                                    const Array& data,
                                     const TypedData& index,
                                     intptr_t hash_mask,
                                     intptr_t used_data,
                                     intptr_t deleted_keys,
                                     Heap::Space space) {
+  ASSERT(class_id == kLinkedHashMapCid ||
+         class_id == kImmutableLinkedHashMapCid);
   ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() !=
          Class::null());
   LinkedHashMap& result =
-      LinkedHashMap::Handle(LinkedHashMap::NewUninitialized(space));
-  result.SetData(data);
-  result.SetIndex(index);
-  result.SetHashMask(hash_mask);
-  result.SetUsedData(used_data);
-  result.SetDeletedKeys(deleted_keys);
+      LinkedHashMap::Handle(LinkedHashMap::NewUninitialized(class_id, space));
+  result.set_data(data);
+  result.set_index(index);
+  result.set_hash_mask(hash_mask);
+  result.set_used_data(used_data);
+  result.set_deleted_keys(deleted_keys);
   return result.ptr();
 }
 
-LinkedHashMapPtr LinkedHashMap::NewUninitialized(Heap::Space space) {
+LinkedHashMapPtr LinkedHashMap::NewUninitialized(intptr_t class_id,
+                                                 Heap::Space space) {
   ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() !=
          Class::null());
   LinkedHashMap& result = LinkedHashMap::Handle();
   {
     ObjectPtr raw =
-        Object::Allocate(LinkedHashMap::kClassId, LinkedHashMap::InstanceSize(),
-                         space, LinkedHashMap::ContainsCompressedPointers());
+        Object::Allocate(class_id, LinkedHashMap::InstanceSize(), space,
+                         LinkedHashMap::ContainsCompressedPointers());
     NoSafepointScope no_safepoint;
     result ^= raw;
   }
@@ -24611,28 +24575,155 @@
 
 const char* LinkedHashMap::ToCString() const {
   Zone* zone = Thread::Current()->zone();
-  return zone->PrintToString("_LinkedHashMap len:%" Pd, Length());
+  return zone->PrintToString(
+      "_%sLinkedHashMap len:%" Pd,
+      GetClassId() == kImmutableLinkedHashMapCid ? "Immutable" : "", Length());
 }
 
-LinkedHashSetPtr LinkedHashSet::New(const Array& data,
+void LinkedHashBase::ComputeAndSetHashMask() const {
+  ASSERT(IsImmutable());
+  ASSERT_EQUAL(Smi::Value(deleted_keys()), 0);
+  Thread* const thread = Thread::Current();
+  Zone* const zone = thread->zone();
+
+  const auto& data_array = Array::Handle(zone, data());
+  const intptr_t data_length = data_array.Length();
+  const intptr_t index_size_mult = IsLinkedHashMap() ? 1 : 2;
+  const intptr_t index_size = Utils::Maximum(LinkedHashBase::kInitialIndexSize,
+                                             data_length * index_size_mult);
+  ASSERT(Utils::IsPowerOfTwo(index_size));
+
+  const intptr_t hash_mask = IndexSizeToHashMask(index_size);
+  set_hash_mask(hash_mask);
+}
+
+bool LinkedHashBase::CanonicalizeEquals(const Instance& other) const {
+  ASSERT(IsImmutable());
+
+  if (this->ptr() == other.ptr()) {
+    // Both handles point to the same raw instance.
+    return true;
+  }
+  if (other.IsNull()) {
+    return false;
+  }
+  if (GetClassId() != other.GetClassId()) {
+    return false;
+  }
+
+  Zone* zone = Thread::Current()->zone();
+
+  const LinkedHashBase& other_map = LinkedHashBase::Cast(other);
+
+  if (!Smi::Handle(zone, used_data())
+           .Equals(Smi::Handle(zone, other_map.used_data()))) {
+    return false;
+  }
+
+  // Immutable maps and sets do not have deleted keys.
+  ASSERT_EQUAL(RawSmiValue(deleted_keys()), 0);
+
+  if (!Array::Handle(zone, data())
+           .CanonicalizeEquals(Array::Handle(zone, other_map.data()))) {
+    return false;
+  }
+
+  if (GetTypeArguments() == other.GetTypeArguments()) {
+    return true;
+  }
+  const TypeArguments& type_args =
+      TypeArguments::Handle(zone, GetTypeArguments());
+  const TypeArguments& other_type_args =
+      TypeArguments::Handle(zone, other.GetTypeArguments());
+  return type_args.Equals(other_type_args);
+}
+
+uint32_t LinkedHashBase::CanonicalizeHash() const {
+  ASSERT(IsImmutable());
+
+  Thread* thread = Thread::Current();
+  uint32_t hash = thread->heap()->GetCanonicalHash(ptr());
+  if (hash != 0) {
+    return hash;
+  }
+
+  // Immutable maps and sets do not have deleted keys.
+  ASSERT_EQUAL(RawSmiValue(deleted_keys()), 0);
+
+  Zone* zone = thread->zone();
+  auto& member = Instance::Handle(zone, GetTypeArguments());
+  hash = member.CanonicalizeHash();
+  member = data();
+  hash = CombineHashes(hash, member.CanonicalizeHash());
+  member = used_data();
+  hash = CombineHashes(hash, member.CanonicalizeHash());
+  hash = FinalizeHash(hash, kHashBits);
+  thread->heap()->SetCanonicalHash(ptr(), hash);
+  return hash;
+}
+
+void LinkedHashBase::CanonicalizeFieldsLocked(Thread* thread) const {
+  ASSERT(IsImmutable());
+
+  Zone* zone = thread->zone();
+
+  TypeArguments& type_args = TypeArguments::Handle(zone, GetTypeArguments());
+  if (!type_args.IsNull()) {
+    type_args = type_args.Canonicalize(thread, nullptr);
+    SetTypeArguments(type_args);
+  }
+
+  auto& data_array = Array::Handle(zone, data());
+  data_array.MakeImmutable();
+  data_array ^= data_array.CanonicalizeLocked(thread);
+  set_data(data_array);
+
+  // The index should not be set yet. It is populated lazily on first read.
+  const auto& index_td = TypedData::Handle(zone, index());
+  ASSERT(index_td.IsNull());
+}
+
+ImmutableLinkedHashMapPtr ImmutableLinkedHashMap::NewDefault(
+    Heap::Space space) {
+  ASSERT(IsolateGroup::Current()
+             ->object_store()
+             ->immutable_linked_hash_map_class() != Class::null());
+  return static_cast<ImmutableLinkedHashMapPtr>(
+      LinkedHashMap::NewDefault(kClassId, space));
+}
+
+ImmutableLinkedHashMapPtr ImmutableLinkedHashMap::NewUninitialized(
+    Heap::Space space) {
+  ASSERT(IsolateGroup::Current()
+             ->object_store()
+             ->immutable_linked_hash_map_class() != Class::null());
+  return static_cast<ImmutableLinkedHashMapPtr>(
+      LinkedHashMap::NewUninitialized(kClassId, space));
+}
+
+LinkedHashSetPtr LinkedHashSet::New(intptr_t class_id,
+                                    const Array& data,
                                     const TypedData& index,
                                     intptr_t hash_mask,
                                     intptr_t used_data,
                                     intptr_t deleted_keys,
                                     Heap::Space space) {
+  ASSERT(class_id == kLinkedHashSetCid ||
+         class_id == kImmutableLinkedHashSetCid);
   ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() !=
          Class::null());
   LinkedHashSet& result =
-      LinkedHashSet::Handle(LinkedHashSet::NewUninitialized(space));
-  result.SetData(data);
-  result.SetIndex(index);
-  result.SetHashMask(hash_mask);
-  result.SetUsedData(used_data);
-  result.SetDeletedKeys(deleted_keys);
+      LinkedHashSet::Handle(LinkedHashSet::NewUninitialized(class_id, space));
+  result.set_data(data);
+  result.set_index(index);
+  result.set_hash_mask(hash_mask);
+  result.set_used_data(used_data);
+  result.set_deleted_keys(deleted_keys);
   return result.ptr();
 }
 
-LinkedHashSetPtr LinkedHashSet::NewDefault(Heap::Space space) {
+LinkedHashSetPtr LinkedHashSet::NewDefault(intptr_t class_id,
+                                           Heap::Space space) {
   const Array& data = Array::Handle(Array::New(kInitialIndexSize, space));
   const TypedData& index = TypedData::Handle(
       TypedData::New(kTypedDataUint32ArrayCid, kInitialIndexSize, space));
@@ -24640,26 +24731,48 @@
   static const intptr_t kAvailableBits = (kSmiBits >= 32) ? 32 : kSmiBits;
   static const intptr_t kInitialHashMask =
       (1 << (kAvailableBits - kInitialIndexBits)) - 1;
-  return LinkedHashSet::New(data, index, kInitialHashMask, 0, 0, space);
+  return LinkedHashSet::New(class_id, data, index, kInitialHashMask, 0, 0,
+                            space);
 }
 
-LinkedHashSetPtr LinkedHashSet::NewUninitialized(Heap::Space space) {
+LinkedHashSetPtr LinkedHashSet::NewUninitialized(intptr_t class_id,
+                                                 Heap::Space space) {
   ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() !=
          Class::null());
   LinkedHashSet& result = LinkedHashSet::Handle();
   {
     ObjectPtr raw =
-        Object::Allocate(kLinkedHashSetCid, LinkedHashSet::InstanceSize(),
-                         space, LinkedHashSet::ContainsCompressedPointers());
+        Object::Allocate(class_id, LinkedHashSet::InstanceSize(), space,
+                         LinkedHashSet::ContainsCompressedPointers());
     NoSafepointScope no_safepoint;
     result ^= raw;
   }
   return result.ptr();
 }
 
+ImmutableLinkedHashSetPtr ImmutableLinkedHashSet::NewDefault(
+    Heap::Space space) {
+  ASSERT(IsolateGroup::Current()
+             ->object_store()
+             ->immutable_linked_hash_set_class() != Class::null());
+  return static_cast<ImmutableLinkedHashSetPtr>(
+      LinkedHashSet::NewDefault(kClassId, space));
+}
+
+ImmutableLinkedHashSetPtr ImmutableLinkedHashSet::NewUninitialized(
+    Heap::Space space) {
+  ASSERT(IsolateGroup::Current()
+             ->object_store()
+             ->immutable_linked_hash_map_class() != Class::null());
+  return static_cast<ImmutableLinkedHashSetPtr>(
+      LinkedHashSet::NewUninitialized(kClassId, space));
+}
+
 const char* LinkedHashSet::ToCString() const {
   Zone* zone = Thread::Current()->zone();
-  return zone->PrintToString("LinkedHashSet len:%" Pd, Length());
+  return zone->PrintToString(
+      "_%sLinkedHashSet len:%" Pd,
+      GetClassId() == kImmutableLinkedHashSetCid ? "Immutable" : "", Length());
 }
 
 const char* FutureOr::ToCString() const {
@@ -25085,11 +25198,11 @@
   type_args = type_args.Canonicalize(thread, nullptr);
 
   const Class& cls =
-      Class::Handle(IsolateGroup::Current()->class_table()->At(kFfiPointerCid));
+      Class::Handle(IsolateGroup::Current()->class_table()->At(kPointerCid));
   cls.EnsureIsAllocateFinalized(Thread::Current());
 
   Pointer& result = Pointer::Handle(zone);
-  result ^= Object::Allocate(kFfiPointerCid, Pointer::InstanceSize(), space,
+  result ^= Object::Allocate(kPointerCid, Pointer::InstanceSize(), space,
                              Pointer::ContainsCompressedPointers());
   result.SetTypeArguments(type_args);
   result.SetNativeAddress(native_address);
@@ -25107,7 +25220,7 @@
 DynamicLibraryPtr DynamicLibrary::New(void* handle, Heap::Space space) {
   DynamicLibrary& result = DynamicLibrary::Handle();
   result ^=
-      Object::Allocate(kFfiDynamicLibraryCid, DynamicLibrary::InstanceSize(),
+      Object::Allocate(kDynamicLibraryCid, DynamicLibrary::InstanceSize(),
                        space, DynamicLibrary::ContainsCompressedPointers());
   NoSafepointScope no_safepoint;
   result.SetHandle(handle);
@@ -25404,8 +25517,7 @@
   } else {
     num_free_params = kAllFree;
   }
-  if (num_free_params == kCurrentAndEnclosingFree ||
-      !sig.IsInstantiated(kAny)) {
+  if (num_free_params == kCurrentAndEnclosingFree || !sig.IsInstantiated()) {
     sig ^= sig.InstantiateFrom(inst_type_args, fn_type_args, num_free_params,
                                Heap::kOld);
   }
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 3b9d8ec..c76665a 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -67,6 +67,7 @@
 class CallSiteResetter;
 class CodeStatistics;
 class IsolateGroupReloadContext;
+class ObjectGraphCopier;
 
 #define REUSABLE_FORWARD_DECLARATION(name) class Reusable##name##HandleScope;
 REUSABLE_HANDLE_LIST(REUSABLE_FORWARD_DECLARATION)
@@ -864,6 +865,7 @@
   friend void UntaggedObject::Validate(IsolateGroup* isolate_group) const;
   friend class Closure;
   friend class InstanceDeserializationCluster;
+  friend class ObjectGraphCopier;  // For Object::InitializeObject
   friend class Simd128MessageDeserializationCluster;
   friend class OneByteString;
   friend class TwoByteString;
@@ -949,7 +951,7 @@
   kNullable = 0,
   kNonNullable = 1,
   kLegacy = 2,
-  // Adjust kNullabilityBitSize in clustered_snapshot.cc if adding new values.
+  // Adjust kNullabilityBitSize in app_snapshot.cc if adding new values.
 };
 
 // Equality kind between types.
@@ -2434,6 +2436,8 @@
     untag()->state_bits_.UpdateBool<ReceiverCannotBeSmiBit>(value);
   }
 
+  uword Hash() const;
+
  private:
   static ICDataPtr New();
 
@@ -4964,7 +4968,6 @@
   static LibraryPtr MirrorsLibrary();
 #endif
   static LibraryPtr NativeWrappersLibrary();
-  static LibraryPtr ProfilerLibrary();
   static LibraryPtr TypedDataLibrary();
   static LibraryPtr VMServiceLibrary();
 
@@ -6818,7 +6821,7 @@
 
   void Dump(int indent = 0) const;
 
-  static const intptr_t kBytesPerElement = kWordSize;
+  static const intptr_t kBytesPerElement = kCompressedWordSize;
   static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
 
   static const intptr_t kAwaitJumpVarIndex = 0;
@@ -6835,11 +6838,11 @@
 
   static intptr_t variable_offset(intptr_t context_index) {
     return OFFSET_OF_RETURNED_VALUE(UntaggedContext, data) +
-           (kWordSize * context_index);
+           (kBytesPerElement * context_index);
   }
 
   static bool IsValidLength(intptr_t len) {
-    return 0 <= len && len <= compiler::target::Array::kMaxElements;
+    return 0 <= len && len <= compiler::target::Context::kMaxElements;
   }
 
   static intptr_t InstanceSize() {
@@ -10970,6 +10973,16 @@
 
 class LinkedHashBase : public Instance {
  public:
+  // Keep consistent with _indexSizeToHashMask in compact_hash.dart.
+  static intptr_t IndexSizeToHashMask(intptr_t index_size) {
+    ASSERT(index_size >= kInitialIndexSize);
+    intptr_t index_bits = Utils::BitLength(index_size) - 2;
+#if defined(HAS_SMI_63_BITS)
+    return (1 << (32 - index_bits)) - 1;
+#else
+    return (1 << (Object::kHashBits - index_bits)) - 1;
+#endif
+  }
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(UntaggedLinkedHashBase));
   }
@@ -10998,15 +11011,101 @@
     return OFFSET_OF(UntaggedLinkedHashBase, deleted_keys_);
   }
 
+  static const LinkedHashBase& Cast(const Object& obj) {
+    ASSERT(obj.IsLinkedHashMap() || obj.IsLinkedHashSet());
+    return static_cast<const LinkedHashBase&>(obj);
+  }
+
+  bool IsImmutable() const {
+    return GetClassId() == kImmutableLinkedHashMapCid ||
+           GetClassId() == kImmutableLinkedHashSetCid;
+  }
+
+  virtual TypeArgumentsPtr GetTypeArguments() const {
+    return untag()->type_arguments();
+  }
+  virtual void SetTypeArguments(const TypeArguments& value) const {
+    const intptr_t num_type_args = IsLinkedHashMap() ? 2 : 1;
+    ASSERT(value.IsNull() ||
+           ((value.Length() >= num_type_args) &&
+            value.IsInstantiated() /*&& value.IsCanonical()*/));
+    // TODO(asiva): Values read from a message snapshot are not properly marked
+    // as canonical. See for example tests/isolate/message3_test.dart.
+    untag()->set_type_arguments(value.ptr());
+  }
+
+  TypedDataPtr index() const { return untag()->index(); }
+  void set_index(const TypedData& value) const {
+    ASSERT(!value.IsNull());
+    untag()->set_index(value.ptr());
+  }
+
+  ArrayPtr data() const { return untag()->data(); }
+  void set_data(const Array& value) const { untag()->set_data(value.ptr()); }
+
+  SmiPtr hash_mask() const { return untag()->hash_mask(); }
+  void set_hash_mask(intptr_t value) const {
+    untag()->set_hash_mask(Smi::New(value));
+  }
+
+  SmiPtr used_data() const { return untag()->used_data(); }
+  void set_used_data(intptr_t value) const {
+    untag()->set_used_data(Smi::New(value));
+  }
+
+  SmiPtr deleted_keys() const { return untag()->deleted_keys(); }
+  void set_deleted_keys(intptr_t value) const {
+    untag()->set_deleted_keys(Smi::New(value));
+  }
+
+  intptr_t Length() const {
+    // The map or set may be uninitialized.
+    if (untag()->used_data() == Object::null()) return 0;
+    if (untag()->deleted_keys() == Object::null()) return 0;
+
+    intptr_t used = Smi::Value(untag()->used_data());
+    if (IsLinkedHashMap()) {
+      used >>= 1;
+    }
+    const intptr_t deleted = Smi::Value(untag()->deleted_keys());
+    return used - deleted;
+  }
+
+  // We do not compute the indices in the VM, but we do precompute the hash
+  // mask to avoid a load acquire barrier on reading the combination of index
+  // and hash mask.
+  void ComputeAndSetHashMask() const;
+
+  virtual bool CanonicalizeEquals(const Instance& other) const;
+  virtual uint32_t CanonicalizeHash() const;
+  virtual void CanonicalizeFieldsLocked(Thread* thread) const;
+
  protected:
   // Keep this in sync with Dart implementation (lib/compact_hash.dart).
   static const intptr_t kInitialIndexBits = 2;
   static const intptr_t kInitialIndexSize = 1 << (kInitialIndexBits + 1);
 
+ private:
+  LinkedHashBasePtr ptr() const { return static_cast<LinkedHashBasePtr>(ptr_); }
+  UntaggedLinkedHashBase* untag() const {
+    ASSERT(ptr() != null());
+    return const_cast<UntaggedLinkedHashBase*>(ptr()->untag());
+  }
+
   friend class Class;
+  friend class ImmutableLinkedHashBase;
   friend class LinkedHashBaseDeserializationCluster;
 };
 
+class ImmutableLinkedHashBase : public AllStatic {
+ public:
+  static constexpr bool ContainsCompressedPointers() {
+    return LinkedHashBase::ContainsCompressedPointers();
+  }
+
+  static intptr_t data_offset() { return LinkedHashBase::data_offset(); }
+};
+
 // Corresponds to
 // - "new Map()",
 // - non-const map literals, and
@@ -11018,60 +11117,16 @@
   }
 
   // Allocates a map with some default capacity, just like "new Map()".
-  static LinkedHashMapPtr NewDefault(Heap::Space space = Heap::kNew);
-  static LinkedHashMapPtr New(const Array& data,
+  static LinkedHashMapPtr NewDefault(intptr_t class_id = kLinkedHashMapCid,
+                                     Heap::Space space = Heap::kNew);
+  static LinkedHashMapPtr New(intptr_t class_id,
+                              const Array& data,
                               const TypedData& index,
                               intptr_t hash_mask,
                               intptr_t used_data,
                               intptr_t deleted_keys,
                               Heap::Space space = Heap::kNew);
 
-  virtual TypeArgumentsPtr GetTypeArguments() const {
-    return untag()->type_arguments();
-  }
-  virtual void SetTypeArguments(const TypeArguments& value) const {
-    ASSERT(value.IsNull() ||
-           ((value.Length() >= 2) &&
-            value.IsInstantiated() /*&& value.IsCanonical()*/));
-    // TODO(asiva): Values read from a message snapshot are not properly marked
-    // as canonical. See for example tests/isolate/message3_test.dart.
-    untag()->set_type_arguments(value.ptr());
-  }
-
-  TypedDataPtr index() const { return untag()->index(); }
-  void SetIndex(const TypedData& value) const {
-    ASSERT(!value.IsNull());
-    untag()->set_index(value.ptr());
-  }
-
-  ArrayPtr data() const { return untag()->data(); }
-  void SetData(const Array& value) const { untag()->set_data(value.ptr()); }
-
-  SmiPtr hash_mask() const { return untag()->hash_mask(); }
-  void SetHashMask(intptr_t value) const {
-    untag()->set_hash_mask(Smi::New(value));
-  }
-
-  SmiPtr used_data() const { return untag()->used_data(); }
-  void SetUsedData(intptr_t value) const {
-    untag()->set_used_data(Smi::New(value));
-  }
-
-  SmiPtr deleted_keys() const { return untag()->deleted_keys(); }
-  void SetDeletedKeys(intptr_t value) const {
-    untag()->set_deleted_keys(Smi::New(value));
-  }
-
-  intptr_t Length() const {
-    // The map may be uninitialized.
-    if (untag()->used_data() == Object::null()) return 0;
-    if (untag()->deleted_keys() == Object::null()) return 0;
-
-    intptr_t used = Smi::Value(untag()->used_data());
-    intptr_t deleted = Smi::Value(untag()->deleted_keys());
-    return (used >> 1) - deleted;
-  }
-
   // This iterator differs somewhat from its Dart counterpart (_CompactIterator
   // in runtime/lib/compact_hash.dart):
   //  - There are no checks for concurrent modifications.
@@ -11115,12 +11170,42 @@
 
   // Allocate a map, but leave all fields set to null.
   // Used during deserialization (since map might contain itself as key/value).
-  static LinkedHashMapPtr NewUninitialized(Heap::Space space = Heap::kNew);
+  static LinkedHashMapPtr NewUninitialized(intptr_t class_id,
+                                           Heap::Space space = Heap::kNew);
 
   friend class Class;
+  friend class ImmutableLinkedHashMap;
   friend class LinkedHashMapDeserializationCluster;
 };
 
+class ImmutableLinkedHashMap : public AllStatic {
+ public:
+  static constexpr bool ContainsCompressedPointers() {
+    return LinkedHashMap::ContainsCompressedPointers();
+  }
+
+  static ImmutableLinkedHashMapPtr NewDefault(Heap::Space space = Heap::kNew);
+
+  static ImmutableLinkedHashMapPtr NewUninitialized(
+      Heap::Space space = Heap::kNew);
+
+  static const ClassId kClassId = kImmutableLinkedHashMapCid;
+
+  static intptr_t InstanceSize() { return LinkedHashMap::InstanceSize(); }
+
+ private:
+  static intptr_t NextFieldOffset() {
+    // Indicates this class cannot be extended by dart code.
+    return -kWordSize;
+  }
+
+  static ImmutableLinkedHashMapPtr raw(const LinkedHashMap& map) {
+    return static_cast<ImmutableLinkedHashMapPtr>(map.ptr());
+  }
+
+  friend class Class;
+};
+
 class LinkedHashSet : public LinkedHashBase {
  public:
   static intptr_t InstanceSize() {
@@ -11128,60 +11213,16 @@
   }
 
   // Allocates a set with some default capacity, just like "new Set()".
-  static LinkedHashSetPtr NewDefault(Heap::Space space = Heap::kNew);
-  static LinkedHashSetPtr New(const Array& data,
+  static LinkedHashSetPtr NewDefault(intptr_t class_id = kLinkedHashSetCid,
+                                     Heap::Space space = Heap::kNew);
+  static LinkedHashSetPtr New(intptr_t class_id,
+                              const Array& data,
                               const TypedData& index,
                               intptr_t hash_mask,
                               intptr_t used_data,
                               intptr_t deleted_keys,
                               Heap::Space space = Heap::kNew);
 
-  virtual TypeArgumentsPtr GetTypeArguments() const {
-    return untag()->type_arguments();
-  }
-  virtual void SetTypeArguments(const TypeArguments& value) const {
-    ASSERT(value.IsNull() ||
-           ((value.Length() >= 1) &&
-            value.IsInstantiated() /*&& value.IsCanonical()*/));
-    // TODO(asiva): Values read from a message snapshot are not properly marked
-    // as canonical. See for example tests/isolate/message3_test.dart.
-    untag()->set_type_arguments(value.ptr());
-  }
-
-  TypedDataPtr index() const { return untag()->index(); }
-  void SetIndex(const TypedData& value) const {
-    ASSERT(!value.IsNull());
-    untag()->set_index(value.ptr());
-  }
-
-  ArrayPtr data() const { return untag()->data(); }
-  void SetData(const Array& value) const { untag()->set_data(value.ptr()); }
-
-  SmiPtr hash_mask() const { return untag()->hash_mask(); }
-  void SetHashMask(intptr_t value) const {
-    untag()->set_hash_mask(Smi::New(value));
-  }
-
-  SmiPtr used_data() const { return untag()->used_data(); }
-  void SetUsedData(intptr_t value) const {
-    untag()->set_used_data(Smi::New(value));
-  }
-
-  SmiPtr deleted_keys() const { return untag()->deleted_keys(); }
-  void SetDeletedKeys(intptr_t value) const {
-    untag()->set_deleted_keys(Smi::New(value));
-  }
-
-  intptr_t Length() const {
-    // The map may be uninitialized.
-    if (untag()->used_data() == Object::null()) return 0;
-    if (untag()->deleted_keys() == Object::null()) return 0;
-
-    intptr_t used = Smi::Value(untag()->used_data());
-    intptr_t deleted = Smi::Value(untag()->deleted_keys());
-    return used - deleted;
-  }
-
   // This iterator differs somewhat from its Dart counterpart (_CompactIterator
   // in runtime/lib/compact_hash.dart):
   //  - There are no checks for concurrent modifications.
@@ -11223,7 +11264,38 @@
 
   // Allocate a set, but leave all fields set to null.
   // Used during deserialization (since set might contain itself as key/value).
-  static LinkedHashSetPtr NewUninitialized(Heap::Space space = Heap::kNew);
+  static LinkedHashSetPtr NewUninitialized(intptr_t class_id,
+                                           Heap::Space space = Heap::kNew);
+
+  friend class Class;
+  friend class ImmutableLinkedHashSet;
+  friend class LinkedHashSetDeserializationCluster;
+};
+
+class ImmutableLinkedHashSet : public AllStatic {
+ public:
+  static constexpr bool ContainsCompressedPointers() {
+    return LinkedHashSet::ContainsCompressedPointers();
+  }
+
+  static ImmutableLinkedHashSetPtr NewDefault(Heap::Space space = Heap::kNew);
+
+  static ImmutableLinkedHashSetPtr NewUninitialized(
+      Heap::Space space = Heap::kNew);
+
+  static const ClassId kClassId = kImmutableLinkedHashSetCid;
+
+  static intptr_t InstanceSize() { return LinkedHashSet::InstanceSize(); }
+
+ private:
+  static intptr_t NextFieldOffset() {
+    // Indicates this class cannot be extended by dart code.
+    return -kWordSize;
+  }
+
+  static ImmutableLinkedHashSetPtr raw(const LinkedHashSet& map) {
+    return static_cast<ImmutableLinkedHashSetPtr>(map.ptr());
+  }
 
   friend class Class;
 };
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 749c0f3..8a1cd87 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -849,6 +849,47 @@
   DISALLOW_COPY_AND_ASSIGN(Pass1Visitor);
 };
 
+class CountImagePageRefs : public ObjectVisitor {
+ public:
+  CountImagePageRefs() : ObjectVisitor() {}
+
+  void VisitObject(ObjectPtr obj) {
+    if (obj->IsPseudoObject()) return;
+    count_++;
+  }
+  intptr_t count() const { return count_; }
+
+ private:
+  intptr_t count_ = 0;
+
+  DISALLOW_COPY_AND_ASSIGN(CountImagePageRefs);
+};
+
+class WriteImagePageRefs : public ObjectVisitor {
+ public:
+  explicit WriteImagePageRefs(HeapSnapshotWriter* writer)
+      : ObjectVisitor(), writer_(writer) {}
+
+  void VisitObject(ObjectPtr obj) {
+    if (obj->IsPseudoObject()) return;
+#if defined(DEBUG)
+    count_++;
+#endif
+    writer_->WriteUnsigned(writer_->GetObjectId(obj));
+  }
+#if defined(DEBUG)
+  intptr_t count() const { return count_; }
+#endif
+
+ private:
+  HeapSnapshotWriter* const writer_;
+#if defined(DEBUG)
+  intptr_t count_ = 0;
+#endif
+
+  DISALLOW_COPY_AND_ASSIGN(WriteImagePageRefs);
+};
+
 enum NonReferenceDataTags {
   kNoData = 0,
   kNullData,
@@ -865,9 +906,10 @@
 
 enum ExtraCids {
   kRootExtraCid = 1,  // 1-origin
-  kIsolateExtraCid = 2,
+  kImagePageExtraCid = 2,
+  kIsolateExtraCid = 3,
 
-  kNumExtraCids = 2,
+  kNumExtraCids = 3,
 };
 
 class Pass2Visitor : public ObjectVisitor,
@@ -953,11 +995,11 @@
       writer_->WriteUnsigned(kLengthData);
       writer_->WriteUnsigned(Smi::Value(
           static_cast<GrowableObjectArrayPtr>(obj)->untag()->length()));
-    } else if (cid == kLinkedHashMapCid) {
+    } else if (cid == kLinkedHashMapCid || cid == kImmutableLinkedHashMapCid) {
       writer_->WriteUnsigned(kLengthData);
       writer_->WriteUnsigned(
           Smi::Value(static_cast<LinkedHashMapPtr>(obj)->untag()->used_data()));
-    } else if (cid == kLinkedHashSetCid) {
+    } else if (cid == kLinkedHashSetCid || cid == kImmutableLinkedHashSetCid) {
       writer_->WriteUnsigned(kLengthData);
       writer_->WriteUnsigned(
           Smi::Value(static_cast<LinkedHashSetPtr>(obj)->untag()->used_data()));
@@ -1209,7 +1251,16 @@
       WriteUnsigned(0);   // Field count
     }
     {
-      ASSERT(kIsolateExtraCid == 2);
+      ASSERT(kImagePageExtraCid == 2);
+      WriteUnsigned(0);              // Flags
+      WriteUtf8("Read-Only Pages");  // Name
+      WriteUtf8("");                 // Library name
+      WriteUtf8("");                 // Library uri
+      WriteUtf8("");                 // Reserved
+      WriteUnsigned(0);              // Field count
+    }
+    {
+      ASSERT(kIsolateExtraCid == 3);
       WriteUnsigned(0);      // Flags
       WriteUtf8("Isolate");  // Name
       WriteUtf8("");         // Library name
@@ -1226,7 +1277,7 @@
         WriteUtf8("");  // Reserved
       }
     }
-    ASSERT(kNumExtraCids == 2);
+    ASSERT(kNumExtraCids == 3);
     for (intptr_t cid = 1; cid <= class_count_; cid++) {
       if (!class_table->HasValidClassAt(cid)) {
         WriteUnsigned(0);  // Flags
@@ -1320,21 +1371,34 @@
   SetupCountingPages();
 
   intptr_t num_isolates = 0;
+  intptr_t num_image_objects = 0;
   {
     Pass1Visitor visitor(this);
 
     // Root "objects".
-    ++object_count_;
-    isolate_group()->VisitSharedPointers(&visitor);
-    isolate_group()->ForEachIsolate(
-        [&](Isolate* isolate) {
-          ++object_count_;
-          isolate->VisitObjectPointers(&visitor,
-                                       ValidationPolicy::kDontValidateFrames);
-          ++num_isolates;
-        },
-        /*at_safepoint=*/true);
-    CountReferences(num_isolates);
+    {
+      ++object_count_;
+      isolate_group()->VisitSharedPointers(&visitor);
+    }
+    {
+      ++object_count_;
+      CountImagePageRefs visitor;
+      H->old_space()->VisitObjectsImagePages(&visitor);
+      num_image_objects = visitor.count();
+      CountReferences(num_image_objects);
+    }
+    {
+      isolate_group()->ForEachIsolate(
+          [&](Isolate* isolate) {
+            ++object_count_;
+            isolate->VisitObjectPointers(&visitor,
+                                         ValidationPolicy::kDontValidateFrames);
+            ++num_isolates;
+          },
+          /*at_safepoint=*/true);
+    }
+    CountReferences(1);             // Root -> Image Pages
+    CountReferences(num_isolates);  // Root -> Isolate
 
     // Heap objects.
     iteration.IterateVMIsolateObjects(&visitor);
@@ -1357,13 +1421,24 @@
       WriteUnsigned(kNoData);
       visitor.DoCount();
       isolate_group()->VisitSharedPointers(&visitor);
-      visitor.CountExtraRefs(num_isolates);
+      visitor.CountExtraRefs(num_isolates + 1);
       visitor.DoWrite();
       isolate_group()->VisitSharedPointers(&visitor);
+      visitor.WriteExtraRef(2);  // Root -> Image Pages
       for (intptr_t i = 0; i < num_isolates; i++) {
-        visitor.WriteExtraRef(i + 2);  // 0 = sentinel, 1 = root, 2+ = isolates
+        // 0 = sentinel, 1 = root, 2 = image pages, 2+ = isolates
+        visitor.WriteExtraRef(i + 3);
       }
     }
+    {
+      WriteUnsigned(kImagePageExtraCid);
+      WriteUnsigned(0);  // shallowSize
+      WriteUnsigned(kNoData);
+      WriteUnsigned(num_image_objects);
+      WriteImagePageRefs visitor(this);
+      H->old_space()->VisitObjectsImagePages(&visitor);
+      DEBUG_ASSERT(visitor.count() == num_image_objects);
+    }
     isolate_group()->ForEachIsolate(
         [&](Isolate* isolate) {
           WriteUnsigned(kIsolateExtraCid);
@@ -1395,10 +1470,13 @@
     // Identity hash codes
     Pass3Visitor visitor(this);
 
-    // Handle root object.
-    WriteUnsigned(0);
-    isolate_group()->ForEachIsolate([&](Isolate* isolate) { WriteUnsigned(0); },
-                                    /*at_safepoint=*/true);
+    WriteUnsigned(0);  // Root fake object.
+    WriteUnsigned(0);  // Image pages fake object.
+    isolate_group()->ForEachIsolate(
+        [&](Isolate* isolate) {
+          WriteUnsigned(0);  // Isolate fake object.
+        },
+        /*at_safepoint=*/true);
 
     // Handle visit rest of the objects.
     iteration.IterateVMIsolateObjects(&visitor);
@@ -1428,6 +1506,8 @@
     case kExternalTwoByteStringCid:
     case kGrowableObjectArrayCid:
     case kImmutableArrayCid:
+    case kImmutableLinkedHashMapCid:
+    case kImmutableLinkedHashSetCid:
     case kInstructionsCid:
     case kInstructionsSectionCid:
     case kInstructionsTableCid:
@@ -1454,7 +1534,7 @@
 }
 
 // Generates a random value which can serve as an identity hash.
-// It must be a non-zero smi value (see also [Object._getObjectHash]).
+// It must be a non-zero smi value (see also [Object._objectHashCode]).
 static uint32_t GenerateHash(Random* random) {
   uint32_t hash;
   do {
diff --git a/runtime/vm/object_graph_copy.cc b/runtime/vm/object_graph_copy.cc
index f5d8bc5..45642c8 100644
--- a/runtime/vm/object_graph_copy.cc
+++ b/runtime/vm/object_graph_copy.cc
@@ -245,9 +245,7 @@
 DART_FORCE_INLINE
 ObjectPtr AllocateObject(intptr_t cid, intptr_t size) {
 #if defined(DART_COMPRESSED_POINTERS)
-  // TODO(rmacnak): Can be changed unconditionally to `true` once Contexts
-  // are compressed.
-  const bool compressed = cid != kContextCid;
+  const bool compressed = true;
 #else
   const bool compressed = false;
 #endif
@@ -593,8 +591,6 @@
       // here that cannot happen in reality)
       HANDLE_ILLEGAL_CASE(DynamicLibrary)
       HANDLE_ILLEGAL_CASE(Pointer)
-      HANDLE_ILLEGAL_CASE(FfiDynamicLibrary)
-      HANDLE_ILLEGAL_CASE(FfiPointer)
       HANDLE_ILLEGAL_CASE(FunctionType)
       HANDLE_ILLEGAL_CASE(MirrorReference)
       HANDLE_ILLEGAL_CASE(ReceivePort)
@@ -666,13 +662,13 @@
     }
   }
 
-  void ForwardContextPointers(intptr_t context_length,
-                              ObjectPtr src,
-                              ObjectPtr dst,
-                              intptr_t offset,
-                              intptr_t end_offset) {
-    for (; offset < end_offset; offset += kWordSize) {
-      ForwardPointer(src, dst, offset);
+  void ForwardCompressedContextPointers(intptr_t context_length,
+                                        ObjectPtr src,
+                                        ObjectPtr dst,
+                                        intptr_t offset,
+                                        intptr_t end_offset) {
+    for (; offset < end_offset; offset += kCompressedWordSize) {
+      ForwardCompressedPointer(src, dst, offset);
     }
   }
 
@@ -707,36 +703,6 @@
     StoreCompressedPointerNoBarrier(dst, offset, to);
   }
 
-  // TODO(rmacnak): Can be removed if Contexts are compressed.
-  DART_FORCE_INLINE
-  void ForwardPointer(ObjectPtr src, ObjectPtr dst, intptr_t offset) {
-    auto value = LoadPointer(src, offset);
-    if (!value.IsHeapObject()) {
-      StorePointerNoBarrier(dst, offset, value);
-      return;
-    }
-    const uword tags = TagsFromUntaggedObject(value.untag());
-    if (CanShareObject(value, tags)) {
-      StorePointerNoBarrier(dst, offset, value);
-      return;
-    }
-
-    ObjectPtr existing_to = fast_forward_map_.ForwardedObject(value);
-    if (existing_to != Marker()) {
-      StorePointerNoBarrier(dst, offset, existing_to);
-      return;
-    }
-
-    if (UNLIKELY(!CanCopyObject(tags, value))) {
-      ASSERT(exception_msg_ != nullptr);
-      StorePointerNoBarrier(dst, offset, Object::null());
-      return;
-    }
-
-    auto to = Forward(tags, value);
-    StorePointerNoBarrier(dst, offset, to);
-  }
-
   ObjectPtr Forward(uword tags, ObjectPtr from) {
     const intptr_t header_size = UntaggedObject::SizeTag::decode(tags);
     const auto cid = UntaggedObject::ClassIdTag::decode(tags);
@@ -861,13 +827,13 @@
     }
   }
 
-  void ForwardContextPointers(intptr_t context_length,
-                              const Object& src,
-                              const Object& dst,
-                              intptr_t offset,
-                              intptr_t end_offset) {
-    for (; offset < end_offset; offset += kWordSize) {
-      ForwardPointer(src, dst, offset);
+  void ForwardCompressedContextPointers(intptr_t context_length,
+                                        const Object& src,
+                                        const Object& dst,
+                                        intptr_t offset,
+                                        intptr_t end_offset) {
+    for (; offset < end_offset; offset += kCompressedWordSize) {
+      ForwardCompressedPointer(src, dst, offset);
     }
   }
 
@@ -941,36 +907,6 @@
     StoreCompressedPointerBarrier(dst.ptr(), offset, tmp_.ptr());
   }
 
-  // TODO(rmacnak): Can be removed if Contexts are compressed.
-  DART_FORCE_INLINE
-  void ForwardPointer(const Object& src, const Object& dst, intptr_t offset) {
-    auto value = LoadPointer(src.ptr(), offset);
-    if (!value.IsHeapObject()) {
-      StorePointerNoBarrier(dst.ptr(), offset, value);
-      return;
-    }
-    const uword tags = TagsFromUntaggedObject(value.untag());
-    if (CanShareObject(value, tags)) {
-      StorePointerBarrier(dst.ptr(), offset, value);
-      return;
-    }
-
-    ObjectPtr existing_to = slow_forward_map_.ForwardedObject(value);
-    if (existing_to != Marker()) {
-      StorePointerBarrier(dst.ptr(), offset, existing_to);
-      return;
-    }
-
-    if (UNLIKELY(!CanCopyObject(tags, value))) {
-      ASSERT(exception_msg_ != nullptr);
-      StorePointerNoBarrier(dst.ptr(), offset, Object::null());
-      return;
-    }
-
-    tmp_ = value;
-    tmp_ = Forward(tags, tmp_);  // Only this can cause allocation.
-    StorePointerBarrier(dst.ptr(), offset, tmp_.ptr());
-  }
   ObjectPtr Forward(uword tags, const Object& from) {
     const intptr_t cid = UntaggedObject::ClassIdTag::decode(tags);
     intptr_t size = UntaggedObject::SizeTag::decode(tags);
@@ -1163,12 +1099,11 @@
 
     UntagContext(to)->num_variables_ = UntagContext(from)->num_variables_;
 
-    // TODO(rmacnak): Should use ForwardCompressedPointer once contexts are
-    // compressed.
-    Base::ForwardPointer(from, to, OFFSET_OF(UntaggedContext, parent_));
-    Base::ForwardContextPointers(
+    Base::ForwardCompressedPointer(from, to,
+                                   OFFSET_OF(UntaggedContext, parent_));
+    Base::ForwardCompressedContextPointers(
         length, from, to, Context::variable_offset(0),
-        Context::variable_offset(0) + kWordSize * length);
+        Context::variable_offset(0) + Context::kBytesPerElement * length);
   }
 
   void CopyArray(typename Types::Array from, typename Types::Array to) {
@@ -1858,12 +1793,15 @@
       auto to = fast_forward_map.raw_from_to_[i + 1];
       const uword tags = TagsFromUntaggedObject(from.untag());
       const intptr_t cid = UntaggedObject::ClassIdTag::decode(tags);
-      const intptr_t size = UntaggedObject::SizeTag::decode(tags);
       // External typed data is already initialized.
       if (!IsExternalTypedDataClassId(cid) && !IsTypedDataViewClassId(cid)) {
-        memset(reinterpret_cast<void*>(to.untag()), 0,
-               from.untag()->HeapSize());
-        SetNewSpaceTaggingWord(to, cid, size);
+#if defined(DART_COMPRESSED_POINTERS)
+        const bool compressed = true;
+#else
+        const bool compressed = false;
+#endif
+        Object::InitializeObject(reinterpret_cast<uword>(to.untag()), cid,
+                                 from.untag()->HeapSize(), compressed);
         UpdateLengthField(cid, from, to);
       }
     }
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index b2037d9..cc089f2 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -397,7 +397,7 @@
                    enum_ident.ToCString());
         bool removed = enum_map.Remove(enum_ident);
         ASSERT(removed);
-        reload_context->AddEnumBecomeMapping(old_enum_value, enum_value);
+        reload_context->AddBecomeMapping(old_enum_value, enum_value);
       }
     }
     enums_deleted = enum_map.NumOccupied() > 0;
@@ -409,13 +409,13 @@
   // Map the old E.values array to the new E.values array.
   ASSERT(!old_enum_values.IsNull());
   ASSERT(!enum_values.IsNull());
-  reload_context->AddEnumBecomeMapping(old_enum_values, enum_values);
+  reload_context->AddBecomeMapping(old_enum_values, enum_values);
 
   // Map the old E._deleted_enum_sentinel to the new E._deleted_enum_sentinel.
   ASSERT(!old_deleted_enum_sentinel.IsNull());
   ASSERT(!deleted_enum_sentinel.IsNull());
-  reload_context->AddEnumBecomeMapping(old_deleted_enum_sentinel,
-                                       deleted_enum_sentinel);
+  reload_context->AddBecomeMapping(old_deleted_enum_sentinel,
+                                   deleted_enum_sentinel);
 
   if (enums_deleted) {
     // Map all deleted enums to the deleted enum sentinel value.
@@ -432,8 +432,7 @@
       ASSERT(!enum_ident.IsNull());
       old_enum_value ^= enum_map.GetOrNull(enum_ident);
       VTIR_Print("Element `%s` was deleted\n", enum_ident.ToCString());
-      reload_context->AddEnumBecomeMapping(old_enum_value,
-                                           deleted_enum_sentinel);
+      reload_context->AddBecomeMapping(old_enum_value, deleted_enum_sentinel);
     }
     enum_map.Release();
   }
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index a944d89..ebb2d60 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -68,13 +68,9 @@
   RW(Class, never_class)                                                       \
   RW(Type, never_type)                                                         \
   RW(Type, function_type)                                                      \
-  RW(Type, legacy_function_type)                                               \
-  RW(Type, non_nullable_function_type)                                         \
   RW(Type, type_type)                                                          \
   RW(Class, closure_class)                                                     \
   RW(Type, number_type)                                                        \
-  RW(Type, legacy_number_type)                                                 \
-  RW(Type, non_nullable_number_type)                                           \
   RW(Type, int_type)                                                           \
   RW(Type, legacy_int_type)                                                    \
   RW(Type, non_nullable_int_type)                                              \
@@ -83,38 +79,23 @@
   RW(Type, int64_type)                                                         \
   RW(Class, smi_class)                                                         \
   RW(Type, smi_type)                                                           \
-  RW(Type, legacy_smi_type)                                                    \
-  RW(Type, non_nullable_smi_type)                                              \
   RW(Class, mint_class)                                                        \
   RW(Type, mint_type)                                                          \
-  RW(Type, legacy_mint_type)                                                   \
-  RW(Type, non_nullable_mint_type)                                             \
   RW(Class, double_class)                                                      \
   RW(Type, double_type)                                                        \
-  RW(Type, legacy_double_type)                                                 \
-  RW(Type, non_nullable_double_type)                                           \
   RW(Type, nullable_double_type)                                               \
   RW(Type, float32x4_type)                                                     \
   RW(Type, int32x4_type)                                                       \
   RW(Type, float64x2_type)                                                     \
   RW(Type, string_type)                                                        \
   RW(Type, legacy_string_type)                                                 \
-  RW(Type, non_nullable_string_type)                                           \
   RW(TypeArguments, type_argument_int)                                         \
   RW(TypeArguments, type_argument_legacy_int)                                  \
-  RW(TypeArguments, type_argument_non_nullable_int)                            \
   RW(TypeArguments, type_argument_double)                                      \
-  RW(TypeArguments, type_argument_legacy_double)                               \
-  RW(TypeArguments, type_argument_non_nullable_double)                         \
   RW(TypeArguments, type_argument_string)                                      \
   RW(TypeArguments, type_argument_legacy_string)                               \
-  RW(TypeArguments, type_argument_non_nullable_string)                         \
   RW(TypeArguments, type_argument_string_dynamic)                              \
-  RW(TypeArguments, type_argument_legacy_string_dynamic)                       \
-  RW(TypeArguments, type_argument_non_nullable_string_dynamic)                 \
   RW(TypeArguments, type_argument_string_string)                               \
-  RW(TypeArguments, type_argument_legacy_string_legacy_string)                 \
-  RW(TypeArguments, type_argument_non_nullable_string_non_nullable_string)     \
   RW(Class, compiletime_error_class)                                           \
   RW(Class, pragma_class)                                                      \
   RW(Field, pragma_name)                                                       \
@@ -126,17 +107,15 @@
   RW(Class, external_one_byte_string_class)                                    \
   RW(Class, external_two_byte_string_class)                                    \
   RW(Type, bool_type)                                                          \
-  RW(Type, legacy_bool_type)                                                   \
-  RW(Type, non_nullable_bool_type)                                             \
   RW(Class, bool_class)                                                        \
   RW(Class, array_class)                                                       \
   RW(Type, array_type)                                                         \
-  RW(Type, legacy_array_type)                                                  \
-  RW(Type, non_nullable_array_type)                                            \
   RW(Class, immutable_array_class)                                             \
   RW(Class, growable_object_array_class)                                       \
   RW(Class, linked_hash_map_class)                                             \
+  RW(Class, immutable_linked_hash_map_class)                                   \
   RW(Class, linked_hash_set_class)                                             \
+  RW(Class, immutable_linked_hash_set_class)                                   \
   RW(Class, float32x4_class)                                                   \
   RW(Class, int32x4_class)                                                     \
   RW(Class, float64x2_class)                                                   \
@@ -149,7 +128,6 @@
   RW(Array, canonical_type_parameters)                                         \
   RW(Array, canonical_type_arguments)                                          \
   RW(Library, async_library)                                                   \
-  RW(Library, builtin_library)                                                 \
   RW(Library, core_library)                                                    \
   RW(Library, collection_library)                                              \
   RW(Library, convert_library)                                                 \
@@ -160,7 +138,6 @@
   RW(Library, math_library)                                                    \
   RW(Library, mirrors_library)                                                 \
   RW(Library, native_wrappers_library)                                         \
-  RW(Library, profiler_library)                                                \
   RW(Library, root_library)                                                    \
   RW(Library, typed_data_library)                                              \
   RW(Library, _vmservice_library)                                              \
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index fbb1527..be755ef 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -3209,7 +3209,7 @@
 }
 
 ISOLATE_UNIT_TEST_CASE(MegamorphicCache) {
-  const auto& name = String::Handle(String::New("name"));
+  const auto& name = String::Handle(Symbols::New(thread, "name"));
   const auto& args_descriptor =
       Array::Handle(ArgumentsDescriptor::NewBoxed(1, 1, Object::null_array()));
 
@@ -4551,7 +4551,7 @@
         "\"\",\"location\":{\"type\":\"SourceLocation\",\"script\":{\"type\":"
         "\"@Script\",\"fixedId\":true,\"id\":\"\",\"uri\":\"dart:core-patch\\/"
         "array.dart\",\"_kind\":\"kernel\"},\"tokenPos\":248,\"endTokenPos\":"
-        "7758},\"library\":{\"type\":\"@Library\",\"fixedId\":true,\"id\":\"\","
+        "7917},\"library\":{\"type\":\"@Library\",\"fixedId\":true,\"id\":\"\","
         "\"name\":\"dart.core\",\"uri\":\"dart:core\"},\"typeParameters\":[{"
         "\"type\":\"@"
         "Instance\",\"_vmType\":\"TypeParameter\",\"class\":{\"type\":\"@"
@@ -4559,8 +4559,8 @@
         "vmName\":\"\",\"location\":{\"type\":"
         "\"SourceLocation\",\"script\":{\"type\":\"@Script\",\"fixedId\":true,"
         "\"id\":\"\",\"uri\":\"dart:core-patch\\/"
-        "type_patch.dart\",\"_kind\":\"kernel\"},\"tokenPos\":1584,"
-        "\"endTokenPos\":1729},\"library\":{\"type\":\"@Library\",\"fixedId\":"
+        "type_patch.dart\",\"_kind\":\"kernel\"},\"tokenPos\":1749,"
+        "\"endTokenPos\":1894},\"library\":{\"type\":\"@Library\",\"fixedId\":"
         "true,\"id\":\"\",\"name\":\"dart.core\",\"uri\":\"dart:core\"}},"
         "\"identityHashCode\":",
         buffer);
@@ -5029,64 +5029,6 @@
                                         /*check_identity=*/false));
 }
 
-// Because we want to reuse CanonicalizeHash for hashCode, we should not have
-// collisions.
-TEST_CASE(CanonicalizeHash_Const_Instances) {
-  const char* kScript =
-      "class A {\n"
-      "  final int n;\n"
-      "  \n"
-      "  const A(this.n);\n"
-      "}\n"
-      "\n"
-      "class B {\n"
-      "  final int n;\n"
-      "  \n"
-      "  const B(this.n);\n"
-      "}\n"
-      "\n"
-      "valueA() {\n"
-      "  return const A(5);\n"
-      "}\n"
-      "\n"
-      "valueB() {\n"
-      "  return const B(5);\n"
-      "}\n";
-
-  Dart_Handle lib = TestCase::LoadTestScript(kScript, nullptr);
-  EXPECT_VALID(lib);
-
-  Dart_Handle value_a_result =
-      Dart_Invoke(lib, NewString("valueA"), 0, nullptr);
-  EXPECT_VALID(value_a_result);
-  Dart_Handle value_b_result =
-      Dart_Invoke(lib, NewString("valueB"), 0, nullptr);
-  EXPECT_VALID(value_b_result);
-
-  TransitionNativeToVM transition(Thread::Current());
-
-  const auto& value_a_dart = Instance::CheckedHandle(
-      Thread::Current()->zone(), Api::UnwrapHandle(value_a_result));
-  const auto& value_b_dart = Instance::CheckedHandle(
-      Thread::Current()->zone(), Api::UnwrapHandle(value_b_result));
-
-  const uint32_t canonicalize_hash_a = value_a_dart.CanonicalizeHash();
-  const uint32_t canonicalize_hash_b = value_b_dart.CanonicalizeHash();
-
-  bool success = canonicalize_hash_a != canonicalize_hash_b;
-
-  if (!success) {
-    LogBlock lb;
-    THR_Print("Hash collision between %s and %s\n", value_a_dart.ToCString(),
-              value_b_dart.ToCString());
-    THR_Print("VM CanonicalizeHash a %" Px32 " %" Pd32 "\n",
-              canonicalize_hash_a, canonicalize_hash_a);
-    THR_Print("VM CanonicalizeHash b %" Px32 " %" Pd32 "\n",
-              canonicalize_hash_b, canonicalize_hash_b);
-  }
-  EXPECT(success);
-}
-
 TEST_CASE(LinkedHashMap_iteration) {
   const char* kScript =
       "makeMap() {\n"
@@ -5126,14 +5068,461 @@
   EXPECT(!iterator.MoveNext());
 }
 
+template <class LinkedHashBase>
+static bool LinkedHashBaseEqual(const LinkedHashBase& map1,
+                                const LinkedHashBase& map2,
+                                bool print_diff,
+                                bool check_data = true) {
+  if (check_data) {
+    // Check data, only for non-nested.
+    const auto& data1 = Array::Handle(map1.data());
+    const auto& data2 = Array::Handle(map2.data());
+    const bool data_length_equal = data1.Length() == data2.Length();
+    bool data_equal = data_length_equal;
+    if (data_length_equal) {
+      auto& object1 = Instance::Handle();
+      auto& object2 = Instance::Handle();
+      for (intptr_t i = 0; i < data1.Length(); i++) {
+        object1 ^= data1.At(i);
+        object2 ^= data2.At(i);
+        data_equal &= object1.CanonicalizeEquals(object2);
+      }
+    }
+    if (!data_equal) {
+      if (print_diff) {
+        THR_Print("LinkedHashBaseEqual Data not equal.\n");
+        THR_Print("LinkedHashBaseEqual data1.length %" Pd " data1.length %" Pd
+                  " \n",
+                  data1.Length(), data2.Length());
+        auto& object1 = Instance::Handle();
+        for (intptr_t i = 0; i < data1.Length(); i++) {
+          object1 ^= data1.At(i);
+          THR_Print("LinkedHashBaseEqual data1[%" Pd "] %s\n", i,
+                    object1.ToCString());
+        }
+        for (intptr_t i = 0; i < data2.Length(); i++) {
+          object1 ^= data2.At(i);
+          THR_Print("LinkedHashBaseEqual data2[%" Pd "] %s\n", i,
+                    object1.ToCString());
+        }
+      }
+      return false;
+    }
+  }
+
+  // Check hashing.
+  intptr_t hash_mask1 = Smi::Value(map1.hash_mask());
+  EXPECT(!Integer::Handle(map2.hash_mask()).IsNull());
+  intptr_t hash_mask2 = Smi::Value(map2.hash_mask());
+  const bool hash_masks_equal = hash_mask1 == hash_mask2;
+  if (!hash_masks_equal) {
+    if (print_diff) {
+      THR_Print("LinkedHashBaseEqual Hash masks not equal.\n");
+      THR_Print("LinkedHashBaseEqual hash_mask1 %" Px " hash_mask2 %" Px " \n",
+                hash_mask1, hash_mask2);
+    }
+  }
+
+  // Check indices.
+  const auto& index1 = TypedData::Handle(map1.index());
+  const auto& index2 = TypedData::Handle(map2.index());
+  EXPECT(!index2.IsNull());
+  ASSERT(index1.ElementType() == kUint32ArrayElement);
+  ASSERT(index2.ElementType() == kUint32ArrayElement);
+  const intptr_t kElementSize = 4;
+  ASSERT(kElementSize == index1.ElementSizeInBytes());
+  const bool index_length_equal = index1.Length() == index2.Length();
+  bool index_equal = index_length_equal;
+  if (index_length_equal) {
+    for (intptr_t i = 0; i < index1.Length(); i++) {
+      const uint32_t index1_val = index1.GetUint32(i * kElementSize);
+      const uint32_t index2_val = index2.GetUint32(i * kElementSize);
+      index_equal &= index1_val == index2_val;
+    }
+  }
+  if (!index_equal && print_diff) {
+    THR_Print("LinkedHashBaseEqual Indices not equal.\n");
+    THR_Print("LinkedHashBaseEqual index1.length %" Pd " index2.length %" Pd
+              " \n",
+              index1.Length(), index2.Length());
+    for (intptr_t i = 0; i < index1.Length(); i++) {
+      const uint32_t index_val = index1.GetUint32(i * kElementSize);
+      THR_Print("LinkedHashBaseEqual index1[%" Pd "] %" Px32 "\n", i,
+                index_val);
+    }
+    for (intptr_t i = 0; i < index2.Length(); i++) {
+      const uint32_t index_val = index2.GetUint32(i * kElementSize);
+      THR_Print("LinkedHashBaseEqual index2[%" Pd "] %" Px32 "\n", i,
+                index_val);
+    }
+  }
+  return index_equal;
+}
+
+// Copies elements from data.
+static LinkedHashMapPtr ConstructImmutableMap(
+    const Array& input_data,
+    intptr_t used_data,
+    const TypeArguments& type_arguments) {
+  auto& map = LinkedHashMap::Handle(ImmutableLinkedHashMap::NewUninitialized());
+
+  const auto& data = Array::Handle(Array::New(input_data.Length()));
+  for (intptr_t i = 0; i < used_data; i++) {
+    data.SetAt(i, Object::Handle(input_data.At(i)));
+  }
+  map.set_data(data);
+  map.set_used_data(used_data);
+  map.SetTypeArguments(type_arguments);
+  map.set_deleted_keys(0);
+  map.ComputeAndSetHashMask();
+  map ^= map.Canonicalize(Thread::Current());
+
+  return map.ptr();
+}
+
+// Constructs an immutable hashmap from a mutable one in this test.
+TEST_CASE(ImmutableLinkedHashMap_vm) {
+  const char* kScript = R"(
+enum ExperimentalFlag {
+  alternativeInvalidationStrategy,
+  constFunctions,
+  constantUpdate2018,
+  constructorTearoffs,
+  controlFlowCollections,
+  extensionMethods,
+  extensionTypes,
+  genericMetadata,
+  nonNullable,
+  nonfunctionTypeAliases,
+  setLiterals,
+  spreadCollections,
+  testExperiment,
+  tripleShift,
+  valueClass,
+  variance,
+}
+
+final Map<ExperimentalFlag?, bool> expiredExperimentalFlagsNonConst = {
+  ExperimentalFlag.alternativeInvalidationStrategy: false,
+  ExperimentalFlag.constFunctions: false,
+  ExperimentalFlag.constantUpdate2018: true,
+  ExperimentalFlag.constructorTearoffs: false,
+  ExperimentalFlag.controlFlowCollections: true,
+  ExperimentalFlag.extensionMethods: false,
+  ExperimentalFlag.extensionTypes: false,
+  ExperimentalFlag.genericMetadata: false,
+  ExperimentalFlag.nonNullable: false,
+  ExperimentalFlag.nonfunctionTypeAliases: false,
+  ExperimentalFlag.setLiterals: true,
+  ExperimentalFlag.spreadCollections: true,
+  ExperimentalFlag.testExperiment: false,
+  ExperimentalFlag.tripleShift: false,
+  ExperimentalFlag.valueClass: false,
+  ExperimentalFlag.variance: false,
+};
+
+makeNonConstMap() {
+  return expiredExperimentalFlagsNonConst;
+}
+
+firstKey() {
+  return ExperimentalFlag.alternativeInvalidationStrategy;
+}
+
+firstKeyHashCode() {
+  return firstKey().hashCode;
+}
+
+firstKeyIdentityHashCode() {
+  return identityHashCode(firstKey());
+}
+
+bool lookupSpreadCollections(Map map) =>
+    map[ExperimentalFlag.spreadCollections];
+
+bool? lookupNull(Map map) => map[null];
+)";
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Dart_Handle non_const_result =
+      Dart_Invoke(lib, NewString("makeNonConstMap"), 0, NULL);
+  EXPECT_VALID(non_const_result);
+  Dart_Handle first_key_result =
+      Dart_Invoke(lib, NewString("firstKey"), 0, NULL);
+  EXPECT_VALID(first_key_result);
+  Dart_Handle first_key_hashcode_result =
+      Dart_Invoke(lib, NewString("firstKeyHashCode"), 0, NULL);
+  EXPECT_VALID(first_key_hashcode_result);
+  Dart_Handle first_key_identity_hashcode_result =
+      Dart_Invoke(lib, NewString("firstKeyIdentityHashCode"), 0, NULL);
+  EXPECT_VALID(first_key_identity_hashcode_result);
+
+  Dart_Handle const_argument;
+
+  {
+    TransitionNativeToVM transition(thread);
+    const auto& non_const_map = LinkedHashMap::Cast(
+        Object::Handle(Api::UnwrapHandle(non_const_result)));
+    const auto& non_const_type_args =
+        TypeArguments::Handle(non_const_map.GetTypeArguments());
+    const auto& non_const_data = Array::Handle(non_const_map.data());
+    const auto& const_map = LinkedHashMap::Handle(ConstructImmutableMap(
+        non_const_data, Smi::Value(non_const_map.used_data()),
+        non_const_type_args));
+    ASSERT(non_const_map.GetClassId() == kLinkedHashMapCid);
+    ASSERT(const_map.GetClassId() == kImmutableLinkedHashMapCid);
+    ASSERT(!non_const_map.IsCanonical());
+    ASSERT(const_map.IsCanonical());
+
+    const_argument = Api::NewHandle(thread, const_map.ptr());
+  }
+
+  Dart_Handle lookup_result = Dart_Invoke(
+      lib, NewString("lookupSpreadCollections"), 1, &const_argument);
+  EXPECT_VALID(lookup_result);
+  EXPECT_TRUE(lookup_result);
+
+  Dart_Handle lookup_null_result =
+      Dart_Invoke(lib, NewString("lookupNull"), 1, &const_argument);
+  EXPECT_VALID(lookup_null_result);
+  EXPECT_NULL(lookup_null_result);
+
+  {
+    TransitionNativeToVM transition(thread);
+    const auto& non_const_object =
+        Object::Handle(Api::UnwrapHandle(non_const_result));
+    const auto& non_const_map = LinkedHashMap::Cast(non_const_object);
+    const auto& const_object =
+        Object::Handle(Api::UnwrapHandle(const_argument));
+    const auto& const_map = LinkedHashMap::Cast(const_object);
+
+    EXPECT(non_const_map.GetClassId() != const_map.GetClassId());
+
+    // Check that the index is identical.
+    EXPECT(LinkedHashBaseEqual(non_const_map, const_map,
+                               /*print_diff=*/true));
+  }
+}
+
+static bool IsLinkedHashBase(const Object& object) {
+  return object.IsLinkedHashMap() || object.IsLinkedHashSet();
+}
+
+// Checks that the non-constant and constant HashMap and HashSets are equal.
+//
+// Expects a script with a methods named `nonConstValue`, `constValue`, and
+// `init`.
+template <class LinkedHashBase, int kMutableCid, int kImmutableCid>
+static void HashBaseNonConstEqualsConst(const char* script,
+                                        bool check_data = true) {
+  Dart_Handle lib = TestCase::LoadTestScript(script, NULL);
+  EXPECT_VALID(lib);
+  Dart_Handle init_result = Dart_Invoke(lib, NewString("init"), 0, NULL);
+  EXPECT_VALID(init_result);
+  Dart_Handle non_const_result =
+      Dart_Invoke(lib, NewString("nonConstValue"), 0, NULL);
+  EXPECT_VALID(non_const_result);
+  Dart_Handle const_result = Dart_Invoke(lib, NewString("constValue"), 0, NULL);
+  EXPECT_VALID(const_result);
+
+  TransitionNativeToVM transition(Thread::Current());
+  const auto& non_const_object =
+      Object::Handle(Api::UnwrapHandle(non_const_result));
+  const auto& const_object = Object::Handle(Api::UnwrapHandle(const_result));
+  non_const_object.IsLinkedHashMap();
+  EXPECT(IsLinkedHashBase(non_const_object));
+  if (!IsLinkedHashBase(non_const_object)) return;
+  const auto& non_const_value = LinkedHashBase::Cast(non_const_object);
+  EXPECT(IsLinkedHashBase(const_object));
+  if (!IsLinkedHashBase(const_object)) return;
+  const auto& const_value = LinkedHashBase::Cast(const_object);
+  EXPECT_EQ(non_const_value.GetClassId(), kMutableCid);
+  EXPECT_EQ(const_value.GetClassId(), kImmutableCid);
+  EXPECT(!non_const_value.IsCanonical());
+  EXPECT(const_value.IsCanonical());
+  EXPECT(LinkedHashBaseEqual(non_const_value, const_value,
+                             /*print_diff=*/true, check_data));
+}
+
+static void HashMapNonConstEqualsConst(const char* script,
+                                       bool check_data = true) {
+  HashBaseNonConstEqualsConst<LinkedHashMap, kLinkedHashMapCid,
+                              kImmutableLinkedHashMapCid>(script, check_data);
+}
+
+static void HashSetNonConstEqualsConst(const char* script,
+                                       bool check_data = true) {
+  HashBaseNonConstEqualsConst<LinkedHashSet, kLinkedHashSetCid,
+                              kImmutableLinkedHashSetCid>(script, check_data);
+}
+
+TEST_CASE(ImmutableLinkedHashMap_small) {
+  const char* kScript = R"(
+constValue() => const {1: 42, 'foo': 499, 2: 'bar'};
+
+nonConstValue() => {1: 42, 'foo': 499, 2: 'bar'};
+
+void init() {
+  constValue()[null];
+}
+)";
+  HashMapNonConstEqualsConst(kScript);
+}
+
+TEST_CASE(ImmutableLinkedHashMap_null) {
+  const char* kScript = R"(
+constValue() => const {1: 42, 'foo': 499, null: 'bar'};
+
+nonConstValue() => {1: 42, 'foo': 499, null: 'bar'};
+
+void init() {
+  constValue()[null];
+}
+)";
+  HashMapNonConstEqualsConst(kScript);
+}
+
+TEST_CASE(ImmutableLinkedHashMap_larger) {
+  const char* kScript = R"(
+enum ExperimentalFlag {
+  alternativeInvalidationStrategy,
+  constFunctions,
+  constantUpdate2018,
+  constructorTearoffs,
+  controlFlowCollections,
+  extensionMethods,
+  extensionTypes,
+  genericMetadata,
+  nonNullable,
+  nonfunctionTypeAliases,
+  setLiterals,
+  spreadCollections,
+  testExperiment,
+  tripleShift,
+  valueClass,
+  variance,
+}
+
+const Map<ExperimentalFlag, bool> expiredExperimentalFlags = {
+  ExperimentalFlag.alternativeInvalidationStrategy: false,
+  ExperimentalFlag.constFunctions: false,
+  ExperimentalFlag.constantUpdate2018: true,
+  ExperimentalFlag.constructorTearoffs: false,
+  ExperimentalFlag.controlFlowCollections: true,
+  ExperimentalFlag.extensionMethods: false,
+  ExperimentalFlag.extensionTypes: false,
+  ExperimentalFlag.genericMetadata: false,
+  ExperimentalFlag.nonNullable: false,
+  ExperimentalFlag.nonfunctionTypeAliases: false,
+  ExperimentalFlag.setLiterals: true,
+  ExperimentalFlag.spreadCollections: true,
+  ExperimentalFlag.testExperiment: false,
+  ExperimentalFlag.tripleShift: false,
+  ExperimentalFlag.valueClass: false,
+  ExperimentalFlag.variance: false,
+};
+
+final Map<ExperimentalFlag, bool> expiredExperimentalFlagsNonConst = {
+  ExperimentalFlag.alternativeInvalidationStrategy: false,
+  ExperimentalFlag.constFunctions: false,
+  ExperimentalFlag.constantUpdate2018: true,
+  ExperimentalFlag.constructorTearoffs: false,
+  ExperimentalFlag.controlFlowCollections: true,
+  ExperimentalFlag.extensionMethods: false,
+  ExperimentalFlag.extensionTypes: false,
+  ExperimentalFlag.genericMetadata: false,
+  ExperimentalFlag.nonNullable: false,
+  ExperimentalFlag.nonfunctionTypeAliases: false,
+  ExperimentalFlag.setLiterals: true,
+  ExperimentalFlag.spreadCollections: true,
+  ExperimentalFlag.testExperiment: false,
+  ExperimentalFlag.tripleShift: false,
+  ExperimentalFlag.valueClass: false,
+  ExperimentalFlag.variance: false,
+};
+
+constValue() => expiredExperimentalFlags;
+
+nonConstValue() => expiredExperimentalFlagsNonConst;
+
+void init() {
+  constValue()[null];
+}
+)";
+  HashMapNonConstEqualsConst(kScript);
+}
+
+TEST_CASE(ImmutableLinkedHashMap_nested) {
+  const char* kScript = R"(
+enum Abi {
+  wordSize64,
+  wordSize32Align32,
+  wordSize32Align64,
+}
+
+enum NativeType {
+  kNativeType,
+  kNativeInteger,
+  kNativeDouble,
+  kPointer,
+  kNativeFunction,
+  kInt8,
+  kInt16,
+  kInt32,
+  kInt64,
+  kUint8,
+  kUint16,
+  kUint32,
+  kUnit64,
+  kIntptr,
+  kFloat,
+  kDouble,
+  kVoid,
+  kOpaque,
+  kStruct,
+  kHandle,
+}
+
+const nonSizeAlignment = <Abi, Map<NativeType, int>>{
+  Abi.wordSize64: {},
+  Abi.wordSize32Align32: {
+    NativeType.kDouble: 4,
+    NativeType.kInt64: 4,
+    NativeType.kUnit64: 4
+  },
+  Abi.wordSize32Align64: {},
+};
+
+final nonSizeAlignmentNonConst = <Abi, Map<NativeType, int>>{
+  Abi.wordSize64: {},
+  Abi.wordSize32Align32: {
+    NativeType.kDouble: 4,
+    NativeType.kInt64: 4,
+    NativeType.kUnit64: 4
+  },
+  Abi.wordSize32Align64: {},
+};
+
+constValue() => nonSizeAlignment;
+
+nonConstValue() => nonSizeAlignmentNonConst;
+
+void init() {
+  constValue()[null];
+}
+)";
+  HashMapNonConstEqualsConst(kScript, false);
+}
+
 TEST_CASE(LinkedHashSet_iteration) {
-  const char* kScript =
-      "makeSet() {\n"
-      "  var set = {'x', 'y', 'z', 'w'};\n"
-      "  set.remove('y');\n"
-      "  set.remove('w');\n"
-      "  return set;\n"
-      "}";
+  const char* kScript = R"(
+makeSet() {
+  var set = {'x', 'y', 'z', 'w'};
+  set.remove('y');
+  set.remove('w');
+  return set;
+}
+)";
   Dart_Handle h_lib = TestCase::LoadTestScript(kScript, NULL);
   EXPECT_VALID(h_lib);
   Dart_Handle h_result = Dart_Invoke(h_lib, NewString("makeSet"), 0, NULL);
@@ -5161,6 +5550,163 @@
   EXPECT(!iterator.MoveNext());
 }
 
+// Copies elements from data.
+static LinkedHashSetPtr ConstructImmutableSet(
+    const Array& input_data,
+    intptr_t used_data,
+    const TypeArguments& type_arguments) {
+  auto& set = LinkedHashSet::Handle(ImmutableLinkedHashSet::NewUninitialized());
+
+  const auto& data = Array::Handle(Array::New(input_data.Length()));
+  for (intptr_t i = 0; i < used_data; i++) {
+    data.SetAt(i, Object::Handle(input_data.At(i)));
+  }
+  set.set_data(data);
+  set.set_used_data(used_data);
+  set.SetTypeArguments(type_arguments);
+  set.set_deleted_keys(0);
+  set.ComputeAndSetHashMask();
+  set ^= set.Canonicalize(Thread::Current());
+
+  return set.ptr();
+}
+
+TEST_CASE(ImmutableLinkedHashSet_vm) {
+  const char* kScript = R"(
+makeNonConstSet() {
+  return {1, 2, 3, 5, 8, 13};
+}
+
+bool containsFive(Set set) => set.contains(5);
+)";
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Dart_Handle non_const_result =
+      Dart_Invoke(lib, NewString("makeNonConstSet"), 0, NULL);
+  EXPECT_VALID(non_const_result);
+
+  Dart_Handle const_argument;
+
+  {
+    TransitionNativeToVM transition(thread);
+    const auto& non_const_object =
+        Object::Handle(Api::UnwrapHandle(non_const_result));
+    const auto& non_const_set = LinkedHashSet::Cast(non_const_object);
+    ASSERT(non_const_set.GetClassId() == kLinkedHashSetCid);
+    ASSERT(!non_const_set.IsCanonical());
+
+    const auto& non_const_data = Array::Handle(non_const_set.data());
+    const auto& non_const_type_args =
+        TypeArguments::Handle(non_const_set.GetTypeArguments());
+    const auto& const_set = LinkedHashSet::Handle(ConstructImmutableSet(
+        non_const_data, Smi::Value(non_const_set.used_data()),
+        non_const_type_args));
+    ASSERT(const_set.GetClassId() == kImmutableLinkedHashSetCid);
+    ASSERT(const_set.IsCanonical());
+
+    const_argument = Api::NewHandle(thread, const_set.ptr());
+  }
+
+  Dart_Handle contains_5_result =
+      Dart_Invoke(lib, NewString("containsFive"), 1, &const_argument);
+  EXPECT_VALID(contains_5_result);
+  EXPECT_TRUE(contains_5_result);
+
+  {
+    TransitionNativeToVM transition(thread);
+    const auto& non_const_object =
+        Object::Handle(Api::UnwrapHandle(non_const_result));
+    const auto& non_const_set = LinkedHashSet::Cast(non_const_object);
+    const auto& const_object =
+        Object::Handle(Api::UnwrapHandle(const_argument));
+    const auto& const_set = LinkedHashSet::Cast(const_object);
+
+    EXPECT(non_const_set.GetClassId() != const_set.GetClassId());
+
+    // Check that the index is identical.
+    EXPECT(LinkedHashBaseEqual(non_const_set, const_set,
+                               /*print_diff=*/true));
+  }
+}
+
+TEST_CASE(ImmutableLinkedHashSet_small) {
+  const char* kScript = R"(
+constValue() => const {1, 2, 3, 5, 8, 13};
+
+nonConstValue() => {1, 2, 3, 5, 8, 13};
+
+void init() {
+  constValue().contains(null);
+}
+)";
+  HashSetNonConstEqualsConst(kScript);
+}
+
+TEST_CASE(ImmutableLinkedHashSet_larger) {
+  const char* kScript = R"(
+const Set<String> tokensThatMayFollowTypeArg = {
+  '(',
+  ')',
+  ']',
+  '}',
+  ':',
+  ';',
+  ',',
+  '.',
+  '?',
+  '==',
+  '!=',
+  '..',
+  '?.',
+  '\?\?',
+  '?..',
+  '&',
+  '|',
+  '^',
+  '+',
+  '*',
+  '%',
+  '/',
+  '~/'
+};
+
+final Set<String> tokensThatMayFollowTypeArgNonConst = {
+  '(',
+  ')',
+  ']',
+  '}',
+  ':',
+  ';',
+  ',',
+  '.',
+  '?',
+  '==',
+  '!=',
+  '..',
+  '?.',
+  '\?\?',
+  '?..',
+  '&',
+  '|',
+  '^',
+  '+',
+  '*',
+  '%',
+  '/',
+  '~/'
+};
+
+constValue() => tokensThatMayFollowTypeArg;
+
+nonConstValue() => tokensThatMayFollowTypeArgNonConst;
+
+void init() {
+  constValue().contains(null);
+}
+)";
+  HashSetNonConstEqualsConst(kScript);
+}
+
 static void CheckConcatAll(const String* data[], intptr_t n) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
diff --git a/runtime/vm/os_thread.cc b/runtime/vm/os_thread.cc
index a3d8b32..d190c80 100644
--- a/runtime/vm/os_thread.cc
+++ b/runtime/vm/os_thread.cc
@@ -20,9 +20,7 @@
 Mutex* OSThread::thread_list_lock_ = NULL;
 bool OSThread::creation_enabled_ = false;
 
-#if defined(HAS_C11_THREAD_LOCAL)
 thread_local ThreadState* OSThread::current_vm_thread_ = NULL;
-#endif
 
 OSThread::OSThread()
     : BaseThread(true),
@@ -282,14 +280,12 @@
   // Provides thread-local destructors.
   SetThreadLocal(thread_key_, reinterpret_cast<uword>(value));
 
-#if defined(HAS_C11_THREAD_LOCAL)
   // Allows the C compiler more freedom to optimize.
   if ((value != NULL) && !value->is_os_thread()) {
     current_vm_thread_ = static_cast<Thread*>(value);
   } else {
     current_vm_thread_ = NULL;
   }
-#endif
 }
 
 OSThreadIterator::OSThreadIterator() {
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index 7601cdc..b1019e8 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -12,11 +12,6 @@
 #include "vm/allocation.h"
 #include "vm/globals.h"
 
-// On iOS, thread_local requires iOS 9+.
-#if !DART_HOST_OS_IOS
-#define HAS_C11_THREAD_LOCAL 1
-#endif
-
 // Declare the OS-specific types ahead of defining the generic classes.
 #if defined(DART_HOST_OS_ANDROID)
 #include "vm/os_thread_android.h"
@@ -182,9 +177,7 @@
   }
   static void SetCurrent(OSThread* current) { SetCurrentTLS(current); }
 
-#if defined(HAS_C11_THREAD_LOCAL)
   static ThreadState* CurrentVMThread() { return current_vm_thread_; }
-#endif
 
   // TODO(5411455): Use flag to override default value and Validate the
   // stack size by querying OS.
@@ -308,9 +301,7 @@
   static OSThread* thread_list_head_;
   static bool creation_enabled_;
 
-#if defined(HAS_C11_THREAD_LOCAL)
   static thread_local ThreadState* current_vm_thread_;
-#endif
 
   friend class IsolateGroup;  // to access set_thread(Thread*).
   friend class OSThreadIterator;
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 2d8b2a5..aab5dec 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -24,6 +24,7 @@
 #include "vm/signal_handler.h"
 #include "vm/simulator.h"
 #include "vm/stack_frame.h"
+#include "vm/timeline.h"
 #include "vm/version.h"
 
 namespace dart {
@@ -185,8 +186,10 @@
                                      intptr_t samples_per_block) {
   const intptr_t size = Utils::RoundUp(
       blocks * samples_per_block * sizeof(Sample), VirtualMemory::PageSize());
-  const bool kNotExecutable = false;
-  memory_ = VirtualMemory::Allocate(size, kNotExecutable, "dart-profiler");
+  const bool executable = false;
+  const bool compressed = false;
+  memory_ =
+      VirtualMemory::Allocate(size, executable, compressed, "dart-profiler");
   if (memory_ == NULL) {
     OUT_OF_MEMORY();
   }
@@ -241,6 +244,23 @@
                      Dart_Timeline_Event_Duration, 0, nullptr, nullptr);
 }
 
+ProcessedSampleBuffer* SampleBlockListProcessor::BuildProcessedSampleBuffer(
+    SampleFilter* filter,
+    ProcessedSampleBuffer* buffer) {
+  ASSERT(filter != NULL);
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+
+  if (buffer == nullptr) {
+    buffer = new (zone) ProcessedSampleBuffer();
+  }
+  while (head_ != nullptr) {
+    head_->BuildProcessedSampleBuffer(filter, buffer);
+    head_ = head_->next_free_;
+  }
+  return buffer;
+}
+
 ProcessedSampleBuffer* SampleBlockBuffer::BuildProcessedSampleBuffer(
     SampleFilter* filter,
     ProcessedSampleBuffer* buffer) {
@@ -341,8 +361,10 @@
 AllocationSampleBuffer::AllocationSampleBuffer(intptr_t capacity) {
   const intptr_t size =
       Utils::RoundUp(capacity * sizeof(Sample), VirtualMemory::PageSize());
-  const bool kNotExecutable = false;
-  memory_ = VirtualMemory::Allocate(size, kNotExecutable, "dart-profiler");
+  const bool executable = false;
+  const bool compressed = false;
+  memory_ =
+      VirtualMemory::Allocate(size, executable, compressed, "dart-profiler");
   if (memory_ == NULL) {
     OUT_OF_MEMORY();
   }
@@ -1548,13 +1570,17 @@
   // Clear.
   code_objects_.Clear();
 
+  thread->CheckForSafepoint();
   // Add all found Code objects.
   {
+    TimelineBeginEndScope tl(Timeline::GetIsolateStream(),
+                             "CodeLookupTable::Build HeapIterationScope");
     HeapIterationScope iteration(thread);
     CodeLookupTableBuilder cltb(this);
     iteration.IterateVMIsolateObjects(&cltb);
     iteration.IterateOldObjects(&cltb);
   }
+  thread->CheckForSafepoint();
 
   // Sort by entry.
   code_objects_.Sort(CodeDescriptor::Compare);
@@ -1628,6 +1654,7 @@
 
   const intptr_t length = capacity();
   for (intptr_t i = 0; i < length; i++) {
+    thread->CheckForSafepoint();
     Sample* sample = At(i);
     if (sample->ignore_sample()) {
       // Bad sample.
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 5455e7b..c68c792 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -767,6 +767,7 @@
   SampleBlock* next_free_ = nullptr;
 
  private:
+  friend class SampleBlockListProcessor;
   friend class SampleBlockBuffer;
   friend class Isolate;
 
@@ -873,6 +874,20 @@
   DISALLOW_COPY_AND_ASSIGN(SampleBlockBuffer);
 };
 
+class SampleBlockListProcessor : public ProcessedSampleBufferBuilder {
+ public:
+  explicit SampleBlockListProcessor(SampleBlock* head) : head_(head) {}
+
+  virtual ProcessedSampleBuffer* BuildProcessedSampleBuffer(
+      SampleFilter* filter,
+      ProcessedSampleBuffer* buffer = nullptr);
+
+ private:
+  SampleBlock* head_;
+
+  DISALLOW_COPY_AND_ASSIGN(SampleBlockListProcessor);
+};
+
 class AllocationSampleBuffer : public SampleBuffer {
  public:
   explicit AllocationSampleBuffer(intptr_t capacity = 60000);
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 6836e9d..edaafe7 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -1013,6 +1013,7 @@
       RegisterLiveProfileCode(new ProfileCode(
           ProfileCode::kDartCode, code.PayloadStart(),
           code.PayloadStart() + code.Size(), code.compile_timestamp(), code));
+      thread_->CheckForSafepoint();
     }
 
     // Iterate over samples.
@@ -1047,6 +1048,7 @@
       }
 
       TickExitFrame(sample->vm_tag(), sample_index, sample);
+      thread_->CheckForSafepoint();
     }
     SanitizeMinMaxTimes();
   }
@@ -1095,18 +1097,21 @@
       ProfileCode* code = live_table->At(i);
       ASSERT(code != NULL);
       code->SetFunctionAndName(function_table);
+      thread_->CheckForSafepoint();
     }
 
     for (intptr_t i = 0; i < dead_table->length(); i++) {
       ProfileCode* code = dead_table->At(i);
       ASSERT(code != NULL);
       code->SetFunctionAndName(function_table);
+      thread_->CheckForSafepoint();
     }
 
     for (intptr_t i = 0; i < tag_table->length(); i++) {
       ProfileCode* code = tag_table->At(i);
       ASSERT(code != NULL);
       code->SetFunctionAndName(function_table);
+      thread_->CheckForSafepoint();
     }
   }
 
@@ -1725,6 +1730,7 @@
 
 void Profile::PrintProfileJSON(JSONObject* obj, bool include_code_samples) {
   ScopeTimer sw("Profile::PrintProfileJSON", FLAG_trace_profiler);
+  Thread* thread = Thread::Current();
   obj->AddProperty("type", "CpuSamples");
   PrintHeaderJSON(obj);
   if (include_code_samples) {
@@ -1733,16 +1739,19 @@
       ProfileCode* code = live_code_->At(i);
       ASSERT(code != NULL);
       code->PrintToJSONArray(&codes);
+      thread->CheckForSafepoint();
     }
     for (intptr_t i = 0; i < dead_code_->length(); i++) {
       ProfileCode* code = dead_code_->At(i);
       ASSERT(code != NULL);
       code->PrintToJSONArray(&codes);
+      thread->CheckForSafepoint();
     }
     for (intptr_t i = 0; i < tag_code_->length(); i++) {
       ProfileCode* code = tag_code_->At(i);
       ASSERT(code != NULL);
       code->PrintToJSONArray(&codes);
+      thread->CheckForSafepoint();
     }
   }
 
@@ -1752,9 +1761,11 @@
       ProfileFunction* function = functions_->At(i);
       ASSERT(function != NULL);
       function->PrintToJSONArray(&functions);
+      thread->CheckForSafepoint();
     }
   }
   PrintSamplesJSON(obj, include_code_samples);
+  thread->CheckForSafepoint();
 }
 
 void ProfilerService::PrintJSONImpl(Thread* thread,
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index b79c6b9..2deada7 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -174,7 +174,7 @@
         break;
       }
 #undef SIZE_FROM_CLASS
-    case kFfiPointerCid:
+    case kPointerCid:
       instance_size = Pointer::InstanceSize();
       break;
     case kTypeArgumentsCid: {
@@ -222,13 +222,13 @@
     case kFreeListElement: {
       uword addr = UntaggedObject::ToAddr(this);
       FreeListElement* element = reinterpret_cast<FreeListElement*>(addr);
-      instance_size = element->HeapSize();
+      instance_size = element->HeapSize(tags);
       break;
     }
     case kForwardingCorpse: {
       uword addr = UntaggedObject::ToAddr(this);
       ForwardingCorpse* element = reinterpret_cast<ForwardingCorpse*>(addr);
-      instance_size = element->HeapSize();
+      instance_size = element->HeapSize(tags);
       break;
     }
     case kWeakSerializationReferenceCid: {
@@ -327,17 +327,6 @@
       size = UntaggedInstance::VisitInstancePointers(raw_obj, visitor);
       break;
     }
-    case kFfiPointerCid: {
-      PointerPtr raw_obj = static_cast<PointerPtr>(this);
-      size = UntaggedPointer::VisitPointerPointers(raw_obj, visitor);
-      break;
-    }
-    case kFfiDynamicLibraryCid: {
-      DynamicLibraryPtr raw_obj = static_cast<DynamicLibraryPtr>(this);
-      size =
-          UntaggedDynamicLibrary::VisitDynamicLibraryPointers(raw_obj, visitor);
-      break;
-    }
 #define RAW_VISITPOINTERS(clazz) case kFfi##clazz##Cid:
       CLASS_LIST_FFI_TYPE_MARKER(RAW_VISITPOINTERS) {
         // NativeType do not have any fields or type arguments.
@@ -578,7 +567,7 @@
                             Smi::Value(raw_obj->untag()->length()))
 VARIABLE_COMPRESSED_VISITOR(LocalVarDescriptors, raw_obj->untag()->num_entries_)
 VARIABLE_COMPRESSED_VISITOR(ExceptionHandlers, raw_obj->untag()->num_entries_)
-VARIABLE_VISITOR(Context, raw_obj->untag()->num_variables_)
+VARIABLE_COMPRESSED_VISITOR(Context, raw_obj->untag()->num_variables_)
 VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag()->length()))
 VARIABLE_COMPRESSED_VISITOR(
     TypedData,
@@ -727,6 +716,18 @@
   return UntaggedArray::VisitArrayPointers(raw_obj, visitor);
 }
 
+intptr_t UntaggedImmutableLinkedHashMap::VisitImmutableLinkedHashMapPointers(
+    ImmutableLinkedHashMapPtr raw_obj,
+    ObjectPointerVisitor* visitor) {
+  return UntaggedLinkedHashMap::VisitLinkedHashMapPointers(raw_obj, visitor);
+}
+
+intptr_t UntaggedImmutableLinkedHashSet::VisitImmutableLinkedHashSetPointers(
+    ImmutableLinkedHashSetPtr raw_obj,
+    ObjectPointerVisitor* visitor) {
+  return UntaggedLinkedHashSet::VisitLinkedHashSetPointers(raw_obj, visitor);
+}
+
 void UntaggedObject::RememberCard(ObjectPtr const* slot) {
   OldPage::Of(static_cast<ObjectPtr>(this))->RememberCard(slot);
 }
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 5fd0641..ae7d7a9 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -317,10 +317,9 @@
     ASSERT(IsOldObject());
     return !tags_.Read<OldAndNotRememberedBit>();
   }
-  void SetRememberedBit() {
-    ASSERT(!IsRemembered());
+  bool TryAcquireRememberedBit() {
     ASSERT(!IsCardRemembered());
-    tags_.UpdateBool<OldAndNotRememberedBit>(false);
+    return tags_.TryClear<OldAndNotRememberedBit>();
   }
   void ClearRememberedBit() {
     ASSERT(IsOldObject());
@@ -328,10 +327,10 @@
   }
 
   DART_FORCE_INLINE
-  void AddToRememberedSet(Thread* thread) {
-    ASSERT(!this->IsRemembered());
-    this->SetRememberedBit();
-    thread->StoreBufferAddObject(ObjectPtr(this));
+  void EnsureInRememberedSet(Thread* thread) {
+    if (TryAcquireRememberedBit()) {
+      thread->StoreBufferAddObject(ObjectPtr(this));
+    }
   }
 
   bool IsCardRemembered() const { return tags_.Read<CardRememberedBit>(); }
@@ -665,7 +664,7 @@
       if (value->IsNewObject()) {
         // Generational barrier: record when a store creates an
         // old-and-not-remembered -> new reference.
-        AddToRememberedSet(thread);
+        EnsureInRememberedSet(thread);
       } else {
         // Incremental barrier: record when a store creates an
         // old -> old-and-not-marked reference.
@@ -695,11 +694,9 @@
       if (value->IsNewObject()) {
         // Generational barrier: record when a store creates an
         // old-and-not-remembered -> new reference.
-        ASSERT(!this->IsRemembered());
         if (this->IsCardRemembered()) {
           RememberCard(addr);
-        } else {
-          this->SetRememberedBit();
+        } else if (this->TryAcquireRememberedBit()) {
           thread->StoreBufferAddObject(static_cast<ObjectPtr>(this));
         }
       } else {
@@ -2173,10 +2170,10 @@
 
   int32_t num_variables_;
 
-  POINTER_FIELD(ContextPtr, parent)
+  COMPRESSED_POINTER_FIELD(ContextPtr, parent)
   VISIT_FROM(parent)
   // Variable length data follows here.
-  VARIABLE_POINTER_FIELDS(ObjectPtr, element, data)
+  COMPRESSED_VARIABLE_POINTER_FIELDS(ObjectPtr, element, data)
 
   friend class Object;
   friend void UpdateLengthField(intptr_t,
@@ -2943,6 +2940,8 @@
 
   friend class LinkedHashMapSerializationCluster;
   friend class LinkedHashMapDeserializationCluster;
+  friend class LinkedHashSetSerializationCluster;
+  friend class LinkedHashSetDeserializationCluster;
   friend class CodeSerializationCluster;
   friend class CodeDeserializationCluster;
   friend class Deserializer;
@@ -2951,6 +2950,7 @@
   friend class GrowableObjectArray;
   friend class LinkedHashMap;
   friend class UntaggedLinkedHashMap;
+  friend class UntaggedImmutableLinkedHashMap;
   friend class Object;
   friend class ICData;            // For high performance access.
   friend class SubtypeTestCache;  // For high performance access.
@@ -2999,10 +2999,22 @@
 
 class UntaggedLinkedHashMap : public UntaggedLinkedHashBase {
   RAW_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap);
+
+  friend class UntaggedImmutableLinkedHashMap;
+};
+
+class UntaggedImmutableLinkedHashMap : public UntaggedLinkedHashMap {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableLinkedHashMap);
 };
 
 class UntaggedLinkedHashSet : public UntaggedLinkedHashBase {
   RAW_HEAP_OBJECT_IMPLEMENTATION(LinkedHashSet);
+
+  friend class UntaggedImmutableLinkedHashSet;
+};
+
+class UntaggedImmutableLinkedHashSet : public UntaggedLinkedHashSet {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableLinkedHashSet);
 };
 
 class UntaggedFloat32x4 : public UntaggedInstance {
diff --git a/runtime/vm/regexp_interpreter.cc b/runtime/vm/regexp_interpreter.cc
index 610ac03..e8b3a47 100644
--- a/runtime/vm/regexp_interpreter.cc
+++ b/runtime/vm/regexp_interpreter.cc
@@ -143,8 +143,10 @@
     // https://github.com/flutter/flutter/issues/29007 for examples.
     // So intead we directly ask OS to provide us memory.
     if (memory_ == nullptr) {
+      const bool executable = false;
+      const bool compressed = false;
       memory_ = std::unique_ptr<VirtualMemory>(VirtualMemory::Allocate(
-          sizeof(intptr_t) * kBacktrackStackSize, /*is_executable=*/false,
+          sizeof(intptr_t) * kBacktrackStackSize, executable, compressed,
           "regexp-backtrack-stack"));
     }
   }
diff --git a/runtime/vm/reusable_handles.h b/runtime/vm/reusable_handles.h
index e2ac116..5fcb2f7 100644
--- a/runtime/vm/reusable_handles.h
+++ b/runtime/vm/reusable_handles.h
@@ -32,16 +32,13 @@
 
 #if defined(DEBUG)
 #define REUSABLE_SCOPE(name)                                                   \
-  class Reusable##name##HandleScope : public ValueObject {                     \
+  class Reusable##name##HandleScope : public StackResource {                   \
    public:                                                                     \
-    explicit Reusable##name##HandleScope(Thread* thread) : thread_(thread) {   \
+    explicit Reusable##name##HandleScope(Thread* thread = Thread::Current())   \
+        : StackResource(thread), thread_(thread) {                             \
       ASSERT(!thread->reusable_##name##_handle_scope_active());                \
       thread->set_reusable_##name##_handle_scope_active(true);                 \
     }                                                                          \
-    Reusable##name##HandleScope() : thread_(Thread::Current()) {               \
-      ASSERT(!thread_->reusable_##name##_handle_scope_active());               \
-      thread_->set_reusable_##name##_handle_scope_active(true);                \
-    }                                                                          \
     ~Reusable##name##HandleScope() {                                           \
       ASSERT(thread_->reusable_##name##_handle_scope_active());                \
       thread_->set_reusable_##name##_handle_scope_active(false);               \
@@ -60,10 +57,8 @@
 #define REUSABLE_SCOPE(name)                                                   \
   class Reusable##name##HandleScope : public ValueObject {                     \
    public:                                                                     \
-    explicit Reusable##name##HandleScope(Thread* thread)                       \
+    explicit Reusable##name##HandleScope(Thread* thread = Thread::Current())   \
         : handle_(thread->name##_handle_) {}                                   \
-    Reusable##name##HandleScope()                                              \
-        : handle_(Thread::Current()->name##_handle_) {}                        \
     ~Reusable##name##HandleScope() { handle_->ptr_ = name::null(); }           \
     name& Handle() const {                                                     \
       ASSERT(handle_ != NULL);                                                 \
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 5ef43b9..54e4108 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -301,9 +301,22 @@
   Exceptions::ThrowArgumentError(value);
 }
 
-DEFINE_RUNTIME_ENTRY(DoubleToInteger, 0) {
+DEFINE_RUNTIME_ENTRY(DoubleToInteger, 1) {
   // Unboxed value is passed through a dedicated slot in Thread.
-  const double val = arguments.thread()->unboxed_double_runtime_arg();
+  double val = arguments.thread()->unboxed_double_runtime_arg();
+  const Smi& recognized_kind = Smi::CheckedHandle(zone, arguments.ArgAt(0));
+  switch (recognized_kind.Value()) {
+    case MethodRecognizer::kDoubleToInteger:
+      break;
+    case MethodRecognizer::kDoubleFloorToInt:
+      val = floor(val);
+      break;
+    case MethodRecognizer::kDoubleCeilToInt:
+      val = ceil(val);
+      break;
+    default:
+      UNREACHABLE();
+  }
   arguments.SetReturn(Integer::Handle(zone, DoubleToInteger(zone, val)));
 }
 
@@ -509,7 +522,7 @@
   }
 
   if (add_to_remembered_set) {
-    object->untag()->AddToRememberedSet(thread);
+    object->untag()->EnsureInRememberedSet(thread);
   }
 
   // For incremental write barrier elimination, we need to ensure that the
@@ -1932,13 +1945,6 @@
   // The target didn't change, so we can stay inside monomorphic state.
   if (ic_data.NumberOfChecksIs(1) &&
       (ic_data.GetReceiverClassIdAt(0) == receiver().GetClassId())) {
-    // We got a miss because the old target code got disabled.
-    // Notice the reverse is not true: If the old code got disabled, the call
-    // might still have a different receiver then last time and possibly a
-    // different target.
-    ASSERT(miss_handler_ == MissHandler::kFixCallersTargetMonomorphic ||
-           !IsolateGroup::Current()->ContainsOnlyOneIsolate());
-
     // No need to update ICData - it's already up-to-date.
 
     if (FLAG_trace_ic) {
@@ -3629,6 +3635,9 @@
   if (thread->no_callback_scope_depth() != 0) {
     FATAL("Cannot invoke native callback when API callbacks are prohibited.");
   }
+  if (thread->is_unwind_in_progress()) {
+    FATAL("Cannot invoke native callback while unwind error propagates.");
+  }
   if (!thread->IsMutatorThread()) {
     FATAL("Native callbacks must be invoked on the mutator thread.");
   }
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 2b43622..1cc5a5c 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1106,7 +1106,7 @@
   }
 }
 
-void Service::HandleEvent(ServiceEvent* event) {
+void Service::HandleEvent(ServiceEvent* event, bool enter_safepoint) {
   if (event->stream_info() != NULL && !event->stream_info()->enabled()) {
     if (FLAG_warn_on_pause_with_no_debugger && event->IsPause()) {
       // If we are about to pause a running program which has no
@@ -1133,7 +1133,8 @@
     params.AddProperty("streamId", stream_id);
     params.AddProperty("event", event);
   }
-  PostEvent(event->isolate(), stream_id, event->KindAsCString(), &js);
+  PostEvent(event->isolate(), stream_id, event->KindAsCString(), &js,
+            enter_safepoint);
 
   // Post event to the native Service Stream handlers if set.
   if (event->stream_info() != nullptr &&
@@ -1147,13 +1148,28 @@
 void Service::PostEvent(Isolate* isolate,
                         const char* stream_id,
                         const char* kind,
-                        JSONStream* event) {
-  ASSERT(stream_id != NULL);
-  ASSERT(kind != NULL);
-  ASSERT(event != NULL);
+                        JSONStream* event,
+                        bool enter_safepoint) {
+  if (enter_safepoint) {
+    // Enter a safepoint so we don't block the mutator while processing
+    // large events.
+    TransitionToNative transition(Thread::Current());
+    PostEventImpl(isolate, stream_id, kind, event);
+    return;
+  }
+  PostEventImpl(isolate, stream_id, kind, event);
+}
+
+void Service::PostEventImpl(Isolate* isolate,
+                            const char* stream_id,
+                            const char* kind,
+                            JSONStream* event) {
+  ASSERT(stream_id != nullptr);
+  ASSERT(kind != nullptr);
+  ASSERT(event != nullptr);
 
   if (FLAG_trace_service) {
-    if (isolate != NULL) {
+    if (isolate != nullptr) {
       OS::PrintErr(
           "vm-service: Pushing ServiceEvent(isolate='%s', "
           "isolateId='" ISOLATE_SERVICE_ID_FORMAT_STRING
@@ -2721,6 +2737,7 @@
   const GrowableObjectArray& type_params_names =
       GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
   String& klass_name = String::Handle(zone);
+  String& method_name = String::Handle(zone);
   String& library_uri = String::Handle(zone);
   bool isStatic = false;
 
@@ -2746,11 +2763,13 @@
         klass_name = cls.UserVisibleName();
       }
       library_uri = Library::Handle(zone, cls.library()).url();
+      method_name = frame->function().UserVisibleName();
       isStatic = true;
     } else {
       const Class& method_cls = Class::Handle(zone, frame->function().origin());
       library_uri = Library::Handle(zone, method_cls.library()).url();
       klass_name = method_cls.UserVisibleName();
+      method_name = frame->function().UserVisibleName();
       isStatic = false;
     }
   } else {
@@ -2829,6 +2848,9 @@
   if (!klass_name.IsNull()) {
     report.AddProperty("klass", klass_name.ToCString());
   }
+  if (!method_name.IsNull()) {
+    report.AddProperty("method", method_name.ToCString());
+  }
   report.AddProperty("isStatic", isStatic);
 }
 
@@ -2877,6 +2899,7 @@
     new StringParameter("libraryUri", true),
     new StringParameter("klass", false),
     new BoolParameter("isStatic", false),
+    new StringParameter("method", false),
     NULL,
 };
 
@@ -2922,7 +2945,8 @@
           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);
+          js->LookupParam("libraryUri"), js->LookupParam("klass"),
+          js->LookupParam("method"), is_static);
 
   if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
     js->PrintError(kExpressionCompilationError, "%s", compilation_result.error);
@@ -4275,10 +4299,17 @@
       // Skipping a few paths to avoid double counting:
       // (deleted) - memfd dual mapping in Dart heap
       // [heap] - sbrk area, should already included with malloc
-      // <empty> - anonymous mappings, mostly in Dart heap
+      // <empty> - anonymous mappings, mostly in Dart heap (Linux)
+      // [anon:dart-*] - as labelled (Android)
       if ((strcmp(property, "Rss:") == 0) && (size != 0) &&
           (strcmp(path, "(deleted)") != 0) && (strcmp(path, "[heap]") != 0) &&
-          (strcmp(path, "") != 0)) {
+          (strcmp(path, "") != 0) &&
+          (strcmp(path, "[anon:dart-newspace]") != 0) &&
+          (strcmp(path, "[anon:dart-oldspace]") != 0) &&
+          (strcmp(path, "[anon:dart-codespace]") != 0) &&
+          (strcmp(path, "[anon:dart-profiler]") != 0) &&
+          (strcmp(path, "[anon:dart-timeline]") != 0) &&
+          (strcmp(path, "[anon:dart-zone]") != 0)) {
         bool updated = false;
         for (intptr_t i = 0; i < mappings.length(); i++) {
           if (strcmp(mappings[i].path, path) == 0) {
@@ -5226,7 +5257,7 @@
   {                                                                            \
     JSONArray internals(&map, #clazz);                                         \
     DEFINE_ADD_VALUE_F_CID(TypedData##clazz)                                   \
-    DEFINE_ADD_VALUE_F_CID(TypedData##clazz)                                   \
+    DEFINE_ADD_VALUE_F_CID(TypedData##clazz##View)                             \
     DEFINE_ADD_VALUE_F_CID(ExternalTypedData##clazz)                           \
   }
   CLASS_LIST_TYPED_DATA(DEFINE_ADD_MAP_KEY)
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 38583b1..6d32257 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -98,7 +98,7 @@
   // Handles a message which is directed to a particular isolate.
   static ErrorPtr HandleIsolateMessage(Isolate* isolate, const Array& message);
 
-  static void HandleEvent(ServiceEvent* event);
+  static void HandleEvent(ServiceEvent* event, bool enter_safepoint = true);
 
   static void RegisterIsolateEmbedderCallback(
       const char* name,
@@ -231,7 +231,13 @@
   static void PostEvent(Isolate* isolate,
                         const char* stream_id,
                         const char* kind,
-                        JSONStream* event);
+                        JSONStream* event,
+                        bool enter_safepoint);
+
+  static void PostEventImpl(Isolate* isolate,
+                            const char* stream_id,
+                            const char* kind,
+                            JSONStream* event);
 
   static ErrorPtr MaybePause(Isolate* isolate, const Error& error);
 
diff --git a/runtime/vm/simulator.h b/runtime/vm/simulator.h
index 3194aa9..e08337c 100644
--- a/runtime/vm/simulator.h
+++ b/runtime/vm/simulator.h
@@ -9,8 +9,7 @@
 
 #if defined(USING_SIMULATOR)
 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
-// No simulator used.
-#error Simulator not supported.
+#error Simulator not implemented.
 #elif defined(TARGET_ARCH_ARM)
 #include "vm/simulator_arm.h"
 #elif defined(TARGET_ARCH_ARM64)
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index f62ce3bf..b3c53a8 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -3350,11 +3350,24 @@
       const int64_t rn_val = get_register(rn, R31IsZR);
       set_vregisterd(vd, 0, rn_val);
       set_vregisterd(vd, 1, 0);
-    } else if (instr->Bits(16, 5) == 24) {
-      // Format(instr, "fcvtzds'sf 'rd, 'vn");
+    } else if ((instr->Bits(16, 5) == 8) || (instr->Bits(16, 5) == 16) ||
+               (instr->Bits(16, 5) == 24)) {
       const intptr_t max = instr->Bit(31) == 1 ? INT64_MAX : INT32_MAX;
       const intptr_t min = instr->Bit(31) == 1 ? INT64_MIN : INT32_MIN;
-      const double vn_val = bit_cast<double, int64_t>(get_vregisterd(vn, 0));
+      double vn_val = bit_cast<double, int64_t>(get_vregisterd(vn, 0));
+      switch (instr->Bits(16, 5)) {
+        case 8:
+          // Format(instr, "fcvtps'sf 'rd, 'vn");
+          vn_val = ceil(vn_val);
+          break;
+        case 16:
+          // Format(instr, "fcvtms'sf 'rd, 'vn");
+          vn_val = floor(vn_val);
+          break;
+        case 24:
+          // Format(instr, "fcvtzs'sf 'rd, 'vn");
+          break;
+      }
       int64_t result;
       if (vn_val >= static_cast<double>(max)) {
         result = max;
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index f9b3cdc..211d7e1 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -42,20 +42,4 @@
   return snapshot;
 }
 
-#if 0
-void SnapshotReader::RunDelayedTypePostprocessing() {
-  if (types_to_postprocess_.IsNull()) {
-    return;
-  }
-
-  AbstractType& type = AbstractType::Handle();
-  Code& code = Code::Handle();
-  for (intptr_t i = 0; i < types_to_postprocess_.Length(); ++i) {
-    type ^= types_to_postprocess_.At(i);
-    code = TypeTestingStubGenerator::DefaultCodeForType(type);
-    type.InitializeTypeTestingStubNonAtomic(code);
-  }
-}
-#endif
-
 }  // namespace dart
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index d42c2da..1fb886c 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -7,8 +7,8 @@
 #include "include/dart_tools_api.h"
 #include "platform/assert.h"
 #include "platform/unicode.h"
+#include "vm/app_snapshot.h"
 #include "vm/class_finalizer.h"
-#include "vm/clustered_snapshot.h"
 #include "vm/dart_api_impl.h"
 #include "vm/dart_api_message.h"
 #include "vm/dart_api_state.h"
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 8ed14b9..f537458 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -165,12 +165,14 @@
       OS::SCreate(
           nullptr,
           "class StackFrame {"
-          "  static equals(var obj1, var obj2) native \"StackFrame_equals\";"
-          "  static int frameCount() native \"StackFrame_frameCount\";"
-          "  static int dartFrameCount() native \"StackFrame_dartFrameCount\";"
-          "  static validateFrame(int index,"
-          "                       String name) native "
-          "\"StackFrame_validateFrame\";"
+          "  @pragma('vm:external-name', 'StackFrame_equals')\n"
+          "  external static equals(var obj1, var obj2);\n"
+          "  @pragma('vm:external-name', 'StackFrame_frameCount')\n"
+          "  external static int frameCount();\n"
+          "  @pragma('vm:external-name', 'StackFrame_dartFrameCount')\n"
+          "  external static int dartFrameCount();\n"
+          "  @pragma('vm:external-name', 'StackFrame_validateFrame')\n"
+          "  external static validateFrame(int index, String name);"
           "} "
           "class First {"
           "  First() { }"
@@ -262,12 +264,14 @@
   if (FLAG_lazy_dispatchers) {
     kScriptChars =
         "class StackFrame {"
-        "  static equals(var obj1, var obj2) native \"StackFrame_equals\";"
-        "  static int frameCount() native \"StackFrame_frameCount\";"
-        "  static int dartFrameCount() native \"StackFrame_dartFrameCount\";"
-        "  static validateFrame(int index,"
-        "                       String name) native "
-        "\"StackFrame_validateFrame\";"
+        "  @pragma('vm:external-name', 'StackFrame_equals')\n"
+        "  external static equals(var obj1, var obj2);\n"
+        "  @pragma('vm:external-name', 'StackFrame_frameCount')\n"
+        "  external static int frameCount();\n"
+        "  @pragma('vm:external-name', 'StackFrame_dartFrameCount')\n"
+        "  external static int dartFrameCount();\n"
+        "  @pragma('vm:external-name', 'StackFrame_validateFrame')\n"
+        "  external static validateFrame(int index, String name);"
         "} "
         "class StackFrame2Test {"
         "  StackFrame2Test() {}"
@@ -299,12 +303,14 @@
   } else {
     kScriptChars =
         "class StackFrame {"
-        "  static equals(var obj1, var obj2) native \"StackFrame_equals\";"
-        "  static int frameCount() native \"StackFrame_frameCount\";"
-        "  static int dartFrameCount() native \"StackFrame_dartFrameCount\";"
-        "  static validateFrame(int index,"
-        "                       String name) native "
-        "\"StackFrame_validateFrame\";"
+        "  @pragma('vm:external-name', 'StackFrame_equals')\n"
+        "  external static equals(var obj1, var obj2);\n"
+        "  @pragma('vm:external-name', 'StackFrame_frameCount')\n"
+        "  external static int frameCount();\n"
+        "  @pragma('vm:external-name', 'StackFrame_dartFrameCount')\n"
+        "  external static int dartFrameCount();\n"
+        "  @pragma('vm:external-name', 'StackFrame_validateFrame')\n"
+        "  external static validateFrame(int index, String name);"
         "} "
         "class StackFrame2Test {"
         "  StackFrame2Test() {}"
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 90576ec..1cb2a07 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -6,7 +6,7 @@
 
 #include "platform/assert.h"
 #include "platform/globals.h"
-#include "vm/clustered_snapshot.h"
+#include "vm/app_snapshot.h"
 #include "vm/compiler/assembler/disassembler.h"
 #include "vm/flags.h"
 #include "vm/heap/safepoint.h"
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index f5cc31c..63ce112 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -325,6 +325,8 @@
   V(_GrowableListGenerateFactory, "_GrowableList.generate")                    \
   V(_GrowableListLiteralFactory, "_GrowableList._literal")                     \
   V(_GrowableListWithData, "_GrowableList._withData")                          \
+  V(_ImmutableLinkedHashMap, "_InternalImmutableLinkedHashMap")                \
+  V(_ImmutableLinkedHashSet, "_CompactImmutableLinkedHashSet")                 \
   V(_ImmutableList, "_ImmutableList")                                          \
   V(_Int16ArrayFactory, "Int16List.")                                          \
   V(_Int16ArrayView, "_Int16ArrayView")                                        \
@@ -425,6 +427,7 @@
   V(_stackTrace, "_stackTrace")                                                \
   V(_state, "_state")                                                          \
   V(_stateData, "_stateData")                                                  \
+  V(_toString, "_toString")                                                    \
   V(_varData, "_varData")                                                      \
   V(_wordCharacterMap, "_wordCharacterMap")                                    \
   V(callback, "callback")                                                      \
@@ -465,7 +468,8 @@
   V(vm_recognized, "vm:recognized")                                            \
   V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn")            \
   V(vm_ffi_struct_fields, "vm:ffi:struct-fields")                              \
-  V(vm_unsafe_no_interrupts, "vm:unsafe:no-interrupts")
+  V(vm_unsafe_no_interrupts, "vm:unsafe:no-interrupts")                        \
+  V(vm_external_name, "vm:external-name")
 
 // Contains a list of frequently used strings in a canonicalized form. This
 // list is kept in the vm_isolate in order to share the copy across isolates
diff --git a/runtime/vm/tagged_pointer.h b/runtime/vm/tagged_pointer.h
index 19444ff..c7c8b94 100644
--- a/runtime/vm/tagged_pointer.h
+++ b/runtime/vm/tagged_pointer.h
@@ -397,6 +397,8 @@
 DEFINE_TAGGED_POINTER(LinkedHashBase, Instance)
 DEFINE_TAGGED_POINTER(LinkedHashMap, LinkedHashBase)
 DEFINE_TAGGED_POINTER(LinkedHashSet, LinkedHashBase)
+DEFINE_TAGGED_POINTER(ImmutableLinkedHashMap, LinkedHashMap)
+DEFINE_TAGGED_POINTER(ImmutableLinkedHashSet, LinkedHashSet)
 DEFINE_TAGGED_POINTER(Float32x4, Instance)
 DEFINE_TAGGED_POINTER(Int32x4, Instance)
 DEFINE_TAGGED_POINTER(Float64x2, Instance)
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index fc74cf2..8c41eee 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -4,6 +4,7 @@
 
 #include "vm/thread.h"
 
+#include "vm/cpu.h"
 #include "vm/dart_api_state.h"
 #include "vm/growable_array.h"
 #include "vm/heap/safepoint.h"
@@ -83,6 +84,8 @@
       ffi_callback_code_(GrowableObjectArray::null()),
       ffi_callback_stack_return_(TypedData::null()),
       api_top_scope_(NULL),
+      double_truncate_round_supported_(
+          TargetCPUFeatures::double_truncate_round_supported() ? 1 : 0),
       task_kind_(kUnknownTask),
       dart_stream_(NULL),
       thread_lock_(),
@@ -95,7 +98,6 @@
       stack_overflow_count_(0),
       hierarchy_info_(NULL),
       type_usage_info_(NULL),
-      pending_functions_(GrowableObjectArray::null()),
       sticky_error_(Error::null()),
       REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
           REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
@@ -216,17 +218,6 @@
 #undef REUSABLE_HANDLE_ALLOCATION
 }
 
-GrowableObjectArrayPtr Thread::pending_functions() {
-  if (pending_functions_ == GrowableObjectArray::null()) {
-    pending_functions_ = GrowableObjectArray::New(Heap::kOld);
-  }
-  return pending_functions_;
-}
-
-void Thread::clear_pending_functions() {
-  pending_functions_ = GrowableObjectArray::null();
-}
-
 void Thread::set_active_exception(const Object& value) {
   active_exception_ = value.ptr();
 }
@@ -475,10 +466,7 @@
             "\tisolate:    %s\n",
             isolate()->name());
       }
-      NoSafepointScope no_safepoint;
-      ErrorPtr error = Thread::Current()->StealStickyError();
-      ASSERT(error->IsUnwindError());
-      return error;
+      return StealStickyError();
     }
   }
   return Error::null();
@@ -610,7 +598,6 @@
   // Visit objects in thread specific handles area.
   reusable_handles_.VisitObjectPointers(visitor);
 
-  visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&pending_functions_));
   visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&global_object_pool_));
   visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&active_exception_));
   visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&active_stacktrace_));
@@ -693,9 +680,7 @@
 
       switch (op_) {
         case Thread::RestoreWriteBarrierInvariantOp::kAddToRememberedSet:
-          if (!obj->untag()->IsRemembered()) {
-            obj->untag()->AddToRememberedSet(current_);
-          }
+          obj->untag()->EnsureInRememberedSet(current_);
           if (current_->is_marking()) {
             current_->DeferredMarkingStackAddObject(obj);
           }
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 8c2aea4..6824dd8 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -282,15 +282,7 @@
 
   // The currently executing thread, or NULL if not yet initialized.
   static Thread* Current() {
-#if defined(HAS_C11_THREAD_LOCAL)
     return static_cast<Thread*>(OSThread::CurrentVMThread());
-#else
-    BaseThread* thread = OSThread::GetCurrentTLS();
-    if (thread == NULL || thread->is_os_thread()) {
-      return NULL;
-    }
-    return static_cast<Thread*>(thread);
-#endif
   }
 
   // Makes the current thread enter 'isolate'.
@@ -445,6 +437,10 @@
   void EnterApiScope();
   void ExitApiScope();
 
+  static intptr_t double_truncate_round_supported_offset() {
+    return OFFSET_OF(Thread, double_truncate_round_supported_);
+  }
+
   // The isolate that this thread is operating on, or nullptr if none.
   Isolate* isolate() const { return isolate_; }
   static intptr_t isolate_offset() { return OFFSET_OF(Thread, isolate_); }
@@ -525,6 +521,10 @@
     no_callback_scope_depth_ -= 1;
   }
 
+  bool is_unwind_in_progress() const { return is_unwind_in_progress_; }
+
+  void StartUnwindError() { is_unwind_in_progress_ = true; }
+
 #if defined(DEBUG)
   void EnterCompiler() {
     ASSERT(!IsInsideCompiler());
@@ -699,9 +699,6 @@
     return OFFSET_OF(Thread, unboxed_double_runtime_arg_);
   }
 
-  GrowableObjectArrayPtr pending_functions();
-  void clear_pending_functions();
-
   static intptr_t global_object_pool_offset() {
     return OFFSET_OF(Thread, global_object_pool_);
   }
@@ -1088,6 +1085,7 @@
   // JumpToExceptionHandler state:
   ObjectPtr active_exception_;
   ObjectPtr active_stacktrace_;
+
   ObjectPoolPtr global_object_pool_;
   uword resume_pc_;
   uword saved_shadow_call_stack_ = 0;
@@ -1097,6 +1095,7 @@
   TypedDataPtr ffi_callback_stack_return_;
   uword exit_through_ffi_ = 0;
   ApiLocalScope* api_top_scope_;
+  uint8_t double_truncate_round_supported_;
 
   // ---- End accessed from generated code. ----
 
@@ -1129,7 +1128,6 @@
   CompilerState* compiler_state_ = nullptr;
   HierarchyInfo* hierarchy_info_;
   TypeUsageInfo* type_usage_info_;
-  GrowableObjectArrayPtr pending_functions_;
 
   CompilerTimings* compiler_timings_ = nullptr;
 
@@ -1188,6 +1186,8 @@
   Thread* next_;  // Used to chain the thread structures in an isolate.
   bool is_mutator_thread_ = false;
 
+  bool is_unwind_in_progress_ = false;
+
 #if defined(DEBUG)
   bool inside_compiler_ = false;
 #endif
diff --git a/runtime/vm/thread_state.h b/runtime/vm/thread_state.h
index 58e57aa..e83bc26 100644
--- a/runtime/vm/thread_state.h
+++ b/runtime/vm/thread_state.h
@@ -25,15 +25,7 @@
  public:
   // The currently executing thread, or NULL if not yet initialized.
   static ThreadState* Current() {
-#if defined(HAS_C11_THREAD_LOCAL)
     return OSThread::CurrentVMThread();
-#else
-    BaseThread* thread = OSThread::GetCurrentTLS();
-    if (thread == NULL || thread->is_os_thread()) {
-      return NULL;
-    }
-    return static_cast<ThreadState*>(thread);
-#endif
   }
 
   explicit ThreadState(bool is_os_thread);
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 2eba0fb..14171a6 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -464,7 +464,7 @@
   const Array& ic_datas = Array::Handle(Array::New(kNumICData));
   ICData& ic_data = ICData::Handle();
   Function& owner = *CreateFunction("DummyFunction");
-  String& name = String::Handle(String::New("foo"));
+  String& name = String::Handle(Symbols::New(thread, "foo"));
   const Array& args_desc =
       Array::Handle(ArgumentsDescriptor::NewBoxed(0, 0, Object::empty_array()));
   for (intptr_t i = 0; i < kNumICData; i++) {
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 9c14b8b..ab0d62a 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -1122,8 +1122,10 @@
 
   intptr_t size = Utils::RoundUp(num_blocks_ * sizeof(TimelineEventBlock),
                                  VirtualMemory::PageSize());
-  const bool kNotExecutable = false;
-  memory_ = VirtualMemory::Allocate(size, kNotExecutable, "dart-timeline");
+  const bool executable = false;
+  const bool compressed = false;
+  memory_ =
+      VirtualMemory::Allocate(size, executable, compressed, "dart-timeline");
   if (memory_ == NULL) {
     OUT_OF_MEMORY();
   }
@@ -1512,7 +1514,7 @@
   if (Service::timeline_stream.enabled()) {
     ServiceEvent service_event(ServiceEvent::kTimelineEvents);
     service_event.set_timeline_event_block(this);
-    Service::HandleEvent(&service_event);
+    Service::HandleEvent(&service_event, /* enter_safepoint */ false);
   }
 #endif
 }
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index a7de67d..5742615 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -4,7 +4,10 @@
 
 #include <functional>
 
+#include "platform/globals.h"
+#include "vm/class_id.h"
 #include "vm/compiler/assembler/disassembler.h"
+#include "vm/compiler/runtime_api.h"
 #include "vm/hash_map.h"
 #include "vm/longjump.h"
 #include "vm/object_store.h"
@@ -178,6 +181,14 @@
       if (!code.IsNull()) {
         return code.ptr();
       }
+      const Error& error = Error::Handle(Thread::Current()->StealStickyError());
+      if (!error.IsNull()) {
+        if (error.ptr() == Object::out_of_memory_error().ptr()) {
+          Exceptions::ThrowOOM();
+        } else {
+          UNREACHABLE();
+        }
+      }
 
       // Fall back to default.
 #else
@@ -217,6 +228,9 @@
       if (error.ptr() == Object::branch_offset_error().ptr()) {
         ASSERT(!use_far_branches);
         use_far_branches = true;
+      } else if (error.ptr() == Object::out_of_memory_error().ptr()) {
+        thread->set_sticky_error(error);
+        return Code::null();
       } else {
         UNREACHABLE();
       }
@@ -329,7 +343,7 @@
 
   if (type.IsObjectType()) {
     ASSERT(type.IsNonNullable() &&
-           IsolateGroup::Current()->use_strict_null_safety_checks());
+           hi->thread()->isolate_group()->use_strict_null_safety_checks());
     compiler::Label is_null;
     __ CompareObject(TypeTestABI::kInstanceReg, Object::null_object());
     __ BranchIf(EQUAL, &is_null, compiler::Assembler::kNearJump);
@@ -621,6 +635,11 @@
     }
 
     // c) Then we'll check each value of the type argument.
+    compiler::Label pop_saved_registers_on_failure;
+    const RegisterSet saved_registers(
+        TTSInternalRegs::kSavedTypeArgumentRegisters);
+    __ PushRegisters(saved_registers);
+
     AbstractType& type_arg = AbstractType::Handle();
     const TypeArguments& ta = TypeArguments::Handle(type.arguments());
     const intptr_t num_type_parameters = type_class.NumTypeParameters();
@@ -634,10 +653,20 @@
       ASSERT(type_arg.IsTypeParameter() ||
              hi->CanUseSubtypeRangeCheckFor(type_arg));
 
-      BuildOptimizedTypeArgumentValueCheck(
-          assembler, hi, type_arg, type_param_value_offset_i, &check_failed);
+      if (type_arg.IsTypeParameter()) {
+        BuildOptimizedTypeParameterArgumentValueCheck(
+            assembler, hi, TypeParameter::Cast(type_arg),
+            type_param_value_offset_i, &pop_saved_registers_on_failure);
+      } else {
+        BuildOptimizedTypeArgumentValueCheck(
+            assembler, hi, Type::Cast(type_arg), type_param_value_offset_i,
+            &pop_saved_registers_on_failure);
+      }
     }
+    __ PopRegisters(saved_registers);
     __ Ret();
+    __ Bind(&pop_saved_registers_on_failure);
+    __ PopRegisters(saved_registers);
   }
 
   // If anything fails.
@@ -928,110 +957,259 @@
   return !type_argument_checks.is_empty();
 }
 
+// Unwraps TypeRefs, jumping to the appropriate label for the unwrapped type
+// if that label is not nullptr and otherwise falling through.
+//
+// [type_reg] must contain an AbstractTypePtr, and [scratch] must be distinct
+// from [type_reg]. Clobbers [type_reg] with the unwrapped type.
+static void UnwrapAbstractType(compiler::Assembler* assembler,
+                               Register type_reg,
+                               Register scratch,
+                               compiler::Label* is_type = nullptr,
+                               compiler::Label* is_function_type = nullptr,
+                               compiler::Label* is_type_parameter = nullptr) {
+  ASSERT(scratch != type_reg);
+  compiler::Label cid_checks, fall_through;
+  // TypeRefs never wrap other TypeRefs, so we only need to unwrap once.
+  __ LoadClassId(scratch, type_reg);
+  __ CompareImmediate(scratch, kTypeRefCid);
+  __ BranchIf(NOT_EQUAL, &cid_checks, compiler::Assembler::kNearJump);
+  __ LoadCompressedFieldFromOffset(type_reg, type_reg,
+                                   compiler::target::TypeRef::type_offset());
+  // Only load the class id of the unwrapped type if it will be checked below.
+  if (is_type != nullptr || is_function_type != nullptr ||
+      is_type_parameter != nullptr) {
+    __ LoadClassId(scratch, type_reg);
+  }
+  __ Bind(&cid_checks);
+  if (is_type != nullptr) {
+    __ CompareImmediate(scratch, kTypeCid);
+    __ BranchIf(EQUAL, is_type);
+  }
+  if (is_function_type != nullptr) {
+    __ CompareImmediate(scratch, kFunctionTypeCid);
+    __ BranchIf(EQUAL, is_function_type);
+  }
+  if (is_type_parameter != nullptr) {
+    __ CompareImmediate(scratch, kTypeParameterCid);
+    __ BranchIf(EQUAL, is_type_parameter);
+  }
+}
+
+// src must contain a TypePtr. Assumes dst != src. May affect flags.
+static void LoadTypeClassId(compiler::Assembler* assembler,
+                            Register dst,
+                            Register src) {
+  ASSERT(src != dst);
+  __ EnsureHasClassIdInDEBUG(kTypeCid, src, dst);
+  __ LoadCompressedSmi(
+      dst, compiler::FieldAddress(
+               src, compiler::target::Type::type_class_id_offset()));
+  __ SmiUntag(dst);
+}
+
+void TypeTestingStubGenerator::BuildOptimizedTypeParameterArgumentValueCheck(
+    compiler::Assembler* assembler,
+    HierarchyInfo* hi,
+    const TypeParameter& type_param,
+    intptr_t type_param_value_offset_i,
+    compiler::Label* check_failed) {
+  if (assembler->EmittingComments()) {
+    TextBuffer buffer(128);
+    buffer.Printf("Generating check for type argument %" Pd ": ",
+                  type_param_value_offset_i);
+    type_param.PrintName(Object::kScrubbedName, &buffer);
+    __ Comment("%s", buffer.buffer());
+  }
+
+  const Register kTypeArgumentsReg =
+      type_param.IsClassTypeParameter()
+          ? TypeTestABI::kInstantiatorTypeArgumentsReg
+          : TypeTestABI::kFunctionTypeArgumentsReg;
+
+  const bool strict_null_safety =
+      hi->thread()->isolate_group()->use_strict_null_safety_checks();
+  compiler::Label is_subtype;
+  // TODO(dartbug.com/46920): Currently only canonical equality (identity)
+  // and some top and bottom types are checked.
+  __ CompareObject(kTypeArgumentsReg, Object::null_object());
+  __ BranchIf(EQUAL, &is_subtype);
+
+  __ LoadCompressedFieldFromOffset(
+      TTSInternalRegs::kSuperTypeArgumentReg, kTypeArgumentsReg,
+      compiler::target::TypeArguments::type_at_offset(type_param.index()));
+  __ LoadCompressedFieldFromOffset(
+      TTSInternalRegs::kSubTypeArgumentReg,
+      TTSInternalRegs::kInstanceTypeArgumentsReg,
+      compiler::target::TypeArguments::type_at_offset(
+          type_param_value_offset_i));
+  __ CompareRegisters(TTSInternalRegs::kSuperTypeArgumentReg,
+                      TTSInternalRegs::kSubTypeArgumentReg);
+  __ BranchIf(EQUAL, &is_subtype);
+
+  __ Comment("Checking instantiated type parameter for possible top types");
+  compiler::Label check_subtype_type_class_ids;
+  UnwrapAbstractType(assembler, TTSInternalRegs::kSuperTypeArgumentReg,
+                     TTSInternalRegs::kScratchReg, /*is_type=*/nullptr,
+                     &check_subtype_type_class_ids);
+  LoadTypeClassId(assembler, TTSInternalRegs::kScratchReg,
+                  TTSInternalRegs::kSuperTypeArgumentReg);
+  __ CompareImmediate(TTSInternalRegs::kScratchReg, kDynamicCid);
+  __ BranchIf(EQUAL, &is_subtype);
+  __ CompareImmediate(TTSInternalRegs::kScratchReg, kVoidCid);
+  __ BranchIf(EQUAL, &is_subtype);
+  __ CompareImmediate(TTSInternalRegs::kScratchReg, kInstanceCid);
+  if (strict_null_safety) {
+    __ BranchIf(NOT_EQUAL, &check_subtype_type_class_ids);
+    // If non-nullable Object, then the subtype must be legacy or non-nullable.
+    __ CompareTypeNullabilityWith(
+        TTSInternalRegs::kSuperTypeArgumentReg,
+        static_cast<int8_t>(Nullability::kNonNullable));
+    __ BranchIf(NOT_EQUAL, &is_subtype);
+    __ Comment("Checking for legacy or non-nullable instance type argument");
+    compiler::Label subtype_is_type;
+    UnwrapAbstractType(assembler, TTSInternalRegs::kSubTypeArgumentReg,
+                       TTSInternalRegs::kScratchReg, &subtype_is_type);
+    __ CompareFunctionTypeNullabilityWith(
+        TTSInternalRegs::kSubTypeArgumentReg,
+        static_cast<int8_t>(Nullability::kNullable));
+    __ BranchIf(EQUAL, check_failed);
+    __ Jump(&is_subtype);
+    __ Bind(&subtype_is_type);
+    __ CompareTypeNullabilityWith(TTSInternalRegs::kSubTypeArgumentReg,
+                                  static_cast<int8_t>(Nullability::kNullable));
+    __ BranchIf(EQUAL, check_failed);
+    __ Jump(&is_subtype);
+  } else {
+    __ BranchIf(EQUAL, &is_subtype, compiler::Assembler::kNearJump);
+  }
+
+  __ Bind(&check_subtype_type_class_ids);
+  __ Comment("Checking instance type argument for possible bottom types");
+  // Nothing else to check for non-Types, so fall back to the slow stub.
+  UnwrapAbstractType(assembler, TTSInternalRegs::kSubTypeArgumentReg,
+                     TTSInternalRegs::kScratchReg, /*is_type=*/nullptr,
+                     check_failed);
+  LoadTypeClassId(assembler, TTSInternalRegs::kScratchReg,
+                  TTSInternalRegs::kSubTypeArgumentReg);
+  __ CompareImmediate(TTSInternalRegs::kScratchReg, kNeverCid);
+  __ BranchIf(EQUAL, &is_subtype);
+  __ CompareImmediate(TTSInternalRegs::kScratchReg, kNullCid);
+  // Last possible check, so fall back to slow stub on failure.
+  __ BranchIf(NOT_EQUAL, check_failed);
+  if (strict_null_safety) {
+    // Only nullable or legacy types can be a supertype of Null.
+    __ Comment("Checking for legacy or nullable instantiated type parameter");
+    compiler::Label supertype_is_type;
+    UnwrapAbstractType(assembler, TTSInternalRegs::kSuperTypeArgumentReg,
+                       TTSInternalRegs::kScratchReg, &supertype_is_type);
+    __ CompareFunctionTypeNullabilityWith(
+        TTSInternalRegs::kSuperTypeArgumentReg,
+        static_cast<int8_t>(Nullability::kNonNullable));
+    __ BranchIf(EQUAL, check_failed);
+    __ Jump(&is_subtype, compiler::Assembler::kNearJump);
+    __ Bind(&supertype_is_type);
+    __ CompareTypeNullabilityWith(
+        TTSInternalRegs::kSuperTypeArgumentReg,
+        static_cast<int8_t>(Nullability::kNonNullable));
+    __ BranchIf(EQUAL, check_failed);
+  }
+
+  __ Bind(&is_subtype);
+}
+
 // Generate code to verify that instance's type argument is a subtype of
 // 'type_arg'.
 void TypeTestingStubGenerator::BuildOptimizedTypeArgumentValueCheck(
     compiler::Assembler* assembler,
     HierarchyInfo* hi,
-    const AbstractType& type_arg,
+    const Type& type,
     intptr_t type_param_value_offset_i,
     compiler::Label* check_failed) {
-  if (type_arg.IsTopTypeForSubtyping()) {
+  ASSERT(type.IsInstantiated());
+  if (type.IsTopTypeForSubtyping()) {
     return;
   }
 
+  const bool strict_null_safety =
+      hi->thread()->isolate_group()->use_strict_null_safety_checks();
+  ASSERT(!type.IsObjectType() || (strict_null_safety && type.IsNonNullable()));
+
   if (assembler->EmittingComments()) {
     TextBuffer buffer(128);
     buffer.Printf("Generating check for type argument %" Pd ": ",
                   type_param_value_offset_i);
-    type_arg.PrintName(Object::kScrubbedName, &buffer);
+    type.PrintName(Object::kScrubbedName, &buffer);
     __ Comment("%s", buffer.buffer());
   }
-  if (type_arg.IsTypeParameter()) {
-    const TypeParameter& type_param = TypeParameter::Cast(type_arg);
-    const Register kTypeArgumentsReg =
-        type_param.IsClassTypeParameter()
-            ? TypeTestABI::kInstantiatorTypeArgumentsReg
-            : TypeTestABI::kFunctionTypeArgumentsReg;
 
-    compiler::Label is_dynamic;
-    __ CompareObject(kTypeArgumentsReg, Object::null_object());
-    __ BranchIf(EQUAL, &is_dynamic, compiler::Assembler::kNearJump);
-
-    // TODO(dartbug.com/46920): Currently only canonical equality (identity)
-    // is checked.
-    __ LoadCompressedFieldFromOffset(
-        TTSInternalRegs::kScratchReg, kTypeArgumentsReg,
-        compiler::target::TypeArguments::type_at_offset(type_param.index()));
-    __ CompareWithCompressedFieldFromOffset(
-        TTSInternalRegs::kScratchReg,
-        TTSInternalRegs::kInstanceTypeArgumentsReg,
-        compiler::target::TypeArguments::type_at_offset(
-            type_param_value_offset_i));
-    __ BranchIf(NOT_EQUAL, check_failed);
-    __ Bind(&is_dynamic);
-  } else {
-    __ LoadCompressedFieldFromOffset(
-        TTSInternalRegs::kScratchReg,
-        TTSInternalRegs::kInstanceTypeArgumentsReg,
-        compiler::target::TypeArguments::type_at_offset(
-            type_param_value_offset_i));
-    if (type_arg.IsObjectType()) {
-      // Just check the nullability, since this must be non-nullable Object
-      // and we must be in null safe mode.
-      ASSERT(IsolateGroup::Current()->use_strict_null_safety_checks() &&
-             type_arg.IsNonNullable());
-      __ CompareTypeNullabilityWith(TTSInternalRegs::kScratchReg,
-                                    compiler::target::Nullability::kNullable);
+  compiler::Label is_subtype, check_subtype_cid, sub_is_function_type,
+      sub_is_type;
+  __ LoadCompressedFieldFromOffset(
+      TTSInternalRegs::kSubTypeArgumentReg,
+      TTSInternalRegs::kInstanceTypeArgumentsReg,
+      compiler::target::TypeArguments::type_at_offset(
+          type_param_value_offset_i));
+  __ Bind(&check_subtype_cid);
+  UnwrapAbstractType(assembler, TTSInternalRegs::kSubTypeArgumentReg,
+                     TTSInternalRegs::kScratchReg, &sub_is_type);
+  __ Comment("Checks for FunctionType");
+  __ EnsureHasClassIdInDEBUG(kFunctionTypeCid,
+                             TTSInternalRegs::kSubTypeArgumentReg,
+                             TTSInternalRegs::kScratchReg);
+  if (type.IsObjectType() || type.IsDartFunctionType()) {
+    if (strict_null_safety && type.IsNonNullable()) {
+      // Nullable types cannot be a subtype of a non-nullable type.
+      __ CompareFunctionTypeNullabilityWith(
+          TTSInternalRegs::kSubTypeArgumentReg,
+          compiler::target::Nullability::kNullable);
       __ BranchIf(EQUAL, check_failed);
-    } else {
-      __ LoadCompressedFieldFromOffset(
-          TTSInternalRegs::kScratchReg, TTSInternalRegs::kScratchReg,
-          compiler::target::Type::type_class_id_offset());
-
-      const Class& type_class = Class::Handle(type_arg.type_class());
-      const bool null_is_assignable = Instance::NullIsAssignableTo(type_arg);
-      const CidRangeVector& ranges =
-          hi->SubtypeRangesForClass(type_class,
-                                    /*include_abstract=*/true,
-                                    /*exclude_null=*/!null_is_assignable);
-
-      compiler::Label is_subtype;
-      __ SmiUntag(TTSInternalRegs::kScratchReg);
-      // Never is a bottom type.
-      __ CompareImmediate(TTSInternalRegs::kScratchReg, kNeverCid);
-      __ BranchIf(EQUAL, &is_subtype);
-      if (null_is_assignable) {
-        __ CompareImmediate(TTSInternalRegs::kScratchReg, kNullCid);
-        __ BranchIf(EQUAL, &is_subtype);
-      }
-      compiler::Label check_nullability;
-      BuildOptimizedSubtypeRangeCheck(assembler, ranges,
-                                      TTSInternalRegs::kScratchReg,
-                                      &check_nullability, check_failed);
-      __ Bind(&check_nullability);
-
-      // Weak NNBD mode uses LEGACY_SUBTYPE which ignores nullability.
-      // We don't need to check nullability of LHS for nullable and legacy RHS
-      // ("Right Legacy", "Right Nullable" rules).
-      if (IsolateGroup::Current()->use_strict_null_safety_checks() &&
-          type_arg.IsNonNullable()) {
-        // 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.
-        __ LoadCompressedFieldFromOffset(
-            TTSInternalRegs::kScratchReg,
-            TTSInternalRegs::kInstanceTypeArgumentsReg,
-            compiler::target::TypeArguments::type_at_offset(
-                type_param_value_offset_i));
-        __ CompareTypeNullabilityWith(TTSInternalRegs::kScratchReg,
-                                      compiler::target::Nullability::kNullable);
-        __ BranchIf(EQUAL, check_failed);
-      }
-
-      __ Bind(&is_subtype);
     }
+    // No further checks needed for non-nullable Object or Function.
+    __ Jump(&is_subtype, compiler::Assembler::kNearJump);
+  } else {
+    // _Closure <: Function, and T <: Function for any FunctionType T, but
+    // T </: _Closure, so we _don't_ want to fall back to cid tests. Instead,
+    // just let the STC/runtime handle any possible false negatives here.
+    __ Jump(check_failed);
   }
+
+  __ Comment("Checks for Type");
+  __ Bind(&sub_is_type);
+  if (strict_null_safety && type.IsNonNullable()) {
+    // Nullable types cannot be a subtype of a non-nullable type in strict mode.
+    __ CompareTypeNullabilityWith(TTSInternalRegs::kSubTypeArgumentReg,
+                                  compiler::target::Nullability::kNullable);
+    __ BranchIf(EQUAL, check_failed);
+    // Fall through to bottom type checks.
+  }
+
+  // No further checks needed for non-nullable object.
+  if (!type.IsObjectType()) {
+    LoadTypeClassId(assembler, TTSInternalRegs::kScratchReg,
+                    TTSInternalRegs::kSubTypeArgumentReg);
+
+    const bool null_is_assignable = Instance::NullIsAssignableTo(type);
+    // Check bottom types.
+    __ CompareImmediate(TTSInternalRegs::kScratchReg, kNeverCid);
+    __ BranchIf(EQUAL, &is_subtype);
+    if (null_is_assignable) {
+      __ CompareImmediate(TTSInternalRegs::kScratchReg, kNullCid);
+      __ BranchIf(EQUAL, &is_subtype);
+    }
+
+    // Not a bottom type, so check cid ranges.
+    const Class& type_class = Class::Handle(type.type_class());
+    const CidRangeVector& ranges =
+        hi->SubtypeRangesForClass(type_class,
+                                  /*include_abstract=*/true,
+                                  /*exclude_null=*/!null_is_assignable);
+    BuildOptimizedSubtypeRangeCheck(assembler, ranges,
+                                    TTSInternalRegs::kScratchReg, &is_subtype,
+                                    check_failed);
+  }
+
+  __ Bind(&is_subtype);
 }
 
 void RegisterTypeArgumentsUse(const Function& function,
diff --git a/runtime/vm/type_testing_stubs.h b/runtime/vm/type_testing_stubs.h
index 40534c7..5775b53 100644
--- a/runtime/vm/type_testing_stubs.h
+++ b/runtime/vm/type_testing_stubs.h
@@ -103,10 +103,17 @@
       compiler::Label* load_succeeded,
       compiler::Label* load_failed);
 
+  static void BuildOptimizedTypeParameterArgumentValueCheck(
+      compiler::Assembler* assembler,
+      HierarchyInfo* hi,
+      const TypeParameter& type_param,
+      intptr_t type_param_value_offset_i,
+      compiler::Label* check_failed);
+
   static void BuildOptimizedTypeArgumentValueCheck(
       compiler::Assembler* assembler,
       HierarchyInfo* hi,
-      const AbstractType& type_arg,
+      const Type& type,
       intptr_t type_param_value_offset_i,
       compiler::Label* check_failed);
 
diff --git a/runtime/vm/type_testing_stubs_test.cc b/runtime/vm/type_testing_stubs_test.cc
index 480c1d0..7f04842 100644
--- a/runtime/vm/type_testing_stubs_test.cc
+++ b/runtime/vm/type_testing_stubs_test.cc
@@ -20,16 +20,16 @@
 
 namespace dart {
 
-// FLAG_trace_type_checks is only a non-constant in DEBUG mode, so we only
-// allow tracing of type testing stub tests there.
-#if defined(DEBUG)
+// Note that flags that this affects may only mutable in some modes, e.g.,
+// tracing type checks can only be done in DEBUG mode.
 DEFINE_FLAG(bool,
             trace_type_testing_stub_tests,
             false,
-            "Trace type checks performed in type testing stub tests");
-#else
-const bool FLAG_trace_type_testing_stub_tests = false;
-#endif
+            "Trace type testing stub tests");
+DEFINE_FLAG(bool,
+            print_type_testing_stub_test_headers,
+            true,
+            "Print headers for executed type testing stub tests");
 
 class TraceStubInvocationScope : public ValueObject {
  public:
@@ -194,7 +194,7 @@
 }
 
 struct TTSTestCase {
-  const Instance& instance;
+  const Object& instance;
   const TypeArguments& instantiator_tav;
   const TypeArguments& function_tav;
   // Whether the result of the test should be a type error.
@@ -217,7 +217,7 @@
               bool should_fail = false,
               bool should_be_false_negative = false,
               bool should_respecialize = false)
-      : instance(Instance::Cast(obj)),
+      : instance(obj),
         instantiator_tav(i_tav),
         function_tav(f_tav),
         should_fail(should_fail),
@@ -264,7 +264,8 @@
     if (cls.NumTypeArguments() == 0) {
       return true;
     }
-    return instance.GetTypeArguments() == other.instance.GetTypeArguments();
+    return Instance::Cast(instance).GetTypeArguments() ==
+           Instance::Cast(other.instance).GetTypeArguments();
   }
 
   bool HasSTCEntry(const SubtypeTestCache& cache,
@@ -293,7 +294,7 @@
     const auto& cls = Class::Handle(instance.clazz());
     auto& instance_type_arguments = TypeArguments::Handle();
     if (cls.NumTypeArguments() > 0) {
-      instance_type_arguments = instance.GetTypeArguments();
+      instance_type_arguments = Instance::Cast(instance).GetTypeArguments();
     }
     return cache.HasCheck(id_smi, dst_type, instance_type_arguments,
                           instantiator_tav, function_tav,
@@ -350,7 +351,9 @@
         new_tts_stub_(Code::Handle(zone())),
         last_stc_(SubtypeTestCache::Handle(zone())),
         last_result_(Object::Handle(zone())) {
-    THR_Print("Creating test state for type %s\n", type.ToCString());
+    if (FLAG_print_type_testing_stub_test_headers) {
+      THR_Print("Creating test state for type %s\n", type.ToCString());
+    }
   }
 
   Zone* zone() const { return thread_->zone(); }
@@ -378,17 +381,20 @@
     const auto& default_stub =
         Code::Handle(zone(), TypeTestingStubGenerator::DefaultCodeForType(
                                  last_tested_type_, /*lazy_specialize=*/false));
-    previous_tts_stub_ =
-        TypeTestingStubGenerator::SpecializeStubFor(thread_, last_tested_type_);
+    {
+      // To make sure we output the disassembled stub if desired.
+      TraceStubInvocationScope scope;
+      previous_tts_stub_ = TypeTestingStubGenerator::SpecializeStubFor(
+          thread_, last_tested_type_);
+    }
     EXPECT_EQ(test_case.should_specialize,
               previous_tts_stub_.ptr() != default_stub.ptr());
     last_tested_type_.SetTypeTestingStub(previous_tts_stub_);
-    PrintInvocationHeader(test_case);
+    PrintInvocationHeader("eagerly specialized", test_case);
     InvokeStubHelper(test_case);
     // Treat it as a failure if the stub respecializes, since we're attempting
     // to simulate AOT mode.
     EXPECT(previous_tts_stub_.ptr() == new_tts_stub_.ptr());
-    ReportUnexpectedSTCChanges(test_case);
   }
 
   void InvokeLazilySpecializedStub(const TTSTestCase& test_case) {
@@ -400,8 +406,8 @@
     const auto& specializing_stub =
         Code::Handle(zone(), TypeTestingStubGenerator::DefaultCodeForType(
                                  last_tested_type_, /*lazy_specialize=*/true));
-    PrintInvocationHeader(test_case);
     last_tested_type_.SetTypeTestingStub(specializing_stub);
+    PrintInvocationHeader("lazy specialized", test_case);
     InvokeStubHelper(test_case,
                      /*is_lazy_specialization=*/test_case.should_specialize);
     if (test_case.should_fail || test_case.instance.IsNull()) {
@@ -416,18 +422,15 @@
       // Non-specializing test cases should result in a default TTS.
       EXPECT(new_tts_stub_.ptr() == default_stub.ptr());
     }
-    ReportUnexpectedSTCChanges(
-        test_case, /*is_lazy_specialization=*/test_case.should_specialize);
   }
 
   void InvokeExistingStub(const TTSTestCase& test_case) {
     last_tested_type_ = TypeToTest(test_case);
-    PrintInvocationHeader(test_case);
+    PrintInvocationHeader("existing", test_case);
     InvokeStubHelper(test_case);
     // Only respecialization should result in a new stub.
     EXPECT_EQ(test_case.should_respecialize,
               previous_tts_stub_.ptr() != new_tts_stub_.ptr());
-    ReportUnexpectedSTCChanges(test_case);
   }
 
  private:
@@ -442,12 +445,14 @@
     return Smi::RawCast(modified_rest_regs_box_.At(0));
   }
 
-  void PrintInvocationHeader(const TTSTestCase& test_case) {
+  void PrintInvocationHeader(const char* stub_type,
+                             const TTSTestCase& test_case) {
+    if (!FLAG_print_type_testing_stub_test_headers) return;
     LogBlock lb;
     const auto& tts = Code::Handle(zone(), last_tested_type_.type_test_stub());
     auto* const stub_name = StubCode::NameOfStub(tts.EntryPoint());
-    THR_Print("Testing %s stub for type %s\n",
-              stub_name == nullptr ? "optimized" : stub_name,
+    THR_Print("Testing %s %s stub for type %s\n",
+              stub_name == nullptr ? "optimized" : stub_name, stub_type,
               last_tested_type_.ToCString());
     if (last_tested_type_.ptr() != type_.ptr()) {
       THR_Print("  Original type: %s\n", type_.ToCString());
@@ -522,8 +527,8 @@
     }
     new_tts_stub_ = last_tested_type_.type_test_stub();
     last_stc_ = current_stc();
-    EXPECT_EQ(test_case.should_fail, !last_result_.IsNull());
     if (test_case.should_fail) {
+      EXPECT(!last_result_.IsNull());
       EXPECT(last_result_.IsError());
       EXPECT(last_result_.IsUnhandledException());
       if (last_result_.IsUnhandledException()) {
@@ -532,16 +537,28 @@
         EXPECT(strstr(error.ToCString(), "_TypeError"));
       }
     } else {
-      EXPECT(new_tts_stub_.ptr() != StubCode::LazySpecializeTypeTest().ptr());
-      ReportModifiedRegisters(modified_abi_regs());
-      // If we shouldn't go to the runtime, report any unexpected changes in
-      // non-ABI registers.
-      if (!is_lazy_specialization && !test_case.should_respecialize &&
-          (!test_case.should_be_false_negative ||
-           test_case.HasSTCEntry(previous_stc_, type_))) {
-        ReportModifiedRegisters(modified_rest_regs());
+      EXPECT(last_result_.IsNull());
+      if (!last_result_.IsNull()) {
+        EXPECT(last_result_.IsError());
+        EXPECT(last_result_.IsUnhandledException());
+        if (last_result_.IsUnhandledException()) {
+          const auto& exception = UnhandledException::Cast(last_result_);
+          dart::Expect(__FILE__, __LINE__)
+              .Fail("%s", exception.ToErrorCString());
+        }
+      } else {
+        EXPECT(new_tts_stub_.ptr() != StubCode::LazySpecializeTypeTest().ptr());
+        ReportModifiedRegisters(modified_abi_regs());
+        // If we shouldn't go to the runtime, report any unexpected changes in
+        // non-ABI registers.
+        if (!is_lazy_specialization && !test_case.should_respecialize &&
+            (!test_case.should_be_false_negative ||
+             test_case.HasSTCEntry(previous_stc_, type_))) {
+          ReportModifiedRegisters(modified_rest_regs());
+        }
       }
     }
+    ReportUnexpectedSTCChanges(test_case, is_lazy_specialization);
   }
 
   static void ReportModifiedRegisters(SmiPtr encoded_reg_mask) {
@@ -594,6 +611,7 @@
 
   void ReportUnexpectedSTCChanges(const TTSTestCase& test_case,
                                   bool is_lazy_specialization = false) {
+    // Make sure should_be_false_negative is not set if respecialization is.
     ASSERT(!test_case.should_be_false_negative ||
            !test_case.should_respecialize);
     const bool had_stc_entry = test_case.HasSTCEntry(previous_stc_, type_);
@@ -871,20 +889,22 @@
   RunTTSTest(type_i_object_dynamic, Failure({obj_b1, tav_null, tav_null}));
   RunTTSTest(type_i_object_dynamic, {obj_b2, tav_null, tav_null});
 
-  // We do not generate TTS for uninstantiated types if we would need to use
-  // subtype range checks for the class of the interface type.
+  // We do generate TTSes for uninstantiated types when we need to use
+  // subtype range checks for the class of the interface type, but the TTS
+  // may be partial (returns a false negative in some cases that means going
+  // to the STC/runtime).
   //
   //   obj as I<dynamic, T>
   //
   auto& type_dynamic_t =
       AbstractType::Handle(Type::New(class_i, tav_dynamic_t));
   FinalizeAndCanonicalize(&type_dynamic_t);
-  RunTTSTest(type_dynamic_t, FalseNegative({obj_i, tav_object, tav_null}));
+  RunTTSTest(type_dynamic_t, {obj_i, tav_object, tav_null});
   RunTTSTest(type_dynamic_t, Failure({obj_i2, tav_object, tav_null}));
   RunTTSTest(type_dynamic_t, Failure({obj_base_int, tav_object, tav_null}));
   RunTTSTest(type_dynamic_t, Failure({obj_a, tav_object, tav_null}));
   RunTTSTest(type_dynamic_t, Failure({obj_a1, tav_object, tav_null}));
-  RunTTSTest(type_dynamic_t, FalseNegative({obj_a2, tav_object, tav_null}));
+  RunTTSTest(type_dynamic_t, {obj_a2, tav_object, tav_null});
   RunTTSTest(type_dynamic_t, Failure({obj_b, tav_object, tav_null}));
   RunTTSTest(type_dynamic_t, Failure({obj_b1, tav_object, tav_null}));
   RunTTSTest(type_dynamic_t, FalseNegative({obj_b2, tav_object, tav_null}));
@@ -1115,24 +1135,52 @@
       R"(
       import "dart:async";
 
-      createFutureInt() => (() async => 3)();
+      Future<int> createFutureInt() async => 3;
+      Future<int Function()> createFutureFunction() async => () => 3;
+      Future<int Function()?> createFutureNullableFunction() async =>
+          (() => 3) as int Function()?;
 )";
 
+  const auto& class_future =
+      Class::Handle(IsolateGroup::Current()->object_store()->future_class());
+
   const auto& root_library = Library::Handle(LoadTestScript(kScript));
-  const auto& class_future = Class::Handle(GetClass(root_library, "Future"));
+  const auto& class_closure =
+      Class::Handle(IsolateGroup::Current()->object_store()->closure_class());
   const auto& obj_futureint =
       Object::Handle(Invoke(root_library, "createFutureInt"));
-
-  const auto& type_nullable_object = Type::Handle(
-      IsolateGroup::Current()->object_store()->nullable_object_type());
-  const auto& type_int = Type::Handle(Type::IntType());
-  const auto& type_string = Type::Handle(Type::StringType());
-  const auto& type_num = Type::Handle(Type::Number());
+  const auto& obj_futurefunction =
+      Object::Handle(Invoke(root_library, "createFutureFunction"));
+  const auto& obj_futurenullablefunction =
+      Object::Handle(Invoke(root_library, "createFutureNullableFunction"));
 
   const auto& tav_null = Object::null_type_arguments();
+  const auto& type_object = Type::Handle(
+      IsolateGroup::Current()->object_store()->non_nullable_object_type());
+  const auto& type_legacy_object = Type::Handle(
+      IsolateGroup::Current()->object_store()->legacy_object_type());
+  const auto& type_nullable_object = Type::Handle(
+      IsolateGroup::Current()->object_store()->nullable_object_type());
+  const auto& type_int = Type::Handle(
+      IsolateGroup::Current()->object_store()->non_nullable_int_type());
+
+  auto& type_string = Type::Handle(Type::StringType());
+  type_string =
+      type_string.ToNullability(Nullability::kNonNullable, Heap::kNew);
+  FinalizeAndCanonicalize(&type_string);
+  auto& type_num = Type::Handle(Type::Number());
+  type_num = type_num.ToNullability(Nullability::kNonNullable, Heap::kNew);
+  FinalizeAndCanonicalize(&type_num);
+
   auto& tav_dynamic = TypeArguments::Handle(TypeArguments::New(1));
   tav_dynamic.SetTypeAt(0, Object::dynamic_type());
   CanonicalizeTAV(&tav_dynamic);
+  auto& tav_object = TypeArguments::Handle(TypeArguments::New(1));
+  tav_object.SetTypeAt(0, type_object);
+  CanonicalizeTAV(&tav_object);
+  auto& tav_legacy_object = TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_object.SetTypeAt(0, type_legacy_object);
+  CanonicalizeTAV(&tav_legacy_object);
   auto& tav_nullable_object = TypeArguments::Handle(TypeArguments::New(1));
   tav_nullable_object.SetTypeAt(0, type_nullable_object);
   CanonicalizeTAV(&tav_nullable_object);
@@ -1146,45 +1194,422 @@
   tav_string.SetTypeAt(0, type_string);
   CanonicalizeTAV(&tav_string);
 
-  auto& type_future = Type::Handle(Type::New(class_future, tav_null));
+  auto& type_future = Type::Handle(
+      Type::New(class_future, tav_null, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future);
-  auto& type_future_dynamic =
-      Type::Handle(Type::New(class_future, tav_dynamic));
+  auto& type_future_dynamic = Type::Handle(
+      Type::New(class_future, tav_dynamic, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future_dynamic);
-  auto& type_future_nullable_object =
-      Type::Handle(Type::New(class_future, tav_nullable_object));
+  auto& type_future_object = Type::Handle(
+      Type::New(class_future, tav_object, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_object);
+  auto& type_future_legacy_object = Type::Handle(
+      Type::New(class_future, tav_legacy_object, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_legacy_object);
+  auto& type_future_nullable_object = Type::Handle(
+      Type::New(class_future, tav_nullable_object, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future_nullable_object);
-  auto& type_future_int = Type::Handle(Type::New(class_future, tav_int));
+  auto& type_future_int =
+      Type::Handle(Type::New(class_future, tav_int, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future_int);
-  auto& type_future_string = Type::Handle(Type::New(class_future, tav_string));
+  auto& type_future_string = Type::Handle(
+      Type::New(class_future, tav_string, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future_string);
-  auto& type_future_num = Type::Handle(Type::New(class_future, tav_num));
+  auto& type_future_num =
+      Type::Handle(Type::New(class_future, tav_num, Nullability::kNonNullable));
   FinalizeAndCanonicalize(&type_future_num);
-  auto& type_future_t = Type::Handle(class_future.DeclarationType());
+  const auto& type_future_t = Type::Handle(class_future.DeclarationType());
+
+  THR_Print("********************************************************\n");
+  THR_Print("               Testing Future<int>\n");
+  THR_Print("********************************************************\n\n");
 
   // Some more tests of generic implemented classes, using Future. Here,
   // obj is an object of type Future<int>.
   //
-  //   obj as Future          : Null type args (caught by TTS)
+  // True positives from TTS:
+  //   obj as Future          : Null type args
   //   obj as Future<dynamic> : Canonicalized to same as previous case.
-  //   obj as Future<Object?> : Type arg is top type (caught by TTS)
-  //   obj as Future<int>     : Type arg is the same type (caught by TTS)
-  //   obj as Future<String>  : Type arg is not a subtype (error via runtime)
+  //   obj as Future<Object?> : Type arg is top type
+  //   obj as Future<Object*> : Type arg is top type
+  //   obj as Future<Object>  : Type arg is certain supertype
+  //   obj as Future<int>     : Type arg is the same type
   //   obj as Future<num>     : Type arg is a supertype that can be matched
-  //                            with cid range (caught by TTS)
+  //                            with cid range
   //   obj as Future<X>,      : Type arg is a type parameter instantiated with
-  //       X = int            :    ... the same type (caught by TTS)
-  //       X = String         :    ... an unrelated type (error via runtime)
-  //       X = num            :    ... a supertype (caught by STC/runtime)
+  //       X = int            :    ... the same type
+  //
   RunTTSTest(type_future, {obj_futureint, tav_null, tav_null});
   RunTTSTest(type_future_dynamic, {obj_futureint, tav_null, tav_null});
+  RunTTSTest(type_future_object, {obj_futureint, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_object, {obj_futureint, tav_null, tav_null});
   RunTTSTest(type_future_nullable_object, {obj_futureint, tav_null, tav_null});
   RunTTSTest(type_future_int, {obj_futureint, tav_null, tav_null});
-  RunTTSTest(type_future_string, Failure({obj_futureint, tav_null, tav_null}));
   RunTTSTest(type_future_num, {obj_futureint, tav_null, tav_null});
   RunTTSTest(type_future_t, {obj_futureint, tav_int, tav_null});
-  RunTTSTest(type_future_t, Failure({obj_futureint, tav_string, tav_null}));
+
+  // False negatives from TTS (caught by STC/runtime):
+  //   obj as Future<X>,      : Type arg is a type parameter instantiated with
+  //       X = num            :    ... a supertype
   RunTTSTest(type_future_t, FalseNegative({obj_futureint, tav_num, tav_null}));
+
+  // Errors:
+  //   obj as Future<String>  : Type arg is not a supertype
+  //   obj as Future<X>,      : Type arg is a type parameter instantiated with
+  //       X = String         :    ... an unrelated type
+  //
+  RunTTSTest(type_future_string, Failure({obj_futureint, tav_null, tav_null}));
+  RunTTSTest(type_future_t, Failure({obj_futureint, tav_string, tav_null}));
+
+  auto& type_function = Type::Handle(Type::DartFunctionType());
+  type_function =
+      type_function.ToNullability(Nullability::kNonNullable, Heap::kNew);
+  FinalizeAndCanonicalize(&type_function);
+  auto& type_legacy_function = Type::Handle(
+      type_function.ToNullability(Nullability::kLegacy, Heap::kNew));
+  FinalizeAndCanonicalize(&type_legacy_function);
+  auto& type_nullable_function = Type::Handle(
+      type_function.ToNullability(Nullability::kNullable, Heap::kOld));
+  FinalizeAndCanonicalize(&type_nullable_function);
+  auto& type_closure = Type::Handle(
+      Type::New(class_closure, tav_null, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_closure);
+  auto& type_legacy_closure = Type::Handle(
+      type_closure.ToNullability(Nullability::kLegacy, Heap::kOld));
+  FinalizeAndCanonicalize(&type_legacy_closure);
+  auto& type_nullable_closure = Type::Handle(
+      type_closure.ToNullability(Nullability::kNullable, Heap::kOld));
+  FinalizeAndCanonicalize(&type_nullable_closure);
+  auto& type_function_int_nullary =
+      FunctionType::Handle(FunctionType::New(0, Nullability::kNonNullable));
+  // Testing with a closure, so it has an implicit parameter, and we want a
+  // type that is canonically equal to the type of the closure.
+  type_function_int_nullary.set_num_implicit_parameters(1);
+  type_function_int_nullary.set_num_fixed_parameters(1);
+  type_function_int_nullary.set_parameter_types(Array::Handle(Array::New(1)));
+  type_function_int_nullary.SetParameterTypeAt(0, Type::dynamic_type());
+  type_function_int_nullary.set_result_type(type_int);
+  FinalizeAndCanonicalize(&type_function_int_nullary);
+  auto& type_legacy_function_int_nullary =
+      FunctionType::Handle(type_function_int_nullary.ToNullability(
+          Nullability::kLegacy, Heap::kOld));
+  FinalizeAndCanonicalize(&type_legacy_function_int_nullary);
+  auto& type_nullable_function_int_nullary =
+      FunctionType::Handle(type_function_int_nullary.ToNullability(
+          Nullability::kNullable, Heap::kOld));
+  FinalizeAndCanonicalize(&type_nullable_function_int_nullary);
+
+  auto& tav_function = TypeArguments::Handle(TypeArguments::New(1));
+  tav_function.SetTypeAt(0, type_function);
+  CanonicalizeTAV(&tav_function);
+  auto& tav_legacy_function = TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_function.SetTypeAt(0, type_legacy_function);
+  CanonicalizeTAV(&tav_legacy_function);
+  auto& tav_nullable_function = TypeArguments::Handle(TypeArguments::New(1));
+  tav_nullable_function.SetTypeAt(0, type_nullable_function);
+  CanonicalizeTAV(&tav_nullable_function);
+  auto& tav_closure = TypeArguments::Handle(TypeArguments::New(1));
+  tav_closure.SetTypeAt(0, type_closure);
+  CanonicalizeTAV(&tav_closure);
+  auto& tav_legacy_closure = TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_closure.SetTypeAt(0, type_legacy_closure);
+  CanonicalizeTAV(&tav_legacy_closure);
+  auto& tav_nullable_closure = TypeArguments::Handle(TypeArguments::New(1));
+  tav_nullable_closure.SetTypeAt(0, type_nullable_closure);
+  CanonicalizeTAV(&tav_nullable_closure);
+  auto& tav_function_int_nullary = TypeArguments::Handle(TypeArguments::New(1));
+  tav_function_int_nullary.SetTypeAt(0, type_function_int_nullary);
+  CanonicalizeTAV(&tav_function_int_nullary);
+  auto& tav_legacy_function_int_nullary =
+      TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_function_int_nullary.SetTypeAt(0,
+                                            type_legacy_function_int_nullary);
+  CanonicalizeTAV(&tav_legacy_function_int_nullary);
+  auto& tav_nullable_function_int_nullary =
+      TypeArguments::Handle(TypeArguments::New(1));
+  tav_nullable_function_int_nullary.SetTypeAt(
+      0, type_nullable_function_int_nullary);
+  CanonicalizeTAV(&tav_nullable_function_int_nullary);
+
+  auto& type_future_function = Type::Handle(
+      Type::New(class_future, tav_function, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_function);
+  auto& type_future_legacy_function = Type::Handle(
+      Type::New(class_future, tav_legacy_function, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_legacy_function);
+  auto& type_future_nullable_function = Type::Handle(Type::New(
+      class_future, tav_nullable_function, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_nullable_function);
+  auto& type_future_closure = Type::Handle(
+      Type::New(class_future, tav_closure, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_closure);
+  auto& type_future_legacy_closure = Type::Handle(
+      Type::New(class_future, tav_legacy_closure, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_legacy_closure);
+  auto& type_future_nullable_closure = Type::Handle(
+      Type::New(class_future, tav_nullable_closure, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_future_nullable_closure);
+  auto& type_future_function_int_nullary =
+      Type::Handle(Type::New(class_future, tav_function_int_nullary));
+  FinalizeAndCanonicalize(&type_future_function_int_nullary);
+  auto& type_future_legacy_function_int_nullary =
+      Type::Handle(Type::New(class_future, tav_legacy_function_int_nullary));
+  FinalizeAndCanonicalize(&type_future_legacy_function_int_nullary);
+  auto& type_future_nullable_function_int_nullary =
+      Type::Handle(Type::New(class_future, tav_nullable_function_int_nullary));
+  FinalizeAndCanonicalize(&type_future_nullable_function_int_nullary);
+
+  THR_Print("\n********************************************************\n");
+  THR_Print("            Testing Future<int Function()>\n");
+  THR_Print("********************************************************\n\n");
+
+  // And here, obj is an object of type Future<int Function()>. Note that
+  // int Function() <: Function, but int Function() </: _Closure. That is,
+  // _Closure is a separate subtype of Function from FunctionTypes.
+  //
+  // True positive from TTS:
+  //   obj as Future            : Null type args
+  //   obj as Future<dynamic>   : Canonicalized to same as previous case.
+  //   obj as Future<Object?>   : Type arg is top type
+  //   obj as Future<Object*>   : Type arg is top typ
+  //   obj as Future<Object>    : Type arg is certain supertype
+  //   obj as Future<Function?> : Type arg is certain supertype
+  //   obj as Future<Function*> : Type arg is certain supertype
+  //   obj as Future<Function>  : Type arg is certain supertype
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = dynamic          :    ... a top type
+  //       X = Object?          :    ... a top type
+  //       X = Object*          :    ... a top type
+  //       X = Object           :    ... a certain supertype
+  //       X = int Function()   :    ... the same type.
+  //
+  RunTTSTest(type_future, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_dynamic, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_object,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_object,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_object, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_object,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_object,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_object, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_function,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_function,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_function, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_t, {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_t,
+             {obj_futurefunction, tav_nullable_object, tav_null});
+  RunTTSTest(type_future_t, {obj_futurefunction, tav_legacy_object, tav_null});
+  RunTTSTest(type_future_t, {obj_futurefunction, tav_object, tav_null});
+  RunTTSTest(type_future_t,
+             {obj_futurefunction, tav_function_int_nullary, tav_null});
+
+  // False negative from TTS (caught by runtime or STC):
+  //   obj as Future<int Function()?> : No specialization.
+  //   obj as Future<int Function()*> : No specialization.
+  //   obj as Future<int Function()>  : No specialization.
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = Function?        :    ... a certain supertype (but not checked)
+  //       X = Function*        :    ... a certain supertype (but not checked)
+  //       X = Function         :    ... a certain supertype (but not checked)
+  //       X = int Function()?  :    ... a canonically different type.
+  //       X = int Function()*  :    ... a canonically different type.
+  //
+  RunTTSTest(type_future_nullable_function_int_nullary,
+             FalseNegative({obj_futurefunction, tav_null, tav_null,
+                            /*should_specialize=*/false}));
+  RunTTSTest(type_future_legacy_function_int_nullary,
+             FalseNegative({obj_futurefunction, tav_null, tav_null,
+                            /*should_specialize=*/false}));
+  RunTTSTest(type_future_function_int_nullary,
+             FalseNegative({obj_futurefunction, tav_null, tav_null,
+                            /*should_specialize=*/false}));
+  RunTTSTest(type_future_t, FalseNegative({obj_futurefunction,
+                                           tav_nullable_function, tav_null}));
+  RunTTSTest(type_future_t, FalseNegative({obj_futurefunction,
+                                           tav_legacy_function, tav_null}));
+  RunTTSTest(type_future_t,
+             FalseNegative({obj_futurefunction, tav_function, tav_null}));
+  RunTTSTest(type_future_t,
+             FalseNegative({obj_futurefunction,
+                            tav_nullable_function_int_nullary, tav_null}));
+  RunTTSTest(type_future_t,
+             FalseNegative({obj_futurefunction, tav_legacy_function_int_nullary,
+                            tav_null}));
+
+  // Errors:
+  //   obj as Future<_Closure?> : Type arg is not a supertype
+  //   obj as Future<_Closure*> : Type arg is not a supertype
+  //   obj as Future<_Closure>  : Type arg is not a supertype
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = _Closure?        :    ... an unrelated type.
+  //       X = _Closure*        :    ... an unrelated type.
+  //       X = _Closure         :    ... an unrelated type.
+  //
+  RunTTSTest(type_future_nullable_closure,
+             Failure({obj_futurefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_legacy_closure,
+             Failure({obj_futurefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_closure,
+             Failure({obj_futurefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_t,
+             Failure({obj_futurefunction, tav_nullable_closure, tav_null}));
+  RunTTSTest(type_future_t,
+             Failure({obj_futurefunction, tav_legacy_closure, tav_null}));
+  RunTTSTest(type_future_t,
+             Failure({obj_futurefunction, tav_closure, tav_null}));
+
+  THR_Print("\n********************************************************\n");
+  THR_Print("            Testing Future<int Function()?>\n");
+  THR_Print("********************************************************\n\n");
+
+  const bool strict_null_safety =
+      thread->isolate_group()->use_strict_null_safety_checks();
+
+  // And here, obj is an object of type Future<int Function()?>.
+  //
+  // True positive from TTS:
+  //   obj as Future            : Null type args
+  //   obj as Future<dynamic>   : Canonicalized to same as previous case.
+  //   obj as Future<Object?>   : Type arg is top type
+  //   obj as Future<Object*>   : Type arg is top typ
+  //   obj as Future<Function?> : Type arg is certain supertype
+  //   obj as Future<Function*> : Type arg is certain supertype
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = dynamic          :    ... a top type
+  //       X = Object?          :    ... a top type
+  //       X = Object*          :    ... a top type
+  //       X = int Function()?  :    ... the same type.
+  //
+  // If not null safe:
+  //   obj as Future<Object>    : Type arg is certain supertype
+  //   obj as Future<Function>  : Type arg is certain supertype
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = Object           :    ... a certain supertype
+  RunTTSTest(type_future, {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_dynamic,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_object,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_object,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_object,
+             {obj_futurefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_object,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_nullable_function,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_legacy_function,
+             {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_t, {obj_futurenullablefunction, tav_null, tav_null});
+  RunTTSTest(type_future_t,
+             {obj_futurenullablefunction, tav_nullable_object, tav_null});
+  RunTTSTest(type_future_t,
+             {obj_futurenullablefunction, tav_legacy_object, tav_null});
+  RunTTSTest(type_future_t, {obj_futurenullablefunction,
+                             tav_nullable_function_int_nullary, tav_null});
+
+  if (!strict_null_safety) {
+    RunTTSTest(type_future_object,
+               {obj_futurenullablefunction, tav_null, tav_null});
+    RunTTSTest(type_future_function,
+               {obj_futurenullablefunction, tav_null, tav_null});
+    RunTTSTest(type_future_t,
+               {obj_futurenullablefunction, tav_object, tav_null});
+  }
+
+  // False negative from TTS (caught by runtime or STC):
+  //   obj as Future<int Function()?> : No specialization.
+  //   obj as Future<int Function()*> : No specialization.
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = Function?        :    ... a certain supertype (but not checked)
+  //       X = Function*        :    ... a certain supertype (but not checked)
+  //       X = int Function()*  :    ... a canonically different type.
+  //
+  // If not null safe:
+  //   obj as Future<int Function()>  : No specialization.
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = Function         :    ... a certain supertype (but not checked)
+  //       X = int Function()   :    ... a canonically different type.
+
+  RunTTSTest(type_future_nullable_function_int_nullary,
+             FalseNegative({obj_futurenullablefunction, tav_null, tav_null,
+                            /*should_specialize=*/false}));
+  RunTTSTest(type_future_legacy_function_int_nullary,
+             FalseNegative({obj_futurenullablefunction, tav_null, tav_null,
+                            /*should_specialize=*/false}));
+  RunTTSTest(type_future_t, FalseNegative({obj_futurenullablefunction,
+                                           tav_nullable_function, tav_null}));
+  RunTTSTest(type_future_t, FalseNegative({obj_futurenullablefunction,
+                                           tav_legacy_function, tav_null}));
+  RunTTSTest(type_future_t,
+             FalseNegative({obj_futurenullablefunction,
+                            tav_legacy_function_int_nullary, tav_null}));
+
+  if (!strict_null_safety) {
+    RunTTSTest(type_future_function_int_nullary,
+               FalseNegative({obj_futurenullablefunction, tav_null, tav_null,
+                              /*should_specialize=*/false}));
+    RunTTSTest(type_future_t, FalseNegative({obj_futurenullablefunction,
+                                             tav_function, tav_null}));
+    RunTTSTest(type_future_t,
+               FalseNegative({obj_futurenullablefunction,
+                              tav_function_int_nullary, tav_null}));
+  }
+
+  // Errors:
+  //   obj as Future<_Closure?> : Type arg is not a supertype
+  //   obj as Future<_Closure*> : Type arg is not a supertype
+  //   obj as Future<_Closure>  : Type arg is not a supertype
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = _Closure?        :    ... an unrelated type.
+  //       X = _Closure*        :    ... an unrelated type.
+  //       X = _Closure         :    ... an unrelated type.
+  //
+  // If null safe:
+  //   obj as Future<int Function()>  : Nullable type cannot be subtype of a
+  //                                    non-nullable type.
+  //   obj as Future<Object>    : Nullable type cannot be subtype of a
+  //                              non-nullable type.
+  //   obj as Future<Function>  : Nullable type cannot be subtype of a
+  //                              non-nullable type.
+  //   obj as Future<X>,        : Type arg is a type parameter instantiated with
+  //       X = Object           :    ... a non-nullable type.
+  //       X = Function         :    ... a non-nullable type.
+  //       X = int Function()   :    ... a non-nullable type.
+
+  RunTTSTest(type_future_nullable_closure,
+             Failure({obj_futurenullablefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_legacy_closure,
+             Failure({obj_futurenullablefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_closure,
+             Failure({obj_futurenullablefunction, tav_null, tav_null}));
+  RunTTSTest(type_future_t, Failure({obj_futurenullablefunction,
+                                     tav_nullable_closure, tav_null}));
+  RunTTSTest(type_future_t, Failure({obj_futurenullablefunction,
+                                     tav_legacy_closure, tav_null}));
+  RunTTSTest(type_future_t,
+             Failure({obj_futurenullablefunction, tav_closure, tav_null}));
+
+  if (strict_null_safety) {
+    RunTTSTest(type_future_function_int_nullary,
+               Failure({obj_futurenullablefunction, tav_null, tav_null,
+                        /*should_specialize=*/false}));
+    RunTTSTest(type_future_object,
+               Failure({obj_futurenullablefunction, tav_null, tav_null}));
+    RunTTSTest(type_future_function,
+               Failure({obj_futurenullablefunction, tav_null, tav_null}));
+    RunTTSTest(type_future_t,
+               Failure({obj_futurenullablefunction, tav_object, tav_null}));
+    RunTTSTest(type_future_t,
+               Failure({obj_futurenullablefunction, tav_function, tav_null}));
+    RunTTSTest(type_future_t, Failure({obj_futurenullablefunction,
+                                       tav_function_int_nullary, tav_null}));
+  }
 }
 
 ISOLATE_UNIT_TEST_CASE(TTS_Regress40964) {
@@ -1407,25 +1832,78 @@
   const char* kScript =
       R"(
       class B<T> {}
+
+      class C {}
+      class D extends C {}
+      class E extends D {}
+
       F<A>() {}
-      createB() => B<int>();
+      createBE() => B<E>();
+      createBENullable() => B<E?>();
+      createBNull() => B<Null>();
+      createBNever() => B<Never>();
 )";
 
   const auto& root_library = Library::Handle(LoadTestScript(kScript));
   const auto& class_b = Class::Handle(GetClass(root_library, "B"));
+  const auto& class_c = Class::Handle(GetClass(root_library, "C"));
+  const auto& class_d = Class::Handle(GetClass(root_library, "D"));
+  const auto& class_e = Class::Handle(GetClass(root_library, "E"));
   const auto& fun_f = Function::Handle(GetFunction(root_library, "F"));
-  const auto& obj_b = Object::Handle(Invoke(root_library, "createB"));
+  const auto& obj_b_e = Object::Handle(Invoke(root_library, "createBE"));
+  const auto& obj_b_e_nullable =
+      Object::Handle(Invoke(root_library, "createBENullable"));
+  const auto& obj_b_null = Object::Handle(Invoke(root_library, "createBNull"));
+  const auto& obj_b_never =
+      Object::Handle(Invoke(root_library, "createBNever"));
 
   const auto& tav_null = Object::null_type_arguments();
-  auto& tav_int = TypeArguments::Handle(TypeArguments::New(1));
-  tav_int.SetTypeAt(0, Type::Handle(Type::IntType()));
-  CanonicalizeTAV(&tav_int);
+  auto& tav_nullable_object = TypeArguments::Handle(TypeArguments::New(1));
+  tav_nullable_object.SetTypeAt(
+      0, Type::Handle(
+             IsolateGroup::Current()->object_store()->nullable_object_type()));
+  CanonicalizeTAV(&tav_nullable_object);
+  auto& tav_legacy_object = TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_object.SetTypeAt(
+      0, Type::Handle(
+             IsolateGroup::Current()->object_store()->legacy_object_type()));
+  CanonicalizeTAV(&tav_legacy_object);
   auto& tav_object = TypeArguments::Handle(TypeArguments::New(1));
-  tav_object.SetTypeAt(0, Type::Handle(Type::ObjectType()));
+  tav_object.SetTypeAt(
+      0, Type::Handle(IsolateGroup::Current()->object_store()->object_type()));
   CanonicalizeTAV(&tav_object);
-  auto& tav_num = TypeArguments::Handle(TypeArguments::New(1));
-  tav_num.SetTypeAt(0, Type::Handle(Type::Number()));
-  CanonicalizeTAV(&tav_num);
+
+  auto& type_e =
+      Type::Handle(Type::New(class_e, tav_null, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_e);
+  auto& type_d =
+      Type::Handle(Type::New(class_d, tav_null, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_d);
+  auto& type_c =
+      Type::Handle(Type::New(class_c, tav_null, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_c);
+  auto& type_c_nullable =
+      Type::Handle(Type::New(class_c, tav_null, Nullability::kNullable));
+  FinalizeAndCanonicalize(&type_c_nullable);
+  auto& type_c_legacy =
+      Type::Handle(Type::New(class_c, tav_null, Nullability::kLegacy));
+  FinalizeAndCanonicalize(&type_c_legacy);
+
+  auto& tav_e = TypeArguments::Handle(TypeArguments::New(1));
+  tav_e.SetTypeAt(0, type_e);
+  CanonicalizeTAV(&tav_e);
+  auto& tav_d = TypeArguments::Handle(TypeArguments::New(1));
+  tav_d.SetTypeAt(0, type_d);
+  CanonicalizeTAV(&tav_d);
+  auto& tav_c = TypeArguments::Handle(TypeArguments::New(1));
+  tav_c.SetTypeAt(0, type_c);
+  CanonicalizeTAV(&tav_c);
+  auto& tav_nullable_c = TypeArguments::Handle(TypeArguments::New(1));
+  tav_nullable_c.SetTypeAt(0, type_c_nullable);
+  CanonicalizeTAV(&tav_nullable_c);
+  auto& tav_legacy_c = TypeArguments::Handle(TypeArguments::New(1));
+  tav_legacy_c.SetTypeAt(0, type_c_legacy);
+  CanonicalizeTAV(&tav_legacy_c);
 
   // One case where optimized TTSes can be partial is if the type is
   // uninstantiated with a type parameter at the same position as one of the
@@ -1437,41 +1915,51 @@
       TypeParameter::Handle(GetFunctionTypeParameter(fun_f, 0));
   auto& tav_a = TypeArguments::Handle(TypeArguments::New(1));
   tav_a.SetTypeAt(0, type_a);
-  auto& type_b2_a = AbstractType::Handle(Type::New(class_b, tav_a));
-  FinalizeAndCanonicalize(&type_b2_a);
-  TTSTestState state(thread, type_b2_a);
+  CanonicalizeTAV(&tav_a);
+  auto& type_b_a = AbstractType::Handle(
+      Type::New(class_b, tav_a, Nullability::kNonNullable));
+  FinalizeAndCanonicalize(&type_b_a);
+  TTSTestState state(thread, type_b_a);
 
-  TTSTestCase positive_test_case{obj_b, tav_null, tav_int};
-  TTSTestCase first_false_negative_test_case =
-      FalseNegative({obj_b, tav_null, tav_object});
-  TTSTestCase second_false_negative_test_case =
-      FalseNegative({obj_b, tav_null, tav_num});
-  // No test case should possibly hit the same STC entry as another.
-  ASSERT(!first_false_negative_test_case.HasSameSTCEntry(positive_test_case));
-  ASSERT(!second_false_negative_test_case.HasSameSTCEntry(positive_test_case));
-  ASSERT(!second_false_negative_test_case.HasSameSTCEntry(
-      first_false_negative_test_case));
-  // The type with the tested stub must be the same in all test cases.
-  ASSERT(state.TypeToTest(positive_test_case) ==
-         state.TypeToTest(first_false_negative_test_case));
-  ASSERT(state.TypeToTest(positive_test_case) ==
-         state.TypeToTest(second_false_negative_test_case));
+  TTSTestCase b_e_testcase{obj_b_e, tav_null, tav_e};
+  TTSTestCase b_d_testcase = FalseNegative({obj_b_e, tav_null, tav_d});
+  TTSTestCase b_c_testcase = FalseNegative({obj_b_e, tav_null, tav_c});
 
   // First, test that the positive test case is handled by the TTS.
-  state.InvokeLazilySpecializedStub(positive_test_case);
-  state.InvokeExistingStub(positive_test_case);
+  state.InvokeLazilySpecializedStub(b_e_testcase);
+  state.InvokeExistingStub(b_e_testcase);
 
   // Now restart, using the false negative test cases.
   state.ClearCache();
 
-  state.InvokeLazilySpecializedStub(first_false_negative_test_case);
-  state.InvokeExistingStub(first_false_negative_test_case);
-  state.InvokeEagerlySpecializedStub(first_false_negative_test_case);
+  state.InvokeLazilySpecializedStub(b_d_testcase);
+  state.InvokeExistingStub(b_d_testcase);
+  state.InvokeEagerlySpecializedStub(b_d_testcase);
 
-  state.InvokeExistingStub(positive_test_case);
-  state.InvokeExistingStub(second_false_negative_test_case);
-  state.InvokeExistingStub(first_false_negative_test_case);
-  state.InvokeExistingStub(positive_test_case);
+  state.InvokeExistingStub(b_e_testcase);
+  state.InvokeExistingStub(b_c_testcase);
+  state.InvokeExistingStub(b_d_testcase);
+  state.InvokeExistingStub(b_e_testcase);
+
+  state.InvokeExistingStub({obj_b_never, tav_null, tav_d});
+  state.InvokeExistingStub({obj_b_null, tav_null, tav_nullable_c});
+  state.InvokeExistingStub({obj_b_null, tav_null, tav_legacy_c});
+  if (IsolateGroup::Current()->use_strict_null_safety_checks()) {
+    state.InvokeExistingStub(Failure({obj_b_null, tav_null, tav_c}));
+  } else {
+    state.InvokeExistingStub({obj_b_null, tav_null, tav_c});
+  }
+
+  state.InvokeExistingStub({obj_b_e, tav_null, tav_nullable_object});
+  state.InvokeExistingStub({obj_b_e_nullable, tav_null, tav_nullable_object});
+  state.InvokeExistingStub({obj_b_e, tav_null, tav_legacy_object});
+  state.InvokeExistingStub({obj_b_e_nullable, tav_null, tav_legacy_object});
+  state.InvokeExistingStub({obj_b_e, tav_null, tav_object});
+  if (IsolateGroup::Current()->use_strict_null_safety_checks()) {
+    state.InvokeExistingStub(Failure({obj_b_e_nullable, tav_null, tav_object}));
+  } else {
+    state.InvokeExistingStub({obj_b_e_nullable, tav_null, tav_object});
+  }
 }
 
 ISOLATE_UNIT_TEST_CASE(TTS_Partial_Incremental) {
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index b710b2a..e96548eb7 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -219,10 +219,14 @@
 }
 
 #ifndef PRODUCT
-static const char* kIsolateReloadTestLibSource =
-    "void reloadTest() native 'Test_Reload';\n"
-    "void collectNewSpace() native 'Test_CollectNewSpace';\n"
-    "void collectOldSpace() native 'Test_CollectOldSpace';\n";
+static const char* kIsolateReloadTestLibSource = R"(
+@pragma("vm:external-name", "Test_Reload")
+external void reloadTest();
+@pragma("vm:external-name", "Test_CollectNewSpace")
+external void collectNewSpace();
+@pragma("vm:external-name", "Test_CollectOldSpace")
+external void collectOldSpace();
+)";
 
 static const char* IsolateReloadTestLibUri() {
   return "test:isolate_reload_helper";
@@ -644,7 +648,8 @@
         KernelIsolate::CompileExpressionToKernel(
             /* platform_kernel= */ nullptr, /* platform_kernel_size= */ 0,
             expr.ToCString(), param_names, Array::empty_array(),
-            String::Handle(lib.url()).ToCString(), /* klass=*/nullptr,
+            String::Handle(lib.url()).ToCString(), /* klass= */ nullptr,
+            /* method= */ nullptr,
             /* is_static= */ true);
     if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
       return Api::NewError("%s", compilation_result.error);
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h
index dc9b2d7..883bc74 100644
--- a/runtime/vm/virtual_memory.h
+++ b/runtime/vm/virtual_memory.h
@@ -50,12 +50,15 @@
   // the requested size cannot be allocated, NULL is returned.
   static VirtualMemory* Allocate(intptr_t size,
                                  bool is_executable,
+                                 bool is_compressed,
                                  const char* name) {
-    return AllocateAligned(size, PageSize(), is_executable, name);
+    return AllocateAligned(size, PageSize(), is_executable, is_compressed,
+                           name);
   }
   static VirtualMemory* AllocateAligned(intptr_t size,
                                         intptr_t alignment,
                                         bool is_executable,
+                                        bool is_compressed,
                                         const char* name);
 
   // Returns the cached page size. Use only if Init() has been called.
diff --git a/runtime/vm/virtual_memory_compressed.cc b/runtime/vm/virtual_memory_compressed.cc
index a53007a..2f39734 100644
--- a/runtime/vm/virtual_memory_compressed.cc
+++ b/runtime/vm/virtual_memory_compressed.cc
@@ -53,7 +53,7 @@
   ASSERT(Utils::IsAligned(base_, kCompressedHeapPageSize));
   ASSERT(Utils::IsAligned(size_, kCompressedHeapPageSize));
   // base_ is not necessarily 4GB-aligned, because on some systems we can't make
-  // a large enough reservation to guarentee it. Instead, we have only the
+  // a large enough reservation to guarantee it. Instead, we have only the
   // weaker property that all addresses in [base_, base_ + size_) have the same
   // same upper 32 bits, which is what we really need for compressed pointers.
   intptr_t mask = ~(kCompressedHeapAlignment - 1);
diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc
index 3eb51e8..ee26123 100644
--- a/runtime/vm/virtual_memory_fuchsia.cc
+++ b/runtime/vm/virtual_memory_fuchsia.cc
@@ -52,6 +52,22 @@
 }
 
 void VirtualMemory::Init() {
+  if (FLAG_old_gen_heap_size < 0 || FLAG_old_gen_heap_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --old_gen_heap_size %d is larger than"
+        " the physically addressable range, using 0(unlimited) instead.`\n",
+        FLAG_old_gen_heap_size);
+    FLAG_old_gen_heap_size = 0;
+  }
+  if (FLAG_new_gen_semi_max_size < 0 ||
+      FLAG_new_gen_semi_max_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --new_gen_semi_max_size %d is larger"
+        " than the physically addressable range, using %" Pd " instead.`\n",
+        FLAG_new_gen_semi_max_size, kDefaultNewGenSemiMaxSize);
+    FLAG_new_gen_semi_max_size = kDefaultNewGenSemiMaxSize;
+  }
+
 #if defined(DART_COMPRESSED_POINTERS)
   if (compressed_heap_vmar_ == ZX_HANDLE_INVALID) {
     const zx_vm_option_t align_flag =
@@ -112,6 +128,7 @@
 VirtualMemory* VirtualMemory::AllocateAligned(intptr_t size,
                                               intptr_t alignment,
                                               bool is_executable,
+                                              bool is_compressed,
                                               const char* name) {
   // When FLAG_write_protect_code is active, code memory (indicated by
   // is_executable = true) is allocated as non-executable and later
@@ -134,8 +151,13 @@
   ASSERT((ZX_VM_ALIGN_1KB <= align_flag) && (align_flag <= ZX_VM_ALIGN_4GB));
 
 #if defined(DART_COMPRESSED_POINTERS)
-  zx_handle_t vmar =
-      is_executable ? zx_vmar_root_self() : compressed_heap_vmar_;
+  zx_handle_t vmar;
+  if (is_compressed) {
+    RELEASE_ASSERT(!is_executable);
+    vmar = compressed_heap_vmar_;
+  } else {
+    vmar = zx_vmar_root_self();
+  }
 #else
   zx_handle_t vmar = zx_vmar_root_self();
 #endif  // defined(DART_COMPRESSED_POINTERS)
diff --git a/runtime/vm/virtual_memory_posix.cc b/runtime/vm/virtual_memory_posix.cc
index 0134610..3191878 100644
--- a/runtime/vm/virtual_memory_posix.cc
+++ b/runtime/vm/virtual_memory_posix.cc
@@ -15,6 +15,10 @@
 #include <sys/syscall.h>
 #include <unistd.h>
 
+#if defined(DART_HOST_OS_ANDROID)
+#include <sys/prctl.h>
+#endif
+
 #include "platform/assert.h"
 #include "platform/utils.h"
 #include "vm/heap/pages.h"
@@ -105,8 +109,22 @@
 #endif  // LARGE_RESERVATIONS_MAY_FAIL
 
 void VirtualMemory::Init() {
+  if (FLAG_old_gen_heap_size < 0 || FLAG_old_gen_heap_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --old_gen_heap_size %d is larger than"
+        " the physically addressable range, using 0(unlimited) instead.`\n",
+        FLAG_old_gen_heap_size);
+    FLAG_old_gen_heap_size = 0;
+  }
+  if (FLAG_new_gen_semi_max_size < 0 ||
+      FLAG_new_gen_semi_max_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --new_gen_semi_max_size %d is larger"
+        " than the physically addressable range, using %" Pd " instead.`\n",
+        FLAG_new_gen_semi_max_size, kDefaultNewGenSemiMaxSize);
+    FLAG_new_gen_semi_max_size = kDefaultNewGenSemiMaxSize;
+  }
   page_size_ = CalculatePageSize();
-
 #if defined(DART_COMPRESSED_POINTERS)
   ASSERT(compressed_heap_ == nullptr);
 #if defined(LARGE_RESERVATIONS_MAY_FAIL)
@@ -160,7 +178,10 @@
   if (FLAG_dual_map_code) {
     intptr_t size = PageSize();
     intptr_t alignment = kOldPageSize;
-    VirtualMemory* vm = AllocateAligned(size, alignment, true, "memfd-test");
+    bool executable = true;
+    bool compressed = false;
+    VirtualMemory* vm =
+        AllocateAligned(size, alignment, executable, compressed, "memfd-test");
     if (vm == nullptr) {
       LOG_INFO("memfd_create not supported; disabling dual mapping of code.\n");
       FLAG_dual_map_code = false;
@@ -280,6 +301,7 @@
 VirtualMemory* VirtualMemory::AllocateAligned(intptr_t size,
                                               intptr_t alignment,
                                               bool is_executable,
+                                              bool is_compressed,
                                               const char* name) {
   // When FLAG_write_protect_code is active, code memory (indicated by
   // is_executable = true) is allocated as non-executable and later
@@ -293,7 +315,8 @@
   ASSERT(name != nullptr);
 
 #if defined(DART_COMPRESSED_POINTERS)
-  if (!is_executable) {
+  if (is_compressed) {
+    RELEASE_ASSERT(!is_executable);
     MemoryRegion region =
         VirtualMemoryCompressedHeap::Allocate(size, alignment);
     if (region.pointer() == nullptr) {
@@ -414,6 +437,10 @@
     return nullptr;
   }
 
+#if defined(DART_HOST_OS_ANDROID)
+  prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, address, size, name);
+#endif
+
   MemoryRegion region(reinterpret_cast<void*>(address), size);
   return new VirtualMemory(region, region);
 }
diff --git a/runtime/vm/virtual_memory_test.cc b/runtime/vm/virtual_memory_test.cc
index 471c683..c343961 100644
--- a/runtime/vm/virtual_memory_test.cc
+++ b/runtime/vm/virtual_memory_test.cc
@@ -22,17 +22,12 @@
 VM_UNIT_TEST_CASE(AllocateVirtualMemory) {
   const intptr_t kVirtualMemoryBlockSize = 64 * KB;
   VirtualMemory* vm =
-      VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, "test");
+      VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, false, "test");
   EXPECT(vm != NULL);
   EXPECT(vm->address() != NULL);
   EXPECT_EQ(vm->start(), reinterpret_cast<uword>(vm->address()));
-#if defined(DART_COMPRESSED_POINTERS)
-  EXPECT_EQ(kCompressedHeapPageSize, vm->size());
-  EXPECT_EQ(vm->start() + kCompressedHeapPageSize, vm->end());
-#else
   EXPECT_EQ(kVirtualMemoryBlockSize, vm->size());
   EXPECT_EQ(vm->start() + kVirtualMemoryBlockSize, vm->end());
-#endif  // defined(DART_COMPRESSED_POINTERS)
   EXPECT(vm->Contains(vm->start()));
   EXPECT(vm->Contains(vm->start() + 1));
   EXPECT(vm->Contains(vm->start() + kVirtualMemoryBlockSize - 1));
@@ -63,7 +58,7 @@
   intptr_t kIterations = kHeapPageSize / kVirtualPageSize;
   for (intptr_t i = 0; i < kIterations; i++) {
     VirtualMemory* vm = VirtualMemory::AllocateAligned(
-        kHeapPageSize, kHeapPageSize, false, "test");
+        kHeapPageSize, kHeapPageSize, false, false, "test");
     EXPECT(Utils::IsAligned(vm->start(), kHeapPageSize));
     EXPECT_EQ(kHeapPageSize, vm->size());
     delete vm;
@@ -76,19 +71,19 @@
   const intptr_t kIterations = 900;  // Enough to exhaust 32-bit address space.
   for (intptr_t i = 0; i < kIterations; ++i) {
     VirtualMemory* vm =
-        VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, "test");
+        VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, false, "test");
     delete vm;
   }
   // Check that truncation does not introduce leaks.
   for (intptr_t i = 0; i < kIterations; ++i) {
     VirtualMemory* vm =
-        VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, "test");
+        VirtualMemory::Allocate(kVirtualMemoryBlockSize, false, false, "test");
     vm->Truncate(kVirtualMemoryBlockSize / 2);
     delete vm;
   }
   for (intptr_t i = 0; i < kIterations; ++i) {
     VirtualMemory* vm =
-        VirtualMemory::Allocate(kVirtualMemoryBlockSize, true, "test");
+        VirtualMemory::Allocate(kVirtualMemoryBlockSize, true, false, "test");
     vm->Truncate(0);
     delete vm;
   }
diff --git a/runtime/vm/virtual_memory_win.cc b/runtime/vm/virtual_memory_win.cc
index 67f1f63..013adf0 100644
--- a/runtime/vm/virtual_memory_win.cc
+++ b/runtime/vm/virtual_memory_win.cc
@@ -53,8 +53,22 @@
 }
 
 void VirtualMemory::Init() {
+  if (FLAG_old_gen_heap_size < 0 || FLAG_old_gen_heap_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --old_gen_heap_size %d is larger than"
+        " the physically addressable range, using 0(unlimited) instead.`\n",
+        FLAG_old_gen_heap_size);
+    FLAG_old_gen_heap_size = 0;
+  }
+  if (FLAG_new_gen_semi_max_size < 0 ||
+      FLAG_new_gen_semi_max_size > kMaxAddrSpaceMB) {
+    OS::PrintErr(
+        "warning: value specified for --new_gen_semi_max_size %d is larger"
+        " than the physically addressable range, using %" Pd " instead.`\n",
+        FLAG_new_gen_semi_max_size, kDefaultNewGenSemiMaxSize);
+    FLAG_new_gen_semi_max_size = kDefaultNewGenSemiMaxSize;
+  }
   page_size_ = CalculatePageSize();
-
 #if defined(DART_COMPRESSED_POINTERS)
   ASSERT(compressed_heap_ == nullptr);
   compressed_heap_ = Reserve(kCompressedHeapSize, kCompressedHeapAlignment);
@@ -82,6 +96,7 @@
 VirtualMemory* VirtualMemory::AllocateAligned(intptr_t size,
                                               intptr_t alignment,
                                               bool is_executable,
+                                              bool is_compressed,
                                               const char* name) {
   // When FLAG_write_protect_code is active, code memory (indicated by
   // is_executable = true) is allocated as non-executable and later
@@ -91,7 +106,8 @@
   ASSERT(Utils::IsAligned(alignment, PageSize()));
 
 #if defined(DART_COMPRESSED_POINTERS)
-  if (!is_executable) {
+  if (is_compressed) {
+    RELEASE_ASSERT(!is_executable);
     MemoryRegion region =
         VirtualMemoryCompressedHeap::Allocate(size, alignment);
     if (region.pointer() == nullptr) {
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni
index 2f21ac1..f17cc64 100644
--- a/runtime/vm/vm_sources.gni
+++ b/runtime/vm/vm_sources.gni
@@ -7,6 +7,8 @@
 vm_sources = [
   "allocation.cc",
   "allocation.h",
+  "app_snapshot.cc",
+  "app_snapshot.h",
   "base64.cc",
   "base64.h",
   "base_isolate.h",
@@ -30,8 +32,6 @@
   "class_table.h",
   "closure_functions_cache.cc",
   "closure_functions_cache.h",
-  "clustered_snapshot.cc",
-  "clustered_snapshot.h",
   "code_comments.cc",
   "code_comments.h",
   "code_descriptors.cc",
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 5fa1efc..763617f 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -87,7 +87,9 @@
     }
   }
   if (memory == nullptr) {
-    memory = VirtualMemory::Allocate(size, false, "dart-zone");
+    bool executable = false;
+    bool compressed = false;
+    memory = VirtualMemory::Allocate(size, executable, compressed, "dart-zone");
     total_size_.fetch_add(size);
   }
   if (memory == nullptr) {
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index e52b940..2f691a9 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -242,4 +242,18 @@
 #endif  // !defined(PRODUCT)
 }
 
+#if defined(DART_COMPRESSED_POINTERS)
+ISOLATE_UNIT_TEST_CASE(ZonesNotLimitedByCompressedHeap) {
+  StackZone stack_zone(Thread::Current());
+  Zone* zone = stack_zone.GetZone();
+
+  size_t total = 0;
+  while (total <= (4u * GB)) {
+    size_t chunk_size = 512u * MB;
+    zone->AllocUnsafe(chunk_size);
+    total += chunk_size;
+  }
+}
+#endif  // defined(DART_COMPRESSED_POINTERS)
+
 }  // namespace dart
diff --git a/sdk/lib/_http/http.dart b/sdk/lib/_http/http.dart
index d303412..b7b1f50 100644
--- a/sdk/lib/_http/http.dart
+++ b/sdk/lib/_http/http.dart
@@ -2063,7 +2063,7 @@
   /// Using the [IOSink] methods (e.g., [write] and [add]) has no effect after
   /// the request has been aborted
   ///
-  /// ```dart
+  /// ```dart import:async
   /// HttpClientRequst request = ...
   /// request.write();
   /// Timer(Duration(seconds: 1), () {
diff --git a/sdk/lib/_http/http_impl.dart b/sdk/lib/_http/http_impl.dart
index 2078dfa..6845f45 100644
--- a/sdk/lib/_http/http_impl.dart
+++ b/sdk/lib/_http/http_impl.dart
@@ -1429,8 +1429,6 @@
       headers.chunkedTransferEncoding = true;
     }
 
-    _profileData?.finishRequest(request: this);
-
     _responseCompleter.future.then((response) {
       _profileData?.requestEvent('Waiting (TTFB)');
       _profileData?.startResponse(
@@ -2144,6 +2142,9 @@
     // data).
     _httpParser.isHead = method == "HEAD";
     _streamFuture = outgoing.done.then<Socket>((Socket s) {
+      // Request sent, details available for profiling
+      profileData?.finishRequest(request: request);
+
       // Request sent, set up response completer.
       var nextResponseCompleter = new Completer<_HttpIncoming>();
       _nextResponseCompleter = nextResponseCompleter;
diff --git a/sdk/lib/_http/websocket.dart b/sdk/lib/_http/websocket.dart
index c9c6246..4b9bbff 100644
--- a/sdk/lib/_http/websocket.dart
+++ b/sdk/lib/_http/websocket.dart
@@ -375,8 +375,10 @@
           {Iterable<String>? protocols,
           Map<String, dynamic>? headers,
           CompressionOptions compression =
-              CompressionOptions.compressionDefault}) =>
-      _WebSocketImpl.connect(url, protocols, headers, compression: compression);
+              CompressionOptions.compressionDefault,
+          HttpClient? customClient}) =>
+      _WebSocketImpl.connect(url, protocols, headers,
+          compression: compression, customClient: customClient);
 
   @Deprecated('This constructor will be removed in Dart 2.0. Use `implements`'
       ' instead of `extends` if implementing this abstract class.')
diff --git a/sdk/lib/_http/websocket_impl.dart b/sdk/lib/_http/websocket_impl.dart
index 7de33f0..fe2c5a7 100644
--- a/sdk/lib/_http/websocket_impl.dart
+++ b/sdk/lib/_http/websocket_impl.dart
@@ -999,8 +999,8 @@
 
   static Future<WebSocket> connect(
       String url, Iterable<String>? protocols, Map<String, dynamic>? headers,
-      {CompressionOptions compression =
-          CompressionOptions.compressionDefault}) {
+      {CompressionOptions compression = CompressionOptions.compressionDefault,
+      HttpClient? customClient}) {
     Uri uri = Uri.parse(url);
     if (uri.scheme != "ws" && uri.scheme != "wss") {
       throw new WebSocketException("Unsupported URL scheme '${uri.scheme}'");
@@ -1024,7 +1024,7 @@
         path: uri.path,
         query: uri.query,
         fragment: uri.fragment);
-    return _httpClient.openUrl("GET", uri).then((request) {
+    return (customClient ?? _httpClient).openUrl("GET", uri).then((request) {
       if (uri.userInfo != null && !uri.userInfo.isEmpty) {
         // If the URL contains user information use that for basic
         // authorization.
diff --git a/sdk/lib/_internal/fix_data.yaml b/sdk/lib/_internal/fix_data.yaml
index baf52a4..7f87843 100644
--- a/sdk/lib/_internal/fix_data.yaml
+++ b/sdk/lib/_internal/fix_data.yaml
@@ -489,3 +489,1690 @@
     changes:
       - kind: 'rename'
         newName: 'networkConnectTimeoutError'
+
+  - title: "Rename to 'invalidParams'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:developer' ]
+      field: 'kInvalidParams'
+      inClass: 'ServiceExtensionResponse'
+    changes:
+      - kind: 'rename'
+        newName: 'invalidParams'
+
+  - title: "Rename to 'extensionError'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:developer' ]
+      field: 'kExtensionError'
+      inClass: 'ServiceExtensionResponse'
+    changes:
+      - kind: 'rename'
+        newName: 'extensionError'
+
+  - title: "Rename to 'extensionErrorMax'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:developer' ]
+      field: 'kExtensionErrorMax'
+      inClass: 'ServiceExtensionResponse'
+    changes:
+      - kind: 'rename'
+        newName: 'extensionErrorMax'
+
+  - title: "Rename to 'extensionErrorMin'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:developer' ]
+      field: 'kExtensionErrorMin'
+      inClass: 'ServiceExtensionResponse'
+    changes:
+      - kind: 'rename'
+        newName: 'extensionErrorMin'
+
+  - title: "Rename to 'systemEncoding'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      variable: 'SYSTEM_ENCODING'
+    changes:
+      - kind: 'rename'
+        newName: 'systemEncoding'
+
+  - title: "Rename to 'terminal'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TERMINAL'
+      inClass: 'StdioType'
+    changes:
+      - kind: 'rename'
+        newName: 'terminal'
+
+  - title: "Rename to 'pipe'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'PIPE'
+      inClass: 'StdioType'
+    changes:
+      - kind: 'rename'
+        newName: 'pipe'
+
+  - title: "Rename to 'file'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'FILE'
+      inClass: 'StdioType'
+    changes:
+      - kind: 'rename'
+        newName: 'file'
+
+  - title: "Rename to 'other'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'OTHER'
+      inClass: 'StdioType'
+    changes:
+      - kind: 'rename'
+        newName: 'other'
+
+  - title: "Rename to 'normal'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'NORMAL'
+      inClass: 'ProcessStartMode'
+    changes:
+      - kind: 'rename'
+        newName: 'normal'
+
+  - title: "Rename to 'inheritStdio'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'INHERIT_STDIO'
+      inClass: 'ProcessStartMode'
+    changes:
+      - kind: 'rename'
+        newName: 'inheritStdio'
+
+  - title: "Rename to 'detached'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DETACHED'
+      inClass: 'ProcessStartMode'
+    changes:
+      - kind: 'rename'
+        newName: 'detached'
+
+  - title: "Rename to 'detachedWithStdio'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DETACHED_WITH_STDIO'
+      inClass: 'ProcessStartMode'
+    changes:
+      - kind: 'rename'
+        newName: 'detachedWithStdio'
+
+  - title: "Rename to 'sighup'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGHUP'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sighup'
+
+  - title: "Rename to 'sigint'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGINT'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigint'
+
+  - title: "Rename to 'sigquit'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGQUIT'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigquit'
+
+  - title: "Rename to 'sigill'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGILL'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigill'
+
+  - title: "Rename to 'sigtrap'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGTRAP'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigtrap'
+
+  - title: "Rename to 'sigabrt'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGABRT'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigabrt'
+
+  - title: "Rename to 'sigbus'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGBUS'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigbus'
+
+  - title: "Rename to 'sigfpe'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGFPE'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigfpe'
+
+  - title: "Rename to 'sigkill'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGKILL'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigkill'
+
+  - title: "Rename to 'sigusr1'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGUSR1'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigusr1'
+
+  - title: "Rename to 'sigsegv'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGSEGV'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigsegv'
+
+  - title: "Rename to 'sigusr2'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGUSR2'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigusr2'
+
+  - title: "Rename to 'sigpipe'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGPIPE'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigpipe'
+
+  - title: "Rename to 'sigalrm'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGALRM'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigalrm'
+
+  - title: "Rename to 'sigterm'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGTERM'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigterm'
+
+  - title: "Rename to 'sigchld'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGCHLD'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigchld'
+
+  - title: "Rename to 'sigcont'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGCONT'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigcont'
+
+  - title: "Rename to 'sigstop'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGSTOP'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigstop'
+
+  - title: "Rename to 'sigtstp'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGTSTP'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigtstp'
+
+  - title: "Rename to 'sigttin'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGTTIN'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigttin'
+
+  - title: "Rename to 'sigttou'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGTTOU'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigttou'
+
+  - title: "Rename to 'sigurg'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGURG'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigurg'
+
+  - title: "Rename to 'sigxcpu'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGXCPU'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigxcpu'
+
+  - title: "Rename to 'sigxfsz'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGXFSZ'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigxfsz'
+
+  - title: "Rename to 'sigvtalrm'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGVTALRM'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigvtalrm'
+
+  - title: "Rename to 'sigprof'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGPROF'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigprof'
+
+  - title: "Rename to 'sigwinch'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGWINCH'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigwinch'
+
+  - title: "Rename to 'sigpoll'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGPOLL'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigpoll'
+
+  - title: "Rename to 'sigsys'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SIGSYS'
+      inClass: 'ProcessSignal'
+    changes:
+      - kind: 'rename'
+        newName: 'sigsys'
+
+  - title: "Rename to 'IPv4'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IP_V4'
+      inClass: 'InternetAddressType'
+    changes:
+      - kind: 'rename'
+        newName: 'IPv4'
+
+  - title: "Rename to 'IPv6'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IP_V6'
+      inClass: 'InternetAddressType'
+    changes:
+      - kind: 'rename'
+        newName: 'IPv6'
+
+  - title: "Rename to 'any'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ANY'
+      inClass: 'InternetAddressType'
+    changes:
+      - kind: 'rename'
+        newName: 'any'
+
+  - title: "Rename to 'loopbackIPv4'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'LOOPBACK_IP_V4'
+      inClass: 'InternetAddress'
+    changes:
+      - kind: 'rename'
+        newName: 'loopbackIPv4'
+
+  - title: "Rename to 'loopbackIPv6'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'LOOPBACK_IP_V6'
+      inClass: 'InternetAddress'
+    changes:
+      - kind: 'rename'
+        newName: 'loopbackIPv6'
+
+  - title: "Rename to 'anyIPv4'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ANY_IP_V4'
+      inClass: 'InternetAddress'
+    changes:
+      - kind: 'rename'
+        newName: 'anyIPv4'
+
+  - title: "Rename to 'anyIPv6'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ANY_IP_V6'
+      inClass: 'InternetAddress'
+    changes:
+      - kind: 'rename'
+        newName: 'anyIPv6'
+
+  - title: "Rename to 'receive'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RECEIVE'
+      inClass: 'SocketDirection'
+    changes:
+      - kind: 'rename'
+        newName: 'receive'
+
+  - title: "Rename to 'send'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SEND'
+      inClass: 'SocketDirection'
+    changes:
+      - kind: 'rename'
+        newName: 'send'
+
+  - title: "Rename to 'both'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'BOTH'
+      inClass: 'SocketDirection'
+    changes:
+      - kind: 'rename'
+        newName: 'both'
+
+  - title: "Rename to 'tcpNoDelay'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TCP_NODELAY'
+      inClass: 'SocketOption'
+    changes:
+      - kind: 'rename'
+        newName: 'tcpNoDelay'
+
+  - title: "Rename to 'read'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'READ'
+      inClass: 'RawSocketEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'read'
+
+  - title: "Rename to 'write'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WRITE'
+      inClass: 'RawSocketEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'write'
+
+  - title: "Rename to 'readClosed'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'READ_CLOSED'
+      inClass: 'RawSocketEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'readClosed'
+
+  - title: "Rename to 'closed'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CLOSED'
+      inClass: 'RawSocketEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'closed'
+
+  - title: "Rename to 'file'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'FILE'
+      inClass: 'FileSystemEntityType'
+    changes:
+      - kind: 'rename'
+        newName: 'file'
+
+  - title: "Rename to 'directory'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DIRECTORY'
+      inClass: 'FileSystemEntityType'
+    changes:
+      - kind: 'rename'
+        newName: 'directory'
+
+  - title: "Rename to 'link'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'LINK'
+      inClass: 'FileSystemEntityType'
+    changes:
+      - kind: 'rename'
+        newName: 'link'
+
+  - title: "Rename to 'notFound'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'NOT_FOUND'
+      inClass: 'FileSystemEntityType'
+    changes:
+      - kind: 'rename'
+        newName: 'notFound'
+
+  - title: "Rename to 'create'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CREATE'
+      inClass: 'FileSystemEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'create'
+
+  - title: "Rename to 'modify'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MODIFY'
+      inClass: 'FileSystemEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'modify'
+
+  - title: "Rename to 'delete'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DELETE'
+      inClass: 'FileSystemEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'delete'
+
+  - title: "Rename to 'move'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MOVE'
+      inClass: 'FileSystemEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'move'
+
+  - title: "Rename to 'all'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ALL'
+      inClass: 'FileSystemEvent'
+    changes:
+      - kind: 'rename'
+        newName: 'all'
+
+  - title: "Rename to 'minWindowBits'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MIN_WINDOW_BITS'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'minWindowBits'
+
+  - title: "Rename to 'maxWindowBits'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MAX_WINDOW_BITS'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'maxWindowBits'
+
+  - title: "Rename to 'defaultWindowBits'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT_WINDOW_BITS'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'defaultWindowBits'
+
+  - title: "Rename to 'minLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MIN_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'minLevel'
+
+  - title: "Rename to 'maxLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MAX_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'maxLevel'
+
+  - title: "Rename to 'defaultLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'defaultLevel'
+
+  - title: "Rename to 'minMemLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MIN_MEM_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'minMemLevel'
+
+  - title: "Rename to 'maxMemLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MAX_MEM_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'maxMemLevel'
+
+  - title: "Rename to 'defaultMemLevel'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT_MEM_LEVEL'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'defaultMemLevel'
+
+  - title: "Rename to 'strategyFiltered'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'STRATEGY_FILTERED'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'strategyFiltered'
+
+  - title: "Rename to 'strategyHuffmanOnly'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'STRATEGY_HUFFMAN_ONLY'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'strategyHuffmanOnly'
+
+  - title: "Rename to 'strategyRle'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'STRATEGY_RLE'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'strategyRle'
+
+  - title: "Rename to 'strategyFixed'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'STRATEGY_FIXED'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'strategyFixed'
+
+  - title: "Rename to 'strategyDefault'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'STRATEGY_DEFAULT'
+      inClass: 'ZLibOption'
+    changes:
+      - kind: 'rename'
+        newName: 'strategyDefault'
+
+  - title: "Rename to 'zlib'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      variable: 'ZLIB'
+    changes:
+      - kind: 'rename'
+        newName: 'zlib'
+
+  - title: "Rename to 'gzip'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      variable: 'GZIP'
+    changes:
+      - kind: 'rename'
+        newName: 'gzip'
+
+  - title: "Rename to 'read'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'READ'
+      inClass: 'FileMode'
+    changes:
+      - kind: 'rename'
+        newName: 'read'
+
+  - title: "Rename to 'write'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WRITE'
+      inClass: 'FileMode'
+    changes:
+      - kind: 'rename'
+        newName: 'write'
+
+  - title: "Rename to 'append'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'APPEND'
+      inClass: 'FileMode'
+    changes:
+      - kind: 'rename'
+        newName: 'append'
+
+  - title: "Rename to 'writeOnly'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WRITE_ONLY'
+      inClass: 'FileMode'
+    changes:
+      - kind: 'rename'
+        newName: 'writeOnly'
+
+  - title: "Rename to 'writeOnlyAppend'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WRITE_ONLY_APPEND'
+      inClass: 'FileMode'
+    changes:
+      - kind: 'rename'
+        newName: 'writeOnlyAppend'
+
+  - title: "Rename to 'shared'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SHARED'
+      inClass: 'FileLock'
+    changes:
+      - kind: 'rename'
+        newName: 'shared'
+
+  - title: "Rename to 'exclusive'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'EXCLUSIVE'
+      inClass: 'FileLock'
+    changes:
+      - kind: 'rename'
+        newName: 'exclusive'
+
+  - title: "Rename to 'blockingShared'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'BLOCKING_SHARED'
+      inClass: 'FileLock'
+    changes:
+      - kind: 'rename'
+        newName: 'blockingShared'
+
+  - title: "Rename to 'blockingExclusive'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'BLOCKING_EXCLUSIVE'
+      inClass: 'FileLock'
+    changes:
+      - kind: 'rename'
+        newName: 'blockingExclusive'
+
+  - title: "Rename to 'normalClosure'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'NORMAL_CLOSURE'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'normalClosure'
+
+  - title: "Rename to 'goingAway'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'GOING_AWAY'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'goingAway'
+
+  - title: "Rename to 'protocolError'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'PROTOCOL_ERROR'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'protocolError'
+
+  - title: "Rename to 'unsupportedData'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'UNSUPPORTED_DATA'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'unsupportedData'
+
+  - title: "Rename to 'reserved1004'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RESERVED_1004'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'reserved1004'
+
+  - title: "Rename to 'noStatusReceived'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'NO_STATUS_RECEIVED'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'noStatusReceived'
+
+  - title: "Rename to 'abnormalClosure'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ABNORMAL_CLOSURE'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'abnormalClosure'
+
+  - title: "Rename to 'invalidFramePayloadData'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'INVALID_FRAME_PAYLOAD_DATA'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'invalidFramePayloadData'
+
+  - title: "Rename to 'policyViolation'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'POLICY_VIOLATION'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'policyViolation'
+
+  - title: "Rename to 'messageTooBig'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MESSAGE_TOO_BIG'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'messageTooBig'
+
+  - title: "Rename to 'missingMandatoryExtension'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MISSING_MANDATORY_EXTENSION'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'missingMandatoryExtension'
+
+  - title: "Rename to 'internalServerError'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'INTERNAL_SERVER_ERROR'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'internalServerError'
+
+  - title: "Rename to 'reserved1015'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RESERVED_1015'
+      inClass: 'WebSocketStatus'
+    changes:
+      - kind: 'rename'
+        newName: 'reserved1015'
+
+  - title: "Rename to 'compressionDefault'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT'
+      inClass: 'CompressionOptions'
+    changes:
+      - kind: 'rename'
+        newName: 'compressionDefault'
+
+  - title: "Rename to 'compressionOff'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'OFF'
+      inClass: 'CompressionOptions'
+    changes:
+      - kind: 'rename'
+        newName: 'compressionOff'
+
+  - title: "Rename to 'connecting'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONNECTING'
+      inClass: 'WebSocket'
+    changes:
+      - kind: 'rename'
+        newName: 'connecting'
+
+  - title: "Rename to 'open'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'OPEN'
+      inClass: 'WebSocket'
+    changes:
+      - kind: 'rename'
+        newName: 'open'
+
+  - title: "Rename to 'closing'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CLOSING'
+      inClass: 'WebSocket'
+    changes:
+      - kind: 'rename'
+        newName: 'closing'
+
+  - title: "Rename to 'closed'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CLOSED'
+      inClass: 'WebSocket'
+    changes:
+      - kind: 'rename'
+        newName: 'closed'
+
+  - title: "Rename to 'acceptHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ACCEPT'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'acceptHeader'
+
+  - title: "Rename to 'acceptCharsetHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ACCEPT_CHARSET'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'acceptCharsetHeader'
+
+  - title: "Rename to 'acceptEncodingHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ACCEPT_ENCODING'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'acceptEncodingHeader'
+
+  - title: "Rename to 'acceptLanguageHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ACCEPT_LANGUAGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'acceptLanguageHeader'
+
+  - title: "Rename to 'acceptRangesHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ACCEPT_RANGES'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'acceptRangesHeader'
+
+  - title: "Rename to 'ageHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'AGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ageHeader'
+
+  - title: "Rename to 'allowHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ALLOW'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'allowHeader'
+
+  - title: "Rename to 'authorizationHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'AUTHORIZATION'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'authorizationHeader'
+
+  - title: "Rename to 'cacheControlHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CACHE_CONTROL'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'cacheControlHeader'
+
+  - title: "Rename to 'connectionHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONNECTION'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'connectionHeader'
+
+  - title: "Rename to 'contentEncodingHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_ENCODING'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentEncodingHeader'
+
+  - title: "Rename to 'contentLanguageHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_LANGUAGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentLanguageHeader'
+
+  - title: "Rename to 'contentLengthHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_LENGTH'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentLengthHeader'
+
+  - title: "Rename to 'contentLocationHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_LOCATION'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentLocationHeader'
+
+  - title: "Rename to 'contentMD5Header'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_MD5'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentMD5Header'
+
+  - title: "Rename to 'contentRangeHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_RANGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentRangeHeader'
+
+  - title: "Rename to 'contentTypeHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'CONTENT_TYPE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'contentTypeHeader'
+
+  - title: "Rename to 'dateHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DATE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'dateHeader'
+
+  - title: "Rename to 'etagHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ETAG'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'etagHeader'
+
+  - title: "Rename to 'expectHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'EXPECT'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'expectHeader'
+
+  - title: "Rename to 'expiresHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'EXPIRES'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'expiresHeader'
+
+  - title: "Rename to 'fromHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'FROM'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'fromHeader'
+
+  - title: "Rename to 'hostHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'HOST'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'hostHeader'
+
+  - title: "Rename to 'ifMatchHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IF_MATCH'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ifMatchHeader'
+
+  - title: "Rename to 'ifModifiedSinceHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IF_MODIFIED_SINCE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ifModifiedSinceHeader'
+
+  - title: "Rename to 'ifNoneMatchHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IF_NONE_MATCH'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ifNoneMatchHeader'
+
+  - title: "Rename to 'ifRangeHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IF_RANGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ifRangeHeader'
+
+  - title: "Rename to 'ifUnmodifiedSinceHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'IF_UNMODIFIED_SINCE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'ifUnmodifiedSinceHeader'
+
+  - title: "Rename to 'lastModifiedHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'LAST_MODIFIED'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'lastModifiedHeader'
+
+  - title: "Rename to 'locationHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'LOCATION'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'locationHeader'
+
+  - title: "Rename to 'maxForwardsHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'MAX_FORWARDS'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'maxForwardsHeader'
+
+  - title: "Rename to 'pragmaHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'PRAGMA'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'pragmaHeader'
+
+  - title: "Rename to 'proxyAuthenticateHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'PROXY_AUTHENTICATE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'proxyAuthenticateHeader'
+
+  - title: "Rename to 'proxyAuthorizationHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'PROXY_AUTHORIZATION'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'proxyAuthorizationHeader'
+
+  - title: "Rename to 'rangeHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RANGE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'rangeHeader'
+
+  - title: "Rename to 'refererHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'REFERER'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'refererHeader'
+
+  - title: "Rename to 'retryAfterHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RETRY_AFTER'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'retryAfterHeader'
+
+  - title: "Rename to 'serverHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SERVER'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'serverHeader'
+
+  - title: "Rename to 'teHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'teHeader'
+
+  - title: "Rename to 'trailerHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TRAILER'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'trailerHeader'
+
+  - title: "Rename to 'transferEncodingHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TRANSFER_ENCODING'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'transferEncodingHeader'
+
+  - title: "Rename to 'upgradeHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'UPGRADE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'upgradeHeader'
+
+  - title: "Rename to 'userAgentHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'USER_AGENT'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'userAgentHeader'
+
+  - title: "Rename to 'varyHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'VARY'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'varyHeader'
+
+  - title: "Rename to 'viaHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'VIA'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'viaHeader'
+
+  - title: "Rename to 'warningHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WARNING'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'warningHeader'
+
+  - title: "Rename to 'wwwAuthenticateHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'WWW_AUTHENTICATE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'wwwAuthenticateHeader'
+
+  - title: "Rename to 'cookieHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'COOKIE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'cookieHeader'
+
+  - title: "Rename to 'setCookieHeader'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'SET_COOKIE'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'setCookieHeader'
+
+  - title: "Rename to 'generalHeaders'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'GENERAL_HEADERS'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'generalHeaders'
+
+  - title: "Rename to 'entityHeaders'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'ENTITY_HEADERS'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'entityHeaders'
+
+  - title: "Rename to 'responseHeaders'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'RESPONSE_HEADERS'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'responseHeaders'
+
+  - title: "Rename to 'requestHeaders'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'REQUEST_HEADERS'
+      inClass: 'HttpHeaders'
+    changes:
+      - kind: 'rename'
+        newName: 'requestHeaders'
+
+  - title: "Rename to 'text'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'TEXT'
+      inClass: 'ContentType'
+    changes:
+      - kind: 'rename'
+        newName: 'text'
+
+  - title: "Rename to 'html'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'HTML'
+      inClass: 'ContentType'
+    changes:
+      - kind: 'rename'
+        newName: 'html'
+
+  - title: "Rename to 'json'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'JSON'
+      inClass: 'ContentType'
+    changes:
+      - kind: 'rename'
+        newName: 'json'
+
+  - title: "Rename to 'binary'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'BINARY'
+      inClass: 'ContentType'
+    changes:
+      - kind: 'rename'
+        newName: 'binary'
+
+  - title: "Rename to 'defaultHttpPort'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT_HTTP_PORT'
+      inClass: 'HttpClient'
+    changes:
+      - kind: 'rename'
+        newName: 'defaultHttpPort'
+
+  - title: "Rename to 'defaultHttpsPort'"
+    date: 2021-09-20
+    element:
+      uris: [ 'dart:io' ]
+      field: 'DEFAULT_HTTPS_PORT'
+      inClass: 'HttpClient'
+    changes:
+      - kind: 'rename'
+        newName: 'defaultHttpsPort'
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
index 6799347..0d12311 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/isolate_patch.dart
@@ -77,6 +77,10 @@
 
   @patch
   void removeErrorListener(SendPort port) => _unsupported();
+
+  @patch
+  static Never exit([SendPort? finalMessagePort, Object? message]) =>
+      _unsupported();
 }
 
 /** Default factory for receive ports. */
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 7e019bf..5a5d299 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
@@ -107,11 +107,13 @@
 @JSExportName('implements')
 final implements_ = JS('', 'Symbol("implements")');
 
-/// Either `null` if `clazz` doesn't directly implement any interfaces or a
-/// list of type objects if it does.  Note, indirectly (e.g., via superclass)
-/// implemented interfaces aren't included here.
-/// See compiler.dart for when/how it is emitted.
-List Function()? getImplements(clazz) => JS(
+/// Returns `null` if [clazz] doesn't directly implement any interfaces or a
+/// a `Function` that when called produces a `List` of the type objects
+/// [clazz] implements.
+///
+/// Note, indirectly (e.g., via superclass) implemented interfaces aren't
+/// included here. See compiler.dart for when/how it is emitted.
+List<Object> Function()? getImplements(clazz) => JS(
     '',
     'Object.hasOwnProperty.call(#, #) ? #[#] : null',
     clazz,
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 33854c7..89c90d5 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
@@ -717,7 +717,11 @@
 String str(obj) {
   if (obj == null) return "null";
   if (obj is String) return obj;
-  return _notNull(JS('!', '#[#]()', obj, extensionSymbol('toString')));
+  final result = JS('', '#[#]()', obj, extensionSymbol('toString'));
+  // TODO(40614): Declare `result` as String once non-nullability is sound.
+  if (result is String) return result;
+  // Since Dart 2.0, `null` is the only other option.
+  throw ArgumentError.value(obj, 'object', "toString method returned 'null'");
 }
 
 // TODO(jmesserly): is the argument type verified statically?
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 3c0267d..c92852f 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
@@ -839,6 +839,26 @@
   toString() => name;
 }
 
+/// A helper data class for the subtype check algorithm to represent a generic
+/// function type variable with its bound.
+///
+/// Instances of this class are created during subtype check operations to pass
+/// information deeper into the algorithm. They are not canonicalized and should
+/// be discarded after use.
+class TypeVariableForSubtype extends DartType {
+  /// The position of this type variable in the type variable list of a generic
+  /// function.
+  final int index;
+
+  /// The bound for this type variable.
+  ///
+  /// Only nullable to avoid the cost of a late field within the subtype check.
+  /// Should not be null after initial creation algorithm is complete.
+  DartType? bound;
+
+  TypeVariableForSubtype(this.index);
+}
+
 class Variance {
   static const int unrelated = 0;
   static const int covariant = 1;
@@ -889,6 +909,7 @@
 
 class GenericFunctionType extends AbstractFunctionType {
   final _instantiateTypeParts;
+  @notNull
   final int formalCount;
   final _instantiateTypeBounds;
   final List<TypeVariable> _typeFormals;
@@ -1166,7 +1187,9 @@
 })()''');
 
 /// Returns true if [ft1] <: [ft2].
-_isFunctionSubtype(ft1, ft2, @notNull bool strictMode) => JS('', '''(() => {
+@notNull
+bool _isFunctionSubtype(ft1, ft2, @notNull bool strictMode) =>
+    JS<bool>('!', '''(() => {
   let ret1 = $ft1.returnType;
   let ret2 = $ft2.returnType;
 
@@ -1257,6 +1280,14 @@
   return $_isSubtype(ret1, ret2, strictMode);
 })()''');
 
+/// Number of generic function type variables encountered so far during a
+/// subtype check.
+///
+/// This continues to increase through nested generic function types but should
+/// always be reset before performing a new subtype check.
+@notNull
+var _typeVariableCount = 0;
+
 /// Returns true if [t1] <: [t2].
 @notNull
 bool isSubtypeOf(@notNull t1, @notNull t2) {
@@ -1265,9 +1296,12 @@
   var map = JS<Object>('!', '#[#]', t1, _subtypeCache);
   bool result = JS('', '#.get(#)', map, t2);
   if (JS('!', '# !== void 0', result)) return result;
-
+  // Reset count before performing subtype check.
+  _typeVariableCount = 0;
   var validSubtype = _isSubtype(t1, t2, true);
   if (!validSubtype && !compileTimeFlag('soundNullSafety')) {
+    // Reset count before performing subtype check.
+    _typeVariableCount = 0;
     validSubtype = _isSubtype(t1, t2, false);
     if (validSubtype) {
       // TODO(nshahan) Need more information to be helpful here.
@@ -1339,45 +1373,44 @@
 }
 
 @notNull
-bool _isSubtype(t1, t2, @notNull bool strictMode) => JS<bool>('!', '''(() => {
-  if (!$strictMode) {
+bool _isSubtype(t1, t2, @notNull bool strictMode) {
+  if (!strictMode) {
     // Strip nullable types when performing check in weak mode.
     // TODO(nshahan) Investigate stripping off legacy types as well.
-    if (${_jsInstanceOf(t1, NullableType)}) {
-      t1 = t1.type;
+    if (_jsInstanceOf(t1, NullableType)) {
+      t1 = JS<NullableType>('!', '#', t1).type;
     }
-    if (${_jsInstanceOf(t2, NullableType)}) {
-      t2 = t2.type;
+    if (_jsInstanceOf(t2, NullableType)) {
+      t2 = JS<NullableType>('!', '#', t2).type;
     }
   }
-  if ($t1 === $t2) {
+
+  if (JS<bool>('!', '# === #', t1, t2)) {
     return true;
   }
 
   // Trivially true, "Right Top" or "Left Bottom".
-  if (${_isTop(t2)} || ${_isBottom(t1, strictMode)}) {
+  if (_isTop(t2) || _isBottom(t1, strictMode)) {
     return true;
   }
 
   // "Left Top".
-  if (${_equalType(t1, dynamic)} || $t1 === $void_) {
-    return $_isSubtype($nullable($Object), $t2, $strictMode);
+  if (_equalType(t1, dynamic) || JS<bool>('!', '# === #', t1, void_)) {
+    return _isSubtype(typeRep<Object?>(), t2, strictMode);
   }
 
   // "Right Object".
-  if (${_equalType(t2, Object)}) {
-    // TODO(nshahan) Need to handle type variables.
-    // https://github.com/dart-lang/sdk/issues/38816
-    if (${_isFutureOr(t1)}) {
-      let t1TypeArg = ${getGenericArgs(t1)}[0];
-      return $_isSubtype(t1TypeArg, $Object, $strictMode);
+  if (_equalType(t2, Object)) {
+    if (_isFutureOr(t1)) {
+      var t1TypeArg = JS('', '#[0]', getGenericArgs(t1));
+      return _isSubtype(t1TypeArg, typeRep<Object>(), strictMode);
     }
 
-    if (${_jsInstanceOf(t1, LegacyType)}) {
-      return $_isSubtype(t1.type, t2, $strictMode);
+    if (_jsInstanceOf(t1, LegacyType)) {
+      return _isSubtype(JS<LegacyType>('!', '#', t1).type, t2, strictMode);
     }
 
-    if (${_equalType(t1, Null)} || ${_jsInstanceOf(t1, NullableType)}) {
+    if (_equalType(t1, Null) || _jsInstanceOf(t1, NullableType)) {
       // Checks for t1 is dynamic or void already performed in "Left Top" test.
       return false;
     }
@@ -1385,81 +1418,78 @@
   }
 
   // "Left Null".
-  if (${_equalType(t1, Null)}) {
-    // TODO(nshahan) Need to handle type variables.
-    // https://github.com/dart-lang/sdk/issues/38816
-    if (${_isFutureOr(t2)}) {
-      let t2TypeArg = ${getGenericArgs(t2)}[0];
-      return $_isSubtype($Null, t2TypeArg, $strictMode);
+  if (_equalType(t1, Null)) {
+    if (_isFutureOr(t2)) {
+      var t2TypeArg = JS('', '#[0]', getGenericArgs(t2));
+      return _isSubtype(typeRep<Null>(), t2TypeArg, strictMode);
     }
 
-    return ${_equalType(t2, Null)} || ${_jsInstanceOf(t2, LegacyType)} ||
-        ${_jsInstanceOf(t2, NullableType)};
+    return _equalType(t2, Null) ||
+        _jsInstanceOf(t2, LegacyType) ||
+        _jsInstanceOf(t2, NullableType);
   }
 
   // "Left Legacy".
-  if (${_jsInstanceOf(t1, LegacyType)}) {
-    return $_isSubtype(t1.type, t2, $strictMode);
+  if (_jsInstanceOf(t1, LegacyType)) {
+    return _isSubtype(JS<LegacyType>('!', '#', t1).type, t2, strictMode);
   }
 
   // "Right Legacy".
-  if (${_jsInstanceOf(t2, LegacyType)}) {
-    return $_isSubtype(t1, $nullable(t2.type), $strictMode);
+  if (_jsInstanceOf(t2, LegacyType)) {
+    return _isSubtype(
+        t1, nullable(JS<LegacyType>('!', '#', t2).type), strictMode);
   }
 
   // Handle FutureOr<T> union type.
-  if (${_isFutureOr(t1)}) {
-    let t1TypeArg = ${getGenericArgs(t1)}[0];
-    if (${_isFutureOr(t2)}) {
-      let t2TypeArg = ${getGenericArgs(t2)}[0];
+  if (_isFutureOr(t1)) {
+    var t1TypeArg = JS('!', '#[0]', getGenericArgs(t1));
+    if (_isFutureOr(t2)) {
+      var t2TypeArg = JS('!', '#[0]', getGenericArgs(t2));
       // FutureOr<A> <: FutureOr<B> if A <: B
-      if ($_isSubtype(t1TypeArg, t2TypeArg, $strictMode)) {
+      if (_isSubtype(t1TypeArg, t2TypeArg, strictMode)) {
         return true;
       }
     }
 
     // given t1 is Future<A> | A, then:
     // (Future<A> | A) <: t2 iff Future<A> <: t2 and A <: t2.
-    let t1Future = ${getGenericClassStatic<Future>()}(t1TypeArg);
+    var t1Future = JS('!', '#(#)', getGenericClassStatic<Future>(), t1TypeArg);
     // Known to handle the case FutureOr<Null> <: Future<Null>.
-    return $_isSubtype(t1Future, $t2, $strictMode) &&
-        $_isSubtype(t1TypeArg, $t2, $strictMode);
+    return _isSubtype(t1Future, t2, strictMode) &&
+        _isSubtype(t1TypeArg, t2, strictMode);
   }
 
   // "Left Nullable".
-  if (${_jsInstanceOf(t1, NullableType)}) {
-    // TODO(nshahan) Need to handle type variables.
-    // https://github.com/dart-lang/sdk/issues/38816
-    return $_isSubtype(t1.type, t2, $strictMode) && $_isSubtype($Null, t2, $strictMode);
+  if (_jsInstanceOf(t1, NullableType)) {
+    return _isSubtype(JS<NullableType>('!', '#', t1).type, t2, strictMode) &&
+        _isSubtype(typeRep<Null>(), t2, strictMode);
   }
 
-  if ($_isFutureOr($t2)) {
+  if (_isFutureOr(t2)) {
     // given t2 is Future<A> | A, then:
     // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
-    let t2TypeArg = ${getGenericArgs(t2)}[0];
-    let t2Future = ${getGenericClassStatic<Future>()}(t2TypeArg);
-    // TODO(nshahan) Need to handle type variables on the left.
-    // https://github.com/dart-lang/sdk/issues/38816
-    return $_isSubtype($t1, t2Future, $strictMode) || $_isSubtype($t1, t2TypeArg, $strictMode);
+    var t2TypeArg = JS('!', '#[0]', getGenericArgs(t2));
+    var t2Future = JS('!', '#(#)', getGenericClassStatic<Future>(), t2TypeArg);
+    return _isSubtype(t1, t2Future, strictMode) ||
+        _isSubtype(t1, t2TypeArg, strictMode);
   }
 
   // "Right Nullable".
-  if (${_jsInstanceOf(t2, NullableType)}) {
-    // TODO(nshahan) Need to handle type variables.
-    // https://github.com/dart-lang/sdk/issues/38816
-    return $_isSubtype(t1, t2.type, $strictMode) || $_isSubtype(t1, $Null, $strictMode);
+  if (_jsInstanceOf(t2, NullableType)) {
+    return _isSubtype(t1, JS<NullableType>('!', '#', t2).type, strictMode) ||
+        _isSubtype(t1, typeRep<Null>(), strictMode);
   }
 
   // "Traditional" name-based subtype check.  Avoid passing
   // function types to the class subtype checks, since we don't
   // currently distinguish between generic typedefs and classes.
-  if (!${_jsInstanceOf(t2, AbstractFunctionType)}) {
+  if (!_jsInstanceOf(t2, AbstractFunctionType)) {
     // t2 is an interface type.
 
-    if (${_jsInstanceOf(t1, AbstractFunctionType)}) {
+    if (_jsInstanceOf(t1, AbstractFunctionType)) {
       // Function types are only subtypes of interface types `Function` (and top
       // types, handled already above).
-      return ${_equalType(t2, Function)};
+      return _equalType(t2, Function);
     }
 
     // Even though lazy and anonymous JS types are natural subtypes of
@@ -1472,34 +1502,33 @@
     // JavaScriptObject <: package:js types
     // package:js types <: JavaScriptObject
 
-    if (${_isInterfaceSubtype(t1, JavaScriptObject, strictMode)}
-        &&
-            // TODO: Since package:js types are instances of PackageJSType and
-            // we don't have a mechanism to determine if *some* package:js type
-            // implements t2. This will possibly require keeping a map of these
-            // relationships for this subtyping check. For now, this will only
-            // work if t2 is also a PackageJSType.
-            ${_isInterfaceSubtype(_pkgJSTypeForSubtyping, t2, strictMode)}) {
+    if (_isInterfaceSubtype(t1, typeRep<JavaScriptObject>(), strictMode) &&
+        // TODO: Since package:js types are instances of PackageJSType and
+        // we don't have a mechanism to determine if *some* package:js type
+        // implements t2. This will possibly require keeping a map of these
+        // relationships for this subtyping check. For now, this will only
+        // work if t2 is also a PackageJSType.
+        _isInterfaceSubtype(_pkgJSTypeForSubtyping, t2, strictMode)) {
       return true;
     }
 
-    if (${_isInterfaceSubtype(JavaScriptObject, t2, strictMode)}
-        && ${_isInterfaceSubtype(t1, _pkgJSTypeForSubtyping, strictMode)}) {
+    if (_isInterfaceSubtype(typeRep<JavaScriptObject>(), t2, strictMode) &&
+        _isInterfaceSubtype(t1, _pkgJSTypeForSubtyping, strictMode)) {
       return true;
     }
 
     // Compare two interface types.
-    return ${_isInterfaceSubtype(t1, t2, strictMode)};
+    return _isInterfaceSubtype(t1, t2, strictMode);
   }
 
   // Function subtyping.
-  if (!${_jsInstanceOf(t1, AbstractFunctionType)}) {
+  if (!_jsInstanceOf(t1, AbstractFunctionType)) {
     return false;
   }
 
   // Handle generic functions.
-  if (${_jsInstanceOf(t1, GenericFunctionType)}) {
-    if (!${_jsInstanceOf(t2, GenericFunctionType)}) {
+  if (_jsInstanceOf(t1, GenericFunctionType)) {
+    if (!_jsInstanceOf(t2, GenericFunctionType)) {
       return false;
     }
 
@@ -1509,97 +1538,142 @@
     //
     // where TFresh is a list of fresh type variables that both g1 and g2 will
     // be instantiated with.
-    let formalCount = $t1.formalCount;
-    if (formalCount !== $t2.formalCount) {
+    var formalCount = JS<GenericFunctionType>('!', '#', t1).formalCount;
+    if (formalCount != JS<GenericFunctionType>('!', '#', t2).formalCount) {
       return false;
     }
 
-    // Using either function's type formals will work as long as they're both
-    // instantiated with the same ones. The instantiate operation is guaranteed
-    // to avoid capture because it does not depend on its TypeVariable objects,
-    // rather it uses JS function parameters to ensure correct binding.
-    let fresh = $t2.typeFormals;
+    // Fresh type variables will be used to instantiate generic functions.
+    List<Object> fresh1;
+    List<Object> fresh2;
 
     // Without type bounds all will instantiate to dynamic. Only need to check
     // further if at least one of the functions has type bounds.
-    if ($t1.hasTypeBounds || $t2.hasTypeBounds) {
-      // Check the bounds of the type parameters of g1 and g2. Given a type
-      // parameter `T1 extends U1` from g1, and a type parameter `T2 extends U2`
-      // from g2, we must ensure that U1 and U2 are mutual subtypes.
-      //
-      // (Note there is no variance in the type bounds of type parameters of
-      // generic functions).
-      let t1Bounds = $t1.instantiateTypeBounds(fresh);
-      let t2Bounds = $t2.instantiateTypeBounds(fresh);
-      for (let i = 0; i < formalCount; i++) {
-        if (t1Bounds[i] != t2Bounds[i]) {
-          if (!($_isSubtype(t1Bounds[i], t2Bounds[i], $strictMode)
-              && $_isSubtype(t2Bounds[i], t1Bounds[i], $strictMode))) {
+    if (JS<bool>('!', '#.hasTypeBounds || #.hasTypeBounds', t1, t2)) {
+      // Create two sets of fresh type variables that can store their bounds so
+      // they can be considered in recursive calls.
+      fresh1 = JS('!', 'new Array(#)', formalCount);
+      fresh2 = JS('!', 'new Array(#)', formalCount);
+      for (var i = 0; i < formalCount; i++, _typeVariableCount++) {
+        JS('!', '#[#] = #', fresh1, i,
+            TypeVariableForSubtype(_typeVariableCount));
+        JS('!', '#[#] = #', fresh2, i,
+            TypeVariableForSubtype(_typeVariableCount));
+      }
+      var t1Bounds =
+          JS<GenericFunctionType>('!', '#', t1).instantiateTypeBounds(fresh1);
+      var t2Bounds =
+          JS<GenericFunctionType>('!', '#', t2).instantiateTypeBounds(fresh2);
+
+      for (var i = 0; i < formalCount; i++) {
+        var t1Bound = JS<Object>('!', '#[#]', t1Bounds, i);
+        var t2Bound = JS<Object>('!', '#[#]', t2Bounds, i);
+
+        // Check the bounds of the type parameters of g1 and g2. Given a type
+        // parameter `T1 extends B1` from g1, and a type parameter `T2 extends
+        // B2` from g2, we must ensure that B1 and B2 are mutual subtypes.
+        //
+        // (Note there is no variance in the type bounds of type parameters of
+        // generic functions).
+        if (JS<bool>('!', '# != #', t1Bound, t2Bound)) {
+          if (!(_isSubtype(t1Bound, t2Bound, strictMode) &&
+              _isSubtype(t2Bound, t1Bound, strictMode))) {
             return false;
           }
         }
+        // Assign bounds to be used in the `_isInterfaceSubtype` check later as
+        // this subtype check continues.
+        JS('', '#[#].bound = #', fresh1, i, t1Bound);
+        JS('', '#[#].bound = #', fresh2, i, t2Bound);
       }
+    } else {
+      // Using either function's type formals will work as long as they're both
+      // instantiated with the same ones. The instantiate operation is
+      // guaranteed to avoid capture because it does not depend on its
+      // TypeVariable objects, rather it uses JS function parameters to ensure
+      // correct binding.
+      fresh1 = JS<GenericFunctionType>('!', '#', t1).typeFormals;
+      fresh2 = fresh1;
     }
 
-    $t1 = $t1.instantiate(fresh);
-    $t2 = $t2.instantiate(fresh);
-  } else if (${_jsInstanceOf(t2, GenericFunctionType)}) {
+    t1 = JS<GenericFunctionType>('!', '#', t1).instantiate(fresh1);
+    t2 = JS<GenericFunctionType>('!', '#', t2).instantiate(fresh2);
+  } else if (_jsInstanceOf(t2, GenericFunctionType)) {
     return false;
   }
 
   // Handle non-generic functions.
-  return ${_isFunctionSubtype(t1, t2, strictMode)};
-})()''');
+  return _isFunctionSubtype(t1, t2, strictMode);
+}
 
-bool _isInterfaceSubtype(t1, t2, @notNull bool strictMode) => JS('', '''(() => {
+@notNull
+bool _isInterfaceSubtype(t1, t2, @notNull bool strictMode) {
   // Instances of PackageJSType are all subtypes of each other.
-  if (${_jsInstanceOf(t1, PackageJSType)}
-      && ${_jsInstanceOf(t2, PackageJSType)}) {
+  if (_jsInstanceOf(t1, PackageJSType) && _jsInstanceOf(t2, PackageJSType)) {
     return true;
   }
 
-  if ($t1 === $t2) {
+  if (JS<bool>('!', '# === #', t1, t2)) {
     return true;
   }
-  if (${_equalType(t1, Object)}) {
+  if (_equalType(t1, Object)) {
     return false;
   }
 
   // Classes cannot subtype `Function` or vice versa.
-  if (${_equalType(t1, Function)} || ${_equalType(t2, Function)}) {
+  if (_equalType(t1, Function) || _equalType(t2, Function)) {
     return false;
   }
 
   // If t1 is a JS Object, we may not hit core.Object.
-  if ($t1 == null) {
-    return ${_equalType(t2, Object)} || ${_equalType(t2, dynamic)};
+  if (t1 == null) {
+    return _equalType(t2, Object) || _equalType(t2, dynamic);
+  }
+
+  if (_jsInstanceOf(t1, TypeVariableForSubtype)) {
+    if (_jsInstanceOf(t2, TypeVariableForSubtype)) {
+      // Bounds were already checked to be subtypes of each other in the
+      // generic function section of `_isSubtype()` so just check these type
+      // variables share the same index in their respective signatures.
+      return JS<TypeVariableForSubtype>('!', '#', t1).index ==
+          JS<TypeVariableForSubtype>('!', '#', t2).index;
+    }
+
+    // If t1 <: bound <: t2 then t1 <: t2.
+    return _isSubtype(
+        JS<TypeVariableForSubtype>('!', '#', t1).bound, t2, strictMode);
   }
 
   // Check if t1 and t2 have the same raw type.  If so, check covariance on
   // type parameters.
-  let raw1 = $getGenericClass($t1);
-  let raw2 = $getGenericClass($t2);
-  if (raw1 != null && raw1 == raw2) {
-    let typeArguments1 = $getGenericArgs($t1);
-    let typeArguments2 = $getGenericArgs($t2);
-    if (typeArguments1.length != typeArguments2.length) {
-      $assertFailed();
+  var raw1 = getGenericClass(t1);
+  var raw2 = getGenericClass(t2);
+  if (raw1 != null && JS<bool>('!', '# == #', raw1, raw2)) {
+    var typeArguments1 = getGenericArgs(t1);
+    var typeArguments2 = getGenericArgs(t2);
+    if (JS<bool>('!', '#.length != #.length', typeArguments1, typeArguments2)) {
+      assertFailed('Internal type check failure.');
     }
-    let variances = $getGenericArgVariances($t1);
-    for (let i = 0; i < typeArguments1.length; ++i) {
+    var variances = getGenericArgVariances(t1);
+    for (var i = 0; i < JS<int>('!', '#.length', typeArguments1); ++i) {
       // When using implicit variance, variances will be undefined and
       // considered covariant.
-      if (variances === void 0 || variances[i] == ${Variance.covariant}) {
-        if (!$_isSubtype(typeArguments1[i], typeArguments2[i], $strictMode)) {
+      var varianceType = JS('!', '# && #[#]', variances, variances, i);
+      var typeArg1 = JS('!', '#[#]', typeArguments1, i);
+      var typeArg2 = JS('!', '#[#]', typeArguments2, i);
+      if (JS<bool>('!', '# === void 0 || # == #', varianceType, varianceType,
+          Variance.covariant)) {
+        if (!_isSubtype(typeArg1, typeArg2, strictMode)) {
           return false;
         }
-      } else if (variances[i] == ${Variance.contravariant}) {
-        if (!$_isSubtype(typeArguments2[i], typeArguments1[i], $strictMode)) {
+      } else if (JS<bool>(
+          '!', '# == #', varianceType, Variance.contravariant)) {
+        if (!_isSubtype(typeArg2, typeArg1, strictMode)) {
           return false;
         }
-      } else if (variances[i] == ${Variance.invariant}) {
-        if (!$_isSubtype(typeArguments1[i], typeArguments2[i], $strictMode) ||
-            !$_isSubtype(typeArguments2[i], typeArguments1[i], $strictMode)) {
+      } else if (JS<bool>('!', '# == #', varianceType, Variance.invariant)) {
+        if (!_isSubtype(typeArg1, typeArg2, strictMode) ||
+            !_isSubtype(typeArg2, typeArg1, strictMode)) {
           return false;
         }
       }
@@ -1607,27 +1681,27 @@
     return true;
   }
 
-  if ($_isInterfaceSubtype(t1.__proto__, $t2, $strictMode)) {
+  if (_isInterfaceSubtype(JS('', '#.__proto__', t1), t2, strictMode)) {
     return true;
   }
 
   // Check mixin.
-  let m1 = $getMixin($t1);
-  if (m1 != null && $_isInterfaceSubtype(m1, $t2, $strictMode)) {
+  var m1 = getMixin(t1);
+  if (m1 != null && _isInterfaceSubtype(m1, t2, strictMode)) {
     return true;
   }
 
   // Check interfaces.
-  let getInterfaces = $getImplements($t1);
-  if (getInterfaces) {
-    for (let i1 of getInterfaces()) {
-      if ($_isInterfaceSubtype(i1, $t2, $strictMode)) {
+  var getInterfaces = getImplements(t1);
+  if (getInterfaces != null) {
+    for (var i1 in getInterfaces()) {
+      if (_isInterfaceSubtype(i1, t2, strictMode)) {
         return true;
       }
     }
   }
   return false;
-})()''');
+}
 
 Object? extractTypeArguments<T>(T instance, Function f) {
   if (instance == null) {
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 1c0b053..2bb2fa1 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -106,6 +106,11 @@
   void removeErrorListener(SendPort port) {
     throw new UnsupportedError("Isolate.removeErrorListener");
   }
+
+  @patch
+  static Never exit([SendPort? finalMessagePort, Object? message]) {
+    throw new UnsupportedError("Isolate.exit");
+  }
 }
 
 @patch
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index b39faed..ff38ff8 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -131,9 +131,12 @@
   } else if (value == null) {
     return 'null';
   }
-  var res = value.toString();
-  if (res is! String) throw argumentErrorValue(value);
-  return res;
+  var result = value.toString();
+  if (result is! String) {
+    throw ArgumentError.value(
+        value, 'object', "toString method returned 'null'");
+  }
+  return result;
 }
 
 // Called from generated code.
diff --git a/sdk/lib/_internal/js_runtime/lib/native_helper.dart b/sdk/lib/_internal/js_runtime/lib/native_helper.dart
index 4c404e0..8634929 100644
--- a/sdk/lib/_internal/js_runtime/lib/native_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/native_helper.dart
@@ -260,7 +260,8 @@
 }
 
 String constructorNameFallback(object) {
-  return JS('String', '#(#)', _constructorNameFallback, object);
+  return JS('returns:String;effects:none;depends:none', '#(#)',
+      _constructorNameFallback, object);
 }
 
 var initNativeDispatchFlag; // null or true
diff --git a/sdk/lib/_internal/vm/bin/builtin.dart b/sdk/lib/_internal/vm/bin/builtin.dart
index 7a3bafb..b5263e0 100644
--- a/sdk/lib/_internal/vm/bin/builtin.dart
+++ b/sdk/lib/_internal/vm/bin/builtin.dart
@@ -24,7 +24,8 @@
 // 'print' implementation.
 // The standalone embedder registers the closurized _print function with the
 // dart:core library.
-void _printString(String s) native "Builtin_PrintString";
+@pragma("vm:external-name", "Builtin_PrintString")
+external void _printString(String s);
 
 void _print(arg) {
   _printString(arg.toString());
diff --git a/sdk/lib/_internal/vm/bin/cli_patch.dart b/sdk/lib/_internal/vm/bin/cli_patch.dart
index 504a0db..40abe7b 100644
--- a/sdk/lib/_internal/vm/bin/cli_patch.dart
+++ b/sdk/lib/_internal/vm/bin/cli_patch.dart
@@ -5,4 +5,5 @@
 import "dart:_internal" show patch;
 
 @patch
-void _waitForEvent(int timeoutMillis) native "CLI_WaitForEvent";
+@pragma("vm:external-name", "CLI_WaitForEvent")
+external void _waitForEvent(int timeoutMillis);
diff --git a/sdk/lib/_internal/vm/bin/common_patch.dart b/sdk/lib/_internal/vm/bin/common_patch.dart
index 45e8ac1..ed789f0 100644
--- a/sdk/lib/_internal/vm/bin/common_patch.dart
+++ b/sdk/lib/_internal/vm/bin/common_patch.dart
@@ -65,13 +65,15 @@
 @patch
 class OSError {
   @patch
-  static int inProgressErrorCode() native "OSError_inProgressErrorCode";
+  @pragma("vm:external-name", "OSError_inProgressErrorCode")
+  external static int inProgressErrorCode();
 }
 
 @patch
 class _IOCrypto {
   @patch
-  static Uint8List getRandomBytes(int count) native "Crypto_GetRandomBytes";
+  @pragma("vm:external-name", "Crypto_GetRandomBytes")
+  external static Uint8List getRandomBytes(int count);
 }
 
 @pragma("vm:entry-point", "call")
diff --git a/sdk/lib/_internal/vm/bin/directory_patch.dart b/sdk/lib/_internal/vm/bin/directory_patch.dart
index 7549f72..5153162 100644
--- a/sdk/lib/_internal/vm/bin/directory_patch.dart
+++ b/sdk/lib/_internal/vm/bin/directory_patch.dart
@@ -7,34 +7,39 @@
 @patch
 class _Directory {
   @patch
-  static _current(_Namespace namespace) native "Directory_Current";
+  @pragma("vm:external-name", "Directory_Current")
+  external static _current(_Namespace namespace);
   @patch
-  static _setCurrent(_Namespace namespace, Uint8List rawPath)
-      native "Directory_SetCurrent";
+  @pragma("vm:external-name", "Directory_SetCurrent")
+  external static _setCurrent(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _createTemp(_Namespace namespace, Uint8List rawPath)
-      native "Directory_CreateTemp";
+  @pragma("vm:external-name", "Directory_CreateTemp")
+  external static _createTemp(_Namespace namespace, Uint8List rawPath);
   @patch
-  static String _systemTemp(_Namespace namespace) native "Directory_SystemTemp";
+  @pragma("vm:external-name", "Directory_SystemTemp")
+  external static String _systemTemp(_Namespace namespace);
   @patch
-  static _exists(_Namespace namespace, Uint8List rawPath)
-      native "Directory_Exists";
+  @pragma("vm:external-name", "Directory_Exists")
+  external static _exists(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _create(_Namespace namespace, Uint8List rawPath)
-      native "Directory_Create";
+  @pragma("vm:external-name", "Directory_Create")
+  external static _create(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _deleteNative(_Namespace namespace, Uint8List rawPath, bool recursive)
-      native "Directory_Delete";
+  @pragma("vm:external-name", "Directory_Delete")
+  external static _deleteNative(
+      _Namespace namespace, Uint8List rawPath, bool recursive);
   @patch
-  static _rename(_Namespace namespace, Uint8List rawPath, String newPath)
-      native "Directory_Rename";
+  @pragma("vm:external-name", "Directory_Rename")
+  external static _rename(
+      _Namespace namespace, Uint8List rawPath, String newPath);
   @patch
-  static void _fillWithDirectoryListing(
+  @pragma("vm:external-name", "Directory_FillWithDirectoryListing")
+  external static void _fillWithDirectoryListing(
       _Namespace namespace,
       List<FileSystemEntity> list,
       Uint8List rawPath,
       bool recursive,
-      bool followLinks) native "Directory_FillWithDirectoryListing";
+      bool followLinks);
 }
 
 @patch
@@ -51,9 +56,11 @@
   factory _AsyncDirectoryListerOpsImpl(int pointer) =>
       new _AsyncDirectoryListerOpsImpl._().._setPointer(pointer);
 
-  void _setPointer(int pointer)
-      native "Directory_SetAsyncDirectoryListerPointer";
-  int getPointer() native "Directory_GetAsyncDirectoryListerPointer";
+  @pragma("vm:external-name", "Directory_SetAsyncDirectoryListerPointer")
+  external void _setPointer(int pointer);
+
+  @pragma("vm:external-name", "Directory_GetAsyncDirectoryListerPointer")
+  external int getPointer();
 }
 
 // Corelib 'Uri.base' implementation.
diff --git a/sdk/lib/_internal/vm/bin/eventhandler_patch.dart b/sdk/lib/_internal/vm/bin/eventhandler_patch.dart
index 072d995..2538131 100644
--- a/sdk/lib/_internal/vm/bin/eventhandler_patch.dart
+++ b/sdk/lib/_internal/vm/bin/eventhandler_patch.dart
@@ -7,9 +7,9 @@
 @patch
 class _EventHandler {
   @patch
-  static void _sendData(Object? sender, SendPort sendPort, int data)
-      native "EventHandler_SendData";
+  @pragma("vm:external-name", "EventHandler_SendData")
+  external static void _sendData(Object? sender, SendPort sendPort, int data);
 
-  static int _timerMillisecondClock()
-      native "EventHandler_TimerMillisecondClock";
+  @pragma("vm:external-name", "EventHandler_TimerMillisecondClock")
+  external static int _timerMillisecondClock();
 }
diff --git a/sdk/lib/_internal/vm/bin/file_patch.dart b/sdk/lib/_internal/vm/bin/file_patch.dart
index 92a306b..b95e71a 100644
--- a/sdk/lib/_internal/vm/bin/file_patch.dart
+++ b/sdk/lib/_internal/vm/bin/file_patch.dart
@@ -7,50 +7,59 @@
 @patch
 class _File {
   @patch
-  static _exists(_Namespace namespace, Uint8List rawPath) native "File_Exists";
+  @pragma("vm:external-name", "File_Exists")
+  external static _exists(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _create(_Namespace namespace, Uint8List rawPath) native "File_Create";
+  @pragma("vm:external-name", "File_Create")
+  external static _create(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _createLink(_Namespace namespace, Uint8List rawPath, String target)
-      native "File_CreateLink";
+  @pragma("vm:external-name", "File_CreateLink")
+  external static _createLink(
+      _Namespace namespace, Uint8List rawPath, String target);
   @patch
-  static _linkTarget(_Namespace namespace, Uint8List rawPath)
-      native "File_LinkTarget";
+  @pragma("vm:external-name", "File_LinkTarget")
+  external static _linkTarget(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _deleteNative(_Namespace namespace, Uint8List rawPath)
-      native "File_Delete";
+  @pragma("vm:external-name", "File_Delete")
+  external static _deleteNative(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _deleteLinkNative(_Namespace namespace, Uint8List rawPath)
-      native "File_DeleteLink";
+  @pragma("vm:external-name", "File_DeleteLink")
+  external static _deleteLinkNative(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _rename(_Namespace namespace, Uint8List oldPath, String newPath)
-      native "File_Rename";
+  @pragma("vm:external-name", "File_Rename")
+  external static _rename(
+      _Namespace namespace, Uint8List oldPath, String newPath);
   @patch
-  static _renameLink(_Namespace namespace, Uint8List oldPath, String newPath)
-      native "File_RenameLink";
+  @pragma("vm:external-name", "File_RenameLink")
+  external static _renameLink(
+      _Namespace namespace, Uint8List oldPath, String newPath);
   @patch
-  static _copy(_Namespace namespace, Uint8List oldPath, String newPath)
-      native "File_Copy";
+  @pragma("vm:external-name", "File_Copy")
+  external static _copy(
+      _Namespace namespace, Uint8List oldPath, String newPath);
   @patch
-  static _lengthFromPath(_Namespace namespace, Uint8List rawPath)
-      native "File_LengthFromPath";
+  @pragma("vm:external-name", "File_LengthFromPath")
+  external static _lengthFromPath(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _lastModified(_Namespace namespace, Uint8List rawPath)
-      native "File_LastModified";
+  @pragma("vm:external-name", "File_LastModified")
+  external static _lastModified(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _setLastModified(_Namespace namespace, Uint8List rawPath, int millis)
-      native "File_SetLastModified";
+  @pragma("vm:external-name", "File_SetLastModified")
+  external static _setLastModified(
+      _Namespace namespace, Uint8List rawPath, int millis);
   @patch
-  static _lastAccessed(_Namespace namespace, Uint8List rawPath)
-      native "File_LastAccessed";
+  @pragma("vm:external-name", "File_LastAccessed")
+  external static _lastAccessed(_Namespace namespace, Uint8List rawPath);
   @patch
-  static _setLastAccessed(_Namespace namespace, Uint8List rawPath, int millis)
-      native "File_SetLastAccessed";
+  @pragma("vm:external-name", "File_SetLastAccessed")
+  external static _setLastAccessed(
+      _Namespace namespace, Uint8List rawPath, int millis);
   @patch
-  static _open(_Namespace namespace, Uint8List rawPath, int mode)
-      native "File_Open";
+  @pragma("vm:external-name", "File_Open")
+  external static _open(_Namespace namespace, Uint8List rawPath, int mode);
   @patch
-  static int _openStdio(int fd) native "File_OpenStdio";
+  @pragma("vm:external-name", "File_OpenStdio")
+  external static int _openStdio(int fd);
 }
 
 @patch
@@ -68,21 +77,35 @@
   factory _RandomAccessFileOpsImpl(int pointer) =>
       new _RandomAccessFileOpsImpl._().._setPointer(pointer);
 
-  void _setPointer(int pointer) native "File_SetPointer";
+  @pragma("vm:external-name", "File_SetPointer")
+  external void _setPointer(int pointer);
 
-  int getPointer() native "File_GetPointer";
-  int close() native "File_Close";
-  readByte() native "File_ReadByte";
-  read(int bytes) native "File_Read";
-  readInto(List<int> buffer, int start, int? end) native "File_ReadInto";
-  writeByte(int value) native "File_WriteByte";
-  writeFrom(List<int> buffer, int start, int? end) native "File_WriteFrom";
-  position() native "File_Position";
-  setPosition(int position) native "File_SetPosition";
-  truncate(int length) native "File_Truncate";
-  length() native "File_Length";
-  flush() native "File_Flush";
-  lock(int lock, int start, int end) native "File_Lock";
+  @pragma("vm:external-name", "File_GetPointer")
+  external int getPointer();
+  @pragma("vm:external-name", "File_Close")
+  external int close();
+  @pragma("vm:external-name", "File_ReadByte")
+  external readByte();
+  @pragma("vm:external-name", "File_Read")
+  external read(int bytes);
+  @pragma("vm:external-name", "File_ReadInto")
+  external readInto(List<int> buffer, int start, int? end);
+  @pragma("vm:external-name", "File_WriteByte")
+  external writeByte(int value);
+  @pragma("vm:external-name", "File_WriteFrom")
+  external writeFrom(List<int> buffer, int start, int? end);
+  @pragma("vm:external-name", "File_Position")
+  external position();
+  @pragma("vm:external-name", "File_SetPosition")
+  external setPosition(int position);
+  @pragma("vm:external-name", "File_Truncate")
+  external truncate(int length);
+  @pragma("vm:external-name", "File_Length")
+  external length();
+  @pragma("vm:external-name", "File_Flush")
+  external flush();
+  @pragma("vm:external-name", "File_Lock")
+  external lock(int lock, int start, int end);
 }
 
 class _WatcherPath {
@@ -339,19 +362,23 @@
   }
 
   @patch
-  static bool get isSupported native "FileSystemWatcher_IsSupported";
+  @pragma("vm:external-name", "FileSystemWatcher_IsSupported")
+  external static bool get isSupported;
 
-  static int _initWatcher() native "FileSystemWatcher_InitWatcher";
-  static void _closeWatcher(int id) native "FileSystemWatcher_CloseWatcher";
+  @pragma("vm:external-name", "FileSystemWatcher_InitWatcher")
+  external static int _initWatcher();
+  @pragma("vm:external-name", "FileSystemWatcher_CloseWatcher")
+  external static void _closeWatcher(int id);
 
-  static int _watchPath(int id, _Namespace namespace, String path, int events,
-      bool recursive) native "FileSystemWatcher_WatchPath";
-  static void _unwatchPath(int id, int path_id)
-      native "FileSystemWatcher_UnwatchPath";
-  static List _readEvents(int id, int path_id)
-      native "FileSystemWatcher_ReadEvents";
-  static int _getSocketId(int id, int path_id)
-      native "FileSystemWatcher_GetSocketId";
+  @pragma("vm:external-name", "FileSystemWatcher_WatchPath")
+  external static int _watchPath(
+      int id, _Namespace namespace, String path, int events, bool recursive);
+  @pragma("vm:external-name", "FileSystemWatcher_UnwatchPath")
+  external static void _unwatchPath(int id, int path_id);
+  @pragma("vm:external-name", "FileSystemWatcher_ReadEvents")
+  external static List _readEvents(int id, int path_id);
+  @pragma("vm:external-name", "FileSystemWatcher_GetSocketId")
+  external static int _getSocketId(int id, int path_id);
 }
 
 class _InotifyFileSystemWatcher extends _FileSystemWatcher {
diff --git a/sdk/lib/_internal/vm/bin/file_system_entity_patch.dart b/sdk/lib/_internal/vm/bin/file_system_entity_patch.dart
index 973e6b6..8ef9b96 100644
--- a/sdk/lib/_internal/vm/bin/file_system_entity_patch.dart
+++ b/sdk/lib/_internal/vm/bin/file_system_entity_patch.dart
@@ -7,18 +7,21 @@
 @patch
 class FileStat {
   @patch
-  static _statSync(_Namespace namespace, String path) native "File_Stat";
+  @pragma("vm:external-name", "File_Stat")
+  external static _statSync(_Namespace namespace, String path);
 }
 
 @patch
 class FileSystemEntity {
   @patch
-  static _getTypeNative(_Namespace namespace, Uint8List rawPath,
-      bool followLinks) native "File_GetType";
+  @pragma("vm:external-name", "File_GetType")
+  external static _getTypeNative(
+      _Namespace namespace, Uint8List rawPath, bool followLinks);
   @patch
-  static _identicalNative(_Namespace namespace, String path1, String path2)
-      native "File_AreIdentical";
+  @pragma("vm:external-name", "File_AreIdentical")
+  external static _identicalNative(
+      _Namespace namespace, String path1, String path2);
   @patch
-  static _resolveSymbolicLinks(_Namespace namespace, Uint8List path)
-      native "File_ResolveSymbolicLinks";
+  @pragma("vm:external-name", "File_ResolveSymbolicLinks")
+  external static _resolveSymbolicLinks(_Namespace namespace, Uint8List path);
 }
diff --git a/sdk/lib/_internal/vm/bin/filter_patch.dart b/sdk/lib/_internal/vm/bin/filter_patch.dart
index 06898f4..c8cf871 100644
--- a/sdk/lib/_internal/vm/bin/filter_patch.dart
+++ b/sdk/lib/_internal/vm/bin/filter_patch.dart
@@ -5,18 +5,19 @@
 // part of "common_patch.dart";
 
 class _FilterImpl extends NativeFieldWrapperClass1 implements RawZLibFilter {
-  void process(List<int> data, int start, int end) native "Filter_Process";
+  @pragma("vm:external-name", "Filter_Process")
+  external void process(List<int> data, int start, int end);
 
-  List<int>? processed({bool flush: true, bool end: false})
-      native "Filter_Processed";
+  @pragma("vm:external-name", "Filter_Processed")
+  external List<int>? processed({bool flush: true, bool end: false});
 }
 
 class _ZLibInflateFilter extends _FilterImpl {
   _ZLibInflateFilter(int windowBits, List<int>? dictionary, bool raw) {
     _init(windowBits, dictionary, raw);
   }
-  void _init(int windowBits, List<int>? dictionary, bool raw)
-      native "Filter_CreateZLibInflate";
+  @pragma("vm:external-name", "Filter_CreateZLibInflate")
+  external void _init(int windowBits, List<int>? dictionary, bool raw);
 }
 
 class _ZLibDeflateFilter extends _FilterImpl {
@@ -24,8 +25,9 @@
       int strategy, List<int>? dictionary, bool raw) {
     _init(gzip, level, windowBits, memLevel, strategy, dictionary, raw);
   }
-  void _init(bool gzip, int level, int windowBits, int memLevel, int strategy,
-      List<int>? dictionary, bool raw) native "Filter_CreateZLibDeflate";
+  @pragma("vm:external-name", "Filter_CreateZLibDeflate")
+  external void _init(bool gzip, int level, int windowBits, int memLevel,
+      int strategy, List<int>? dictionary, bool raw);
 }
 
 @patch
diff --git a/sdk/lib/_internal/vm/bin/io_service_patch.dart b/sdk/lib/_internal/vm/bin/io_service_patch.dart
index 7b93d0e..cbaf99c 100644
--- a/sdk/lib/_internal/vm/bin/io_service_patch.dart
+++ b/sdk/lib/_internal/vm/bin/io_service_patch.dart
@@ -40,7 +40,8 @@
     }
   }
 
-  static SendPort _newServicePort() native "IOService_NewServicePort";
+  @pragma("vm:external-name", "IOService_NewServicePort")
+  external static SendPort _newServicePort();
 }
 
 @patch
diff --git a/sdk/lib/_internal/vm/bin/namespace_patch.dart b/sdk/lib/_internal/vm/bin/namespace_patch.dart
index 2cf329f..50e3a70 100644
--- a/sdk/lib/_internal/vm/bin/namespace_patch.dart
+++ b/sdk/lib/_internal/vm/bin/namespace_patch.dart
@@ -6,11 +6,12 @@
 class _NamespaceImpl extends NativeFieldWrapperClass1 implements _Namespace {
   _NamespaceImpl._();
 
-  static _NamespaceImpl _create(_NamespaceImpl namespace, var n)
-      native "Namespace_Create";
-  static int _getPointer(_NamespaceImpl namespace)
-      native "Namespace_GetPointer";
-  static int _getDefault() native "Namespace_GetDefault";
+  @pragma("vm:external-name", "Namespace_Create")
+  external static _NamespaceImpl _create(_NamespaceImpl namespace, var n);
+  @pragma("vm:external-name", "Namespace_GetPointer")
+  external static int _getPointer(_NamespaceImpl namespace);
+  @pragma("vm:external-name", "Namespace_GetDefault")
+  external static int _getDefault();
 
   // If the platform supports "namespaces", this method is called by the
   // embedder with the platform-specific namespace information.
diff --git a/sdk/lib/_internal/vm/bin/platform_patch.dart b/sdk/lib/_internal/vm/bin/platform_patch.dart
index d187101..db632d6 100644
--- a/sdk/lib/_internal/vm/bin/platform_patch.dart
+++ b/sdk/lib/_internal/vm/bin/platform_patch.dart
@@ -8,29 +8,39 @@
 @pragma("vm:entry-point")
 class _Platform {
   @patch
-  static int _numberOfProcessors() native "Platform_NumberOfProcessors";
+  @pragma("vm:external-name", "Platform_NumberOfProcessors")
+  external static int _numberOfProcessors();
   @patch
-  static String _pathSeparator() native "Platform_PathSeparator";
+  @pragma("vm:external-name", "Platform_PathSeparator")
+  external static String _pathSeparator();
   @patch
-  static String _operatingSystem() native "Platform_OperatingSystem";
+  @pragma("vm:external-name", "Platform_OperatingSystem")
+  external static String _operatingSystem();
   @patch
-  static _operatingSystemVersion() native "Platform_OperatingSystemVersion";
+  @pragma("vm:external-name", "Platform_OperatingSystemVersion")
+  external static _operatingSystemVersion();
   @patch
-  static _localHostname() native "Platform_LocalHostname";
+  @pragma("vm:external-name", "Platform_LocalHostname")
+  external static _localHostname();
   @patch
-  static _executable() native "Platform_ExecutableName";
+  @pragma("vm:external-name", "Platform_ExecutableName")
+  external static _executable();
   @patch
-  static _resolvedExecutable() native "Platform_ResolvedExecutableName";
+  @pragma("vm:external-name", "Platform_ResolvedExecutableName")
+  external static _resolvedExecutable();
   @patch
-  static _environment() native "Platform_Environment";
+  @pragma("vm:external-name", "Platform_Environment")
+  external static _environment();
   @patch
-  static List<String> _executableArguments()
-      native "Platform_ExecutableArguments";
+  @pragma("vm:external-name", "Platform_ExecutableArguments")
+  external static List<String> _executableArguments();
   @patch
-  static String _version() native "Platform_GetVersion";
+  @pragma("vm:external-name", "Platform_GetVersion")
+  external static String _version();
 
   @patch
-  static String _localeName() native "Platform_LocaleName";
+  @pragma("vm:external-name", "Platform_LocaleName")
+  external static String _localeName();
 
   @patch
   static String? _packageRoot() => VMLibraryHooks.packageRootString;
diff --git a/sdk/lib/_internal/vm/bin/process_patch.dart b/sdk/lib/_internal/vm/bin/process_patch.dart
index 6a158e7..426f9d9 100644
--- a/sdk/lib/_internal/vm/bin/process_patch.dart
+++ b/sdk/lib/_internal/vm/bin/process_patch.dart
@@ -7,13 +7,15 @@
 @patch
 class _WindowsCodePageDecoder {
   @patch
-  static String _decodeBytes(List<int> bytes) native "SystemEncodingToString";
+  @pragma("vm:external-name", "SystemEncodingToString")
+  external static String _decodeBytes(List<int> bytes);
 }
 
 @patch
 class _WindowsCodePageEncoder {
   @patch
-  static List<int> _encodeString(String string) native "StringToSystemEncoding";
+  @pragma("vm:external-name", "StringToSystemEncoding")
+  external static List<int> _encodeString(String string);
 }
 
 @patch
@@ -124,9 +126,10 @@
     }
   }
 
-  static _setSignalHandler(int signal) native "Process_SetSignalHandler";
-  static void _clearSignalHandler(int signal)
-      native "Process_ClearSignalHandler";
+  @pragma("vm:external-name", "Process_SetSignalHandler")
+  external static _setSignalHandler(int signal);
+  @pragma("vm:external-name", "Process_ClearSignalHandler")
+  external static void _clearSignalHandler(int signal);
 }
 
 @pragma("vm:entry-point", "call")
@@ -135,16 +138,22 @@
 @patch
 class _ProcessUtils {
   @patch
-  static Never _exit(int status) native "Process_Exit";
+  @pragma("vm:external-name", "Process_Exit")
+  external static Never _exit(int status);
   @patch
-  static void _setExitCode(int status) native "Process_SetExitCode";
+  @pragma("vm:external-name", "Process_SetExitCode")
+  external static void _setExitCode(int status);
   @patch
-  static int _getExitCode() native "Process_GetExitCode";
+  @pragma("vm:external-name", "Process_GetExitCode")
+  external static int _getExitCode();
   @patch
-  static void _sleep(int millis) native "Process_Sleep";
+  @pragma("vm:external-name", "Process_Sleep")
+  external static void _sleep(int millis);
   @patch
-  static int _pid(Process? process) native "Process_Pid";
-  static bool _killPid(int pid, int signal) native "Process_KillPid";
+  @pragma("vm:external-name", "Process_Pid")
+  external static int _pid(Process? process);
+  @pragma("vm:external-name", "Process_KillPid")
+  external static bool _killPid(int pid, int signal);
   @patch
   static Stream<ProcessSignal> _watchSignal(ProcessSignal signal) {
     if (signal != ProcessSignal.sighup &&
@@ -188,8 +197,10 @@
     return result;
   }
 
-  static _maxRss() native "ProcessInfo_MaxRSS";
-  static _currentRss() native "ProcessInfo_CurrentRSS";
+  @pragma("vm:external-name", "ProcessInfo_MaxRSS")
+  external static _maxRss();
+  @pragma("vm:external-name", "ProcessInfo_CurrentRSS")
+  external static _currentRss();
 }
 
 @pragma("vm:entry-point")
@@ -496,7 +507,8 @@
         getOutput(result[3], stderrEncoding));
   }
 
-  bool _startNative(
+  @pragma("vm:external-name", "Process_Start")
+  external bool _startNative(
       _Namespace namespace,
       String path,
       List<String> arguments,
@@ -507,10 +519,11 @@
       _NativeSocket? stdout,
       _NativeSocket? stderr,
       _NativeSocket? exitHandler,
-      _ProcessStartStatus status) native "Process_Start";
+      _ProcessStartStatus status);
 
-  _wait(_NativeSocket? stdin, _NativeSocket? stdout, _NativeSocket? stderr,
-      _NativeSocket exitHandler) native "Process_Wait";
+  @pragma("vm:external-name", "Process_Wait")
+  external _wait(_NativeSocket? stdin, _NativeSocket? stdout,
+      _NativeSocket? stderr, _NativeSocket exitHandler);
 
   Stream<List<int>> get stdout =>
       _stdout ?? (throw StateError("stdio is not connected"));
diff --git a/sdk/lib/_internal/vm/bin/secure_socket_patch.dart b/sdk/lib/_internal/vm/bin/secure_socket_patch.dart
index 5989763..cfd1d6b 100644
--- a/sdk/lib/_internal/vm/bin/secure_socket_patch.dart
+++ b/sdk/lib/_internal/vm/bin/secure_socket_patch.dart
@@ -83,28 +83,32 @@
     ];
   }
 
-  void connect(
+  @pragma("vm:external-name", "SecureSocket_Connect")
+  external void connect(
       String hostName,
       SecurityContext context,
       bool isServer,
       bool requestClientCertificate,
       bool requireClientCertificate,
-      Uint8List protocols) native "SecureSocket_Connect";
+      Uint8List protocols);
 
   void destroy() {
     buffers = null;
     _destroy();
   }
 
-  void _destroy() native "SecureSocket_Destroy";
+  @pragma("vm:external-name", "SecureSocket_Destroy")
+  external void _destroy();
 
-  int _handshake(SendPort replyPort) native "SecureSocket_Handshake";
+  @pragma("vm:external-name", "SecureSocket_Handshake")
+  external int _handshake(SendPort replyPort);
 
-  void _markAsTrusted(int certificatePtr, bool isTrusted)
-      native "SecureSocket_MarkAsTrusted";
+  @pragma("vm:external-name", "SecureSocket_MarkAsTrusted")
+  external void _markAsTrusted(int certificatePtr, bool isTrusted);
 
-  static X509Certificate _newX509CertificateWrapper(int certificatePtr)
-      native "SecureSocket_NewX509CertificateWrapper";
+  @pragma("vm:external-name", "SecureSocket_NewX509CertificateWrapper")
+  external static X509Certificate _newX509CertificateWrapper(
+      int certificatePtr);
 
   Future<bool> handshake() {
     Completer<bool> evaluatorCompleter = Completer<bool>();
@@ -158,17 +162,21 @@
 
   int processBuffer(int bufferIndex) => throw new UnimplementedError();
 
-  String? selectedProtocol() native "SecureSocket_GetSelectedProtocol";
+  @pragma("vm:external-name", "SecureSocket_GetSelectedProtocol")
+  external String? selectedProtocol();
 
-  void renegotiate(bool useSessionCache, bool requestClientCertificate,
-      bool requireClientCertificate) native "SecureSocket_Renegotiate";
+  @pragma("vm:external-name", "SecureSocket_Renegotiate")
+  external void renegotiate(bool useSessionCache, bool requestClientCertificate,
+      bool requireClientCertificate);
 
-  void init() native "SecureSocket_Init";
+  @pragma("vm:external-name", "SecureSocket_Init")
+  external void init();
 
-  X509Certificate? get peerCertificate native "SecureSocket_PeerCertificate";
+  @pragma("vm:external-name", "SecureSocket_PeerCertificate")
+  external X509Certificate? get peerCertificate;
 
-  void _registerBadCertificateCallback(Function callback)
-      native "SecureSocket_RegisterBadCertificateCallback";
+  @pragma("vm:external-name", "SecureSocket_RegisterBadCertificateCallback")
+  external void _registerBadCertificateCallback(Function callback);
 
   Function? badCertificateCallback;
 
@@ -177,11 +185,13 @@
     _registerBadCertificateCallback(callback);
   }
 
-  void registerHandshakeCompleteCallback(Function handshakeCompleteHandler)
-      native "SecureSocket_RegisterHandshakeCompleteCallback";
+  @pragma("vm:external-name", "SecureSocket_RegisterHandshakeCompleteCallback")
+  external void registerHandshakeCompleteCallback(
+      Function handshakeCompleteHandler);
 
   // This is a security issue, as it exposes a raw pointer to Dart code.
-  int _pointer() native "SecureSocket_FilterPointer";
+  @pragma("vm:external-name", "SecureSocket_FilterPointer")
+  external int _pointer();
 
   @pragma("vm:entry-point", "get")
   List<_ExternalBuffer>? buffers;
@@ -212,7 +222,8 @@
     }
   }
 
-  void _createNativeContext() native "SecurityContext_Allocate";
+  @pragma("vm:external-name", "SecurityContext_Allocate")
+  external void _createNativeContext();
 
   static final SecurityContext defaultContext = new _SecurityContext(true);
 
@@ -221,32 +232,35 @@
     usePrivateKeyBytes(bytes, password: password);
   }
 
-  void usePrivateKeyBytes(List<int> keyBytes, {String? password})
-      native "SecurityContext_UsePrivateKeyBytes";
+  @pragma("vm:external-name", "SecurityContext_UsePrivateKeyBytes")
+  external void usePrivateKeyBytes(List<int> keyBytes, {String? password});
 
   void setTrustedCertificates(String file, {String? password}) {
     List<int> bytes = (new File(file)).readAsBytesSync();
     setTrustedCertificatesBytes(bytes, password: password);
   }
 
-  void setTrustedCertificatesBytes(List<int> certBytes, {String? password})
-      native "SecurityContext_SetTrustedCertificatesBytes";
+  @pragma("vm:external-name", "SecurityContext_SetTrustedCertificatesBytes")
+  external void setTrustedCertificatesBytes(List<int> certBytes,
+      {String? password});
 
   void useCertificateChain(String file, {String? password}) {
     List<int> bytes = (new File(file)).readAsBytesSync();
     useCertificateChainBytes(bytes, password: password);
   }
 
-  void useCertificateChainBytes(List<int> chainBytes, {String? password})
-      native "SecurityContext_UseCertificateChainBytes";
+  @pragma("vm:external-name", "SecurityContext_UseCertificateChainBytes")
+  external void useCertificateChainBytes(List<int> chainBytes,
+      {String? password});
 
   void setClientAuthorities(String file, {String? password}) {
     List<int> bytes = (new File(file)).readAsBytesSync();
     setClientAuthoritiesBytes(bytes, password: password);
   }
 
-  void setClientAuthoritiesBytes(List<int> authCertBytes, {String? password})
-      native "SecurityContext_SetClientAuthoritiesBytes";
+  @pragma("vm:external-name", "SecurityContext_SetClientAuthoritiesBytes")
+  external void setClientAuthoritiesBytes(List<int> authCertBytes,
+      {String? password});
 
   void setAlpnProtocols(List<String> protocols, bool isServer) {
     Uint8List encodedProtocols =
@@ -254,9 +268,10 @@
     _setAlpnProtocols(encodedProtocols, isServer);
   }
 
-  void _setAlpnProtocols(Uint8List protocols, bool isServer)
-      native "SecurityContext_SetAlpnProtocols";
-  void _trustBuiltinRoots() native "SecurityContext_TrustBuiltinRoots";
+  @pragma("vm:external-name", "SecurityContext_SetAlpnProtocols")
+  external void _setAlpnProtocols(Uint8List protocols, bool isServer);
+  @pragma("vm:external-name", "SecurityContext_TrustBuiltinRoots")
+  external void _trustBuiltinRoots();
 }
 
 /**
@@ -269,17 +284,22 @@
   // This is done by WrappedX509Certificate in security_context.cc.
   _X509CertificateImpl._();
 
-  Uint8List get _der native "X509_Der";
+  @pragma("vm:external-name", "X509_Der")
+  external Uint8List get _der;
   late final Uint8List der = _der;
 
-  String get _pem native "X509_Pem";
+  @pragma("vm:external-name", "X509_Pem")
+  external String get _pem;
   late final String pem = _pem;
 
-  Uint8List get _sha1 native "X509_Sha1";
+  @pragma("vm:external-name", "X509_Sha1")
+  external Uint8List get _sha1;
   late final Uint8List sha1 = _sha1;
 
-  String get subject native "X509_Subject";
-  String get issuer native "X509_Issuer";
+  @pragma("vm:external-name", "X509_Subject")
+  external String get subject;
+  @pragma("vm:external-name", "X509_Issuer")
+  external String get issuer;
   DateTime get startValidity {
     return new DateTime.fromMillisecondsSinceEpoch(_startValidity(),
         isUtc: true);
@@ -289,6 +309,8 @@
     return new DateTime.fromMillisecondsSinceEpoch(_endValidity(), isUtc: true);
   }
 
-  int _startValidity() native "X509_StartValidity";
-  int _endValidity() native "X509_EndValidity";
+  @pragma("vm:external-name", "X509_StartValidity")
+  external int _startValidity();
+  @pragma("vm:external-name", "X509_EndValidity")
+  external int _endValidity();
 }
diff --git a/sdk/lib/_internal/vm/bin/socket_patch.dart b/sdk/lib/_internal/vm/bin/socket_patch.dart
index ad83f7b..c330ed8 100644
--- a/sdk/lib/_internal/vm/bin/socket_patch.dart
+++ b/sdk/lib/_internal/vm/bin/socket_patch.dart
@@ -41,8 +41,8 @@
     return _optionsCache[key] ??= _getNativeOptionValue(key);
   }
 
-  static int _getNativeOptionValue(int key)
-      native "RawSocketOption_GetOptionValue";
+  @pragma("vm:external-name", "RawSocketOption_GetOptionValue")
+  external static int _getNativeOptionValue(int key);
 }
 
 @patch
@@ -114,7 +114,8 @@
         type: type);
   }
 
-  static bool _listSupported() native "NetworkInterface_ListSupported";
+  @pragma("vm:external-name", "NetworkInterface_ListSupported")
+  external static bool _listSupported();
 }
 
 void _throwOnBadPort(int port) {
@@ -351,11 +352,13 @@
     return "InternetAddress('$address', ${type.name})";
   }
 
-  static String _rawAddrToString(Uint8List address)
-      native "InternetAddress_RawAddrToString";
-  static dynamic /* int | OSError */ _parseScopedLinkLocalAddress(
-      String address) native "InternetAddress_ParseScopedLinkLocalAddress";
-  static Uint8List? _parse(String address) native "InternetAddress_Parse";
+  @pragma("vm:external-name", "InternetAddress_RawAddrToString")
+  external static String _rawAddrToString(Uint8List address);
+  @pragma("vm:external-name", "InternetAddress_ParseScopedLinkLocalAddress")
+  external static dynamic /* int | OSError */ _parseScopedLinkLocalAddress(
+      String address);
+  @pragma("vm:external-name", "InternetAddress_Parse")
+  external static Uint8List? _parse(String address);
 }
 
 class _NetworkInterface implements NetworkInterface {
@@ -375,7 +378,8 @@
 class _NativeSocketNativeWrapper extends NativeFieldWrapperClass1 {}
 
 /// Returns error code that corresponds to EINPROGRESS OS error.
-int get _inProgressErrorCode native "OSError_inProgressErrorCode";
+@pragma("vm:external-name", "OSError_inProgressErrorCode")
+external int get _inProgressErrorCode;
 
 // The _NativeSocket class encapsulates an OS socket.
 class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
@@ -1526,46 +1530,66 @@
         interfaceAddr?._in_addr, interfaceIndex);
   }
 
-  void nativeSetSocketId(int id, int typeFlags) native "Socket_SetSocketId";
-  int nativeAvailable() native "Socket_Available";
-  bool nativeAvailableDatagram() native "Socket_AvailableDatagram";
-  Uint8List? nativeRead(int len) native "Socket_Read";
-  Datagram? nativeRecvFrom() native "Socket_RecvFrom";
-  int nativeWrite(List<int> buffer, int offset, int bytes)
-      native "Socket_WriteList";
-  int nativeSendTo(List<int> buffer, int offset, int bytes, Uint8List address,
-      int port) native "Socket_SendTo";
-  nativeCreateConnect(Uint8List addr, int port, int scope_id)
-      native "Socket_CreateConnect";
-  nativeCreateUnixDomainConnect(String addr, _Namespace namespace)
-      native "Socket_CreateUnixDomainConnect";
-  nativeCreateBindConnect(Uint8List addr, int port, Uint8List sourceAddr,
-      int scope_id) native "Socket_CreateBindConnect";
-  nativeCreateUnixDomainBindConnect(String addr, String sourceAddr,
-      _Namespace namespace) native "Socket_CreateUnixDomainBindConnect";
-  bool isBindError(int errorNumber) native "SocketBase_IsBindError";
-  nativeCreateBindListen(Uint8List addr, int port, int backlog, bool v6Only,
-      bool shared, int scope_id) native "ServerSocket_CreateBindListen";
-  nativeCreateUnixDomainBindListen(String addr, int backlog, bool shared,
-      _Namespace namespace) native "ServerSocket_CreateUnixDomainBindListen";
-  nativeCreateBindDatagram(Uint8List addr, int port, bool reuseAddress,
-      bool reusePort, int ttl) native "Socket_CreateBindDatagram";
-  bool nativeAccept(_NativeSocket socket) native "ServerSocket_Accept";
-  dynamic nativeGetPort() native "Socket_GetPort";
-  List nativeGetRemotePeer() native "Socket_GetRemotePeer";
-  int nativeGetSocketId() native "Socket_GetSocketId";
-  OSError nativeGetError() native "Socket_GetError";
-  nativeGetOption(int option, int protocol) native "Socket_GetOption";
-  void nativeGetRawOption(int level, int option, Uint8List data)
-      native "Socket_GetRawOption";
-  void nativeSetOption(int option, int protocol, value)
-      native "Socket_SetOption";
-  void nativeSetRawOption(int level, int option, Uint8List data)
-      native "Socket_SetRawOption";
-  void nativeJoinMulticast(Uint8List addr, Uint8List? interfaceAddr,
-      int interfaceIndex) native "Socket_JoinMulticast";
-  void nativeLeaveMulticast(Uint8List addr, Uint8List? interfaceAddr,
-      int interfaceIndex) native "Socket_LeaveMulticast";
+  @pragma("vm:external-name", "Socket_SetSocketId")
+  external void nativeSetSocketId(int id, int typeFlags);
+  @pragma("vm:external-name", "Socket_Available")
+  external int nativeAvailable();
+  @pragma("vm:external-name", "Socket_AvailableDatagram")
+  external bool nativeAvailableDatagram();
+  @pragma("vm:external-name", "Socket_Read")
+  external Uint8List? nativeRead(int len);
+  @pragma("vm:external-name", "Socket_RecvFrom")
+  external Datagram? nativeRecvFrom();
+  @pragma("vm:external-name", "Socket_WriteList")
+  external int nativeWrite(List<int> buffer, int offset, int bytes);
+  @pragma("vm:external-name", "Socket_SendTo")
+  external int nativeSendTo(
+      List<int> buffer, int offset, int bytes, Uint8List address, int port);
+  @pragma("vm:external-name", "Socket_CreateConnect")
+  external nativeCreateConnect(Uint8List addr, int port, int scope_id);
+  @pragma("vm:external-name", "Socket_CreateUnixDomainConnect")
+  external nativeCreateUnixDomainConnect(String addr, _Namespace namespace);
+  @pragma("vm:external-name", "Socket_CreateBindConnect")
+  external nativeCreateBindConnect(
+      Uint8List addr, int port, Uint8List sourceAddr, int scope_id);
+  @pragma("vm:external-name", "Socket_CreateUnixDomainBindConnect")
+  external nativeCreateUnixDomainBindConnect(
+      String addr, String sourceAddr, _Namespace namespace);
+  @pragma("vm:external-name", "SocketBase_IsBindError")
+  external bool isBindError(int errorNumber);
+  @pragma("vm:external-name", "ServerSocket_CreateBindListen")
+  external nativeCreateBindListen(Uint8List addr, int port, int backlog,
+      bool v6Only, bool shared, int scope_id);
+  @pragma("vm:external-name", "ServerSocket_CreateUnixDomainBindListen")
+  external nativeCreateUnixDomainBindListen(
+      String addr, int backlog, bool shared, _Namespace namespace);
+  @pragma("vm:external-name", "Socket_CreateBindDatagram")
+  external nativeCreateBindDatagram(
+      Uint8List addr, int port, bool reuseAddress, bool reusePort, int ttl);
+  @pragma("vm:external-name", "ServerSocket_Accept")
+  external bool nativeAccept(_NativeSocket socket);
+  @pragma("vm:external-name", "Socket_GetPort")
+  external dynamic nativeGetPort();
+  @pragma("vm:external-name", "Socket_GetRemotePeer")
+  external List nativeGetRemotePeer();
+  @pragma("vm:external-name", "Socket_GetSocketId")
+  external int nativeGetSocketId();
+  @pragma("vm:external-name", "Socket_GetError")
+  external OSError nativeGetError();
+  @pragma("vm:external-name", "Socket_GetOption")
+  external nativeGetOption(int option, int protocol);
+  @pragma("vm:external-name", "Socket_GetRawOption")
+  external void nativeGetRawOption(int level, int option, Uint8List data);
+  @pragma("vm:external-name", "Socket_SetOption")
+  external void nativeSetOption(int option, int protocol, value);
+  @pragma("vm:external-name", "Socket_SetRawOption")
+  external void nativeSetRawOption(int level, int option, Uint8List data);
+  @pragma("vm:external-name", "Socket_JoinMulticast")
+  external void nativeJoinMulticast(
+      Uint8List addr, Uint8List? interfaceAddr, int interfaceIndex);
+  @pragma("vm:external-name", "Socket_LeaveMulticast")
+  external void nativeLeaveMulticast(
+      Uint8List addr, Uint8List? interfaceAddr, int interfaceIndex);
 }
 
 class _RawServerSocket extends Stream<RawSocket> implements RawServerSocket {
diff --git a/sdk/lib/_internal/vm/bin/stdio_patch.dart b/sdk/lib/_internal/vm/bin/stdio_patch.dart
index cf02d62..6a6bd2c 100644
--- a/sdk/lib/_internal/vm/bin/stdio_patch.dart
+++ b/sdk/lib/_internal/vm/bin/stdio_patch.dart
@@ -50,7 +50,8 @@
   }
 
   @patch
-  static _getStdioHandleType(int fd) native "File_GetStdioHandleType";
+  @pragma("vm:external-name", "File_GetStdioHandleType")
+  external static _getStdioHandleType(int fd);
 }
 
 @patch
@@ -115,12 +116,18 @@
     return result;
   }
 
-  static _echoMode(int fd) native "Stdin_GetEchoMode";
-  static _setEchoMode(int fd, bool enabled) native "Stdin_SetEchoMode";
-  static _lineMode(int fd) native "Stdin_GetLineMode";
-  static _setLineMode(int fd, bool enabled) native "Stdin_SetLineMode";
-  static _readByte(int fd) native "Stdin_ReadByte";
-  static _supportsAnsiEscapes(int fd) native "Stdin_AnsiSupported";
+  @pragma("vm:external-name", "Stdin_GetEchoMode")
+  external static _echoMode(int fd);
+  @pragma("vm:external-name", "Stdin_SetEchoMode")
+  external static _setEchoMode(int fd, bool enabled);
+  @pragma("vm:external-name", "Stdin_GetLineMode")
+  external static _lineMode(int fd);
+  @pragma("vm:external-name", "Stdin_SetLineMode")
+  external static _setLineMode(int fd, bool enabled);
+  @pragma("vm:external-name", "Stdin_ReadByte")
+  external static _readByte(int fd);
+  @pragma("vm:external-name", "Stdin_AnsiSupported")
+  external static _supportsAnsiEscapes(int fd);
 }
 
 @patch
@@ -140,7 +147,8 @@
     return size;
   }
 
-  static _getTerminalSize(int fd) native "Stdout_GetTerminalSize";
+  @pragma("vm:external-name", "Stdout_GetTerminalSize")
+  external static _getTerminalSize(int fd);
 
   @patch
   static bool _supportsAnsiEscapes(int fd) {
@@ -151,9 +159,11 @@
     return result;
   }
 
-  static _getAnsiSupported(int fd) native "Stdout_AnsiSupported";
+  @pragma("vm:external-name", "Stdout_AnsiSupported")
+  external static _getAnsiSupported(int fd);
 }
 
-bool _getStdioHandle(_NativeSocket socket, int num)
-    native "Socket_GetStdioHandle";
-_getSocketType(_NativeSocket nativeSocket) native "Socket_GetType";
+@pragma("vm:external-name", "Socket_GetStdioHandle")
+external bool _getStdioHandle(_NativeSocket socket, int num);
+@pragma("vm:external-name", "Socket_GetType")
+external _getSocketType(_NativeSocket nativeSocket);
diff --git a/sdk/lib/_internal/vm/bin/sync_socket_patch.dart b/sdk/lib/_internal/vm/bin/sync_socket_patch.dart
index 6554c11..708a1e7 100644
--- a/sdk/lib/_internal/vm/bin/sync_socket_patch.dart
+++ b/sdk/lib/_internal/vm/bin/sync_socket_patch.dart
@@ -298,19 +298,26 @@
   }
 
   // Native method declarations.
-  static _nativeLookupRequest(host, int type)
-      native "SynchronousSocket_LookupRequest";
-  _nativeCreateConnectSync(host, int port)
-      native "SynchronousSocket_CreateConnectSync";
-  _nativeAvailable() native "SynchronousSocket_Available";
-  _nativeCloseSync() native "SynchronousSocket_CloseSync";
-  int _nativeGetPort() native "SynchronousSocket_GetPort";
-  List _nativeGetRemotePeer() native "SynchronousSocket_GetRemotePeer";
-  _nativeRead(int len) native "SynchronousSocket_Read";
-  _nativeReadInto(List<int> buffer, int offset, int bytes)
-      native "SynchronousSocket_ReadList";
-  _nativeShutdownRead() native "SynchronousSocket_ShutdownRead";
-  _nativeShutdownWrite() native "SynchronousSocket_ShutdownWrite";
-  _nativeWrite(List<int> buffer, int offset, int bytes)
-      native "SynchronousSocket_WriteList";
+  @pragma("vm:external-name", "SynchronousSocket_LookupRequest")
+  external static _nativeLookupRequest(host, int type);
+  @pragma("vm:external-name", "SynchronousSocket_CreateConnectSync")
+  external _nativeCreateConnectSync(host, int port);
+  @pragma("vm:external-name", "SynchronousSocket_Available")
+  external _nativeAvailable();
+  @pragma("vm:external-name", "SynchronousSocket_CloseSync")
+  external _nativeCloseSync();
+  @pragma("vm:external-name", "SynchronousSocket_GetPort")
+  external int _nativeGetPort();
+  @pragma("vm:external-name", "SynchronousSocket_GetRemotePeer")
+  external List _nativeGetRemotePeer();
+  @pragma("vm:external-name", "SynchronousSocket_Read")
+  external _nativeRead(int len);
+  @pragma("vm:external-name", "SynchronousSocket_ReadList")
+  external _nativeReadInto(List<int> buffer, int offset, int bytes);
+  @pragma("vm:external-name", "SynchronousSocket_ShutdownRead")
+  external _nativeShutdownRead();
+  @pragma("vm:external-name", "SynchronousSocket_ShutdownWrite")
+  external _nativeShutdownWrite();
+  @pragma("vm:external-name", "SynchronousSocket_WriteList")
+  external _nativeWrite(List<int> buffer, int offset, int bytes);
 }
diff --git a/sdk/lib/_internal/vm/bin/vmservice_io.dart b/sdk/lib/_internal/vm/bin/vmservice_io.dart
index 833e5a2..fbedb80 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_io.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_io.dart
@@ -384,4 +384,5 @@
   _registerSignalHandlerTimer = Timer(shortDelay, _registerSignalHandler);
 }
 
-_shutdown() native 'VMServiceIO_Shutdown';
+@pragma("vm:external-name", "VMServiceIO_Shutdown")
+external _shutdown();
diff --git a/sdk/lib/_internal/vm/bin/vmservice_server.dart b/sdk/lib/_internal/vm/bin/vmservice_server.dart
index f5742ed..c8e61b2 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_server.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_server.dart
@@ -522,4 +522,5 @@
   }
 }
 
-void _notifyServerState(String uri) native 'VMServiceIO_NotifyServerState';
+@pragma("vm:external-name", "VMServiceIO_NotifyServerState")
+external void _notifyServerState(String uri);
diff --git a/sdk/lib/_internal/vm/lib/array.dart b/sdk/lib/_internal/vm/lib/array.dart
index 90a6fda..c897b67 100644
--- a/sdk/lib/_internal/vm/lib/array.dart
+++ b/sdk/lib/_internal/vm/lib/array.dart
@@ -10,7 +10,8 @@
   @pragma("vm:exact-result-type",
       <dynamic>[_List, "result-type-uses-passed-type-arguments"])
   @pragma("vm:prefer-inline")
-  factory _List(length) native "List_allocate";
+  @pragma("vm:external-name", "List_allocate")
+  external factory _List(length);
 
   // Specialization of List.empty constructor for growable == false.
   // Used by pkg/vm/lib/transformations/list_factory_specializer.dart.
@@ -107,7 +108,8 @@
   }
 
   @pragma("vm:recognized", "graph-intrinsic")
-  E operator [](int index) native "List_getIndexed";
+  @pragma("vm:external-name", "List_getIndexed")
+  external E operator [](int index);
 
   @pragma("vm:recognized", "other")
   void operator []=(int index, E value) {
@@ -115,12 +117,14 @@
   }
 
   @pragma("vm:recognized", "graph-intrinsic")
-  void _setIndexed(int index, E value) native "List_setIndexed";
+  @pragma("vm:external-name", "List_setIndexed")
+  external void _setIndexed(int index, E value);
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "List_getLength";
+  @pragma("vm:external-name", "List_getLength")
+  external int get length;
 
   @pragma("vm:prefer-inline")
   _List _slice(int start, int count, bool needsTypeArgument) {
@@ -135,8 +139,8 @@
     }
   }
 
-  _List _sliceInternal(int start, int count, bool needsTypeArgument)
-      native "List_slice";
+  @pragma("vm:external-name", "List_slice")
+  external _List _sliceInternal(int start, int count, bool needsTypeArgument);
 
   // List interface.
   void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
@@ -261,16 +265,18 @@
         "ImmutableArray can only be allocated by the VM");
   }
 
-  factory _ImmutableList._from(List from, int offset, int length)
-      native "ImmutableList_from";
+  @pragma("vm:external-name", "ImmutableList_from")
+  external factory _ImmutableList._from(List from, int offset, int length);
 
   @pragma("vm:recognized", "graph-intrinsic")
-  E operator [](int index) native "List_getIndexed";
+  @pragma("vm:external-name", "List_getIndexed")
+  external E operator [](int index);
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "List_getLength";
+  @pragma("vm:external-name", "List_getLength")
+  external int get length;
 
   List<E> sublist(int start, [int? end]) {
     final int actualEnd = RangeError.checkValidRange(start, end, this.length);
diff --git a/sdk/lib/_internal/vm/lib/array_patch.dart b/sdk/lib/_internal/vm/lib/array_patch.dart
index 92824e6..6aea645 100644
--- a/sdk/lib/_internal/vm/lib/array_patch.dart
+++ b/sdk/lib/_internal/vm/lib/array_patch.dart
@@ -13,7 +13,8 @@
 
   @patch
   @pragma("vm:recognized", "other")
-  factory List([int? length]) native "List_new";
+  @pragma("vm:external-name", "List_new")
+  external factory List([int? length]);
 
   @patch
   factory List.filled(int length, E fill, {bool growable: false}) {
diff --git a/sdk/lib/_internal/vm/lib/async_patch.dart b/sdk/lib/_internal/vm/lib/async_patch.dart
index 5c5ee05..4e56a79 100644
--- a/sdk/lib/_internal/vm/lib/async_patch.dart
+++ b/sdk/lib/_internal/vm/lib/async_patch.dart
@@ -15,7 +15,8 @@
 // part "timer_patch.dart";
 
 // Equivalent of calling FATAL from C++ code.
-_fatal(msg) native "DartAsync_fatal";
+@pragma("vm:external-name", "DartAsync_fatal")
+external _fatal(msg);
 
 // We need to pass the value as first argument and leave the second and third
 // arguments empty (used for error handling).
@@ -244,7 +245,8 @@
 }
 
 @patch
-void _rethrow(Object error, StackTrace stackTrace) native "Async_rethrow";
+@pragma("vm:external-name", "Async_rethrow")
+external void _rethrow(Object error, StackTrace stackTrace);
 
 @patch
 class _StreamImpl<T> {
@@ -275,5 +277,5 @@
   }
 }
 
-void _moveNextDebuggerStepCheck(Function async_op)
-    native "AsyncStarMoveNext_debuggerStepCheck";
+@pragma("vm:external-name", "AsyncStarMoveNext_debuggerStepCheck")
+external void _moveNextDebuggerStepCheck(Function async_op);
diff --git a/sdk/lib/_internal/vm/lib/bool_patch.dart b/sdk/lib/_internal/vm/lib/bool_patch.dart
index d627d46..1bbaacd 100644
--- a/sdk/lib/_internal/vm/lib/bool_patch.dart
+++ b/sdk/lib/_internal/vm/lib/bool_patch.dart
@@ -8,11 +8,13 @@
 @pragma("vm:entry-point")
 class bool {
   @patch
-  const factory bool.fromEnvironment(String name, {bool defaultValue: false})
-      native "Bool_fromEnvironment";
+  @pragma("vm:external-name", "Bool_fromEnvironment")
+  external const factory bool.fromEnvironment(String name,
+      {bool defaultValue: false});
 
   @patch
-  const factory bool.hasEnvironment(String name) native "Bool_hasEnvironment";
+  @pragma("vm:external-name", "Bool_hasEnvironment")
+  external const factory bool.hasEnvironment(String name);
 
   @patch
   int get hashCode => this ? 1231 : 1237;
diff --git a/sdk/lib/_internal/vm/lib/class_id_fasta.dart b/sdk/lib/_internal/vm/lib/class_id_fasta.dart
index 006314b..0b79b93 100644
--- a/sdk/lib/_internal/vm/lib/class_id_fasta.dart
+++ b/sdk/lib/_internal/vm/lib/class_id_fasta.dart
@@ -8,7 +8,8 @@
 class ClassID {
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  static int getID(Object value) native "ClassID_getID";
+  @pragma("vm:external-name", "ClassID_getID")
+  external static int getID(Object? value);
 
   @pragma("vm:entry-point")
   static final int cidArray = 0;
@@ -38,4 +39,8 @@
   static final int cidUint8ClampedArray = 0;
   @pragma("vm:entry-point")
   static final int cidExternalUint8ClampedArray = 0;
+  // Used in const hashing to determine whether we're dealing with a
+  // user-defined const. See lib/_internal/vm/lib/compact_hash.dart.
+  @pragma("vm:entry-point")
+  static final int numPredefinedCids = 0;
 }
diff --git a/sdk/lib/_internal/vm/lib/collection_patch.dart b/sdk/lib/_internal/vm/lib/collection_patch.dart
index a1acbcb..4755514 100644
--- a/sdk/lib/_internal/vm/lib/collection_patch.dart
+++ b/sdk/lib/_internal/vm/lib/collection_patch.dart
@@ -9,7 +9,9 @@
 
 import "dart:_internal" as internal;
 
-import "dart:_internal" show patch, IterableElementError;
+import "dart:_internal" show patch, IterableElementError, ClassID;
+
+import "dart:math" show max;
 
 import "dart:typed_data" show Uint32List;
 
diff --git a/sdk/lib/_internal/vm/lib/compact_hash.dart b/sdk/lib/_internal/vm/lib/compact_hash.dart
index dc552c7..096f7ef 100644
--- a/sdk/lib/_internal/vm/lib/compact_hash.dart
+++ b/sdk/lib/_internal/vm/lib/compact_hash.dart
@@ -30,6 +30,8 @@
   int _hashMask = 0;
 
   // Fixed-length list of keys (set) or key/value at even/odd indices (map).
+  //
+  // Can be either a mutable or immutable list.
   List _data = _initialData;
 
   // Length of _data that is used (i.e., keys + values for a map).
@@ -49,42 +51,73 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:typed_data#_Uint32List")
   @pragma("vm:prefer-inline")
-  Uint32List get _index native "LinkedHashBase_getIndex";
+  @pragma("vm:external-name", "LinkedHashBase_getIndex")
+  external Uint32List get _index;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  void set _index(Uint32List value) native "LinkedHashBase_setIndex";
+  @pragma("vm:external-name", "LinkedHashBase_setIndex")
+  external void set _index(Uint32List value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get _hashMask native "LinkedHashBase_getHashMask";
+  @pragma("vm:external-name", "LinkedHashBase_getHashMask")
+  external int get _hashMask;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  void set _hashMask(int value) native "LinkedHashBase_setHashMask";
+  @pragma("vm:external-name", "LinkedHashBase_setHashMask")
+  external void set _hashMask(int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_List")
   @pragma("vm:prefer-inline")
-  List get _data native "LinkedHashBase_getData";
+  @pragma("vm:external-name", "LinkedHashBase_getData")
+  external List get _data;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  void set _data(List value) native "LinkedHashBase_setData";
+  @pragma("vm:external-name", "LinkedHashBase_setData")
+  external void set _data(List value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get _usedData native "LinkedHashBase_getUsedData";
+  @pragma("vm:external-name", "LinkedHashBase_getUsedData")
+  external int get _usedData;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  void set _usedData(int value) native "LinkedHashBase_setUsedData";
+  @pragma("vm:external-name", "LinkedHashBase_setUsedData")
+  external void set _usedData(int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get _deletedKeys native "LinkedHashBase_getDeletedKeys";
+  @pragma("vm:external-name", "LinkedHashBase_getDeletedKeys")
+  external int get _deletedKeys;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  void set _deletedKeys(int value) native "LinkedHashBase_setDeletedKeys";
+  @pragma("vm:external-name", "LinkedHashBase_setDeletedKeys")
+  external void set _deletedKeys(int value);
+}
+
+// Base class for VM-internal classes; keep in sync with _HashFieldBase.
+abstract class _HashVMImmutableBase extends _HashVMBase {
+  // The data is an immutable list rather than a mutable list.
+  @pragma("vm:recognized", "other")
+  @pragma("vm:exact-result-type", "dart:core#_ImmutableList")
+  @pragma("vm:prefer-inline")
+  List get _data native "ImmutableLinkedHashBase_getData";
+
+  // The index is nullable rather than not nullable.
+  @pragma("vm:recognized", "other")
+  @pragma("vm:prefer-inline")
+  Uint32List? get _indexNullable native "ImmutableLinkedHashBase_getIndex";
+  Uint32List get _index => _indexNullable!;
+
+  // Uses store-release atomic.
+  @pragma("vm:recognized", "other")
+  @pragma("vm:prefer-inline")
+  void set _index(Uint32List value)
+      native "ImmutableLinkedHashBase_setIndexStoreRelease";
 }
 
 // This mixin can be applied to _HashFieldBase or _HashVMBase (for
@@ -107,6 +140,7 @@
   // On 32-bit, the top bits are wasted to avoid Mint allocation.
   // TODO(koda): Reclaim the bits by making the compiler treat hash patterns
   // as unsigned words.
+  // Keep consistent with IndexSizeToHashMask in runtime/vm/object.h.
   static int _indexSizeToHashMask(int indexSize) {
     int indexBits = indexSize.bitLength - 2;
     return internal.has63BitSmis
@@ -155,6 +189,20 @@
   bool _equals(e1, e2) => identical(e1, e2);
 }
 
+class _OperatorEqualsAndCanonicalHashCode {
+  static final int cidSymbol = ClassID.getID(#a);
+
+  int _hashCode(e) {
+    final int cid = ClassID.getID(e);
+    if (cid < ClassID.numPredefinedCids || cid == cidSymbol) {
+      return e.hashCode;
+    }
+    return identityHashCode(e);
+  }
+
+  bool _equals(e1, e2) => e1 == e2;
+}
+
 final _initialIndex = new Uint32List(1);
 // Note: not const. Const arrays are made immutable by having a different class
 // than regular arrays that throws on element assignment. We want the data field
@@ -179,6 +227,80 @@
   }
 }
 
+// This is essentially the same class as _InternalLinkedHashMap, but it does
+// not permit any modification of map entries from Dart code. We use
+// this class for maps constructed from Dart constant maps.
+@pragma("vm:entry-point")
+class _InternalImmutableLinkedHashMap<K, V> extends _HashVMImmutableBase
+    with
+        MapMixin<K, V>,
+        _LinkedHashMapMixin<K, V>,
+        _HashBase,
+        _OperatorEqualsAndCanonicalHashCode,
+        _UnmodifiableMapMixin<K, V>
+    implements LinkedHashMap<K, V> {
+  factory _InternalImmutableLinkedHashMap._uninstantiable() {
+    throw new UnsupportedError("ImmutableMap can only be allocated by the VM");
+  }
+
+  bool containsKey(Object? key) {
+    if (_indexNullable == null) {
+      _createIndex();
+    }
+    return super.containsKey(key);
+  }
+
+  V? operator [](Object? key) {
+    if (_indexNullable == null) {
+      _createIndex();
+    }
+    return super[key];
+  }
+
+  void _createIndex() {
+    final size = max(_data.length, _HashBase._INITIAL_INDEX_SIZE);
+    assert(size == _roundUpToPowerOfTwo(size));
+    final newIndex = new Uint32List(size);
+    final hashMask = _HashBase._indexSizeToHashMask(size);
+    assert(_hashMask == hashMask);
+
+    for (int j = 0; j < _usedData; j += 2) {
+      final key = _data[j];
+      final value = _data[j + 1];
+
+      final fullHash = _hashCode(key);
+      final hashPattern = _HashBase._hashPattern(fullHash, hashMask, size);
+      final d =
+          _findValueOrInsertPoint(key, fullHash, hashPattern, size, newIndex);
+      // We just allocated the index, so we should not find this key in it yet.
+      assert(d <= 0);
+
+      final i = -d;
+
+      assert(1 <= hashPattern && hashPattern < (1 << 32));
+      final index = j >> 1;
+      assert((index & hashPattern) == 0);
+      newIndex[i] = hashPattern | index;
+    }
+
+    // Publish new index, uses store release semantics.
+    _index = newIndex;
+  }
+}
+
+// Implementation is from "Hacker's Delight" by Henry S. Warren, Jr.,
+// figure 3-3, page 48, where the function is called clp2.
+int _roundUpToPowerOfTwo(int x) {
+  x = x - 1;
+  x = x | (x >> 1);
+  x = x | (x >> 2);
+  x = x | (x >> 4);
+  x = x | (x >> 8);
+  x = x | (x >> 16);
+  x = x | (x >> 32);
+  return x + 1;
+}
+
 abstract class _LinkedHashMapMixin<K, V> implements _HashBase {
   int _hashCode(e);
   bool _equals(e1, e2);
@@ -260,13 +382,14 @@
   }
 
   // If key is present, returns the index of the value in _data, else returns
-  // the negated insertion point in _index.
-  int _findValueOrInsertPoint(K key, int fullHash, int hashPattern, int size) {
+  // the negated insertion point in index.
+  int _findValueOrInsertPoint(
+      K key, int fullHash, int hashPattern, int size, Uint32List index) {
     final int sizeMask = size - 1;
     final int maxEntries = size >> 1;
     int i = _HashBase._firstProbe(fullHash, sizeMask);
     int firstDeleted = -1;
-    int pair = _index[i];
+    int pair = index[i];
     while (pair != _HashBase._UNUSED_PAIR) {
       if (pair == _HashBase._DELETED_PAIR) {
         if (firstDeleted < 0) {
@@ -282,7 +405,7 @@
         }
       }
       i = _HashBase._nextProbe(i, sizeMask);
-      pair = _index[i];
+      pair = index[i];
     }
     return firstDeleted >= 0 ? -firstDeleted : -i;
   }
@@ -291,7 +414,8 @@
     final int size = _index.length;
     final int fullHash = _hashCode(key);
     final int hashPattern = _HashBase._hashPattern(fullHash, _hashMask, size);
-    final int d = _findValueOrInsertPoint(key, fullHash, hashPattern, size);
+    final int d =
+        _findValueOrInsertPoint(key, fullHash, hashPattern, size, _index);
     if (d > 0) {
       _data[d] = value;
     } else {
@@ -304,7 +428,8 @@
     final int size = _index.length;
     final int fullHash = _hashCode(key);
     final int hashPattern = _HashBase._hashPattern(fullHash, _hashMask, size);
-    final int d = _findValueOrInsertPoint(key, fullHash, hashPattern, size);
+    final int d =
+        _findValueOrInsertPoint(key, fullHash, hashPattern, size, _index);
     if (d > 0) {
       return _data[d];
     }
@@ -682,6 +807,82 @@
   Set<E> toSet() => new _CompactLinkedHashSet<E>()..addAll(this);
 }
 
+@pragma("vm:entry-point")
+class _CompactImmutableLinkedHashSet<E> extends _HashVMImmutableBase
+    with
+        SetMixin<E>,
+        _LinkedHashSetMixin<E>,
+        _HashBase,
+        _OperatorEqualsAndCanonicalHashCode,
+        _UnmodifiableSetMixin<E>
+    implements LinkedHashSet<E> {
+  factory _CompactImmutableLinkedHashSet._uninstantiable() {
+    throw new UnsupportedError("ImmutableSet can only be allocated by the VM");
+  }
+
+  E? lookup(Object? key) {
+    if (_indexNullable == null) {
+      _createIndex();
+    }
+    return super.lookup(key);
+  }
+
+  bool contains(Object? key) {
+    if (_indexNullable == null) {
+      _createIndex();
+    }
+    return super.contains(key);
+  }
+
+  void _createIndex() {
+    final size = _roundUpToPowerOfTwo(
+        max(_data.length * 2, _HashBase._INITIAL_INDEX_SIZE));
+    final index = new Uint32List(size);
+    final hashMask = _HashBase._indexSizeToHashMask(size);
+    assert(_hashMask == hashMask);
+
+    final sizeMask = size - 1;
+    final maxEntries = size >> 1;
+
+    for (int j = 0; j < _usedData; j++) {
+      final key = _data[j];
+
+      final fullHash = _hashCode(key);
+      final hashPattern = _HashBase._hashPattern(fullHash, hashMask, size);
+
+      int i = _HashBase._firstProbe(fullHash, sizeMask);
+      int pair = index[i];
+      while (pair != _HashBase._UNUSED_PAIR) {
+        assert(pair != _HashBase._DELETED_PAIR);
+
+        final int d = hashPattern ^ pair;
+        if (d < maxEntries) {
+          // We should not already find an entry in the index.
+          assert(!_equals(key, _data[d]));
+        }
+
+        i = _HashBase._nextProbe(i, sizeMask);
+        pair = index[i];
+      }
+
+      final int insertionPoint = i;
+      assert(1 <= hashPattern && hashPattern < (1 << 32));
+      assert((hashPattern & j) == 0);
+      index[insertionPoint] = hashPattern | j;
+    }
+
+    // Publish new index, uses store release semantics.
+    _index = index;
+  }
+
+  Set<R> cast<R>() => Set.castFrom<E, R>(this, newSet: _newEmpty);
+
+  static Set<R> _newEmpty<R>() => new _CompactLinkedHashSet<R>();
+
+  // Returns a mutable set.
+  Set<E> toSet() => new _CompactLinkedHashSet<E>()..addAll(this);
+}
+
 class _CompactLinkedIdentityHashSet<E> extends _HashFieldBase
     with
         SetMixin<E>,
diff --git a/sdk/lib/_internal/vm/lib/convert_patch.dart b/sdk/lib/_internal/vm/lib/convert_patch.dart
index 9e920ea..2885579 100644
--- a/sdk/lib/_internal/vm/lib/convert_patch.dart
+++ b/sdk/lib/_internal/vm/lib/convert_patch.dart
@@ -1574,7 +1574,8 @@
   }
 }
 
-double _parseDouble(String source, int start, int end) native "Double_parse";
+@pragma("vm:external-name", "Double_parse")
+external double _parseDouble(String source, int start, int end);
 
 /**
  * Implements the chunked conversion from a UTF-8 encoding of JSON
diff --git a/sdk/lib/_internal/vm/lib/core_patch.dart b/sdk/lib/_internal/vm/lib/core_patch.dart
index b6587ef..3118350 100644
--- a/sdk/lib/_internal/vm/lib/core_patch.dart
+++ b/sdk/lib/_internal/vm/lib/core_patch.dart
@@ -72,7 +72,6 @@
 // part "function_patch.dart";
 // part "growable_array.dart";
 // part "identical_patch.dart";
-// part "immutable_map.dart";
 // part "integers.dart";
 // part "integers_patch.dart";
 // part "invocation_mirror_patch.dart";
@@ -232,5 +231,6 @@
 @patch
 class StackTrace {
   @patch
-  static StackTrace get current native "StackTrace_current";
+  @pragma("vm:external-name", "StackTrace_current")
+  external static StackTrace get current;
 }
diff --git a/sdk/lib/_internal/vm/lib/date_patch.dart b/sdk/lib/_internal/vm/lib/date_patch.dart
index 5485c90..eec2bf5 100644
--- a/sdk/lib/_internal/vm/lib/date_patch.dart
+++ b/sdk/lib/_internal/vm/lib/date_patch.dart
@@ -9,17 +9,19 @@
 class DateTime {
   // Natives.
   // The natives have been moved up here to work around Issue 10401.
-  static int _getCurrentMicros() native "DateTime_currentTimeMicros";
+  @pragma("vm:external-name", "DateTime_currentTimeMicros")
+  external static int _getCurrentMicros();
 
-  static String _timeZoneNameForClampedSeconds(int secondsSinceEpoch)
-      native "DateTime_timeZoneName";
+  @pragma("vm:external-name", "DateTime_timeZoneName")
+  external static String _timeZoneNameForClampedSeconds(int secondsSinceEpoch);
 
-  static int _timeZoneOffsetInSecondsForClampedSeconds(int secondsSinceEpoch)
-      native "DateTime_timeZoneOffsetInSeconds";
+  @pragma("vm:external-name", "DateTime_timeZoneOffsetInSeconds")
+  external static int _timeZoneOffsetInSecondsForClampedSeconds(
+      int secondsSinceEpoch);
 
   // Daylight-savings independent adjustment for the local time zone.
-  static int _localTimeZoneAdjustmentInSeconds()
-      native "DateTime_localTimeZoneAdjustmentInSeconds";
+  @pragma("vm:external-name", "DateTime_localTimeZoneAdjustmentInSeconds")
+  external static int _localTimeZoneAdjustmentInSeconds();
 
   static const _MICROSECOND_INDEX = 0;
   static const _MILLISECOND_INDEX = 1;
diff --git a/sdk/lib/_internal/vm/lib/developer.dart b/sdk/lib/_internal/vm/lib/developer.dart
index f0b2a1c..46d0507 100644
--- a/sdk/lib/_internal/vm/lib/developer.dart
+++ b/sdk/lib/_internal/vm/lib/developer.dart
@@ -18,10 +18,12 @@
 // part "timeline.dart"
 
 @patch
-bool debugger({bool when: true, String? message}) native "Developer_debugger";
+@pragma("vm:external-name", "Developer_debugger")
+external bool debugger({bool when: true, String? message});
 
 @patch
-Object? inspect(Object? object) native "Developer_inspect";
+@pragma("vm:external-name", "Developer_inspect")
+external Object? inspect(Object? object);
 
 @patch
 void log(String message,
@@ -50,20 +52,21 @@
 
 int _nextSequenceNumber = 0;
 
-_log(String message, int timestamp, int sequenceNumber, int level, String name,
-    Zone? zone, Object? error, StackTrace? stackTrace) native "Developer_log";
+@pragma("vm:external-name", "Developer_log")
+external _log(String message, int timestamp, int sequenceNumber, int level,
+    String name, Zone? zone, Object? error, StackTrace? stackTrace);
 
 @patch
-void _postEvent(String eventKind, String eventData)
-    native "Developer_postEvent";
+@pragma("vm:external-name", "Developer_postEvent")
+external void _postEvent(String eventKind, String eventData);
 
 @patch
-ServiceExtensionHandler? _lookupExtension(String method)
-    native "Developer_lookupExtension";
+@pragma("vm:external-name", "Developer_lookupExtension")
+external ServiceExtensionHandler? _lookupExtension(String method);
 
 @patch
-_registerExtension(String method, ServiceExtensionHandler handler)
-    native "Developer_registerExtension";
+@pragma("vm:external-name", "Developer_registerExtension")
+external _registerExtension(String method, ServiceExtensionHandler handler);
 
 // This code is only invoked when there is no other Dart code on the stack.
 @pragma("vm:entry-point", !const bool.fromEnvironment("dart.vm.product"))
@@ -152,18 +155,22 @@
 }
 
 @patch
-int _getServiceMajorVersion() native "Developer_getServiceMajorVersion";
+@pragma("vm:external-name", "Developer_getServiceMajorVersion")
+external int _getServiceMajorVersion();
 
 @patch
-int _getServiceMinorVersion() native "Developer_getServiceMinorVersion";
+@pragma("vm:external-name", "Developer_getServiceMinorVersion")
+external int _getServiceMinorVersion();
 
 @patch
-void _getServerInfo(SendPort sendPort) native "Developer_getServerInfo";
+@pragma("vm:external-name", "Developer_getServerInfo")
+external void _getServerInfo(SendPort sendPort);
 
 @patch
-void _webServerControl(SendPort sendPort, bool enable, bool? silenceOutput)
-    native "Developer_webServerControl";
+@pragma("vm:external-name", "Developer_webServerControl")
+external void _webServerControl(
+    SendPort sendPort, bool enable, bool? silenceOutput);
 
 @patch
-String _getIsolateIDFromSendPort(SendPort sendPort)
-    native "Developer_getIsolateIDFromSendPort";
+@pragma("vm:external-name", "Developer_getIsolateIDFromSendPort")
+external String _getIsolateIDFromSendPort(SendPort sendPort);
diff --git a/sdk/lib/_internal/vm/lib/double.dart b/sdk/lib/_internal/vm/lib/double.dart
index 26406d3..e801e3d 100644
--- a/sdk/lib/_internal/vm/lib/double.dart
+++ b/sdk/lib/_internal/vm/lib/double.dart
@@ -8,12 +8,15 @@
 class _Double implements double {
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", _Double)
-  factory _Double.fromInteger(int value) native "Double_doubleFromInteger";
+  @pragma("vm:external-name", "Double_doubleFromInteger")
+  external factory _Double.fromInteger(int value);
 
   @pragma("vm:recognized", "asm-intrinsic")
-  int get hashCode native "Double_hashCode";
+  @pragma("vm:external-name", "Double_hashCode")
+  external int get hashCode;
   @pragma("vm:recognized", "asm-intrinsic")
-  int get _identityHashCode native "Double_hashCode";
+  @pragma("vm:external-name", "Double_hashCode")
+  external int get _identityHashCode;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", _Double)
@@ -24,7 +27,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Double)
-  double _add(double other) native "Double_add";
+  @pragma("vm:external-name", "Double_add")
+  external double _add(double other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", _Double)
@@ -35,7 +39,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Double)
-  double _sub(double other) native "Double_sub";
+  @pragma("vm:external-name", "Double_sub")
+  external double _sub(double other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", _Double)
@@ -46,7 +51,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Double)
-  double _mul(double other) native "Double_mul";
+  @pragma("vm:external-name", "Double_mul")
+  external double _mul(double other);
 
   int operator ~/(num other) {
     return (this / other.toDouble()).truncate();
@@ -61,7 +67,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Double)
-  double _div(double other) native "Double_div";
+  @pragma("vm:external-name", "Double_div")
+  external double _div(double other);
 
   double operator %(num other) {
     return _modulo(other.toDouble());
@@ -70,17 +77,20 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:exact-result-type", _Double)
-  double _modulo(double other) native "Double_modulo";
+  @pragma("vm:external-name", "Double_modulo")
+  external double _modulo(double other);
 
   double remainder(num other) {
     return _remainder(other.toDouble());
   }
 
-  double _remainder(double other) native "Double_remainder";
+  @pragma("vm:external-name", "Double_remainder")
+  external double _remainder(double other);
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", _Double)
-  double operator -() native "Double_flipSignBit";
+  @pragma("vm:external-name", "Double_flipSignBit")
+  external double operator -();
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -90,9 +100,11 @@
   }
 
   @pragma("vm:exact-result-type", bool)
-  bool _equal(double other) native "Double_equal";
+  @pragma("vm:external-name", "Double_equal")
+  external bool _equal(double other);
   @pragma("vm:exact-result-type", bool)
-  bool _equalToInteger(int other) native "Double_equalToInteger";
+  @pragma("vm:external-name", "Double_equalToInteger")
+  external bool _equalToInteger(int other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -109,7 +121,8 @@
   }
 
   @pragma("vm:exact-result-type", bool)
-  bool _greaterThan(double other) native "Double_greaterThan";
+  @pragma("vm:external-name", "Double_greaterThan")
+  external bool _greaterThan(double other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -151,18 +164,21 @@
     return new _Double.fromInteger(other)._remainder(this);
   }
 
-  bool _greaterThanFromInteger(int other)
-      native "Double_greaterThanFromInteger";
+  @pragma("vm:external-name", "Double_greaterThanFromInteger")
+  external bool _greaterThanFromInteger(int other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool get isNegative native "Double_getIsNegative";
+  @pragma("vm:external-name", "Double_getIsNegative")
+  external bool get isNegative;
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool get isInfinite native "Double_getIsInfinite";
+  @pragma("vm:external-name", "Double_getIsInfinite")
+  external bool get isInfinite;
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool get isNaN native "Double_getIsNaN";
+  @pragma("vm:external-name", "Double_getIsNaN")
+  external bool get isNaN;
   bool get isFinite => !isInfinite && !isNaN; // Can be optimized.
 
   double abs() {
@@ -178,26 +194,35 @@
   }
 
   int round() => roundToDouble().toInt();
+  int truncate() => toInt();
+
+  @pragma("vm:recognized", "other")
+  @pragma("vm:prefer-inline")
   int floor() => floorToDouble().toInt();
+  @pragma("vm:recognized", "other")
+  @pragma("vm:prefer-inline")
   int ceil() => ceilToDouble().toInt();
-  int truncate() => truncateToDouble().toInt();
 
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:exact-result-type", _Double)
-  double roundToDouble() native "Double_round";
+  @pragma("vm:external-name", "Double_round")
+  external double roundToDouble();
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:exact-result-type", _Double)
-  double floorToDouble() native "Double_floor";
+  @pragma("vm:external-name", "Double_floor")
+  external double floorToDouble();
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:exact-result-type", _Double)
-  double ceilToDouble() native "Double_ceil";
+  @pragma("vm:external-name", "Double_ceil")
+  external double ceilToDouble();
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:exact-result-type", _Double)
-  double truncateToDouble() native "Double_truncate";
+  @pragma("vm:external-name", "Double_truncate")
+  external double truncateToDouble();
 
   num clamp(num lowerLimit, num upperLimit) {
     // TODO: Remove these null checks once all code is opted into strong nonnullable mode.
@@ -219,7 +244,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   @pragma("vm:non-nullable-result-type")
-  int toInt() native "Double_toInt";
+  @pragma("vm:external-name", "Double_toInt")
+  external int toInt();
 
   double toDouble() {
     return this;
@@ -232,7 +258,8 @@
   static final List _cache = new List.filled(CACHE_LENGTH, null);
   static int _cacheEvictIndex = 0;
 
-  String _toString() native "Double_toString";
+  @pragma("vm:external-name", "Double_toString")
+  external String _toString();
 
   String toString() {
     // TODO(koda): Consider starting at most recently inserted.
@@ -283,7 +310,8 @@
     return _toStringAsFixed(fractionDigits);
   }
 
-  String _toStringAsFixed(int fractionDigits) native "Double_toStringAsFixed";
+  @pragma("vm:external-name", "Double_toStringAsFixed")
+  external String _toStringAsFixed(int fractionDigits);
 
   String toStringAsExponential([int? fractionDigits]) {
     // See ECMAScript-262, 15.7.4.6 for details.
@@ -310,8 +338,8 @@
     return _toStringAsExponential(fractionDigits);
   }
 
-  String _toStringAsExponential(int fractionDigits)
-      native "Double_toStringAsExponential";
+  @pragma("vm:external-name", "Double_toStringAsExponential")
+  external String _toStringAsExponential(int fractionDigits);
 
   String toStringAsPrecision(int precision) {
     // See ECMAScript-262, 15.7.4.7 for details.
@@ -335,8 +363,8 @@
     return _toStringAsPrecision(precision);
   }
 
-  String _toStringAsPrecision(int fractionDigits)
-      native "Double_toStringAsPrecision";
+  @pragma("vm:external-name", "Double_toStringAsPrecision")
+  external String _toStringAsPrecision(int fractionDigits);
 
   // Order is: NaN > Infinity > ... > 0.0 > -0.0 > ... > -Infinity.
   int compareTo(num other) {
diff --git a/sdk/lib/_internal/vm/lib/double_patch.dart b/sdk/lib/_internal/vm/lib/double_patch.dart
index e6ccf5c..5c66c88 100644
--- a/sdk/lib/_internal/vm/lib/double_patch.dart
+++ b/sdk/lib/_internal/vm/lib/double_patch.dart
@@ -8,8 +8,8 @@
 
 @patch
 class double {
-  static double? _nativeParse(String str, int start, int end)
-      native "Double_parse";
+  @pragma("vm:external-name", "Double_parse")
+  external static double? _nativeParse(String str, int start, int end);
 
   static double? _tryParseDouble(String str, int start, int end) {
     assert(start < end);
diff --git a/sdk/lib/_internal/vm/lib/errors_patch.dart b/sdk/lib/_internal/vm/lib/errors_patch.dart
index 3de48d4..0e3a676 100644
--- a/sdk/lib/_internal/vm/lib/errors_patch.dart
+++ b/sdk/lib/_internal/vm/lib/errors_patch.dart
@@ -42,10 +42,12 @@
     _doThrowNewSource('$name != null', line, column, null);
   }
 
-  static _doThrowNew(int assertionStart, int assertionEnd, Object? message)
-      native "AssertionError_throwNew";
-  static _doThrowNewSource(String failedAssertion, int line, int column,
-      Object? message) native "AssertionError_throwNewSource";
+  @pragma("vm:external-name", "AssertionError_throwNew")
+  external static _doThrowNew(
+      int assertionStart, int assertionEnd, Object? message);
+  @pragma("vm:external-name", "AssertionError_throwNewSource")
+  external static _doThrowNewSource(
+      String failedAssertion, int line, int column, Object? message);
 
   @pragma("vm:entry-point", "call")
   static _evaluateAssertion(condition) {
@@ -94,8 +96,9 @@
   _TypeError._create(this._url, this._line, this._column, this._message);
 
   @pragma("vm:entry-point", "call")
-  static _throwNew(int location, Object srcValue, _Type dstType, String dstName)
-      native "TypeError_throwNew";
+  @pragma("vm:external-name", "TypeError_throwNew")
+  external static _throwNew(
+      int location, Object srcValue, _Type dstType, String dstName);
 
   String toString() => _message;
 
@@ -127,7 +130,8 @@
   @pragma("vm:entry-point")
   FallThroughError._create(this._url, this._line);
 
-  static _throwNew(int caseClausePos) native "FallThroughError_throwNew";
+  @pragma("vm:external-name", "FallThroughError_throwNew")
+  external static _throwNew(int caseClausePos);
 
   @patch
   String toString() {
@@ -168,8 +172,8 @@
   AbstractClassInstantiationError._create(
       this._className, this._url, this._line);
 
-  static _throwNew(int caseClausePos, String className)
-      native "AbstractClassInstantiationError_throwNew";
+  @pragma("vm:external-name", "AbstractClassInstantiationError_throwNew")
+  external static _throwNew(int caseClausePos, String className);
 
   @patch
   String toString() {
@@ -264,8 +268,9 @@
                 ? _NamedArgumentsMap(arguments!, argumentNames)
                 : null);
 
-  static String? _existingMethodSignature(Object? receiver, String methodName,
-      int invocationType) native "NoSuchMethodError_existingMethodSignature";
+  @pragma("vm:external-name", "NoSuchMethodError_existingMethodSignature")
+  external static String? _existingMethodSignature(
+      Object? receiver, String methodName, int invocationType);
 
   @patch
   String toString() {
@@ -445,7 +450,9 @@
     if (invocation.typeArguments.isNotEmpty) {
       buffer.write("<");
       for (var type in invocation.typeArguments) {
-        buffer..write(separator)..write("_");
+        buffer
+          ..write(separator)
+          ..write("_");
         separator = ", ";
       }
       buffer.write(">");
@@ -453,14 +460,21 @@
     }
     buffer.write("(");
     for (var argument in invocation.positionalArguments) {
-      buffer..write(separator)..write("_");
+      buffer
+        ..write(separator)
+        ..write("_");
       separator = ", ";
     }
     if (invocation.namedArguments.isNotEmpty) {
-      buffer..write(separator)..write("{");
+      buffer
+        ..write(separator)
+        ..write("{");
       separator = "";
       for (var name in invocation.namedArguments.keys) {
-        buffer..write(separator)..write(_symbolToString(name))..write(": _");
+        buffer
+          ..write(separator)
+          ..write(_symbolToString(name))
+          ..write(": _");
         separator = ",";
       }
       buffer.write("}");
diff --git a/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart b/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart
index 2966149..b9bcaf0 100644
--- a/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart
+++ b/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart
@@ -8,9 +8,12 @@
 import 'dart:typed_data';
 import 'dart:isolate';
 
-DynamicLibrary _open(String path) native "Ffi_dl_open";
-DynamicLibrary _processLibrary() native "Ffi_dl_processLibrary";
-DynamicLibrary _executableLibrary() native "Ffi_dl_executableLibrary";
+@pragma("vm:external-name", "Ffi_dl_open")
+external DynamicLibrary _open(String path);
+@pragma("vm:external-name", "Ffi_dl_processLibrary")
+external DynamicLibrary _processLibrary();
+@pragma("vm:external-name", "Ffi_dl_executableLibrary")
+external DynamicLibrary _executableLibrary();
 
 @patch
 @pragma("vm:entry-point")
@@ -27,15 +30,17 @@
   factory DynamicLibrary.executable() => _executableLibrary();
 
   @patch
-  Pointer<T> lookup<T extends NativeType>(String symbolName)
-      native "Ffi_dl_lookup";
+  @pragma("vm:external-name", "Ffi_dl_lookup")
+  external Pointer<T> lookup<T extends NativeType>(String symbolName);
 
   @patch
-  bool providesSymbol(String symbolName) native "Ffi_dl_providesSymbol";
+  @pragma("vm:external-name", "Ffi_dl_providesSymbol")
+  external bool providesSymbol(String symbolName);
 
   // TODO(dacoharkes): Expose this to users, or extend Pointer?
   // https://github.com/dart-lang/sdk/issues/35881
-  int getHandle() native "Ffi_dl_getHandle";
+  @pragma("vm:external-name", "Ffi_dl_getHandle")
+  external int getHandle();
 
   @patch
   bool operator ==(Object other) {
diff --git a/sdk/lib/_internal/vm/lib/ffi_patch.dart b/sdk/lib/_internal/vm/lib/ffi_patch.dart
index ac745e3..b3faeab 100644
--- a/sdk/lib/_internal/vm/lib/ffi_patch.dart
+++ b/sdk/lib/_internal/vm/lib/ffi_patch.dart
@@ -31,18 +31,19 @@
 }
 
 @pragma("vm:recognized", "other")
-Pointer<T> _fromAddress<T extends NativeType>(int ptr) native "Ffi_fromAddress";
+@pragma("vm:external-name", "Ffi_fromAddress")
+external Pointer<T> _fromAddress<T extends NativeType>(int ptr);
 
 // The real implementation of this function (for interface calls) lives in
 // BuildFfiAsFunctionCall in the Kernel frontend. No calls can actually reach
 // this function.
 @pragma("vm:recognized", "other")
-DS _asFunctionInternal<DS extends Function, NS extends Function>(
-    Pointer<NativeFunction<NS>> ptr,
-    bool isLeaf) native "Ffi_asFunctionInternal";
+@pragma("vm:external-name", "Ffi_asFunctionInternal")
+external DS _asFunctionInternal<DS extends Function, NS extends Function>(
+    Pointer<NativeFunction<NS>> ptr, bool isLeaf);
 
-dynamic _asExternalTypedData(Pointer ptr, int count)
-    native "Ffi_asExternalTypedData";
+@pragma("vm:external-name", "Ffi_asExternalTypedData")
+external dynamic _asExternalTypedData(Pointer ptr, int count);
 
 // Returns a Function object for a native callback.
 //
@@ -61,11 +62,13 @@
 // Function objects returned by this native method are not Dart instances,
 // so we need to use top type as a return type to avoid type check.
 @pragma("vm:recognized", "other")
-dynamic _nativeCallbackFunction<NS extends Function>(Function target,
-    Object? exceptionalReturn) native "Ffi_nativeCallbackFunction";
+@pragma("vm:external-name", "Ffi_nativeCallbackFunction")
+external dynamic _nativeCallbackFunction<NS extends Function>(
+    Function target, Object? exceptionalReturn);
 
-Pointer<NS> _pointerFromFunction<NS extends NativeFunction>(dynamic function)
-    native "Ffi_pointerFromFunction";
+@pragma("vm:external-name", "Ffi_pointerFromFunction")
+external Pointer<NS> _pointerFromFunction<NS extends NativeFunction>(
+    dynamic function);
 
 @patch
 @pragma("vm:entry-point")
@@ -88,7 +91,8 @@
 
   @patch
   @pragma("vm:recognized", "other")
-  int get address native "Ffi_address";
+  @pragma("vm:external-name", "Ffi_address")
+  external int get address;
 
   // For statically known types, this is rewritten.
   @patch
@@ -139,8 +143,9 @@
 /// calculations. See pkg/vm/lib/transformations/ffi.dart.
 @pragma("vm:recognized", "other")
 @pragma('vm:prefer-inline')
-int _abi()
-    native "Recognized method: IR graph is built in the flow graph builder.";
+@pragma("vm:external-name",
+    "Recognized method: IR graph is built in the flow graph builder.")
+external int _abi();
 
 /// Copies data byte-wise from [source] to [target].
 ///
@@ -191,111 +196,122 @@
 // and GCing new spaces takes a lot of the benchmark time. The next speedup is
 // getting rid of these allocations by inlining these functions.
 @pragma("vm:recognized", "other")
-int _loadInt8(Object typedDataBase, int offsetInBytes) native "Ffi_loadInt8";
+@pragma("vm:external-name", "Ffi_loadInt8")
+external int _loadInt8(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadInt16(Object typedDataBase, int offsetInBytes) native "Ffi_loadInt16";
+@pragma("vm:external-name", "Ffi_loadInt16")
+external int _loadInt16(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadInt32(Object typedDataBase, int offsetInBytes) native "Ffi_loadInt32";
+@pragma("vm:external-name", "Ffi_loadInt32")
+external int _loadInt32(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadInt64(Object typedDataBase, int offsetInBytes) native "Ffi_loadInt64";
+@pragma("vm:external-name", "Ffi_loadInt64")
+external int _loadInt64(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadUint8(Object typedDataBase, int offsetInBytes) native "Ffi_loadUint8";
+@pragma("vm:external-name", "Ffi_loadUint8")
+external int _loadUint8(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadUint16(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadUint16";
+@pragma("vm:external-name", "Ffi_loadUint16")
+external int _loadUint16(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadUint32(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadUint32";
+@pragma("vm:external-name", "Ffi_loadUint32")
+external int _loadUint32(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadUint64(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadUint64";
+@pragma("vm:external-name", "Ffi_loadUint64")
+external int _loadUint64(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-int _loadIntPtr(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadIntPtr";
+@pragma("vm:external-name", "Ffi_loadIntPtr")
+external int _loadIntPtr(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-double _loadFloat(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadFloat";
+@pragma("vm:external-name", "Ffi_loadFloat")
+external double _loadFloat(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-double _loadDouble(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadDouble";
+@pragma("vm:external-name", "Ffi_loadDouble")
+external double _loadDouble(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-double _loadFloatUnaligned(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadFloatUnaligned";
+@pragma("vm:external-name", "Ffi_loadFloatUnaligned")
+external double _loadFloatUnaligned(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-double _loadDoubleUnaligned(Object typedDataBase, int offsetInBytes)
-    native "Ffi_loadDoubleUnaligned";
+@pragma("vm:external-name", "Ffi_loadDoubleUnaligned")
+external double _loadDoubleUnaligned(Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-Pointer<S> _loadPointer<S extends NativeType>(
-    Object typedDataBase, int offsetInBytes) native "Ffi_loadPointer";
+@pragma("vm:external-name", "Ffi_loadPointer")
+external Pointer<S> _loadPointer<S extends NativeType>(
+    Object typedDataBase, int offsetInBytes);
 
 @pragma("vm:recognized", "other")
-void _storeInt8(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeInt8";
+@pragma("vm:external-name", "Ffi_storeInt8")
+external void _storeInt8(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeInt16(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeInt16";
+@pragma("vm:external-name", "Ffi_storeInt16")
+external void _storeInt16(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeInt32(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeInt32";
+@pragma("vm:external-name", "Ffi_storeInt32")
+external void _storeInt32(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeInt64(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeInt64";
+@pragma("vm:external-name", "Ffi_storeInt64")
+external void _storeInt64(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeUint8(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeUint8";
+@pragma("vm:external-name", "Ffi_storeUint8")
+external void _storeUint8(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeUint16(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeUint16";
+@pragma("vm:external-name", "Ffi_storeUint16")
+external void _storeUint16(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeUint32(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeUint32";
+@pragma("vm:external-name", "Ffi_storeUint32")
+external void _storeUint32(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeUint64(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeUint64";
+@pragma("vm:external-name", "Ffi_storeUint64")
+external void _storeUint64(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeIntPtr(Object typedDataBase, int offsetInBytes, int value)
-    native "Ffi_storeIntPtr";
+@pragma("vm:external-name", "Ffi_storeIntPtr")
+external void _storeIntPtr(Object typedDataBase, int offsetInBytes, int value);
 
 @pragma("vm:recognized", "other")
-void _storeFloat(Object typedDataBase, int offsetInBytes, double value)
-    native "Ffi_storeFloat";
+@pragma("vm:external-name", "Ffi_storeFloat")
+external void _storeFloat(
+    Object typedDataBase, int offsetInBytes, double value);
 
 @pragma("vm:recognized", "other")
-void _storeDouble(Object typedDataBase, int offsetInBytes, double value)
-    native "Ffi_storeDouble";
+@pragma("vm:external-name", "Ffi_storeDouble")
+external void _storeDouble(
+    Object typedDataBase, int offsetInBytes, double value);
 
 @pragma("vm:recognized", "other")
-void _storeFloatUnaligned(Object typedDataBase, int offsetInBytes, double value)
-    native "Ffi_storeFloatUnaligned";
+@pragma("vm:external-name", "Ffi_storeFloatUnaligned")
+external void _storeFloatUnaligned(
+    Object typedDataBase, int offsetInBytes, double value);
 
 @pragma("vm:recognized", "other")
-void _storeDoubleUnaligned(Object typedDataBase, int offsetInBytes,
-    double value) native "Ffi_storeDoubleUnaligned";
+@pragma("vm:external-name", "Ffi_storeDoubleUnaligned")
+external void _storeDoubleUnaligned(
+    Object typedDataBase, int offsetInBytes, double value);
 
 @pragma("vm:recognized", "other")
-void _storePointer<S extends NativeType>(Object typedDataBase,
-    int offsetInBytes, Pointer<S> value) native "Ffi_storePointer";
+@pragma("vm:external-name", "Ffi_storePointer")
+external void _storePointer<S extends NativeType>(
+    Object typedDataBase, int offsetInBytes, Pointer<S> value);
 
 Pointer<Int8> _elementAtInt8(Pointer<Int8> pointer, int index) =>
     Pointer.fromAddress(pointer.address + 1 * index);
@@ -762,17 +778,21 @@
 
 extension NativePort on SendPort {
   @patch
-  int get nativePort native "SendPortImpl_get_id";
+  @pragma("vm:external-name", "SendPortImpl_get_id")
+  external int get nativePort;
 }
 
-int _nativeApiFunctionPointer(String symbol)
-    native "DartNativeApiFunctionPointer";
+@pragma("vm:external-name", "DartNativeApiFunctionPointer")
+external int _nativeApiFunctionPointer(String symbol);
 
-int _initializeApiDLData() native "DartApiDLInitializeData";
+@pragma("vm:external-name", "DartApiDLInitializeData")
+external int _initializeApiDLData();
 
-int _dartApiMajorVersion() native "DartApiDLMajorVersion";
+@pragma("vm:external-name", "DartApiDLMajorVersion")
+external int _dartApiMajorVersion();
 
-int _dartApiMinorVersion() native "DartApiDLMinorVersion";
+@pragma("vm:external-name", "DartApiDLMinorVersion")
+external int _dartApiMinorVersion();
 
 @patch
 abstract class NativeApi {
diff --git a/sdk/lib/_internal/vm/lib/function.dart b/sdk/lib/_internal/vm/lib/function.dart
index 710f1ef..b7c475c 100644
--- a/sdk/lib/_internal/vm/lib/function.dart
+++ b/sdk/lib/_internal/vm/lib/function.dart
@@ -10,7 +10,8 @@
     throw "Unreachable";
   }
 
-  bool operator ==(Object other) native "Closure_equals";
+  @pragma("vm:external-name", "Closure_equals")
+  external bool operator ==(Object other);
 
   int get hashCode {
     _hash ??= _computeHash();
@@ -19,7 +20,8 @@
 
   _Closure get call => this;
 
-  int _computeHash() native "Closure_computeHash";
+  @pragma("vm:external-name", "Closure_computeHash")
+  external int _computeHash();
 
   // No instance fields should be declared before the following fields whose
   // offsets must be identical in Dart and C++.
diff --git a/sdk/lib/_internal/vm/lib/function_patch.dart b/sdk/lib/_internal/vm/lib/function_patch.dart
index b4d3daa..98f3e1c 100644
--- a/sdk/lib/_internal/vm/lib/function_patch.dart
+++ b/sdk/lib/_internal/vm/lib/function_patch.dart
@@ -7,8 +7,8 @@
 @patch
 class Function {
   // TODO(regis): Pass type arguments to generic functions. Wait for API spec.
-  static _apply(List<dynamic>? arguments, List<dynamic>? names)
-      native "Function_apply";
+  @pragma("vm:external-name", "Function_apply")
+  external static _apply(List<dynamic>? arguments, List<dynamic>? names);
 
   @patch
   static apply(Function function, List<dynamic>? positionalArguments,
diff --git a/sdk/lib/_internal/vm/lib/growable_array.dart b/sdk/lib/_internal/vm/lib/growable_array.dart
index 519f095..516996f 100644
--- a/sdk/lib/_internal/vm/lib/growable_array.dart
+++ b/sdk/lib/_internal/vm/lib/growable_array.dart
@@ -204,17 +204,20 @@
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type",
       <dynamic>[_GrowableList, "result-type-uses-passed-type-arguments"])
-  factory _GrowableList._withData(_List data) native "GrowableList_allocate";
+  @pragma("vm:external-name", "GrowableList_allocate")
+  external factory _GrowableList._withData(_List data);
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get _capacity native "GrowableList_getCapacity";
+  @pragma("vm:external-name", "GrowableList_getCapacity")
+  external int get _capacity;
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "GrowableList_getLength";
+  @pragma("vm:external-name", "GrowableList_getLength")
+  external int get length;
 
   void set length(int new_length) {
     if (new_length > length) {
@@ -245,13 +248,16 @@
   }
 
   @pragma("vm:recognized", "graph-intrinsic")
-  void _setLength(int new_length) native "GrowableList_setLength";
+  @pragma("vm:external-name", "GrowableList_setLength")
+  external void _setLength(int new_length);
 
   @pragma("vm:recognized", "graph-intrinsic")
-  void _setData(_List array) native "GrowableList_setData";
+  @pragma("vm:external-name", "GrowableList_setData")
+  external void _setData(_List array);
 
   @pragma("vm:recognized", "graph-intrinsic")
-  T operator [](int index) native "GrowableList_getIndexed";
+  @pragma("vm:external-name", "GrowableList_getIndexed")
+  external T operator [](int index);
 
   @pragma("vm:recognized", "other")
   void operator []=(int index, T value) {
@@ -259,7 +265,8 @@
   }
 
   @pragma("vm:recognized", "graph-intrinsic")
-  void _setIndexed(int index, T? value) native "GrowableList_setIndexed";
+  @pragma("vm:external-name", "GrowableList_setIndexed")
+  external void _setIndexed(int index, T? value);
 
   @pragma("vm:entry-point", "call")
   @pragma("vm:prefer-inline")
diff --git a/sdk/lib/_internal/vm/lib/identical_patch.dart b/sdk/lib/_internal/vm/lib/identical_patch.dart
index 9a9ff56..e33bc535 100644
--- a/sdk/lib/_internal/vm/lib/identical_patch.dart
+++ b/sdk/lib/_internal/vm/lib/identical_patch.dart
@@ -7,7 +7,8 @@
 @patch
 @pragma("vm:recognized", "other")
 @pragma("vm:exact-result-type", bool)
-bool identical(Object? a, Object? b) native "Identical_comparison";
+@pragma("vm:external-name", "Identical_comparison")
+external bool identical(Object? a, Object? b);
 
 @patch
 @pragma("vm:entry-point", "call")
diff --git a/sdk/lib/_internal/vm/lib/immutable_map.dart b/sdk/lib/_internal/vm/lib/immutable_map.dart
index 2f653f5..19ed15f 100644
--- a/sdk/lib/_internal/vm/lib/immutable_map.dart
+++ b/sdk/lib/_internal/vm/lib/immutable_map.dart
@@ -2,219 +2,5 @@
 // for 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 "core_patch.dart";
-
-/// Immutable map class for compiler generated map literals.
-// TODO(lrn): Extend MapBase with UnmodifiableMapMixin when mixins
-// support forwarding const constructors.
-@pragma("vm:entry-point")
-class _ImmutableMap<K, V> implements Map<K, V> {
-  final _ImmutableList _kvPairs;
-
-  @pragma("vm:entry-point")
-  const _ImmutableMap._create(_ImmutableList keyValuePairs)
-      : _kvPairs = keyValuePairs;
-
-  Map<K2, V2> cast<K2, V2>() => Map.castFrom<K, V, K2, V2>(this);
-  V? operator [](Object? key) {
-    // To preserve the key-value order of the map literal, the keys are
-    // not sorted. Need to do linear search or implement an additional
-    // lookup table.
-    for (int i = 0; i < _kvPairs.length - 1; i += 2) {
-      if (key == _kvPairs[i]) {
-        return _kvPairs[i + 1];
-      }
-    }
-    return null;
-  }
-
-  bool get isEmpty {
-    return _kvPairs.length == 0;
-  }
-
-  bool get isNotEmpty => !isEmpty;
-
-  int get length {
-    return _kvPairs.length ~/ 2;
-  }
-
-  void forEach(void f(K key, V value)) {
-    for (int i = 0; i < _kvPairs.length; i += 2) {
-      f(_kvPairs[i], _kvPairs[i + 1]);
-    }
-  }
-
-  Iterable<K> get keys {
-    return new _ImmutableMapKeyIterable<K>(this);
-  }
-
-  Iterable<V> get values {
-    return new _ImmutableMapValueIterable<V>(this);
-  }
-
-  bool containsKey(Object? key) {
-    for (int i = 0; i < _kvPairs.length; i += 2) {
-      if (key == _kvPairs[i]) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  bool containsValue(Object? value) {
-    for (int i = 1; i < _kvPairs.length; i += 2) {
-      if (value == _kvPairs[i]) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  void operator []=(K key, V value) {
-    throw new UnsupportedError("Cannot set value in unmodifiable Map");
-  }
-
-  void addAll(Map<K, V> other) {
-    throw new UnsupportedError("Cannot set value in unmodifiable Map");
-  }
-
-  V putIfAbsent(K key, V ifAbsent()) {
-    throw new UnsupportedError("Cannot set value in unmodifiable Map");
-  }
-
-  void clear() {
-    throw new UnsupportedError("Cannot clear unmodifiable Map");
-  }
-
-  V? remove(Object? key) {
-    throw new UnsupportedError("Cannot remove from unmodifiable Map");
-  }
-
-  Iterable<MapEntry<K, V>> get entries =>
-      new _ImmutableMapEntryIterable<K, V>(this);
-
-  Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> f(K key, V value)) {
-    var result = <K2, V2>{};
-    for (int i = 0; i < _kvPairs.length; i += 2) {
-      var entry = f(_kvPairs[i], _kvPairs[i + 1]);
-      result[entry.key] = entry.value;
-    }
-    return result;
-  }
-
-  void addEntries(Iterable<MapEntry<K, V>> newEntries) {
-    throw new UnsupportedError("Cannot modify an unmodifiable Map");
-  }
-
-  V update(K key, V update(V value), {V ifAbsent()?}) {
-    throw new UnsupportedError("Cannot modify an unmodifiable Map");
-  }
-
-  void updateAll(V update(K key, V value)) {
-    throw new UnsupportedError("Cannot modify an unmodifiable Map");
-  }
-
-  void removeWhere(bool predicate(K key, V value)) {
-    throw new UnsupportedError("Cannot modify an unmodifiable Map");
-  }
-
-  String toString() => MapBase.mapToString(this);
-}
-
-class _ImmutableMapKeyIterable<E> extends EfficientLengthIterable<E> {
-  final _ImmutableMap _map;
-  _ImmutableMapKeyIterable(this._map);
-
-  Iterator<E> get iterator {
-    return new _ImmutableMapKeyIterator<E>(_map);
-  }
-
-  int get length => _map.length;
-}
-
-class _ImmutableMapValueIterable<E> extends EfficientLengthIterable<E> {
-  final _ImmutableMap _map;
-  _ImmutableMapValueIterable(this._map);
-
-  Iterator<E> get iterator {
-    return new _ImmutableMapValueIterator<E>(_map);
-  }
-
-  int get length => _map.length;
-}
-
-class _ImmutableMapEntryIterable<K, V>
-    extends EfficientLengthIterable<MapEntry<K, V>> {
-  final _ImmutableMap _map;
-  _ImmutableMapEntryIterable(this._map);
-
-  Iterator<MapEntry<K, V>> get iterator {
-    return new _ImmutableMapEntryIterator<K, V>(_map);
-  }
-
-  int get length => _map.length;
-}
-
-class _ImmutableMapKeyIterator<E> implements Iterator<E> {
-  _ImmutableMap _map;
-  int _nextIndex = 0;
-  E? _current;
-
-  _ImmutableMapKeyIterator(this._map);
-
-  bool moveNext() {
-    int newIndex = _nextIndex;
-    if (newIndex < _map.length) {
-      _nextIndex = newIndex + 1;
-      _current = _map._kvPairs[newIndex * 2];
-      return true;
-    }
-    _current = null;
-    return false;
-  }
-
-  E get current => _current as E;
-}
-
-class _ImmutableMapValueIterator<E> implements Iterator<E> {
-  _ImmutableMap _map;
-  int _nextIndex = 0;
-  E? _current;
-
-  _ImmutableMapValueIterator(this._map);
-
-  bool moveNext() {
-    int newIndex = _nextIndex;
-    if (newIndex < _map.length) {
-      _nextIndex = newIndex + 1;
-      _current = _map._kvPairs[newIndex * 2 + 1];
-      return true;
-    }
-    _current = null;
-    return false;
-  }
-
-  E get current => _current as E;
-}
-
-class _ImmutableMapEntryIterator<K, V> implements Iterator<MapEntry<K, V>> {
-  _ImmutableMap _map;
-  int _nextIndex = 0;
-  MapEntry<K, V>? _current;
-
-  _ImmutableMapEntryIterator(this._map);
-
-  bool moveNext() {
-    int newIndex = _nextIndex;
-    if (newIndex < _map.length) {
-      _nextIndex = newIndex + 1;
-      _current = new MapEntry<K, V>(
-          _map._kvPairs[newIndex * 2], _map._kvPairs[newIndex * 2 + 1]);
-      return true;
-    }
-    _current = null;
-    return false;
-  }
-
-  MapEntry<K, V> get current => _current as MapEntry<K, V>;
-}
+// TODO(http://dartbug.com/45908): Remove empty file after updating Flutter's
+// copies of libraries.json and libraries.yaml and waiting for roll into G3.
diff --git a/sdk/lib/_internal/vm/lib/integers.dart b/sdk/lib/_internal/vm/lib/integers.dart
index ec5daff..703842b 100644
--- a/sdk/lib/_internal/vm/lib/integers.dart
+++ b/sdk/lib/_internal/vm/lib/integers.dart
@@ -78,27 +78,38 @@
   }
 
   @pragma("vm:non-nullable-result-type")
-  int _bitAndFromInteger(int other) native "Integer_bitAndFromInteger";
+  @pragma("vm:external-name", "Integer_bitAndFromInteger")
+  external int _bitAndFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _bitOrFromInteger(int other) native "Integer_bitOrFromInteger";
+  @pragma("vm:external-name", "Integer_bitOrFromInteger")
+  external int _bitOrFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _bitXorFromInteger(int other) native "Integer_bitXorFromInteger";
+  @pragma("vm:external-name", "Integer_bitXorFromInteger")
+  external int _bitXorFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _shrFromInteger(int other) native "Integer_shrFromInteger";
+  @pragma("vm:external-name", "Integer_shrFromInteger")
+  external int _shrFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _ushrFromInteger(int other) native "Integer_ushrFromInteger";
+  @pragma("vm:external-name", "Integer_ushrFromInteger")
+  external int _ushrFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _shlFromInteger(int other) native "Integer_shlFromInteger";
+  @pragma("vm:external-name", "Integer_shlFromInteger")
+  external int _shlFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _addFromInteger(int other) native "Integer_addFromInteger";
+  @pragma("vm:external-name", "Integer_addFromInteger")
+  external int _addFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _subFromInteger(int other) native "Integer_subFromInteger";
+  @pragma("vm:external-name", "Integer_subFromInteger")
+  external int _subFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _mulFromInteger(int other) native "Integer_mulFromInteger";
+  @pragma("vm:external-name", "Integer_mulFromInteger")
+  external int _mulFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _truncDivFromInteger(int other) native "Integer_truncDivFromInteger";
+  @pragma("vm:external-name", "Integer_truncDivFromInteger")
+  external int _truncDivFromInteger(int other);
   @pragma("vm:non-nullable-result-type")
-  int _moduloFromInteger(int other) native "Integer_moduloFromInteger";
+  @pragma("vm:external-name", "Integer_moduloFromInteger")
+  external int _moduloFromInteger(int other);
   int _remainderFromInteger(int other) {
     // Issue(https://dartbug.com/39639): The analyzer incorrectly reports the
     // result type as `num`.
@@ -150,8 +161,8 @@
   }
 
   @pragma("vm:exact-result-type", bool)
-  bool _greaterThanFromInteger(int other)
-      native "Integer_greaterThanFromInteger";
+  @pragma("vm:external-name", "Integer_greaterThanFromInteger")
+  external bool _greaterThanFromInteger(int other);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -165,7 +176,8 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool _equalToInteger(int other) native "Integer_equalToInteger";
+  @pragma("vm:external-name", "Integer_equalToInteger")
+  external bool _equalToInteger(int other);
   int abs() {
     return this < 0 ? -this : this;
   }
@@ -550,10 +562,12 @@
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:disable-unboxed-parameters")
-  int operator ~() native "Smi_bitNegate";
+  @pragma("vm:external-name", "Smi_bitNegate")
+  external int operator ~();
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get bitLength native "Smi_bitLength";
+  @pragma("vm:external-name", "Smi_bitLength")
+  external int get bitLength;
 
   /**
    * The digits of '00', '01', ... '99' as a single array.
@@ -757,7 +771,9 @@
   int get hashCode => this;
   int get _identityHashCode => this;
   @pragma("vm:non-nullable-result-type")
-  int operator ~() native "Mint_bitNegate";
+  @pragma("vm:external-name", "Mint_bitNegate")
+  external int operator ~();
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get bitLength native "Mint_bitLength";
+  @pragma("vm:external-name", "Mint_bitLength")
+  external int get bitLength;
 }
diff --git a/sdk/lib/_internal/vm/lib/integers_patch.dart b/sdk/lib/_internal/vm/lib/integers_patch.dart
index 1669d9c..4285b57 100644
--- a/sdk/lib/_internal/vm/lib/integers_patch.dart
+++ b/sdk/lib/_internal/vm/lib/integers_patch.dart
@@ -8,8 +8,9 @@
 @patch
 class int {
   @patch
-  const factory int.fromEnvironment(String name, {int defaultValue = 0})
-      native "Integer_fromEnvironment";
+  @pragma("vm:external-name", "Integer_fromEnvironment")
+  external const factory int.fromEnvironment(String name,
+      {int defaultValue = 0});
 
   int _bitAndFromSmi(_Smi other);
   int _bitAndFromInteger(int other);
diff --git a/sdk/lib/_internal/vm/lib/internal_patch.dart b/sdk/lib/_internal/vm/lib/internal_patch.dart
index e71c95f..569b91c 100644
--- a/sdk/lib/_internal/vm/lib/internal_patch.dart
+++ b/sdk/lib/_internal/vm/lib/internal_patch.dart
@@ -24,26 +24,26 @@
 bool typeAcceptsNull<T>() => (const <Null>[]) is List<int> || null is T;
 
 @patch
-List<T> makeListFixedLength<T>(List<T> growableList)
-    native "Internal_makeListFixedLength";
+@pragma("vm:external-name", "Internal_makeListFixedLength")
+external List<T> makeListFixedLength<T>(List<T> growableList);
 
 @patch
-List<T> makeFixedListUnmodifiable<T>(List<T> fixedLengthList)
-    native "Internal_makeFixedListUnmodifiable";
+@pragma("vm:external-name", "Internal_makeFixedListUnmodifiable")
+external List<T> makeFixedListUnmodifiable<T>(List<T> fixedLengthList);
 
 @patch
-Object? extractTypeArguments<T>(T instance, Function extract)
-    native "Internal_extractTypeArguments";
+@pragma("vm:external-name", "Internal_extractTypeArguments")
+external Object? extractTypeArguments<T>(T instance, Function extract);
 
 /// The returned string is a [_OneByteString] with uninitialized content.
 @pragma("vm:recognized", "asm-intrinsic")
-String allocateOneByteString(int length)
-    native "Internal_allocateOneByteString";
+@pragma("vm:external-name", "Internal_allocateOneByteString")
+external String allocateOneByteString(int length);
 
 /// The [string] must be a [_OneByteString]. The [index] must be valid.
 @pragma("vm:recognized", "asm-intrinsic")
-void writeIntoOneByteString(String string, int index, int codePoint)
-    native "Internal_writeIntoOneByteString";
+@pragma("vm:external-name", "Internal_writeIntoOneByteString")
+external void writeIntoOneByteString(String string, int index, int codePoint);
 
 /// It is assumed that [from] is a native [Uint8List] class and [to] is a
 /// [_OneByteString]. The [fromStart] and [toStart] indices together with the
@@ -59,13 +59,13 @@
 
 /// The returned string is a [_TwoByteString] with uninitialized content.
 @pragma("vm:recognized", "asm-intrinsic")
-String allocateTwoByteString(int length)
-    native "Internal_allocateTwoByteString";
+@pragma("vm:external-name", "Internal_allocateTwoByteString")
+external String allocateTwoByteString(int length);
 
 /// The [string] must be a [_TwoByteString]. The [index] must be valid.
 @pragma("vm:recognized", "asm-intrinsic")
-void writeIntoTwoByteString(String string, int index, int codePoint)
-    native "Internal_writeIntoTwoByteString";
+@pragma("vm:external-name", "Internal_writeIntoTwoByteString")
+external void writeIntoTwoByteString(String string, int index, int codePoint);
 
 class VMLibraryHooks {
   // Example: "dart:isolate _Timer._factory"
@@ -104,7 +104,8 @@
 
 @pragma("vm:recognized", "other")
 @pragma('vm:prefer-inline')
-bool get has63BitSmis native "Internal_has63BitSmis";
+@pragma("vm:external-name", "Internal_has63BitSmis")
+external bool get has63BitSmis;
 
 @pragma("vm:recognized", "other")
 @pragma("vm:entry-point", "call")
@@ -137,14 +138,15 @@
 // vectors are null or is a newly allocated and canonicalized vector of length
 // 'totalLen'.
 @pragma("vm:entry-point", "call")
-_prependTypeArguments(functionTypeArguments, parentTypeArguments, parentLen,
-    totalLen) native "Internal_prependTypeArguments";
+@pragma("vm:external-name", "Internal_prependTypeArguments")
+external _prependTypeArguments(
+    functionTypeArguments, parentTypeArguments, parentLen, totalLen);
 
 // Check that a set of type arguments satisfy the type parameter bounds on a
 // closure.
 @pragma("vm:entry-point", "call")
-_boundsCheckForPartialInstantiation(closure, typeArgs)
-    native "Internal_boundsCheckForPartialInstantiation";
+@pragma("vm:external-name", "Internal_boundsCheckForPartialInstantiation")
+external _boundsCheckForPartialInstantiation(closure, typeArgs);
 
 // Called by IRRegExpMacroAssembler::GrowStack.
 Int32List _growRegExpStack(Int32List stack) {
@@ -160,29 +162,30 @@
 // type of a value.
 //
 // Important: this is unsafe and must be used with care.
-T unsafeCast<T>(Object? v) native "Internal_unsafeCast";
+@pragma("vm:external-name", "Internal_unsafeCast")
+external T unsafeCast<T>(Object? v);
 
-// This function can be used to keep an object alive til that point.
+// This function can be used to keep an object alive till that point.
 @pragma("vm:recognized", "other")
 @pragma('vm:prefer-inline')
-void reachabilityFence(Object object) native "Internal_reachabilityFence";
+@pragma("vm:external-name", "Internal_reachabilityFence")
+external void reachabilityFence(Object object);
 
 // This function can be used to encode native side effects.
 //
 // The function call and it's argument are removed in flow graph construction.
 @pragma("vm:recognized", "other")
-void _nativeEffect(Object object) native "Internal_nativeEffect";
-
-void sendAndExit(SendPort sendPort, var message)
-    native "SendPortImpl_sendAndExitInternal_";
+@pragma("vm:external-name", "Internal_nativeEffect")
+external void _nativeEffect(Object object);
 
 // Collection of functions which should only be used for testing purposes.
 abstract class VMInternalsForTesting {
   // This function can be used by tests to enforce garbage collection.
-  static void collectAllGarbage() native "Internal_collectAllGarbage";
+  @pragma("vm:external-name", "Internal_collectAllGarbage")
+  external static void collectAllGarbage();
 
-  static void deoptimizeFunctionsOnStack()
-      native "Internal_deoptimizeFunctionsOnStack";
+  @pragma("vm:external-name", "Internal_deoptimizeFunctionsOnStack")
+  external static void deoptimizeFunctionsOnStack();
 }
 
 @patch
diff --git a/sdk/lib/_internal/vm/lib/invocation_mirror_patch.dart b/sdk/lib/_internal/vm/lib/invocation_mirror_patch.dart
index 075e001..ae387bf 100644
--- a/sdk/lib/_internal/vm/lib/invocation_mirror_patch.dart
+++ b/sdk/lib/_internal/vm/lib/invocation_mirror_patch.dart
@@ -105,8 +105,9 @@
   }
 
   // Unpack the given TypeArguments object into a new list of individual types.
-  static List<Type> _unpackTypeArguments(typeArguments, int numTypeArguments)
-      native "InvocationMirror_unpackTypeArguments";
+  @pragma("vm:external-name", "InvocationMirror_unpackTypeArguments")
+  external static List<Type> _unpackTypeArguments(
+      typeArguments, int numTypeArguments);
 
   List get positionalArguments {
     if (_positionalArguments == null) {
diff --git a/sdk/lib/_internal/vm/lib/isolate_patch.dart b/sdk/lib/_internal/vm/lib/isolate_patch.dart
index 519d188..37fb390 100644
--- a/sdk/lib/_internal/vm/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/vm/lib/isolate_patch.dart
@@ -38,9 +38,10 @@
 
 @pragma("vm:entry-point")
 class _CapabilityImpl implements Capability {
-  factory _CapabilityImpl() native "CapabilityImpl_factory";
+  @pragma("vm:external-name", "CapabilityImpl_factory")
+  external factory _CapabilityImpl();
 
-  bool operator ==(var other) {
+  bool operator ==(Object other) {
     return (other is _CapabilityImpl) && _equals(other);
   }
 
@@ -48,8 +49,10 @@
     return _get_hashcode();
   }
 
-  _equals(other) native "CapabilityImpl_equals";
-  _get_hashcode() native "CapabilityImpl_get_hashcode";
+  @pragma("vm:external-name", "CapabilityImpl_equals")
+  external bool _equals(Object other);
+  @pragma("vm:external-name", "CapabilityImpl_get_hashcode")
+  external int _get_hashcode();
 }
 
 @patch
@@ -137,8 +140,8 @@
     return port;
   }
 
-  factory _RawReceivePortImpl._(String debugName)
-      native "RawReceivePortImpl_factory";
+  @pragma("vm:external-name", "RawReceivePortImpl_factory")
+  external factory _RawReceivePortImpl._(String debugName);
 
   close() {
     // Close the port and remove it from the handler map.
@@ -159,8 +162,10 @@
   }
 
   /**** Internal implementation details ****/
-  int _get_id() native "RawReceivePortImpl_get_id";
-  SendPort _get_sendport() native "RawReceivePortImpl_get_sendport";
+  @pragma("vm:external-name", "RawReceivePortImpl_get_id")
+  external int _get_id();
+  @pragma("vm:external-name", "RawReceivePortImpl_get_sendport")
+  external SendPort _get_sendport();
 
   // Called from the VM to retrieve the handler for a message.
   @pragma("vm:entry-point", "call")
@@ -190,13 +195,15 @@
   }
 
   // Call into the VM to close the VM maintained mappings.
-  int _closeInternal() native "RawReceivePortImpl_closeInternal";
+  @pragma("vm:external-name", "RawReceivePortImpl_closeInternal")
+  external int _closeInternal();
 
   // Set this port as active or inactive in the VM. If inactive, this port
   // will not be considered live even if it hasn't been explicitly closed.
   // TODO(bkonyi): determine if we want to expose this as an option through
   // RawReceivePort.
-  _setActive(bool active) native "RawReceivePortImpl_setActive";
+  @pragma("vm:external-name", "RawReceivePortImpl_setActive")
+  external _setActive(bool active);
 
   void set handler(Function? value) {
     final int id = this._get_id();
@@ -232,11 +239,14 @@
   }
 
   /*--- private implementation ---*/
-  _get_id() native "SendPortImpl_get_id";
-  _get_hashcode() native "SendPortImpl_get_hashcode";
+  @pragma("vm:external-name", "SendPortImpl_get_id")
+  external _get_id();
+  @pragma("vm:external-name", "SendPortImpl_get_hashcode")
+  external _get_hashcode();
 
   // Forward the implementation of sending messages to the VM.
-  void _sendInternal(var message) native "SendPortImpl_sendInternal_";
+  @pragma("vm:external-name", "SendPortImpl_sendInternal_")
+  external void _sendInternal(var message);
 }
 
 typedef _NullaryFunction();
@@ -371,7 +381,8 @@
     }
   }
 
-  static void _spawnFunction(
+  @pragma("vm:external-name", "Isolate_spawnFunction")
+  external static void _spawnFunction(
       SendPort readyPort,
       String uri,
       Function topLevelFunction,
@@ -381,7 +392,7 @@
       SendPort? onExit,
       SendPort? onError,
       String? packageConfig,
-      String? debugName) native "Isolate_spawnFunction";
+      String? debugName);
 
   @patch
   static Future<Isolate> spawnUri(Uri uri, List<String> args, var message,
@@ -502,7 +513,8 @@
 
   // For 'spawnFunction' see internal_patch.dart.
 
-  static void _spawnUri(
+  @pragma("vm:external-name", "Isolate_spawnUri")
+  external static void _spawnUri(
       SendPort readyPort,
       String uri,
       List<String> args,
@@ -514,12 +526,13 @@
       bool? checked,
       List? environment,
       String? packageConfig,
-      String? debugName) native "Isolate_spawnUri";
+      String? debugName);
 
-  static void _sendOOB(port, msg) native "Isolate_sendOOB";
+  @pragma("vm:external-name", "Isolate_sendOOB")
+  external static void _sendOOB(port, msg);
 
-  static String _getDebugName(SendPort controlPort)
-      native "Isolate_getDebugName";
+  @pragma("vm:external-name", "Isolate_getDebugName")
+  external static String _getDebugName(SendPort controlPort);
 
   @patch
   void _pause(Capability resumeCapability) {
@@ -619,8 +632,8 @@
         terminateCapability: portAndCapabilities[2]);
   }
 
-  static List _getPortAndCapabilitiesOfCurrentIsolate()
-      native "Isolate_getPortAndCapabilitiesOfCurrentIsolate";
+  @pragma("vm:external-name", "Isolate_getPortAndCapabilitiesOfCurrentIsolate")
+  external static List _getPortAndCapabilitiesOfCurrentIsolate();
 
   static Uri? _getCurrentRootUri() {
     try {
@@ -630,7 +643,15 @@
     }
   }
 
-  static String _getCurrentRootUriStr() native "Isolate_getCurrentRootUriStr";
+  @pragma("vm:external-name", "Isolate_getCurrentRootUriStr")
+  external static String _getCurrentRootUriStr();
+
+  @pragma("vm:external-name", "Isolate_exit_")
+  external static Never _exit(SendPort? finalMessagePort, Object? message);
+
+  static Never exit([SendPort? finalMessagePort, Object? message]) {
+    _exit(finalMessagePort, message);
+  }
 }
 
 @patch
@@ -652,13 +673,13 @@
 
 @pragma("vm:entry-point")
 class _TransferableTypedDataImpl implements TransferableTypedData {
-  factory _TransferableTypedDataImpl(List<TypedData> list)
-      native "TransferableTypedData_factory";
+  @pragma("vm:external-name", "TransferableTypedData_factory")
+  external factory _TransferableTypedDataImpl(List<TypedData> list);
 
   ByteBuffer materialize() {
     return _materializeIntoUint8List().buffer;
   }
 
-  Uint8List _materializeIntoUint8List()
-      native "TransferableTypedData_materialize";
+  @pragma("vm:external-name", "TransferableTypedData_materialize")
+  external Uint8List _materializeIntoUint8List();
 }
diff --git a/sdk/lib/_internal/vm/lib/lib_prefix.dart b/sdk/lib/_internal/vm/lib/lib_prefix.dart
index 7604f62..26e0368 100644
--- a/sdk/lib/_internal/vm/lib/lib_prefix.dart
+++ b/sdk/lib/_internal/vm/lib/lib_prefix.dart
@@ -11,10 +11,14 @@
     throw "Unreachable";
   }
 
-  bool _isLoaded() native "LibraryPrefix_isLoaded";
-  void _setLoaded() native "LibraryPrefix_setLoaded";
-  Object _loadingUnit() native "LibraryPrefix_loadingUnit";
-  static void _issueLoad(Object unit) native "LibraryPrefix_issueLoad";
+  @pragma("vm:external-name", "LibraryPrefix_isLoaded")
+  external bool _isLoaded();
+  @pragma("vm:external-name", "LibraryPrefix_setLoaded")
+  external void _setLoaded();
+  @pragma("vm:external-name", "LibraryPrefix_loadingUnit")
+  external Object _loadingUnit();
+  @pragma("vm:external-name", "LibraryPrefix_issueLoad")
+  external static void _issueLoad(Object unit);
 
   static final _loads = new Map<Object, Completer<void>>();
 }
diff --git a/sdk/lib/_internal/vm/lib/math_patch.dart b/sdk/lib/_internal/vm/lib/math_patch.dart
index ce3815b..cc1c7c0 100644
--- a/sdk/lib/_internal/vm/lib/math_patch.dart
+++ b/sdk/lib/_internal/vm/lib/math_patch.dart
@@ -101,7 +101,8 @@
   return _pow(base.toDouble(), exponent.toDouble());
 }
 
-double _pow(double base, double exponent) native "Math_doublePow";
+@pragma("vm:external-name", "Math_doublePow")
+external double _pow(double base, double exponent);
 
 @pragma("vm:recognized", "other")
 int _intPow(int base, int exponent) {
@@ -163,34 +164,44 @@
 
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _atan2(double a, double b) native "Math_atan2";
+@pragma("vm:external-name", "Math_atan2")
+external double _atan2(double a, double b);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _sin(double x) native "Math_sin";
+@pragma("vm:external-name", "Math_sin")
+external double _sin(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _cos(double x) native "Math_cos";
+@pragma("vm:external-name", "Math_cos")
+external double _cos(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _tan(double x) native "Math_tan";
+@pragma("vm:external-name", "Math_tan")
+external double _tan(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _acos(double x) native "Math_acos";
+@pragma("vm:external-name", "Math_acos")
+external double _acos(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _asin(double x) native "Math_asin";
+@pragma("vm:external-name", "Math_asin")
+external double _asin(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _atan(double x) native "Math_atan";
+@pragma("vm:external-name", "Math_atan")
+external double _atan(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _sqrt(double x) native "Math_sqrt";
+@pragma("vm:external-name", "Math_sqrt")
+external double _sqrt(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _exp(double x) native "Math_exp";
+@pragma("vm:external-name", "Math_exp")
+external double _exp(double x);
 @pragma("vm:recognized", "other")
 @pragma("vm:prefer-inline")
-double _log(double x) native "Math_log";
+@pragma("vm:external-name", "Math_log")
+external double _log(double x);
 
 // TODO(iposva): Handle patch methods within a patch class correctly.
 @patch
@@ -235,7 +246,8 @@
   // fail with --throw_on_javascript_int_overflow.
   // TODO(regis): Implement in Dart and remove Random_nextState in math.cc.
   @pragma("vm:recognized", "asm-intrinsic")
-  void _nextState() native "Random_nextState";
+  @pragma("vm:external-name", "Random_nextState")
+  external void _nextState();
 
   int nextInt(int max) {
     const limit = 0x3FFFFFFF;
@@ -278,9 +290,11 @@
   // This is a native to prevent 64-bit operations in Dart, which
   // fail with --throw_on_javascript_int_overflow.
   // TODO(regis): Implement here in Dart and remove native in math.cc.
-  static Uint32List _setupSeed(int seed) native "Random_setupSeed";
+  @pragma("vm:external-name", "Random_setupSeed")
+  external static Uint32List _setupSeed(int seed);
   // Get a seed from the VM's random number provider.
-  static Uint32List _initialSeed() native "Random_initialSeed";
+  @pragma("vm:external-name", "Random_initialSeed")
+  external static Uint32List _initialSeed();
 
   static int _nextSeed() {
     // Trigger the PRNG once to change the internal state.
@@ -296,7 +310,8 @@
   }
 
   // Return count bytes of entropy as a positive integer; count <= 8.
-  static int _getBytes(int count) native "SecureRandom_getBytes";
+  @pragma("vm:external-name", "SecureRandom_getBytes")
+  external static int _getBytes(int count);
 
   int nextInt(int max) {
     RangeError.checkValueInInterval(
diff --git a/sdk/lib/_internal/vm/lib/mirror_reference.dart b/sdk/lib/_internal/vm/lib/mirror_reference.dart
index 0cb1e37..d7872a8 100644
--- a/sdk/lib/_internal/vm/lib/mirror_reference.dart
+++ b/sdk/lib/_internal/vm/lib/mirror_reference.dart
@@ -10,5 +10,6 @@
     throw "Unreachable";
   }
 
-  bool operator ==(Object other) native "MirrorReference_equals";
+  @pragma("vm:external-name", "MirrorReference_equals")
+  external bool operator ==(Object other);
 }
diff --git a/sdk/lib/_internal/vm/lib/mirrors_impl.dart b/sdk/lib/_internal/vm/lib/mirrors_impl.dart
index a938cf7..2188df5 100644
--- a/sdk/lib/_internal/vm/lib/mirrors_impl.dart
+++ b/sdk/lib/_internal/vm/lib/mirrors_impl.dart
@@ -65,9 +65,11 @@
   return buf.toString();
 }
 
-SourceLocation? _location(reflectee) native "DeclarationMirror_location";
+@pragma("vm:external-name", "DeclarationMirror_location")
+external SourceLocation? _location(reflectee);
 
-List<dynamic> _metadata(reflectee) native 'DeclarationMirror_metadata';
+@pragma("vm:external-name", "DeclarationMirror_metadata")
+external List<dynamic> _metadata(reflectee);
 
 List<InstanceMirror> _wrapMetadata(List reflectees) {
   var mirrors = <InstanceMirror>[];
@@ -77,7 +79,8 @@
   return new UnmodifiableListView<InstanceMirror>(mirrors);
 }
 
-bool _subtypeTest(Type a, Type b) native 'TypeMirror_subtypeTest';
+@pragma("vm:external-name", "TypeMirror_subtypeTest")
+external bool _subtypeTest(Type a, Type b);
 
 class _MirrorSystem extends MirrorSystem {
   final TypeMirror dynamicType = new _SpecialTypeMirror._('dynamic');
@@ -97,7 +100,8 @@
     return _libraries;
   }
 
-  static List<dynamic> _computeLibraries() native "MirrorSystem_libraries";
+  @pragma("vm:external-name", "MirrorSystem_libraries")
+  external static List<dynamic> _computeLibraries();
 
   IsolateMirror? _isolate;
   IsolateMirror get isolate {
@@ -106,7 +110,8 @@
     return _isolate = _computeIsolate();
   }
 
-  static IsolateMirror _computeIsolate() native "MirrorSystem_isolate";
+  @pragma("vm:external-name", "MirrorSystem_isolate")
+  external static IsolateMirror _computeIsolate();
 
   String toString() => "MirrorSystem for isolate '${isolate.debugName}'";
 }
@@ -145,7 +150,8 @@
     return result;
   }
 
-  static LibraryMirror? _loadUri(String uri) native "IsolateMirror_loadUri";
+  @pragma("vm:external-name", "IsolateMirror_loadUri")
+  external static LibraryMirror? _loadUri(String uri);
 }
 
 class _SyntheticAccessor implements MethodMirror {
@@ -333,15 +339,17 @@
     return reflect(this._invoke(_reflectee, _n(memberName), arguments, names));
   }
 
-  _invoke(reflectee, functionName, arguments, argumentNames)
-      native 'InstanceMirror_invoke';
+  @pragma("vm:external-name", "InstanceMirror_invoke")
+  external _invoke(reflectee, functionName, arguments, argumentNames);
 
-  _invokeGetter(reflectee, getterName) native 'InstanceMirror_invokeGetter';
+  @pragma("vm:external-name", "InstanceMirror_invokeGetter")
+  external _invokeGetter(reflectee, getterName);
 
-  _invokeSetter(reflectee, setterName, value)
-      native 'InstanceMirror_invokeSetter';
+  @pragma("vm:external-name", "InstanceMirror_invokeSetter")
+  external _invokeSetter(reflectee, setterName, value);
 
-  static _computeType(reflectee) native 'InstanceMirror_computeType';
+  @pragma("vm:external-name", "InstanceMirror_computeType")
+  external static _computeType(reflectee);
 }
 
 class _ClosureMirror extends _InstanceMirror implements ClosureMirror {
@@ -361,7 +369,8 @@
 
   String toString() => "ClosureMirror on '${Error.safeToString(_reflectee)}'";
 
-  static _computeFunction(reflectee) native 'ClosureMirror_function';
+  @pragma("vm:external-name", "ClosureMirror_function")
+  external static _computeFunction(reflectee);
 }
 
 abstract class _TypeMirror {
@@ -712,45 +721,51 @@
     return false;
   }
 
-  static String _libraryUri(reflectee) native "ClassMirror_libraryUri";
+  @pragma("vm:external-name", "ClassMirror_libraryUri")
+  external static String _libraryUri(reflectee);
 
-  static Type? _supertype(reflectedType) native "ClassMirror_supertype";
+  @pragma("vm:external-name", "ClassMirror_supertype")
+  external static Type? _supertype(reflectedType);
 
-  static Type? _supertypeInstantiated(reflectedType)
-      native "ClassMirror_supertype_instantiated";
+  @pragma("vm:external-name", "ClassMirror_supertype_instantiated")
+  external static Type? _supertypeInstantiated(reflectedType);
 
-  static List<dynamic> _nativeInterfaces(reflectedType)
-      native "ClassMirror_interfaces";
+  @pragma("vm:external-name", "ClassMirror_interfaces")
+  external static List<dynamic> _nativeInterfaces(reflectedType);
 
-  static List<dynamic> _nativeInterfacesInstantiated(reflectedType)
-      native "ClassMirror_interfaces_instantiated";
+  @pragma("vm:external-name", "ClassMirror_interfaces_instantiated")
+  external static List<dynamic> _nativeInterfacesInstantiated(reflectedType);
 
-  static Type? _nativeMixin(reflectedType) native "ClassMirror_mixin";
+  @pragma("vm:external-name", "ClassMirror_mixin")
+  external static Type? _nativeMixin(reflectedType);
 
-  static Type? _nativeMixinInstantiated(reflectedType, instantiator)
-      native "ClassMirror_mixin_instantiated";
+  @pragma("vm:external-name", "ClassMirror_mixin_instantiated")
+  external static Type? _nativeMixinInstantiated(reflectedType, instantiator);
 
-  static List<dynamic> _computeMembers(owner, reflectee, instantiator)
-      native "ClassMirror_members";
+  @pragma("vm:external-name", "ClassMirror_members")
+  external static List<dynamic> _computeMembers(owner, reflectee, instantiator);
 
-  List<dynamic> _computeConstructors(reflectee, instantiator)
-      native "ClassMirror_constructors";
+  @pragma("vm:external-name", "ClassMirror_constructors")
+  external List<dynamic> _computeConstructors(reflectee, instantiator);
 
-  _invoke(reflectee, memberName, arguments, argumentNames)
-      native 'ClassMirror_invoke';
+  @pragma("vm:external-name", "ClassMirror_invoke")
+  external _invoke(reflectee, memberName, arguments, argumentNames);
 
-  _invokeGetter(reflectee, getterName) native 'ClassMirror_invokeGetter';
+  @pragma("vm:external-name", "ClassMirror_invokeGetter")
+  external _invokeGetter(reflectee, getterName);
 
-  _invokeSetter(reflectee, setterName, value) native 'ClassMirror_invokeSetter';
+  @pragma("vm:external-name", "ClassMirror_invokeSetter")
+  external _invokeSetter(reflectee, setterName, value);
 
-  static _invokeConstructor(reflectee, type, constructorName, arguments,
-      argumentNames) native 'ClassMirror_invokeConstructor';
+  @pragma("vm:external-name", "ClassMirror_invokeConstructor")
+  external static _invokeConstructor(
+      reflectee, type, constructorName, arguments, argumentNames);
 
-  static List<dynamic> _ClassMirror_type_variables(reflectee)
-      native "ClassMirror_type_variables";
+  @pragma("vm:external-name", "ClassMirror_type_variables")
+  external static List<dynamic> _ClassMirror_type_variables(reflectee);
 
-  static List<dynamic> _computeTypeArguments(reflectee)
-      native "ClassMirror_type_arguments";
+  @pragma("vm:external-name", "ClassMirror_type_arguments")
+  external static List<dynamic> _computeTypeArguments(reflectee);
 }
 
 class _FunctionTypeMirror extends _ClassMirror implements FunctionTypeMirror {
@@ -802,14 +817,14 @@
 
   String toString() => "FunctionTypeMirror on '${_n(simpleName)}'";
 
-  MethodMirror _FunctionTypeMirror_call_method(signatureReflectee)
-      native "FunctionTypeMirror_call_method";
+  @pragma("vm:external-name", "FunctionTypeMirror_call_method")
+  external MethodMirror _FunctionTypeMirror_call_method(signatureReflectee);
 
-  static Type _FunctionTypeMirror_return_type(signatureReflectee)
-      native "FunctionTypeMirror_return_type";
+  @pragma("vm:external-name", "FunctionTypeMirror_return_type")
+  external static Type _FunctionTypeMirror_return_type(signatureReflectee);
 
-  List<dynamic> _FunctionTypeMirror_parameters(signatureReflectee)
-      native "FunctionTypeMirror_parameters";
+  @pragma("vm:external-name", "FunctionTypeMirror_parameters")
+  external List<dynamic> _FunctionTypeMirror_parameters(signatureReflectee);
 }
 
 abstract class _DeclarationMirror extends Mirror implements DeclarationMirror {
@@ -906,11 +921,11 @@
         _subtypeTest(otherReflectedType, _reflectedType);
   }
 
-  static DeclarationMirror _TypeVariableMirror_owner(reflectee)
-      native "TypeVariableMirror_owner";
+  @pragma("vm:external-name", "TypeVariableMirror_owner")
+  external static DeclarationMirror _TypeVariableMirror_owner(reflectee);
 
-  static Type _TypeVariableMirror_upper_bound(reflectee)
-      native "TypeVariableMirror_upper_bound";
+  @pragma("vm:external-name", "TypeVariableMirror_upper_bound")
+  external static Type _TypeVariableMirror_upper_bound(reflectee);
 }
 
 Symbol _asSetter(Symbol getter, LibraryMirror library) {
@@ -977,18 +992,20 @@
             _libraryDependencies(_reflectee).cast<LibraryDependencyMirror>());
   }
 
-  List<dynamic> _libraryDependencies(reflectee)
-      native 'LibraryMirror_libraryDependencies';
+  @pragma("vm:external-name", "LibraryMirror_libraryDependencies")
+  external List<dynamic> _libraryDependencies(reflectee);
 
-  _invoke(reflectee, memberName, arguments, argumentNames)
-      native 'LibraryMirror_invoke';
+  @pragma("vm:external-name", "LibraryMirror_invoke")
+  external _invoke(reflectee, memberName, arguments, argumentNames);
 
-  _invokeGetter(reflectee, getterName) native 'LibraryMirror_invokeGetter';
+  @pragma("vm:external-name", "LibraryMirror_invokeGetter")
+  external _invokeGetter(reflectee, getterName);
 
-  _invokeSetter(reflectee, setterName, value)
-      native 'LibraryMirror_invokeSetter';
+  @pragma("vm:external-name", "LibraryMirror_invokeSetter")
+  external _invokeSetter(reflectee, setterName, value);
 
-  List<dynamic> _computeMembers(reflectee) native "LibraryMirror_members";
+  @pragma("vm:external-name", "LibraryMirror_members")
+  external List<dynamic> _computeMembers(reflectee);
 }
 
 class _LibraryDependencyMirror extends Mirror
@@ -1037,8 +1054,8 @@
     });
   }
 
-  static LibraryMirror _tryUpgradePrefix(libraryPrefix)
-      native "LibraryMirror_fromPrefix";
+  @pragma("vm:external-name", "LibraryMirror_fromPrefix")
+  external static LibraryMirror _tryUpgradePrefix(libraryPrefix);
 
   SourceLocation? get location => null;
 }
@@ -1169,16 +1186,17 @@
 
   String toString() => "MethodMirror on '${MirrorSystem.getName(simpleName)}'";
 
-  static dynamic _MethodMirror_owner(reflectee, instantiator)
-      native "MethodMirror_owner";
+  @pragma("vm:external-name", "MethodMirror_owner")
+  external static dynamic _MethodMirror_owner(reflectee, instantiator);
 
-  static dynamic _MethodMirror_return_type(reflectee, instantiator)
-      native "MethodMirror_return_type";
+  @pragma("vm:external-name", "MethodMirror_return_type")
+  external static dynamic _MethodMirror_return_type(reflectee, instantiator);
 
-  List<dynamic> _MethodMirror_parameters(reflectee)
-      native "MethodMirror_parameters";
+  @pragma("vm:external-name", "MethodMirror_parameters")
+  external List<dynamic> _MethodMirror_parameters(reflectee);
 
-  static String? _MethodMirror_source(reflectee) native "MethodMirror_source";
+  @pragma("vm:external-name", "MethodMirror_source")
+  external static String? _MethodMirror_source(reflectee);
 }
 
 class _VariableMirror extends _DeclarationMirror implements VariableMirror {
@@ -1217,8 +1235,8 @@
   String toString() =>
       "VariableMirror on '${MirrorSystem.getName(simpleName)}'";
 
-  static _VariableMirror_type(reflectee, instantiator)
-      native "VariableMirror_type";
+  @pragma("vm:external-name", "VariableMirror_type")
+  external static _VariableMirror_type(reflectee, instantiator);
 }
 
 class _ParameterMirror extends _VariableMirror implements ParameterMirror {
@@ -1282,8 +1300,9 @@
 
   String toString() => "ParameterMirror on '${_n(simpleName)}'";
 
-  static Type _ParameterMirror_type(_reflectee, _position, instantiator)
-      native "ParameterMirror_type";
+  @pragma("vm:external-name", "ParameterMirror_type")
+  external static Type _ParameterMirror_type(
+      _reflectee, _position, instantiator);
 }
 
 class _SpecialTypeMirror extends Mirror
@@ -1347,12 +1366,12 @@
         : new _InstanceMirror._(reflectee);
   }
 
-  static _ClassMirror _makeLocalClassMirror(Type key)
-      native "Mirrors_makeLocalClassMirror";
-  static TypeMirror _makeLocalTypeMirror(Type key)
-      native "Mirrors_makeLocalTypeMirror";
-  static Type _instantiateGenericType(Type key, typeArguments)
-      native "Mirrors_instantiateGenericType";
+  @pragma("vm:external-name", "Mirrors_makeLocalClassMirror")
+  external static _ClassMirror _makeLocalClassMirror(Type key);
+  @pragma("vm:external-name", "Mirrors_makeLocalTypeMirror")
+  external static TypeMirror _makeLocalTypeMirror(Type key);
+  @pragma("vm:external-name", "Mirrors_instantiateGenericType")
+  external static Type _instantiateGenericType(Type key, typeArguments);
 
   static Expando<_ClassMirror> _declarationCache = new Expando("ClassMirror");
   static Expando<TypeMirror> _instantiationCache = new Expando("TypeMirror");
diff --git a/sdk/lib/_internal/vm/lib/mirrors_patch.dart b/sdk/lib/_internal/vm/lib/mirrors_patch.dart
index a06d546..703c0d5 100644
--- a/sdk/lib/_internal/vm/lib/mirrors_patch.dart
+++ b/sdk/lib/_internal/vm/lib/mirrors_patch.dart
@@ -88,6 +88,6 @@
     return new internal.Symbol.unvalidated(name);
   }
 
-  static _mangleName(String name, _MirrorReference lib)
-      native "Mirrors_mangleName";
+  @pragma("vm:external-name", "Mirrors_mangleName")
+  external static _mangleName(String name, _MirrorReference lib);
 }
diff --git a/sdk/lib/_internal/vm/lib/object_patch.dart b/sdk/lib/_internal/vm/lib/object_patch.dart
index 545d274..3a7b6bb 100644
--- a/sdk/lib/_internal/vm/lib/object_patch.dart
+++ b/sdk/lib/_internal/vm/lib/object_patch.dart
@@ -6,14 +6,16 @@
 
 @pragma("vm:recognized", "asm-intrinsic")
 @pragma("vm:exact-result-type", "dart:core#_Smi")
-int _getHash(obj) native "Object_getHash";
+@pragma("vm:external-name", "Object_getHash")
+external int _getHash(obj);
 
 /// Set hash code associated with the object if it is not set yet
 /// and return the current hash code. See [Object._objectHashCode]
 /// for why this function needs to check for already set hash code.
 @pragma("vm:recognized", "asm-intrinsic")
 @pragma("vm:exact-result-type", "dart:core#_Smi")
-int _setHashIfNotSetYet(obj, int hash) native "Object_setHashIfNotSetYet";
+@pragma("vm:external-name", "Object_setHashIfNotSetYet")
+external int _setHashIfNotSetYet(obj, int hash);
 
 @patch
 @pragma("vm:entry-point")
@@ -23,7 +25,8 @@
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
   @pragma("vm:prefer-inline")
-  bool operator ==(Object other) native "Object_equals";
+  @pragma("vm:external-name", "Object_equals")
+  external bool operator ==(Object other);
 
   // Helpers used to implement hashCode. If a hashCode is used, we remember it
   // in a weak table in the VM (32 bit) or in the header of the object (64
@@ -52,9 +55,11 @@
   int get _identityHashCode => _objectHashCode(this);
 
   @patch
-  String toString() native "Object_toString";
+  @pragma("vm:external-name", "Object_toString")
+  external String toString();
   // A statically dispatched version of Object.toString.
-  static String _toString(obj) native "Object_toString";
+  @pragma("vm:external-name", "Object_toString")
+  external static String _toString(obj);
 
   @patch
   @pragma("vm:entry-point", "call")
@@ -66,22 +71,26 @@
   @patch
   @pragma("vm:recognized", "asm-intrinsic")
   // Result type is either "dart:core#_Type" or "dart:core#_FunctionType".
-  Type get runtimeType native "Object_runtimeType";
+  @pragma("vm:external-name", "Object_runtimeType")
+  external Type get runtimeType;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:entry-point", "call")
   @pragma("vm:exact-result-type", bool)
-  static bool _haveSameRuntimeType(a, b) native "Object_haveSameRuntimeType";
+  @pragma("vm:external-name", "Object_haveSameRuntimeType")
+  external static bool _haveSameRuntimeType(a, b);
 
   // Call this function instead of inlining instanceof, thus collecting
   // type feedback and reducing code size of unoptimized code.
   @pragma("vm:entry-point", "call")
-  bool _instanceOf(instantiatorTypeArguments, functionTypeArguments, type)
-      native "Object_instanceOf";
+  @pragma("vm:external-name", "Object_instanceOf")
+  external bool _instanceOf(
+      instantiatorTypeArguments, functionTypeArguments, type);
 
   // Group of functions for implementing fast simple instance of.
   @pragma("vm:entry-point", "call")
-  bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
+  @pragma("vm:external-name", "Object_simpleInstanceOf")
+  external bool _simpleInstanceOf(type);
   @pragma("vm:entry-point", "call")
   bool _simpleInstanceOfTrue(type) => true;
   @pragma("vm:entry-point", "call")
diff --git a/sdk/lib/_internal/vm/lib/profiler.dart b/sdk/lib/_internal/vm/lib/profiler.dart
index 722d938..c283930 100644
--- a/sdk/lib/_internal/vm/lib/profiler.dart
+++ b/sdk/lib/_internal/vm/lib/profiler.dart
@@ -16,15 +16,20 @@
 
 @pragma("vm:entry-point")
 class _UserTag implements UserTag {
-  factory _UserTag(String label) native "UserTag_new";
-  String get label native "UserTag_label";
-  UserTag makeCurrent() native "UserTag_makeCurrent";
+  @pragma("vm:external-name", "UserTag_new")
+  external factory _UserTag(String label);
+  @pragma("vm:external-name", "UserTag_label")
+  external String get label;
+  @pragma("vm:external-name", "UserTag_makeCurrent")
+  external UserTag makeCurrent();
 }
 
 @patch
 UserTag getCurrentTag() => _getCurrentTag();
 @pragma("vm:recognized", "asm-intrinsic")
-UserTag _getCurrentTag() native "Profiler_getCurrentTag";
+@pragma("vm:external-name", "Profiler_getCurrentTag")
+external UserTag _getCurrentTag();
 
 @pragma("vm:recognized", "asm-intrinsic")
-UserTag _getDefaultTag() native "UserTag_defaultTag";
+@pragma("vm:external-name", "UserTag_defaultTag")
+external UserTag _getDefaultTag();
diff --git a/sdk/lib/_internal/vm/lib/regexp_patch.dart b/sdk/lib/_internal/vm/lib/regexp_patch.dart
index 73e38a1..a977b67 100644
--- a/sdk/lib/_internal/vm/lib/regexp_patch.dart
+++ b/sdk/lib/_internal/vm/lib/regexp_patch.dart
@@ -210,11 +210,12 @@
 
 @pragma("vm:entry-point")
 class _RegExp implements RegExp {
-  factory _RegExp(String pattern,
+  @pragma("vm:external-name", "RegExp_factory")
+  external factory _RegExp(String pattern,
       {bool multiLine: false,
       bool caseSensitive: true,
       bool unicode: false,
-      bool dotAll: false}) native "RegExp_factory";
+      bool dotAll: false});
 
   RegExpMatch? firstMatch(String input) {
     // TODO: Remove these null checks once all code is opted into strong nonnullable mode.
@@ -265,17 +266,23 @@
     return input._substringUnchecked(match[0], match[1]);
   }
 
-  String get pattern native "RegExp_getPattern";
+  @pragma("vm:external-name", "RegExp_getPattern")
+  external String get pattern;
 
-  bool get isMultiLine native "RegExp_getIsMultiLine";
+  @pragma("vm:external-name", "RegExp_getIsMultiLine")
+  external bool get isMultiLine;
 
-  bool get isCaseSensitive native "RegExp_getIsCaseSensitive";
+  @pragma("vm:external-name", "RegExp_getIsCaseSensitive")
+  external bool get isCaseSensitive;
 
-  bool get isUnicode native "RegExp_getIsUnicode";
+  @pragma("vm:external-name", "RegExp_getIsUnicode")
+  external bool get isUnicode;
 
-  bool get isDotAll native "RegExp_getIsDotAll";
+  @pragma("vm:external-name", "RegExp_getIsDotAll")
+  external bool get isDotAll;
 
-  int get _groupCount native "RegExp_getGroupCount";
+  @pragma("vm:external-name", "RegExp_getGroupCount")
+  external int get _groupCount;
 
   /// The names and indices of named capture group.
   ///
@@ -284,7 +291,8 @@
   /// [String] is the name of a capture group and the following
   /// [int] is that capture group's index.
   /// Returns `null` if there are no group names.
-  List? get _groupNameList native "RegExp_getGroupNameMap";
+  @pragma("vm:external-name", "RegExp_getGroupNameMap")
+  external List? get _groupNameList;
 
   Iterable<String> get _groupNames sync* {
     final nameList = _groupNameList;
@@ -351,12 +359,12 @@
   ];
 
   @pragma("vm:recognized", "asm-intrinsic")
-  List<int>? _ExecuteMatch(String str, int start_index)
-      native "RegExp_ExecuteMatch";
+  @pragma("vm:external-name", "RegExp_ExecuteMatch")
+  external List<int>? _ExecuteMatch(String str, int start_index);
 
   @pragma("vm:recognized", "asm-intrinsic")
-  List<int>? _ExecuteMatchSticky(String str, int start_index)
-      native "RegExp_ExecuteMatchSticky";
+  @pragma("vm:external-name", "RegExp_ExecuteMatchSticky")
+  external List<int>? _ExecuteMatchSticky(String str, int start_index);
 }
 
 class _AllMatchesIterable extends IterableBase<RegExpMatch> {
diff --git a/sdk/lib/_internal/vm/lib/stopwatch_patch.dart b/sdk/lib/_internal/vm/lib/stopwatch_patch.dart
index df29eca..e6c16c9 100644
--- a/sdk/lib/_internal/vm/lib/stopwatch_patch.dart
+++ b/sdk/lib/_internal/vm/lib/stopwatch_patch.dart
@@ -13,10 +13,12 @@
 
   // Returns the current clock tick.
   @patch
-  static int _now() native "Stopwatch_now";
+  @pragma("vm:external-name", "Stopwatch_now")
+  external static int _now();
 
   // Returns the frequency of clock ticks in Hz.
-  static int _computeFrequency() native "Stopwatch_frequency";
+  @pragma("vm:external-name", "Stopwatch_frequency")
+  external static int _computeFrequency();
 
   @patch
   int get elapsedMicroseconds {
diff --git a/sdk/lib/_internal/vm/lib/string_buffer_patch.dart b/sdk/lib/_internal/vm/lib/string_buffer_patch.dart
index 0a1b06d..8a30546 100644
--- a/sdk/lib/_internal/vm/lib/string_buffer_patch.dart
+++ b/sdk/lib/_internal/vm/lib/string_buffer_patch.dart
@@ -61,7 +61,7 @@
 
   @patch
   void write(Object? obj) {
-    String str = obj.toString();
+    String str = "$obj";
     if (str.isEmpty) return;
     _consumeBuffer();
     _addPart(str);
@@ -197,6 +197,6 @@
   /**
    * Create a [String] from the UFT-16 code units in buffer.
    */
-  static String _create(Uint16List buffer, int length, bool isLatin1)
-      native "StringBuffer_createStringFromUint16Array";
+  @pragma("vm:external-name", "StringBuffer_createStringFromUint16Array")
+  external static String _create(Uint16List buffer, int length, bool isLatin1);
 }
diff --git a/sdk/lib/_internal/vm/lib/string_patch.dart b/sdk/lib/_internal/vm/lib/string_patch.dart
index 91ac495..66e3dcd 100644
--- a/sdk/lib/_internal/vm/lib/string_patch.dart
+++ b/sdk/lib/_internal/vm/lib/string_patch.dart
@@ -46,8 +46,9 @@
   }
 
   @patch
-  const factory String.fromEnvironment(String name, {String defaultValue = ""})
-      native "String_fromEnvironment";
+  @pragma("vm:external-name", "String_fromEnvironment")
+  external const factory String.fromEnvironment(String name,
+      {String defaultValue = ""});
 
   bool get _isOneByte;
   String _substringUnchecked(int startIndex, int endIndex);
@@ -96,11 +97,13 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get hashCode native "String_getHashCode";
+  @pragma("vm:external-name", "String_getHashCode")
+  external int get hashCode;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get _identityHashCode native "String_getHashCode";
+  @pragma("vm:external-name", "String_getHashCode")
+  external int get _identityHashCode;
 
   bool get _isOneByte {
     // Alternatively return false and override it on one-byte string classes.
@@ -248,18 +251,21 @@
     return s;
   }
 
-  static String _createFromCodePoints(List<int> codePoints, int start, int end)
-      native "StringBase_createFromCodePoints";
+  @pragma("vm:external-name", "StringBase_createFromCodePoints")
+  external static String _createFromCodePoints(
+      List<int> codePoints, int start, int end);
 
   @pragma("vm:recognized", "asm-intrinsic")
-  String operator [](int index) native "String_charAt";
+  @pragma("vm:external-name", "String_charAt")
+  external String operator [](int index);
 
   int codeUnitAt(int index); // Implemented in the subclasses.
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "String_getLength";
+  @pragma("vm:external-name", "String_getLength")
+  external int get length;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -269,7 +275,8 @@
 
   bool get isNotEmpty => !isEmpty;
 
-  String operator +(String other) native "String_concat";
+  @pragma("vm:external-name", "String_concat")
+  external String operator +(String other);
 
   String toString() {
     return this;
@@ -412,8 +419,8 @@
     return _substringUncheckedNative(startIndex, endIndex);
   }
 
-  String _substringUncheckedNative(int startIndex, int endIndex)
-      native "StringBase_substringUnchecked";
+  @pragma("vm:external-name", "StringBase_substringUnchecked")
+  external String _substringUncheckedNative(int startIndex, int endIndex);
 
   // Checks for one-byte whitespaces only.
   static bool _isOneByteWhitespace(int codeUnit) {
@@ -716,10 +723,9 @@
    * If they are, then we have to check the base string slices to know
    * whether the result must be a one-byte string.
    */
-  static String
-      _joinReplaceAllResult(String base, List matches, int length,
-          bool replacementStringsAreOneByte)
-      native "StringBase_joinReplaceAllResult";
+  @pragma("vm:external-name", "StringBase_joinReplaceAllResult")
+  external static String _joinReplaceAllResult(
+      String base, List matches, int length, bool replacementStringsAreOneByte);
 
   String replaceAllMapped(Pattern pattern, String replace(Match match)) {
     if (pattern == null) throw new ArgumentError.notNull("pattern");
@@ -823,8 +829,9 @@
   static String _interpolateSingle(Object? o) {
     if (o is String) return o;
     final s = o.toString();
+    // TODO(40614): Remove once non-nullability is sound.
     if (s is! String) {
-      throw new ArgumentError(s);
+      throw _interpolationError(o, s);
     }
     return s;
   }
@@ -849,15 +856,17 @@
         totalLength += s.length;
         i++;
       } else if (s is! String) {
-        throw new ArgumentError(s);
+        // TODO(40614): Remove once non-nullability is sound.
+        throw _interpolationError(e, s);
       } else {
         // Handle remaining elements without checking for one-byte-ness.
         while (++i < numValues) {
           final e = values[i];
           final s = e.toString();
           values[i] = s;
+          // TODO(40614): Remove once non-nullability is sound.
           if (s is! String) {
-            throw new ArgumentError(s);
+            throw _interpolationError(e, s);
           }
         }
         return _concatRangeNative(values, 0, numValues);
@@ -867,6 +876,12 @@
     return _OneByteString._concatAll(values, totalLength);
   }
 
+  static ArgumentError _interpolationError(Object? o, Object? result) {
+    // Since Dart 2.0, [result] can only be null.
+    return new ArgumentError.value(
+        o, "object", "toString method returned 'null'");
+  }
+
   Iterable<Match> allMatches(String string, [int start = 0]) {
     if (start < 0 || start > string.length) {
       throw new RangeError.range(start, 0, string.length, "start");
@@ -929,9 +944,11 @@
 
   Runes get runes => new Runes(this);
 
-  String toUpperCase() native "String_toUpperCase";
+  @pragma("vm:external-name", "String_toUpperCase")
+  external String toUpperCase();
 
-  String toLowerCase() native "String_toLowerCase";
+  @pragma("vm:external-name", "String_toLowerCase")
+  external String toLowerCase();
 
   // Concatenate ['start', 'end'[ elements of 'strings'.
   static String _concatRange(List<String> strings, int start, int end) {
@@ -943,8 +960,8 @@
 
   // Call this method if all elements of [strings] are known to be strings
   // but not all are known to be OneByteString(s).
-  static String _concatRangeNative(List strings, int start, int end)
-      native "String_concatRange";
+  @pragma("vm:external-name", "String_concatRange")
+  external static String _concatRangeNative(List strings, int start, int end);
 }
 
 @pragma("vm:entry-point")
@@ -955,11 +972,13 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get hashCode native "String_getHashCode";
+  @pragma("vm:external-name", "String_getHashCode")
+  external int get hashCode;
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int codeUnitAt(int index) native "String_codeUnitAt";
+  @pragma("vm:external-name", "String_codeUnitAt")
+  external int codeUnitAt(int index);
 
   bool _isWhitespace(int codeUnit) {
     return _StringBase._isOneByteWhitespace(codeUnit);
@@ -973,8 +992,8 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", _OneByteString)
-  String _substringUncheckedNative(int startIndex, int endIndex)
-      native "OneByteString_substringUnchecked";
+  @pragma("vm:external-name", "OneByteString_substringUnchecked")
+  external String _substringUncheckedNative(int startIndex, int endIndex);
 
   List<String> _splitWithCharCode(int charCode) {
     final parts = <String>[];
@@ -1248,8 +1267,9 @@
     return unsafeCast<_OneByteString>(allocateOneByteString(length));
   }
 
-  static _OneByteString _allocateFromOneByteList(List<int> list, int start,
-      int end) native "OneByteString_allocateFromOneByteList";
+  @pragma("vm:external-name", "OneByteString_allocateFromOneByteList")
+  external static _OneByteString _allocateFromOneByteList(
+      List<int> list, int start, int end);
 
   // This is internal helper method. Code point value must be a valid
   // Latin1 value (0..0xFF), index must be valid.
@@ -1290,8 +1310,9 @@
     return unsafeCast<_TwoByteString>(allocateTwoByteString(length));
   }
 
-  static String _allocateFromTwoByteList(List<int> list, int start, int end)
-      native "TwoByteString_allocateFromTwoByteList";
+  @pragma("vm:external-name", "TwoByteString_allocateFromTwoByteList")
+  external static String _allocateFromTwoByteList(
+      List<int> list, int start, int end);
 
   // This is internal helper method. Code point value must be a valid
   // UTF-16 value (0..0xFFFF), index must be valid.
@@ -1306,7 +1327,8 @@
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int codeUnitAt(int index) native "String_codeUnitAt";
+  @pragma("vm:external-name", "String_codeUnitAt")
+  external int codeUnitAt(int index);
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
@@ -1327,7 +1349,8 @@
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int codeUnitAt(int index) native "String_codeUnitAt";
+  @pragma("vm:external-name", "String_codeUnitAt")
+  external int codeUnitAt(int index);
 
   bool operator ==(Object other) {
     return super == other;
@@ -1346,7 +1369,8 @@
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int codeUnitAt(int index) native "String_codeUnitAt";
+  @pragma("vm:external-name", "String_codeUnitAt")
+  external int codeUnitAt(int index);
 
   bool operator ==(Object other) {
     return super == other;
diff --git a/sdk/lib/_internal/vm/lib/timeline.dart b/sdk/lib/_internal/vm/lib/timeline.dart
index 5e8066b..e3e172c 100644
--- a/sdk/lib/_internal/vm/lib/timeline.dart
+++ b/sdk/lib/_internal/vm/lib/timeline.dart
@@ -5,22 +5,28 @@
 // part of "developer.dart";
 
 @patch
-bool _isDartStreamEnabled() native "Timeline_isDartStreamEnabled";
+@pragma("vm:external-name", "Timeline_isDartStreamEnabled")
+external bool _isDartStreamEnabled();
 
 @patch
-int _getTraceClock() native "Timeline_getTraceClock";
+@pragma("vm:external-name", "Timeline_getTraceClock")
+external int _getTraceClock();
 
 @patch
-int _getNextAsyncId() native "Timeline_getNextAsyncId";
+@pragma("vm:external-name", "Timeline_getNextAsyncId")
+external int _getNextAsyncId();
 
 @patch
-void _reportTaskEvent(int taskId, String phase, String category, String name,
-    String argumentsAsJson) native "Timeline_reportTaskEvent";
+@pragma("vm:external-name", "Timeline_reportTaskEvent")
+external void _reportTaskEvent(int taskId, String phase, String category,
+    String name, String argumentsAsJson);
 
 @patch
-void _reportFlowEvent(String category, String name, int type, int id,
-    String argumentsAsJson) native "Timeline_reportFlowEvent";
+@pragma("vm:external-name", "Timeline_reportFlowEvent")
+external void _reportFlowEvent(
+    String category, String name, int type, int id, String argumentsAsJson);
 
 @patch
-void _reportInstantEvent(String category, String name, String argumentsAsJson)
-    native "Timeline_reportInstantEvent";
+@pragma("vm:external-name", "Timeline_reportInstantEvent")
+external void _reportInstantEvent(
+    String category, String name, String argumentsAsJson);
diff --git a/sdk/lib/_internal/vm/lib/type_patch.dart b/sdk/lib/_internal/vm/lib/type_patch.dart
index c818922..6a0a21b 100644
--- a/sdk/lib/_internal/vm/lib/type_patch.dart
+++ b/sdk/lib/_internal/vm/lib/type_patch.dart
@@ -8,7 +8,8 @@
 
 // Equivalent of AbstractTypeLayout.
 abstract class _AbstractType implements Type {
-  String toString() native "AbstractType_toString";
+  @pragma("vm:external-name", "AbstractType_toString")
+  external String toString();
 }
 
 // Equivalent of TypeLayout.
@@ -20,11 +21,13 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get hashCode native "Type_getHashCode";
+  @pragma("vm:external-name", "Type_getHashCode")
+  external int get hashCode;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool operator ==(other) native "Type_equality";
+  @pragma("vm:external-name", "Type_equality")
+  external bool operator ==(other);
 }
 
 // Equivalent of FunctionTypeLayout.
@@ -36,11 +39,13 @@
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int get hashCode native "FunctionType_getHashCode";
+  @pragma("vm:external-name", "FunctionType_getHashCode")
+  external int get hashCode;
 
   @pragma("vm:recognized", "asm-intrinsic")
   @pragma("vm:exact-result-type", bool)
-  bool operator ==(other) native "FunctionType_equality";
+  @pragma("vm:external-name", "FunctionType_equality")
+  external bool operator ==(other);
 }
 
 // Equivalent of TypeRefLayout.
diff --git a/sdk/lib/_internal/vm/lib/typed_data_patch.dart b/sdk/lib/_internal/vm/lib/typed_data_patch.dart
index 45b1dc9..37587c7 100644
--- a/sdk/lib/_internal/vm/lib/typed_data_patch.dart
+++ b/sdk/lib/_internal/vm/lib/typed_data_patch.dart
@@ -61,7 +61,8 @@
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "TypedDataBase_length";
+  @pragma("vm:external-name", "TypedDataBase_length")
+  external int get length;
 
   int get elementSizeInBytes;
   int get offsetInBytes;
@@ -112,13 +113,9 @@
   // match the cids of 'this' and 'from'.
   // Uses toCid and fromCid to decide if clamping is necessary.
   // Element size of toCid and fromCid must match (test at caller).
-  bool _setRange(
-      int startInBytes,
-      int lengthInBytes,
-      _TypedListBase from,
-      int startFromInBytes,
-      int toCid,
-      int fromCid) native "TypedDataBase_setRange";
+  @pragma("vm:external-name", "TypedDataBase_setRange")
+  external bool _setRange(int startInBytes, int lengthInBytes,
+      _TypedListBase from, int startFromInBytes, int toCid, int fromCid);
 }
 
 mixin _IntListMixin implements List<int> {
@@ -2048,79 +2045,100 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int _getInt8(int offsetInBytes) native "TypedData_GetInt8";
+  @pragma("vm:external-name", "TypedData_GetInt8")
+  external int _getInt8(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setInt8(int offsetInBytes, int value) native "TypedData_SetInt8";
+  @pragma("vm:external-name", "TypedData_SetInt8")
+  external void _setInt8(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int _getUint8(int offsetInBytes) native "TypedData_GetUint8";
+  @pragma("vm:external-name", "TypedData_GetUint8")
+  external int _getUint8(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setUint8(int offsetInBytes, int value) native "TypedData_SetUint8";
+  @pragma("vm:external-name", "TypedData_SetUint8")
+  external void _setUint8(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int _getInt16(int offsetInBytes) native "TypedData_GetInt16";
+  @pragma("vm:external-name", "TypedData_GetInt16")
+  external int _getInt16(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setInt16(int offsetInBytes, int value) native "TypedData_SetInt16";
+  @pragma("vm:external-name", "TypedData_SetInt16")
+  external void _setInt16(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  int _getUint16(int offsetInBytes) native "TypedData_GetUint16";
+  @pragma("vm:external-name", "TypedData_GetUint16")
+  external int _getUint16(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setUint16(int offsetInBytes, int value) native "TypedData_SetUint16";
+  @pragma("vm:external-name", "TypedData_SetUint16")
+  external void _setUint16(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
-  int _getInt32(int offsetInBytes) native "TypedData_GetInt32";
+  @pragma("vm:external-name", "TypedData_GetInt32")
+  external int _getInt32(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setInt32(int offsetInBytes, int value) native "TypedData_SetInt32";
+  @pragma("vm:external-name", "TypedData_SetInt32")
+  external void _setInt32(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
-  int _getUint32(int offsetInBytes) native "TypedData_GetUint32";
+  @pragma("vm:external-name", "TypedData_GetUint32")
+  external int _getUint32(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setUint32(int offsetInBytes, int value) native "TypedData_SetUint32";
+  @pragma("vm:external-name", "TypedData_SetUint32")
+  external void _setUint32(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
-  int _getInt64(int offsetInBytes) native "TypedData_GetInt64";
+  @pragma("vm:external-name", "TypedData_GetInt64")
+  external int _getInt64(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setInt64(int offsetInBytes, int value) native "TypedData_SetInt64";
+  @pragma("vm:external-name", "TypedData_SetInt64")
+  external void _setInt64(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
-  int _getUint64(int offsetInBytes) native "TypedData_GetUint64";
+  @pragma("vm:external-name", "TypedData_GetUint64")
+  external int _getUint64(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setUint64(int offsetInBytes, int value) native "TypedData_SetUint64";
+  @pragma("vm:external-name", "TypedData_SetUint64")
+  external void _setUint64(int offsetInBytes, int value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double _getFloat32(int offsetInBytes) native "TypedData_GetFloat32";
+  @pragma("vm:external-name", "TypedData_GetFloat32")
+  external double _getFloat32(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setFloat32(int offsetInBytes, double value)
-      native "TypedData_SetFloat32";
+  @pragma("vm:external-name", "TypedData_SetFloat32")
+  external void _setFloat32(int offsetInBytes, double value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double _getFloat64(int offsetInBytes) native "TypedData_GetFloat64";
+  @pragma("vm:external-name", "TypedData_GetFloat64")
+  external double _getFloat64(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setFloat64(int offsetInBytes, double value)
-      native "TypedData_SetFloat64";
+  @pragma("vm:external-name", "TypedData_SetFloat64")
+  external void _setFloat64(int offsetInBytes, double value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 _getFloat32x4(int offsetInBytes) native "TypedData_GetFloat32x4";
+  @pragma("vm:external-name", "TypedData_GetFloat32x4")
+  external Float32x4 _getFloat32x4(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setFloat32x4(int offsetInBytes, Float32x4 value)
-      native "TypedData_SetFloat32x4";
+  @pragma("vm:external-name", "TypedData_SetFloat32x4")
+  external void _setFloat32x4(int offsetInBytes, Float32x4 value);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _getInt32x4(int offsetInBytes) native "TypedData_GetInt32x4";
+  @pragma("vm:external-name", "TypedData_GetInt32x4")
+  external Int32x4 _getInt32x4(int offsetInBytes);
   @pragma("vm:recognized", "other")
-  void _setInt32x4(int offsetInBytes, Int32x4 value)
-      native "TypedData_SetInt32x4";
+  @pragma("vm:external-name", "TypedData_SetInt32x4")
+  external void _setInt32x4(int offsetInBytes, Int32x4 value);
 
-  Float64x2 _getFloat64x2(int offsetInBytes) native "TypedData_GetFloat64x2";
-  void _setFloat64x2(int offsetInBytes, Float64x2 value)
-      native "TypedData_SetFloat64x2";
+  @pragma("vm:external-name", "TypedData_GetFloat64x2")
+  external Float64x2 _getFloat64x2(int offsetInBytes);
+  @pragma("vm:external-name", "TypedData_SetFloat64x2")
+  external void _setFloat64x2(int offsetInBytes, Float64x2 value);
 
   /**
    * Stores the [CodeUnits] as UTF-16 units into this TypedData at
@@ -2146,7 +2164,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int8List)
   @pragma("vm:prefer-inline")
-  factory Int8List(int length) native "TypedData_Int8Array_new";
+  @pragma("vm:external-name", "TypedData_Int8Array_new")
+  external factory Int8List(int length);
 
   @patch
   factory Int8List.fromList(List<int> elements) {
@@ -2198,7 +2217,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint8List)
   @pragma("vm:prefer-inline")
-  factory Uint8List(int length) native "TypedData_Uint8Array_new";
+  @pragma("vm:external-name", "TypedData_Uint8Array_new")
+  external factory Uint8List(int length);
 
   @patch
   factory Uint8List.fromList(List<int> elements) {
@@ -2250,7 +2270,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint8ClampedList)
   @pragma("vm:prefer-inline")
-  factory Uint8ClampedList(int length) native "TypedData_Uint8ClampedArray_new";
+  @pragma("vm:external-name", "TypedData_Uint8ClampedArray_new")
+  external factory Uint8ClampedList(int length);
 
   @patch
   factory Uint8ClampedList.fromList(List<int> elements) {
@@ -2302,7 +2323,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int16List)
   @pragma("vm:prefer-inline")
-  factory Int16List(int length) native "TypedData_Int16Array_new";
+  @pragma("vm:external-name", "TypedData_Int16Array_new")
+  external factory Int16List(int length);
 
   @patch
   factory Int16List.fromList(List<int> elements) {
@@ -2374,7 +2396,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint16List)
   @pragma("vm:prefer-inline")
-  factory Uint16List(int length) native "TypedData_Uint16Array_new";
+  @pragma("vm:external-name", "TypedData_Uint16Array_new")
+  external factory Uint16List(int length);
 
   @patch
   factory Uint16List.fromList(List<int> elements) {
@@ -2446,7 +2469,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32List)
   @pragma("vm:prefer-inline")
-  factory Int32List(int length) native "TypedData_Int32Array_new";
+  @pragma("vm:external-name", "TypedData_Int32Array_new")
+  external factory Int32List(int length);
 
   @patch
   factory Int32List.fromList(List<int> elements) {
@@ -2505,7 +2529,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint32List)
   @pragma("vm:prefer-inline")
-  factory Uint32List(int length) native "TypedData_Uint32Array_new";
+  @pragma("vm:external-name", "TypedData_Uint32Array_new")
+  external factory Uint32List(int length);
 
   @patch
   factory Uint32List.fromList(List<int> elements) {
@@ -2564,7 +2589,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int64List)
   @pragma("vm:prefer-inline")
-  factory Int64List(int length) native "TypedData_Int64Array_new";
+  @pragma("vm:external-name", "TypedData_Int64Array_new")
+  external factory Int64List(int length);
 
   @patch
   factory Int64List.fromList(List<int> elements) {
@@ -2623,7 +2649,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint64List)
   @pragma("vm:prefer-inline")
-  factory Uint64List(int length) native "TypedData_Uint64Array_new";
+  @pragma("vm:external-name", "TypedData_Uint64Array_new")
+  external factory Uint64List(int length);
 
   @patch
   factory Uint64List.fromList(List<int> elements) {
@@ -2682,7 +2709,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32List)
   @pragma("vm:prefer-inline")
-  factory Float32List(int length) native "TypedData_Float32Array_new";
+  @pragma("vm:external-name", "TypedData_Float32Array_new")
+  external factory Float32List(int length);
 
   @patch
   factory Float32List.fromList(List<double> elements) {
@@ -2742,7 +2770,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64List)
   @pragma("vm:prefer-inline")
-  factory Float64List(int length) native "TypedData_Float64Array_new";
+  @pragma("vm:external-name", "TypedData_Float64Array_new")
+  external factory Float64List(int length);
 
   @patch
   factory Float64List.fromList(List<double> elements) {
@@ -2802,7 +2831,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4List)
   @pragma("vm:prefer-inline")
-  factory Float32x4List(int length) native "TypedData_Float32x4Array_new";
+  @pragma("vm:external-name", "TypedData_Float32x4Array_new")
+  external factory Float32x4List(int length);
 
   @patch
   factory Float32x4List.fromList(List<Float32x4> elements) {
@@ -2861,7 +2891,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4List)
   @pragma("vm:prefer-inline")
-  factory Int32x4List(int length) native "TypedData_Int32x4Array_new";
+  @pragma("vm:external-name", "TypedData_Int32x4Array_new")
+  external factory Int32x4List(int length);
 
   @patch
   factory Int32x4List.fromList(List<Int32x4> elements) {
@@ -2920,7 +2951,8 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2List)
   @pragma("vm:prefer-inline")
-  factory Float64x2List(int length) native "TypedData_Float64x2Array_new";
+  @pragma("vm:external-name", "TypedData_Float64x2Array_new")
+  external factory Float64x2List(int length);
 
   @patch
   factory Float64x2List.fromList(List<Float64x2> elements) {
@@ -3557,8 +3589,9 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  static _Float32x4 _Float32x4FromDoubles(
-      double x, double y, double z, double w) native "Float32x4_fromDoubles";
+  @pragma("vm:external-name", "Float32x4_fromDoubles")
+  external static _Float32x4 _Float32x4FromDoubles(
+      double x, double y, double z, double w);
 
   @patch
   @pragma("vm:prefer-inline")
@@ -3569,90 +3602,113 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  static _Float32x4 _Float32x4Splat(double v) native "Float32x4_splat";
+  @pragma("vm:external-name", "Float32x4_splat")
+  external static _Float32x4 _Float32x4Splat(double v);
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  factory Float32x4.zero() native "Float32x4_zero";
+  @pragma("vm:external-name", "Float32x4_zero")
+  external factory Float32x4.zero();
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  factory Float32x4.fromInt32x4Bits(Int32x4 x)
-      native "Float32x4_fromInt32x4Bits";
+  @pragma("vm:external-name", "Float32x4_fromInt32x4Bits")
+  external factory Float32x4.fromInt32x4Bits(Int32x4 x);
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  factory Float32x4.fromFloat64x2(Float64x2 v) native "Float32x4_fromFloat64x2";
+  @pragma("vm:external-name", "Float32x4_fromFloat64x2")
+  external factory Float32x4.fromFloat64x2(Float64x2 v);
 }
 
 @pragma("vm:entry-point")
 class _Float32x4 implements Float32x4 {
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 operator +(Float32x4 other) native "Float32x4_add";
+  @pragma("vm:external-name", "Float32x4_add")
+  external Float32x4 operator +(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 operator -() native "Float32x4_negate";
+  @pragma("vm:external-name", "Float32x4_negate")
+  external Float32x4 operator -();
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 operator -(Float32x4 other) native "Float32x4_sub";
+  @pragma("vm:external-name", "Float32x4_sub")
+  external Float32x4 operator -(Float32x4 other);
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 operator *(Float32x4 other) native "Float32x4_mul";
+  @pragma("vm:external-name", "Float32x4_mul")
+  external Float32x4 operator *(Float32x4 other);
   @pragma("vm:recognized", "graph-intrinsic")
-  Float32x4 operator /(Float32x4 other) native "Float32x4_div";
+  @pragma("vm:external-name", "Float32x4_div")
+  external Float32x4 operator /(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 lessThan(Float32x4 other) native "Float32x4_cmplt";
+  @pragma("vm:external-name", "Float32x4_cmplt")
+  external Int32x4 lessThan(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 lessThanOrEqual(Float32x4 other) native "Float32x4_cmplte";
+  @pragma("vm:external-name", "Float32x4_cmplte")
+  external Int32x4 lessThanOrEqual(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 greaterThan(Float32x4 other) native "Float32x4_cmpgt";
+  @pragma("vm:external-name", "Float32x4_cmpgt")
+  external Int32x4 greaterThan(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 greaterThanOrEqual(Float32x4 other) native "Float32x4_cmpgte";
+  @pragma("vm:external-name", "Float32x4_cmpgte")
+  external Int32x4 greaterThanOrEqual(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 equal(Float32x4 other) native "Float32x4_cmpequal";
+  @pragma("vm:external-name", "Float32x4_cmpequal")
+  external Int32x4 equal(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 notEqual(Float32x4 other) native "Float32x4_cmpnequal";
+  @pragma("vm:external-name", "Float32x4_cmpnequal")
+  external Int32x4 notEqual(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 scale(double s) native "Float32x4_scale";
+  @pragma("vm:external-name", "Float32x4_scale")
+  external Float32x4 scale(double s);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 abs() native "Float32x4_abs";
+  @pragma("vm:external-name", "Float32x4_abs")
+  external Float32x4 abs();
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit)
-      native "Float32x4_clamp";
+  @pragma("vm:external-name", "Float32x4_clamp")
+  external Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit);
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get x native "Float32x4_getX";
+  @pragma("vm:external-name", "Float32x4_getX")
+  external double get x;
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get y native "Float32x4_getY";
+  @pragma("vm:external-name", "Float32x4_getY")
+  external double get y;
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get z native "Float32x4_getZ";
+  @pragma("vm:external-name", "Float32x4_getZ")
+  external double get z;
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get w native "Float32x4_getW";
+  @pragma("vm:external-name", "Float32x4_getW")
+  external double get w;
   @pragma("vm:recognized", "other")
-  int get signMask native "Float32x4_getSignMask";
+  @pragma("vm:external-name", "Float32x4_getSignMask")
+  external int get signMask;
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 shuffle(int mask) native "Float32x4_shuffle";
+  @pragma("vm:external-name", "Float32x4_shuffle")
+  external Float32x4 shuffle(int mask);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 shuffleMix(Float32x4 zw, int mask) native "Float32x4_shuffleMix";
+  @pragma("vm:external-name", "Float32x4_shuffleMix")
+  external Float32x4 shuffleMix(Float32x4 zw, int mask);
 
   @pragma("vm:prefer-inline")
   Float32x4 withX(double x) {
@@ -3662,7 +3718,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 _withX(double x) native "Float32x4_setX";
+  @pragma("vm:external-name", "Float32x4_setX")
+  external Float32x4 _withX(double x);
 
   @pragma("vm:prefer-inline")
   Float32x4 withY(double y) {
@@ -3672,7 +3729,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 _withY(double y) native "Float32x4_setY";
+  @pragma("vm:external-name", "Float32x4_setY")
+  external Float32x4 _withY(double y);
 
   @pragma("vm:prefer-inline")
   Float32x4 withZ(double z) {
@@ -3682,7 +3740,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 _withZ(double z) native "Float32x4_setZ";
+  @pragma("vm:external-name", "Float32x4_setZ")
+  external Float32x4 _withZ(double z);
 
   @pragma("vm:prefer-inline")
   Float32x4 withW(double w) {
@@ -3692,23 +3751,29 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 _withW(double w) native "Float32x4_setW";
+  @pragma("vm:external-name", "Float32x4_setW")
+  external Float32x4 _withW(double w);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 min(Float32x4 other) native "Float32x4_min";
+  @pragma("vm:external-name", "Float32x4_min")
+  external Float32x4 min(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 max(Float32x4 other) native "Float32x4_max";
+  @pragma("vm:external-name", "Float32x4_max")
+  external Float32x4 max(Float32x4 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 sqrt() native "Float32x4_sqrt";
+  @pragma("vm:external-name", "Float32x4_sqrt")
+  external Float32x4 sqrt();
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 reciprocal() native "Float32x4_reciprocal";
+  @pragma("vm:external-name", "Float32x4_reciprocal")
+  external Float32x4 reciprocal();
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 reciprocalSqrt() native "Float32x4_reciprocalSqrt";
+  @pragma("vm:external-name", "Float32x4_reciprocalSqrt")
+  external Float32x4 reciprocalSqrt();
 }
 
 @patch
@@ -3725,8 +3790,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  static _Int32x4 _Int32x4FromInts(int x, int y, int z, int w)
-      native "Int32x4_fromInts";
+  @pragma("vm:external-name", "Int32x4_fromInts")
+  external static _Int32x4 _Int32x4FromInts(int x, int y, int z, int w);
 
   @patch
   @pragma("vm:prefer-inline")
@@ -3740,35 +3805,47 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  static _Int32x4 _Int32x4FromBools(bool x, bool y, bool z, bool w)
-      native "Int32x4_fromBools";
+  @pragma("vm:external-name", "Int32x4_fromBools")
+  external static _Int32x4 _Int32x4FromBools(bool x, bool y, bool z, bool w);
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  factory Int32x4.fromFloat32x4Bits(Float32x4 x)
-      native "Int32x4_fromFloat32x4Bits";
+  @pragma("vm:external-name", "Int32x4_fromFloat32x4Bits")
+  external factory Int32x4.fromFloat32x4Bits(Float32x4 x);
 }
 
 @pragma("vm:entry-point")
 class _Int32x4 implements Int32x4 {
-  Int32x4 operator |(Int32x4 other) native "Int32x4_or";
-  Int32x4 operator &(Int32x4 other) native "Int32x4_and";
-  Int32x4 operator ^(Int32x4 other) native "Int32x4_xor";
-  Int32x4 operator +(Int32x4 other) native "Int32x4_add";
-  Int32x4 operator -(Int32x4 other) native "Int32x4_sub";
-  int get x native "Int32x4_getX";
-  int get y native "Int32x4_getY";
-  int get z native "Int32x4_getZ";
-  int get w native "Int32x4_getW";
+  @pragma("vm:external-name", "Int32x4_or")
+  external Int32x4 operator |(Int32x4 other);
+  @pragma("vm:external-name", "Int32x4_and")
+  external Int32x4 operator &(Int32x4 other);
+  @pragma("vm:external-name", "Int32x4_xor")
+  external Int32x4 operator ^(Int32x4 other);
+  @pragma("vm:external-name", "Int32x4_add")
+  external Int32x4 operator +(Int32x4 other);
+  @pragma("vm:external-name", "Int32x4_sub")
+  external Int32x4 operator -(Int32x4 other);
+  @pragma("vm:external-name", "Int32x4_getX")
+  external int get x;
+  @pragma("vm:external-name", "Int32x4_getY")
+  external int get y;
+  @pragma("vm:external-name", "Int32x4_getZ")
+  external int get z;
+  @pragma("vm:external-name", "Int32x4_getW")
+  external int get w;
   @pragma("vm:recognized", "other")
-  int get signMask native "Int32x4_getSignMask";
+  @pragma("vm:external-name", "Int32x4_getSignMask")
+  external int get signMask;
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 shuffle(int mask) native "Int32x4_shuffle";
+  @pragma("vm:external-name", "Int32x4_shuffle")
+  external Int32x4 shuffle(int mask);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 shuffleMix(Int32x4 zw, int mask) native "Int32x4_shuffleMix";
+  @pragma("vm:external-name", "Int32x4_shuffleMix")
+  external Int32x4 shuffleMix(Int32x4 zw, int mask);
 
   @pragma("vm:prefer-inline")
   Int32x4 withX(int x) {
@@ -3777,7 +3854,8 @@
   }
 
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withX(int x) native "Int32x4_setX";
+  @pragma("vm:external-name", "Int32x4_setX")
+  external Int32x4 _withX(int x);
 
   @pragma("vm:prefer-inline")
   Int32x4 withY(int y) {
@@ -3786,7 +3864,8 @@
   }
 
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withY(int y) native "Int32x4_setY";
+  @pragma("vm:external-name", "Int32x4_setY")
+  external Int32x4 _withY(int y);
 
   @pragma("vm:prefer-inline")
   Int32x4 withZ(int z) {
@@ -3795,7 +3874,8 @@
   }
 
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withZ(int z) native "Int32x4_setZ";
+  @pragma("vm:external-name", "Int32x4_setZ")
+  external Int32x4 _withZ(int z);
 
   @pragma("vm:prefer-inline")
   Int32x4 withW(int w) {
@@ -3804,20 +3884,25 @@
   }
 
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withW(int w) native "Int32x4_setW";
+  @pragma("vm:external-name", "Int32x4_setW")
+  external Int32x4 _withW(int w);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", bool)
-  bool get flagX native "Int32x4_getFlagX";
+  @pragma("vm:external-name", "Int32x4_getFlagX")
+  external bool get flagX;
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", bool)
-  bool get flagY native "Int32x4_getFlagY";
+  @pragma("vm:external-name", "Int32x4_getFlagY")
+  external bool get flagY;
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", bool)
-  bool get flagZ native "Int32x4_getFlagZ";
+  @pragma("vm:external-name", "Int32x4_getFlagZ")
+  external bool get flagZ;
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", bool)
-  bool get flagW native "Int32x4_getFlagW";
+  @pragma("vm:external-name", "Int32x4_getFlagW")
+  external bool get flagW;
 
   @pragma("vm:prefer-inline", _Int32x4)
   Int32x4 withFlagX(bool x) {
@@ -3827,7 +3912,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withFlagX(bool x) native "Int32x4_setFlagX";
+  @pragma("vm:external-name", "Int32x4_setFlagX")
+  external Int32x4 _withFlagX(bool x);
 
   @pragma("vm:prefer-inline", _Int32x4)
   Int32x4 withFlagY(bool y) {
@@ -3837,7 +3923,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withFlagY(bool y) native "Int32x4_setFlagY";
+  @pragma("vm:external-name", "Int32x4_setFlagY")
+  external Int32x4 _withFlagY(bool y);
 
   @pragma("vm:prefer-inline", _Int32x4)
   Int32x4 withFlagZ(bool z) {
@@ -3847,7 +3934,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withFlagZ(bool z) native "Int32x4_setFlagZ";
+  @pragma("vm:external-name", "Int32x4_setFlagZ")
+  external Int32x4 _withFlagZ(bool z);
 
   @pragma("vm:prefer-inline", _Int32x4)
   Int32x4 withFlagW(bool w) {
@@ -3857,12 +3945,13 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4)
-  Int32x4 _withFlagW(bool w) native "Int32x4_setFlagW";
+  @pragma("vm:external-name", "Int32x4_setFlagW")
+  external Int32x4 _withFlagW(bool w);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4)
-  Float32x4 select(Float32x4 trueValue, Float32x4 falseValue)
-      native "Int32x4_select";
+  @pragma("vm:external-name", "Int32x4_select")
+  external Float32x4 select(Float32x4 trueValue, Float32x4 falseValue);
 }
 
 @patch
@@ -3877,8 +3966,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  static _Float64x2 _Float64x2FromDoubles(double x, double y)
-      native "Float64x2_fromDoubles";
+  @pragma("vm:external-name", "Float64x2_fromDoubles")
+  external static _Float64x2 _Float64x2FromDoubles(double x, double y);
 
   @patch
   @pragma("vm:prefer-inline")
@@ -3889,48 +3978,61 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  static _Float64x2 _Float64x2Splat(double v) native "Float64x2_splat";
+  @pragma("vm:external-name", "Float64x2_splat")
+  external static _Float64x2 _Float64x2Splat(double v);
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  factory Float64x2.zero() native "Float64x2_zero";
+  @pragma("vm:external-name", "Float64x2_zero")
+  external factory Float64x2.zero();
 
   @patch
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  factory Float64x2.fromFloat32x4(Float32x4 v) native "Float64x2_fromFloat32x4";
+  @pragma("vm:external-name", "Float64x2_fromFloat32x4")
+  external factory Float64x2.fromFloat32x4(Float32x4 v);
 }
 
 @pragma("vm:entry-point")
 class _Float64x2 implements Float64x2 {
   @pragma("vm:recognized", "graph-intrinsic")
-  Float64x2 operator +(Float64x2 other) native "Float64x2_add";
+  @pragma("vm:external-name", "Float64x2_add")
+  external Float64x2 operator +(Float64x2 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 operator -() native "Float64x2_negate";
+  @pragma("vm:external-name", "Float64x2_negate")
+  external Float64x2 operator -();
   @pragma("vm:recognized", "graph-intrinsic")
-  Float64x2 operator -(Float64x2 other) native "Float64x2_sub";
+  @pragma("vm:external-name", "Float64x2_sub")
+  external Float64x2 operator -(Float64x2 other);
   @pragma("vm:recognized", "graph-intrinsic")
-  Float64x2 operator *(Float64x2 other) native "Float64x2_mul";
+  @pragma("vm:external-name", "Float64x2_mul")
+  external Float64x2 operator *(Float64x2 other);
   @pragma("vm:recognized", "graph-intrinsic")
-  Float64x2 operator /(Float64x2 other) native "Float64x2_div";
+  @pragma("vm:external-name", "Float64x2_div")
+  external Float64x2 operator /(Float64x2 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 scale(double s) native "Float64x2_scale";
+  @pragma("vm:external-name", "Float64x2_scale")
+  external Float64x2 scale(double s);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 abs() native "Float64x2_abs";
-  Float64x2 clamp(Float64x2 lowerLimit, Float64x2 upperLimit)
-      native "Float64x2_clamp";
+  @pragma("vm:external-name", "Float64x2_abs")
+  external Float64x2 abs();
+  @pragma("vm:external-name", "Float64x2_clamp")
+  external Float64x2 clamp(Float64x2 lowerLimit, Float64x2 upperLimit);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get x native "Float64x2_getX";
+  @pragma("vm:external-name", "Float64x2_getX")
+  external double get x;
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Double")
-  double get y native "Float64x2_getY";
+  @pragma("vm:external-name", "Float64x2_getY")
+  external double get y;
   @pragma("vm:recognized", "other")
-  int get signMask native "Float64x2_getSignMask";
+  @pragma("vm:external-name", "Float64x2_getSignMask")
+  external int get signMask;
 
   @pragma("vm:prefer-inline")
   Float64x2 withX(double x) {
@@ -3940,7 +4042,8 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 _withX(double x) native "Float64x2_setX";
+  @pragma("vm:external-name", "Float64x2_setX")
+  external Float64x2 _withX(double x);
 
   @pragma("vm:prefer-inline")
   Float64x2 withY(double y) {
@@ -3950,17 +4053,21 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 _withY(double y) native "Float64x2_setY";
+  @pragma("vm:external-name", "Float64x2_setY")
+  external Float64x2 _withY(double y);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 min(Float64x2 other) native "Float64x2_min";
+  @pragma("vm:external-name", "Float64x2_min")
+  external Float64x2 min(Float64x2 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 max(Float64x2 other) native "Float64x2_max";
+  @pragma("vm:external-name", "Float64x2_max")
+  external Float64x2 max(Float64x2 other);
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2)
-  Float64x2 sqrt() native "Float64x2_sqrt";
+  @pragma("vm:external-name", "Float64x2_sqrt")
+  external Float64x2 sqrt();
 }
 
 class _TypedListIterator<E> implements Iterator<E> {
@@ -4005,12 +4112,14 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:non-nullable-result-type")
   @pragma("vm:prefer-inline")
-  _TypedList get _typedData native "TypedDataView_typedData";
+  @pragma("vm:external-name", "TypedDataView_typedData")
+  external _TypedList get _typedData;
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get offsetInBytes native "TypedDataView_offsetInBytes";
+  @pragma("vm:external-name", "TypedDataView_offsetInBytes")
+  external int get offsetInBytes;
 }
 
 @pragma("vm:entry-point")
@@ -4020,8 +4129,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int8ArrayView)
-  factory _Int8ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Int8ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Int8ArrayView_new")
+  external factory _Int8ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4060,8 +4170,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint8ArrayView)
-  factory _Uint8ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Uint8ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Uint8ArrayView_new")
+  external factory _Uint8ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4100,8 +4211,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint8ClampedArrayView)
-  factory _Uint8ClampedArrayView._(_TypedList buffer, int offsetInBytes,
-      int length) native "TypedDataView_Uint8ClampedArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Uint8ClampedArrayView_new")
+  external factory _Uint8ClampedArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4140,8 +4252,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int16ArrayView)
-  factory _Int16ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Int16ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Int16ArrayView_new")
+  external factory _Int16ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4193,8 +4306,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint16ArrayView)
-  factory _Uint16ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Uint16ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Uint16ArrayView_new")
+  external factory _Uint16ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4247,8 +4361,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32ArrayView)
-  factory _Int32ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Int32ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Int32ArrayView_new")
+  external factory _Int32ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4287,8 +4402,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint32ArrayView)
-  factory _Uint32ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Uint32ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Uint32ArrayView_new")
+  external factory _Uint32ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4327,8 +4443,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int64ArrayView)
-  factory _Int64ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Int64ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Int64ArrayView_new")
+  external factory _Int64ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4367,8 +4484,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Uint64ArrayView)
-  factory _Uint64ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Uint64ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Uint64ArrayView_new")
+  external factory _Uint64ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4407,8 +4525,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32ArrayView)
-  factory _Float32ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Float32ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Float32ArrayView_new")
+  external factory _Float32ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4447,8 +4566,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64ArrayView)
-  factory _Float64ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Float64ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Float64ArrayView_new")
+  external factory _Float64ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   @pragma("vm:prefer-inline")
@@ -4487,8 +4607,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float32x4ArrayView)
-  factory _Float32x4ArrayView._(_TypedList buffer, int offsetInBytes,
-      int length) native "TypedDataView_Float32x4ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Float32x4ArrayView_new")
+  external factory _Float32x4ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   Float32x4 operator [](int index) {
@@ -4525,8 +4646,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Int32x4ArrayView)
-  factory _Int32x4ArrayView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_Int32x4ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Int32x4ArrayView_new")
+  external factory _Int32x4ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   Int32x4 operator [](int index) {
@@ -4563,8 +4685,9 @@
   // Constructor.
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _Float64x2ArrayView)
-  factory _Float64x2ArrayView._(_TypedList buffer, int offsetInBytes,
-      int length) native "TypedDataView_Float64x2ArrayView_new";
+  @pragma("vm:external-name", "TypedDataView_Float64x2ArrayView_new")
+  external factory _Float64x2ArrayView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing List interface.
   Float64x2 operator [](int index) {
@@ -4598,8 +4721,9 @@
 class _ByteDataView implements ByteData {
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", _ByteDataView)
-  factory _ByteDataView._(_TypedList buffer, int offsetInBytes, int length)
-      native "TypedDataView_ByteDataView_new";
+  @pragma("vm:external-name", "TypedDataView_ByteDataView_new")
+  external factory _ByteDataView._(
+      _TypedList buffer, int offsetInBytes, int length);
 
   // Method(s) implementing TypedData interface.
   _ByteBuffer get buffer {
@@ -4846,17 +4970,20 @@
   @pragma("vm:recognized", "other")
   @pragma("vm:non-nullable-result-type")
   @pragma("vm:prefer-inline")
-  _TypedList get _typedData native "TypedDataView_typedData";
+  @pragma("vm:external-name", "TypedDataView_typedData")
+  external _TypedList get _typedData;
 
   @pragma("vm:recognized", "other")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get offsetInBytes native "TypedDataView_offsetInBytes";
+  @pragma("vm:external-name", "TypedDataView_offsetInBytes")
+  external int get offsetInBytes;
 
   @pragma("vm:recognized", "graph-intrinsic")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   @pragma("vm:prefer-inline")
-  int get length native "TypedDataBase_length";
+  @pragma("vm:external-name", "TypedDataBase_length")
+  external int get length;
 }
 
 @pragma("vm:prefer-inline")
diff --git a/sdk/lib/_internal/vm/lib/uri_patch.dart b/sdk/lib/_internal/vm/lib/uri_patch.dart
index de10c9e..3ce2037 100644
--- a/sdk/lib/_internal/vm/lib/uri_patch.dart
+++ b/sdk/lib/_internal/vm/lib/uri_patch.dart
@@ -26,7 +26,8 @@
 class _Uri {
   static final bool _isWindowsCached = _isWindowsPlatform;
 
-  static bool get _isWindowsPlatform native "Uri_isWindowsPlatform";
+  @pragma("vm:external-name", "Uri_isWindowsPlatform")
+  external static bool get _isWindowsPlatform;
 
   @patch
   static bool get _isWindows => _isWindowsCached;
diff --git a/sdk/lib/_internal/vm/lib/weak_property.dart b/sdk/lib/_internal/vm/lib/weak_property.dart
index defcd40..132a94d 100644
--- a/sdk/lib/_internal/vm/lib/weak_property.dart
+++ b/sdk/lib/_internal/vm/lib/weak_property.dart
@@ -8,15 +8,19 @@
 class _WeakProperty {
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  get key native "WeakProperty_getKey";
+  @pragma("vm:external-name", "WeakProperty_getKey")
+  external get key;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  set key(k) native "WeakProperty_setKey";
+  @pragma("vm:external-name", "WeakProperty_setKey")
+  external set key(k);
 
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  get value native "WeakProperty_getValue";
+  @pragma("vm:external-name", "WeakProperty_getValue")
+  external get value;
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
-  set value(v) native "WeakProperty_setValue";
+  @pragma("vm:external-name", "WeakProperty_setValue")
+  external set value(v);
 }
diff --git a/sdk/lib/async/async.dart b/sdk/lib/async/async.dart
index 33df08e..00b7fc6 100644
--- a/sdk/lib/async/async.dart
+++ b/sdk/lib/async/async.dart
@@ -32,7 +32,7 @@
 /// Many methods in the Dart libraries return `Future`s when
 /// performing tasks. For example, when binding an `HttpServer`
 /// to a host and port, the `bind()` method returns a Future.
-/// ```dart
+/// ```dart import:io
 ///  HttpServer.bind('127.0.0.1', 4444)
 ///      .then((server) => print('${server.isBroadcast}'))
 ///      .catchError(print);
@@ -60,7 +60,7 @@
 /// the stream has finished.
 /// Further functionality is provided on [Stream], implemented by calling
 /// [Stream.listen] to get the actual data.
-/// ```dart
+/// ```dart import:io import:convert
 /// Stream<List<int>> stream = File('quotes.txt').openRead();
 /// stream.transform(utf8.decoder).forEach(print);
 /// ```
@@ -72,7 +72,7 @@
 ///
 /// Another common use of streams is for user-generated events
 /// in a web app: The following code listens for mouse clicks on a button.
-/// ```dart
+/// ```dart import:html
 /// querySelector('#myButton').onClick.forEach((_) => print('Click.'));
 /// ```
 /// ## Other resources
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 555bc3d..c587536 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -7,8 +7,8 @@
 /// A type representing values that are either `Future<T>` or `T`.
 ///
 /// This class declaration is a public stand-in for an internal
-/// future-or-value generic type. References to this class are resolved to the
-/// internal type.
+/// future-or-value generic type, which is not a class type.
+/// References to this class are resolved to the internal type.
 ///
 /// It is a compile-time error for any class to extend, mix in or implement
 /// `FutureOr`.
@@ -43,35 +43,109 @@
   }
 }
 
-/// An object representing a delayed computation.
+/// The result of an asynchronous computation.
 ///
-/// A [Future] is used to represent a potential value, or error,
-/// that will be available at some time in the future.
-/// Receivers of a [Future] can register callbacks
-/// that handle the value or error once it is available.
+/// An _asynchronous computation_ cannot provide a result immediately
+/// when it is started, unlike a synchronous computation which does compute
+/// a result immediately by either returning a value or by throwing.
+/// An asynchronous computation may need to wait for something external
+/// to the program (reading a file, querying a database, fetching a web page)
+/// which takes time.
+/// Instead of blocking all computation until the result is available,
+/// the asynchronous computation immediately returns a `Future`
+/// which will *eventually* "complete" with the result.
+///
+/// ### Asynchronous programming
+///
+/// To perform an asynchronous computation, you use an `async` function
+/// which always produces a future.
+/// Inside such an asynchronous function, you can use the `await` operation
+/// to delay execution until another asyncronous computation has a result.
+/// While execution of the awaiting function is delayed,
+/// the program is not blocked, and can continue doing other things.
+///
+/// Example:
+/// ```dart
+/// import "dart:io";
+/// Future<bool> fileContains(String path, String needle) async {
+///    var haystack = await File(path).readAsString();
+///    return haystack.contains(needle);
+/// }
+/// ```
+/// Here the `File.readAsString` method from `dart:io` is an asychronous
+/// function returning a `Future<String>`.
+/// The `fileContains` function is marked with `async` right before its body,
+/// which means that you can use `await` insider it,
+/// and that it must return a future.
+/// The call to `File(path).readAsString()` initiates reading the file into
+/// a string and produces a `Future<String>` which will eventually contain the
+/// result.
+/// The `await` then waits for that future to complete with a string
+/// (or an error, if reading the file fails).
+/// While waiting, the program can do other things.
+/// When the future completes with a string, the `fileContains` function
+/// computes a boolean and returns it, which then completes the original
+/// future that it returned when first called.
+///
+/// If a future completes with an *error*, awaiting that future will
+/// (re-)throw that error. In the example here, we can add error checking:
+/// ```dart
+/// import "dart:io";
+/// Future<bool> fileContains(String path, String needle) async {
+///   try {
+///     var haystack = await File(path).readAsString();
+///     return haystack.contains(needle);
+///   } on FileSystemException catch (exception, stack) {
+///     _myLog.logError(exception, stack);
+///     return false;
+///   }
+/// }
+/// ```
+/// You use a normal `try`/`catch` to catch the failures of awaited
+/// asynchronous computations.
+///
+/// In general, when writing asynchronous code, you should always await a
+/// future when it is produced, and not wait until after another asynchronous
+/// delay. That ensures that you are ready to receive any error that the
+/// future might produce, which is important because an asynchronous error
+/// that no-one is awaiting is an *uncaught* error and may terminate
+/// the running program.
+///
+/// ### Programming with the `Future` API.
+///
+/// The `Future` class also provides a more direct, low-level functionality
+/// for accessing the result that it completes with.
+/// The `async` and `await` language features are built on top of this
+/// functionality, and it sometimes makes sense to use it directly.
+/// There are things that you cannot do by just `await`ing one future at
+/// a time.
+///
+/// With a [Future], you can manually register callbacks
+/// that handle the value, or error, once it is available.
 /// For example:
 /// ```dart
 /// Future<int> future = getFuture();
 /// future.then((value) => handleValue(value))
 ///       .catchError((error) => handleError(error));
 /// ```
-/// A [Future] can be completed in two ways:
-/// with a value ("the future succeeds")
-/// or with an error ("the future fails").
-/// Users can install callbacks for each case.
+/// Since a [Future] can be completed in two ways,
+/// either with a value (if the asynchronous computation succeeded)
+/// or with an error (if the computation failed),
+/// you can install callbacks for either or both cases.
 ///
-/// In some cases we say that a future is completed with another future.
+/// In some cases we say that a future is completed *with another future*.
 /// This is a short way of stating that the future is completed in the same way,
 /// with the same value or error,
-/// as the other future once that completes.
-/// Whenever a function in the core library may complete a future
+/// as the other future once that other future itself completes.
+/// Most functions in the platform libraries that complete a future
 /// (for example [Completer.complete] or [Future.value]),
-/// then it also accepts another future and does this work for the developer.
+/// also accepts another future, and automatically handles forwarding
+/// the result to the future being completed.
 ///
-/// The result of registering a pair of callbacks is a Future (the
-/// "successor") which in turn is completed with the result of invoking the
-/// corresponding callback.
-/// The successor is completed with an error if the invoked callback throws.
+/// The result of registering callbacks is itself a `Future`,
+/// which in turn is completed with the result of invoking the
+/// corresponding callback with the original future's result.
+/// The new future is completed with an error if the invoked callback throws.
 /// For example:
 /// ```dart
 /// Future<int> successor = future.then((int value) {
@@ -88,9 +162,9 @@
 ///   });
 /// ```
 ///
-/// If a future does not have a successor when it completes with an error,
-/// it forwards the error message to an uncaught-error handler.
-/// This behavior makes sure that no error is silently dropped.
+/// If a future does not have any registered handler when it completes
+/// with an error, it forwards the error to an "uncaught-error handler".
+/// This behavior ensures that no error is silently dropped.
 /// However, it also means that error handlers should be installed early,
 /// so that they are present as soon as a future is completed with an error.
 /// The following example demonstrates this potential bug:
@@ -128,9 +202,12 @@
 ///
 /// Equivalent asynchronous code, based on futures:
 /// ```dart
-/// Future<int> future = Future(foo);  // Result of foo() as a future.
-/// future.then((int value) => bar(value))
-///       .catchError((e) => 499);
+/// Future<int> asyncValue = Future(foo);  // Result of foo() as a future.
+/// asyncValue.then((int value) {
+///   return bar(value);
+/// }).catchError((e) {
+///   return 499;
+/// });
 /// ```
 ///
 /// Similar to the synchronous code, the error handler (registered with
@@ -142,7 +219,8 @@
 /// treated independently and is handled as if it was the only successor.
 ///
 /// A future may also fail to ever complete. In that case, no callbacks are
-/// called.
+/// called. That situation should generally be avoided if possible, unless
+/// it's very clearly documented.
 abstract class Future<T> {
   /// A `Future<Null>` completed with `null`.
   ///
@@ -660,7 +738,7 @@
   ///
   /// This method is equivalent to:
   /// ```dart
-  /// Future<T> whenComplete(action()) {
+  /// Future<T> whenComplete(action() {
   ///   return this.then((v) {
   ///     var f2 = action();
   ///     if (f2 is Future) return f2.then((_) => v);
@@ -702,7 +780,8 @@
 ///
 /// Not all futures need to be awaited.
 /// The Dart linter has an optional ["unawaited futures" lint](https://dart-lang.github.io/linter/lints/unawaited_futures.html)
-/// which enforces that futures (expressions with a static type of [Future])
+/// which enforces that potential futures
+/// (expressions with a static type of [Future] or `Future?`)
 /// in asynchronous functions are handled *somehow*.
 /// If a particular future value doesn't need to be awaited,
 /// you can call `unawaited(...)` with it, which will avoid the lint,
@@ -719,8 +798,8 @@
 /// are *expected* to complete with a value.
 /// You can use [FutureExtensions.ignore] if you also don't want to know
 /// about errors from this future.
-@Since("2.14")
-void unawaited(Future<void> future) {}
+@Since("2.15")
+void unawaited(Future<void>? future) {}
 
 /// Convenience methods on futures.
 ///
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 7a3c80d..3f12cb3 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -18,9 +18,61 @@
 /// When a stream has emitted all its event,
 /// a single "done" event will notify the listener that the end has been reached.
 ///
-/// You [listen] on a stream to make it start generating events,
-/// and to set up listeners that receive the events.
-/// When you listen, you receive a [StreamSubscription] object
+/// You produce a stream by calling an `async*` function, which then returns
+/// a stream. Consuming that stream will lead the function to emit events
+/// until it ends, and the stream closes.
+/// You consume a stream either using an `await for` loop, which is available
+/// inside an `async` or `async*` function, or forwards its events directly
+/// using `yield*` inside an `async*` function.
+/// Example:
+/// ```dart
+/// Stream<T> optionalMap<T>(
+///     Stream<T> source , [T Function(T)? convert]) async* {
+///   if (convert == null) {
+///     yield* source;
+///   } else {
+///     await for (var event in source) {
+///       yield convert(event);
+///     }
+///   }
+/// }
+/// ```
+/// When this function is called, it immediately returns a `Stream<T>` object.
+/// Then nothing further happens until someone tries to consume that stream.
+/// At that point, the body of the `async*` function starts running.
+/// If the `convert` function was omitted, the `yield*` will listen to the
+/// `source` stream and forward all events, date and errors, to the returned
+/// stream. When the `source` stream closes, the `yield*` is done,
+/// and the `optionalMap` function body ends too. This closes the returned
+/// stream.
+/// If a `convert` *is* supplied, the function instead listens on the source
+/// stream and enters an `await for` loop which
+/// repeatedly waits for the next data event.
+/// On a data event, it calls `convert` with the value and emits the result
+/// on the returned stream.
+/// If no error events are emitted by the `source` stream,
+/// the loop ends when the `source` stream does,
+/// then the `optionalMap` function body completes,
+/// which closes the returned stream.
+/// On an error event from the `source` stream,
+/// the `await for` that error is (re-)thrown which breaks the loop.
+/// The error then reaches the end of the `optionalMap` function body,
+/// since it's not caught.
+/// That makes the error be emitted on the returned stream, which then closes.
+///
+/// The `Stream` class also provides functionality which allows you to
+/// manually listen for events from a stream, or to convert a stream
+/// into another stream or into a future.
+///
+/// The [forEach] function corresponds to the `await for` loop,
+/// just as [Iterable.forEach] corresponds to a normal `for`/`in` loop.
+/// Like the loop, it will call a function for each data event and break on an
+/// error.
+///
+/// The more low-level [listen] method is what every other method is based on.
+/// You call `listen` on a stream to tell it that you want to receive
+/// events, and to registers the callbacks which will receive those events.
+/// When you call `listen`, you receive a [StreamSubscription] object
 /// which is the active object providing the events,
 /// and which can be used to stop listening again,
 /// or to temporarily pause events from the subscription.
@@ -33,19 +85,21 @@
 /// It doesn't start generating events until it has a listener,
 /// and it stops sending events when the listener is unsubscribed,
 /// even if the source of events could still provide more.
+/// The stream created by an `async*` function is a single-subscription stream,
+/// but each call to the function creates a new such stream.
 ///
 /// Listening twice on a single-subscription stream is not allowed, even after
 /// the first subscription has been canceled.
 ///
 /// Single-subscription streams are generally used for streaming chunks of
-/// larger contiguous data like file I/O.
+/// larger contiguous data, like file I/O.
 ///
 /// *A broadcast stream* allows any number of listeners, and it fires
 /// its events when they are ready, whether there are listeners or not.
 ///
 /// Broadcast streams are used for independent events/observers.
 ///
-/// If several listeners want to listen to a single subscription stream,
+/// If several listeners want to listen to a single-subscription stream,
 /// use [asBroadcastStream] to create a broadcast stream on top of the
 /// non-broadcast stream.
 ///
@@ -77,7 +131,8 @@
 ///
 /// The default implementation of [isBroadcast] returns false.
 /// A broadcast stream inheriting from [Stream] must override [isBroadcast]
-/// to return `true`.
+/// to return `true` if it wants to signal that it behaves like a broadcast
+/// stream.
 abstract class Stream<T> {
   Stream();
 
@@ -85,6 +140,7 @@
   ///
   /// If mixins become compatible with const constructors, we may use a
   /// stream mixin instead of extending Stream from a const class.
+  /// (They now are compatible. We still consider, but it's not urgent.)
   const Stream._internal();
 
   /// Creates an empty broadcast stream.
@@ -93,10 +149,10 @@
   /// when it's listened to.
   const factory Stream.empty() = _EmptyStream<T>;
 
-  /// Creates a stream which emits a single data event before completing.
+  /// Creates a stream which emits a single data event before closing.
   ///
   /// This stream emits a single data event of [value]
-  /// and then completes with a done event.
+  /// and then closes with a done event.
   ///
   /// Example:
   /// ```dart
@@ -2003,7 +2059,7 @@
   /// [StreamTransformer.bind] API and can be used when the transformation is
   /// available as a stream-to-stream function.
   ///
-  /// ```dart
+  /// ```dart import:convert
   /// final splitDecoded = StreamTransformer<List<int>, String>.fromBind(
   ///     (stream) => stream.transform(utf8.decoder).transform(LineSplitter()));
   /// ```
diff --git a/sdk/lib/convert/convert.dart b/sdk/lib/convert/convert.dart
index 081f006..b1a1cea 100644
--- a/sdk/lib/convert/convert.dart
+++ b/sdk/lib/convert/convert.dart
@@ -34,7 +34,7 @@
 /// as it's read from a file,
 /// The second is an instance of [LineSplitter],
 /// which splits the data on newline boundaries.
-/// ```dart
+/// ```dart import:io
 /// var lineNumber = 1;
 /// var stream = File('quotes.txt').openRead();
 ///
diff --git a/sdk/lib/core/duration.dart b/sdk/lib/core/duration.dart
index 57075cb..5303bbe 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -124,6 +124,10 @@
   /// Likewise, values can be negative, in which case they
   /// underflow and subtract from the next larger unit.
   ///
+  /// If the total number of microseconds cannot be represented
+  /// as an integer value, the number of microseconds might be truncated
+  /// and it might lose precision.
+  ///
   /// All arguments are 0 by default.
   const Duration(
       {int days = 0,
@@ -132,12 +136,12 @@
       int seconds = 0,
       int milliseconds = 0,
       int microseconds = 0})
-      : this._microseconds(microsecondsPerDay * days +
-            microsecondsPerHour * hours +
-            microsecondsPerMinute * minutes +
-            microsecondsPerSecond * seconds +
+      : this._microseconds(microseconds +
             microsecondsPerMillisecond * milliseconds +
-            microseconds);
+            microsecondsPerSecond * seconds +
+            microsecondsPerMinute * minutes +
+            microsecondsPerHour * hours +
+            microsecondsPerDay * days);
 
   // Fast path internal direct constructor to avoids the optional arguments and
   // [_microseconds] recomputation.
@@ -257,30 +261,27 @@
   /// d.toString();  // "1:10:00.000500"
   /// ```
   String toString() {
-    String sixDigits(int 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";
-    }
+    var microseconds = inMicroseconds;
 
-    String twoDigits(int n) {
-      if (n >= 10) return "$n";
-      return "0$n";
-    }
+    var hours = microseconds ~/ microsecondsPerHour;
+    microseconds = microseconds.remainder(microsecondsPerHour);
 
-    if (inMicroseconds < 0) {
-      return "-${-this}";
-    }
-    String twoDigitMinutes =
-        twoDigits(inMinutes.remainder(minutesPerHour) as int);
-    String twoDigitSeconds =
-        twoDigits(inSeconds.remainder(secondsPerMinute) as int);
-    String sixDigitUs =
-        sixDigits(inMicroseconds.remainder(microsecondsPerSecond) as int);
-    return "$inHours:$twoDigitMinutes:$twoDigitSeconds.$sixDigitUs";
+    if (microseconds < 0) microseconds = -microseconds;
+
+    var minutes = microseconds ~/ microsecondsPerMinute;
+    microseconds = microseconds.remainder(microsecondsPerMinute);
+
+    var minutesPadding = minutes < 10 ? "0" : "";
+
+    var seconds = microseconds ~/ microsecondsPerSecond;
+    microseconds = microseconds.remainder(microsecondsPerSecond);
+
+    var secondsPadding = seconds < 10 ? "0" : "";
+
+    var paddedMicroseconds = microseconds.toString().padLeft(6, "0");
+    return "$hours:"
+        "$minutesPadding$minutes:"
+        "$secondsPadding$seconds.$paddedMicroseconds";
   }
 
   /// Whether this [Duration] is negative.
@@ -293,13 +294,13 @@
   /// [Duration].
   ///
   /// The returned [Duration] has the same length as this one, but is always
-  /// positive.
+  /// positive where possible.
   Duration abs() => Duration._microseconds(_duration.abs());
 
   /// Creates a new [Duration] with the opposite direction of this [Duration].
   ///
   /// The returned [Duration] has the same length as this one, but will have the
-  /// opposite sign (as reported by [isNegative]) as this one.
+  /// opposite sign (as reported by [isNegative]) as this one where possible.
   // Using subtraction helps dart2js avoid negative zeros.
   Duration operator -() => Duration._microseconds(0 - _duration);
 }
diff --git a/sdk/lib/core/enum.dart b/sdk/lib/core/enum.dart
index c220b42..5d8f800 100644
--- a/sdk/lib/core/enum.dart
+++ b/sdk/lib/core/enum.dart
@@ -20,4 +20,122 @@
   /// This is also the index of the value in the
   /// enumerated type's static `values` list.
   int get index;
+
+  /// The value's "name".
+  ///
+  /// The name of a value is a string containing the
+  /// source identifier used to declare the value.
+  ///
+  /// The name occurs in the [toString] of the
+  /// enum value, after the enum class name and a `.`.
+  /// It is exposed by then [EnumName.name] extension getter,
+  /// which is an extension to allow `enum` declarations to have
+  /// an element named `name` without causing a name conflict.
+  ///
+  /// Given an enum declaration like
+  /// ```dart
+  /// enum MyEnum {
+  ///   value1,
+  ///   value2
+  /// }
+  /// ```
+  /// the `toString` method of that class may be implemented
+  /// as
+  /// ```dart
+  ///   String toString() => "MyEnum.$_name";
+  /// ```
+  String get _name;
+
+  /// Compares two enum values by their [index].
+  ///
+  /// A generic [Comparator] function for enum types which
+  /// orders enum values by their [index] value, which corresponds
+  /// to the source order of the enum element declarations in
+  /// the `enum` declaration.
+  @Since("2.15")
+  static int compareByIndex<T extends Enum>(T value1, T value2) =>
+      value1.index - value2.index;
+
+  /// Compares enum values by name.
+  ///
+  /// The [EnumName.name] of an enum value is a string
+  /// representing the source name used to declare that enum value.
+  ///
+  /// This [Comparator] compares two enum values by comparing their names,
+  /// and can be used to sort enum values by their names.
+  /// The comparison uses [String.compareTo], and is therefore case sensitive.
+  @Since("2.15")
+  static int compareByName<T extends Enum>(T value1, T value2) =>
+      value1.name.compareTo(value2.name);
+}
+
+/// Superclass of all enum class implementations.
+abstract class _Enum implements Enum {
+  final int index;
+  final String _name;
+  const _Enum(this.index, this._name);
+}
+
+/// Access to the name of an enum value.
+///
+/// This method is declared as an extension method
+/// instead of an instance method in order to allow
+/// enum values to have the name `name`.
+@Since("2.15")
+extension EnumName on Enum {
+  /// The name of the enum value.
+  ///
+  /// The name is a string containing the source identifier used
+  /// to declare the enum value.
+  ///
+  /// For example, given a declaration like:
+  /// ```dart
+  /// enum MyEnum {
+  ///   value1,
+  ///   value2
+  /// }
+  /// ```
+  /// the result of `MyEnum.value1.name` is the string `"value1"`.
+  String get name => _name;
+}
+
+/// Access enum values by name.
+///
+/// Extensions on a collection of enum values,
+/// intended for use on the `values` list of an enum type,
+/// which allows looking up a value by its name.
+///
+/// Since enum classes are expected to be relatively small,
+/// lookup of [byName] is performed by linearly iterating through the values
+/// and comparing their name to the provided name.
+/// If a more efficient lookup is needed, perhaps because the lookup operation
+/// happens very often, consider building a map instead using [asNameMap]:
+/// ```dart
+/// static myEnumNameMap = MyEnum.values.asNameMap();
+/// ```
+/// and then use that for lookups.
+@Since("2.15")
+extension EnumByName<T extends Enum> on Iterable<T> {
+  /// Finds the enum value in this list with name [name].
+  ///
+  /// Goes through this collection looking for an enum with
+  /// name [name], as reported by [EnumName.name].
+  /// Returns the first value with the given name. Such a value must be found.
+  T byName(String name) {
+    for (var value in this) {
+      if (value._name == name) return value;
+    }
+    throw ArgumentError.value(name, "name", "No enum value with that name");
+  }
+
+  /// Creates a map from the names of enum values to the values.
+  ///
+  /// The collection that this method is called on is expected to have
+  /// enums with distinct names, like the `values` list of an enum class.
+  /// Only one value for each name can occur in the created map,
+  /// so if two or more enum values have the same name (either being the
+  /// same value, or being values of different enum type), at most one of
+  /// them will be represented in the returned map.
+  Map<String, T> asNameMap() =>
+      <String, T>{for (var value in this) value._name: value};
 }
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index 9bf2671..f8f5a1b 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -112,8 +112,6 @@
 
   /// Bitwise unsigned right shift by [shiftAmount] bits.
   ///
-  /// NOT IMPLEMENTED YET.
-  ///
   /// The least significant [shiftAmount] bits are dropped,
   /// the remaining bits (if any) are shifted down,
   /// and zero-bits are shifted in as the new most significant bits.
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 2079afb..0b42ab7 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -412,12 +412,12 @@
     return count;
   }
 
-  /// Returns `true` if there are no elements in this collection.
+  /// Whether this collection has no elements.
   ///
   /// May be computed by checking if `iterator.moveNext()` returns `false`.
   bool get isEmpty => !iterator.moveNext();
 
-  /// Returns true if there is at least one element in this collection.
+  /// Whether this collection has at least one element.
   ///
   /// May be computed by checking if `iterator.moveNext()` returns `true`.
   bool get isNotEmpty => !isEmpty;
diff --git a/sdk/lib/core/object.dart b/sdk/lib/core/object.dart
index 8d02d06..4e01a55 100644
--- a/sdk/lib/core/object.dart
+++ b/sdk/lib/core/object.dart
@@ -158,7 +158,7 @@
   /// class SomeObject {
   ///   final Object a, b, c;
   ///   SomeObject(this.a, this.b, this.c);
-  ///   bool operator=(Object other) =>
+  ///   bool operator ==(Object other) =>
   ///       other is SomeObject && a == other.a && b == other.b && c == other.c;
   ///   int get hashCode => Object.hash(a, b, c);
   /// }
@@ -482,7 +482,7 @@
   /// class SomeObject {
   ///   final List<String> path;
   ///   SomeObject(this.path);
-  ///   bool operator=(Object other) {
+  ///   bool operator ==(Object other) {
   ///     if (other is SomeObject) {
   ///       if (path.length != other.path.length) return false;
   ///       for (int i = 0; i < path.length; i++) {
diff --git a/sdk/lib/core/pattern.dart b/sdk/lib/core/pattern.dart
index 94c8980..0926b5c 100644
--- a/sdk/lib/core/pattern.dart
+++ b/sdk/lib/core/pattern.dart
@@ -19,7 +19,7 @@
   /// of the pattern in the string, initially starting from [start],
   /// and then from the end of the previous match (but always
   /// at least one position later than the *start* of the previous
-  /// match, in case the patter matches an empty substring).
+  /// match, in case the pattern matches an empty substring).
   Iterable<Match> allMatches(String string, [int start = 0]);
 
   /// Matches this pattern against the start of `string`.
diff --git a/sdk/lib/core/print.dart b/sdk/lib/core/print.dart
index d88ea7f..10a0263 100644
--- a/sdk/lib/core/print.dart
+++ b/sdk/lib/core/print.dart
@@ -6,7 +6,7 @@
 
 /// Prints a string representation of the object to the console.
 void print(Object? object) {
-  String line = object.toString();
+  String line = "$object";
   var toZone = printToZone;
   if (toZone == null) {
     printToConsole(line);
diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart
index aaa0ee4..783f21a 100644
--- a/sdk/lib/developer/timeline.dart
+++ b/sdk/lib/developer/timeline.dart
@@ -219,6 +219,11 @@
     if (!_hasTimeline) return;
     // TODO: When NNBD is complete, delete the following line.
     ArgumentError.checkNotNull(name, 'name');
+    if (!_isDartStreamEnabled()) {
+      // Push a null onto the stack and return.
+      _stack.add(null);
+      return;
+    }
     var block = new _AsyncBlock._(name, _taskId);
     _stack.add(block);
     // TODO(39115): Spurious error about collection literal ambiguity.
@@ -242,6 +247,10 @@
     if (!_hasTimeline) return;
     // TODO: When NNBD is complete, delete the following line.
     ArgumentError.checkNotNull(name, 'name');
+    if (!_isDartStreamEnabled()) {
+      // Stream is disabled.
+      return;
+    }
     Map? instantArguments;
     if (arguments != null) {
       instantArguments = new Map.from(arguments);
@@ -269,6 +278,10 @@
     }
     // Pop top item off of stack.
     var block = _stack.removeLast();
+    if (block == null) {
+      // Dart stream was disabled when start was called.
+      return;
+    }
     block._finish(arguments);
   }
 
@@ -288,7 +301,7 @@
   final TimelineTask? _parent;
   final String? _filterKey;
   final int _taskId;
-  final List<_AsyncBlock> _stack = [];
+  final List<_AsyncBlock?> _stack = [];
 }
 
 /// An asynchronous block of time on the timeline. This block can be kept
diff --git a/sdk/lib/ffi/ffi.dart b/sdk/lib/ffi/ffi.dart
index 1e8a9ea..3e2dd21 100644
--- a/sdk/lib/ffi/ffi.dart
+++ b/sdk/lib/ffi/ffi.dart
@@ -823,12 +823,12 @@
 
 // Bootstrapping native for getting the FFI native C function pointer to look
 // up the FFI resolver.
-Pointer<NativeFunction<IntPtr Function(Handle, Handle)>>
-    _get_ffi_native_resolver<
-        T extends NativeFunction>() native "Ffi_GetFfiNativeResolver";
+@pragma("vm:external-name", "Ffi_GetFfiNativeResolver")
+external Pointer<NativeFunction<IntPtr Function(Handle, Handle, IntPtr)>>
+    _get_ffi_native_resolver<T extends NativeFunction>();
 
 // Resolver for FFI Native C function pointers.
 @pragma('vm:entry-point')
-final _ffi_resolver =
-    _get_ffi_native_resolver<NativeFunction<IntPtr Function(Handle, Handle)>>()
-        .asFunction<int Function(Object, Object)>();
+final _ffi_resolver = _get_ffi_native_resolver<
+        NativeFunction<IntPtr Function(Handle, Handle, IntPtr)>>()
+    .asFunction<int Function(Object, Object, int)>();
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index e11e430..59b3461 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -2980,7 +2980,7 @@
 
 @Native("CharacterData")
 class CharacterData extends Node
-    implements NonDocumentTypeChildNode, ChildNode {
+    implements ChildNode, NonDocumentTypeChildNode {
   // To suppress missing implicit constructor warnings.
   factory CharacterData._() {
     throw new UnsupportedError("Not supported");
@@ -10100,10 +10100,6 @@
   @SupportedBrowser(SupportedBrowser.SAFARI)
   void _webkitExitFullscreen() native;
 
-  // From NonElementParentNode
-
-  Element? getElementById(String elementId) native;
-
   // From DocumentOrShadowRoot
 
   Element? get activeElement native;
@@ -10126,6 +10122,10 @@
 
   FontFaceSet? get fonts native;
 
+  // From NonElementParentNode
+
+  Element? getElementById(String elementId) native;
+
   // From ParentNode
 
   @JSName('childElementCount')
@@ -10458,7 +10458,7 @@
 
 @Native("DocumentFragment")
 class DocumentFragment extends Node
-    implements NonElementParentNode, ParentNode {
+    implements ParentNode, NonElementParentNode {
   factory DocumentFragment() => document.createDocumentFragment();
 
   factory DocumentFragment.html(String? html,
@@ -11447,8 +11447,7 @@
       width == other.width &&
       height == other.height;
 
-  int get hashCode => _JenkinsSmiHash.hash4(
-      left.hashCode, top.hashCode, width.hashCode, height.hashCode);
+  int get hashCode => Object.hash(left, top, width, height);
 
   /**
    * Computes the intersection of `this` and [other].
@@ -11627,7 +11626,7 @@
 @Native("DOMStringList")
 class DomStringList extends Interceptor
     with ListMixin<String>, ImmutableListMixin<String>
-    implements JavaScriptIndexingBehavior<String>, List<String> {
+    implements List<String>, JavaScriptIndexingBehavior<String> {
   // To suppress missing implicit constructor warnings.
   factory DomStringList._() {
     throw new UnsupportedError("Not supported");
@@ -12704,10 +12703,10 @@
 @Native("Element")
 class Element extends Node
     implements
-        NonDocumentTypeChildNode,
-        GlobalEventHandlers,
         ParentNode,
-        ChildNode {
+        ChildNode,
+        NonDocumentTypeChildNode,
+        GlobalEventHandlers {
   /**
    * Creates an HTML element from a valid fragment of HTML.
    *
@@ -17646,7 +17645,7 @@
 @Native("HTMLCollection")
 class HtmlCollection extends Interceptor
     with ListMixin<Node>, ImmutableListMixin<Node>
-    implements JavaScriptIndexingBehavior<Node>, List<Node> {
+    implements List<Node>, JavaScriptIndexingBehavior<Node> {
   // To suppress missing implicit constructor warnings.
   factory HtmlCollection._() {
     throw new UnsupportedError("Not supported");
@@ -22620,10 +22619,10 @@
 class Navigator extends NavigatorConcurrentHardware
     implements
         NavigatorCookies,
+        NavigatorID,
         NavigatorLanguage,
         NavigatorOnLine,
-        NavigatorAutomationInformation,
-        NavigatorID {
+        NavigatorAutomationInformation {
   List<Gamepad?> getGamepads() {
     var gamepadList = _getGamepads();
 
@@ -23619,7 +23618,7 @@
 @Native("NodeList,RadioNodeList")
 class NodeList extends Interceptor
     with ListMixin<Node>, ImmutableListMixin<Node>
-    implements JavaScriptIndexingBehavior<Node>, List<Node> {
+    implements List<Node>, JavaScriptIndexingBehavior<Node> {
   // To suppress missing implicit constructor warnings.
   factory NodeList._() {
     throw new UnsupportedError("Not supported");
@@ -25591,7 +25590,7 @@
 @Native("PluginArray")
 class PluginArray extends Interceptor
     with ListMixin<Plugin>, ImmutableListMixin<Plugin>
-    implements JavaScriptIndexingBehavior<Plugin>, List<Plugin> {
+    implements List<Plugin>, JavaScriptIndexingBehavior<Plugin> {
   // To suppress missing implicit constructor warnings.
   factory PluginArray._() {
     throw new UnsupportedError("Not supported");
@@ -28255,7 +28254,7 @@
 @Native("SourceBufferList")
 class SourceBufferList extends EventTarget
     with ListMixin<SourceBuffer>, ImmutableListMixin<SourceBuffer>
-    implements JavaScriptIndexingBehavior<SourceBuffer>, List<SourceBuffer> {
+    implements List<SourceBuffer>, JavaScriptIndexingBehavior<SourceBuffer> {
   // To suppress missing implicit constructor warnings.
   factory SourceBufferList._() {
     throw new UnsupportedError("Not supported");
@@ -28406,7 +28405,7 @@
 @Native("SpeechGrammarList")
 class SpeechGrammarList extends Interceptor
     with ListMixin<SpeechGrammar>, ImmutableListMixin<SpeechGrammar>
-    implements JavaScriptIndexingBehavior<SpeechGrammar>, List<SpeechGrammar> {
+    implements List<SpeechGrammar>, JavaScriptIndexingBehavior<SpeechGrammar> {
   // To suppress missing implicit constructor warnings.
   factory SpeechGrammarList._() {
     throw new UnsupportedError("Not supported");
@@ -30400,7 +30399,7 @@
 @Native("TouchList")
 class TouchList extends Interceptor
     with ListMixin<Touch>, ImmutableListMixin<Touch>
-    implements JavaScriptIndexingBehavior<Touch>, List<Touch> {
+    implements List<Touch>, JavaScriptIndexingBehavior<Touch> {
   // To suppress missing implicit constructor warnings.
   factory TouchList._() {
     throw new UnsupportedError("Not supported");
@@ -32036,11 +32035,11 @@
 @Native("Window,DOMWindow")
 class Window extends EventTarget
     implements
-        WindowEventHandlers,
-        WindowBase,
         GlobalEventHandlers,
+        WindowBase64,
+        WindowEventHandlers,
         _WindowTimers,
-        WindowBase64 {
+        WindowBase {
   /**
    * Returns a Future that completes just before the window is about to
    * repaint so the user can draw an animation frame.
@@ -33944,7 +33943,7 @@
 
 @Native("WorkerGlobalScope")
 class WorkerGlobalScope extends EventTarget
-    implements _WindowTimers, WindowBase64 {
+    implements WindowBase64, _WindowTimers {
   // To suppress missing implicit constructor warnings.
   factory WorkerGlobalScope._() {
     throw new UnsupportedError("Not supported");
@@ -34456,7 +34455,7 @@
 @Native("CSSRuleList")
 class _CssRuleList extends Interceptor
     with ListMixin<CssRule>, ImmutableListMixin<CssRule>
-    implements JavaScriptIndexingBehavior<CssRule>, List<CssRule> {
+    implements List<CssRule>, JavaScriptIndexingBehavior<CssRule> {
   // To suppress missing implicit constructor warnings.
   factory _CssRuleList._() {
     throw new UnsupportedError("Not supported");
@@ -34578,8 +34577,7 @@
       width == other.width &&
       height == other.height;
 
-  int get hashCode => _JenkinsSmiHash.hash4(
-      left.hashCode, top.hashCode, width.hashCode, height.hashCode);
+  int get hashCode => Object.hash(left, top, width, height);
 
   /**
    * Computes the intersection of `this` and [other].
@@ -34718,43 +34716,6 @@
 
   set y(num? value) native;
 }
-
-/**
- * This is the [Jenkins hash function][1] but using masking to keep
- * values in SMI range.
- *
- * [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
- *
- * Use:
- * Hash each value with the hash of the previous value, then get the final
- * hash by calling finish.
- *
- *     var hash = 0;
- *     for (var value in values) {
- *       hash = JenkinsSmiHash.combine(hash, value.hashCode);
- *     }
- *     hash = JenkinsSmiHash.finish(hash);
- */
-class _JenkinsSmiHash {
-  // TODO(11617): This class should be optimized and standardized elsewhere.
-
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  static int hash2(a, b) => finish(combine(combine(0, a), b));
-
-  static int hash4(a, b, c, d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
@@ -35084,7 +35045,7 @@
 @Native("NamedNodeMap,MozNamedAttrMap")
 class _NamedNodeMap extends Interceptor
     with ListMixin<Node>, ImmutableListMixin<Node>
-    implements JavaScriptIndexingBehavior<Node>, List<Node> {
+    implements List<Node>, JavaScriptIndexingBehavior<Node> {
   // To suppress missing implicit constructor warnings.
   factory _NamedNodeMap._() {
     throw new UnsupportedError("Not supported");
@@ -35277,8 +35238,8 @@
         ListMixin<SpeechRecognitionResult>,
         ImmutableListMixin<SpeechRecognitionResult>
     implements
-        JavaScriptIndexingBehavior<SpeechRecognitionResult>,
-        List<SpeechRecognitionResult> {
+        List<SpeechRecognitionResult>,
+        JavaScriptIndexingBehavior<SpeechRecognitionResult> {
   // To suppress missing implicit constructor warnings.
   factory _SpeechRecognitionResultList._() {
     throw new UnsupportedError("Not supported");
@@ -35718,7 +35679,7 @@
 
 @Native("WorkerNavigator")
 abstract class _WorkerNavigator extends NavigatorConcurrentHardware
-    implements NavigatorOnLine, NavigatorID {
+    implements NavigatorID, NavigatorOnLine {
   // To suppress missing implicit constructor warnings.
   factory _WorkerNavigator._() {
     throw new UnsupportedError("Not supported");
@@ -36633,8 +36594,7 @@
       right == other.right &&
       bottom == other.bottom;
 
-  int get hashCode => _JenkinsSmiHash.hash4(
-      left.hashCode, top.hashCode, right.hashCode, bottom.hashCode);
+  int get hashCode => Object.hash(left, top, right, bottom);
 
   /**
    * Computes the intersection of `this` and [other].
diff --git a/sdk/lib/html/dartium/nativewrappers.dart b/sdk/lib/html/dartium/nativewrappers.dart
index 1d7787e..6aa47cd 100644
--- a/sdk/lib/html/dartium/nativewrappers.dart
+++ b/sdk/lib/html/dartium/nativewrappers.dart
@@ -19,5 +19,5 @@
 /// NOTE: This is function is temporary and will be deprecated in the near
 /// future.
 @pragma("vm:recognized", "other")
-int getNativeField(NativeFieldWrapperClass1 object)
-    native "FullyRecognizedMethod_NoNative";
+@pragma("vm:external-name", "FullyRecognizedMethod_NoNative")
+external int _getNativeField(NativeFieldWrapperClass1 object);
diff --git a/sdk/lib/internal/internal.dart b/sdk/lib/internal/internal.dart
index 71f02d9..e7fd45a 100644
--- a/sdk/lib/internal/internal.dart
+++ b/sdk/lib/internal/internal.dart
@@ -749,8 +749,7 @@
 class NotNullableError<T> extends Error implements TypeError {
   final String _name;
   NotNullableError(this._name);
-  String toString() =>
-      "Null is not a valid value for the parameter '$_name' of type '$T'";
+  String toString() => "Null is not a valid value for '$_name' of type '$T'";
 }
 
 /// A function that returns the value or default value (if invoked with `null`
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 0e130aa..7fb3ed5 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -36,7 +36,7 @@
 ///
 /// void main() async {
 ///   // Creates dir/ and dir/subdir/.
-///   var directory = await Directory('dir/subdir').create(recursive: true)
+///   var directory = await Directory('dir/subdir').create(recursive: true);
 ///   print(directory.path);
 /// }
 /// ```
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index 9a858de..4eedcf8 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -642,7 +642,7 @@
       _toNullTerminatedUtf8Array(utf8.encoder.convert(s));
 
   static Uint8List _toNullTerminatedUtf8Array(Uint8List l) {
-    if (l.isNotEmpty && l.last != 0) {
+    if (l.isEmpty || (l.isNotEmpty && l.last != 0)) {
       final tmp = new Uint8List(l.length + 1);
       tmp.setRange(0, l.length, l);
       return tmp;
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index 84ad5f9..4cad26d 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -111,7 +111,7 @@
 /// and listens for the data on the returned web socket.
 /// For example, here's a mini server that listens for 'ws' data
 /// on a WebSocket:
-/// ```dart
+/// ```dart import:async
 /// runZoned(() async {
 ///   var server = await HttpServer.bind('127.0.0.1', 4040);
 ///   server.listen((HttpRequest req) async {
@@ -140,7 +140,7 @@
 /// Use [ServerSocket] on the server side and [Socket] on the client.
 /// The server creates a listening socket using the `bind()` method and
 /// then listens for incoming connections on the socket. For example:
-/// ```dart
+/// ```dart import:convert
 /// ServerSocket.bind('127.0.0.1', 4041)
 ///   .then((serverSocket) {
 ///     serverSocket.listen((socket) {
diff --git a/sdk/lib/io/platform.dart b/sdk/lib/io/platform.dart
index cedaeba..bca141d 100644
--- a/sdk/lib/io/platform.dart
+++ b/sdk/lib/io/platform.dart
@@ -43,9 +43,9 @@
 ///
 /// You can get the name of the operating system as a string with the
 /// [operatingSystem] getter. You can also use one of the static boolean
-/// getters: [isMacOS], [isLinux], and [isWindows].
+/// getters: [isMacOS], [isLinux], [isWindows], etc.
 /// ```dart
-/// import 'dart:io' show Platform, stdout;
+/// import 'dart:io' show Platform;
 ///
 /// void main() {
 ///   // Get the operating system as a string.
@@ -74,12 +74,44 @@
   static String get pathSeparator => _pathSeparator;
 
   /// Get the name of the current locale.
+  ///
+  /// The result should include a language and country code
+  /// (e.g. "en_US", "de_AT") and may include a character set
+  /// (e.g. "en_US.UTF-8").
+  ///
+  /// On Linux and Fushia, the locale is taken from the "LANG" environment
+  /// variable, which may be set to any value. For example:
+  /// ```shell
+  /// LANG=kitten dart myfile.dart  # localeName is "kitten"
+  /// ```
+  ///
+  /// On Android, the value will not change while the application is running,
+  /// even if the user adjusts their language settings.
+  ///
+  /// See https://en.wikipedia.org/wiki/Locale_(computer_software)
   static String get localeName => _Platform.localeName();
 
   /// A string representing the operating system or platform.
+  ///
+  /// Possible values include:
+  ///   "android"
+  ///   "fuchsia"
+  ///   "ios"
+  ///   "linux"
+  ///   "macos"
+  ///   "windows"
+  ///
+  /// Note that this list may change over time so platform-specific logic
+  /// should be guarded by the appropriate boolean getter e.g. [isMacOS].
   static String get operatingSystem => _operatingSystem;
 
   /// A string representing the version of the operating system or platform.
+  ///
+  /// The format of this string will vary by operating system, platform and
+  /// version and is not suitable for parsing. For example:
+  ///   "Linux 5.11.0-1018-gcp #20~20.04.2-Ubuntu SMP Fri Sep 3 01:01:37 UTC 2021"
+  ///   "Version 14.5 (Build 18E182)"
+  ///   '"Windows 10 Pro" 10.0 (Build 19043)'
   static String get operatingSystemVersion => _operatingSystemVersion;
 
   /// The local hostname for the system.
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 8a68d10..fc47a29 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -553,6 +553,32 @@
     };
     return controller.stream;
   }
+
+  /// Terminates the current isolate synchronously.
+  ///
+  /// This operations is potentially dangerous and should be used judiciously.
+  /// The isolate stops operating *immediately*. It throws if optional [message]
+  /// does not adhere to the limitation on what can be send from one isolate to
+  /// another. It also throws if a [finalMessagePort] is associated with an
+  /// isolate spawned outside of current isolate group, spawned via [spawnUri].
+  ///
+  /// If successful, a call to this method does not return. Pending `finally`
+  /// blocks are not executed, control flow will not go back to the event loop,
+  /// scheduled asynchronous asks will never run, and even pending isolate
+  /// control commands may be ignored. (The isolate will send messages to ports
+  /// already registered using [Isolate.addOnExitListener], but no further Dart
+  /// code will run in the isolate.)
+  ///
+  /// If [finalMessagePort] is provided, and the [message] can be sent through
+  /// it, then the message is sent through that port as the final operation of
+  /// the current isolate. The isolate terminates immediately after
+  /// that [SendPort.send] call returns.
+  ///
+  /// (If the port is a native port, one provided by [ReceivePort.sendPort]
+  /// or [RawReceivePort.sendPort], the system may be able to send this final
+  /// message more efficiently than normal port communication between live
+  /// isolates.)
+  external static Never exit([SendPort? finalMessagePort, Object? message]);
 }
 
 /// Sends messages to its [ReceivePort]s.
diff --git a/sdk/lib/js_util/js_util.dart b/sdk/lib/js_util/js_util.dart
index ee3dd0f..bfe6cf3 100644
--- a/sdk/lib/js_util/js_util.dart
+++ b/sdk/lib/js_util/js_util.dart
@@ -195,6 +195,38 @@
   //     return _wrapToDart(jsObj);
 }
 
+/// Unchecked version for 0 arguments, only used in a CFE transformation.
+@pragma('dart2js:tryInline')
+dynamic _callConstructorUnchecked0(Object constr) {
+  return JS('Object', 'new #()', constr);
+}
+
+/// Unchecked version for 1 argument, only used in a CFE transformation.
+@pragma('dart2js:tryInline')
+dynamic _callConstructorUnchecked1(Object constr, Object? arg1) {
+  return JS('Object', 'new #(#)', constr, arg1);
+}
+
+/// Unchecked version for 2 arguments, only used in a CFE transformation.
+@pragma('dart2js:tryInline')
+dynamic _callConstructorUnchecked2(Object constr, Object? arg1, Object? arg2) {
+  return JS('Object', 'new #(#, #)', constr, arg1, arg2);
+}
+
+/// Unchecked version for 3 arguments, only used in a CFE transformation.
+@pragma('dart2js:tryInline')
+dynamic _callConstructorUnchecked3(
+    Object constr, Object? arg1, Object? arg2, Object? arg3) {
+  return JS('Object', 'new #(#, #, #)', constr, arg1, arg2, arg3);
+}
+
+/// Unchecked version for 4 arguments, only used in a CFE transformation.
+@pragma('dart2js:tryInline')
+dynamic _callConstructorUnchecked4(
+    Object constr, Object? arg1, Object? arg2, Object? arg3, Object? arg4) {
+  return JS('Object', 'new #(#, #, #, #)', constr, arg1, arg2, arg3, arg4);
+}
+
 /// Exception for when the promise is rejected with a `null` or `undefined`
 /// value.
 ///
diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
index c1cf9c2..2ca5b70 100644
--- a/sdk/lib/libraries.json
+++ b/sdk/lib/libraries.json
@@ -56,7 +56,6 @@
           "_internal/vm/lib/function_patch.dart",
           "_internal/vm/lib/growable_array.dart",
           "_internal/vm/lib/identical_patch.dart",
-          "_internal/vm/lib/immutable_map.dart",
           "_internal/vm/lib/integers.dart",
           "_internal/vm/lib/integers_patch.dart",
           "_internal/vm/lib/invocation_mirror_patch.dart",
diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
index 1b92562..1066ab0 100644
--- a/sdk/lib/libraries.yaml
+++ b/sdk/lib/libraries.yaml
@@ -63,7 +63,6 @@
         - "_internal/vm/lib/function_patch.dart"
         - "_internal/vm/lib/growable_array.dart"
         - "_internal/vm/lib/identical_patch.dart"
-        - "_internal/vm/lib/immutable_map.dart"
         - "_internal/vm/lib/integers.dart"
         - "_internal/vm/lib/integers_patch.dart"
         - "_internal/vm/lib/invocation_mirror_patch.dart"
diff --git a/sdk/lib/vmservice/asset.dart b/sdk/lib/vmservice/asset.dart
index a29984e..b42df32 100644
--- a/sdk/lib/vmservice/asset.dart
+++ b/sdk/lib/vmservice/asset.dart
@@ -54,7 +54,8 @@
   String toString() => '$name ($mimeType)';
 }
 
-List _decodeAssets(Uint8List data) native 'VMService_DecodeAssets';
+@pragma("vm:external-name", "VMService_DecodeAssets")
+external List _decodeAssets(Uint8List data);
 
 Map<String, Asset>? _assets;
 Map<String, Asset> get assets {
diff --git a/sdk/lib/vmservice/message.dart b/sdk/lib/vmservice/message.dart
index a3a0e61..e1164e5 100644
--- a/sdk/lib/vmservice/message.dart
+++ b/sdk/lib/vmservice/message.dart
@@ -251,10 +251,11 @@
       setResponse(encodeRpcError(this, code, details: '$method: $details'));
 }
 
-bool sendIsolateServiceMessage(SendPort sp, List m)
-    native 'VMService_SendIsolateServiceMessage';
+@pragma("vm:external-name", "VMService_SendIsolateServiceMessage")
+external bool sendIsolateServiceMessage(SendPort sp, List m);
 
-void sendRootServiceMessage(List m) native 'VMService_SendRootServiceMessage';
+@pragma("vm:external-name", "VMService_SendRootServiceMessage")
+external void sendRootServiceMessage(List m);
 
-void sendObjectRootServiceMessage(List m)
-    native 'VMService_SendObjectRootServiceMessage';
+@pragma("vm:external-name", "VMService_SendObjectRootServiceMessage")
+external void sendObjectRootServiceMessage(List m);
diff --git a/sdk/lib/vmservice/running_isolates.dart b/sdk/lib/vmservice/running_isolates.dart
index f9db4a5..17ba448 100644
--- a/sdk/lib/vmservice/running_isolates.dart
+++ b/sdk/lib/vmservice/running_isolates.dart
@@ -132,6 +132,10 @@
     if (klass != null) {
       compileParams['klass'] = klass;
     }
+    final method = buildScopeResponseResult['method'];
+    if (method != null) {
+      compileParams['method'] = method;
+    }
     if (externalClient != null) {
       final compileExpression = Message.forMethod('compileExpression');
       compileExpression.client = externalClient;
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index dacc9d5..ed389a7 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -733,24 +733,29 @@
     VMService().runningIsolates.isolateStartup(port_id, sp, name);
 
 /// Notify the VM that the service is running.
-void _onStart() native 'VMService_OnStart';
+@pragma("vm:external-name", "VMService_OnStart")
+external void _onStart();
 
 /// Notify the VM that the service is no longer running.
-void _onExit() native 'VMService_OnExit';
+@pragma("vm:external-name", "VMService_OnExit")
+external void _onExit();
 
 /// Notify the VM that the server's address has changed.
 void onServerAddressChange(String? address) {
   _onServerAddressChange(address);
 }
 
-void _onServerAddressChange(String? address)
-    native 'VMService_OnServerAddressChange';
+@pragma("vm:external-name", "VMService_OnServerAddressChange")
+external void _onServerAddressChange(String? address);
 
 /// Subscribe to a service stream.
-bool _vmListenStream(String streamId) native 'VMService_ListenStream';
+@pragma("vm:external-name", "VMService_ListenStream")
+external bool _vmListenStream(String streamId);
 
 /// Cancel a subscription to a service stream.
-void _vmCancelStream(String streamId) native 'VMService_CancelStream';
+@pragma("vm:external-name", "VMService_CancelStream")
+external void _vmCancelStream(String streamId);
 
 /// Get the bytes to the tar archive.
-Uint8List _requestAssets() native 'VMService_RequestAssets';
+@pragma("vm:external-name", "VMService_RequestAssets")
+external Uint8List _requestAssets();
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 60c3a7a..74404cf 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -2,8 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Skip # https://github.com/dart-lang/co19/issues/1137
-Language/Libraries_and_Scripts/Scripts/top_level_main_t06: Skip # https://github.com/dart-lang/co19/issues/1137
 LibTest/io/HttpClient/findProxy_A01_t01: Skip # https://github.com/dart-lang/co19/issues/1129
 LibTest/io/HttpClient/findProxy_A01_t02: Skip # https://github.com/dart-lang/co19/issues/1129
 LibTest/io/HttpClient/findProxy_A02_t01: Skip # https://github.com/dart-lang/co19/issues/1129
@@ -14,6 +12,3 @@
 LanguageFeatures/nnbd/static/strong/*: SkipByDesign # Strong mode tests should not be run with analyzer
 LanguageFeatures/nnbd/static/weak/*: SkipByDesign # Weak mode tests should not be run with analyzer
 
-[ $compiler == dart2js || $compiler == dartdevk ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io.
-Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipByDesign # Uses dart:io.
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index b16c875..7c9e1b7 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -8,7 +8,6 @@
 Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number
-Language/Expressions/Null/instance_of_class_null_t01: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/522.
 Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number
@@ -20,6 +19,8 @@
 Language/Functions/External_Functions/not_connected_to_a_body_t01: SkipByDesign # Non-JS-interop external members are not supported
 Language/Libraries_and_Scripts/Scripts/main_optional_parameters_t01: SkipByDesign # https://github.com/dart-lang/co19/issues/952
 Language/Libraries_and_Scripts/Scripts/main_optional_parameters_t03: SkipByDesign # https://github.com/dart-lang/co19/issues/952
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io.
+Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipByDesign # Uses dart:io.
 Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported
 Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported
 Language/Metadata/before*: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523.
diff --git a/tests/co19/co19-dartdevc.status b/tests/co19/co19-dartdevc.status
index f0c1a51..683bc51 100644
--- a/tests/co19/co19-dartdevc.status
+++ b/tests/co19/co19-dartdevc.status
@@ -8,7 +8,6 @@
 Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number
-Language/Expressions/Null/instance_of_class_null_t01: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/522
 Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number
@@ -18,6 +17,8 @@
 Language/Expressions/Shift/integer_t07: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign # dart:isolate not supported.
 Language/Functions/External_Functions/not_connected_to_a_body_t01: SkipByDesign # External variables are not supported
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io.
+Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipByDesign # Uses dart:io.
 Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported
 Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported
 Language/Metadata/before*: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523
@@ -43,7 +44,6 @@
 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
@@ -57,21 +57,23 @@
 LibTest/io/*: SkipByDesign # dart:io not supported.
 LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
 LibTest/mirrors/*: SkipByDesign # dart:mirrors is not supported
-LibTest/typed_data/ByteBuffer/*: SkipByDesign # not supported on the web
-LibTest/typed_data/ByteData/getInt64_A01_t01: SkipByDesign # uses integer literal not representable as JavaScript number
-LibTest/typed_data/ByteData/getInt64_A02_t01: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/getInt64_A02_t02: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/getUint64_A01_t01: SkipByDesign # uses integer literal not representable as JavaScript number
-LibTest/typed_data/ByteData/getUint64_A02_t01: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/getUint64_A02_t02: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/setInt64_A01_t01: SkipByDesign # Buses integer literal not representable as JavaScript number
-LibTest/typed_data/ByteData/setInt64_A02_t01: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/setInt64_A02_t02: SkipByDesign # Int64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/setUint64_A01_t01: SkipByDesign # uses integer literal not representable as JavaScript number
-LibTest/typed_data/ByteData/setUint64_A02_t01: SkipByDesign # Uint64 accessor not supported by dart2js
-LibTest/typed_data/ByteData/setUint64_A02_t02: SkipByDesign # Uint64 accessor not supported by dart2js
-LibTest/typed_data/Int32x4/operator_OR_A01_t01: SkipByDesign # Bitwise operations in JS are unsigned.
-LibTest/typed_data/Int32x4List/join_A01_t01: SkipByDesign # Different string represrntation on VM and in JS
-LibTest/typed_data/Int32x4List/join_A01_t02: SkipByDesign # Different string represrntation on VM and in JS
+LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteData/getInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web
 LibTest/typed_data/Int64List/*: SkipByDesign # Int64List not supported on the web
 LibTest/typed_data/Uint64List/*: SkipByDesign # Uint64List not supported on the web
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index c62ddcc..92bf7b5 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -2,9 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-[ $compiler == dartk ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash # https://github.com/dart-lang/sdk/issues/42487
-
 [ $runtime == dart_precompiled ]
 Language/Metadata/syntax_t10: SkipByDesign # dart:mirrors is not supported
 LibTest/io/RawDatagramSocket/join_A01_t01: Skip # https://github.com/dart-lang/co19/issues/195
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index f810625..d3b0fe3 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -24,6 +24,8 @@
 LibTest/async/Stream/Stream.periodic_all_t02: Skip # Issue 42898
 
 [ $arch == simarm || $arch == simarm64 || $arch == simarm64c ]
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipSlow # Very slow on sim* architectures.
+Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipSlow # Very slow on sim* architectures.
 LibTest/collection/ListBase/ListBase_class_A01_t01: SkipSlow # Very slow on sim* architectures.
 LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # Very slow on sim* architectures.
 LibTest/collection/ListBase/ListBase_class_A01_t05: SkipSlow # Very slow on sim* architectures.
@@ -35,5 +37,4 @@
 LibTest/ffi/*: SkipByDesign # dart:ffi is not supported on sim architectures
 
 [ $compiler == fasta || $runtime == dart_precompiled || $runtime == vm ]
-Language/Expressions/Numbers/syntax_t34: SkipByDesign # expects integer literal error that only occurs in JS
 LibTest/html/*: SkipByDesign # dart:html not supported on VM.
diff --git a/tests/co19/update.sh b/tests/co19/update.sh
index 85e8019..abce487 100755
--- a/tests/co19/update.sh
+++ b/tests/co19/update.sh
@@ -18,7 +18,7 @@
 NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/master)
 
 git fetch origin
-git branch cl-co19-roll-co19-to-$NEW origin/master
+git branch cl-co19-roll-co19-to-$NEW origin/main
 git checkout cl-co19-roll-co19-to-$NEW
 
 # Build a cipd package of the commit.
@@ -50,7 +50,7 @@
   "$(printf "[co19] Roll co19 to $NEW\n\n" \
   && cd $CO19 \
   && git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
-    | tr -d '#' \
+    | sed 's/\#/dart-lang\/co19\#/g' \
   && printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"
 
 rm -rf tests/co19/src.git
diff --git a/tests/co19_2/co19_2-co19.status b/tests/co19_2/co19_2-co19.status
index ff5abb6..f8609dc 100644
--- a/tests/co19_2/co19_2-co19.status
+++ b/tests/co19_2/co19_2-co19.status
@@ -8,8 +8,7 @@
 Language/Generics/typedef_A08_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483
 Language/Generics/typedef_A08_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483
 Language/Generics/typedef_A08_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Skip # https://github.com/dart-lang/co19/issues/1137
-Language/Libraries_and_Scripts/Scripts/top_level_main_t06: Skip # https://github.com/dart-lang/co19/issues/1137
+LibTest/io/RawDatagramSocket/*: Skip # https://github.com/dart-lang/co19/issues/195
 
 [ $compiler == dart2js || $compiler == dartdevk ]
 Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io.
diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status
index 177ae2a..29cbe78 100644
--- a/tests/co19_2/co19_2-dart2js.status
+++ b/tests/co19_2/co19_2-dart2js.status
@@ -3,7 +3,13 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dart2js ]
-Language/Expressions/Null/instance_of_class_null_t01: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/522.
+Language/Expressions/Constants/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t09: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Object_Identity/object_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/42222#issuecomment-640431711
@@ -12,6 +18,18 @@
 Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported
 Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported
 Language/Metadata/before*: SkipByDesign # 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.
 LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: SkipByDesign # Int64List not supported on the web
diff --git a/tests/co19_2/co19_2-dartdevc.status b/tests/co19_2/co19_2-dartdevc.status
index 9e86a17..13e01d6 100644
--- a/tests/co19_2/co19_2-dartdevc.status
+++ b/tests/co19_2/co19_2-dartdevc.status
@@ -52,18 +52,36 @@
 Language/Classes/Instance_Variables/definition_t02: SkipSlow
 Language/Classes/Instance_Variables/definition_t04: SkipSlow
 Language/Classes/Setters/instance_setter_t01: SkipSlow
+Language/Expressions/Constants/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Function_Invocation/async_generator_invokation_t08: SkipSlow
 Language/Expressions/Function_Invocation/async_generator_invokation_t10: SkipSlow
-Language/Expressions/Null/instance_of_class_null_t01: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/522.
+Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number
 Language/Expressions/Numbers/syntax_t09: SkipByDesign # uses integer literal not representable as JavaScript number
+Language/Expressions/Object_Identity/object_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/42222#issuecomment-640431711
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign # dart:isolate not supported.
 Language/Functions/External_Functions/not_connected_to_a_body_t01: SkipByDesign # External variables are not supported
 Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported
 Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported
 Language/Metadata/before*: SkipByDesign # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523.
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: SkipByDesign # binary '~' produces different results in JavaScript and Dart
 Language/Types/Interface_Types/subtype_t27: SkipSlow
 Language/Types/Interface_Types/subtype_t28: SkipSlow
+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/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: SkipSlow
 LibTest/html/Element/blur_A01_t01: SkipSlow
 LibTest/html/Element/focus_A01_t01: SkipSlow
@@ -86,3 +104,23 @@
 LibTest/html/IFrameElement/onTransitionEnd_A01_t01: SkipSlow
 LibTest/io/*: SkipByDesign # dart:io not supported.
 LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
+LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: SkipByDesign # UInt64List not supported on the web
+LibTest/typed_data/ByteData/getInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/getUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/ByteData/setUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web
+LibTest/typed_data/Int64List/*: SkipByDesign # Int64List not supported on the web
+LibTest/typed_data/Uint64List/*: SkipByDesign # Uint64List not supported on the web
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 660bb98..0ea8baf 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -2,12 +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.
 
-[ $compiler == dartk ]
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: Crash
-
 [ $compiler == fasta ]
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t04: SkipByDesign # Won't fix. See https://github.com/dart-lang/sdk/issues/46288
 
+[ $runtime == dart_precompiled ]
+LibTest/io/RawDatagramSocket/join_A01_t01: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/join_A01_t02: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/join_A02_t01: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/multicastInterface_A01_t01: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/receive_A02_t02: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/reduce_A01_t01: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/reduce_A02_t02: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/io/RawDatagramSocket/reduce_A04_t01: Skip # https://github.com/dart-lang/co19/issues/195
+LibTest/mirrors/*: SkipByDesign # dart:mirrors is not supported
+
 [ $runtime == vm ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Slow, Pass # Does many calls
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Slow, Pass # Does many calls
@@ -22,10 +30,13 @@
 LibTest/core/List/List_class_A01_t02: Slow, Pass
 LibTest/core/List/List_class_A01_t03: Slow, Pass
 
+[ $runtime == dart_precompiled && ($arch == simarm64 || $arch == simarm64c) ]
+LibTest/collection/ListBase/ListBase_class_A01_t01: SkipSlow # Issue 43036
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: SkipSlow # Issue 43036
+
 # It makes no sense to run any test that uses spawnURI under the simulator
 # as that would involve running CFE (the front end) in simulator mode
 # to compile the URI file specified in spawnURI code.
 # These Isolate tests that use spawnURI are hence skipped on purpose.
 [ $runtime == dart_precompiled || $runtime == vm && ($arch == simarm || $arch == simarm64 || $arch == simarm64c) ]
 LibTest/isolate/Isolate/spawnUri*: Skip
-
diff --git a/tests/co19_2/co19_2-runtime.status b/tests/co19_2/co19_2-runtime.status
index c9cfe7d..2871e90 100644
--- a/tests/co19_2/co19_2-runtime.status
+++ b/tests/co19_2/co19_2-runtime.status
@@ -2,16 +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.
 
-[ $runtime != none ]
-LibTest/core/Uri/hasEmptyPath_A01_t01: RuntimeError
-LibTest/core/Uri/parse_A05_t01: RuntimeError
-
 [ $system == windows ]
 LibTest/io/ProcessResult/exitCode_A01_t02: Skip # Issue 43645
 
-[ $compiler != dart2js && $runtime != none && $runtime != vm && !$checked ]
-LibTest/async/Future/catchError_A03_t05: RuntimeError
-
 [ $mode == debug && $runtime == dart_precompiled ]
 LibTest/collection/ListBase/ListBase_class_A01_t03: SkipSlow # Very slow compilation in debug mode.
 LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # Very slow compilation in debug mode.
@@ -22,6 +15,9 @@
 LibTest/collection/ListMixin/ListMixin_class_A01_t05: SkipSlow # Very slow compilation in debug mode.
 LibTest/collection/ListMixin/ListMixin_class_A01_t06: SkipSlow # Very slow compilation in debug mode.
 
+[ $runtime == dart_precompiled && ($arch == simarm64 || $arch == simarm64c) ]
+LibTest/async/Stream/Stream.periodic_all_t02: Skip # Issue 42898
+
 [ $arch == simarm || $arch == simarm64 || $arch == simarm64c ]
 LibTest/collection/ListBase/ListBase_class_A01_t01: SkipSlow # Very slow on sim* architectures.
 LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # Very slow on sim* architectures.
diff --git a/tests/co19_2/update.sh b/tests/co19_2/update.sh
index 3bac8ab..b70d919 100755
--- a/tests/co19_2/update.sh
+++ b/tests/co19_2/update.sh
@@ -18,7 +18,7 @@
 NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/pre-nnbd)
 
 git fetch origin
-git branch cl-co19-roll-co19-to-$NEW origin/master
+git branch cl-co19-roll-co19-to-$NEW origin/main
 git checkout cl-co19-roll-co19-to-$NEW
 
 # Build a cipd package of the commit.
@@ -33,32 +33,32 @@
 # Update DEPS:
 gclient setdep --var=co19_2_rev=$NEW
 
+BUILDERS=$(jq -r '.builder_configurations
+  | map(select(.steps
+    | any(.arguments
+      | select(.!=null)
+        | any(test("co19_2($|(/.*))")))))
+  | map(.builders)
+  | flatten
+  | sort
+  | .[] += "-try"
+  | join(",")' \
+  tools/bots/test_matrix.json)
+
 # Make a nice commit. Don't include the '#' character to avoid referencing Dart
 # SDK issues.
 git commit DEPS -m \
-  "$(printf "[co19] Roll co19_2 to $NEW\n\n" &&
-     cd $CO19 &&
-     git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' \
-       $OLD..$NEW | tr -d '#')"
+  "$(printf "[co19] Roll co19_2 to $NEW\n\n" \
+  && cd $CO19 \
+  && git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \
+    | sed 's/\#/dart-lang\/co19\#/g' \
+  && printf "\nCq-Include-Trybots: dart/try:$BUILDERS\n")"
 
 rm -rf tests/co19_2/src.git
 
 GIT_EDITOR=true git cl upload
 ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue)
 
-BUILDERS=$(jq '.builder_configurations|
-                map(select(.steps|
-                           any(.arguments|
-                               select(.!=null)|
-                               any(.=="co19_2"))))|
-                map(.builders)|
-                flatten|
-                sort' \
-                tools/bots/test_matrix.json \
-             | tr -d '[",]')
-
-git cl try -B dart/try $(for BUILDER in $BUILDERS; do echo -b $BUILDER-try; done)
-
 git cl web
 
 set +x
diff --git a/tests/corelib/duration_test.dart b/tests/corelib/duration_test.dart
index 842f4b0..1f8c543 100644
--- a/tests/corelib/duration_test.dart
+++ b/tests/corelib/duration_test.dart
@@ -281,6 +281,14 @@
   d = const Duration(microseconds: 1000000);
   Expect.equals("0:00:01.000000", d.toString());
 
+  // Regression test: Infinite loop prior to fix.
+  d = const Duration(microseconds: -0x8000000000000000);
+  Expect.equals("-2562047788:00:54.775808", d.toString());
+
+  d = const Duration(
+      hours: -2562047788, minutes: 0, seconds: -54, microseconds: -775808);
+  Expect.equals(-0x8000000000000000, d.inMicroseconds);
+
   d1 = const Duration(hours: 1);
   d2 = const Duration(hours: -1);
   Expect.isFalse(d1.isNegative);
diff --git a/tests/corelib/symbol_arbitrary_string_test.dart b/tests/corelib/symbol_arbitrary_string_test.dart
index c4c4d25..ff6cf56 100644
--- a/tests/corelib/symbol_arbitrary_string_test.dart
+++ b/tests/corelib/symbol_arbitrary_string_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// Note that this library violates the formatting provided by `dartfmt` in
+// Note that this library violates the formatting provided by `dart format` in
 // a few locations, to verify that `"""...""""z"` can be parsed as two
-// consecutive strings, `dartfmt` will insert whitespace before `"z"`.
+// consecutive strings, `dart format` will insert whitespace before `"z"`.
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/corelib_2/duration_test.dart b/tests/corelib_2/duration_test.dart
index 09a5141..1e5c5a3 100644
--- a/tests/corelib_2/duration_test.dart
+++ b/tests/corelib_2/duration_test.dart
@@ -283,6 +283,14 @@
   d = const Duration(microseconds: 1000000);
   Expect.equals("0:00:01.000000", d.toString());
 
+  // Regression test: Infinite loop prior to fix.
+  d = const Duration(microseconds: -0x8000000000000000);
+  Expect.equals("-2562047788:00:54.775808", d.toString());
+
+  d = const Duration(
+      hours: -2562047788, minutes: 0, seconds: -54, microseconds: -775808);
+  Expect.equals(-0x8000000000000000, d.inMicroseconds);
+
   d1 = const Duration(hours: 1);
   d2 = const Duration(hours: -1);
   Expect.isFalse(d1.isNegative);
diff --git a/tests/corelib_2/string_interpolation_error_test.dart b/tests/corelib_2/string_interpolation_error_test.dart
new file mode 100644
index 0000000..b9764e6
--- /dev/null
+++ b/tests/corelib_2/string_interpolation_error_test.dart
@@ -0,0 +1,30 @@
+// 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.
+
+// @dart = 2.9
+
+import "package:expect/expect.dart";
+
+class BadToString {
+  @override
+  String toString() => null;
+}
+
+void test(expected, object) {
+  var message = '';
+  if (expected == null) {
+    Expect.throws(() => '$object',
+        (error) => '$error'.contains("toString method returned 'null'"));
+  } else {
+    Expect.equals(expected, '$object');
+  }
+}
+
+void main() {
+  test("123", 123);
+  test("null", null);
+  test(null, BadToString());
+  test(null, [BadToString()]);
+  test(null, {BadToString()});
+}
diff --git a/tests/ffi/ffi.status b/tests/ffi/ffi.status
index c54ce09..5335837 100644
--- a/tests/ffi/ffi.status
+++ b/tests/ffi/ffi.status
@@ -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.
 
+function_callbacks_structs_by_value_test: Pass, Slow # https://dartbug.com/47304 https://dartbug.com/45007
+function_structs_by_value_generated_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007
+
 [ $builder_tag == msan ]
 vmspecific_handle_test: Skip # https://dartbug.com/42314
 
@@ -14,9 +17,6 @@
 [ $system == android ]
 *: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489
 
-[ $arch == arm && $system == linux ]
-function_callbacks_structs_by_value_test: Slow # QEMU https://dartbug.com/45007
-
 [ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ]
 *: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
 
diff --git a/tests/ffi/ffi_native_test.dart b/tests/ffi/ffi_native_test.dart
index 12ca0dd..074e236 100644
--- a/tests/ffi/ffi_native_test.dart
+++ b/tests/ffi/ffi_native_test.dart
@@ -1,51 +1,28 @@
 // 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.
-//
-// SharedObjects=ffi_test_functions
 
 // NOTE: There is no `test/ffi_2/...` version of this test since annotations
 // with type arguments isn't supported in that version of Dart.
 
 import 'dart:ffi';
 
-import 'package:expect/expect.dart';
-
-import 'dylib_utils.dart';
-
-final nativeLib = dlopenPlatformSpecific('ffi_test_functions');
-final getRootLibraryUrl = nativeLib
-    .lookupFunction<Handle Function(), Object Function()>('GetRootLibraryUrl');
-final setFfiNativeResolverForTest = nativeLib
-    .lookupFunction<Void Function(Handle), void Function(Object)>('SetFfiNativeResolverForTest');
-
-@FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')
-external int returnIntPtr(int x);
-
-@FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr', isLeaf: true)
-external int returnIntPtrLeaf(int x);
-
-@FfiNative<IntPtr Function()>('IsThreadInGenerated')
-external int isThreadInGenerated();
-
-@FfiNative<IntPtr Function()>('IsThreadInGenerated', isLeaf: true)
-external int isThreadInGeneratedLeaf();
-
 // Error: FFI leaf call must not have Handle return type.
-@FfiNative<Handle Function()>("foo", isLeaf: true)  //# 01: compile-time error
-external Object foo();  //# 01: compile-time error
+@FfiNative<Handle Function()>("foo", isLeaf: true) //# 01: compile-time error
+external Object foo(); //# 01: compile-time error
 
 // Error: FFI leaf call must not have Handle argument types.
-@FfiNative<Void Function(Handle)>("bar", isLeaf: true)  //# 02: compile-time error
-external void bar(Object);  //# 02: compile-time error
+@FfiNative<Void Function(Handle)>("bar", //# 02: compile-time error
+    isLeaf: true) //# 02: compile-time error
+external void bar(Object); //# 02: compile-time error
 
 class Classy {
   @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')
   external static int returnIntPtrStatic(int x);
 
   // Error: FfiNative annotations can only be used on static functions.
-  @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')  //# 03: compile-time error
-  external int returnIntPtrMethod(int x);  //# 03: compile-time error
+  @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr') //# 03: compile-time error
+  external int returnIntPtrMethod(int x); //# 03: compile-time error
 }
 
 // Regression test: Ensure same-name FfiNative functions don't collide in the
@@ -54,24 +31,10 @@
   @FfiNative<Void Function()>('nop')
   external static void foo();
 }
+
 class B {
   @FfiNative<Void Function()>('nop')
   external static void foo();
 }
 
-void main() {
-  // Register test resolver for top-level functions above.
-  final root_lib_url = getRootLibraryUrl();
-  setFfiNativeResolverForTest(root_lib_url);
-
-  // Test we can call FfiNative functions.
-  Expect.equals(123, returnIntPtr(123));
-  Expect.equals(123, returnIntPtrLeaf(123));
-  Expect.equals(123, Classy.returnIntPtrStatic(123));
-
-  // Test FfiNative leaf calls remain in generated code.
-  // Regular calls should transition generated -> native.
-  Expect.equals(0, isThreadInGenerated());
-  // Leaf calls should remain in generated state.
-  Expect.equals(1, isThreadInGeneratedLeaf());
-}
+void main() {/* Intentionally empty: Compile-time error tests. */}
diff --git a/tests/ffi/function_callbacks_structs_by_value_generated_test.dart b/tests/ffi/function_callbacks_structs_by_value_generated_test.dart
index f843c7c..a7c9590 100644
--- a/tests/ffi/function_callbacks_structs_by_value_generated_test.dart
+++ b/tests/ffi/function_callbacks_structs_by_value_generated_test.dart
@@ -615,16 +615,26 @@
     Struct1ByteInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct1ByteInt passStruct1ByteIntx10_a0 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a1 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a2 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a3 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a4 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a5 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a6 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a7 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a8 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a9 = Struct1ByteInt();
+Struct1ByteInt passStruct1ByteIntx10_a0 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a1 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a2 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a3 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a4 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a5 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a6 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a7 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a8 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a9 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct1ByteIntx10Result = 0;
@@ -712,25 +722,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a0 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a1 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a2 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a3 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a4 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a5 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a6 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a7 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a8 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a9 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesHomogeneousUint8x10Result = 0;
@@ -838,25 +848,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a0 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a1 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a2 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a3 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a4 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a5 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a6 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a7 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a8 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a9 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesInt2ByteAlignedx10Result = 0;
@@ -955,25 +965,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a0 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a2 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a3 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a4 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a5 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a6 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a7 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a8 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a9 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct4BytesHomogeneousInt16x10Result = 0;
@@ -1071,25 +1081,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a0 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a1 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a2 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a3 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a4 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a5 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a6 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a7 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a8 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a9 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct7BytesHomogeneousUint8x10Result = 0;
@@ -1237,25 +1247,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a0 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a1 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a2 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a3 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a4 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a5 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a6 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a7 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a8 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a9 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct7BytesInt4ByteAlignedx10Result = 0;
@@ -1363,16 +1373,26 @@
     Struct8BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesInt passStruct8BytesIntx10_a0 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a1 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a2 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a3 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a4 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a5 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a6 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a7 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a8 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a9 = Struct8BytesInt();
+Struct8BytesInt passStruct8BytesIntx10_a0 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a1 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a2 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a3 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a4 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a5 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a6 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a7 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a8 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a9 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesIntx10Result = 0;
@@ -1480,25 +1500,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a1 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a2 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a3 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a4 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a5 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a6 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a7 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a8 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a9 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesHomogeneousFloatx10Result = 0.0;
@@ -1595,16 +1615,26 @@
     Struct8BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesMixed passStruct8BytesMixedx10_a0 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a1 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a2 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a3 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a4 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a5 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a6 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a7 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a8 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a9 = Struct8BytesMixed();
+Struct8BytesMixed passStruct8BytesMixedx10_a0 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a1 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a2 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a3 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a4 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a5 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a6 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a7 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a8 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a9 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesMixedx10Result = 0.0;
@@ -1712,25 +1742,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a0 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a1 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a2 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a3 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a4 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a5 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a6 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a7 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a8 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a9 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct9BytesHomogeneousUint8x10Result = 0;
@@ -1901,25 +1931,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a0 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a1 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a2 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a3 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a4 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a5 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a6 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a7 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a8 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a9 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct9BytesInt4Or8ByteAlignedx10Result = 0;
@@ -2016,17 +2046,17 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a0 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a1 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a2 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a3 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a4 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a5 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct12BytesHomogeneousFloatx6Result = 0.0;
@@ -2110,15 +2140,15 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a0 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a1 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a2 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a3 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a4 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesHomogeneousFloatx5Result = 0.0;
@@ -2206,16 +2236,26 @@
     Struct16BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Struct16BytesMixed passStruct16BytesMixedx10_a0 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a1 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a2 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a3 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a4 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a5 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a6 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a7 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a8 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a9 = Struct16BytesMixed();
+Struct16BytesMixed passStruct16BytesMixedx10_a0 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a1 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a2 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a3 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a4 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a5 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a6 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a7 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a8 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a9 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesMixedx10Result = 0.0;
@@ -2314,16 +2354,26 @@
     Struct16BytesMixed2);
 
 // Global variables to be able to test inputs after callback returned.
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a0 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a1 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a2 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a3 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a4 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a5 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a6 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a7 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a8 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a9 = Struct16BytesMixed2();
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a0 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a1 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a2 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a3 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a4 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a5 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a6 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a7 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a8 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a9 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesMixed2x10Result = 0.0;
@@ -2442,16 +2492,26 @@
     Struct17BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct17BytesInt passStruct17BytesIntx10_a0 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a1 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a2 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a3 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a4 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a5 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a6 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a7 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a8 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a9 = Struct17BytesInt();
+Struct17BytesInt passStruct17BytesIntx10_a0 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a1 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a2 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a3 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a4 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a5 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a6 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a7 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a8 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a9 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct17BytesIntx10Result = 0;
@@ -2559,25 +2619,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a0 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a1 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a2 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a3 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a4 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a5 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a6 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a7 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a8 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a9 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct19BytesHomogeneousUint8x10Result = 0;
@@ -2847,25 +2907,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a0 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a1 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a2 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a3 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a4 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a5 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a6 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a7 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a8 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a9 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct20BytesHomogeneousInt32x10Result = 0;
@@ -2987,7 +3047,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousFloat passStruct20BytesHomogeneousFloat_a0 =
-    Struct20BytesHomogeneousFloat();
+    Pointer<Struct20BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct20BytesHomogeneousFloatResult = 0.0;
@@ -3044,15 +3104,15 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a0 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a1 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a2 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a3 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a4 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct32BytesHomogeneousDoublex5Result = 0.0;
@@ -3132,7 +3192,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct40BytesHomogeneousDouble passStruct40BytesHomogeneousDouble_a0 =
-    Struct40BytesHomogeneousDouble();
+    Pointer<Struct40BytesHomogeneousDouble>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct40BytesHomogeneousDoubleResult = 0.0;
@@ -3185,7 +3245,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct1024BytesHomogeneousUint64 passStruct1024BytesHomogeneousUint64_a0 =
-    Struct1024BytesHomogeneousUint64();
+    Pointer<Struct1024BytesHomogeneousUint64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct1024BytesHomogeneousUint64Result = 0;
@@ -3372,19 +3432,19 @@
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a0 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a2 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a4 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a6 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3486,19 +3546,19 @@
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a0 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a2 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a4 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a6 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3591,16 +3651,16 @@
 // Global variables to be able to test inputs after callback returned.
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a0 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a2 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a4 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a6 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a8 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3703,13 +3763,13 @@
 double passDoublex6Struct16BytesMixedx4Int32_a4 = 0.0;
 double passDoublex6Struct16BytesMixedx4Int32_a5 = 0.0;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a6 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a8 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a9 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passDoublex6Struct16BytesMixedx4Int32_a10 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3810,13 +3870,13 @@
 int passInt32x4Struct16BytesMixedx4Double_a2 = 0;
 int passInt32x4Struct16BytesMixedx4Double_a3 = 0;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a4 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a5 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a6 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 double passInt32x4Struct16BytesMixedx4Double_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3901,13 +3961,13 @@
 // Global variables to be able to test inputs after callback returned.
 Struct40BytesHomogeneousDouble
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0 =
-    Struct40BytesHomogeneousDouble();
+    Pointer<Struct40BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct40BytesHomogeneousDoubleStruct4BytesHomoResult = 0.0;
@@ -4032,37 +4092,37 @@
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a16 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a17 = 0;
 Struct1ByteInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a18 =
-    Struct1ByteInt();
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a19 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a20 = 0;
 Struct4BytesHomogeneousInt16
     passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a22 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a23 = 0;
 Struct8BytesInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24 =
-    Struct8BytesInt();
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a25 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a26 = 0;
 Struct8BytesHomogeneousFloat
     passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a28 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a29 = 0;
 Struct8BytesMixed passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30 =
-    Struct8BytesMixed();
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a31 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a32 = 0;
 StructAlignmentInt16 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a34 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a35 = 0;
 StructAlignmentInt32 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a37 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a38 = 0;
 StructAlignmentInt64 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntResult = 0.0;
@@ -4243,7 +4303,8 @@
 typedef PassStructAlignmentInt16Type = Int64 Function(StructAlignmentInt16);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt16 passStructAlignmentInt16_a0 = StructAlignmentInt16();
+StructAlignmentInt16 passStructAlignmentInt16_a0 =
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt16Result = 0;
@@ -4292,7 +4353,8 @@
 typedef PassStructAlignmentInt32Type = Int64 Function(StructAlignmentInt32);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt32 passStructAlignmentInt32_a0 = StructAlignmentInt32();
+StructAlignmentInt32 passStructAlignmentInt32_a0 =
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt32Result = 0;
@@ -4341,7 +4403,8 @@
 typedef PassStructAlignmentInt64Type = Int64 Function(StructAlignmentInt64);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt64 passStructAlignmentInt64_a0 = StructAlignmentInt64();
+StructAlignmentInt64 passStructAlignmentInt64_a0 =
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt64Result = 0;
@@ -4400,16 +4463,26 @@
     Struct8BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a0 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a1 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a2 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a3 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a4 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a5 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a6 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a7 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a8 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a9 = Struct8BytesNestedInt();
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a0 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a1 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a2 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a3 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a4 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a5 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a6 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a7 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a8 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a9 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesNestedIntx10Result = 0;
@@ -4527,25 +4600,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a0 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a1 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a2 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a3 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a4 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a5 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a6 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a7 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a8 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a9 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedFloatx10Result = 0.0;
@@ -4643,25 +4716,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a0 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a1 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a2 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a3 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a4 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a5 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a6 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a7 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a8 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a9 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedFloat2x10Result = 0.0;
@@ -4761,25 +4834,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a0 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a1 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a2 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a3 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a4 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a5 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a6 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a7 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a8 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a9 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedMixedx10Result = 0.0;
@@ -4878,9 +4951,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesNestedInt passStruct16BytesNestedIntx2_a0 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 Struct16BytesNestedInt passStruct16BytesNestedIntx2_a1 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct16BytesNestedIntx2Result = 0;
@@ -4946,9 +5019,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct32BytesNestedInt passStruct32BytesNestedIntx2_a0 =
-    Struct32BytesNestedInt();
+    Pointer<Struct32BytesNestedInt>.fromAddress(0).ref;
 Struct32BytesNestedInt passStruct32BytesNestedIntx2_a1 =
-    Struct32BytesNestedInt();
+    Pointer<Struct32BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct32BytesNestedIntx2Result = 0;
@@ -5030,7 +5103,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt16 passStructNestedIntStructAlignmentInt16_a0 =
-    StructNestedIntStructAlignmentInt16();
+    Pointer<StructNestedIntStructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt16Result = 0;
@@ -5086,7 +5159,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt32 passStructNestedIntStructAlignmentInt32_a0 =
-    StructNestedIntStructAlignmentInt32();
+    Pointer<StructNestedIntStructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt32Result = 0;
@@ -5142,7 +5215,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt64 passStructNestedIntStructAlignmentInt64_a0 =
-    StructNestedIntStructAlignmentInt64();
+    Pointer<StructNestedIntStructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt64Result = 0;
@@ -5201,13 +5274,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a0 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a1 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a2 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a3 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructNestedIrregularEvenBiggerx4Result = 0.0;
@@ -5402,13 +5475,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a0 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a1 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a2 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a3 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesInlineArrayIntx4Result = 0;
@@ -5498,13 +5571,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a0 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a1 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a2 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a3 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructInlineArrayIrregularx4Result = 0;
@@ -5579,7 +5652,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructInlineArray100Bytes passStructInlineArray100Bytes_a0 =
-    StructInlineArray100Bytes();
+    Pointer<StructInlineArray100Bytes>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructInlineArray100BytesResult = 0;
@@ -5732,19 +5805,19 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a0 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a1 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a2 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a3 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a4 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct16BytesHomogeneousFloat2x5Result = 0.0;
@@ -5829,19 +5902,19 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a0 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a1 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a2 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a3 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a4 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct32BytesHomogeneousDouble2x5Result = 0.0;
@@ -5930,25 +6003,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a0 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a1 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a2 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a3 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a4 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a5 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a6 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a7 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a8 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a9 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct16BytesMixed3x10Result = 0.0;
@@ -6088,15 +6161,15 @@
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a0 = 0;
 Struct32BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a1 =
-    Struct32BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct32BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a2 = 0;
 Struct8BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a3 =
-    Struct8BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct8BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a4 = 0;
 Struct8BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a5 =
-    Struct8BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct8BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a6 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -6248,7 +6321,7 @@
 int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a0 = 0;
 Struct4BytesInlineArrayMultiDimensionalInt
     passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1 =
-    Struct4BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct4BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a2 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -6318,16 +6391,26 @@
     Struct3BytesPackedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a0 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a1 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a2 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a3 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a4 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a5 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a6 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a7 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a8 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a9 = Struct3BytesPackedInt();
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a0 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a1 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a2 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a3 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a4 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a5 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a6 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a7 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a8 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a9 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesPackedIntx10Result = 0;
@@ -6423,16 +6506,26 @@
     Struct8BytesPackedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a0 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a1 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a2 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a3 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a4 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a5 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a6 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a7 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a8 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a9 = Struct8BytesPackedInt();
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a0 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a1 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a2 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a3 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a4 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a5 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a6 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a7 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a8 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a9 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesPackedIntx10Result = 0;
@@ -6562,25 +6655,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a0 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a1 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a2 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a3 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a4 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a5 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a6 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a7 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a8 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a9 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 double passStruct9BytesPackedMixedx10DoubleInt32x2_a10 = 0.0;
 int passStruct9BytesPackedMixedx10DoubleInt32x2_a11 = 0;
 int passStruct9BytesPackedMixedx10DoubleInt32x2_a12 = 0;
@@ -6682,7 +6775,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct5BytesPackedMixed passStruct5BytesPackedMixed_a0 =
-    Struct5BytesPackedMixed();
+    Pointer<Struct5BytesPackedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct5BytesPackedMixedResult = 0.0;
@@ -6733,7 +6826,7 @@
 // Global variables to be able to test inputs after callback returned.
 StructNestedAlignmentStruct5BytesPackedMixed
     passStructNestedAlignmentStruct5BytesPackedMixed_a0 =
-    StructNestedAlignmentStruct5BytesPackedMixed();
+    Pointer<StructNestedAlignmentStruct5BytesPackedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructNestedAlignmentStruct5BytesPackedMixedResult = 0.0;
@@ -6788,7 +6881,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct6BytesInlineArrayInt passStruct6BytesInlineArrayInt_a0 =
-    Struct6BytesInlineArrayInt();
+    Pointer<Struct6BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct6BytesInlineArrayIntResult = 0.0;
@@ -6840,7 +6933,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct15BytesInlineArrayMixed passStruct15BytesInlineArrayMixed_a0 =
-    Struct15BytesInlineArrayMixed();
+    Pointer<Struct15BytesInlineArrayMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct15BytesInlineArrayMixedResult = 0.0;
@@ -6902,16 +6995,26 @@
     Union4BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Union4BytesMixed passUnion4BytesMixedx10_a0 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a1 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a2 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a3 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a4 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a5 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a6 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a7 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a8 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a9 = Union4BytesMixed();
+Union4BytesMixed passUnion4BytesMixedx10_a0 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a1 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a2 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a3 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a4 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a5 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a6 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a7 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a8 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a9 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion4BytesMixedx10Result = 0.0;
@@ -6998,25 +7101,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a0 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a1 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a2 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a3 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a4 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a5 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a6 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a7 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a8 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a9 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion8BytesNestedFloatx10Result = 0.0;
@@ -7102,16 +7205,26 @@
     Union9BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a0 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a1 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a2 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a3 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a4 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a5 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a6 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a7 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a8 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a9 = Union9BytesNestedInt();
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a0 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a1 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a2 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a3 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a4 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a5 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a6 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a7 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a8 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a9 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion9BytesNestedIntx10Result = 0.0;
@@ -7219,34 +7332,34 @@
 // Global variables to be able to test inputs after callback returned.
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a0 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a1 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a2 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a3 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a4 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a5 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a6 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a7 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a8 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a9 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion16BytesNestedInlineArrayFloatx10Result = 0.0;
@@ -7364,25 +7477,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a0 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a1 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a2 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a3 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a4 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a5 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a6 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a7 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a8 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a9 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion16BytesNestedFloatx10Result = 0.0;
@@ -9820,7 +9933,8 @@
     Struct8BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesInt returnUnion9BytesNestedInt_a0 = Struct8BytesInt();
+Struct8BytesInt returnUnion9BytesNestedInt_a0 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Union9BytesNestedInt> returnUnion9BytesNestedIntResultPointer = nullptr;
@@ -9874,7 +9988,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat returnUnion16BytesNestedFloat_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Union16BytesNestedFloat> returnUnion16BytesNestedFloatResultPointer =
@@ -9928,10 +10042,12 @@
     Struct1ByteInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct1ByteInt returnStructArgumentStruct1ByteInt_a0 = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentStruct1ByteInt_a0 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
-Struct1ByteInt returnStructArgumentStruct1ByteIntResult = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentStruct1ByteIntResult =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 Struct1ByteInt returnStructArgumentStruct1ByteIntCalculateResult() {
   Struct1ByteInt result = returnStructArgumentStruct1ByteInt_a0;
@@ -9982,11 +10098,12 @@
 int returnStructArgumentInt32x8Struct1ByteInt_a5 = 0;
 int returnStructArgumentInt32x8Struct1ByteInt_a6 = 0;
 int returnStructArgumentInt32x8Struct1ByteInt_a7 = 0;
-Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt_a8 = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt_a8 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntResult =
-    Struct1ByteInt();
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntCalculateResult() {
   Struct1ByteInt result = returnStructArgumentInt32x8Struct1ByteInt_a8;
@@ -10042,12 +10159,12 @@
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloat_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloatResult =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloatCalculateResult() {
@@ -10098,12 +10215,12 @@
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32_a0 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32Result =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32CalculateResult() {
@@ -10161,12 +10278,12 @@
 int returnStructArgumentInt32x8Struct20BytesHomogeneou_a7 = 0;
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneou_a8 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneouResult =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneouCalculateResult() {
@@ -10233,12 +10350,12 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesInlineArrayInt returnStructArgumentStruct8BytesInlineArrayInt_a0 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct8BytesInlineArrayInt
     returnStructArgumentStruct8BytesInlineArrayIntResult =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 Struct8BytesInlineArrayInt
     returnStructArgumentStruct8BytesInlineArrayIntCalculateResult() {
@@ -10288,12 +10405,12 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneous_a0 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneousResult =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneousCalculateResult() {
@@ -10344,12 +10461,12 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneous_a0 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneousResult =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneousCalculateResult() {
@@ -10398,11 +10515,11 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3_a0 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3Result =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 StructStruct16BytesMixed3
     returnStructArgumentStructStruct16BytesMixed3CalculateResult() {
@@ -10619,9 +10736,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a0 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedInt> returnStruct8BytesNestedIntResultPointer =
@@ -10678,8 +10795,10 @@
     Struct4BytesFloat, Struct4BytesFloat);
 
 // Global variables to be able to test inputs after callback returned.
-Struct4BytesFloat returnStruct8BytesNestedFloat_a0 = Struct4BytesFloat();
-Struct4BytesFloat returnStruct8BytesNestedFloat_a1 = Struct4BytesFloat();
+Struct4BytesFloat returnStruct8BytesNestedFloat_a0 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
+Struct4BytesFloat returnStruct8BytesNestedFloat_a1 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedFloat> returnStruct8BytesNestedFloatResultPointer =
@@ -10734,7 +10853,8 @@
     Struct4BytesFloat, Float);
 
 // Global variables to be able to test inputs after callback returned.
-Struct4BytesFloat returnStruct8BytesNestedFloat2_a0 = Struct4BytesFloat();
+Struct4BytesFloat returnStruct8BytesNestedFloat2_a0 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 double returnStruct8BytesNestedFloat2_a1 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -10792,8 +10912,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedMixed_a0 =
-    Struct4BytesHomogeneousInt16();
-Struct4BytesFloat returnStruct8BytesNestedMixed_a1 = Struct4BytesFloat();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
+Struct4BytesFloat returnStruct8BytesNestedMixed_a1 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedMixed> returnStruct8BytesNestedMixedResultPointer =
@@ -10849,8 +10970,10 @@
     Struct8BytesNestedInt, Struct8BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesNestedInt returnStruct16BytesNestedInt_a0 = Struct8BytesNestedInt();
-Struct8BytesNestedInt returnStruct16BytesNestedInt_a1 = Struct8BytesNestedInt();
+Struct8BytesNestedInt returnStruct16BytesNestedInt_a0 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt returnStruct16BytesNestedInt_a1 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct16BytesNestedInt> returnStruct16BytesNestedIntResultPointer =
@@ -10912,9 +11035,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesNestedInt returnStruct32BytesNestedInt_a0 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 Struct16BytesNestedInt returnStruct32BytesNestedInt_a1 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct32BytesNestedInt> returnStruct32BytesNestedIntResultPointer =
@@ -10985,9 +11108,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a0 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a1 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt16>
@@ -11050,9 +11173,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a0 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a1 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt32>
@@ -11115,9 +11238,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a0 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a1 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt64>
@@ -11181,9 +11304,9 @@
 // Global variables to be able to test inputs after callback returned.
 int returnStructNestedIrregularEvenBigger_a0 = 0;
 StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a1 =
-    StructNestedIrregularBigger();
+    Pointer<StructNestedIrregularBigger>.fromAddress(0).ref;
 StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a2 =
-    StructNestedIrregularBigger();
+    Pointer<StructNestedIrregularBigger>.fromAddress(0).ref;
 double returnStructNestedIrregularEvenBigger_a3 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
diff --git a/tests/ffi/function_callbacks_structs_by_value_test.dart b/tests/ffi/function_callbacks_structs_by_value_test.dart
index d7021b3..be78dc5 100644
--- a/tests/ffi/function_callbacks_structs_by_value_test.dart
+++ b/tests/ffi/function_callbacks_structs_by_value_test.dart
@@ -72,7 +72,8 @@
     Struct20BytesHomogeneousInt32 Function(int recursionCounter,
         Struct20BytesHomogeneousInt32, Pointer)>("PassStructRecursive");
 
-Struct8BytesNestedInt typedDataBackedStruct = Struct8BytesNestedInt();
+Struct8BytesNestedInt typedDataBackedStruct =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 bool typedDataBackedStructSet = false;
 void _receiveStructByValue(Struct8BytesNestedInt struct) {
   typedDataBackedStruct = struct;
diff --git a/tests/ffi/generator/structs_by_value_tests_generator.dart b/tests/ffi/generator/structs_by_value_tests_generator.dart
index 9063cb2..f030b93 100644
--- a/tests/ffi/generator/structs_by_value_tests_generator.dart
+++ b/tests/ffi/generator/structs_by_value_tests_generator.dart
@@ -268,7 +268,7 @@
         if (structsAsPointers) {
           return "Pointer<${dartType}> ${variableName}Pointer = nullptr;\n";
         } else {
-          return "${dartType} ${variableName} = ${dartType}();\n";
+          return "${dartType} ${variableName} = Pointer<${dartType}>.fromAddress(0).ref;\n";
         }
     }
 
@@ -909,7 +909,7 @@
 
     final path = callTestPath(nnbd);
     File(path).writeAsStringSync(buffer.toString());
-    Process.runSync("dartfmt", ["-w", path]);
+    Process.runSync("dart", ["format", path]);
   }
 }
 
@@ -975,7 +975,7 @@
 
     final path = callbackTestPath(nnbd);
     File(path).writeAsStringSync(buffer.toString());
-    Process.runSync("dartfmt", ["-w", path]);
+    Process.runSync("dart", ["format", path]);
   }
 }
 
diff --git a/tests/ffi/regress_39063_test.dart b/tests/ffi/regress_39063_test.dart
index 52dca18..b436fdb 100644
--- a/tests/ffi/regress_39063_test.dart
+++ b/tests/ffi/regress_39063_test.dart
@@ -9,8 +9,6 @@
 
 import "dart:ffi";
 
-import "package:expect/expect.dart";
-
 import "dylib_utils.dart";
 
 typedef VigesimalOp = double Function(
diff --git a/tests/ffi/vmspecific_ffi_native_test.dart b/tests/ffi/vmspecific_ffi_native_test.dart
new file mode 100644
index 0000000..8838ebc
--- /dev/null
+++ b/tests/ffi/vmspecific_ffi_native_test.dart
@@ -0,0 +1,165 @@
+// 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.
+//
+// SharedObjects=ffi_test_functions
+
+// NOTE: There is no `test/ffi_2/...` version of this test since annotations
+// with type arguments isn't supported in that version of Dart.
+
+import 'dart:ffi';
+import 'dart:nativewrappers';
+
+import 'package:expect/expect.dart';
+
+import 'dylib_utils.dart';
+
+final nativeLib = dlopenPlatformSpecific('ffi_test_functions');
+
+final getRootLibraryUrl = nativeLib
+    .lookupFunction<Handle Function(), Object Function()>('GetRootLibraryUrl');
+
+final setFfiNativeResolverForTest =
+    nativeLib.lookupFunction<Void Function(Handle), void Function(Object)>(
+        'SetFfiNativeResolverForTest');
+
+final triggerGC = nativeLib
+    .lookupFunction<Void Function(IntPtr), void Function(int)>('TriggerGC');
+
+@FfiNative<Handle Function(Handle, IntPtr, IntPtr)>(
+    'Dart_SetNativeInstanceField')
+external Object setNativeInstanceField(Object obj, int index, int ptr);
+
+// Basic FfiNative test functions.
+
+@FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')
+external int returnIntPtr(int x);
+
+@FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr', isLeaf: true)
+external int returnIntPtrLeaf(int x);
+
+@FfiNative<IntPtr Function()>('IsThreadInGenerated')
+external int isThreadInGenerated();
+
+@FfiNative<IntPtr Function()>('IsThreadInGenerated', isLeaf: true)
+external int isThreadInGeneratedLeaf();
+
+class Classy {
+  @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')
+  external static int returnIntPtrStatic(int x);
+}
+
+// For automatic transform of NativeFieldWrapperClass1 to Pointer.
+
+class ClassWithNativeField extends NativeFieldWrapperClass1 {
+  ClassWithNativeField(int value) {
+    setNativeInstanceField(this, 0, value);
+  }
+}
+
+// Native function takes a Handle, so a Handle is passed as-is.
+@FfiNative<IntPtr Function(Handle)>('PassAsHandle')
+external int passAsHandle(NativeFieldWrapperClass1 obj);
+// FFI signature takes Pointer, Dart signature takes NativeFieldWrapperClass1.
+// This implies automatic conversion.
+@FfiNative<IntPtr Function(Pointer<Void>)>('PassAsPointer')
+external int passAsPointer(NativeFieldWrapperClass1 obj);
+// Pass Pointer automatically, and return value.
+@FfiNative<IntPtr Function(Pointer<Void>, IntPtr)>('PassAsPointerAndValue')
+external int passAsPointerAndValue(NativeFieldWrapperClass1 obj, int value);
+// Pass Pointer automatically, and return value.
+@FfiNative<IntPtr Function(IntPtr, Pointer<Void>)>('PassAsValueAndPointer')
+external int passAsValueAndPointer(int value, NativeFieldWrapperClass1 obj);
+
+// Allocate new native resource we can use to keep track of whether the
+// finalizer has run.
+@FfiNative<Pointer<Void> Function(IntPtr)>('AllocateResource')
+external Pointer<Void> allocateResource(int value);
+
+@FfiNative<Void Function(Pointer<Void>)>('DeleteResource')
+external void deleteResource(Pointer<Void> resource);
+
+// Set up the object's finalizer to reset the resource.
+@FfiNative<Void Function(Handle, Pointer<Void>)>('SetResourceFinalizer')
+external void setResourceFinalizer(
+    NativeFieldWrapperClass1 obj, Pointer<Void> resource);
+
+// Return the native resource's value.
+@FfiNative<IntPtr Function(Pointer<Void>)>('GetResourceValue')
+external int getResourceValue(Pointer<Void> resource);
+
+// Class which ties itself to a resource, resetting the value of the resource
+// when the instance gets collected.
+class ResourceResetter extends NativeFieldWrapperClass1 {
+  ResourceResetter(Pointer<Void> resource) {
+    setNativeInstanceField(this, 0, 0);
+    setResourceFinalizer(this, resource);
+  }
+}
+
+// Helper to embed triggerGC(..) as an expression.
+int triggerGCWrap() {
+  triggerGC(0);
+  return 0;
+}
+
+// Helpers for testing argumnent evaluation order is preserved.
+int state = 0;
+int setState(int value) {
+  state = value;
+  return 0;
+}
+
+class StateSetter extends NativeFieldWrapperClass1 {
+  StateSetter(int value) {
+    setNativeInstanceField(this, 0, 0);
+    state = value;
+  }
+}
+
+void main() {
+  // Register test resolver for top-level functions above.
+  setFfiNativeResolverForTest(getRootLibraryUrl());
+
+  // Test we can call FfiNative functions.
+  Expect.equals(123, returnIntPtr(123));
+  Expect.equals(123, returnIntPtrLeaf(123));
+  Expect.equals(123, Classy.returnIntPtrStatic(123));
+
+  // Test FfiNative leaf calls remain in generated code.
+  // Regular calls should transition generated -> native.
+  Expect.equals(0, isThreadInGenerated());
+  // Leaf calls should remain in generated state.
+  Expect.equals(1, isThreadInGeneratedLeaf());
+
+  // Test that objects extending NativeFieldWrapperClass1 can be passed to
+  // FfiNative functions that take Pointer.
+  // Such objects should automatically be converted and pass as Pointer.
+  {
+    final cwnf = ClassWithNativeField(123456);
+    Expect.equals(123456, passAsHandle(cwnf));
+    Expect.equals(123456, passAsPointer(cwnf));
+  }
+
+  // Test that the transform to wrap NativeFieldWrapperClass1 objects in
+  // _getNativeField(..) doesn't violate the original argument's liveness.
+  final resource = allocateResource(314159);
+  Expect.equals(
+      314159,
+      passAsPointerAndValue(
+          // 1: Locally alloc. instance.
+          // If this gets wrapped in another call the instance does not live
+          // past the return of the wrapper call.
+          ResourceResetter(resource),
+          // 2: Force GC, to collect the above if it isn't being kept alive.
+          // 3: Check that the underlying (dummy) resource hasn't been
+          // "collected" (i.e. reset to 0).
+          triggerGCWrap() + getResourceValue(resource)));
+  deleteResource(resource);
+
+  // Test that the order of argument evaluation is being preserved through the
+  // transform wrapping NativeFieldWrapperClass1 objects.
+  state = 0;
+  passAsValueAndPointer(setState(7), StateSetter(3));
+  Expect.equals(3, state);
+}
diff --git a/tests/ffi/vmspecific_function_test.dart b/tests/ffi/vmspecific_function_test.dart
index 00ea922..ef617b7 100644
--- a/tests/ffi/vmspecific_function_test.dart
+++ b/tests/ffi/vmspecific_function_test.dart
@@ -17,9 +17,6 @@
 
 import 'dylib_utils.dart';
 
-import "package:ffi/ffi.dart";
-import "package:expect/expect.dart";
-
 void main() {
   for (int i = 0; i < 100; ++i) {
     testLookupFunctionPointerNativeType();
diff --git a/tests/ffi/vmspecific_highmem_32bit_test.dart b/tests/ffi/vmspecific_highmem_32bit_test.dart
index eeee5fa..97d7ce3 100644
--- a/tests/ffi/vmspecific_highmem_32bit_test.dart
+++ b/tests/ffi/vmspecific_highmem_32bit_test.dart
@@ -4,7 +4,6 @@
 
 import 'dart:ffi';
 import 'dart:io';
-import 'dart:typed_data';
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/ffi/vmspecific_leaf_call_test.dart b/tests/ffi/vmspecific_leaf_call_test.dart
index 3d05173..9c723bb 100644
--- a/tests/ffi/vmspecific_leaf_call_test.dart
+++ b/tests/ffi/vmspecific_leaf_call_test.dart
@@ -9,29 +9,30 @@
 
 import 'package:expect/expect.dart';
 
-import 'dylib_utils.dart';
-import 'ffi_test_helpers.dart';
 import 'callback_tests_utils.dart';
+import 'dylib_utils.dart';
 
 DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
 
 testLeafCall() {
   // Note: This test currently fails on Windows AOT: https://dartbug.com/40579
   // Regular calls should transition generated -> native.
-  final isThreadInGenerated = ffiTestFunctions.lookupFunction<
-      Int8 Function(), int Function()>("IsThreadInGenerated");
+  final isThreadInGenerated = ffiTestFunctions
+      .lookupFunction<Int8 Function(), int Function()>("IsThreadInGenerated");
   Expect.equals(0, isThreadInGenerated());
   // Leaf calls should remain in generated state.
-  final isThreadInGeneratedLeaf = ffiTestFunctions.lookupFunction<
-      Int8 Function(), int Function()>("IsThreadInGenerated", isLeaf: true);
+  final isThreadInGeneratedLeaf = ffiTestFunctions
+      .lookupFunction<Int8 Function(), int Function()>("IsThreadInGenerated",
+          isLeaf: true);
   Expect.equals(1, isThreadInGeneratedLeaf());
 }
 
 testLeafCallApi() {
   // Note: This will only crash as expected in debug build mode. In other modes
   // it's effectively skip.
-  final f = ffiTestFunctions.lookupFunction<
-      Void Function(), void Function()>("TestLeafCallApi", isLeaf: true);
+  final f = ffiTestFunctions.lookupFunction<Void Function(), void Function()>(
+      "TestLeafCallApi",
+      isLeaf: true);
   // Calling Dart_.. API is unsafe from leaf calls since we explicitly haven't
   // made the generated -> native transition.
   f();
@@ -45,7 +46,8 @@
   // Note: This will only crash as expected in debug build mode. In other modes
   // it's effectively skip.
   CallbackTest("CallbackLeaf", Pointer.fromFunction<Void Function()>(nop),
-      isLeaf:true).run();
+          isLeaf: true)
+      .run();
 }
 
 main() {
diff --git a/tests/ffi_2/ffi_2.status b/tests/ffi_2/ffi_2.status
index c54ce09..5335837 100644
--- a/tests/ffi_2/ffi_2.status
+++ b/tests/ffi_2/ffi_2.status
@@ -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.
 
+function_callbacks_structs_by_value_test: Pass, Slow # https://dartbug.com/47304 https://dartbug.com/45007
+function_structs_by_value_generated_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007
+
 [ $builder_tag == msan ]
 vmspecific_handle_test: Skip # https://dartbug.com/42314
 
@@ -14,9 +17,6 @@
 [ $system == android ]
 *: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489
 
-[ $arch == arm && $system == linux ]
-function_callbacks_structs_by_value_test: Slow # QEMU https://dartbug.com/45007
-
 [ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ]
 *: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
 
diff --git a/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart b/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart
index 5eb0a63..dd0e719 100644
--- a/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart
+++ b/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart
@@ -617,16 +617,26 @@
     Struct1ByteInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct1ByteInt passStruct1ByteIntx10_a0 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a1 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a2 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a3 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a4 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a5 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a6 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a7 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a8 = Struct1ByteInt();
-Struct1ByteInt passStruct1ByteIntx10_a9 = Struct1ByteInt();
+Struct1ByteInt passStruct1ByteIntx10_a0 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a1 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a2 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a3 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a4 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a5 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a6 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a7 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a8 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
+Struct1ByteInt passStruct1ByteIntx10_a9 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct1ByteIntx10Result = 0;
@@ -718,25 +728,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a0 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a1 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a2 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a3 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a4 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a5 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a6 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a7 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a8 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a9 =
-    Struct3BytesHomogeneousUint8();
+    Pointer<Struct3BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesHomogeneousUint8x10Result = 0;
@@ -848,25 +858,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a0 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a1 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a2 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a3 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a4 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a5 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a6 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a7 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a8 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a9 =
-    Struct3BytesInt2ByteAligned();
+    Pointer<Struct3BytesInt2ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesInt2ByteAlignedx10Result = 0;
@@ -969,25 +979,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a0 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a2 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a3 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a4 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a5 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a6 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a7 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a8 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a9 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct4BytesHomogeneousInt16x10Result = 0;
@@ -1089,25 +1099,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a0 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a1 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a2 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a3 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a4 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a5 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a6 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a7 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a8 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a9 =
-    Struct7BytesHomogeneousUint8();
+    Pointer<Struct7BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct7BytesHomogeneousUint8x10Result = 0;
@@ -1259,25 +1269,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a0 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a1 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a2 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a3 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a4 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a5 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a6 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a7 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a8 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a9 =
-    Struct7BytesInt4ByteAligned();
+    Pointer<Struct7BytesInt4ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct7BytesInt4ByteAlignedx10Result = 0;
@@ -1389,16 +1399,26 @@
     Struct8BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesInt passStruct8BytesIntx10_a0 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a1 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a2 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a3 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a4 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a5 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a6 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a7 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a8 = Struct8BytesInt();
-Struct8BytesInt passStruct8BytesIntx10_a9 = Struct8BytesInt();
+Struct8BytesInt passStruct8BytesIntx10_a0 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a1 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a2 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a3 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a4 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a5 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a6 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a7 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a8 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
+Struct8BytesInt passStruct8BytesIntx10_a9 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesIntx10Result = 0;
@@ -1510,25 +1530,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a1 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a2 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a3 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a4 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a5 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a6 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a7 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a8 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a9 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesHomogeneousFloatx10Result = 0.0;
@@ -1629,16 +1649,26 @@
     Struct8BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesMixed passStruct8BytesMixedx10_a0 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a1 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a2 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a3 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a4 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a5 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a6 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a7 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a8 = Struct8BytesMixed();
-Struct8BytesMixed passStruct8BytesMixedx10_a9 = Struct8BytesMixed();
+Struct8BytesMixed passStruct8BytesMixedx10_a0 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a1 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a2 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a3 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a4 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a5 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a6 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a7 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a8 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
+Struct8BytesMixed passStruct8BytesMixedx10_a9 =
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesMixedx10Result = 0.0;
@@ -1750,25 +1780,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a0 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a1 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a2 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a3 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a4 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a5 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a6 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a7 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a8 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a9 =
-    Struct9BytesHomogeneousUint8();
+    Pointer<Struct9BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct9BytesHomogeneousUint8x10Result = 0;
@@ -1943,25 +1973,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a0 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a1 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a2 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a3 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a4 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a5 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a6 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a7 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a8 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a9 =
-    Struct9BytesInt4Or8ByteAligned();
+    Pointer<Struct9BytesInt4Or8ByteAligned>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct9BytesInt4Or8ByteAlignedx10Result = 0;
@@ -2062,17 +2092,17 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a0 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a1 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a2 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a3 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a4 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a5 =
-    Struct12BytesHomogeneousFloat();
+    Pointer<Struct12BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct12BytesHomogeneousFloatx6Result = 0.0;
@@ -2160,15 +2190,15 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a0 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a1 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a2 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a3 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a4 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesHomogeneousFloatx5Result = 0.0;
@@ -2260,16 +2290,26 @@
     Struct16BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Struct16BytesMixed passStruct16BytesMixedx10_a0 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a1 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a2 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a3 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a4 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a5 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a6 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a7 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a8 = Struct16BytesMixed();
-Struct16BytesMixed passStruct16BytesMixedx10_a9 = Struct16BytesMixed();
+Struct16BytesMixed passStruct16BytesMixedx10_a0 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a1 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a2 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a3 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a4 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a5 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a6 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a7 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a8 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
+Struct16BytesMixed passStruct16BytesMixedx10_a9 =
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesMixedx10Result = 0.0;
@@ -2372,16 +2412,26 @@
     Struct16BytesMixed2);
 
 // Global variables to be able to test inputs after callback returned.
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a0 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a1 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a2 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a3 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a4 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a5 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a6 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a7 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a8 = Struct16BytesMixed2();
-Struct16BytesMixed2 passStruct16BytesMixed2x10_a9 = Struct16BytesMixed2();
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a0 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a1 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a2 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a3 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a4 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a5 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a6 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a7 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a8 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
+Struct16BytesMixed2 passStruct16BytesMixed2x10_a9 =
+    Pointer<Struct16BytesMixed2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct16BytesMixed2x10Result = 0.0;
@@ -2504,16 +2554,26 @@
     Struct17BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct17BytesInt passStruct17BytesIntx10_a0 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a1 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a2 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a3 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a4 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a5 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a6 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a7 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a8 = Struct17BytesInt();
-Struct17BytesInt passStruct17BytesIntx10_a9 = Struct17BytesInt();
+Struct17BytesInt passStruct17BytesIntx10_a0 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a1 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a2 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a3 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a4 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a5 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a6 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a7 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a8 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
+Struct17BytesInt passStruct17BytesIntx10_a9 =
+    Pointer<Struct17BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct17BytesIntx10Result = 0;
@@ -2625,25 +2685,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a0 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a1 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a2 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a3 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a4 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a5 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a6 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a7 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a8 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a9 =
-    Struct19BytesHomogeneousUint8();
+    Pointer<Struct19BytesHomogeneousUint8>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct19BytesHomogeneousUint8x10Result = 0;
@@ -2917,25 +2977,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a0 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a1 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a2 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a3 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a4 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a5 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a6 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a7 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a8 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a9 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct20BytesHomogeneousInt32x10Result = 0;
@@ -3061,7 +3121,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousFloat passStruct20BytesHomogeneousFloat_a0 =
-    Struct20BytesHomogeneousFloat();
+    Pointer<Struct20BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct20BytesHomogeneousFloatResult = 0.0;
@@ -3122,15 +3182,15 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a0 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a1 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a2 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a3 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a4 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct32BytesHomogeneousDoublex5Result = 0.0;
@@ -3214,7 +3274,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct40BytesHomogeneousDouble passStruct40BytesHomogeneousDouble_a0 =
-    Struct40BytesHomogeneousDouble();
+    Pointer<Struct40BytesHomogeneousDouble>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct40BytesHomogeneousDoubleResult = 0.0;
@@ -3271,7 +3331,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct1024BytesHomogeneousUint64 passStruct1024BytesHomogeneousUint64_a0 =
-    Struct1024BytesHomogeneousUint64();
+    Pointer<Struct1024BytesHomogeneousUint64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct1024BytesHomogeneousUint64Result = 0;
@@ -3462,19 +3522,19 @@
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a0 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a2 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a4 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a6 = 0.0;
 Struct16BytesHomogeneousFloat
     passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7 =
-    Struct16BytesHomogeneousFloat();
+    Pointer<Struct16BytesHomogeneousFloat>.fromAddress(0).ref;
 double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3580,19 +3640,19 @@
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a0 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a2 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a4 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a6 = 0.0;
 Struct32BytesHomogeneousDouble
     passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7 =
-    Struct32BytesHomogeneousDouble();
+    Pointer<Struct32BytesHomogeneousDouble>.fromAddress(0).ref;
 double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3689,16 +3749,16 @@
 // Global variables to be able to test inputs after callback returned.
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a0 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a2 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a4 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a6 = 0;
 Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a8 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3805,13 +3865,13 @@
 double passDoublex6Struct16BytesMixedx4Int32_a4 = 0.0;
 double passDoublex6Struct16BytesMixedx4Int32_a5 = 0.0;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a6 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a8 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a9 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 int passDoublex6Struct16BytesMixedx4Int32_a10 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -3916,13 +3976,13 @@
 int passInt32x4Struct16BytesMixedx4Double_a2 = 0;
 int passInt32x4Struct16BytesMixedx4Double_a3 = 0;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a4 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a5 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a6 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a7 =
-    Struct16BytesMixed();
+    Pointer<Struct16BytesMixed>.fromAddress(0).ref;
 double passInt32x4Struct16BytesMixedx4Double_a8 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -4011,13 +4071,13 @@
 // Global variables to be able to test inputs after callback returned.
 Struct40BytesHomogeneousDouble
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0 =
-    Struct40BytesHomogeneousDouble();
+    Pointer<Struct40BytesHomogeneousDouble>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct8BytesHomogeneousFloat
     passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct40BytesHomogeneousDoubleStruct4BytesHomoResult = 0.0;
@@ -4146,37 +4206,37 @@
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a16 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a17 = 0;
 Struct1ByteInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a18 =
-    Struct1ByteInt();
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a19 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a20 = 0;
 Struct4BytesHomogeneousInt16
     passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a22 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a23 = 0;
 Struct8BytesInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24 =
-    Struct8BytesInt();
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a25 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a26 = 0;
 Struct8BytesHomogeneousFloat
     passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a28 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a29 = 0;
 Struct8BytesMixed passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30 =
-    Struct8BytesMixed();
+    Pointer<Struct8BytesMixed>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a31 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a32 = 0;
 StructAlignmentInt16 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a34 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a35 = 0;
 StructAlignmentInt32 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a37 = 0;
 int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a38 = 0;
 StructAlignmentInt64 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntResult = 0.0;
@@ -4361,7 +4421,8 @@
 typedef PassStructAlignmentInt16Type = Int64 Function(StructAlignmentInt16);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt16 passStructAlignmentInt16_a0 = StructAlignmentInt16();
+StructAlignmentInt16 passStructAlignmentInt16_a0 =
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt16Result = 0;
@@ -4414,7 +4475,8 @@
 typedef PassStructAlignmentInt32Type = Int64 Function(StructAlignmentInt32);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt32 passStructAlignmentInt32_a0 = StructAlignmentInt32();
+StructAlignmentInt32 passStructAlignmentInt32_a0 =
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt32Result = 0;
@@ -4467,7 +4529,8 @@
 typedef PassStructAlignmentInt64Type = Int64 Function(StructAlignmentInt64);
 
 // Global variables to be able to test inputs after callback returned.
-StructAlignmentInt64 passStructAlignmentInt64_a0 = StructAlignmentInt64();
+StructAlignmentInt64 passStructAlignmentInt64_a0 =
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructAlignmentInt64Result = 0;
@@ -4530,16 +4593,26 @@
     Struct8BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a0 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a1 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a2 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a3 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a4 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a5 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a6 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a7 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a8 = Struct8BytesNestedInt();
-Struct8BytesNestedInt passStruct8BytesNestedIntx10_a9 = Struct8BytesNestedInt();
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a0 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a1 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a2 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a3 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a4 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a5 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a6 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a7 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a8 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt passStruct8BytesNestedIntx10_a9 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesNestedIntx10Result = 0;
@@ -4661,25 +4734,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a0 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a1 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a2 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a3 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a4 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a5 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a6 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a7 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a8 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a9 =
-    Struct8BytesNestedFloat();
+    Pointer<Struct8BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedFloatx10Result = 0.0;
@@ -4781,25 +4854,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a0 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a1 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a2 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a3 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a4 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a5 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a6 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a7 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a8 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a9 =
-    Struct8BytesNestedFloat2();
+    Pointer<Struct8BytesNestedFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedFloat2x10Result = 0.0;
@@ -4903,25 +4976,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a0 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a1 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a2 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a3 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a4 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a5 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a6 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a7 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a8 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a9 =
-    Struct8BytesNestedMixed();
+    Pointer<Struct8BytesNestedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct8BytesNestedMixedx10Result = 0.0;
@@ -5024,9 +5097,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesNestedInt passStruct16BytesNestedIntx2_a0 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 Struct16BytesNestedInt passStruct16BytesNestedIntx2_a1 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct16BytesNestedIntx2Result = 0;
@@ -5096,9 +5169,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct32BytesNestedInt passStruct32BytesNestedIntx2_a0 =
-    Struct32BytesNestedInt();
+    Pointer<Struct32BytesNestedInt>.fromAddress(0).ref;
 Struct32BytesNestedInt passStruct32BytesNestedIntx2_a1 =
-    Struct32BytesNestedInt();
+    Pointer<Struct32BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct32BytesNestedIntx2Result = 0;
@@ -5184,7 +5257,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt16 passStructNestedIntStructAlignmentInt16_a0 =
-    StructNestedIntStructAlignmentInt16();
+    Pointer<StructNestedIntStructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt16Result = 0;
@@ -5244,7 +5317,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt32 passStructNestedIntStructAlignmentInt32_a0 =
-    StructNestedIntStructAlignmentInt32();
+    Pointer<StructNestedIntStructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt32Result = 0;
@@ -5304,7 +5377,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIntStructAlignmentInt64 passStructNestedIntStructAlignmentInt64_a0 =
-    StructNestedIntStructAlignmentInt64();
+    Pointer<StructNestedIntStructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructNestedIntStructAlignmentInt64Result = 0;
@@ -5367,13 +5440,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a0 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a1 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a2 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a3 =
-    StructNestedIrregularEvenBigger();
+    Pointer<StructNestedIrregularEvenBigger>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructNestedIrregularEvenBiggerx4Result = 0.0;
@@ -5572,13 +5645,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a0 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a1 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a2 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a3 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesInlineArrayIntx4Result = 0;
@@ -5672,13 +5745,13 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a0 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a1 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a2 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 StructInlineArrayIrregular passStructInlineArrayIrregularx4_a3 =
-    StructInlineArrayIrregular();
+    Pointer<StructInlineArrayIrregular>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructInlineArrayIrregularx4Result = 0;
@@ -5757,7 +5830,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructInlineArray100Bytes passStructInlineArray100Bytes_a0 =
-    StructInlineArray100Bytes();
+    Pointer<StructInlineArray100Bytes>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStructInlineArray100BytesResult = 0;
@@ -5914,19 +5987,19 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a0 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a1 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a2 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a3 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 StructStruct16BytesHomogeneousFloat2
     passStructStruct16BytesHomogeneousFloat2x5_a4 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct16BytesHomogeneousFloat2x5Result = 0.0;
@@ -6015,19 +6088,19 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a0 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a1 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a2 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a3 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 StructStruct32BytesHomogeneousDouble2
     passStructStruct32BytesHomogeneousDouble2x5_a4 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct32BytesHomogeneousDouble2x5Result = 0.0;
@@ -6120,25 +6193,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a0 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a1 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a2 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a3 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a4 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a5 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a6 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a7 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a8 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a9 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructStruct16BytesMixed3x10Result = 0.0;
@@ -6282,15 +6355,15 @@
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a0 = 0;
 Struct32BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a1 =
-    Struct32BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct32BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a2 = 0;
 Struct8BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a3 =
-    Struct8BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct8BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a4 = 0;
 Struct8BytesInlineArrayMultiDimensionalInt
     passUint8Struct32BytesInlineArrayMultiDimensionalI_a5 =
-    Struct8BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct8BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct32BytesInlineArrayMultiDimensionalI_a6 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -6446,7 +6519,7 @@
 int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a0 = 0;
 Struct4BytesInlineArrayMultiDimensionalInt
     passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1 =
-    Struct4BytesInlineArrayMultiDimensionalInt();
+    Pointer<Struct4BytesInlineArrayMultiDimensionalInt>.fromAddress(0).ref;
 int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a2 = 0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -6520,16 +6593,26 @@
     Struct3BytesPackedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a0 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a1 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a2 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a3 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a4 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a5 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a6 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a7 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a8 = Struct3BytesPackedInt();
-Struct3BytesPackedInt passStruct3BytesPackedIntx10_a9 = Struct3BytesPackedInt();
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a0 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a1 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a2 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a3 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a4 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a5 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a6 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a7 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a8 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
+Struct3BytesPackedInt passStruct3BytesPackedIntx10_a9 =
+    Pointer<Struct3BytesPackedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct3BytesPackedIntx10Result = 0;
@@ -6629,16 +6712,26 @@
     Struct8BytesPackedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a0 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a1 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a2 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a3 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a4 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a5 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a6 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a7 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a8 = Struct8BytesPackedInt();
-Struct8BytesPackedInt passStruct8BytesPackedIntx10_a9 = Struct8BytesPackedInt();
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a0 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a1 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a2 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a3 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a4 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a5 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a6 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a7 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a8 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
+Struct8BytesPackedInt passStruct8BytesPackedIntx10_a9 =
+    Pointer<Struct8BytesPackedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 int passStruct8BytesPackedIntx10Result = 0;
@@ -6772,25 +6865,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a0 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a1 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a2 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a3 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a4 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a5 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a6 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a7 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a8 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a9 =
-    Struct9BytesPackedMixed();
+    Pointer<Struct9BytesPackedMixed>.fromAddress(0).ref;
 double passStruct9BytesPackedMixedx10DoubleInt32x2_a10 = 0.0;
 int passStruct9BytesPackedMixedx10DoubleInt32x2_a11 = 0;
 int passStruct9BytesPackedMixedx10DoubleInt32x2_a12 = 0;
@@ -6896,7 +6989,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct5BytesPackedMixed passStruct5BytesPackedMixed_a0 =
-    Struct5BytesPackedMixed();
+    Pointer<Struct5BytesPackedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct5BytesPackedMixedResult = 0.0;
@@ -6951,7 +7044,7 @@
 // Global variables to be able to test inputs after callback returned.
 StructNestedAlignmentStruct5BytesPackedMixed
     passStructNestedAlignmentStruct5BytesPackedMixed_a0 =
-    StructNestedAlignmentStruct5BytesPackedMixed();
+    Pointer<StructNestedAlignmentStruct5BytesPackedMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStructNestedAlignmentStruct5BytesPackedMixedResult = 0.0;
@@ -7010,7 +7103,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct6BytesInlineArrayInt passStruct6BytesInlineArrayInt_a0 =
-    Struct6BytesInlineArrayInt();
+    Pointer<Struct6BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct6BytesInlineArrayIntResult = 0.0;
@@ -7066,7 +7159,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct15BytesInlineArrayMixed passStruct15BytesInlineArrayMixed_a0 =
-    Struct15BytesInlineArrayMixed();
+    Pointer<Struct15BytesInlineArrayMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passStruct15BytesInlineArrayMixedResult = 0.0;
@@ -7132,16 +7225,26 @@
     Union4BytesMixed);
 
 // Global variables to be able to test inputs after callback returned.
-Union4BytesMixed passUnion4BytesMixedx10_a0 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a1 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a2 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a3 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a4 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a5 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a6 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a7 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a8 = Union4BytesMixed();
-Union4BytesMixed passUnion4BytesMixedx10_a9 = Union4BytesMixed();
+Union4BytesMixed passUnion4BytesMixedx10_a0 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a1 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a2 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a3 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a4 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a5 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a6 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a7 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a8 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
+Union4BytesMixed passUnion4BytesMixedx10_a9 =
+    Pointer<Union4BytesMixed>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion4BytesMixedx10Result = 0.0;
@@ -7232,25 +7335,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a0 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a1 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a2 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a3 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a4 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a5 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a6 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a7 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a8 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a9 =
-    Union8BytesNestedFloat();
+    Pointer<Union8BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion8BytesNestedFloatx10Result = 0.0;
@@ -7340,16 +7443,26 @@
     Union9BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a0 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a1 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a2 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a3 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a4 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a5 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a6 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a7 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a8 = Union9BytesNestedInt();
-Union9BytesNestedInt passUnion9BytesNestedIntx10_a9 = Union9BytesNestedInt();
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a0 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a1 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a2 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a3 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a4 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a5 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a6 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a7 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a8 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
+Union9BytesNestedInt passUnion9BytesNestedIntx10_a9 =
+    Pointer<Union9BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion9BytesNestedIntx10Result = 0.0;
@@ -7461,34 +7574,34 @@
 // Global variables to be able to test inputs after callback returned.
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a0 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a1 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a2 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a3 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a4 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a5 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a6 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a7 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a8 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 Union16BytesNestedInlineArrayFloat
     passUnion16BytesNestedInlineArrayFloatx10_a9 =
-    Union16BytesNestedInlineArrayFloat();
+    Pointer<Union16BytesNestedInlineArrayFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion16BytesNestedInlineArrayFloatx10Result = 0.0;
@@ -7610,25 +7723,25 @@
 
 // Global variables to be able to test inputs after callback returned.
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a0 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a1 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a2 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a3 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a4 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a5 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a6 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a7 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a8 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a9 =
-    Union16BytesNestedFloat();
+    Pointer<Union16BytesNestedFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 double passUnion16BytesNestedFloatx10Result = 0.0;
@@ -10178,7 +10291,8 @@
     Struct8BytesInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesInt returnUnion9BytesNestedInt_a0 = Struct8BytesInt();
+Struct8BytesInt returnUnion9BytesNestedInt_a0 =
+    Pointer<Struct8BytesInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Union9BytesNestedInt> returnUnion9BytesNestedIntResultPointer = nullptr;
@@ -10236,7 +10350,7 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat returnUnion16BytesNestedFloat_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Union16BytesNestedFloat> returnUnion16BytesNestedFloatResultPointer =
@@ -10294,10 +10408,12 @@
     Struct1ByteInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct1ByteInt returnStructArgumentStruct1ByteInt_a0 = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentStruct1ByteInt_a0 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
-Struct1ByteInt returnStructArgumentStruct1ByteIntResult = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentStruct1ByteIntResult =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 Struct1ByteInt returnStructArgumentStruct1ByteIntCalculateResult() {
   Struct1ByteInt result = returnStructArgumentStruct1ByteInt_a0;
@@ -10352,11 +10468,12 @@
 int returnStructArgumentInt32x8Struct1ByteInt_a5 = 0;
 int returnStructArgumentInt32x8Struct1ByteInt_a6 = 0;
 int returnStructArgumentInt32x8Struct1ByteInt_a7 = 0;
-Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt_a8 = Struct1ByteInt();
+Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt_a8 =
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntResult =
-    Struct1ByteInt();
+    Pointer<Struct1ByteInt>.fromAddress(0).ref;
 
 Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntCalculateResult() {
   Struct1ByteInt result = returnStructArgumentInt32x8Struct1ByteInt_a8;
@@ -10416,12 +10533,12 @@
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloat_a0 =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloatResult =
-    Struct8BytesHomogeneousFloat();
+    Pointer<Struct8BytesHomogeneousFloat>.fromAddress(0).ref;
 
 Struct8BytesHomogeneousFloat
     returnStructArgumentStruct8BytesHomogeneousFloatCalculateResult() {
@@ -10476,12 +10593,12 @@
 // Global variables to be able to test inputs after callback returned.
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32_a0 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32Result =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 Struct20BytesHomogeneousInt32
     returnStructArgumentStruct20BytesHomogeneousInt32CalculateResult() {
@@ -10543,12 +10660,12 @@
 int returnStructArgumentInt32x8Struct20BytesHomogeneou_a7 = 0;
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneou_a8 =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneouResult =
-    Struct20BytesHomogeneousInt32();
+    Pointer<Struct20BytesHomogeneousInt32>.fromAddress(0).ref;
 
 Struct20BytesHomogeneousInt32
     returnStructArgumentInt32x8Struct20BytesHomogeneouCalculateResult() {
@@ -10619,12 +10736,12 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct8BytesInlineArrayInt returnStructArgumentStruct8BytesInlineArrayInt_a0 =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Struct8BytesInlineArrayInt
     returnStructArgumentStruct8BytesInlineArrayIntResult =
-    Struct8BytesInlineArrayInt();
+    Pointer<Struct8BytesInlineArrayInt>.fromAddress(0).ref;
 
 Struct8BytesInlineArrayInt
     returnStructArgumentStruct8BytesInlineArrayIntCalculateResult() {
@@ -10678,12 +10795,12 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneous_a0 =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneousResult =
-    StructStruct16BytesHomogeneousFloat2();
+    Pointer<StructStruct16BytesHomogeneousFloat2>.fromAddress(0).ref;
 
 StructStruct16BytesHomogeneousFloat2
     returnStructArgumentStructStruct16BytesHomogeneousCalculateResult() {
@@ -10738,12 +10855,12 @@
 // Global variables to be able to test inputs after callback returned.
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneous_a0 =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneousResult =
-    StructStruct32BytesHomogeneousDouble2();
+    Pointer<StructStruct32BytesHomogeneousDouble2>.fromAddress(0).ref;
 
 StructStruct32BytesHomogeneousDouble2
     returnStructArgumentStructStruct32BytesHomogeneousCalculateResult() {
@@ -10796,11 +10913,11 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3_a0 =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3Result =
-    StructStruct16BytesMixed3();
+    Pointer<StructStruct16BytesMixed3>.fromAddress(0).ref;
 
 StructStruct16BytesMixed3
     returnStructArgumentStructStruct16BytesMixed3CalculateResult() {
@@ -11033,9 +11150,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a0 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a1 =
-    Struct4BytesHomogeneousInt16();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedInt> returnStruct8BytesNestedIntResultPointer =
@@ -11096,8 +11213,10 @@
     Struct4BytesFloat, Struct4BytesFloat);
 
 // Global variables to be able to test inputs after callback returned.
-Struct4BytesFloat returnStruct8BytesNestedFloat_a0 = Struct4BytesFloat();
-Struct4BytesFloat returnStruct8BytesNestedFloat_a1 = Struct4BytesFloat();
+Struct4BytesFloat returnStruct8BytesNestedFloat_a0 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
+Struct4BytesFloat returnStruct8BytesNestedFloat_a1 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedFloat> returnStruct8BytesNestedFloatResultPointer =
@@ -11156,7 +11275,8 @@
     Struct4BytesFloat, Float);
 
 // Global variables to be able to test inputs after callback returned.
-Struct4BytesFloat returnStruct8BytesNestedFloat2_a0 = Struct4BytesFloat();
+Struct4BytesFloat returnStruct8BytesNestedFloat2_a0 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 double returnStruct8BytesNestedFloat2_a1 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
@@ -11218,8 +11338,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct4BytesHomogeneousInt16 returnStruct8BytesNestedMixed_a0 =
-    Struct4BytesHomogeneousInt16();
-Struct4BytesFloat returnStruct8BytesNestedMixed_a1 = Struct4BytesFloat();
+    Pointer<Struct4BytesHomogeneousInt16>.fromAddress(0).ref;
+Struct4BytesFloat returnStruct8BytesNestedMixed_a1 =
+    Pointer<Struct4BytesFloat>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct8BytesNestedMixed> returnStruct8BytesNestedMixedResultPointer =
@@ -11279,8 +11400,10 @@
     Struct8BytesNestedInt, Struct8BytesNestedInt);
 
 // Global variables to be able to test inputs after callback returned.
-Struct8BytesNestedInt returnStruct16BytesNestedInt_a0 = Struct8BytesNestedInt();
-Struct8BytesNestedInt returnStruct16BytesNestedInt_a1 = Struct8BytesNestedInt();
+Struct8BytesNestedInt returnStruct16BytesNestedInt_a0 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
+Struct8BytesNestedInt returnStruct16BytesNestedInt_a1 =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct16BytesNestedInt> returnStruct16BytesNestedIntResultPointer =
@@ -11346,9 +11469,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 Struct16BytesNestedInt returnStruct32BytesNestedInt_a0 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 Struct16BytesNestedInt returnStruct32BytesNestedInt_a1 =
-    Struct16BytesNestedInt();
+    Pointer<Struct16BytesNestedInt>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<Struct32BytesNestedInt> returnStruct32BytesNestedIntResultPointer =
@@ -11423,9 +11546,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a0 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a1 =
-    StructAlignmentInt16();
+    Pointer<StructAlignmentInt16>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt16>
@@ -11492,9 +11615,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a0 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a1 =
-    StructAlignmentInt32();
+    Pointer<StructAlignmentInt32>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt32>
@@ -11561,9 +11684,9 @@
 
 // Global variables to be able to test inputs after callback returned.
 StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a0 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a1 =
-    StructAlignmentInt64();
+    Pointer<StructAlignmentInt64>.fromAddress(0).ref;
 
 // Result variable also global, so we can delete it after the callback.
 Pointer<StructNestedIntStructAlignmentInt64>
@@ -11631,9 +11754,9 @@
 // Global variables to be able to test inputs after callback returned.
 int returnStructNestedIrregularEvenBigger_a0 = 0;
 StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a1 =
-    StructNestedIrregularBigger();
+    Pointer<StructNestedIrregularBigger>.fromAddress(0).ref;
 StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a2 =
-    StructNestedIrregularBigger();
+    Pointer<StructNestedIrregularBigger>.fromAddress(0).ref;
 double returnStructNestedIrregularEvenBigger_a3 = 0.0;
 
 // Result variable also global, so we can delete it after the callback.
diff --git a/tests/ffi_2/function_callbacks_structs_by_value_test.dart b/tests/ffi_2/function_callbacks_structs_by_value_test.dart
index 930da1e..4ecdbaf 100644
--- a/tests/ffi_2/function_callbacks_structs_by_value_test.dart
+++ b/tests/ffi_2/function_callbacks_structs_by_value_test.dart
@@ -74,7 +74,8 @@
     Struct20BytesHomogeneousInt32 Function(int recursionCounter,
         Struct20BytesHomogeneousInt32, Pointer)>("PassStructRecursive");
 
-Struct8BytesNestedInt typedDataBackedStruct = Struct8BytesNestedInt();
+Struct8BytesNestedInt typedDataBackedStruct =
+    Pointer<Struct8BytesNestedInt>.fromAddress(0).ref;
 bool typedDataBackedStructSet = false;
 void _receiveStructByValue(Struct8BytesNestedInt struct) {
   typedDataBackedStruct = struct;
diff --git a/tests/ffi_2/regress_39063_test.dart b/tests/ffi_2/regress_39063_test.dart
index ceadda3..e8c9570 100644
--- a/tests/ffi_2/regress_39063_test.dart
+++ b/tests/ffi_2/regress_39063_test.dart
@@ -11,8 +11,6 @@
 
 import "dart:ffi";
 
-import "package:expect/expect.dart";
-
 import "dylib_utils.dart";
 
 typedef VigesimalOp = double Function(
diff --git a/tests/ffi_2/vmspecific_function_test.dart b/tests/ffi_2/vmspecific_function_test.dart
index ca55317..ee78780 100644
--- a/tests/ffi_2/vmspecific_function_test.dart
+++ b/tests/ffi_2/vmspecific_function_test.dart
@@ -19,9 +19,6 @@
 
 import 'dylib_utils.dart';
 
-import "package:ffi/ffi.dart";
-import "package:expect/expect.dart";
-
 void main() {
   for (int i = 0; i < 100; ++i) {
     testLookupFunctionPointerNativeType();
diff --git a/tests/ffi_2/vmspecific_highmem_32bit_test.dart b/tests/ffi_2/vmspecific_highmem_32bit_test.dart
index c97f7d0..b0fb8e2 100644
--- a/tests/ffi_2/vmspecific_highmem_32bit_test.dart
+++ b/tests/ffi_2/vmspecific_highmem_32bit_test.dart
@@ -6,7 +6,6 @@
 
 import 'dart:ffi';
 import 'dart:io';
-import 'dart:typed_data';
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/ffi_2/vmspecific_leaf_call_test.dart b/tests/ffi_2/vmspecific_leaf_call_test.dart
index 1cb94fb..05937af 100644
--- a/tests/ffi_2/vmspecific_leaf_call_test.dart
+++ b/tests/ffi_2/vmspecific_leaf_call_test.dart
@@ -11,28 +11,29 @@
 
 import 'package:expect/expect.dart';
 
-import 'dylib_utils.dart';
-import 'ffi_test_helpers.dart';
 import 'callback_tests_utils.dart';
+import 'dylib_utils.dart';
 
 DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
 
 testLeafCall() {
   // Regular calls should transition generated -> native.
-  final isThreadInGenerated = ffiTestFunctions.lookupFunction<
-      Int8 Function(), int Function()>("IsThreadInGenerated");
+  final isThreadInGenerated = ffiTestFunctions
+      .lookupFunction<Int8 Function(), int Function()>("IsThreadInGenerated");
   Expect.equals(0, isThreadInGenerated());
   // Leaf calls should remain in generated state.
-  final isThreadInGeneratedLeaf = ffiTestFunctions.lookupFunction<
-      Int8 Function(), int Function()>("IsThreadInGenerated", isLeaf: true);
+  final isThreadInGeneratedLeaf = ffiTestFunctions
+      .lookupFunction<Int8 Function(), int Function()>("IsThreadInGenerated",
+          isLeaf: true);
   Expect.equals(1, isThreadInGeneratedLeaf());
 }
 
 testLeafCallApi() {
   // Note: This will only crash as expected in debug build mode. In other modes
   // it's effectively skip.
-  final f = ffiTestFunctions.lookupFunction<
-      Void Function(), void Function()>("TestLeafCallApi", isLeaf: true);
+  final f = ffiTestFunctions.lookupFunction<Void Function(), void Function()>(
+      "TestLeafCallApi",
+      isLeaf: true);
   // Calling Dart_.. API is unsafe from leaf calls since we explicitly haven't
   // made the generated -> native transition.
   f();
@@ -46,7 +47,8 @@
   // Note: This will only crash as expected in debug build mode. In other modes
   // it's effectively skip.
   CallbackTest("CallbackLeaf", Pointer.fromFunction<Void Function()>(nop),
-      isLeaf:true).run();
+          isLeaf: true)
+      .run();
 }
 
 main() {
diff --git a/tests/language/async_star/yield_statement_context_test.dart b/tests/language/async_star/yield_statement_context_test.dart
index 7320f02..2b3faa9 100644
--- a/tests/language/async_star/yield_statement_context_test.dart
+++ b/tests/language/async_star/yield_statement_context_test.dart
@@ -51,7 +51,7 @@
 
   test('two labels on same line', () {
     f() async* {
-      // DO NOT RUN dartfmt on this file. The labels should be on the same.
+      // DO NOT RUN dart format on this file. The labels should be on the same.
       // line. Originally VM issue #2238.
       label1: label2: yield 0;
     }
diff --git a/tests/language/const/constant_type_variable_error_test.dart b/tests/language/const/constant_type_variable_error_test.dart
new file mode 100644
index 0000000..c0e7770
--- /dev/null
+++ b/tests/language/const/constant_type_variable_error_test.dart
@@ -0,0 +1,58 @@
+// 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.
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+// Test the support for errors about type parameters as potentially
+// constant expressions or potentially constant type expressions.
+
+class A<X> {
+  final Object x1, x2, x3, x4, x5, x6, x7, x8, x9;
+
+  const A()
+      : x1 = const [X],
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x2 = const <X>[],
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x3 = const {X},
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x4 = const <X>{},
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x5 = const {X: null},
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x6 = const <X, String?>{},
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x7 = const B<X>(),
+        //^
+        // [analyzer] unspecified
+        // [cfe] unspecified
+        x8 = const C(X);
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class B<X> {
+  const B();
+}
+
+class C {
+  const C(Object o);
+}
+
+void main() {
+  const A<int>();
+}
diff --git a/tests/language/const/constant_type_variable_test.dart b/tests/language/const/constant_type_variable_test.dart
new file mode 100644
index 0000000..b8436a5
--- /dev/null
+++ b/tests/language/const/constant_type_variable_test.dart
@@ -0,0 +1,24 @@
+// 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.
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+// Test the support for type parameters as potentially constant expressions
+// and potentially constant type expressions. The cast to dynamic is included
+// in order to avoid a diagnostic message about an unnecessary cast.
+
+class A<X> {
+  final Type t1, t2;
+  final Object x1, x2;
+
+  const A()
+      : t1 = X,
+        t2 = List<X>,
+        x1 = 1 is X,
+        x2 = (const <Never>[] as dynamic) as List<X>;
+}
+
+void main() {
+  const A<int>();
+}
diff --git a/tests/language/const/instantiated_function_constant_error_test.dart b/tests/language/const/instantiated_function_constant_error_test.dart
new file mode 100644
index 0000000..91b5ec4
--- /dev/null
+++ b/tests/language/const/instantiated_function_constant_error_test.dart
@@ -0,0 +1,180 @@
+// 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.
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+// Test the support for error detection with generic function instantiation
+// expressions that are constant or potentially constant. Include both some
+// explicit generic function instantiations, and some implicit ones (for the
+// latter, the type arguments are derived by type inference based on the
+// context type). The main goal is to test the new feature where the underlying
+// function is given as an existing function object, which also implies that
+// there are several new possible syntactic forms, e.g., `(b ? f1 : f2)<int>`.
+// The errors generally arise because one or more subexpressions are not
+// constant.
+
+import 'instantiated_function_constant_test.dart' as prefix;
+
+void f1<X extends num>(X x, [num n = 0, List<X> xList = const []]) {}
+void f2<Y extends num>(Y y, [int i = 1, Map<Y, Y> yMap = const {}]) {}
+
+const b = true;
+
+const c01 = f1;
+const c02 = f2;
+
+void test<Z extends num>() {
+  void g1<X extends num>(X x, [num n = 0, List<X> xList = const []]) {}
+  void g2<Y extends num>(Y y, [int i = 1, Map<Y, Y> yMap = const {}]) {}
+
+  // Explicitly instantiate function declaration.
+
+  const c03 = f1<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c04 = prefix.f2<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c05 = prefix.f1<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c06 = f2<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c07 = g1<int>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c08 = prefix.g2<int>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c09 = prefix.g1<int>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c10 = g2<int>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c11 = g1<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c12 = prefix.g2<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c13 = prefix.g1<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c14 = g2<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  // Explicitly instantiate constant variable.
+
+  const c07 = prefix.c01<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c08 = c02<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c09 = c01<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const c10 = prefix.c02<Z>;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  // Implicitly instantiate function declaration.
+
+  const void Function(Z) c11 = f1;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const void Function(Z, [int, Map<int, int>]) c12 = prefix.f2;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  // Implicitly instantiate constant variable.
+
+  const void Function(Z) c13 = prefix.c01;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  const void Function(Z, [int, Map<int, int>]) c14 = c02;
+  //^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+// Test new potentially constant expressions. A type variable is a potentially
+// constant type expression, so there are no errors in the initializer list.
+class A<U extends num> {
+  final x1, x2, x3, x4, x5, x6;
+  final void Function(U) x7;
+  final void Function(U) x8;
+  final void Function(U, [int, Map<num, Never>]) x9;
+  final void Function(U) x10;
+
+  const A(bool b)
+      : x1 = (b ? f1 : prefix.f2)<U>,
+        x2 = (b ? prefix.c01 : c02)<U>,
+        x3 = ((b ? prefix.f1 : f2))<U>,
+        x4 = ((b ? c01 : prefix.c02))<U>,
+        x5 = (null ?? f1)<U>,
+        x6 = ((c01 as dynamic) as void Function<X extends num>(X,
+            [num, List<X>]))<U>,
+        x7 = b ? f1 : f2,
+        x8 = b ? c01 : c02,
+        x9 = null ?? c02,
+        x10 =
+            (c01 as dynamic) as void Function<X extends num>(X, [int, List<X>]);
+}
+
+void main() {
+  const ff = false;
+  const A<double>(true);
+  const A<num>(ff);
+
+  void h<V>() {
+    const A<V>(true);
+    //^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    const A<V>(ff);
+    //^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
diff --git a/tests/language/const/instantiated_function_constant_test.dart b/tests/language/const/instantiated_function_constant_test.dart
new file mode 100644
index 0000000..b86f99d
--- /dev/null
+++ b/tests/language/const/instantiated_function_constant_test.dart
@@ -0,0 +1,85 @@
+// 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.
+
+// SharedOptions=--enable-experiment=constructor-tearoffs
+
+// Test the support for generic function instantiation with constant and
+// potentially constant expressions. Include both some explicit generic
+// function instantiations, and some implicit ones (for the latter, the type
+// arguments are derived by type inference based on the context type). The
+// main goal is to test the new feature where the underlying function is
+// given as an existing function object, which also implies that there are
+// several new possible syntactic forms, e.g., `(b ? f1 : f2)<int>`.
+
+import 'instantiated_function_constant_test.dart' as prefix;
+
+void f1<X extends num>(X x, [num n = 0, List<X> xList = const []]) {}
+void f2<Y extends num>(Y y, [int i = 1, Map<Y, Y> yMap = const {}]) {}
+
+const b = true;
+
+const c01 = f1;
+const c02 = f2;
+
+// Explicitly instantiate function declaration.
+const c03 = f1<int>;
+const c04 = prefix.f2<int>;
+const c05 = prefix.f1<int>;
+const c06 = f2<int>;
+
+// Explicitly instantiate constant variable.
+const c07 = prefix.c01<int>;
+const c08 = c02<int>;
+const c09 = c01<int>;
+const c10 = prefix.c02<int>;
+
+// Implicitly instantiate function declaration.
+const void Function(double) c11 = f1;
+const void Function(Never, [int, Map<int, int>]) c12 = prefix.f2;
+
+// Implicitly instantiate constant variable.
+const void Function(double) c13 = prefix.c01;
+const void Function(Never, [int, Map<int, int>]) c14 = c02;
+
+// Test new potentially constant expressions. A type variable is a potentially
+// constant type expression, so there are no errors in the initializer list.
+class A<U extends num> {
+  final x1, x2, x3, x4, x5, x6;
+  final void Function(U) x7;
+  final void Function(U) x8;
+  final void Function(U, [int, Map<num, Never>]) x9;
+  final void Function(U) x10;
+  final void Function(num) x11;
+  final void Function(double) x12;
+  final void Function(num, [int, Map<num, Never>]) x13;
+  final void Function(int) x14;
+
+  const A(bool b)
+      : x1 = b ? (b ? f1 : prefix.f2)<U> : (b ? f1 : prefix.f2)<int>,
+        x2 = b ? (b ? prefix.c01 : c02)<U> : (b ? prefix.c01 : c02)<int>,
+        x3 = b ? ((b ? prefix.f1 : f2))<U> : ((b ? prefix.f1 : f2))<int>,
+        x4 = b ? ((b ? c01 : prefix.c02))<U> : ((b ? c01 : prefix.c02))<int>,
+        x5 = b ? (null ?? f1)<U> : (null ?? f1)<int>,
+        x6 = b
+            ? ((c01 as dynamic) as void Function<X extends num>(X,
+                [num, List<X>]))<U>
+            : ((c01 as dynamic) as void Function<X extends num>(X,
+                [num, List<X>]))<int>,
+        x7 = b ? f1 : f2,
+        x8 = b ? c01 : c02,
+        x9 = null ?? c02,
+        x10 =
+            (c01 as dynamic) as void Function<X extends num>(X, [int, List<X>]),
+        x11 = b ? f1 : f2,
+        x12 = b ? c01 : c02,
+        x13 = null ?? c02,
+        x14 =
+            (c01 as dynamic) as void Function<X extends num>(X, [int, List<X>]);
+}
+
+void main() {
+  const ff = false;
+  const A<double>(true);
+  const A<num>(ff);
+}
diff --git a/tests/language/constants_2018/constant_types_test.dart b/tests/language/constants_2018/constant_types_test.dart
index 2c8dee1..44a4d5f 100644
--- a/tests/language/constants_2018/constant_types_test.dart
+++ b/tests/language/constants_2018/constant_types_test.dart
@@ -4,7 +4,7 @@
 
 // Tests that in some positions only constant types are allowed, so not
 // type parameters. But in other positions potentially constant types are
-// allowed, so type parameters.
+// allowed, including type parameters.
 
 import "package:expect/expect.dart";
 
@@ -24,7 +24,7 @@
   ;
   const T.test4()
       : value = null //
-            ?? X //# 04: compile-time error
+            ?? X //# 04: ok
   ;
 }
 
diff --git a/tests/language/constructor/explicit_instantiation_syntax_test.dart b/tests/language/constructor/explicit_instantiation_syntax_test.dart
index 3b3ddd3..387da72 100644
--- a/tests/language/constructor/explicit_instantiation_syntax_test.dart
+++ b/tests/language/constructor/explicit_instantiation_syntax_test.dart
@@ -42,6 +42,7 @@
 void h(_1, [_2]) {}
 
 int i = 0;
+bool boolVar = true;
 
 class Test {
   var x;
@@ -108,16 +109,17 @@
 
     g(C<int, int> . named());
 
-    g(C<int, int> .. toString());
+    h(C<int, int> .. toString()); //# 13: syntax error
+    g((C<int, int>) .. toString());
 
-    h(C<int, int> ...); //# 13: syntax error
+    h(C<int, int> ...); //# 14: syntax error
 
-    h(C<int, int> ...?); //# 14: syntax error
+    h(C<int, int> ...?); //# 15: syntax error
 
-    h(C<int, int> / 1); //# 15: syntax error
+    h(C<int, int> / 1); //# 16: syntax error
     g((C<int, int>) / 1);
 
-    g(C<int, int> /**/); //# 16: ok
+    g(C<int, int> /**/); //# 17: ok
     f(C<int, int> /**/ - 1);
 
     g(C<int, int> //
@@ -126,38 +128,38 @@
         -
         1);
 
-    h(C<int, int> /= 1); //# 17: syntax error
+    h(C<int, int> /= 1); //# 18: syntax error
 
     g({C<int, int> : 1});
 
-    C<int, int> ; //# 18: ok
+    C<int, int> ; //# 19: ok
 
-    h(C<int, int> < 1); //# 19: syntax error
+    h(C<int, int> < 1); //# 20: syntax error
     g((C<int, int>) < 1);
 
-    h(C<int, int> << 1); //# 20: syntax error
+    h(C<int, int> << 1); //# 21: syntax error
     g((C<int, int>) << 1);
 
-    h(C<int, int> <<= 1); //# 21: syntax error
+    h(C<int, int> <<= 1); //# 22: syntax error
 
-    h(C<int, int> <= 1); //# 22: syntax error
+    h(C<int, int> <= 1); //# 23: syntax error
     g((C<int, int>) <= 1);
 
-    h(C<int, int> = 1); //# 23: syntax error
+    h(C<int, int> = 1); //# 24: syntax error
 
     g(C<int, int> == 1);
 
-    h(C<int, int> =>); //# 24: syntax error
+    h(C<int, int> =>); //# 25: syntax error
 
     // The operator `>>` is a single token in the grammar.
-    h(C<int, int> > 1); //# 25: syntax error
+    h(C<int, int> > 1); //# 26: syntax error
     h((C<int, int>) > 1);
 
-    h(true + C<int, int> ? 1 : 1); //# 26: syntax error
+    h(true + C<int, int> ? 1 : 1); //# 27: syntax error
     g(true + (C<int, int>) ? 1 : 1);
 
-    g(C<int, int> ?. toString()); //# 27: syntax error
-    g((C<int, int>) ?. toString()); //# 28: static type warning
+    g(C<int, int> ?. toString()); //# 28: syntax error
+    g((boolVar ? null : C<int, int>) ?. toString());
 
     h(C<int, int> ?.. toString()); //# 29: syntax error
 
diff --git a/tests/language/constructor/named_constructor_test.dart b/tests/language/constructor/named_constructor_test.dart
index 5b37427..fba725e 100644
--- a/tests/language/constructor/named_constructor_test.dart
+++ b/tests/language/constructor/named_constructor_test.dart
@@ -29,7 +29,7 @@
   // 'Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new Class<int>.named<int>().value;
   //             ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   new prefix.Class().value;
@@ -45,7 +45,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 
@@ -65,7 +65,7 @@
   // 'prefix.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class.named<int>().value;
   //               ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
@@ -73,7 +73,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 
@@ -91,7 +91,7 @@
   // 'prefix.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class<int>.named<int>().value;
   //                    ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   // 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
@@ -99,7 +99,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 }
diff --git a/tests/language/constructor/reference_test.dart b/tests/language/constructor/reference_test.dart
index b15338b..6828160 100644
--- a/tests/language/constructor/reference_test.dart
+++ b/tests/language/constructor/reference_test.dart
@@ -39,7 +39,7 @@
   //  ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'Foo.bar.baz'.
 
@@ -73,7 +73,7 @@
   //    ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'Foo.bar.baz'.
 
diff --git a/tests/language/enum/enum_test.dart b/tests/language/enum/enum_test.dart
index 8b21613..4deb861 100644
--- a/tests/language/enum/enum_test.dart
+++ b/tests/language/enum/enum_test.dart
@@ -16,6 +16,8 @@
 
 enum _IsNot { IsNot }
 
+enum NamedName { name, address }
+
 // Regression test for https://github.com/dart-lang/sdk/issues/33348
 enum JSFunctionPrototype {
   length,
@@ -93,6 +95,34 @@
   Expect.type<Enum>(Enum1._);
   Enum enumValue = Enum1._;
   Expect.equals(0, enumValue.index);
+
+  // Enum.compareByIndex orders enums correctly.
+  var enumValues = [Enum5.G, Enum5.H, Enum5.F];
+  for (var i = 0; i < 10; i++) {
+    enumValues.sort(Enum.compareByIndex);
+    enumValues.fold<int>(-1, (previousValue, element) {
+      Expect.isTrue(previousValue < element.index, "$enumValues");
+      return element.index;
+    });
+    enumValues.shuffle();
+  }
+  // Can be used at the type `Enum` to compare different enums.
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.D, Enum5.H) < 0);
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.E, Enum5.F) > 0);
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.D, Enum5.F) == 0);
+
+  Expect.equals("A", Enum2.A.name);
+  Expect.equals("_", Enum1._.name);
+  Expect.equals("name", EnumName(NamedName.name).name);
+
+  Expect.identical(Enum2.A, Enum2.values.byName("A"));
+  Expect.identical(Enum1._, Enum1.values.byName("_"));
+  Expect.identical(NamedName.name, NamedName.values.byName("name"));
+
+  var map = NamedName.values.asNameMap();
+  Expect.type<Map<String, NamedName>>(map);
+  Expect.identical(NamedName.name, map["name"]);
+  Expect.identical(NamedName.address, map["address"]);
 }
 
 test1(Enum1 e) {
diff --git a/tests/language/explicit_type_instantiation_parsing_test.dart b/tests/language/explicit_type_instantiation_parsing_test.dart
index 4397a2c..e0584e7 100644
--- a/tests/language/explicit_type_instantiation_parsing_test.dart
+++ b/tests/language/explicit_type_instantiation_parsing_test.dart
@@ -292,20 +292,14 @@
   // [cfe] A comparison expression can't be an operand of another comparison expression.
   // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND
 
-  // Parsed as a generic instantiation, but `v` is not generic function or type.
-  // Would be valid if parsed as operators.
+  // Parsed as a generic invocation. Valid because of the `call` extension
+  // method on `Object?`.
   expect1(v < X, X > (2));
-  //        ^^^^^^^^
-  // [cfe] unspecified
-  // [analyzer] unspecified
 
-  // Parsed as a generic instantiation, but `d` is not generic function or type.
-  // Being dynamic doesn't help.
-  // Would be valid if parsed as operators.
-  expect1(v < X, X > (2));
-  //        ^^^^^^^^
-  // [cfe] unspecified
-  // [analyzer] unspecified
+  // Parsed as a generic invocation. Valid because this is an *invocation*
+  // rather than an *instantiation*. We don't allow instantiation on `dynamic`,
+  // but we do allow calling.
+  expect1(d < X, X > (2));
 
   // Valid only if parenthesized.
   expect1((Z < X, X >) * 2);
diff --git a/tests/language/function_subtype/nested_function_type_test.dart b/tests/language/function_subtype/nested_function_type_test.dart
new file mode 100644
index 0000000..a284690
--- /dev/null
+++ b/tests/language/function_subtype/nested_function_type_test.dart
@@ -0,0 +1,44 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// Two function types that are identical except the argument type of the
+// nested function is a type variable from the outer function.
+typedef Fn = void Function<S>(S val) Function<T>(T val);
+typedef Gn = void Function<S>(T val) Function<T>(T val);
+
+void Function<S>(S) fn<T>(T val) => <R>(R val) {};
+void Function<S>(T) gn<T>(T val) => <R>(T val) {};
+
+// The same pattern here except with bounds on the type arguments.
+typedef Xn = void Function<S extends num>(S val) Function<T extends num>(T val);
+typedef Yn = void Function<S extends num>(T val) Function<T extends num>(T val);
+
+void Function<S extends num>(S) xn<T extends num>(T val) =>
+    <R extends num>(R val) {};
+void Function<S extends num>(T) yn<T extends num>(T val) =>
+    <R extends num>(T val) {};
+
+// The nested function here uses concrete type in the argument position so it
+// should satisfy either of the previous typedefs.
+void Function<S extends num>(num) zn<T extends num>(T val) =>
+    <R extends num>(num val) {};
+
+void main() {
+  Expect.isTrue(fn is Fn);
+  Expect.isFalse(fn is Gn);
+
+  Expect.isTrue(gn is Gn);
+  Expect.isFalse(gn is Fn);
+
+  Expect.isTrue(xn is Xn);
+  Expect.isFalse(xn is Yn);
+
+  Expect.isTrue(yn is Yn);
+  Expect.isFalse(yn is Xn);
+
+  Expect.isTrue(zn is Xn);
+  Expect.isTrue(zn is Yn);
+}
diff --git a/tests/language/instantiate_to_bound/README.md b/tests/language/instantiate_to_bound/README.md
index 0c24c51..a015f2e 100644
--- a/tests/language/instantiate_to_bound/README.md
+++ b/tests/language/instantiate_to_bound/README.md
@@ -7,6 +7,6 @@
 feature relies on another feature, _super-bounded types_, which is
 therefore also in focus for tests in this directory. For more details,
 please check the feature specifications on
-[super-bounded types](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/super-bounded-types.md)
+[super-bounded types](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/super-bounded-types.md)
 and on
-[instantiate to bound](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/instantiate-to-bound.md).
\ No newline at end of file
+[instantiate to bound](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md).
\ No newline at end of file
diff --git a/tests/language/null_aware/access_test.dart b/tests/language/null_aware/access_test.dart
index 3307440..6fc1daa 100644
--- a/tests/language/null_aware/access_test.dart
+++ b/tests/language/null_aware/access_test.dart
@@ -132,4 +132,7 @@
   //                                        ^^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Member not found: 'hashCode'.
+
+  // (C.staticInt?.floor())! can be assigned to int.
+  int y = (C.staticInt?.floor())!;
 }
diff --git a/tests/language/operator/arithmetic_test.dart b/tests/language/operator/arithmetic_test.dart
index 7784f35..8661896 100644
--- a/tests/language/operator/arithmetic_test.dart
+++ b/tests/language/operator/arithmetic_test.dart
@@ -1,8 +1,11 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 // Dart test program to test arithmetic operations.
+
 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+// VMOptions=--use_slow_path
 
 library arithmetic_test;
 
diff --git a/tests/language/operator/invalid_operators_test.dart b/tests/language/operator/invalid_operators_test.dart
index fba4e06..066f059 100644
--- a/tests/language/operator/invalid_operators_test.dart
+++ b/tests/language/operator/invalid_operators_test.dart
@@ -496,97 +496,97 @@
   //       ^
   // [cfe] Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ><T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator <=<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator >=<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator -<T>() => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator -<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator +<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator /<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ~/<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator *<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator %<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator |<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ^<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator &<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator <<<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator >><T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator []=<T>(a, b) => true;
   //          ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //           ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator []<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ~<T, S>() => true;
   //        ^^^^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
 }
diff --git a/tests/language/operator/operator_triple_shift_error_test.dart b/tests/language/operator/operator_triple_shift_error_test.dart
index 5f0ad8a..36416d1 100644
--- a/tests/language/operator/operator_triple_shift_error_test.dart
+++ b/tests/language/operator/operator_triple_shift_error_test.dart
@@ -49,7 +49,7 @@
   //                    ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   //                   ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
 }
 
 // Operators cannot be static.
diff --git a/tests/language/redirecting/factory_bounds_test.dart b/tests/language/redirecting/factory_bounds_test.dart
index 694062e..fcc2f54 100644
--- a/tests/language/redirecting/factory_bounds_test.dart
+++ b/tests/language/redirecting/factory_bounds_test.dart
@@ -11,7 +11,7 @@
 class Foobar<T> implements Foo<T> {}
 
 class Bar<
-          T // A comment to prevent dartfmt from joining the lines.
+          T // A comment to prevent dart format from joining the lines.
           extends Foo<T>      //# 00: ok
           extends Baz<Foo<T>> //# 01: compile-time error
           extends Foobar<T>   //# 02: compile-time error
@@ -21,7 +21,7 @@
 }
 
 class Qux<
-          T // A comment to prevent dartfmt from joining the lines.
+          T // A comment to prevent dart format from joining the lines.
           extends Foo<T> //# 00: continued
           extends Foo<T> //# 01: continued
           extends Foo<T> //# 02: continued
@@ -33,7 +33,7 @@
 
 class A<T extends int> {
   factory A() = B<
-                  T // A comment to prevent dartfmt from joining the lines.
+                  T // A comment to prevent dart format from joining the lines.
                   , int //# 03: compile-time error
                   , String //# 04: ok
                  >;
diff --git a/tests/language/regress/regress47166_test.dart b/tests/language/regress/regress47166_test.dart
new file mode 100644
index 0000000..b44d28b
--- /dev/null
+++ b/tests/language/regress/regress47166_test.dart
@@ -0,0 +1,57 @@
+// 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.
+
+// Regression test for https://github.com/dart-lang/sdk/issues/47166
+
+import 'package:expect/expect.dart';
+
+@pragma('dart2js:noInline')
+void maybeThrow(bool doThrow) {
+  if (doThrow) throw Exception('omg!');
+}
+
+int triggerTheProblem(bool doThrow) {
+  int x = 1;
+  try {
+    x = 100;
+    maybeThrow(doThrow);
+    x = 1; // unreached.
+    log1 = x;
+  } catch (e) {
+    log2 = x;
+  }
+  log3 = x;
+
+  // This closure creates a context object ('box') subject to load elimination.
+  // In the reported bug, log2 and log3 were assigned constant '1' from an
+  // incorrect store-forwarding optimization of the boxed 'x'. The '1' came from
+  // the merge of '1' from the initialization of 'x' and the unreachable
+  // assignment of 'x'.
+  g = () => x;
+
+  log4 = x;
+  return x;
+}
+
+dynamic g;
+int log1 = 0, log2 = 0, log3 = 0, log4 = 0, log5 = 0, log6 = 0;
+
+void main() {
+  log5 = triggerTheProblem(true);
+  log6 = g(); // Use 'g'.
+  Expect.equals(
+      'log1=0 log2=100 log3=100 log4=100 log5=100 log6=100',
+      'log1=$log1 log2=$log2 log3=$log3 log4=$log4 log5=$log5 log6=$log6',
+      'throwing');
+
+  // Run the test with 'doThrow' being false to avoid any confounding
+  // optimizations due to constant propagation.
+  log1 = log2 = log3 = log4 = log5 = log6 = 0;
+  log5 = triggerTheProblem(false);
+  log6 = g(); // Use 'g'.
+  Expect.equals(
+      'log1=1 log2=0 log3=1 log4=1 log5=1 log6=1',
+      'log1=$log1 log2=$log2 log3=$log3 log4=$log4 log5=$log5 log6=$log6',
+      'not throwing');
+}
diff --git a/tests/language/setter/setter3_test.dart b/tests/language/setter/setter3_test.dart
index a8212e4..59a6a7e 100644
--- a/tests/language/setter/setter3_test.dart
+++ b/tests/language/setter/setter3_test.dart
@@ -17,8 +17,6 @@
 //^^^^
 // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 // [cfe] The return type of the setter must be 'void' or absent.
-//         ^^^
-// [analyzer] COMPILE_TIME_ERROR.BODY_MIGHT_COMPLETE_NORMALLY
 }
 
 main() {
diff --git a/tests/language/void/README.md b/tests/language/void/README.md
index d2a17c9..ad7fa6b 100644
--- a/tests/language/void/README.md
+++ b/tests/language/void/README.md
@@ -7,4 +7,4 @@
 developers to express the intent that the value of certain expressions
 is of no interest, and help them to avoid using such values. For more
 details, please check the
-[feature specification](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/generalized-void.md).
\ No newline at end of file
+[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/generalized-void.md).
\ No newline at end of file
diff --git a/tests/language_2/async_star/yield_statement_context_test.dart b/tests/language_2/async_star/yield_statement_context_test.dart
index e512b3f..7e64c9b 100644
--- a/tests/language_2/async_star/yield_statement_context_test.dart
+++ b/tests/language_2/async_star/yield_statement_context_test.dart
@@ -53,7 +53,7 @@
 
   test('two labels on same line', () {
     f() async* {
-      // DO NOT RUN dartfmt on this file. The labels should be on the same.
+      // DO NOT RUN dart format on this file. The labels should be on the same.
       // line. Originally VM issue #2238.
       label1: label2: yield 0;
     }
diff --git a/tests/language_2/constructor/named_constructor_test.dart b/tests/language_2/constructor/named_constructor_test.dart
index 0cad797..daeb070 100644
--- a/tests/language_2/constructor/named_constructor_test.dart
+++ b/tests/language_2/constructor/named_constructor_test.dart
@@ -31,7 +31,7 @@
   // 'Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new Class<int>.named<int>().value;
   //             ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   new prefix.Class().value;
@@ -47,7 +47,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 
@@ -67,7 +67,7 @@
   // 'prefix.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class.named<int>().value;
   //               ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
@@ -75,7 +75,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 
@@ -93,7 +93,7 @@
   // 'prefix.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class<int>.named<int>().value;
   //                    ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
 
   // 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
@@ -101,7 +101,7 @@
   //  ^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //              ^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'prefix.Class'.
 }
diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart
index 03c68d5..738d450 100644
--- a/tests/language_2/constructor/reference_test.dart
+++ b/tests/language_2/constructor/reference_test.dart
@@ -41,7 +41,7 @@
   //  ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'Foo.bar.baz'.
 
@@ -75,7 +75,7 @@
   //    ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
-  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS
   // [cfe] A constructor invocation can't have type arguments after the constructor name.
   // [cfe] Couldn't find constructor 'Foo.bar.baz'.
 
diff --git a/tests/language_2/enum/enum_test.dart b/tests/language_2/enum/enum_test.dart
index 8eb762f..73b3db6 100644
--- a/tests/language_2/enum/enum_test.dart
+++ b/tests/language_2/enum/enum_test.dart
@@ -18,6 +18,8 @@
 
 enum _IsNot { IsNot }
 
+enum NamedName { name, address }
+
 // Regression test for https://github.com/dart-lang/sdk/issues/33348
 enum JSFunctionPrototype {
   length,
@@ -95,6 +97,34 @@
   Expect.type<Enum>(Enum1._);
   Enum enumValue = Enum1._;
   Expect.equals(0, enumValue.index);
+
+  // Enum.compareByIndex orders enums correctly.
+  var enumValues = [Enum5.G, Enum5.H, Enum5.F];
+  for (var i = 0; i < 10; i++) {
+    enumValues.sort(Enum.compareByIndex);
+    enumValues.fold<int>(-1, (previousValue, element) {
+      Expect.isTrue(previousValue < element.index, "$enumValues");
+      return element.index;
+    });
+    enumValues.shuffle();
+  }
+  // Can be used at the type `Enum` to compare different enums.
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.D, Enum5.H) < 0);
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.E, Enum5.F) > 0);
+  Expect.isTrue(Enum.compareByIndex<Enum>(Enum4.D, Enum5.F) == 0);
+
+  Expect.equals("A", Enum2.A.name);
+  Expect.equals("_", Enum1._.name);
+  Expect.equals("name", EnumName(NamedName.name).name);
+
+  Expect.identical(Enum2.A, Enum2.values.byName("A"));
+  Expect.identical(Enum1._, Enum1.values.byName("_"));
+  Expect.identical(NamedName.name, NamedName.values.byName("name"));
+
+  var map = NamedName.values.asNameMap();
+  Expect.type<Map<String, NamedName>>(map);
+  Expect.identical(NamedName.name, map["name"]);
+  Expect.identical(NamedName.address, map["address"]);
 }
 
 test1(Enum1 e) {
diff --git a/tests/language_2/fixed_size_int/README.md b/tests/language_2/fixed_size_int/README.md
index a2ddb7c..6b768e9 100644
--- a/tests/language_2/fixed_size_int/README.md
+++ b/tests/language_2/fixed_size_int/README.md
@@ -4,4 +4,4 @@
 feature which changes the `int` type to have a fixed-size representation
 (as opposed to implicitly transitioning into an arbitrary bigint
 representation when needed). For more details, please check the
-[informal specification](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md).
+[informal specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/int64.md).
diff --git a/tests/language_2/function_subtype/nested_function_type_test.dart b/tests/language_2/function_subtype/nested_function_type_test.dart
new file mode 100644
index 0000000..79bc0aa
--- /dev/null
+++ b/tests/language_2/function_subtype/nested_function_type_test.dart
@@ -0,0 +1,46 @@
+// 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.
+
+// @dart = 2.9
+
+import "package:expect/expect.dart";
+
+// Two function types that are identical except the argument type of the
+// nested function is a type variable from the outer function.
+typedef Fn = void Function<S>(S val) Function<T>(T val);
+typedef Gn = void Function<S>(T val) Function<T>(T val);
+
+void Function<S>(S) fn<T>(T val) => <R>(R val) {};
+void Function<S>(T) gn<T>(T val) => <R>(T val) {};
+
+// The same pattern here except with bounds on the type arguments.
+typedef Xn = void Function<S extends num>(S val) Function<T extends num>(T val);
+typedef Yn = void Function<S extends num>(T val) Function<T extends num>(T val);
+
+void Function<S extends num>(S) xn<T extends num>(T val) =>
+    <R extends num>(R val) {};
+void Function<S extends num>(T) yn<T extends num>(T val) =>
+    <R extends num>(T val) {};
+
+// The nested function here uses concrete type in the argument position so it
+// should satisfy either of the previous typedefs.
+void Function<S extends num>(num) zn<T extends num>(T val) =>
+    <R extends num>(num val) {};
+
+void main() {
+  Expect.isTrue(fn is Fn);
+  Expect.isFalse(fn is Gn);
+
+  Expect.isTrue(gn is Gn);
+  Expect.isFalse(gn is Fn);
+
+  Expect.isTrue(xn is Xn);
+  Expect.isFalse(xn is Yn);
+
+  Expect.isTrue(yn is Yn);
+  Expect.isFalse(yn is Xn);
+
+  Expect.isTrue(zn is Xn);
+  Expect.isTrue(zn is Yn);
+}
diff --git a/tests/language_2/implicit_creation/README.md b/tests/language_2/implicit_creation/README.md
index c6c3857e..0917226 100644
--- a/tests/language_2/implicit_creation/README.md
+++ b/tests/language_2/implicit_creation/README.md
@@ -5,6 +5,6 @@
 creation expressions and composite literals (maps and lists) to be
 omitted. For more details, please check the feature specifications
 on
-[optional const](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/optional-const.md)
+[optional const](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-const.md)
 and on
-[optional new](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/optional-new.md).
\ No newline at end of file
+[optional new](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-new.md).
\ No newline at end of file
diff --git a/tests/language_2/instantiate_to_bound/README.md b/tests/language_2/instantiate_to_bound/README.md
index 0c24c51..a015f2e 100644
--- a/tests/language_2/instantiate_to_bound/README.md
+++ b/tests/language_2/instantiate_to_bound/README.md
@@ -7,6 +7,6 @@
 feature relies on another feature, _super-bounded types_, which is
 therefore also in focus for tests in this directory. For more details,
 please check the feature specifications on
-[super-bounded types](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/super-bounded-types.md)
+[super-bounded types](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/super-bounded-types.md)
 and on
-[instantiate to bound](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/instantiate-to-bound.md).
\ No newline at end of file
+[instantiate to bound](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md).
\ No newline at end of file
diff --git a/tests/language_2/invalid_returns/README.md b/tests/language_2/invalid_returns/README.md
index 0a6738b..7ab657e 100644
--- a/tests/language_2/invalid_returns/README.md
+++ b/tests/language_2/invalid_returns/README.md
@@ -2,5 +2,5 @@
 
 This directory holds tests for valid and invalid returns from functions. See
 the
-[feature specification](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/generalized-void.md) for
+[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/generalized-void.md) for
 details, or the formal spec once integrated.
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 0c012d1..dbb1e79 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -16,6 +16,9 @@
 [ $compiler == dartdevk && !$checked ]
 assert/initializer_const_error2_test/*: SkipByDesign # DDC does not support non-checked mode.
 
+[ ($compiler == dartdevc || $compiler == dartdevk) && ($runtime == ff || $runtime == firefox) ]
+async/return_throw_test: Skip # Flaky but not enough to be detected. Re-enable pending a decision on the correct behavior. https://github.com/dart-lang/sdk/issues/44395
+
 [ $compiler == dartdevc || $compiler == dartdevk ]
 async_star/throw_in_catch_test: Skip # Times out. Issue 29920
 external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported
diff --git a/tests/language_2/nosuchmethod_forwarding/README.md b/tests/language_2/nosuchmethod_forwarding/README.md
index bc759e3..ed26b01 100644
--- a/tests/language_2/nosuchmethod_forwarding/README.md
+++ b/tests/language_2/nosuchmethod_forwarding/README.md
@@ -5,4 +5,4 @@
 implicitly for all method signatures in the interface of a class that
 declares a non-trivial `noSuchMethod`. For more details, please check
 the
-[feature specification](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/nosuchmethod-forwarding.md).
+[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/nosuchmethod-forwarding.md).
diff --git a/tests/language_2/operator/arithmetic_test.dart b/tests/language_2/operator/arithmetic_test.dart
index 966570a..9f1f74b 100644
--- a/tests/language_2/operator/arithmetic_test.dart
+++ b/tests/language_2/operator/arithmetic_test.dart
@@ -1,8 +1,11 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 // Dart test program to test arithmetic operations.
+
 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+// VMOptions=--use_slow_path
 
 // @dart = 2.9
 
diff --git a/tests/language_2/operator/invalid_operators_test.dart b/tests/language_2/operator/invalid_operators_test.dart
index 977c644..fdea2ee 100644
--- a/tests/language_2/operator/invalid_operators_test.dart
+++ b/tests/language_2/operator/invalid_operators_test.dart
@@ -497,97 +497,97 @@
   //       ^
   // [cfe] Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ><T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator <=<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator >=<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator -<T>() => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator -<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator +<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator /<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ~/<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator *<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator %<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator |<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ^<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator &<T>(a) => true;
   //        ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator <<<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator >><T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator []=<T>(a, b) => true;
   //          ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //           ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator []<T>(a) => true;
   //         ^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //          ^
   // [cfe] Types parameters aren't allowed when defining an operator.
   operator ~<T, S>() => true;
   //        ^^^^^^
-  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
+  // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR
   //         ^
   // [cfe] Types parameters aren't allowed when defining an operator.
 }
diff --git a/tests/language_2/redirecting/factory_bounds_test.dart b/tests/language_2/redirecting/factory_bounds_test.dart
index 9fec8bd..f8fcca9 100644
--- a/tests/language_2/redirecting/factory_bounds_test.dart
+++ b/tests/language_2/redirecting/factory_bounds_test.dart
@@ -13,7 +13,7 @@
 class Foobar<T> implements Foo<T> {}
 
 class Bar<
-          T // A comment to prevent dartfmt from joining the lines.
+          T // A comment to prevent dart format from joining the lines.
           extends Foo<T>      //# 00: ok
           extends Baz<Foo<T>> //# 01: compile-time error
           extends Foobar<T>   //# 02: compile-time error
@@ -23,7 +23,7 @@
 }
 
 class Qux<
-          T // A comment to prevent dartfmt from joining the lines.
+          T // A comment to prevent dart format from joining the lines.
           extends Foo<T> //# 00: continued
           extends Foo<T> //# 01: continued
           extends Foo<T> //# 02: continued
@@ -35,7 +35,7 @@
 
 class A<T extends int> {
   factory A() = B<
-                  T // A comment to prevent dartfmt from joining the lines.
+                  T // A comment to prevent dart format from joining the lines.
                   , int //# 03: compile-time error
                   , String //# 04: ok
                  >;
diff --git a/tests/language_2/vm/div_mod_test.dart b/tests/language_2/vm/div_mod_test.dart
index 0d75505..0ce3c28 100755
--- a/tests/language_2/vm/div_mod_test.dart
+++ b/tests/language_2/vm/div_mod_test.dart
@@ -11,8 +11,6 @@
 
 import "package:expect/expect.dart";
 
-import 'dart:core';
-
 int kMin = 0x8000000000000000;
 int kMax = 0x7fffffffffffffff;
 
diff --git a/tests/language_2/void/README.md b/tests/language_2/void/README.md
index d2a17c9..ad7fa6b 100644
--- a/tests/language_2/void/README.md
+++ b/tests/language_2/void/README.md
@@ -7,4 +7,4 @@
 developers to express the intent that the value of certain expressions
 is of no interest, and help them to avoid using such values. For more
 details, please check the
-[feature specification](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/generalized-void.md).
\ No newline at end of file
+[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/generalized-void.md).
\ No newline at end of file
diff --git a/tests/lib/async/unawaited_test.dart b/tests/lib/async/unawaited_test.dart
index dc095cc..5ed05af 100644
--- a/tests/lib/async/unawaited_test.dart
+++ b/tests/lib/async/unawaited_test.dart
@@ -14,13 +14,16 @@
 
 void testUnawaited() {
   // Exists where expected.
-  prefix.unawaited.expectStaticType<Exactly<void Function(Future<Object?>)>>();
+  prefix.unawaited.expectStaticType<Exactly<void Function(Future<Object?>?)>>();
 
   var future = Future<int>.value(42);
   captureStaticType(unawaited(future), <T>(value) {
     Expect.equals(typeOf<void>(), T);
   });
 
+  Future<Never>? noFuture = null;
+  unawaited(noFuture); // Doesn't throw on null.
+
   asyncStart();
   // Unawaited futures still throw.
   {
diff --git a/tests/lib/fix_data_tests/developer.dart b/tests/lib/fix_data_tests/developer.dart
new file mode 100644
index 0000000..a9dc42b
--- /dev/null
+++ b/tests/lib/fix_data_tests/developer.dart
@@ -0,0 +1,12 @@
+// 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.
+
+import 'dart:developer';
+
+void main() {
+  print(ServiceExtensionResponse.kInvalidParams);
+  print(ServiceExtensionResponse.kExtensionError);
+  print(ServiceExtensionResponse.kExtensionErrorMax);
+  print(ServiceExtensionResponse.kExtensionErrorMin);
+}
diff --git a/tests/lib/fix_data_tests/developer.dart.expect b/tests/lib/fix_data_tests/developer.dart.expect
new file mode 100644
index 0000000..6f4d9d5
--- /dev/null
+++ b/tests/lib/fix_data_tests/developer.dart.expect
@@ -0,0 +1,12 @@
+// 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.
+
+import 'dart:developer';
+
+void main() {
+  print(ServiceExtensionResponse.invalidParams);
+  print(ServiceExtensionResponse.extensionError);
+  print(ServiceExtensionResponse.extensionErrorMax);
+  print(ServiceExtensionResponse.extensionErrorMin);
+}
diff --git a/tests/lib/fix_data_tests/io.dart b/tests/lib/fix_data_tests/io.dart
index c43ec21..7a29704 100644
--- a/tests/lib/fix_data_tests/io.dart
+++ b/tests/lib/fix_data_tests/io.dart
@@ -53,4 +53,169 @@
   print(HttpStatus.GATEWAY_TIMEOUT);
   print(HttpStatus.HTTP_VERSION_NOT_SUPPORTED);
   print(HttpStatus.NETWORK_CONNECT_TIMEOUT_ERROR);
+  print(SYSTEM_ENCODING);
+  print(StdioType.TERMINAL);
+  print(StdioType.PIPE);
+  print(StdioType.FILE);
+  print(StdioType.OTHER);
+  print(ProcessStartMode.NORMAL);
+  print(ProcessStartMode.INHERIT_STDIO);
+  print(ProcessStartMode.DETACHED);
+  print(ProcessStartMode.DETACHED_WITH_STDIO);
+  print(ProcessSignal.SIGHUP);
+  print(ProcessSignal.SIGINT);
+  print(ProcessSignal.SIGQUIT);
+  print(ProcessSignal.SIGILL);
+  print(ProcessSignal.SIGTRAP);
+  print(ProcessSignal.SIGABRT);
+  print(ProcessSignal.SIGBUS);
+  print(ProcessSignal.SIGFPE);
+  print(ProcessSignal.SIGKILL);
+  print(ProcessSignal.SIGUSR1);
+  print(ProcessSignal.SIGSEGV);
+  print(ProcessSignal.SIGUSR2);
+  print(ProcessSignal.SIGPIPE);
+  print(ProcessSignal.SIGALRM);
+  print(ProcessSignal.SIGTERM);
+  print(ProcessSignal.SIGCHLD);
+  print(ProcessSignal.SIGCONT);
+  print(ProcessSignal.SIGSTOP);
+  print(ProcessSignal.SIGTSTP);
+  print(ProcessSignal.SIGTTIN);
+  print(ProcessSignal.SIGTTOU);
+  print(ProcessSignal.SIGURG);
+  print(ProcessSignal.SIGXCPU);
+  print(ProcessSignal.SIGXFSZ);
+  print(ProcessSignal.SIGVTALRM);
+  print(ProcessSignal.SIGPROF);
+  print(ProcessSignal.SIGWINCH);
+  print(ProcessSignal.SIGPOLL);
+  print(ProcessSignal.SIGSYS);
+  print(InternetAddressType.IP_V4);
+  print(InternetAddressType.IP_V6);
+  print(InternetAddressType.ANY);
+  print(InternetAddress.LOOPBACK_IP_V4);
+  print(InternetAddress.LOOPBACK_IP_V6);
+  print(InternetAddress.ANY_IP_V4);
+  print(InternetAddress.ANY_IP_V6);
+  print(SocketDirection.RECEIVE);
+  print(SocketDirection.SEND);
+  print(SocketDirection.BOTH);
+  print(SocketOption.TCP_NODELAY);
+  print(RawSocketEvent.READ);
+  print(RawSocketEvent.WRITE);
+  print(RawSocketEvent.READ_CLOSED);
+  print(RawSocketEvent.CLOSED);
+  print(FileSystemEntityType.FILE);
+  print(FileSystemEntityType.DIRECTORY);
+  print(FileSystemEntityType.LINK);
+  print(FileSystemEntityType.NOT_FOUND);
+  print(FileSystemEvent.CREATE);
+  print(FileSystemEvent.MODIFY);
+  print(FileSystemEvent.DELETE);
+  print(FileSystemEvent.MOVE);
+  print(FileSystemEvent.ALL);
+  print(ZLibOption.MIN_WINDOW_BITS);
+  print(ZLibOption.MAX_WINDOW_BITS);
+  print(ZLibOption.DEFAULT_WINDOW_BITS);
+  print(ZLibOption.MIN_LEVEL);
+  print(ZLibOption.MAX_LEVEL);
+  print(ZLibOption.DEFAULT_LEVEL);
+  print(ZLibOption.MIN_MEM_LEVEL);
+  print(ZLibOption.MAX_MEM_LEVEL);
+  print(ZLibOption.DEFAULT_MEM_LEVEL);
+  print(ZLibOption.STRATEGY_FILTERED);
+  print(ZLibOption.STRATEGY_HUFFMAN_ONLY);
+  print(ZLibOption.STRATEGY_RLE);
+  print(ZLibOption.STRATEGY_FIXED);
+  print(ZLibOption.STRATEGY_DEFAULT);
+  print(ZLIB);
+  print(GZIP);
+  print(FileMode.READ);
+  print(FileMode.WRITE);
+  print(FileMode.APPEND);
+  print(FileMode.WRITE_ONLY);
+  print(FileMode.WRITE_ONLY_APPEND);
+  print(FileLock.SHARED);
+  print(FileLock.EXCLUSIVE);
+  print(FileLock.BLOCKING_SHARED);
+  print(FileLock.BLOCKING_EXCLUSIVE);
+  print(WebSocketStatus.NORMAL_CLOSURE);
+  print(WebSocketStatus.GOING_AWAY);
+  print(WebSocketStatus.PROTOCOL_ERROR);
+  print(WebSocketStatus.UNSUPPORTED_DATA);
+  print(WebSocketStatus.RESERVED_1004);
+  print(WebSocketStatus.NO_STATUS_RECEIVED);
+  print(WebSocketStatus.ABNORMAL_CLOSURE);
+  print(WebSocketStatus.INVALID_FRAME_PAYLOAD_DATA);
+  print(WebSocketStatus.POLICY_VIOLATION);
+  print(WebSocketStatus.MESSAGE_TOO_BIG);
+  print(WebSocketStatus.MISSING_MANDATORY_EXTENSION);
+  print(WebSocketStatus.INTERNAL_SERVER_ERROR);
+  print(WebSocketStatus.RESERVED_1015);
+  print(CompressionOptions.DEFAULT);
+  print(CompressionOptions.OFF);
+  print(WebSocket.CONNECTING);
+  print(WebSocket.OPEN);
+  print(WebSocket.CLOSING);
+  print(WebSocket.CLOSED);
+  print(HttpHeaders.ACCEPT);
+  print(HttpHeaders.ACCEPT_CHARSET);
+  print(HttpHeaders.ACCEPT_ENCODING);
+  print(HttpHeaders.ACCEPT_LANGUAGE);
+  print(HttpHeaders.ACCEPT_RANGES);
+  print(HttpHeaders.AGE);
+  print(HttpHeaders.ALLOW);
+  print(HttpHeaders.AUTHORIZATION);
+  print(HttpHeaders.CACHE_CONTROL);
+  print(HttpHeaders.CONNECTION);
+  print(HttpHeaders.CONTENT_ENCODING);
+  print(HttpHeaders.CONTENT_LANGUAGE);
+  print(HttpHeaders.CONTENT_LENGTH);
+  print(HttpHeaders.CONTENT_LOCATION);
+  print(HttpHeaders.CONTENT_MD5);
+  print(HttpHeaders.CONTENT_RANGE);
+  print(HttpHeaders.CONTENT_TYPE);
+  print(HttpHeaders.DATE);
+  print(HttpHeaders.ETAG);
+  print(HttpHeaders.EXPECT);
+  print(HttpHeaders.EXPIRES);
+  print(HttpHeaders.FROM);
+  print(HttpHeaders.HOST);
+  print(HttpHeaders.IF_MATCH);
+  print(HttpHeaders.IF_MODIFIED_SINCE);
+  print(HttpHeaders.IF_NONE_MATCH);
+  print(HttpHeaders.IF_RANGE);
+  print(HttpHeaders.IF_UNMODIFIED_SINCE);
+  print(HttpHeaders.LAST_MODIFIED);
+  print(HttpHeaders.LOCATION);
+  print(HttpHeaders.MAX_FORWARDS);
+  print(HttpHeaders.PRAGMA);
+  print(HttpHeaders.PROXY_AUTHENTICATE);
+  print(HttpHeaders.PROXY_AUTHORIZATION);
+  print(HttpHeaders.RANGE);
+  print(HttpHeaders.REFERER);
+  print(HttpHeaders.RETRY_AFTER);
+  print(HttpHeaders.SERVER);
+  print(HttpHeaders.TE);
+  print(HttpHeaders.TRAILER);
+  print(HttpHeaders.TRANSFER_ENCODING);
+  print(HttpHeaders.UPGRADE);
+  print(HttpHeaders.USER_AGENT);
+  print(HttpHeaders.VARY);
+  print(HttpHeaders.VIA);
+  print(HttpHeaders.WARNING);
+  print(HttpHeaders.WWW_AUTHENTICATE);
+  print(HttpHeaders.COOKIE);
+  print(HttpHeaders.SET_COOKIE);
+  print(HttpHeaders.GENERAL_HEADERS);
+  print(HttpHeaders.ENTITY_HEADERS);
+  print(HttpHeaders.RESPONSE_HEADERS);
+  print(HttpHeaders.REQUEST_HEADERS);
+  print(ContentType.TEXT);
+  print(ContentType.HTML);
+  print(ContentType.JSON);
+  print(ContentType.BINARY);
+  print(HttpClient.DEFAULT_HTTP_PORT);
+  print(HttpClient.DEFAULT_HTTPS_PORT);
 }
diff --git a/tests/lib/fix_data_tests/io.dart.expect b/tests/lib/fix_data_tests/io.dart.expect
index 8c95823..f26799a 100644
--- a/tests/lib/fix_data_tests/io.dart.expect
+++ b/tests/lib/fix_data_tests/io.dart.expect
@@ -53,4 +53,169 @@
   print(HttpStatus.gatewayTimeout);
   print(HttpStatus.httpVersionNotSupported);
   print(HttpStatus.networkConnectTimeoutError);
+  print(systemEncoding);
+  print(StdioType.terminal);
+  print(StdioType.pipe);
+  print(StdioType.file);
+  print(StdioType.other);
+  print(ProcessStartMode.normal);
+  print(ProcessStartMode.inheritStdio);
+  print(ProcessStartMode.detached);
+  print(ProcessStartMode.detachedWithStdio);
+  print(ProcessSignal.sighup);
+  print(ProcessSignal.sigint);
+  print(ProcessSignal.sigquit);
+  print(ProcessSignal.sigill);
+  print(ProcessSignal.sigtrap);
+  print(ProcessSignal.sigabrt);
+  print(ProcessSignal.sigbus);
+  print(ProcessSignal.sigfpe);
+  print(ProcessSignal.sigkill);
+  print(ProcessSignal.sigusr1);
+  print(ProcessSignal.sigsegv);
+  print(ProcessSignal.sigusr2);
+  print(ProcessSignal.sigpipe);
+  print(ProcessSignal.sigalrm);
+  print(ProcessSignal.sigterm);
+  print(ProcessSignal.sigchld);
+  print(ProcessSignal.sigcont);
+  print(ProcessSignal.sigstop);
+  print(ProcessSignal.sigtstp);
+  print(ProcessSignal.sigttin);
+  print(ProcessSignal.sigttou);
+  print(ProcessSignal.sigurg);
+  print(ProcessSignal.sigxcpu);
+  print(ProcessSignal.sigxfsz);
+  print(ProcessSignal.sigvtalrm);
+  print(ProcessSignal.sigprof);
+  print(ProcessSignal.sigwinch);
+  print(ProcessSignal.sigpoll);
+  print(ProcessSignal.sigsys);
+  print(InternetAddressType.IPv4);
+  print(InternetAddressType.IPv6);
+  print(InternetAddressType.any);
+  print(InternetAddress.loopbackIPv4);
+  print(InternetAddress.loopbackIPv6);
+  print(InternetAddress.anyIPv4);
+  print(InternetAddress.anyIPv6);
+  print(SocketDirection.receive);
+  print(SocketDirection.send);
+  print(SocketDirection.both);
+  print(SocketOption.tcpNoDelay);
+  print(RawSocketEvent.read);
+  print(RawSocketEvent.write);
+  print(RawSocketEvent.readClosed);
+  print(RawSocketEvent.closed);
+  print(FileSystemEntityType.file);
+  print(FileSystemEntityType.directory);
+  print(FileSystemEntityType.link);
+  print(FileSystemEntityType.notFound);
+  print(FileSystemEvent.create);
+  print(FileSystemEvent.modify);
+  print(FileSystemEvent.delete);
+  print(FileSystemEvent.move);
+  print(FileSystemEvent.all);
+  print(ZLibOption.minWindowBits);
+  print(ZLibOption.maxWindowBits);
+  print(ZLibOption.defaultWindowBits);
+  print(ZLibOption.minLevel);
+  print(ZLibOption.maxLevel);
+  print(ZLibOption.defaultLevel);
+  print(ZLibOption.minMemLevel);
+  print(ZLibOption.maxMemLevel);
+  print(ZLibOption.defaultMemLevel);
+  print(ZLibOption.strategyFiltered);
+  print(ZLibOption.strategyHuffmanOnly);
+  print(ZLibOption.strategyRle);
+  print(ZLibOption.strategyFixed);
+  print(ZLibOption.strategyDefault);
+  print(zlib);
+  print(gzip);
+  print(FileMode.read);
+  print(FileMode.write);
+  print(FileMode.append);
+  print(FileMode.writeOnly);
+  print(FileMode.writeOnlyAppend);
+  print(FileLock.shared);
+  print(FileLock.exclusive);
+  print(FileLock.blockingShared);
+  print(FileLock.blockingExclusive);
+  print(WebSocketStatus.normalClosure);
+  print(WebSocketStatus.goingAway);
+  print(WebSocketStatus.protocolError);
+  print(WebSocketStatus.unsupportedData);
+  print(WebSocketStatus.reserved1004);
+  print(WebSocketStatus.noStatusReceived);
+  print(WebSocketStatus.abnormalClosure);
+  print(WebSocketStatus.invalidFramePayloadData);
+  print(WebSocketStatus.policyViolation);
+  print(WebSocketStatus.messageTooBig);
+  print(WebSocketStatus.missingMandatoryExtension);
+  print(WebSocketStatus.internalServerError);
+  print(WebSocketStatus.reserved1015);
+  print(CompressionOptions.compressionDefault);
+  print(CompressionOptions.compressionOff);
+  print(WebSocket.connecting);
+  print(WebSocket.open);
+  print(WebSocket.closing);
+  print(WebSocket.closed);
+  print(HttpHeaders.acceptHeader);
+  print(HttpHeaders.acceptCharsetHeader);
+  print(HttpHeaders.acceptEncodingHeader);
+  print(HttpHeaders.acceptLanguageHeader);
+  print(HttpHeaders.acceptRangesHeader);
+  print(HttpHeaders.ageHeader);
+  print(HttpHeaders.allowHeader);
+  print(HttpHeaders.authorizationHeader);
+  print(HttpHeaders.cacheControlHeader);
+  print(HttpHeaders.connectionHeader);
+  print(HttpHeaders.contentEncodingHeader);
+  print(HttpHeaders.contentLanguageHeader);
+  print(HttpHeaders.contentLengthHeader);
+  print(HttpHeaders.contentLocationHeader);
+  print(HttpHeaders.contentMD5Header);
+  print(HttpHeaders.contentRangeHeader);
+  print(HttpHeaders.contentTypeHeader);
+  print(HttpHeaders.dateHeader);
+  print(HttpHeaders.etagHeader);
+  print(HttpHeaders.expectHeader);
+  print(HttpHeaders.expiresHeader);
+  print(HttpHeaders.fromHeader);
+  print(HttpHeaders.hostHeader);
+  print(HttpHeaders.ifMatchHeader);
+  print(HttpHeaders.ifModifiedSinceHeader);
+  print(HttpHeaders.ifNoneMatchHeader);
+  print(HttpHeaders.ifRangeHeader);
+  print(HttpHeaders.ifUnmodifiedSinceHeader);
+  print(HttpHeaders.lastModifiedHeader);
+  print(HttpHeaders.locationHeader);
+  print(HttpHeaders.maxForwardsHeader);
+  print(HttpHeaders.pragmaHeader);
+  print(HttpHeaders.proxyAuthenticateHeader);
+  print(HttpHeaders.proxyAuthorizationHeader);
+  print(HttpHeaders.rangeHeader);
+  print(HttpHeaders.refererHeader);
+  print(HttpHeaders.retryAfterHeader);
+  print(HttpHeaders.serverHeader);
+  print(HttpHeaders.teHeader);
+  print(HttpHeaders.trailerHeader);
+  print(HttpHeaders.transferEncodingHeader);
+  print(HttpHeaders.upgradeHeader);
+  print(HttpHeaders.userAgentHeader);
+  print(HttpHeaders.varyHeader);
+  print(HttpHeaders.viaHeader);
+  print(HttpHeaders.warningHeader);
+  print(HttpHeaders.wwwAuthenticateHeader);
+  print(HttpHeaders.cookieHeader);
+  print(HttpHeaders.setCookieHeader);
+  print(HttpHeaders.generalHeaders);
+  print(HttpHeaders.entityHeaders);
+  print(HttpHeaders.responseHeaders);
+  print(HttpHeaders.requestHeaders);
+  print(ContentType.text);
+  print(ContentType.html);
+  print(ContentType.json);
+  print(ContentType.binary);
+  print(HttpClient.defaultHttpPort);
+  print(HttpClient.defaultHttpsPort);
 }
diff --git a/tests/lib/html/js_interop_1_test.dart b/tests/lib/html/js_interop_1_test.dart
index 5f57dfb..cb9b6e8 100644
--- a/tests/lib/html/js_interop_1_test.dart
+++ b/tests/lib/html/js_interop_1_test.dart
@@ -27,6 +27,6 @@
     });
     injectSource("window.postMessage('hello', '*');");
 
-    await completer;
+    await completer.future;
   });
 }
diff --git a/tests/lib/js/external_extension_members_test.dart b/tests/lib/js/external_extension_members_test.dart
new file mode 100644
index 0000000..823861c
--- /dev/null
+++ b/tests/lib/js/external_extension_members_test.dart
@@ -0,0 +1,141 @@
+// 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.
+
+// Tests behavior of external extension members, which are routed to js_util
+// calls by a CFE transformation.
+
+@JS()
+library external_extension_members_test;
+
+import 'package:js/js.dart';
+import 'package:js/js_util.dart' as js_util;
+import 'package:expect/minitest.dart';
+
+@JS()
+external void eval(String code);
+
+@JS()
+class Foo {
+  external Foo(int a);
+}
+
+extension FooExt on Foo {
+  external var field;
+  external final finalField;
+  @JS('fieldAnnotation')
+  external var annotatedField;
+
+  external get getter;
+  @JS('getterAnnotation')
+  external get annotatedGetter;
+
+  external set setter(_);
+  @JS('setterAnnotation')
+  external set annotatedSetter(_);
+
+  external num getField();
+  @JS('toString')
+  external String extToString();
+  external dynamic getFirstEl(list);
+  external num sumFn(a, b);
+  @JS('sumFn')
+  external num otherSumFn(a, b);
+}
+
+@JS('module.Bar')
+class Bar {
+  external Bar(int a);
+}
+
+extension BarExt on Bar {
+  @JS('field')
+  external var barField;
+}
+
+void main() {
+  eval(r"""
+    function Foo(a) {
+      this.field = a;
+      this.fieldAnnotation = a;
+      this.finalField = a;
+
+      this.getter = a;
+      this.getterAnnotation = a;
+    }
+
+    Foo.prototype.toString = function() {
+      return "Foo: " + this.field;
+    }
+
+    Foo.prototype.getField = function() {
+      return this.field;
+    }
+
+    Foo.prototype.getFirstEl = function(list) {
+      return list[0];
+    }
+
+    Foo.prototype.sumFn = function(a, b) {
+      return a + b;
+    }
+
+    var module = {Bar: Foo};
+    """);
+
+  test('fields', () {
+    var foo = Foo(42);
+    // field getters
+    expect(foo.field, equals(42));
+    expect(foo.finalField, equals(42));
+    expect(foo.annotatedField, equals(42));
+
+    // field setters
+    foo.field = 'squid';
+    expect(foo.field, equals('squid'));
+
+    foo.annotatedField = 'octopus';
+    expect(foo.annotatedField, equals('octopus'));
+    js_util.setProperty(foo, 'fieldAnnotation', 'clownfish');
+    expect(foo.annotatedField, equals('clownfish'));
+  });
+
+  test('getters', () {
+    var foo = Foo(42);
+    expect(foo.getter, equals(42));
+    expect(foo.annotatedGetter, equals(42));
+
+    js_util.setProperty(foo, 'getterAnnotation', 'eel');
+    expect(foo.annotatedGetter, equals('eel'));
+  });
+
+  test('setters', () {
+    var foo = Foo(42);
+    foo.setter = 'starfish';
+    expect(js_util.getProperty(foo, 'setter'), equals('starfish'));
+
+    foo.annotatedSetter = 'whale';
+    expect(js_util.getProperty(foo, 'setterAnnotation'), equals('whale'));
+  });
+
+  test('methods', () {
+    var foo = Foo(42);
+
+    expect(foo.getField(), equals(42));
+    expect(foo.extToString(), equals('Foo: 42'));
+    expect(foo.getFirstEl([1, 2, 3]), equals(1));
+    expect(foo.sumFn(2, 3), equals(5));
+    expect(foo.otherSumFn(10, 5), equals(15));
+  });
+
+  test('module class', () {
+    var bar = Bar(5);
+    expect(js_util.getProperty(bar, 'fieldAnnotation'), equals(5));
+    expect(bar.barField, equals(5));
+    expect(js_util.getProperty(bar, 'field'), equals(5));
+
+    bar.barField = 10;
+    expect(js_util.getProperty(bar, 'fieldAnnotation'), equals(5));
+    expect(js_util.getProperty(bar, 'field'), equals(10));
+  });
+}
diff --git a/tests/lib/js/js_util/properties_test.dart b/tests/lib/js/js_util/properties_test.dart
index 326de20..84a09c8 100644
--- a/tests/lib/js/js_util/properties_test.dart
+++ b/tests/lib/js/js_util/properties_test.dart
@@ -85,6 +85,19 @@
   external five(a, b, c, d, e);
 }
 
+@JS()
+external get Zero;
+@JS()
+external get One;
+@JS()
+external get Two;
+@JS()
+external get Three;
+@JS()
+external get Four;
+@JS()
+external get Five;
+
 main() {
   eval(r"""
     function Foo(a) {
@@ -157,6 +170,25 @@
     CallMethodTest.prototype.five = function(a, b, c, d, e) {
       return 'five';
     }
+
+    function Zero() {
+      this.count = 0;
+    }
+    function One(a) {
+      this.count = 1;
+    }
+    function Two(a, b) {
+      this.count = 2;
+    }
+    function Three(a, b, c) {
+      this.count = 3;
+    }
+    function Four(a, b, c, d) {
+      this.count = 4;
+    }
+    function Five(a, b, c, d, e) {
+      this.count = 5;
+    }
     """);
 
   group('newObject', () {
@@ -543,8 +575,131 @@
 
   group('callConstructor', () {
     test('typed object', () {
-      Foo f = js_util.callConstructor(JSFooType, [42]);
+      var f = js_util.callConstructor(JSFooType, [42]);
       expect(f.a, equals(42));
+
+      var f2 =
+          js_util.callConstructor(js_util.getProperty(f, 'constructor'), [5]);
+      expect(f2.a, equals(5));
+    });
+
+    test('typed literal', () {
+      ExampleTypedLiteral literal = js_util.callConstructor(
+          js_util.getProperty(ExampleTypedLiteral(), 'constructor'), []);
+      expect(literal.a, equals(null));
+    });
+
+    test('callConstructor with List edge cases', () {
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Zero, List.empty()), 'count'),
+          equals(0));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Zero, List<int>.empty()), 'count'),
+          equals(0));
+
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, List<int>.filled(2, 0)), 'count'),
+          equals(2));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Three, List<int>.generate(3, (i) => i)),
+              'count'),
+          equals(3));
+
+      Iterable<String> iterableStrings = <String>['foo', 'bar'];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, List.of(iterableStrings)), 'count'),
+          equals(2));
+
+      const l1 = [1, 2];
+      const l2 = [3, 4];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, List.from(l1)..addAll(l2)),
+              'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(js_util.callConstructor(Four, l1 + l2), 'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, List.unmodifiable([1, 2, 3, 4])),
+              'count'),
+          equals(4));
+
+      var setElements = {1, 2};
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, setElements.toList()), 'count'),
+          equals(2));
+
+      var spreadList = [1, 2, 3];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [1, ...spreadList]), 'count'),
+          equals(4));
+    });
+
+    test('edge cases for lowering to _callConstructorUncheckedN', () {
+      expect(js_util.getProperty(js_util.callConstructor(Zero, []), 'count'),
+          equals(0));
+      expect(js_util.getProperty(js_util.callConstructor(One, [1]), 'count'),
+          equals(1));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [1, 2, 3, 4]), 'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Five, [1, 2, 3, 4, 5]), 'count'),
+          equals(5));
+
+      // List with a type declaration, short circuits element checking
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, <int>[1, 2]), 'count'),
+          equals(2));
+
+      // List as a variable instead of a List Literal or constant
+      var list = [1, 2];
+      expect(js_util.getProperty(js_util.callConstructor(Two, list), 'count'),
+          equals(2));
+
+      // Mixed types of elements to check in the given list.
+      var x = 4;
+      var str = 'cat';
+      var b = false;
+      var evens = [2, 4, 6];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [x, str, b, evens]), 'count'),
+          equals(4));
+      var obj = Object();
+      expect(js_util.getProperty(js_util.callConstructor(One, [obj]), 'count'),
+          equals(1));
+      var nullElement = null;
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(One, [nullElement]), 'count'),
+          equals(1));
+
+      // const lists.
+      expect(
+          js_util.getProperty(js_util.callConstructor(One, const [3]), 'count'),
+          equals(1));
+      const constList = [10, 20, 30];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Three, constList), 'count'),
+          equals(3));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(One, DartClass.staticConstList), 'count'),
+          equals(1));
     });
   });
 }
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 9e573fb..ccc6171 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -38,6 +38,7 @@
 isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
 js/extends_test/extends_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/extends_test/extends_with_es6_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
+js/external_extension_members_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/is_check_and_as_cast_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/js_util/async_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
diff --git a/tests/lib/mirrors/invocation_fuzz_test.dart b/tests/lib/mirrors/invocation_fuzz_test.dart
index ea8f546..ed8ba09 100644
--- a/tests/lib/mirrors/invocation_fuzz_test.dart
+++ b/tests/lib/mirrors/invocation_fuzz_test.dart
@@ -20,6 +20,7 @@
 
   // Don't exit the test pre-maturely.
   'dart.io.exit',
+  'dart.isolate.Isolate.exit',
 
   // Don't change the exit code, which may fool the test harness.
   'dart.io.exitCode',
diff --git a/tests/lib_2/async/unawaited_test.dart b/tests/lib_2/async/unawaited_test.dart
index 16bd285..5554a48 100644
--- a/tests/lib_2/async/unawaited_test.dart
+++ b/tests/lib_2/async/unawaited_test.dart
@@ -23,6 +23,9 @@
     Expect.equals(typeOf<void>(), T);
   });
 
+  Future<Never> noFuture = null;
+  unawaited(noFuture); // Doesn't throw on `null`.
+
   asyncStart();
   // Unawaited futures still throw.
   {
diff --git a/tests/lib_2/html/js_interop_1_test.dart b/tests/lib_2/html/js_interop_1_test.dart
index 95b280e..6057d80 100644
--- a/tests/lib_2/html/js_interop_1_test.dart
+++ b/tests/lib_2/html/js_interop_1_test.dart
@@ -29,6 +29,6 @@
     });
     injectSource("window.postMessage('hello', '*');");
 
-    await completer;
+    await completer.future;
   });
 }
diff --git a/tests/lib_2/js/external_extension_members_test.dart b/tests/lib_2/js/external_extension_members_test.dart
new file mode 100644
index 0000000..b1b0cfe
--- /dev/null
+++ b/tests/lib_2/js/external_extension_members_test.dart
@@ -0,0 +1,123 @@
+// 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.
+
+// @dart = 2.9
+
+// Tests behavior of external extension members, which are routed to js_util
+// calls by a CFE transformation.
+
+@JS()
+library external_extension_members_test;
+
+import 'package:js/js.dart';
+import 'package:js/js_util.dart' as js_util;
+import 'package:expect/minitest.dart';
+
+@JS()
+external void eval(String code);
+
+@JS()
+class Foo {
+  external Foo(int a);
+}
+
+extension FooExt on Foo {
+  external get getter;
+  @JS('getterAnnotation')
+  external get annotatedGetter;
+
+  external set setter(_);
+  @JS('setterAnnotation')
+  external set annotatedSetter(_);
+
+  external num getField();
+  @JS('toString')
+  external String extToString();
+  external dynamic getFirstEl(list);
+  external num sumFn(a, b);
+  @JS('sumFn')
+  external num otherSumFn(a, b);
+}
+
+@JS('module.Bar')
+class Bar {
+  external Bar(int a);
+}
+
+extension BarExt on Bar {
+  @JS('field')
+  external get barFieldGetter;
+  @JS('field')
+  external set barFieldSetter(_);
+}
+
+void main() {
+  eval(r"""
+    function Foo(a) {
+      this.field = a;
+      this.fieldAnnotation = a;
+      this.finalField = a;
+
+      this.getter = a;
+      this.getterAnnotation = a;
+    }
+
+    Foo.prototype.toString = function() {
+      return "Foo: " + this.field;
+    }
+
+    Foo.prototype.getField = function() {
+      return this.field;
+    }
+
+    Foo.prototype.getFirstEl = function(list) {
+      return list[0];
+    }
+
+    Foo.prototype.sumFn = function(a, b) {
+      return a + b;
+    }
+
+    var module = {Bar: Foo};
+    """);
+
+  test('getters', () {
+    var foo = Foo(42);
+    expect(foo.getter, equals(42));
+    expect(foo.annotatedGetter, equals(42));
+
+    js_util.setProperty(foo, 'getterAnnotation', 'eel');
+    expect(foo.annotatedGetter, equals('eel'));
+  });
+
+  test('setters', () {
+    var foo = Foo(42);
+    foo.setter = 'starfish';
+    expect(js_util.getProperty(foo, 'setter'), equals('starfish'));
+
+    foo.annotatedSetter = 'whale';
+    expect(js_util.getProperty(foo, 'setterAnnotation'), equals('whale'));
+  });
+
+  test('methods', () {
+    var foo = Foo(42);
+
+    expect(foo.getField(), equals(42));
+    expect(foo.extToString(), equals('Foo: 42'));
+    expect(foo.getFirstEl([1, 2, 3]), equals(1));
+    expect(foo.sumFn(2, 3), equals(5));
+    expect(foo.otherSumFn(10, 5), equals(15));
+  });
+
+  test('module class', () {
+    var bar = Bar(5);
+    expect(js_util.getProperty(bar, 'fieldAnnotation'), equals(5));
+    expect(bar.barFieldGetter, equals(5));
+    expect(js_util.getProperty(bar, 'field'), equals(5));
+
+    bar.barFieldSetter = 10;
+    expect(js_util.getProperty(bar, 'fieldAnnotation'), equals(5));
+    expect(js_util.getProperty(bar, 'field'), equals(10));
+  });
+}
diff --git a/tests/lib_2/js/js_util/properties_test.dart b/tests/lib_2/js/js_util/properties_test.dart
index 8479414..c19fe14 100644
--- a/tests/lib_2/js/js_util/properties_test.dart
+++ b/tests/lib_2/js/js_util/properties_test.dart
@@ -87,6 +87,19 @@
   external five(a, b, c, d, e);
 }
 
+@JS()
+external get Zero;
+@JS()
+external get One;
+@JS()
+external get Two;
+@JS()
+external get Three;
+@JS()
+external get Four;
+@JS()
+external get Five;
+
 main() {
   eval(r"""
     function Foo(a) {
@@ -159,6 +172,25 @@
     CallMethodTest.prototype.five = function(a, b, c, d, e) {
       return 'five';
     }
+
+    function Zero() {
+      this.count = 0;
+    }
+    function One(a) {
+      this.count = 1;
+    }
+    function Two(a, b) {
+      this.count = 2;
+    }
+    function Three(a, b, c) {
+      this.count = 3;
+    }
+    function Four(a, b, c, d) {
+      this.count = 4;
+    }
+    function Five(a, b, c, d, e) {
+      this.count = 5;
+    }
     """);
 
   group('newObject', () {
@@ -547,8 +579,138 @@
 
   group('callConstructor', () {
     test('typed object', () {
-      Foo f = js_util.callConstructor(JSFooType, [42]);
+      var f = js_util.callConstructor(JSFooType, [42]);
       expect(f.a, equals(42));
+
+      var f2 =
+          js_util.callConstructor(js_util.getProperty(f, 'constructor'), [5]);
+      expect(f2.a, equals(5));
+    });
+
+    test('typed literal', () {
+      ExampleTypedLiteral literal = js_util.callConstructor(
+          js_util.getProperty(ExampleTypedLiteral(), 'constructor'), []);
+      expect(literal.a, equals(null));
+    });
+
+    test('callConstructor with List edge cases', () {
+      expect(
+          js_util.getProperty(js_util.callConstructor(Zero, List()), 'count'),
+          equals(0));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Zero, List<int>()), 'count'),
+          equals(0));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Zero, List.empty()), 'count'),
+          equals(0));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Zero, List<int>.empty()), 'count'),
+          equals(0));
+
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, List<int>.filled(2, 0)), 'count'),
+          equals(2));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Three, List<int>.generate(3, (i) => i)),
+              'count'),
+          equals(3));
+
+      Iterable<String> iterableStrings = <String>['foo', 'bar'];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, List.of(iterableStrings)), 'count'),
+          equals(2));
+
+      const l1 = [1, 2];
+      const l2 = [3, 4];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, List.from(l1)..addAll(l2)),
+              'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(js_util.callConstructor(Four, l1 + l2), 'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, List.unmodifiable([1, 2, 3, 4])),
+              'count'),
+          equals(4));
+
+      var setElements = {1, 2};
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, setElements.toList()), 'count'),
+          equals(2));
+
+      var spreadList = [1, 2, 3];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [1, ...spreadList]), 'count'),
+          equals(4));
+    });
+
+    test('edge cases for lowering to _callConstructorUncheckedN', () {
+      expect(js_util.getProperty(js_util.callConstructor(Zero, []), 'count'),
+          equals(0));
+      expect(js_util.getProperty(js_util.callConstructor(One, [1]), 'count'),
+          equals(1));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [1, 2, 3, 4]), 'count'),
+          equals(4));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Five, [1, 2, 3, 4, 5]), 'count'),
+          equals(5));
+
+      // List with a type declaration, short circuits element checking
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Two, <int>[1, 2]), 'count'),
+          equals(2));
+
+      // List as a variable instead of a List Literal or constant
+      var list = [1, 2];
+      expect(js_util.getProperty(js_util.callConstructor(Two, list), 'count'),
+          equals(2));
+
+      // Mixed types of elements to check in the given list.
+      var x = 4;
+      var str = 'cat';
+      var b = false;
+      var evens = [2, 4, 6];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Four, [x, str, b, evens]), 'count'),
+          equals(4));
+      var obj = Object();
+      expect(js_util.getProperty(js_util.callConstructor(One, [obj]), 'count'),
+          equals(1));
+      var nullElement = null;
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(One, [nullElement]), 'count'),
+          equals(1));
+
+      // const lists.
+      expect(
+          js_util.getProperty(js_util.callConstructor(One, const [3]), 'count'),
+          equals(1));
+      const constList = [10, 20, 30];
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(Three, constList), 'count'),
+          equals(3));
+      expect(
+          js_util.getProperty(
+              js_util.callConstructor(One, DartClass.staticConstList), 'count'),
+          equals(1));
     });
   });
 }
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index fb8a8bf..d79f2ba 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -38,6 +38,7 @@
 isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
 js/extends_test/extends_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/extends_test/extends_with_es6_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
+js/external_extension_members_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/is_check_and_as_cast_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/js_util/async_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
diff --git a/tests/lib_2/mirrors/invocation_fuzz_test.dart b/tests/lib_2/mirrors/invocation_fuzz_test.dart
index 6323806..68360d1 100644
--- a/tests/lib_2/mirrors/invocation_fuzz_test.dart
+++ b/tests/lib_2/mirrors/invocation_fuzz_test.dart
@@ -22,6 +22,7 @@
 
   // Don't exit the test pre-maturely.
   'dart.io.exit',
+  'dart.isolate.Isolate.exit',
 
   // Don't change the exit code, which may fool the test harness.
   'dart.io.exitCode',
diff --git a/tests/standalone/check_for_aot_snapshot_jit_test.dart b/tests/standalone/check_for_aot_snapshot_jit_test.dart
index d8b817c..27e8311 100644
--- a/tests/standalone/check_for_aot_snapshot_jit_test.dart
+++ b/tests/standalone/check_for_aot_snapshot_jit_test.dart
@@ -19,10 +19,7 @@
       "Can't locate gen_kernel$_batchSuffix on this platform");
   Expect.isTrue(File(genKernel).existsSync(),
       "Can't locate gen_kernel$_batchSuffix on this platform");
-  // Currently gen_snapshot is only in buildDir/clang_x64 on Mac ARM64.
-  final genSnapshot = Platform.isMacOS && buildDir.endsWith('XARM64')
-      ? path.join(buildDir, 'clang_x64', 'gen_snapshot$_execSuffix')
-      : path.join(buildDir, 'gen_snapshot$_execSuffix');
+  final genSnapshot = path.join(buildDir, 'gen_snapshot$_execSuffix');
   Expect.isTrue(File(genSnapshot).existsSync(),
       "Can't locate gen_snapshot$_execSuffix on this platform");
 
@@ -33,8 +30,8 @@
   Expect.isTrue(File(powTest).existsSync(),
       "Can't locate dart$_execSuffix on this platform");
   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 kernelOutput = File.fromUri(d.uri.resolve('pow_test.dill')).path;
+  final aotOutput = File.fromUri(d.uri.resolve('pow_test.aot')).path;
 
   final genKernelResult = runAndPrintOutput(
     genKernel,
diff --git a/tests/standalone/dwarf_stack_trace_invisible_functions_test.dart b/tests/standalone/dwarf_stack_trace_invisible_functions_test.dart
index b7247454..a9fe0f3 100644
--- a/tests/standalone/dwarf_stack_trace_invisible_functions_test.dart
+++ b/tests/standalone/dwarf_stack_trace_invisible_functions_test.dart
@@ -20,7 +20,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt // LINE_A
+  throw // force linebreak with dart format // LINE_A
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone/dwarf_stack_trace_obfuscate_test.dart b/tests/standalone/dwarf_stack_trace_obfuscate_test.dart
index f6b3360..23eb3f9 100644
--- a/tests/standalone/dwarf_stack_trace_obfuscate_test.dart
+++ b/tests/standalone/dwarf_stack_trace_obfuscate_test.dart
@@ -14,7 +14,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt
+  throw // force linebreak with dart format
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone/dwarf_stack_trace_test.dart b/tests/standalone/dwarf_stack_trace_test.dart
index a583d34..970be0e 100644
--- a/tests/standalone/dwarf_stack_trace_test.dart
+++ b/tests/standalone/dwarf_stack_trace_test.dart
@@ -14,7 +14,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt
+  throw // force linebreak with dart format
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone/io/file_error_test.dart b/tests/standalone/io/file_error_test.dart
index ee80df4..2050e23 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -14,6 +14,20 @@
   return Directory.systemTemp.createTempSync('dart_file_error');
 }
 
+bool checkCannotOpenFileException(e) {
+  Expect.isTrue(e is FileSystemException);
+  Expect.isTrue(e.osError != null);
+  Expect.isTrue(e.toString().indexOf("Cannot open file") != -1);
+  if (Platform.operatingSystem == "linux") {
+    Expect.equals(2, e.osError.errorCode);
+  } else if (Platform.operatingSystem == "macos") {
+    Expect.equals(2, e.osError.errorCode);
+  } else if (Platform.operatingSystem == "windows") {
+    Expect.equals(3, e.osError.errorCode);
+  }
+  return true;
+}
+
 bool checkNonExistentFileSystemException(e, str) {
   Expect.isTrue(e is FileSystemException);
   Expect.isTrue(e.osError != null);
@@ -36,6 +50,20 @@
       e, "Cannot retrieve length of file");
 }
 
+void testOpenBlankFilename() {
+  asyncStart();
+  var file = new File("");
+
+  // Non-existing file should throw exception.
+  Expect.throws(() => file.openSync(), (e) => checkCannotOpenFileException(e));
+
+  var openFuture = file.open(mode: FileMode.read);
+  openFuture.then((raf) => Expect.fail("Unreachable code")).catchError((error) {
+    checkCannotOpenFileException(error);
+    asyncEnd();
+  });
+}
+
 void testOpenNonExistent() {
   asyncStart();
   Directory temp = tempDir();
@@ -409,6 +437,7 @@
 }
 
 main() {
+  testOpenBlankFilename();
   testOpenNonExistent();
   testDeleteNonExistent();
   testLengthNonExistent();
diff --git a/tests/standalone/io/process_run_test.dart b/tests/standalone/io/process_run_test.dart
index a4a470a..c229570 100644
--- a/tests/standalone/io/process_run_test.dart
+++ b/tests/standalone/io/process_run_test.dart
@@ -49,8 +49,7 @@
     result = Process.runSync('${processTest.path}', []);
     Process.killPid(result.pid);
   } catch (e) {
-    Expect.fail('System should find process_run_test executable');
-    print(e);
+    Expect.fail('System should find process_run_test executable ($e)');
   } finally {
     // Clean up the temp files and directory
     dir.deleteSync(recursive: true);
diff --git a/tests/standalone/io/web_socket_error_test.dart b/tests/standalone/io/web_socket_error_test.dart
index a7fdd0e..aca2548 100644
--- a/tests/standalone/io/web_socket_error_test.dart
+++ b/tests/standalone/io/web_socket_error_test.dart
@@ -48,8 +48,8 @@
       : HttpServer.bind(HOST_NAME, 0, backlog: backlog);
 
   Future<WebSocket> createClient(int port) =>
-      // TODO(whesse): Add a client context argument to WebSocket.connect.
-      WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/');
+      WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/',
+          customClient: secure ? HttpClient(context: clientContext) : null);
 
   void testForceCloseServerEnd(int totalConnections) {
     createServer().then((server) {
@@ -94,7 +94,6 @@
 main() {
   asyncStart();
   new SecurityConfiguration(secure: false).runTests();
-  // TODO(whesse): WebSocket.connect needs an optional context: parameter
-  // new SecurityConfiguration(secure: true).runTests();
+  new SecurityConfiguration(secure: true).runTests();
   asyncEnd();
 }
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index 9b0e789..8f40c32 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -6,6 +6,10 @@
 // VMOptions=--short_socket_read
 // VMOptions=--short_socket_write
 // VMOptions=--short_socket_read --short_socket_write
+//
+// OtherResources=certificates/server_chain.pem
+// OtherResources=certificates/server_key.pem
+// OtherResources=certificates/trusted_certs.pem
 
 import "dart:async";
 import "dart:convert";
@@ -13,10 +17,8 @@
 import "dart:typed_data";
 
 import "package:async_helper/async_helper.dart";
-import "package:convert/convert.dart";
 import "package:crypto/crypto.dart";
 import "package:expect/expect.dart";
-import "package:path/path.dart";
 
 const WEB_SOCKET_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
 
@@ -44,9 +46,17 @@
       ? HttpServer.bindSecure(HOST_NAME, 0, serverContext, backlog: backlog)
       : HttpServer.bind(HOST_NAME, 0, backlog: backlog);
 
-  Future<WebSocket> createClient(int port) =>
-      // TODO(whesse): Add client context argument to WebSocket.connect
-      WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/');
+  Future<WebSocket> createClient(int port,
+          {String? user,
+          Map<String, Object>? headers,
+          String? customUserAgent}) =>
+      WebSocket.connect(
+          '${secure ? "wss" : "ws"}://${user is Null ? "" : "$user@"}$HOST_NAME:$port/',
+          headers: headers,
+          customClient: secure
+              ? (HttpClient(context: clientContext)
+                ..userAgent = customUserAgent)
+              : null);
 
   checkCloseStatus(webSocket, closeStatus, closeReason) {
     Expect.equals(
@@ -304,7 +314,7 @@
         asyncEnd();
       });
 
-      HttpClient client = new HttpClient();
+      final client = HttpClient(context: secure ? clientContext : null);
       client
           .postUrl(Uri.parse(
               "${secure ? 'https:' : 'http:'}//$HOST_NAME:${server.port}/"))
@@ -401,12 +411,12 @@
       var baseWsUrl = '$wsProtocol://$HOST_NAME:${server.port}/';
       var httpProtocol = '${secure ? "https" : "http"}';
       var baseHttpUrl = '$httpProtocol://$HOST_NAME:${server.port}/';
-      HttpClient client = new HttpClient();
+      final client = HttpClient(context: secure ? clientContext : null);
 
       for (int i = 0; i < connections; i++) {
         var completer = new Completer();
         futures.add(completer.future);
-        WebSocket.connect('${baseWsUrl}').then((websocket) {
+        createClient(server.port).then((websocket) {
           websocket.listen((_) {
             websocket.close();
           }, onDone: completer.complete);
@@ -456,9 +466,7 @@
         });
       });
 
-      var url = '${secure ? "wss" : "ws"}://$HOST_NAME:${server.port}/';
-
-      WebSocket.connect(url).then((websocket) {
+      createClient(server.port).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -484,12 +492,11 @@
         });
       });
 
-      var url = '${secure ? "wss" : "ws"}://$HOST_NAME:${server.port}/';
       var headers = {
         'My-Header': 'my-value',
         'My-Header-Multiple': ['my-value-1', 'my-value-2']
       };
-      WebSocket.connect(url, headers: headers).then((websocket) {
+      createClient(server.port, headers: headers).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -522,9 +529,7 @@
         });
       });
 
-      var url =
-          '${secure ? "wss" : "ws"}://$userInfo@$HOST_NAME:${server.port}/';
-      WebSocket.connect(url).then((websocket) {
+      createClient(server.port, user: userInfo).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -554,6 +559,24 @@
     });
   }
 
+  void testStaticClientUserAgentStaysTheSame() {
+    asyncStart();
+    createServer().then((server) {
+      server.transform(new WebSocketTransformer()).listen((webSocket) {
+        Expect.equals('Custom User Agent', WebSocket.userAgent);
+        server.close();
+        webSocket.close();
+        asyncEnd();
+      });
+      // Next line should take no effect on custom user agent value provided
+      WebSocket.userAgent = 'Custom User Agent';
+      createClient(server.port, customUserAgent: 'New User Agent')
+          .then((webSocket) {
+        webSocket.close();
+      });
+    });
+  }
+
   void runTests() {
     testRequestResponseClientCloses(2, null, null, 1);
     testRequestResponseClientCloses(2, 3001, null, 2);
@@ -582,11 +605,11 @@
     testAdditionalHeaders();
     testBasicAuthentication();
     testShouldSetUserAgent();
+    testStaticClientUserAgentStaysTheSame();
   }
 }
 
 main() {
   new SecurityConfiguration(secure: false).runTests();
-  // TODO(whesse): Make WebSocket.connect() take an optional context: parameter.
-  // new SecurityConfiguration(secure: true).runTests();
+  new SecurityConfiguration(secure: true).runTests();
 }
diff --git a/tests/standalone_2/check_for_aot_snapshot_jit_test.dart b/tests/standalone_2/check_for_aot_snapshot_jit_test.dart
index e9c3e24..521fa86 100644
--- a/tests/standalone_2/check_for_aot_snapshot_jit_test.dart
+++ b/tests/standalone_2/check_for_aot_snapshot_jit_test.dart
@@ -19,10 +19,7 @@
       path.join(sdkDir, 'pkg', 'vm', 'tool', 'gen_kernel$_batchSuffix');
   Expect.isTrue(File(genKernel).existsSync(),
       "Can't locate gen_kernel$_batchSuffix on this platform");
-  // Currently gen_snapshot is only in buildDir/clang_x64 on Mac ARM64.
-  final genSnapshot = Platform.isMacOS && buildDir.endsWith('XARM64')
-      ? path.join(buildDir, 'clang_x64', 'gen_snapshot$_execSuffix')
-      : path.join(buildDir, 'gen_snapshot$_execSuffix');
+  final genSnapshot = path.join(buildDir, 'gen_snapshot$_execSuffix');
   Expect.isTrue(File(genSnapshot).existsSync(),
       "Can't locate gen_snapshot$_execSuffix on this platform");
 
@@ -33,8 +30,8 @@
   Expect.isTrue(File(powTest).existsSync(),
       "Can't locate dart$_execSuffix on this platform");
   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 kernelOutput = File.fromUri(d.uri.resolve('pow_test.dill')).path;
+  final aotOutput = File.fromUri(d.uri.resolve('pow_test.aot')).path;
 
   final genKernelResult = runAndPrintOutput(
     genKernel,
diff --git a/tests/standalone_2/dwarf_stack_trace_invisible_functions_test.dart b/tests/standalone_2/dwarf_stack_trace_invisible_functions_test.dart
index cd912fc..411ebd9 100644
--- a/tests/standalone_2/dwarf_stack_trace_invisible_functions_test.dart
+++ b/tests/standalone_2/dwarf_stack_trace_invisible_functions_test.dart
@@ -22,7 +22,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt // LINE_A
+  throw // force linebreak with dart format // LINE_A
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone_2/dwarf_stack_trace_obfuscate_test.dart b/tests/standalone_2/dwarf_stack_trace_obfuscate_test.dart
index 8614b88..f21fff1 100644
--- a/tests/standalone_2/dwarf_stack_trace_obfuscate_test.dart
+++ b/tests/standalone_2/dwarf_stack_trace_obfuscate_test.dart
@@ -16,7 +16,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt
+  throw // force linebreak with dart format
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone_2/dwarf_stack_trace_test.dart b/tests/standalone_2/dwarf_stack_trace_test.dart
index 75353ee..acc066b 100644
--- a/tests/standalone_2/dwarf_stack_trace_test.dart
+++ b/tests/standalone_2/dwarf_stack_trace_test.dart
@@ -16,7 +16,7 @@
 @pragma("vm:prefer-inline")
 bar() {
   // Keep the 'throw' and its argument on separate lines.
-  throw // force linebreak with dartfmt
+  throw // force linebreak with dart format
       "Hello, Dwarf!";
 }
 
diff --git a/tests/standalone_2/io/file_error_test.dart b/tests/standalone_2/io/file_error_test.dart
index ee55a05..d52f2ee 100644
--- a/tests/standalone_2/io/file_error_test.dart
+++ b/tests/standalone_2/io/file_error_test.dart
@@ -16,6 +16,20 @@
   return Directory.systemTemp.createTempSync('dart_file_error');
 }
 
+bool checkCannotOpenFileException(e) {
+  Expect.isTrue(e is FileSystemException);
+  Expect.isTrue(e.osError != null);
+  Expect.isTrue(e.toString().indexOf("Cannot open file") != -1);
+  if (Platform.operatingSystem == "linux") {
+    Expect.equals(2, e.osError.errorCode);
+  } else if (Platform.operatingSystem == "macos") {
+    Expect.equals(2, e.osError.errorCode);
+  } else if (Platform.operatingSystem == "windows") {
+    Expect.equals(3, e.osError.errorCode);
+  }
+  return true;
+}
+
 bool checkNonExistentFileSystemException(e, str) {
   Expect.isTrue(e is FileSystemException);
   Expect.isTrue(e.osError != null);
@@ -38,6 +52,20 @@
       e, "Cannot retrieve length of file");
 }
 
+void testOpenBlankFilename() {
+  asyncStart();
+  var file = new File("");
+
+  // Non-existing file should throw exception.
+  Expect.throws(() => file.openSync(), (e) => checkCannotOpenFileException(e));
+
+  var openFuture = file.open(mode: FileMode.read);
+  openFuture.then((raf) => Expect.fail("Unreachable code")).catchError((error) {
+    checkCannotOpenFileException(error);
+    asyncEnd();
+  });
+}
+
 void testOpenNonExistent() {
   asyncStart();
   Directory temp = tempDir();
@@ -411,6 +439,7 @@
 }
 
 main() {
+  testOpenBlankFilename();
   testOpenNonExistent();
   testDeleteNonExistent();
   testLengthNonExistent();
diff --git a/tests/standalone_2/io/process_run_test.dart b/tests/standalone_2/io/process_run_test.dart
index 5dfe13c..342b3c5 100644
--- a/tests/standalone_2/io/process_run_test.dart
+++ b/tests/standalone_2/io/process_run_test.dart
@@ -51,8 +51,7 @@
     result = Process.runSync('${processTest.path}', []);
     Process.killPid(result.pid);
   } catch (e) {
-    Expect.fail('System should find process_run_test executable');
-    print(e);
+    Expect.fail('System should find process_run_test executable ($e)');
   } finally {
     // Clean up the temp files and directory
     dir.deleteSync(recursive: true);
diff --git a/tests/standalone_2/io/web_socket_test.dart b/tests/standalone_2/io/web_socket_test.dart
index a931549..6de369f 100644
--- a/tests/standalone_2/io/web_socket_test.dart
+++ b/tests/standalone_2/io/web_socket_test.dart
@@ -6,6 +6,10 @@
 // VMOptions=--short_socket_read
 // VMOptions=--short_socket_write
 // VMOptions=--short_socket_read --short_socket_write
+//
+// OtherResources=certificates/server_chain.pem
+// OtherResources=certificates/server_key.pem
+// OtherResources=certificates/trusted_certs.pem
 
 // @dart = 2.9
 
@@ -15,10 +19,8 @@
 import "dart:typed_data";
 
 import "package:async_helper/async_helper.dart";
-import "package:convert/convert.dart";
 import "package:crypto/crypto.dart";
 import "package:expect/expect.dart";
-import "package:path/path.dart";
 
 const WEB_SOCKET_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
 
@@ -46,9 +48,15 @@
       ? HttpServer.bindSecure(HOST_NAME, 0, serverContext, backlog: backlog)
       : HttpServer.bind(HOST_NAME, 0, backlog: backlog);
 
-  Future<WebSocket> createClient(int port) =>
-      // TODO(whesse): Add client context argument to WebSocket.connect
-      WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/');
+  Future<WebSocket> createClient(int port,
+          {String user, Map<String, Object> headers, String customUserAgent}) =>
+      WebSocket.connect(
+          '${secure ? "wss" : "ws"}://${user is Null ? "" : "$user@"}$HOST_NAME:$port/',
+          headers: headers,
+          customClient: secure
+              ? (HttpClient(context: clientContext)
+                ..userAgent = customUserAgent)
+              : null);
 
   checkCloseStatus(webSocket, closeStatus, closeReason) {
     Expect.equals(
@@ -306,7 +314,7 @@
         asyncEnd();
       });
 
-      HttpClient client = new HttpClient();
+      final client = HttpClient(context: secure ? clientContext : null);
       client
           .postUrl(Uri.parse(
               "${secure ? 'https:' : 'http:'}//$HOST_NAME:${server.port}/"))
@@ -403,12 +411,12 @@
       var baseWsUrl = '$wsProtocol://$HOST_NAME:${server.port}/';
       var httpProtocol = '${secure ? "https" : "http"}';
       var baseHttpUrl = '$httpProtocol://$HOST_NAME:${server.port}/';
-      HttpClient client = new HttpClient();
+      final client = HttpClient(context: secure ? clientContext : null);
 
       for (int i = 0; i < connections; i++) {
         var completer = new Completer();
         futures.add(completer.future);
-        WebSocket.connect('${baseWsUrl}').then((websocket) {
+        createClient(server.port).then((websocket) {
           websocket.listen((_) {
             websocket.close();
           }, onDone: completer.complete);
@@ -458,9 +466,7 @@
         });
       });
 
-      var url = '${secure ? "wss" : "ws"}://$HOST_NAME:${server.port}/';
-
-      WebSocket.connect(url).then((websocket) {
+      createClient(server.port).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -486,12 +492,11 @@
         });
       });
 
-      var url = '${secure ? "wss" : "ws"}://$HOST_NAME:${server.port}/';
       var headers = {
         'My-Header': 'my-value',
         'My-Header-Multiple': ['my-value-1', 'my-value-2']
       };
-      WebSocket.connect(url, headers: headers).then((websocket) {
+      createClient(server.port, headers: headers).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -524,9 +529,7 @@
         });
       });
 
-      var url =
-          '${secure ? "wss" : "ws"}://$userInfo@$HOST_NAME:${server.port}/';
-      WebSocket.connect(url).then((websocket) {
+      createClient(server.port, user: userInfo).then((websocket) {
         return websocket.listen((message) {
           Expect.equals("Hello", message);
           websocket.close();
@@ -556,6 +559,24 @@
     });
   }
 
+  void testStaticClientUserAgentStaysTheSame() {
+    asyncStart();
+    createServer().then((server) {
+      server.transform(new WebSocketTransformer()).listen((webSocket) {
+        Expect.equals('Custom User Agent', WebSocket.userAgent);
+        server.close();
+        webSocket.close();
+        asyncEnd();
+      });
+      // Next line should take no effect on custom user agent value provided
+      WebSocket.userAgent = 'Custom User Agent';
+      createClient(server.port, customUserAgent: 'New User Agent')
+          .then((webSocket) {
+        webSocket.close();
+      });
+    });
+  }
+
   void runTests() {
     testRequestResponseClientCloses(2, null, null, 1);
     testRequestResponseClientCloses(2, 3001, null, 2);
@@ -584,11 +605,11 @@
     testAdditionalHeaders();
     testBasicAuthentication();
     testShouldSetUserAgent();
+    testStaticClientUserAgentStaysTheSame();
   }
 }
 
 main() {
   new SecurityConfiguration(secure: false).runTests();
-  // TODO(whesse): Make WebSocket.connect() take an optional context: parameter.
-  // new SecurityConfiguration(secure: true).runTests();
+  new SecurityConfiguration(secure: true).runTests();
 }
diff --git a/tests/web/late_narrowing_test.dart b/tests/web/late_narrowing_test.dart
new file mode 100644
index 0000000..d7dcc11
--- /dev/null
+++ b/tests/web/late_narrowing_test.dart
@@ -0,0 +1,23 @@
+// 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.
+
+import 'package:expect/expect.dart';
+
+// Tests to ensure that narrowing type information does not discard late
+// sentinel values unintentionally.
+
+class Foo<T> {
+  // Since `List<T>` contains a free type variable, any access of [x] will be
+  // immediately followed by a narrowing to the appropriate instantiation of
+  // `List<T>`. This narrowing should not exclude the late sentinel value from
+  // the abstract value.
+  late final List<T> x;
+}
+
+void main() {
+  Foo<int> foo = Foo();
+  Expect.throws(() => foo.x);
+  foo.x = const [];
+  Expect.isTrue(foo.x.isEmpty);
+}
diff --git a/tests/web/regress/192964907a_test.dart b/tests/web/regress/192964907a_test.dart
new file mode 100644
index 0000000..c92e8f8
--- /dev/null
+++ b/tests/web/regress/192964907a_test.dart
@@ -0,0 +1,22 @@
+// 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.
+
+import 'package:expect/expect.dart';
+
+class Foo {
+  late final bool x;
+
+  Foo() {
+    build();
+  }
+
+  void build() {
+    x = true;
+  }
+}
+
+void main() {
+  final foo = Foo();
+  Expect.isTrue(foo.x);
+}
diff --git a/tests/web/regress/192964907b_test.dart b/tests/web/regress/192964907b_test.dart
new file mode 100644
index 0000000..7046686
--- /dev/null
+++ b/tests/web/regress/192964907b_test.dart
@@ -0,0 +1,18 @@
+// 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.
+
+import 'package:expect/expect.dart';
+
+class Foo {
+  late final bool? field;
+
+  void build() {
+    field = true;
+    Expect.isTrue(field!);
+  }
+}
+
+void main() {
+  (Foo().build)();
+}
diff --git a/tools/VERSION b/tools/VERSION
index fee5d96..f74cecc 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 15
 PATCH 0
-PRERELEASE 82
-PRERELEASE_PATCH 2
\ No newline at end of file
+PRERELEASE 178
+PRERELEASE_PATCH 1
\ No newline at end of file
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index 9edd0f8..bcf9abe52 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -9,299 +9,8 @@
 
 // @dart = 2.9
 
-import 'dart:collection';
-import 'dart:io';
+import '../../pkg/test_runner/bin/compare_results.dart' as compareResults;
 
-import 'package:args/args.dart';
-import 'package:test_runner/bot_results.dart';
-
-class Event {
-  final Result before;
-  final Result after;
-
-  Event(this.before, this.after);
-
-  bool get isNew => before == null;
-  bool get isNewPassing => before == null && after.matches;
-  bool get isNewFailing => before == null && !after.matches;
-  bool get changed => !unchanged;
-  bool get unchanged => before != null && before.outcome == after.outcome;
-  bool get remainedPassing => before.matches && after.matches;
-  bool get remainedFailing => !before.matches && !after.matches;
-  bool get flaked => after.flaked;
-  bool get fixed => !before.matches && after.matches;
-  bool get broke => before.matches && !after.matches;
-
-  String get description {
-    if (isNewPassing) {
-      return "is new and succeeded";
-    } else if (isNewFailing) {
-      return "is new and failed";
-    } else if (remainedPassing) {
-      return "succeeded again";
-    } else if (remainedFailing) {
-      return "failed again";
-    } else if (fixed) {
-      return "was fixed";
-    } else if (broke) {
-      return "broke";
-    } else {
-      throw new Exception("Unreachable");
-    }
-  }
-}
-
-bool firstSection = true;
-
-bool search(
-    String description,
-    String searchForStatus,
-    List<Event> events,
-    ArgResults options,
-    Map<String, Map<String, dynamic>> logs,
-    List<String> logSection) {
-  bool judgement = false;
-  bool beganSection = false;
-  int count = options["count"] != null ? int.parse(options["count"]) : null;
-  final configurations =
-      events.map((event) => event.after.configuration).toSet();
-  for (final event in events) {
-    if (searchForStatus == "passing" &&
-        (event.after.flaked || !event.after.matches)) {
-      continue;
-    }
-    if (searchForStatus == "flaky" && !event.after.flaked) {
-      continue;
-    }
-    if (searchForStatus == "failing" &&
-        (event.after.flaked || event.after.matches)) {
-      continue;
-    }
-    if (options["unchanged"] && !event.unchanged) continue;
-    if (options["changed"] && !event.changed) continue;
-    if (!beganSection) {
-      if (options["human"] && !options["logs-only"]) {
-        if (!firstSection) {
-          print("");
-        }
-        firstSection = false;
-        print("$description\n");
-      }
-    }
-    beganSection = true;
-    final before = event.before;
-    final after = event.after;
-    // The --flaky option is used to get a list of tests to deflake within a
-    // single named configuration. Therefore we can't right now always emit
-    // the configuration name, so only do it if there's more than one in the
-    // results being compared (that won't happen during deflaking.
-    final name =
-        configurations.length == 1 ? event.after.name : event.after.key;
-    if (!after.flaked && !after.matches) {
-      judgement = true;
-    }
-    if (count != null) {
-      if (--count <= 0) {
-        if (options["human"]) {
-          print("(And more)");
-        }
-        break;
-      }
-    }
-    String output;
-    if (options["verbose"]) {
-      if (options["human"]) {
-        String expect = after.matches ? "" : ", expected ${after.expectation}";
-        if (before == null || before.outcome == after.outcome) {
-          output = "$name ${event.description} "
-              "(${event.after.outcome}${expect})";
-        } else {
-          output = "$name ${event.description} "
-              "(${event.before?.outcome} -> ${event.after.outcome}${expect})";
-        }
-      } else {
-        output = "$name ${before?.outcome} ${after.outcome} "
-            "${before?.expectation} ${after.expectation} "
-            "${before?.matches} ${after.matches} "
-            "${before?.flaked} ${after.flaked}";
-      }
-    } else {
-      output = name;
-    }
-    final log = logs[event.after.key];
-    final bar = '=' * (output.length + 2);
-    if (log != null) {
-      logSection?.add("\n\n/$bar\\\n| $output |\n\\$bar/\n\n${log["log"]}");
-    }
-    if (!options["logs-only"]) {
-      print(output);
-    }
-  }
-
-  return judgement;
-}
-
-main(List<String> args) async {
-  final parser = new ArgParser();
-  parser.addFlag("changed",
-      abbr: 'c',
-      negatable: false,
-      help: "Show only tests that changed results.");
-  parser.addOption("count",
-      abbr: "C",
-      help: "Upper limit on how many tests to report in each section");
-  parser.addFlag("failing",
-      abbr: 'f', negatable: false, help: "Show failing tests.");
-  parser.addOption("flakiness-data",
-      abbr: 'd', help: "File containing flakiness data");
-  parser.addFlag("judgement",
-      abbr: 'j',
-      negatable: false,
-      help: "Exit 1 only if any of the filtered results failed.");
-  parser.addFlag("flaky",
-      abbr: 'F', negatable: false, help: "Show flaky tests.");
-  parser.addFlag("help", help: "Show the program usage.", negatable: false);
-  parser.addFlag("human", abbr: "h", negatable: false);
-  parser.addFlag("passing",
-      abbr: 'p', negatable: false, help: "Show passing tests.");
-  parser.addFlag("unchanged",
-      abbr: 'u',
-      negatable: false,
-      help: "Show only tests with unchanged results.");
-  parser.addFlag("verbose",
-      abbr: "v",
-      help: "Show the old and new result for each test",
-      negatable: false);
-  parser.addOption("logs",
-      abbr: "l", help: "Path to file holding logs of failing and flaky tests.");
-  parser.addFlag("logs-only",
-      help: "Only print logs of failing and flaky tests, no other output",
-      negatable: false);
-
-  final options = parser.parse(args);
-  if (options["help"]) {
-    print("""
-Usage: compare_results.dart [OPTION]... BEFORE AFTER
-Compare the old and new test results and list tests that pass the filters.
-All tests are listed if no filters are given.
-
-The options are as follows:
-
-${parser.usage}""");
-    return;
-  }
-
-  if (options["changed"] && options["unchanged"]) {
-    print(
-        "error: The options --changed and --unchanged are mutually exclusive");
-    exitCode = 2;
-    return;
-  }
-
-  final parameters = options.rest;
-  if (parameters.length != 2) {
-    print("error: Expected two parameters "
-        "(results before, results after)");
-    exitCode = 2;
-    return;
-  }
-
-  // Load the input and the flakiness data if specified.
-  final before = await loadResultsMap(parameters[0]);
-  final after = await loadResultsMap(parameters[1]);
-  final logs = options['logs'] == null
-      ? <String, Map<String, dynamic>>{}
-      : await loadResultsMap(options['logs']);
-  final flakinessData = options["flakiness-data"] != null
-      ? await loadResultsMap(options["flakiness-data"])
-      : <String, Map<String, dynamic>>{};
-
-  // The names of every test that has a data point in the new data set.
-  final names = new SplayTreeSet<String>.from(after.keys);
-
-  final events = <Event>[];
-  for (final name in names) {
-    final mapBefore = before[name];
-    final mapAfter = after[name];
-    final resultBefore = mapBefore != null
-        ? new Result.fromMap(mapBefore, flakinessData[name])
-        : null;
-    final resultAfter = new Result.fromMap(mapAfter, flakinessData[name]);
-    final event = new Event(resultBefore, resultAfter);
-    events.add(event);
-  }
-
-  final filterDescriptions = {
-    "passing": {
-      "unchanged": "continued to pass",
-      "changed": "began passing",
-      null: "passed",
-    },
-    "flaky": {
-      "unchanged": "are known to flake but didn't",
-      "changed": "flaked",
-      null: "are known to flake",
-    },
-    "failing": {
-      "unchanged": "continued to fail",
-      "changed": "began failing",
-      null: "failed",
-    },
-    "any": {
-      "unchanged": "had the same result",
-      "changed": "changed result",
-      null: "ran",
-    },
-  };
-
-  final searchForStatuses =
-      ["passing", "flaky", "failing"].where((option) => options[option]);
-
-  // Report tests matching the filters.
-  final logSection = <String>[];
-  bool judgement = false;
-  for (final searchForStatus
-      in searchForStatuses.isNotEmpty ? searchForStatuses : <String>["any"]) {
-    final searchForChanged = options["unchanged"]
-        ? "unchanged"
-        : options["changed"]
-            ? "changed"
-            : null;
-    final aboutStatus = filterDescriptions[searchForStatus][searchForChanged];
-    final sectionHeader = "The following tests $aboutStatus:";
-    final logSectionArg =
-        searchForStatus == "failing" || searchForStatus == "flaky"
-            ? logSection
-            : null;
-    bool possibleJudgement = search(
-        sectionHeader, searchForStatus, events, options, logs, logSectionArg);
-    if ((searchForStatus == null || searchForStatus == "failing")) {
-      judgement = possibleJudgement;
-    }
-  }
-
-  if (logSection.isNotEmpty) {
-    print(logSection.join());
-  }
-  // Exit 1 only if --judgement and any test failed.
-  if (options["judgement"]) {
-    if (options["human"] && !options["logs-only"] && !firstSection) {
-      print("");
-    }
-    String oldNew = options["unchanged"]
-        ? "old "
-        : options["changed"]
-            ? "new "
-            : "";
-    if (judgement) {
-      if (options["human"] && !options["logs-only"]) {
-        print("There were ${oldNew}test failures.");
-      }
-      exitCode = 1;
-    } else {
-      if (options["human"] && !options["logs-only"]) {
-        print("No ${oldNew}test failures were found.");
-      }
-    }
-  }
+main(List<String> args) {
+  compareResults.main(args);
 }
diff --git a/tools/bots/extend_results.dart b/tools/bots/extend_results.dart
index 7dc7743..4ab1d2c 100644
--- a/tools/bots/extend_results.dart
+++ b/tools/bots/extend_results.dart
@@ -56,9 +56,12 @@
     }
     if (priorResult != null) {
       result['previous_result'] = priorResult['result'];
+      result['changed'] = !(result['result'] == result['previous_result'] &&
+          result['flaky'] == result['previous_flaky'] &&
+          result['expected'] == priorResult['expected']);
+    } else {
+      result['changed'] = true;
     }
-    result['changed'] = (result['result'] != result['previous_result'] ||
-        result['flaky'] != result['previous_flaky']);
   }
   final sink = new File(newResultsPath).openWrite();
   final sorted = results.keys.toList()..sort();
diff --git a/tools/bots/find_base_commit.dart b/tools/bots/find_base_commit.dart
index 5e3c9e2..4a68e261 100755
--- a/tools/bots/find_base_commit.dart
+++ b/tools/bots/find_base_commit.dart
@@ -22,7 +22,7 @@
   parser.addOption("branch",
       abbr: "B",
       help: "Select the builders building this branch",
-      defaultsTo: "master");
+      defaultsTo: "main");
   parser.addOption("count",
       abbr: "c", help: "List this many commits", defaultsTo: "1");
   parser.addFlag("help", help: "Show the program usage.", negatable: false);
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 0759d39..892e142 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -279,6 +279,7 @@
       "out/DebugAndroidARM/",
       "out/DebugAndroidARM_X64/",
       "out/DebugAndroidARM64/",
+      "out/DebugAndroidARM64C/",
       "out/ReleaseIA32/",
       "out/ReleaseX64/",
       "out/ReleaseX64C/",
@@ -289,6 +290,7 @@
       "out/ReleaseAndroidARM/",
       "out/ReleaseAndroidARM_X64/",
       "out/ReleaseAndroidARM64/",
+      "out/ReleaseAndroidARM64C/",
       "out/ReleaseASANX64/",
       "out/ReleaseLSANX64/",
       "out/ReleaseMSANX64/",
@@ -304,6 +306,7 @@
       "out/ProductSIMARM_X64/",
       "out/ProductAndroidARM/",
       "out/ProductAndroidARM64/",
+      "out/ProductAndroidARM64C/",
       "xcodebuild/DebugIA32/",
       "xcodebuild/DebugSIMARM/",
       "xcodebuild/DebugSIMARM64/",
@@ -409,6 +412,17 @@
         "use-sdk": true
       }
     },
+    "web-unittest-asserts-(linux|mac|win)": {
+      "options": {
+        "builder-tag": "web",
+        "compiler": "dartk",
+        "enable-asserts": true,
+        "mode": "release",
+        "runtime": "vm",
+        "timeout": 240,
+        "use-sdk": true
+      }
+    },
     "unittest-asserts-(debug|product|release)-(linux|mac|win)": {
       "options": {
         "compiler": "dartk",
@@ -418,15 +432,6 @@
         "use-sdk": true
       }
     },
-    "unittest-weak-asserts-no-sdk-(linux|mac|win)": {
-      "options": {
-        "compiler": "dartk",
-        "enable-asserts": true,
-        "mode": "release",
-        "runtime": "vm",
-        "timeout": 240
-      }
-    },
     "analyzer-unittest-asserts-(debug|product|release)-(linux|mac|win)": {
       "options": {
         "compiler": "dartk",
@@ -453,15 +458,6 @@
     "vm-ffi-unit-test": {
       "__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."
     },
-    "unittest-asserts-no-sdk-(linux|mac|win)": {
-      "options": {
-        "compiler": "dartk",
-        "enable-asserts": true,
-        "mode": "release",
-        "runtime": "vm",
-        "timeout": 240
-      }
-    },
     "unittest-analyzer_use_fasta-(linux|mac|win)": {
       "options": {
         "compiler": "none",
@@ -2454,7 +2450,7 @@
           "testRunner": true,
           "arguments": [
             "pkg/compiler/tool/modular_test_suite.dart",
-            "-nunittest-asserts-no-sdk-linux",
+            "-nweb-unittest-asserts-linux",
             "--verbose",
             "--use-sdk"
           ]
@@ -2462,16 +2458,18 @@
         {
           "name": "js_runtime unit tests",
           "arguments": [
-            "-nunittest-asserts-no-sdk-linux",
+            "-nweb-unittest-asserts-linux",
             "pkg//js_runtime/"
           ]
         },
         {
           "name": "dart2js unit tests",
           "arguments": [
-            "-nunittest-asserts-no-sdk-linux",
+            "-nweb-unittest-asserts-linux",
             "pkg//compiler/"
-          ]
+          ],
+          "shards": 3,
+          "fileset": "web_platform"
         }
       ]
     },
@@ -2883,13 +2881,6 @@
           ],
           "shards": 6,
           "fileset": "web_platform_hostasserts_nnbd"
-        },
-        {
-          "name": "dart2js nnbd unit tests",
-          "arguments": [
-            "-nunittest-weak-asserts-no-sdk-linux",
-            "pkg//compiler/"
-          ]
         }
       ]
     },
diff --git a/tools/dom/new_scripts/code_generator_dart.py b/tools/dom/new_scripts/code_generator_dart.py
index 2830e7f..ad9fc3c 100644
--- a/tools/dom/new_scripts/code_generator_dart.py
+++ b/tools/dom/new_scripts/code_generator_dart.py
@@ -43,7 +43,7 @@
 """
 
 import os
-import cPickle as pickle
+import pickle
 import re
 import sys
 
diff --git a/tools/dom/new_scripts/dart_compiler.py b/tools/dom/new_scripts/dart_compiler.py
index 5a17629..7fe9379 100755
--- a/tools/dom/new_scripts/dart_compiler.py
+++ b/tools/dom/new_scripts/dart_compiler.py
@@ -34,7 +34,7 @@
 import abc
 from optparse import OptionParser
 import os
-import cPickle as pickle
+import pickle
 
 from idl_reader import IdlReader
 from utilities import write_file
diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py
index 717630b..3510edd 100644
--- a/tools/dom/scripts/css_code_generator.py
+++ b/tools/dom/scripts/css_code_generator.py
@@ -86,12 +86,11 @@
     # TODO(efortuna): do we also want CSSPropertyNames.in?
     data = [d.strip() for d in data if not isCommentLine(d) and not '=' in d]
 
-    browser_props = [readCssProperties(file) for file in BROWSER_PATHS]
-    universal_properties = reduce(lambda a, b: set(a).intersection(b),
-                                  browser_props)
+    browser_props = [set(readCssProperties(file)) for file in BROWSER_PATHS]
+    universal_properties = set.intersection(*browser_props)
     universal_properties = universal_properties.difference(['cssText'])
     universal_properties = universal_properties.intersection(
-        map(camelCaseName, data))
+        list(map(camelCaseName, data)))
 
     class_file = open(TEMPLATE_FILE, 'w')
 
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index a392020..1319e95 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -31,12 +31,11 @@
     third_party_dir = os.path.join(dart_dir, '..', 'third_party')
     assert (os.path.exists(third_party_dir))
 else:
-    # It's Dart we need to make sure that tools in injected in our search path
-    # because this is where idl_parser is located for a Dart enlistment.  Dartium
+    # It's Dart we need to make sure that WebCore is injected in our search path
+    # because this is where idl_parser is located for a Dart enlistment. Dartium
     # can figure out the tools directory because of the location of where the
     # scripts blink scripts are located.
-    tools_dir = os.path.join(dart_dir, 'tools')
-    sys.path.insert(1, tools_dir)
+    sys.path.insert(1, os.path.join(dart_dir, 'third_party/WebCore'))
 
 sys.path.insert(1, third_party_dir)
 
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index ceb213e..974cfc3 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -72,14 +72,12 @@
 
     def LoadAuxiliary(self, auxiliary_dir):
 
-        def Visitor(_, dirname, names):
+        for (dirname, _, names) in os.walk(auxiliary_dir):
             for name in names:
                 if name.endswith('.dart'):
                     name = name[0:-5]  # strip off ".dart"
                 self._auxiliary_files[name] = os.path.join(dirname, name)
 
-        os.path.walk(auxiliary_dir, Visitor, None)
-
     def FilterMembersWithUnidentifiedTypes(self, database):
         """Removes unidentified types.
 
@@ -106,10 +104,13 @@
                     return False
                 return True
 
-            interface.constants = filter(IsIdentified, interface.constants)
-            interface.attributes = filter(IsIdentified, interface.attributes)
-            interface.operations = filter(IsIdentified, interface.operations)
-            interface.parents = filter(IsIdentified, interface.parents)
+            interface.constants = list(filter(IsIdentified,
+                                              interface.constants))
+            interface.attributes = list(
+                filter(IsIdentified, interface.attributes))
+            interface.operations = list(
+                filter(IsIdentified, interface.operations))
+            interface.parents = list(filter(IsIdentified, interface.parents))
 
     def FilterInterfaces(self,
                          database,
diff --git a/tools/dom/scripts/dartmetadata.py b/tools/dom/scripts/dartmetadata.py
index b997b60..35e770c 100644
--- a/tools/dom/scripts/dartmetadata.py
+++ b/tools/dom/scripts/dartmetadata.py
@@ -12,7 +12,6 @@
 import monitored
 import os
 import re
-from generator import ConstantOutputOrder
 from htmlrenamer import renamed_html_members, html_interface_renames
 
 _logger = logging.getLogger('dartmetadata')
@@ -714,7 +713,7 @@
 
         if _monitor_type_metadata:
             monitored_interfaces = {}
-            for interface_id, interface_data in self._types.items():
+            for interface_id, interface_data in list(self._types.items()):
                 monitored_interface = interface_data.copy()
                 monitored_interface['members'] = monitored.Dict(
                     'dartmetadata.%s' % interface_id, interface_data['members'])
diff --git a/tools/dom/scripts/database.py b/tools/dom/scripts/database.py
index 75d8d2e..2ff5dc2 100755
--- a/tools/dom/scripts/database.py
+++ b/tools/dom/scripts/database.py
@@ -149,7 +149,7 @@
 
     def Save(self):
         """Saves all in-memory interfaces into files."""
-        for interface in self._all_interfaces.values():
+        for interface in list(self._all_interfaces.values()):
             self._SaveInterfaceFile(interface)
         for interface_name in self._interfaces_to_delete:
             self._DeleteInterfaceFile(interface_name)
diff --git a/tools/dom/scripts/database_test.py b/tools/dom/scripts/database_test.py
index a82ed24..e75ec9b 100755
--- a/tools/dom/scripts/database_test.py
+++ b/tools/dom/scripts/database_test.py
@@ -51,7 +51,7 @@
     def testListInterfaces(self):
         db = database.Database(self._database_dir)
         db.Load()
-        self.assertEquals(self._ListInterfaces(db), ['I1'])
+        self.assertEqual(self._ListInterfaces(db), ['I1'])
 
     def testHasInterface(self):
         db = database.Database(self._database_dir)
@@ -67,7 +67,7 @@
         db.Save()
         self.assertTrue(
             os.path.exists(os.path.join(self._database_dir, 'I2.idl')))
-        self.assertEquals(self._ListInterfaces(db), ['I1', 'I2'])
+        self.assertEqual(self._ListInterfaces(db), ['I1', 'I2'])
 
     def testDeleteInterface(self):
         db = database.Database(self._database_dir)
@@ -76,13 +76,13 @@
         db.Save()
         self.assertFalse(
             os.path.exists(os.path.join(self._database_dir, 'I1.idl')))
-        self.assertEquals(self._ListInterfaces(db), [])
+        self.assertEqual(self._ListInterfaces(db), [])
 
     def testGetInterface(self):
         db = database.Database(self._database_dir)
         db.Load()
         interface = db.GetInterface('I1')
-        self.assertEquals(interface.id, 'I1')
+        self.assertEqual(interface.id, 'I1')
 
 
 if __name__ == '__main__':
diff --git a/tools/dom/scripts/databasebuilder.py b/tools/dom/scripts/databasebuilder.py
index c5327a7..c618084 100755
--- a/tools/dom/scripts/databasebuilder.py
+++ b/tools/dom/scripts/databasebuilder.py
@@ -236,9 +236,9 @@
                         ext_attrs_node[
                             type_valued_attribute_name] = strip_modules(value)
 
-        map(rename_node, idl_file.all(IDLInterface))
-        map(rename_node, idl_file.all(IDLType))
-        map(rename_ext_attrs, idl_file.all(IDLExtAttrs))
+        list(map(rename_node, idl_file.all(IDLInterface)))
+        list(map(rename_node, idl_file.all(IDLType)))
+        list(map(rename_ext_attrs, idl_file.all(IDLExtAttrs)))
 
     def _annotate(self, interface, import_options):
         """Adds @ annotations based on the source and source_attributes
@@ -259,10 +259,10 @@
 
         add_source_annotation(interface)
 
-        map(add_source_annotation, interface.parents)
-        map(add_source_annotation, interface.constants)
-        map(add_source_annotation, interface.attributes)
-        map(add_source_annotation, interface.operations)
+        list(map(add_source_annotation, interface.parents))
+        list(map(add_source_annotation, interface.constants))
+        list(map(add_source_annotation, interface.attributes))
+        list(map(add_source_annotation, interface.operations))
 
     def _sign(self, node):
         """Computes a unique signature for the node, for merging purposed, by
@@ -480,7 +480,8 @@
                 def has_annotations(idl_node):
                     return len(idl_node.annotations)
 
-                old_interface.__dict__[what] = filter(has_annotations, old_list)
+                old_interface.__dict__[what] = \
+                    list(filter(has_annotations, old_list))
 
             return changed
 
@@ -619,7 +620,7 @@
 
     def _process_ast(self, filename, ast):
         if len(ast) == 1:
-            ast = ast.values()[0]
+            ast = next(iter(ast.values()))
         else:
             print('ERROR: Processing AST: ' + os.path.basename(file_name))
         new_asts[filename] = ast
@@ -664,8 +665,8 @@
                          (interface.id, import_options.source,
                           os.path.basename(idl_file.filename)))
 
-            interface.attributes = filter(enabled, interface.attributes)
-            interface.operations = filter(enabled, interface.operations)
+            interface.attributes = list(filter(enabled, interface.attributes))
+            interface.operations = list(filter(enabled, interface.operations))
             self._imported_interfaces.append((interface, import_options))
 
         # If an IDL dictionary then there is no implementsStatements.
@@ -769,15 +770,15 @@
                     if (source in idl_node.annotations and
                             idl_node.annotations[source]):
                         annotation = idl_node.annotations[source]
-                        for name, value in annotation.items():
+                        for name, value in list(annotation.items()):
                             if (name in top_level_annotation and
                                     value == top_level_annotation[name]):
                                 del annotation[name]
 
-                map(normalize, interface.parents)
-                map(normalize, interface.constants)
-                map(normalize, interface.attributes)
-                map(normalize, interface.operations)
+                list(map(normalize, interface.parents))
+                list(map(normalize, interface.constants))
+                list(map(normalize, interface.attributes))
+                list(map(normalize, interface.operations))
 
     def map_dictionaries(self):
         """Changes the type of operations/constructors arguments from an IDL
@@ -790,12 +791,12 @@
                 type_node.id = 'Dictionary'
 
         def all_types(node):
-            map(dictionary_to_map, node.all(IDLType))
+            list(map(dictionary_to_map, node.all(IDLType)))
 
         for interface in self._database.GetInterfaces():
-            map(all_types, interface.all(IDLExtAttrFunctionValue))
-            map(all_types, interface.attributes)
-            map(all_types, interface.operations)
+            list(map(all_types, interface.all(IDLExtAttrFunctionValue)))
+            list(map(all_types, interface.attributes))
+            list(map(all_types, interface.operations))
 
     def fetch_constructor_data(self, options):
         window_interface = self._database.GetInterface('Window')
@@ -1023,7 +1024,7 @@
             self._no_interfaces_used_types = []
             constructor_function = self._no_interface_constructor_types
 
-        map(constructor_function, interface.all(IDLExtAttrFunctionValue))
+        list(map(constructor_function, interface.all(IDLExtAttrFunctionValue)))
 
         self._mark_usage(interface, check_dictionaries=check_dictionaries)
 
@@ -1040,7 +1041,7 @@
             self._no_interfaces_used_types = []
             used = self._no_interface_used
 
-        map(used, operation_attribute.all(IDLType))
+        list(map(used, operation_attribute.all(IDLType)))
 
         self._remember_usage(
             operation_attribute, check_dictionaries=check_dictionaries)
@@ -1053,14 +1054,14 @@
     # (IDLExtAttrFunctionValue) that have a dictionary reference.
     def _dictionary_constructor_types(self, node):
         self._dictionaries_used_types = []
-        map(self._dictionary_used, node.all(IDLType))
+        list(map(self._dictionary_used, node.all(IDLType)))
         self._remember_usage(node)
 
     # Iterator function for map to iterate over all constructor types
     # (IDLExtAttrFunctionValue) that reference an interface with NoInterfaceObject.
     def _no_interface_constructor_types(self, node):
         self._no_interfaces_used_types = []
-        map(self._no_interface_used, node.all(IDLType))
+        list(map(self._no_interface_used, node.all(IDLType)))
         self._remember_usage(node, check_dictionaries=False)
 
     # Maximum width of each column.
diff --git a/tools/dom/scripts/databasebuilder_test.py b/tools/dom/scripts/databasebuilder_test.py
index 7467b3e..840e6dd 100755
--- a/tools/dom/scripts/databasebuilder_test.py
+++ b/tools/dom/scripts/databasebuilder_test.py
@@ -30,7 +30,8 @@
     def _assert_content_equals(self, path, expected_content):
 
         def clean(content):
-            return ' '.join(filter(len, map(str.strip, content.split('\n'))))
+            return ' '.join(
+                filter(len, list(map(str.strip, content.split('\n')))))
 
         file_path = os.path.join(self._database_dir, path)
         self.assertTrue(os.path.exists(file_path))
diff --git a/tools/dom/scripts/emitter_test.py b/tools/dom/scripts/emitter_test.py
index eb50c2a..1c1021b 100755
--- a/tools/dom/scripts/emitter_test.py
+++ b/tools/dom/scripts/emitter_test.py
@@ -18,7 +18,7 @@
         pass
 
     def check(self, e, expected):
-        self.assertEquals(''.join(e.Fragments()), expected)
+        self.assertEqual(''.join(e.Fragments()), expected)
 
     def testExample(self):
         e = emitter.Emitter()
@@ -34,7 +34,7 @@
         try:
             e = emitter.Emitter()
             b = e.Emit('$(A)$(!B)$(A)$(!B)')  # $(!B) is duplicated
-        except RuntimeError, ex:
+        except RuntimeError as ex:
             return
         raise AssertionError('Expected error')
 
@@ -46,7 +46,7 @@
     def testTemplate2(self):
         e = emitter.Emitter()
         r = e.Emit('1$(A)2$(B)3$(A)4$(B)5', A='x', B='y')
-        self.assertEquals(None, r)
+        self.assertEqual(None, r)
         self.check(e, '1x2y3x4y5')
 
     def testTemplate3(self):
@@ -128,12 +128,12 @@
             e = emitter.Emitter()
             e.Emit('$#A(-)', A='Invalid')
             e.Fragments()
-        except RuntimeError, ex:
+        except RuntimeError as ex:
             return
         raise AssertionError('Expected error')
 
     def testFormat(self):
-        self.assertEquals(emitter.Format('$A$B', A=1, B=2), '12')
+        self.assertEqual(emitter.Format('$A$B', A=1, B=2), '12')
 
 
 if __name__ == '__main__':
diff --git a/tools/dom/scripts/fremontcutbuilder.py b/tools/dom/scripts/fremontcutbuilder.py
index bd5fcad..aa7adfe 100755
--- a/tools/dom/scripts/fremontcutbuilder.py
+++ b/tools/dom/scripts/fremontcutbuilder.py
@@ -58,10 +58,10 @@
                     continue
             return True
 
-        interface.constants = filter(IsIdentified, interface.constants)
-        interface.attributes = filter(IsIdentified, interface.attributes)
-        interface.operations = filter(IsIdentified, interface.operations)
-        interface.parents = filter(IsIdentified, interface.parents)
+        interface.constants = list(filter(IsIdentified, interface.constants))
+        interface.attributes = list(filter(IsIdentified, interface.attributes))
+        interface.operations = list(filter(IsIdentified, interface.operations))
+        interface.parents = list(filter(IsIdentified, interface.parents))
 
 
 def build_database(idl_files,
@@ -183,6 +183,7 @@
         'networkinfo',  # Not yet used in Blink yet
         'vibration',  # Not yet used in Blink yet
         'inspector',
+        'idl_parser',  # idl_parser has test IDL files.
     ]
 
     # TODO(terry): Integrate this into the htmlrenamer's _removed_html_interfaces
@@ -193,16 +194,15 @@
         'WebKitGamepadList.idl',  # GamepadList is the new one.
     ]
 
-    def visitor(arg, dir_name, names):
+    for (dir_name, dirs, files) in os.walk(webcore_dir):
         if os.path.basename(dir_name) in DIRS_TO_IGNORE:
-            names[:] = []  # Do not go underneath
-        for name in names:
-            file_name = os.path.join(dir_name, name)
-            (interface, ext) = os.path.splitext(file_name)
-            if ext == '.idl' and not (name in FILES_TO_IGNORE):
-                idl_files.append(file_name)
-
-    os.path.walk(webcore_dir, visitor, webcore_dir)
+            dirs[:] = []  # Do not go underneath
+        else:
+            for name in files:
+                file_name = os.path.join(dir_name, name)
+                (interface, ext) = os.path.splitext(file_name)
+                if ext == '.idl' and not (name in FILES_TO_IGNORE):
+                    idl_files.append(file_name)
 
     database_dir = os.path.join(current_dir, '..', 'database')
 
diff --git a/tools/dom/scripts/generate_blink_file.py b/tools/dom/scripts/generate_blink_file.py
index 4e9c2a4..48a4612 100644
--- a/tools/dom/scripts/generate_blink_file.py
+++ b/tools/dom/scripts/generate_blink_file.py
@@ -6,14 +6,13 @@
 """Generates sdk/lib/_blink/dartium/_blink_dartium.dart file."""
 
 import os
-from sets import Set
-from generator import AnalyzeOperation, AnalyzeConstructor
+from generator import AnalyzeOperation, AnalyzeConstructor, ConstantOutputOrder
 
 # This is list of all methods with native c++ implementations
 # If performing a dartium merge, the best practice is to comment out this list,
 # ensure everything runs, and then uncomment this list which might possibly
 # introduce breaking changes due to changes to these method signatures.
-_js_custom_members = Set([
+_js_custom_members = set([
     'Document.createElement',
     'Element.id',
     'Element.tagName',
@@ -79,7 +78,7 @@
 # Uncomment out this line  to short circuited native methods and run all of
 # dart:html through JS interop except for createElement which is slightly more
 # tightly natively wired.
-# _js_custom_members = Set([])
+# _js_custom_members = set()
 
 # Expose built-in methods support by an instance that is not shown in the IDL.
 _additional_methods = {
@@ -385,12 +384,6 @@
 
 """
 
-
-def ConstantOutputOrder(a, b):
-    """Canonical output ordering for constants."""
-    return (a.id > b.id) - (a.id < b.id)
-
-
 def generate_parameter_entries(param_infos):
     optional_default_args = 0
     for argument in param_infos:
@@ -524,7 +517,7 @@
 
 def _Process_Attributes(blink_file, interface, attributes):
     # Emit an interface's attributes and operations.
-    for attribute in sorted(attributes, ConstantOutputOrder):
+    for attribute in sorted(attributes, key=ConstantOutputOrder):
         name = attribute.id
         is_native = _Is_Native(interface.id, name)
         if attribute.is_read_only:
@@ -552,7 +545,7 @@
                         primary_interface=False):
     analyzeOperations = []
 
-    for operation in sorted(operations, ConstantOutputOrder):
+    for operation in sorted(operations, key=ConstantOutputOrder):
         if len(analyzeOperations) == 0:
             analyzeOperations.append(operation)
         else:
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index d8ad435..bcc36f3 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -10,6 +10,8 @@
 import monitored
 import os
 import re
+from functools import cmp_to_key
+from itertools import zip_longest
 from htmlrenamer import custom_html_constructors, html_interface_renames, \
     typed_array_renames
 
@@ -216,7 +218,7 @@
     ])
 
 _custom_types = monitored.Set('generator._custom_types',
-                              typed_array_renames.keys())
+                              list(typed_array_renames.keys()))
 
 
 def IsCustomType(interface_name):
@@ -399,6 +401,19 @@
     return 'WebKit' in thing.annotations or 'Dart' in thing.annotations
 
 
+# Legacy Python 2 way to sort lists. Group by type, and then sort by value.
+class MultitypeSortKey:
+
+    def __init__(self, value):
+        self.value = value
+
+    def __lt__(self, other):
+        try:
+            return self.value < other.value
+        except TypeError:
+            return str(type(self)) < str(type(other))
+
+
 class ParamInfo(object):
     """Holder for various information about a parameter of a Dart operation.
 
@@ -497,7 +512,8 @@
 
     # Given a list of overloaded default values, choose a suitable one.
     def OverloadedDefault(args):
-        defaults = sorted(set(arg.default_value for arg in args))
+        defaults = sorted(set(arg.default_value for arg in args),
+                          key=MultitypeSortKey)
         if len(set(DartType(arg.type.id) for arg in args)) == 1:
             null_default = False
             for arg in args:
@@ -509,14 +525,12 @@
     result = []
 
     is_optional = False
-
     # Process overloaded arguments across a set of overloaded operations.
     # Each tuple in args corresponds to overloaded arguments with the same name.
-    for arg_tuple in map(lambda *x: x, *args):
+    for arg_tuple in list(zip_longest(*args)):
         is_optional = is_optional or any(
             arg is None or IsOptional(arg) for arg in arg_tuple)
-
-        filtered = filter(None, arg_tuple)
+        filtered = list(filter(None, arg_tuple))
         (type_id, is_nullable) = OverloadedType(filtered)
         name = OverloadedName(filtered)
         (default_value, default_value_is_null) = OverloadedDefault(filtered)
@@ -608,9 +622,9 @@
             return 'Callback' not in type_id
 
     # Success callback is the first argument (change if this no longer holds).
-    new_info.callback_args = filter(lambda x: not IsNotCallbackType(x),
-                                    new_info.param_infos)
-    new_info.param_infos = filter(IsNotCallbackType, new_info.param_infos)
+    new_info.callback_args = list(
+        filter(lambda x: not IsNotCallbackType(x), new_info.param_infos))
+    new_info.param_infos = list(filter(IsNotCallbackType, new_info.param_infos))
     new_info.type_name = 'Future'
 
     return new_info
@@ -745,9 +759,10 @@
             # TODO(terry): This may have to change for dart2js for code shaking the
             #              return types (unions) needs to be emitted with @create
             #              annotations and/or with JS('type1|type2',...)
-            if hasattr(rename_type,
-                       'im_self') and rename_type.im_self._database.HasTypeDef(
-                           param.type_id):
+            if hasattr(
+                    rename_type,
+                    '__self__') and rename_type.__self__._database.HasTypeDef(
+                        param.type_id):
                 dart_type = 'dynamic'
             else:
                 dart_type = rename_type(
@@ -783,7 +798,7 @@
         def FormatParam(dec):
             return dec[0] + dec[1]
 
-        argtexts = map(FormatParam, required)
+        argtexts = list(map(FormatParam, required))
         if optional:
             left_bracket, right_bracket = '{}' if needs_named else '[]'
             argtexts.append(left_bracket +
@@ -799,7 +814,7 @@
         """ Returns a number of required arguments in Dart declaration of
     the operation.
     """
-        return len(filter(lambda i: not i.is_optional, self.param_infos))
+        return len(list(filter(lambda i: not i.is_optional, self.param_infos)))
 
     def ParametersAsArgumentList(self,
                                  parameter_count=None,
@@ -939,11 +954,14 @@
             return rename_type(self.type_name)
 
 
-def ConstantOutputOrder(a, b):
+def _ConstantOutputOrder(a, b):
     """Canonical output ordering for constants."""
     return (a.id > b.id) - (a.id < b.id)
 
 
+ConstantOutputOrder = cmp_to_key(_ConstantOutputOrder)
+
+
 def _FormatNameList(names):
     """Returns JavaScript array literal expression with one name per line."""
     #names = sorted(names)
diff --git a/tools/dom/scripts/go.sh b/tools/dom/scripts/go.sh
index 71789cf..764fddc 100755
--- a/tools/dom/scripts/go.sh
+++ b/tools/dom/scripts/go.sh
@@ -35,7 +35,5 @@
   fi
 fi
 
-# third_party IDL scripts are not compatible with python3, so use python2.7.
-
 reset && \
-python2.7 ./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata --gen-interop "$ARG_OPTION"
+python3 ./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata --gen-interop "$ARG_OPTION"
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index 22890c9..15cc0f9 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -37,7 +37,6 @@
     'EventSource',
 ]
 
-
 class HtmlDartGenerator(object):
 
     def __init__(self, interface, options, dart_use_blink, logger):
@@ -82,10 +81,10 @@
             # one synthesized class (WebGL).
             self._gl_constants.extend(interface.constants)
         else:
-            for const in sorted(interface.constants, ConstantOutputOrder):
+            for const in sorted(interface.constants, key=ConstantOutputOrder):
                 self.AddConstant(const)
 
-        for attr in sorted(interface.attributes, ConstantOutputOrder):
+        for attr in sorted(interface.attributes, key=ConstantOutputOrder):
             if attr.type.id != 'EventHandler' and attr.type.id != 'EventListener':
                 self.AddAttribute(attr, declare_only)
 
@@ -132,12 +131,13 @@
             _logger.warn('Interface %s has duplicate parent interfaces %s - ' \
                          'ignoring duplicates. Please file a bug with the dart:html team.' % (interface.id, parent_list))
 
-        for parent_interface in sorted(secondary_parents):
+        for parent_interface in sorted(secondary_parents,
+                                       key=ConstantOutputOrder):
             if isinstance(parent_interface, str):
                 continue
 
             for attr in sorted(parent_interface.attributes,
-                               ConstantOutputOrder):
+                               key=ConstantOutputOrder):
                 if not FindMatchingAttribute(interface, attr):
                     if attr.type.id != 'EventHandler':
                         self.SecondaryContext(parent_interface)
@@ -172,7 +172,6 @@
         # are pure interfaces (mixins to this interface).
         if (IsPureInterface(parent_name, self._database)):
             return
-
         for operation in parent.operations:
             if operation.id in operationsByName:
                 operations = operationsByName[operation.id]
@@ -242,8 +241,10 @@
 
         if (operation.id in operations_by_name and
                 len(operations_by_name[operation.id]) > 1 and len(
-                    filter(lambda overload: overload.startswith(operation_str),
-                           renamed_overloads.keys())) == 0 and
+                    list(
+                        filter(
+                            lambda overload: overload.startswith(operation_str),
+                            renamed_overloads.keys()))) == 0 and
                 operation_str not in keep_overloaded_members and
                 operation_str not in overloaded_and_renamed and
                 operation_str not in renamed_html_members and
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py
index 40e86e5..8be4796 100644
--- a/tools/dom/scripts/idlnode.py
+++ b/tools/dom/scripts/idlnode.py
@@ -7,6 +7,7 @@
 import sys
 
 import idl_definitions
+from generator import MultitypeSortKey
 from idl_types import IdlType, IdlNullableType, IdlUnionType, IdlArrayOrSequenceType
 import dependency
 
@@ -88,12 +89,18 @@
         """Returns string of extra info for __repr__()."""
         return ''
 
-    def __cmp__(self, other):
-        """Override default compare operation.
+    def __eq__(self, other):
+        """Override default equals operation.
     IDLNodes are equal if all their properties are equal."""
         if other is None or not isinstance(other, IDLNode):
             return 1
-        return self.__dict__.__cmp__(other.__dict__)
+        return self.__dict__.__eq__(other.__dict__)
+
+    def __hash__(self):
+        """Define default hashing behavior.
+    In order to comply with a == b => hash(a) == hash(b), we recursively iterate
+    self.__dict__ and convert all objects to hashable objects."""
+        return self.to_hash()
 
     def reset_id(self, newId):
         """Reset the id of the Node.  This is typically done during a normalization
@@ -152,7 +159,36 @@
             res[k] = v
         return res
 
-    def _find_all(self, ast, label, max_results=sys.maxint):
+    def to_hash(self):
+        return hash(self._to_hashable(self))
+
+    def _to_hashable(self, obj):
+        # By default, lists and dicts are not hashable, and user-defined objects
+        # are unordered. In order to make a consistent hash for a given object,
+        # this converts unhashable types and sorts properties.
+        if isinstance(obj, list):
+            # Convert lists to tuples.
+            new_obj = []
+            for item in obj:
+                new_obj.append(self._to_hashable(item))
+            return tuple(new_obj)
+        elif isinstance(obj, dict):
+            # Convert dicts to frozensets of tuples.
+            new_obj = set()
+            # Sort to ensure fixed order.
+            for (k2, v2) in sorted(obj.items(), key=MultitypeSortKey):
+                new_obj.add((self._to_hashable(k2), self._to_hashable(v2)))
+            return frozenset(new_obj)
+        elif hasattr(obj, '__dict__'):
+            items = []
+            # Sort properties to ensure fixed order.
+            for (k, v) in sorted(obj.__dict__.items(), key=MultitypeSortKey):
+                items.append((k, self._to_hashable(v)))
+            return tuple(items)
+        else:
+            return obj
+
+    def _find_all(self, ast, label, max_results=sys.maxsize):
         """Searches the AST for tuples with a given label. The PegParser
     output is composed of lists and tuples, where the tuple 1st argument
     is a label. If ast root is a list, will search recursively inside each
@@ -452,9 +488,9 @@
                     interface_info = dependency.get_interfaces_info()[interface.
                                                                       id]
 
-                    implements = interface_info[
-                        'implements_interfaces'] if interface_info.has_key(
-                            'implements_interfaces') else []
+                    implements = []
+                    if 'implements_interfaces' in interface_info:
+                        implements = interface_info['implements_interfaces']
                     if not (blink_interface.is_partial) and len(implements) > 0:
                         implementor = new_asts[interface.id].interfaces.get(
                             interface.id)
diff --git a/tools/dom/scripts/idlnode_test.py b/tools/dom/scripts/idlnode_test.py
index 61de65a..5ce9037 100755
--- a/tools/dom/scripts/idlnode_test.py
+++ b/tools/dom/scripts/idlnode_test.py
@@ -37,7 +37,7 @@
             ast = parser.parse(content)
             node = idlnode.IDLFile(ast)
             actual = node.to_dict() if node else None
-        except SyntaxError, e:
+        except SyntaxError as e:
             error = e
             pass
         if actual == expected:
diff --git a/tools/dom/scripts/mdnreader.py b/tools/dom/scripts/mdnreader.py
index b142b7a..50fc227 100644
--- a/tools/dom/scripts/mdnreader.py
+++ b/tools/dom/scripts/mdnreader.py
@@ -46,13 +46,13 @@
         if 'api' in json_dict:
             # Get the interface name
             api_dict = json_dict['api']
-            interface_name = api_dict.keys()[0]
+            interface_name = next(iter(api_dict))
             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]
+                element_name = next(iter(elements_dict))
                 # Convert to WebCore name
                 interface = str('HTML' + element_name + 'Element')
                 return (interface, elements_dict[element_name])
@@ -60,49 +60,12 @@
             svg_dict = json_dict['svg']
             if 'elements' in svg_dict:
                 elements_dict = svg_dict['elements']
-                element_name = elements_dict.keys()[0]
+                element_name = next(iter(elements_dict))
                 # 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:
-                                _unify_metadata(browser_compat_data[interface],
-                                                metadata)
-                            else:
-                                browser_compat_data[interface] = metadata
-        else:
-            names[:] = []  # Do not go underneath
-
     # Attempts to unify two compatibility infos by taking the union of both, and
     # for conflicting information, taking the "stricter" of the two versions.
     # Updates `a` in place to represent the union of `a` and `b`.
@@ -182,7 +145,42 @@
             if not attr in a:
                 a[attr] = b[attr]
 
-    os.path.walk(browser_compat_folder, visitor, browser_compat_folder)
+    for (dir_path, dirs, files) in os.walk(browser_compat_folder):
+
+        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 files:
+                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:
+                                _unify_metadata(browser_compat_data[interface],
+                                                metadata)
+                            else:
+                                browser_compat_data[interface] = metadata
+        else:
+            dirs[:] = []  # Do not go underneath
 
     return browser_compat_data
 
@@ -192,8 +190,8 @@
     # Given two valid version strings, compares parts of the version string
     # iteratively.
     def _greater_version(version_a, version_b):
-        version_a_split = map(int, version_a.split('.'))
-        version_b_split = map(int, version_b.split('.'))
+        version_a_split = list(map(int, version_a.split('.')))
+        version_b_split = list(map(int, version_b.split('.')))
         for i in range(min(len(version_a_split), len(version_b_split))):
             if version_a_split[i] > version_b_split[i]:
                 return version_a
@@ -208,7 +206,7 @@
             return False
         if version is True:
             return True
-        if isinstance(version, str) or isinstance(version, unicode):
+        if isinstance(version, str):
             pattern = re.compile('^([0-9]+\.)*[0-9]+$')
             if not pattern.match(version):
                 # It's possible for version strings to look like '<35'. We don't
diff --git a/tools/dom/scripts/multiemitter_test.py b/tools/dom/scripts/multiemitter_test.py
index 17c360d..b1ae27c 100644
--- a/tools/dom/scripts/multiemitter_test.py
+++ b/tools/dom/scripts/multiemitter_test.py
@@ -29,7 +29,7 @@
             files.append((file, ''.join(contents)))
 
         m.Flush(_Collect)
-        self.assertEquals(expected, files)
+        self.assertEqual(expected, files)
 
     def testExample(self):
         m = multiemitter.MultiEmitter()
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 20a25ed..9fa35dc 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -10,6 +10,7 @@
 import monitored
 import os
 import re
+from collections import OrderedDict
 from generator import *
 from htmldartgenerator import *
 from htmlrenamer import generateCallbackInterface
@@ -183,14 +184,14 @@
         info.js_name = None
         info.type_name = interface_name
         # optional parameters are always nullable
-        info.param_infos = map(
-            lambda tXn: ParamInfo(
-                name=tXn[1],
-                type_id=tXn[0],
-                is_optional=True,
-                is_nullable=True,
-                default_value=None,
-                default_value_is_null=False), self.opt_params)
+        info.param_infos = [
+            ParamInfo(name=tXn[1],
+                      type_id=tXn[0],
+                      is_optional=True,
+                      is_nullable=True,
+                      default_value=None,
+                      default_value_is_null=False) for tXn in self.opt_params
+        ]
         info.requires_named_arguments = True
         info.factory_parameters = ['"%s"' % self.tag]
         info.pure_dart_constructor = True
@@ -513,67 +514,69 @@
     'SVGSetElement',
 ]
 
-js_support_checks = dict({
-    'Animation':
-    "JS('bool', '!!(document.body.animate)')",
-    'AudioContext':
-    "JS('bool', '!!(window.AudioContext ||"
-    " window.webkitAudioContext)')",
-    'Crypto':
-    "JS('bool', '!!(window.crypto && window.crypto.getRandomValues)')",
-    'Database':
-    "JS('bool', '!!(window.openDatabase)')",
-    'DOMPoint':
-    "JS('bool', '!!(window.DOMPoint) || !!(window.WebKitPoint)')",
-    'ApplicationCache':
-    "JS('bool', '!!(window.applicationCache)')",
-    'DOMFileSystem':
-    "JS('bool', '!!(window.webkitRequestFileSystem)')",
-    'FormData':
-    "JS('bool', '!!(window.FormData)')",
-    'HashChangeEvent':
-    "Device.isEventTypeSupported('HashChangeEvent')",
-    'HTMLShadowElement':
-    ElemSupportStr('shadow'),
-    'HTMLTemplateElement':
-    ElemSupportStr('template'),
-    'MediaStreamEvent':
-    "Device.isEventTypeSupported('MediaStreamEvent')",
-    'MediaStreamTrackEvent':
-    "Device.isEventTypeSupported('MediaStreamTrackEvent')",
-    'MediaSource':
-    "JS('bool', '!!(window.MediaSource)')",
-    'Notification':
-    "JS('bool', '!!(window.Notification)')",
-    'Performance':
-    "JS('bool', '!!(window.performance)')",
-    'SpeechRecognition':
-    "JS('bool', '!!(window.SpeechRecognition || "
-    "window.webkitSpeechRecognition)')",
-    'SVGExternalResourcesRequired':
-    ('supported(SvgElement element)',
-     "JS('bool', '#.externalResourcesRequired !== undefined && "
-     "#.externalResourcesRequired.animVal !== undefined', "
-     "element, element)"),
-    'SVGLangSpace':
-    ('supported(SvgElement element)',
-     "JS('bool', '#.xmlspace !== undefined && #.xmllang !== undefined', "
-     "element, element)"),
-    'TouchList':
-    "JS('bool', '!!document.createTouchList')",
-    'WebGLRenderingContext':
-    "JS('bool', '!!(window.WebGLRenderingContext)')",
-    'WebSocket':
-    "JS('bool', 'typeof window.WebSocket != \"undefined\"')",
-    'Worker':
-    "JS('bool', '(typeof window.Worker != \"undefined\")')",
-    'XSLTProcessor':
-    "JS('bool', '!!(window.XSLTProcessor)')",
-}.items() + dict(
-    (key, SvgSupportStr(_svg_element_constructors[key]) if key.
-     startswith('SVG') else ElemSupportStr(_html_element_constructors[key]))
-    for key in _js_support_checks_basic_element_with_constructors +
-    _js_support_checks_additional_element).items())
+js_support_checks = dict(
+    list({
+        'Animation':
+        "JS('bool', '!!(document.body.animate)')",
+        'AudioContext':
+        "JS('bool', '!!(window.AudioContext ||"
+        " window.webkitAudioContext)')",
+        'Crypto':
+        "JS('bool', '!!(window.crypto && window.crypto.getRandomValues)')",
+        'Database':
+        "JS('bool', '!!(window.openDatabase)')",
+        'DOMPoint':
+        "JS('bool', '!!(window.DOMPoint) || !!(window.WebKitPoint)')",
+        'ApplicationCache':
+        "JS('bool', '!!(window.applicationCache)')",
+        'DOMFileSystem':
+        "JS('bool', '!!(window.webkitRequestFileSystem)')",
+        'FormData':
+        "JS('bool', '!!(window.FormData)')",
+        'HashChangeEvent':
+        "Device.isEventTypeSupported('HashChangeEvent')",
+        'HTMLShadowElement':
+        ElemSupportStr('shadow'),
+        'HTMLTemplateElement':
+        ElemSupportStr('template'),
+        'MediaStreamEvent':
+        "Device.isEventTypeSupported('MediaStreamEvent')",
+        'MediaStreamTrackEvent':
+        "Device.isEventTypeSupported('MediaStreamTrackEvent')",
+        'MediaSource':
+        "JS('bool', '!!(window.MediaSource)')",
+        'Notification':
+        "JS('bool', '!!(window.Notification)')",
+        'Performance':
+        "JS('bool', '!!(window.performance)')",
+        'SpeechRecognition':
+        "JS('bool', '!!(window.SpeechRecognition || "
+        "window.webkitSpeechRecognition)')",
+        'SVGExternalResourcesRequired':
+        ('supported(SvgElement element)',
+         "JS('bool', '#.externalResourcesRequired !== undefined && "
+         "#.externalResourcesRequired.animVal !== undefined', "
+         "element, element)"),
+        'SVGLangSpace':
+        ('supported(SvgElement element)',
+         "JS('bool', '#.xmlspace !== undefined && #.xmllang !== undefined', "
+         "element, element)"),
+        'TouchList':
+        "JS('bool', '!!document.createTouchList')",
+        'WebGLRenderingContext':
+        "JS('bool', '!!(window.WebGLRenderingContext)')",
+        'WebSocket':
+        "JS('bool', 'typeof window.WebSocket != \"undefined\"')",
+        'Worker':
+        "JS('bool', '(typeof window.Worker != \"undefined\")')",
+        'XSLTProcessor':
+        "JS('bool', '!!(window.XSLTProcessor)')",
+    }.items()) + list(
+        dict((key,
+              SvgSupportStr(_svg_element_constructors[key]) if key.startswith(
+                  'SVG') else ElemSupportStr(_html_element_constructors[key]))
+             for key in _js_support_checks_basic_element_with_constructors +
+             _js_support_checks_additional_element).items()))
 
 # JavaScript element class names of elements for which createElement does not
 # always return exactly the right element, either because it might not be
@@ -719,7 +722,9 @@
 
         implements_str = ''
         if implements:
-            implements_str = ' implements ' + ', '.join(set(implements))
+            # Get rid of duplicates using OrderedDict.
+            implements = list(OrderedDict([(i, None) for i in implements]))
+            implements_str = ' implements ' + ', '.join(implements)
 
         mixins = self._backend.Mixins()
 
@@ -815,6 +820,9 @@
             NULLABLE='?',
             NULLSAFECAST=True,
             NULLASSERT='!')
+        if self._interface.doc_js_name is 'RadioNodeList':
+            print(self._backend.ImplementationTemplate())
+            print(implementation_members_emitter)
         stream_getter_signatures_emitter = None
         element_stream_getters_emitter = None
         class_members_emitter = None
@@ -2195,7 +2203,7 @@
                 return re.search('^@.*Returns', ann) or re.search(
                     '^@.*Creates', ann)
 
-            if not filter(js_type_annotation, anns):
+            if not list(filter(js_type_annotation, anns)):
                 _logger.warn('Member with wildcard native type: %s.%s' %
                              (self._interface.id, idl_member_name))
 
@@ -2317,7 +2325,7 @@
 
         # Emit the $!TYPE_MAP
         if map_emitter:
-            items = self._typeMap.items()
+            items = list(self._typeMap.items())
             items.sort()
             for (idl_name, dart_name) in items:
                 map_emitter.Emit(
diff --git a/tools/dom/scripts/templateloader_test.py b/tools/dom/scripts/templateloader_test.py
index 4b16df7..f6bf597 100755
--- a/tools/dom/scripts/templateloader_test.py
+++ b/tools/dom/scripts/templateloader_test.py
@@ -30,7 +30,7 @@
         threw = False
         try:
             output_text = self._preprocess(input_text, conds)
-        except Exception, e:
+        except Exception as e:
             threw = True
             if str(e).find(expected_message) == -1:
                 self.fail("'%s' does not contain '%s'" % (e, expected_message))
diff --git a/tools/dom/src/CssRectangle.dart b/tools/dom/src/CssRectangle.dart
index 6aa6393..21205d1 100644
--- a/tools/dom/src/CssRectangle.dart
+++ b/tools/dom/src/CssRectangle.dart
@@ -287,8 +287,7 @@
       right == other.right &&
       bottom == other.bottom;
 
-  int get hashCode => _JenkinsSmiHash.hash4(
-      left.hashCode, top.hashCode, right.hashCode, bottom.hashCode);
+  int get hashCode => Object.hash(left, top, right, bottom);
 
   /**
    * Computes the intersection of `this` and [other].
diff --git a/tools/dom/templates/html/impl/impl_DOMRect.darttemplate b/tools/dom/templates/html/impl/impl_DOMRect.darttemplate
index 861096c..60f40c9 100644
--- a/tools/dom/templates/html/impl/impl_DOMRect.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DOMRect.darttemplate
@@ -18,8 +18,7 @@
       width == other.width &&
       height == other.height;
 
-  int get hashCode => _JenkinsSmiHash.hash4(left.hashCode, top.hashCode,
-      width.hashCode, height.hashCode);
+  int get hashCode => Object.hash(left, top, width, height);
 
   /**
    * Computes the intersection of `this` and [other].
@@ -97,40 +96,3 @@
       this.top + this.height);
 
   $!MEMBERS}
-
-/**
- * This is the [Jenkins hash function][1] but using masking to keep
- * values in SMI range.
- *
- * [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
- *
- * Use:
- * Hash each value with the hash of the previous value, then get the final
- * hash by calling finish.
- *
- *     var hash = 0;
- *     for (var value in values) {
- *       hash = JenkinsSmiHash.combine(hash, value.hashCode);
- *     }
- *     hash = JenkinsSmiHash.finish(hash);
- */
-class _JenkinsSmiHash {
-  // TODO(11617): This class should be optimized and standardized elsewhere.
-
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) <<  3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  static int hash2(a, b) => finish(combine(combine(0, a), b));
-
-  static int hash4(a, b, c, d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
diff --git a/tools/dom/templates/html/impl/impl_DOMRectReadOnly.darttemplate b/tools/dom/templates/html/impl/impl_DOMRectReadOnly.darttemplate
index e1febe3..357e764 100644
--- a/tools/dom/templates/html/impl/impl_DOMRectReadOnly.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DOMRectReadOnly.darttemplate
@@ -18,8 +18,7 @@
       width == other.width &&
       height == other.height;
 
-  int get hashCode => _JenkinsSmiHash.hash4(left.hashCode, top.hashCode,
-      width.hashCode, height.hashCode);
+  int get hashCode => Object.hash(left, top, width, height);
 
   /**
    * Computes the intersection of `this` and [other].
diff --git a/tools/gn.py b/tools/gn.py
index 108adca..cecd030 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -5,6 +5,7 @@
 
 import argparse
 import os
+import platform
 import subprocess
 import sys
 import time
@@ -66,7 +67,39 @@
     return [merge(x, y) for x, y in gn_args.items()]
 
 
+# Runs true if the currently executing python interpreter is running under
+# Rosetta. I.e., python3 is an x64 executable and we're on an arm64 Mac.
+def IsRosetta():
+    if platform.system() == 'Darwin':
+        p = subprocess.Popen(['sysctl', '-in', 'sysctl.proc_translated'],
+                             stdout=subprocess.PIPE,
+                             stderr=subprocess.STDOUT)
+        output, _ = p.communicate()
+        return output.decode('utf-8').strip() == '1'
+    return False
+
+
 def HostCpuForArch(arch):
+    # Check for Rosetta before checking platform.machine(), as the latter
+    # returns 'x86_64' when running under Rosetta.
+    if IsRosetta():
+        if arch in ['x64', 'x64c']:
+            # Without this case, we would try to build with
+            #   host_cpu="arm64"
+            #   target_cpu="x64"
+            #   dart_target_arch="x64"
+            # Which requires the VM to use an x64 simulator in the host
+            # arm64 binaries, and this simulator is unimplemented.
+            return 'x64'
+        else:
+            return 'arm64'
+
+    m = platform.machine()
+    if m == 'aarch64' or m == 'arm64':
+        return 'arm64'
+    if m == 'armv7l' or m == 'armv6l':
+        return 'arm'
+
     if arch in ['ia32', 'arm', 'armv6', 'simarm', 'simarmv6', 'simarm_x64']:
         return 'x86'
     if arch in [
diff --git a/tools/make_version.py b/tools/make_version.py
index bf2c9c5..79ac27f 100755
--- a/tools/make_version.py
+++ b/tools/make_version.py
@@ -17,7 +17,7 @@
 # backwards-compatible.
 VM_SNAPSHOT_FILES = [
     # Header files.
-    'clustered_snapshot.h',
+    'app_snapshot.h',
     'datastream.h',
     'image_snapshot.h',
     'object.h',
@@ -25,7 +25,7 @@
     'snapshot.h',
     'symbols.h',
     # Source files.
-    'clustered_snapshot.cc',
+    'app_snapshot.cc',
     'dart.cc',
     'dart_api_impl.cc',
     'image_snapshot.cc',
diff --git a/tools/manage_deps.dart b/tools/manage_deps.dart
new file mode 100755
index 0000000..0d1e8b4
--- /dev/null
+++ b/tools/manage_deps.dart
@@ -0,0 +1,261 @@
+#!tools/sdks/dart-sdk/bin/dart
+// 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.
+
+/// Helps rolling dependency to the newest version available
+/// (or a target version).
+///
+/// Usage: ./tools/manage_deps.dart bump <dependency> [--branch <branch>] [--target <ref>]
+///
+/// This will:
+/// 0. Check that git is clean
+/// 1. Create branch `<branch> ?? bump_<dependency>`
+/// 2. Update `DEPS` for `<dependency>`
+/// 3. Create a commit with `git log` of imported commits in the message.
+/// 4. Prompt to create a CL
+
+// @dart = 2.13
+library bump;
+
+import 'dart:io';
+import 'package:args/command_runner.dart';
+
+import 'package:path/path.dart' as p;
+
+class BumpCommand extends Command<int> {
+  @override
+  String get description => '''
+Bump a dependency in DEPS and create a CL
+
+This will:
+0. Check that git is clean
+1. Create branch `<branch> ?? bump_<dependency>`
+2. Update `DEPS` for `<dependency>`
+3. Create a commit with `git log` of imported commits in the message.
+4. Prompt to create a CL
+''';
+
+  String get invocation =>
+      './tools/manage_deps.dart bump <path/to/dependency> <options>';
+
+  BumpCommand() {
+    argParser.addOption(
+      'branch',
+      help: 'The name of the branch where the update is created.',
+      valueHelp: 'branch-name',
+    );
+    argParser.addOption(
+      'target',
+      help: 'The git ref to update to.',
+      valueHelp: 'ref',
+    );
+  }
+
+  @override
+  String get name => 'bump';
+
+  @override
+  Future<int> run() async {
+    final argResults = this.argResults!;
+    if (argResults.rest.length != 1) {
+      usageException('No dependency directory given');
+    }
+    final status = runProcessForLines(['git', 'status', '--porcelain'],
+        explanation: 'Checking if your git checkout is clean');
+    if (status.isNotEmpty) {
+      print('Note your git checkout is dirty!');
+    }
+
+    final pkgDir = argResults.rest.first;
+    if (!Directory(pkgDir).existsSync()) {
+      usageException('No directory $pkgDir');
+    }
+    final toUpdate = p.split(pkgDir).last;
+    final branchName = argResults['branch'] ?? 'bump_$toUpdate';
+
+    final exists = runProcessForExitCode(
+        ['git', 'show-ref', '--quiet', 'refs/head/$branchName'],
+        explanation: 'Checking if branch-name exists');
+    if (exists != 0) {
+      print('Branch $branchName already exist - delete it?');
+      if (!prompt()) {
+        print('Ok - exiting');
+        exit(-1);
+      }
+      runProcessAssumingSuccess(
+        ['git', 'branch', '-D', branchName],
+        explanation: 'Deleting existing branch',
+      );
+    }
+    runProcessAssumingSuccess(
+      ['git', 'checkout', '-b', branchName],
+      explanation: 'Creating branch',
+    );
+
+    final currentRev = runProcessForLines(
+      ['gclient', 'getdep', '-r', p.join('sdk', pkgDir)],
+      explanation: 'Finding current revision',
+    ).first;
+
+    final originUrl = runProcessForLines(
+      ['git', 'config', '--get', 'remote.origin.url'],
+      workingDirectory: pkgDir,
+      explanation: 'Finding origin url',
+    ).first;
+
+    runProcessAssumingSuccess(
+      ['git', 'fetch', 'origin'],
+      workingDirectory: pkgDir,
+      explanation: 'Retrieving updates to $toUpdate',
+    );
+
+    final gitRevParseResult = runProcessForLines([
+      'git',
+      'rev-parse',
+      if (argResults.wasParsed('target'))
+        argResults['target']
+      else
+        'origin/HEAD',
+    ], workingDirectory: pkgDir, explanation: 'Finding sha-id');
+
+    final target = gitRevParseResult.first;
+    if (currentRev == target) {
+      print('Already at $target - nothing to do');
+      return -1;
+    }
+    runProcessAssumingSuccess(
+      ['gclient', 'setdep', '-r', '${p.join('sdk', pkgDir)}@$target'],
+      explanation: 'Updating $toUpdate',
+    );
+    runProcessAssumingSuccess(
+      ['gclient', 'sync', '-D'],
+      explanation: 'Syncing your deps',
+    );
+    runProcessAssumingSuccess(
+      [
+        Platform.resolvedExecutable,
+        'tools/generate_package_config.dart',
+      ],
+      explanation: 'Updating package config',
+    );
+    final gitLogResult = runProcessForLines([
+      'git',
+      'log',
+      '--format=%C(auto) $originUrl/+/%h %s ',
+      '$currentRev..$target',
+    ], workingDirectory: pkgDir, explanation: 'Listing new commits');
+    final commitMessage = '''
+Bump $toUpdate to $target
+
+Changes:
+```
+> git log --format="%C(auto) %h %s" ${currentRev.substring(0, 7)}..${target.substring(0, 7)}
+${gitLogResult.join('\n')}
+```
+Diff: $originUrl/+/$currentRev~..$target/
+''';
+    runProcessAssumingSuccess(['git', 'commit', '-am', commitMessage],
+        explanation: 'Committing');
+    print('Consider updating CHANGELOG.md');
+    print('Do you want to create a CL?');
+    if (prompt()) {
+      await runProcessInteractively(
+        ['git', 'cl', 'upload', '-m', commitMessage],
+        explanation: 'Creating CL',
+      );
+    }
+    return 0;
+  }
+}
+
+Future<void> main(List<String> args) async {
+  final runner = CommandRunner<int>(
+      'manage_deps.dart', 'helps managing the DEPS file',
+      usageLineLength: 80)
+    ..addCommand(BumpCommand());
+  try {
+    exit(await runner.run(args) ?? -1);
+  } on UsageException catch (e) {
+    print(e.message);
+    print(e.usage);
+  }
+}
+
+bool prompt() {
+  stdout.write('(y/N):');
+  final answer = stdin.readLineSync() ?? '';
+  return answer.trim().toLowerCase() == 'y';
+}
+
+void printRunningLine(
+    List<String> cmd, String? explanation, String? workingDirectory) {
+  stdout.write(
+      "${explanation ?? 'Running'}: `${cmd.join(' ')}` ${workingDirectory == null ? '' : 'in $workingDirectory'}");
+}
+
+void printSuccessTrailer(ProcessResult result, String? onFailure) {
+  if (result.exitCode == 0) {
+    stdout.writeln(' ✓');
+  } else {
+    stdout.writeln(' X');
+    stderr.write(result.stdout);
+    stderr.write(result.stderr);
+    if (onFailure != null) {
+      print(onFailure);
+    }
+    throw Exception();
+  }
+}
+
+void runProcessAssumingSuccess(List<String> cmd,
+    {String? explanation,
+    String? workingDirectory,
+    Map<String, String> environment = const {},
+    String? onFailure}) {
+  printRunningLine(cmd, explanation, workingDirectory);
+  final result = Process.runSync(
+    cmd[0],
+    cmd.skip(1).toList(),
+    workingDirectory: workingDirectory,
+    environment: environment,
+  );
+  printSuccessTrailer(result, onFailure);
+}
+
+List<String> runProcessForLines(List<String> cmd,
+    {String? explanation, String? workingDirectory, String? onFailure}) {
+  printRunningLine(cmd, explanation, workingDirectory);
+  final result = Process.runSync(
+    cmd[0],
+    cmd.skip(1).toList(),
+    workingDirectory: workingDirectory,
+  );
+  printSuccessTrailer(result, onFailure);
+  final output = (result.stdout as String);
+  return output == '' ? <String>[] : output.split('\n');
+}
+
+Future<void> runProcessInteractively(List<String> cmd,
+    {String? explanation, String? workingDirectory}) async {
+  printRunningLine(cmd, explanation, workingDirectory);
+  stdout.writeln('');
+  final process = await Process.start(cmd[0], cmd.skip(1).toList(),
+      workingDirectory: workingDirectory, mode: ProcessStartMode.inheritStdio);
+  final exitCode = await process.exitCode;
+  if (exitCode != 0) {
+    throw Exception();
+  }
+}
+
+int runProcessForExitCode(List<String> cmd,
+    {String? explanation, String? workingDirectory}) {
+  printRunningLine(cmd, explanation, workingDirectory);
+  final result = Process.runSync(
+    cmd[0],
+    cmd.skip(1).toList(),
+    workingDirectory: workingDirectory,
+  );
+  stdout.writeln(' => ${result.exitCode}');
+  return result.exitCode;
+}
diff --git a/tools/sdks/README b/tools/sdks/README
index b7d766a5..0ef9f68 100644
--- a/tools/sdks/README
+++ b/tools/sdks/README
@@ -7,6 +7,6 @@
 on ARM and ARM64 are also provided.
 
 To upload new versions of these CIPD packages, run "./update.sh" in this
-directory. Because these SDKs are used for the presubmit dartfmt check on
-changed files, they may need to be updated often when dartfmt is changing
+directory. Because these SDKs are used for the presubmit dart format check on
+changed files, they may need to be updated often when dart format is changing
 rapidly. Access to the project-dart-admins Luci auth group is required to do so.
diff --git a/tools/verify_docs/README.md b/tools/verify_docs/README.md
new file mode 100644
index 0000000..cc64017
--- /dev/null
+++ b/tools/verify_docs/README.md
@@ -0,0 +1,55 @@
+## Whats' this?
+
+A tool to validate the documentation comments for the `dart:` libraries.
+
+## Running the tool
+
+To validate all the dart: libraries, run:
+
+```
+dart tools/verify_docs/bin/verify_docs.dart
+```
+
+Or to validate an individual library (async, collection, js_util, ...), run:
+
+```
+dart tools/verify_docs/bin/verify_docs.dart sdk/lib/<lib-name>
+```
+
+The tool should be run from the root of the sdk repository.
+
+## Authoring code samples
+
+### What gets analyzed
+
+This tool will walk all dartdoc api docs looking for code samples in doc comments.
+It will analyze any code sample in a `dart` code fence. For example:
+
+> ```dart
+> print('hello world!');
+> ```
+
+By default, an import for that library is added to the sample being analyzed (i.e.,
+`import 'dart:async";`). Additionally, the code sample is automatically embedded in
+the body of a simple main() method.
+
+### Excluding code samples from analysis
+
+In order to exclude a code sample from analysis, change it to a plain code fence style:
+
+> ```
+> print("I'm not analyzed :(");
+> ```
+
+### Specifying additional imports
+
+In order to reference code from other Dart core libraries, you can either explicitly add
+the import to the code sample - in-line in the sample - or use a directive on the same
+line as the code fence. The directive style looks like:
+
+> ```dart import:async
+> print('hello world ${Timer()}');
+> ```
+
+Multiple imports can be specified like this if desired (i.e., "```dart import:async import:convert").
+
diff --git a/tools/verify_docs/bin/verify_docs.dart b/tools/verify_docs/bin/verify_docs.dart
new file mode 100644
index 0000000..8c4fc67
--- /dev/null
+++ b/tools/verify_docs/bin/verify_docs.dart
@@ -0,0 +1,331 @@
+// 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.
+
+import 'dart:io';
+
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/utilities.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/diagnostic/diagnostic.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/file_system/overlay_file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/util/comment.dart';
+import 'package:path/path.dart' as path;
+
+void main(List<String> args) async {
+  final libDir = Directory('sdk/lib');
+  if (!libDir.existsSync()) {
+    print('Please run this tool from the root of the sdk repo.');
+    exit(1);
+  }
+
+  print('Validating the dartdoc code samples from the dart: libraries.');
+  print('');
+  print('To run this tool, run `dart tools/verify_docs/bin/verify_docs.dart`.');
+  print('');
+  print('For documentation about how to author dart: code samples,'
+      ' see tools/verify_docs/README.md');
+  print('');
+
+  final coreLibraries = args.isEmpty
+      ? libDir.listSync().whereType<Directory>().toList()
+      : args.map((arg) => Directory(arg)).toList();
+  coreLibraries.sort((a, b) => a.path.compareTo(b.path));
+
+  // Skip some dart: libraries.
+  const skipLibraries = {
+    'html',
+    'indexed_db',
+    'svg',
+    'vmservice',
+    'web_audio',
+    'web_gl',
+    'web_sql'
+  };
+  coreLibraries.removeWhere(
+    (lib) => skipLibraries.contains(path.basename(lib.path)),
+  );
+
+  var hadErrors = false;
+  for (final dir in coreLibraries) {
+    hadErrors |= await validateLibrary(dir);
+  }
+
+  exitCode = hadErrors ? 1 : 0;
+}
+
+Future<bool> validateLibrary(Directory dir) async {
+  final libName = path.basename(dir.path);
+
+  print('## dart:$libName');
+  print('');
+
+  var hadErrors = false;
+
+  for (final file in dir
+      .listSync(recursive: true)
+      .whereType<File>()
+      .where((file) => file.path.endsWith('.dart'))) {
+    hadErrors |= await verifyFile(libName, file, dir);
+  }
+
+  return hadErrors;
+}
+
+Future<bool> verifyFile(String coreLibName, File file, Directory parent) async {
+  final text = file.readAsStringSync();
+  var parseResult = parseString(
+    content: text,
+    featureSet: FeatureSet.latestLanguageVersion(),
+    path: file.path,
+    throwIfDiagnostics: false,
+  );
+
+  // Throw if there are syntactic errors.
+  var syntacticErrors = parseResult.errors.where((error) {
+    return error.errorCode.type == ErrorType.SYNTACTIC_ERROR;
+  }).toList();
+  if (syntacticErrors.isNotEmpty) {
+    throw Exception(syntacticErrors);
+  }
+
+  var visitor = ValidateCommentCodeSamplesVisitor(
+    coreLibName,
+    file.path,
+    parseResult.lineInfo,
+  );
+  await visitor.process(parseResult);
+  if (visitor.errors.isNotEmpty) {
+    print('${path.relative(file.path, from: parent.parent.path)}');
+    print('${visitor.errors.toString()}');
+  }
+
+  return visitor.errors.isEmpty;
+}
+
+/// Visit a compilation unit and collect the list of code samples found in
+/// dartdoc comments.
+class ValidateCommentCodeSamplesVisitor extends GeneralizingAstVisitor {
+  final String coreLibName;
+  final String filePath;
+  final LineInfo lineInfo;
+
+  final List<CodeSample> samples = [];
+  final StringBuffer errors = StringBuffer();
+
+  ValidateCommentCodeSamplesVisitor(
+    this.coreLibName,
+    this.filePath,
+    this.lineInfo,
+  );
+
+  Future process(ParseStringResult parseResult) async {
+    // collect code samples
+    visitCompilationUnit(parseResult.unit);
+
+    // analyze them
+    for (CodeSample sample in samples) {
+      await validateCodeSample(sample);
+    }
+  }
+
+  @override
+  void visitAnnotatedNode(AnnotatedNode node) {
+    _handleDocumentableNode(node);
+    super.visitAnnotatedNode(node);
+  }
+
+  void _handleDocumentableNode(AnnotatedNode node) {
+    final docComment = node.documentationComment;
+    if (docComment == null || !docComment.isDocumentation) {
+      return;
+    }
+
+    const sampleStart = '```dart';
+    const sampleEnd = '```';
+
+    final text = getCommentNodeRawText(docComment)!;
+    final commentOffset = docComment.offset;
+    final commentLineStart = lineInfo.getLocation(commentOffset).lineNumber;
+    if (!text.contains(sampleStart)) {
+      return;
+    }
+
+    var offset = text.indexOf(sampleStart);
+    while (offset != -1) {
+      // Collect template directives, like "```dart import:async".
+      final codeFenceSuffix = text.substring(
+          offset + sampleStart.length, text.indexOf('\n', offset));
+      final directives = Set.unmodifiable(codeFenceSuffix.trim().split(' '));
+
+      offset = text.indexOf('\n', offset) + 1;
+      final end = text.indexOf(sampleEnd, offset);
+
+      var snippet = text.substring(offset, end);
+      snippet = snippet.substring(0, snippet.lastIndexOf('\n'));
+
+      List<String> lines = snippet.split('\n');
+
+      samples.add(
+        CodeSample(
+          lines.map((e) => '  ${cleanDocLine(e)}').join('\n'),
+          coreLibName: coreLibName,
+          directives: directives,
+          lineStartOffset: commentLineStart +
+              text.substring(0, offset - 1).split('\n').length -
+              1,
+        ),
+      );
+
+      offset = text.indexOf(sampleStart, offset);
+    }
+  }
+
+  Future validateCodeSample(CodeSample sample) async {
+    final resourceProvider =
+        OverlayResourceProvider(PhysicalResourceProvider.INSTANCE);
+
+    var text = sample.text;
+    final lines = sample.text.split('\n').map((l) => l.trim()).toList();
+
+    final hasImports = text.contains("import '") || text.contains('import "');
+    var useDefaultTemplate = true;
+
+    if (lines.any((line) =>
+        line.startsWith('class ') ||
+        line.startsWith('enum ') ||
+        line.startsWith('extension '))) {
+      useDefaultTemplate = false;
+    }
+
+    if (lines
+        .any((line) => line.startsWith('main(') || line.contains(' main('))) {
+      useDefaultTemplate = false;
+    }
+
+    if (!hasImports) {
+      if (useDefaultTemplate) {
+        text = "main() async {\n${text.trimRight()}\n}\n";
+      }
+
+      for (final directive
+          in sample.directives.where((str) => str.startsWith('import:'))) {
+        final libName = directive.substring('import:'.length);
+        text = "import 'dart:$libName';\n$text";
+      }
+
+      if (sample.coreLibName != 'internal') {
+        text = "import 'dart:${sample.coreLibName}';\n$text";
+      }
+    }
+
+    // Note: the file paths used below will currently only work on posix
+    // filesystems.
+    final sampleFilePath = '/sample.dart';
+
+    resourceProvider.setOverlay(
+      sampleFilePath,
+      content: text,
+      modificationStamp: 0,
+    );
+
+    // TODO(devoncarew): Refactor to use AnalysisContextCollection to avoid
+    // re-creating analysis contexts.
+    final result = await resolveFile2(
+      path: sampleFilePath,
+      resourceProvider: resourceProvider,
+    );
+
+    resourceProvider.removeOverlay(sampleFilePath);
+
+    if (result is ResolvedUnitResult) {
+      // Filter out unused imports, since we speculatively add imports to some
+      // samples.
+      var errors = result.errors.where(
+        (e) => e.errorCode != HintCode.UNUSED_IMPORT,
+      );
+
+      // Also, don't worry about 'unused_local_variable' and related; this may
+      // be intentional in samples.
+      errors = errors.where(
+        (e) =>
+            e.errorCode != HintCode.UNUSED_LOCAL_VARIABLE &&
+            e.errorCode != HintCode.UNUSED_ELEMENT,
+      );
+
+      // Remove warnings about deprecated member use from the same library.
+      errors = errors.where(
+        (e) =>
+            e.errorCode != HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE &&
+            e.errorCode !=
+                HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE,
+      );
+
+      if (errors.isNotEmpty) {
+        print('$filePath:${sample.lineStartOffset}: ${errors.length} errors');
+
+        for (final error in errors) {
+          final location = result.lineInfo.getLocation(error.offset);
+          print(
+            '  ${_severity(error.severity)}: ${error.message} '
+            '[$location] (${error.errorCode.name.toLowerCase()})',
+          );
+        }
+        print('');
+
+        // Print out the code sample.
+        print(sample.text
+            .split('\n')
+            .map((line) =>
+                '  >${line.length >= 5 ? line.substring(5) : line.trimLeft()}')
+            .join('\n'));
+        print('');
+      }
+    } else {
+      throw 'unexpected result type: ${result}';
+    }
+
+    return;
+  }
+}
+
+String cleanDocLine(String line) {
+  var copy = line.trimLeft();
+  if (copy.startsWith('///')) {
+    copy = copy.substring(3);
+  } else if (copy.startsWith('*')) {
+    copy = copy.substring(1);
+  }
+  return copy.padLeft(line.length, ' ');
+}
+
+class CodeSample {
+  final String coreLibName;
+  final Set<String> directives;
+  final String text;
+  final int lineStartOffset;
+
+  CodeSample(
+    this.text, {
+    required this.coreLibName,
+    this.directives = const {},
+    required this.lineStartOffset,
+  });
+}
+
+String _severity(Severity severity) {
+  switch (severity) {
+    case Severity.info:
+      return 'info';
+    case Severity.warning:
+      return 'warning';
+    case Severity.error:
+      return 'error';
+  }
+}
diff --git a/tools/verify_docs/pubspec.yaml b/tools/verify_docs/pubspec.yaml
new file mode 100644
index 0000000..c9898e5
--- /dev/null
+++ b/tools/verify_docs/pubspec.yaml
@@ -0,0 +1,12 @@
+name: verify_docs
+description: A tool to validate the documentation comments for the `dart:` libraries.
+
+# This package is not intended for consumption on pub.dev. DO NOT publish.
+publish_to: none
+
+environment:
+  sdk: '>=2.12.0 <3.0.0'
+
+dependencies:
+  analyzer: any
+  path: any